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.Regularity.Formulas.LaplacianBound |
| 2 | |
| 3 | /-! |
| 4 | # Equality of each adapted Hessian comparison |
| 5 | |
| 6 | The exact integrated adapted trace and equality in the scalar bound |
| 7 | make the sum of nonnegative Hessian defects zero. Each actual adapted |
| 8 | field therefore attains its own endpoint Hessian bound. |
| 9 | Morgan-Tian Proposition 6.43, Claim 6.44 and Theorem 6.50, pp. 127-128, 131. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | |
| 14 | open Set |
| 15 | open scoped Manifold ContDiff Bundle BigOperators intervalIntegral |
| 16 | |
| 17 | universe u |
| 18 | |
| 19 | namespace PoincareMT.M14 |
| 20 | |
| 21 | variable {n : ℕ} {X : Type u} [TopologicalSpace X] {time : X → ℝ} |
| 22 | {I : SpacetimeInterval} {G : GeneralizedLGeometryTransport n X time I} |
| 23 | {T : ℝ} {x : G.Point} |
| 24 | |
| 25 | /-- Equality in the exact scalar Laplacian bound makes every member |
| 26 | of an actual normalized adapted orthonormal frame attain its raw |
| 27 | endpoint Hessian bound, Proposition 6.43, Claim 6.44 and Theorem 6.50, |
| 28 | pp. 127-128, 131. -/ |
| 29 | theorem adaptedIndexIntegral_eq_hessian_of_laplacian_eq |
| 30 | (hCoordinates : M12MetricPredecessors.{0} n) |
| 31 | (hM04 : RicciFlowCurvatureTheory.{0}) (hM12 : GeneralizedRicciGaugeTheory.{u} n) |
| 32 | (E : M14ExponentialFamily G T x) {Z : G.Horizontal x} {s : ℝ} |
| 33 | (hs : (Z, s) ∈ E.domain) (hpos : 0 < s) (hz : (Z, s) ∈ M14JointDomain G E) |
| 34 | (hpoint : (E.square_path Z s hs hpos).curve s = E.gamma Z s) |
| 35 | (hq : G.spacetime.timeFunction ((E.square_path Z s hs hpos).curve s) = T - s ^ 2) |
| 36 | (hequality : M14ReducedLengthLaplacian (τ₁ := 0) G x |
| 37 | ⟨(E.square_path Z s hs hpos).curve s, hq⟩ = |
| 38 | (n : ℝ) / (2 * s ^ 2) - |
| 39 | horizontalScalarCurvature G.leafwise ((E.square_path Z s hs hpos).curve s) - |
| 40 | M14GeneralizedKIntegral G (E.path Z s hs hpos) |
| 41 | (fun t => M14BackwardTimeDerivative G (horizontalScalarCurvature G.leafwise) |
| 42 | ((E.path Z s hs hpos).curve t)) / (2 * s ^ 2 * Real.sqrt (s ^ 2))) |
| 43 | (P : Fin n → ∀ r, G.Horizontal ((E.square_path Z s hs hpos).curve r)) |
| 44 | (hP : ∀ i, IsHorizontalUnitAdaptedFieldOn (E.square_path Z s hs hpos) |
| 45 | (Real.sqrt 0) (Real.sqrt (s ^ 2)) (P i)) |
| 46 | (EP : ∀ i, M14PullbackExtension G (E.square_path Z s hs hpos).curve |
| 47 | (M14SqrtParameterInterval 0 (s ^ 2)) (P i)) |
| 48 | (horth : ∀ r ∈ M14SqrtParameterInterval 0 (s ^ 2), ∀ i j, |
| 49 | G.spacetime.horizontalMetric.inner ((E.square_path Z s hs hpos).curve r) |
| 50 | (P i r) (P j r) = if i = j then 1 else 0) (i : Fin n) : |
| 51 | (∫ r in 0..s, pullbackIndexPairDensity (E.square_path Z s hs hpos) |
| 52 | (horizontalAdaptedExtension (EP i)) (horizontalAdaptedExtension (EP i)) r) = |
| 53 | (2 * s) * M14ReducedLengthHessianPairing G |
| 54 | ⟨(E.square_path Z s hs hpos).curve s, hq⟩ (M14ReducedLengthAt G T 0 x) |
| 55 | (P i s) (P i s) := by |
| 56 | classical |
| 57 | let R := E.square_path Z s hs hpos |
| 58 | let q : (G.slices (T - s ^ 2)).Point := ⟨R.curve s, hq⟩ |
| 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 J := fun k => pullbackIndexPairDensity R (horizontalAdaptedExtension (EP k)) |
| 63 | (horizontalAdaptedExtension (EP k)) |
| 64 | let L := fun k => M14ReducedLengthHessianPairing G q (M14ReducedLengthAt G T 0 x) |
| 65 | (P k s) (P k s) |
| 66 | have hsC : s ∈ M14SqrtParameterInterval 0 (s ^ 2) := by |
| 67 | simpa only [M14SqrtParameterInterval, Real.sqrt_zero, Real.sqrt_sq hpos.le] using |
| 68 | (show s ∈ Icc 0 s from ⟨hpos.le, le_rfl⟩) |
| 69 | obtain ⟨b, hb⟩ := horizontalBasis_of_orthonormal (R.curve s) (fun k => P k s) |
| 70 | (horth s hsC) |
| 71 | have hqimage : q.val ∈ range (fun z : M14JointDomain G E => E.gamma z.1.1 z.1.2) := by |
| 72 | change R.curve s ∈ _ |
| 73 | rw [show R.curve s = E.gamma Z s from hpoint] |
| 74 | exact ⟨⟨(Z, s), hz⟩, rfl⟩ |
| 75 | have htrace := reducedLengthLaplacian_eq_horizontal_hessian_trace x q |
| 76 | (reducedLengthAt_slice_contMDiffAt hM04 hM12 E q hqimage) b (by |
| 77 | intro k j |
| 78 | simpa only [hb k, hb j] using horth s hsC k j) |
| 79 | have htrace' : (∑ k, L k) = M14ReducedLengthLaplacian (τ₁ := 0) G x q := by |
| 80 | simpa only [L, hb] using htrace.symm |
| 81 | have hbound (k : Fin n) : L k ≤ (∫ r in 0..s, J k r) / (2 * s) := by |
| 82 | have hY0 : horizontalAdaptedField (Real.sqrt 0) (Real.sqrt (s ^ 2)) (P k) 0 = 0 := by |
| 83 | simp only [horizontalAdaptedField, Real.sqrt_zero, sub_self, zero_div, zero_smul] |
| 84 | have h := reducedLengthHessian_joint_le_index hCoordinates hM04 hM12 |
| 85 | E hs hpos hz hpoint hq (horizontalAdaptedExtension (EP k)) hY0 |
| 86 | have hYs : horizontalAdaptedField (Real.sqrt 0) (Real.sqrt (s ^ 2)) (P k) s = P k s := by |
| 87 | simp only [horizontalAdaptedField, Real.sqrt_zero, Real.sqrt_sq hpos.le, sub_zero, |
| 88 | div_self hpos.ne', one_smul] |
| 89 | simpa only [hYs] using h |
| 90 | have hKshift : (∫ t in 0..s ^ 2, Real.sqrt t * (Real.sqrt t - Real.sqrt 0) ^ 2 * H t) = |
| 91 | M14GeneralizedKIntegral G (E.path Z s hs hpos) |
| 92 | (fun t => M14BackwardTimeDerivative G (horizontalScalarCurvature G.leafwise) |
| 93 | ((E.path Z s hs hpos).curve t)) := by |
| 94 | apply intervalIntegral.integral_congr_Ioo_of_le (sq_nonneg s) |
| 95 | intro t ht |
| 96 | simp only [Real.sqrt_zero, sub_zero, Real.sq_sqrt ht.1.le] |
| 97 | exact mul_right_comm _ _ _ |>.trans (by dsimp only [H]; ring) |
| 98 | have hsum := integral_adaptedPullbackIndex R hM04 hM12 P hP EP horth |
| 99 | (exponential_weightedHarnack_intervalIntegrable hM12 E hs hpos) |
| 100 | change (∑ k, ∫ r in Real.sqrt 0..Real.sqrt (s ^ 2), J k r) = |
| 101 | (n : ℝ) / (Real.sqrt (s ^ 2) - Real.sqrt 0) - |
| 102 | 2 * Real.sqrt (s ^ 2) * horizontalScalarCurvature G.leafwise |
| 103 | (R.curve (Real.sqrt (s ^ 2))) - |
| 104 | (∫ t in 0..s ^ 2, Real.sqrt t * (Real.sqrt t - Real.sqrt 0) ^ 2 * H t) / |
| 105 | (Real.sqrt (s ^ 2) - Real.sqrt 0) ^ 2 at hsum |
| 106 | rw [hKshift, Real.sqrt_zero, Real.sqrt_sq hpos.le, sub_zero] at hsum |
| 107 | have htotal : (∑ k, ∫ r in 0..s, J k r) / (2 * s) = |
| 108 | M14ReducedLengthLaplacian (τ₁ := 0) G x q := by |
| 109 | rw [hsum, hequality, Real.sqrt_sq hpos.le] |
| 110 | field_simp [hpos.ne'] |
| 111 | ring |
| 112 | let D := fun k => (∫ r in 0..s, J k r) / (2 * s) - L k |
| 113 | have hnonneg (k : Fin n) : 0 ≤ D k := sub_nonneg.mpr (hbound k) |
| 114 | have hsumD : (∑ k, D k) = 0 := by |
| 115 | simp only [D, Finset.sum_sub_distrib, ← Finset.sum_div] |
| 116 | rw [htotal, htrace', sub_self] |
| 117 | have hzD := (Finset.sum_eq_zero_iff_of_nonneg (fun k _ => hnonneg k)).mp hsumD i |
| 118 | (Finset.mem_univ i) |
| 119 | have hfrac : (∫ r in 0..s, J i r) / (2 * s) = L i := sub_eq_zero.mp hzD |
| 120 | exact ((div_eq_iff (mul_pos zero_lt_two hpos).ne').mp hfrac).trans (mul_comm _ _) |
| 121 | |
| 122 | end PoincareMT.M14 |