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.AdaptedPullbackTrace |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Variation.AdaptedFields.AdaptedHarnackIdentity |
| 3 | |
| 4 | /-! |
| 5 | # The actual adapted index density in Harnack form |
| 6 | |
| 7 | The backward scalar evolution removes the Laplacian and Ricci-norm |
| 8 | terms from the actual orthonormal trace. The remaining expression is |
| 9 | the boundary derivative plus the exact shifted Harnack density. |
| 10 | Morgan-Tian Proposition 6.43 and Claim 6.44, pp. 127-129. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | |
| 15 | open Set |
| 16 | open scoped Manifold ContDiff Bundle BigOperators |
| 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 a b : ℝ} {x y : G.Point} {p : M14BackwardPath G T a b x y} |
| 25 | (R : M14SquareRootPath G p) |
| 26 | |
| 27 | /-- Scalar evolution converts the actual adapted trace to the |
| 28 | boundary-primitive and shifted-Harnack expression, Proposition 6.43, |
| 29 | pp. 127-128. -/ |
| 30 | theorem adaptedPullbackIndex_harnack (hM04 : RicciFlowCurvatureTheory.{u}) |
| 31 | (hM12 : GeneralizedRicciGaugeTheory.{u} n) |
| 32 | (P : Fin n → ∀ s, G.Horizontal (R.curve s)) |
| 33 | (hP : ∀ i, IsHorizontalUnitAdaptedFieldOn R (Real.sqrt a) (Real.sqrt b) (P i)) |
| 34 | (EP : ∀ i, M14PullbackExtension G R.curve (M14SqrtParameterInterval a b) (P i)) |
| 35 | {s : ℝ} (hs : s ∈ Ioo (Real.sqrt a) (Real.sqrt b)) |
| 36 | (horth : ∀ i j, G.spacetime.horizontalMetric.inner (R.curve s) (P i s) (P j s) = |
| 37 | if i = j then 1 else 0) |
| 38 | (hscalar : let q := spacetimeSlicePoint G.slices (R.curve s) |
| 39 | let D := G.leafwise.sliceConnection (G.spacetime.timeFunction (R.curve s)) |
| 40 | M14BackwardTimeDerivative G (horizontalScalarCurvature G.leafwise) (R.curve s) = |
| 41 | -D.laplacian D.scalarCurvature q - 2 * D.ricciNormSq q) : |
| 42 | (∑ i, pullbackIndexPairDensity R (horizontalAdaptedExtension (EP i)) |
| 43 | (horizontalAdaptedExtension (EP i)) s) = |
| 44 | ((n : ℝ) - derivWithin (adaptedScalarPrimitive R) (M14SqrtParameterInterval a b) s - |
| 45 | 2 * s ^ 2 * (s - Real.sqrt a) ^ 2 * M14GeneralizedHarnackDensity G p |
| 46 | (fun t => M14BackwardTimeDerivative G (horizontalScalarCurvature G.leafwise) |
| 47 | (p.curve t)) (s ^ 2)) / (Real.sqrt b - Real.sqrt a) ^ 2 := by |
| 48 | let q := spacetimeSlicePoint G.slices (R.curve s) |
| 49 | let D := G.leafwise.sliceConnection (G.spacetime.timeFunction (R.curve s)) |
| 50 | have hcancel : 4 * s ^ 2 * D.ricciNormSq q + |
| 51 | 2 * s ^ 2 * D.laplacian D.scalarCurvature q = |
| 52 | -(2 * s ^ 2) * |
| 53 | M14BackwardTimeDerivative G (horizontalScalarCurvature G.leafwise) (R.curve s) := by |
| 54 | rw [hscalar] |
| 55 | ring |
| 56 | rw [adaptedPullbackIndex_trace R hM04 P hP EP (Ioo_subset_Icc_self hs) horth, hcancel] |
| 57 | congr 1 |
| 58 | linear_combination adaptedScalarPrimitive_add_shiftedHarnack hM12 R hs |
| 59 | |
| 60 | end PoincareMT.M14 |