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.Paths.SquareRoot.Action.SquareCurveEndpoints |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Paths.Action.PathCongruence |
| 3 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Exponential |
| 4 | |
| 5 | /-! |
| 6 | # Uniform short action bounds for the supplied exponential paths |
| 7 | |
| 8 | The common smooth square density integrates to the actual supplied |
| 9 | path action. A uniform density bound therefore gives an action bound |
| 10 | linear in square time, including paths ending at the common cutoff. |
| 11 | Morgan-Tian equation (6.2) and Corollary 6.79, pp. 106, 144-145. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | |
| 16 | open Set |
| 17 | open scoped Manifold ContDiff intervalIntegral |
| 18 | |
| 19 | universe u |
| 20 | |
| 21 | namespace PoincareMT.M14 |
| 22 | |
| 23 | variable {n : ℕ} {X : Type u} [TopologicalSpace X] {time : X → ℝ} |
| 24 | {I : SpacetimeInterval} {G : GeneralizedLGeometryTransport n X time I} |
| 25 | {T : ℝ} {x : G.Point} |
| 26 | |
| 27 | /-- The common closed square-density integral is the action of the |
| 28 | supplied exponential path, independently of its retained survival |
| 29 | proof and of the zero-time action convention, equation (6.2), p. 106. -/ |
| 30 | theorem smallTimeCandidate_action_eq_integral |
| 31 | (hM12 : GeneralizedRicciGaugeTheory.{u} n) (E : M14ExponentialFamily G T x) |
| 32 | (W : G.Horizontal x) {s d : ℝ} (hs : 0 < s) (hsd : s ≤ d) |
| 33 | (hD : (W, s) ∈ E.domain) |
| 34 | (hγ : ContMDiffOn (𝓘(ℝ, ℝ)) (spacetimeModel n) ∞ (E.gamma W) (Icc 0 d)) |
| 35 | (hdom : ∀ r ∈ Icc 0 d, (W, r) ∈ E.domain) : |
| 36 | M14BackwardLAction G (E.path W s hD hs) = |
| 37 | ∫ r in 0..s, squareCurveDensity G (E.gamma W) (Icc 0 d) r := by |
| 38 | have hsub : M14SqrtParameterInterval 0 (s ^ 2) ⊆ Icc 0 d := by |
| 39 | intro r hr |
| 40 | simp only [M14SqrtParameterInterval, Real.sqrt_zero, Real.sqrt_sq hs.le] at hr |
| 41 | exact ⟨hr.1, hr.2.trans hsd⟩ |
| 42 | have hclock : ∀ r ∈ M14SqrtParameterInterval 0 (s ^ 2), |
| 43 | G.spacetime.timeFunction (E.gamma W r) = T - r ^ 2 := |
| 44 | fun r hr => E.clock W r (hdom r (hsub hr)) |
| 45 | have hx : E.gamma W (Real.sqrt 0) = x := by |
| 46 | simpa only [Real.sqrt_zero] using E.gamma_at_zero W |
| 47 | have hy : E.gamma W (Real.sqrt (s ^ 2)) = E.gamma W s := by |
| 48 | rw [Real.sqrt_sq hs.le] |
| 49 | let q := backwardPathOfSquareCurveBetween hM12 (le_refl 0) (sq_pos_of_pos hs) |
| 50 | (E.gamma W) (hγ.mono hsub) hclock hx hy |
| 51 | have haction : M14BackwardLAction G q = M14BackwardLAction G (E.path W s hD hs) := |
| 52 | action_eq_of_curve_eqOn q (E.path W s hD hs) (fun r hr => |
| 53 | (E.path_coherent W s hD hs r (Ioo_subset_Icc_self hr)).symm) |
| 54 | have hint := integral_squareCurveDensity_eq_action_between hM12 (le_refl 0) |
| 55 | (sq_pos_of_pos hs) (E.gamma W) hγ hsub hclock hx hy |
| 56 | rw [← haction] |
| 57 | simpa only [Real.sqrt_zero, Real.sqrt_sq hs.le] using hint.symm |
| 58 | |
| 59 | /-- A bound on one common smooth density bounds every supplied |
| 60 | positive short path by its square duration times the same constant, |
| 61 | Corollary 6.79, pp. 144-145. -/ |
| 62 | theorem smallTimeCandidate_action_le |
| 63 | (hM12 : GeneralizedRicciGaugeTheory.{u} n) (E : M14ExponentialFamily G T x) |
| 64 | (W : G.Horizontal x) {s d A : ℝ} (hs : 0 < s) (hsd : s ≤ d) |
| 65 | (hD : (W, s) ∈ E.domain) |
| 66 | (hγ : ContMDiffOn (𝓘(ℝ, ℝ)) (spacetimeModel n) ∞ (E.gamma W) (Icc 0 d)) |
| 67 | (hdom : ∀ r ∈ Icc 0 d, (W, r) ∈ E.domain) |
| 68 | (hA : ∀ r ∈ Icc 0 d, squareCurveDensity G (E.gamma W) (Icc 0 d) r ≤ A) : |
| 69 | M14BackwardLAction G (E.path W s hD hs) ≤ A * s := by |
| 70 | rw [smallTimeCandidate_action_eq_integral hM12 E W hs hsd hD hγ hdom] |
| 71 | have hsub : Icc 0 s ⊆ Icc 0 d := fun _ hr => ⟨hr.1, hr.2.trans hsd⟩ |
| 72 | have hcont := (squareCurveDensity_contDiffOn hM12 |
| 73 | (uniqueDiffOn_Icc (hs.trans_le hsd)) hγ).continuousOn |
| 74 | have hi : IntervalIntegrable |
| 75 | (squareCurveDensity G (E.gamma W) (Icc 0 d)) MeasureTheory.volume 0 s := |
| 76 | (hcont.mono hsub).intervalIntegrable_of_Icc hs.le |
| 77 | calc |
| 78 | (∫ r in 0..s, squareCurveDensity G (E.gamma W) (Icc 0 d) r) ≤ |
| 79 | ∫ _ in 0..s, A := |
| 80 | intervalIntegral.integral_mono_on hs.le hi intervalIntegrable_const |
| 81 | (fun r hr => hA r (hsub hr)) |
| 82 | _ = A * s := by simp [mul_comm] |
| 83 | |
| 84 | end PoincareMT.M14 |