import NavierStokes.WholeDomainPhysicalCompact import NavierStokes.ActualCycleResidualBounds import NavierStokes.PhysicalStageBounds import NavierStokes.AnnularEndpoint noncomputable section namespace NavierStokes.WholeDomainStageBounds open Set Filter Function ProblemStatement open scoped Topology ContDiff BigOperators open PhysicalWaveSum section BaseResidual open CorrectionInitialization CorrectionInitialization.ActualPrimary ActualCycleResidualBounds private abbrev baseResidual (B : ℕ) : VelocityField := PhysicalResidualJetBounds.residual (FinalSlowBase.velocity certificate modulation upper B) (FinalSlowBase.pressure certificate modulation upper B) private def exteriorDomain : Set SpaceTime := {w | w ∈ preterminal ∧ physicalQ h w ≤ 1 ∧ w ∉ active} private theorem exteriorDomain_past : exteriorDomain ⊆ SpacetimeEndpoint.openPast 1 := fun _ hw => ⟨hw.1, Set.mem_univ _⟩ private theorem baseResidual_smooth (B : ℕ) : ContDiffOn ℝ ∞ (baseResidual B) (SpacetimeEndpoint.openPast 1) := ResidualRegularity.contDiffOn_residual (SpacetimeEndpoint.openPast_isOpen 1) (FinalSlowBase.velocity_smooth certificate modulation upper B) (FinalSlowBase.pressure_smooth certificate modulation upper B) /-- At nonzero limiting axial coordinate the genuine endpoint chart has a positive limiting scale. -/ theorem physicalQ_tendsto_offplane {x : Space} (hx : x 2 ≠ 0) : Tendsto (physicalQ h) (𝓝[SpacetimeEndpoint.openPast 1] (1,x)) (𝓝 ((EndpointCoordinates.cartesianExtension h (1,x)).1)) := by have hc := (EndpointCoordinates.cartesianExtension_smoothAt outgoing.data.h_pos outgoing.data.h_lt_half (EndpointCoordinates.cartesian_endpoint_mem outgoing.data.h_pos outgoing.data.h_lt_half hx)).continuousAt.fst apply (hc.tendsto.mono_left nhdsWithin_le_nhds).congr' filter_upwards [self_mem_nhdsWithin] with w hw exact congrArg Prod.fst (EndpointCoordinates.cartesianExtension_eq_physical outgoing.data.h_pos outgoing.data.h_lt_half hw.1) private theorem baseResidual_local_rate (B m : ℕ) (r : ℝ) (w : SpaceTime) : DiagonalResidual.JetRate (𝓝[exteriorDomain] w) (physicalQ h) (baseResidual B) m r := by rcases w with ⟨t,x⟩ rcases lt_trichotomy t 1 with ht | ht | ht · have hs := (baseResidual_smooth B).contDiffAt ((SpacetimeEndpoint.openPast_isOpen 1).mem_nhds (show (t,x) ∈ SpacetimeEndpoint.openPast 1 from ⟨ht, mem_univ x⟩)) have hj : ContDiffAt ℝ 0 (iteratedFDeriv ℝ m (baseResidual B)) (t,x) := hs.iteratedFDeriv_right (by exact_mod_cast (le_top : 0 + (m : ℕ∞) ≤ ⊤)) exact rate_of_jet_limit (hj.continuousAt.tendsto.mono_left nhdsWithin_le_nhds) ((physicalQ_smoothAt outgoing.data.h_pos outgoing.data.h_lt_half ht).continuousAt.tendsto.mono_left nhdsWithin_le_nhds) (physicalQ_pos outgoing.data.h_pos outgoing.data.h_lt_half ht) r · subst t have hmono : 𝓝[exteriorDomain] ((1:ℝ),x) ≤ 𝓝[SpacetimeEndpoint.openPast 1] ((1:ℝ),x) := nhdsWithin_mono _ exteriorDomain_past by_cases hz : x 2 = 0 · have hcarrier : ∀ᶠ y in 𝓝[exteriorDomain] ((1:ℝ),x), y ∈ Metric.closedBall ((1:ℝ),x) 1 := nhdsWithin_le_nhds (Metric.closedBall_mem_nhds _ zero_lt_one) have hpast : ∀ᶠ y in 𝓝[exteriorDomain] ((1:ℝ),x), y.1 < 1 := by filter_upwards [self_mem_nhdsWithin] with y hy exact hy.1 have hscale := (AnnularEndpoint.physicalQ_tendsto_zero outgoing.data.h_pos outgoing.data.h_lt_half hz).mono_left hmono obtain ⟨C,hC,hb⟩ := GlobalBaseError.error_jetRate certificate modulation upper B actual_upper_covers_exterior (isCompact_closedBall _ _) hcarrier hpast hscale m (max r 0) (le_max_right _ _) refine ⟨C,hC,?_⟩ filter_upwards [hb,self_mem_nhdsWithin] with y hy hyS rw [iteratedFDeriv_eq_of_eventuallyEq (base_residual_germ B hyS.1 hyS.2.2) m] exact hy.trans (mul_le_mul_of_nonneg_left (Real.rpow_le_rpow_of_exponent_ge (physicalQ_pos outgoing.data.h_pos outgoing.data.h_lt_half hyS.1) hyS.2.1 (le_max_left _ _)) hC) · let U := SlowBaseEndpoint.finalVelocityNonzeroAxial certificate modulation upper B hz let P := SlowBaseEndpoint.finalPressureNonzeroAxial certificate modulation upper B hz have hp := EndpointCoordinates.cartesianExtension_pos (EndpointCoordinates.cartesian_endpoint_mem outgoing.data.h_pos outgoing.data.h_lt_half hz) exact rate_of_jet_limit ((residualExtension U P).jet_tendsto m |>.mono_left hmono) ((physicalQ_tendsto_offplane hz).mono_left hmono) hp r · refine ⟨0,le_rfl,?_⟩ have hn : {y : SpaceTime | 1 < y.1} ∈ 𝓝 ((t:ℝ),x) := (isOpen_lt continuous_const continuous_fst).mem_nhds ht filter_upwards [nhdsWithin_le_nhds hn,self_mem_nhdsWithin] with y hy hyS exact False.elim (not_lt_of_ge hy.le hyS.1) end BaseResidual section ResidualAssembly open ActualCycleResidualBounds PhysicalResidualJetBounds CorrectionInitialization end ResidualAssembly end NavierStokes.WholeDomainStageBounds