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.StandardCap.Existence.Construction.Metric.ModifiedDoubleMetric |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Existence.Geometry.Metric.CutoffMetric |
| 3 | |
| 4 | /-! |
| 5 | # Compact cutoff doubles with exact retained initial coordinates |
| 6 | |
| 7 | Cut off at exhaustion level R, double at axial height R+2, and retain |
| 8 | the smaller open source below height R-1. The gluing collar is entirely |
| 9 | in the unchanged cylindrical region; the retained source is entirely |
| 10 | in the unchanged terminal region. These distinct margins justify the |
| 11 | initial coefficient germs in Morgan-Tian Theorem 12.5, pp. 296-297. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | set_option backward.isDefEq.respectTransparency false |
| 16 | |
| 17 | open Set |
| 18 | open scoped Manifold ContDiff |
| 19 | |
| 20 | namespace PoincareMT.M34 |
| 21 | |
| 22 | variable {g : RiemannianMetric 3 StandardCapSpace} |
| 23 | |
| 24 | /-- The retained open source lies strictly below the interpolation |
| 25 | region (Theorem 12.5, pp. 296-297). -/ |
| 26 | theorem cutoffMetric_coefficients_on_truncation (e : StandardCylindricalEnd g) |
| 27 | (h : RiemannianMetric 3 StandardCapSpace) {R : ℝ} (hR : 3 ≤ R) : |
| 28 | EqOn (cutoffMetric e h R).euclideanCoefficients h.euclideanCoefficients |
| 29 | (endTruncation e (R - 1)) := by |
| 30 | intro x hx |
| 31 | apply cutoffMetric_coefficients_of_le |
| 32 | by_cases hc : x ∈ e.carrier |
| 33 | · have hs := e.inverse_domain x hc |
| 34 | have hheight : (e.inverse x).2 < R - 1 := by |
| 35 | apply (endTruncation_coordinate_iff e (by linarith) hs).mp |
| 36 | simpa only [e.coordinate_right_inverse hc] using hx |
| 37 | change endExhaustion e x ≤ R |
| 38 | rw [endExhaustion, if_pos hc] |
| 39 | have hp := mul_le_mul_of_nonneg_left |
| 40 | (Real.smoothTransition.le_one ((e.inverse x).2 - 1)) hs |
| 41 | nlinarith |
| 42 | · simp only [endExhaustion, if_neg hc] |
| 43 | linarith |
| 44 | |
| 45 | /-- The entire reflected gluing collar is in the unchanged original |
| 46 | metric region (Theorem 12.5, pp. 296-297). -/ |
| 47 | theorem cutoffMetric_coefficients_on_doubleCollar (e : StandardCylindricalEnd g) |
| 48 | (h : RiemannianMetric 3 StandardCapSpace) {R : ℝ} (hR : 3 ≤ R) : |
| 49 | EqOn (cutoffMetric e h R).euclideanCoefficients g.euclideanCoefficients |
| 50 | (endDoubleCollar e (R + 2)) := by |
| 51 | rintro _ ⟨z, hz, rfl⟩ |
| 52 | apply cutoffMetric_coefficients_of_add_one_le |
| 53 | rw [endExhaustion_coordinate_of_two_le e (by linarith [hz.2.1])] |
| 54 | linarith [hz.2.1] |
| 55 | |
| 56 | /-- The original compact double carrier at a height beyond the cutoff |
| 57 | (Theorem 12.5, pp. 296-297). -/ |
| 58 | abbrev CutoffDouble (e : StandardCylindricalEnd g) {R : ℝ} (hR : 3 ≤ R) := |
| 59 | EndDouble e (by linarith : 1 < R + 2) |
| 60 | |
| 61 | /-- The actual compact cutoff metric, descended using its unchanged |
| 62 | collar coefficients (Theorem 12.5, pp. 296-297). -/ |
| 63 | noncomputable def cutoffDoubleMetric (e : StandardCylindricalEnd g) |
| 64 | (h : RiemannianMetric 3 StandardCapSpace) {R : ℝ} (hR : 3 ≤ R) : |
| 65 | RiemannianMetric 3 (CutoffDouble e hR) := |
| 66 | modifiedEndDoubleMetric e (cutoffMetric e h R) (by linarith : 1 < R + 2) |
| 67 | (cutoffMetric_coefficients_on_doubleCollar e h hR) |
| 68 | |
| 69 | /-- The fixed original-cap parametrization into a cutoff double |
| 70 | (Theorem 12.5, pp. 296-297). -/ |
| 71 | noncomputable def cutoffDoubleChart (e : StandardCylindricalEnd g) |
| 72 | {R : ℝ} (hR : 3 ≤ R) (i : Bool) : StandardCapSpace → CutoffDouble e hR := |
| 73 | endDoubleParametrization e (by linarith : 1 < R + 2) i |
| 74 | |
| 75 | /-- The retained source is contained in the larger geometric piece |
| 76 | source (Theorem 12.5, pp. 296-297). -/ |
| 77 | theorem cutoffDouble_source_subset (e : StandardCylindricalEnd g) (R : ℝ) : |
| 78 | endTruncation e (R - 1) ⊆ endTruncation e ((R + 2) + 1) := |
| 79 | endTruncation_mono e (by linarith) |
| 80 | |
| 81 | /-- Each retained parametrization is smooth on its exact-initial open |
| 82 | source (Theorem 12.5, pp. 296-297). -/ |
| 83 | theorem cutoffDoubleChart_contMDiffOn (e : StandardCylindricalEnd g) |
| 84 | {R : ℝ} (hR : 3 ≤ R) (i : Bool) : |
| 85 | ContMDiffOn (𝓡 3) (𝓡 3) ∞ (cutoffDoubleChart e hR i) (endTruncation e (R - 1)) := |
| 86 | (endDoubleParametrization_contMDiffOn e (by linarith : 1 < R + 2) i).mono |
| 87 | (cutoffDouble_source_subset e R) |
| 88 | |
| 89 | /-- The retained coordinate differential is genuinely invertible |
| 90 | (Theorem 12.5, pp. 296-297). -/ |
| 91 | theorem cutoffDoubleChart_mfderiv_isInvertible (e : StandardCylindricalEnd g) |
| 92 | {R : ℝ} (hR : 3 ≤ R) (i : Bool) {x : StandardCapSpace} |
| 93 | (hx : x ∈ endTruncation e (R - 1)) : |
| 94 | (mfderiv (𝓡 3) (𝓡 3) (cutoffDoubleChart e hR i) x).IsInvertible := |
| 95 | endDoubleParametrization_mfderiv_isInvertible e (by linarith : 1 < R + 2) i |
| 96 | (cutoffDouble_source_subset e R hx) |
| 97 | |
| 98 | /-- The compact cutoff metric pulls back exactly to the supplied metric |
| 99 | on the whole retained open source (Theorem 12.5, pp. 296-297). -/ |
| 100 | theorem cutoffDoubleMetric_initial_pullback (e : StandardCylindricalEnd g) |
| 101 | (h : RiemannianMetric 3 StandardCapSpace) {R : ℝ} (hR : 3 ≤ R) (i : Bool) |
| 102 | {x : StandardCapSpace} (hx : x ∈ endTruncation e (R - 1)) : |
| 103 | (cutoffDoubleMetric e h hR).pullbackCoefficients (cutoffDoubleChart e hR i) x = |
| 104 | h.euclideanCoefficients x := by |
| 105 | ext u v |
| 106 | have hp := modifiedEndDoubleParametrization_metric e (cutoffMetric e h R) |
| 107 | (by linarith : 1 < R + 2) (cutoffMetric_coefficients_on_doubleCollar e h hR) i |
| 108 | (cutoffDouble_source_subset e R hx) u v |
| 109 | exact hp.symm.trans (congrArg (fun B => B u v) |
| 110 | (cutoffMetric_coefficients_on_truncation e h hR hx)) |
| 111 | |
| 112 | /-- Every intrinsic derivative bound of the cutoff metric transfers to |
| 113 | the whole compact double (Theorem 12.5, pp. 296-297). -/ |
| 114 | theorem cutoffDouble_curvatureDerivative_le (e : StandardCylindricalEnd g) |
| 115 | (h : RiemannianMetric 3 StandardCapSpace) {R : ℝ} (hR : 3 ≤ R) |
| 116 | (D : LeviCivitaData (cutoffMetric e h R)) (m : ℕ) {C : ℝ} |
| 117 | (hbound : ∀ x : StandardCapSpace, D.curvatureDerivativeNorm m x ≤ C) |
| 118 | (D' : LeviCivitaData (cutoffDoubleMetric e h hR)) (q : CutoffDouble e hR) : |
| 119 | D'.curvatureDerivativeNorm m q ≤ C := |
| 120 | modifiedEndDouble_curvatureDerivative_le e (cutoffMetric e h R) D |
| 121 | (by linarith : 1 < R + 2) (cutoffMetric_coefficients_on_doubleCollar e h hR) |
| 122 | m hbound D' q |
| 123 | |
| 124 | /-- Increasing cutoff radii eventually retain every original compact |
| 125 | set inside the exact-initial region (Theorem 12.5, pp. 296-297). -/ |
| 126 | theorem eventually_compact_subset_cutoff_source (e : StandardCylindricalEnd g) |
| 127 | {K : Set StandardCapSpace} (hK : IsCompact K) : |
| 128 | ∀ᶠ k : ℕ in Filter.atTop, K ⊆ endTruncation e ((k : ℝ) + 4) := by |
| 129 | obtain ⟨R, _hR, hKR⟩ := endTruncation_contains_compact e hK |
| 130 | obtain ⟨N, hN⟩ := exists_nat_gt R |
| 131 | filter_upwards [Filter.eventually_ge_atTop N] with k hk |
| 132 | apply hKR.trans (endTruncation_mono e ?_) |
| 133 | have hNk : (N : ℝ) ≤ k := by exact_mod_cast hk |
| 134 | linarith |
| 135 | |
| 136 | end PoincareMT.M34 |