All proofs
Project-declaredLean 4.32.0 ยท mathlib@81a5d257c8e4

Time deriv time deriv electric Field of is Extrema

Electromagnetism.ElectromagneticPotential.time_deriv_time_deriv_electricField_of_isExtrema

Project documentation

The condition on an electromagnetic potential to be an extrema of the lagrangian. -/ def IsExtrema {d} (๐“• : FreeSpace) (A : ElectromagneticPotential d) (J : LorentzCurrentDensity d) : Prop := gradLagrangian ๐“• A J = 0 lemma isExtrema_iff_gradLagrangian {๐“• : FreeSpace} (A : ElectromagneticPotential d) (J : LorentzCurrentDensity d) : IsExtrema ๐“• A J โ†” A....

Exact Lean statement

lemma time_deriv_time_deriv_electricField_of_isExtrema {A : ElectromagneticPotential d}
    {๐“• : FreeSpace}
    (hA : ContDiff โ„ โˆž A) (J : LorentzCurrentDensity d)
    (hJ : ContDiff โ„ โˆž J) (h : IsExtrema ๐“• A J)
    (t : Time) (x : Space d) (i : Fin d) :
    โˆ‚โ‚œ (โˆ‚โ‚œ (A.electricField ๐“•.c ยท x i)) t =
      ๐“•.c ^ 2 * โˆ‘ j, (โˆ‚[j] (โˆ‚[j] (A.electricField ๐“•.c t ยท i)) x) -
      ๐“•.c ^ 2 / ๐“•.ฮตโ‚€ * โˆ‚[i] (J.chargeDensity ๐“•.c t ยท) x -
      ๐“•.c ^ 2 * ๐“•.ฮผโ‚€ * โˆ‚โ‚œ (J.currentDensity ๐“•.c ยท x i) t

Formal artifact

Lean source

