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.Ramp.LocalFlow.C2.TraceInitialCurvatureLimit |
| 2 | import PoincareLib.Geometry.CurveShortening.Ramp.LocalFlow.Spectral.ApproximationJets |
| 3 | import PoincareLib.Geometry.CurveShortening.Ramp.LocalFlow.C2.TraceClosedLimit |
| 4 | import PoincareLib.Geometry.CurveShortening.Ramp.LocalFlow.C2.TraceCurvatureTime |
| 5 | import PoincareLib.Geometry.CurveShortening.Ramp.LocalEstimates.Second.JetBound |
| 6 | import PoincareLib.Geometry.CurveShortening.Ramp.Analysis.Periodic.L2RelabelingLimit |
| 7 | |
| 8 | /-! |
| 9 | # Actual closed normal-curvature limit from spectral approximants |
| 10 | |
| 11 | Initial three-jet convergence, actual spectral second derivatives, |
| 12 | positive changing labels and proved geometric jet bounds supply the |
| 13 | closed curvature limit. MT2007 Claim 19.1, p. 437; Lemma 19.6, |
| 14 | pp. 441-442; `2026-09-22-c2-normal-curvature-limit-assembly.md`, statement 2. |
| 15 | -/ |
| 16 | |
| 17 | set_option autoImplicit false |
| 18 | set_option backward.isDefEq.respectTransparency false |
| 19 | |
| 20 | open Set Filter MeasureTheory AddCircle |
| 21 | open scoped Manifold ContDiff Bundle Topology NNReal |
| 22 | |
| 23 | universe u v |
| 24 | |
| 25 | namespace PoincareMT.M63 |
| 26 | |
| 27 | open M62 SpectralHeatNative |
| 28 | |
| 29 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 30 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 31 | {ι : Type v} [Fintype ι] {a b L S R m0 V0 : ℝ} [Fact (0 < L)] |
| 32 | |
| 33 | local notation "W" => EuclideanSpace ℝ ι |
| 34 | local notation "StateV" => State ((ℤ × Fin 2) × ι) |
| 35 | local notation "Y" => C(AddCircle curvePeriod, W) |
| 36 | |
| 37 | /-- Actual spectral normal approximants have one closed uniform curvature |
| 38 | limit, with the actual initial curvature trace. All positive-time L2 and |
| 39 | time-compactness inputs are produced in the proof. MT2007 Claim 19.1, |
| 40 | p. 437; normal curvature assembly, statement 2. -/ |
| 41 | theorem exists_closed_normalCurvature_limit_of_spectral_family |
| 42 | [T2Space M] |
| 43 | (F : RicciFlow n M (Icc a b)) (hcompact : IsCompact (univ : Set M)) |
| 44 | (hS : 0 < S) (hSone : S ≤ 1) (hSb : a + S < b) |
| 45 | (hR : 0 ≤ R) (hm0 : 0 < m0) (hmV : m0 ≤ V0) |
| 46 | {e : M → W} (he : ContMDiff (𝓡 n) 𝓘(ℝ, W) ∞ e) |
| 47 | {U : Set W} (hU : IsOpen U) (heU : range e ⊆ U) {ρ : W → M} |
| 48 | (hρ : ContMDiffOn 𝓘(ℝ, W) (𝓡 n) ∞ ρ U) (hρe : ∀ p, ρ (e p) = p) |
| 49 | (Vn : ℕ → C(Icc (0 : ℝ) S, StateV)) (V : C(Icc (0 : ℝ) S, StateV)) |
| 50 | (D : ℕ → C(Icc (0 : ℝ) S, C(AddCircle L, ℝ))) |
| 51 | (d : C(Icc (0 : ℝ) S, C(AddCircle L, ℝ))) |
| 52 | (psi : ℕ → ℝ → ℝ → ℝ) (c : ℕ → ℝ → ℝ → M) (v0 : ℕ → ℝ) |
| 53 | (hV : Tendsto Vn atTop (𝓝 V)) (hD : Tendsto D atTop (𝓝 d)) |
| 54 | (hphase : ∀ j (t : Icc (0 : ℝ) S), DifferentiableAt ℝ |
| 55 | (fun r : ℝ => vectorPeriodicSpectralTranslation (L := L) r (Vn j t)) 0) : |
| 56 | let _ : Fact (0 < curvePeriod) := ⟨by unfold curvePeriod; positivity⟩ |
| 57 | let E := (PiLp.continuousLinearEquiv 2 ℝ (fun _ : ι => ℝ)).symm |
| 58 | let D0 := (E.toContinuousLinearMap.compLeftContinuous ℝ (AddCircle L)).comp |
| 59 | (vectorPeriodicJet (L := L) 1 0 (by omega)) |
| 60 | let D1 := (E.toContinuousLinearMap.compLeftContinuous ℝ (AddCircle L)).comp |
| 61 | (vectorPeriodicJet (L := L) 1 1 (by omega)) |
| 62 | let qn := fun j (t : Icc (0 : ℝ) S) (x : ℝ) => D0 (Vn j t) (x : AddCircle L) |
| 63 | let pn := fun j (t : Icc (0 : ℝ) S) (x : ℝ) => D1 (Vn j t) (x : AddCircle L) |
| 64 | let q := fun (t : Icc (0 : ℝ) S) (x : ℝ) => D0 (V t) (x : AddCircle L) |
| 65 | let p := fun (t : Icc (0 : ℝ) S) (x : ℝ) => D1 (V t) (x : AddCircle L) |
| 66 | let t0 : Icc (0 : ℝ) S := ⟨0, le_rfl, hS.le⟩ |
| 67 | let f := q t0 |
| 68 | (∀ j t x, qn j t x ∈ U ∧ |
| 69 | mfderiv 𝓘(ℝ, W) (𝓡 n) ρ (qn j t x) (pn j t x) ≠ 0) → |
| 70 | (∀ j t x, qn j t x = e (ρ (qn j t x))) → |
| 71 | (∀ t x, q t x ∈ U ∧ mfderiv 𝓘(ℝ, W) (𝓡 n) ρ (q t x) (p t x) ≠ 0) → |
| 72 | ContDiff ℝ 2 f → |
| 73 | (∀ eps > 0, ∃ N : ℕ, ∀ j ≥ N, ∀ x, |
| 74 | ‖deriv (deriv (qn j t0)) x - deriv (deriv f) x‖ < eps) → |
| 75 | ∀ ell : ℝ, 0 < ell → |
| 76 | (∀ j (t : Icc (0 : ℝ) S), ContDiff ℝ 1 (psi j t)) → |
| 77 | (∀ j (t : Icc (0 : ℝ) S) x, ell ≤ deriv (psi j t) x) → |
| 78 | (∀ j (t : Icc (0 : ℝ) S) (x : ℝ), D j t (x : AddCircle L) = psi j t x - x) → |
| 79 | (∀ j x, psi j 0 x = x) → |
| 80 | (∀ j, M62ShrinkingCurve F (c j)) → |
| 81 | (∀ j, v0 j ∈ Icc m0 V0) → |
| 82 | (∀ j x, curveSpeed F (c j) a x = v0 j) → |
| 83 | (∀ j t, t ∈ Ioo a b → ∀ x, m62CurvatureSquared F (c j) t x ≤ R) → |
| 84 | (∀ j (t : Icc (0 : ℝ) S) x, |
| 85 | c j x (a + t) = ρ (qn j t (psi j t ((L / curvePeriod) * x)))) → |
| 86 | ∃ (Hn : ℕ → ℝ → Y) (h : ℝ → Y) (h0 : Y), |
| 87 | (∀ j, ContinuousOn (Hn j) (Icc a (a + S))) ∧ |
| 88 | (∀ j t, t ∈ Icc a (a + S) → ∀ x : ℝ, Hn j t (x : AddCircle curvePeriod) = |
| 89 | mfderiv (𝓡 n) 𝓘(ℝ, W) e (c j x t) (m62CurvatureVector F (c j) t x)) ∧ |
| 90 | (∀ x : ℝ, h0 (x : AddCircle curvePeriod) = |
| 91 | mfderiv (𝓡 n) 𝓘(ℝ, W) e (ρ (f ((L / curvePeriod) * x))) |
| 92 | (m62CurvatureVector F (fun y (_ : ℝ) => ρ (f ((L / curvePeriod) * y))) a x)) ∧ |
| 93 | Tendsto (fun j => Hn j a) atTop (𝓝 h0) ∧ |
| 94 | ContinuousOn h (Icc a (a + S)) ∧ h a = h0 ∧ |
| 95 | TendstoUniformlyOn Hn h atTop (Icc a (a + S)) ∧ |
| 96 | ∀ eps > 0, ∃ r > 0, ∀ t ∈ Icc a (a + S), t - a < r → ‖h t - h0‖ < eps := by |
| 97 | classical |
| 98 | let : Fact (0 < curvePeriod) := ⟨by unfold curvePeriod; positivity⟩ |
| 99 | dsimp only |
| 100 | intro hguard hfixed hguard0 hf hsecond ell hell hpsi hderiv hDrep hpsi0 hc hv0 |
| 101 | hinitial hcurv hslice |
| 102 | let E := (PiLp.continuousLinearEquiv 2 ℝ (fun _ : ι => ℝ)).symm |
| 103 | let D0 : StateV →L[ℝ] C(AddCircle L, W) := |
| 104 | (E.toContinuousLinearMap.compLeftContinuous ℝ (AddCircle L)).comp |
| 105 | (vectorPeriodicJet (L := L) 1 0 (by omega)) |
| 106 | let D1 : StateV →L[ℝ] C(AddCircle L, W) := |
| 107 | (E.toContinuousLinearMap.compLeftContinuous ℝ (AddCircle L)).comp |
| 108 | (vectorPeriodicJet (L := L) 1 1 (by omega)) |
| 109 | let D2 := vectorPeriodicSecondDerivativeLp (L := L) (ι := ι) |
| 110 | let Q := fun j t => D0 (Vn j t) |
| 111 | let P := fun j t => D1 (Vn j t) |
| 112 | let q := fun t => D0 (V t) |
| 113 | let p := fun t => D1 (V t) |
| 114 | let qn := fun j t (x : ℝ) => Q j t (x : AddCircle L) |
| 115 | let t0 : Icc (0 : ℝ) S := ⟨0, le_rfl, hS.le⟩ |
| 116 | let f : ℝ → W := fun x => q t0 (x : AddCircle L) |
| 117 | let κ := L / curvePeriod |
| 118 | have hκ : 0 < κ := div_pos (Fact.out : 0 < L) (Fact.out : 0 < curvePeriod) |
| 119 | have haS : a < a + S := lt_add_of_pos_right a hS |
| 120 | have hab : a < b := haS.trans hSb |
| 121 | have ha : a ∈ Icc a b := ⟨le_rfl, hab.le⟩ |
| 122 | have hsub : Icc a (a + S) ⊆ Icc a b := Icc_subset_Icc le_rfl hSb.le |
| 123 | have hinside {t : ℝ} (ht : t ∈ Ioc a (a + S)) : t ∈ Ioo a b := |
| 124 | ⟨ht.1, ht.2.trans_lt hSb⟩ |
| 125 | obtain ⟨hfirst0, rr, hrr, hjets⟩ := exists_spectral_approximation_jets Vn V hV hphase |
| 126 | change ∀ t (x : ℝ), HasDerivAt (fun y : ℝ => q t (y : AddCircle L)) |
| 127 | (p t (x : AddCircle L)) x at hfirst0 |
| 128 | have hfirst (j : ℕ) (t : Icc (0 : ℝ) S) : |
| 129 | deriv (qn j t) = fun x : ℝ => P j t (x : AddCircle L) := |
| 130 | funext fun x => (hrr j t).2.1 x |>.deriv |
| 131 | have hfirstf : deriv f = fun x : ℝ => p t0 (x : AddCircle L) := |
| 132 | funext fun x => (hfirst0 t0 x).deriv |
| 133 | have hperiod (g : C(AddCircle L, W)) : Function.Periodic |
| 134 | (fun x : ℝ => g (x : AddCircle L)) L := by |
| 135 | intro x |
| 136 | change g ((x + L : ℝ) : AddCircle L) = g (x : AddCircle L) |
| 137 | rw [AddCircle.coe_add_period] |
| 138 | have hdata (j : ℕ) : ∃ H : ℝ → Y, ContinuousOn H (Icc a b) ∧ |
| 139 | ∀ t ∈ Icc a b, ∀ x : ℝ, H t (x : AddCircle curvePeriod) = |
| 140 | mfderiv (𝓡 n) 𝓘(ℝ, W) e (c j x t) (m62CurvatureVector F (c j) t x) := by |
| 141 | obtain ⟨H, _H1, _H2, _Hd, hH, _, _, _, hrep, _⟩ := |
| 142 | exists_periodic_embeddedCurvature_restart_data F (c j) hab (hc j) he |
| 143 | exact ⟨H, hH, hrep⟩ |
| 144 | choose H hcont hrep using hdata |
| 145 | have hpush_eq (j : ℕ) (t : ℝ) (g : ℝ → M) |
| 146 | (hg : (fun y => c j y t) = g) (x : ℝ) : |
| 147 | mfderiv (𝓡 n) 𝓘(ℝ, W) e (c j x t) (m62CurvatureVector F (c j) t x) = |
| 148 | mfderiv (𝓡 n) 𝓘(ℝ, W) e (g x) |
| 149 | (m62CurvatureVector F (fun y (_ : ℝ) => g y) t x) := |
| 150 | congrArg (fun k : ℝ → M => (mfderiv (𝓡 n) 𝓘(ℝ, W) e (k x) |
| 151 | (m62CurvatureVector F (fun y (_ : ℝ) => k y) t x) : W)) hg |
| 152 | have hinitconv : ∀ eps > 0, ∃ N : ℕ, ∀ j ≥ N, ∀ x, |
| 153 | ‖qn j t0 x - f x‖ < eps ∧ ‖deriv (qn j t0) x - deriv f x‖ < eps ∧ |
| 154 | ‖deriv (deriv (qn j t0)) x - deriv (deriv f) x‖ < eps := by |
| 155 | intro eps heps |
| 156 | obtain ⟨N1, hN1⟩ := hjets eps heps |
| 157 | obtain ⟨N2, hN2⟩ := hsecond eps heps |
| 158 | refine ⟨max N1 N2, ?_⟩ |
| 159 | intro j hj x |
| 160 | have hlow := hN1 j ((le_max_left _ _).trans hj) t0 |
| 161 | refine ⟨?_, ?_, hN2 j ((le_max_right _ _).trans hj) x⟩ |
| 162 | · exact ((Q j t0 - q t0).norm_coe_le_norm (x : AddCircle L)).trans_lt hlow.1 |
| 163 | · rw [hfirst, hfirstf] |
| 164 | exact ((P j t0 - p t0).norm_coe_le_norm (x : AddCircle L)).trans_lt hlow.2.1 |
| 165 | obtain ⟨Hinit, h0, hHinit, hHinitrep, hh0⟩ := |
| 166 | exists_uniform_initial_embeddedCurvature_limit F ha he hU heU hρ hρe hf |
| 167 | (hperiod (q t0)) (fun j => qn j t0) (fun j => (hrr j t0).1) |
| 168 | (fun j => hperiod (Q j t0)) |
| 169 | (by intro x; rw [hfirstf]; exact hguard0 t0 x) |
| 170 | (by intro j x; rw [hfirst]; exact hguard j t0 x) |
| 171 | (fun j x => hfixed j t0 x) hinitconv |
| 172 | have hstart : Tendsto (fun j => H j a) atTop (𝓝 h0) := by |
| 173 | have heq (j : ℕ) : H j a = Hinit j := by |
| 174 | apply ContinuousMap.ext |
| 175 | intro z |
| 176 | obtain ⟨x, rfl⟩ := QuotientAddGroup.mk_surjective z |
| 177 | rw [hrep j a ha, hHinitrep] |
| 178 | apply hpush_eq |
| 179 | funext y |
| 180 | have hs := hslice j t0 y |
| 181 | simpa only [t0, add_zero, hpsi0] using hs |
| 182 | rw [show (fun j => H j a) = Hinit from funext heq] |
| 183 | exact hHinit |
| 184 | obtain ⟨K, hK, hBounds, _hRm, _hRic⟩ := m63Exists_firstJet_ambient_bounds F hcompact |
| 185 | obtain ⟨C1, hC1, hfirstBound⟩ := m63Exists_boundedCurvature_firstJet_bound F hcompact hR |
| 186 | let J := Real.sqrt C1 |
| 187 | have hJ : 0 ≤ J := Real.sqrt_nonneg _ |
| 188 | have hjet (j : ℕ) (t : ℝ) (ht : t ∈ Ioc a (a + S)) (x : ℝ) : |
| 189 | (F.metric t).tangentNorm (c j x t) (m63CurvatureJet F (c j) 1 t x) ≤ |
| 190 | J / Real.sqrt (t - a) := by |
| 191 | have hb := hfirstBound (c j) (hc j) (hcurv j) x t (hinside ht) |
| 192 | (by linarith only [ht.2, hSone]) |
| 193 | have hs := Real.sqrt_le_sqrt hb |
| 194 | rw [Real.sqrt_div hC1] at hs |
| 195 | exact hs |
| 196 | have hcurvnorm (j : ℕ) (t : ℝ) (ht : t ∈ Ioo a b) (x : ℝ) : |
| 197 | m62Curvature F (c j) t x ≤ Real.sqrt R := Real.sqrt_le_sqrt (hcurv j t ht x) |
| 198 | obtain ⟨E1, E2, E3, ⟨hE1, hE2, hE3⟩, hE⟩ := |
| 199 | exists_uniform_embedding_derivative_bounds F hcompact he |
| 200 | let Vcap := V0 * Real.exp ((K + R) * S) |
| 201 | have hVcap : 0 ≤ Vcap := mul_nonneg (hm0.le.trans hmV) (Real.exp_pos _).le |
| 202 | have hspeed (j : ℕ) (t : ℝ) (ht : t ∈ Ioc a (a + S)) (x : ℝ) : |
| 203 | curveSpeed F (c j) t x ≤ Vcap := by |
| 204 | have hv := (curveSpeed_exp_bounds F (c j) (hc j) hBounds x |
| 205 | (fun r hr => hcurv j r hr x) ha (hsub ⟨ht.1.le, ht.2⟩) ht.1.le).2 |
| 206 | rw [hinitial j x] at hv |
| 207 | apply hv.trans |
| 208 | exact mul_le_mul (hv0 j).2 |
| 209 | (Real.exp_le_exp.mpr (mul_le_mul_of_nonneg_left |
| 210 | (by linarith only [ht.2]) (add_nonneg hK hR))) |
| 211 | (Real.exp_pos _).le (hm0.le.trans hmV) |
| 212 | have hLip (t : ℝ) (ht : t ∈ Ioc a (a + S)) : |
| 213 | ∃ C : ℝ≥0, ∀ j, LipschitzWith C (fun x : ℝ => H j t (x : AddCircle curvePeriod)) := by |
| 214 | let C := Vcap * (E1 * (J / Real.sqrt (t - a)) + E2 * Real.sqrt R) |
| 215 | have hC : 0 ≤ C := by dsimp only [C]; positivity |
| 216 | refine ⟨⟨C, hC⟩, ?_⟩ |
| 217 | intro j |
| 218 | have heq : (fun x : ℝ => H j t (x : AddCircle curvePeriod)) = |
| 219 | fun x => (mfderiv (𝓡 n) 𝓘(ℝ, W) e (c j x t) |
| 220 | (m62CurvatureVector F (c j) t x) : W) := |
| 221 | funext (hrep j t (hsub ⟨ht.1.le, ht.2⟩)) |
| 222 | rw [heq] |
| 223 | apply lipschitzWith_of_nnnorm_deriv_le |
| 224 | · intro x |
| 225 | exact (hasDerivAt_embeddedCurvature_spatial F (c j) (hc j) he (hinside ht) x).differentiableAt |
| 226 | · intro x |
| 227 | have hd := (embeddedCurvature_derivative_remainder_bounds F (c j) (hc j) he |
| 228 | hK hK hK hBounds (hinside ht) x hE1 hE2 hE3 |
| 229 | (fun A => (hE t (hsub ⟨ht.1.le, ht.2⟩) (c j x t) A 0 0).1) |
| 230 | (fun A B => (hE t (hsub ⟨ht.1.le, ht.2⟩) (c j x t) A B 0).2.1) |
| 231 | (fun A B C => (hE t (hsub ⟨ht.1.le, ht.2⟩) (c j x t) A B C).2.2)).1 |
| 232 | change ‖deriv (fun y => (mfderiv (𝓡 n) 𝓘(ℝ, W) e (c j y t) |
| 233 | (m62CurvatureVector F (c j) t y) : W)) x‖ ≤ C |
| 234 | apply hd.trans |
| 235 | exact mul_le_mul (hspeed j t ht x) |
| 236 | (add_le_add (mul_le_mul_of_nonneg_left (hjet j t ht x) hE1) |
| 237 | (mul_le_mul_of_nonneg_left (hcurvnorm j t (hinside ht) x) hE2)) |
| 238 | (add_nonneg (mul_nonneg hE1 (Real.sqrt_nonneg _)) |
| 239 | (mul_nonneg hE2 (curvature_nonneg F (c j) t x))) hVcap |
| 240 | let scaleH := AddCircle.homeomorphAddCircle curvePeriod L |
| 241 | (Fact.out : 0 < curvePeriod).ne' (Fact.out : 0 < L).ne' |
| 242 | let scale : C(AddCircle curvePeriod, AddCircle L) := ⟨scaleH, scaleH.continuous⟩ |
| 243 | let unscale : C(AddCircle L, AddCircle curvePeriod) := ⟨scaleH.symm, scaleH.symm.continuous⟩ |
| 244 | have hunscale (x : ℝ) : unscale (x : AddCircle L) = ((x / κ : ℝ) : AddCircle curvePeriod) := by |
| 245 | change ((x * (L⁻¹ * curvePeriod) : ℝ) : AddCircle curvePeriod) = _ |
| 246 | congr 1 |
| 247 | dsimp only [κ] |
| 248 | field_simp |
| 249 | have hL2 (t : ℝ) (ht : t ∈ Ioc a (a + S)) : |
| 250 | CauchySeq (fun j => ContinuousMap.toLp 2 haarAddCircle ℝ (H j t)) := by |
| 251 | let u : Icc (0 : ℝ) S := ⟨t - a, by constructor <;> linarith only [ht.1, ht.2]⟩ |
| 252 | have htime : a + (u : ℝ) = t := by dsimp only [u]; ring |
| 253 | have hQ := (D0.continuous.tendsto (V u)).comp |
| 254 | (((continuous_eval_const u).tendsto V).comp hV) |
| 255 | have hP := (D1.continuous.tendsto (V u)).comp |
| 256 | (((continuous_eval_const u).tendsto V).comp hV) |
| 257 | have hr : CauchySeq (fun j => ContinuousMap.toLp 2 haarAddCircle ℝ (rr j u)) := by |
| 258 | have hd2 := (D2.continuous.tendsto (V u)).comp |
| 259 | (((continuous_eval_const u).tendsto V).comp hV) |
| 260 | have heq (j : ℕ) : D2 (Vn j u) = ContinuousMap.toLp 2 haarAddCircle ℝ (rr j u) := |
| 261 | (hrr j u).2.2.2.2 |
| 262 | simpa only [Function.comp_def, heq] using hd2.cauchySeq |
| 263 | obtain ⟨G, _w, hGrep, _hwrep, hGL2, _hwL2⟩ := |
| 264 | exists_cauchySeq_ambientCurvature_labelVelocity_L2 F he hU heU hρ hρe |
| 265 | (hsub ⟨ht.1.le, ht.2⟩) (fun j => Q j u) (fun j => P j u) (fun j => rr j u) |
| 266 | (q u) (p u) (fun j => (hrr j u).2.1) (fun j => (hrr j u).2.2.1) |
| 267 | (by intro j z; obtain ⟨x, rfl⟩ := QuotientAddGroup.mk_surjective z; exact hguard j u x) |
| 268 | (by intro j z; obtain ⟨x, rfl⟩ := QuotientAddGroup.mk_surjective z; exact hfixed j u x) |
| 269 | (by intro z; obtain ⟨x, rfl⟩ := QuotientAddGroup.mk_surjective z; exact hguard0 u x) |
| 270 | hQ hP hr |
| 271 | have hnormal (j : ℕ) (x : ℝ) : |
| 272 | H j t (x : AddCircle curvePeriod) = G j ((psi j u (κ * x) : ℝ) : AddCircle L) := by |
| 273 | let gamma := fun y (_ : ℝ) => ρ (qn j u y) |
| 274 | let phi := fun y => psi j u (κ * y) |
| 275 | have hgamma : ContMDiff 𝓘(ℝ, ℝ) (𝓡 n) 2 (fun y => gamma y t) := |
| 276 | (hρ.of_le (ENat.natCast_le_of_coe_top_le_withTop le_rfl 2)).comp_contMDiff |
| 277 | (hrr j u).1.contMDiff (fun y => (hguard j u y).1) |
| 278 | have hvel (y : ℝ) : curveVelocity (n := n) (fun z => gamma z t) y = |
| 279 | mfderiv 𝓘(ℝ, W) (𝓡 n) ρ (qn j u y) (P j u (y : AddCircle L)) := by |
| 280 | change mfderiv 𝓘(ℝ, ℝ) (𝓡 n) (ρ ∘ qn j u) y 1 = _ |
| 281 | erw [mfderiv_comp y |
| 282 | ((hρ.contMDiffAt (hU.mem_nhds (hguard j u y).1)).mdifferentiableAt (by simp)) |
| 283 | ((hrr j u).2.1 y).differentiableAt.mdifferentiableAt, |
| 284 | ContinuousLinearMap.comp_apply, mfderiv_eq_fderiv, |
| 285 | ((hrr j u).2.1 y).hasFDerivAt.fderiv] |
| 286 | exact congrArg (mfderiv 𝓘(ℝ, W) (𝓡 n) ρ (qn j u y)) |
| 287 | (ContinuousLinearMap.toSpanSingleton_apply_one ℝ (P j u (y : AddCircle L))) |
| 288 | have himm (y : ℝ) : curveVelocity (n := n) (fun z => gamma z t) y ≠ 0 := by |
| 289 | rw [hvel] |
| 290 | exact (hguard j u y).2 |
| 291 | have hunit := unitTangent_contMDiff_of_c2 F gamma (t := t) hgamma himm |
| 292 | have hphi (y : ℝ) : HasDerivAt phi (deriv (psi j u) (κ * y) * κ) y := by |
| 293 | have hlin : HasDerivAt (fun z : ℝ => κ * z) κ y := by |
| 294 | simpa +instances only [id_eq, mul_one] using! (hasDerivAt_id y).const_mul κ |
| 295 | simpa only [phi, Function.comp_def, smul_eq_mul, mul_comm] using |
| 296 | ((hpsi j u).differentiable (by norm_num) (κ * y)).hasDerivAt.scomp y hlin |
| 297 | have hphiPos (y : ℝ) : 0 < deriv phi y := by |
| 298 | rw [(hphi y).deriv] |
| 299 | exact mul_pos (hell.trans_le (hderiv j u _)) hκ |
| 300 | have hcurve : (fun y => c j y t) = fun y => gamma (phi y) t := by |
| 301 | funext y |
| 302 | have hs := hslice j u y |
| 303 | rwa [htime] at hs |
| 304 | rw [hrep j t (hsub ⟨ht.1.le, ht.2⟩), hpush_eq j t _ hcurve] |
| 305 | change mfderiv (𝓡 n) 𝓘(ℝ, W) e (gamma (phi x) t) |
| 306 | (m62CurvatureVector F (fun y s => gamma (phi y) s) t x) = _ |
| 307 | rw [curvatureVector_comp F gamma (hgamma.mdifferentiable (by norm_num)) |
| 308 | (fun y => (hphi y).differentiableAt) hphiPos |
| 309 | ((hunit (phi x)).mdifferentiableAt (by norm_num))] |
| 310 | exact (hGrep j (phi x)).symm |
| 311 | let Hphys (j : ℕ) : C(AddCircle L, W) := (H j t).comp unscale |
| 312 | have hcomp (j : ℕ) (x : ℝ) : Hphys j (x : AddCircle L) = G j (psi j u x : AddCircle L) := by |
| 313 | change H j t (unscale (x : AddCircle L)) = _ |
| 314 | rw [hunscale, hnormal] |
| 315 | congr 2 |
| 316 | field_simp |
| 317 | have hshift (j : ℕ) (x : ℝ) : psi j u (x + L) = psi j u x + L := by |
| 318 | have heq : D j u ((x + L : ℝ) : AddCircle L) = D j u (x : AddCircle L) := by |
| 319 | rw [AddCircle.coe_add_period] |
| 320 | rw [hDrep, hDrep] at heq |
| 321 | linarith |
| 322 | have hlabels : ∀ eps > 0, ∃ N : ℕ, ∀ j ≥ N, ∀ m ≥ N, |
| 323 | ∀ x ∈ Icc 0 L, |psi j u x - psi m u x| < eps := by |
| 324 | intro eps heps |
| 325 | obtain ⟨N, hN⟩ := Metric.cauchySeq_iff.mp hD.cauchySeq eps heps |
| 326 | refine ⟨N, ?_⟩ |
| 327 | intro j hj m hm x _hx |
| 328 | have htimeNorm := (D j - D m).norm_coe_le_norm u |
| 329 | have hxNorm := (D j u - D m u).norm_coe_le_norm (x : AddCircle L) |
| 330 | have hnorm : ‖D j - D m‖ < eps := |
| 331 | (_root_.dist_eq_norm (D j) (D m)).symm.trans_lt (hN j hj m hm) |
| 332 | have htot := hxNorm.trans_lt (htimeNorm.trans_lt hnorm) |
| 333 | change ‖D j u (x : AddCircle L) - D m u (x : AddCircle L)‖ < eps at htot |
| 334 | rw [hDrep, hDrep, sub_sub_sub_cancel_right, Real.norm_eq_abs] at htot |
| 335 | exact htot |
| 336 | obtain ⟨C, hC⟩ := hLip t ht |
| 337 | have hLipphys (j : ℕ) : LipschitzWith ⟨(C : ℝ) / κ, div_nonneg C.coe_nonneg hκ.le⟩ |
| 338 | (fun x : ℝ => Hphys j (x : AddCircle L)) := by |
| 339 | apply LipschitzWith.of_dist_le_mul |
| 340 | intro x y |
| 341 | change dist (H j t (unscale (x : AddCircle L))) |
| 342 | (H j t (unscale (y : AddCircle L))) ≤ ((C : ℝ) / κ) * dist x y |
| 343 | rw [hunscale, hunscale] |
| 344 | have hb := (hC j).dist_le_mul (x / κ) (y / κ) |
| 345 | rw [Real.dist_eq, ← sub_div, abs_div, abs_of_pos hκ] at hb |
| 346 | exact hb.trans_eq (by rw [Real.dist_eq]; ring) |
| 347 | have hCauchy := cauchySeq_periodic_comp_of_cauchySeq_L2 G Hphys |
| 348 | (fun j => psi j u) hell (fun j => hpsi j u) hshift |
| 349 | (fun j => hderiv j u) hlabels hGL2 hcomp hLipphys |
| 350 | obtain ⟨g, hg⟩ := cauchySeq_tendsto_of_complete hCauchy |
| 351 | have hback := (scale.continuous_precomp.tendsto g).comp hg |
| 352 | have hbackeq (j : ℕ) : (Hphys j).comp scale = H j t := by |
| 353 | apply ContinuousMap.ext |
| 354 | intro z |
| 355 | exact congrArg (H j t) (scaleH.symm_apply_apply z) |
| 356 | simp only [Function.comp_def, hbackeq] at hback |
| 357 | exact (((ContinuousMap.toLp 2 haarAddCircle ℝ).continuous.tendsto _).comp hback).cauchySeq |
| 358 | have hequi : ∀ d0 ∈ Ioc a (a + S), ∀ eps > 0, ∃ eta > 0, ∀ j s, |
| 359 | s ∈ Icc d0 (a + S) → ∀ t ∈ Icc d0 (a + S), |
| 360 | |t - s| < eta → ‖H j t - H j s‖ < eps := by |
| 361 | intro d0 hd0 eps heps |
| 362 | have hdelta : 0 < d0 - a := sub_pos.mpr hd0.1 |
| 363 | obtain ⟨C2, hC2, hsecondBound⟩ := |
| 364 | m63SecondJetSquared_bound_of_curvature_bound F hcompact hR hdelta |
| 365 | let J1 := J / Real.sqrt (d0 - a) |
| 366 | let J2 := Real.sqrt C2 |
| 367 | have hJ1 : 0 ≤ J1 := div_nonneg hJ (Real.sqrt_nonneg _) |
| 368 | have hJ2 : 0 ≤ J2 := Real.sqrt_nonneg _ |
| 369 | obtain ⟨Ct, hCt, htime⟩ := exists_uniform_embeddedCurvature_time_lipschitz |
| 370 | F hcompact hab he hK hK hK hBounds (Real.sqrt_nonneg R) hJ1 hJ2 |
| 371 | have htimebound (j : ℕ) (s : ℝ) (hs : s ∈ Icc d0 (a + S)) |
| 372 | (t : ℝ) (ht : t ∈ Icc d0 (a + S)) : ‖H j t - H j s‖ ≤ Ct * |t - s| := by |
| 373 | apply (ContinuousMap.norm_le _ (mul_nonneg hCt (abs_nonneg _))).mpr |
| 374 | intro z |
| 375 | obtain ⟨x, rfl⟩ := QuotientAddGroup.mk_surjective z |
| 376 | change ‖H j t (x : AddCircle curvePeriod) - H j s (x : AddCircle curvePeriod)‖ ≤ _ |
| 377 | rw [hrep j t (hsub ⟨hd0.1.le.trans ht.1, ht.2⟩), |
| 378 | hrep j s (hsub ⟨hd0.1.le.trans hs.1, hs.2⟩)] |
| 379 | apply htime (c j) (hc j) d0 (a + S) hd0.1.le hd0.2 hSb.le |
| 380 | (fun r hr y => hcurvnorm j r ⟨hd0.1.trans hr.1, hr.2.trans hSb⟩ y) |
| 381 | (fun r hr y => (hjet j r ⟨hd0.1.trans hr.1, hr.2.le⟩ y).trans |
| 382 | (div_le_div_of_nonneg_left hJ (Real.sqrt_pos.mpr hdelta) |
| 383 | (Real.sqrt_le_sqrt (sub_le_sub_right hr.1.le a)))) |
| 384 | (fun r hr y => ?_) t ht s hs x |
| 385 | exact Real.sqrt_le_sqrt (hsecondBound (c j) (hc j) (hcurv j) y r |
| 386 | ⟨hd0.1.trans hr.1, hr.2.trans hSb⟩ (sub_le_sub_right hr.1.le a)) |
| 387 | refine ⟨eps / (Ct + 1), by positivity, ?_⟩ |
| 388 | intro j s hs t ht hdist |
| 389 | apply (htimebound j s hs t ht).trans_lt |
| 390 | calc |
| 391 | Ct * |t - s| ≤ (Ct + 1) * |t - s| := |
| 392 | mul_le_mul_of_nonneg_right (by linarith) (abs_nonneg _) |
| 393 | _ < (Ct + 1) * (eps / (Ct + 1)) := |
| 394 | mul_lt_mul_of_pos_left hdist (by positivity) |
| 395 | _ = eps := by field_simp |
| 396 | let F' := m63RestrictClosedFlow F a (a + S) hsub haS |
| 397 | have hc' (j : ℕ) : M62ShrinkingCurve F' (c j) := |
| 398 | m63SmoothRestriction (m63SmoothClosed_iff_m62.mpr (hc j)) a (a + S) hsub haS |
| 399 | have hjetEq (j i : ℕ) (t x : ℝ) : m63CurvatureJet F' (c j) i t x = |
| 400 | m63CurvatureJet F (c j) i t x := by |
| 401 | induction i generalizing x with |
| 402 | | zero => rfl |
| 403 | | succ i ih => |
| 404 | change m62SpatialDerivative F (c j) t (fun y => m63CurvatureJet F' (c j) i t y) x = |
| 405 | m62SpatialDerivative F (c j) t (fun y => m63CurvatureJet F (c j) i t y) x |
| 406 | rw [show (fun y => m63CurvatureJet F' (c j) i t y) = |
| 407 | (fun y => m63CurvatureJet F (c j) i t y) from funext ih] |
| 408 | obtain ⟨h, hh, hha, hlim, htrace⟩ := exists_closed_uniform_embeddedCurvature_limit |
| 409 | F' haS hcompact he hK hR hJ (m63RestrictAmbientBounds hBounds a (a + S) hsub haS) |
| 410 | hm0 hmV c hc' v0 hv0 hinitial |
| 411 | (fun j t ht x => hcurv j t (hinside ⟨ht.1, ht.2.le⟩) x) |
| 412 | (by |
| 413 | intro j t ht x |
| 414 | change (F.metric t).tangentNorm (c j x t) (m63CurvatureJet F' (c j) 1 t x) ≤ _ |
| 415 | rw [hjetEq] |
| 416 | exact hjet j t ⟨ht.1, ht.2.le⟩ x) |
| 417 | H h0 (fun j t ht => hrep j t (hsub ht)) hstart hL2 hequi |
| 418 | exact ⟨H, h, h0, fun j => (hcont j).mono hsub, |
| 419 | fun j t ht => hrep j t (hsub ht), hh0, hstart, hh, hha, hlim, htrace⟩ |
| 420 | |
| 421 | end PoincareMT.M63 |