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.Exponential.InitialValue.InitialDifferentialSmooth |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Variation.IndexForm.IndexJacobi |
| 3 | |
| 4 | /-! |
| 5 | # Actual differential fields along supplied initial-value paths |
| 6 | |
| 7 | Morgan-Tian Lemma 6.19 and Claim 6.20, p. 114. Coherence transports |
| 8 | the actual initial-vector differential onto any supplied normalized |
| 9 | square path. Closed-field extension supplies its actual first and |
| 10 | second covariant derivative data. The Jacobi equation is separate. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | |
| 15 | open Set |
| 16 | open scoped Manifold ContDiff Bundle |
| 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 | (hM04 : RicciFlowCurvatureTheory.{0}) (hM12 : GeneralizedRicciGaugeTheory.{u} n) |
| 25 | {T τ : ℝ} {x y : G.Point} {Z : G.Horizontal x} |
| 26 | (P : M14SquareRootInitialValuePath G T τ x y Z) (W : G.Horizontal x) |
| 27 | |
| 28 | private theorem transport_zero {q r : G.Point} (h : q = r) : |
| 29 | (h ▸ (0 : G.Horizontal q) : G.Horizontal r) = 0 := by |
| 30 | cases h |
| 31 | rfl |
| 32 | |
| 33 | /-- The actual differential transported to a supplied square path on |
| 34 | its closed prefix, and zero elsewhere, Lemma 6.19, p. 114. -/ |
| 35 | noncomputable def initialValuePath_differentialField (r : ℝ) : |
| 36 | G.Horizontal (P.square_path.curve r) := by |
| 37 | classical |
| 38 | exact if hr : r ∈ M14SqrtParameterInterval 0 τ then |
| 39 | (initialValueCurve_eqOn_square hM04 hM12 P hr) ▸ initialValueDifferential G T x Z r W |
| 40 | else 0 |
| 41 | |
| 42 | /-- On its meaningful domain the transported field is exactly the |
| 43 | actual initial-vector differential, Lemma 6.19, p. 114. -/ |
| 44 | theorem initialValuePath_differentialField_heq {r : ℝ} |
| 45 | (hr : r ∈ M14SqrtParameterInterval 0 τ) : |
| 46 | HEq (initialValuePath_differentialField hM04 hM12 P W r) |
| 47 | (initialValueDifferential G T x Z r W) := by |
| 48 | unfold initialValuePath_differentialField |
| 49 | rw [dif_pos hr] |
| 50 | exact eqRec_heq _ _ |
| 51 | |
| 52 | /-- The transported actual differential is smooth through both |
| 53 | closed endpoints of the supplied path, Lemma 6.19, p. 114. -/ |
| 54 | theorem initialValuePath_differentialField_contMDiffOn : |
| 55 | ContMDiffOn (𝓘(ℝ, ℝ)) ((spacetimeModel n).prod 𝓘(ℝ, EuclideanSpace ℝ (Fin n))) ∞ |
| 56 | (fun r => Bundle.TotalSpace.mk' (EuclideanSpace ℝ (Fin n)) |
| 57 | (E := G.Horizontal) (P.square_path.curve r) |
| 58 | (initialValuePath_differentialField hM04 hM12 P W r)) |
| 59 | (M14SqrtParameterInterval 0 τ) := by |
| 60 | have hbase : G.spacetime.timeFunction x = T := by |
| 61 | simpa only [GeneralizedFlowSpacetime.timeFunction, sub_zero] using P.path.base_time |
| 62 | have hs : 0 < Real.sqrt τ := Real.sqrt_pos.mpr P.path.tau_lt |
| 63 | have hsurv : (Z, Real.sqrt τ) ∈ initialValueDomain G T x := by |
| 64 | refine Or.inr ⟨hs, y, ?_⟩ |
| 65 | rw [Real.sq_sqrt P.path.tau_lt.le] |
| 66 | exact ⟨P⟩ |
| 67 | have hsm := initialValueDifferential_field_contMDiffOn hM04 hM12 hbase hs hsurv W |
| 68 | have hC : M14SqrtParameterInterval 0 τ = Icc 0 (Real.sqrt τ) := by |
| 69 | simp only [M14SqrtParameterInterval, Real.sqrt_zero] |
| 70 | rw [← hC] at hsm |
| 71 | apply hsm.congr |
| 72 | intro r hr |
| 73 | exact Bundle.TotalSpace.ext (initialValueCurve_eqOn_square hM04 hM12 P hr).symm |
| 74 | (initialValuePath_differentialField_heq hM04 hM12 P W hr) |
| 75 | |
| 76 | /-- The actual differential field starts at zero, the first initial |
| 77 | condition in Lemma 6.19 and Claim 6.20, p. 114. -/ |
| 78 | theorem initialValuePath_differentialField_zero : |
| 79 | initialValuePath_differentialField hM04 hM12 P W 0 = 0 := by |
| 80 | have h0 : (0 : ℝ) ∈ M14SqrtParameterInterval 0 τ := by |
| 81 | simp only [M14SqrtParameterInterval, Real.sqrt_zero, mem_Icc, le_refl, true_and] |
| 82 | exact Real.sqrt_nonneg τ |
| 83 | have hz : initialValueDifferential G T x Z 0 W = 0 := by |
| 84 | change G.spacetime.horizontalProjection _ |
| 85 | (M14InitialVectorDerivative G (initialValueCurve G T x) 0 Z W) = 0 |
| 86 | rw [initialValueCurve_initialVectorDerivative_zero] |
| 87 | simp only [zero_apply, map_zero] |
| 88 | unfold initialValuePath_differentialField |
| 89 | rw [dif_pos h0, hz] |
| 90 | exact transport_zero _ |
| 91 | |
| 92 | /-- Actual two-derivative data for the initial-vector differential, |
| 93 | retaining that field exactly. Its Jacobi equation and derivative |
| 94 | normalization are separate conclusions of Lemma 6.19, p. 114. -/ |
| 95 | noncomputable def initialValuePath_differentialData : |
| 96 | M14JacobiFieldData G P.square_path.curve (M14SqrtParameterInterval 0 τ) := by |
| 97 | have hC : M14SqrtParameterInterval 0 τ = Icc 0 (Real.sqrt τ) := by |
| 98 | simp only [M14SqrtParameterInterval, Real.sqrt_zero] |
| 99 | have hE : Nonempty (M14PullbackExtension G P.square_path.curve |
| 100 | (M14SqrtParameterInterval 0 τ) (initialValuePath_differentialField hM04 hM12 P W)) := by |
| 101 | rw [hC] |
| 102 | apply exists_pullbackExtension_Icc (Real.sqrt_pos.mpr P.path.tau_lt) |
| 103 | rw [← hC] |
| 104 | exact initialValuePath_differentialField_contMDiffOn hM04 hM12 P W |
| 105 | exact jacobiFieldDataOfExtension |
| 106 | (hM12.coordinate_gauges X time I G.spacetime G.slices G.timeIntervals G.gaugeCover G.leafwise) |
| 107 | (Classical.choice hE) |
| 108 | |
| 109 | end PoincareMT.M14 |