Navier–Stokes: the Lean blow-up proof, cleaned up together
OpenAI's 2026 Lean proofs of blowup for forced Navier–Stokes and Euler, rerun by others, not refereed, no ruling from Clay; cleaned up together: more readable, faster to build

| 1 | import Mathlib.Analysis.Calculus.TangentCone.Prod |
| 2 | import Mathlib.Analysis.Calculus.FDeriv.Symmetric |
| 3 | import Mathlib.Analysis.Calculus.FDeriv.Extend |
| 4 | import Mathlib.Analysis.Calculus.ContDiff.FiniteDimension |
| 5 | import Mathlib.Analysis.Calculus.IteratedDeriv.Lemmas |
| 6 | import Mathlib.Topology.ExtendFrom |
| 7 | import NavierStokes.SpatialBorelExtension |
| 8 | |
| 9 | /-! |
| 10 | # A dimension-independent smooth extension of a bounded-jet open strip |
| 11 | |
| 12 | The endpoint values below are derived from bounds on the actual joint |
| 13 | Frechet derivatives, using completeness and the mean-value theorem. The |
| 14 | normal-jet gluing argument is generalized from `SpacetimeGluing`; no existing |
| 15 | project source is altered and no extension or closed-side regularity is assumed. |
| 16 | -/ |
| 17 | |
| 18 | noncomputable section |
| 19 | |
| 20 | open Set Filter |
| 21 | open scoped Topology ContDiff |
| 22 | |
| 23 | namespace NavierStokes.GenericEndpointExtension.Gluing |
| 24 | |
| 25 | variable {X : Type*} [NormedAddCommGroup X] [NormedSpace ℝ X] |
| 26 | [FiniteDimensional ℝ X] |
| 27 | |
| 28 | noncomputable def timeVector : (ℝ × X) := (1, 0) |
| 29 | |
| 30 | private theorem nat_le_infty (n : ℕ) : (n : WithTop ℕ∞) ≤ ∞ := |
| 31 | (ENat.natCast_lt_of_coe_top_le_withTop le_rfl n).le |
| 32 | |
| 33 | private theorem infty_add_one_le : (∞ : WithTop ℕ∞) + 1 ≤ ∞ := by |
| 34 | simpa only [ENat.coe_top_add_one] using (le_rfl : (∞ : WithTop ℕ∞) ≤ ∞) |
| 35 | |
| 36 | variable {V : Type*} [NormedAddCommGroup V] [NormedSpace ℝ V] |
| 37 | |
| 38 | noncomputable def directional (s : Set (ℝ × X)) (f : (ℝ × X) → V) (v : (ℝ × X)) |
| 39 | (z : (ℝ × X)) : V := fderivWithin ℝ f s z v |
| 40 | |
| 41 | noncomputable def normalIter (s : Set (ℝ × X)) (f : (ℝ × X) → V) : ℕ → (ℝ × X) → V |
| 42 | | 0 => f |
| 43 | | n + 1 => directional s (normalIter s f n) timeVector |
| 44 | |
| 45 | omit [FiniteDimensional ℝ X] in |
| 46 | theorem directional_contDiffOn {s : Set (ℝ × X)} {f : (ℝ × X) → V} |
| 47 | (hf : ContDiffOn ℝ ∞ f s) (hs : UniqueDiffOn ℝ s) (v : (ℝ × X)) : |
| 48 | ContDiffOn ℝ ∞ (directional s f v) s := |
| 49 | (hf.fderivWithin hs infty_add_one_le).clm_apply contDiffOn_const |
| 50 | |
| 51 | omit [FiniteDimensional ℝ X] in |
| 52 | theorem normalIter_contDiffOn {s : Set (ℝ × X)} {f : (ℝ × X) → V} |
| 53 | (hf : ContDiffOn ℝ ∞ f s) (hs : UniqueDiffOn ℝ s) (n : ℕ) : |
| 54 | ContDiffOn ℝ ∞ (normalIter s f n) s := by |
| 55 | induction n with |
| 56 | | zero => exact hf |
| 57 | | succ n ih => exact directional_contDiffOn ih hs timeVector |
| 58 | |
| 59 | omit [FiniteDimensional ℝ X] in |
| 60 | /-- Schwarz's theorem commutes two fixed directional derivatives on a |
| 61 | regular closed domain; no symmetry of full higher tensors is assumed. -/ |
| 62 | theorem directional_commute {s : Set (ℝ × X)} {f : (ℝ × X) → V} |
| 63 | (hf : ContDiffOn ℝ ∞ f s) (hs : UniqueDiffOn ℝ s) |
| 64 | (hregular : s ⊆ closure (interior s)) {z : (ℝ × X)} (hz : z ∈ s) |
| 65 | (v w : (ℝ × X)) : |
| 66 | directional s (directional s f v) w z = |
| 67 | directional s (directional s f w) v z := by |
| 68 | have hd := ((hf.fderivWithin hs infty_add_one_le).differentiableOn (by simp)) z hz |
| 69 | have hv := fderivWithin_clm_apply (c := fderivWithin ℝ f s) (u := fun _ => v) |
| 70 | (hs z hz) hd (differentiableWithinAt_const v) |
| 71 | have hw := fderivWithin_clm_apply (c := fderivWithin ℝ f s) (u := fun _ => w) |
| 72 | (hs z hz) hd (differentiableWithinAt_const w) |
| 73 | unfold directional |
| 74 | rw [hv, hw] |
| 75 | simp only [fderivWithin_const_apply, ContinuousLinearMap.comp_zero, zero_add, |
| 76 | ContinuousLinearMap.flip_apply] |
| 77 | exact ((hf z hz).isSymmSndFDerivWithinAt |
| 78 | (by simp [minSmoothness_of_isRCLikeNormedField]) |
| 79 | hs (hregular hz) hz).eq w v |
| 80 | |
| 81 | omit [FiniteDimensional ℝ X] in |
| 82 | /-- Any fixed directional derivative commutes with every normal iterate. -/ |
| 83 | theorem normalIter_directional {s : Set (ℝ × X)} {f : (ℝ × X) → V} |
| 84 | (hf : ContDiffOn ℝ ∞ f s) (hs : UniqueDiffOn ℝ s) |
| 85 | (hregular : s ⊆ closure (interior s)) (v : (ℝ × X)) (n : ℕ) : |
| 86 | EqOn (normalIter s (directional s f v) n) |
| 87 | (directional s (normalIter s f n) v) s := by |
| 88 | induction n with |
| 89 | | zero => intro z hz; rfl |
| 90 | | succ n ih => |
| 91 | intro z hz |
| 92 | change directional s (normalIter s (directional s f v) n) timeVector z = |
| 93 | directional s (directional s (normalIter s f n) timeVector) v z |
| 94 | have heq := fderivWithin_congr' (𝕜 := ℝ) ih hz |
| 95 | change fderivWithin ℝ (normalIter s (directional s f v) n) s z timeVector = _ |
| 96 | rw [heq] |
| 97 | exact directional_commute (normalIter_contDiffOn hf hs n) hs hregular hz v timeVector |
| 98 | |
| 99 | omit [FiniteDimensional ℝ X] in |
| 100 | /-- The joint normal iterates equal the genuine one-dimensional derivatives |
| 101 | of the time slice, including at a one-sided boundary. -/ |
| 102 | theorem time_slice_iteratedDerivWithin {I : Set ℝ} {f : (ℝ × X) → V} |
| 103 | (hI : UniqueDiffOn ℝ I) (hf : ContDiffOn ℝ ∞ f (I ×ˢ univ)) |
| 104 | (x : X) (n : ℕ) : |
| 105 | EqOn (iteratedDerivWithin n (fun t => f (t, x)) I) |
| 106 | (fun t => normalIter (I ×ˢ univ) f n (t, x)) I := by |
| 107 | induction n with |
| 108 | | zero => simp only [iteratedDerivWithin_zero, normalIter, eqOn_refl] |
| 109 | | succ n ih => |
| 110 | intro t ht |
| 111 | rw [iteratedDerivWithin_succ, derivWithin_congr ih (ih ht)] |
| 112 | have hsmooth := normalIter_contDiffOn hf (hI.prod uniqueDiffOn_univ) n |
| 113 | have hdiff := hsmooth.differentiableOn (by simp) (t, x) ⟨ht, mem_univ x⟩ |
| 114 | have hcurve := hdiff.hasFDerivWithinAt.comp t |
| 115 | (hasFDerivAt_prodMk_left t x).hasFDerivWithinAt |
| 116 | (fun y hy => show (y, x) ∈ I ×ˢ univ from ⟨hy, mem_univ x⟩) |
| 117 | have hderiv : HasDerivWithinAt (fun y => normalIter (I ×ˢ univ) f n (y, x)) |
| 118 | (normalIter (I ×ˢ univ) f (n + 1) (t, x)) I t := by |
| 119 | simpa only [Function.comp_def, ContinuousLinearMap.comp_apply, |
| 120 | ContinuousLinearMap.inl_apply, normalIter, directional, timeVector] using |
| 121 | hcurve.hasDerivWithinAt |
| 122 | exact hderiv.derivWithin (hI t ht) |
| 123 | |
| 124 | omit [FiniteDimensional ℝ X] in |
| 125 | /-- Matching boundary values gives matching tangential derivatives; together |
| 126 | with the first normal derivative this determines the full Frechet derivative. -/ |
| 127 | theorem boundary_fderiv_eq {s t : Set (ℝ × X)} {f g : (ℝ × X) → V} {T : ℝ} |
| 128 | (hf : ContDiffOn ℝ ∞ f s) (hg : ContDiffOn ℝ ∞ g t) |
| 129 | (hBs : ∀ x : X, (T, x) ∈ s) (hBt : ∀ x : X, (T, x) ∈ t) |
| 130 | (hvalue : ∀ x : X, f (T, x) = g (T, x)) |
| 131 | (hnormal : ∀ x : X, directional s f timeVector (T, x) = |
| 132 | directional t g timeVector (T, x)) (x : X) : |
| 133 | fderivWithin ℝ f s (T, x) = fderivWithin ℝ g t (T, x) := by |
| 134 | have hfD := (hf.differentiableOn (by simp) (T, x) (hBs x)).hasFDerivWithinAt |
| 135 | have hgD := (hg.differentiableOn (by simp) (T, x) (hBt x)).hasFDerivWithinAt |
| 136 | have hftrace : HasFDerivAt (fun y : X => f (T, y)) |
| 137 | ((fderivWithin ℝ f s (T, x)).comp (ContinuousLinearMap.inr ℝ ℝ X)) x := by |
| 138 | have h := hfD.comp x (s := univ) (hasFDerivAt_prodMk_right T x).hasFDerivWithinAt |
| 139 | (fun y _ => hBs y) |
| 140 | simpa only [Function.comp_def, hasFDerivWithinAt_univ] using h |
| 141 | have hgtrace : HasFDerivAt (fun y : X => g (T, y)) |
| 142 | ((fderivWithin ℝ g t (T, x)).comp (ContinuousLinearMap.inr ℝ ℝ X)) x := by |
| 143 | have h := hgD.comp x (s := univ) (hasFDerivAt_prodMk_right T x).hasFDerivWithinAt |
| 144 | (fun y _ => hBt y) |
| 145 | simpa only [Function.comp_def, hasFDerivWithinAt_univ] using h |
| 146 | have htan := hftrace.unique (hgtrace.congr_of_eventuallyEq (Eventually.of_forall hvalue)) |
| 147 | apply ContinuousLinearMap.ext |
| 148 | intro v |
| 149 | have hspatial := congrArg (fun A : X →L[ℝ] V => A v.2) htan |
| 150 | simp only [ContinuousLinearMap.comp_apply, ContinuousLinearMap.inr_apply] at hspatial |
| 151 | have htime : fderivWithin ℝ f s (T, x) timeVector = |
| 152 | fderivWithin ℝ g t (T, x) timeVector := hnormal x |
| 153 | have hv : v = v.1 • timeVector + (0, v.2) := by |
| 154 | ext <;> simp [timeVector] |
| 155 | rw [hv, map_add, map_add, map_smul, map_smul, htime, hspatial] |
| 156 | |
| 157 | omit [FiniteDimensional ℝ X] in |
| 158 | /-- Matching normal trace functions implies matching normal traces after |
| 159 | any directional derivative. The proof derives, rather than assumes, the |
| 160 | necessary tangential and mixed derivative equalities. -/ |
| 161 | theorem normal_match_directional {s t : Set (ℝ × X)} {f g : (ℝ × X) → V} {T : ℝ} |
| 162 | (hf : ContDiffOn ℝ ∞ f s) (hg : ContDiffOn ℝ ∞ g t) |
| 163 | (hs : UniqueDiffOn ℝ s) (ht : UniqueDiffOn ℝ t) |
| 164 | (hregularS : s ⊆ closure (interior s)) (hregularT : t ⊆ closure (interior t)) |
| 165 | (hBs : ∀ x : X, (T, x) ∈ s) (hBt : ∀ x : X, (T, x) ∈ t) |
| 166 | (hmatch : ∀ n : ℕ, ∀ x : X, normalIter s f n (T, x) = normalIter t g n (T, x)) |
| 167 | (v : (ℝ × X)) (n : ℕ) (x : X) : |
| 168 | normalIter s (directional s f v) n (T, x) = |
| 169 | normalIter t (directional t g v) n (T, x) := by |
| 170 | rw [normalIter_directional hf hs hregularS v n (hBs x), |
| 171 | normalIter_directional hg ht hregularT v n (hBt x)] |
| 172 | have hD := boundary_fderiv_eq (normalIter_contDiffOn hf hs n) |
| 173 | (normalIter_contDiffOn hg ht n) hBs hBt (hmatch n) (hmatch (n + 1)) x |
| 174 | exact congrArg (fun A : (ℝ × X) →L[ℝ] V => A v) hD |
| 175 | |
| 176 | noncomputable def past (T : ℝ) : Set (ℝ × X) := Iic T ×ˢ univ |
| 177 | noncomputable def future (T : ℝ) : Set (ℝ × X) := Ici T ×ˢ univ |
| 178 | |
| 179 | omit [FiniteDimensional ℝ X] in |
| 180 | theorem past_uniqueDiff (T : ℝ) : UniqueDiffOn ℝ (past (X := X) T) := |
| 181 | (uniqueDiffOn_Iic T).prod uniqueDiffOn_univ |
| 182 | |
| 183 | omit [FiniteDimensional ℝ X] in |
| 184 | theorem future_uniqueDiff (T : ℝ) : UniqueDiffOn ℝ (future (X := X) T) := |
| 185 | (uniqueDiffOn_Ici T).prod uniqueDiffOn_univ |
| 186 | |
| 187 | omit [NormedSpace ℝ X] [FiniteDimensional ℝ X] in |
| 188 | theorem past_regular (T : ℝ) : past (X := X) T ⊆ closure (interior (past T)) := by |
| 189 | simp only [past, interior_prod_eq, interior_Iic, |
| 190 | interior_univ, closure_prod_eq, closure_Iio, closure_univ] |
| 191 | exact Subset.rfl |
| 192 | |
| 193 | omit [NormedSpace ℝ X] [FiniteDimensional ℝ X] in |
| 194 | theorem future_regular (T : ℝ) : future (X := X) T ⊆ closure (interior (future T)) := by |
| 195 | simp only [future, interior_prod_eq, interior_Ici, interior_univ, closure_prod_eq, |
| 196 | closure_Ioi, closure_univ] |
| 197 | exact Subset.rfl |
| 198 | |
| 199 | omit [NormedAddCommGroup X] [NormedSpace ℝ X] [FiniteDimensional ℝ X] in |
| 200 | theorem past_union_future (T : ℝ) : past (X := X) T ∪ future T = univ := by |
| 201 | ext z |
| 202 | simp only [past, future, mem_union, mem_prod, |
| 203 | mem_Iic, mem_Ici, mem_univ, and_true, iff_true] |
| 204 | exact le_total z.1 T |
| 205 | |
| 206 | /-- Glue along the time hyperplane, using the past branch at the join. -/ |
| 207 | noncomputable def glue {W : Type*} (T : ℝ) (f g : (ℝ × X) → W) (z : (ℝ × X)) : W := |
| 208 | if z.1 ≤ T then f z else g z |
| 209 | |
| 210 | omit [NormedAddCommGroup X] [NormedSpace ℝ X] [FiniteDimensional ℝ X] in |
| 211 | theorem glue_eqOn_past {W : Type*} (T : ℝ) (f g : (ℝ × X) → W) : |
| 212 | EqOn (glue T f g) f (past T) := by |
| 213 | intro z hz |
| 214 | exact ite_eq_left hz.1 |
| 215 | |
| 216 | omit [NormedAddCommGroup X] [NormedSpace ℝ X] [FiniteDimensional ℝ X] in |
| 217 | theorem glue_eqOn_future {W : Type*} {T : ℝ} {f g : (ℝ × X) → W} |
| 218 | (hvalue : ∀ x : X, f (T, x) = g (T, x)) : |
| 219 | EqOn (glue T f g) g (future T) := by |
| 220 | rintro ⟨t, x⟩ ht |
| 221 | by_cases h : t ≤ T |
| 222 | · have heq : t = T := le_antisymm h ht.1 |
| 223 | subst t |
| 224 | exact (ite_eq_left le_rfl).trans (hvalue x) |
| 225 | · exact ite_eq_right h |
| 226 | |
| 227 | omit [FiniteDimensional ℝ X] in |
| 228 | /-- Actual full Frechet derivatives glue when their boundary values match. -/ |
| 229 | theorem hasFDerivAt_glue {T : ℝ} {f g : (ℝ × X) → V} |
| 230 | {df dg : (ℝ × X) → (ℝ × X) →L[ℝ] V} |
| 231 | (hf : ∀ z ∈ past T, HasFDerivWithinAt f (df z) (past T) z) |
| 232 | (hg : ∀ z ∈ future T, HasFDerivWithinAt g (dg z) (future T) z) |
| 233 | (hvalue : ∀ x : X, f (T, x) = g (T, x)) |
| 234 | (hderiv : ∀ x : X, df (T, x) = dg (T, x)) (z : (ℝ × X)) : |
| 235 | HasFDerivAt (glue T f g) (glue T df dg z) z := by |
| 236 | have hL (y : (ℝ × X)) (hy : y ∈ past T) : |
| 237 | HasFDerivWithinAt (glue T f g) (df y) (past T) y := |
| 238 | (hf y hy).congr' (glue_eqOn_past T f g) hy |
| 239 | have hR (y : (ℝ × X)) (hy : y ∈ future T) : |
| 240 | HasFDerivWithinAt (glue T f g) (dg y) (future T) y := |
| 241 | (hg y hy).congr' (glue_eqOn_future hvalue) hy |
| 242 | rcases z with ⟨t, x⟩ |
| 243 | rcases lt_trichotomy t T with hlt | heq | hgt |
| 244 | · have hmem : past T ∈ 𝓝 (t, x) := |
| 245 | prod_mem_nhds (Iic_mem_nhds hlt) Filter.univ_mem |
| 246 | simpa only [glue, ite_eq_left hlt.le] using |
| 247 | (hL (t, x) ⟨hlt.le, mem_univ x⟩).hasFDerivAt hmem |
| 248 | · subst t |
| 249 | have hright : HasFDerivWithinAt (glue T f g) (df (T, x)) |
| 250 | (future T) (T, x) := by |
| 251 | rw [hderiv x] |
| 252 | exact hR (T, x) ⟨mem_Ici.mpr (le_refl T), mem_univ x⟩ |
| 253 | have h := (hL (T, x) ⟨mem_Iic.mpr (le_refl T), mem_univ x⟩).union hright |
| 254 | simpa only [past_union_future, hasFDerivWithinAt_univ, glue, ite_eq_left le_rfl] using h |
| 255 | · have hmem : future T ∈ 𝓝 (t, x) := |
| 256 | prod_mem_nhds (Ici_mem_nhds hgt) Filter.univ_mem |
| 257 | simpa only [glue, ite_eq_right (not_le_of_gt hgt)] using |
| 258 | (hR (t, x) ⟨hgt.le, mem_univ x⟩).hasFDerivAt hmem |
| 259 | |
| 260 | omit [FiniteDimensional ℝ X] in |
| 261 | /-- First-order joint gluing needs only value and first normal-derivative |
| 262 | matching; spatial derivative matching is a consequence. -/ |
| 263 | theorem hasFDerivAt_glue_of_normal {T : ℝ} {f g : (ℝ × X) → V} |
| 264 | (hf : ContDiffOn ℝ ∞ f (past T)) (hg : ContDiffOn ℝ ∞ g (future T)) |
| 265 | (hvalue : ∀ x : X, f (T, x) = g (T, x)) |
| 266 | (hnormal : ∀ x : X, directional (past T) f timeVector (T, x) = |
| 267 | directional (future T) g timeVector (T, x)) (z : (ℝ × X)) : |
| 268 | HasFDerivAt (glue T f g) |
| 269 | (glue T (fderivWithin ℝ f (past T)) (fderivWithin ℝ g (future T)) z) z := by |
| 270 | apply hasFDerivAt_glue |
| 271 | · intro y hy |
| 272 | exact (hf.differentiableOn (by simp) y hy).hasFDerivWithinAt |
| 273 | · intro y hy |
| 274 | exact (hg.differentiableOn (by simp) y hy).hasFDerivWithinAt |
| 275 | · exact hvalue |
| 276 | · exact boundary_fderiv_eq hf hg (fun x => ⟨mem_Iic.mpr (le_refl T), mem_univ x⟩) |
| 277 | (fun x => ⟨mem_Ici.mpr (le_refl T), mem_univ x⟩) hvalue hnormal |
| 278 | |
| 279 | /-- Finite-order induction from all matching normal jets. The induction |
| 280 | keeps the codomain fixed and differentiates in each spacetime direction. -/ |
| 281 | theorem contDiff_glue_finite {T : ℝ} {f g : (ℝ × X) → V} |
| 282 | (hf : ContDiffOn ℝ ∞ f (past T)) (hg : ContDiffOn ℝ ∞ g (future T)) |
| 283 | (hmatch : ∀ n : ℕ, ∀ x : X, |
| 284 | normalIter (past T) f n (T, x) = normalIter (future T) g n (T, x)) |
| 285 | (m : ℕ) : ContDiff ℝ m (glue T f g) := by |
| 286 | induction m generalizing f g with |
| 287 | | zero => |
| 288 | exact contDiff_zero.mpr (continuous_iff_continuousAt.mpr (fun z => |
| 289 | (hasFDerivAt_glue_of_normal hf hg (hmatch 0) (hmatch 1) z).continuousAt)) |
| 290 | | succ m ih => |
| 291 | have hD := hasFDerivAt_glue_of_normal hf hg (hmatch 0) (hmatch 1) |
| 292 | have hsucc : ContDiff ℝ ((m : WithTop ℕ∞) + 1) (glue T f g) := by |
| 293 | apply contDiff_succ_iff_fderiv_apply.mpr |
| 294 | refine ⟨fun z => (hD z).differentiableAt, by simp, ?_⟩ |
| 295 | intro v |
| 296 | have hdirection : (fun z => fderiv ℝ (glue T f g) z v) = |
| 297 | glue T (directional (past T) f v) (directional (future T) g v) := by |
| 298 | funext z |
| 299 | rw [(hD z).fderiv] |
| 300 | by_cases hz : z.1 ≤ T <;> simp only [glue, directional, hz, ite_true, ite_false] |
| 301 | rw [hdirection] |
| 302 | apply ih (directional_contDiffOn hf (past_uniqueDiff T) v) |
| 303 | (directional_contDiffOn hg (future_uniqueDiff T) v) |
| 304 | exact normal_match_directional hf hg (past_uniqueDiff T) (future_uniqueDiff T) |
| 305 | (past_regular T) (future_regular T) |
| 306 | (fun x => ⟨mem_Iic.mpr (le_refl T), mem_univ x⟩) |
| 307 | (fun x => ⟨mem_Ici.mpr (le_refl T), mem_univ x⟩) hmatch v |
| 308 | simpa only [Nat.cast_add, Nat.cast_one] using hsucc |
| 309 | |
| 310 | /-- Joint `C∞` gluing, expressed in actual one-sided time-slice jets. |
| 311 | No matching of mixed Frechet tensors is assumed: it is derived from the |
| 312 | normal trace functions and Schwarz's theorem. -/ |
| 313 | theorem contDiff_glue {T : ℝ} {f g : (ℝ × X) → V} |
| 314 | (hf : ContDiffOn ℝ ∞ f (past T)) (hg : ContDiffOn ℝ ∞ g (future T)) |
| 315 | (hmatch : ∀ n : ℕ, ∀ x : X, |
| 316 | iteratedDerivWithin n (fun t => f (t, x)) (Iic T) T = |
| 317 | iteratedDerivWithin n (fun t => g (t, x)) (Ici T) T) : |
| 318 | ContDiff ℝ ∞ (glue T f g) := by |
| 319 | apply contDiff_infty.mpr |
| 320 | apply contDiff_glue_finite hf hg |
| 321 | intro n x |
| 322 | exact (time_slice_iteratedDerivWithin (uniqueDiffOn_Iic T) hf x n |
| 323 | (mem_Iic.mpr (le_refl T))).symm.trans ((hmatch n x).trans |
| 324 | (time_slice_iteratedDerivWithin (uniqueDiffOn_Ici T) hg x n |
| 325 | (mem_Ici.mpr (le_refl T)))) |
| 326 | |
| 327 | /-- The actual normal jet of a closed-past field, viewed as a spatial |
| 328 | coefficient for the Taylor--Borel construction. -/ |
| 329 | noncomputable def normalTrace (T : ℝ) (f : (ℝ × X) → V) (n : ℕ) (x : X) : V := |
| 330 | normalIter (past T) f n (T, x) |
| 331 | |
| 332 | omit [FiniteDimensional ℝ X] in |
| 333 | theorem normalTrace_contDiff {T : ℝ} {f : (ℝ × X) → V} |
| 334 | (hf : ContDiffOn ℝ ∞ f (past T)) (n : ℕ) : |
| 335 | ContDiff ℝ ∞ (normalTrace T f n) := by |
| 336 | exact (normalIter_contDiffOn hf (past_uniqueDiff T) n).comp_contDiff |
| 337 | (contDiff_const.prodMk contDiff_id : ContDiff ℝ ∞ (fun x : X => (T, x))) |
| 338 | (fun x => show (T, x) ∈ past T from ⟨le_refl T, mem_univ x⟩) |
| 339 | |
| 340 | omit [FiniteDimensional ℝ X] in |
| 341 | theorem normalTrace_eq_time_jet {T : ℝ} {f : (ℝ × X) → V} |
| 342 | (hf : ContDiffOn ℝ ∞ f (past T)) (n : ℕ) (x : X) : |
| 343 | normalTrace T f n x = iteratedDerivWithin n (fun t => f (t, x)) (Iic T) T := |
| 344 | (time_slice_iteratedDerivWithin (uniqueDiffOn_Iic T) hf x n |
| 345 | (mem_Iic.mpr (le_refl T))).symm |
| 346 | |
| 347 | omit [FiniteDimensional ℝ X] in |
| 348 | theorem normalTrace_add_period {T : ℝ} {f : (ℝ × X) → V} |
| 349 | (hf : ContDiffOn ℝ ∞ f (past T)) (p : X) |
| 350 | (hperiod : ∀ t ≤ T, ∀ x : X, f (t, x + p) = f (t, x)) (n : ℕ) (x : X) : |
| 351 | normalTrace T f n (x + p) = normalTrace T f n x := by |
| 352 | rw [normalTrace_eq_time_jet hf, normalTrace_eq_time_jet hf] |
| 353 | exact iteratedDerivWithin_congr (fun t ht => hperiod t ht x) (mem_Iic.mpr (le_refl T)) |
| 354 | |
| 355 | section Complete |
| 356 | |
| 357 | variable [CompleteSpace V] |
| 358 | |
| 359 | /-- A constructed global extension: join the closed-past field to the |
| 360 | Taylor--Borel realization of its actual normal jets. -/ |
| 361 | noncomputable def smoothExtension (T : ℝ) (f : (ℝ × X) → V) (hf : ContDiffOn ℝ ∞ f (past T)) : |
| 362 | (ℝ × X) → V := |
| 363 | glue T f (SpatialBorelExtension.rightExtension (normalTrace T f) |
| 364 | (normalTrace_contDiff hf) T) |
| 365 | |
| 366 | theorem smoothExtension_contDiff {T : ℝ} {f : (ℝ × X) → V} |
| 367 | (hf : ContDiffOn ℝ ∞ f (past T)) : ContDiff ℝ ∞ (smoothExtension T f hf) := by |
| 368 | apply contDiff_glue hf |
| 369 | (SpatialBorelExtension.rightExtension_contDiff (normalTrace T f) |
| 370 | (normalTrace_contDiff hf) T).contDiffOn |
| 371 | intro n x |
| 372 | rw [SpatialBorelExtension.rightExtension_right_jets] |
| 373 | exact (normalTrace_eq_time_jet hf n x).symm |
| 374 | |
| 375 | omit [CompleteSpace V] in |
| 376 | theorem smoothExtension_eqOn_past {T : ℝ} {f : (ℝ × X) → V} |
| 377 | (hf : ContDiffOn ℝ ∞ f (past T)) : EqOn (smoothExtension T f hf) f (past T) := |
| 378 | glue_eqOn_past T f _ |
| 379 | |
| 380 | omit [CompleteSpace V] in |
| 381 | theorem smoothExtension_zero_from {T : ℝ} {f : (ℝ × X) → V} |
| 382 | (hf : ContDiffOn ℝ ∞ f (past T)) {t : ℝ} (ht : T + 1 ≤ t) (x : X) : |
| 383 | smoothExtension T f hf (t, x) = 0 := by |
| 384 | have hnot : ¬t ≤ T := by linarith |
| 385 | simp only [smoothExtension, glue, ite_eq_right hnot] |
| 386 | exact SpatialBorelExtension.rightExtension_zero_from (normalTrace T f) |
| 387 | (normalTrace_contDiff hf) T ht x |
| 388 | |
| 389 | /-- Every full mixed jet on the past, including the boundary, is preserved. -/ |
| 390 | theorem smoothExtension_iteratedFDeriv {T : ℝ} {f : (ℝ × X) → V} |
| 391 | (hf : ContDiffOn ℝ ∞ f (past T)) (n : ℕ) {z : (ℝ × X)} (hz : z ∈ past T) : |
| 392 | iteratedFDeriv ℝ n (smoothExtension T f hf) z = iteratedFDerivWithin ℝ n f (past T) z := by |
| 393 | rw [← iteratedFDerivWithin_eq_iteratedFDeriv (past_uniqueDiff T) |
| 394 | ((smoothExtension_contDiff hf).of_le (nat_le_infty n)).contDiffAt hz] |
| 395 | exact iteratedFDerivWithin_congr (smoothExtension_eqOn_past hf) hz n |
| 396 | |
| 397 | omit [CompleteSpace V] in |
| 398 | theorem smoothExtension_add_period {T : ℝ} {f : (ℝ × X) → V} |
| 399 | (hf : ContDiffOn ℝ ∞ f (past T)) (p : X) |
| 400 | (hperiod : ∀ t ≤ T, ∀ x : X, f (t, x + p) = f (t, x)) (t : ℝ) (x : X) : |
| 401 | smoothExtension T f hf (t, x + p) = smoothExtension T f hf (t, x) := by |
| 402 | by_cases ht : t ≤ T |
| 403 | · simp only [smoothExtension, glue, ite_eq_left ht] |
| 404 | exact hperiod t ht x |
| 405 | · simp only [smoothExtension, glue, ite_eq_right ht] |
| 406 | exact SpatialBorelExtension.rightExtension_add_period (normalTrace T f) |
| 407 | (normalTrace_contDiff hf) T p (normalTrace_add_period hf p hperiod) t x |
| 408 | |
| 409 | end Complete |
| 410 | |
| 411 | end NavierStokes.GenericEndpointExtension.Gluing |
| 412 | |
| 413 | namespace NavierStokes.GenericEndpointExtension |
| 414 | |
| 415 | open Set Filter |
| 416 | open scoped Topology ContDiff |
| 417 | |
| 418 | private theorem nat_le_infty (n : ℕ) : (n : WithTop ℕ∞) ≤ ∞ := |
| 419 | (ENat.natCast_lt_of_coe_top_le_withTop le_rfl n).le |
| 420 | |
| 421 | section Closure |
| 422 | |
| 423 | variable {Y V : Type*} [NormedAddCommGroup Y] [NormedSpace ℝ Y] |
| 424 | [NormedAddCommGroup V] [NormedSpace ℝ V] [CompleteSpace V] |
| 425 | |
| 426 | omit [NormedSpace ℝ Y] [NormedSpace ℝ V] in |
| 427 | /-- Uniform continuity makes the actual values Cauchy at every point of the |
| 428 | closure. Completeness supplies a limit; it is not an input assumption. -/ |
| 429 | theorem exists_limit_of_uniformContinuousOn {s : Set Y} {f : Y → V} |
| 430 | (hf : UniformContinuousOn f s) {x : Y} (hx : x ∈ closure s) : |
| 431 | ∃ v : V, Tendsto f (𝓝[s] x) (𝓝 v) := by |
| 432 | have : (𝓝[s] x).NeBot := mem_closure_iff_nhdsWithin_neBot.mp hx |
| 433 | apply cauchy_map_iff_exists_tendsto.mp |
| 434 | apply cauchy_map_iff'.mpr |
| 435 | apply hf.mono_left |
| 436 | refine le_inf (cauchy_nhds.mono nhdsWithin_le_nhds).2 ?_ |
| 437 | have hp : 𝓝[s] x ≤ 𝓟 s := inf_le_right |
| 438 | simpa only [Filter.prod_principal_principal] using Filter.prod_mono hp hp |
| 439 | |
| 440 | omit [CompleteSpace V] in |
| 441 | /-- The genuine joint derivatives are differentiable inside the open set. -/ |
| 442 | theorem actualJet_hasFDerivAt {s : Set Y} {f : Y → V} |
| 443 | (hs : IsOpen s) (hf : ContDiffOn ℝ ∞ f s) (n : ℕ) {x : Y} (hx : x ∈ s) : |
| 444 | HasFDerivAt (iteratedFDeriv ℝ n f) |
| 445 | (iteratedFDeriv ℝ (n + 1) f x).curryLeft x := by |
| 446 | have horder : (1 : WithTop ℕ∞) + n ≤ ∞ := by |
| 447 | simpa only [Nat.cast_add, Nat.cast_one] using nat_le_infty (1 + n) |
| 448 | have hsm : ContDiffAt ℝ 1 (iteratedFDeriv ℝ n f) x := |
| 449 | ((hf x hx).contDiffAt (hs.mem_nhds hx)).iteratedFDeriv_right horder |
| 450 | exact (hsm.differentiableAt (by norm_num)).hasFDerivAt |
| 451 | |
| 452 | omit [CompleteSpace V] in |
| 453 | /-- A bound for derivative `n+1` controls differences of the actual `n`-th |
| 454 | joint derivative on the convex set. -/ |
| 455 | theorem actualJet_uniformContinuousOn {s : Set Y} {f : Y → V} |
| 456 | (hs : IsOpen s) (hc : Convex ℝ s) (hf : ContDiffOn ℝ ∞ f s) |
| 457 | (hb : ∀ n : ℕ, ∃ C : ℝ, ∀ x ∈ s, ‖iteratedFDeriv ℝ n f x‖ ≤ C) |
| 458 | (n : ℕ) : UniformContinuousOn (iteratedFDeriv ℝ n f) s := by |
| 459 | obtain ⟨C, hC⟩ := hb (n + 1) |
| 460 | let K : NNReal := ⟨max C 0, le_max_right _ _⟩ |
| 461 | have hLip : LipschitzOnWith K (iteratedFDeriv ℝ n f) s := by |
| 462 | apply hc.lipschitzOnWith_of_nnnorm_hasFDerivWithin_le |
| 463 | (fun x hx => (actualJet_hasFDerivAt hs hf n hx).hasFDerivWithinAt) |
| 464 | intro x hx |
| 465 | change ‖(iteratedFDeriv ℝ (n + 1) f x).curryLeft‖₊ ≤ K |
| 466 | apply NNReal.coe_le_coe.mp |
| 467 | change ‖(iteratedFDeriv ℝ (n + 1) f x).curryLeft‖ ≤ max C 0 |
| 468 | rw [ContinuousMultilinearMap.curryLeft_norm] |
| 469 | exact (hC x hx).trans (le_max_left _ _) |
| 470 | exact hLip.uniformContinuousOn |
| 471 | |
| 472 | /-- The continuous completion of an actual joint derivative tensor. -/ |
| 473 | noncomputable def closureJet (s : Set Y) (f : Y → V) (n : ℕ) : |
| 474 | Y → (Y[×n]→L[ℝ] V) := extendFrom s (iteratedFDeriv ℝ n f) |
| 475 | |
| 476 | theorem closureJet_limit {s : Set Y} {f : Y → V} |
| 477 | (hs : IsOpen s) (hc : Convex ℝ s) (hf : ContDiffOn ℝ ∞ f s) |
| 478 | (hb : ∀ n : ℕ, ∃ C : ℝ, ∀ x ∈ s, ‖iteratedFDeriv ℝ n f x‖ ≤ C) |
| 479 | (n : ℕ) {x : Y} (hx : x ∈ closure s) : |
| 480 | Tendsto (iteratedFDeriv ℝ n f) (𝓝[s] x) (𝓝 (closureJet s f n x)) := |
| 481 | tendsto_extendFrom (exists_limit_of_uniformContinuousOn |
| 482 | (actualJet_uniformContinuousOn hs hc hf hb n) hx) |
| 483 | |
| 484 | theorem closureJet_continuousOn {s : Set Y} {f : Y → V} |
| 485 | (hs : IsOpen s) (hc : Convex ℝ s) (hf : ContDiffOn ℝ ∞ f s) |
| 486 | (hb : ∀ n : ℕ, ∃ C : ℝ, ∀ x ∈ s, ‖iteratedFDeriv ℝ n f x‖ ≤ C) |
| 487 | (n : ℕ) : ContinuousOn (closureJet s f n) (closure s) := |
| 488 | continuousOn_extendFrom Subset.rfl (fun _ hx => exists_limit_of_uniformContinuousOn |
| 489 | (actualJet_uniformContinuousOn hs hc hf hb n) hx) |
| 490 | |
| 491 | omit [CompleteSpace V] in |
| 492 | theorem closureJet_eq {s : Set Y} {f : Y → V} |
| 493 | (hs : IsOpen s) (hf : ContDiffOn ℝ ∞ f s) |
| 494 | (n : ℕ) {x : Y} (hx : x ∈ s) : closureJet s f n x = iteratedFDeriv ℝ n f x := |
| 495 | extendFrom_extends |
| 496 | (fun _ hy => (actualJet_hasFDerivAt hs hf n hy).continuousAt.continuousWithinAt) x hx |
| 497 | |
| 498 | omit [CompleteSpace V] in |
| 499 | theorem closureJet_eventuallyEq {s : Set Y} {f : Y → V} |
| 500 | (hs : IsOpen s) (hf : ContDiffOn ℝ ∞ f s) |
| 501 | (n : ℕ) {x : Y} (hx : x ∈ s) : |
| 502 | closureJet s f n =ᶠ[𝓝 x] iteratedFDeriv ℝ n f := by |
| 503 | filter_upwards [hs.mem_nhds hx] with y hy |
| 504 | exact closureJet_eq hs hf n hy |
| 505 | |
| 506 | /-- The mean-value theorem identifies the derivatives of the completed |
| 507 | tensors on the boundary, including all mixed derivative directions. -/ |
| 508 | theorem closureJet_hasFDerivWithinAt {s : Set Y} {f : Y → V} |
| 509 | (hs : IsOpen s) (hc : Convex ℝ s) (hf : ContDiffOn ℝ ∞ f s) |
| 510 | (hb : ∀ n : ℕ, ∃ C : ℝ, ∀ x ∈ s, ‖iteratedFDeriv ℝ n f x‖ ≤ C) |
| 511 | (n : ℕ) {x : Y} (hx : x ∈ closure s) : |
| 512 | HasFDerivWithinAt (closureJet s f n) |
| 513 | (closureJet s f (n + 1) x).curryLeft (closure s) x := by |
| 514 | have hD (y : Y) (hy : y ∈ s) : HasFDerivAt (closureJet s f n) |
| 515 | (iteratedFDeriv ℝ (n + 1) f y).curryLeft y := |
| 516 | (actualJet_hasFDerivAt hs hf n hy).congr_of_eventuallyEq |
| 517 | (closureJet_eventuallyEq hs hf n hy) |
| 518 | apply hasFDerivWithinAt_closure_of_tendsto_fderiv |
| 519 | (fun y hy => (hD y hy).differentiableAt.differentiableWithinAt) hc hs |
| 520 | (fun y hy => (closureJet_continuousOn hs hc hf hb n y hy).mono subset_closure) |
| 521 | let A : (Y[×(n + 1)]→L[ℝ] V) →L[ℝ] (Y →L[ℝ] (Y[×n]→L[ℝ] V)) := |
| 522 | (continuousMultilinearCurryLeftEquiv ℝ (fun _ : Fin (n + 1) => Y) V).toContinuousLinearEquiv.toContinuousLinearMap |
| 523 | have hlim := A.continuous.continuousAt.tendsto.comp (closureJet_limit hs hc hf hb (n + 1) hx) |
| 524 | apply hlim.congr' |
| 525 | filter_upwards [self_mem_nhdsWithin] with y hy |
| 526 | exact (hD y hy).fderiv.symm |
| 527 | |
| 528 | /-- Complete the values using the zeroth tensor. -/ |
| 529 | noncomputable def closedField (s : Set Y) (f : Y → V) (x : Y) : V := |
| 530 | (closureJet s f 0 x).curry0 |
| 531 | |
| 532 | omit [CompleteSpace V] in |
| 533 | theorem closedField_eq {s : Set Y} {f : Y → V} |
| 534 | (hs : IsOpen s) (hf : ContDiffOn ℝ ∞ f s) {x : Y} (hx : x ∈ s) : |
| 535 | closedField s f x = f x := by |
| 536 | rw [closedField, closureJet_eq hs hf 0 hx] |
| 537 | rfl |
| 538 | |
| 539 | /-- Actual uniform joint derivative bounds give joint smoothness on the |
| 540 | closure. In particular no one-sided trace regularity is assumed. -/ |
| 541 | theorem closedField_contDiffOn {s : Set Y} {f : Y → V} |
| 542 | (hs : IsOpen s) (hc : Convex ℝ s) (hf : ContDiffOn ℝ ∞ f s) |
| 543 | (hb : ∀ n : ℕ, ∃ C : ℝ, ∀ x ∈ s, ‖iteratedFDeriv ℝ n f x‖ ≤ C) : |
| 544 | ContDiffOn ℝ ∞ (closedField s f) (closure s) := by |
| 545 | have ht : HasFTaylorSeriesUpToOn ∞ (closedField s f) |
| 546 | (fun x n => closureJet s f n x) (closure s) := by |
| 547 | constructor |
| 548 | · intro x hx |
| 549 | rfl |
| 550 | · intro n hn x hx |
| 551 | exact closureJet_hasFDerivWithinAt hs hc hf hb n hx |
| 552 | · intro n hn |
| 553 | exact closureJet_continuousOn hs hc hf hb n |
| 554 | exact ht.contDiffOn |
| 555 | |
| 556 | end Closure |
| 557 | |
| 558 | section Strip |
| 559 | |
| 560 | variable {X V : Type*} [NormedAddCommGroup X] [NormedSpace ℝ X] |
| 561 | [FiniteDimensional ℝ X] [NormedAddCommGroup V] [NormedSpace ℝ V] [CompleteSpace V] |
| 562 | |
| 563 | def openStrip : Set (ℝ × X) := Ioo (-1 : ℝ) 1 ×ˢ univ |
| 564 | def closedStrip : Set (ℝ × X) := Icc (-1 : ℝ) 1 ×ˢ univ |
| 565 | |
| 566 | omit [NormedSpace ℝ X] [FiniteDimensional ℝ X] in |
| 567 | theorem openStrip_isOpen : IsOpen (openStrip (X := X)) := isOpen_Ioo.prod isOpen_univ |
| 568 | |
| 569 | omit [FiniteDimensional ℝ X] in |
| 570 | theorem openStrip_convex : Convex ℝ (openStrip (X := X)) := |
| 571 | (convex_Ioo (-1 : ℝ) 1).prod convex_univ |
| 572 | |
| 573 | omit [NormedSpace ℝ X] [FiniteDimensional ℝ X] in |
| 574 | theorem closure_openStrip : closure (openStrip (X := X)) = closedStrip := by |
| 575 | simp only [openStrip, closedStrip, closure_prod_eq, |
| 576 | closure_Ioo (by norm_num : (-1 : ℝ) ≠ 1), closure_univ] |
| 577 | |
| 578 | omit [FiniteDimensional ℝ X] in |
| 579 | theorem stripClosedField_contDiffOn {f : ℝ × X → V} |
| 580 | (hf : ContDiffOn ℝ ∞ f openStrip) |
| 581 | (hb : ∀ n : ℕ, ∃ C : ℝ, ∀ z ∈ openStrip, ‖iteratedFDeriv ℝ n f z‖ ≤ C) : |
| 582 | ContDiffOn ℝ ∞ (closedField openStrip f) closedStrip := by |
| 583 | simpa only [closure_openStrip] using |
| 584 | closedField_contDiffOn openStrip_isOpen openStrip_convex hf hb |
| 585 | |
| 586 | private theorem closedInterval_subset_closure_openInterval : |
| 587 | Icc (-1 : ℝ) 1 ⊆ closure (Ioo (-1 : ℝ) 1) := by |
| 588 | rw [closure_Ioo (by norm_num : (-1 : ℝ) ≠ 1)] |
| 589 | |
| 590 | omit [FiniteDimensional ℝ X] in |
| 591 | /-- A fiber that vanishes on the open strip also vanishes at its two completed |
| 592 | endpoints. This follows from continuity, not a support enlargement. -/ |
| 593 | theorem stripClosedField_zero {f : ℝ × X → V} |
| 594 | (hf : ContDiffOn ℝ ∞ f openStrip) |
| 595 | (hb : ∀ n : ℕ, ∃ C : ℝ, ∀ z ∈ openStrip, ‖iteratedFDeriv ℝ n f z‖ ≤ C) |
| 596 | {x : X} (hz : ∀ t ∈ Ioo (-1 : ℝ) 1, f (t, x) = 0) |
| 597 | {t : ℝ} (ht : t ∈ Icc (-1 : ℝ) 1) : closedField openStrip f (t, x) = 0 := by |
| 598 | have he : ContinuousOn (fun t : ℝ => closedField openStrip f (t, x)) (Icc (-1 : ℝ) 1) := |
| 599 | (stripClosedField_contDiffOn hf hb).continuousOn.comp |
| 600 | (continuous_id.prodMk continuous_const).continuousOn |
| 601 | (fun s hs => ⟨hs, mem_univ x⟩) |
| 602 | have hzero : EqOn (fun t : ℝ => closedField openStrip f (t, x)) |
| 603 | (fun _ => 0) (Ioo (-1 : ℝ) 1) := by |
| 604 | intro s hs |
| 605 | change closedField openStrip f (s, x) = 0 |
| 606 | rw [closedField_eq openStrip_isOpen hf (x := (s, x)) ⟨hs, mem_univ x⟩] |
| 607 | exact hz s hs |
| 608 | exact hzero.of_subset_closure he continuousOn_const Ioo_subset_Icc_self |
| 609 | closedInterval_subset_closure_openInterval ht |
| 610 | |
| 611 | omit [FiniteDimensional ℝ X] in |
| 612 | /-- Every spatial additive period passes to both completed boundary values. -/ |
| 613 | theorem stripClosedField_add_period {f : ℝ × X → V} |
| 614 | (hf : ContDiffOn ℝ ∞ f openStrip) |
| 615 | (hb : ∀ n : ℕ, ∃ C : ℝ, ∀ z ∈ openStrip, ‖iteratedFDeriv ℝ n f z‖ ≤ C) |
| 616 | (p : X) (hp : ∀ t ∈ Ioo (-1 : ℝ) 1, ∀ x : X, f (t, x + p) = f (t, x)) |
| 617 | {t : ℝ} (ht : t ∈ Icc (-1 : ℝ) 1) (x : X) : |
| 618 | closedField openStrip f (t, x + p) = closedField openStrip f (t, x) := by |
| 619 | have he (y : X) : ContinuousOn (fun t : ℝ => closedField openStrip f (t, y)) |
| 620 | (Icc (-1 : ℝ) 1) := |
| 621 | (stripClosedField_contDiffOn hf hb).continuousOn.comp |
| 622 | (continuous_id.prodMk continuous_const).continuousOn |
| 623 | (fun s hs => ⟨hs, mem_univ y⟩) |
| 624 | have hperiod : EqOn (fun t : ℝ => closedField openStrip f (t, x + p)) |
| 625 | (fun t : ℝ => closedField openStrip f (t, x)) (Ioo (-1 : ℝ) 1) := by |
| 626 | intro s hs |
| 627 | change closedField openStrip f (s, x + p) = closedField openStrip f (s, x) |
| 628 | rw [closedField_eq openStrip_isOpen hf (x := (s, x + p)) ⟨hs, mem_univ (x + p)⟩, |
| 629 | closedField_eq openStrip_isOpen hf (x := (s, x)) ⟨hs, mem_univ x⟩] |
| 630 | exact hp s hs x |
| 631 | exact hperiod.of_subset_closure (he (x + p)) (he x) Ioo_subset_Icc_self |
| 632 | closedInterval_subset_closure_openInterval ht |
| 633 | |
| 634 | /-- A fixed smooth retraction of the past into the closed strip, equal to |
| 635 | the identity for `t ≥ -1/2`. -/ |
| 636 | noncomputable def lowerClamp (t : ℝ) : ℝ := t * Real.smoothTransition (2 * t + 2) |
| 637 | |
| 638 | theorem lowerClamp_contDiff : ContDiff ℝ ∞ lowerClamp := |
| 639 | contDiff_id.mul (Real.smoothTransition.contDiff.comp |
| 640 | ((contDiff_const.mul contDiff_id).add contDiff_const)) |
| 641 | |
| 642 | theorem lowerClamp_eq {t : ℝ} (ht : -1 / 2 ≤ t) : lowerClamp t = t := by |
| 643 | rw [lowerClamp, Real.smoothTransition.one_of_one_le (by linarith), mul_one] |
| 644 | |
| 645 | theorem lowerClamp_mem {t : ℝ} (ht : t ≤ 1) : lowerClamp t ∈ Icc (-1 : ℝ) 1 := by |
| 646 | by_cases hlow : t ≤ -1 |
| 647 | · rw [lowerClamp, Real.smoothTransition.zero_of_nonpos (by linarith), mul_zero] |
| 648 | norm_num |
| 649 | · have hgt : -1 < t := lt_of_not_ge hlow |
| 650 | by_cases hneg : t ≤ 0 |
| 651 | · have ha := Real.smoothTransition.nonneg (2 * t + 2) |
| 652 | have hb := Real.smoothTransition.le_one (2 * t + 2) |
| 653 | have hupper := mul_nonpos_of_nonpos_of_nonneg hneg ha |
| 654 | dsimp only [lowerClamp] |
| 655 | constructor <;> nlinarith |
| 656 | · rw [lowerClamp_eq (by linarith)] |
| 657 | exact ⟨hgt.le, ht⟩ |
| 658 | |
| 659 | noncomputable def clamped (f : ℝ × X → V) (z : ℝ × X) : V := |
| 660 | f (lowerClamp z.1, z.2) |
| 661 | |
| 662 | omit [FiniteDimensional ℝ X] [CompleteSpace V] in |
| 663 | theorem clamped_contDiffOn {f : ℝ × X → V} (hf : ContDiffOn ℝ ∞ f closedStrip) : |
| 664 | ContDiffOn ℝ ∞ (clamped f) (Gluing.past 1) := |
| 665 | hf.comp ((lowerClamp_contDiff.comp contDiff_fst).prodMk contDiff_snd).contDiffOn |
| 666 | (fun z hz => ⟨lowerClamp_mem hz.1, mem_univ z.2⟩) |
| 667 | |
| 668 | omit [CompleteSpace V] in |
| 669 | /-- Zero normal coefficients stay zero in the actual Borel series. -/ |
| 670 | theorem Gluing.smoothExtension_zero_fiber {T : ℝ} {f : ℝ × X → V} |
| 671 | (hf : ContDiffOn ℝ ∞ f (Gluing.past T)) {x : X} |
| 672 | (hz : ∀ t ≤ T, f (t, x) = 0) (t : ℝ) : |
| 673 | Gluing.smoothExtension T f hf (t, x) = 0 := by |
| 674 | by_cases ht : t ≤ T |
| 675 | · rw [Gluing.smoothExtension_eqOn_past hf |
| 676 | (show (t, x) ∈ Gluing.past T from ⟨ht, mem_univ x⟩)] |
| 677 | exact hz t ht |
| 678 | · unfold Gluing.smoothExtension Gluing.glue |
| 679 | simp only [ite_eq_right ht, SpatialBorelExtension.rightExtension] |
| 680 | apply SpatialBorelExtension.extension_zero_of_coefficients_zero |
| 681 | intro n |
| 682 | rw [Gluing.normalTrace_eq_time_jet hf, |
| 683 | iteratedDerivWithin_congr (show EqOn (fun s : ℝ => f (s, x)) (fun _ => 0) (Iic T) |
| 684 | from hz) (mem_Iic.mpr le_rfl)] |
| 685 | simp only [iteratedDerivWithin_eq_iteratedFDerivWithin, |
| 686 | iteratedFDerivWithin_fun_zero, Pi.zero_apply, _root_.zero_apply] |
| 687 | |
| 688 | noncomputable def upperClosed (f : ℝ × X → V) (hf : ContDiffOn ℝ ∞ f closedStrip) : |
| 689 | ℝ × X → V := Gluing.smoothExtension 1 (clamped f) (clamped_contDiffOn hf) |
| 690 | |
| 691 | theorem upperClosed_contDiff {f : ℝ × X → V} (hf : ContDiffOn ℝ ∞ f closedStrip) : |
| 692 | ContDiff ℝ ∞ (upperClosed f hf) := Gluing.smoothExtension_contDiff (clamped_contDiffOn hf) |
| 693 | |
| 694 | omit [CompleteSpace V] in |
| 695 | theorem upperClosed_eq {f : ℝ × X → V} (hf : ContDiffOn ℝ ∞ f closedStrip) |
| 696 | {t : ℝ} (hlo : -1 / 2 ≤ t) (hhi : t ≤ 1) (x : X) : upperClosed f hf (t, x) = f (t, x) := by |
| 697 | rw [upperClosed, Gluing.smoothExtension_eqOn_past (clamped_contDiffOn hf) |
| 698 | (show (t, x) ∈ Gluing.past 1 from ⟨hhi, mem_univ x⟩)] |
| 699 | simp only [clamped, lowerClamp_eq hlo] |
| 700 | |
| 701 | omit [CompleteSpace V] in |
| 702 | theorem upperClosed_zero {f : ℝ × X → V} (hf : ContDiffOn ℝ ∞ f closedStrip) |
| 703 | {x : X} (hz : ∀ t ∈ Icc (-1 : ℝ) 1, f (t, x) = 0) (t : ℝ) : |
| 704 | upperClosed f hf (t, x) = 0 := |
| 705 | Gluing.smoothExtension_zero_fiber (clamped_contDiffOn hf) |
| 706 | (fun _ hs => hz _ (lowerClamp_mem hs)) t |
| 707 | |
| 708 | omit [CompleteSpace V] in |
| 709 | theorem upperClosed_add_period {f : ℝ × X → V} (hf : ContDiffOn ℝ ∞ f closedStrip) |
| 710 | (p : X) (hp : ∀ t ∈ Icc (-1 : ℝ) 1, ∀ x : X, f (t, x + p) = f (t, x)) |
| 711 | (t : ℝ) (x : X) : upperClosed f hf (t, x + p) = upperClosed f hf (t, x) := |
| 712 | Gluing.smoothExtension_add_period (clamped_contDiffOn hf) p |
| 713 | (fun _ hs y => hp _ (lowerClamp_mem hs) y) t x |
| 714 | |
| 715 | noncomputable def reflect (f : ℝ × X → V) (z : ℝ × X) : V := f (-z.1, z.2) |
| 716 | |
| 717 | omit [FiniteDimensional ℝ X] [CompleteSpace V] in |
| 718 | theorem reflect_contDiff {f : ℝ × X → V} (hf : ContDiff ℝ ∞ f) : |
| 719 | ContDiff ℝ ∞ (reflect f) := hf.comp (contDiff_fst.neg.prodMk contDiff_snd) |
| 720 | |
| 721 | omit [FiniteDimensional ℝ X] [CompleteSpace V] in |
| 722 | theorem reflect_contDiffOn {f : ℝ × X → V} (hf : ContDiffOn ℝ ∞ f closedStrip) : |
| 723 | ContDiffOn ℝ ∞ (reflect f) closedStrip := by |
| 724 | apply hf.comp (contDiff_fst.neg.prodMk contDiff_snd).contDiffOn |
| 725 | intro z hz |
| 726 | refine ⟨?_, mem_univ z.2⟩ |
| 727 | change -1 ≤ -z.1 ∧ -z.1 ≤ 1 |
| 728 | constructor <;> linarith [hz.1.1, hz.1.2] |
| 729 | |
| 730 | noncomputable def lowerClosed (f : ℝ × X → V) (hf : ContDiffOn ℝ ∞ f closedStrip) : |
| 731 | ℝ × X → V := reflect (upperClosed (reflect f) (reflect_contDiffOn hf)) |
| 732 | |
| 733 | theorem lowerClosed_contDiff {f : ℝ × X → V} (hf : ContDiffOn ℝ ∞ f closedStrip) : |
| 734 | ContDiff ℝ ∞ (lowerClosed f hf) := |
| 735 | reflect_contDiff (upperClosed_contDiff (reflect_contDiffOn hf)) |
| 736 | |
| 737 | omit [CompleteSpace V] in |
| 738 | theorem lowerClosed_eq {f : ℝ × X → V} (hf : ContDiffOn ℝ ∞ f closedStrip) |
| 739 | {t : ℝ} (hlo : -1 ≤ t) (hhi : t ≤ 1 / 2) (x : X) : lowerClosed f hf (t, x) = f (t, x) := by |
| 740 | change upperClosed (reflect f) (reflect_contDiffOn hf) (-t, x) = f (t, x) |
| 741 | rw [upperClosed_eq (reflect_contDiffOn hf) (by linarith) (by linarith)] |
| 742 | simp only [reflect, neg_neg] |
| 743 | |
| 744 | omit [CompleteSpace V] in |
| 745 | theorem lowerClosed_zero {f : ℝ × X → V} (hf : ContDiffOn ℝ ∞ f closedStrip) |
| 746 | {x : X} (hz : ∀ t ∈ Icc (-1 : ℝ) 1, f (t, x) = 0) (t : ℝ) : |
| 747 | lowerClosed f hf (t, x) = 0 := by |
| 748 | apply upperClosed_zero (reflect_contDiffOn hf) |
| 749 | intro s hs |
| 750 | exact hz (-s) ⟨by linarith [hs.2], by linarith [hs.1]⟩ |
| 751 | |
| 752 | omit [CompleteSpace V] in |
| 753 | theorem lowerClosed_add_period {f : ℝ × X → V} (hf : ContDiffOn ℝ ∞ f closedStrip) |
| 754 | (p : X) (hp : ∀ t ∈ Icc (-1 : ℝ) 1, ∀ x : X, f (t, x + p) = f (t, x)) |
| 755 | (t : ℝ) (x : X) : lowerClosed f hf (t, x + p) = lowerClosed f hf (t, x) := |
| 756 | upperClosed_add_period (reflect_contDiffOn hf) p |
| 757 | (fun s hs y => hp (-s) ⟨by linarith [hs.2], by linarith [hs.1]⟩ y) (-t) x |
| 758 | |
| 759 | /-- Use the lower continuation for negative parameters and the upper |
| 760 | continuation for positive ones. They agree on a whole central strip. -/ |
| 761 | noncomputable def closedStripExtension (f : ℝ × X → V) |
| 762 | (hf : ContDiffOn ℝ ∞ f closedStrip) (z : ℝ × X) : V := |
| 763 | if z.1 ≤ 0 then lowerClosed f hf z else upperClosed f hf z |
| 764 | |
| 765 | omit [CompleteSpace V] in |
| 766 | theorem closedStripExtension_eq {f : ℝ × X → V} (hf : ContDiffOn ℝ ∞ f closedStrip) |
| 767 | {z : ℝ × X} (hz : z ∈ closedStrip) : closedStripExtension f hf z = f z := by |
| 768 | rcases z with ⟨t, x⟩ |
| 769 | by_cases ht : t ≤ 0 |
| 770 | · rw [closedStripExtension, ite_eq_left ht] |
| 771 | exact lowerClosed_eq hf hz.1.1 (by linarith) x |
| 772 | · rw [closedStripExtension, ite_eq_right ht] |
| 773 | exact upperClosed_eq hf (by linarith) hz.1.2 x |
| 774 | |
| 775 | theorem closedStripExtension_contDiff {f : ℝ × X → V} |
| 776 | (hf : ContDiffOn ℝ ∞ f closedStrip) : ContDiff ℝ ∞ (closedStripExtension f hf) := by |
| 777 | rw [contDiff_iff_contDiffAt] |
| 778 | intro z |
| 779 | rcases lt_trichotomy z.1 0 with hneg | hzero | hpos |
| 780 | · apply (lowerClosed_contDiff hf).contDiffAt.congr_of_eventuallyEq |
| 781 | filter_upwards [(continuous_fst.tendsto z).eventually (Iio_mem_nhds hneg)] with y hy |
| 782 | exact ite_eq_left hy.le |
| 783 | · apply (upperClosed_contDiff hf).contDiffAt.congr_of_eventuallyEq |
| 784 | have hband : z.1 ∈ Ioo (-1 / 2 : ℝ) (1 / 2) := by rw [hzero]; norm_num |
| 785 | filter_upwards [(continuous_fst.tendsto z).eventually (isOpen_Ioo.mem_nhds hband)] with y hy |
| 786 | rw [closedStripExtension_eq hf ⟨⟨by linarith [hy.1], by linarith [hy.2]⟩, mem_univ y.2⟩, |
| 787 | upperClosed_eq hf hy.1.le (by linarith [hy.2]) y.2] |
| 788 | · apply (upperClosed_contDiff hf).contDiffAt.congr_of_eventuallyEq |
| 789 | filter_upwards [(continuous_fst.tendsto z).eventually (Ioi_mem_nhds hpos)] with y hy |
| 790 | exact ite_eq_right (not_le_of_gt hy) |
| 791 | |
| 792 | omit [CompleteSpace V] in |
| 793 | theorem closedStripExtension_zero {f : ℝ × X → V} |
| 794 | (hf : ContDiffOn ℝ ∞ f closedStrip) {x : X} |
| 795 | (hz : ∀ t ∈ Icc (-1 : ℝ) 1, f (t, x) = 0) (t : ℝ) : |
| 796 | closedStripExtension f hf (t, x) = 0 := by |
| 797 | by_cases ht : t ≤ 0 |
| 798 | · rw [closedStripExtension, ite_eq_left ht, lowerClosed_zero hf hz] |
| 799 | · rw [closedStripExtension, ite_eq_right ht, upperClosed_zero hf hz] |
| 800 | |
| 801 | omit [CompleteSpace V] in |
| 802 | theorem closedStripExtension_add_period {f : ℝ × X → V} |
| 803 | (hf : ContDiffOn ℝ ∞ f closedStrip) (p : X) |
| 804 | (hp : ∀ t ∈ Icc (-1 : ℝ) 1, ∀ x : X, f (t, x + p) = f (t, x)) |
| 805 | (t : ℝ) (x : X) : |
| 806 | closedStripExtension f hf (t, x + p) = closedStripExtension f hf (t, x) := by |
| 807 | by_cases ht : t ≤ 0 |
| 808 | · simp only [closedStripExtension, ite_eq_left ht] |
| 809 | exact lowerClosed_add_period hf p hp t x |
| 810 | · simp only [closedStripExtension, ite_eq_right ht] |
| 811 | exact upperClosed_add_period hf p hp t x |
| 812 | |
| 813 | omit [CompleteSpace V] in |
| 814 | theorem closedStripExtension_zero_parameter {f : ℝ × X → V} |
| 815 | (hf : ContDiffOn ℝ ∞ f closedStrip) {t : ℝ} (ht : 2 ≤ |t|) (x : X) : |
| 816 | closedStripExtension f hf (t, x) = 0 := by |
| 817 | rcases le_abs.mp ht with hpos | hneg |
| 818 | · rw [closedStripExtension, ite_eq_right (by linarith : ¬t ≤ 0)] |
| 819 | exact Gluing.smoothExtension_zero_from (clamped_contDiffOn hf) (by linarith) x |
| 820 | · rw [closedStripExtension, ite_eq_left (by linarith : t ≤ 0)] |
| 821 | exact Gluing.smoothExtension_zero_from |
| 822 | (clamped_contDiffOn (reflect_contDiffOn hf)) (by linarith) x |
| 823 | |
| 824 | /-- The constructed extension takes only interior smoothness and bounds on |
| 825 | the actual joint derivatives as inputs. -/ |
| 826 | noncomputable def extension (f : ℝ × X → V) (hf : ContDiffOn ℝ ∞ f openStrip) |
| 827 | (hb : ∀ n : ℕ, ∃ C : ℝ, ∀ z ∈ openStrip, ‖iteratedFDeriv ℝ n f z‖ ≤ C) : |
| 828 | ℝ × X → V := closedStripExtension (closedField openStrip f) (stripClosedField_contDiffOn hf hb) |
| 829 | |
| 830 | theorem extension_contDiff {f : ℝ × X → V} (hf : ContDiffOn ℝ ∞ f openStrip) |
| 831 | (hb : ∀ n : ℕ, ∃ C : ℝ, ∀ z ∈ openStrip, ‖iteratedFDeriv ℝ n f z‖ ≤ C) : |
| 832 | ContDiff ℝ ∞ (extension f hf hb) := |
| 833 | closedStripExtension_contDiff (stripClosedField_contDiffOn hf hb) |
| 834 | |
| 835 | theorem extension_eq {f : ℝ × X → V} (hf : ContDiffOn ℝ ∞ f openStrip) |
| 836 | (hb : ∀ n : ℕ, ∃ C : ℝ, ∀ z ∈ openStrip, ‖iteratedFDeriv ℝ n f z‖ ≤ C) |
| 837 | {z : ℝ × X} (hz : z ∈ openStrip) : extension f hf hb z = f z := by |
| 838 | rw [extension, closedStripExtension_eq (stripClosedField_contDiffOn hf hb) |
| 839 | ⟨⟨hz.1.1.le, hz.1.2.le⟩, hz.2⟩] |
| 840 | exact closedField_eq openStrip_isOpen hf hz |
| 841 | |
| 842 | theorem extension_zero_of_fiber {f : ℝ × X → V} (hf : ContDiffOn ℝ ∞ f openStrip) |
| 843 | (hb : ∀ n : ℕ, ∃ C : ℝ, ∀ z ∈ openStrip, ‖iteratedFDeriv ℝ n f z‖ ≤ C) |
| 844 | {x : X} (hz : ∀ t ∈ Ioo (-1 : ℝ) 1, f (t, x) = 0) (t : ℝ) : |
| 845 | extension f hf hb (t, x) = 0 := |
| 846 | closedStripExtension_zero (stripClosedField_contDiffOn hf hb) |
| 847 | (fun _ hs => stripClosedField_zero hf hb hz hs) t |
| 848 | |
| 849 | theorem extension_add_period {f : ℝ × X → V} (hf : ContDiffOn ℝ ∞ f openStrip) |
| 850 | (hb : ∀ n : ℕ, ∃ C : ℝ, ∀ z ∈ openStrip, ‖iteratedFDeriv ℝ n f z‖ ≤ C) |
| 851 | (p : X) (hp : ∀ t ∈ Ioo (-1 : ℝ) 1, ∀ x : X, f (t, x + p) = f (t, x)) |
| 852 | (t : ℝ) (x : X) : extension f hf hb (t, x + p) = extension f hf hb (t, x) := |
| 853 | closedStripExtension_add_period (stripClosedField_contDiffOn hf hb) p |
| 854 | (fun _ hs y => stripClosedField_add_period hf hb p hp hs y) t x |
| 855 | |
| 856 | theorem extension_zero_parameter {f : ℝ × X → V} (hf : ContDiffOn ℝ ∞ f openStrip) |
| 857 | (hb : ∀ n : ℕ, ∃ C : ℝ, ∀ z ∈ openStrip, ‖iteratedFDeriv ℝ n f z‖ ≤ C) |
| 858 | {t : ℝ} (ht : 2 ≤ |t|) (x : X) : extension f hf hb (t, x) = 0 := |
| 859 | closedStripExtension_zero_parameter (stripClosedField_contDiffOn hf hb) ht x |
| 860 | |
| 861 | theorem extension_iteratedFDeriv {f : ℝ × X → V} (hf : ContDiffOn ℝ ∞ f openStrip) |
| 862 | (hb : ∀ n : ℕ, ∃ C : ℝ, ∀ z ∈ openStrip, ‖iteratedFDeriv ℝ n f z‖ ≤ C) |
| 863 | (n : ℕ) {z : ℝ × X} (hz : z ∈ openStrip) : |
| 864 | iteratedFDeriv ℝ n (extension f hf hb) z = iteratedFDeriv ℝ n f z := by |
| 865 | have heq : extension f hf hb =ᶠ[𝓝 z] f := by |
| 866 | filter_upwards [openStrip_isOpen.mem_nhds hz] with y hy |
| 867 | exact extension_eq hf hb hy |
| 868 | have heq' : extension f hf hb =ᶠ[𝓝[univ] z] f := by simpa using heq |
| 869 | simpa only [iteratedFDerivWithin_univ] using |
| 870 | heq'.iteratedFDerivWithin_eq heq.self_of_nhds n |
| 871 | |
| 872 | end Strip |
| 873 | |
| 874 | end NavierStokes.GenericEndpointExtension |