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) tFormal artifact
Lean source
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
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.
Source project: Physlib
Person-level attribution pending.
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.
Source project: Physlib
Person-level attribution pending.
Deriv Within mean Energy Beta eq neg variance
CanonicalEnsemble.derivWithin_meanEnergy_Beta_eq_neg_variance
Plain-language statement
(โU/โฮฒ) = -Var(E) for finite systems.
Source project: Physlib
Person-level attribution pending.