Chapter 3, Theorem 9 -- KKT optimality condition for the two-stage recourse LP
ProvedStochasticProg.Recourse.thm9_kkt_optimalityChapter 3, Theorem 9 (goal theorem). Suppose the deterministic-equivalent program (1.2) -- minimize over -- has a finite optimal value. A point is optimal if and only if there exist and with such that
This is the KKT-style optimality condition for the two-stage stochastic linear program with fixed recourse: it combines the subdifferential of the convex, possibly nondifferentiable recourse function (Theorem 6) with the ordinary linear-programming complementarity condition for the polyhedral constraint set .
Formalization Note. "Optimal in (1.2)" is formalized as attaining the infimum of over
, i.e. , using the extended-real-valued sInf; "finite
optimal value" is the hypothesis that this infimum equals some real , exactly as the theorem
statement presupposes. is StochasticProg.Recourse.subdiffQ.
Moderator's note. The book's standing assumption for §3.1c–e (p. 112: "assuming it is not −∞") is stated explicitly: no second-stage problem is unbounded below (Q(x, ξ_k) ≠ −∞ for every x and scenario k; for the abstract Q of Corollary 10, Q x ≠ −∞). Without it "finite on K₂" and the KKT characterisation can fail.
import Mathlib import Definitions.Def_StochasticProg_Recourse_Instance import Definitions.Def_StochasticProg_Recourse_Subdiff
namespace StochasticProg.Recourse
variable {n1 n2 m1 m2 K : ℕ}
/-- Chapter 3, Theorem 9 (p. 116), the goal theorem: suppose the deterministic
equivalent problem (1.2) has a finite optimal value. A solution `x* ∈ K1` is
optimal if and only if there exist `λ* ∈ ℝ^{m1}` and `μ* ∈ ℝ^{n1}_+` with
`(μ*)ᵀx* = 0` such that `-c + Aᵀλ* + μ* ∈ ∂Q(x*)` (Eq. (1.12)). -/
theorem thm9_kkt_optimality (inst : Instance n1 n2 m1 m2 K)
(hQ : ∀ x k, QVal inst x k ≠ ⊥)
(hfin : ∃ z0 : ℝ, sInf (obj inst '' K1 inst) = (z0 : EReal))
(xstar : Fin n1 → ℝ) (hx : xstar ∈ K1 inst) :
(obj inst xstar = sInf (obj inst '' K1 inst)) ↔
∃ (lam : Fin m1 → ℝ) (mu : Fin n1 → ℝ),
(∀ i, 0 ≤ mu i) ∧ dotProduct mu xstar = 0 ∧
(fun j => -inst.c j + Matrix.mulVec (Matrix.transpose inst.A) lam j + mu j) ∈
subdiffQ inst xstar := by sorry
end StochasticProg.Recourse
Read-back
What the Lean code literally says, in plain math · claude-fable-5-1
Fix natural numbers (all implicit; any values, including , are allowed) and an object of a bundle-defined type . The statement itself only exposes two components of : a vector (written ) and a real matrix with rows and columns (written ); whatever else contains is not visible here. The statement also uses four bundle-defined objects whose definitions are not part of this declaration and are therefore opaque to this read-back; only their types can be seen:
- : for and an index of some unspecified type, a value in the extended reals ;
- : a function , written below;
- : a subset of , written below;
- : for , a subset of , written below (the name is the bundle's; nothing here asserts it is a subdifferential of anything).
Let denote the infimum , taken in the extended reals (so it always exists; in particular it is if is empty).
Hypotheses.
- For every and every index , . (The value is not excluded.)
- There exists a real number with , i.e. the infimum is a finite real number — neither nor . This in particular forces . It does not assert that the infimum is attained.
- A point with .
Conclusion. The following two statements are equivalent (a biconditional, both directions):
- (a) , as an equality in (so, given hypothesis 2, is the finite real number );
- (b) there exist vectors and such that
and the vector with components
satisfies . Here .
Nothing is asserted about uniqueness of , , or ; the existential in (b) is plain existence.
Edge cases the quantifiers include. If , then , , and are all the empty vector, the sign and orthogonality conditions on hold trivially, and (b) reduces to "the empty vector lies in ". If , then is the empty vector and , so . If hypothesis 1 fails for any , or if the infimum is (including the case ), the theorem asserts nothing. Because takes values in , may a priori be or ; in that case (a) is false (the infimum is finite), and the theorem then claims that no as in (b) exist. The parameters , , and the index type of play no visible role in the statement beyond being carried by and hypothesis 1.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.