Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

§6.2, p. 791 — the optimal distribution p∗∝q(j)ev(j)/λp^*\propto q(j)e^{v(j)/\lambda}p∗∝q(j)ev(j)/λ (Gibbs variational principle)

Proved
RobustMDP.EntropyInner.tilted_optimal

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

convex-dualitygibbs-variational-principlekullback-leibler-divergencep2o-batch-p100bp2o-gran-per-chapterp2o-plan-paperp2o-v1

Let q∈Δnq\in\Delta_nq∈Δn​ with q(j)>0q(j)>0q(j)>0 for all jjj, let v∈Rnv\in\mathbb R^nv∈Rn and λ>0\lambda>0λ>0.

  1. For every p∈Δnp\in\Delta_np∈Δn​,
pTv−λD(p∥q)  ≤  λlog⁡(∑jq(j)exp⁡v(j)λ).p^{\mathsf T}v-\lambda D(p\|q) \;\le\; \lambda\log\Big(\sum_j q(j)\exp\frac{v(j)}{\lambda}\Big).pTv−λD(p∥q)≤λlog(j∑​q(j)expλv(j)​).
  1. The tilted distribution
p∗(j)=q(j)exp⁡(v(j)/λ)∑iq(i)exp⁡(v(i)/λ)p^*(j)=\frac{q(j)\exp(v(j)/\lambda)}{\sum_i q(i)\exp(v(i)/\lambda)}p∗(j)=∑i​q(i)exp(v(i)/λ)q(j)exp(v(j)/λ)​

belongs to Δn\Delta_nΔn​ and attains equality in 1.

In words, p∗p^*p∗ maximises the penalised objective pTv−λD(p∥q)p^{\mathsf T}v-\lambda D(p\|q)pTv−λD(p∥q) over the simplex, and the maximum is λ\lambdaλ times the log-moment-generating function of vvv under qqq at 1/λ1/\lambda1/λ. This is what makes p∗p^*p∗ the optimal distribution for a given multiplier λ\lambdaλ in the dual of the inner problem.

Formalization Note The paper only displays the formula for p∗p^*p∗ ("The optimal distribution is"); the inequality in 1 with equality at p∗p^*p∗ is the content that display relies on.

Preamble
import Mathlib
import Definitions.Def_RobustMDP_EntropyInner_klBall
import Definitions.Def_RobustMDP_EntropyInner_dualFunction
Formal statement
namespace RobustMDP.EntropyInner

/-- The optimal distribution of §6.2 (Nilim–El Ghaoui 2005, p. 791), in variational form.
For `q ∈ Δₙ` with `q > 0` and `λ > 0`:
(a) every `p ∈ Δₙ` satisfies `pᵀv − λ D(p‖q) ≤ λ log ∑ⱼ q(j) exp (v(j)/λ)`;
(b) the tilted distribution `p*(j) = q(j) exp (v(j)/λ) / ∑ᵢ q(i) exp (v(i)/λ)` lies in `Δₙ` and
attains equality in (a). -/
theorem tilted_optimal {n : ℕ} (q v : Fin n → ℝ)
    (hq : q ∈ stdSimplex ℝ (Fin n)) (hq_pos : ∀ j, 0 < q j) (lam : ℝ) (hlam : 0 < lam) :
    (∀ p ∈ stdSimplex ℝ (Fin n),
      (∑ j, p j * v j) - lam * klDiv p q ≤
        lam * Real.log (∑ j, q j * Real.exp (v j / lam))) ∧
    tiltedDist q v lam ∈ stdSimplex ℝ (Fin n) ∧
    (∑ j, tiltedDist q v lam j * v j) - lam * klDiv (tiltedDist q v lam) q =
        lam * Real.log (∑ j, q j * Real.exp (v j / lam)) := by sorry

end RobustMDP.EntropyInner
Source
Nilim and El Ghaoui, Robust Control of Markov Decision Processes with Uncertain Transition Matrices, Oper. Res. 53 (2005), p. 791, §6.2, display "The optimal distribution is p* = …"
Read-back

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

Setting. Let n∈Nn \in \mathbb{N}n∈N, let q,v∈Rnq, v \in \mathbb{R}^nq,v∈Rn and let λ∈R\lambda \in \mathbb{R}λ∈R. Assume:

  • qqq lies in the probability simplex Δn={p:pj≥0, ∑jpj=1}\Delta_n = \{p : p_j \ge 0,\ \sum_j p_j = 1\}Δn​={p:pj​≥0, ∑j​pj​=1};
  • qj>0q_j > 0qj​>0 for every jjj;
  • λ>0\lambda > 0λ>0.

No β\betaβ appears.

Notation.

  • D(p ∥ q)=∑jpjlog⁡(pj/qj)D(p\,\|\,q) = \sum_j p_j \log(p_j/q_j)D(p∥q)=∑j​pj​log(pj​/qj​), where a term with pj=0p_j = 0pj​=0 contributes 000.
  • S=∑jqjevj/λS = \sum_j q_j e^{v_j/\lambda}S=∑j​qj​evj​/λ, which is strictly positive.
  • pj∗=qjevj/λ/Sp^{*}_j = q_j e^{v_j/\lambda} / Spj∗​=qj​evj​/λ/S.

Conclusion (a). For every p∈Δnp \in \Delta_np∈Δn​,

∑jpjvj  −  λ D(p ∥ q)  ≤  λlog⁡S.\sum_j p_j v_j \;-\; \lambda\, D(p\,\|\,q) \;\le\; \lambda \log S .j∑​pj​vj​−λD(p∥q)≤λlogS.

Conclusion (b). p∗∈Δnp^{*} \in \Delta_np∗∈Δn​.

Conclusion (c). Equality holds at p∗p^{*}p∗:

∑jpj∗vj  −  λ D(p∗ ∥ q)  =  λlog⁡S.\sum_j p^{*}_j v_j \;-\; \lambda\, D(p^{*}\,\|\,q) \;=\; \lambda \log S .j∑​pj∗​vj​−λD(p∗∥q)=λlogS.

Degenerate cases.

  • n=0n = 0n=0: impossible, because of the simplex hypothesis on qqq.
  • n=1n = 1n=1:
    • q=p∗=(1)q = p^{*} = (1)q=p∗=(1), D=0D = 0D=0 and λlog⁡S=v1\lambda\log S = v_1λlogS=v1​.
    • Parts (a) and (c) both reduce to v1≤v1v_1 \le v_1v1​≤v1​ and v1=v1v_1 = v_1v1​=v1​.
  • Zero coordinates of ppp: for p∈Δnp \in \Delta_np∈Δn​ with some pj=0p_j = 0pj​=0, those coordinates contribute nothing to DDD, which matches the convention 0log⁡0=00\log 0 = 00log0=0.
  • λ≤0\lambda \le 0λ≤0: not covered.
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