File size: 6,573 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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
import Mathlib
import OAI.Analysis.Calculus.Quaternion.Algebra

/-! Algebra of the wave current in `sections/current.tex`.

The complex field here represents the commutative quaternionic plane
`span(1, k)`. The order of quaternionic amplitudes is retained separately
in the outer-product lemmas.
-/

namespace OAI.Analysis.Calculus.Current

open scoped Matrix

noncomputable section

abbrev Index (d : β„•) := Option (Option (Fin d))

/-- The row `β„“(w) = (-wΒ·w/2, w, 1)`, indexed by time, space, and null time. -/
def phaseRow {d : β„•} (w : Fin d β†’ β„‚) : Index d β†’ β„‚
  | none => -(βˆ‘ i, w i * w i) / 2
  | some none => 1
  | some (some i) => w i

/-- The tangent vector `Vα΅› = (1, (v+W)/2, -WΒ·v/2)`. -/
def tangentVector {d : β„•} (v W : Fin d β†’ β„‚) : Index d β†’ β„‚
  | none => 1
  | some none => -(βˆ‘ i, W i * v i) / 2
  | some (some i) => (v i + W i) / 2

/-- Equation (phase-polarization), including its full off-diagonal form. -/
theorem phase_polarization {d : β„•} (w W v : Fin d β†’ β„‚) :
    βˆ‘ a, phaseRow w a * tangentVector v W a =
      -(βˆ‘ i, (w i - W i) * (w i - v i)) / 2 := by
  simp only [Fintype.sum_option, phaseRow, tangentVector, mul_one, one_mul]
  simp only [mul_sub, sub_mul, Finset.sum_sub_distrib, div_eq_mul_inv,
    mul_add, add_mul, Finset.sum_add_distrib]
  simp_rw [show βˆ€ i, W i * w i = w i * W i from fun i => mul_comm _ _]
  simp only [← mul_assoc, ← Finset.sum_mul]
  ring

/-- Every current vector is killed by its own real phase row. -/
theorem phase_tangent {d : β„•} (v W : Fin d β†’ β„‚) :
    βˆ‘ a, phaseRow v a * tangentVector v W a = 0 := by
  rw [phase_polarization]
  simp

/-- Every current vector is tangent to the common holomorphic background. -/
theorem background_tangent {d : β„•} (v W : Fin d β†’ β„‚) :
    βˆ‘ a, phaseRow W a * tangentVector v W a = 0 := by
  rw [phase_polarization]
  simp

/-- Tangency survives a finite superposition, including complex amplitudes. -/
theorem superposition_tangent {d : β„•} {ΞΉ : Type*} [Fintype ΞΉ]
    (W : Fin d β†’ β„‚) (v : ΞΉ β†’ Fin d β†’ β„‚) (amplitude : ΞΉ β†’ β„‚) :
    βˆ‘ a, phaseRow W a * (βˆ‘ j, tangentVector (v j) W a * amplitude j) = 0 := by
  simp_rw [Finset.mul_sum]
  rw [Finset.sum_comm]
  simp_rw [← mul_assoc, ← Finset.sum_mul, background_tangent, zero_mul]
  simp

/-- The copy of the complex numbers spanned by `1` and the quaternionic `k`. -/
def complexK : β„‚ β†’+* Quaternion ℝ where
  toFun z := ⟨z.re, 0, 0, z.im⟩
  map_one' := by ext <;> simp
  map_zero' := by ext <;> simp
  map_add' z w := by ext <;> simp
  map_mul' z w := by ext <;> simp

/-- The quaternionic unit perpendicular to the complex `k` plane. -/
def qi : Quaternion ℝ := ⟨0, 1, 0, 0⟩

theorem complexK_star (z : β„‚) : star (complexK z) = complexK (star z) := by
  ext <;> simp [complexK]

theorem qi_complexK (z : β„‚) : qi * complexK z = complexK (star z) * qi := by
  ext <;> simp [complexK, qi]

/-- The moving imaginary unit of the amplitude embedding has square `-1`. -/
theorem movingUnit_square (e : β„‚) (he : Complex.normSq e = 1) :
    (complexK e * qi) ^ 2 = -1 := by
  simp only [Complex.normSq_apply] at he
  ext <;> simp [complexK, qi, pow_two] <;> nlinarith

