The Pontryagin Minimum (Maximum) Principle is the fundamental necessary condition of optimal control, in continuous use since 1956 across aerospace guidance, robotics, and mathematical economics. Chapter 3 of Bertsekas, Dynamic Programming and Optimal Control, Vol. I (3rd ed., 2005) develops it from the dynamic programming side: the HJB sufficiency theorem (Prop. 3.2.1), an envelope lemma (Lemma 3.3.1), the Minimum Principle itself (Prop. 3.3.1), and its discrete-time counterpart (Prop. 3.3.2). Mathlib's optimal-control coverage is currently near zero — no HJB equation, no adjoint equations, no maximum principle — which makes this the mission with the largest gap between textbook maturity and formal coverage in the series.
Minimize, over admissible pairs, the cost
with continuously differentiable (BertsekasCTModel). Admissible controls are piecewise continuous on — formalized as: bounded image and continuous off a finite set (BertsekasPiecewiseContinuousOn) — and state trajectories are continuous, satisfying the ODE off a finite set (BertsekasCTAdmissibleFrom, parametrized by an arbitrary start ). The Hamiltonian is (BertsekasHamiltonian).
For an optimal admissible pair : there exist an adjoint and a constant with
away from finitely many times — BertsekasDP.pontryagin_minimum_principle (goal). Milestones: Prop. 3.2.1 (hjb_sufficiency_of_continuous), Lemma 3.3.1 (envelope_gradient_lemma), Prop. 3.3.2 (discrete_minimum_principle).
The HJB milestone carries the hypotheses that and are jointly continuous — the consequence of the §3.1 standing assumptions that its proof uses. An earlier version without any regularity hypothesis was disproved: with a discontinuous running cost the cost integrand need not be integrable, and the library's integral of a non-integrable function is .
The Minimum Principle converts an infinite-dimensional optimization into a two-point boundary value problem — the basis of shooting methods and of every "bang-bang" analysis. None of it exists in Mathlib; even the HJB verification theorem would be new. The discrete-time milestone is self-contained multivariable calculus and gives early value; the envelope lemma is reusable well beyond control theory. The results are classical (Pontryagin et al. 1962; the book's Chapter 3); the formal proof of Prop. 3.3.1 will need an honest variational argument — the book's own HJB-based derivation is explicitly informal.
For the goal: the classical proofs go through needle variations and a separation argument, or through regularity of the value function — neither is in Mathlib. The book's derivation assumes differentiability of the optimal value function, which is not a hypothesis of the statement; a formal proof must either supply a rigorous variational argument or add intermediate lemmas as new platform problems (sketching is encouraged). For the HJB milestone, the work is differentiating along a trajectory that satisfies the ODE only off a finite set, then integrating.
States and controls in EuclideanSpace ℝ (Fin n) / (Fin m); gradients in Mathlib's gradient; the ODE and adjoint via HasDerivAt off a finite exceptional set; costs via intervalIntegral. Piecewise continuity includes boundedness of the image, so the cost integrand of an admissible pair is genuinely integrable — the junk-value escape (non-integrable integrand ⇒ integral 0) is closed. Fixed initial state, fixed terminal time, free terminal state; time-independent dynamics (so the Hamiltonian is constant, per the book's remark that time-varying systems lose constancy). is an arbitrary set — no compactness or convexity is assumed in the goal.
namespace BertsekasDP
theorem pontryagin_minimum_principle {n m : ℕ} (M : BertsekasCTModel n m)
(hf : ContDiff ℝ 1 (Function.uncurry M.f))
(hg : ContDiff ℝ 1 (Function.uncurry M.g))
(hh : ContDiff ℝ 1 M.h)
(ustar : ℝ → EuclideanSpace ℝ (Fin m))
(xstar : ℝ → EuclideanSpace ℝ (Fin n))
(hadm : BertsekasCTAdmissibleFrom M 0 M.x0 ustar xstar)
(hopt : ∀ u x, BertsekasCTAdmissibleFrom M 0 M.x0 u x →
BertsekasCTCostFrom M 0 ustar xstar ≤ BertsekasCTCostFrom M 0 u x) :
∃ (p : ℝ → EuclideanSpace ℝ (Fin n)) (F : Finset ℝ) (c : ℝ),
ContinuousOn p (Set.Icc 0 M.T) ∧
p M.T = gradient M.h (xstar M.T) ∧
(∀ t ∈ Set.Icc 0 M.T \ (F : Set ℝ),
HasDerivAt p
(-gradient (fun y => BertsekasHamiltonian M y (ustar t) (p t)) (xstar t))
t) ∧
(∀ t ∈ Set.Icc 0 M.T \ (F : Set ℝ),
IsMinOn (fun u => BertsekasHamiltonian M (xstar t) u (p t)) M.U (ustar t)) ∧
(∀ t ∈ Set.Icc 0 M.T \ (F : Set ℝ),
BertsekasHamiltonian M (xstar t) (ustar t) (p t) = c) := by sorry
end BertsekasDPProposition 3.3.1 (Pontryagin Minimum Principle). Consider the continuous-time problem of minimizing subject to , and , with , and continuously differentiable. Let be an optimal admissible control trajectory and the corresponding state trajectory. Then there is an adjoint trajectory , continuous on , satisfying the adjoint equation and its terminal condition
such that the control minimizes the Hamiltonian pointwise,
and the Hamiltonian is constant along the optimal trajectory,
for some constant . Here .
The Minimum Principle converts an optimization over a function space into a two-point boundary value problem in ordinary differential equations — the basis of shooting methods and of every bang-bang analysis. Its conditions are necessary, not sufficient: a trajectory satisfying them need not be optimal, and further argument (existence plus uniqueness of the candidate, or convexity) is needed to conclude optimality.
Formalization Note The three conditions hold off a common finite exceptional set, which is where the piecewise continuous control switches; this is the precise reading of the source's "for all " in the presence of switching. Constancy of the Hamiltonian uses time-independence of and , as the source notes it may fail otherwise. Uniqueness of is not asserted, and the terminal condition fixes the cost multiplier at , so no abnormal multiplier appears.
No open leaves. Every sub-goal is proved or awaiting decomposition.