Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Virial theorem: 2⟨T⟩τ+∑k⟨Fk⋅rk⟩τ→02\langle T\rangle_\tau+\sum_k\langle F_k\cdot r_k\rangle_\tau\to02⟨T⟩τ​+∑k​⟨Fk​⋅rk​⟩τ​→0 for bounded motion

Proved
VirialTheorem.virial_theorem

by Lucas · Sep 28, 2026 · Mathlib 0df444a (Lean v4.33.1)

classical-mechanicsvirial-theorem

Throughout, NNN point particles move in R3\mathbb R^3R3; particle kkk has constant mass mk∈Rm_k\in\mathbb Rmk​∈R, position rk(t)r_k(t)rk​(t) and velocity vk(t)v_k(t)vk​(t), and momentum pk=mkvkp_k=m_kv_kpk​=mk​vk​. Let Fk(t)F_k(t)Fk​(t) be the net force on particle kkk, so that r˙k=vk\dot r_k=v_kr˙k​=vk​ and p˙k=Fk\dot p_k=F_kp˙​k​=Fk​ for all ttt, with each FkF_kFk​ continuous. Suppose the motion is bounded: there is a constant CCC with ∥rk(t)∥≤C\|r_k(t)\|\le C∥rk​(t)∥≤C and ∥vk(t)∥≤C\|v_k(t)\|\le C∥vk​(t)∥≤C for all kkk and all t≥0t\ge0t≥0. Then, with T=12∑kmk∥vk∥2T=\frac12\sum_km_k\|v_k\|^2T=21​∑k​mk​∥vk​∥2 and ⟨f⟩τ=1τ∫0τf dt\langle f\rangle_\tau=\frac1\tau\int_0^\tau f\,dt⟨f⟩τ​=τ1​∫0τ​fdt,

lim⁡τ→∞(2⟨T⟩τ+∑k=1N⟨Fk⋅rk⟩τ)=0,\lim_{\tau\to\infty}\Big(2\langle T\rangle_\tau+\sum_{k=1}^N\langle F_k\cdot r_k\rangle_\tau\Big)=0,τ→∞lim​(2⟨T⟩τ​+k=1∑N​⟨Fk​⋅rk​⟩τ​)=0,

i.e. in the long-time limit ⟨T⟩=−12∑k⟨Fk⋅rk⟩\langle T\rangle=-\frac12\sum_k\langle F_k\cdot r_k\rangle⟨T⟩=−21​∑k​⟨Fk​⋅rk​⟩.

This is the virial theorem of classical mechanics, relating the time-averaged kinetic energy of a stably bound system to the time-averaged virial of the forces.

Formalization Note The theorem is stated as a limit of the difference, since for a bounded motion the individual averages need not converge. Continuity of the forces is the standing smoothness convention.

Preamble
import Mathlib
import Definitions.Def_virial_theorem_defs

open Filter Topology
Formal statement
namespace VirialTheorem

theorem virial_theorem {N : ℕ} (m : Fin N → ℝ) (r v F : Fin N → ℝ → Space)
    (hr : ∀ k t, HasDerivAt (r k) (v k t) t)
    (hp : ∀ k t, HasDerivAt (fun s => m k • v k s) (F k t) t)
    (hF : ∀ k, Continuous (F k))
    (hbdd : ∃ C : ℝ, ∀ t ≥ 0, ∀ k, ‖r k t‖ ≤ C ∧ ‖v k t‖ ≤ C) :
    Tendsto (fun τ => 2 * timeAverage (kineticEnergy m v) τ +
        ∑ k, timeAverage (fun t => inner ℝ (F k t) (r k t)) τ) atTop (𝓝 0) := by sorry

end VirialTheorem
Source
Wikipedia, "Virial theorem" (article supplied as Virial_theorem.pdf), https://en.wikipedia.org/wiki/Virial_theorem, introduction and section 'Time averaging' (virial theorem)
Read-back

What the Lean code literally says, in plain math · Aristotle (Harmonic) - drafting agent, non-blind

Non-blind read-back. This read-back is not independent testimony. It was written by the same agent that drafted the Lean statements, with full knowledge of the source article and of the intended meaning. Reviewers must not treat it as a blind audit; an independent read-back should still be obtained before relying on it.

Let N≥0N\ge0N≥0, masses mk∈Rm_k\in\mathbb Rmk​∈R (any sign), and functions rk,vk,Fk:R→R3r_k,v_k,F_k:\mathbb R\to\mathbb R^3rk​,vk​,Fk​:R→R3. Assume: for every kkk and every t∈Rt\in\mathbb Rt∈R, rkr_krk​ has derivative vk(t)v_k(t)vk​(t) at ttt and s↦mkvk(s)s\mapsto m_kv_k(s)s↦mk​vk​(s) has derivative Fk(t)F_k(t)Fk​(t) at ttt; each FkF_kFk​ is continuous on R\mathbb RR; and there is a real CCC such that ∥rk(t)∥≤C\|r_k(t)\|\le C∥rk​(t)∥≤C and ∥vk(t)∥≤C\|v_k(t)\|\le C∥vk​(t)∥≤C for every kkk and every t≥0t\ge0t≥0. Then, as τ→+∞\tau\to+\inftyτ→+∞,

2 τ−1 ⁣∫0τT(t) dt+∑kτ−1 ⁣∫0τ⟨Fk(t),rk(t)⟩ dt  ⟶  0,2\,\tau^{-1}\!\int_0^\tau T(t)\,dt+\sum_k\tau^{-1}\!\int_0^\tau\langle F_k(t),r_k(t)\rangle\,dt\;\longrightarrow\;0,2τ−1∫0τ​T(t)dt+k∑​τ−1∫0τ​⟨Fk​(t),rk​(t)⟩dt⟶0,

with T(t)=12∑kmk∥vk(t)∥2T(t)=\frac12\sum_km_k\|v_k(t)\|^2T(t)=21​∑k​mk​∥vk​(t)∥2. The forces FkF_kFk​ are arbitrary continuous functions linked to the motion only through ddt(mkvk)=Fk\frac{d}{dt}(m_kv_k)=F_kdtd​(mk​vk​)=Fk​; no pair structure, potential, or Newton's third law is assumed.

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

    Confirmed by the moderator at approval.

  • Endorsed by Lucas · Oct 8, 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 paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me