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.InitialGaugePhase |
| 2 | |
| 3 | /-! |
| 4 | # The exact initial coordinate velocity of every selected curve |
| 5 | |
| 6 | Morgan-Tian Definition 6.17 and Claim 6.20, pp. 113-114. Actual |
| 7 | IVP coherence and the prescribed horizontal initial velocity give |
| 8 | the actual within coordinate velocity in a fixed initial gauge. |
| 9 | -/ |
| 10 | |
| 11 | set_option autoImplicit false |
| 12 | -- The fixed gauge spatial tangent is the Euclidean coordinate model. |
| 13 | set_option backward.isDefEq.respectTransparency false |
| 14 | |
| 15 | open Set |
| 16 | open scoped Manifold ContDiff |
| 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 | |
| 25 | /-- In a gauge with its prescribed initial lift, the actual selected |
| 26 | curve has coordinate initial velocity exactly twice the inverse gauge |
| 27 | tangent map applied to its initial vector, Claim 6.20, p. 114. -/ |
| 28 | theorem initialValueCurve_gauge_initialVelocity |
| 29 | (hM04 : RicciFlowCurvatureTheory.{0}) (hM12 : GeneralizedRicciGaugeTheory.{u} n) |
| 30 | (b : G.gaugeCover.index) |
| 31 | (t₀ : (G.timeIntervals.interval (G.gaugeCover.interval b)).Point) |
| 32 | (x₀ : G.gaugeCover.spatial b) |
| 33 | {T : ℝ} {Z : G.Horizontal ((G.gaugeCover.cylinder b).toSpacetime (t₀, x₀))} |
| 34 | {S d : ℝ} (hS : 0 < S) (hd : 0 < d) (hdS : d ≤ S) |
| 35 | (hsurv : (Z, S) ∈ initialValueDomain G T ((G.gaugeCover.cylinder b).toSpacetime (t₀, x₀))) |
| 36 | {β : ℝ → (G.timeIntervals.interval (G.gaugeCover.interval b)).Point × |
| 37 | G.gaugeCover.spatial b} |
| 38 | (hβ : ContMDiffOn (𝓘(ℝ, ℝ)) (spacetimeModel n) ∞ β (Icc 0 d)) |
| 39 | (hrec : ∀ r ∈ Icc 0 d, (G.gaugeCover.cylinder b).toSpacetime (β r) = |
| 40 | initialValueCurve G T ((G.gaugeCover.cylinder b).toSpacetime (t₀, x₀)) Z r) |
| 41 | (hzero : β 0 = (t₀, x₀)) : |
| 42 | derivWithin (fun r => (β r).2.val) (Icc 0 d) 0 = |
| 43 | (2 : ℝ) • ((G.gaugeCover.metric b).spatialTangentEquiv t₀ x₀).symm Z := by |
| 44 | obtain ⟨y, ⟨P⟩⟩ := (initialValueDomain_positive_iff hS).mp hsurv |
| 45 | have hsub : Icc 0 d ⊆ M14SqrtParameterInterval 0 (S ^ 2) := by |
| 46 | rw [M14SqrtParameterInterval, Real.sqrt_zero, Real.sqrt_sq hS.le] |
| 47 | exact Icc_subset_Icc le_rfl hdS |
| 48 | have hrecP (r : ℝ) (hr : r ∈ Icc 0 d) : |
| 49 | (G.gaugeCover.cylinder b).toSpacetime (β r) = P.square_path.curve r := |
| 50 | (hrec r hr).trans (initialValueCurve_eqOn_square hM04 hM12 P (hsub hr)) |
| 51 | have h0 : (0 : ℝ) ∈ Icc 0 d := ⟨le_rfl, hd.le⟩ |
| 52 | have hv := squareRootVelocity_gauge_subset b P.square_path hsub hβ hrecP h0 |
| 53 | (uniqueDiffOn_Icc hd 0 h0) |
| 54 | rw [hzero] at hv |
| 55 | obtain ⟨hstart, hinit⟩ := P.initial_velocity |
| 56 | have hi : HEq (P.square_path.horizontal_velocity 0) ((2 : ℝ) • Z) := |
| 57 | (eqRec_heq hstart (P.square_path.horizontal_velocity 0)).symm.trans (heq_of_eq hinit) |
| 58 | apply ((G.gaugeCover.metric b).spatialTangentEquiv t₀ x₀).injective |
| 59 | rw [map_smul, ContinuousLinearEquiv.apply_symm_apply] |
| 60 | exact eq_of_heq (hv.symm.trans hi) |
| 61 | |
| 62 | end PoincareMT.M14 |