Lagrange equation of the one-dimensional harmonic oscillator
ProvedStationaryAction.harmonic_oscillator_equation_of_motionThe first mechanical application in §3.1 of the source: the Lagrange equation of the one-dimensional harmonic oscillator is Newton's equation.
For a mass on a spring of stiffness , the Lagrangian is
For a twice continuously differentiable trajectory and any time interval , the Euler–Lagrange equation for holds at every if and only if
The source computes , and concludes with the equation of motion, remarking that it is identical to what Newtonian mechanics gives, with no force ever written down. (The printed equation at that point reads ; the spring constant is missing there, and the statement formalised here restores it, as the immediately preceding partial derivatives require.)
Formalization Note The statement is an equivalence, so it also asserts that a trajectory obeying Newton's equation satisfies the Euler–Lagrange equation. No assumption is made on or ; in particular the degenerate case makes both sides hold trivially.
import Definitions.Def_StationaryActionCore
namespace StationaryAction
/-- Martins 2025, §3.1, one-dimensional harmonic oscillator. -/
theorem harmonic_oscillator_equation_of_motion
(m k : ℝ) (q : ℝ → ℝ) (t₁ t₂ : ℝ) (hq : ContDiff ℝ 2 q) :
(∀ t ∈ Set.Icc t₁ t₂,
eulerLagrangeExpr (fun u v _ => m * v ^ 2 / 2 - k * u ^ 2 / 2) q t = 0) ↔
∀ t ∈ Set.Icc t₁ t₂, m * deriv (deriv q) t + k * q t = 0 := by sorry
end StationaryActionRead-back
What the Lean code literally says, in plain math · Aristotle (Harmonic)
Note on the provenance of this read-back — please read before relying on it. This read-back is not blind and not independent testimony. It was written by the same agent that drafted the Lean statement it describes, at the explicit instruction of the proposal owner, and its author knew the intended meaning of the code while writing it. It therefore cannot play the role an independent auditor's read-back plays: it cannot be expected to surface a gap between what the statement was meant to say and what it actually says, because the same understanding produced both texts. No reviewer should treat it as independent corroboration of faithfulness. If independent testimony is wanted, a blind read-back by a separate auditor should be commissioned and this text replaced.
Let and be arbitrary real numbers (no sign or non-vanishing assumption), let be on , and let be arbitrary reals with no order relation assumed between them.
Consider the integrand , which ignores its third argument. The statement asserts the equivalence of the following two conditions.
(A) For every in the closed interval ,
where is the derivative of in and the derivative in , both evaluated along the trajectory.
(B) For every , , where is the derivative of the derivative function of .
If the interval is empty and both sides hold vacuously, so the equivalence is trivially true in that case. All derivatives return at points of non-differentiability; the hypothesis on makes the second derivative in (B) a genuine one.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.