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.EpochExtension.Calibration.KappaConstants |
| 2 | import PoincareLib.Geometry.RicciFlow.CanonicalNeighborhood.Ancient.Statement |
| 3 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.DenseTheory |
| 4 | |
| 5 | /-! |
| 6 | # Source services for the Chapter 15 constants |
| 7 | |
| 8 | Morgan--Tian, Section 15.1.1, pp. 354-355, selects thresholds before |
| 9 | canonical constants and before any surgery flow. Theorem 10.2 supplies |
| 10 | one threshold for both histories; Theorem 9.93 and Corollary 9.94 supply |
| 11 | one enlarged kappa constant at both accuracies. The common singular-limit |
| 12 | and horn-selection threshold is constructed separately in CommonThreshold. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | |
| 17 | open scoped Manifold ContDiff Bundle ENNReal Topology |
| 18 | |
| 19 | universe u |
| 20 | |
| 21 | local macro "RepairedBoundedDistanceTheory" ".{" u:level "}" : term => |
| 22 | `(PoincareMT.DenseBoundedDistanceTheory.{$u}) |
| 23 | |
| 24 | |
| 25 | namespace PoincareMT.M45 |
| 26 | |
| 27 | /-- Theorem 10.2, p. 245, and its dense-time consequence retain the same threshold; |
| 28 | the earlier-time hypothesis is applied at its included final time. -/ |
| 29 | theorem boundedDistanceServices (h28 : RepairedBoundedDistanceTheory.{u}) : |
| 30 | ∃ epsilon₁₀ : ℝ, 0 < epsilon₁₀ ∧ epsilon₁₀ ≤ 1 / 200 ∧ |
| 31 | (∀ eta : ℝ, 0 < eta → eta ≤ epsilon₁₀ → |
| 32 | ∀ C : ℝ, 0 < C → ∀ a : ℝ, 0 ≤ a → |
| 33 | ∃ D₀ D : ℝ, 0 < D₀ ∧ 0 < D ∧ |
| 34 | ∀ F : GeneralizedRicciFlowData.{u}, |
| 35 | F.interval ⊆ Set.Ici 0 → generalizedHamiltonIveyPinched F → |
| 36 | ∀ t, t ∈ F.interval → ∀ x : (F.slice t).carrier, |
| 37 | D₀ ≤ F.scalar ⟨t, x⟩ → |
| 38 | generalizedEarlierStrongCanonicalNeighborhoods F eta C t x → |
| 39 | RepairedBoundedDistanceEstimate F a D t x) ∧ |
| 40 | M28DenseTimeEstimateStatement.{u} epsilon₁₀ := by |
| 41 | obtain ⟨epsilon₁₀, hpos, hsmall, hsame, hdense⟩ := h28.bounds |
| 42 | refine ⟨epsilon₁₀, hpos, hsmall, ?_, hdense⟩ |
| 43 | intro eta heta hle C hC a ha |
| 44 | obtain ⟨D₀, D, hD₀, hD, estimate⟩ := hsame eta heta hle C hC a ha |
| 45 | refine ⟨D₀, D, hD₀, hD, ?_⟩ |
| 46 | intro F _hinterval hpinched t ht x hx hcanonical |
| 47 | exact estimate F hpinched.weak t ht x hx (hcanonical t ht le_rfl) |
| 48 | |
| 49 | /-- Theorem 9.93, pp. 242-243, supplies a derivative constant independent |
| 50 | of the later neck accuracy and without the projective-plane exception. -/ |
| 51 | theorem kappaDerivativeConstant (h27 : RepairedKappaAlternativeTheory.{u}) : |
| 52 | ∃ C : ℝ, 0 < C ∧ |
| 53 | ∀ {M : Type u} [TopologicalSpace M] |
| 54 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] |
| 55 | [IsManifold (𝓡 3) ∞ M] [MeasurableSpace M] [BorelSpace M] |
| 56 | [T2Space M] [T3Space M] [SecondCountableTopology M] [ConnectedSpace M], |
| 57 | ∀ K : AncientKappaSolution 3 M, M27ScalarDerivativeBounds K C := by |
| 58 | obtain ⟨epsilonBar, hpos, htheorem⟩ := h27.theorem_9_93 |
| 59 | obtain ⟨C, hC, hcertificate⟩ := htheorem (epsilonBar / 2) |
| 60 | (half_pos hpos) (half_lt_self hpos) |
| 61 | exact ⟨C, hC, fun K => (hcertificate K).derivatives⟩ |
| 62 | |
| 63 | /-- Corollary 9.94 at epsilon and twice epsilon, together with the |
| 64 | unconditional Theorem 9.93 derivative estimate. This is the common |
| 65 | kappa constant in Section 15.1.1, pp. 354-355. -/ |
| 66 | theorem kappaServices (h27 : RepairedKappaAlternativeTheory.{u}) : |
| 67 | ∃ epsilonPrime : ℝ, 0 < epsilonPrime ∧ |
| 68 | ∀ epsilon : ℝ, 0 < epsilon → 2 * epsilon ≤ epsilonPrime → |
| 69 | ∃ C : ℝ, 0 < C ∧ |
| 70 | (∀ {M : Type u} [TopologicalSpace M] |
| 71 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] |
| 72 | [IsManifold (𝓡 3) ∞ M] [MeasurableSpace M] [BorelSpace M] |
| 73 | [T2Space M] [T3Space M] [SecondCountableTopology M] [ConnectedSpace M], |
| 74 | ∀ K : AncientKappaSolution 3 M, |
| 75 | ¬ Nonempty (M27ProjectivePlaneLineFlowCertificate K) → |
| 76 | ∀ eta : ℝ, (eta = epsilon ∨ eta = 2 * epsilon) → |
| 77 | ∀ t, t ≤ 0 → ∀ x : M, |
| 78 | M27StrongCanonicalNeighborhood K t x eta C) ∧ |
| 79 | (∀ {M : Type u} [TopologicalSpace M] |
| 80 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] |
| 81 | [IsManifold (𝓡 3) ∞ M] [MeasurableSpace M] [BorelSpace M] |
| 82 | [T2Space M] [T3Space M] [SecondCountableTopology M] [ConnectedSpace M], |
| 83 | ∀ K : AncientKappaSolution 3 M, M27ScalarDerivativeBounds K C) := by |
| 84 | obtain ⟨epsilonPrime, hPrime, hcanonical⟩ := h27.corollary_9_94 |
| 85 | obtain ⟨Cd, _, hderivatives⟩ := kappaDerivativeConstant h27 |
| 86 | refine ⟨epsilonPrime, hPrime, ?_⟩ |
| 87 | intro epsilon hepsilon htwo |
| 88 | have hepsilon_le : epsilon ≤ epsilonPrime := by linarith |
| 89 | obtain ⟨C₁, hC₁, hcanonical₁⟩ := hcanonical epsilon hepsilon hepsilon_le |
| 90 | obtain ⟨C₂, _, hcanonical₂⟩ := hcanonical (2 * epsilon) |
| 91 | (mul_pos (by norm_num) hepsilon) htwo |
| 92 | refine ⟨max C₁ (max C₂ Cd), hC₁.trans_le (le_max_left _ _), ?_, ?_⟩ |
| 93 | · intro M _ _ _ _ _ _ _ _ _ K hK eta heta t ht x |
| 94 | rcases heta with rfl | rfl |
| 95 | · exact (hcanonical₁ K hK t ht x).mono_constant (le_max_left _ _) |
| 96 | · exact (hcanonical₂ K hK t ht x).mono_constant |
| 97 | ((le_max_left _ _).trans (le_max_right _ _)) |
| 98 | · intro M _ _ _ _ _ _ _ _ _ K |
| 99 | exact (hderivatives K).mono_constant |
| 100 | ((le_max_right _ _).trans (le_max_right _ _)) |
| 101 | |
| 102 | end PoincareMT.M45 |