Imports
/- Copyright (c) 2025 Joseph Tooby-Smith. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Joseph Tooby-Smith -/ module public import Physlib.Electromagnetism.Kinematics.EMPotential public import Mathlib.Algebra.Order.Archimedean.Real.Hom

The vector Potential

i. Overview

The electromagnetic potential is given by A = (1/c φ, \vec A) where φ is the scalar potential and \vec A is the vector potential.

In this module we define the vector potential, and prove lemmas about it.

Since A is relativistic it is a function of SpaceTime d, whilst the vector potential is non-relativistic and is therefore a function of Time and Space d.

ii. Key results

    ElectromagneticPotential.vectorPotential : The vector potential from an electromagnetic potential.

iii. Table of contents

    A. Definition of the Vector Potential

    B. Smoothness of the vector potential

    C. Differentiablity of the vector potential

iv. References

@[expose] public sectionattribute [-simp] Fintype.sum_sum_typeattribute [-simp] Nat.succ_eq_add_one

A. Definition of the Vector Potential

B. Relation to constructors

@[simp] lemma ofScalarPotential_vectorPotential {d} (c : SpeedOfLight) (φ : Time → Space d → ℝ) : (ofScalarPotential c φ).vectorPotential c = 0 := d:ℕc:SpeedOfLightφ:Time → Space d → ℝ⊢ vectorPotential c (ofScalarPotential c φ) = 0 d:ℕc:SpeedOfLightφ:Time → Space d → ℝ⊢ ((timeSlice c) fun x => WithLp.toLp 2 fun val => 0) = 0 All goals completed! 🐙@[simp] lemma ofStaticScalarPotential_vectorPotential {d} (c : SpeedOfLight) (φ : Space d → ℝ) : (ofStaticScalarPotential c φ).vectorPotential c = 0 := d:ℕc:SpeedOfLightφ:Space d → ℝ⊢ vectorPotential c (ofStaticScalarPotential c φ) = 0 All goals completed! 🐙@[simp] lemma ofVectorPotential_vectorPotential {d} (c : SpeedOfLight) (A : Time → Space d → EuclideanSpace ℝ (Fin d)) : (ofVectorPotential c A).vectorPotential c = A := d:ℕc:SpeedOfLightA:Time → Space d → EuclideanSpace ℝ (Fin d)⊢ vectorPotential c (ofVectorPotential c A) = A d:ℕc:SpeedOfLightA:Time → Space d → EuclideanSpace ℝ (Fin d)i:Timex✝:Space di✝:Fin d⊢ (vectorPotential c (ofVectorPotential c A) i x✝).ofLp i✝ = (A i x✝).ofLp i✝ All goals completed! 🐙@[simp] lemma ofStaticVectorPotential_vectorPotential {d} (c : SpeedOfLight) (A : Space d → EuclideanSpace ℝ (Fin d)) : (ofStaticVectorPotential c A).vectorPotential c = fun _ => A := d:ℕc:SpeedOfLightA:Space d → EuclideanSpace ℝ (Fin d)⊢ vectorPotential c (ofStaticVectorPotential c A) = fun x => A All goals completed! 🐙@[simp] lemma ofPotentials_vectorPotential {d} (c : SpeedOfLight) (φ : Time → Space d → ℝ) (A : Time → Space d → EuclideanSpace ℝ (Fin d)) : (ofPotentials c φ A).vectorPotential c = A := d:ℕc:SpeedOfLightφ:Time → Space d → ℝA:Time → Space d → EuclideanSpace ℝ (Fin d)⊢ vectorPotential c (ofPotentials c φ A) = A d:ℕc:SpeedOfLightφ:Time → Space d → ℝA:Time → Space d → EuclideanSpace ℝ (Fin d)i:Timex✝:Space di✝:Fin d⊢ (vectorPotential c (ofPotentials c φ A) i x✝).ofLp i✝ = (A i x✝).ofLp i✝ All goals completed! 🐙@[simp] lemma ofStaticPotentials_vectorPotential {d} (c : SpeedOfLight) (φ : Space d → ℝ) (A : Space d → EuclideanSpace ℝ (Fin d)) : (ofStaticPotentials c φ A).vectorPotential c = fun _ => A := d:ℕc:SpeedOfLightφ:Space d → ℝA:Space d → EuclideanSpace ℝ (Fin d)⊢ vectorPotential c (ofStaticPotentials c φ A) = fun x => A All goals completed! 🐙

