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.SourceNames.ReducedLength |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Ordinary.Capture.OrdinaryCaptureClock |
| 3 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Ordinary.Capture.OrdinaryCaptureVelocity |
| 4 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedLength.Variation.Initial.InitialVectorIdentification |
| 5 | |
| 6 | /-! |
| 7 | # Normalized initial vectors in an ordinary capture |
| 8 | |
| 9 | Morgan-Tian Lemma 6.8, p. 108, and Definition 6.17, p. 113. |
| 10 | The closed square-root curve determines the actual horizontal initial |
| 11 | velocity. The cylinder differential identifies it with twice the |
| 12 | ordinary normalized initial vector, including when the initial time is |
| 13 | a physical interval endpoint. |
| 14 | -/ |
| 15 | |
| 16 | set_option autoImplicit false |
| 17 | -- All tangent values below are read in their fixed model vector spaces. |
| 18 | set_option backward.isDefEq.respectTransparency false |
| 19 | |
| 20 | open Set |
| 21 | open scoped Manifold ContDiff |
| 22 | |
| 23 | universe u v |
| 24 | |
| 25 | namespace PoincareMT.M14 |
| 26 | |
| 27 | variable {n : ℕ} {X : Type u} [TopologicalSpace X] {time : X → ℝ} |
| 28 | {I : SpacetimeInterval} {G : GeneralizedLGeometryTransport n X time I} |
| 29 | {C : Type v} [TopologicalSpace C] |
| 30 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) C] [IsManifold (𝓡 n) ∞ C] |
| 31 | {K : SpacetimeInterval} |
| 32 | (e : CompatibleSpacetimeCylinder G.spacetime (G.timeIntervals.interval K) C) |
| 33 | (g : SpacetimeCylinderMetric e) |
| 34 | |
| 35 | private theorem capture_spatial_tangent_heq |
| 36 | {t r : (G.timeIntervals.interval K).Point} {c d : C} |
| 37 | (ht : t = r) (hc : c = d) |
| 38 | {v : TangentSpace (𝓡 n) c} {w : TangentSpace (𝓡 n) d} |
| 39 | (hv : (show EuclideanSpace ℝ (Fin n) from v) = w) : |
| 40 | HEq (g.spatialTangentEquiv t c v) (g.spatialTangentEquiv r d w) := by |
| 41 | cases ht |
| 42 | cases hc |
| 43 | exact heq_of_eq (congrArg (g.spatialTangentEquiv t c) hv) |
| 44 | |
| 45 | /-- The square-root initial velocity is determined by the actual |
| 46 | captured square curve, Lemma 6.8 and Definition 6.17, pp. 108, 113. -/ |
| 47 | theorem ordinaryCapture_square_initial_velocity_of_eqOn |
| 48 | (t₀ : (G.timeIntervals.interval K).Point) (c₀ : C) |
| 49 | {F : RicciFlow n C K.domain} {τmax τ : ℝ} {y : G.Point} |
| 50 | (A : LExponentialFamily F t₀.val τmax c₀) |
| 51 | (W : TangentSpace (𝓡 n) c₀) |
| 52 | (p : M14BackwardPath G t₀.val 0 τ (e.toSpacetime (t₀, c₀)) y) |
| 53 | (R : M14SquareRootPath G p) (hmax : τ < τmax) |
| 54 | (θ : ℝ → (G.timeIntervals.interval K).Point) (hθ₀ : θ 0 = t₀) |
| 55 | (hθ : MDifferentiableWithinAt (𝓘(ℝ, ℝ)) (𝓡∂ 1) θ |
| 56 | (M14SqrtParameterInterval 0 τ) 0) |
| 57 | (heq : EqOn R.curve (fun s => e.toSpacetime (θ s, A.squareFamily W s)) |
| 58 | (M14SqrtParameterInterval 0 τ)) : |
| 59 | ∃ h : R.curve 0 = e.toSpacetime (t₀, c₀), |
| 60 | h ▸ R.horizontal_velocity 0 = (2 : ℝ) • g.spatialTangentEquiv t₀ c₀ W := by |
| 61 | have hτ : 0 < τ := p.tau_lt |
| 62 | have hroot : 0 < Real.sqrt τ := Real.sqrt_pos.mpr hτ |
| 63 | have hzero : (0 : ℝ) ∈ M14SqrtParameterInterval 0 τ := by |
| 64 | simpa only [M14SqrtParameterInterval, Real.sqrt_zero] using |
| 65 | (show (0 : ℝ) ∈ Icc 0 (Real.sqrt τ) from ⟨le_rfl, hroot.le⟩) |
| 66 | have hdiff : UniqueDiffWithinAt ℝ (M14SqrtParameterInterval 0 τ) 0 := by |
| 67 | simpa only [M14SqrtParameterInterval, Real.sqrt_zero] using |
| 68 | uniqueDiffOn_Icc hroot 0 ⟨le_rfl, hroot.le⟩ |
| 69 | have hA := (Proofs.M09.lExponentialFamily_squareSlice_contMDiffAt A W 0 |
| 70 | ⟨le_rfl, Real.sqrt_pos.mpr (hτ.trans hmax)⟩).mdifferentiableAt (by simp) |
| 71 | have hv : (show EuclideanSpace ℝ (Fin n) from |
| 72 | curveVelocityWithin (A.squareFamily W) (M14SqrtParameterInterval 0 τ) 0) = |
| 73 | (2 : ℝ) • W := by |
| 74 | unfold curveVelocityWithin |
| 75 | rw [mfderivWithin_eq_mfderiv hdiff.uniqueMDiffWithinAt hA] |
| 76 | exact Proofs.M09.lExponentialFamily_initial_velocity A W |
| 77 | have hcyl := ordinaryCapture_cylinderVelocityWithin e g θ (A.squareFamily W) |
| 78 | hθ hA.mdifferentiableWithinAt hdiff |
| 79 | have hsp := capture_spatial_tangent_heq e g hθ₀ (A.square_at_zero W) hv |
| 80 | have hvel : HEq (R.horizontal_velocity 0) |
| 81 | ((2 : ℝ) • g.spatialTangentEquiv t₀ c₀ W) := |
| 82 | (heq_of_eq (squareRoot_horizontalVelocity_eq_projection R hzero)).trans |
| 83 | ((projectedCurveVelocityWithin_congrOn heq hzero).trans |
| 84 | ((heq_of_eq hcyl).trans (hsp.trans |
| 85 | (heq_of_eq ((g.spatialTangentEquiv t₀ c₀).map_smul (2 : ℝ) W))))) |
| 86 | have hbase : R.curve 0 = e.toSpacetime (t₀, c₀) := by |
| 87 | simpa only [hθ₀, A.square_at_zero] using heq hzero |
| 88 | exact ⟨hbase, eq_of_heq ((eqRec_heq hbase (R.horizontal_velocity 0)).trans hvel)⟩ |
| 89 | |
| 90 | end PoincareMT.M14 |