File size: 5,940 Bytes
4a56cd6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
import OAI.Analysis.Calculus.Quaternion.IndexedCofactor
import OAI.Analysis.Calculus.Quaternion.Bochner

/-! Bochner averaging preserves the actual current's algebraic constraints. -/

noncomputable section
namespace OAI.Analysis.Calculus.Quaternion

open _root_.MeasureTheory OAI.LinearAlgebra.Moore
open scoped Matrix Matrix.Norms.Elementwise ComplexOrder Topology

variable {ι α : Type*} [Fintype ι] [MeasurableSpace α]

local instance : NormedAddCommGroup (Matrix ι ι Q) :=
  inferInstanceAs (NormedAddCommGroup (ι → ι → Q))

local instance : NormedSpace ℝ (Matrix ι ι Q) :=
  inferInstanceAs (NormedSpace ℝ (ι → ι → Q))

local instance : ContinuousSMul ℝ (Matrix ι ι Q) :=
  inferInstanceAs (ContinuousSMul ℝ (ι → ι → Q))

local instance : ContinuousENorm (Matrix ι ι Q) :=
  inferInstanceAs (ContinuousENorm (ι → ι → Q))

def currentRowCLM (r v : ι → Q) : Matrix ι ι Q →L[ℝ] Q :=
  ({ toFun := fun A => r ⬝ᵥ (A *ᵥ v)
     map_add' := by intros; simp [Matrix.add_mulVec, dotProduct_add]
     map_smul' := by intros; simp [Matrix.smul_mulVec, dotProduct_smul] } :
    Matrix ι ι Q →ₗ[ℝ] Q).toContinuousLinearMap

def currentQuadraticCLM (v : ι → Q) : Matrix ι ι Q →L[ℝ] ℝ :=
  ({ toFun := fun A => (star v ⬝ᵥ (A *ᵥ v)).re
     map_add' := by intros; simp [Matrix.add_mulVec, dotProduct_add]
     map_smul' := by intros; simp [Matrix.smul_mulVec, dotProduct_smul] } :
    Matrix ι ι Q →ₗ[ℝ] ℝ).toContinuousLinearMap

def currentStarCLM : Matrix ι ι Q →L[ℝ] Matrix ι ι Q :=
  ({ toFun := Matrix.conjTranspose
     map_add' := Matrix.conjTranspose_add
     map_smul' := by
       intro c A
       apply Matrix.ext
       intro i j
       simp only [Matrix.conjTranspose_apply, Matrix.smul_apply, Quaternion.star_smul,
         RingHom.id_apply] } : Matrix ι ι Q →ₗ[ℝ] Matrix ι ι Q).toContinuousLinearMap

theorem integral_current_isHermitian {μ : Measure α} {A : α → Matrix ι ι Q}
    (hA : Integrable A μ) (hH : ∀ᵐ x ∂μ, (A x).IsHermitian) :
    (∫ x, A x ∂μ).IsHermitian := by
  change currentStarCLM (∫ x, A x ∂μ) = ∫ x, A x ∂μ
  have hc : currentStarCLM (∫ x, A x ∂μ) = ∫ x, currentStarCLM (A x) ∂μ := by
    simpa only using! (currentStarCLM.integral_comp_comm hA).symm
  rw [hc]
  exact integral_congr_ae hH

theorem integral_current_row_zero {μ : Measure α} {A : α → Matrix ι ι Q}
    (hA : Integrable A μ) (r v : ι → Q)
    (hzero : ∀ᵐ x ∂μ, r ⬝ᵥ (A x *ᵥ v) = 0) :
    r ⬝ᵥ ((∫ x, A x ∂μ) *ᵥ v) = 0 := by
  change currentRowCLM r v (∫ x, A x ∂μ) = 0
  have hc : currentRowCLM r v (∫ x, A x ∂μ) = ∫ x, currentRowCLM r v (A x) ∂μ := by
    simpa only using! ((currentRowCLM r v).integral_comp_comm hA).symm
  rw [hc]
  simpa using! integral_congr_ae hzero

theorem integral_current_quadratic_nonneg {μ : Measure α} {A : α → Matrix ι ι Q}
    (hA : Integrable A μ) (v : ι → Q)
    (hpos : ∀ᵐ x ∂μ, 0 ≤ (star v ⬝ᵥ (A x *ᵥ v)).re) :
    0 ≤ (star v ⬝ᵥ ((∫ x, A x ∂μ) *ᵥ v)).re := by
  change 0 ≤ currentQuadraticCLM v (∫ x, A x ∂μ)
  have hc : currentQuadraticCLM v (∫ x, A x ∂μ) = ∫ x, currentQuadraticCLM v (A x) ∂μ := by
    simpa only using! ((currentQuadraticCLM v).integral_comp_comm hA).symm
  rw [hc]
  exact integral_nonneg_of_ae hpos

theorem integral_current_posSemidef {μ : Measure α} {A : α → Matrix ι ι Q}
    (hA : Integrable A μ) (hpos : ∀ᵐ x ∂μ, (OAI.LinearAlgebra.Moore.complexify (A x)).PosSemidef) :
    (OAI.LinearAlgebra.Moore.complexify (∫ x, A x ∂μ)).PosSemidef := by
  have hH : ∀ᵐ x ∂μ, (A x).IsHermitian := by
    apply hpos.mono
    intro x hx
    apply OAI.LinearAlgebra.Moore.complexify_injective
    rw [OAI.LinearAlgebra.Moore.complexify_star]
    exact hx.isHermitian
  apply (indexed_complexify_posSemidef_iff _ (integral_current_isHermitian hA hH)).mpr
  intro v
  apply integral_current_quadratic_nonneg hA v
  filter_upwards [hpos, hH] with x hx hh
  exact (indexed_complexify_posSemidef_iff _ hh).mp hx v

variable {E σ : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E]
  [FiniteDimensional ℝ E] [Fintype σ]

def currentDivergenceCLM (e : σ → Q) (d : ι × σ → E) (b : ι) :
    (E →L[ℝ] Matrix ι ι Q) →L[ℝ] Q :=
  ({ toFun := fun L => strongDivergence e (fun p => L (d p)) b
     map_add' := by
       intros
       simp [strongDivergence, mul_add, Finset.sum_add_distrib]
     map_smul' := by
       intros
       simp [strongDivergence, Finset.smul_sum] } :
    (E →L[ℝ] Matrix ι ι Q) →ₗ[ℝ] Q).toContinuousLinearMap

/-- Differentiation and averaging preserve conservation under the usual local
dominated-differentiation hypotheses. All derivatives here are actual Fréchet derivatives. -/
theorem integral_current_divergence_zero
    {μ : Measure α} (A : E → α → Matrix ι ι Q) {x : E} {s : Set E} (hs : s ∈ 𝓝 x)
    (bound : α → ℝ) (hbound : Integrable bound μ)
    (hmeas : ∀ᶠ y in 𝓝 x, AEStronglyMeasurable (A y) μ) (hA : Integrable (A x) μ)
    (hDmeas : AEStronglyMeasurable (fun t => fderiv ℝ (fun y => A y t) x) μ)
    (hD : ∀ᵐ t ∂μ, ∀ y ∈ s, DifferentiableAt ℝ (fun z => A z t) y)
    (hDbound : ∀ᵐ t ∂μ, ∀ y ∈ s,
      ‖(fderiv ℝ (fun z => A z t) y : E →L[ℝ] (ι → ι → Q))‖ ≤ bound t)
    (e : σ → Q) (d : ι × σ → E) (b : ι)
    (hzero : ∀ᵐ t ∂μ, strongDivergence e
      (fun p => fderiv ℝ (fun y => A y t) x (d p)) b = 0) :
    strongDivergence e (fun p => fderiv ℝ (fun y => ∫ t, A y t ∂μ) x (d p)) b = 0 := by
  change currentDivergenceCLM e d b (fderiv ℝ (fun y => ∫ t, A y t ∂μ) x) = 0
  simpa only using! integral_fderiv_linear_zero A hs bound hbound hmeas hA hDmeas hD hDbound
    (currentDivergenceCLM e d b) hzero

end OAI.Analysis.Calculus.Quaternion