import Euler.PacketJoinedSourceEquations import Euler.PacketSourceRegularity import Euler.PacketRecursiveResidual /-! The actual finite packet built by the complete joined inverse has precisely the uncancelled tail. The primary field and its homogeneous equation are inputs; every nonprimary regularity and equation is discharged by construction. -/ /-! ## From `Euler/PacketJoinedSourceRegularity.lean` The text of `Euler/PacketJoinedSourceRegularity.lean`, folded into this file, which was its only importer. -/ section /-! Classical spatial slices and true within-time derivatives of the joined recursive family. -/ noncomputable section namespace EulerPacketCylinderField open Set EulerSmoothLimit EulerPacketPointJets EulerPacketProfileRecursion open scoped ContDiff variable (P : ℝ) [Fact (0 < P)] (M : EulerMeanPacketProvider.Data) {U : Type*} [NormedAddCommGroup U] [InnerProductSpace ℝ U] [CompleteSpace U] (D : EulerTransversePacketProvider.Data U) (hT : M.T = D.T) (τ : ℝ) (hτ : 0 < τ) (hτT : τ < D.T) (B : EulerTransversePacketProvider.HistoryData (D.initial τ hτ hτT.le)) (primary : Profile) (hprimary : ProfileRegularity P M.T M.T_pos.le D.support primary) include hT hprimary in theorem joinedSource_high_slice (p : ℕ) (t : Icc (0 : ℝ) M.T) (x : Space) (θ : ℝ) : SliceDifferentiable (Icc (0 : ℝ) M.T) (joinedSourceProfiles P M D τ hτ hτT B primary p).high (t,(x,θ)) := by let W := joinedSourceProfileWitness P M D hT τ hτ hτT B primary hprimary p exact W.high.sliceDifferentiable W.highDerivative M.T_pos.le W.high_time t x θ include hT hprimary in theorem joinedSource_mean_slice (p : ℕ) (t : Icc (0 : ℝ) M.T) (x : Space) (θ : ℝ) : SliceDifferentiable (Icc (0 : ℝ) M.T) (joinedSourceProfiles P M D τ hτ hτT B primary p).mean (t,(x,θ)) := by let W := joinedSourceProfileWitness P M D hT τ hτ hτT B primary hprimary p exact W.mean.sliceDifferentiable W.meanDerivative M.T_pos.le W.mean_time t x θ include hT hprimary in theorem joinedSource_corrector_slice (p : ℕ) (t : Icc (0 : ℝ) M.T) (x : Space) (θ : ℝ) : SliceDifferentiable (Icc (0 : ℝ) M.T) (joinedSourceProfiles P M D τ hτ hτT B primary p).corrector (t,(x,θ)) := by let W := joinedSourceProfileWitness P M D hT τ hτ hτT B primary hprimary p exact W.corrector.sliceDifferentiable W.correctorDerivative M.T_pos.le W.corrector_time t x θ include hT hprimary in theorem joinedSource_highPressure_smooth_all (hπ : ∀ t : Icc (0 : ℝ) M.T, ContDiff ℝ ∞ (fun y : Space × ℝ => primary.highPressure (t,y))) (p : ℕ) (t : Icc (0 : ℝ) M.T) : ContDiff ℝ ∞ (fun y : Space × ℝ => (joinedSourceProfiles P M D τ hτ hτT B primary p).highPressure (t,y)) := by by_cases hp0 : p = 0 · subst p simp only [joinedSourceProfiles,profiles_zero] change ContDiff ℝ ∞ (fun _ : Space × ℝ => (0 : ℝ)) exact contDiff_const by_cases hp1 : p = 1 · subst p simpa only [joinedSourceProfiles,profiles_one] using hπ t exact joinedSource_highPressure_smooth P M D hT τ hτ hτT B primary hprimary p (by omega) t include hT hprimary in theorem joinedSource_meanPressure_smooth_all (hm : primary.meanPressure = 0) (p : ℕ) (t : Icc (0 : ℝ) M.T) : ContDiff ℝ ∞ (fun y : Space × ℝ => (joinedSourceProfiles P M D τ hτ hτT B primary p).meanPressure (t,y)) := by by_cases hp0 : p = 0 · subst p simp only [joinedSourceProfiles,profiles_zero] change ContDiff ℝ ∞ (fun _ : Space × ℝ => (0 : ℝ)) exact contDiff_const by_cases hp1 : p = 1 · subst p simp only [joinedSourceProfiles,profiles_one,hm,Pi.zero_apply] exact contDiff_const exact joinedSource_meanPressure_smooth P M D hT τ hτ hτT B primary hprimary p (by omega) t include hT hprimary in theorem joinedSource_meanPressure_angle_all (hm : primary.meanPressure = 0) (p : ℕ) (t : Icc (0 : ℝ) M.T) (x : Space) (θ : ℝ) : (pressureJet (joinedSourceProfiles P M D τ hτ hτT B primary p).meanPressure (t,(x,θ))).2 angleDirection = 0 := by by_cases hp0 : p = 0 · subst p simp only [joinedSourceProfiles,profiles_zero] change (pressureJet (0 : ScalarField) (t,(x,θ))).2 angleDirection = 0 rw [pressureJet_zero] rfl by_cases hp1 : p = 1 · subst p simp only [joinedSourceProfiles,profiles_one,hm] rw [pressureJet_zero] rfl exact joinedSource_meanPressure_angle P M D hT τ hτ hτT B primary hprimary p (by omega) t x θ end EulerPacketCylinderField end end noncomputable section namespace EulerPacketCylinderField open Set Finset EulerSmoothLimit EulerPacketPointJets EulerPacketProfileRecursion open scoped ContDiff variable (P : ℝ) [Fact (0 < P)] (M : EulerMeanPacketProvider.Data) {U : Type*} [NormedAddCommGroup U] [InnerProductSpace ℝ U] [CompleteSpace U] (D : EulerTransversePacketProvider.Data U) (hT : M.T = D.T) (τ : ℝ) (hτ : 0 < τ) (hτT : τ < D.T) (B : EulerTransversePacketProvider.HistoryData (D.initial τ hτ hτT.le)) (A : VectorField) (π : ScalarField) abbrev joinedPrimaryProfiles : ℕ → Profile := joinedSourceProfiles P M D τ hτ hτT B (primaryProfile (joinedSourceOperators P M D τ hτ hτT B) A π) include hT in theorem joinedSource_residual_tail (hprimary : ProfileRegularity P M.T M.T_pos.le D.support (primaryProfile (joinedSourceOperators P M D τ hτ hτT B) A π)) (hπ : ∀ t : Icc (0 : ℝ) M.T, ContDiff ℝ ∞ (fun y : Space × ℝ => π (t,y))) (htan : ∀ (t : Icc (0 : ℝ) M.T) x θ, inner ℝ (D.normalField (t,(x,θ))) (A (t,(x,θ))) = 0) (hprimaryEquation : ∀ (t : Icc (0 : ℝ) M.T) x θ, linearPart (D.strain (t,(x,θ))) (slicedJet (Icc (0 : ℝ) M.T) A (t,(x,θ))) + fastPressure (D.normalField (t,(x,θ))) (pressureJet π (t,(x,θ))) = 0) (Cagree : SourceCoefficientAgreement M D) (N : ℕ) (hN : 1 ≤ N) (κ : ℝ) (hκ : κ ≠ 0) (t : Icc (0 : ℝ) M.T) (x : Space) (θ : ℝ) : slicedMomentumResidual (Icc (0 : ℝ) M.T) κ ((joinedSourceOperators P M D τ hτ hτT B).inverseFrame (t,(x,θ))) ((joinedSourceOperators P M D τ hτ hτT B).strain (t,(x,θ))) ((joinedSourceOperators P M D τ hτ hτT B).normal (t,(x,θ))) (fieldSum (N+1) κ (assembledVelocity N (joinedPrimaryProfiles P M D τ hτ hτT B A π))) (fieldSum (N+1) κ (assembledPressure N (joinedPrimaryProfiles P M D τ hτ hτT B A π))) (t,(x,θ)) = ∑ n ∈ Ico (N+1) (2*N+3), κ^n • recursiveGrade (joinedSourceOperators P M D τ hτ hτT B) N (joinedPrimaryProfiles P M D τ hτ hτT B A π) (t,(x,θ)) n := by apply recursive_residual_tail (joinedSourceOperators P M D τ hτ hτT B) A π N hN κ hκ (t,(x,θ)) · exact (uniqueDiffOn_Icc M.T_pos) _ t.property · intro p exact joinedSource_high_slice P M D hT τ hτ hτT B _ hprimary p t x θ · intro p exact joinedSource_mean_slice P M D hT τ hτ hτT B _ hprimary p t x θ · intro p exact joinedSource_corrector_slice P M D hT τ hτ hτT B _ hprimary p t x θ · intro p exact (joinedSource_meanPressure_smooth_all P M D hT τ hτ hτT B _ hprimary rfl p t).differentiable (by simp) (x,θ) · intro p exact (joinedSource_highPressure_smooth_all P M D hT τ hτ hτT B _ hprimary hπ p t).differentiable (by simp) (x,θ) · intro p _ change (pressureJet (joinedPrimaryProfiles P M D τ hτ hτT B A π p).meanPressure (t,(x,θ))).2 angleDirection • ((joinedSourceOperators P M D τ hτ hτT B).normal (t,(x,θ))) = (0 : Space) rw [joinedSource_meanPressure_angle_all P M D hT τ hτ hτT B _ hprimary rfl p t x θ,zero_smul] · exact htan t x θ · exact hprimaryEquation t x θ · intro p hp _ exact joinedSource_high_tangent P M D hT τ hτ hτT B _ hprimary p hp t x θ · intro p hp _ exact joinedSource_mean_equation P M D hT τ hτ hτT B _ hprimary Cagree p hp t x θ · intro p hp _ exact joinedSource_high_equation P M D hT τ hτ hτT B _ hprimary p hp t x θ end EulerPacketCylinderField