math / data /lean /OAI /Analysis /Calculus /Current /RegularizedDivergence.lean
introvoyz045's picture
Migrated from GitHub
4a56cd6 verified
Raw History Blame Contribute Delete
9.65 kB
import OAI.Analysis.Calculus.Current.AverageCompact
/-! Conservation of the actual compactly averaged, cut off, regularized current. -/
noncomputable section
namespace OAI.Analysis.Calculus.Current
open _root_.MeasureTheory OAI.Analysis.Calculus.Quaternion
open scoped Matrix Matrix.Norms.Elementwise Topology ContDiff
private theorem fderiv_snd_value {E F G : Type*}
[NormedAddCommGroup E] [NormedSpace ℝ E]
[NormedAddCommGroup F] [NormedSpace ℝ F]
[NormedAddCommGroup G] [NormedSpace ℝ G]
{f : F β†’ G} (q : E Γ— F) (hf : DifferentiableAt ℝ f q.2) :
fderiv ℝ (fun y : E Γ— F => f y.2) q =
(fderiv ℝ f q.2).comp (ContinuousLinearMap.snd ℝ E F) := by
simpa only using! (hf.hasFDerivAt.comp q (ContinuousLinearMap.snd ℝ E F).hasFDerivAt).fderiv
private theorem differentiableAt_add_smul_value {E F : Type*}
[NormedAddCommGroup E] [NormedSpace ℝ E]
[NormedAddCommGroup F] [NormedSpace ℝ F]
{f g : E β†’ F} {q : E} (hf : DifferentiableAt ℝ f q)
(hg : DifferentiableAt ℝ g q) (c : ℝ) :
DifferentiableAt ℝ (fun y => f y + c β€’ g y) q :=
hf.add (hg.const_smul c)
private theorem fderiv_add_smul_value {E F : Type*}
[NormedAddCommGroup E] [NormedSpace ℝ E]
[NormedAddCommGroup F] [NormedSpace ℝ F]
{f g : E β†’ F} {q : E} (hf : DifferentiableAt ℝ f q)
(hg : DifferentiableAt ℝ g q) (c : ℝ) (v : E) :
fderiv ℝ (fun y => f y + c β€’ g y) q v =
fderiv ℝ f q v + c β€’ fderiv ℝ g q v := by
simpa only [add_apply, smul_apply] using!
congrArg (fun L => L v) (hf.hasFDerivAt.add (hg.hasFDerivAt.const_smul c)).fderiv
variable {d : β„•} {ΞΉ Ξ± : Type*} [Fintype ΞΉ]
local instance : NormedAddCommGroup (Matrix (Index d) (Index d) OAI.Analysis.Calculus.Quaternion.Q) :=
inferInstanceAs (NormedAddCommGroup (Index d β†’ Index d β†’ OAI.Analysis.Calculus.Quaternion.Q))
local instance : NormedSpace ℝ (Matrix (Index d) (Index d) OAI.Analysis.Calculus.Quaternion.Q) :=
inferInstanceAs (NormedSpace ℝ (Index d β†’ Index d β†’ OAI.Analysis.Calculus.Quaternion.Q))
local instance : ContinuousSMul ℝ (Matrix (Index d) (Index d) OAI.Analysis.Calculus.Quaternion.Q) :=
inferInstanceAs (ContinuousSMul ℝ (Index d β†’ Index d β†’ OAI.Analysis.Calculus.Quaternion.Q))
local instance : ContinuousConstSMul ℝ (Matrix (Index d) (Index d) OAI.Analysis.Calculus.Quaternion.Q) :=
inferInstanceAs (ContinuousConstSMul ℝ (Index d β†’ Index d β†’ OAI.Analysis.Calculus.Quaternion.Q))
theorem differentiableAt_cutoffCurrent (g : β„‚ β†’ ℝ) (a : ℝ)
(A : (Index d β†’ ℝ) β†’ (Index d β†’ β„‚) β†’ Matrix (Index d) (Index d) OAI.Analysis.Calculus.Quaternion.Q)
(q : CurrentSpace d) (hq : q ∈ currentNonzeroDomain d)
(hg : DifferentiableAt ℝ g (phi q.2 / (a : β„‚)))
(hA : DifferentiableAt ℝ (fun y : CurrentSpace d => A y.1 y.2) q) :
DifferentiableAt ℝ (fun y : CurrentSpace d => cutoffCurrent g a A y.1 y.2) q := by
have hΟ† := (differentiableAt_phi q.2 hq).restrictScalars ℝ
have hscale : DifferentiableAt ℝ (fun z : β„‚ => z / (a : β„‚)) (phi q.2) := by fun_prop
have hgs : DifferentiableAt ℝ (fun z : Index d β†’ β„‚ => g (phi z / (a : β„‚))) q.2 :=
hg.comp q.2 (hscale.comp q.2 hφ)
exact (hgs.comp q differentiableAt_snd).smul hA
theorem differentiableAt_fiberCofactor_field (w a : ℝ) (q : CurrentSpace d)
(hq : q ∈ currentNonzeroDomain d) :
DifferentiableAt ℝ (fun y : CurrentSpace d => fiberCofactor w a y.2) q :=
((contDiffAt_fiberCofactor w a q.2 hq).differentiableAt (by simp)).comp q
differentiableAt_snd
theorem fiberCofactor_field_divergence_zero (w a : ℝ) (q : CurrentSpace d)
(hq : q ∈ currentNonzeroDomain d) (b : Index d) :
OAI.Analysis.Calculus.Quaternion.strongDivergence OAI.Analysis.Calculus.Quaternion.threeSlots (fun p =>
fderiv ℝ (fun y : CurrentSpace d => fiberCofactor w a y.2) q
(currentDirection p)) b = 0 := by
have hC := (contDiffAt_fiberCofactor w a q.2 hq).differentiableAt (by simp)
change DifferentiableAt ℝ (fun z : Index d β†’ β„‚ =>
(fiberCofactor w a z : Index d β†’ Index d β†’ OAI.Analysis.Calculus.Quaternion.Q)) q.2 at hC
have hF : fderiv ℝ (fun y : CurrentSpace d => fiberCofactor w a y.2) q =
(fderiv ℝ (fiberCofactor w a) q.2).comp
(ContinuousLinearMap.snd ℝ (Index d β†’ ℝ) (Index d β†’ β„‚)) := by
simpa only using! fderiv_snd_value q hC
simp only [hF, ContinuousLinearMap.comp_apply]
change OAI.Analysis.Calculus.Quaternion.strongDivergence OAI.Analysis.Calculus.Quaternion.threeSlots (fun p =>
fderiv ℝ (fiberCofactor w a) q.2 ((currentDirection p).2)) b = 0
simp only [currentDirection_snd]
exact fiberCofactor_divergence_zero w a q.2 hq b
section Compact
variable [TopologicalSpace Ξ±] [CompactSpace Ξ±] [T2Space Ξ±] [SecondCountableTopology Ξ±]
[MeasurableSpace Ξ±] [BorelSpace Ξ±] (ΞΌ : Measure Ξ±) [IsFiniteMeasure ΞΌ]
theorem cutoff_averagedWaveCurrent_divergence_zero (shift : Ξ± β†’ Index d β†’ ℝ)
(hshift : Continuous shift) (g : β„‚ β†’ ℝ) (a : ℝ)
(ΞΊ cR cI : ΞΉ β†’ ℝ) (v : ΞΉ β†’ Fin d β†’ ℝ) (q : CurrentSpace d)
(hq : q ∈ currentNonzeroDomain d)
(hg : DifferentiableAt ℝ g (phi q.2 / (a : β„‚))) (b : Index d) :
OAI.Analysis.Calculus.Quaternion.strongDivergence OAI.Analysis.Calculus.Quaternion.threeSlots (fun p => fderiv ℝ
(fun y : CurrentSpace d =>
cutoffCurrent g a (averagedWaveCurrent ΞΌ shift ΞΊ cR cI v) y.1 y.2) q
(currentDirection p)) b = 0 := by
have hA := differentiableAt_averagedWaveCurrent ΞΌ shift hshift ΞΊ cR cI v q hq
have hcut := differentiableAt_cutoffCurrent g a _ q hq hg hA
have hdiv : βˆ€ b, OAI.Analysis.Calculus.Quaternion.strongDivergence OAI.Analysis.Calculus.Quaternion.threeSlots
(threeSlotMatrixDerivative (averagedWaveCurrent ΞΌ shift ΞΊ cR cI v) q.1 q.2) b = 0 := by
intro j
simpa only [fderiv_currentDirection hA] using
averagedWaveCurrent_divergence_zero ΞΌ shift hshift ΞΊ cR cI v q hq j
have htan : βˆ€ b, βˆ‘ c, complexK (phaseRow (ratio q.2) c) *
averagedWaveCurrent ΞΌ shift ΞΊ cR cI v q.1 q.2 c b = 0 := by
intro j
simpa only [Matrix.mulVec_single_one, Matrix.col_apply] using
averagedWaveCurrent_tangent ΞΌ shift ΞΊ cR cI v q.1 q.2
(integrable_waveCurrent_translate ΞΌ shift hshift ΞΊ cR cI v q.1 q.2 hq)
(Pi.single j 1)
simpa only [fderiv_currentDirection hcut] using
cutoffCurrent_divergence_zero g a hq hg hA htan hdiv b
theorem differentiableAt_regularizedCurrent (shift : Ξ± β†’ Index d β†’ ℝ)
(hshift : Continuous shift) (h a : ℝ) (ΞΊ cR cI : ΞΉ β†’ ℝ)
(v : ΞΉ β†’ Fin d β†’ ℝ) (q : CurrentSpace d) (hq : q ∈ currentNonzeroDomain d) :
DifferentiableAt ℝ
(fun y : CurrentSpace d => regularizedCurrent ΞΌ shift h a ΞΊ cR cI v y.1 y.2) q := by
have hA := differentiableAt_averagedWaveCurrent ΞΌ shift hshift ΞΊ cR cI v q hq
have hg := phaseCutoff_contDiff.differentiable (by simp) (phi q.2 / (a : β„‚))
have hC := differentiableAt_fiberCofactor_field (1 / 10) a q hq
change DifferentiableAt ℝ (fun y : CurrentSpace d =>
(fiberCofactor (1 / 10) a y.2 : Index d β†’ Index d β†’ OAI.Analysis.Calculus.Quaternion.Q)) q at hC
simpa only using! differentiableAt_add_smul_value
(differentiableAt_cutoffCurrent phaseCutoff a _ q hq hg hA) hC (h ^ (50 * (d + 1)))
/-- The divergence vanishes for the defined regularized current, with no
conservation, tangency, or differentiation-under-integral premise. -/
theorem regularizedCurrent_divergence_zero (shift : Ξ± β†’ Index d β†’ ℝ)
(hshift : Continuous shift) (h a : ℝ) (ΞΊ cR cI : ΞΉ β†’ ℝ)
(v : ΞΉ β†’ Fin d β†’ ℝ) (q : CurrentSpace d) (hq : q ∈ currentNonzeroDomain d)
(b : Index d) :
OAI.Analysis.Calculus.Quaternion.strongDivergence OAI.Analysis.Calculus.Quaternion.threeSlots (fun p => fderiv ℝ
(fun y : CurrentSpace d => regularizedCurrent ΞΌ shift h a ΞΊ cR cI v y.1 y.2) q
(currentDirection p)) b = 0 := by
have hA := differentiableAt_averagedWaveCurrent ΞΌ shift hshift ΞΊ cR cI v q hq
have hg := phaseCutoff_contDiff.differentiable (by simp) (phi q.2 / (a : β„‚))
have hcut := differentiableAt_cutoffCurrent phaseCutoff a _ q hq hg hA
have hC := differentiableAt_fiberCofactor_field (1 / 10) a q hq
change DifferentiableAt ℝ (fun y : CurrentSpace d =>
(fiberCofactor (1 / 10) a y.2 : Index d β†’ Index d β†’ OAI.Analysis.Calculus.Quaternion.Q)) q at hC
change DifferentiableAt ℝ (fun y : CurrentSpace d =>
(cutoffCurrent phaseCutoff a (averagedWaveCurrent ΞΌ shift ΞΊ cR cI v) y.1 y.2 :
Index d β†’ Index d β†’ OAI.Analysis.Calculus.Quaternion.Q)) q at hcut
have hF (p : Index d Γ— Fin 3) : fderiv ℝ
(fun y : CurrentSpace d => regularizedCurrent ΞΌ shift h a ΞΊ cR cI v y.1 y.2) q
(currentDirection p) =
fderiv ℝ (fun y : CurrentSpace d => cutoffCurrent phaseCutoff a
(averagedWaveCurrent ΞΌ shift ΞΊ cR cI v) y.1 y.2) q (currentDirection p) +
h ^ (50 * (d + 1)) β€’ fderiv ℝ
(fun y : CurrentSpace d => fiberCofactor (1 / 10) a y.2) q (currentDirection p) := by
simpa only using! fderiv_add_smul_value hcut hC (h ^ (50 * (d + 1))) (currentDirection p)
simp only [hF, OAI.Analysis.Calculus.Quaternion.strongDivergence_add, OAI.Analysis.Calculus.Quaternion.strongDivergence_smul, cutoff_averagedWaveCurrent_divergence_zero ΞΌ shift hshift phaseCutoff a ΞΊ cR cI v q hq hg b, fiberCofactor_field_divergence_zero (1 / 10) a q hq b, smul_zero, add_zero]
end Compact
end OAI.Analysis.Calculus.Current