B.1. ofElectromagneticField

c:SpeedOfLightE:Time → Space → EuclideanSpace ℝ (Fin 3)B:Time → Space → EuclideanSpace ℝ (Fin 3)t:Timex:Spacea:ℝhB:Continuous ↿Bh1:∀ (a b : ℝ), ⟪a, b⟫_ℝ = b * a⊢ ∑ i, ⟪(Space.basis.repr x).ofLp i, (vectorPotential c (ofElectromagneticField c E B) t (a • x)).ofLp i⟫_ℝ = 0 c:SpeedOfLightE:Time → Space → EuclideanSpace ℝ (Fin 3)B:Time → Space → EuclideanSpace ℝ (Fin 3)t:Timex:Spacea:ℝhB:Continuous ↿Bh1:∀ (a b : ℝ), ⟪a, b⟫_ℝ = b * a⊢ ((a * x.val 3 2 * ∫ (u : ℝ) in 0..1, u * (B t (u • a • x)).ofLp 1) - a * x.val 3 1 * ∫ (u : ℝ) in 0..1, u * (B t (u • a • x)).ofLp 2) * x.val 3 0 + ((a * x.val 3 0 * ∫ (u : ℝ) in 0..1, u * (B t (u • a • x)).ofLp 2) - a * x.val 3 2 * ∫ (u : ℝ) in 0..1, u * (B t (u • a • x)).ofLp 0) * x.val 3 1 + ((a * x.val 3 1 * ∫ (u : ℝ) in 0..1, u * (B t (u • a • x)).ofLp 0) - a * x.val 3 0 * ∫ (u : ℝ) in 0..1, u * (B t (u • a • x)).ofLp 1) * x.val 3 2 = 0 All goals completed! 🐙c:SpeedOfLightE:Time → Space → EuclideanSpace ℝ (Fin 3)B:Time → Space → EuclideanSpace ℝ (Fin 3)t:Timex:Spacea:ℝhB:ContDiff ℝ 1 ↿B⊢ ⟪(fderiv ℝ (fun x_1 => vectorPotential c (ofElectromagneticField c E B) x_1 (a • x)) t) 1, Space.basis.repr x⟫_ℝ = ⟪vectorPotential c (ofElectromagneticField c E B) t (a • x), (fderiv ℝ (fun t => Space.basis.repr x) t) 1⟫_ℝ + ⟪(fderiv ℝ (fun t => vectorPotential c (ofElectromagneticField c E B) t (a • x)) t) 1, Space.basis.repr x⟫_ℝc:SpeedOfLightE:Time → Space → EuclideanSpace ℝ (Fin 3)B:Time → Space → EuclideanSpace ℝ (Fin 3)t:Timex:Spacea:ℝhB:ContDiff ℝ 1 ↿B⊢ DifferentiableAt ℝ (fun t => vectorPotential c (ofElectromagneticField c E B) t (a • x)) tc:SpeedOfLightE:Time → Space → EuclideanSpace ℝ (Fin 3)B:Time → Space → EuclideanSpace ℝ (Fin 3)t:Timex:Spacea:ℝhB:ContDiff ℝ 1 ↿B⊢ DifferentiableAt ℝ (fun t => Space.basis.repr x) t c:SpeedOfLightE:Time → Space → EuclideanSpace ℝ (Fin 3)B:Time → Space → EuclideanSpace ℝ (Fin 3)t:Timex:Spacea:ℝhB:ContDiff ℝ 1 ↿B⊢ DifferentiableAt ℝ (fun t => vectorPotential c (ofElectromagneticField c E B) t (a • x)) tc:SpeedOfLightE:Time → Space → EuclideanSpace ℝ (Fin 3)B:Time → Space → EuclideanSpace ℝ (Fin 3)t:Timex:Spacea:ℝhB:ContDiff ℝ 1 ↿B⊢ DifferentiableAt ℝ (fun t => Space.basis.repr x) t c:SpeedOfLightE:Time → Space → EuclideanSpace ℝ (Fin 3)B:Time → Space → EuclideanSpace ℝ (Fin 3)t:Timex:Spacea:ℝhB:ContDiff ℝ 1 ↿B⊢ Differentiable ℝ fun t => vectorPotential c (ofElectromagneticField c E B) t (a • x)c:SpeedOfLightE:Time → Space → EuclideanSpace ℝ (Fin 3)B:Time → Space → EuclideanSpace ℝ (Fin 3)t:Timex:Spacea:ℝhB:ContDiff ℝ 1 ↿B⊢ DifferentiableAt ℝ (fun t => Space.basis.repr x) t c:SpeedOfLightE:Time → Space → EuclideanSpace ℝ (Fin 3)B:Time → Space → EuclideanSpace ℝ (Fin 3)t:Timex:Spacea:ℝhB:ContDiff ℝ 1 ↿B⊢ DifferentiableAt ℝ (fun t => Space.basis.repr x) t All goals completed! 🐙 conv_lhs => c:SpeedOfLightE:Time → Space → EuclideanSpace ℝ (Fin 3)B:Time → Space → EuclideanSpace ℝ (Fin 3)t✝:Timex:Spacea:ℝhB:ContDiff ℝ 1 ↿Bt:Time| ⟪vectorPotential c (ofElectromagneticField c E B) t (a • x), Space.basis.repr x⟫_ℝ rw [vectorPotential_inner_radial_eq_zero_ofElectromagneticField (c:SpeedOfLightE:Time → Space → EuclideanSpace ℝ (Fin 3)B:Time → Space → EuclideanSpace ℝ (Fin 3)t✝:Timex:Spacea:ℝhB:ContDiff ℝ 1 ↿Bt:Time⊢ Continuous ↿B All goals completed! 🐙)] All goals completed! 🐙

