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.IndexForm.IndexGreen |
| 2 | |
| 3 | /-! |
| 4 | # The Jacobi-to-index implication with the exact extension |
| 5 | |
| 6 | Morgan-Tian Proposition 6.13, pp. 110-112. Every actual horizontal |
| 7 | extension can be retained in a two-derivative record. Green's identity |
| 8 | shows that the frozen fixed-endpoint Jacobi condition implies zero |
| 9 | index for the same supplied variation derivative data. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | |
| 14 | open Set MeasureTheory |
| 15 | open scoped Manifold ContDiff 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 y : G.Point} {p : M14BackwardPath G T τ₁ τ₂ x y} |
| 24 | {R : M14SquareRootPath G p} |
| 25 | |
| 26 | /-- Retain an actual first extension and select an extension of its |
| 27 | actual covariant derivative. This supplies two-derivative data without |
| 28 | asserting the Jacobi equation, Proposition 6.13, pp. 110-112. -/ |
| 29 | noncomputable def jacobiFieldDataOfExtension |
| 30 | (hCoordinates : SpacetimeGaugeTheory.{u, 0} G.leafwise G.timeIntervals) |
| 31 | {Y : ∀ s, G.Horizontal (R.curve s)} |
| 32 | (E : M14PullbackExtension G R.curve (M14SqrtParameterInterval τ₁ τ₂) Y) : |
| 33 | M14JacobiFieldData G R.curve (M14SqrtParameterInterval τ₁ τ₂) where |
| 34 | field := Y |
| 35 | extension := E |
| 36 | derivative_extension := |
| 37 | Classical.choice (exists_horizontalCovariantDerivative_extension R hCoordinates E) |
| 38 | |
| 39 | /-- The exact frozen variation Jacobi condition implies zero index |
| 40 | for the supplied derivative record, Proposition 6.13, pp. 110-112. -/ |
| 41 | theorem index_zero_of_variationJacobiCondition |
| 42 | (hM04 : RicciFlowCurvatureTheory.{0}) (hM12 : GeneralizedRicciGaugeTheory.{u} n) |
| 43 | (V : M14LVariationData G p R) (D : M14VariationDerivativeData V) |
| 44 | (hJacobi : M14VariationJacobiCondition V D) : M14SecondVariationIndexForm V D = 0 := by |
| 45 | obtain ⟨Q, hfield, hE, hleft, hright, hres⟩ := hJacobi |
| 46 | have hab := Real.sqrt_lt_sqrt p.tau_nonneg p.tau_lt |
| 47 | have hpair : M14SecondVariationIndexForm V D = |
| 48 | ∫ s in Real.sqrt τ₁..Real.sqrt τ₂, |
| 49 | pullbackIndexPairDensity R Q.extension Q.extension s := by |
| 50 | rcases Q with ⟨Y, E, ED⟩ |
| 51 | dsimp only at hfield hE ⊢ |
| 52 | cases hfield |
| 53 | cases hE |
| 54 | exact intervalIntegral.integral_congr_Ioo_of_le hab.le |
| 55 | (fun s _ => secondVariationIndexDensity_eq_pair R V D s) |
| 56 | have hG := integral_pullbackIndexPairDensity R Q Q.extension hM04 hM12 |
| 57 | have hresint : (∫ s in Real.sqrt τ₁..Real.sqrt τ₂, |
| 58 | M14JacobiResidual G R Q s (Q.field s)) = 0 := by |
| 59 | rw [← intervalIntegral.integral_zero (μ := volume) (a := Real.sqrt τ₁) (b := Real.sqrt τ₂)] |
| 60 | exact intervalIntegral.integral_congr_Ioo_of_le hab.le |
| 61 | (fun s hs => hres s (Ioo_subset_Icc_self hs) _) |
| 62 | rw [hpair, hG, hresint] |
| 63 | simp only [pullbackIndexBoundaryPair, hleft, hright, map_zero, sub_self] |
| 64 | |
| 65 | end PoincareMT.M14 |