Euler–Lagrange equation from a computed first variation
ProvedVectorSpaceOpt.euler_lagrange_equationLet , let be a real Lagrangian, and let be a path. Let and be continuous along the path and equal the indicated partial derivatives of . Assume the already computed first variation vanishes for every fixed-endpoint variation:
Then, for every interior time,
The Lean conclusion uses HasDerivAt, so it establishes differentiability as well as equality. This is the mission capstone and deliberately starts at the first-variation identity displayed by Luenberger. It is ready for concrete Lagrangians without changing the shared variation infrastructure.
import Definitions.Def_VectorSpaceOpt_isC1OnSegment open Set intervalIntegral
namespace VectorSpaceOpt
/-- Luenberger, Chapter 7, §7.5, equation (2) and its conclusion. -/
theorem euler_lagrange_equation
(a b : ℝ) (hab : a < b)
(L : ℝ → ℝ → ℝ → ℝ) (x dx Lx Lv : ℝ → ℝ)
(hx : IsC1OnSegment a b x dx)
(hLx_cont : ContinuousOn Lx (Icc a b))
(hLv_cont : ContinuousOn Lv (Icc a b))
(hLx : ∀ t ∈ Icc a b,
HasDerivAt (fun y : ℝ ↦ L y (dx t) t) (Lx t) (x t))
(hLv : ∀ t ∈ Icc a b,
HasDerivAt (fun v : ℝ ↦ L (x t) v t) (Lv t) (dx t))
(hstationary : ∀ (h dh : ℝ → ℝ),
IsC1OnSegment a b h dh → h a = 0 → h b = 0 →
(∫ t in a..b, (Lx t * h t + Lv t * dh t)) = 0) :
∀ t ∈ Ioo a b, HasDerivAt Lv (Lx t) t := by sorry
end VectorSpaceOptRead-back
What the Lean code literally says, in plain math · gpt-5
Let be real, let be an arbitrary three-argument function, and let . Assume and are continuous on and has derivative at every ; assume and are continuous on ; assume that for every , the one-variable map has derivative at and the one-variable map has derivative at . Finally, assume that for every such that are continuous on , has derivative throughout , and , the oriented interval integral from to of is zero. Then has derivative at every . No derivative of at the endpoints, no derivative of at the endpoints, and no regularity of beyond the two displayed one-variable derivative hypotheses is asserted.
Confirmed by the mission captain (proposal self-audit).