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.Joining.PrefixBlendActionLimit |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Paths.Joining.PrefixJoinAction |
| 3 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Paths.Joining.PrefixJoinNeighborhood |
| 4 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Calculus.Local.EndpointPrimitiveLimit |
| 5 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Paths.Action.PathPrefix |
| 6 | |
| 7 | /-! |
| 8 | # Minimality of every strict prefix |
| 9 | |
| 10 | Actual admissible replacements approximate the sum of any competing |
| 11 | prefix action and the retained continuation action. Full minimality |
| 12 | then implies prefix minimality, without assuming a bounded endpoint |
| 13 | velocity for competitors. Morgan-Tian Proposition 6.30, pp. 118-119. |
| 14 | -/ |
| 15 | |
| 16 | set_option autoImplicit false |
| 17 | |
| 18 | open Set Filter MeasureTheory |
| 19 | open scoped Topology intervalIntegral |
| 20 | |
| 21 | universe u |
| 22 | |
| 23 | namespace PoincareMT.M14 |
| 24 | |
| 25 | variable {n : ℕ} {X : Type u} [TopologicalSpace X] {time : X → ℝ} |
| 26 | {I : SpacetimeInterval} {G : GeneralizedLGeometryTransport n X time I} |
| 27 | {T τ₁ τ₂ c : ℝ} {x y : G.Point} |
| 28 | |
| 29 | /-- A full minimizing action is at most the sum of any admissible |
| 30 | competing prefix and the tail of any full admissible continuation. |
| 31 | This comparison uses actual C1 approximations of the corner, |
| 32 | Proposition 6.30, pp. 118-119. -/ |
| 33 | theorem minimizing_action_le_prefix_add_tail (hM12 : GeneralizedRicciGaugeTheory.{u} n) |
| 34 | (m : M14BackwardPath G T τ₁ τ₂ x y) (hmin : M14IsMinimizing m) |
| 35 | (q : M14BackwardPath G T τ₁ τ₂ x y) |
| 36 | (p : M14BackwardPath G T τ₁ c x (q.curve c)) (hc : c < τ₂) : |
| 37 | M14BackwardLAction G m ≤ M14BackwardLAction G p + |
| 38 | ∫ s in c..τ₂, M14BackwardLIntegrand G q s := by |
| 39 | obtain ⟨D⟩ := prefixJoinGauge_nonempty q p hc |
| 40 | let A := fun d => (∫ s in τ₁..(c - 2 * d), M14BackwardLIntegrand G p s) + |
| 41 | (∫ s in (c - 2 * d)..(c - d), |
| 42 | M14RawLIntegrand G |
| 43 | (gaugeBlend D.index D.lift p.curve q.curve (c - 3 * d / 2) (d / 2)) |
| 44 | (projectedCurveVelocity G |
| 45 | (gaugeBlend D.index D.lift p.curve q.curve (c - 3 * d / 2) (d / 2))) s) + |
| 46 | ∫ s in (c - d)..τ₂, M14BackwardLIntegrand G q s |
| 47 | have hp := tendsto_integral_upper_from_left p.tau_lt p.action_integrable |
| 48 | (by norm_num : (0 : ℝ) < 2) |
| 49 | have hq := (tendsto_integral_lower_at_interior q.action_integrable ⟨p.tau_lt, hc⟩ |
| 50 | (1 : ℝ)).mono_left (show 𝓝[>] (0 : ℝ) ≤ 𝓝 0 from nhdsWithin_le_nhds) |
| 51 | have hlim : Tendsto A (𝓝[>] 0) |
| 52 | (𝓝 (M14BackwardLAction G p + ∫ s in c..τ₂, M14BackwardLIntegrand G q s)) := by |
| 53 | simpa only [A, one_mul, add_zero, M14BackwardLAction, M14BackwardLIntegrand] using |
| 54 | (hp.add (D.tendsto_blend_action_zero hM12)).add hq |
| 55 | apply le_of_tendsto_of_tendsto tendsto_const_nhds hlim |
| 56 | filter_upwards [Ioo_mem_nhdsGT (by linarith [D.radius_pos] : 0 < D.radius / 2)] with d hd |
| 57 | have hsmall : 2 * d < D.radius := by linarith [hd.2] |
| 58 | exact (hmin (prefixJoinPath hM12 q p D d hd.1 hsmall)).trans_eq |
| 59 | (action_prefixJoinPath_eq_blend hM12 q p D d hd.1 hsmall) |
| 60 | |
| 61 | /-- Every strict prefix of an actual minimizing path minimizes |
| 62 | against all admissible C1 competitors, including those without a |
| 63 | final endpoint derivative, Proposition 6.30, pp. 118-119. -/ |
| 64 | theorem isMinimizing_prefixPath (hM12 : GeneralizedRicciGaugeTheory.{u} n) |
| 65 | (q : M14BackwardPath G T τ₁ τ₂ x y) (hmin : M14IsMinimizing q) |
| 66 | (hc : c ∈ Ioo τ₁ τ₂) : |
| 67 | M14IsMinimizing (prefixPath q c hc.1 hc.2.le) := by |
| 68 | intro p |
| 69 | have hle := minimizing_action_le_prefix_add_tail hM12 q hmin q p hc.2 |
| 70 | have hsplit : M14BackwardLAction G (prefixPath q c hc.1 hc.2.le) + |
| 71 | (∫ s in c..τ₂, M14BackwardLIntegrand G q s) = M14BackwardLAction G q := |
| 72 | intervalIntegral.integral_add_adjacent_intervals |
| 73 | (prefixPath q c hc.1 hc.2.le).action_integrable |
| 74 | (tailPath q c hc.1.le hc.2).action_integrable |
| 75 | linarith |
| 76 | |
| 77 | end PoincareMT.M14 |