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.Compactness.Coordinates.SpacetimeBounds.Bootstrap.Evolution |
| 2 | import PoincareLib.Geometry.RicciFlow.Compactness.Coordinates.SpacetimeBounds.Ricci.BootstrapAdapter |
| 3 | |
| 4 | /-! |
| 5 | # Mixed coordinate jets for the cap compactness sequence |
| 6 | |
| 7 | The actual coordinate Ricci equation converts uniform spatial bounds |
| 8 | into bounds for all spacetime derivatives. Compact elliptic jet boxes |
| 9 | and the evolution bootstrap are supplied by the published M07 analysis. |
| 10 | Morgan--Tian, Claim 16.6, pp. 371-372; M44 derivation 80. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | set_option backward.isDefEq.respectTransparency false |
| 15 | -- Finite Ricci jets contain nested continuous-linear coefficient spaces. |
| 16 | set_option maxSynthPendingDepth 12 |
| 17 | |
| 18 | open Set Filter |
| 19 | open scoped ContDiff Topology |
| 20 | |
| 21 | namespace PoincareMT.M44 |
| 22 | |
| 23 | open SpacetimeBounds SpacetimeBounds.Bootstrap |
| 24 | |
| 25 | /-- Uniform spatial jets and ellipticity on the actual coordinate |
| 26 | domains supply the full spacetime jet bounds required by analytic |
| 27 | compactness. Source: Claim 16.6 and the published M07 Ricci evolution |
| 28 | bootstrap; M44 derivation 80. -/ |
| 29 | theorem eventually_coordinate_spacetime_jet_bound |
| 30 | {alpha : Type*} (l : Filter alpha) (n : ℕ) |
| 31 | (f : alpha → ℝ × EuclideanSpace ℝ (Fin n) → MetricCoefficient n) |
| 32 | (J : alpha → Set ℝ) (U : alpha → Set (EuclideanSpace ℝ (Fin n))) |
| 33 | (S : alpha → Set (ℝ × EuclideanSpace ℝ (Fin n))) |
| 34 | (hsmooth : ∀ k, ContDiffOn ℝ ∞ (f k) (J k ×ˢ U k)) |
| 35 | (hJ : ∀ k, IsOpen (J k)) (hU : ∀ k, IsOpen (U k)) |
| 36 | (hS : ∀ k, S k ⊆ J k ×ˢ U k) |
| 37 | (hinvertible : ∀ k p, p ∈ J k ×ˢ U k → (f k p).IsInvertible) |
| 38 | (hevolution : ∀ k t, t ∈ J k → ∀ x ∈ U k, |
| 39 | HasDerivAt (fun s => f k (s, x)) |
| 40 | (ricciFlowOperator n (metricTwoJet (fun y => f k (t, y)) x)) t) |
| 41 | {a : ℝ} (ha : 0 < a) |
| 42 | (helliptic : ∀ᶠ k in l, ∀ p ∈ S k, ∀ v, |
| 43 | a * ‖v‖ ^ 2 ≤ f k p v v) |
| 44 | (hspatial : ∀ m : ℕ, ∃ B : ℝ, 0 ≤ B ∧ ∀ᶠ k in l, |
| 45 | ∀ p ∈ S k, ∀ j ≤ m, |
| 46 | ‖iteratedFDeriv ℝ j (fun x => f k (p.1, x)) p.2‖ ≤ B) : |
| 47 | ∀ m : ℕ, ∃ B : ℝ, 0 ≤ B ∧ ∀ᶠ k in l, |
| 48 | ∀ p ∈ S k, ‖iteratedFDeriv ℝ m (f k) p‖ ≤ B := by |
| 49 | apply eventuallyBounded_spacetime_jets l |
| 50 | (isOpen_jetRicciFlowDomain n) (contDiffOn_jetRicciFlowOperator n) |
| 51 | f J U S hsmooth hJ hU hS |
| 52 | · intro k p hp |
| 53 | change ((twoJetProjection n (spatialJet 2 (f k) p)).1).IsInvertible |
| 54 | rw [twoJetProjection_spatialJet] |
| 55 | exact hinvertible k p hp |
| 56 | · intro k p hp |
| 57 | rw [jetRicciFlowOperator, Function.comp_apply, twoJetProjection_spatialJet] |
| 58 | exact (hevolution k p.1 hp.1 p.2 hp.2).deriv |
| 59 | · intro j |
| 60 | obtain ⟨B, hB, hbound⟩ := hspatial j |
| 61 | exact ⟨B, hB, hbound.mono fun k hk p hp => hk p hp j le_rfl⟩ |
| 62 | · intro j |
| 63 | obtain ⟨B, hB, hbound⟩ := hspatial (2 + j) |
| 64 | obtain ⟨K, hK, hKU, hbox⟩ := exists_compact_elliptic_jet_box n j ha B |
| 65 | refine ⟨K, hK, hKU, ?_⟩ |
| 66 | filter_upwards [hbound, helliptic] with k hk hell p hp |
| 67 | apply hbox |
| 68 | · exact (pi_norm_le_iff_of_nonneg hB).mpr (fun d => hk p hp d (by omega)) |
| 69 | · exact hell p hp |
| 70 | |
| 71 | end PoincareMT.M44 |