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.Control.Calibration |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.Induction.EpochExtension.Calibration.KappaConstants |
| 3 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Pinching.Basic |
| 4 | |
| 5 | /-! |
| 6 | Apply the calibration at the final Chapter 15 constant. The chosen ancient |
| 7 | solution, geometric selector and standard flow stay fixed. Standard cap |
| 8 | refinement uses its supplied intrinsic certificate; both neck alternatives |
| 9 | retain their original coordinates and time intervals. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | |
| 14 | open scoped Manifold ContDiff Bundle ENNReal Topology |
| 15 | |
| 16 | universe u |
| 17 | |
| 18 | namespace PoincareMT.RepairedControlledSchedulesData |
| 19 | |
| 20 | variable (S : RepairedControlledSchedulesData.{u}) |
| 21 | |
| 22 | /-- Lemma 11.28 uses Appendix A at the terminal accuracy |
| 23 | `terminalAccuracyFactor * epsilon` of Theorem 11.19. The stored service |
| 24 | supplies that guard for every accuracy below the common threshold. -/ |
| 25 | theorem appendixA_accuracy {epsilon : ℝ} |
| 26 | (he : epsilon ≤ S.calibration.common_epsilon) : |
| 27 | terminalAccuracyFactor * epsilon ≤ S.calibration.appendixA.epsilon₀ := |
| 28 | (mul_le_mul_of_nonneg_left he terminalAccuracyFactor_pos.le).trans |
| 29 | S.calibration.two_common_epsilon_le_appendixA |
| 30 | |
| 31 | theorem setup_appendixA_accuracy : |
| 32 | terminalAccuracyFactor * S.setup.epsilon ≤ S.calibration.appendixA.epsilon₀ := by |
| 33 | apply S.appendixA_accuracy |
| 34 | linarith [S.calibration.two_epsilon_le_common, S.setup.epsilon_pos] |
| 35 | |
| 36 | /-- Claim 17.9 uses the selected Theorem 10.2 threshold at both doubled |
| 37 | constants. The output constants still precede the flow, time and point. -/ |
| 38 | theorem boundedDistanceDoubled (a : ℝ) (ha : 0 ≤ a) : |
| 39 | ∃ D₀ D : ℝ, 0 < D₀ ∧ 0 < D ∧ |
| 40 | ∀ F : GeneralizedRicciFlowData.{u}, |
| 41 | F.interval ⊆ Set.Ici 0 → generalizedHamiltonIveyPinched F → |
| 42 | ∀ t, t ∈ F.interval → ∀ x : (F.slice t).carrier, |
| 43 | D₀ ≤ F.scalar ⟨t, x⟩ → |
| 44 | generalizedEarlierStrongCanonicalNeighborhoods F |
| 45 | (2 * S.setup.epsilon) (2 * S.setup.C) t x → |
| 46 | RepairedBoundedDistanceEstimate F a D t x := by |
| 47 | exact S.calibration.bounded_distance (2 * S.setup.epsilon) |
| 48 | (mul_pos (by norm_num) S.setup.epsilon_pos) |
| 49 | S.calibration.two_epsilon_le_bounded_distance (2 * S.setup.C) |
| 50 | (mul_pos (by norm_num) S.setup.C_pos) a ha |
| 51 | |
| 52 | /-- Apply the same Theorem 10.2 threshold when whole controlled slices |
| 53 | are left-dense. No whole canonical carrier is required at an omitted event. -/ |
| 54 | theorem boundedDistanceDoubledDense (a : ℝ) (ha : 0 ≤ a) : |
| 55 | ∃ D₀ D : ℝ, 0 < D₀ ∧ 0 < D ∧ |
| 56 | ∀ F : GeneralizedRicciFlowData.{u}, |
| 57 | F.interval ⊆ Set.Ici 0 → generalizedHamiltonIveyPinched F → |
| 58 | ∀ t, t ∈ F.interval → ∀ x : (F.slice t).carrier, |
| 59 | D₀ ≤ F.scalar ⟨t, x⟩ → |
| 60 | generalizedEarlierDenseStrongCanonicalNeighborhoods F |
| 61 | (2 * S.setup.epsilon) (2 * S.setup.C) t x → |
| 62 | RepairedBoundedDistanceEstimate F a D t x := by |
| 63 | obtain ⟨D₀, D, hD₀, hD, estimate⟩ := |
| 64 | S.calibration.bounded_distance_dense (2 * S.setup.epsilon) |
| 65 | (mul_pos (by norm_num) S.setup.epsilon_pos) |
| 66 | S.calibration.two_epsilon_le_bounded_distance (2 * S.setup.C) |
| 67 | (mul_pos (by norm_num) S.setup.C_pos) a ha |
| 68 | refine ⟨D₀, D, hD₀, hD, ?_⟩ |
| 69 | intro F _hinterval hpinched t ht x hx hcanonical |
| 70 | exact estimate F hpinched.weak t ht x hx hcanonical |
| 71 | |
| 72 | section Ancient |
| 73 | |
| 74 | variable {M : Type u} [TopologicalSpace M] |
| 75 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] |
| 76 | [IsManifold (𝓡 3) ∞ M] [MeasurableSpace M] [BorelSpace M] |
| 77 | [T2Space M] [T3Space M] [SecondCountableTopology M] [ConnectedSpace M] |
| 78 | |
| 79 | /-- Corollary 9.94 at either selected accuracy and the final common constant. -/ |
| 80 | theorem kappaCanonical (K : AncientKappaSolution 3 M) |
| 81 | (hK : ¬ Nonempty (M27ProjectivePlaneLineFlowCertificate K)) |
| 82 | (eta : ℝ) (heta : eta = S.setup.epsilon ∨ eta = 2 * S.setup.epsilon) |
| 83 | (t : ℝ) (ht : t ≤ 0) (x : M) : |
| 84 | M27StrongCanonicalNeighborhood K t x eta S.setup.C := by |
| 85 | apply (S.calibration.kappa_canonical K hK eta heta t ht x).mono_constant |
| 86 | rw [S.calibration.setup_C_eq] |
| 87 | exact le_max_left _ _ |
| 88 | |
| 89 | /-- The unconditional derivative bounds use the same final constant. -/ |
| 90 | theorem kappaDerivatives (K : AncientKappaSolution 3 M) : |
| 91 | M27ScalarDerivativeBounds K S.setup.C := by |
| 92 | apply (S.calibration.kappa_derivatives K).mono_constant |
| 93 | rw [S.calibration.setup_C_eq] |
| 94 | exact le_max_left _ _ |
| 95 | |
| 96 | end Ancient |
| 97 | |
| 98 | /-- The numerical bound is a consequence of the selected geometric height. -/ |
| 99 | theorem selector_deep_horn (rho delta : ℝ) (hr : 0 < rho) (hd : 0 < delta) : |
| 100 | S.setup.selector.h rho delta ≤ min (rho * delta) (rho / (2 * S.setup.C)) := by |
| 101 | rw [S.calibration.selector_eq] |
| 102 | exact le_min (S.calibration.horn_selector.h_le rho delta hr hd) |
| 103 | (S.calibration.horn_selector.h_upper rho delta hr hd) |
| 104 | |
| 105 | /-- Expose the raw standard comparison with its actual selected constant. -/ |
| 106 | theorem standard_canonical_source : ∃ beta Cstd : ℝ, |
| 107 | 0 < beta ∧ beta < 1 / 2 ∧ 0 < Cstd ∧ Cstd ≤ S.setup.C ∧ |
| 108 | ∀ t ∈ Set.Ico 0 S.cap_persistence.standard_cap.flow.base.lifetime, |
| 109 | ∀ x : StandardCapSpace, |
| 110 | StandardCanonicalAlternative S.cap_persistence.standard_cap.atlas |
| 111 | S.cap_persistence.standard_cap.flow t x |
| 112 | (beta * S.setup.epsilon / 3) Cstd := by |
| 113 | refine ⟨S.calibration.beta, S.calibration.Cstandard, |
| 114 | S.calibration.beta_pos, S.calibration.beta_lt_half, |
| 115 | S.calibration.Cstandard_pos, ?_, S.calibration.canonical_source⟩ |
| 116 | rw [S.calibration.setup_C_eq] |
| 117 | exact (le_add_of_nonneg_right (show (0 : ℝ) ≤ 1 from zero_le_one)).trans |
| 118 | (le_max_right _ _) |
| 119 | |
| 120 | /-- Use the cap refinement or retain the exact initial/evolving neck. -/ |
| 121 | theorem standardCanonical (t : ℝ) |
| 122 | (ht : t ∈ Set.Ico 0 S.cap_persistence.standard_cap.flow.base.lifetime) |
| 123 | (x : StandardCapSpace) : |
| 124 | M45StandardCanonicalAlternative S.cap_persistence.standard_cap.atlas |
| 125 | S.cap_persistence.standard_cap.flow t x |
| 126 | (S.calibration.beta * S.setup.epsilon / 3) S.setup.C := by |
| 127 | have hC : S.calibration.Cstandard + 1 ≤ S.setup.C := by |
| 128 | rw [S.calibration.setup_C_eq] |
| 129 | exact le_max_right _ _ |
| 130 | cases S.calibration.canonical_source t ht x with |
| 131 | | cap N => |
| 132 | obtain ⟨R⟩ := S.calibration.cap_refinement t x N |
| 133 | exact .cap R.cap R.epsilon_eq (R.constant_eq.le.trans hC) |
| 134 | R.connection_eq R.model_eq R.contains |
| 135 | | initial_neck N hdisjoint => exact .initial_neck N hdisjoint |
| 136 | | evolving_neck N => exact .evolving_neck N |
| 137 | |
| 138 | end PoincareMT.RepairedControlledSchedulesData |