Charge conservation from Maxwell's equations:
ProvedContinuityEqWiki.charge_continuity_of_maxwellLet and be time-dependent fields. Assume that is for every and that is jointly in . Suppose Ampère's law with Maxwell's correction and Gauss's law hold everywhere:
Then the continuity equation for electric charge holds everywhere:
This is the statement that charge conservation is an automatic consequence of Maxwell's equations.
import Mathlib import Definitions.Def_ContinuityEqWiki_Defs
namespace ContinuityEqWiki
theorem charge_continuity_of_maxwell (H D J : ℝ → Space → Space) (ρ : ℝ → Space → ℝ)
(hH : ∀ t, ContDiff ℝ 2 (H t)) (hD : ContDiff ℝ 2 (Function.uncurry D))
(ampere : ∀ t x, curl (H t) x = J t x + timeDeriv D t x)
(gauss : ∀ t x, div (D t) x = ρ t x) :
∀ t x, div (J t) x + timeDeriv ρ t x = 0 := by sorry
end ContinuityEqWikiRead-back
What the Lean code literally says, in plain math · Aristotle (Harmonic) - drafting agent, non-blind read-back
Non-blind read-back — not independent testimony. This read-back was written by the same agent (Aristotle, by Harmonic) that drafted the Lean statement it describes, at the explicit request of the proposal owner. Its author knew the source text and the intended meaning while writing it, so it must not be mistaken for a blind, independent audit. Reviewers should compare the Lean code against the source themselves.
Let be arbitrary maps and an arbitrary map (written ). Assume:
- for every , is on ;
- is on ;
- for all : , where is the derivative of at ;
- for all : .
No regularity is assumed on or separately. Conclusion: for all and ,
with the sum of the three coordinate partial derivatives of the components and the derivative of at .