B. Smoothness of the vector potential

We prove various lemmas about the smoothness of the vector potential from the smoothness of the electromagnetic potential.

n:WithTop ℕ∞d:ℕc:SpeedOfLightA:ElectromagneticPotential dhA:ContDiff ℝ n A.valh1:∀ (i : Fin 1 ⊕ Fin d), ContDiff ℝ n fun x => A.val x i⊢ ∀ (i : Fin d), ContDiff ℝ n fun x => (WithLp.toLp 2 fun i => A.val x (Sum.inr i)).ofLp i All goals completed! 🐙@[fun_prop] lemma vectorPotential_contDiff_of_smooth {n : ℕ} {d} {c : SpeedOfLight} (A : ElectromagneticPotential d) (hA : ContDiff ℝ ∞ A) : ContDiff ℝ n ↿(A.vectorPotential c) := n:ℕd:ℕc:SpeedOfLightA:ElectromagneticPotential dhA:ContDiff ℝ ∞ A.val⊢ ContDiff ℝ ↑n ↿(vectorPotential c A) n:ℕd:ℕc:SpeedOfLightA:ElectromagneticPotential dhA:ContDiff ℝ ∞ A.val⊢ ContDiff ℝ (↑n) A.val All goals completed! 🐙lemma vectorPotential_apply_contDiff {n} {d} {c : SpeedOfLight} (A : ElectromagneticPotential d) (hA : ContDiff ℝ n A) (i : Fin d) : ContDiff ℝ n ↿(fun t x => A.vectorPotential c t x i) := n:ℕ∞ωd:ℕc:SpeedOfLightA:ElectromagneticPotential dhA:ContDiff ℝ n A.vali:Fin d⊢ ContDiff ℝ n ↿fun t x => (vectorPotential c A t x).ofLp i n:ℕ∞ωd:ℕc:SpeedOfLightA:ElectromagneticPotential dhA:ContDiff ℝ n A.vali:Fin d⊢ ContDiff ℝ n (⇑(EuclideanSpace.proj i) ∘ ↿(vectorPotential c A)) n:ℕ∞ωd:ℕc:SpeedOfLightA:ElectromagneticPotential dhA:ContDiff ℝ n A.vali:Fin d⊢ ContDiff ℝ n ⇑(EuclideanSpace.proj i)n:ℕ∞ωd:ℕc:SpeedOfLightA:ElectromagneticPotential dhA:ContDiff ℝ n A.vali:Fin d⊢ ContDiff ℝ n ↿(vectorPotential c A) n:ℕ∞ωd:ℕc:SpeedOfLightA:ElectromagneticPotential dhA:ContDiff ℝ n A.vali:Fin d⊢ ContDiff ℝ n ⇑(EuclideanSpace.proj i) All goals completed! 🐙 n:ℕ∞ωd:ℕc:SpeedOfLightA:ElectromagneticPotential dhA:ContDiff ℝ n A.vali:Fin d⊢ ContDiff ℝ n ↿(vectorPotential c A) All goals completed! 🐙lemma vectorPotential_comp_contDiff {n} {d} {c : SpeedOfLight} (A : ElectromagneticPotential d) (hA : ContDiff ℝ n A) (i : Fin d) : ContDiff ℝ n ↿(fun t x => A.vectorPotential c t x i) := n:ℕ∞ωd:ℕc:SpeedOfLightA:ElectromagneticPotential dhA:ContDiff ℝ n A.vali:Fin d⊢ ContDiff ℝ n ↿fun t x => (vectorPotential c A t x).ofLp i n:ℕ∞ωd:ℕc:SpeedOfLightA:ElectromagneticPotential dhA:ContDiff ℝ n A.vali:Fin d⊢ ContDiff ℝ n (⇑(EuclideanSpace.proj i) ∘ ↿(vectorPotential c A)) n:ℕ∞ωd:ℕc:SpeedOfLightA:ElectromagneticPotential dhA:ContDiff ℝ n A.vali:Fin d⊢ ContDiff ℝ n ⇑(EuclideanSpace.proj i)n:ℕ∞ωd:ℕc:SpeedOfLightA:ElectromagneticPotential dhA:ContDiff ℝ n A.vali:Fin d⊢ ContDiff ℝ n ↿(vectorPotential c A) n:ℕ∞ωd:ℕc:SpeedOfLightA:ElectromagneticPotential dhA:ContDiff ℝ n A.vali:Fin d⊢ ContDiff ℝ n ⇑(EuclideanSpace.proj i) All goals completed! 🐙 n:ℕ∞ωd:ℕc:SpeedOfLightA:ElectromagneticPotential dhA:ContDiff ℝ n A.vali:Fin d⊢ ContDiff ℝ n ↿(vectorPotential c A) All goals completed! 🐙lemma vectorPotential_contDiff_space {n} {d} {c : SpeedOfLight} (A : ElectromagneticPotential d) (hA : ContDiff ℝ n A) (t : Time) : ContDiff ℝ n (A.vectorPotential c t) := n:ℕ∞ωd:ℕc:SpeedOfLightA:ElectromagneticPotential dhA:ContDiff ℝ n A.valt:Time⊢ ContDiff ℝ n (vectorPotential c A t) n:ℕ∞ωd:ℕc:SpeedOfLightA:ElectromagneticPotential dhA:ContDiff ℝ n A.valt:Time⊢ ContDiff ℝ n (↿(vectorPotential c A) ∘ fun x => (t, x)) n:ℕ∞ωd:ℕc:SpeedOfLightA:ElectromagneticPotential dhA:ContDiff ℝ n A.valt:Time⊢ ContDiff ℝ n ↿(vectorPotential c A)n:ℕ∞ωd:ℕc:SpeedOfLightA:ElectromagneticPotential dhA:ContDiff ℝ n A.valt:Time⊢ ContDiff ℝ n fun x => (t, x) n:ℕ∞ωd:ℕc:SpeedOfLightA:ElectromagneticPotential dhA:ContDiff ℝ n A.valt:Time⊢ ContDiff ℝ n ↿(vectorPotential c A) All goals completed! 🐙 n:ℕ∞ωd:ℕc:SpeedOfLightA:ElectromagneticPotential dhA:ContDiff ℝ n A.valt:Time⊢ ContDiff ℝ n fun x => (t, x) All goals completed! 🐙lemma vectorPotential_apply_contDiff_space {n} {d} {c : SpeedOfLight} (A : ElectromagneticPotential d) (hA : ContDiff ℝ n A) (t : Time) (i : Fin d) : ContDiff ℝ n (fun x => A.vectorPotential c t x i) := n:ℕ∞ωd:ℕc:SpeedOfLightA:ElectromagneticPotential dhA:ContDiff ℝ n A.valt:Timei:Fin d⊢ ContDiff ℝ n fun x => (vectorPotential c A t x).ofLp i n:ℕ∞ωd:ℕc:SpeedOfLightA:ElectromagneticPotential dhA:ContDiff ℝ n A.valt:Timei:Fin d⊢ ContDiff ℝ n (⇑(EuclideanSpace.proj i) ∘ ↿(vectorPotential c A) ∘ fun x => (t, x)) n:ℕ∞ωd:ℕc:SpeedOfLightA:ElectromagneticPotential dhA:ContDiff ℝ n A.valt:Timei:Fin d⊢ ContDiff ℝ n ⇑(EuclideanSpace.proj i)n:ℕ∞ωd:ℕc:SpeedOfLightA:ElectromagneticPotential dhA:ContDiff ℝ n A.valt:Timei:Fin d⊢ ContDiff ℝ n (↿(vectorPotential c A) ∘ fun x => (t, x)) n:ℕ∞ωd:ℕc:SpeedOfLightA:ElectromagneticPotential dhA:ContDiff ℝ n A.valt:Timei:Fin d⊢ ContDiff ℝ n ⇑(EuclideanSpace.proj i) All goals completed! 🐙 n:ℕ∞ωd:ℕc:SpeedOfLightA:ElectromagneticPotential dhA:ContDiff ℝ n A.valt:Timei:Fin d⊢ ContDiff ℝ n (↿(vectorPotential c A) ∘ fun x => (t, x)) All goals completed! 🐙lemma vectorPotential_contDiff_time {n} {d} {c : SpeedOfLight} (A : ElectromagneticPotential d) (hA : ContDiff ℝ n A) (x : Space d) : ContDiff ℝ n (A.vectorPotential c · x) := n:ℕ∞ωd:ℕc:SpeedOfLightA:ElectromagneticPotential dhA:ContDiff ℝ n A.valx:Space d⊢ ContDiff ℝ n fun x_1 => vectorPotential c A x_1 x n:ℕ∞ωd:ℕc:SpeedOfLightA:ElectromagneticPotential dhA:ContDiff ℝ n A.valx:Space d⊢ ContDiff ℝ n (↿(vectorPotential c A) ∘ fun t => (t, x)) n:ℕ∞ωd:ℕc:SpeedOfLightA:ElectromagneticPotential dhA:ContDiff ℝ n A.valx:Space d⊢ ContDiff ℝ n ↿(vectorPotential c A)n:ℕ∞ωd:ℕc:SpeedOfLightA:ElectromagneticPotential dhA:ContDiff ℝ n A.valx:Space d⊢ ContDiff ℝ n fun t => (t, x) n:ℕ∞ωd:ℕc:SpeedOfLightA:ElectromagneticPotential dhA:ContDiff ℝ n A.valx:Space d⊢ ContDiff ℝ n ↿(vectorPotential c A) All goals completed! 🐙 n:ℕ∞ωd:ℕc:SpeedOfLightA:ElectromagneticPotential dhA:ContDiff ℝ n A.valx:Space d⊢ ContDiff ℝ n fun t => (t, x) All goals completed! 🐙

