Poincaré conjecture: the Lean proof, cleaned up together
The 2026 Lean proof of the Poincaré conjecture after Morgan and Tian, 3 million lines, cleaned up together: smaller, faster to build, more readable, the theorems unchanged

| 1 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Variation.AdaptedFields.AdaptedIndexIntegral |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Regularity.Hessian.RegularHessian |
| 3 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Regularity.Hessian.HorizontalHessianTrace |
| 4 | |
| 5 | /-! |
| 6 | # The regular reduced-length Laplacian bound |
| 7 | |
| 8 | The actual orthonormal adapted frame gives one Hessian comparison per |
| 9 | basis vector. Its integrated index trace is exactly the scalar and |
| 10 | Harnack upper bound. Morgan-Tian Theorem 6.50, p. 131. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | |
| 15 | open Set |
| 16 | open scoped Manifold ContDiff Bundle BigOperators intervalIntegral |
| 17 | |
| 18 | universe u |
| 19 | |
| 20 | namespace PoincareMT.M14 |
| 21 | |
| 22 | variable {n : ℕ} {X : Type u} [TopologicalSpace X] {time : X → ℝ} |
| 23 | {I : SpacetimeInterval} {G : GeneralizedLGeometryTransport n X time I} |
| 24 | {T : ℝ} {x : G.Point} |
| 25 | |
| 26 | /-- The weighted Harnack density of the actual exponential path is |
| 27 | integrable even at zero, Lemmas 6.47-6.48, p. 130. -/ |
| 28 | theorem exponential_weightedHarnack_intervalIntegrable |
| 29 | (hM12 : GeneralizedRicciGaugeTheory.{u} n) (E : M14ExponentialFamily G T x) |
| 30 | {Z : G.Horizontal x} {s : ℝ} (hs : (Z, s) ∈ E.domain) (hpos : 0 < s) : |
| 31 | IntervalIntegrable (fun t => t * Real.sqrt t * |
| 32 | M14GeneralizedHarnackDensity G (E.path Z s hs hpos) |
| 33 | (fun r => M14BackwardTimeDerivative G (horizontalScalarCurvature G.leafwise) |
| 34 | ((E.path Z s hs hpos).curve r)) t) MeasureTheory.volume 0 (s ^ 2) := by |
| 35 | apply squareRoot_weightedHarnack_intervalIntegrable hM12 (E.square_path Z s hs hpos) |
| 36 | (E.square_extension Z s hs hpos) |
| 37 | intro r hr |
| 38 | apply E.square_euler Z s hs hpos r |
| 39 | simpa only [M14SqrtParameterInterval, Real.sqrt_zero] using Ioo_subset_Icc_self hr |
| 40 | |
| 41 | /-- The exact frozen Laplacian bound at every actual joint endpoint, |
| 42 | including physical time boundaries, Theorem 6.50, p. 131. -/ |
| 43 | theorem reducedLengthLaplacian_joint_bound |
| 44 | (hCoordinates : M12MetricPredecessors.{0} n) |
| 45 | (hM04 : RicciFlowCurvatureTheory.{0}) (hM12 : GeneralizedRicciGaugeTheory.{u} n) |
| 46 | (E : M14ExponentialFamily G T x) {Z : G.Horizontal x} {s : ℝ} |
| 47 | (hs : (Z, s) ∈ E.domain) (hpos : 0 < s) (hz : (Z, s) ∈ M14JointDomain G E) |
| 48 | (hpoint : (E.square_path Z s hs hpos).curve s = E.gamma Z s) |
| 49 | (hq : G.spacetime.timeFunction ((E.square_path Z s hs hpos).curve s) = T - s ^ 2) : |
| 50 | M14ReducedLengthLaplacian (τ₁ := 0) G x |
| 51 | ⟨(E.square_path Z s hs hpos).curve s, hq⟩ ≤ |
| 52 | (n : ℝ) / (2 * s ^ 2) - |
| 53 | horizontalScalarCurvature G.leafwise ((E.square_path Z s hs hpos).curve s) - |
| 54 | M14GeneralizedKIntegral G (E.path Z s hs hpos) |
| 55 | (fun t => M14BackwardTimeDerivative G (horizontalScalarCurvature G.leafwise) |
| 56 | ((E.path Z s hs hpos).curve t)) / (2 * s ^ 2 * Real.sqrt (s ^ 2)) := by |
| 57 | classical |
| 58 | let R := E.square_path Z s hs hpos |
| 59 | let H := M14GeneralizedHarnackDensity G (E.path Z s hs hpos) |
| 60 | (fun r => M14BackwardTimeDerivative G (horizontalScalarCurvature G.leafwise) |
| 61 | ((E.path Z s hs hpos).curve r)) |
| 62 | let q : (G.slices (T - s ^ 2)).Point := ⟨R.curve s, hq⟩ |
| 63 | have hsC : s ∈ M14SqrtParameterInterval 0 (s ^ 2) := by |
| 64 | simpa only [M14SqrtParameterInterval, Real.sqrt_zero, Real.sqrt_sq hpos.le] using |
| 65 | (show s ∈ Icc 0 s from ⟨hpos.le, le_rfl⟩) |
| 66 | obtain ⟨P, hP, horth, hb⟩ := exists_horizontalUnitAdaptedFrame R hM04 hM12 |
| 67 | let EP := fun i => Classical.choose (hP i).equation |
| 68 | obtain ⟨b, hb⟩ := hb s hsC |
| 69 | let Y := fun i => horizontalAdaptedField (Real.sqrt 0) (Real.sqrt (s ^ 2)) (P i) |
| 70 | have hY0 (i : Fin n) : Y i 0 = 0 := by |
| 71 | simp only [Y, horizontalAdaptedField, Real.sqrt_zero, sub_self, zero_div, zero_smul] |
| 72 | have hYs (i : Fin n) : Y i s = b i := by |
| 73 | simp only [Y, horizontalAdaptedField, Real.sqrt_zero, Real.sqrt_sq hpos.le, sub_zero, |
| 74 | div_self hpos.ne', one_smul, hb i] |
| 75 | have hqimage : q.val ∈ range (fun z : M14JointDomain G E => E.gamma z.1.1 z.1.2) := by |
| 76 | change R.curve s ∈ _ |
| 77 | rw [show R.curve s = E.gamma Z s from hpoint] |
| 78 | exact ⟨⟨(Z, s), hz⟩, rfl⟩ |
| 79 | have htrace := reducedLengthLaplacian_eq_horizontal_hessian_trace x q |
| 80 | (reducedLengthAt_slice_contMDiffAt hM04 hM12 E q hqimage) b (by |
| 81 | intro i j |
| 82 | simpa only [hb i, hb j] using horth s hsC i j) |
| 83 | have hbound (i : Fin n) := reducedLengthHessian_joint_le_index hCoordinates hM04 hM12 |
| 84 | E hs hpos hz hpoint hq (horizontalAdaptedExtension (EP i)) (hY0 i) |
| 85 | have hKshift : (∫ t in 0..s ^ 2, Real.sqrt t * (Real.sqrt t - Real.sqrt 0) ^ 2 * H t) = |
| 86 | M14GeneralizedKIntegral G (E.path Z s hs hpos) |
| 87 | (fun t => M14BackwardTimeDerivative G (horizontalScalarCurvature G.leafwise) |
| 88 | ((E.path Z s hs hpos).curve t)) := by |
| 89 | apply intervalIntegral.integral_congr_Ioo_of_le (sq_nonneg s) |
| 90 | intro t ht |
| 91 | simp only [Real.sqrt_zero, sub_zero, Real.sq_sqrt ht.1.le] |
| 92 | exact mul_right_comm _ _ _ |>.trans (by dsimp only [H]; ring) |
| 93 | let J := fun i => pullbackIndexPairDensity R (horizontalAdaptedExtension (EP i)) |
| 94 | (horizontalAdaptedExtension (EP i)) |
| 95 | have hsum := integral_adaptedPullbackIndex R hM04 hM12 P hP EP horth |
| 96 | (exponential_weightedHarnack_intervalIntegrable hM12 E hs hpos) |
| 97 | change (∑ i, ∫ r in Real.sqrt 0..Real.sqrt (s ^ 2), J i r) = |
| 98 | (n : ℝ) / (Real.sqrt (s ^ 2) - Real.sqrt 0) - |
| 99 | 2 * Real.sqrt (s ^ 2) * horizontalScalarCurvature G.leafwise |
| 100 | (R.curve (Real.sqrt (s ^ 2))) - |
| 101 | (∫ t in 0..s ^ 2, Real.sqrt t * (Real.sqrt t - Real.sqrt 0) ^ 2 * H t) / |
| 102 | (Real.sqrt (s ^ 2) - Real.sqrt 0) ^ 2 at hsum |
| 103 | rw [hKshift, Real.sqrt_zero, Real.sqrt_sq hpos.le, sub_zero] at hsum |
| 104 | rw [htrace] |
| 105 | calc |
| 106 | _ = ∑ i, M14ReducedLengthHessianPairing G q (M14ReducedLengthAt G T 0 x) |
| 107 | (Y i s) (Y i s) := by simp only [hYs] |
| 108 | _ ≤ ∑ i, (∫ r in 0..s, pullbackIndexPairDensity R |
| 109 | (horizontalAdaptedExtension (EP i)) (horizontalAdaptedExtension (EP i)) r) / |
| 110 | (2 * s) := Finset.sum_le_sum (fun i _ => hbound i) |
| 111 | _ = (∑ i, ∫ r in 0..s, pullbackIndexPairDensity R |
| 112 | (horizontalAdaptedExtension (EP i)) (horizontalAdaptedExtension (EP i)) r) / |
| 113 | (2 * s) := (Finset.sum_div _ _ _).symm |
| 114 | _ = _ := by |
| 115 | rw [hsum, Real.sqrt_sq hpos.le] |
| 116 | field_simp [hpos.ne'] |
| 117 | ring |
| 118 | |
| 119 | end PoincareMT.M14 |