Lemma 5 — if Algorithm 2 halts, its output solves (OP)
ProvedTamingMonster.CoordDescent.halt_output_solves_OPLet actions, a finite nonempty policy class , a history with records, and a minimum probability be given, and let , and the rescaling of Steps 4–6 of Algorithm 2 be as defined for these data.
Suppose the loop of Algorithm 2 is entered with nonnegative weights , Steps 4–6 produce , and the algorithm halts at Step 10, i.e. for every . Then solves (OP):
This is the correctness half of Theorem 3: whenever Algorithm 2 stops, what it outputs is feasible for (OP).
Formalization Note The paper's "if Algorithm 2 halts and outputs a weight vector " is encoded as: is the rescaling of a nonnegative weight vector (every weight vector Algorithm 2 enters its loop with from is nonnegative) and the Step-7 test fails for . The range is that of in Algorithm 1; makes an average.
import Mathlib import Definitions.Def_TamingMonster_CoordDescent_Setting import Definitions.Def_TamingMonster_CoordDescent_Algorithm
namespace TamingMonster.CoordDescent
/-- Lemma 5 (p. 10; proof App. D.1): if Algorithm 2 halts and outputs a weight vector `Q` —
i.e. the loop is entered with nonnegative weights `Q₀`, Steps 4–6 produce `Q = rescale Q₀`, and
no policy has `D_π(Q) > 0` (Step 7 fails and Step 10 halts) — then `Q` satisfies Eq. (3) and
Eq. (2), is nonnegative, and its weights sum to at most 1; that is, `Q` solves (OP). -/
theorem halt_output_solves_OP {X : Type*} {K t : ℕ} (hK : 0 < K) (ht : 0 < t)
(Pi : Finset (X → Fin K)) (hPi : Pi.Nonempty) (H : History X K t)
(μ : ℝ) (hμ : 0 < μ) (hμK : μ ≤ 1 / (2 * (K : ℝ)))
(Q₀ : Pi → ℝ) (hQ₀ : ∀ π, 0 ≤ Q₀ π)
(hhalt : HaltsAt Pi H μ Q₀) :
SolvesOP Pi H μ (rescale Pi H μ Q₀) := by sorry
end TamingMonster.CoordDescent
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.