Download data/lean/OAI/Analysis/Calculus/Quaternion/CurrentOperations.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 3.36 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Analysis/Calculus/Quaternion/CurrentOperations.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Analysis/Calculus/Quaternion/CurrentOperations.lean
-
curl -L -o CurrentOperations.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Analysis/Calculus/Quaternion/CurrentOperations.lean
3.36 kB
| import OAI.Analysis.Calculus.Quaternion.Algebra | |
| /-! Actual differential product rules for quaternionic currents. -/ | |
| noncomputable section | |
| namespace OAI.Analysis.Calculus.Quaternion | |
| open scoped Matrix Matrix.Norms.Elementwise | |
| section Algebra | |
| variable {m s : Type*} [Fintype m] [Fintype s] | |
| theorem strongDivergence_add (e : s β Q) (dA dB : m Γ s β Matrix m m Q) (b : m) : | |
| strongDivergence e (fun p => dA p + dB p) b = | |
| strongDivergence e dA b + strongDivergence e dB b := by | |
| simp [strongDivergence, mul_add, Finset.sum_add_distrib] | |
| theorem strongDivergence_smul (e : s β Q) (dA : m Γ s β Matrix m m Q) | |
| (c : β) (b : m) : | |
| strongDivergence e (fun p => c β’ dA p) b = c β’ strongDivergence e dA b := by | |
| simp [strongDivergence, Finset.smul_sum] | |
| theorem strongDivergence_weighted (e : s β Q) (A : Matrix m m Q) | |
| (dA : m Γ s β Matrix m m Q) (g : β) (dg : m Γ s β β) (b : m) : | |
| strongDivergence e (fun p => dg p β’ A + g β’ dA p) b = | |
| (star (gradientMap e dg) α΅₯* A) b + g β’ strongDivergence e dA b := by | |
| rw [strongDivergence_add, strongDivergence_smul] | |
| congr 1 | |
| simp [strongDivergence, Matrix.vecMul, dotProduct, gradientMap, Finset.sum_mul] | |
| end Algebra | |
| section Differential | |
| variable {E m s : Type*} [NormedAddCommGroup E] [NormedSpace β E] | |
| [Fintype m] [Fintype s] | |
| private theorem fderiv_real_smul {F : Type*} [NormedAddCommGroup F] [NormedSpace β F] | |
| {g : E β β} {A : E β F} {x : E} | |
| (hg : DifferentiableAt β g x) (hA : DifferentiableAt β A x) (v : E) : | |
| fderiv β (fun y => g y β’ A y) x v = | |
| fderiv β g x v β’ A x + g x β’ fderiv β A x v := by | |
| have hF := (hg.hasFDerivAt.smul hA.hasFDerivAt).fderiv | |
| simpa only [add_apply, ContinuousLinearMap.smulRight_apply, | |
| smul_apply, add_comm] using! congrArg (fun L => L v) hF | |
| theorem fderiv_current_smul {g : E β β} {A : E β Matrix m m Q} {x : E} | |
| (hg : DifferentiableAt β g x) (hA : DifferentiableAt β A x) (v : E) : | |
| fderiv β (fun y => g y β’ A y) x v = | |
| fderiv β g x v β’ A x + g x β’ fderiv β A x v := by | |
| exact fderiv_real_smul hg hA v | |
| theorem strongDivergence_current_smul (e : s β Q) (d : m Γ s β E) | |
| {g : E β β} {A : E β Matrix m m Q} {x : E} | |
| (hg : DifferentiableAt β g x) (hA : DifferentiableAt β A x) (b : m) : | |
| strongDivergence e (fun p => fderiv β (fun y => g y β’ A y) x (d p)) b = | |
| (star (gradientMap e (fun p => fderiv β g x (d p))) α΅₯* A x) b + | |
| g x β’ strongDivergence e (fun p => fderiv β A x (d p)) b := by | |
| simp only [fderiv_current_smul hg hA] | |
| exact strongDivergence_weighted e (A x) _ (g x) _ b | |
| /-- Multiplication by a real function preserves current conservation whenever | |
| the current annihilates its quaternionic gradient. -/ | |
| theorem strongDivergence_current_smul_zero (e : s β Q) (d : m Γ s β E) | |
| {g : E β β} {A : E β Matrix m m Q} {x : E} | |
| (hg : DifferentiableAt β g x) (hA : DifferentiableAt β A x) | |
| (hG : star (gradientMap e (fun p => fderiv β g x (d p))) α΅₯* A x = 0) | |
| (hdiv : β b, strongDivergence e (fun p => fderiv β A x (d p)) b = 0) (b : m) : | |
| strongDivergence e (fun p => fderiv β (fun y => g y β’ A y) x (d p)) b = 0 := by | |
| rw [strongDivergence_current_smul e d hg hA, hG, hdiv] | |
| simp | |
| end Differential | |
| end OAI.Analysis.Calculus.Quaternion | |