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.CanonicalInduction.Terminal.Curvature.TerminalCurvatureEarlierCapture |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.CanonicalInduction.Terminal.Curvature.TerminalCurvatureEarlierCanonical |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.CanonicalInduction.Terminal.Curvature.TerminalCurvatureSurgeryCases |
| 4 | import PoincareLib.Geometry.RicciFlow.Surgery.CanonicalInduction.Terminal.Curvature.TerminalCurvatureFiniteGermsBound |
| 5 | import PoincareLib.Geometry.RicciFlow.Surgery.Control.Calibration |
| 6 | |
| 7 | /-! |
| 8 | # Actual endpoint high-point witnesses and global curvature |
| 9 | |
| 10 | The physical endpoint maps and their normalized jets supply capture and |
| 11 | strict-past canonical witnesses at the same point. Signed finite germs |
| 12 | then bound curvature before any common duration is selected. |
| 13 | MT Proposition 17.1; endpoint-physical-readout.md, AM4-AM5. |
| 14 | -/ |
| 15 | |
| 16 | set_option autoImplicit false |
| 17 | set_option backward.isDefEq.respectTransparency false |
| 18 | |
| 19 | open Set Filter |
| 20 | open scoped ENNReal Manifold ContDiff Topology |
| 21 | |
| 22 | universe u v |
| 23 | |
| 24 | namespace PoincareMT.M47 |
| 25 | |
| 26 | local notation "E" => EuclideanSpace ℝ (Fin 3) |
| 27 | |
| 28 | /-- Actual physical endpoint jets supply capture and strict-past |
| 29 | witnesses, with no assumed canonical certificate or scalar limit. -/ |
| 30 | theorem limitFinite_endpoint_high_points |
| 31 | {ι : Type*} (sched : RepairedControlledSchedulesData.{u}) |
| 32 | (F : ℕ → SurgeryFlowData.{u}) (base t Q r : ℕ → ℝ) |
| 33 | (hQ : ∀ k, 0 < Q k) (hfloor : ∀ k, (r k)⁻¹ ^ 2 ≤ Q k) |
| 34 | (hEpsilon : ∀ k, (F k).parameters.epsilon = sched.setup.epsilon) |
| 35 | (hC : ∀ k, (F k).parameters.C = sched.setup.C) |
| 36 | (hPast : ∀ k, SurgeryCanonicalOn (F k) (Ico 0 (base k)) (r k)) |
| 37 | (htPast : ∀ k, t k ∈ Ico 0 (base k)) |
| 38 | (htDomain : ∀ k, t k ∈ (F k).time_domain) |
| 39 | {X : Type v} [TopologicalSpace X] [ChartedSpace E X] |
| 40 | [IsManifold (𝓡 3) ∞ X] [T2Space X] [T3Space X] [ConnectedSpace X] |
| 41 | (g : RiemannianMetric 3 X) (D : LeviCivitaData g) (hcomplete : MetricComplete g) |
| 42 | (U : ℕ → Set X) (hU : ∀ k, IsOpen (U k)) (hmono : Monotone U) |
| 43 | (hcover : (⋃ k, U k) = univ) (hcompact : ∀ k, IsCompact (closure (U k))) |
| 44 | (p : X) (hp : ∀ k, p ∈ U k) |
| 45 | (psi : ∀ k, PartialDiffeomorph (𝓡 3) (𝓡 3) X ((F k).slice (t k)).carrier ∞) |
| 46 | (hsource : ∀ k, (psi k).source = U k) |
| 47 | (c : ι → PartialDiffeomorph (𝓡 3) (𝓡 3) X E ∞) |
| 48 | (hcoverC : ∀ x, ∃ i, x ∈ (c i).source) |
| 49 | (hjet : ∀ i m K, IsCompact K → K ⊆ (c i).target → TendstoUniformlyOn |
| 50 | (fun k => iteratedFDeriv ℝ m |
| 51 | ((rescaledMetric ((F k).metric (t k)) (Q k) (hQ k)).pullbackCoefficients |
| 52 | (psi k ∘ (c i).symm))) |
| 53 | (iteratedFDeriv ℝ m (g.pullbackCoefficients (c i).symm)) atTop K) : |
| 54 | ∀ x, 2 ≤ D.scalarCurvature x → |
| 55 | (∃ N : EpsilonNeck g, N.connection = D ∧ N.epsilon = 2 * sched.setup.epsilon ∧ |
| 56 | D.scalarCurvature x ≤ (4 * max 1 sched.setup.C) * D.scalarCurvature N.center) ∨ |
| 57 | IsCompact (univ : Set X) := by |
| 58 | have hsmall : 2 * sched.setup.epsilon < 1 / 2 := |
| 59 | (sched.calibration.two_epsilon_le_bounded_distance.trans |
| 60 | sched.calibration.epsilon₁₀_le).trans_lt (by norm_num) |
| 61 | have hround : sched.setup.epsilon ≤ 1 / 200 := |
| 62 | sched.calibration.epsilon_source_le.trans (min_le_left _ _) |
| 63 | intro x hx |
| 64 | have hxone : 1 < D.scalarCurvature x := lt_of_lt_of_le (by norm_num) hx |
| 65 | have hxpos : 0 < D.scalarCurvature x := lt_trans zero_lt_one hxone |
| 66 | have hcanonical := terminalCurvature_eventually_earlier_canonical |
| 67 | F base t Q r hQ hfloor g D U hU hmono hcover psi hsource c hcoverC hjet x hxone |
| 68 | hEpsilon hC hPast htPast htDomain |
| 69 | have hballs (R : ℝ) (hR : 0 < R) : ∃ j, ∀ᶠ k in atTop, |
| 70 | (rescaledMetric ((F k).metric (t k)) (Q k) (hQ k)).ball (psi k x) R ⊆ |
| 71 | psi k '' U j := |
| 72 | terminalCurvature_source_balls_of_original_jets |
| 73 | (fun k => rescaledMetric ((F k).metric (t k)) (Q k) (hQ k)) |
| 74 | g hcomplete U hU hmono hcover psi hsource c hcoverC (fun i => hjet i 0) x hR |
| 75 | exact terminalCurvature_readout_of_surgery_source_canonical F t Q hQ g D |
| 76 | U hU hmono hcover hcompact p hp psi hsource c hcoverC hjet x hxpos hballs |
| 77 | sched.setup.epsilon_pos hsmall hround sched.setup.C_pos |
| 78 | (hcanonical.mono fun _ hk => hk.2) |
| 79 | |
| 80 | /-- Actual endpoint jets and signed finite germs yield the global |
| 81 | curvature ceiling, including the identically zero scalar case. -/ |
| 82 | theorem limitFinite_endpoint_global_bound |
| 83 | {ι : Type*} (sched : RepairedControlledSchedulesData.{u}) |
| 84 | (F : ℕ → SurgeryFlowData.{u}) (base t Q r : ℕ → ℝ) |
| 85 | (hQ : ∀ k, 0 < Q k) (hfloor : ∀ k, (r k)⁻¹ ^ 2 ≤ Q k) |
| 86 | (hEpsilon : ∀ k, (F k).parameters.epsilon = sched.setup.epsilon) |
| 87 | (hC : ∀ k, (F k).parameters.C = sched.setup.C) |
| 88 | (hPast : ∀ k, SurgeryCanonicalOn (F k) (Ico 0 (base k)) (r k)) |
| 89 | (htPast : ∀ k, t k ∈ Ico 0 (base k)) |
| 90 | (htDomain : ∀ k, t k ∈ (F k).time_domain) |
| 91 | {X : Type u} [TopologicalSpace X] [ChartedSpace E X] [IsManifold (𝓡 3) ∞ X] |
| 92 | [MeasurableSpace X] [BorelSpace X] [T2Space X] [T3Space X] |
| 93 | [SecondCountableTopology X] [ConnectedSpace X] |
| 94 | (g : RiemannianMetric 3 X) (D : LeviCivitaData g) |
| 95 | (h04 : RicciFlowCurvatureTheory.{u}) (hcomplete : MetricComplete g) |
| 96 | (hoperator : ∀ x, D.NonnegativeCurvatureOperator x) |
| 97 | (U : ℕ → Set X) (hU : ∀ k, IsOpen (U k)) (hmono : Monotone U) |
| 98 | (hcover : (⋃ k, U k) = univ) (hcompact : ∀ k, IsCompact (closure (U k))) |
| 99 | (p : X) (hp : ∀ k, p ∈ U k) |
| 100 | (psi : ∀ k, PartialDiffeomorph (𝓡 3) (𝓡 3) X ((F k).slice (t k)).carrier ∞) |
| 101 | (hsource : ∀ k, (psi k).source = U k) |
| 102 | (c : ι → PartialDiffeomorph (𝓡 3) (𝓡 3) X E ∞) |
| 103 | (hcoverC : ∀ x, ∃ i, x ∈ (c i).source) |
| 104 | (hjet : ∀ i m K, IsCompact K → K ⊆ (c i).target → TendstoUniformlyOn |
| 105 | (fun k => iteratedFDeriv ℝ m |
| 106 | ((rescaledMetric ((F k).metric (t k)) (Q k) (hQ k)).pullbackCoefficients |
| 107 | (psi k ∘ (c i).symm))) |
| 108 | (iteratedFDeriv ℝ m (g.pullbackCoefficients (c i).symm)) atTop K) |
| 109 | {κ : Type*} (V : κ → TopologicalSpace.Opens X) [∀ i, ConnectedSpace (V i)] |
| 110 | (tau : κ → ℝ) (htau : ∀ i, 0 < tau i) |
| 111 | (L : ∀ i, RicciFlow 3 (V i) (Icc (-tau i) 0)) |
| 112 | (hmetric : ∀ i (x : V i) (v w : TangentSpace (𝓡 3) x), |
| 113 | ((L i).metric 0).inner x v w = g.inner x.val v w) |
| 114 | (hlocalOperator : ∀ i t, t ∈ Icc (-tau i) 0 → ∀ x, |
| 115 | ((L i).connection t).NonnegativeCurvatureOperator x) |
| 116 | (htriple : ∀ x y z : X, ∃ i, x ∈ V i ∧ y ∈ V i ∧ z ∈ V i) : |
| 117 | ∃ B : ℝ, 0 < B ∧ ∀ x, D.curvatureTensorNorm x ≤ B := by |
| 118 | classical |
| 119 | by_cases hzero : ∀ x, D.scalarCurvature x = 0 |
| 120 | · refine ⟨1, zero_lt_one, fun x => ?_⟩ |
| 121 | have hbound := D.curvatureTensorNorm_le_scalarCurvature_sharp |
| 122 | (h04.tensor_calculus 3 X g D) x (hoperator x) |
| 123 | rw [hzero x] at hbound |
| 124 | exact hbound.trans zero_le_one |
| 125 | · push Not at hzero |
| 126 | obtain ⟨q, hq⟩ := hzero |
| 127 | have hreadout := limitFinite_endpoint_high_points sched F base t Q r hQ hfloor |
| 128 | hEpsilon hC hPast htPast htDomain g D hcomplete U hU hmono hcover hcompact p hp |
| 129 | psi hsource c hcoverC hjet |
| 130 | have hhalf : sched.setup.epsilon ≤ sched.calibration.epsilon₁ / 2 := |
| 131 | sched.calibration.epsilon_source_le.trans |
| 132 | ((min_le_right _ _).trans ((min_le_right _ _).trans (min_le_left _ _))) |
| 133 | have hsmall : 2 * sched.setup.epsilon ≤ sched.calibration.epsilon₁ := by linarith |
| 134 | have hcalibrated : 2 * sched.setup.epsilon ≤ 1 / 200 := |
| 135 | sched.calibration.two_epsilon_le_bounded_distance.trans sched.calibration.epsilon₁₀_le |
| 136 | have hA : 0 < 4 * max 1 sched.setup.C := by positivity |
| 137 | exact terminalCurvature_bound_of_finite_germs (H := 2) |
| 138 | sched.calibration.small_neck_scale_bound |
| 139 | (mul_pos (by norm_num) sched.setup.epsilon_pos) hsmall hcalibrated hA |
| 140 | D h04 hcomplete hoperator q hq V tau htau L hmetric hlocalOperator htriple hreadout |
| 141 | |
| 142 | end PoincareMT.M47 |