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.SourceNames.RicciFlowAnalysis |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Calculus.Local.HessianTrace |
| 3 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Regularity.Formulas.RegularSmooth |
| 4 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Theory |
| 5 | import PoincareLib.Geometry.RicciFlow.Curvature.Estimates.Shi.Coordinates.Normal |
| 6 | |
| 7 | /-! |
| 8 | # The symmetric bilinear raw reduced-length Hessian |
| 9 | |
| 10 | Actual smoothness on the open joint image supplies the ordinary |
| 11 | slice Hessian and its symmetry. Pulling both arguments through the |
| 12 | specified slice tangent equivalence retains the frozen horizontal |
| 13 | pairing. Morgan-Tian Lemma 6.40, Proposition 6.43 and Claim 6.44, |
| 14 | pp. 126-128. |
| 15 | -/ |
| 16 | |
| 17 | set_option autoImplicit false |
| 18 | -- The algebraic tangent fibers keep their ambient model coordinates. |
| 19 | set_option backward.isDefEq.respectTransparency false |
| 20 | |
| 21 | open Set |
| 22 | open scoped Manifold ContDiff Bundle |
| 23 | |
| 24 | universe u |
| 25 | |
| 26 | namespace PoincareMT.M14 |
| 27 | |
| 28 | variable {n : ℕ} {X : Type u} [TopologicalSpace X] {time : X → ℝ} |
| 29 | {I : SpacetimeInterval} {G : GeneralizedLGeometryTransport n X time I} |
| 30 | {T : ℝ} {x : G.Point} |
| 31 | |
| 32 | /-- The raw reduced-length Hessian at an actual regular slice point |
| 33 | is a symmetric bilinear form on the specified horizontal fiber, |
| 34 | Lemma 6.40, Proposition 6.43 and Claim 6.44, pp. 126-128. -/ |
| 35 | theorem reducedLengthHessianPairing_exists_symm_bilinear |
| 36 | (hM04 : RicciFlowCurvatureTheory.{0}) (hM12 : GeneralizedRicciGaugeTheory.{u} n) |
| 37 | (E : M14ExponentialFamily G T x) {τ : ℝ} (q : (G.slices (T - τ)).Point) |
| 38 | (hq : q.val ∈ range (fun z : M14JointDomain G E => E.gamma z.1.1 z.1.2)) : |
| 39 | ∃ B : LinearMap.BilinForm ℝ (G.Horizontal q.val), |
| 40 | (∀ v w, M14ReducedLengthHessianPairing G q (M14ReducedLengthAt G T 0 x) v w = |
| 41 | B v w) ∧ ∀ v w, B v w = B w v := by |
| 42 | let S := G.slices (T - τ) |
| 43 | let : ChartedSpace (EuclideanSpace ℝ (Fin n)) S.Point := S.chartedSpace |
| 44 | let D := G.leafwise.sliceConnection (T - τ) |
| 45 | let f : S.Point → ℝ := fun r => M14ReducedLengthAt G T 0 x r.val |
| 46 | let j := S.tangentEquiv q |
| 47 | obtain ⟨H, hH⟩ := hessian_exists_bilinear D f q |
| 48 | (reducedLengthAt_slice_contMDiffAt hM04 hM12 E q hq) |
| 49 | let A : LinearMap.BilinForm ℝ (TangentSpace (𝓡 n) q) := { |
| 50 | toFun := fun v => (H v).toLinearMap |
| 51 | map_add' := by |
| 52 | intro v w |
| 53 | ext z |
| 54 | exact congrArg (fun C : EuclideanSpace ℝ (Fin n) →L[ℝ] ℝ => C z) (H.map_add v w) |
| 55 | map_smul' := by |
| 56 | intro c v |
| 57 | ext z |
| 58 | exact congrArg (fun C : EuclideanSpace ℝ (Fin n) →L[ℝ] ℝ => C z) (H.map_smul c v) } |
| 59 | let B := A.comp j.symm.toLinearMap j.symm.toLinearMap |
| 60 | have hpair (v w : G.Horizontal q.val) : |
| 61 | M14ReducedLengthHessianPairing G q (M14ReducedLengthAt G T 0 x) v w = B v w := |
| 62 | hH (j.symm v) (j.symm w) |
| 63 | refine ⟨B, hpair, ?_⟩ |
| 64 | let O := range (fun z : M14JointDomain G E => E.gamma z.1.1 z.1.2) |
| 65 | let U := (fun r : S.Point => r.val) ⁻¹' O |
| 66 | have hU : IsOpen U := (jointMap_range_isOpen E).preimage S.inclusion_smooth.continuous |
| 67 | have hf : ContMDiffOn (𝓡 n) (𝓘(ℝ, ℝ)) ∞ f U := |
| 68 | (reducedLengthAt_contMDiffOn_jointImage hM04 hM12 E).comp |
| 69 | S.inclusion_smooth.contMDiffOn (fun _ hr => hr) |
| 70 | intro v w |
| 71 | rw [← hpair, ← hpair] |
| 72 | exact M04.hessian_symm_on D hU hf hq (j.symm v) (j.symm w) |
| 73 | |
| 74 | end PoincareMT.M14 |