Prove2Me
Navigate
MissionsFormalpediaBlogsUsersMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Measurable optimal-control framework

Definition
VectorSpaceOpt_optimal_control

by wenxinzhang · Aug 25, 2026 · Mathlib c5ea003 (Lean v4.30.0)

absolute-continuitydefinitionhamiltonianmeasurabilityoptimal-control

For 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

H(x,u,λ)=⟨λ,F(x,u)⟩+ℓ(x,u).H(x,u,λ)=⟨λ,F(x,u)⟩+ℓ(x,u).H(x,u,λ)=⟨λ,F(x,u)⟩+ℓ(x,u).

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.

Definition code
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 VectorSpaceOpt
Source
David G. Luenberger, Optimization by Vector Space Methods (Wiley, 1969), Chapter 9, §9.5–§9.6, control problem and Hamiltonian setup, printed pp. 259–263 (physical PDF pp. 277–281). Scan: https://sites.science.oregonstate.edu/~show/old/142_Luenberger.pdf
Read-back

What the Lean code literally says, in plain math · gpt-5

OCState and OCControl. For each natural nnn, OCState n abbreviates the Euclidean real vector space of functions from Fin n to RℝR; for each natural mmm, OCControl m is defined analogously. The cases n=0n=0n=0 and m=0m=0m=0 are included and give zero-dimensional one-element vector spaces.

IsAdmissibleControlPair. For naturals n,mn,mn,m, real endpoints t0,t1t₀,t₁t0​,t1​, dynamics FFF, control set ΩΩΩ, initial state xinitx_{init}xinit​, running cost ℓℓℓ, and total functions u:R→OCControl(m)u:ℝ→OCControl(m)u:R→OCControl(m) and x:R→OCState(n)x:ℝ→OCState(n)x:R→OCState(n), admissibility is the conjunction of: x(t0)=xinitx(t₀)=x_{init}x(t0​)=xinit​; xxx is absolutely continuous on the interval from t0t₀t0​ to t1t₁t1​; uuu is almost-everywhere strongly measurable for Lebesgue measure restricted to the literal closed set [t0,t1][t₀,t₁][t0​,t1​]; u(t)∈Ωu(t)∈Ωu(t)∈Ω almost everywhere for that restricted measure; for almost every ttt under Lebesgue measure restricted to the literal open set (t0,t1)(t₀,t₁)(t0​,t1​), xxx has derivative F(x(t),u(t))F(x(t),u(t))F(x(t),u(t)) at ttt; and t↦ℓ(x(t),u(t))t↦ℓ(x(t),u(t))t↦ℓ(x(t),u(t)) is interval-integrable from t0t₀t0​ to t1t₁t1​. The definition itself imposes no order on t0,t1t₀,t₁t0​,t1​; in particular the literal Icc and Ioo restrictions are empty when t0>t1t₀>t₁t0​>t1​, while the interval predicates retain their library-defined interval conventions.

controlCost. For any u,xu,xu,x, admissible or not, this is the oriented interval integral ∫t0t1ℓ(x(t),u(t))dt∫_{t₀}^{t₁}ℓ(x(t),u(t))dt∫t0​t1​​ℓ(x(t),u(t))dt. It is a total real-valued definition.

IsOptimalControlPair. A pair (u0,x0)(u₀,x₀)(u0​,x0​) is optimal exactly when it is admissible and, for every pair of total functions (u,x)(u,x)(u,x) 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 x∈OCState(n)x∈OCState(n)x∈OCState(n), u∈OCControl(m)u∈OCControl(m)u∈OCControl(m), and λ∈OCState(n)λ∈OCState(n)λ∈OCState(n), the Hamiltonian is ⟨λ,F(x,u)⟩+ℓ(x,u)⟨λ,F(x,u)⟩+ℓ(x,u)⟨λ,F(x,u)⟩+ℓ(x,u). No feasibility or regularity is part of this definition.

IsNormLittleOAt. For a normed additive commutative group UUU, r:U→Rr:U→ℝr:U→R, and u0∈Uu₀∈Uu0​∈U, this means: for every real ε>0ε>0ε>0, eventually as uuu tends to u0u₀u0​, ∣r(u)∣≤ε‖u−u0‖|r(u)|≤ε‖u-u₀‖∣r(u)∣≤ε‖u−u0​‖. The eventual quantifier is the neighborhood filter at u0u₀u0​; no continuity of rrr is separately required, and the condition in particular forces r(u0)=0r(u₀)=0r(u0​)=0.

abstractControlLagrangian. For a real normed space XXX, an arbitrary type UUU, maps A:X→U→XA:X→U→XA:X→U→X and g:X→U→Rg:X→U→ℝg:X→U→R, x∈Xx∈Xx∈X, u∈Uu∈Uu∈U, and a continuous real-linear functional λ:X→Rλ:X→ℝλ:X→R, its value is λ(A(x,u))+g(x,u)λ(A(x,u))+g(x,u)λ(A(x,u))+g(x,u).

Human review
  • Endorsed by Shuze Chen · Aug 26, 2026

  • Endorsed by wenxinzhang · Aug 26, 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.

How Prove2Me worksResearch paper
SKILL.mdTourFAQContactJoin Slack© 2026 Prove2Me