/-- Multiplication in the moving complex plane agrees with complex multiplication. -/
theorem movingEmbedding_mul (e : β„‚) (he : Complex.normSq e = 1) (z w : β„‚) :
    ((z.re : Quaternion ℝ) + (complexK e * qi) * (z.im : Quaternion ℝ)) *
      ((w.re : Quaternion ℝ) + (complexK e * qi) * (w.im : Quaternion ℝ)) =
    (((z * w).re : Quaternion ℝ) +
      (complexK e * qi) * ((z * w).im : Quaternion ℝ)) := by
  simp only [Complex.normSq_apply] at he
  have hp := congrArg (fun t : ℝ => t * z.im * w.im) he
  ext <;> simp [complexK, qi] <;> nlinarith [hp]

/-- The paired-current expansion, including the cross terms between distinct modes.
Here `a,b` are entries of `V`, while `c,d` are entries of `V'`. -/
theorem paired_current_expansion (a b c d e : β„‚) (f g : ℝ) :
    complexK a * ((f : Quaternion ℝ) + (g : Quaternion ℝ) * complexK e * qi) *
      star (complexK d) +
    complexK c * ((f : Quaternion ℝ) - (g : Quaternion ℝ) * complexK e * qi) *
      star (complexK b) =
    complexK ((a * star d + c * star b) * (f : β„‚)) +
      complexK ((a * d - c * b) * (g : β„‚) * e) * qi := by
  ext <;> simp [complexK, qi] <;> ring

/-- Exact quaternionic current column, preserving amplitude order. -/
def currentColumn {d : β„•} {ΞΉ : Type*} [Fintype ΞΉ]
    (W : Fin d β†’ β„‚) (v : ΞΉ β†’ Fin d β†’ β„‚)
    (amplitude : ΞΉ β†’ Quaternion ℝ) : Index d β†’ Quaternion ℝ :=
  fun a => βˆ‘ j, complexK (tangentVector (v j) W a) * star (amplitude j)

/-- Quaternionic amplitudes do not disturb the common left tangency equation. -/
theorem currentColumn_tangent {d : β„•} {ΞΉ : Type*} [Fintype ΞΉ]
    (W : Fin d β†’ β„‚) (v : ΞΉ β†’ Fin d β†’ β„‚) (amplitude : ΞΉ β†’ Quaternion ℝ) :
    βˆ‘ a, complexK (phaseRow W a) * currentColumn W v amplitude a = 0 := by
  simp only [currentColumn, Finset.mul_sum]
  rw [Finset.sum_comm]
  simp only [← mul_assoc, ← map_mul, ← Finset.sum_mul, ← map_sum,
    background_tangent, map_zero, zero_mul, Finset.sum_const_zero]

/-- `A⁰ = Ο‡ Ο‡*` from the manuscript. -/
def currentMatrix {d : β„•} {ΞΉ : Type*} [Fintype ΞΉ]
    (W : Fin d β†’ β„‚) (v : ΞΉ β†’ Fin d β†’ β„‚) (amplitude : ΞΉ β†’ Quaternion ℝ) :=
  OAI.Analysis.Calculus.Quaternion.outer (currentColumn W v amplitude)

theorem currentMatrix_isHermitian {d : β„•} {ΞΉ : Type*} [Fintype ΞΉ]
    (W : Fin d β†’ β„‚) (v : ΞΉ β†’ Fin d β†’ β„‚) (amplitude : ΞΉ β†’ Quaternion ℝ) :
    (currentMatrix W v amplitude).IsHermitian :=
  OAI.Analysis.Calculus.Quaternion.outer_isHermitian _

theorem currentMatrix_quadratic_nonneg {d : β„•} {ΞΉ : Type*} [Fintype ΞΉ]
    (W : Fin d β†’ β„‚) (v : ΞΉ β†’ Fin d β†’ β„‚) (amplitude : ΞΉ β†’ Quaternion ℝ)
    (x : Index d β†’ Quaternion ℝ) :
    0 ≀ (βˆ‘ a, star (x a) * (currentMatrix W v amplitude *α΅₯ x) a).re :=
  OAI.Analysis.Calculus.Quaternion.outer_quadratic_nonneg _ _

/-- The image of the full interacting current is tangent to `Ξ¦`. -/
theorem currentMatrix_image_tangent {d : β„•} {ΞΉ : Type*} [Fintype ΞΉ]
    (W : Fin d β†’ β„‚) (v : ΞΉ β†’ Fin d β†’ β„‚) (amplitude : ΞΉ β†’ Quaternion ℝ)
    (x : Index d β†’ Quaternion ℝ) :
    βˆ‘ a, complexK (phaseRow W a) * (currentMatrix W v amplitude *α΅₯ x) a = 0 :=
  OAI.Analysis.Calculus.Quaternion.outer_image_tangent _ _ _ (currentColumn_tangent W v amplitude)

end
end OAI.Analysis.Calculus.Current