Canonical source
Full Lean sourceLean 4
lemma time_deriv_time_deriv_electricField_of_isExtrema {A : ElectromagneticPotential d}    {๐“• : FreeSpace}    (hA : ContDiff โ„ โˆž A) (J : LorentzCurrentDensity d)    (hJ : ContDiff โ„ โˆž J) (h : IsExtrema ๐“• A J)    (t : Time) (x : Space d) (i : Fin d) :    โˆ‚โ‚œ (โˆ‚โ‚œ (A.electricField ๐“•.c ยท x i)) t =      ๐“•.c ^ 2 * โˆ‘ j, (โˆ‚[j] (โˆ‚[j] (A.electricField ๐“•.c t ยท i)) x) -      ๐“•.c ^ 2 / ๐“•.ฮตโ‚€ * โˆ‚[i] (J.chargeDensity ๐“•.c t ยท) x -      ๐“•.c ^ 2 * ๐“•.ฮผโ‚€ * โˆ‚โ‚œ (J.currentDensity ๐“•.c ยท x i) t := by  have hEs : โˆ€ j, ContDiff โ„ 2 (fun y => A.electricField ๐“•.c t y j) :=    fun j => electricField_apply_contDiff_space (i := j) (hA.of_le (right_eq_inf.mp rfl)) t  have hEd : โˆ€ j k, Differentiable โ„ (โˆ‚[k] (fun y => A.electricField ๐“•.c t y j)) :=    fun j k => Space.deriv_differentiable (hEs j) k  have hBt : โˆ€ j, Differentiable โ„      (fun s => โˆ‚[j] (fun y => A.magneticFieldMatrix ๐“•.c s y (j, i)) x) :=    fun j => Space.space_deriv_differentiable_time (i := j)      (magneticFieldMatrix_contDiff _ (hA.of_le (right_eq_inf.mp rfl)) (j, i)) x  have hJt : Differentiable โ„ (fun s => J.currentDensity ๐“•.c s x i) :=    LorentzCurrentDensity.currentDensity_apply_differentiable_time (hJ.differentiable (by simp)) x i  calc _    _= โˆ‚โ‚œ (fun t =>      1 / (๐“•.ฮผโ‚€ * ๐“•.ฮตโ‚€) * โˆ‘ j, Space.deriv j (fun x => magneticFieldMatrix ๐“•.c A t x (j, i)) x -      1 / ๐“•.ฮตโ‚€ * LorentzCurrentDensity.currentDensity ๐“•.c J t x i) t := by        conv_lhs =>          enter [1]          change fun t => โˆ‚โ‚œ (A.electricField ๐“•.c ยท x i) t          enter [t]          rw [Time.deriv_euclid (electricField_differentiable_time            (hA.of_le (right_eq_inf.mp rfl)) _),            time_deriv_electricField_of_isExtrema hA J hJ h]    _ = 1 / (๐“•.ฮผโ‚€ * ๐“•.ฮตโ‚€) * โˆ‚โ‚œ (fun t => โˆ‘ j, โˆ‚[j] (A.magneticFieldMatrix ๐“•.c t ยท (j, i)) x) t -      1 / ๐“•.ฮตโ‚€ * โˆ‚โ‚œ (J.currentDensity ๐“•.c ยท x i) t := by      rw [Time.deriv_eq]      rw [fderiv_fun_sub]      simp only [one_div, mul_inv_rev, FunLike.coe_sub, Pi.sub_apply]      rw [fderiv_const_mul (Differentiable.fun_sum fun j _ => hBt j).differentiableAt]      rw [fderiv_const_mul hJt.differentiableAt]      simp [Time.deriv_eq]      ยท exact ((Differentiable.fun_sum fun j _ => hBt j).const_mul _).differentiableAt      ยท exact hJt.differentiableAt.const_mul _    _ = 1 / (๐“•.ฮผโ‚€ * ๐“•.ฮตโ‚€) * ((โˆ‘ j, โˆ‚โ‚œ (fun t => โˆ‚[j] (A.magneticFieldMatrix ๐“•.c t ยท (j, i)) x)) t) -      1 / ๐“•.ฮตโ‚€ * (โˆ‚โ‚œ (J.currentDensity ๐“•.c ยท x i) t) := by      congr      rw [Time.deriv_eq]      rw [fderiv_fun_sum fun i _ => (hBt i).differentiableAt]      simp only [FunLike.coe_sum, Finset.sum_apply]      rfl    _ = 1 / (๐“•.ฮผโ‚€ * ๐“•.ฮตโ‚€) * (โˆ‘ j, โˆ‚[j] (fun x => โˆ‚โ‚œ (A.magneticFieldMatrix ๐“•.c ยท x (j, i)) t)) x -        1 / ๐“•.ฮตโ‚€ * โˆ‚โ‚œ (J.currentDensity ๐“•.c ยท x i) t := by      congr      simp only [Finset.sum_apply]      congr      funext k      rw [Space.time_deriv_comm_space_deriv]      apply magneticFieldMatrix_contDiff      apply hA.of_le (right_eq_inf.mp rfl)    _ = 1 / (๐“•.ฮผโ‚€ * ๐“•.ฮตโ‚€) *(โˆ‘ j, โˆ‚[j] (fun x => โˆ‚[j] (A.electricField ๐“•.c t ยท i) x -        โˆ‚[i] (A.electricField ๐“•.c t ยท j) x)) x -        1 / ๐“•.ฮตโ‚€ * โˆ‚โ‚œ (J.currentDensity ๐“•.c ยท x i) t := by        congr        simp only [Finset.sum_apply]        congr        funext k        congr        funext x        rw [time_deriv_magneticFieldMatrix _ (hA.of_le (ENat.LEInfty.out))]    _ = (1 / (๐“•.ฮผโ‚€ * ๐“•.ฮตโ‚€) * โˆ‘ j, (โˆ‚[j] (fun x => โˆ‚[j] (A.electricField ๐“•.c t ยท i) x) x -          โˆ‚[j] (fun x => โˆ‚[i] (A.electricField ๐“•.c t ยท j) x) x)) -          1 / ๐“•.ฮตโ‚€ * โˆ‚โ‚œ (J.currentDensity ๐“•.c ยท x i) t := by        congr        simp only [Finset.sum_apply]        congr        funext j        rw [Space.deriv_eq_fderiv_basis]        rw [fderiv_fun_sub (hEd _ _).differentiableAt (hEd _ _).differentiableAt]        simp [โ† Space.deriv_eq_fderiv_basis]    _ = 1 / (๐“•.ฮผโ‚€ * ๐“•.ฮตโ‚€) * โˆ‘ j, (โˆ‚[j] (fun x => โˆ‚[j] (A.electricField ๐“•.c t ยท i) x) x) -          1 / (๐“•.ฮผโ‚€ * ๐“•.ฮตโ‚€) * โˆ‘ j, (โˆ‚[j] (fun x => โˆ‚[i] (A.electricField ๐“•.c t ยท j) x) x) -          1 / ๐“•.ฮตโ‚€ * โˆ‚โ‚œ (J.currentDensity ๐“•.c ยท x i) t := by simp [mul_sub]    _ = 1 / (๐“•.ฮผโ‚€ * ๐“•.ฮตโ‚€) * โˆ‘ j, (โˆ‚[j] (fun x => โˆ‚[j] (A.electricField ๐“•.c t ยท i) x) x) -        1 / (๐“•.ฮผโ‚€ * ๐“•.ฮตโ‚€) * โˆ‘ j, (โˆ‚[i] (fun x => โˆ‚[j] (A.electricField ๐“•.c t ยท j) x) x) -        1 / ๐“•.ฮตโ‚€ * โˆ‚โ‚œ (J.currentDensity ๐“•.c ยท x i) t := by        congr        funext j        rw [Space.deriv_commute _ (hEs _), Space.deriv_eq_fderiv_basis]      _ = 1 / (๐“•.ฮผโ‚€ * ๐“•.ฮตโ‚€) * โˆ‘ j, (โˆ‚[j] (fun x => โˆ‚[j] (A.electricField ๐“•.c t ยท i) x) x) -          1 / (๐“•.ฮผโ‚€ * ๐“•.ฮตโ‚€) * (โˆ‚[i] (fun x => โˆ‘ j, โˆ‚[j] (A.electricField ๐“•.c t ยท j) x) x) -          1 / ๐“•.ฮตโ‚€ * โˆ‚โ‚œ (J.currentDensity ๐“•.c ยท x i) t := by        congr        rw [Space.deriv_eq_fderiv_basis]        rw [fderiv_fun_sum]        simp [โ† Space.deriv_eq_fderiv_basis]        intro j _        exact (hEd j j).differentiableAt      _ = 1 / (๐“•.ฮผโ‚€ * ๐“•.ฮตโ‚€) * โˆ‘ j, (โˆ‚[j] (fun x => โˆ‚[j] (A.electricField ๐“•.c t ยท i) x) x) -          1 / (๐“•.ฮผโ‚€ * ๐“•.ฮตโ‚€) * (โˆ‚[i] (fun x => (โˆ‡ โฌ (A.electricField ๐“•.c t)) x) x) -          1 / ๐“•.ฮตโ‚€ * โˆ‚โ‚œ (J.currentDensity ๐“•.c ยท x i) t := by        rfl      _ = 1 / (๐“•.ฮผโ‚€ * ๐“•.ฮตโ‚€) * โˆ‘ j, (โˆ‚[j] (โˆ‚[j] (A.electricField ๐“•.c t ยท i)) x) -          1 / (๐“•.ฮผโ‚€ * ๐“•.ฮตโ‚€ ^ 2) * โˆ‚[i] (J.chargeDensity ๐“•.c t ยท) x -          1 / ๐“•.ฮตโ‚€ * โˆ‚โ‚œ (J.currentDensity ๐“•.c ยท x i) t := by        congr 2        rw [isExtrema_iff_gauss_ampere_magneticFieldMatrix] at h         conv_lhs =>          enter [2, 2, x]          rw [(h t x).1]        trans 1 / (๐“•.ฮผโ‚€ * ๐“•.ฮตโ‚€) * Space.deriv i            (fun x => (1/ ๐“•.ฮตโ‚€) * LorentzCurrentDensity.chargeDensity ๐“•.c J t x) x        ยท congr          funext x          ring        ยท rw [Space.deriv_eq_fderiv_basis]          rw [fderiv_const_mul]          simp [โ† Space.deriv_eq_fderiv_basis]          field_simp          apply Differentiable.differentiableAt          apply LorentzCurrentDensity.chargeDensity_differentiable_space          exact hJ.differentiable (by simp)        ยท exact hA        ยท exact hJ      _ = ๐“•.c ^ 2 * โˆ‘ j, (โˆ‚[j] (โˆ‚[j] (A.electricField ๐“•.c t ยท i)) x) -            ๐“•.c ^ 2 / ๐“•.ฮตโ‚€ * โˆ‚[i] (J.chargeDensity ๐“•.c t ยท) x -            ๐“•.c ^ 2 * ๐“•.ฮผโ‚€ * โˆ‚โ‚œ (J.currentDensity ๐“•.c ยท x i) t := by          simp [FreeSpace.c_sq]          field_simp
Project
Physlib
License
Apache-2.0
Commit
dd43e9e65791
Source
Physlib/Electromagnetism/Dynamics/IsExtrema.lean:376-501

Reuse this declaration

Bring the exact result into your workflow

The import identifies the source module. Your project still needs the pinned package dependency shown on this page.

What this badge means

This completion status comes from the project or community source. It has not yet been represented here as an independent rebuild and axiom audit.

Continue in this project

Related declarations

Project-declaredLean 4.32.0

Adiabatic relation log

adiabatic_relation_log

Plain-language statement

Adiabatic relation in logarithmic form: If S(Ua,Va,N) = S(Ub,Vb,N) with N fixed, then c * log (Ua/Ub) + log (Va/Vb) = 0.

physicsquantum field theoryrelativity

Source project: Physlib

Person-level attribution pending.

View proof record
Project-declaredLean 4.32.0

Adiabatic relation Ua Ub Va Vb

adiabatic_relation_UaUbVaVb

Plain-language statement

Adiabatic relation in product form: If S(Ua,Va,N) = S(Ub,Vb,N) with N fixed, then (Ua/Ub)^c * (Va/Vb) = 1.

physicsquantum field theoryrelativity

Source project: Physlib

Person-level attribution pending.

View proof record