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 | /- Adapted from Mapher `PoincareMT/Proofs/M03/ScalarMixedDerivative.lean` at |
| 2 | f927d9e1f0810042766d3b5f64d3f4da02ee93cc. See |
| 3 | `references/ricci-flow/mapher/local-theory/port.json`. -/ |
| 4 | |
| 5 | import PoincareLib.Geometry.RicciFlow.Local.Connection.Family |
| 6 | import PoincareLib.Geometry.RicciFlow.Local.Metric.MetricInverse |
| 7 | import Mathlib.Analysis.Calculus.DerivativeTest |
| 8 | import Mathlib.Analysis.Calculus.LocalExtr.Basic |
| 9 | import Mathlib.Analysis.Calculus.Deriv.Slope |
| 10 | import Mathlib.Analysis.Calculus.FDeriv.Extend |
| 11 | import Mathlib.Analysis.Calculus.FDeriv.Partial |
| 12 | import Mathlib.Analysis.Calculus.UniformLimitsDeriv |
| 13 | import Mathlib.Analysis.SpecialFunctions.ExpDeriv |
| 14 | |
| 15 | /-! |
| 16 | # Commuting time and scalar spatial differentiation |
| 17 | |
| 18 | Joint smoothness identifies both mixed derivatives in a fixed centered chart. |
| 19 | Schwarz symmetry exchanges the time and spatial directions. The time partial |
| 20 | is identified on a spatial neighborhood before its manifold derivative is |
| 21 | taken. This supplies a calculus prerequisite for differentiating the actual |
| 22 | curvature commutator in Kotschwar, arXiv:1206.3225v1, printed p. 4, (9)-(10). |
| 23 | -/ |
| 24 | |
| 25 | set_option autoImplicit false |
| 26 | set_option maxHeartbeats 1200000 |
| 27 | |
| 28 | open scoped Manifold ContDiff Bundle Topology |
| 29 | open Set |
| 30 | |
| 31 | universe u v |
| 32 | |
| 33 | namespace PoincareMT.RicciFlow.Local |
| 34 | |
| 35 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 36 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 37 | |
| 38 | theorem hasDerivAt_family_spatial_mvfderiv |
| 39 | {f : ℝ → M → ℝ} {J : Set ℝ} {U : Set M} (hU : IsOpen U) |
| 40 | (hf : ContMDiffOn (𝓘(ℝ, ℝ).prod (𝓡 n)) 𝓘(ℝ, ℝ) ∞ |
| 41 | (Function.uncurry f) (J ×ˢ U)) |
| 42 | {t : ℝ} (ht : t ∈ interior J) {x : M} (hx : x ∈ U) |
| 43 | (a : TangentSpace (𝓡 n) x) : |
| 44 | HasDerivAt (fun s => mvfderiv (𝓡 n) (f s) x a) |
| 45 | (mvfderiv (𝓡 n) (fun y => deriv (fun s => f s y) t) x a) t := by |
| 46 | change EuclideanSpace ℝ (Fin n) at a |
| 47 | let c := extChartAt (𝓡 n) x |
| 48 | let H : ℝ × EuclideanSpace ℝ (Fin n) → ℝ := fun p => f p.1 (c.symm p.2) |
| 49 | let Q : M → ℝ := fun y => deriv (fun s => f s y) t |
| 50 | have hcx : c x ∈ c.target := mem_extChartAt_target x |
| 51 | have hcsymm : c.symm (c x) = x := c.left_inv (mem_extChartAt_source x) |
| 52 | have hxU : c.symm (c x) ∈ U := by rw [hcsymm]; exact hx |
| 53 | have hf' := hf.mono (show interior J ×ˢ U ⊆ J ×ˢ U from |
| 54 | fun _ hp => ⟨interior_subset hp.1, hp.2⟩) |
| 55 | have hfm (s : ℝ) (hs : s ∈ interior J) (y : M) (hy : y ∈ U) : |
| 56 | ContMDiffAt (𝓡 n) 𝓘(ℝ, ℝ) ∞ (f s) y := by |
| 57 | have hp := (hf' (s, y) ⟨hs, hy⟩).contMDiffAt |
| 58 | ((isOpen_interior.prod hU).mem_nhds ⟨hs, hy⟩) |
| 59 | exact hp.comp y (contMDiffAt_const.prodMk contMDiffAt_id) |
| 60 | have hc (z : EuclideanSpace ℝ (Fin n)) (hz : z ∈ c.target) : |
| 61 | ContMDiffAt 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) (𝓡 n) ∞ c.symm z := |
| 62 | (contMDiffOn_extChartAt_symm (I := 𝓡 n) x).contMDiffAt |
| 63 | (extChartAt_target_mem_nhds' hz) |
| 64 | have hH (s : ℝ) (hs : s ∈ interior J) (z : EuclideanSpace ℝ (Fin n)) |
| 65 | (hz : z ∈ c.target) (hzU : c.symm z ∈ U) : ContDiffAt ℝ ∞ H (s, z) := by |
| 66 | have hp := (hf' (s, c.symm z) ⟨hs, hzU⟩).contMDiffAt |
| 67 | ((isOpen_interior.prod hU).mem_nhds ⟨hs, hzU⟩) |
| 68 | have hh := hp.comp (s, z) |
| 69 | (contMDiffAt_fst.prodMk ((hc z hz).comp (s, z) contMDiffAt_snd)) |
| 70 | rw [← modelWithCornersSelf_prod, chartedSpaceSelf_prod] at hh |
| 71 | exact hh.contDiffAt |
| 72 | have hHtx := hH t ht (c x) hcx hxU |
| 73 | have hD : DifferentiableAt ℝ (fderiv ℝ H) (t, c x) := |
| 74 | (hHtx.fderiv_right (m := 1) |
| 75 | (WithTop.coe_le_coe.mpr (le_top : (2 : ℕ∞) ≤ ⊤))).differentiableAt (by norm_num) |
| 76 | have htimeSlice (z : EuclideanSpace ℝ (Fin n)) : |
| 77 | HasDerivAt (fun s : ℝ => (s, z)) (1, 0) t := by |
| 78 | simpa using ((hasFDerivAt_id (𝕜 := ℝ) t).prodMk |
| 79 | (hasFDerivAt_const (𝕜 := ℝ) z t)).hasDerivAt |
| 80 | have hspace (s : ℝ) (hs : s ∈ interior J) : |
| 81 | fderiv ℝ (fun z => H (s, z)) (c x) a = |
| 82 | fderiv ℝ H (s, c x) (0, a) := by |
| 83 | have hsH := (hH s hs (c x) hcx hxU).differentiableAt (by simp) |
| 84 | have hd := hsH.hasFDerivAt.comp (c x) |
| 85 | ((hasFDerivAt_const (𝕜 := ℝ) s (c x)).prodMk (hasFDerivAt_id (c x))) |
| 86 | have hv := congrArg (fun L => L a) hd.fderiv |
| 87 | simpa only [Function.comp_def, ContinuousLinearMap.comp_apply, |
| 88 | ContinuousLinearMap.prod_apply, zero_apply, ContinuousLinearMap.id_apply] using hv |
| 89 | have htime : HasDerivAt (fun s => fderiv ℝ H (s, c x) (0, a)) |
| 90 | (fderiv ℝ (fderiv ℝ H) (t, c x) (1, 0) (0, a)) t := by |
| 91 | have hd := hD.hasFDerivAt.comp_hasDerivAt t (htimeSlice (c x)) |
| 92 | simpa only [Function.comp_def, map_zero, add_zero] using |
| 93 | hd.clm_apply (hasDerivAt_const t (0, a)) |
| 94 | have hspaceTime : fderiv ℝ (fun z => fderiv ℝ H (t, z) (1, 0)) (c x) a = |
| 95 | fderiv ℝ (fderiv ℝ H) (t, c x) (0, a) (1, 0) := by |
| 96 | have hd := hD.hasFDerivAt.comp (c x) |
| 97 | ((hasFDerivAt_const (𝕜 := ℝ) t (c x)).prodMk (hasFDerivAt_id (c x))) |
| 98 | have ha := hd.clm_apply |
| 99 | (hasFDerivAt_const (𝕜 := ℝ) (1, (0 : EuclideanSpace ℝ (Fin n))) (c x)) |
| 100 | have hv := congrArg (fun L => L a) ha.fderiv |
| 101 | simpa only [Function.comp_def, add_apply, ContinuousLinearMap.comp_apply, |
| 102 | zero_apply, map_zero, zero_add, ContinuousLinearMap.flip_apply, |
| 103 | ContinuousLinearMap.prod_apply, ContinuousLinearMap.id_apply] using hv |
| 104 | have hUnhds : c.symm ⁻¹' U ∈ 𝓝 (c x) := |
| 105 | (hc (c x) hcx).continuousAt.preimage_mem_nhds (hU.mem_nhds hxU) |
| 106 | have hQchart : (Q ∘ c.symm) =ᶠ[𝓝 (c x)] |
| 107 | (fun z => fderiv ℝ H (t, z) (1, 0)) := by |
| 108 | filter_upwards [extChartAt_target_mem_nhds' hcx, hUnhds] with z hz hzU |
| 109 | have hd := ((hH t ht z hz hzU).differentiableAt (by simp)).hasFDerivAt.comp_hasDerivAt t |
| 110 | (htimeSlice z) |
| 111 | exact hd.deriv |
| 112 | have hQchartSmooth : ContDiffAt ℝ ∞ (Q ∘ c.symm) (c x) := by |
| 113 | have hpartial := (hHtx.fderiv_right (m := ∞) (by simp)).clm_apply |
| 114 | (contDiffAt_const (c := (1, (0 : EuclideanSpace ℝ (Fin n))))) |
| 115 | have hs := hpartial.comp (c x) (contDiffAt_const.prodMk contDiffAt_id) |
| 116 | exact hs.congr_of_eventuallyEq hQchart |
| 117 | have hQ : ContMDiffAt (𝓡 n) 𝓘(ℝ, ℝ) ∞ Q x := by |
| 118 | have hs := hQchartSmooth.contMDiffAt.comp x |
| 119 | (contMDiffAt_extChartAt (I := 𝓡 n) (x := x)) |
| 120 | apply hs.congr_of_eventuallyEq |
| 121 | filter_upwards [extChartAt_source_mem_nhds (I := 𝓡 n) x] with y hy |
| 122 | change Q y = Q (c.symm (c y)) |
| 123 | rw [c.left_inv hy] |
| 124 | have heid : mfderiv 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) (𝓡 n) c.symm (c x) = |
| 125 | ContinuousLinearMap.id ℝ (TangentSpace (𝓡 n) (c x)) := by |
| 126 | simpa only [(𝓡 n).range_eq_univ, mfderivWithin_univ] using |
| 127 | (mfderivWithin_range_extChartAt_symm (I := 𝓡 n) (x := x)) |
| 128 | have hchart (q : M → ℝ) (hq : ContMDiffAt (𝓡 n) 𝓘(ℝ, ℝ) ∞ q x) : |
| 129 | fderiv ℝ (q ∘ c.symm) (c x) a = mvfderiv (𝓡 n) q x a := by |
| 130 | rw [← mfderiv_eq_fderiv] |
| 131 | change mvfderiv 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) (q ∘ c.symm) (c x) a = _ |
| 132 | rw [mvfderiv_comp_apply_of_eq (c x) (hq.mdifferentiableAt (by simp)) |
| 133 | ((hc (c x) hcx).mdifferentiableAt (by simp)) hcsymm a, heid] |
| 134 | rfl |
| 135 | have hslice : (fun s => mvfderiv (𝓡 n) (f s) x a) =ᶠ[𝓝 t] |
| 136 | (fun s => fderiv ℝ H (s, c x) (0, a)) := by |
| 137 | filter_upwards [isOpen_interior.mem_nhds ht] with s hs |
| 138 | rw [← hchart (f s) (hfm s hs x hx)] |
| 139 | exact hspace s hs |
| 140 | apply (htime.congr_of_eventuallyEq hslice).congr_deriv |
| 141 | have hsymm := hHtx.isSymmSndFDerivAt (by |
| 142 | rw [minSmoothness_of_isRCLikeNormedField] |
| 143 | exact WithTop.coe_le_coe.mpr (le_top : (2 : ℕ∞) ≤ ⊤)) |
| 144 | rw [hsymm.eq (1, 0) (0, a), ← hspaceTime, ← hQchart.fderiv_eq, hchart Q hQ] |
| 145 | |
| 146 | open Bundle Manifold in |
| 147 | open scoped BigOperators in |
| 148 | set_option maxHeartbeats 2400000 in |
| 149 | set_option synthInstance.maxHeartbeats 200000 in |
| 150 | /-- The actual inverse-metric scalar Hessian trace is nonpositive at a local maximum. -/ |
| 151 | theorem scalar_frame_laplacian_nonpos_of_isLocalMax |
| 152 | {g : RiemannianMetric n M} (D : LeviCivitaData g) (x0 : M) {x : M} |
| 153 | (hx : x ∈ (trivializationAt (EuclideanSpace ℝ (Fin n)) |
| 154 | (TangentSpace (𝓡 n)) x0).baseSet) |
| 155 | (f : M → ℝ) |
| 156 | (hf : ContMDiffOn (𝓡 n) 𝓘(ℝ, ℝ) ∞ f |
| 157 | (trivializationAt (EuclideanSpace ℝ (Fin n)) (TangentSpace (𝓡 n)) x0).baseSet) |
| 158 | (hmax : IsLocalMax f x) : |
| 159 | let V := EuclideanSpace ℝ (Fin n) |
| 160 | let e := trivializationAt V (TangentSpace (𝓡 n)) x0 |
| 161 | let E := e.localFrame (EuclideanSpace.basisFun (Fin n) ℝ).toBasis |
| 162 | let G := ContinuousLinearMap.inCoordinates V (TangentSpace (𝓡 n)) |
| 163 | (V →L[ℝ] ℝ) (fun y => TangentSpace (𝓡 n) y →L[ℝ] ℝ) |
| 164 | x0 x x0 x (g.inner x) |
| 165 | let a := fun i j : Fin n => (G.inverse (EuclideanSpace.proj j)) i |
| 166 | let N := fun (P Q : (y : M) → TangentSpace (𝓡 n) y) y => |
| 167 | D.connection Q y (P y) |
| 168 | let d := fun (P : (y : M) → TangentSpace (𝓡 n) y) (q : M → ℝ) y => |
| 169 | mvfderiv (𝓡 n) q y (P y) |
| 170 | (∑ i, ∑ j, a i j * |
| 171 | (d (E i) (d (E j) f) x - d (N (E i) (E j)) f x)) ≤ 0 := by |
| 172 | classical |
| 173 | let : Bundle.RiemannianBundle (TangentSpace (𝓡 n) : M → Type _) := |
| 174 | ⟨g.toRiemannianMetric⟩ |
| 175 | let V := EuclideanSpace ℝ (Fin n) |
| 176 | let c := chartAt V x0 |
| 177 | let e := trivializationAt V (TangentSpace (𝓡 n)) x0 |
| 178 | let cb := (EuclideanSpace.basisFun (Fin n) ℝ).toBasis |
| 179 | let E := e.localFrame cb |
| 180 | let theta := e.localFrameCoeff (𝓡 n) cb |
| 181 | let G := ContinuousLinearMap.inCoordinates V (TangentSpace (𝓡 n)) |
| 182 | (V →L[ℝ] ℝ) (fun y => TangentSpace (𝓡 n) y →L[ℝ] ℝ) |
| 183 | x0 x x0 x (g.inner x) |
| 184 | let a := fun i j : Fin n => (G.inverse (EuclideanSpace.proj j)) i |
| 185 | let N := fun (P Q : (y : M) → TangentSpace (𝓡 n) y) y => |
| 186 | D.connection Q y (P y) |
| 187 | let d := fun (P : (y : M) → TangentSpace (𝓡 n) y) (q : M → ℝ) y => |
| 188 | mvfderiv (𝓡 n) q y (P y) |
| 189 | let C := fun q : M → ℝ => ContMDiffOn (𝓡 n) 𝓘(ℝ, ℝ) ∞ q e.baseSet |
| 190 | let z := c x |
| 191 | let F : V → ℝ := fun w => f (c.symm w) |
| 192 | let H := fderiv ℝ (fderiv ℝ F) z |
| 193 | have hxc : x ∈ c.source := by |
| 194 | simpa only [e, TangentBundle.trivializationAt_baseSet] using hx |
| 195 | have hz : z ∈ c.target := c.map_source hxc |
| 196 | have hbase {w : V} (hw : w ∈ c.target) : c.symm w ∈ e.baseSet := by |
| 197 | simpa only [e, TangentBundle.trivializationAt_baseSet] using c.map_target hw |
| 198 | have hcs {w : V} (hw : w ∈ c.target) : |
| 199 | ContMDiffAt 𝓘(ℝ, V) (𝓡 n) ∞ c.symm w := |
| 200 | (contMDiffOn_chart_symm (I := 𝓡 n) (n := ∞) (x := x0)).contMDiffAt |
| 201 | (c.open_target.mem_nhds hw) |
| 202 | have hF {w : V} (hw : w ∈ c.target) : ContDiffAt ℝ ∞ F w := |
| 203 | ((hf.contMDiffAt (e.open_baseSet.mem_nhds (hbase hw))).comp w (hcs hw)).contDiffAt |
| 204 | have hFmax : IsLocalMax F z := by |
| 205 | have hm : IsLocalMax f (c.symm z) := by |
| 206 | simpa only [z, c.left_inv hxc] using hmax |
| 207 | exact hm.comp_continuous (hcs hz).continuousAt |
| 208 | have hD : DifferentiableAt ℝ (fderiv ℝ F) z := |
| 209 | ((hF hz).fderiv_right (m := ∞) (by simp)).differentiableAt (by simp) |
| 210 | have hchart (q : M → ℝ) (hq : C q) {w : V} (hw : w ∈ c.target) |
| 211 | (i : Fin n) : d (E i) q (c.symm w) = |
| 212 | fderiv ℝ (fun u => q (c.symm u)) w (EuclideanSpace.single i 1) := by |
| 213 | let y := c.symm w |
| 214 | have hy : y ∈ e.baseSet := hbase hw |
| 215 | have he : e.symmL ℝ y = mfderiv 𝓘(ℝ, V) (𝓡 n) c.symm w := by |
| 216 | have hh := TangentBundle.symmL_trivializationAt (I := 𝓡 n) (x₀ := x0) |
| 217 | (c.map_target hw) |
| 218 | simp only [extChartAt_coe, extChartAt_coe_symm, modelWithCornersSelf_coe, |
| 219 | modelWithCornersSelf_coe_symm, Function.comp_def, id_eq, Set.range_id, |
| 220 | mfderivWithin_univ] at hh |
| 221 | change e.symmL ℝ y = mfderiv 𝓘(ℝ, V) (𝓡 n) c.symm (c y) at hh |
| 222 | rwa [c.right_inv hw] at hh |
| 223 | have hframe : E i y = e.symmL ℝ y (EuclideanSpace.single i 1) := by |
| 224 | calc |
| 225 | E i y = e.basisAt cb hy i := e.localFrame_apply_of_mem_baseSet cb hy |
| 226 | _ = e.symm y (EuclideanSpace.single i 1) := by |
| 227 | simp only [Trivialization.basisAt, Module.Basis.map_apply, cb, |
| 228 | OrthonormalBasis.coe_toBasis, EuclideanSpace.basisFun_apply, |
| 229 | Trivialization.linearEquivAt_symm_apply] |
| 230 | _ = e.symmL ℝ y (EuclideanSpace.single i 1) := (e.symmL_apply hy _).symm |
| 231 | have hfd : fderiv ℝ (fun u => q (c.symm u)) w (EuclideanSpace.single i 1) = |
| 232 | mvfderiv (𝓡 n) q y (e.symmL ℝ y (EuclideanSpace.single i 1)) := by |
| 233 | rw [← mfderiv_eq_fderiv] |
| 234 | change mvfderiv 𝓘(ℝ, V) (q ∘ c.symm) w (EuclideanSpace.single i 1) = _ |
| 235 | erw [mvfderiv_comp_apply w |
| 236 | ((hq.contMDiffAt (e.open_baseSet.mem_nhds hy)).mdifferentiableAt (by simp)) |
| 237 | ((hcs hw).mdifferentiableAt (by simp)) (EuclideanSpace.single i 1), ← he] |
| 238 | rfl |
| 239 | exact (congrArg (mvfderiv (𝓡 n) q y) hframe).trans hfd.symm |
| 240 | have hdSmooth (j : Fin n) : C (d (E j) f) := by |
| 241 | have hprod : ContMDiffOn (𝓘(ℝ, ℝ).prod (𝓡 n)) 𝓘(ℝ, ℝ) ∞ |
| 242 | (fun p : ℝ × M => f p.2) (univ ×ˢ e.baseSet) := |
| 243 | hf.comp contMDiffOn_snd (fun _ hp => hp.2) |
| 244 | have hh := contMDiffOn_family_spatial_mvfderiv (f := fun _ : ℝ => f) |
| 245 | e.open_baseSet hprod (E j) |
| 246 | (e.contMDiffOn_localFrame_baseSet (I := 𝓡 n) ∞ cb j) |
| 247 | exact hh.comp |
| 248 | (show ContMDiffOn (𝓡 n) (𝓘(ℝ, ℝ).prod (𝓡 n)) ∞ |
| 249 | (fun y : M => ((0 : ℝ), y)) e.baseSet from |
| 250 | contMDiffOn_const.prodMk contMDiffOn_id) |
| 251 | (fun y hy => ⟨mem_univ (0 : ℝ), hy⟩) |
| 252 | have hfirst (i : Fin n) : mvfderiv (𝓡 n) f x (E i x) = 0 := by |
| 253 | have hh := hchart f hf hz i |
| 254 | rw [c.left_inv hxc] at hh |
| 255 | change mvfderiv (𝓡 n) f x (E i x) = fderiv ℝ F z (EuclideanSpace.single i 1) at hh |
| 256 | rw [hh, hFmax.fderiv_eq_zero] |
| 257 | rfl |
| 258 | have hzero (v : TangentSpace (𝓡 n) x) : mvfderiv (𝓡 n) f x v = 0 := by |
| 259 | have hv := e.eq_sum_localFrameCoeff_smul (I := 𝓡 n) (b := cb) |
| 260 | (s := FiberBundle.extend V v) hx |
| 261 | rw [FiberBundle.extend_apply_self] at hv |
| 262 | change v = ∑ i, theta i x v • E i x at hv |
| 263 | rw [hv, map_sum] |
| 264 | simp only [map_smul, smul_eq_mul, hfirst, mul_zero, Finset.sum_const_zero] |
| 265 | have hsecond (i j : Fin n) : d (E i) (d (E j) f) x = |
| 266 | H (EuclideanSpace.single i 1) (EuclideanSpace.single j 1) := by |
| 267 | have hh := hchart (d (E j) f) (hdSmooth j) hz i |
| 268 | rw [c.left_inv hxc] at hh |
| 269 | have heq : (fun w => d (E j) f (c.symm w)) =ᶠ[𝓝 z] |
| 270 | (fun w => fderiv ℝ F w (EuclideanSpace.single j 1)) := |
| 271 | Filter.eventuallyEq_of_mem (c.open_target.mem_nhds hz) |
| 272 | (fun w hw => hchart f hf hw j) |
| 273 | rw [hh, heq.fderiv_eq] |
| 274 | have heval := hD.hasFDerivAt.clm_apply |
| 275 | (hasFDerivAt_const (𝕜 := ℝ) (EuclideanSpace.single j 1) z) |
| 276 | have hv := congrArg (fun L => L (EuclideanSpace.single i 1)) heval.fderiv |
| 277 | simpa only [H, add_apply, ContinuousLinearMap.comp_apply, zero_apply, map_zero, |
| 278 | zero_add, ContinuousLinearMap.flip_apply] using hv |
| 279 | have hreal (phi : ℝ → ℝ) (hc : ContinuousAt phi 0) (hm : IsLocalMax phi 0) : |
| 280 | deriv (deriv phi) 0 ≤ 0 := by |
| 281 | by_contra hn |
| 282 | have hp : 0 < deriv (deriv phi) 0 := lt_of_not_ge hn |
| 283 | have hmin := isLocalMin_of_deriv_deriv_pos hp hm.deriv_eq_zero hc |
| 284 | have heq : phi =ᶠ[𝓝 (0 : ℝ)] (fun _ => phi 0) := |
| 285 | eventuallyEq_of_isMinFilter_of_isMaxFilter hmin hm |
| 286 | have hz0 : deriv (deriv phi) 0 = 0 := by |
| 287 | rw [heq.deriv.deriv_eq] |
| 288 | simp only [deriv_const'] |
| 289 | exact hp.ne' hz0 |
| 290 | have hdiag (v : V) : H v v ≤ 0 := by |
| 291 | let line : ℝ → V := fun s => z + s • v |
| 292 | have hl (s : ℝ) : HasDerivAt line v s := by |
| 293 | simpa only [line, one_smul, id_eq] using! |
| 294 | ((hasDerivAt_id s).smul_const v).const_add z |
| 295 | have hlzero : line 0 = z := by simp only [line, zero_smul, add_zero] |
| 296 | have hlmem : line 0 ∈ c.target := by rw [hlzero]; exact hz |
| 297 | have hm : IsLocalMax (F ∘ line) 0 := |
| 298 | (show IsLocalMax F (line 0) by rw [hlzero]; exact hFmax).comp_continuous |
| 299 | (hl 0).continuousAt |
| 300 | have heq : deriv (F ∘ line) =ᶠ[𝓝 (0 : ℝ)] |
| 301 | (fun s => fderiv ℝ F (line s) v) := by |
| 302 | filter_upwards [(hl 0).continuousAt.preimage_mem_nhds |
| 303 | (c.open_target.mem_nhds hlmem)] with s hs |
| 304 | exact (((hF hs).differentiableAt (by simp)).hasFDerivAt.comp_hasDerivAt s (hl s)).deriv |
| 305 | have hd : DifferentiableAt ℝ (fderiv ℝ F) (line 0) := by |
| 306 | rw [hlzero] |
| 307 | exact hD |
| 308 | have heval := (hd.hasFDerivAt.comp_hasDerivAt 0 (hl 0)).clm_apply |
| 309 | (hasDerivAt_const 0 v) |
| 310 | have heval' : HasDerivAt (fun s => fderiv ℝ F (line s) v) (H v v) 0 := by |
| 311 | simpa only [hlzero, H, map_zero, add_zero, Function.comp_def] using! heval |
| 312 | have hsd : deriv (deriv (F ∘ line)) 0 = H v v := |
| 313 | heq.deriv_eq.trans heval'.deriv |
| 314 | rw [← hsd] |
| 315 | exact hreal (F ∘ line) ((hF hlmem).continuousAt.comp (hl 0).continuousAt) hm |
| 316 | let b := g.orthonormalBasis x |
| 317 | let w : Fin (Module.finrank ℝ (TangentSpace (𝓡 n) x)) → V := |
| 318 | fun r => ∑ i : Fin n, theta i x (b r) • EuclideanSpace.single i 1 |
| 319 | have htrace (i j : Fin n) : a i j = ∑ r, theta i x (b r) * theta j x (b r) := |
| 320 | metric_inverse_eq_sum_orthonormal_coordinates g x0 x hx i j |
| 321 | have hexpand (r : Fin (Module.finrank ℝ (TangentSpace (𝓡 n) x))) : |
| 322 | H (w r) (w r) = ∑ i : Fin n, ∑ j : Fin n, |
| 323 | (theta i x (b r) * theta j x (b r)) * |
| 324 | H (EuclideanSpace.single i 1) (EuclideanSpace.single j 1) := by |
| 325 | dsimp only [w] |
| 326 | simp only [map_sum, map_smul, sum_apply, smul_apply, smul_eq_mul, Finset.mul_sum] |
| 327 | rw [Finset.sum_comm] |
| 328 | apply Finset.sum_congr rfl |
| 329 | intro i _ |
| 330 | apply Finset.sum_congr rfl |
| 331 | intro j _ |
| 332 | ring |
| 333 | have hcontract : (∑ i, ∑ j, a i j * |
| 334 | H (EuclideanSpace.single i 1) (EuclideanSpace.single j 1)) = |
| 335 | ∑ r, H (w r) (w r) := by |
| 336 | simp only [htrace, Finset.sum_mul, hexpand] |
| 337 | calc |
| 338 | _ = ∑ i : Fin n, ∑ r, ∑ j : Fin n, |
| 339 | (theta i x (b r) * theta j x (b r)) * |
| 340 | H (EuclideanSpace.single i 1) (EuclideanSpace.single j 1) := by |
| 341 | apply Finset.sum_congr rfl |
| 342 | intro i _ |
| 343 | exact Finset.sum_comm |
| 344 | _ = _ := Finset.sum_comm |
| 345 | change (∑ i, ∑ j, a i j * |
| 346 | (d (E i) (d (E j) f) x - d (N (E i) (E j)) f x)) ≤ 0 |
| 347 | have hcorrection (i j : Fin n) : d (N (E i) (E j)) f x = 0 := hzero _ |
| 348 | simp only [hsecond, hcorrection, sub_zero] |
| 349 | rw [hcontract] |
| 350 | exact Finset.sum_nonpos (fun r _ => hdiag (w r)) |
| 351 | |
| 352 | theorem scalar_shifted_exp_bound_of_max_deriv |
| 353 | {N : Type*} [TopologicalSpace N] [CompactSpace N] |
| 354 | (q : ℝ → N → ℝ) {a b A L : ℝ} (hab : a ≤ b) |
| 355 | (hcont : ContinuousOn (fun p : ℝ × N => q p.1 p.2) |
| 356 | (Icc a b ×ˢ univ)) |
| 357 | (hdiff : ∀ s ∈ Ioc a b, ∀ x : N, |
| 358 | DifferentiableAt ℝ (fun r => q r x) s) |
| 359 | (hmaxrate : ∀ s ∈ Ioc a b, ∀ x : N, |
| 360 | IsLocalMax (q s) x → |
| 361 | deriv (fun r => q r x) s ≤ L * (q s x + 1)) |
| 362 | (hinitial : ∀ x : N, q a x ≤ A) : |
| 363 | ∀ x : N, q b x + 1 ≤ (A + 1) * Real.exp (L * (b - a)) := by |
| 364 | classical |
| 365 | intro x |
| 366 | rcases eq_or_lt_of_le hab with heq | hab |
| 367 | · subst b |
| 368 | simpa only [sub_self, mul_zero, Real.exp_zero, mul_one] using |
| 369 | add_le_add (hinitial x) (le_refl (1 : ℝ)) |
| 370 | let v := fun (s : ℝ) (y : N) => Real.exp (-L * (s - a)) * (q s y + 1) |
| 371 | have hv : v b x ≤ A + 1 := by |
| 372 | by_contra hnot |
| 373 | have hgap : A + 1 < v b x := lt_of_not_ge hnot |
| 374 | let eps := (v b x - (A + 1)) / (2 * (b - a)) |
| 375 | have heps : 0 < eps := div_pos (sub_pos.mpr hgap) (by linarith) |
| 376 | have hepsmul : 2 * (eps * (b - a)) = v b x - (A + 1) := by |
| 377 | dsimp only [eps] |
| 378 | field_simp [ne_of_gt (sub_pos.mpr hab)] |
| 379 | let w := fun p : ℝ × N => v p.1 p.2 - eps * (p.1 - a) |
| 380 | let slab := Icc a b ×ˢ (univ : Set N) |
| 381 | have hwgt : A + 1 < w (b, x) := by |
| 382 | change A + 1 < v b x - eps * (b - a) |
| 383 | linarith only [hepsmul, hgap] |
| 384 | have hecont : Continuous (fun p : ℝ × N => Real.exp (-L * (p.1 - a))) := by |
| 385 | fun_prop |
| 386 | have helin : Continuous (fun p : ℝ × N => eps * (p.1 - a)) := by fun_prop |
| 387 | have hwcont : ContinuousOn w slab := |
| 388 | (hecont.continuousOn.mul (hcont.add continuousOn_const)).sub helin.continuousOn |
| 389 | have hslab : IsCompact slab := isCompact_Icc.prod isCompact_univ |
| 390 | have hbx : (b, x) ∈ slab := ⟨⟨hab.le, le_rfl⟩, mem_univ x⟩ |
| 391 | obtain ⟨p, hp, hmax⟩ := hslab.exists_isMaxOn ⟨(b, x), hbx⟩ hwcont |
| 392 | have hpgt : A + 1 < w p := hwgt.trans_le (isMaxOn_iff.mp hmax (b, x) hbx) |
| 393 | have hpa : a < p.1 := by |
| 394 | apply lt_of_le_of_ne hp.1.1 |
| 395 | intro heq |
| 396 | have hwa : w p = q a p.2 + 1 := by |
| 397 | dsimp only [w, v] |
| 398 | rw [← heq] |
| 399 | simp only [sub_self, mul_zero, Real.exp_zero, one_mul, sub_zero] |
| 400 | rw [hwa] at hpgt |
| 401 | exact (not_lt_of_ge (add_le_add (hinitial p.2) (le_refl (1 : ℝ)))) hpgt |
| 402 | have hpt : p.1 ∈ Ioc a b := ⟨hpa, hp.1.2⟩ |
| 403 | have hqmax : IsLocalMax (q p.1) p.2 := by |
| 404 | apply Filter.Eventually.of_forall |
| 405 | intro y |
| 406 | have hh := isMaxOn_iff.mp hmax (p.1, y) ⟨hp.1, mem_univ y⟩ |
| 407 | change Real.exp (-L * (p.1 - a)) * (q p.1 y + 1) - eps * (p.1 - a) ≤ |
| 408 | Real.exp (-L * (p.1 - a)) * (q p.1 p.2 + 1) - eps * (p.1 - a) at hh |
| 409 | exact (add_le_add_iff_right 1).mp |
| 410 | ((mul_le_mul_iff_right₀ (Real.exp_pos _)).mp ((sub_le_sub_iff_right _).mp hh)) |
| 411 | let rate := Real.exp (-L * (p.1 - a)) * |
| 412 | (deriv (fun r => q r p.2) p.1 - L * (q p.1 p.2 + 1)) - eps |
| 413 | have hwd : HasDerivAt (fun r => w (r, p.2)) rate p.1 := by |
| 414 | have he := (((hasDerivAt_id p.1).sub_const a).const_mul (-L)).exp |
| 415 | have hl := ((hasDerivAt_id p.1).sub_const a).const_mul eps |
| 416 | convert (he.mul ((hdiff p.1 hpt p.2).hasDerivAt.add_const 1)).sub hl using 1 |
| 417 | · rfl |
| 418 | · rfl |
| 419 | · rfl |
| 420 | · dsimp only [rate, id_eq] |
| 421 | ring |
| 422 | have hrateNonneg : 0 ≤ rate := by |
| 423 | apply ge_of_tendsto (hasDerivAt_iff_tendsto_slope_left_right.mp hwd).1 |
| 424 | filter_upwards [Ico_mem_nhdsLT hpa] with r hr |
| 425 | have hh := isMaxOn_iff.mp hmax (r, p.2) |
| 426 | ⟨⟨hr.1, hr.2.le.trans hp.1.2⟩, mem_univ p.2⟩ |
| 427 | rw [slope_def_field] |
| 428 | exact div_nonneg_of_nonpos (sub_nonpos.mpr hh) (sub_nonpos.mpr hr.2.le) |
| 429 | have hrateNeg : rate < 0 := by |
| 430 | have hh := hmaxrate p.1 hpt p.2 hqmax |
| 431 | have hm := mul_nonpos_of_nonneg_of_nonpos (Real.exp_pos (-L * (p.1 - a))).le |
| 432 | (sub_nonpos.mpr hh) |
| 433 | dsimp only [rate] |
| 434 | linarith only [hm, heps] |
| 435 | exact (not_lt_of_ge hrateNonneg) hrateNeg |
| 436 | calc |
| 437 | q b x + 1 = Real.exp (L * (b - a)) * v b x := by |
| 438 | dsimp only [v] |
| 439 | rw [← mul_assoc, ← Real.exp_add] |
| 440 | have he : L * (b - a) + -L * (b - a) = 0 := by ring |
| 441 | rw [he, Real.exp_zero, one_mul] |
| 442 | _ ≤ Real.exp (L * (b - a)) * (A + 1) := |
| 443 | mul_le_mul_of_nonneg_left hv (Real.exp_pos _).le |
| 444 | _ = (A + 1) * Real.exp (L * (b - a)) := mul_comm _ _ |
| 445 | |
| 446 | theorem contDiffOn_fderiv_family |
| 447 | {E F : Type u} [NormedAddCommGroup E] [NormedSpace ℝ E] |
| 448 | [NormedAddCommGroup F] [NormedSpace ℝ F] |
| 449 | {J : Set ℝ} {U : Set E} (hJ : IsOpen J) (hU : IsOpen U) |
| 450 | (f : ℝ → E → F) |
| 451 | (hf : ContDiffOn ℝ ∞ (Function.uncurry f) (J ×ˢ U)) : |
| 452 | ContDiffOn ℝ ∞ (fun p : ℝ × E => fderiv ℝ (f p.1) p.2) (J ×ˢ U) := by |
| 453 | have hD := hf.fderiv_of_isOpen (hJ.prod hU) (m := ∞) (by simp) |
| 454 | apply (hD.clm_comp (contDiffOn_const (c := ContinuousLinearMap.inr ℝ ℝ E))).congr |
| 455 | intro p hp |
| 456 | have hd := ((hf.contDiffAt ((hJ.prod hU).mem_nhds hp)).differentiableAt |
| 457 | (by simp)).hasFDerivAt.comp p.2 |
| 458 | ((hasFDerivAt_const (𝕜 := ℝ) p.1 p.2).prodMk (hasFDerivAt_id p.2)) |
| 459 | simpa only [Function.comp_def, Function.uncurry_apply_pair, id_eq, |
| 460 | ContinuousLinearMap.inr] using hd.fderiv |
| 461 | |
| 462 | theorem hasDerivAt_fderiv_family |
| 463 | {E F : Type u} [NormedAddCommGroup E] [NormedSpace ℝ E] |
| 464 | [NormedAddCommGroup F] [NormedSpace ℝ F] |
| 465 | {J : Set ℝ} {U : Set E} (hJ : IsOpen J) (hU : IsOpen U) |
| 466 | (f : ℝ → E → F) |
| 467 | (hf : ContDiffOn ℝ ∞ (Function.uncurry f) (J ×ˢ U)) |
| 468 | {t : ℝ} (ht : t ∈ J) {x : E} (hx : x ∈ U) : |
| 469 | HasDerivAt (fun s => fderiv ℝ (f s) x) |
| 470 | (fderiv ℝ (fun y => deriv (fun s => f s y) t) x) t := by |
| 471 | let H := Function.uncurry f |
| 472 | have hH (s : ℝ) (hs : s ∈ J) (y : E) (hy : y ∈ U) : |
| 473 | ContDiffAt ℝ ∞ H (s, y) := |
| 474 | hf.contDiffAt ((hJ.prod hU).mem_nhds ⟨hs, hy⟩) |
| 475 | have hD : DifferentiableAt ℝ (fderiv ℝ H) (t, x) := |
| 476 | ((hH t ht x hx).fderiv_right (m := 1) |
| 477 | (WithTop.coe_le_coe.mpr (le_top : (2 : ℕ∞) ≤ ⊤))).differentiableAt (by norm_num) |
| 478 | have htimeSlice (y : E) : HasDerivAt (fun s : ℝ => (s, y)) (1, 0) t := by |
| 479 | simpa using ((hasFDerivAt_id (𝕜 := ℝ) t).prodMk |
| 480 | (hasFDerivAt_const (𝕜 := ℝ) y t)).hasDerivAt |
| 481 | have hspace (s : ℝ) (hs : s ∈ J) : |
| 482 | fderiv ℝ (f s) x = (fderiv ℝ H (s, x)).comp (ContinuousLinearMap.inr ℝ ℝ E) := by |
| 483 | have hd := ((hH s hs x hx).differentiableAt (by simp)).hasFDerivAt.comp x |
| 484 | ((hasFDerivAt_const (𝕜 := ℝ) s x).prodMk (hasFDerivAt_id x)) |
| 485 | simpa only [H, Function.comp_def, Function.uncurry_apply_pair, id_eq, |
| 486 | ContinuousLinearMap.inr] using hd.fderiv |
| 487 | have htime : HasDerivAt |
| 488 | (fun s => (fderiv ℝ H (s, x)).comp (ContinuousLinearMap.inr ℝ ℝ E)) |
| 489 | ((fderiv ℝ (fderiv ℝ H) (t, x) (1, 0)).comp (ContinuousLinearMap.inr ℝ ℝ E)) t := by |
| 490 | simpa only [Function.comp_def, ContinuousLinearMap.comp_zero, add_zero] using |
| 491 | (hD.hasFDerivAt.comp_hasDerivAt t (htimeSlice x)).clm_comp |
| 492 | (hasDerivAt_const t (ContinuousLinearMap.inr ℝ ℝ E)) |
| 493 | have hspaceTime (w : E) : |
| 494 | fderiv ℝ (fun y => fderiv ℝ H (t, y) (1, 0)) x w = |
| 495 | fderiv ℝ (fderiv ℝ H) (t, x) (0, w) (1, 0) := by |
| 496 | have hd := hD.hasFDerivAt.comp x |
| 497 | ((hasFDerivAt_const (𝕜 := ℝ) t x).prodMk (hasFDerivAt_id x)) |
| 498 | have ha := hd.clm_apply (hasFDerivAt_const (𝕜 := ℝ) (1, (0 : E)) x) |
| 499 | have hv := congrArg (fun L => L w) ha.fderiv |
| 500 | simpa only [Function.comp_def, add_apply, ContinuousLinearMap.comp_apply, |
| 501 | zero_apply, map_zero, zero_add, ContinuousLinearMap.flip_apply, |
| 502 | ContinuousLinearMap.prod_apply, ContinuousLinearMap.id_apply] using hv |
| 503 | have hQ : (fun y => deriv (fun s => f s y) t) =ᶠ[𝓝 x] |
| 504 | (fun y => fderiv ℝ H (t, y) (1, 0)) := by |
| 505 | filter_upwards [hU.mem_nhds hx] with y hy |
| 506 | exact (((hH t ht y hy).differentiableAt (by simp)).hasFDerivAt.comp_hasDerivAt t |
| 507 | (htimeSlice y)).deriv |
| 508 | have hslice : (fun s => fderiv ℝ (f s) x) =ᶠ[𝓝 t] |
| 509 | (fun s => (fderiv ℝ H (s, x)).comp (ContinuousLinearMap.inr ℝ ℝ E)) := by |
| 510 | filter_upwards [hJ.mem_nhds ht] with s hs |
| 511 | exact hspace s hs |
| 512 | apply (htime.congr_of_eventuallyEq hslice).congr_deriv |
| 513 | ext w |
| 514 | change fderiv ℝ (fderiv ℝ H) (t, x) (1, 0) (0, w) = _ |
| 515 | have hsymm := (hH t ht x hx).isSymmSndFDerivAt (by |
| 516 | rw [minSmoothness_of_isRCLikeNormedField] |
| 517 | exact WithTop.coe_le_coe.mpr (le_top : (2 : ℕ∞) ≤ ⊤)) |
| 518 | rw [hsymm.eq (1, 0) (0, w), ← hspaceTime, ← hQ.fderiv_eq] |
| 519 | |
| 520 | theorem hasDerivAt_iteratedFDeriv_family |
| 521 | {E F : Type u} [NormedAddCommGroup E] [NormedSpace ℝ E] |
| 522 | [NormedAddCommGroup F] [NormedSpace ℝ F] |
| 523 | {J : Set ℝ} {U : Set E} (hJ : IsOpen J) (hU : IsOpen U) |
| 524 | (f : ℝ → E → F) |
| 525 | (hf : ContDiffOn ℝ ∞ (Function.uncurry f) (J ×ˢ U)) |
| 526 | (k : ℕ) {t : ℝ} (ht : t ∈ J) {x : E} (hx : x ∈ U) : |
| 527 | HasDerivAt (fun s => iteratedFDeriv ℝ k (f s) x) |
| 528 | (iteratedFDeriv ℝ k (fun y => deriv (fun s => f s y) t) x) t := by |
| 529 | induction k generalizing F with |
| 530 | | zero => |
| 531 | have hs : DifferentiableAt ℝ (fun s => f s x) t := |
| 532 | ((hf.contDiffAt ((hJ.prod hU).mem_nhds ⟨ht, hx⟩)).comp t |
| 533 | (contDiffAt_id.prodMk contDiffAt_const)).differentiableAt (by simp) |
| 534 | exact (continuousMultilinearCurryFin0 ℝ E F).symm.toContinuousLinearEquiv.toContinuousLinearMap |
| 535 | |>.hasFDerivAt.comp_hasDerivAt t hs.hasDerivAt |
| 536 | | succ k ih => |
| 537 | have hg := contDiffOn_fderiv_family hJ hU f hf |
| 538 | have hd := ih (fun s => fderiv ℝ (f s)) hg |
| 539 | have he : (fun y => deriv (fun s => fderiv ℝ (f s) y) t) =ᶠ[𝓝 x] |
| 540 | (fun y => fderiv ℝ (fun z => deriv (fun s => f s z) t) y) := by |
| 541 | filter_upwards [hU.mem_nhds hx] with y hy |
| 542 | exact (hasDerivAt_fderiv_family hJ hU f hf ht hy).deriv |
| 543 | have heq := (he.iteratedFDeriv (𝕜 := ℝ) k).eq_of_nhds |
| 544 | have hc := (continuousMultilinearCurryRightEquiv' ℝ k E F).symm.toContinuousLinearEquiv |
| 545 | |>.toContinuousLinearMap.hasFDerivAt.comp_hasDerivAt t hd |
| 546 | simpa only [ContinuousLinearEquiv.coe_coe, LinearIsometryEquiv.coe_toContinuousLinearEquiv, |
| 547 | Function.comp_def, heq, iteratedFDeriv_succ_eq_comp_right] using hc |
| 548 | |
| 549 | open Filter |
| 550 | |
| 551 | /-- Compact-local time control of every spatial jet constructs a smooth terminal value. -/ |
| 552 | theorem exists_contDiffOn_limit_of_iteratedFDeriv_time_lipschitz |
| 553 | {n : ℕ} {U : Set (EuclideanSpace ℝ (Fin n))} (hU : IsOpen U) |
| 554 | {a T : ℝ} (haT : a < T) |
| 555 | (f : ℝ → EuclideanSpace ℝ (Fin n) → ℝ) |
| 556 | (hf : ∀ s ∈ Ico a T, ContDiffOn ℝ ∞ (f s) U) |
| 557 | (hjet : ∀ q : ℕ, ∀ K : Set (EuclideanSpace ℝ (Fin n)), |
| 558 | IsCompact K → K ⊆ U → ∃ L : ℝ, 0 ≤ L ∧ |
| 559 | ∀ s ∈ Ico a T, ∀ t ∈ Ico a T, ∀ x ∈ K, |
| 560 | ‖iteratedFDeriv ℝ q (f t) x - iteratedFDeriv ℝ q (f s) x‖ ≤ |
| 561 | L * |t - s|) : |
| 562 | ∃ fT : EuclideanSpace ℝ (Fin n) → ℝ, |
| 563 | ContDiffOn ℝ ∞ fT U ∧ |
| 564 | ∀ q : ℕ, ∀ K : Set (EuclideanSpace ℝ (Fin n)), |
| 565 | IsCompact K → K ⊆ U → |
| 566 | (∃ L : ℝ, 0 ≤ L ∧ ∀ s ∈ Ico a T, ∀ x ∈ K, |
| 567 | ‖iteratedFDeriv ℝ q (f s) x - iteratedFDeriv ℝ q fT x‖ ≤ |
| 568 | L * (T - s)) ∧ |
| 569 | TendstoUniformlyOn (fun s x => iteratedFDeriv ℝ q (f s) x) |
| 570 | (iteratedFDeriv ℝ q fT) (𝓝[<] T) K := by |
| 571 | classical |
| 572 | let V := EuclideanSpace ℝ (Fin n) |
| 573 | let l : Filter ℝ := 𝓝[<] T |
| 574 | let Jq := fun (q : ℕ) (s : ℝ) (x : V) => iteratedFDeriv ℝ q (f s) x |
| 575 | have hdom : ∀ᶠ s in l, s ∈ Ico a T := Ico_mem_nhdsLT haT |
| 576 | have hid : Tendsto (fun s : ℝ => s) l (𝓝 T) := |
| 577 | continuous_id.continuousAt.tendsto.mono_left nhdsWithin_le_nhds |
| 578 | have hlim (q : ℕ) (x : V) (hx : x ∈ U) : |
| 579 | ∃ p : ContinuousMultilinearMap ℝ (fun _ : Fin q => V) ℝ, |
| 580 | Tendsto (fun s => Jq q s x) l (𝓝 p) := by |
| 581 | obtain ⟨L, hL, hb⟩ := hjet q {x} isCompact_singleton (singleton_subset_iff.mpr hx) |
| 582 | apply cauchy_map_iff_exists_tendsto.mp |
| 583 | refine Metric.cauchy_iff.mpr ⟨inferInstance, ?_⟩ |
| 584 | intro ε hε |
| 585 | let δ := ε / (2 * (L + 1)) |
| 586 | have hδ : 0 < δ := div_pos hε (by positivity) |
| 587 | have hc : max a (T - δ) < T := max_lt haT (by linarith) |
| 588 | have hS : Ioo (max a (T - δ)) T ∈ l := Ioo_mem_nhdsLT hc |
| 589 | refine ⟨(fun s => Jq q s x) '' Ioo (max a (T - δ)) T, image_mem_map hS, ?_⟩ |
| 590 | rintro v ⟨s, hs, rfl⟩ w ⟨t, ht, rfl⟩ |
| 591 | have hsJ : s ∈ Ico a T := ⟨(le_max_left _ _).trans hs.1.le, hs.2⟩ |
| 592 | have htJ : t ∈ Ico a T := ⟨(le_max_left _ _).trans ht.1.le, ht.2⟩ |
| 593 | have hsδ : T - s < δ := by have := (le_max_right a (T - δ)).trans_lt hs.1; linarith |
| 594 | have htδ : T - t < δ := by have := (le_max_right a (T - δ)).trans_lt ht.1; linarith |
| 595 | have habs : |s - t| ≤ (T - s) + (T - t) := |
| 596 | abs_le.mpr ⟨by linarith [ht.2], by linarith [hs.2]⟩ |
| 597 | calc |
| 598 | dist (Jq q s x) (Jq q t x) = ‖Jq q s x - Jq q t x‖ := dist_eq_norm _ _ |
| 599 | _ ≤ L * |s - t| := hb t htJ s hsJ x (mem_singleton x) |
| 600 | _ ≤ (L + 1) * |s - t| := mul_le_mul_of_nonneg_right (by linarith) (abs_nonneg _) |
| 601 | _ ≤ (L + 1) * ((T - s) + (T - t)) := mul_le_mul_of_nonneg_left habs (by positivity) |
| 602 | _ < (L + 1) * (2 * δ) := mul_lt_mul_of_pos_left (by linarith) (by positivity) |
| 603 | _ = ε := by dsimp only [δ]; field_simp |
| 604 | let P := fun (q : ℕ) (x : V) => if hx : x ∈ U then (hlim q x hx).choose else 0 |
| 605 | have hP (q : ℕ) (x : V) (hx : x ∈ U) : |
| 606 | Tendsto (fun s => Jq q s x) l (𝓝 (P q x)) := by |
| 607 | simpa only [P, dif_pos hx] using (hlim q x hx).choose_spec |
| 608 | have hcontrol (q : ℕ) (K : Set V) (hK : IsCompact K) (hKU : K ⊆ U) : |
| 609 | (∃ L : ℝ, 0 ≤ L ∧ ∀ s ∈ Ico a T, ∀ x ∈ K, |
| 610 | ‖Jq q s x - P q x‖ ≤ L * (T - s)) ∧ |
| 611 | TendstoUniformlyOn (fun s x => Jq q s x) (P q) l K := by |
| 612 | obtain ⟨L, hL, hb⟩ := hjet q K hK hKU |
| 613 | have hbound (s : ℝ) (hs : s ∈ Ico a T) (x : V) (hx : x ∈ K) : |
| 614 | ‖Jq q s x - P q x‖ ≤ L * (T - s) := by |
| 615 | have hn : Tendsto (fun t => ‖Jq q s x - Jq q t x‖) l |
| 616 | (𝓝 ‖Jq q s x - P q x‖) := |
| 617 | (tendsto_const_nhds.sub (hP q x (hKU hx))).norm |
| 618 | have hr : Tendsto (fun t => L * |t - s|) l (𝓝 (L * |T - s|)) := |
| 619 | tendsto_const_nhds.mul ((hid.sub tendsto_const_nhds).abs) |
| 620 | have hh : ‖Jq q s x - P q x‖ ≤ L * |T - s| := |
| 621 | le_of_tendsto_of_tendsto hn hr (by |
| 622 | filter_upwards [hdom] with t ht |
| 623 | simpa only [norm_sub_rev] using hb s hs t ht x hx) |
| 624 | simpa only [abs_of_nonneg (sub_nonneg.mpr hs.2.le)] using hh |
| 625 | refine ⟨⟨L, hL, hbound⟩, ?_⟩ |
| 626 | rw [Metric.tendstoUniformlyOn_iff] |
| 627 | intro ε hε |
| 628 | let δ := ε / (L + 1) |
| 629 | have hδ : 0 < δ := div_pos hε (by positivity) |
| 630 | filter_upwards [hdom, Ioo_mem_nhdsLT (show T - δ < T by linarith)] with s hs hsδ |
| 631 | intro x hx |
| 632 | have hnear : T - s < δ := by linarith [hsδ.1] |
| 633 | calc |
| 634 | dist (P q x) (Jq q s x) = ‖Jq q s x - P q x‖ := by rw [dist_eq_norm, norm_sub_rev] |
| 635 | _ ≤ L * (T - s) := hbound s hs x hx |
| 636 | _ ≤ (L + 1) * (T - s) := mul_le_mul_of_nonneg_right (by linarith) (sub_nonneg.mpr hs.2.le) |
| 637 | _ < (L + 1) * δ := mul_lt_mul_of_pos_left hnear (by positivity) |
| 638 | _ = ε := by dsimp only [δ]; field_simp |
| 639 | have hlocal (q : ℕ) : TendstoLocallyUniformlyOn (fun s x => Jq q s x) (P q) l U := |
| 640 | (tendstoLocallyUniformlyOn_iff_forall_isCompact hU).mpr |
| 641 | (fun K hKU hK => (hcontrol q K hK hKU).2) |
| 642 | have hderiv (q : ℕ) (x : V) (hx : x ∈ U) : |
| 643 | HasFDerivAt (P q) (P (q + 1) x).curryLeft x := by |
| 644 | let curry := continuousMultilinearCurryLeftEquiv ℝ (fun _ : Fin (q + 1) => V) ℝ |
| 645 | have hu := (tendstoLocallyUniformlyOn_iff_filter.mp (hlocal (q + 1))) x hx |
| 646 | rw [hU.nhdsWithin_eq hx] at hu |
| 647 | have hdu : TendstoUniformlyOnFilter |
| 648 | (fun s y => (Jq (q + 1) s y).curryLeft) |
| 649 | (fun y => (P (q + 1) y).curryLeft) l (𝓝 x) := by |
| 650 | exact curry.toContinuousLinearEquiv.toContinuousLinearMap.uniformContinuous.comp_tendstoUniformlyOnFilter hu |
| 651 | apply hasFDerivAt_of_tendstoUniformlyOnFilter (f := fun s => Jq q s) hdu |
| 652 | · filter_upwards [hdom.prod_mk (hU.mem_nhds hx)] with p hp |
| 653 | have hd := ((hf p.1 hp.1).contDiffAt (hU.mem_nhds hp.2)).differentiableAt_iteratedFDeriv |
| 654 | (show (q : ℕ∞ω) < ∞ from WithTop.coe_lt_coe.mpr (WithTop.coe_lt_top q)) |
| 655 | have hd' := hd.hasFDerivAt |
| 656 | rw [fderiv_iteratedFDeriv] at hd' |
| 657 | exact hd' |
| 658 | · filter_upwards [hU.mem_nhds hx] with y hy |
| 659 | exact hP q y hy |
| 660 | let fT := fun x : V => (P 0 x).curry0 |
| 661 | have htaylor : HasFTaylorSeriesUpToOn (∞ : ℕ∞ω) fT (fun x q => P q x) U := by |
| 662 | refine ⟨fun _ _ => rfl, ?_, ?_⟩ |
| 663 | · intro q _ x hx |
| 664 | exact (hderiv q x hx).hasFDerivWithinAt |
| 665 | · intro q _ x hx |
| 666 | exact (hderiv q x hx).continuousAt.continuousWithinAt |
| 667 | have hpeq (q : ℕ) (x : V) (hx : x ∈ U) : P q x = iteratedFDeriv ℝ q fT x := by |
| 668 | have hh := htaylor.eq_iteratedFDerivWithin_of_uniqueDiffOn |
| 669 | (show (q : ℕ∞ω) ≤ ∞ from WithTop.coe_le_coe.mpr le_top) hU.uniqueDiffOn hx |
| 670 | simpa only [iteratedFDerivWithin_of_isOpen _ hU hx] using hh |
| 671 | refine ⟨fT, htaylor.contDiffOn, ?_⟩ |
| 672 | intro q K hK hKU |
| 673 | obtain ⟨⟨L, hL, hb⟩, hu⟩ := hcontrol q K hK hKU |
| 674 | constructor |
| 675 | · refine ⟨L, hL, ?_⟩ |
| 676 | intro s hs x hx |
| 677 | simpa only [hpeq q x (hKU hx)] using hb s hs x hx |
| 678 | · apply hu.congr_right |
| 679 | intro x hx |
| 680 | exact hpeq q x (hKU hx) |
| 681 | |
| 682 | set_option synthInstance.maxHeartbeats 200000 in |
| 683 | /-- Spatial jets and their evolution recover joint smoothness across a missing time. -/ |
| 684 | theorem contDiffOn_of_spatial_jet_evolution |
| 685 | {E F : Type u} {ι : Type v} |
| 686 | [NormedAddCommGroup E] [NormedSpace ℝ E] |
| 687 | [NormedAddCommGroup F] [NormedSpace ℝ F] |
| 688 | {U : Set E} (hU : IsOpen U) {a T b : ℝ} |
| 689 | (haT : a < T) (hTb : T < b) |
| 690 | (f r : ι → ℝ → E → F) |
| 691 | (hspatial : ∀ i t, t ∈ Ioo a b → ContDiffOn ℝ ∞ (f i t) U) |
| 692 | (hjets : ∀ i q, ContinuousOn |
| 693 | (fun p : ℝ × E => iteratedFDeriv ℝ q (f i p.1) p.2) |
| 694 | (Ioo a b ×ˢ U)) |
| 695 | (htime : ∀ i q t, t ∈ Ioo a b → t ≠ T → ∀ x ∈ U, |
| 696 | HasDerivAt (fun s => iteratedFDeriv ℝ q (f i s) x) |
| 697 | (iteratedFDeriv ℝ q (r i t) x) t) |
| 698 | (hr : ∀ k : ℕ, |
| 699 | (∀ i q, ContDiffOn ℝ k |
| 700 | (fun p : ℝ × E => iteratedFDeriv ℝ q (f i p.1) p.2) |
| 701 | (Ioo a b ×ˢ U)) → |
| 702 | ∀ i q, ContDiffOn ℝ k |
| 703 | (fun p : ℝ × E => iteratedFDeriv ℝ q (r i p.1) p.2) |
| 704 | (Ioo a b ×ˢ U)) : |
| 705 | (∀ i q, ContDiffOn ℝ ∞ |
| 706 | (fun p : ℝ × E => iteratedFDeriv ℝ q (f i p.1) p.2) |
| 707 | (Ioo a b ×ˢ U)) ∧ |
| 708 | (∀ i, ContDiffOn ℝ ∞ (Function.uncurry (f i)) (Ioo a b ×ˢ U)) ∧ |
| 709 | (∀ i x, x ∈ U → HasDerivAt (fun s => f i s x) (r i T x) T) := by |
| 710 | let W : Set (ℝ × E) := Ioo a b ×ˢ U |
| 711 | let J := fun (i : ι) (q : ℕ) (p : ℝ × E) => iteratedFDeriv ℝ q (f i p.1) p.2 |
| 712 | let Q := fun (i : ι) (q : ℕ) (p : ℝ × E) => iteratedFDeriv ℝ q (r i p.1) p.2 |
| 713 | have hW : IsOpen W := isOpen_Ioo.prod hU |
| 714 | have hQT (i : ι) (q : ℕ) : ContinuousOn (Q i q) W := |
| 715 | (hr 0 (fun i q => contDiffOn_zero.mpr (hjets i q)) i q).continuousOn |
| 716 | have htimeFull (i : ι) (q : ℕ) (t : ℝ) (ht : t ∈ Ioo a b) |
| 717 | (x : E) (hx : x ∈ U) : |
| 718 | HasDerivAt (fun s => J i q (s, x)) (Q i q (t, x)) t := by |
| 719 | by_cases htT : t = T |
| 720 | · subst t |
| 721 | have hc : ContinuousAt (fun s => J i q (s, x)) T := |
| 722 | ((hjets i q).continuousAt (hW.mem_nhds ⟨⟨haT, hTb⟩, hx⟩)).comp |
| 723 | (continuousAt_id.prodMk continuousAt_const) |
| 724 | have hqc : ContinuousAt (fun s => Q i q (s, x)) T := |
| 725 | ((hQT i q).continuousAt (hW.mem_nhds ⟨⟨haT, hTb⟩, hx⟩)).comp |
| 726 | (continuousAt_id.prodMk continuousAt_const) |
| 727 | have hl : HasDerivWithinAt (fun s => J i q (s, x)) (Q i q (T, x)) (Iic T) T := by |
| 728 | apply hasDerivWithinAt_Iic_of_tendsto_deriv |
| 729 | (s := Ioo a T) |
| 730 | (fun s hs => (htime i q s ⟨hs.1, hs.2.trans hTb⟩ hs.2.ne x hx).differentiableAt.differentiableWithinAt) |
| 731 | hc.continuousWithinAt (Ioo_mem_nhdsLT haT) |
| 732 | apply (hqc.tendsto.mono_left nhdsWithin_le_nhds).congr' |
| 733 | filter_upwards [Ioo_mem_nhdsLT haT] with s hs |
| 734 | exact (htime i q s ⟨hs.1, hs.2.trans hTb⟩ hs.2.ne x hx).deriv.symm |
| 735 | have hh : HasDerivWithinAt (fun s => J i q (s, x)) (Q i q (T, x)) (Ici T) T := by |
| 736 | apply hasDerivWithinAt_Ici_of_tendsto_deriv |
| 737 | (s := Ioo T b) |
| 738 | (fun s hs => (htime i q s ⟨haT.trans hs.1, hs.2⟩ hs.1.ne' x hx).differentiableAt.differentiableWithinAt) |
| 739 | hc.continuousWithinAt (Ioo_mem_nhdsGT hTb) |
| 740 | apply (hqc.tendsto.mono_left nhdsWithin_le_nhds).congr' |
| 741 | filter_upwards [Ioo_mem_nhdsGT hTb] with s hs |
| 742 | exact (htime i q s ⟨haT.trans hs.1, hs.2⟩ hs.1.ne' x hx).deriv.symm |
| 743 | simpa using hl.union hh |
| 744 | · exact htime i q t ht htT x hx |
| 745 | let timeMap (q : ℕ) : (E [×q]→L[ℝ] F) →L[ℝ] (ℝ →L[ℝ] (E [×q]→L[ℝ] F)) := |
| 746 | (ContinuousLinearMap.toSpanSingletonLIE ℝ (E [×q]→L[ℝ] F)) |
| 747 | |>.toContinuousLinearEquiv.toContinuousLinearMap |
| 748 | let spaceMap (q : ℕ) : (E [×(q + 1)]→L[ℝ] F) →L[ℝ] (E →L[ℝ] (E [×q]→L[ℝ] F)) := |
| 749 | (continuousMultilinearCurryLeftEquiv ℝ (fun _ : Fin (q + 1) => E) F) |
| 750 | |>.toContinuousLinearEquiv.toContinuousLinearMap |
| 751 | let D := fun (i : ι) (q : ℕ) (p : ℝ × E) => |
| 752 | (timeMap q (Q i q p)).coprod (spaceMap q (J i (q + 1) p)) |
| 753 | have hspace (i : ι) (q : ℕ) (t : ℝ) (ht : t ∈ Ioo a b) |
| 754 | (x : E) (hx : x ∈ U) : |
| 755 | HasFDerivAt (fun y => J i q (t, y)) (spaceMap q (J i (q + 1) (t, x))) x := by |
| 756 | have hd := ((hspatial i t ht).contDiffAt (hU.mem_nhds hx)).differentiableAt_iteratedFDeriv |
| 757 | (show (q : ℕ∞ω) < ∞ from WithTop.coe_lt_coe.mpr (WithTop.coe_lt_top q)) |
| 758 | have hh := hd.hasFDerivAt |
| 759 | rw [fderiv_iteratedFDeriv] at hh |
| 760 | exact hh |
| 761 | have htimeCont (i : ι) (q : ℕ) : ContinuousOn (fun p => timeMap q (Q i q p)) W := |
| 762 | (timeMap q).continuous.comp_continuousOn (hQT i q) |
| 763 | have hspaceCont (i : ι) (q : ℕ) : |
| 764 | ContinuousOn (fun p => spaceMap q (J i (q + 1) p)) W := |
| 765 | (spaceMap q).continuous.comp_continuousOn (hjets i (q + 1)) |
| 766 | have hfull (i : ι) (q : ℕ) {p : ℝ × E} (hp : p ∈ W) : |
| 767 | HasFDerivAt (J i q) (D i q p) p := by |
| 768 | exact (hasStrictFDerivAt_uncurry_coprod |
| 769 | (f := fun t x => J i q (t, x)) |
| 770 | (f₁ := fun t x => timeMap q (Q i q (t, x))) |
| 771 | (f₂ := fun t x => spaceMap q (J i (q + 1) (t, x))) |
| 772 | (by |
| 773 | filter_upwards [hW.mem_nhds hp] with z hz |
| 774 | exact (htimeFull i q z.1 hz.1 z.2 hz.2).hasFDerivAt) |
| 775 | (by |
| 776 | filter_upwards [hW.mem_nhds hp] with z hz |
| 777 | exact hspace i q z.1 hz.1 z.2 hz.2) |
| 778 | ((htimeCont i q).continuousAt (hW.mem_nhds hp)) |
| 779 | ((hspaceCont i q).continuousAt (hW.mem_nhds hp))).hasFDerivAt |
| 780 | have hfinite (k : ℕ) : ∀ i q, ContDiffOn ℝ k (J i q) W := by |
| 781 | induction k with |
| 782 | | zero => exact fun i q => contDiffOn_zero.mpr (hjets i q) |
| 783 | | succ k ih => |
| 784 | have hQk := hr k ih |
| 785 | intro i q |
| 786 | have htk : ContDiffOn ℝ k (fun p => timeMap q (Q i q p)) W := by |
| 787 | have hmap : ContDiff ℝ (k : ℕ∞ω) (timeMap q) := |
| 788 | ContinuousLinearMap.contDiff (𝕜 := ℝ) (E := E [×q]→L[ℝ] F) |
| 789 | (F := ℝ →L[ℝ] (E [×q]→L[ℝ] F)) (timeMap q) |
| 790 | have hq : ContDiffOn ℝ k (Q i q) W := hQk i q |
| 791 | simpa only [Function.comp_def] using hmap.comp_contDiffOn hq |
| 792 | have hxk : ContDiffOn ℝ k (fun p => spaceMap q (J i (q + 1) p)) W := by |
| 793 | have hmap : ContDiff ℝ (k : ℕ∞ω) (spaceMap q) := |
| 794 | ContinuousLinearMap.contDiff (𝕜 := ℝ) (E := E [×(q + 1)]→L[ℝ] F) |
| 795 | (F := E →L[ℝ] (E [×q]→L[ℝ] F)) (spaceMap q) |
| 796 | simpa only [Function.comp_def] using hmap.comp_contDiffOn (ih i (q + 1)) |
| 797 | have hdk : ContDiffOn ℝ k (D i q) W := by |
| 798 | have hh := (htk.clm_comp (contDiffOn_const (c := ContinuousLinearMap.fst ℝ ℝ E))).add |
| 799 | (hxk.clm_comp (contDiffOn_const (c := ContinuousLinearMap.snd ℝ ℝ E))) |
| 800 | simpa only [ContinuousLinearMap.comp_fst_add_comp_snd] using hh |
| 801 | have hs : ContDiffOn ℝ ((k : ℕ∞ω) + 1) (J i q) W := by |
| 802 | apply (contDiffOn_succ_iff_fderiv_of_isOpen hW).mpr |
| 803 | refine ⟨fun p hp => (hfull i q hp).differentiableAt.differentiableWithinAt, by simp, ?_⟩ |
| 804 | exact hdk.congr (fun p hp => (hfull i q hp).fderiv) |
| 805 | simpa only [Nat.cast_add, Nat.cast_one] using hs |
| 806 | have hinfty (i : ι) (q : ℕ) : ContDiffOn ℝ ∞ (J i q) W := |
| 807 | contDiffOn_infty.mpr (fun k => hfinite k i q) |
| 808 | refine ⟨hinfty, ?_, ?_⟩ |
| 809 | · intro i |
| 810 | have hh := (continuousMultilinearCurryFin0 ℝ E F).toContinuousLinearEquiv.toContinuousLinearMap |
| 811 | |>.contDiff.comp_contDiffOn (hinfty i 0) |
| 812 | simpa only [ContinuousLinearEquiv.coe_coe, LinearIsometryEquiv.coe_toContinuousLinearEquiv, |
| 813 | Function.comp_def, continuousMultilinearCurryFin0_apply, J, iteratedFDeriv_zero_apply, |
| 814 | Function.uncurry_def, W] using hh |
| 815 | · intro i x hx |
| 816 | have hh := (continuousMultilinearCurryFin0 ℝ E F).toContinuousLinearEquiv.toContinuousLinearMap |
| 817 | |>.hasFDerivAt.comp_hasDerivAt T (htimeFull i 0 T ⟨haT, hTb⟩ x hx) |
| 818 | simpa only [ContinuousLinearEquiv.coe_coe, LinearIsometryEquiv.coe_toContinuousLinearEquiv, |
| 819 | Function.comp_def, continuousMultilinearCurryFin0_apply, J, Q, iteratedFDeriv_zero_apply] using hh |
| 820 | |
| 821 | theorem contDiffOn_fderiv_family_of_isOpen_spatial |
| 822 | {E F : Type u} [NormedAddCommGroup E] [NormedSpace ℝ E] |
| 823 | [NormedAddCommGroup F] [NormedSpace ℝ F] |
| 824 | {J : Set ℝ} {U : Set E} (hU : IsOpen U) |
| 825 | (f : ℝ → E → F) |
| 826 | (hf : ContDiffOn ℝ ∞ (Function.uncurry f) (J ×ˢ U)) : |
| 827 | ContDiffOn ℝ ∞ |
| 828 | (fun p : ℝ × E => fderiv ℝ (f p.1) p.2) (J ×ˢ U) := by |
| 829 | have haux : ContDiffOn ℝ ∞ |
| 830 | (Function.uncurry (fun (p : ℝ × E) (y : E) => f p.1 y)) |
| 831 | ((J ×ˢ U) ×ˢ U) := |
| 832 | hf.comp (contDiffOn_fst.fst.prodMk contDiffOn_snd) |
| 833 | (fun p hp => ⟨hp.1.1, hp.2⟩) |
| 834 | have hd : ContDiffOn ℝ ∞ |
| 835 | (fun p : ℝ × E => fderivWithin ℝ (f p.1) U p.2) (J ×ˢ U) := by |
| 836 | intro p hp |
| 837 | exact (haux (p, p.2) ⟨hp, hp.2⟩).fderivWithin |
| 838 | (g := fun p : ℝ × E => p.2) contDiffWithinAt_snd hU.uniqueDiffOn |
| 839 | (by simp) hp (fun p hp => hp.2) |
| 840 | exact hd.congr (fun p hp => (fderivWithin_of_isOpen hU hp.2).symm) |
| 841 | |
| 842 | set_option synthInstance.maxHeartbeats 200000 in |
| 843 | theorem contDiffOn_iteratedFDeriv_family_of_isOpen_spatial |
| 844 | {E F : Type u} [NormedAddCommGroup E] [NormedSpace ℝ E] |
| 845 | [NormedAddCommGroup F] [NormedSpace ℝ F] |
| 846 | {J : Set ℝ} {U : Set E} (hU : IsOpen U) |
| 847 | (f : ℝ → E → F) |
| 848 | (hf : ContDiffOn ℝ ∞ (Function.uncurry f) (J ×ˢ U)) : |
| 849 | ∀ q : ℕ, ContDiffOn ℝ ∞ |
| 850 | (fun p : ℝ × E => iteratedFDeriv ℝ q (f p.1) p.2) (J ×ˢ U) := by |
| 851 | intro q |
| 852 | induction q with |
| 853 | | zero => |
| 854 | let L : F →L[ℝ] (E [×0]→L[ℝ] F) := |
| 855 | (continuousMultilinearCurryFin0 ℝ E F).symm.toContinuousLinearEquiv.toContinuousLinearMap |
| 856 | change ContDiffOn ℝ ∞ (fun p : ℝ × E => L (f p.1 p.2)) (J ×ˢ U) |
| 857 | exact L.contDiff.comp_contDiffOn hf |
| 858 | | succ q ih => |
| 859 | have hd := contDiffOn_fderiv_family_of_isOpen_spatial hU |
| 860 | (fun t x => iteratedFDeriv ℝ q (f t) x) ih |
| 861 | let L : (E →L[ℝ] (E [×q]→L[ℝ] F)) →L[ℝ] (E [×(q + 1)]→L[ℝ] F) := |
| 862 | (continuousMultilinearCurryLeftEquiv ℝ (fun _ : Fin (q + 1) => E) F).symm |
| 863 | |>.toContinuousLinearEquiv.toContinuousLinearMap |
| 864 | change ContDiffOn ℝ ∞ |
| 865 | (fun p : ℝ × E => L (fderiv ℝ (iteratedFDeriv ℝ q (f p.1)) p.2)) (J ×ˢ U) |
| 866 | exact L.contDiff.comp_contDiffOn hd |
| 867 | |
| 868 | end PoincareMT.RicciFlow.Local |