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.Generalized.Noncollapse.Cylinder.CylinderDistance |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.Noncollapse.Calculus.CompactBuffer |
| 3 | |
| 4 | /-! Adapted from Mapher `PoincareMT/Proofs/M15/Prop8_2_NormalizedCylinder.lean` at |
| 5 | `0c5d5c4e1ecbc12703b1994e226df1b15d2e8d39`. See the source mapping in |
| 6 | `references/ricci-flow/mapher/noncollapse/import.json`. -/ |
| 7 | |
| 8 | /-! |
| 9 | # The normalized cylinder and its compact initial buffer |
| 10 | |
| 11 | Morgan-Tian Definition 3.40, p. 61, and Claim 8.5, p. 172. The existing |
| 12 | M13 ordinary rescaling witness supplies all metric and curvature identities. |
| 13 | The initial buffer uses the actual terminal source map and its compact |
| 14 | target ball, without completeness of the source manifold. |
| 15 | See `references/ricci-flow/mapher/noncollapse/derivations/2026-09-20-normalized-cylinder.md`. |
| 16 | -/ |
| 17 | |
| 18 | set_option autoImplicit false |
| 19 | |
| 20 | open scoped Manifold ContDiff Bundle ENNReal NNReal Topology |
| 21 | |
| 22 | universe u |
| 23 | |
| 24 | namespace PoincareMT.Generalized.Noncollapse |
| 25 | |
| 26 | variable {n : ℕ} {X : Type u} [TopologicalSpace X] {time : X → ℝ} |
| 27 | {I : SpacetimeInterval} {G : GeneralizedLGeometryTransport n X time I} |
| 28 | {T r : ℝ} {x : (G.slices T).Point} {K : SpacetimeInterval} |
| 29 | {C : Type u} [TopologicalSpace C] |
| 30 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) C] [IsManifold (𝓡 n) ∞ C] |
| 31 | [T2Space C] [SecondCountableTopology C] |
| 32 | |
| 33 | /-- The parabolic normalization retains both closed cylinder endpoints. |
| 34 | Source: Definition 3.40, p. 61, as used in Claim 8.5, p. 172. -/ |
| 35 | theorem actualBallCylinder_normalized_domain |
| 36 | (B : M15ActualBallCylinder G T x r K C) (hQ : 0 < r⁻¹ ^ 2) : |
| 37 | (parabolicInterval (r⁻¹ ^ 2) hQ (T - r ^ 2) K).domain = Set.Icc 0 1 := by |
| 38 | rw [parabolicInterval_domain, B.interval_domain] |
| 39 | change (parabolicTimeOrderIso (r⁻¹ ^ 2) hQ (T - r ^ 2)) '' |
| 40 | Set.Icc (T - r ^ 2) T = _ |
| 41 | rw [OrderIso.image_Icc] |
| 42 | simp only [parabolicTimeOrderIso_apply, parabolicTime, sub_self, mul_zero] |
| 43 | congr 1 |
| 44 | field_simp [B.radius_pos.ne'] |
| 45 | ring |
| 46 | |
| 47 | /-- M13's curvature scaling gives the unit bound on the full normalized |
| 48 | cylinder. Source: Definition 3.40, p. 61, and Claim 8.5, p. 172. -/ |
| 49 | theorem actualBallCylinder_normalized_curvature_le_one |
| 50 | (B : M15ActualBallCylinder G T x r K C) |
| 51 | (F : RicciFlow n C K.domain) |
| 52 | (hRm : ∀ (t : (G.timeIntervals.interval K).Point) (c : C), |
| 53 | (F.connection t.val).curvatureTensorNorm c = |
| 54 | horizontalCurvatureNorm G.leafwise (B.embedding.toSpacetime (t, c))) |
| 55 | (hQ : 0 < r⁻¹ ^ 2) |
| 56 | (R : OrdinaryParabolicRescaling F (r⁻¹ ^ 2) hQ (T - r ^ 2)) |
| 57 | {s : ℝ} (hs : s ∈ Set.Icc 0 1) (c : C) : |
| 58 | (R.flow.connection s).curvatureTensorNorm c ≤ 1 := by |
| 59 | let : LocallyCompactSpace C := |
| 60 | ChartedSpace.locallyCompactSpace (EuclideanSpace ℝ (Fin n)) C |
| 61 | let : MeasurableSpace C := borel C |
| 62 | let : BorelSpace C := ⟨rfl⟩ |
| 63 | have hsR : s ∈ (parabolicInterval (r⁻¹ ^ 2) hQ (T - r ^ 2) K).domain := by |
| 64 | rwa [actualBallCylinder_normalized_domain B hQ] |
| 65 | have ht := (mem_parabolicInterval_iff (r⁻¹ ^ 2) hQ (T - r ^ 2) K s).mp hsR |
| 66 | have hbound : (F.connection (parabolicTimeInv (r⁻¹ ^ 2) (T - r ^ 2) s)).curvatureTensorNorm c |
| 67 | ≤ r⁻¹ ^ 2 := by |
| 68 | rw [hRm ⟨_, ht⟩ c] |
| 69 | exact B.curvature_bound ⟨_, ht⟩ c |
| 70 | have hscale := (R.metric_calculus s).curvature_norm_eq |
| 71 | (F.connection (parabolicTimeInv (r⁻¹ ^ 2) (T - r ^ 2) s)) |
| 72 | (R.flow.connection s) c |
| 73 | change (R.flow.connection s).curvatureTensorNorm c = _ at hscale |
| 74 | rw [hscale, div_le_iff₀ hQ, one_mul] |
| 75 | exact hbound |
| 76 | |
| 77 | /-- The normalized initial distance bounds the actual terminal-slice |
| 78 | distance with factor r*exp(n). Source: Claim 8.5, p. 172, with the corrected |
| 79 | initial-time buffer. -/ |
| 80 | theorem actualBallCylinder_normalized_terminal_edist_le |
| 81 | (hM12 : GeneralizedRicciGaugeTheory.{u} n) |
| 82 | (B : M15ActualBallCylinder G T x r K C) |
| 83 | (F : RicciFlow n C K.domain) (hmetric : F.metric = B.metric.metric) |
| 84 | (hRm : ∀ (t : (G.timeIntervals.interval K).Point) (c : C), |
| 85 | (F.connection t.val).curvatureTensorNorm c = |
| 86 | horizontalCurvatureNorm G.leafwise (B.embedding.toSpacetime (t, c))) |
| 87 | (hQ : 0 < r⁻¹ ^ 2) |
| 88 | (R : OrdinaryParabolicRescaling F (r⁻¹ ^ 2) hQ (T - r ^ 2)) (c d : C) : |
| 89 | (G.slices T).metricOnPoints.edist (B.source_map c) (B.source_map d) ≤ |
| 90 | ENNReal.ofReal (r * Real.exp (n : ℝ)) * (R.flow.metric 0).edist c d := by |
| 91 | let : LocallyCompactSpace C := |
| 92 | ChartedSpace.locallyCompactSpace (EuclideanSpace ℝ (Fin n)) C |
| 93 | let : MeasurableSpace C := borel C |
| 94 | let : BorelSpace C := ⟨rfl⟩ |
| 95 | have ha : T - r ^ 2 ∈ K.domain := by |
| 96 | rw [B.interval_domain] |
| 97 | exact ⟨le_rfl, sub_le_self _ (sq_nonneg _)⟩ |
| 98 | have hdist := actualBallCylinder_terminal_edist_le hM12 B F hmetric hRm ha c d |
| 99 | have hexp : (n : ℝ) * (r⁻¹) ^ 2 * (T - (T - r ^ 2)) = n := by |
| 100 | field_simp [B.radius_pos.ne'] |
| 101 | ring |
| 102 | rw [hexp] at hdist |
| 103 | have hscale := (R.metric_calculus 0).edist_eq c d |
| 104 | change (R.flow.metric 0).edist c d = |
| 105 | ENNReal.ofReal (Real.sqrt (r⁻¹ ^ 2)) * |
| 106 | (F.metric (parabolicTimeInv (r⁻¹ ^ 2) (T - r ^ 2) 0)).edist c d at hscale |
| 107 | simp only [Real.sqrt_sq (inv_nonneg.mpr B.radius_pos.le), |
| 108 | parabolicTimeInv, zero_div, add_zero] at hscale |
| 109 | have horig : (F.metric (T - r ^ 2)).edist c d = |
| 110 | ENNReal.ofReal r * (R.flow.metric 0).edist c d := by |
| 111 | rw [hscale, ← mul_assoc, ← ENNReal.ofReal_mul B.radius_pos.le, |
| 112 | mul_inv_cancel₀ B.radius_pos.ne', ENNReal.ofReal_one, one_mul] |
| 113 | rw [horig] at hdist |
| 114 | simpa only [← mul_assoc, ← ENNReal.ofReal_mul (Real.exp_pos _).le, |
| 115 | mul_comm (Real.exp (n : ℝ)) r] using hdist |
| 116 | |
| 117 | /-- Every terminal half-ball point has a compact initial normalized ball |
| 118 | of radius exp(-n)/8. This supplies the initial-ball premise in the corrected |
| 119 | application of Claim 8.5, p. 172, without source completeness. -/ |
| 120 | theorem actualBallCylinder_normalized_initial_precompact |
| 121 | (hM12 : GeneralizedRicciGaugeTheory.{u} n) |
| 122 | (B : M15ActualBallCylinder G T x r K C) |
| 123 | (F : RicciFlow n C K.domain) (hmetric : F.metric = B.metric.metric) |
| 124 | (hRm : ∀ (t : (G.timeIntervals.interval K).Point) (c : C), |
| 125 | (F.connection t.val).curvatureTensorNorm c = |
| 126 | horizontalCurvatureNorm G.leafwise (B.embedding.toSpacetime (t, c))) |
| 127 | (hQ : 0 < r⁻¹ ^ 2) |
| 128 | (R : OrdinaryParabolicRescaling F (r⁻¹ ^ 2) hQ (T - r ^ 2)) |
| 129 | (hcompact : IsCompact (closure ((G.slices T).metricOnPoints.ball x r))) |
| 130 | {c : C} (hc : B.source_map c ∈ (G.slices T).metricOnPoints.ball x (r / 2)) : |
| 131 | IsCompact (closure ((R.flow.metric 0).ball c (Real.exp (-(n : ℝ)) / 8))) := by |
| 132 | have hr : 0 < r := B.radius_pos |
| 133 | let : LocallyCompactSpace C := |
| 134 | ChartedSpace.locallyCompactSpace (EuclideanSpace ℝ (Fin n)) C |
| 135 | let : Bundle.RiemannianBundle (TangentSpace (𝓡 n) : C → Type _) := |
| 136 | ⟨(R.flow.metric 0).toRiemannianMetric⟩ |
| 137 | let : IsContinuousRiemannianBundle (EuclideanSpace ℝ (Fin n)) |
| 138 | (TangentSpace (𝓡 n) : C → Type _) := |
| 139 | ⟨⟨(R.flow.metric 0).inner, (R.flow.metric 0).contMDiff.continuous, fun _ _ _ => rfl⟩⟩ |
| 140 | let : PseudoEMetricSpace C := .ofRiemannianMetric (𝓡 n) C |
| 141 | let : Bundle.RiemannianBundle |
| 142 | (TangentSpace (𝓡 n) : (G.slices T).Point → Type _) := |
| 143 | ⟨(G.slices T).metricOnPoints.toRiemannianMetric⟩ |
| 144 | let : IsContinuousRiemannianBundle (EuclideanSpace ℝ (Fin n)) |
| 145 | (TangentSpace (𝓡 n) : (G.slices T).Point → Type _) := |
| 146 | ⟨⟨(G.slices T).metricOnPoints.inner, |
| 147 | (G.slices T).metricOnPoints.contMDiff.continuous, fun _ _ _ => rfl⟩⟩ |
| 148 | let : PseudoEMetricSpace (G.slices T).Point := |
| 149 | .ofRiemannianMetric (𝓡 n) (G.slices T).Point |
| 150 | have hsourceball : (R.flow.metric 0).ball c (Real.exp (-(n : ℝ)) / 8) = |
| 151 | Metric.eball c (ENNReal.ofReal (Real.exp (-(n : ℝ)) / 8)) := by |
| 152 | ext z |
| 153 | change edist c z < _ ↔ edist z c < _ |
| 154 | rw [edist_comm c z] |
| 155 | have htargetball (q : ℝ) : (G.slices T).metricOnPoints.ball x q = |
| 156 | Metric.eball x (ENNReal.ofReal q) := by |
| 157 | ext z |
| 158 | change edist x z < _ ↔ edist z x < _ |
| 159 | rw [edist_comm x z] |
| 160 | rw [hsourceball] |
| 161 | let L : ℝ≥0 := ⟨r * Real.exp (n : ℝ), mul_nonneg B.radius_pos.le (Real.exp_pos _).le⟩ |
| 162 | have hL : (L : ℝ≥0∞) = ENNReal.ofReal (r * Real.exp (n : ℝ)) := |
| 163 | ENNReal.ofReal_coe_nnreal.symm |
| 164 | apply Metric.isCompact_closure_eball_of_isEmbedding B.source_map_embedding |
| 165 | (x := x) (R := ENNReal.ofReal r) |
| 166 | (r₀ := ENNReal.ofReal (r / 2)) (r₁ := ENNReal.ofReal (3 * r / 4)) |
| 167 | (L := L) |
| 168 | · simpa only [htargetball] using B.source_map_range |
| 169 | · simpa only [htargetball] using hcompact |
| 170 | · exact (show edist x (B.source_map c) < ENNReal.ofReal (r / 2) from hc).le |
| 171 | · intro z |
| 172 | rw [hL] |
| 173 | exact actualBallCylinder_normalized_terminal_edist_le hM12 B F hmetric hRm hQ R c z |
| 174 | · rw [hL, ← ENNReal.ofReal_mul (mul_nonneg B.radius_pos.le (Real.exp_pos _).le), |
| 175 | ← ENNReal.ofReal_add (by positivity) (by positivity)] |
| 176 | apply ENNReal.ofReal_le_ofReal |
| 177 | have he : Real.exp (n : ℝ) * Real.exp (-(n : ℝ)) = 1 := by |
| 178 | rw [← Real.exp_add, add_neg_cancel, Real.exp_zero] |
| 179 | calc |
| 180 | _ = r / 2 + r * (Real.exp (n : ℝ) * Real.exp (-(n : ℝ))) / 8 := by ring |
| 181 | _ = 5 * r / 8 := by rw [he]; ring |
| 182 | _ ≤ 3 * r / 4 := by linarith [B.radius_pos] |
| 183 | · exact ENNReal.ofReal_lt_ofReal_iff B.radius_pos |>.mpr (by linarith [B.radius_pos]) |
| 184 | |
| 185 | end PoincareMT.Generalized.Noncollapse |