Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Principle of least action: δS=0  ⟺  \delta S = 0 \iffδS=0⟺ Lagrange's equations

Proved
ClassicalDynamics.principle_of_least_action

by LG · Sep 22, 2026 · Mathlib 0df444a (Lean v4.33.1)

calculus-of-variationsclassical-mechanicsmathematical-physics

Tong, eq. (2.8). Let LLL be a smooth Lagrangian on Rn\mathbb{R}^nRn, let q:R→Rnq : \mathbb{R} \to \mathbb{R}^nq:R→Rn be a smooth path, and let t1<t2t_1 < t_2t1​<t2​.

Then the action

S[q]=∫t1t2L(t,q(t),q˙(t)) dtS[q] = \int_{t_1}^{t_2} L\big(t, q(t), \dot q(t)\big)\, dtS[q]=∫t1​t2​​L(t,q(t),q˙​(t))dt

is stationary at qqq with respect to every smooth variation vanishing at the endpoints — that is, for every smooth hhh with h(t1)=h(t2)=0h(t_1) = h(t_2) = 0h(t1​)=h(t2​)=0 the function s↦S[q+sh]s \mapsto S[q + s h]s↦S[q+sh] is differentiable at s=0s = 0s=0 with derivative 000 — if and only if qqq satisfies Lagrange's equations

ddt(∂L∂q˙i)=∂L∂qi\frac{d}{dt}\left(\frac{\partial L}{\partial \dot q_i}\right) = \frac{\partial L}{\partial q_i}dtd​(∂q˙​i​∂L​)=∂qi​∂L​

at every interior time t∈(t1,t2)t \in (t_1, t_2)t∈(t1​,t2​) and in every coordinate iii.

This is the statement Tong derives by varying the path, integrating by parts, and discarding the boundary term; the reverse implication is the elementary direction.

Preamble
import Definitions.Def_ClassicalDynamics_core
Formal statement
namespace ClassicalDynamics

/-- Tong, eq. (2.8): the principle of least action. -/
theorem principle_of_least_action {n : ℕ} (L : Lagrangian n)
    (hL : IsSmoothLagrangian L) (q : ℝ → Fin n → ℝ) (hq : ContDiff ℝ (⊤ : ℕ∞) q)
    (t₁ t₂ : ℝ) (ht : t₁ < t₂) :
    (∀ h : ℝ → Fin n → ℝ, ContDiff ℝ (⊤ : ℕ∞) h → h t₁ = 0 → h t₂ = 0 →
        HasDerivAt (fun s : ℝ => action L (fun t => q t + s • h t) t₁ t₂) 0 0)
      ↔ (∀ (i : Fin n), ∀ t ∈ Set.Ioo t₁ t₂,
          HasDerivAt (fun s : ℝ => dLdv L i s (q s) (vel q s))
            (dLdq L i t (q t) (vel q t)) t) := by sorry
end ClassicalDynamics
Source
D. Tong, Classical Dynamics, University of Cambridge Part II Mathematical Tripos, Michaelmas 2004/2005, https://www.damtp.cam.ac.uk/user/tong/dynamics.html, Section 2 (pp. 10-25), pp. 10-11, eqs. (2.5)-(2.8) (Theorem: Principle of Least Action)
Read-back

What the Lean code literally says, in plain math · Aristotle (Harmonic) — the drafting agent itself; see the notice above

Non-blind read-back — not independent testimony. This read-back was written by the same agent that drafted the Lean statements in this proposal, not by an independent blind auditor. Its author knew what the code was intended to say, so it cannot serve the usual purpose of catching a mismatch between intent and code. Treat it as an aid to reading the Lean, and obtain an independent blind read-back before relying on it during the audit.

Fix a natural number nnn, a Lagrangian LLL on the configuration space of nnn-tuples of reals, a path q:R→Rnq : \mathbb{R} \to \mathbb{R}^nq:R→Rn, and two reals t1,t2t_1, t_2t1​,t2​. Assume: LLL is C∞C^\inftyC∞ jointly in (t,q,v)(t, q, v)(t,q,v); qqq is C∞C^\inftyC∞; and t1<t2t_1 < t_2t1​<t2​.

The claim is an equivalence between the following two statements.

(A) Stationarity. For every map h:R→Rnh : \mathbb{R} \to \mathbb{R}^nh:R→Rn that is C∞C^\inftyC∞ and satisfies h(t1)=0h(t_1) = 0h(t1​)=0 and h(t2)=0h(t_2) = 0h(t2​)=0 (the zero tuple in both cases), the real function

s  ⟼  ∫t1t2L(t,  q(t)+s h(t),  ddu[q(u)+s h(u)]u=t) dts \;\longmapsto\; \int_{t_1}^{t_2} L\Big(t,\; q(t) + s\,h(t),\; \tfrac{d}{du}\big[q(u) + s\,h(u)\big]_{u=t}\Big)\, dts⟼∫t1​t2​​L(t,q(t)+sh(t),dud​[q(u)+sh(u)]u=t​)dt

is differentiable at s=0s = 0s=0 and its derivative there is 000. The inner time derivative is taken coordinatewise and is a total operation returning 000 where it does not exist; the outer integral is the oriented interval integral, returning 000 for a non-integrable integrand. Note that hhh is constrained only at the two endpoints — it need not vanish outside [t1,t2][t_1, t_2][t1​,t2​], though only its values on that interval affect the integral.

(B) Lagrange's equations on the open interval. For every index i∈{0,…,n−1}i \in \{0,\dots,n-1\}i∈{0,…,n−1} and every ttt with t1<t<t2t_1 < t < t_2t1​<t<t2​ (endpoints excluded), the function

s  ⟼  ∂L∂q˙i(s,q(s),q˙(s))s \;\longmapsto\; \frac{\partial L}{\partial \dot q_i}\big(s, q(s), \dot q(s)\big)s⟼∂q˙​i​∂L​(s,q(s),q˙​(s))

is differentiable at ttt with derivative exactly ∂L∂qi(t,q(t),q˙(t))\frac{\partial L}{\partial q_i}\big(t, q(t), \dot q(t)\big)∂qi​∂L​(t,q(t),q˙​(t)), where the two partial derivatives are one-variable derivatives in the iii-th position slot and the iii-th velocity slot respectively, all other entries held fixed.

The assertion is that (A) holds if and only if (B) holds. Both directions are claimed. When n=0n = 0n=0 both sides hold trivially: the only tuple is the empty one, so the integrand does not depend on sss and there are no indices iii.

Human review
  • Endorsed by Shuze Chen · Sep 23, 2026

  • Endorsed by LG · Sep 23, 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