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.ReducedGeometry.Exponential.Construction.SliceLift |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Theory |
| 3 | |
| 4 | /-! |
| 5 | # The actual survival slice used in Corollary 6.67 |
| 6 | |
| 7 | Morgan--Tian Lemma 6.8, p. 108, Lemma 6.18, pp. 113-114, and |
| 8 | Corollary 6.67, pp. 139-140. The Sard map is the exponential on its |
| 9 | whole survival domain. A stable endpoint map cannot substitute for it |
| 10 | outside the stable carrier. The same supplied exponential is retained |
| 11 | when a minimizing path is represented by its initial vector. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | |
| 16 | open Set Filter |
| 17 | open scoped Manifold ContDiff Bundle Topology |
| 18 | |
| 19 | universe u |
| 20 | |
| 21 | namespace PoincareMT.Proofs.M46 |
| 22 | |
| 23 | variable {n : ℕ} {X : Type u} [TopologicalSpace X] {time : X → ℝ} |
| 24 | {I : SpacetimeInterval} {G : GeneralizedLGeometryTransport n X time I} |
| 25 | {T tau : ℝ} {x y : G.Point} |
| 26 | |
| 27 | /-- Regularization of an actual minimizer retains the original path and |
| 28 | its actual half square-root initial velocity, Lemma 6.8, p. 108. -/ |
| 29 | theorem minimizing_initialValuePath (LG : GeneralizedLGeometryConclusion G) |
| 30 | (p : M14BackwardPath G T 0 tau x y) (hp : M14IsMinimizing p) : |
| 31 | ∃ Z : G.Horizontal x, ∃ Q : M14SquareRootInitialValuePath G T tau x y Z, |
| 32 | Q.path = p := by |
| 33 | obtain ⟨E0, hE0⟩ := LG.path_calculus.minimizer_euler T 0 tau x y p hp |
| 34 | obtain ⟨R, ER, hER⟩ := |
| 35 | LG.path_calculus.square_root_regularization T 0 tau x y p E0 hE0 |
| 36 | have hzero : R.curve 0 = x := by |
| 37 | have hz : (0 : ℝ) ∈ M14SqrtParameterInterval 0 tau := by |
| 38 | simp only [M14SqrtParameterInterval, Real.sqrt_zero, mem_Icc, le_refl, |
| 39 | Real.sqrt_nonneg, and_self] |
| 40 | simpa only [zero_pow (by norm_num : 2 ≠ 0), p.curve_start] using R.agrees 0 hz |
| 41 | let A : G.Horizontal x := hzero ▸ R.horizontal_velocity 0 |
| 42 | let Z : G.Horizontal x := (1 / 2 : ℝ) • A |
| 43 | refine ⟨Z, { |
| 44 | path := p |
| 45 | square_path := R |
| 46 | extension := ER |
| 47 | euler := hER |
| 48 | initial_velocity := ⟨hzero, ?_⟩ |
| 49 | }, rfl⟩ |
| 50 | change A = (2 : ℝ) • ((1 / 2 : ℝ) • A) |
| 51 | simp only [smul_smul, mul_one_div_cancel (by norm_num : (2 : ℝ) ≠ 0), one_smul] |
| 52 | |
| 53 | private theorem initialValuePath_cast_curve {b : ℝ} {Z : G.Horizontal x} |
| 54 | (h : tau = b) (Q : M14SquareRootInitialValuePath G T tau x y Z) : |
| 55 | (h ▸ Q : M14SquareRootInitialValuePath G T b x y Z).path.curve = Q.path.curve := by |
| 56 | cases h |
| 57 | rfl |
| 58 | |
| 59 | /-- An actual initial-value path belongs to the one selected exponential, |
| 60 | including its entire closed trace, Lemma 6.18, p. 114. -/ |
| 61 | theorem initialValue_exponential_branch |
| 62 | (E : M14ExponentialFamily G T x) |
| 63 | {Z : G.Horizontal x} (Q : M14SquareRootInitialValuePath G T tau x y Z) : |
| 64 | (Z, Real.sqrt tau) ∈ E.domain ∧ |
| 65 | EqOn Q.path.curve (fun s => E.gamma Z (Real.sqrt s)) (Icc 0 tau) ∧ |
| 66 | E.gamma Z (Real.sqrt tau) = y := by |
| 67 | let Q' : M14SquareRootInitialValuePath G T ((Real.sqrt tau) ^ 2) x y Z := |
| 68 | (Real.sq_sqrt Q.path.tau_lt.le).symm ▸ Q |
| 69 | have hQcurve : Q'.path.curve = Q.path.curve := |
| 70 | initialValuePath_cast_curve (Real.sq_sqrt Q.path.tau_lt.le).symm Q |
| 71 | have hsurvive : (Z, Real.sqrt tau) ∈ E.domain := |
| 72 | (E.positive_survival_iff Z (Real.sqrt tau) (Real.sqrt_pos.mpr Q.path.tau_lt)).mpr |
| 73 | ⟨y, ⟨Q'⟩⟩ |
| 74 | have htrace : EqOn Q.path.curve (fun s => E.gamma Z (Real.sqrt s)) (Icc 0 tau) := by |
| 75 | simpa only [hQcurve, Real.sq_sqrt Q.path.tau_lt.le] using |
| 76 | E.initial_value_agreement Z (Real.sqrt tau) (Real.sqrt_pos.mpr Q.path.tau_lt) y Q' |
| 77 | exact ⟨hsurvive, htrace, |
| 78 | (htrace ⟨Q.path.tau_lt.le, le_rfl⟩).symm.trans Q.path.curve_end⟩ |
| 79 | |
| 80 | /-- An actual minimizer is a surviving branch of the one selected |
| 81 | exponential, including its entire closed trace, Lemma 6.18, p. 114. -/ |
| 82 | theorem minimizing_exponential_branch (LG : GeneralizedLGeometryConclusion G) |
| 83 | (E : M14ExponentialFamily G T x) |
| 84 | (p : M14BackwardPath G T 0 tau x y) (hp : M14IsMinimizing p) : |
| 85 | ∃ Z : G.Horizontal x, (Z, Real.sqrt tau) ∈ E.domain ∧ |
| 86 | EqOn p.curve (fun s => E.gamma Z (Real.sqrt s)) (Icc 0 tau) ∧ |
| 87 | E.gamma Z (Real.sqrt tau) = y := by |
| 88 | obtain ⟨Z, Q, hQ⟩ := minimizing_initialValuePath LG p hp |
| 89 | obtain ⟨hsurvive, htrace, hend⟩ := initialValue_exponential_branch E Q |
| 90 | rw [hQ] at htrace |
| 91 | exact ⟨Z, hsurvive, htrace, hend⟩ |
| 92 | |
| 93 | /-- Relative survival openness gives ordinary openness at a fixed |
| 94 | admissible square time, Lemma 6.18, pp. 113-114. -/ |
| 95 | theorem survival_domain_open (E : M14ExponentialFamily G T x) (s : ℝ) : |
| 96 | IsOpen {Z | (Z, s) ∈ E.domain} := by |
| 97 | rw [isOpen_iff_mem_nhds] |
| 98 | intro Z hZ |
| 99 | obtain ⟨U, hU, hZU, hsub⟩ := E.domain_relative_open (Z, s) hZ |
| 100 | have hcont : Continuous (fun W : G.Horizontal x => (W, s)) := |
| 101 | continuous_id.prodMk continuous_const |
| 102 | apply mem_of_superset ((hU.preimage hcont).mem_nhds hZU) |
| 103 | intro W hW |
| 104 | exact hsub ⟨hW, (E.domain_admissible hZ).1, (E.domain_admissible hZ).2⟩ |
| 105 | |
| 106 | /-- The Sard map into the actual fixed-time slice, totalized only away |
| 107 | from survival, Corollary 6.67, pp. 139-140. -/ |
| 108 | noncomputable def survivalSliceMap (E : M14ExponentialFamily G T x) |
| 109 | (tau : ℝ) (htau : 0 ≤ tau) (q0 : (G.slices (T - tau)).Point) |
| 110 | (Z : G.Horizontal x) : (G.slices (T - tau)).Point := by |
| 111 | classical |
| 112 | exact if hZ : (Z, Real.sqrt tau) ∈ E.domain then |
| 113 | ⟨E.gamma Z (Real.sqrt tau), by simpa only [Real.sq_sqrt htau] using E.clock Z _ hZ⟩ |
| 114 | else q0 |
| 115 | |
| 116 | /-- At a surviving vector the map has the actual exponential value, |
| 117 | Corollary 6.67, pp. 139-140. -/ |
| 118 | theorem survivalSliceMap_val (E : M14ExponentialFamily G T x) |
| 119 | (htau : 0 ≤ tau) (q0 : (G.slices (T - tau)).Point) |
| 120 | {Z : G.Horizontal x} (hZ : (Z, Real.sqrt tau) ∈ E.domain) : |
| 121 | (survivalSliceMap E tau htau q0 Z).val = E.gamma Z (Real.sqrt tau) := by |
| 122 | simp only [survivalSliceMap, dif_pos hZ] |
| 123 | |
| 124 | /-- The actual survival-slice map is smooth at every surviving vector, |
| 125 | without a stable-vector premise, Lemma 6.18 and Corollary 6.67. -/ |
| 126 | theorem survivalSliceMap_smooth (E : M14ExponentialFamily G T x) |
| 127 | (htau : 0 ≤ tau) (q0 : (G.slices (T - tau)).Point) |
| 128 | {Z : G.Horizontal x} (hZ : (Z, Real.sqrt tau) ∈ E.domain) : |
| 129 | letI : Bundle.RiemannianBundle (G.Horizontal : G.Point → Type _) := |
| 130 | ⟨G.spacetime.horizontalMetric.toRiemannianMetric⟩ |
| 131 | ContMDiffAt (𝓘(ℝ, G.Horizontal x)) (𝓡 n) ∞ |
| 132 | (survivalSliceMap E tau htau q0) Z := by |
| 133 | let : Bundle.RiemannianBundle (G.Horizontal : G.Point → Type _) := |
| 134 | ⟨G.spacetime.horizontalMetric.toRiemannianMetric⟩ |
| 135 | have hgamma : ContMDiffOn (𝓘(ℝ, G.Horizontal x)) (spacetimeModel n) ∞ |
| 136 | (fun W => E.gamma W (Real.sqrt tau)) {W | (W, Real.sqrt tau) ∈ E.domain} := |
| 137 | E.family_smooth.comp |
| 138 | (contMDiff_id.prodMk (contMDiff_const (c := Real.sqrt tau))).contMDiffOn |
| 139 | (fun _ hW => hW) |
| 140 | apply M14.contMDiffAt_slice_of_inclusion |
| 141 | apply ((hgamma Z hZ).contMDiffAt ((survival_domain_open E _).mem_nhds hZ)).congr_of_eventuallyEq |
| 142 | filter_upwards [(survival_domain_open E (Real.sqrt tau)).mem_nhds hZ] with W hW |
| 143 | exact survivalSliceMap_val E htau q0 hW |
| 144 | |
| 145 | /-- The actual Sard-map differential is the horizontal exponential |
| 146 | differential on survival, Proposition 6.28 and Corollary 6.67. -/ |
| 147 | theorem survivalSliceMap_differential (E : M14ExponentialFamily G T x) |
| 148 | (htau : 0 ≤ tau) (q0 : (G.slices (T - tau)).Point) |
| 149 | {Z : G.Horizontal x} (hZ : (Z, Real.sqrt tau) ∈ E.domain) (W : G.Horizontal x) : |
| 150 | letI : Bundle.RiemannianBundle (G.Horizontal : G.Point → Type _) := |
| 151 | ⟨G.spacetime.horizontalMetric.toRiemannianMetric⟩ |
| 152 | ((G.slices (T - tau)).tangentEquiv (survivalSliceMap E tau htau q0 Z) |
| 153 | (mfderiv (𝓘(ℝ, G.Horizontal x)) (𝓡 n) |
| 154 | (survivalSliceMap E tau htau q0) Z W)).val = |
| 155 | (E.differential Z (Real.sqrt tau) hZ W).val := by |
| 156 | let : Bundle.RiemannianBundle (G.Horizontal : G.Point → Type _) := |
| 157 | ⟨G.spacetime.horizontalMetric.toRiemannianMetric⟩ |
| 158 | let f := survivalSliceMap E tau htau q0 |
| 159 | have hf := (survivalSliceMap_smooth E htau q0 hZ).mdifferentiableAt (by simp) |
| 160 | have hi := (G.slices (T - tau)).inclusion_smooth.mdifferentiableAt |
| 161 | (x := f Z) (by simp) |
| 162 | have hchain := mfderiv_comp_apply Z hi hf W |
| 163 | have heq : ((Subtype.val : (G.slices (T - tau)).Point → G.Point) ∘ f) =ᶠ[𝓝 Z] |
| 164 | (fun A => E.gamma A (Real.sqrt tau)) := by |
| 165 | filter_upwards [(survival_domain_open E (Real.sqrt tau)).mem_nhds hZ] with A hA |
| 166 | exact survivalSliceMap_val E htau q0 hA |
| 167 | have hd := congrArg (fun L : G.Horizontal x →L[ℝ] SpacetimeModelVector n => L W) |
| 168 | (heq.mfderiv_eq (I := 𝓘(ℝ, G.Horizontal x)) (I' := spacetimeModel n)) |
| 169 | rw [(G.slices (T - tau)).tangentEquiv_eq] |
| 170 | exact hchain.symm.trans |
| 171 | (hd.trans (E.differential_pointwise_mfderiv Z (Real.sqrt tau) hZ W).symm) |
| 172 | |
| 173 | private theorem bijective_iff_of_horizontal_val_eq {a b : G.Point} (h : a = b) |
| 174 | (A : G.Horizontal x →L[ℝ] G.Horizontal a) |
| 175 | (B : G.Horizontal x →L[ℝ] G.Horizontal b) |
| 176 | (hval : ∀ W, (A W).val = (B W).val) : Function.Bijective A ↔ Function.Bijective B := by |
| 177 | cases h |
| 178 | have heq : A = B := ContinuousLinearMap.ext (fun W => Subtype.ext (hval W)) |
| 179 | rw [heq] |
| 180 | |
| 181 | /-- Criticality of the genuine slice map is exactly criticality of the |
| 182 | frozen horizontal exponential differential, Corollary 6.67, p. 140. -/ |
| 183 | theorem survivalSliceMap_differential_bijective_iff |
| 184 | (E : M14ExponentialFamily G T x) (htau : 0 ≤ tau) |
| 185 | (q0 : (G.slices (T - tau)).Point) |
| 186 | {Z : G.Horizontal x} (hZ : (Z, Real.sqrt tau) ∈ E.domain) : |
| 187 | letI : Bundle.RiemannianBundle (G.Horizontal : G.Point → Type _) := |
| 188 | ⟨G.spacetime.horizontalMetric.toRiemannianMetric⟩ |
| 189 | Function.Bijective (mfderiv (𝓘(ℝ, G.Horizontal x)) (𝓡 n) |
| 190 | (survivalSliceMap E tau htau q0) Z) ↔ |
| 191 | Function.Bijective (E.differential Z (Real.sqrt tau) hZ) := by |
| 192 | let : Bundle.RiemannianBundle (G.Horizontal : G.Point → Type _) := |
| 193 | ⟨G.spacetime.horizontalMetric.toRiemannianMetric⟩ |
| 194 | let f := survivalSliceMap E tau htau q0 |
| 195 | let A : G.Horizontal x →L[ℝ] EuclideanSpace ℝ (Fin n) := |
| 196 | mfderiv (𝓘(ℝ, G.Horizontal x)) (𝓡 n) f Z |
| 197 | let L := (G.slices (T - tau)).tangentEquiv (f Z) |
| 198 | have hcomp := bijective_iff_of_horizontal_val_eq (survivalSliceMap_val E htau q0 hZ) |
| 199 | (L.toContinuousLinearMap.comp A) (E.differential Z (Real.sqrt tau) hZ) |
| 200 | (fun W => survivalSliceMap_differential E htau q0 hZ W) |
| 201 | exact (Function.Bijective.of_comp_iff' L.bijective A).symm.trans hcomp |
| 202 | |
| 203 | end PoincareMT.Proofs.M46 |