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.Riemannian.Comparison.Injectivity.Uniform |
| 2 | import PoincareLib.Geometry.RicciFlow.Compactness.Volume |
| 3 | |
| 4 | /-! |
| 5 | # Uniform exponential charts from a controlled base ball |
| 6 | |
| 7 | The M07 noncollapsing hypothesis is stated at the distinguished basepoint. |
| 8 | This bridge transports that lower bound to a chart centre lying in a larger |
| 9 | controlled ball, then applies the uniform precompact exponential theorem. |
| 10 | It is the local chart input needed before assembling a countable source-chart |
| 11 | family for the pointed limit. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | |
| 16 | open Set MeasureTheory |
| 17 | open scoped Manifold ContDiff Bundle ENNReal Topology |
| 18 | |
| 19 | namespace PoincareMT.RiemannianMetric |
| 20 | |
| 21 | variable {n : ℕ} {M : Type*} [TopologicalSpace M] |
| 22 | [MeasurableSpace M] [BorelSpace M] [T3Space M] [SecondCountableTopology M] |
| 23 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 24 | |
| 25 | /-- A volume lower bound at a basepoint gives the uniform exponential chart |
| 26 | at every centre in a controlled larger ball. The radius depends only on the |
| 27 | displayed dimension, curvature, radii and volume bound. |
| 28 | -/ |
| 29 | theorem exists_uniform_precompact_exponential_diffeomorph_of_center |
| 30 | (g : RiemannianMetric n M) (D : LeviCivitaData g) (p₀ p : M) |
| 31 | {A R r K v : ℝ} (hn : 1 ≤ n) (hK : 0 ≤ K) |
| 32 | (hA : 0 < A) (hr : 0 < r) (hv : 0 < v) |
| 33 | (hAR : A ≤ R) (hAr : A + r ≤ R) |
| 34 | (hp : p ∈ g.ball p₀ A) |
| 35 | (hcompact : IsCompact (closure (g.ball p₀ (5 * R)))) |
| 36 | (hcurv : ∀ x ∈ g.ball p₀ (5 * R), D.curvatureTensorNorm x ≤ K) |
| 37 | (hvol : ENNReal.ofReal v ≤ g.volumeMeasure (g.ball p₀ r)) : |
| 38 | let ρ := localInjectivityRadius n K R v |
| 39 | 0 < ρ ∧ ρ < R ∧ |
| 40 | ∃ L : EuclideanSpace ℝ (Fin n) ≃L[ℝ] EuclideanSpace ℝ (Fin n), |
| 41 | ∃ Φ : PartialDiffeomorph (𝓡 n) (𝓡 n) |
| 42 | (EuclideanSpace ℝ (Fin n)) M ∞, |
| 43 | Φ.source = Metric.ball 0 ρ ∧ Φ.target = g.ball p ρ ∧ Φ 0 = p ∧ |
| 44 | (∀ a b, g.pullbackCoefficients (extChartAt (𝓡 n) p).symm |
| 45 | (extChartAt (𝓡 n) p p) (L a) (L b) = inner ℝ a b) ∧ |
| 46 | HasFDerivAt (fun w => extChartAt (𝓡 n) p (Φ w)) |
| 47 | L.toContinuousLinearMap 0 ∧ |
| 48 | (∀ w ∈ Metric.ball 0 R, |
| 49 | g.IsGeodesicOn (fun t => Φ (t • w)) |
| 50 | {t : ℝ | t • w ∈ Metric.ball 0 R}) ∧ |
| 51 | ∀ w ∈ Metric.ball 0 ρ, |
| 52 | g.edist p (Φ w) = ENNReal.ofReal ‖w‖ := by |
| 53 | let : Bundle.RiemannianBundle (TangentSpace (𝓡 n) : M → Type _) := |
| 54 | ⟨g.toRiemannianMetric⟩ |
| 55 | dsimp only |
| 56 | have hRpos : 0 < R := lt_of_lt_of_le hA hAR |
| 57 | have hbase : g.ball p₀ r ⊆ g.ball p R := by |
| 58 | intro x hx |
| 59 | change g.edist p x < ENNReal.ofReal R |
| 60 | have htriangle := Manifold.riemannianEDist_triangle |
| 61 | (I := 𝓡 n) (x := p) (y := p₀) (z := x) |
| 62 | have hp0p : g.edist p₀ p < ENNReal.ofReal A := by |
| 63 | change g.edist p₀ p < ENNReal.ofReal A at hp |
| 64 | exact hp |
| 65 | have hpp0 : g.edist p p₀ < ENNReal.ofReal A := by |
| 66 | simpa only [edist, Manifold.riemannianEDist_comm] using hp0p |
| 67 | have hsum' : ENNReal.ofReal A + ENNReal.ofReal r ≤ ENNReal.ofReal R := by |
| 68 | rw [← ENNReal.ofReal_add hA.le hr.le] |
| 69 | exact ENNReal.ofReal_le_ofReal hAr |
| 70 | exact (htriangle.trans_lt (by simpa only [edist, |
| 71 | Manifold.riemannianEDist_comm] using |
| 72 | (ENNReal.add_lt_add hpp0 hx))).trans_le hsum' |
| 73 | have hvolp : ENNReal.ofReal v ≤ g.volumeMeasure (g.ball p R) := |
| 74 | hvol.trans (measure_mono hbase) |
| 75 | have hlarge : g.ball p (2 * R) ⊆ g.ball p₀ (5 * R) := by |
| 76 | intro x hx |
| 77 | change g.edist p₀ x < ENNReal.ofReal (5 * R) |
| 78 | have htriangle := Manifold.riemannianEDist_triangle |
| 79 | (I := 𝓡 n) (x := p₀) (y := p) (z := x) |
| 80 | have hsum : g.edist p₀ p + g.edist p x < |
| 81 | ENNReal.ofReal A + ENNReal.ofReal (2 * R) := by |
| 82 | have hp0p : g.edist p₀ p < ENNReal.ofReal A := by |
| 83 | change g.edist p₀ p < ENNReal.ofReal A at hp |
| 84 | exact hp |
| 85 | exact ENNReal.add_lt_add hp0p hx |
| 86 | have hsum' : ENNReal.ofReal A + ENNReal.ofReal (2 * R) ≤ |
| 87 | ENNReal.ofReal (5 * R) := by |
| 88 | rw [← ENNReal.ofReal_add hA.le (mul_nonneg (by norm_num) hRpos.le)] |
| 89 | apply ENNReal.ofReal_le_ofReal |
| 90 | nlinarith |
| 91 | exact (htriangle.trans_lt hsum).trans_le hsum' |
| 92 | have hcompactp : IsCompact (closure (g.ball p (2 * R))) := |
| 93 | hcompact.of_isClosed_subset isClosed_closure (closure_mono hlarge) |
| 94 | have hcurvp : ∀ x ∈ g.ball p (2 * R), D.curvatureTensorNorm x ≤ K := by |
| 95 | intro x hx |
| 96 | exact hcurv x (hlarge hx) |
| 97 | exact g.exists_uniform_precompact_exponential_diffeomorph D p hn hK |
| 98 | hRpos hv hcompactp hcurvp hvolp |
| 99 | |
| 100 | end PoincareMT.RiemannianMetric |
| 101 | |
| 102 | namespace PoincareMT.PointedRicciFlowCompactnessHypotheses |
| 103 | |
| 104 | open Filter |
| 105 | |
| 106 | /-- The frozen noncollapse and two-time curvature bounds produce uniform |
| 107 | injective exponential charts at every centre in a controlled source ball. |
| 108 | The threshold is allowed to grow with the chart stage; this is the form used |
| 109 | by the later diagonal chart-family construction. -/ |
| 110 | theorem eventually_uniform_exponential_diffeomorph_on_controlled_centres |
| 111 | {n : ℕ} {T' T : ℝ} |
| 112 | (H : PointedRicciFlowCompactnessHypotheses n T' T) |
| 113 | (hn : 1 ≤ n) {A : ℝ} (hA : 0 < A) : |
| 114 | ∃ ρ : ℝ, 0 < ρ ∧ ∀ᶠ k in atTop, |
| 115 | let C := H.sequence.carrier k |
| 116 | let F := H.sequence.flow k |
| 117 | letI : TopologicalSpace C.carrier := C.topologicalSpace |
| 118 | letI : ChartedSpace (EuclideanSpace ℝ (Fin n)) C.carrier := C.chartedSpace |
| 119 | letI : IsManifold (𝓡 n) ∞ C.carrier := C.isManifold |
| 120 | ∀ p ∈ F.zeroBall A, |
| 121 | ∃ L : EuclideanSpace ℝ (Fin n) ≃L[ℝ] EuclideanSpace ℝ (Fin n), |
| 122 | ∃ Φ : PartialDiffeomorph (𝓡 n) (𝓡 n) |
| 123 | (EuclideanSpace ℝ (Fin n)) C.carrier ∞, |
| 124 | Φ.source = Metric.ball 0 ρ ∧ Φ.target = (F.metricAt 0).ball p ρ ∧ |
| 125 | Φ 0 = p ∧ |
| 126 | (∀ a b, (F.metricAt 0).pullbackCoefficients |
| 127 | (extChartAt (𝓡 n) p).symm (extChartAt (𝓡 n) p p) |
| 128 | (L a) (L b) = inner ℝ a b) ∧ |
| 129 | HasFDerivAt (fun w => extChartAt (𝓡 n) p (Φ w)) |
| 130 | L.toContinuousLinearMap 0 ∧ |
| 131 | (∀ w ∈ Metric.ball 0 ρ, |
| 132 | (F.metricAt 0).IsGeodesicOn (fun t => Φ (t • w)) |
| 133 | {t : ℝ | t • w ∈ Metric.ball 0 ρ}) ∧ |
| 134 | ∀ w ∈ Metric.ball 0 ρ, |
| 135 | (F.metricAt 0).edist p (Φ w) = ENNReal.ofReal ‖w‖ := by |
| 136 | obtain ⟨r₀, κ, hr₀, hκ, hvol⟩ := H.normalized_noncollapsing |
| 137 | let R : ℝ := A + r₀ + 1 |
| 138 | have hR : 0 < R := by dsimp [R]; positivity |
| 139 | obtain ⟨K, hK, hcurv⟩ := H.all_time_curvature_control_on_zero_ball (5 * R) (by positivity) |
| 140 | let ρ := RiemannianMetric.localInjectivityRadius n K R (κ * r₀ ^ n) |
| 141 | have hρR : ρ < R := RiemannianMetric.localInjectivityRadius_lt n K hR _ |
| 142 | refine ⟨ρ, RiemannianMetric.localInjectivityRadius_pos n K hR _, ?_⟩ |
| 143 | filter_upwards [hvol, hcurv, H.zero_time_ball_compact (5 * R) (by positivity)] |
| 144 | with k hkvol hkcurv hkcompact |
| 145 | let C := H.sequence.carrier k |
| 146 | let F := H.sequence.flow k |
| 147 | let : TopologicalSpace C.carrier := C.topologicalSpace |
| 148 | let : MeasurableSpace C.carrier := C.measurableSpace |
| 149 | let : BorelSpace C.carrier := C.borelSpace |
| 150 | let : T3Space C.carrier := C.t3Space |
| 151 | let : SecondCountableTopology C.carrier := C.secondCountable |
| 152 | let : ChartedSpace (EuclideanSpace ℝ (Fin n)) C.carrier := C.chartedSpace |
| 153 | let : IsManifold (𝓡 n) ∞ C.carrier := C.isManifold |
| 154 | dsimp only |
| 155 | intro p hp |
| 156 | obtain ⟨_, _, L, Φ, hsource, htarget, hΦ0, hL, hderivΦ, hgeo, hdist⟩ := |
| 157 | RiemannianMetric.exists_uniform_precompact_exponential_diffeomorph_of_center |
| 158 | (F.metricAt 0) (F.flow.connection 0) F.base p (K := K) |
| 159 | (v := κ * r₀ ^ n) (A := A) (R := R) (r := r₀) hn hK hA hr₀ |
| 160 | (by positivity) (by dsimp [R]; linarith) (by dsimp [R]; linarith) hp |
| 161 | hkcompact (hkcurv 0 H.time_bounds) hkvol |
| 162 | refine ⟨L, Φ, hsource, htarget, hΦ0, hL, hderivΦ, ?_, hdist⟩ |
| 163 | intro w hw t ht |
| 164 | exact hgeo w (Metric.ball_subset_ball hρR.le hw) t |
| 165 | (Metric.ball_subset_ball hρR.le ht) |
| 166 | |
| 167 | end PoincareMT.PointedRicciFlowCompactnessHypotheses |