Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

n-step expansion (p. 291) — a solution M of (2) equals max over δ₁,…,δₙ of the n-stage yield plus M(ω_{n+1})P_{n+1}(s)

Proved
KarlinDP.Deterministic.solution_nstep_expansion

by mikedeng1 · Sep 27, 2026 · Mathlib 0df444a (Lean v4.33.1)

dynamic-programmingp2o-batch-p200ap2o-gran-per-chapterp2o-plan-paperp2o-v1principle-of-optimality

In Karlin's deterministic model (Ω\OmegaΩ Hausdorff, DDD nonempty compact Hausdorff, L≥0L \ge 0L≥0 continuous on Ω×D\Omega \times DΩ×D, (δ,ω)↦Tδ ω(\delta, \omega) \mapsto T_\delta\,\omega(δ,ω)↦Tδ​ω continuous, P>0P > 0P>0 continuous, ω1=ω\omega_1 = \omegaω1​=ω, ωn=Tδn−1 ωn−1\omega_n = T_{\delta_{n-1}}\,\omega_{n-1}ωn​=Tδn−1​​ωn−1​, Pn(s)=∏i=1n−1P(δi)P_n(s) = \prod_{i=1}^{n-1} P(\delta_i)Pn​(s)=∏i=1n−1​P(δi​)), let M:Ω→RM : \Omega \to \mathbb{R}M:Ω→R solve the functional equation

M(ω)=max⁡δ∈D{L(ω,δ)+P(δ) M(Tδ ω)}for every ω,M(\omega) = \max_{\delta \in D} \bigl\{ L(\omega, \delta) + P(\delta)\, M(T_\delta\,\omega) \bigr\} \quad \text{for every } \omega,M(ω)=δ∈Dmax​{L(ω,δ)+P(δ)M(Tδ​ω)}for every ω,

with the maximum attained. Then for every n≥0n \ge 0n≥0 and every ω\omegaω

M(ω)=max⁡δ1,…,δn{∑m=1nL(ωm,δm) Pm(s)+M(ωn+1) Pn+1(s)},M(\omega) = \max_{\delta_1, \dots, \delta_n} \Bigl\{ \sum_{m=1}^{n} L(\omega_m, \delta_m)\, P_m(s) + M(\omega_{n+1})\, P_{n+1}(s) \Bigr\},M(ω)=δ1​,…,δn​max​{m=1∑n​L(ωm​,δm​)Pm​(s)+M(ωn+1​)Pn+1​(s)},

the maximum being attained. The paper writes out the case n=2n = 2n=2, where the last term is P(δ1)P(δ2)M(ω3)P(\delta_1) P(\delta_2) M(\omega_3)P(δ1​)P(δ2​)M(ω3​).

Iterating the functional equation in this way expresses MMM as an nnn-stage optimization problem with terminal reward MMM; letting n→∞n \to \inftyn→∞ is the route to the uniqueness theorem.

Formalization Note The maximum is taken over full strategies s : ℕ → D, of which only s 0, …, s (n-1) (the paper's δ1,…,δn\delta_1, \dots, \delta_nδ1​,…,δn​) enter the expression. Lean's index nnn gives partialYield … n =∑m=1nL(ωm,δm)Pm(s)= \sum_{m=1}^{n} L(\omega_m,\delta_m)P_m(s)=∑m=1n​L(ωm​,δm​)Pm​(s) and trajectory T ω s n =ωn+1= \omega_{n+1}=ωn+1​, weight P s n =Pn+1(s)= P_{n+1}(s)=Pn+1​(s). No topological hypothesis is needed for this statement; the model's standing hypotheses are kept as in every item of the mission.

Preamble
import Mathlib
import Definitions.Def_KarlinDP_Deterministic_Model
Formal statement
namespace KarlinDP.Deterministic

/-- The `n`-step expansion of a solution of (2) (Karlin 1955, p. 291, first display, printed for
`n = 2`): if `M(ω) = max_{δ} {L(ω, δ) + P(δ) M(T_δ ω)}` for every `ω`, then for every `n`,
`M(ω) = max_{δ₁,…,δₙ} {∑_{m=1}^{n} L(ω_m, δ_m) P_m(s) + M(ω_{n+1}) P_{n+1}(s)}`.
The range is over full strategies `s`, of which only `s 0, …, s (n-1)` enter. -/
theorem solution_nstep_expansion {Ω D : Type*} [TopologicalSpace Ω] [T2Space Ω]
    [TopologicalSpace D] [CompactSpace D] [T2Space D] [Nonempty D]
    (L : Ω → D → ℝ) (T : D → Ω → Ω) (P : D → ℝ)
    (hL0 : ∀ ω δ, 0 ≤ L ω δ) (hL : Continuous (fun p : Ω × D => L p.1 p.2))
    (hT : Continuous (fun p : D × Ω => T p.1 p.2))
    (hP0 : ∀ δ, 0 < P δ) (hP : Continuous P)
    (M : Ω → ℝ)
    (hM : ∀ ω, IsGreatest (Set.range fun δ => L ω δ + P δ * M (T δ ω)) (M ω)) :
    ∀ n ω, IsGreatest
      (Set.range fun s : ℕ → D => partialYield L T P ω s n + M (trajectory T ω s n) * weight P s n)
      (M ω) := by sorry

end KarlinDP.Deterministic
Source
Karlin, The Structure of Dynamic Programing Models, Naval Res. Logist. Quart. 2(4), 1955, p. 291, §Uniqueness, first display (the case n = 2, iterated in the "Therefore" step)
Human review
  • Endorsed by Shuze Chen · Sep 27, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Sep 27, 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, with reuse governed by our licensing terms.

How Prove2Me worksResearch paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me