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.TerminalRegularGrowingSource |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.CanonicalInduction.Terminal.Regular.TerminalRegularCapturedJets |
| 4 | import PoincareLib.Geometry.RicciFlow.Surgery.CanonicalInduction.Terminal.Regular.TerminalRegularScalarAnchor |
| 5 | import PoincareLib.Geometry.RicciFlow.Surgery.CanonicalInduction.Terminal.Regular.TerminalRegularLiftedGerms |
| 6 | import PoincareLib.Geometry.RicciFlow.Surgery.CanonicalInduction.Terminal.Regular.TerminalRegularLiftedJets |
| 7 | import PoincareLib.Geometry.RicciFlow.Surgery.CanonicalInduction.Terminal.Source.TerminalSourceCountableFiniteGerms |
| 8 | import PoincareLib.Geometry.RicciFlow.Surgery.CanonicalInduction.Terminal.Curvature.TerminalCurvatureEarlierReadout |
| 9 | import PoincareLib.Geometry.RicciFlow.Surgery.CanonicalInduction.Terminal.Curvature.TerminalCurvatureFiniteGermsFloor |
| 10 | |
| 11 | /-! |
| 12 | # Global curvature on the actual regular terminal atlas |
| 13 | |
| 14 | The original compact approximation selects growing actual source flows. |
| 15 | Their captured jets derive scalar one and the strictly earlier canonical |
| 16 | readout. The actual finite germs then bound the same terminal metric. |
| 17 | MT Claim 17.11; terminal-regular-universe-application.md, J3. |
| 18 | -/ |
| 19 | |
| 20 | set_option autoImplicit false |
| 21 | set_option backward.isDefEq.respectTransparency false |
| 22 | |
| 23 | open Set Filter TopologicalSpace |
| 24 | open scoped Manifold ContDiff Topology |
| 25 | |
| 26 | universe u |
| 27 | |
| 28 | namespace PoincareMT.M47 |
| 29 | |
| 30 | local notation "E" => EuclideanSpace ℝ (Fin 3) |
| 31 | |
| 32 | section Family |
| 33 | |
| 34 | variable (S : RepairedControlledSchedulesData.{u}) |
| 35 | (B : M47ComponentAnalyticBounds.{u} S.setup.C) (p : SurgeryParameterPrefix S.constants) |
| 36 | (F : ℕ → SurgeryFlowData.{u}) (O : ∀ k, SurgeryObservation (F k)) |
| 37 | (W : ∀ k, M33RegularHistoryWindow (F k)) (H : ∀ k, M33RegularHistoryData (W k)) |
| 38 | (base Q r A tau0 tau K L R rho : ℕ → ℝ) (N : ℕ → ℕ) |
| 39 | (center : ∀ k, ((F k).slice (base k)).carrier) |
| 40 | (data : ∀ k j, j ≤ k → TerminalRegularStageData S B p (O k) (H k) |
| 41 | (base k) (Q k) (r k) (A j) (tau0 j) (tau j) (K j) (L j) |
| 42 | ((j : ℝ) + 1) (R j) (rho j) (N j) (center k)) |
| 43 | |
| 44 | local notation "M" => (fun k : ℕ => Poincare.connectedComponentOpens E (center k)) |
| 45 | local notation "gPhysical" => (fun k : ℕ => |
| 46 | M13.scaleSmoothMetric (SurgeryFlowData.metric (F k) (base k)) (Q k) |
| 47 | (SurgeryFlowCylinder.scale_pos (TerminalRegularStageData.original (data k 0 (Nat.zero_le k))))) |
| 48 | local notation "gSource" => (fun k : ℕ => |
| 49 | RiemannianMetric.connectedComponentMetric (gPhysical k) (center k)) |
| 50 | local notation "point" => (fun k : ℕ => (Subtype.mk (center k) mem_connectedComponent : M k)) |
| 51 | |
| 52 | /-- Actual regular source data and the original terminal atlas produce |
| 53 | one global curvature bound before any common backward interval. -/ |
| 54 | theorem terminalSource_regular_terminal_curvature_bound |
| 55 | (P : M46Predecessors.{u}) |
| 56 | {X : Type} [TopologicalSpace X] [ChartedSpace E X] |
| 57 | [IsManifold (𝓡 3) ∞ X] [T3Space X] [ConnectedSpace X] [SecondCountableTopology X] |
| 58 | (g : RiemannianMetric 3 X) (D : LeviCivitaData g) (hg : MetricComplete g) |
| 59 | (nu : ℕ → ℕ) (hnu : StrictMono nu) (htau : ∀ j, 0 < tau j) |
| 60 | (hA : ∀ s : ℝ, 0 < s → ∃ j, s ≤ A j) |
| 61 | (V : ℕ → Set X) (hV : ∀ k, IsOpen (V k)) (hmono : Monotone V) |
| 62 | (hconnected : ∀ k, IsConnected (V k)) (hcover : (⋃ k, V k) = univ) |
| 63 | (hcompact : ∀ j, IsCompact (closure (V j))) (pX : X) (hpX : ∀ j, pX ∈ V j) |
| 64 | (f : ∀ k : ℕ, X → Poincare.connectedComponentOpens E (center (nu k))) |
| 65 | (hgeometry : ∀ k, Topology.IsOpenEmbedding (fun x : V k => f k x) ∧ |
| 66 | IsLocalDiffeomorphOn (𝓡 3) (𝓡 3) ∞ (f k) (V k)) |
| 67 | (hbase : ∀ k, f k pX = point (nu k)) |
| 68 | (c : ℕ → PartialDiffeomorph (𝓡 3) (𝓡 3) X E ∞) |
| 69 | (hcoverC : ∀ x : X, ∃ i, x ∈ (c i).source) |
| 70 | (e : ∀ k, ℕ → E → M (nu k)) (bound : ℕ → ℝ) |
| 71 | (hbound : letI : ∀ k, MetricSpace (M k) := |
| 72 | fun k => terminalSourceComponentMetricSpace (gPhysical k) (center k) |
| 73 | ∀ k i z, z ∈ (c i).target → dist (point (nu k)) (e k i z) ≤ bound i) |
| 74 | (happrox : letI : ∀ k, MetricSpace (M k) := |
| 75 | fun k => terminalSourceComponentMetricSpace (gPhysical k) (center k) |
| 76 | ∀ i C, IsCompact C → C ⊆ (c i).target → TendstoUniformlyOn |
| 77 | (fun k z => dist (f k ((c i).symm z)) (e k i z)) (fun _ => 0) atTop C) |
| 78 | (hjets : ∀ i m C, IsCompact C → C ⊆ (c i).target → TendstoUniformlyOn |
| 79 | (fun k => iteratedFDeriv ℝ m |
| 80 | ((gSource (nu k)).pullbackCoefficients (f k ∘ (c i).symm))) |
| 81 | (iteratedFDeriv ℝ m (g.pullbackCoefficients (c i).symm)) atTop C) |
| 82 | (hfloor : ∀ k, (r k)⁻¹ ^ 2 ≤ Q k) |
| 83 | (hEpsilon : ∀ k, (F k).parameters.epsilon = S.setup.epsilon) |
| 84 | (hC : ∀ k, (F k).parameters.C = S.setup.C) |
| 85 | (hPast : ∀ k, SurgeryCanonicalOn (F k) (Ico 0 (base k)) (r k)) |
| 86 | {Z : ℕ → Type} [∀ n, TopologicalSpace (Z n)] [∀ n, ChartedSpace E (Z n)] |
| 87 | [∀ n, IsManifold (𝓡 3) ∞ (Z n)] |
| 88 | (tauG : ℕ → ℝ) (GG : ∀ n, RicciFlow 3 (Z n) (Icc (-tauG n) 0)) |
| 89 | (qG : ∀ n, Z n → X) |
| 90 | (hfinite : TerminalSourceCountableFiniteGermsResult tauG GG qG g V hV) : |
| 91 | ∃ K0 : ℝ, 1 ≤ K0 ∧ ∀ x, D.curvatureTensorNorm x ≤ K0 := by |
| 92 | classical |
| 93 | obtain ⟨J, lambda, hlambda, available, j, hj, _htarget, _hprojection, _hpoint, |
| 94 | hmetric, phi, _hphi, hsource, hfactor, hbased⟩ := |
| 95 | terminalSource_regular_growing_sources S B p F O W H base Q r A tau0 tau K L R rho N |
| 96 | center data nu V pX f hnu htau hA hV hmono hcompact hpX hgeometry hbase c hcoverC |
| 97 | e bound hbound happrox |
| 98 | let raw := fun k => nu (lambda k) |
| 99 | let selected := fun k => data (raw k) (J k) (available k) |
| 100 | let source := fun k => terminalRegularStageSource |
| 101 | (F (raw k)) (base (raw k)) (Q (raw k)) (A (J k)) (center (raw k)) |
| 102 | let flow := fun k => (selected k).flow |
| 103 | have hsourceJets := terminalSource_regular_captured_jets g (fun k => (flow k).metric 0) |
| 104 | (fun k => gSource (raw k)) V hV hmono hcover j hj hmetric phi hsource |
| 105 | (fun k => f (lambda k)) hfactor c |
| 106 | (fun i m C hC hCi => (hjets i m C hC hCi).seq_tendstoUniformlyOn |
| 107 | lambda hlambda.tendsto_atTop) |
| 108 | have hscalar : D.scalarCurvature pX = 1 := |
| 109 | terminalSource_regular_scalar_one S B p (fun k => F (raw k)) (fun k => O (raw k)) |
| 110 | (fun k => W (raw k)) (fun k => H (raw k)) (base ∘ raw) (Q ∘ raw) (r ∘ raw) |
| 111 | (A ∘ J) (tau0 ∘ J) (tau ∘ J) (K ∘ J) (L ∘ J) (fun k => (J k : ℝ) + 1) |
| 112 | (R ∘ J) (rho ∘ J) (N ∘ J) (fun k => center (raw k)) selected |
| 113 | g D V pX hpX phi hsource hbased c hcoverC hsourceJets |
| 114 | let physical := fun k => terminalSourceNormal_historyCylinder (H (raw k)) (source k) |
| 115 | (selected k).time (selected k).cylinder |
| 116 | have hphysicalMetric := fun k => terminalSource_regular_included_metric (selected k) |
| 117 | let domains : ℕ → Opens X := fun k => ⟨V k, hV k⟩ |
| 118 | let : ∀ k, ConnectedSpace (domains k) := |
| 119 | fun k => isConnected_iff_connectedSpace.mp (hconnected k) |
| 120 | obtain ⟨s, delta, _hs, _hcover, hdelta, _htime, flows, hm, _hcharts, |
| 121 | _hcompat, htriple, hop, _hambient⟩ := hfinite |
| 122 | let : ChartedSpace E (ULift.{u} X) := Poincare.Manifold.uliftChartedSpace E X |
| 123 | let : IsManifold (𝓡 3) ∞ (ULift.{u} X) := Poincare.Manifold.uliftIsManifold (𝓡 3) X |
| 124 | let d := Poincare.Manifold.uliftDiffeomorph (𝓡 3) X |
| 125 | let : ConnectedSpace (ULift.{u} X) := d.toHomeomorph.connectedSpace_iff.mpr inferInstance |
| 126 | let : SecondCountableTopology (ULift.{u} X) := d.toHomeomorph.isEmbedding.secondCountableTopology |
| 127 | let : MeasurableSpace (ULift.{u} X) := borel _ |
| 128 | let : BorelSpace (ULift.{u} X) := ⟨rfl⟩ |
| 129 | let gL := g.pullbackOfLocalDiffeomorph d d.isLocalDiffeomorph |
| 130 | let DL : LeviCivitaData gL := gL.leviCivitaData |
| 131 | let UL := fun k => terminalGermsOpenChartSource d d.isLocalDiffeomorph (domains k) |
| 132 | obtain ⟨hgL, hULconnected, FL, hmL, hopL, htripleL, hambientL⟩ := |
| 133 | terminalSource_regular_lifted_germs.{u} g hg domains delta hdelta flows hm hop htriple |
| 134 | let : ∀ k, ConnectedSpace (UL k) := hULconnected |
| 135 | let VL : ℕ → Set (ULift.{u} X) := fun k => ULift.down ⁻¹' V k |
| 136 | obtain ⟨hVL, hVLmono, hVLcompact, hVLcover, hpL⟩ := |
| 137 | terminalSource_regular_lifted_exhaustion.{u} V hV hmono hcompact hcover pX hpX |
| 138 | let phiL := fun k => d.toPartialDiffeomorph.trans (phi k) |
| 139 | let cL := fun i => d.toPartialDiffeomorph.trans (c i) |
| 140 | obtain ⟨hsourceL, _hmapsL, hjetsL⟩ := |
| 141 | terminalSource_regular_lifted_source_jets.{u} g |
| 142 | (fun k => (flow k).metric 0) phi c hsourceJets |
| 143 | have hsourceL' (k : ℕ) : (phiL k).source = VL k := by |
| 144 | rw [hsourceL, hsource k] |
| 145 | have hcoverCL (x : ULift.{u} X) : ∃ i, x ∈ (cL i).source := by |
| 146 | obtain ⟨i, hi⟩ := hcoverC x.down |
| 147 | refine ⟨i, ?_⟩ |
| 148 | rw [(terminalSource_regular_lifted_chart_jets.{u} g (c i)).1] |
| 149 | exact hi |
| 150 | have hreadout := terminalCurvature_high_point_readout_of_source_cylinders S |
| 151 | (fun k => F (raw k)) (fun k => (F (raw k)).slice (base (raw k))) |
| 152 | (base ∘ raw) (Q ∘ raw) (tau ∘ J) (r ∘ raw) (fun k => htau (J k)) |
| 153 | source (fun k => (selected k).point) physical flow hphysicalMetric gL DL hgL |
| 154 | VL hVL hVLmono hVLcover hVLcompact (ULift.up pX) hpL phiL hsourceL' cL hcoverCL hjetsL |
| 155 | (fun k => hfloor (raw k)) (fun k => hEpsilon (raw k)) |
| 156 | (fun k => hC (raw k)) (fun k => hPast (raw k)) |
| 157 | have hepsilon : 0 < 2 * S.setup.epsilon := mul_pos (by norm_num) S.setup.epsilon_pos |
| 158 | have hhalf : S.setup.epsilon ≤ S.calibration.epsilon₁ / 2 := |
| 159 | S.calibration.epsilon_source_le.trans |
| 160 | ((min_le_right _ _).trans ((min_le_right _ _).trans (min_le_left _ _))) |
| 161 | have hsmall : 2 * S.setup.epsilon ≤ S.calibration.epsilon₁ := by linarith |
| 162 | have hcalibrated : 2 * S.setup.epsilon ≤ 1 / 200 := |
| 163 | S.calibration.two_epsilon_le_bounded_distance.trans S.calibration.epsilon₁₀_le |
| 164 | have hscalarL : DL.scalarCurvature (ULift.up pX) ≠ 0 := by |
| 165 | rw [(terminalSource_regular_lifted_curvature.{u} D DL (ULift.up pX)).1, hscalar] |
| 166 | exact one_ne_zero |
| 167 | obtain ⟨K0, hK0, hboundL⟩ := terminalCurvature_bound_of_finite_germs_floor |
| 168 | (epsilon1 := S.calibration.epsilon₁) (epsilon := 2 * S.setup.epsilon) |
| 169 | (A := 4 * max 1 S.setup.C) (H := 2) S.calibration.small_neck_scale_bound |
| 170 | hepsilon hsmall hcalibrated (by positivity) DL P.m04 hgL (hambientL DL) |
| 171 | (ULift.up pX) hscalarL UL delta hdelta FL hmL hopL htripleL hreadout |
| 172 | refine ⟨K0, hK0, fun x => ?_⟩ |
| 173 | rw [← (terminalSource_regular_lifted_curvature.{u} D DL (ULift.up x)).2] |
| 174 | exact hboundL (ULift.up x) |
| 175 | |
| 176 | end Family |
| 177 | |
| 178 | end PoincareMT.M47 |