math / data /lean /OAI /MathematicalPhysics /NavierStokes /ForcedComputation /Flow /CompactPeriodization.lean
Download data/lean/OAI/MathematicalPhysics/NavierStokes/ForcedComputation/Flow/CompactPeriodization.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 5.24 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/MathematicalPhysics/NavierStokes/ForcedComputation/Flow/CompactPeriodization.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/MathematicalPhysics/NavierStokes/ForcedComputation/Flow/CompactPeriodization.lean
-
curl -L -o CompactPeriodization.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/MathematicalPhysics/NavierStokes/ForcedComputation/Flow/CompactPeriodization.lean
5.24 kB
| import OAI.MathematicalPhysics.NavierStokes.ForcedComputation.Programs.CompactRapidEmbedding | |
| namespace OAI | |
| /-! Periodization in a chart strictly separated from every integer face. The | |
| fractional representative is only a definition: smoothness follows from local | |
| translation or local zero, so no differentiability of the fractional part at | |
| an integer is asserted. -/ | |
| noncomputable section | |
| open Set Filter | |
| open scoped Topology ContDiff | |
| namespace RapidForcing.CompactEmbedding | |
| def latticeVector (k : Fin 3 β β€) : Space := WithLp.toLp 2 (fun i => (k i : β)) | |
| def representative (x : Space) : Space := WithLp.toLp 2 (fun i => Int.fract (x i)) | |
| @[simp] theorem representative_apply (x : Space) (i : Fin 3) : | |
| representative x i = Int.fract (x i) := rfl | |
| @[simp] theorem latticeVector_apply (k : Fin 3 β β€) (i : Fin 3) : | |
| latticeVector k i = (k i : β) := rfl | |
| theorem representative_add_lattice (x : Space) (k : Fin 3 β β€) : | |
| representative (x + latticeVector k) = representative x := by | |
| ext i | |
| exact Int.fract_add_intCast (x i) (k i) | |
| theorem representative_eq {x : Space} (hx : β i, x i β Ico (0 : β) 1) : | |
| representative x = x := by | |
| ext i | |
| exact Int.fract_eq_self.mpr (hx i) | |
| def periodic {E : Type} (f : Field E) : Field E := fun t x => f t (representative x) | |
| theorem periodic_add_lattice {E : Type} (f : Field E) (t : β) | |
| (x : Space) (k : Fin 3 β β€) : | |
| periodic f t (x + latticeVector k) = periodic f t x := by | |
| simp only [periodic, representative_add_lattice] | |
| theorem periodic_eq_on_chart {E : Type} (f : Field E) (t : β) {x : Space} | |
| (hx : x β chart) : periodic f t x = f t x := by | |
| rw [periodic, representative_eq] | |
| intro i | |
| exact β¨(chart_inside_unit hx i).1.le, (chart_inside_unit hx i).2β© | |
| theorem representative_local_translation {x : Space} | |
| (hx : β i, x i β (βx iβ : β€)) : | |
| representative =αΆ [π x] (fun y => y - latticeVector (fun i => βx iβ)) := by | |
| have hlocal : β i : Fin 3, βαΆ y in π x, | |
| (βx iβ : β) < y i β§ y i < (βx iβ : β) + 1 := by | |
| intro i | |
| exact ((EuclideanSpace.proj i).continuous.continuousAt).eventually | |
| (Ioo_mem_nhds ((Int.floor_le (x i)).lt_of_ne (Ne.symm (hx i))) | |
| (Int.lt_floor_add_one (x i))) | |
| filter_upwards [Filter.eventually_all.mpr hlocal] with y hy | |
| ext i | |
| have hk : βy iβ = βx iβ := Int.floor_eq_iff.mpr β¨(hy i).1.le, (hy i).2β© | |
| simp only [representative_apply, PiLp.sub_apply, latticeVector_apply, Int.fract, hk] | |
| theorem fract_near_integer {x : β} {k : β€} | |
| (hx : x β Ioo ((k : β) - 1 / 8) ((k : β) + 1 / 8)) : | |
| Int.fract x < 1 / 4 β¨ 3 / 4 < Int.fract x := by | |
| have hfract : Int.fract (x - (k : β)) = Int.fract x := Int.fract_sub_intCast x k | |
| rw [β hfract] | |
| by_cases hp : 0 β€ x - (k : β) | |
| Β· left | |
| rw [Int.fract_eq_self.mpr β¨hp, by linarith [hx.2]β©] | |
| linarith [hx.2] | |
| Β· right | |
| have hk : βx - (k : β)β = (-1 : β€) := | |
| Int.floor_eq_iff.mpr β¨by norm_num; linarith [hx.1], by norm_num; linarithβ© | |
| rw [Int.fract, hk] | |
| norm_num | |
| linarith [hx.1] | |
| theorem representative_local_outside {x : Space} {i : Fin 3} | |
| (hx : x i = (βx iβ : β€)) : βαΆ y in π x, representative y β chart := by | |
| have hl : (βx iβ : β) - 1 / 8 < x i := by linarith [hx] | |
| have hr : x i < (βx iβ : β) + 1 / 8 := by linarith [hx] | |
| filter_upwards [((EuclideanSpace.proj i).continuous.continuousAt).eventually | |
| (Ioo_mem_nhds hl hr)] with y hy | |
| intro hc | |
| rcases fract_near_integer hy with h | h | |
| Β· exact (not_lt_of_ge (hc.1 i)) h | |
| Β· exact (not_lt_of_ge (hc.2 i)) h | |
| theorem periodic_local {E : Type} [Zero E] (f : Field E) | |
| (hf : β t x, x β chart β f t x = 0) (x : Space) : | |
| (β k : Fin 3 β β€, βαΆ y in π x, β t, periodic f t y = f t (y - latticeVector k)) β¨ | |
| (βαΆ y in π x, β t, periodic f t y = 0) := by | |
| by_cases hx : β i, x i β (βx iβ : β€) | |
| Β· left | |
| refine β¨fun i => βx iβ, ?_β© | |
| filter_upwards [representative_local_translation hx] with y hy t | |
| simp only [periodic, hy] | |
| Β· right | |
| push Not at hx | |
| obtain β¨i, hiβ© := hx | |
| filter_upwards [representative_local_outside hi] with y hy t | |
| exact hf t (representative y) hy | |
| theorem periodic_smooth {E : Type} [NormedAddCommGroup E] [NormedSpace β E] | |
| {f : Field E} (hs : ContDiff β β (Function.uncurry f)) | |
| (hf : β t x, x β chart β f t x = 0) : | |
| ContDiff β β (Function.uncurry (periodic f)) := by | |
| apply contDiff_iff_contDiffAt.mpr | |
| rintro β¨t, xβ© | |
| rcases periodic_local f hf x with β¨k, hkβ© | hz | |
| Β· have he : Function.uncurry (periodic f) =αΆ [π (t, x)] | |
| (fun p : β Γ Space => f p.1 (p.2 - latticeVector k)) := by | |
| filter_upwards [continuous_snd.continuousAt.eventually hk] with p hp | |
| exact hp p.1 | |
| exact (hs.comp (contDiff_fst.prodMk (contDiff_snd.sub contDiff_const))).contDiffAt.congr_of_eventuallyEq he | |
| Β· have he : Function.uncurry (periodic f) =αΆ [π (t, x)] (fun _ => (0 : E)) := by | |
| filter_upwards [continuous_snd.continuousAt.eventually hz] with p hp | |
| exact hp p.1 | |
| exact contDiffAt_const.congr_of_eventuallyEq he | |
| end RapidForcing.CompactEmbedding | |
| end | |
| end OAI | |