import NavierStokes.LocalPhysicalCopyBounds /-! # Positive lift-time localization of actual copy amplitudes The gate changes only the amplitude outside positive lift time. The physical common lift has positive time exactly before terminal time, so all physical copy fields and their ambient jets agree there with the original fields. -/ noncomputable section namespace NavierStokes.PositiveTimeCopyFamily open Set Function Filter ProblemStatement PhysicalCopyBounds open PhysicalWaveSum (WaveIndex commonLift preterminal) open scoped Topology ContDiff BigOperators abbrev LiftPoint := PhysicalGraphBounds.LiftPoint def liftPast : Set LiftPoint := {x | 0 < x.1.1} theorem liftPast_open : IsOpen liftPast := isOpen_lt continuous_const continuous_fst.fst /-- The carrier and gap are unchanged. Only the amplitude is extended by zero outside positive native lift time. -/ noncomputable def gate {H : ℕ} {K : Type*} (f : CopyFamily H K) : CopyFamily H K := by classical exact { gap := f.gap carrier := f.carrier amplitude k I x := if x ∈ liftPast then f.amplitude k I x else 0 } variable {H : ℕ} {K : Type*} @[simp] theorem gate_gap (f : CopyFamily H K) : (gate f).gap = f.gap := rfl @[simp] theorem gate_carrier (f : CopyFamily H K) : (gate f).carrier = f.carrier := rfl theorem gate_amplitude_eq (f : CopyFamily H K) (k : K) (I : WaveIndex H) {x : LiftPoint} (hx : x ∈ liftPast) : (gate f).amplitude k I x = f.amplitude k I x := by simp only [gate, ite_eq_left hx] theorem gate_amplitude_ne_zero_iff (f : CopyFamily H K) (k : K) (I : WaveIndex H) (x : LiftPoint) : (gate f).amplitude k I x ≠ 0 ↔ x ∈ liftPast ∧ f.amplitude k I x ≠ 0 := by classical by_cases hx : x ∈ liftPast <;> simp [gate, hx] theorem gate_amplitude_support_subset (f : CopyFamily H K) (k : K) (I : WaveIndex H) : support ((gate f).amplitude k I) ⊆ support (f.amplitude k I) := fun x hx => ((gate_amplitude_ne_zero_iff f k I x).mp hx).2 /-- The original closed copy cells still contain the gated amplitude. -/ noncomputable def gateCells {f : CopyFamily H K} (hc : SupportCells f) : SupportCells (gate f) where cells := hc.cells support I k := (gate_amplitude_support_subset f k I).trans (hc.support I k) @[simp] theorem gateCells_cells {f : CopyFamily H K} (hc : SupportCells f) : (gateCells hc).cells = hc.cells := rfl /-- Carrier bounds refer to the same carrier and the same cells. -/ noncomputable def gateCarrier {f : CopyFamily H K} (hc : SupportCells f) {a b h r0 : ℝ} (hb : CarrierBounds f hc a b h r0) : CarrierBounds (gate f) (gateCells hc) a b h r0 where region := hb.region open_region := hb.open_region jets := hb.jets contains := hb.contains @[simp] theorem gateCarrier_region {f : CopyFamily H K} (hc : SupportCells f) {a b h r0 : ℝ} (hb : CarrierBounds f hc a b h r0) : (gateCarrier hc hb).region = hb.region := rfl theorem commonLift_time (h : ℝ) (n d : ℕ) (w : SpaceTime) : (commonLift h n d w).1.1 = (1 - w.1) / ChartScales.Q n := PhysicalGraphBounds.physicalChart_time h n w /-- This identity also holds on the axis and for arbitrary cover gap. -/ theorem commonLift_mem_liftPast_iff (h : ℝ) (n d : ℕ) (w : SpaceTime) : commonLift h n d w ∈ liftPast ↔ w ∈ preterminal := by change 0 < (commonLift h n d w).1.1 ↔ w.1 < 1 rw [commonLift_time, div_pos_iff_of_pos_right (ChartScales.Q_pos n), sub_pos] theorem commonLift_mem_liftPast (h : ℝ) (n d : ℕ) {w : SpaceTime} (hw : w ∈ preterminal) : commonLift h n d w ∈ liftPast := (commonLift_mem_liftPast_iff h n d w).mpr hw section PhysicalFields variable (f : CopyFamily H K) (a h r0 : ℝ) theorem term_eq (I : WaveIndex H) (k : K) {w : SpaceTime} (hw : w ∈ preterminal) : (gate f).term a h r0 I k w = f.term a h r0 I k w := by have hl := commonLift_mem_liftPast h I.1.val.1 (f.gap I.1) hw simp only [CopyFamily.term, CopyFamily.copy, PhysicalWaveSum.WaveFamily.term, PhysicalWaveSum.globalWave, PhysicalWaveSum.commonWave, gate, ite_eq_left hl] theorem periodized_eq (I : WaveIndex H) {w : SpaceTime} (hw : w ∈ preterminal) : (gate f).periodized a h r0 I w = f.periodized a h r0 I w := by apply tsum_congr intro k exact term_eq f a h r0 I k hw theorem sum_eq {w : SpaceTime} (hw : w ∈ preterminal) : (gate f).sum a h r0 w = f.sum a h r0 w := by exact congrArg (fun g : WaveIndex H → ℂ => ∑ᶠ I, g I) (funext (fun I => periodized_eq f a h r0 I hw)) theorem sum_germ {w : SpaceTime} (hw : w ∈ preterminal) : (gate f).sum a h r0 =ᶠ[𝓝 w] f.sum a h r0 := by filter_upwards [PhysicalWaveSum.preterminal_open.mem_nhds hw] with y hy exact sum_eq f a h r0 hy end PhysicalFields section VectorFields variable (f : Fin 3 → CopyFamily H K) (a h r0 : ℝ) theorem vectorSum_eq {w : SpaceTime} (hw : w ∈ preterminal) : PhysicalCopyBounds.vectorSum (fun i => gate (f i)) a h r0 w = PhysicalCopyBounds.vectorSum f a h r0 w := by simp only [PhysicalCopyBounds.vectorSum, sum_eq (f _) a h r0 hw] theorem vectorSum_germ {w : SpaceTime} (hw : w ∈ preterminal) : PhysicalCopyBounds.vectorSum (fun i => gate (f i)) a h r0 =ᶠ[𝓝 w] PhysicalCopyBounds.vectorSum f a h r0 := by filter_upwards [PhysicalWaveSum.preterminal_open.mem_nhds hw] with y hy exact vectorSum_eq f a h r0 hy end VectorFields end NavierStokes.PositiveTimeCopyFamily