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.Curvature.DoubleCurvature |
| 2 | |
| 3 | /-! |
| 4 | # Compact doubles for metrics modified inside the collar |
| 5 | |
| 6 | Keep the original double's actual carrier, charts, and reflected overlap. |
| 7 | A new smooth metric that agrees with the original metric on that collar |
| 8 | descends through the same quotient. Its coefficient field and curvature |
| 9 | norms are retained on both pieces. This is the terminal restart double |
| 10 | in Morgan-Tian Theorem 12.5, pp. 296-297. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | set_option backward.isDefEq.respectTransparency false |
| 15 | |
| 16 | open Set Topology Filter Poincare.Gluing |
| 17 | open scoped Manifold ContDiff |
| 18 | |
| 19 | namespace PoincareMT.M34 |
| 20 | |
| 21 | variable {g : RiemannianMetric 3 StandardCapSpace} |
| 22 | |
| 23 | /-- Restrict a modified metric to the original double piece by the actual |
| 24 | inclusion differential (Theorem 12.5, pp. 296-297). -/ |
| 25 | noncomputable def modifiedEndDoublePieceMetric (e : StandardCylindricalEnd g) |
| 26 | (h : RiemannianMetric 3 StandardCapSpace) {R : ℝ} (hR : 1 < R) : |
| 27 | let := endDoublePieceChartedSpace e hR |
| 28 | let := endDoublePiece_isManifold e hR |
| 29 | RiemannianMetric 3 (EndDoublePiece e R) := by |
| 30 | let := endDoublePieceChartedSpace e hR |
| 31 | let := endDoublePiece_isManifold e hR |
| 32 | exact h.pullbackOfLocalDiffeomorph Subtype.val |
| 33 | (endDoublePiece_subtypeVal_isLocalDiffeomorph e hR) |
| 34 | |
| 35 | /-- The modified piece coefficients are the genuine inclusion pullback |
| 36 | (Theorem 12.5, pp. 296-297). -/ |
| 37 | theorem modifiedEndDoublePieceMetric_inner (e : StandardCylindricalEnd g) |
| 38 | (h : RiemannianMetric 3 StandardCapSpace) {R : ℝ} (hR : 1 < R) : |
| 39 | let := endDoublePieceChartedSpace e hR |
| 40 | let := endDoublePiece_isManifold e hR |
| 41 | ∀ (x : EndDoublePiece e R) (u v : TangentSpace (𝓡 3) x), |
| 42 | (modifiedEndDoublePieceMetric e h hR).inner x u v = h.inner (x : StandardCapSpace) |
| 43 | (mfderiv (𝓡 3) (𝓡 3) Subtype.val x u) |
| 44 | (mfderiv (𝓡 3) (𝓡 3) Subtype.val x v) := by |
| 45 | let := endDoublePieceChartedSpace e hR |
| 46 | let := endDoublePiece_isManifold e hR |
| 47 | dsimp only |
| 48 | intro x u v |
| 49 | rfl |
| 50 | |
| 51 | /-- Equality on the reflected collar makes the two modified piece |
| 52 | metrics compatible throughout every overlap (Theorem 12.5, pp. 296-297). -/ |
| 53 | theorem modifiedEndDoubleMetrics_compatible (e : StandardCylindricalEnd g) |
| 54 | (h : RiemannianMetric 3 StandardCapSpace) {R : ℝ} (hR : 1 < R) |
| 55 | (hagrees : EqOn h.euclideanCoefficients g.euclideanCoefficients (endDoubleCollar e R)) : |
| 56 | let := endDoublePiece_nonempty e hR |
| 57 | CompatibleMetrics (fun _ : Bool => endTruncation e (R + 1)) |
| 58 | (fun _ => endTruncation_isOpen e (show 0 ≤ R + 1 by linarith)) |
| 59 | (endDoubleOverlap e hR) (fun _ => modifiedEndDoublePieceMetric e h hR) := by |
| 60 | let := endDoublePiece_nonempty e hR |
| 61 | let := endDoublePieceChartedSpace e hR |
| 62 | let := endDoublePiece_isManifold e hR |
| 63 | have heq (x : EndDoublePiece e R) (hx : (x : StandardCapSpace) ∈ endDoubleCollar e R) |
| 64 | (u v : TangentSpace (𝓡 3) x) : |
| 65 | (modifiedEndDoublePieceMetric e h hR).inner x u v = |
| 66 | (endDoublePieceMetric e hR).inner x u v := by |
| 67 | rw [modifiedEndDoublePieceMetric_inner, endDoublePieceMetric_inner] |
| 68 | exact congrArg (fun B => B (mfderiv (𝓡 3) (𝓡 3) Subtype.val x u) |
| 69 | (mfderiv (𝓡 3) (𝓡 3) Subtype.val x v)) (hagrees hx) |
| 70 | dsimp only [CompatibleMetrics] |
| 71 | intro i j x hx u v |
| 72 | by_cases hij : i = j |
| 73 | · subst j |
| 74 | rw [(endDoubleOverlap e hR).self] |
| 75 | change (modifiedEndDoublePieceMetric e h hR).inner x u v = |
| 76 | (modifiedEndDoublePieceMetric e h hR).inner x |
| 77 | (mfderiv (𝓡 3) (𝓡 3) id x u) (mfderiv (𝓡 3) (𝓡 3) id x v) |
| 78 | rw [mfderiv_id] |
| 79 | rfl |
| 80 | · have ht : (endDoubleOverlap e hR).transition i j = endDoubleTransition e hR := |
| 81 | twoPieceOverlap_transition_ne _ _ hij |
| 82 | rw [ht] at hx ⊢ |
| 83 | have hxval : (x : StandardCapSpace) ∈ endDoubleCollar e R := by |
| 84 | simpa only [endDoubleTransition_source, mem_preimage] using hx |
| 85 | have hyval : ((endDoubleTransition e hR x) : StandardCapSpace) ∈ endDoubleCollar e R := by |
| 86 | rw [endDoubleTransition_apply_coe e hR hxval] |
| 87 | exact endAxialReflection_maps_collar e hR hxval |
| 88 | rw [heq x hxval, heq _ hyval] |
| 89 | exact endDoubleTransition_metric e hR x hx u v |
| 90 | |
| 91 | /-- The actual descended metric on the original compact double for any |
| 92 | smooth metric unchanged on the collar (Theorem 12.5, pp. 296-297). -/ |
| 93 | noncomputable def modifiedEndDoubleMetric (e : StandardCylindricalEnd g) |
| 94 | (h : RiemannianMetric 3 StandardCapSpace) {R : ℝ} (hR : 1 < R) |
| 95 | (hagrees : EqOn h.euclideanCoefficients g.euclideanCoefficients (endDoubleCollar e R)) : |
| 96 | RiemannianMetric 3 (EndDouble e hR) := by |
| 97 | let := endDoublePiece_nonempty e hR |
| 98 | exact quotientMetric (fun _ : Bool => endTruncation e (R + 1)) |
| 99 | (fun _ => endTruncation_isOpen e (show 0 ≤ R + 1 by linarith)) |
| 100 | (endDoubleOverlap e hR) (endDoubleOverlap_smooth e hR) |
| 101 | (fun _ => modifiedEndDoublePieceMetric e h hR) |
| 102 | (modifiedEndDoubleMetrics_compatible e h hR hagrees) |
| 103 | |
| 104 | /-- Both quotient inclusions preserve the modified metric through their |
| 105 | actual tangent derivatives (Theorem 12.5, pp. 296-297). -/ |
| 106 | theorem modifiedEndDoubleMetric_preserves (e : StandardCylindricalEnd g) |
| 107 | (h : RiemannianMetric 3 StandardCapSpace) {R : ℝ} (hR : 1 < R) |
| 108 | (hagrees : EqOn h.euclideanCoefficients g.euclideanCoefficients (endDoubleCollar e R)) |
| 109 | (i : Bool) : |
| 110 | let := endDoublePieceChartedSpace e hR |
| 111 | ∀ (x : EndDoublePiece e R) (u v : TangentSpace (𝓡 3) x), |
| 112 | h.inner (x : StandardCapSpace) |
| 113 | (mfderiv (𝓡 3) (𝓡 3) Subtype.val x u) |
| 114 | (mfderiv (𝓡 3) (𝓡 3) Subtype.val x v) = |
| 115 | (modifiedEndDoubleMetric e h hR hagrees).inner ((endDoubleOverlap e hR).include i x) |
| 116 | (mfderiv (𝓡 3) (𝓡 3) ((endDoubleOverlap e hR).include i) x u) |
| 117 | (mfderiv (𝓡 3) (𝓡 3) ((endDoubleOverlap e hR).include i) x v) := by |
| 118 | let := endDoublePieceChartedSpace e hR |
| 119 | let := endDoublePiece_nonempty e hR |
| 120 | dsimp only |
| 121 | intro x u v |
| 122 | exact quotientMetric_preserves (fun _ : Bool => endTruncation e (R + 1)) |
| 123 | (fun _ => endTruncation_isOpen e (show 0 ≤ R + 1 by linarith)) |
| 124 | (endDoubleOverlap e hR) (endDoubleOverlap_smooth e hR) |
| 125 | (fun _ => modifiedEndDoublePieceMetric e h hR) |
| 126 | (modifiedEndDoubleMetrics_compatible e h hR hagrees) i x u v |
| 127 | |
| 128 | /-- The original total cap parametrizations pull the descended metric |
| 129 | back exactly to the modified metric on their open sources |
| 130 | (Theorem 12.5, pp. 296-297). -/ |
| 131 | theorem modifiedEndDoubleParametrization_metric (e : StandardCylindricalEnd g) |
| 132 | (h : RiemannianMetric 3 StandardCapSpace) {R : ℝ} (hR : 1 < R) |
| 133 | (hagrees : EqOn h.euclideanCoefficients g.euclideanCoefficients (endDoubleCollar e R)) |
| 134 | (i : Bool) {x : StandardCapSpace} (hx : x ∈ endTruncation e (R + 1)) |
| 135 | (u v : TangentSpace (𝓡 3) x) : |
| 136 | h.inner x u v = |
| 137 | (modifiedEndDoubleMetric e h hR hagrees).inner (endDoubleParametrization e hR i x) |
| 138 | (mfderiv (𝓡 3) (𝓡 3) (endDoubleParametrization e hR i) x u) |
| 139 | (mfderiv (𝓡 3) (𝓡 3) (endDoubleParametrization e hR i) x v) := by |
| 140 | let := endDoublePiece_nonempty e hR |
| 141 | let := endDoublePieceChartedSpace e hR |
| 142 | let := endDoublePiece_isManifold e hR |
| 143 | let p : EndDoublePiece e R := ⟨x, hx⟩ |
| 144 | have hp := modifiedEndDoubleMetric_preserves e h hR hagrees i p u v |
| 145 | rw [mfderiv_subtypeVal_singleton |
| 146 | (endTruncation_isOpen e (show 0 ≤ R + 1 by linarith)) p] at hp |
| 147 | change h.inner x u v = _ at hp |
| 148 | rw [show x = (p : StandardCapSpace) from rfl, |
| 149 | endDoubleParametrization_apply, endDoubleParametrization_mfderiv] |
| 150 | exact hp |
| 151 | |
| 152 | /-- Actual covariant curvature bounds of the modified metric hold on |
| 153 | the compact double for every compatible connection |
| 154 | (Theorem 12.5, pp. 296-297). -/ |
| 155 | theorem modifiedEndDouble_curvatureDerivative_le (e : StandardCylindricalEnd g) |
| 156 | (h : RiemannianMetric 3 StandardCapSpace) (D : LeviCivitaData h) |
| 157 | {R : ℝ} (hR : 1 < R) |
| 158 | (hagrees : EqOn h.euclideanCoefficients g.euclideanCoefficients (endDoubleCollar e R)) |
| 159 | (m : ℕ) {C : ℝ} (hbound : ∀ x : StandardCapSpace, D.curvatureDerivativeNorm m x ≤ C) |
| 160 | (D' : LeviCivitaData (modifiedEndDoubleMetric e h hR hagrees)) (q : EndDouble e hR) : |
| 161 | D'.curvatureDerivativeNorm m q ≤ C := by |
| 162 | obtain ⟨i, x, hx, rfl⟩ := endDoubleParametrization_cover e hR q |
| 163 | rw [← D.curvatureDerivativeNorm_eq_pullback D' |
| 164 | (endTruncation_isOpen e (show 0 ≤ R + 1 by linarith)) |
| 165 | (endDoubleParametrization_contMDiffOn e hR i) |
| 166 | (fun _ hy => endDoubleParametrization_mfderiv_isInvertible e hR i hy) |
| 167 | (fun _ hy u v => modifiedEndDoubleParametrization_metric e h hR hagrees i hy u v) m hx] |
| 168 | exact hbound x |
| 169 | |
| 170 | end PoincareMT.M34 |