Measurable optimal-control framework
DefinitionVectorSpaceOpt_optimal_controlFor Euclidean state and control spaces on [t₀,t₁], an admissible pair (x,u) has fixed initial state, absolutely continuous state, almost everywhere strongly measurable control taking values in Omega almost everywhere, an a.e. state equation x' = F(x,u), and interval-integrable running cost. IsOptimalControlPair means that such a pair has no larger cost than any other admissible pair. The minimum-convention Hamiltonian is
The file also defines the interval cost, a norm-based little-o predicate, and the abstract Lagrangian used by Proposition 1. These definitions make state and control regularity explicit instead of inheriting the book's piecewise-continuity conventions informally. The measurable-control model is broader than compact-interval piecewise continuity, so the root separately assumes an a.e. norm bound for the optimal control and integrability of the two derivative-coefficient paths.
import Mathlib
open Set Filter MeasureTheory
open scoped Interval RealInnerProductSpace
namespace VectorSpaceOpt
/-- Finite-dimensional state vectors used in the control mission. -/
abbrev OCState (n : ℕ) := EuclideanSpace ℝ (Fin n)
/-- Finite-dimensional control vectors used in the control mission. -/
abbrev OCControl (m : ℕ) := EuclideanSpace ℝ (Fin m)
/-- An admissible state-control pair for the differential system `x' = F(x,u)`. -/
def IsAdmissibleControlPair {n m : ℕ}
(t₀ t₁ : ℝ) (F : OCState n → OCControl m → OCState n)
(Ω : Set (OCControl m)) (xInit : OCState n)
(ell : OCState n → OCControl m → ℝ)
(u : ℝ → OCControl m) (x : ℝ → OCState n) : Prop :=
x t₀ = xInit ∧
AbsolutelyContinuousOnInterval x t₀ t₁ ∧
AEStronglyMeasurable u (volume.restrict (Icc t₀ t₁)) ∧
(∀ᵐ t ∂volume.restrict (Icc t₀ t₁), u t ∈ Ω) ∧
(∀ᵐ t ∂volume.restrict (Ioo t₀ t₁), HasDerivAt x (F (x t) (u t)) t) ∧
IntervalIntegrable (fun t => ell (x t) (u t)) volume t₀ t₁
/-- The running-cost objective of an admissible state-control pair. -/
noncomputable def controlCost {n m : ℕ} (t₀ t₁ : ℝ)
(ell : OCState n → OCControl m → ℝ)
(u : ℝ → OCControl m) (x : ℝ → OCState n) : ℝ :=
∫ t in t₀..t₁, ell (x t) (u t)
/-- Global optimality among all admissible state-control pairs. -/
def IsOptimalControlPair {n m : ℕ}
(t₀ t₁ : ℝ) (F : OCState n → OCControl m → OCState n)
(Ω : Set (OCControl m)) (xInit : OCState n)
(ell : OCState n → OCControl m → ℝ)
(u₀ : ℝ → OCControl m) (x₀ : ℝ → OCState n) : Prop :=
IsAdmissibleControlPair t₀ t₁ F Ω xInit ell u₀ x₀ ∧
∀ (u : ℝ → OCControl m) (x : ℝ → OCState n),
IsAdmissibleControlPair t₀ t₁ F Ω xInit ell u x →
controlCost t₀ t₁ ell u₀ x₀ ≤ controlCost t₀ t₁ ell u x
/-- Luenberger's minimum-convention Hamiltonian. -/
noncomputable def controlHamiltonian {n m : ℕ}
(F : OCState n → OCControl m → OCState n)
(ell : OCState n → OCControl m → ℝ)
(x : OCState n) (u : OCControl m) (lambda : OCState n) : ℝ :=
⟪lambda, F x u⟫ + ell x u
/-- A scalar remainder is little-o of distance to `u₀`. -/
def IsNormLittleOAt
{U : Type*} [NormedAddCommGroup U]
(r : U → ℝ) (u₀ : U) : Prop :=
∀ ε : ℝ, 0 < ε → ∀ᶠ u in nhds u₀, ‖r u‖ ≤ ε * ‖u - u₀‖
/-- The abstract Lagrangian used in §9.6, Proposition 1. -/
def abstractControlLagrangian
{X U : Type*} [NormedAddCommGroup X] [NormedSpace ℝ X]
(A : X → U → X) (g : X → U → ℝ)
(x : X) (u : U) (lambda : X →L[ℝ] ℝ) : ℝ :=
lambda (A x u) + g x u
end VectorSpaceOptRead-back
What the Lean code literally says, in plain math · gpt-5
OCState and OCControl. For each natural , OCState n abbreviates the Euclidean real vector space of functions from Fin n to ; for each natural , OCControl m is defined analogously. The cases and are included and give zero-dimensional one-element vector spaces.
IsAdmissibleControlPair. For naturals , real endpoints , dynamics , control set , initial state , running cost , and total functions and , admissibility is the conjunction of: ; is absolutely continuous on the interval from to ; is almost-everywhere strongly measurable for Lebesgue measure restricted to the literal closed set ; almost everywhere for that restricted measure; for almost every under Lebesgue measure restricted to the literal open set , has derivative at ; and is interval-integrable from to . The definition itself imposes no order on ; in particular the literal Icc and Ioo restrictions are empty when , while the interval predicates retain their library-defined interval conventions.
controlCost. For any , admissible or not, this is the oriented interval integral . It is a total real-valued definition.
IsOptimalControlPair. A pair is optimal exactly when it is admissible and, for every pair of total functions that is admissible for the same data, its control cost is no larger than that pair's cost. This is global comparison over all admissible pairs, not merely local comparison.
controlHamiltonian. For , , and , the Hamiltonian is . No feasibility or regularity is part of this definition.
IsNormLittleOAt. For a normed additive commutative group , , and , this means: for every real , eventually as tends to , . The eventual quantifier is the neighborhood filter at ; no continuity of is separately required, and the condition in particular forces .
abstractControlLagrangian. For a real normed space , an arbitrary type , maps and , , , and a continuous real-linear functional , its value is .
Confirmed by the mission captain (proposal self-audit).