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.Surgery.CanonicalInduction.Terminal.Regular.TerminalRegularStageFamily |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.CanonicalInduction.Terminal.Regular.TerminalRegularPhysicalCharts |
| 4 | import PoincareLib.Geometry.RicciFlow.Surgery.CanonicalInduction.Terminal.Source.TerminalSourceCountableCoreCover |
| 5 | import PoincareLib.Geometry.RicciFlow.Surgery.CanonicalInduction.Terminal.Curvature.TerminalCurvatureActualUniformScalar |
| 6 | import PoincareLib.Geometry.Riemannian.Curvature.Scalar.SharpBounds |
| 7 | |
| 8 | /-! |
| 9 | # One physical scalar ceiling from the original terminal atlas |
| 10 | |
| 11 | The actual finite core covers and compact uniform scalar errors give a |
| 12 | single bound before every physical radius. The scale, physical component |
| 13 | and every original chart remain unchanged along the selected sequence. |
| 14 | MT Claim 17.11; terminal-regular-physical-ceiling.md, K2. |
| 15 | -/ |
| 16 | |
| 17 | set_option autoImplicit false |
| 18 | set_option backward.isDefEq.respectTransparency false |
| 19 | |
| 20 | open Set Filter TopologicalSpace |
| 21 | open scoped Manifold ContDiff Topology |
| 22 | |
| 23 | universe u v |
| 24 | |
| 25 | namespace PoincareMT.M47 |
| 26 | |
| 27 | local notation "E" => EuclideanSpace ℝ (Fin 3) |
| 28 | |
| 29 | section Family |
| 30 | |
| 31 | variable (S : RepairedControlledSchedulesData.{u}) |
| 32 | (B : M47ComponentAnalyticBounds.{u} S.setup.C) (p : SurgeryParameterPrefix S.constants) |
| 33 | (F : ℕ → SurgeryFlowData.{u}) (O : ∀ k, SurgeryObservation (F k)) |
| 34 | (W : ∀ k, M33RegularHistoryWindow (F k)) (H : ∀ k, M33RegularHistoryData (W k)) |
| 35 | (base Q r A tau0 tau K L R rho : ℕ → ℝ) (N : ℕ → ℕ) |
| 36 | (center : ∀ k, ((F k).slice (base k)).carrier) |
| 37 | (data : ∀ k j, j ≤ k → TerminalRegularStageData S B p (O k) (H k) |
| 38 | (base k) (Q k) (r k) (A j) (tau0 j) (tau j) (K j) (L j) |
| 39 | ((j : ℝ) + 1) (R j) (rho j) (N j) (center k)) |
| 40 | (hrho : ∀ j, 0 < rho j) |
| 41 | |
| 42 | local notation "M" => (fun k : ℕ => Poincare.connectedComponentOpens E (center k)) |
| 43 | local notation "gPhysical" => (fun k : ℕ => |
| 44 | M13.scaleSmoothMetric (SurgeryFlowData.metric (F k) (base k)) (Q k) |
| 45 | (SurgeryFlowCylinder.scale_pos (TerminalRegularStageData.original (data k 0 (Nat.zero_le k))))) |
| 46 | local notation "gSource" => (fun k : ℕ => |
| 47 | RiemannianMetric.connectedComponentMetric (gPhysical k) (center k)) |
| 48 | local notation "e" => (fun (k j : ℕ) (hjk : j ≤ k) => TerminalRegularStageData.maps (data k j hjk)) |
| 49 | local notation "point" => (fun k : ℕ => (Subtype.mk (center k) mem_connectedComponent : M k)) |
| 50 | |
| 51 | /-- The actual normal-chart cores and original convergent coefficient |
| 52 | jets transfer the terminal global bound to every whole physical ball, |
| 53 | with a scalar ceiling chosen before its radius. -/ |
| 54 | theorem terminalSource_regular_physical_scalar_ceiling |
| 55 | {X : Type v} [TopologicalSpace X] [ChartedSpace E X] |
| 56 | [IsManifold (𝓡 3) ∞ X] [T2Space X] |
| 57 | (g0 : RiemannianMetric 3 X) (D0 : LeviCivitaData g0) |
| 58 | (nu : ℕ → ℕ) (hnu : StrictMono nu) |
| 59 | (f0 : ℕ → PartialDiffeomorph (𝓡 3) (𝓡 3) E X ∞) |
| 60 | {B0 : ℝ} (hnorm : ∀ x, D0.curvatureTensorNorm x ≤ B0) : |
| 61 | letI : ∀ k, MetricSpace (M k) := |
| 62 | fun k => terminalSourceComponentMetricSpace (gPhysical k) (center k) |
| 63 | let label := terminalSourceCountableLabel N |
| 64 | let U := fun i => terminalSourceCountableDomain (rho (label i).1) |
| 65 | letI : ∀ i, Nonempty (U i) := fun i => ⟨terminalSourceCountableZero (hrho (label i).1)⟩ |
| 66 | let total := fun k i => terminalSourceCountableMap hrho e k (label i).1 (label i).2 |
| 67 | (∀ i, (f0 i).source = U i) → |
| 68 | (∀ i m C, IsCompact C → C ⊆ U i → TendstoUniformlyOn |
| 69 | (fun k => iteratedFDeriv ℝ m ((gSource (nu k)).pullbackCoefficients |
| 70 | (ChartDistance.chartParametrization (fun i => (U i : Set E)) |
| 71 | (fun i => (U i).isOpen) (total (nu k) i)))) |
| 72 | (iteratedFDeriv ℝ m (g0.pullbackCoefficients (f0 i))) atTop C) → |
| 73 | let K0 := max 1 (3 * B0) |
| 74 | 1 ≤ K0 ∧ ∀ a : ℝ, 0 < a → ∀ᶠ k in atTop, |
| 75 | ∀ z ∈ ((F (nu k)).metric (base (nu k))).ball (center (nu k)) (a / Real.sqrt (Q (nu k))), |
| 76 | ((F (nu k)).connection (base (nu k))).scalarCurvature z ≤ (2 * K0) * Q (nu k) := by |
| 77 | classical |
| 78 | let : ∀ k, MetricSpace (M k) := |
| 79 | fun k => terminalSourceComponentMetricSpace (gPhysical k) (center k) |
| 80 | let label := terminalSourceCountableLabel N |
| 81 | let U := fun i => terminalSourceCountableDomain (rho (label i).1) |
| 82 | let : ∀ i, Nonempty (U i) := fun i => ⟨terminalSourceCountableZero (hrho (label i).1)⟩ |
| 83 | let total := fun k i => terminalSourceCountableMap hrho e k (label i).1 (label i).2 |
| 84 | dsimp only |
| 85 | intro hsource0 hjets |
| 86 | let K0 := max 1 (3 * B0) |
| 87 | have hK0 : 0 < K0 := zero_lt_one.trans_le (le_max_left _ _) |
| 88 | have hscalar (x : X) : D0.scalarCurvature x ≤ K0 := |
| 89 | (le_abs_self _).trans ((D0.abs_scalarCurvature_le_curvatureTensorNorm_sharp x).trans |
| 90 | ((mul_le_mul_of_nonneg_left (hnorm x) (by norm_num : (0 : ℝ) ≤ 3)).trans |
| 91 | (le_max_right _ _))) |
| 92 | have hgeometry := terminalSourceCountableMap_geometry hrho e |
| 93 | (fun k j hjk i => ((data k j hjk).geometry i).1) |
| 94 | (fun k j hjk i => ((data k j hjk).geometry i).2) |
| 95 | choose f hf hsource htarget using fun i k => terminalSource_regular_physical_chart |
| 96 | U i (total k i) (hgeometry k (label i).1 (label i).2).1 |
| 97 | (hgeometry k (label i).1 (label i).2).2 |
| 98 | let D : ∀ k, LeviCivitaData (gSource k) := fun k => (gSource k).leviCivitaData |
| 99 | have hzero (k : ℕ) : e k 0 (Nat.zero_le k) 0 (terminalSourceCountableZero (hrho 0)) = point k := |
| 100 | (data k 0 (Nat.zero_le k)).zero |
| 101 | have hcofinal (a : ℝ) (_ha : 0 < a) : ∃ j : ℕ, a ≤ (j : ℝ) + 1 := by |
| 102 | obtain ⟨j, hj⟩ := exists_nat_gt a |
| 103 | exact ⟨j, by linarith⟩ |
| 104 | have hcover (k j : ℕ) (hjk : j ≤ k) : Metric.ball (point k) ((j : ℝ) + 1) ⊆ |
| 105 | ⋃ i, e k j hjk i '' terminalSourceCountableCore (rho j) := by |
| 106 | obtain ⟨core, _hcore, hcoreEq, hcover⟩ := (data k j hjk).cores |
| 107 | have hcore : core = terminalSourceCountableCore (rho j) := Set.ext hcoreEq |
| 108 | rwa [hcore] at hcover |
| 109 | have hcores := (terminalSourceCountable_core_covers hrho e point hzero |
| 110 | (fun j : ℕ => (j : ℝ) + 1) hcofinal hcover).2 |
| 111 | refine ⟨le_max_left _ _, ?_⟩ |
| 112 | intro a ha |
| 113 | obtain ⟨s, core, _hcoreEq, hcompact, hcapture⟩ := hcores a ha |
| 114 | let C := fun i => (Subtype.val : U i → E) '' core i |
| 115 | have hCU (i : ℕ) : C i ⊆ U i := by |
| 116 | rintro _ ⟨x, _, rfl⟩ |
| 117 | exact x.property |
| 118 | have hCcompact (i : ℕ) (hi : i ∈ s) : IsCompact (C i) := |
| 119 | (hcompact i hi).image continuous_subtype_val |
| 120 | have herrors : ∀ᶠ k in atTop, ∀ i ∈ s, ∀ z ∈ C i, |
| 121 | |(D (nu k)).scalarCurvature (f i (nu k) z) - D0.scalarCurvature (f0 i z)| < K0 := by |
| 122 | apply (Filter.eventually_all_finset s).mpr |
| 123 | intro i hi |
| 124 | apply terminalCurvature_eventually_actual_scalar_error (fun k => D (nu k)) D0 |
| 125 | (fun k => f i (nu k)) (f0 i) (hCcompact i hi) |
| 126 | · rw [hsource0] |
| 127 | exact hCU i |
| 128 | · exact Eventually.of_forall (fun k => by rw [hsource]; exact hCU i) |
| 129 | · intro m _hm |
| 130 | simpa only [hf] using hjets i m (C i) (hCcompact i hi) (hCU i) |
| 131 | · exact hK0 |
| 132 | filter_upwards [hnu.tendsto_atTop.eventually hcapture, herrors] with k hk he z hz |
| 133 | have hz' : z ∈ (RiemannianMetric.ball (gPhysical (nu k)) (center (nu k)) a) := by |
| 134 | rw [terminalSourceNormal_scaled_ball] |
| 135 | exact hz |
| 136 | rw [← (terminalSourceComponent_balls (gPhysical (nu k)) (center (nu k)) (point (nu k)) a).2.1] |
| 137 | at hz' |
| 138 | obtain ⟨y, hy, hyz⟩ := hz' |
| 139 | obtain ⟨i, hi⟩ := mem_iUnion.mp (hk hy) |
| 140 | obtain ⟨his, x, hx, hxy⟩ := mem_iUnion.mp hi |
| 141 | have hfx : f i (nu k) x.val = y := by |
| 142 | rw [hf, ChartDistance.chartParametrization_apply] |
| 143 | exact hxy |
| 144 | have herror := (abs_lt.mp (he i his x.val ⟨x, hx, rfl⟩)).2 |
| 145 | rw [hfx, terminalSource_regular_component_scalar |
| 146 | ((F (nu k)).metric (base (nu k))) ((F (nu k)).connection (base (nu k))) |
| 147 | (Q (nu k)) (data (nu k) 0 (Nat.zero_le _)).original.scale_pos (center (nu k)), hyz] |
| 148 | at herror |
| 149 | apply (div_le_iff₀ (data (nu k) 0 (Nat.zero_le _)).original.scale_pos).mp |
| 150 | linarith [hscalar (f0 i x.val)] |
| 151 | |
| 152 | end Family |
| 153 | |
| 154 | end PoincareMT.M47 |