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.Topology.Manifold.Poincare.Final.Compatibility.SourceNames |
| 2 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.LGeometry.Continuation.ContinuationBackward |
| 3 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedLength.Barrier.SquareComparisonDensity |
| 4 | import PoincareLib.Geometry.RicciFlow.Surgery.CanonicalInduction.Joint.JointSeedPath |
| 5 | |
| 6 | /-! |
| 7 | # Square-time competitors through an included birth endpoint |
| 8 | |
| 9 | The actual closed physical time window supplies integrability. The |
| 10 | existing M08 square-root constructor preserves endpoints and action. |
| 11 | Source: Definitions 6.2 and 6.45, pp. 106 and 129; Lemma 7.2, p. 150. |
| 12 | See `proof-work/tasks/M47/derivations/joint-seed.md`, Stage D1. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | |
| 17 | open Set MeasureTheory |
| 18 | open scoped Manifold ContDiff Bundle intervalIntegral |
| 19 | |
| 20 | universe u |
| 21 | |
| 22 | namespace PoincareMT.M47 |
| 23 | |
| 24 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 25 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 26 | {J : Set ℝ} {F : RicciFlow n M J} |
| 27 | |
| 28 | private theorem square_density_eq_regularized (T : ℝ) (alpha : ℝ → M) : |
| 29 | Proofs.M09.squareCurveActionDensity F T alpha = M08.regularizedLIntegrand F T alpha := rfl |
| 30 | |
| 31 | /-- Smooth square curves have integrable actual action density through |
| 32 | the closed physical endpoint; Definition 6.2, p. 106. -/ |
| 33 | theorem jointSeed_square_density_integrable |
| 34 | (hM04 : RicciFlowCurvatureTheory.{u}) (T d : ℝ) (hd : 0 < d) |
| 35 | (hwindow : Icc (T - d) T ⊆ J) (alpha : ℝ → M) {U : Set ℝ} |
| 36 | (hU : IsOpen U) (hI : Icc 0 (Real.sqrt d) ⊆ U) |
| 37 | (halpha : ContMDiffOn (𝓘(ℝ, ℝ)) (𝓡 n) ∞ alpha U) : |
| 38 | IntervalIntegrable (Proofs.M09.squareCurveActionDensity F T alpha) volume 0 (Real.sqrt d) := by |
| 39 | apply M08.continuationAction_intervalIntegrable F hM04 T (Real.sqrt_nonneg d) |
| 40 | hU hI alpha halpha |
| 41 | intro s hs |
| 42 | apply hwindow |
| 43 | have hsquare : s ^ 2 ≤ d := by |
| 44 | simpa only [Real.sq_sqrt hd.le] using |
| 45 | (sq_le_sq₀ hs.1 (Real.sqrt_nonneg d)).2 hs.2 |
| 46 | constructor <;> nlinarith [sq_nonneg s] |
| 47 | |
| 48 | /-- The literal square-time competitor reaches the included birth time |
| 49 | and keeps the exact actual action identity; Definitions 6.2 and 6.45. -/ |
| 50 | theorem exists_jointSeed_closed_square_path |
| 51 | (hM04 : RicciFlowCurvatureTheory.{u}) (T d : ℝ) (hd : 0 < d) |
| 52 | (hwindow : Icc (T - d) T ⊆ J) (alpha : ℝ → M) {U : Set ℝ} |
| 53 | (hU : IsOpen U) (hI : Icc 0 (Real.sqrt d) ⊆ U) |
| 54 | (halpha : ContMDiffOn (𝓘(ℝ, ℝ)) (𝓡 n) ∞ alpha U) : |
| 55 | ∃ path : BackwardTimePath F T 0 d, |
| 56 | path.curve = (fun tau => alpha (Real.sqrt tau)) ∧ |
| 57 | backwardLLength F T 0 d path.curve = |
| 58 | ∫ s in 0..Real.sqrt d, Proofs.M09.squareCurveActionDensity F T alpha s := by |
| 59 | have hT : T ∈ J := hwindow ⟨sub_le_self T hd.le, le_rfl⟩ |
| 60 | have htime : ∀ tau ∈ Icc 0 d, T - tau ∈ J := fun tau htau => |
| 61 | hwindow ⟨sub_le_sub_left htau.2 T, sub_le_self T htau.1⟩ |
| 62 | have hcont : ContinuousOn alpha (Icc (Real.sqrt 0) (Real.sqrt d)) := by |
| 63 | simpa only [Real.sqrt_zero] using halpha.continuousOn.mono hI |
| 64 | have hreg : ContMDiffOn (𝓘(ℝ, ℝ)) (𝓡 n) 1 alpha |
| 65 | (Ioo (Real.sqrt 0) (Real.sqrt d)) := by |
| 66 | simpa only [Real.sqrt_zero] using |
| 67 | (halpha.of_le (by simp)).mono (Ioo_subset_Icc_self.trans hI) |
| 68 | have hint : IntervalIntegrable (M08.regularizedLIntegrand F T alpha) volume |
| 69 | (Real.sqrt 0) (Real.sqrt d) := by |
| 70 | simpa only [Real.sqrt_zero, square_density_eq_regularized] using |
| 71 | jointSeed_square_density_integrable (F := F) hM04 T d hd hwindow alpha hU hI halpha |
| 72 | let path := M08.backwardPathOfSqrt F T 0 d le_rfl hd hT htime alpha hcont hreg hint |
| 73 | refine ⟨path, rfl, ?_⟩ |
| 74 | simpa only [M08.regularizedLAction, Real.sqrt_zero, square_density_eq_regularized] using |
| 75 | M08.backwardPathOfSqrt_action F T 0 d le_rfl hd hT htime alpha hcont hreg hint |
| 76 | |
| 77 | /-- Restriction keeps the original square-root representative and its |
| 78 | actual closed agreement with the same path; Lemma 7.2, p. 150. -/ |
| 79 | def jointSeed_restrict_sqrt_path {T tau theta : ℝ} |
| 80 | {path : BackwardTimePath F T 0 tau} (R : SqrtRegularPath path) |
| 81 | (htheta : 0 < theta) (hle : theta ≤ tau) : |
| 82 | SqrtRegularPath (jointSeed_restrict_path path htheta hle) where |
| 83 | curve := R.curve |
| 84 | domain := R.domain |
| 85 | open_domain := R.open_domain |
| 86 | interval_subset := (Icc_subset_Icc le_rfl (Real.sqrt_le_sqrt hle)).trans R.interval_subset |
| 87 | smooth := R.smooth |
| 88 | agrees := fun s hs => R.agrees s ⟨hs.1, hs.2.trans (Real.sqrt_le_sqrt hle)⟩ |
| 89 | |
| 90 | /-- The initial square-time integral is the literal restricted action |
| 91 | of the original path; Definition 6.45, p. 129. -/ |
| 92 | theorem jointSeed_restricted_square_action {T tau theta : ℝ} |
| 93 | {path : BackwardTimePath F T 0 tau} (R : SqrtRegularPath path) |
| 94 | (htheta : 0 < theta) (hle : theta ≤ tau) : |
| 95 | (∫ s in 0..Real.sqrt theta, Proofs.M09.squareCurveActionDensity F T R.curve s) = |
| 96 | backwardLLength F T 0 theta (jointSeed_restrict_path path htheta hle).curve := by |
| 97 | simpa only [M08.regularizedLAction, Real.sqrt_zero, square_density_eq_regularized, |
| 98 | jointSeed_restrict_sqrt_path] using |
| 99 | M08.regularizedLAction_eq_backwardLLength (jointSeed_restrict_sqrt_path R htheta hle) |
| 100 | |
| 101 | end PoincareMT.M47 |