Download data/lean/OAI/Analysis/Calculus/Current/Algebra.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 6.57 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Analysis/Calculus/Current/Algebra.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Analysis/Calculus/Current/Algebra.lean
-
curl -L -o Algebra.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Analysis/Calculus/Current/Algebra.lean
6.57 kB
| 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 | |