import Euler.MeanPacketConstraints import Euler.MeanFixedReflection import Euler.MeanBoundaryMixed import Euler.MeanSolenoidalReflection import Euler.MeanScaledCutoff /-! # Actual reflection symmetry of the mean packet solve Even source matrices and an odd forcing commute through the complete mean form, including its localized initial boundary operator. The odd coordinate velocity follows from uniqueness of the constructed inverse. -/ /-! ## From `Euler/MeanBoundaryReflection.lean` The text of `Euler/MeanBoundaryReflection.lean`, folded into this file, which was its only importer. -/ section /-! Reflection covariance of the actual cutoff-curl/Riesz boundary operator. On homogeneous gradient tensors reflection is componentwise pullback. It is represented by the reflected vector test `-φ(-x)`, so both curl signs cancel. No covariance or parity of an inverse operator is assumed. -/ noncomputable section namespace EulerMeanBoundary open MeasureTheory InnerProductSpace EulerSmoothLimit EulerVectorCalculus EulerMeanSolenoidal EulerMeanCutoffCurl EulerMeanGradientTest open scoped ContDiff def Cutoff.reflect (χ : Cutoff) : Cutoff := ⟨fun x => χ.field (-x), χ.smooth.comp contDiff_id.neg, χ.compact.comp_homeomorph (Homeomorph.neg Space)⟩ theorem Cutoff.reflect_eq_of_even (χ : Cutoff) (hχ : ∀ x, χ.field (-x) = χ.field x) : χ.reflect = χ := Cutoff.ext (funext hχ) def l2ReflectionEquiv : L2 ≃ₗᵢ[ℝ] L2 := LinearIsometryEquiv.ofSurjective reflection (fun u => ⟨reflection u, reflection_involutive u⟩) def gradientReflection : GradientTensor ≃ₗᵢ[ℝ] GradientTensor := LinearIsometryEquiv.piLpCongrRight 2 (fun _ : Fin 3 => l2ReflectionEquiv) theorem gradientReflection_involutive (G : GradientTensor) : gradientReflection (gradientReflection G) = G := by ext i : 1 exact reflection_involutive (G i) def reflectedTest (f : Test) : Test := ⟨fun x => -(f : Space → Space) (-x), (f.smooth.comp contDiff_id.neg).neg, (f.compact.comp_homeomorph (Homeomorph.neg Space)).neg⟩ theorem testGradient_reflected (f : Test) : EulerMeanGradientTest.testGradient (reflectedTest f) = gradientReflection (EulerMeanGradientTest.testGradient f) := by ext i : 1 change derivativeColumn (reflectedTest f) i = reflection (derivativeColumn f i) apply Lp.ext filter_upwards [derivativeColumn_ae (reflectedTest f) i, reflection_ae (derivativeColumn f i), measurePreserving_reflection.quasiMeasurePreserving.ae (derivativeColumn_ae f i)] with x ht hr hf rw [ht, hr, hf] change fderiv ℝ (fun y => -(f : Space → Space) (-y)) x _ = _ rw [fderiv_neg_reflect _ (f.smooth.differentiable (by simp))] theorem gradientReflection_homogeneous (u : homogeneousSpace) : gradientReflection (u : GradientTensor) ∈ homogeneousSpace := by refine homogeneousGradient_dense.induction_on u ?_ ?_ · exact EulerMeanGradientTest.testGradient.range.isClosed_topologicalClosure.preimage (gradientReflection.continuous.comp continuous_subtype_val) · intro f change gradientReflection (EulerMeanGradientTest.testGradient f) ∈ homogeneousSpace rw [← testGradient_reflected] exact EulerMeanGradientTest.testGradient.range.le_topologicalClosure (LinearMap.mem_range_self _ _) def homogeneousReflection : homogeneousSpace →ₗᵢ[ℝ] homogeneousSpace where toFun u := ⟨gradientReflection (u : GradientTensor), gradientReflection_homogeneous u⟩ map_add' u v := by apply Subtype.ext; exact map_add gradientReflection _ _ map_smul' c u := by apply Subtype.ext; exact map_smul gradientReflection c _ norm_map' u := gradientReflection.norm_map (u : GradientTensor) theorem homogeneousReflection_involutive (u : homogeneousSpace) : homogeneousReflection (homogeneousReflection u) = u := by apply Subtype.ext exact gradientReflection_involutive (u : GradientTensor) theorem homogeneousReflection_test (f : Test) : homogeneousReflection (homogeneousGradient f) = homogeneousGradient (reflectedTest f) := by apply Subtype.ext exact (testGradient_reflected f).symm theorem homogeneousReflection_inner_shift (u v : homogeneousSpace) : ⟪homogeneousReflection u, v⟫_ℝ = ⟪u, homogeneousReflection v⟫_ℝ := by calc _ = ⟪homogeneousReflection u, homogeneousReflection (homogeneousReflection v)⟫_ℝ := by rw [homogeneousReflection_involutive] _ = _ := homogeneousReflection.inner_map_map u (homogeneousReflection v) theorem vectorCurl_neg_reflect (f : Space → Space) (hf : Differentiable ℝ f) (x : Space) : vectorCurl (fun y => -f (-y)) x = vectorCurl f (-x) := by have hleft : Differentiable ℝ (fun y => -f (-y)) := (hf.comp differentiable_id.neg).neg rw [vectorCurl_eq_matrix _ x (hleft x), fderiv_neg_reflect f hf, ← vectorCurl_eq_matrix f (-x) (hf (-x))] theorem testCurl_reflected (χ : Cutoff) (f : Test) : reflection (testCurl χ f) = testCurl χ.reflect (reflectedTest f) := by apply Lp.ext filter_upwards [reflection_ae (testCurl χ f), measurePreserving_reflection.quasiMeasurePreserving.ae (testCurl_ae χ f), testCurl_ae χ.reflect (reflectedTest f)] with x hr hχ ht rw [hr, hχ, ht] have he := vectorCurl_neg_reflect (fun y => χ.field y • (f : Space → Space) y) ((χ.smooth.smul f.smooth).differentiable (by simp)) x simpa only [Cutoff.reflect, reflectedTest, smul_neg] using he.symm /-- Covariance is proved first on real compact tests, then by density. -/ theorem cutoffCurl_reflection (χ : Cutoff) (u : homogeneousSpace) : reflection (cutoffCurl χ u) = cutoffCurl χ.reflect (homogeneousReflection u) := by refine homogeneousGradient_dense.induction_on u ?_ ?_ · exact isClosed_eq (reflection.continuous.comp (cutoffCurl χ).continuous) ((cutoffCurl χ.reflect).continuous.comp homogeneousReflection.continuous) · intro f rw [homogeneousReflection_test, cutoffCurl_on_test, cutoffCurl_on_test] exact testCurl_reflected χ f /-- The actual Riesz solution, rather than an assumed inverse, respects reflection. -/ theorem weakPotential_reflection (χ : Cutoff) (z : L2) : homogeneousReflection (weakPotential χ z) = weakPotential χ.reflect (reflection z) := by apply ext_inner_right ℝ intro v calc _ = ⟪weakPotential χ z, homogeneousReflection v⟫_ℝ := homogeneousReflection_inner_shift _ _ _ = ⟪z, cutoffCurl χ (homogeneousReflection v)⟫_ℝ := ContinuousLinearMap.adjoint_inner_left (cutoffCurl χ) _ z _ = ⟪reflection z, reflection (cutoffCurl χ (homogeneousReflection v))⟫_ℝ := (reflection.inner_map_map _ _).symm _ = ⟪reflection z, cutoffCurl χ.reflect v⟫_ℝ := by rw [cutoffCurl_reflection, homogeneousReflection_involutive] _ = _ := (ContinuousLinearMap.adjoint_inner_left (cutoffCurl χ.reflect) v _).symm theorem mixedBoundaryOperator_reflection (χ ψ : Cutoff) (z : L2) : reflection (mixedBoundaryOperator χ ψ z) = mixedBoundaryOperator χ.reflect ψ.reflect (reflection z) := by change reflection (cutoffCurl χ (weakPotential ψ z)) = cutoffCurl χ.reflect (weakPotential ψ.reflect (reflection z)) rw [cutoffCurl_reflection, weakPotential_reflection] theorem boundaryOperator_reflection (χ : Cutoff) (z : L2) : reflection (boundaryOperator χ z) = boundaryOperator χ.reflect (reflection z) := mixedBoundaryOperator_reflection χ χ z theorem boundaryOperator_reflection_of_even (χ : Cutoff) (hχ : ∀ x, χ.field (-x) = χ.field x) (z : L2) : reflection (boundaryOperator χ z) = boundaryOperator χ (reflection z) := by rw [boundaryOperator_reflection, Cutoff.reflect_eq_of_even χ hχ] /-- The concrete source boundary operator commutes with ordinary spatial reflection. -/ theorem scaledBoundaryOperator_reflection (ℓ : ℝ) (hℓ : 0 < ℓ) (z : L2) : reflection (boundaryOperator (scaledCutoff ℓ hℓ) z) = boundaryOperator (scaledCutoff ℓ hℓ) (reflection z) := boundaryOperator_reflection_of_even (scaledCutoff ℓ hℓ) (scaledCutoff_even ℓ hℓ) z end EulerMeanBoundary end end noncomputable section namespace EulerMeanPacketProvider open Set MeasureTheory InnerProductSpace ContinuousLinearMap EulerSmoothLimit EulerMeanSolenoidal EulerMeanCoefficients EulerMeanBoundary EulerMeanHarmonic EulerMeanSourceInverse EulerMeanVariationalInverse EulerMeanSourceFixedInverse EulerMeanFixedSpaceInverse EulerMeanFixedReflection EulerMeanTimeReflection EulerMeanScalarPressure EulerTimeLp EulerVolterraConvolution EulerCoerciveProjection EulerPacketProfileRecursion open scoped NNReal ContDiff /-- These are literal parity assumptions on the prescribed source coefficients. -/ structure EvenData (D : Data) : Prop where frame : ∀ t x, D.F.field t (-x) = D.F.field t x frameDerivative : ∀ t x, D.F₁.field t (-x) = D.F₁.field t x curvature : ∀ t x, D.H.field t (-x) = D.H.field t x initialStrain : ∀ x, D.M0.field (-x) = D.M0.field x strain : ∀ t x, D.M.field t (-x) = D.M.field t x /-- Actual pointwise multiplication by an even matrix field commutes with reflection. -/ theorem multiplier_reflection_of_even (A : Field) (hA : ∀ x, A (-x) = A x) : ReflectionInvariant (multiplier A) := by intro u apply Lp.ext filter_upwards [multiplier_ae A (reflection u), reflection_ae u, reflection_ae (multiplier A u), measurePreserving_reflection.quasiMeasurePreserving.ae (multiplier_ae A u)] with x hm hr hmr hrm rw [hm, hr, hmr, hrm, hA x] namespace Data variable (D : Data) /-- The actual source coordinate solve as a bounded linear operator. -/ def coordinateSolver : TimeLp D.T L2 →L[ℝ] TimeLp D.T solenoidalSpace := sourceCoordinateSolver D.T D.T_pos.le D.ℓ D.ℓ_pos D.F D.F₁ D.H D.M0 D.opInv D.Be D.Bc D.L D.r D.Be_nonneg D.Bc_nonneg D.L_lower D.r_nonneg D.r_le_quarter D.exterior_lower D.core_lower D.opInv_left D.opF_time D.K D.K_nonneg D.opInv_initial D.curvature_upper D.small theorem coordinateSolver_reflection (hD : EvenData D) (f : TimeLp D.T L2) : timeSolenoidalReflection D.T (D.coordinateSolver f) = D.coordinateSolver (timeReflection D.T f) := by exact coerciveSolution_reflection D.T D.T_pos.le D.opF D.opF₁ D.opH (multiplier D.M0.field) (boundaryOperator (scaledCutoff D.ℓ D.ℓ_pos)) D.L (fun t => multiplier_reflection_of_even (D.F.field t) (hD.frame t)) (fun t => multiplier_reflection_of_even (D.F₁.field t) (hD.frameDerivative t)) (fun t => multiplier_reflection_of_even (D.H.field t) (hD.curvature t)) (multiplier_reflection_of_even D.M0.field hD.initialStrain) (fun u => (scaledBoundaryOperator_reflection D.ℓ D.ℓ_pos u).symm) (sourceFixedCoercivity D.T D.F D.F₁ D.opInv) (sourceFixedCoercivity_pos D.T D.T_pos.le D.F D.F₁ D.opInv) (sourceFixedForm_coercive D.T D.T_pos.le D.ℓ D.ℓ_pos D.F D.F₁ D.H D.M0 D.opInv D.Be D.Bc D.L D.r D.Be_nonneg D.Bc_nonneg D.L_lower D.r_nonneg D.r_le_quarter D.exterior_lower D.core_lower D.opInv_left D.opF_time D.K D.K_nonneg D.opInv_initial D.curvature_upper D.small) f end Data namespace Forcing variable {D : Data} {raw : VectorField} (G : Forcing D raw) theorem velocityLp_eq_coordinateSolver : G.solution.velocityLp = D.coordinateSolver G.lp := EulerMeanSourceSpatialRegularity.velocity_eq_sourceCoordinates D.T D.T_pos.le D.ℓ D.ℓ_pos D.F D.F₁ D.H D.M0 D.opInv D.Be D.Bc D.L D.r D.Be_nonneg D.Bc_nonneg D.L_lower D.r_nonneg D.r_le_quarter D.exterior_lower D.core_lower D.opInv_left D.opF_time D.opInv_right D.K D.K_nonneg D.opInv_initial D.curvature_upper D.small G.lp G.solution variable (hodd : ∀ (t : Icc (0 : ℝ) D.T) x, raw (t,(-x,0)) = -raw (t,(x,0))) include hodd in theorem path_reflection (t : Icc (0 : ℝ) D.T) : reflection (G.path t) = -(G.path t) := by apply Lp.ext filter_upwards [reflection_ae (G.path t), measurePreserving_reflection.quasiMeasurePreserving.ae (pathRepresentative_ae D.T G.path G.path_orbit t), pathRepresentative_ae D.T G.path G.path_orbit t, Lp.coeFn_neg (G.path t)] with x h₁ h₂ h₃ h₄ rw [h₁, h₂, G.forcingRepresentative_eq t (-x) 0, hodd t x, h₄] change -raw (t,(x,0)) = -(G.path t x) rw [h₃, G.forcingRepresentative_eq t x 0] include hodd in theorem lp_reflection : timeReflection D.T G.lp = -G.lp := by apply Lp.ext filter_upwards [timeReflection_ae D.T G.lp, G.lp_rep, Lp.coeFn_neg G.lp] with t h₁ h₂ h₃ rw [h₁, h₂] change reflection (G.path (projIcc 0 D.T D.T_pos.le t)) = _ rw [G.path_reflection hodd] exact (congrArg Neg.neg h₂).symm.trans h₃.symm include hodd in theorem velocityLp_reflection (hD : EvenData D) : timeSolenoidalReflection D.T G.solution.velocityLp = -G.solution.velocityLp := (congrArg (timeSolenoidalReflection D.T) G.velocityLp_eq_coordinateSolver).trans ((D.coordinateSolver_reflection hD G.lp).trans ((congrArg D.coordinateSolver (G.lp_reflection hodd)).trans ((D.coordinateSolver.map_neg G.lp).trans (congrArg Neg.neg G.velocityLp_eq_coordinateSolver).symm))) include hodd in /-- Oddness of the actual L² solve holds pointwise for its continuous time representative. -/ theorem coordinate_velocity_reflection (hD : EvenData D) (t : Icc (0 : ℝ) D.T) : solenoidalReflection (G.solution.velocity t) = -G.solution.velocity t := by have hae : (fun r => solenoidalReflection (G.solution.velocity r)) =ᵐ[timeMeasure D.T] (fun r => -G.solution.velocity r) := by filter_upwards [timeSolenoidalReflection_ae D.T G.solution.velocityLp, G.solution.velocity_ae, Lp.coeFn_neg G.solution.velocityLp] with r h₁ h₂ h₃ have he := congrArg (fun z : TimeLp D.T solenoidalSpace => z r) (G.velocityLp_reflection hodd hD) exact (congrArg solenoidalReflection h₂).symm.trans (h₁.symm.trans (he.trans (h₃.trans (congrArg Neg.neg h₂)))) have hc : ContinuousOn G.solution.velocity (Icc (0 : ℝ) D.T) := by simpa only [uIcc_of_le D.T_pos.le] using G.solution.velocity_ac.continuousOn exact Measure.eqOn_Icc_of_ae_eq volume D.T_pos.ne hae (solenoidalReflection.continuous.comp_continuousOn hc) hc.neg t.property end Forcing end EulerMeanPacketProvider