Zero flux through a sphere from charges outside its closed ball
OpenCoulombGauss.sphereFlux_electricField_eq_zero_of_disjointLet , let be measurable, and let be integrable on . Let and , and assume
- does not meet the closed ball ;
- is bounded on near the sphere: there are and with for all with .
Then the field generated by on has zero outward flux through the sphere :
This is the source's statement "the flux through a closed surface generated by some charge density outside (the surface) is null", specialised to the spherical surfaces used in the rest of the proof.
Formalization Note The source states the claim for any compact with piecewise smooth boundary disjoint from the charges; only the case is used later, and a general piecewise-smooth divergence theorem is not available in Mathlib, so the milestone is stated for balls. Hypothesis 2 (boundedness of near the sphere) guarantees that the field is well defined and integrable on the sphere even when the charges accumulate at it; in the source is continuous on an open set containing the sphere, which implies it.
import Mathlib import Definitions.Def_CoulombGauss_basic open MeasureTheory Filter Topology Metric
namespace CoulombGauss
theorem sphereFlux_electricField_eq_zero_of_disjoint (ε₀ : ℝ) (hε₀ : 0 < ε₀)
(ρ : Vec3 → ℝ) (S : Set Vec3) (hS : MeasurableSet S) (hρ : IntegrableOn ρ S)
(c : Vec3) (R : ℝ) (hR : 0 < R) (hdisj : Disjoint S (closedBall c R))
(hbdd : ∃ δ > 0, ∃ M : ℝ, ∀ x ∈ S, dist x c < R + δ → |ρ x| ≤ M) :
sphereFlux (electricField ε₀ ρ S) c R = 0 := by sorry
end CoulombGaussRead-back
What the Lean code literally says, in plain math · Aristotle (Harmonic)
NON-BLIND READ-BACK — NOT INDEPENDENT TESTIMONY. This read-back was written by the same agent that drafted the Lean statements of this proposal (at the explicit direction of the proposal owner), with full knowledge of the source text and of the intended meaning. It is therefore not a blind audit and must not be mistaken for independent testimony. Reviewers should compare the Lean code against the source directly.
Let be real, any function, a measurable set with integrable on , and a real number with . Assume and the closed ball have empty intersection, and assume there exist and a real such that every with satisfies . Conclusion: with (kernel read as at ),
where is the cone (surface) measure of total mass on the unit sphere ; if this integrand were not integrable the integral would be read as . Edge cases: is allowed; may come arbitrarily close to the sphere (only the closed ball is excluded); the boundedness hypothesis is vacuous for points of farther than from .