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.CurveShortening.Comparison.Annulus |
| 2 | import PoincareLib.Geometry.CurveShortening.Ramp.Approximation.Geodesic.Equation |
| 3 | import PoincareLib.Geometry.CurveShortening.Ramp.Approximation.Profile.Base |
| 4 | import PoincareLib.Geometry.Riemannian.LoopSpace.Area.Disk.Regularity |
| 5 | import PoincareLib.Geometry.Riemannian.LoopSpace.Area.LipschitzArea |
| 6 | import PoincareLib.Geometry.CurveShortening.Comparison.AreaComparison.Projection.Integrability |
| 7 | import PoincareLib.Geometry.CurveShortening.Comparison.PolygonApproximation.Area.DensityProduct |
| 8 | |
| 9 | /-! |
| 10 | # Admissibility from a rectangle Lipschitz estimate |
| 11 | |
| 12 | This adapter packages the analytic fields of an M64 annulus. A concrete |
| 13 | geodesic strip still has to prove the global rectangle Lipschitz estimate and |
| 14 | the strict area integral; once those are available, Rademacher regularity and |
| 15 | area integrability follow from the M60 services on the open rectangle. |
| 16 | |
| 17 | Morgan--Tian context: Section 19.4, Definition 19.18 and Claims 19.19-19.22, printed pp. |
| 18 | 450-453. |
| 19 | -/ |
| 20 | |
| 21 | set_option autoImplicit false |
| 22 | |
| 23 | open Set MeasureTheory |
| 24 | open scoped Manifold ContDiff Bundle ENNReal |
| 25 | |
| 26 | universe u |
| 27 | |
| 28 | namespace PoincareMT |
| 29 | |
| 30 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] [T2Space M] |
| 31 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] |
| 32 | [IsManifold (𝓡 n) ∞ M] |
| 33 | |
| 34 | /-- The open coordinate rectangle inside the contract's closed annulus domain. Source: |
| 35 | Auxiliary step for MT Definition 19.18 and Claims 19.19/19.22, pp. 450-453; project |
| 36 | construction in `proof-work/tasks/M64/reports/2026-09-23-static-polygon.md`. -/ |
| 37 | def m64AnnulusInterior : Set LoopPlane := |
| 38 | (@WithLp.ofLp 2 (Fin 2 → ℝ)) ⁻¹' (Set.pi Set.univ |
| 39 | (fun i : Fin 2 => Set.Ioo ((0 : Fin 2 → ℝ) i) |
| 40 | (![curvePeriod, 1] i))) |
| 41 | |
| 42 | /-- The annulus rectangle interior is open in the fixed Euclidean source plane. Source: |
| 43 | Auxiliary step for MT Definition 19.18 and Claims 19.19/19.22, pp. 450-453; project |
| 44 | construction in `proof-work/tasks/M64/reports/2026-09-23-static-polygon.md`. -/ |
| 45 | theorem isOpen_m64AnnulusInterior : IsOpen m64AnnulusInterior := by |
| 46 | apply (isOpen_set_pi Set.finite_univ (fun _ _ => isOpen_Ioo)).preimage |
| 47 | exact PiLp.continuous_ofLp 2 _ |
| 48 | |
| 49 | /-- The closed rectangle and its open interior agree almost everywhere. Source: Auxiliary |
| 50 | step for MT Definition 19.18 and Claims 19.19/19.22, pp. 450-453; project construction in |
| 51 | `proof-work/tasks/M64/reports/2026-09-23-static-polygon.md`. -/ |
| 52 | theorem m64AnnulusDomain_ae_eq_interior : |
| 53 | m64AnnulusDomain =ᵐ[volume] m64AnnulusInterior := by |
| 54 | exact m64AnnulusDomain_ae_eq_boxInterior |
| 55 | |
| 56 | /-- Admit an actual periodic Lipschitz rectangle map with its prescribed traces and |
| 57 | integrable area. Source: Auxiliary step for MT Definition 19.18 and Claims 19.19/19.22, pp. |
| 58 | 450-453; project construction in |
| 59 | `proof-work/tasks/M64/reports/2026-09-23-static-polygon.md`. -/ |
| 60 | theorem m64Annulus_of_lipschitz |
| 61 | (g : RiemannianMetric n M) {c0 c1 : ℝ → M} |
| 62 | (f : LoopPlane → M) |
| 63 | (hcontinuous : ContinuousOn f m64AnnulusDomain) |
| 64 | (hperiodic : ∀ x s : ℝ, |
| 65 | f (annulusPoint (x + curvePeriod) s) = f (annulusPoint x s)) |
| 66 | (hlower : ∀ x : ℝ, f (annulusPoint x 0) = c0 x) |
| 67 | (hupper : ∀ x : ℝ, f (annulusPoint x 1) = c1 x) |
| 68 | {L : ℝ} (hL : 0 ≤ L) |
| 69 | (hLip : ∀ x y : m64AnnulusDomain, |
| 70 | g.edist (f x) (f y) ≤ |
| 71 | ENNReal.ofReal L * ENNReal.ofReal ‖(x : LoopPlane) - y‖) |
| 72 | (hfinite : volume m64AnnulusInterior ≠ (⊤ : ENNReal)) |
| 73 | {zeta : ℝ} |
| 74 | (harea : (∫ z in m64AnnulusDomain, m60AreaDensity g f z) < zeta) : |
| 75 | ∃ A : M64Annulus g c0 c1, A.map = f ∧ A.area < zeta := by |
| 76 | let S := m64AnnulusInterior |
| 77 | have hS : IsOpen S := isOpen_m64AnnulusInterior |
| 78 | have hSsub : S ⊆ m64AnnulusDomain := by |
| 79 | intro x hx |
| 80 | simp only [S, m64AnnulusInterior, Set.mem_preimage, Set.mem_pi, Set.mem_univ, |
| 81 | Set.mem_Ioo] at hx |
| 82 | change 0 ≤ x 0 ∧ x 0 ≤ curvePeriod ∧ 0 ≤ x 1 ∧ x 1 ≤ 1 |
| 83 | have h0 := hx 0 trivial |
| 84 | have h1 := hx 1 trivial |
| 85 | simpa using ⟨h0.1.le, h0.2.le, h1.1.le, h1.2.le⟩ |
| 86 | have hLipS : ∀ x ∈ S, ∀ y ∈ S, |
| 87 | g.edist (f x) (f y) ≤ ENNReal.ofReal L * ENNReal.ofReal ‖x - y‖ := by |
| 88 | intro x hx y hy |
| 89 | exact hLip ⟨x, hSsub hx⟩ ⟨y, hSsub hy⟩ |
| 90 | have hDiffS := m60_ae_mdifferentiable_of_metric_lipschitzOn g hS hL hLipS |
| 91 | have hDiff : ∀ᵐ z ∂volume, |
| 92 | z ∈ m64AnnulusDomain → MDifferentiableAt (𝓡 2) (𝓡 n) f z := by |
| 93 | filter_upwards [hDiffS, m64AnnulusDomain_ae_eq_interior] with z hz hzi |
| 94 | intro hzdom |
| 95 | exact hz (hzi.mp hzdom) |
| 96 | have hIntS := m60AreaIntegral_bound_of_metric_lipschitzOn g hS hfinite hL hLipS |
| 97 | have hInt : IntegrableOn (m60AreaDensity g f) m64AnnulusDomain volume := by |
| 98 | exact (integrableOn_congr_set_ae m64AnnulusDomain_ae_eq_interior).mpr hIntS.1 |
| 99 | let A : M64Annulus g c0 c1 := { |
| 100 | map := f |
| 101 | continuous_on_domain := hcontinuous |
| 102 | periodic := hperiodic |
| 103 | lower_boundary := hlower |
| 104 | upper_boundary := hupper |
| 105 | lipschitz_constant := L |
| 106 | lipschitz_nonnegative := hL |
| 107 | lipschitz_on_domain := hLip |
| 108 | ae_manifold_differentiable := hDiff |
| 109 | area_integrable := hInt } |
| 110 | refine ⟨A, rfl, ?_⟩ |
| 111 | exact harea |
| 112 | |
| 113 | omit [T2Space M] in |
| 114 | /-- Package C1 regularity on a strictly ordered finite strip partition. Source: Auxiliary |
| 115 | step for MT Definition 19.18 and Claims 19.19/19.22, pp. 450-453; project construction in |
| 116 | `proof-work/tasks/M64/reports/2026-09-23-static-polygon.md`. -/ |
| 117 | theorem m64PiecewiseC1Annulus_of_cuts |
| 118 | {g : RiemannianMetric n M} {c0 c1 : ℝ → M} |
| 119 | (A : M64Annulus g c0 c1) {k : ℕ} (hk : 0 < k) |
| 120 | (cut : Fin (k + 1) → ℝ) (hcut : StrictMono cut) |
| 121 | (hcut_zero : cut 0 = 0) |
| 122 | (hcut_last : cut (Fin.last k) = curvePeriod) |
| 123 | (hmdiff : ∀ j : Fin k, ContMDiffOn (𝓡 2) (𝓡 n) 1 A.map |
| 124 | {p | cut j.castSucc <= p 0 ∧ p 0 <= cut j.succ ∧ |
| 125 | 0 <= p 1 ∧ p 1 <= 1}) : |
| 126 | M64PiecewiseC1Annulus A := by |
| 127 | exact ⟨k, hk, cut, hcut, hcut_zero, hcut_last, hmdiff⟩ |
| 128 | |
| 129 | omit [T2Space M] in |
| 130 | /-- Package actual minimizing transverse sides with their literal annulus-map equality. |
| 131 | Source: Auxiliary step for MT Definition 19.18 and Claims 19.19/19.22, pp. 450-453; project |
| 132 | construction in `proof-work/tasks/M64/reports/2026-09-23-static-polygon.md`. -/ |
| 133 | theorem m64GeodesicAnnulus_of_sides |
| 134 | {g : RiemannianMetric n M} {D : LeviCivitaData g} |
| 135 | {c0 c1 : ℝ → M} (A : M64Annulus g c0 c1) |
| 136 | (side : ∀ x : ℝ, |
| 137 | M63MinimizingGeodesicSide g D 1 (c0 x) (c1 x)) |
| 138 | (hmap : ∀ x s : ℝ, |
| 139 | A.map (annulusPoint x s) = (side x).map s) : |
| 140 | M64GeodesicAnnulus D A := by |
| 141 | intro x |
| 142 | exact ⟨side x, fun s _ => hmap x s⟩ |
| 143 | |
| 144 | /-- Construct the admissible, piecewise C1 geodesic annulus from its explicit map fields. |
| 145 | Source: Auxiliary step for MT Definition 19.18 and Claims 19.19/19.22, pp. 450-453; project |
| 146 | construction in `proof-work/tasks/M64/reports/2026-09-23-static-polygon.md`. -/ |
| 147 | theorem m64AnnulusWitness_of_lipschitz |
| 148 | (g : RiemannianMetric n M) (D : LeviCivitaData g) |
| 149 | {c0 c1 : ℝ → M} (f : LoopPlane → M) |
| 150 | (hcontinuous : ContinuousOn f m64AnnulusDomain) |
| 151 | (hperiodic : ∀ x s : ℝ, |
| 152 | f (annulusPoint (x + curvePeriod) s) = f (annulusPoint x s)) |
| 153 | (hlower : ∀ x : ℝ, f (annulusPoint x 0) = c0 x) |
| 154 | (hupper : ∀ x : ℝ, f (annulusPoint x 1) = c1 x) |
| 155 | {L : ℝ} (hL : 0 ≤ L) |
| 156 | (hLip : ∀ x y : m64AnnulusDomain, |
| 157 | g.edist (f x) (f y) ≤ |
| 158 | ENNReal.ofReal L * ENNReal.ofReal ‖(x : LoopPlane) - y‖) |
| 159 | (hfinite : volume m64AnnulusInterior ≠ (⊤ : ENNReal)) |
| 160 | {zeta : ℝ} |
| 161 | (harea : (∫ z in m64AnnulusDomain, m60AreaDensity g f z) < zeta) |
| 162 | {k : ℕ} (hk : 0 < k) (cut : Fin (k + 1) → ℝ) |
| 163 | (hcut : StrictMono cut) (hcut_zero : cut 0 = 0) |
| 164 | (hcut_last : cut (Fin.last k) = curvePeriod) |
| 165 | (hmdiff : ∀ j : Fin k, ContMDiffOn (𝓡 2) (𝓡 n) 1 f |
| 166 | {p | cut j.castSucc <= p 0 ∧ p 0 <= cut j.succ ∧ |
| 167 | 0 <= p 1 ∧ p 1 <= 1}) |
| 168 | (side : ∀ x : ℝ, |
| 169 | M63MinimizingGeodesicSide g D 1 (c0 x) (c1 x)) |
| 170 | (hmap : ∀ x s : ℝ, |
| 171 | f (annulusPoint x s) = (side x).map s) : |
| 172 | ∃ A : M64Annulus g c0 c1, |
| 173 | M64PiecewiseC1Annulus A ∧ M64GeodesicAnnulus D A ∧ |
| 174 | 0 ≤ A.area ∧ A.area < zeta := by |
| 175 | obtain ⟨A, hAmap, hAarea⟩ := m64Annulus_of_lipschitz g f hcontinuous hperiodic |
| 176 | hlower hupper hL hLip hfinite harea |
| 177 | have hnonneg : 0 ≤ A.area := by |
| 178 | unfold M64Annulus.area m64AnnulusArea |
| 179 | exact integral_nonneg (fun _ => m60AreaDensity_nonneg g A.map _) |
| 180 | refine ⟨A, m64PiecewiseC1Annulus_of_cuts A hk cut hcut hcut_zero |
| 181 | hcut_last (by simpa [hAmap] using hmdiff), |
| 182 | m64GeodesicAnnulus_of_sides A side (by simpa [hAmap] using hmap), hnonneg, |
| 183 | hAarea⟩ |
| 184 | |
| 185 | omit [T2Space M] in |
| 186 | /-- Construct a minimizing-side record from the smooth interpolator and its actual geodesic |
| 187 | properties. Source: Auxiliary step for MT Definition 19.18 and Claims 19.19/19.22, pp. |
| 188 | 450-453; project construction in |
| 189 | `proof-work/tasks/M64/reports/2026-09-23-static-polygon.md`. -/ |
| 190 | theorem exists_m63MinimizingGeodesicSide_of_interpolator |
| 191 | (g : RiemannianMetric n M) (D : LeviCivitaData g) |
| 192 | {p q : M} {r : ℝ} {H : ℝ × (M × M) → M} |
| 193 | (hr : g.edist p q < ENNReal.ofReal r) |
| 194 | (hsmooth : ContMDiffOn 𝓘(ℝ, ℝ) (𝓡 n) ∞ |
| 195 | (fun t : ℝ => H (t, p, q)) (Ioo (-1 : ℝ) 2)) |
| 196 | (hprops : g.edist p q < ENNReal.ofReal r → |
| 197 | H (0, p, q) = p ∧ H (1, p, q) = q ∧ |
| 198 | g.IsGeodesicOn (fun t => H (t, p, q)) (Ioo (-1 : ℝ) 2) ∧ |
| 199 | (∀ t ∈ Ioo (-1 : ℝ) 2, |
| 200 | g.tangentNorm (H (t, p, q)) |
| 201 | (mfderiv 𝓘(ℝ, ℝ) (𝓡 n) (fun s => H (s, p, q)) t 1) = |
| 202 | (g.edist p q).toReal) ∧ |
| 203 | g.pathELength (fun t => H (t, p, q)) 0 1 = g.edist p q) : |
| 204 | Nonempty (M63MinimizingGeodesicSide g D 1 p q) := by |
| 205 | rcases hprops hr with ⟨h0, h1, hgeo, hspeed, hlength⟩ |
| 206 | refine ⟨{ |
| 207 | map := fun t => H (t, p, q) |
| 208 | domain := Ioo (-1 : ℝ) 2 |
| 209 | domain_open := isOpen_Ioo |
| 210 | interval_subset := ?_ |
| 211 | smooth := hsmooth |
| 212 | start := h0 |
| 213 | finish := h1 |
| 214 | speed := (g.edist p q).toReal |
| 215 | speed_nonnegative := ENNReal.toReal_nonneg |
| 216 | constant_speed := ?_ |
| 217 | equation := ?_ |
| 218 | minimizing := hlength }⟩ |
| 219 | · intro t ht |
| 220 | constructor <;> linarith [ht.1, ht.2] |
| 221 | · intro t ht |
| 222 | have hIoo : t ∈ Ioo (-1 : ℝ) 2 := by |
| 223 | constructor <;> linarith [ht.1, ht.2] |
| 224 | exact hspeed t hIoo |
| 225 | · intro t ht |
| 226 | exact hgeo.pullback_velocity_eq_zero D ht |
| 227 | |
| 228 | omit [T2Space M] [IsManifold (𝓡 n) ∞ M] in |
| 229 | /-- Restrict the smooth joint interpolator to a fixed pair of endpoints. Source: Auxiliary |
| 230 | step for MT Definition 19.18 and Claims 19.19/19.22, pp. 450-453; project construction in |
| 231 | `proof-work/tasks/M64/reports/2026-09-23-static-polygon.md`. -/ |
| 232 | theorem contMDiffOn_interpolator_slice |
| 233 | {U : Set (M × M)} {H : ℝ × (M × M) → M} |
| 234 | (hH : ContMDiffOn |
| 235 | ((𝓘(ℝ, ℝ)).prod ((𝓡 n).prod (𝓡 n))) (𝓡 n) ∞ H |
| 236 | (Ioo (-1 : ℝ) 2 ×ˢ U)) |
| 237 | {p q : M} (hpq : (p, q) ∈ U) : |
| 238 | ContMDiffOn 𝓘(ℝ, ℝ) (𝓡 n) ∞ |
| 239 | (fun t : ℝ => H (t, p, q)) (Ioo (-1 : ℝ) 2) := by |
| 240 | let i : ℝ → ℝ × (M × M) := fun t => (t, (p, q)) |
| 241 | have hp : ContMDiffOn 𝓘(ℝ, ℝ) (𝓡 n) ∞ |
| 242 | (fun _ : ℝ => p) (Ioo (-1 : ℝ) 2) := contMDiffOn_const |
| 243 | have hq : ContMDiffOn 𝓘(ℝ, ℝ) (𝓡 n) ∞ |
| 244 | (fun _ : ℝ => q) (Ioo (-1 : ℝ) 2) := contMDiffOn_const |
| 245 | have hi : ContMDiffOn 𝓘(ℝ, ℝ) |
| 246 | ((𝓘(ℝ, ℝ)).prod ((𝓡 n).prod (𝓡 n))) ∞ i |
| 247 | (Ioo (-1 : ℝ) 2) := by |
| 248 | exact contMDiffOn_id.prodMk (hp.prodMk hq) |
| 249 | have himage : Ioo (-1 : ℝ) 2 ⊆ i ⁻¹' (Ioo (-1 : ℝ) 2 ×ˢ U) := by |
| 250 | intro t ht |
| 251 | exact ⟨ht, hpq⟩ |
| 252 | have hc := hH.comp hi himage |
| 253 | simpa only [i, Function.comp_def] using hc |
| 254 | |
| 255 | omit [T2Space M] [IsManifold (𝓡 n) ∞ M] in |
| 256 | /-- A smooth side extension gives C1 regularity of the actual interpolator on one strip. |
| 257 | Source: Auxiliary step for MT Definition 19.18 and Claims 19.19/19.22, pp. 450-453; project |
| 258 | construction in `proof-work/tasks/M64/reports/2026-09-23-static-polygon.md`. -/ |
| 259 | theorem m64_contMDiffOn_interpolator_strip |
| 260 | {U : Set (M × M)} {V : Set ℝ} {H : ℝ × (M × M) → M} |
| 261 | {gamma side upper : ℝ → M} {left : ℝ} {S : Set LoopPlane} |
| 262 | (hH : ContMDiffOn |
| 263 | ((𝓘(ℝ, ℝ)).prod ((𝓡 n).prod (𝓡 n))) (𝓡 n) ∞ H |
| 264 | (Ioo (-1 : ℝ) 2 ×ˢ U)) |
| 265 | (hgamma : ContMDiffOn 𝓘(ℝ, ℝ) (𝓡 n) 1 gamma Set.univ) |
| 266 | (hside : ContMDiffOn 𝓘(ℝ, ℝ) (𝓡 n) ∞ side V) |
| 267 | (htime : ∀ p ∈ S, p 1 ∈ Ioo (-1 : ℝ) 2) |
| 268 | (hleft : ∀ p ∈ S, p 0 - left ∈ V) |
| 269 | (hpair : ∀ p ∈ S, (gamma (p 0), side (p 0 - left)) ∈ U) |
| 270 | (hupper : ∀ p ∈ S, upper (p 0) = side (p 0 - left)) : |
| 271 | ContMDiffOn (𝓡 2) (𝓡 n) 1 |
| 272 | (fun p : LoopPlane => H (p 1, gamma (p 0), upper (p 0))) S := by |
| 273 | let p0 : LoopPlane → ℝ := fun p => p 0 |
| 274 | let p1 : LoopPlane → ℝ := fun p => p 1 |
| 275 | have hp0 : ContMDiffOn (𝓡 2) 𝓘(ℝ, ℝ) 1 p0 Set.univ := by |
| 276 | exact (PiLp.proj (𝕜 := ℝ) 2 (fun _ : Fin 2 => ℝ) 0).contDiff |
| 277 | (n := ∞) |>.of_le (m := 1) (by norm_num) |>.contMDiff.contMDiffOn |
| 278 | have hp1 : ContMDiffOn (𝓡 2) 𝓘(ℝ, ℝ) 1 p1 Set.univ := by |
| 279 | exact (PiLp.proj (𝕜 := ℝ) 2 (fun _ : Fin 2 => ℝ) 1).contDiff |
| 280 | (n := ∞) |>.of_le (m := 1) (by norm_num) |>.contMDiff.contMDiffOn |
| 281 | have hp0top : ContMDiffOn (𝓡 2) 𝓘(ℝ, ℝ) ∞ p0 Set.univ := by |
| 282 | exact (PiLp.proj (𝕜 := ℝ) 2 (fun _ : Fin 2 => ℝ) 0).contDiff |
| 283 | (n := ∞) |>.contMDiff.contMDiffOn |
| 284 | have hp0S := hp0.mono (subset_univ S) |
| 285 | have hp1S := hp1.mono (subset_univ S) |
| 286 | have hgammaS : ContMDiffOn (𝓡 2) (𝓡 n) 1 |
| 287 | (fun p => gamma (p 0)) S := by |
| 288 | have hc := hgamma.comp hp0S (fun _ _ => mem_univ _) |
| 289 | simpa only [p0, Function.comp_def] using hc |
| 290 | let phi : LoopPlane → ℝ := fun p => p 0 - left |
| 291 | have hphi : ContMDiffOn (𝓡 2) 𝓘(ℝ, ℝ) ∞ phi Set.univ := by |
| 292 | have hc := hp0top.add (contMDiffOn_const : |
| 293 | ContMDiffOn (𝓡 2) 𝓘(ℝ, ℝ) ∞ (fun _ : LoopPlane => -left) Set.univ) |
| 294 | change ContMDiffOn (𝓡 2) 𝓘(ℝ, ℝ) ∞ |
| 295 | (fun p => p0 p + -left) Set.univ at hc |
| 296 | simpa only [phi, sub_eq_add_neg] using hc |
| 297 | have hphiS := hphi.mono (subset_univ S) |
| 298 | have hsideS : ContMDiffOn (𝓡 2) (𝓡 n) 1 |
| 299 | (fun p => side (p 0 - left)) S := by |
| 300 | have hc := hside.comp hphiS (fun p hp => hleft p hp) |
| 301 | have hc1 := hc.of_le (m := 1) (by norm_num) |
| 302 | simpa only [phi, p0, Function.comp_def] using hc1 |
| 303 | have hpairmap : ContMDiffOn (𝓡 2) ((𝓡 n).prod (𝓡 n)) 1 |
| 304 | (fun p => (gamma (p 0), side (p 0 - left))) S := |
| 305 | hgammaS.prodMk hsideS |
| 306 | have hinput : ContMDiffOn (𝓡 2) |
| 307 | ((𝓘(ℝ, ℝ)).prod ((𝓡 n).prod (𝓡 n))) 1 |
| 308 | (fun p => (p 1, (gamma (p 0), side (p 0 - left)))) S := |
| 309 | hp1S.prodMk hpairmap |
| 310 | have himage : S ⊆ (fun p : LoopPlane => |
| 311 | (p 1, (gamma (p 0), side (p 0 - left)))) ⁻¹' |
| 312 | (Ioo (-1 : ℝ) 2 ×ˢ U) := by |
| 313 | intro p hp |
| 314 | exact ⟨htime p hp, hpair p hp⟩ |
| 315 | have hH1 := hH.of_le (m := 1) (by norm_num) |
| 316 | have hc := hH1.comp hinput himage |
| 317 | have hcomp : ContMDiffOn (𝓡 2) (𝓡 n) 1 |
| 318 | (fun p : LoopPlane => H (p 1, gamma (p 0), side (p 0 - left))) S := by |
| 319 | simpa only [Function.comp_def] using hc |
| 320 | exact hcomp.congr (fun p hp => |
| 321 | congrArg (fun q => H (p 1, gamma (p 0), q)) (hupper p hp)) |
| 322 | |
| 323 | /-- The equally spaced angular cut parameters of a positive-count polygon. Source: Auxiliary |
| 324 | step for MT Definition 19.18 and Claims 19.19/19.22, pp. 450-453; project construction in |
| 325 | `proof-work/tasks/M64/reports/2026-09-23-static-polygon.md`. -/ |
| 326 | noncomputable def m64PolygonCut (N : ℕ) : Fin (N + 1) → ℝ := |
| 327 | fun j => (j.val : ℝ) * m63CellLength N |
| 328 | |
| 329 | /-- Positive cell length makes the polygon cut parameters strictly increasing. Source: |
| 330 | Auxiliary step for MT Definition 19.18 and Claims 19.19/19.22, pp. 450-453; project |
| 331 | construction in `proof-work/tasks/M64/reports/2026-09-23-static-polygon.md`. -/ |
| 332 | theorem m64PolygonCut_strictMono {N : ℕ} (hN : 0 < N) : |
| 333 | StrictMono (m64PolygonCut N) := by |
| 334 | intro i j hij |
| 335 | have hval : i.val < j.val := hij |
| 336 | have hreal : (i.val : ℝ) < (j.val : ℝ) := by exact_mod_cast hval |
| 337 | dsimp [m64PolygonCut] |
| 338 | exact mul_lt_mul_of_pos_right hreal (m63CellLength_pos hN) |
| 339 | |
| 340 | /-- The first polygon cut is zero. Source: Auxiliary step for MT Definition 19.18 and Claims |
| 341 | 19.19/19.22, pp. 450-453; project construction in |
| 342 | `proof-work/tasks/M64/reports/2026-09-23-static-polygon.md`. -/ |
| 343 | theorem m64PolygonCut_zero {N : ℕ} : m64PolygonCut N 0 = 0 := by |
| 344 | simp [m64PolygonCut] |
| 345 | |
| 346 | /-- The last polygon cut is the fixed angular period when the count is positive. Source: |
| 347 | Auxiliary step for MT Definition 19.18 and Claims 19.19/19.22, pp. 450-453; project |
| 348 | construction in `proof-work/tasks/M64/reports/2026-09-23-static-polygon.md`. -/ |
| 349 | theorem m64PolygonCut_last {N : ℕ} (hN : 0 < N) : |
| 350 | m64PolygonCut N (Fin.last N) = curvePeriod := by |
| 351 | simp only [m64PolygonCut, Fin.val_last] |
| 352 | exact m63_count_mul_cellLength hN |
| 353 | |
| 354 | /-- The closed rectangle corresponding to one angular polygon cell. Source: Auxiliary step |
| 355 | for MT Definition 19.18 and Claims 19.19/19.22, pp. 450-453; project construction in |
| 356 | `proof-work/tasks/M64/reports/2026-09-23-static-polygon.md`. -/ |
| 357 | noncomputable def m64PolygonCellSet {N : ℕ} (j : Fin N) : Set LoopPlane := |
| 358 | {p | m63CellLeft N j ≤ p 0 ∧ p 0 ≤ m63CellLeft N j + m63CellLength N ∧ |
| 359 | 0 ≤ p 1 ∧ p 1 ≤ 1} |
| 360 | |
| 361 | omit [T2Space M] in |
| 362 | /-- The actual interpolator map is C1 on each closed polygon cell. Source: Auxiliary step |
| 363 | for MT Definition 19.18 and Claims 19.19/19.22, pp. 450-453; project construction in |
| 364 | `proof-work/tasks/M64/reports/2026-09-23-static-polygon.md`. -/ |
| 365 | theorem m64_polygon_cell_contMDiffOn |
| 366 | {g : RiemannianMetric n M} {D : LeviCivitaData g} |
| 367 | {N : ℕ} (polygon : M63GeodesicPolygon g D N) |
| 368 | {gamma : ℝ → M} {U : Set (M × M)} {H : ℝ × (M × M) → M} |
| 369 | (hH : ContMDiffOn |
| 370 | ((𝓘(ℝ, ℝ)).prod ((𝓡 n).prod (𝓡 n))) (𝓡 n) ∞ H |
| 371 | (Ioo (-1 : ℝ) 2 ×ˢ U)) |
| 372 | (hgamma : ContMDiffOn 𝓘(ℝ, ℝ) (𝓡 n) 1 gamma Set.univ) |
| 373 | (hpair : ∀ j : Fin N, ∀ p ∈ m64PolygonCellSet j, |
| 374 | (gamma (p 0), (polygon.side j).map |
| 375 | (p 0 - m63CellLeft N j)) ∈ U) : |
| 376 | ∀ j : Fin N, ContMDiffOn (𝓡 2) (𝓡 n) 1 |
| 377 | (fun p : LoopPlane => H (p 1, gamma (p 0), polygon.map (p 0))) |
| 378 | (m64PolygonCellSet j) := by |
| 379 | intro j |
| 380 | let S := m64PolygonCellSet j |
| 381 | have htime : ∀ p ∈ S, p 1 ∈ Ioo (-1 : ℝ) 2 := by |
| 382 | intro p hp |
| 383 | exact ⟨by linarith [hp.2.2.1], by linarith [hp.2.2.2]⟩ |
| 384 | have hleft : ∀ p ∈ S, p 0 - m63CellLeft N j ∈ |
| 385 | (polygon.side j).domain := by |
| 386 | intro p hp |
| 387 | apply (polygon.side j).interval_subset |
| 388 | constructor <;> linarith [hp.1, hp.2.1] |
| 389 | have hpair' : ∀ p ∈ S, |
| 390 | (gamma (p 0), (polygon.side j).map |
| 391 | (p 0 - m63CellLeft N j)) ∈ U := by |
| 392 | exact hpair j |
| 393 | have hupper : ∀ p ∈ S, |
| 394 | polygon.map (p 0) = (polygon.side j).map |
| 395 | (p 0 - m63CellLeft N j) := by |
| 396 | intro p hp |
| 397 | have hs : p 0 - m63CellLeft N j ∈ |
| 398 | Icc (0 : ℝ) (m63CellLength N) := by |
| 399 | constructor <;> linarith [hp.1, hp.2.1] |
| 400 | have hc := polygon.cell_agreement j _ hs |
| 401 | convert hc using 1 |
| 402 | ring_nf |
| 403 | exact m64_contMDiffOn_interpolator_strip hH hgamma |
| 404 | (polygon.side j).smooth htime hleft hpair' hupper |
| 405 | |
| 406 | /- The cut strips used by `M64PiecewiseC1Annulus` are definitionally the |
| 407 | polygon cells. Keeping this equality explicit avoids repeating the |
| 408 | cast/ring normalization at every assembly site. -/ |
| 409 | /-- The cut-based strip partition agrees with the closed polygon cells. Source: Auxiliary |
| 410 | step for MT Definition 19.18 and Claims 19.19/19.22, pp. 450-453; project construction in |
| 411 | `proof-work/tasks/M64/reports/2026-09-23-static-polygon.md`. -/ |
| 412 | theorem m64PolygonCut_cellSet {N : ℕ} (j : Fin N) : |
| 413 | {p : LoopPlane | |
| 414 | m64PolygonCut N j.castSucc ≤ p 0 ∧ |
| 415 | p 0 ≤ m64PolygonCut N j.succ ∧ |
| 416 | 0 ≤ p 1 ∧ p 1 ≤ 1} = m64PolygonCellSet j := by |
| 417 | ext p |
| 418 | constructor |
| 419 | · intro hp |
| 420 | rcases hp with ⟨hleft, hright, h0, h1⟩ |
| 421 | dsimp [m64PolygonCut] at hleft hright |
| 422 | dsimp [m64PolygonCellSet] |
| 423 | have hright' : p 0 ≤ m63CellLeft N j + m63CellLength N := by |
| 424 | simpa only [m63CellLeft, Nat.cast_add, Nat.cast_one, add_mul, one_mul] using hright |
| 425 | exact ⟨hleft, hright', h0, h1⟩ |
| 426 | · intro hp |
| 427 | rcases hp with ⟨hleft, hright, h0, h1⟩ |
| 428 | dsimp [m64PolygonCut] |
| 429 | dsimp [m64PolygonCellSet] at hleft hright |
| 430 | have hright' : p 0 ≤ (↑(j.val + 1) : ℝ) * m63CellLength N := by |
| 431 | simpa only [m63CellLeft, Nat.cast_add, Nat.cast_one, add_mul, one_mul] using hright |
| 432 | exact ⟨hleft, hright', h0, h1⟩ |
| 433 | |
| 434 | omit [T2Space M] in |
| 435 | /-- The actual polygon interpolator supplies the contract's piecewise C1 annulus structure. |
| 436 | Source: Auxiliary step for MT Definition 19.18 and Claims 19.19/19.22, pp. 450-453; project |
| 437 | construction in `proof-work/tasks/M64/reports/2026-09-23-static-polygon.md`. -/ |
| 438 | theorem m64_polygon_piecewiseC1_of_interpolator |
| 439 | {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 440 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] |
| 441 | [IsManifold (𝓡 n) ∞ M] |
| 442 | {g : RiemannianMetric n M} {D : LeviCivitaData g} |
| 443 | {N : ℕ} (hN : 0 < N) |
| 444 | (polygon : M63GeodesicPolygon g D N) |
| 445 | {c0 c1 : ℝ → M} (A : M64Annulus g c0 c1) |
| 446 | {gamma : ℝ → M} {U : Set (M × M)} {H : ℝ × (M × M) → M} |
| 447 | (hmap : A.map = (fun p : LoopPlane => |
| 448 | H (p 1, gamma (p 0), polygon.map (p 0)))) |
| 449 | (hH : ContMDiffOn |
| 450 | ((𝓘(ℝ, ℝ)).prod ((𝓡 n).prod (𝓡 n))) (𝓡 n) ∞ H |
| 451 | (Ioo (-1 : ℝ) 2 ×ˢ U)) |
| 452 | (hgamma : ContMDiffOn 𝓘(ℝ, ℝ) (𝓡 n) 1 gamma Set.univ) |
| 453 | (hpair : ∀ j : Fin N, ∀ p ∈ m64PolygonCellSet j, |
| 454 | (gamma (p 0), (polygon.side j).map |
| 455 | (p 0 - m63CellLeft N j)) ∈ U) : |
| 456 | M64PiecewiseC1Annulus A := by |
| 457 | apply m64PiecewiseC1Annulus_of_cuts A hN (m64PolygonCut N) |
| 458 | (m64PolygonCut_strictMono hN) m64PolygonCut_zero |
| 459 | (m64PolygonCut_last hN) |
| 460 | intro j |
| 461 | rw [hmap, m64PolygonCut_cellSet] |
| 462 | exact m64_polygon_cell_contMDiffOn polygon hH hgamma hpair j |
| 463 | |
| 464 | /- A columnwise differential bound can be converted directly into the area |
| 465 | estimate needed by `m64AnnulusWitness_of_lipschitz`. -/ |
| 466 | omit [T2Space M] in |
| 467 | /-- Integrate the product bound for the two actual differential columns. Source: Auxiliary |
| 468 | step for MT Definition 19.18 and Claims 19.19/19.22, pp. 450-453; project construction in |
| 469 | `proof-work/tasks/M64/reports/2026-09-23-static-polygon.md`. -/ |
| 470 | theorem m64AnnulusIntegral_le_of_ae_column_bounds |
| 471 | {g : RiemannianMetric n M} {f : LoopPlane → M} |
| 472 | {K0 K1 : ℝ} (hK0 : 0 ≤ K0) |
| 473 | (hfinite : volume m64AnnulusDomain ≠ (⊤ : ENNReal)) |
| 474 | (hInt : IntegrableOn (m60AreaDensity g f) m64AnnulusDomain volume) |
| 475 | (hcol0 : ∀ᵐ z ∂volume.restrict m64AnnulusDomain, |
| 476 | g.tangentNorm (f z) |
| 477 | (mfderiv (𝓡 2) (𝓡 n) f z (EuclideanSpace.basisFun (Fin 2) ℝ 0)) ≤ K0) |
| 478 | (hcol1 : ∀ᵐ z ∂volume.restrict m64AnnulusDomain, |
| 479 | g.tangentNorm (f z) |
| 480 | (mfderiv (𝓡 2) (𝓡 n) f z (EuclideanSpace.basisFun (Fin 2) ℝ 1)) ≤ K1) : |
| 481 | (∫ z in m64AnnulusDomain, m60AreaDensity g f z) ≤ |
| 482 | K0 * K1 * volume.real m64AnnulusDomain := by |
| 483 | apply m64AnnulusIntegral_le_of_ae_density_bound hfinite hInt |
| 484 | filter_upwards [hcol0, hcol1] with z hz0 hz1 |
| 485 | have h1 : 0 ≤ g.tangentNorm (f z) |
| 486 | (mfderiv (𝓡 2) (𝓡 n) f z (EuclideanSpace.basisFun (Fin 2) ℝ 1)) := |
| 487 | Real.sqrt_nonneg _ |
| 488 | exact (m60AreaDensity_le_tangentNorm_product g f z).trans |
| 489 | (mul_le_mul hz0 hz1 h1 hK0) |
| 490 | |
| 491 | /-- Metric Lipschitz regularity supplies integrability before the columnwise area estimate. |
| 492 | Source: Auxiliary step for MT Definition 19.18 and Claims 19.19/19.22, pp. 450-453; project |
| 493 | construction in `proof-work/tasks/M64/reports/2026-09-23-static-polygon.md`. -/ |
| 494 | theorem m64AnnulusIntegral_le_of_lipschitzOn_and_ae_column_bounds |
| 495 | (g : RiemannianMetric n M) {f : LoopPlane → M} |
| 496 | {L K0 K1 : ℝ} (hL : 0 ≤ L) (hK0 : 0 ≤ K0) |
| 497 | (hLip : ∀ x y : m64AnnulusDomain, |
| 498 | g.edist (f x) (f y) ≤ |
| 499 | ENNReal.ofReal L * ENNReal.ofReal ‖(x : LoopPlane) - y‖) |
| 500 | (hfinite : volume m64AnnulusInterior ≠ (⊤ : ENNReal)) |
| 501 | (hcol0 : ∀ᵐ z ∂volume.restrict m64AnnulusDomain, |
| 502 | g.tangentNorm (f z) |
| 503 | (mfderiv (𝓡 2) (𝓡 n) f z (EuclideanSpace.basisFun (Fin 2) ℝ 0)) ≤ K0) |
| 504 | (hcol1 : ∀ᵐ z ∂volume.restrict m64AnnulusDomain, |
| 505 | g.tangentNorm (f z) |
| 506 | (mfderiv (𝓡 2) (𝓡 n) f z (EuclideanSpace.basisFun (Fin 2) ℝ 1)) ≤ K1) : |
| 507 | (∫ z in m64AnnulusDomain, m60AreaDensity g f z) ≤ |
| 508 | K0 * K1 * volume.real m64AnnulusDomain := by |
| 509 | let S := m64AnnulusInterior |
| 510 | have hS : IsOpen S := isOpen_m64AnnulusInterior |
| 511 | have hSsub : S ⊆ m64AnnulusDomain := by |
| 512 | intro x hx |
| 513 | simp only [S, m64AnnulusInterior, Set.mem_preimage, Set.mem_pi, |
| 514 | Set.mem_univ, Set.mem_Ioo] at hx |
| 515 | change 0 ≤ x 0 ∧ x 0 ≤ curvePeriod ∧ 0 ≤ x 1 ∧ x 1 ≤ 1 |
| 516 | have h0 := hx 0 trivial |
| 517 | have h1 := hx 1 trivial |
| 518 | simpa using ⟨h0.1.le, h0.2.le, h1.1.le, h1.2.le⟩ |
| 519 | have hLipS : ∀ x ∈ S, ∀ y ∈ S, |
| 520 | g.edist (f x) (f y) ≤ ENNReal.ofReal L * ENNReal.ofReal ‖x - y‖ := by |
| 521 | intro x hx y hy |
| 522 | exact hLip ⟨x, hSsub hx⟩ ⟨y, hSsub hy⟩ |
| 523 | have hIntS := m60AreaIntegral_bound_of_metric_lipschitzOn g hS hfinite hL hLipS |
| 524 | have hInt : IntegrableOn (m60AreaDensity g f) m64AnnulusDomain volume := by |
| 525 | exact (integrableOn_congr_set_ae m64AnnulusDomain_ae_eq_interior).mpr hIntS.1 |
| 526 | have hmeasure : volume m64AnnulusDomain = volume m64AnnulusInterior := |
| 527 | measure_congr m64AnnulusDomain_ae_eq_interior |
| 528 | refine m64AnnulusIntegral_le_of_ae_column_bounds hK0 ?_ hInt hcol0 hcol1 |
| 529 | rw [hmeasure] |
| 530 | exact hfinite |
| 531 | |
| 532 | /-- Construct a strict-area annulus using global Lipschitz regularity and independent column |
| 533 | bounds. Source: Auxiliary step for MT Definition 19.18 and Claims 19.19/19.22, pp. 450-453; |
| 534 | project construction in `proof-work/tasks/M64/reports/2026-09-23-static-polygon.md`. -/ |
| 535 | theorem m64AnnulusWitness_of_lipschitz_columns |
| 536 | (g : RiemannianMetric n M) (D : LeviCivitaData g) |
| 537 | {c0 c1 : ℝ → M} (f : LoopPlane → M) |
| 538 | (hcontinuous : ContinuousOn f m64AnnulusDomain) |
| 539 | (hperiodic : ∀ x s : ℝ, |
| 540 | f (annulusPoint (x + curvePeriod) s) = f (annulusPoint x s)) |
| 541 | (hlower : ∀ x : ℝ, f (annulusPoint x 0) = c0 x) |
| 542 | (hupper : ∀ x : ℝ, f (annulusPoint x 1) = c1 x) |
| 543 | {L K0 K1 : ℝ} (hL : 0 ≤ L) (hK0 : 0 ≤ K0) |
| 544 | (hLip : ∀ x y : m64AnnulusDomain, |
| 545 | g.edist (f x) (f y) ≤ |
| 546 | ENNReal.ofReal L * ENNReal.ofReal ‖(x : LoopPlane) - y‖) |
| 547 | (hfinite : volume m64AnnulusInterior ≠ (⊤ : ENNReal)) |
| 548 | (hcol0 : ∀ᵐ z ∂volume.restrict m64AnnulusDomain, |
| 549 | g.tangentNorm (f z) |
| 550 | (mfderiv (𝓡 2) (𝓡 n) f z (EuclideanSpace.basisFun (Fin 2) ℝ 0)) ≤ K0) |
| 551 | (hcol1 : ∀ᵐ z ∂volume.restrict m64AnnulusDomain, |
| 552 | g.tangentNorm (f z) |
| 553 | (mfderiv (𝓡 2) (𝓡 n) f z (EuclideanSpace.basisFun (Fin 2) ℝ 1)) ≤ K1) |
| 554 | {zeta : ℝ} |
| 555 | (hstrict : K0 * K1 * volume.real m64AnnulusDomain < zeta) |
| 556 | {k : ℕ} (hk : 0 < k) (cut : Fin (k + 1) → ℝ) |
| 557 | (hcut : StrictMono cut) (hcut_zero : cut 0 = 0) |
| 558 | (hcut_last : cut (Fin.last k) = curvePeriod) |
| 559 | (hmdiff : ∀ j : Fin k, ContMDiffOn (𝓡 2) (𝓡 n) 1 f |
| 560 | {p | cut j.castSucc <= p 0 ∧ p 0 <= cut j.succ ∧ |
| 561 | 0 <= p 1 ∧ p 1 <= 1}) |
| 562 | (side : ∀ x : ℝ, |
| 563 | M63MinimizingGeodesicSide g D 1 (c0 x) (c1 x)) |
| 564 | (hmap : ∀ x s : ℝ, |
| 565 | f (annulusPoint x s) = (side x).map s) : |
| 566 | ∃ A : M64Annulus g c0 c1, |
| 567 | M64PiecewiseC1Annulus A ∧ M64GeodesicAnnulus D A ∧ |
| 568 | 0 ≤ A.area ∧ A.area < zeta := by |
| 569 | have harea_le := m64AnnulusIntegral_le_of_lipschitzOn_and_ae_column_bounds |
| 570 | g hL hK0 hLip hfinite hcol0 hcol1 |
| 571 | have harea : (∫ z in m64AnnulusDomain, m60AreaDensity g f z) < zeta := |
| 572 | harea_le.trans_lt hstrict |
| 573 | exact m64AnnulusWitness_of_lipschitz g D f hcontinuous hperiodic hlower hupper |
| 574 | hL hLip hfinite harea hk cut hcut hcut_zero hcut_last hmdiff side hmap |
| 575 | |
| 576 | end PoincareMT |