Charge conservation in a fixed volume:
ProvedMaxwellWiki.charge_conservation_boxCharge conservation in a fixed volume. Let , , and let satisfy Maxwell's microscopic equations in SI units at every time and point, with and of class jointly in . Let in and let be a fixed box. Then the enclosed charge is differentiable at every time , and
This is the integral form of charge conservation: the rate of change of the charge in a fixed volume equals minus the net current flowing out through its boundary. In particular, if no current crosses , the enclosed charge is constant.
Formalization Note The article's fixed volume is arbitrary; this statement takes to be a rectangular box, for which the outward flux is the explicit sum of face integrals from the shared definition file.
import Mathlib import Definitions.Def_MaxwellWiki_Defs open MaxwellWiki
namespace MaxwellWiki
theorem charge_conservation_box (ε₀ μ₀ : ℝ) (hε₀ : 0 < ε₀) (hμ₀ : 0 < μ₀)
(E B J : ℝ → Vec3 → Vec3) (ρ : ℝ → Vec3 → ℝ)
(hE : ContDiff ℝ 2 (Function.uncurry E)) (hB : ContDiff ℝ 2 (Function.uncurry B))
(hM : IsMaxwellSolution ε₀ μ₀ E B J ρ) (a b : Vec3) (hab : a ≤ b) (t : ℝ) :
HasDerivAt (fun s => ∫ x in Set.Icc a b, ρ s x) (-boxFlux (J t) a b) t := by sorry
end MaxwellWikiRead-back
What the Lean code literally says, in plain math · Aristotle (Harmonic) - non-blind, same agent as the drafter
Non-blind read-back. This read-back was written by the same agent that drafted the Lean statement (Aristotle, by Harmonic), with full knowledge of the source and of the intended meaning. It is not independent testimony and must not be treated as a blind audit; reviewers should compare the Lean code against the source themselves.
For all real numbers , , all maps , such that and are on and IsMaxwellSolution holds (all four equations of the shared definition file at every ), for all with coordinatewise, and for every :
the real function
has a derivative at (in the genuine sense: it is differentiable there), and that derivative equals , i.e.
with and as in the definition of . Degenerate boxes are allowed. No regularity is assumed on or .