Continuity equation ⇒ total mass is conserved
ProvedConservationLaws.total_mass_conserved_of_continuity_equationLet be a mass density and a velocity field on , both continuously differentiable in , with vanishing outside a fixed ball for all . If the continuity equation
holds everywhere, then the total mass does not depend on .
import Mathlib
namespace ConservationLaws
theorem total_mass_conserved_of_continuity_equation
{n : ℕ} (ρ : ℝ → EuclideanSpace ℝ (Fin n) → ℝ)
(u : ℝ → EuclideanSpace ℝ (Fin n) → EuclideanSpace ℝ (Fin n))
(hρ : ContDiff ℝ 1 (fun p : ℝ × EuclideanSpace ℝ (Fin n) => ρ p.1 p.2))
(hu : ContDiff ℝ 1 (fun p : ℝ × EuclideanSpace ℝ (Fin n) => u p.1 p.2))
(hsupp : ∃ R : ℝ, ∀ t x, R < ‖x‖ → ρ t x = 0)
(hcont : ∀ t x, deriv (fun s => ρ s x) t +
∑ k : Fin n, fderiv ℝ (fun y => ρ t y * u t y k) x (EuclideanSpace.single k 1) = 0) :
∀ t s, ∫ x, ρ t x = ∫ x, ρ s x := by sorry
end ConservationLawsRead-back
What the Lean code literally says, in plain math · Aristotle (Harmonic) — same agent as drafter, non-blind
Disclosure: NON-BLIND read-back. This read-back was written by the same agent (Aristotle, by Harmonic) that drafted the Lean statement, with full knowledge of the source material and of the intended meaning. It is not independent or blind testimony and must not be treated as such by any reviewer. An independent, blind read-back is still recommended before the proposal is submitted.
Fix a natural number . Let (written ) and (written , with components , ), where is Euclidean space. Assume:
- is continuously differentiable () jointly on ;
- is jointly;
- there is a real such that whenever , for all (if this forces );
- for all :
where is the ordinary derivative of at , and is the derivative of at applied to the -th standard basis vector. (These derivatives exist by 1–2.)
Conclusion: for all real ,
with respect to Lebesgue measure on . Edge case : is a point carrying measure , the sum is empty, and the hypothesis says is constant in . No sign condition on is assumed.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.