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 BDifferentiableAt (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 BDifferentiableAt (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 BDifferentiableAt (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 BDifferentiableAt (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 BDifferentiable 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 BDifferentiableAt (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 BDifferentiableAt (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:TimeContinuous 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.valContDiff n (vectorPotential c A) n:d:c:SpeedOfLightA:ElectromagneticPotential dhA:ContDiff A.valContDiff (↑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 dContDiff n fun t x => (vectorPotential c A t x).ofLp i n:ℕ∞ωd:c:SpeedOfLightA:ElectromagneticPotential dhA:ContDiff n A.vali:Fin dContDiff n ((EuclideanSpace.proj i) (vectorPotential c A)) n:ℕ∞ωd:c:SpeedOfLightA:ElectromagneticPotential dhA:ContDiff n A.vali:Fin dContDiff n (EuclideanSpace.proj i)n:ℕ∞ωd:c:SpeedOfLightA:ElectromagneticPotential dhA:ContDiff n A.vali:Fin dContDiff n (vectorPotential c A) n:ℕ∞ωd:c:SpeedOfLightA:ElectromagneticPotential dhA:ContDiff n A.vali:Fin dContDiff n (EuclideanSpace.proj i) All goals completed! 🐙 n:ℕ∞ωd:c:SpeedOfLightA:ElectromagneticPotential dhA:ContDiff n A.vali:Fin dContDiff 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 dContDiff n fun t x => (vectorPotential c A t x).ofLp i n:ℕ∞ωd:c:SpeedOfLightA:ElectromagneticPotential dhA:ContDiff n A.vali:Fin dContDiff n ((EuclideanSpace.proj i) (vectorPotential c A)) n:ℕ∞ωd:c:SpeedOfLightA:ElectromagneticPotential dhA:ContDiff n A.vali:Fin dContDiff n (EuclideanSpace.proj i)n:ℕ∞ωd:c:SpeedOfLightA:ElectromagneticPotential dhA:ContDiff n A.vali:Fin dContDiff n (vectorPotential c A) n:ℕ∞ωd:c:SpeedOfLightA:ElectromagneticPotential dhA:ContDiff n A.vali:Fin dContDiff n (EuclideanSpace.proj i) All goals completed! 🐙 n:ℕ∞ωd:c:SpeedOfLightA:ElectromagneticPotential dhA:ContDiff n A.vali:Fin dContDiff 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:TimeContDiff n (vectorPotential c A t) n:ℕ∞ωd:c:SpeedOfLightA:ElectromagneticPotential dhA:ContDiff n A.valt:TimeContDiff n ((vectorPotential c A) fun x => (t, x)) n:ℕ∞ωd:c:SpeedOfLightA:ElectromagneticPotential dhA:ContDiff n A.valt:TimeContDiff n (vectorPotential c A)n:ℕ∞ωd:c:SpeedOfLightA:ElectromagneticPotential dhA:ContDiff n A.valt:TimeContDiff n fun x => (t, x) n:ℕ∞ωd:c:SpeedOfLightA:ElectromagneticPotential dhA:ContDiff n A.valt:TimeContDiff n (vectorPotential c A) All goals completed! 🐙 n:ℕ∞ωd:c:SpeedOfLightA:ElectromagneticPotential dhA:ContDiff n A.valt:TimeContDiff 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 dContDiff n fun x => (vectorPotential c A t x).ofLp i n:ℕ∞ωd:c:SpeedOfLightA:ElectromagneticPotential dhA:ContDiff n A.valt:Timei:Fin dContDiff n ((EuclideanSpace.proj i) (vectorPotential c A) fun x => (t, x)) n:ℕ∞ωd:c:SpeedOfLightA:ElectromagneticPotential dhA:ContDiff n A.valt:Timei:Fin dContDiff n (EuclideanSpace.proj i)n:ℕ∞ωd:c:SpeedOfLightA:ElectromagneticPotential dhA:ContDiff n A.valt:Timei:Fin dContDiff n ((vectorPotential c A) fun x => (t, x)) n:ℕ∞ωd:c:SpeedOfLightA:ElectromagneticPotential dhA:ContDiff n A.valt:Timei:Fin dContDiff n (EuclideanSpace.proj i) All goals completed! 🐙 n:ℕ∞ωd:c:SpeedOfLightA:ElectromagneticPotential dhA:ContDiff n A.valt:Timei:Fin dContDiff 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 dContDiff n fun x_1 => vectorPotential c A x_1 x n:ℕ∞ωd:c:SpeedOfLightA:ElectromagneticPotential dhA:ContDiff n A.valx:Space dContDiff n ((vectorPotential c A) fun t => (t, x)) n:ℕ∞ωd:c:SpeedOfLightA:ElectromagneticPotential dhA:ContDiff n A.valx:Space dContDiff n (vectorPotential c A)n:ℕ∞ωd:c:SpeedOfLightA:ElectromagneticPotential dhA:ContDiff n A.valx:Space dContDiff n fun t => (t, x) n:ℕ∞ωd:c:SpeedOfLightA:ElectromagneticPotential dhA:ContDiff n A.valx:Space dContDiff n (vectorPotential c A) All goals completed! 🐙 n:ℕ∞ωd:c:SpeedOfLightA:ElectromagneticPotential dhA:ContDiff n A.valx:Space dContDiff 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 dDifferentiable fun x_1 => vectorPotential c A x_1 x d:c:SpeedOfLightA:ElectromagneticPotential dhA:Differentiable A.valx:Space dDifferentiable ((vectorPotential c A) fun t => (t, x)) d:c:SpeedOfLightA:ElectromagneticPotential dhA:Differentiable A.valx:Space dDifferentiable (vectorPotential c A)d:c:SpeedOfLightA:ElectromagneticPotential dhA:Differentiable A.valx:Space dDifferentiable fun t => (t, x) d:c:SpeedOfLightA:ElectromagneticPotential dhA:Differentiable A.valx:Space dDifferentiable (vectorPotential c A) All goals completed! 🐙 d:c:SpeedOfLightA:ElectromagneticPotential dhA:Differentiable A.valx:Space dDifferentiable fun t => (t, x) All goals completed! 🐙