import Euler.TransversePacketCorrectorOperator import Euler.PacketPotentialParity /-! The literal corrector preserves joint odd parity under the actual even inverse deformation. -/ noncomputable section namespace EulerTransversePacketProvider open Set ContinuousLinearMap EulerSmoothLimit EulerLiftedGradientSpace EulerPacketProfileRecursion EulerPacketPiola EulerPacketAngularPotential EulerCylinderSmoothOrbit open scoped ContDiff private theorem fderiv_of_even (f : LiftTangent → Space) (hf : ContDiff ℝ ∞ f) (he : ∀ z, f (-z) = f z) (z : LiftTangent) : fderiv ℝ f (-z) = -fderiv ℝ f z := by have hd := ((hf.differentiable (by simp) (-z)).hasFDerivAt).comp z ((hasFDerivAt_id (𝕜 := ℝ) z).neg) have heq : (fun y => f (-y)) = f := funext he have h : fderiv ℝ f z = -fderiv ℝ f (-z) := by simpa only [Function.comp_def, heq, comp_neg, comp_id] using hd.fderiv simpa only [neg_neg] using congrArg Neg.neg h.symm namespace Data variable {U : Type*} [NormedAddCommGroup U] [InnerProductSpace ℝ U] (D : Data U) (P : ℝ) [Fact (0 < P)] (A : VectorField) (t : ℝ) theorem rawPotential_smooth (hA : ContDiff ℝ ∞ (fun y : LiftTangent => A (t,y))) : ContDiff ℝ ∞ (fun y : LiftTangent => D.rawPotential P A (t,y)) := by have hn (x : Space) : D.normal.field (D.clamp t) x ≠ 0 := by intro hz have hl := D.normal_lower (D.clamp t) x rw [hz, norm_zero, zero_pow (by decide : 2 ≠ 0)] at hl exact (not_le_of_gt D.normalLower_pos) hl exact coveringPotential_contDiff P (Fact.out : 0 < P).le (fun x => D.normal.field (D.clamp t) x) (fun y => A (t,y)) (D.normal.smooth (D.clamp t)) hn hA variable (hInv : ∀ x, D.FInv.field (D.clamp t) (-x) = D.FInv.field (D.clamp t) x) (hA : ContDiff ℝ ∞ (fun y : LiftTangent => A (t,y))) (hper : ∀ x, Function.Periodic (fun θ => A (t,(x,θ))) P) (hmean : ∀ x, (∫ θ in (0 : ℝ)..P, A (t,(x,θ))) = 0) (hodd : ∀ x θ, A (t,(-x,-θ)) = -A (t,(x,θ))) include hInv hA hper hmean hodd in theorem rawPotential_even (x : Space) (θ : ℝ) : D.rawPotential P A (t,(-x,-θ)) = D.rawPotential P A (t,(x,θ)) := by have hn (y : Space) : D.normal.field (D.clamp t) (-y) = D.normal.field (D.clamp t) y := by change (D.FInv.field (D.clamp t) (-y)).adjoint D.m₀ = (D.FInv.field (D.clamp t) y).adjoint D.m₀ rw [hInv] exact potential_joint_even P (Fact.out : 0 < P).ne' (fun y => D.normal.field (D.clamp t) y) (fun y θ => A (t,(y,θ))) hn (fun y => hA.continuous.comp (continuous_const.prodMk continuous_id)) hper hmean hodd x θ include hInv hA hper hmean hodd in theorem curlCorrector_odd (x : Space) (θ : ℝ) : D.curlCorrector P A (t,(-x,-θ)) = -D.curlCorrector P A (t,(x,θ)) := by have he (z : LiftTangent) : D.rawPotential P A (t,-z) = D.rawPotential P A (t,z) := D.rawPotential_even P A t hInv hA hper hmean hodd z.1 z.2 have hd := fderiv_of_even (fun z : LiftTangent => D.rawPotential P A (t,z)) (D.rawPotential_smooth P A t hA) he (x,θ) change curlOperator ((fderiv ℝ (fun z : LiftTangent => D.rawPotential P A (t,z)) (-(x,θ))).comp ((ContinuousLinearMap.inl ℝ Space ℝ).comp (D.FInv.field (D.clamp t) (-x)))) = -curlOperator ((fderiv ℝ (fun z : LiftTangent => D.rawPotential P A (t,z)) (x,θ)).comp ((ContinuousLinearMap.inl ℝ Space ℝ).comp (D.FInv.field (D.clamp t) x))) rw [hd, hInv, neg_comp, map_neg] end Data namespace Forcing variable {P : ℝ} [Fact (0 < P)] {U : Type*} [NormedAddCommGroup U] [InnerProductSpace ℝ U] [CompleteSpace U] {D : Data U} {raw : VectorField} (G : Forcing P D raw) (I : InitialData P D) theorem corrector_odd (t : Icc (0 : ℝ) D.T) (hInv : ∀ x, D.FInv.field t (-x) = D.FInv.field t x) (hA : ∀ x θ, G.vector I (t,(-x,-θ)) = -G.vector I (t,(x,θ))) (x : Space) (θ : ℝ) : G.corrector I (t,(-x,-θ)) = -G.corrector I (t,(x,θ)) := by rw [← G.curlCorrector_eq I t (-x) (-θ), ← G.curlCorrector_eq I t x θ] apply D.curlCorrector_odd P (G.vector I) t · simpa only [D.clamp_coe] using hInv · exact G.vector_spatial_smooth I t · exact G.vector_periodic I t · exact G.vector_mean_zero I t · exact hA end Forcing end EulerTransversePacketProvider