import NavierStokes.WholeDomainPhysicalCompact import NavierStokes.ActualCycleResidualBounds import NavierStokes.PhysicalStageBounds import NavierStokes.AnnularEndpoint import NavierStokes.ActualCandidateAssembly import NavierStokes.SharpPhysicalLogBounds /-! ## From `NavierStokes/WholeDomainStageBounds.lean` The text of `NavierStokes/WholeDomainStageBounds.lean`, folded into this file, which was its only importer. -/ section 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 end end /-! ## From `NavierStokes/WholeDomainActualStageBounds.lean` The text of `NavierStokes/WholeDomainActualStageBounds.lean`, folded into this file, which was its only importer. -/ section noncomputable section namespace NavierStokes.WholeDomainStageBounds open Set Function Filter ProblemStatement CorrectionInitialization open CorrectionInitialization.ActualPrimary ActualCandidateAssembly PhysicalWaveSum open scoped Topology ContDiff BigOperators /-- One common scale for every finite stage and every derivative order. -/ noncomputable def commonQ (B N0 : ℕ) : ℝ := ChartScales.Q (ActualCandidateConstruction.residualBand B N0) theorem commonQ_pos (B N0 : ℕ) : 0 < commonQ B N0 := ChartScales.Q_pos _ theorem commonQ_lt_original (B N0 : ℕ) : commonQ B N0 < ActualCandidateConstruction.qbig B N0 := by have he := ActualCandidateConstruction.twice_residual_scale B N0 have hp := commonQ_pos B N0 change 2 * commonQ B N0 = _ at he linarith end NavierStokes.WholeDomainStageBounds end end noncomputable section namespace NavierStokes.WholeDomainStageBounds open Set Function Filter ProblemStatement PhysicalWaveSum SharpGluedStageBounds open CorrectionInitialization.ActualPrimary ActualCandidateAssembly open scoped Topology ContDiff BigOperators private noncomputable abbrev seedT (B N0 : ℕ) := ActualPhysicalStageBounds.actualInitialTemporalInput B N0 (ActualCandidateConstruction.firstBand B N0) (ActualCandidateConstruction.firstBand_four B N0) private noncomputable abbrev seedR (B N0 : ℕ) := ActualPhysicalStageBounds.actualInitialRankInput B N0 (ActualCandidateConstruction.firstBand B N0) (ActualCandidateConstruction.firstBand_four B N0) private noncomputable abbrev seedB (B N0 : ℕ) := ActualPhysicalStageBounds.actualInitialAngularInput B N0 (ActualCandidateConstruction.firstBand B N0) (ActualCandidateConstruction.firstBand_four B N0) private noncomputable abbrev seedP (B N0 : ℕ) := ActualPhysicalStageBounds.actualInitialPressureInput B N0 (ActualCandidateConstruction.firstBand B N0) (ActualCandidateConstruction.firstBand_four B N0) end NavierStokes.WholeDomainStageBounds