Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Isolated NNN-body system with pair potentials: momentum and energy are conserved

Proved
ConservationLaws.nbody_momentum_and_energy_conservation

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

conservation-lawenergymechanicsmomentumn-body

Let NNN particles in Rd\mathbb{R}^dRd with masses mi>0m_i > 0mi​>0 interact only through pair potentials φij=φji\varphi_{ij} = \varphi_{ji}φij​=φji​, each differentiable on (0,∞)(0,\infty)(0,∞), so that along a collision-free trajectory (xi(t)≠xj(t)x_i(t) \ne x_j(t)xi​(t)=xj​(t) for i≠ji \ne ji=j) Newton's second law reads

mi x¨i(t)=∑j≠i−φij′(∥xi(t)−xj(t)∥) xi(t)−xj(t)∥xi(t)−xj(t)∥.m_i\,\ddot x_i(t) = \sum_{j \ne i} -\varphi_{ij}'\big(\|x_i(t)-x_j(t)\|\big)\,\frac{x_i(t)-x_j(t)}{\|x_i(t)-x_j(t)\|}.mi​x¨i​(t)=j=i∑​−φij′​(∥xi​(t)−xj​(t)∥)∥xi​(t)−xj​(t)∥xi​(t)−xj​(t)​.

Then the total momentum ∑imix˙i(t)\sum_i m_i \dot x_i(t)∑i​mi​x˙i​(t) and the total mechanical energy

E(t)=∑i12mi∥x˙i(t)∥2+∑i<jφij(∥xi(t)−xj(t)∥)E(t) = \sum_i \tfrac12 m_i\|\dot x_i(t)\|^2 + \sum_{i<j}\varphi_{ij}\big(\|x_i(t)-x_j(t)\|\big)E(t)=i∑​21​mi​∥x˙i​(t)∥2+i<j∑​φij​(∥xi​(t)−xj​(t)∥)

are both constant in time.

Preamble
import Mathlib
Formal statement
namespace ConservationLaws

theorem nbody_momentum_and_energy_conservation
    {d N : ℕ} (m : Fin N → ℝ) (hm : ∀ i, 0 < m i)
    (φ : Fin N → Fin N → ℝ → ℝ) (hφsym : ∀ i j, φ i j = φ j i)
    (hφdiff : ∀ i j, ∀ r : ℝ, 0 < r → DifferentiableAt ℝ (φ i j) r)
    (x v a : Fin N → ℝ → EuclideanSpace ℝ (Fin d))
    (hnc : ∀ t i j, i ≠ j → x i t ≠ x j t)
    (hx : ∀ i t, HasDerivAt (x i) (v i t) t)
    (hv : ∀ i t, HasDerivAt (v i) (a i t) t)
    (hnewton : ∀ i t, m i • a i t = ∑ j ∈ Finset.univ.erase i,
      (-(deriv (φ i j) ‖x i t - x j t‖) / ‖x i t - x j t‖) • (x i t - x j t)) :
    (∀ t s, ∑ i, m i • v i t = ∑ i, m i • v i s) ∧
    (∀ t s,
      (∑ i, (1 / 2 : ℝ) * m i * ‖v i t‖ ^ 2 + ∑ i, ∑ j ∈ Finset.Ioi i, φ i j ‖x i t - x j t‖) =
      (∑ i, (1 / 2 : ℝ) * m i * ‖v i s‖ ^ 2 + ∑ i, ∑ j ∈ Finset.Ioi i, φ i j ‖x i s - x j s‖)) := by sorry

end ConservationLaws
Source
Wikipedia, "Momentum" (uploaded PDF), https://en.wikipedia.org/wiki/Momentum, section "Conservation"; Wikipedia, "Conservation of energy" (uploaded PDF), https://en.wikipedia.org/wiki/Conservation_of_energy (conservation of kinetic plus potential energy in a closed system)
Read-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 natural numbers ddd and NNN and index particles by i∈{1,…,N}i \in \{1,\dots,N\}i∈{1,…,N} (with the usual order). Let mi>0m_i > 0mi​>0 be reals. Let φij:R→R\varphi_{ij} : \mathbb{R} \to \mathbb{R}φij​:R→R for every ordered pair (i,j)(i,j)(i,j) (including i=ji = ji=j), with φij=φji\varphi_{ij} = \varphi_{ji}φij​=φji​ as functions, and with φij\varphi_{ij}φij​ differentiable at every r>0r > 0r>0 (nothing is assumed at r≤0r \le 0r≤0). Let xi,vi,ai:R→Rdx_i, v_i, a_i : \mathbb{R} \to \mathbb{R}^dxi​,vi​,ai​:R→Rd (Euclidean space). Assume:

  1. No collisions: xi(t)≠xj(t)x_i(t) \ne x_j(t)xi​(t)=xj​(t) whenever i≠ji \ne ji=j, for all ttt;
  2. for all i,ti,ti,t: xix_ixi​ is differentiable at ttt with derivative vi(t)v_i(t)vi​(t), and viv_ivi​ is differentiable at ttt with derivative ai(t)a_i(t)ai​(t);
  3. for all i,ti,ti,t, writing rij(t)=∥xi(t)−xj(t)∥r_{ij}(t) = \|x_i(t) - x_j(t)\|rij​(t)=∥xi​(t)−xj​(t)∥:
mi ai(t)=∑j≠i(−φij′(rij(t))rij(t))(xi(t)−xj(t)),m_i\, a_i(t) = \sum_{j \ne i} \left(\frac{-\varphi_{ij}'(r_{ij}(t))}{r_{ij}(t)}\right)(x_i(t) - x_j(t)),mi​ai​(t)=j=i∑​(rij​(t)−φij′​(rij​(t))​)(xi​(t)−xj​(t)),

where φij′(r)\varphi_{ij}'(r)φij′​(r) denotes the derivative of φij\varphi_{ij}φij​ at rrr (by 1, rij(t)>0r_{ij}(t) > 0rij​(t)>0 for j≠ij \ne ij=i, so this derivative exists and the division is genuine).

Conclusion — both of the following:

  • for all real t,st, st,s: ∑imivi(t)=∑imivi(s)\displaystyle\sum_i m_i v_i(t) = \sum_i m_i v_i(s)i∑​mi​vi​(t)=i∑​mi​vi​(s);
  • for all real t,st, st,s:
∑i12mi∥vi(t)∥2+∑i∑j>iφij(rij(t))=∑i12mi∥vi(s)∥2+∑i∑j>iφij(rij(s)).\sum_i \tfrac12 m_i\|v_i(t)\|^2 + \sum_{i}\sum_{j > i}\varphi_{ij}(r_{ij}(t)) = \sum_i \tfrac12 m_i\|v_i(s)\|^2 + \sum_{i}\sum_{j > i}\varphi_{ij}(r_{ij}(s)).i∑​21​mi​∥vi​(t)∥2+i∑​j>i∑​φij​(rij​(t))=i∑​21​mi​∥vi​(s)∥2+i∑​j>i∑​φij​(rij​(s)).

The potential energy sums each unordered pair once (j>ij > ij>i). The diagonal functions φii\varphi_{ii}φii​ never enter. Edge cases: N=0N = 0N=0 or N=1N = 1N=1 make all force sums empty; d=0d = 0d=0 with N≥2N \ge 2N≥2 makes the no-collision hypothesis unsatisfiable (all points coincide), so the statement is vacuous in that case only.

Human review
  • Endorsed by Shuze Chen · Oct 10, 2026

    Confirmed by the moderator at approval.

  • Endorsed by Lucas · Oct 10, 2026

    Confirmed by the mission captain (proposal self-audit).

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