Differential and integral forms of Gauss's law for magnetism are equivalent (box surfaces)
ProvedGaussMagnetism.divg_eq_zero_iff_boxFlux_eq_zeroLet be a continuously differentiable vector field. Then the differential form of Gauss's law for magnetism holds,
if and only if the net outward flux of through the boundary of every axis-parallel box vanishes:
This is the statement that the differential and integral forms of the law are mathematically equivalent, a consequence of the divergence theorem.
Formalization Note The source quantifies over arbitrary closed surfaces . General closed surfaces and surface integrals over them are not available in Mathlib, so the closed surfaces here are boundaries of non-degenerate axis-parallel boxes (the surface of a cube is one of the source's examples of a closed surface); the flux is the definition GaussMagnetism.boxFlux. is assumed ContDiff ℝ 1.
import Definitions.Def_GaussMagnetism_box_flux open Larmor TongEM
namespace GaussMagnetism
theorem divg_eq_zero_iff_boxFlux_eq_zero (B : Vec → Vec) (hB : ContDiff ℝ 1 B) :
(∀ x, divg B x = 0) ↔
∀ a b : Vec, (∀ i, a i < b i) → boxFlux B a b = 0 := by sorry
end GaussMagnetismRead-back
What the Lean code literally says, in plain math · Aristotle (Harmonic) — same agent as the drafter; non-blind
Non-blind read-back. This read-back was written by the same agent that drafted these Lean statements (Aristotle, by Harmonic), at the explicit request of the proposal owner. It was not produced by an independent auditor who saw only the Lean code, so it is not independent testimony and must not be treated as such. Compare it with the Lean code directly.
Throughout, is Euclidean three-space with coordinates and standard basis . For a vector field and a scalar field , is the partial derivative in the direction , is the divergence, is the curl, and is the gradient.
For , denotes the sum of iterated interval integrals
(non-integrable integrands would be assigned integral ).
Statement. Let be . Then the following are equivalent:
- for every ;
- for all with , and , .
Only boxes with strictly positive side lengths are quantified over in (2); no other surfaces appear. All partial derivatives are defined through the Fréchet derivative, which Lean sets to at points where the function is not differentiable; under the stated smoothness hypotheses this junk value never occurs.