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.PullbackLinearity |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Variation.IndexForm.IndexAlgebra |
| 3 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Variation.IndexForm.IndexJacobi |
| 4 | |
| 5 | /-! |
| 6 | # The affine polynomial for actual pullback index integrals |
| 7 | |
| 8 | The geometric index form has its quadratic law for every supplied |
| 9 | smooth field extension. This is the algebra used when equality holds |
| 10 | in the endpoint Hessian bound. Morgan-Tian Proposition 6.13, |
| 11 | Proposition 6.43 and Claim 6.44, pp. 110-112, 127-128. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | |
| 16 | open Set MeasureTheory |
| 17 | open scoped Manifold ContDiff intervalIntegral |
| 18 | |
| 19 | universe u |
| 20 | |
| 21 | namespace PoincareMT.M14 |
| 22 | |
| 23 | variable {n : ℕ} {X : Type u} [TopologicalSpace X] {time : X → ℝ} |
| 24 | {I : SpacetimeInterval} {G : GeneralizedLGeometryTransport n X time I} |
| 25 | {T a b : ℝ} {x y : G.Point} {p : M14BackwardPath G T a b x y} |
| 26 | (R : M14SquareRootPath G p) |
| 27 | |
| 28 | /-- The actual paired index integral has the affine quadratic law, |
| 29 | with no terminal-zero restriction on either field, Proposition 6.13, |
| 30 | Proposition 6.43 and Claim 6.44, pp. 110-112, 127-128. -/ |
| 31 | theorem pullbackIndexIntegral_affine |
| 32 | (hM04 : RicciFlowCurvatureTheory.{0}) (hM12 : GeneralizedRicciGaugeTheory.{u} n) |
| 33 | {Y Z : ∀ s, G.Horizontal (R.curve s)} |
| 34 | (EY : M14PullbackExtension G R.curve (M14SqrtParameterInterval a b) Y) |
| 35 | (EZ : M14PullbackExtension G R.curve (M14SqrtParameterInterval a b) Z) (c : ℝ) : |
| 36 | (∫ s in Real.sqrt a..Real.sqrt b, |
| 37 | pullbackIndexPairDensity R (affinePullbackExtension EY EZ c) |
| 38 | (affinePullbackExtension EY EZ c) s) = |
| 39 | (∫ s in Real.sqrt a..Real.sqrt b, pullbackIndexPairDensity R EY EY s) + |
| 40 | 2 * c * (∫ s in Real.sqrt a..Real.sqrt b, pullbackIndexPairDensity R EY EZ s) + |
| 41 | c ^ 2 * (∫ s in Real.sqrt a..Real.sqrt b, pullbackIndexPairDensity R EZ EZ s) := by |
| 42 | have hab := Real.sqrt_lt_sqrt p.tau_nonneg p.tau_lt |
| 43 | have hCoordinates := hM12.coordinate_gauges X time I G.spacetime G.slices |
| 44 | G.timeIntervals G.gaugeCover G.leafwise |
| 45 | have hI {A B : ∀ s, G.Horizontal (R.curve s)} |
| 46 | (EA : M14PullbackExtension G R.curve (M14SqrtParameterInterval a b) A) |
| 47 | (EB : M14PullbackExtension G R.curve (M14SqrtParameterInterval a b) B) : |
| 48 | IntervalIntegrable (pullbackIndexPairDensity R EA EB) volume |
| 49 | (Real.sqrt a) (Real.sqrt b) := |
| 50 | (pullbackIndexPairDensity_contDiffOn R (jacobiFieldDataOfExtension hCoordinates EA) |
| 51 | EB hM04 hM12).continuousOn.intervalIntegrable_of_Icc hab.le |
| 52 | have hYY := hI EY EY |
| 53 | have hYZ := hI EY EZ |
| 54 | have hZZ := hI EZ EZ |
| 55 | calc |
| 56 | _ = ∫ s in Real.sqrt a..Real.sqrt b, |
| 57 | pullbackIndexPairDensity R EY EY s + |
| 58 | 2 * c * pullbackIndexPairDensity R EY EZ s + |
| 59 | c ^ 2 * pullbackIndexPairDensity R EZ EZ s := by |
| 60 | apply intervalIntegral.integral_congr_Ioo_of_le hab.le |
| 61 | intro s hs |
| 62 | simp only [pullbackIndexPairDensity, |
| 63 | horizontalCovariantDerivative_affine EY EZ c (Ioo_subset_Icc_self hs)] |
| 64 | exact horizontalIndexPairDensity_quadratic R hM04 hM12 (Ioo_subset_Icc_self hs) |
| 65 | (Y s) (Z s) _ _ c |
| 66 | _ = _ := by |
| 67 | rw [intervalIntegral.integral_add (hYY.add (hYZ.const_mul _)) (hZZ.const_mul _), |
| 68 | intervalIntegral.integral_add hYY (hYZ.const_mul _), |
| 69 | intervalIntegral.integral_const_mul, intervalIntegral.integral_const_mul] |
| 70 | |
| 71 | end PoincareMT.M14 |