Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Four-divergence of the four-current: ∂μJμ=c ∂ρ∂(ct)+∇⋅j\partial_\mu J^\mu=c\,\frac{\partial\rho}{\partial(ct)}+\nabla\cdot\mathbf j∂μ​Jμ=c∂(ct)∂ρ​+∇⋅j

Proved
ContinuityEqWiki.fourDiv_fourCurrent

by Lucas · Oct 9, 2026 · Mathlib 0df444a (Lean v4.33.1)

continuity-equationmathematical-physics

Let c>0c>0c>0 be the speed of light, and let ρ:R×R3→R\rho:\mathbb R\times\mathbb R^3\to\mathbb Rρ:R×R3→R and j:R×R3→R3\mathbf j:\mathbb R\times\mathbb R^3\to\mathbb R^3j:R×R3→R3 be a density and its current, both C1C^1C1 jointly in (t,x)(t,x)(t,x). Form the four-current J=(cρ,jx,jy,jz)J=(c\rho,j_x,j_y,j_z)J=(cρ,jx​,jy​,jz​) as a field on spacetime with coordinates (x0,x)(x^0,x)(x0,x), x0=ctx^0=ctx0=ct. Then at every spacetime point (ct,x)(ct,x)(ct,x),

∂μJμ=c∂ρ∂(ct)+∇⋅j=∂ρ∂t+∇⋅j.\partial_\mu J^\mu=c\frac{\partial\rho}{\partial(ct)}+\nabla\cdot\mathbf j=\frac{\partial\rho}{\partial t}+\nabla\cdot\mathbf j .∂μ​Jμ=c∂(ct)∂ρ​+∇⋅j=∂t∂ρ​+∇⋅j.

This identifies the four-divergence of the four-current with the left-hand side of the continuity equation.

Preamble
import Mathlib
import Definitions.Def_ContinuityEqWiki_Defs
Formal statement
namespace ContinuityEqWiki

theorem fourDiv_fourCurrent (c : ℝ) (hc : 0 < c) (ρ : ℝ → Space → ℝ) (j : ℝ → Space → Space)
    (hρ : ContDiff ℝ 1 (Function.uncurry ρ)) (hj : ContDiff ℝ 1 (Function.uncurry j))
    (t : ℝ) (x : Space) :
    fourDiv (fourCurrent c ρ j) (spacetimePoint c t x) = timeDeriv ρ t x + div (j t) x := by sorry

end ContinuityEqWiki
Source
Wikipedia, "Continuity equation", revision oldid=1378634825, https://en.wikipedia.org/w/index.php?title=Continuity_equation&oldid=1378634825, section "Relativistic version", subsection "Special relativity" (4-current and its 4-divergence)
Read-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 c>0c>0c>0, ρ:R×R3→R\rho:\mathbb R\times\mathbb R^3\to\mathbb Rρ:R×R3→R and j:R×R3→R3\mathbf j:\mathbb R\times\mathbb R^3\to\mathbb R^3j:R×R3→R3, with (t,x)↦ρ(t,x)(t,x)\mapsto\rho(t,x)(t,x)↦ρ(t,x) and (t,x)↦j(t,x)(t,x)\mapsto\mathbf j(t,x)(t,x)↦j(t,x) both C1C^1C1. Let J:R4→R4J:\mathbb R^4\to\mathbb R^4J:R4→R4 be J(x0,xˉ)=(c ρ(x0/c,xˉ), j(x0/c,xˉ))J(x^0,\bar x)=\big(c\,\rho(x^0/c,\bar x),\ \mathbf j(x^0/c,\bar x)\big)J(x0,xˉ)=(cρ(x0/c,xˉ), j(x0/c,xˉ)). Then for every t∈Rt\in\mathbb Rt∈R and x∈R3x\in\mathbb R^3x∈R3,

∑μ=03∂μ(Jμ)(ct,x)=∂tρ(t,x)+∇⋅j(t,⋅)(x),\sum_{\mu=0}^{3}\partial_\mu(J^\mu)(ct,x)=\partial_t\rho(t,x)+\nabla\cdot\mathbf j(t,\cdot)(x),μ=0∑3​∂μ​(Jμ)(ct,x)=∂t​ρ(t,x)+∇⋅j(t,⋅)(x),

where ∂μ\partial_\mu∂μ​ is the partial derivative in the μ\muμ-th spacetime coordinate, ∂tρ(t,x)\partial_t\rho(t,x)∂t​ρ(t,x) the derivative of s↦ρ(s,x)s\mapsto\rho(s,x)s↦ρ(s,x) at ttt, and ∇⋅\nabla\cdot∇⋅ the spatial divergence.

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me