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.Surgery.Induction.Noncollapse.Attainment.Gauge.GaugePartitionAt |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.Induction.Noncollapse.Attainment.Gauge.GaugeWeakPartition |
| 3 | |
| 4 | /-! |
| 5 | # An actual weak minimum centered at any interior time |
| 6 | |
| 7 | Proposition 16.4, p. 369. The anchored compact geometry, one common tail, |
| 8 | and finite weak extraction assemble the local primitive record. The |
| 9 | continuous limit and the original action limit do not change. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | set_option backward.isDefEq.respectTransparency false |
| 14 | |
| 15 | open Set Filter MeasureTheory |
| 16 | open scoped Manifold ContDiff Bundle Topology intervalIntegral |
| 17 | |
| 18 | universe u |
| 19 | |
| 20 | namespace PoincareMT.Proofs.M46 |
| 21 | |
| 22 | variable {X : Type u} [TopologicalSpace X] {time : X → ℝ} |
| 23 | {I : SpacetimeInterval} {G : GeneralizedLGeometryTransport 3 X time I} |
| 24 | |
| 25 | /-- The same continuous limit has a weak primitive partition with a |
| 26 | selected time strictly inside one positive piece, and with summed action |
| 27 | below the same original limit. Source: Proposition 16.4, p. 369. -/ |
| 28 | theorem exists_anchored_weak_minimum (hM12 : GeneralizedRicciGaugeTheory.{u} 3) |
| 29 | {T tau s : ℝ} {x y : G.Point} (hs : s ∈ Ioo 0 (Real.sqrt tau)) |
| 30 | (p : ℕ → M14BackwardPath G T 0 tau x y) |
| 31 | (gamma : ℝ → G.Point) (hgamma : Continuous gamma) |
| 32 | (hlim : |
| 33 | let : Bundle.RiemannianBundle (TangentSpace (spacetimeModel 3) : G.Point → Type _) := |
| 34 | ⟨(M14.auxiliarySpacetimeMetric G.spacetime).toRiemannianMetric⟩ |
| 35 | let : EMetricSpace G.Point := .ofRiemannianMetric (spacetimeModel 3) G.Point |
| 36 | TendstoUniformlyOn (fun k r => (p k).curve (r ^ 2)) gamma atTop (Icc 0 (Real.sqrt tau))) |
| 37 | {D L : ℝ} (henergy : ∀ k, |
| 38 | IntervalIntegrable (M14.pathSquareKinetic (p k)) volume 0 (Real.sqrt tau) ∧ |
| 39 | (∫ r in 0..Real.sqrt tau, M14.pathSquareKinetic (p k) r) ≤ D) |
| 40 | (haction : Tendsto (fun k => M14BackwardLAction G (p k)) atTop (𝓝 L)) : |
| 41 | ∃ R : GaugePrimitivePartition gamma 0 (Real.sqrt tau), R.action ≤ L ∧ |
| 42 | ∃ j : Fin R.count, R.node j.castSucc < s ∧ s < R.node j.succ := by |
| 43 | classical |
| 44 | let : Bundle.RiemannianBundle (TangentSpace (spacetimeModel 3) : G.Point → Type _) := |
| 45 | ⟨(M14.auxiliarySpacetimeMetric G.spacetime).toRiemannianMetric⟩ |
| 46 | let : EMetricSpace G.Point := .ofRiemannianMetric (spacetimeModel 3) G.Point |
| 47 | obtain ⟨m, t, e, l, r, K, N, j, ht, hta, htb, hp, htail, hanchor⟩ := |
| 48 | exists_compact_gauge_partition_at hs gamma hgamma (fun k r => (p k).curve (r ^ 2)) hlim |
| 49 | have hbig (i : Fin m) : Icc (l i) (r i) ⊆ Icc 0 (Real.sqrt tau) := |
| 50 | Icc_subset_Icc (hp i).1 (hp i).2.2.1 |
| 51 | have hcore (i : Fin m) : Icc (t i.castSucc) (t i.succ) ⊆ Icc (l i) (r i) := |
| 52 | Icc_subset_Icc (hp i).2.2.2.1 (hp i).2.2.2.2.1 |
| 53 | have hK (i : Fin m) : IsCompact (K i) := (hp i).2.2.2.2.2.1 |
| 54 | have hgammaK (i : Fin m) : MapsTo gamma (Icc (l i) (r i)) (K i) := |
| 55 | fun z hz => interior_subset ((hp i).2.2.2.2.2.2.1 (mem_image_of_mem gamma hz)) |
| 56 | have hKU (i : Fin m) : K i ⊆ (e i).source := (hp i).2.2.2.2.2.2.2.1 |
| 57 | let q (k : ℕ) := p (k + N) |
| 58 | have hlimq : TendstoUniformlyOn (fun k r => (q k).curve (r ^ 2)) gamma atTop |
| 59 | (Icc 0 (Real.sqrt tau)) := by |
| 60 | intro U hU |
| 61 | exact (tendsto_add_atTop_nat N).eventually (hlim U hU) |
| 62 | obtain ⟨w, hprimitive, hweak⟩ := exists_gauge_weak_partition hM12 q gamma hgamma |
| 63 | t ht hta htb e K hK hKU |
| 64 | (fun i k z hz => htail (k + N) (Nat.le_add_left N k) i (hcore i hz)) |
| 65 | (fun i z hz => hgammaK i (hcore i hz)) hlimq (fun k => henergy (k + N)) |
| 66 | (haction.comp (tendsto_add_atTop_nat N)) |
| 67 | let R : GaugePrimitivePartition gamma 0 (Real.sqrt tau) := { |
| 68 | count := m |
| 69 | node := t |
| 70 | monotone := ht |
| 71 | first := hta |
| 72 | last := htb |
| 73 | gauge := e |
| 74 | left := l |
| 75 | right := r |
| 76 | big_subset := hbig |
| 77 | core_subset := hcore |
| 78 | near := fun i => (hp i).2.2.2.2.2.2.2.2 |
| 79 | source := fun i z hz => hKU i (hgammaK i hz) |
| 80 | velocity := w |
| 81 | primitive := hprimitive } |
| 82 | exact ⟨R, hweak, j, hanchor.2.1, hanchor.2.2.1⟩ |
| 83 | |
| 84 | end PoincareMT.Proofs.M46 |