C. Differentiablity of the vector potential

We prove various lemmas about the differentiablity of the vector potential from the differentiablity of the electromagnetic potential.

d:ℕc:SpeedOfLightA:ElectromagneticPotential dhA:Differentiable ℝ A.valh1:∀ (i : Fin 1 ⊕ Fin d), Differentiable ℝ fun x => A.val x i⊢ ∀ (i : Fin d), Differentiable ℝ fun x => (WithLp.toLp 2 fun i => A.val x (Sum.inr i)).ofLp i All goals completed! 🐙lemma vectorPotential_differentiable_time {d} {c : SpeedOfLight} (A : ElectromagneticPotential d) (hA : Differentiable ℝ A) (x : Space d) : Differentiable ℝ (A.vectorPotential c · x) := d:ℕc:SpeedOfLightA:ElectromagneticPotential dhA:Differentiable ℝ A.valx:Space d⊢ Differentiable ℝ fun x_1 => vectorPotential c A x_1 x d:ℕc:SpeedOfLightA:ElectromagneticPotential dhA:Differentiable ℝ A.valx:Space d⊢ Differentiable ℝ (↿(vectorPotential c A) ∘ fun t => (t, x)) d:ℕc:SpeedOfLightA:ElectromagneticPotential dhA:Differentiable ℝ A.valx:Space d⊢ Differentiable ℝ ↿(vectorPotential c A)d:ℕc:SpeedOfLightA:ElectromagneticPotential dhA:Differentiable ℝ A.valx:Space d⊢ Differentiable ℝ fun t => (t, x) d:ℕc:SpeedOfLightA:ElectromagneticPotential dhA:Differentiable ℝ A.valx:Space d⊢ Differentiable ℝ ↿(vectorPotential c A) All goals completed! 🐙 d:ℕc:SpeedOfLightA:ElectromagneticPotential dhA:Differentiable ℝ A.valx:Space d⊢ Differentiable ℝ fun t => (t, x) All goals completed! 🐙