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.Confinement.Continuation.ExponentialConfinement |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.Noncollapse.Volume.SliceVolume |
| 3 | import PoincareLib.Geometry.RicciFlow.Generalized.Noncollapse.Cylinder.CurvatureContractions |
| 4 | |
| 5 | /-! Adapted from Mapher `PoincareMT/Proofs/M15/Lemma8_3_SmallGeometry.lean` at |
| 6 | `0c5d5c4e1ecbc12703b1994e226df1b15d2e8d39`. See the source mapping in |
| 7 | `references/ricci-flow/mapher/noncollapse/import.json`. -/ |
| 8 | |
| 9 | /-! |
| 10 | # Actual stable small-vector geometry |
| 11 | |
| 12 | Morgan-Tian Lemma 8.3 and Claim 8.8, pp. 174-175. Actual exponential |
| 13 | confinement controls scalar curvature along each stable trace and places |
| 14 | its endpoint in the compact earlier-slice buffer. |
| 15 | See `references/ricci-flow/mapher/noncollapse/derivations/2026-09-21-small-part-geometry.md`. |
| 16 | -/ |
| 17 | |
| 18 | set_option autoImplicit false |
| 19 | |
| 20 | open Set MeasureTheory |
| 21 | open scoped Manifold ContDiff Bundle Topology ENNReal |
| 22 | |
| 23 | universe u |
| 24 | |
| 25 | namespace PoincareMT.Generalized.Noncollapse |
| 26 | |
| 27 | section Scalar |
| 28 | |
| 29 | variable {n : ℕ} {X : Type u} [TopologicalSpace X] {time : X → ℝ} |
| 30 | {I : SpacetimeInterval} {G : GeneralizedLGeometryTransport n X time I} |
| 31 | {T r : ℝ} {x : (G.slices T).Point} {K : SpacetimeInterval} |
| 32 | {C : Type u} [TopologicalSpace C] |
| 33 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) C] [IsManifold (𝓡 n) ∞ C] |
| 34 | [T2Space C] [SecondCountableTopology C] |
| 35 | |
| 36 | /-- Full curvature control gives the scalar bound on the actual cylinder |
| 37 | used before equation (8.2), p. 174. -/ |
| 38 | theorem actualBallCylinder_abs_scalar_le |
| 39 | (hM12 : GeneralizedRicciGaugeTheory.{u} n) |
| 40 | (B : M15ActualBallCylinder G T x r K C) |
| 41 | (t : (G.timeIntervals.interval K).Point) (c : C) : |
| 42 | |horizontalScalarCurvature G.leafwise (B.embedding.toSpacetime (t, c))| ≤ |
| 43 | (n : ℝ) ^ 2 * (r⁻¹) ^ 2 := by |
| 44 | obtain ⟨F, _, hRm, hR⟩ := actualBallCylinder_exists_flow hM12 B |
| 45 | rw [← hR t c] |
| 46 | apply (abs_scalarCurvature_le_curvatureTensorNorm (F.connection t.val) c).trans |
| 47 | rw [hRm t c] |
| 48 | exact mul_le_mul_of_nonneg_left (B.curvature_bound t c) (sq_nonneg (n : ℝ)) |
| 49 | |
| 50 | end Scalar |
| 51 | |
| 52 | /-- Small vectors in the actual stable carrier have scalar-controlled |
| 53 | traces and finite, controlled endpoint volume. Source: Lemma 8.3 and |
| 54 | Claim 8.8, pp. 174-175, with the corrected initial-vector cutoff. -/ |
| 55 | theorem exists_actualBallCylinder_small_part_geometry |
| 56 | (hM04 : RicciFlowCurvatureTheory.{u}) (n : ℕ) |
| 57 | (hM12 : GeneralizedRicciGaugeTheory.{u} n) |
| 58 | (hM13 : GeneralizedParabolicRescalingTheory.{u} n) : |
| 59 | ∃ epsilon0 : ℝ, 0 < epsilon0 ∧ epsilon0 ≤ 1 / 2 ∧ |
| 60 | ∀ (X : Type u) [TopologicalSpace X] (time : X → ℝ) |
| 61 | (I : SpacetimeInterval) (G : GeneralizedLGeometryTransport n X time I) |
| 62 | (T : ℝ) (x : (G.slices T).Point) (r : ℝ) (K : SpacetimeInterval) |
| 63 | (C : Type u) [TopologicalSpace C] |
| 64 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) C] [IsManifold (𝓡 n) ∞ C] |
| 65 | [T2Space C] [SecondCountableTopology C] |
| 66 | (_B : M15ActualBallCylinder G T x r K C), |
| 67 | IsCompact (closure ((G.slices T).metricOnPoints.ball x r)) → |
| 68 | ∀ (E : M14ExponentialFamily G T x.val) (epsilon : ℝ), |
| 69 | 0 < epsilon → epsilon ≤ epsilon0 → |
| 70 | ∀ (H : M14StableSet G T (epsilon * r ^ 2) x.val E) |
| 71 | (W : Set (G.Horizontal x.val)), |
| 72 | W ⊆ H.carrier → |
| 73 | (∀ Z, Z ∈ W → |
| 74 | Real.sqrt (G.spacetime.horizontalMetric.inner x.val Z Z) ≤ |
| 75 | 1 / (8 * Real.sqrt epsilon)) → |
| 76 | (∀ Z, Z ∈ W → ∀ s ∈ Ioo 0 (epsilon * r ^ 2), |
| 77 | -(n : ℝ) ^ 2 * (r⁻¹) ^ 2 ≤ |
| 78 | horizontalScalarCurvature G.leafwise (E.gamma Z (Real.sqrt s))) ∧ |
| 79 | calibratedMetricVolume (G.slices (T - epsilon * r ^ 2)).metricOnPoints |
| 80 | (H.endpoint_slice_map '' W) < ⊤ ∧ |
| 81 | calibratedMetricVolume (G.slices (T - epsilon * r ^ 2)).metricOnPoints |
| 82 | (H.endpoint_slice_map '' W) ≤ |
| 83 | ENNReal.ofReal (Real.exp ((n : ℝ) * epsilon)) ^ n * |
| 84 | calibratedMetricVolume (G.slices T).metricOnPoints |
| 85 | ((G.slices T).metricOnPoints.ball x r) := by |
| 86 | obtain ⟨epsilon0, hepsilon0, hepsilon0half, hconf⟩ := |
| 87 | exists_actualBallCylinder_exponential_confinement hM04 n hM12 hM13 |
| 88 | refine ⟨epsilon0, hepsilon0, hepsilon0half, ?_⟩ |
| 89 | intro X _ time I G T x r K C _ _ _ _ _ B hcompact E epsilon hepsilon hepsilon_le |
| 90 | H W hWH hsmall |
| 91 | have hr := B.radius_pos |
| 92 | have ha : 0 < Real.sqrt (epsilon * r ^ 2) := Real.sqrt_pos.mpr H.tau_pos |
| 93 | have hSr : Real.sqrt (epsilon * r ^ 2) ≤ Real.sqrt epsilon * r := by |
| 94 | rw [Real.sqrt_mul hepsilon.le, Real.sqrt_sq hr.le] |
| 95 | have hlift (Z : G.Horizontal x.val) (hZ : Z ∈ W) := |
| 96 | hconf X time I G T x r K C B hcompact E epsilon hepsilon hepsilon_le |
| 97 | (Real.sqrt (epsilon * r ^ 2)) ha Z (H.survivor Z (hWH hZ)) |
| 98 | (Real.sqrt (epsilon * r ^ 2)) ha.le le_rfl hSr (hsmall Z hZ) |
| 99 | have ht : T - epsilon * r ^ 2 ∈ K.domain := by |
| 100 | rw [B.interval_domain] |
| 101 | have he : epsilon ≤ 1 / 2 := hepsilon_le.trans hepsilon0half |
| 102 | constructor <;> nlinarith [sq_nonneg r, |
| 103 | mul_le_mul_of_nonneg_right he (sq_nonneg r), H.tau_pos] |
| 104 | let t : (G.timeIntervals.interval K).Point := ⟨T - epsilon * r ^ 2, ht⟩ |
| 105 | let V : Set C := {c | (G.slices T).metricOnPoints.edist x (B.source_map c) ≤ |
| 106 | ENNReal.ofReal (5 * r / 12)} |
| 107 | have himage : H.endpoint_slice_map '' W ⊆ |
| 108 | movingGaugeSliceMap B.embedding.toMovingSpacetimeGauge G.slices t '' V := by |
| 109 | rintro q ⟨Z, hZ, rfl⟩ |
| 110 | obtain ⟨L, _, hL⟩ := hlift Z hZ |
| 111 | have haI : Real.sqrt (epsilon * r ^ 2) ∈ Icc 0 (Real.sqrt (epsilon * r ^ 2)) := |
| 112 | ⟨ha.le, le_rfl⟩ |
| 113 | have hend := (hL _ haI).1 |
| 114 | have htime := congrArg G.spacetime.timeFunction hend |
| 115 | rw [B.embedding.time_eq, E.clock Z _ (H.survivor Z (hWH hZ)), |
| 116 | Real.sq_sqrt H.tau_pos.le] at htime |
| 117 | have hLt : (L (Real.sqrt (epsilon * r ^ 2))).1 = t := Subtype.ext htime |
| 118 | refine ⟨(L (Real.sqrt (epsilon * r ^ 2))).2, (hL _ haI).2.1, ?_⟩ |
| 119 | apply Subtype.ext |
| 120 | change B.embedding.toSpacetime (t, (L (Real.sqrt (epsilon * r ^ 2))).2) = _ |
| 121 | calc |
| 122 | _ = B.embedding.toSpacetime (L (Real.sqrt (epsilon * r ^ 2))) := |
| 123 | (congrArg (fun z => B.embedding.toSpacetime |
| 124 | (z, (L (Real.sqrt (epsilon * r ^ 2))).2)) hLt).symm |
| 125 | _ = E.gamma Z (Real.sqrt (epsilon * r ^ 2)) := hend |
| 126 | _ = (H.endpoint_slice_map Z).val := |
| 127 | ((H.endpoint_slice_map_val Z (hWH hZ)).trans (H.endpoint_map_eq Z (hWH hZ))).symm |
| 128 | obtain ⟨hbuffer, hvolume⟩ := actualBallCylinder_compact_slice_buffer hM12 B hcompact t |
| 129 | refine ⟨?_, (measure_mono himage).trans_lt |
| 130 | (calibratedMetricVolume_lt_top_of_isCompact _ hbuffer), ?_⟩ |
| 131 | · intro Z hZ s hs |
| 132 | obtain ⟨L, _, hL⟩ := hlift Z hZ |
| 133 | have hsqrt : Real.sqrt s ∈ Icc 0 (Real.sqrt (epsilon * r ^ 2)) := |
| 134 | ⟨Real.sqrt_nonneg s, Real.sqrt_le_sqrt hs.2.le⟩ |
| 135 | have hscalar := actualBallCylinder_abs_scalar_le hM12 B |
| 136 | (L (Real.sqrt s)).1 (L (Real.sqrt s)).2 |
| 137 | rw [(hL _ hsqrt).1] at hscalar |
| 138 | have h := (abs_le.mp hscalar).1 |
| 139 | linarith |
| 140 | · have hexponent : (n : ℝ) * (r⁻¹) ^ 2 * (T - t.val) = (n : ℝ) * epsilon := by |
| 141 | dsimp only [t] |
| 142 | field_simp |
| 143 | ring |
| 144 | rw [hexponent] at hvolume |
| 145 | exact (measure_mono himage).trans hvolume |
| 146 | |
| 147 | end PoincareMT.Generalized.Noncollapse |