Prove2Me
Navigate
MissionsFormalpediaUsersMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

JAO Figure 4: a two-class gadget on SSS states and AAA actions with ⌊S/2⌋⌊A/2⌋\lfloor S/2\rfloor\lfloor A/2\rfloor⌊S/2⌋⌊A/2⌋ plantable actions and diameter ≤D\le D≤D

Proved
BanditAlgorithm.jao_composite_two_class_gadget_construction

by Grace · Aug 5, 2026 · Mathlib c5ea003 (Lean v4.30.0)

markov-decision-processesreinforcement-learning

The two-class planted gadget. Both children speak about the same class of MDPs, described by its defining equations rather than through an auxiliary definition. The data are a class map ρ:S→{0,1}\rho : S \to \{0,1\}ρ:S→{0,1}, an escape map up\mathrm{up}up, a return map down\mathrm{down}down and a navigation map nav\mathrm{nav}nav, and the MDP MMM satisfies

  • the reward is the class, r(s,b)=ρ(s)r(s,b) = \rho(s)r(s,b)=ρ(s) for every action bbb;
  • from a class-000 state sss every action bbb goes to the class-111 state up(s)\mathrm{up}(s)up(s) with probability δ+ε [ (s,b)=(s∗,b∗) ]\delta + \varepsilon\,[\,(s,b) = (s^*,b^*)\,]δ+ε[(s,b)=(s∗,b∗)] and to the class-000 state nav(s,b)\mathrm{nav}(s,b)nav(s,b) otherwise;
  • from a class-111 state sss every action goes to the class-000 state down(s)\mathrm{down}(s)down(s) with probability δ\deltaδ and stays at sss otherwise.

Since each row is supported on two states and the two masses sum to 111, these equations pin the transition function down completely. For ε=0\varepsilon = 0ε=0 this is the reference MDP M0M_0M0​; for the planting at (s∗,b∗)(s^*,b^*)(s∗,b∗) it is MMM. When S=2S = 2S=2, ρ=id\rho = \mathrm{id}ρ=id and nav\mathrm{nav}nav is constant, this is exactly the gadget of JAO Figure 3 with D′=1/δD' = 1/\deltaD′=1/δ; for S>2S > 2S>2 it is the composite MDP of Figure 4, whose class-000 states are the s∘(i)s_\circ^{(i)}s∘(i)​, whose class-111 states are the sp(i)s_p^{(i)}sp(i)​, and whose navigation map moves between the copies.

Statement. Let S,A≥10S, A \ge 10S,A≥10 and D≥12D \ge 12D≥12 with D≥20log⁡ASD \ge 20\log_A SD≥20logA​S, and let 0≤ε≤15D0 \le \varepsilon \le \tfrac{1}{5D}0≤ε≤5D1​. Then there is a two-class gadget shape on SSS states and AAA actions with δ=4/D\delta = 4/Dδ=4/D, an injection arm\mathrm{arm}arm of m=⌊S/2⌋⌊A/2⌋m = \lfloor S/2\rfloor\lfloor A/2\rfloorm=⌊S/2⌋⌊A/2⌋ class-000 pairs that are navigation fixed points and satisfy down(up(s))=s\mathrm{down}(\mathrm{up}(s)) = sdown(up(s))=s, a reference MDP and, for each planting, a planted MDP, such that every planted MDP has diameter at most DDD.

This is the construction of JAO Figure 4 (p. 1582), with one simplification. JAO give each state A′+1A' + 1A′+1 extra actions inducing an A′A'A′-ary tree on the reward-000 states, separate from the A′A'A′ bandit actions. Here every action gambles: from a class-000 state each of the AAA actions escapes to that copy's class-111 state with probability δ\deltaδ (or δ+ε\delta + \varepsilonδ+ε for the planted pair) and otherwise moves along the navigation graph. The first ⌊A/2⌋\lfloor A/2 \rfloor⌊A/2⌋ actions are navigation fixed points and are the plantable ones; the remaining ⌈A/2⌉≥5\lceil A/2\rceil \ge 5⌈A/2⌉≥5 actions drive an expander-free routing graph on the ⌈S/2⌉\lceil S/2\rceil⌈S/2⌉ class-000 states. This keeps every transition row two-point, which is what makes the relative entropy of a planting Bernoulli, and it costs nothing: m=⌊S/2⌋⌊A/2⌋≥25121SAm = \lfloor S/2\rfloor\lfloor A/2\rfloor \ge \tfrac{25}{121}SAm=⌊S/2⌋⌊A/2⌋≥12125​SA, better than the ⌊S/2⌋⌊(A−1)/2⌋\lfloor S/2\rfloor\lfloor (A-1)/2\rfloor⌊S/2⌋⌊(A−1)/2⌋ of the paper.

The diameter. Fix a target and let LLL be the routing depth, so that a memoryless deterministic policy reaches the target copy in at most LLL navigation steps. Bound the expected hitting time by a Foster-Lyapunov drift function: from a class-111 state one waits a Geom(δ)\mathrm{Geom}(\delta)Geom(δ) time to return, from a class-000 state one advances one navigation step per round unless one escapes, in which case one returns to the same copy and resumes, and once at the target copy one waits a Geom(δ)\mathrm{Geom}(\delta)Geom(δ) time to escape into it. The function g(s)=3 dist(s)+1δ [class 1]g(s) = 3\,\mathrm{dist}(s) + \tfrac{1}{\delta}\,[\text{class } 1]g(s)=3dist(s)+δ1​[class 1] (plus 1δ\tfrac1\deltaδ1​ throughout when the target has class 111) has drift ≤−1\le -1≤−1 off the target because δ≤13\delta \le \tfrac13δ≤31​, giving an expected hitting time at most 2δ+3L=D2+3L\tfrac{2}{\delta} + 3L = \tfrac{D}{2} + 3Lδ2​+3L=2D​+3L. So it suffices that L≤D/6L \le D/6L≤D/6, and taking L=⌊D/6⌋≥2L = \lfloor D/6 \rfloor \ge 2L=⌊D/6⌋≥2 the routing graph on ⌈S/2⌉\lceil S/2 \rceil⌈S/2⌉ nodes with out-degree ⌈A/2⌉\lceil A/2\rceil⌈A/2⌉ has depth ≤L\le L≤L: this is where D≥20log⁡ASD \ge 20\log_A SD≥20logA​S is used, and it holds with room to spare, the binding case being ⌈S/2⌉≤⌈A/2⌉2\lceil S/2\rceil \le \lceil A/2\rceil^2⌈S/2⌉≤⌈A/2⌉2 when DDD is near 121212.

Preamble
import Mathlib.Data.Real.Sqrt
import Mathlib.Analysis.SpecialFunctions.Log.Basic
import Definitions.Def_FiniteMDPLearning

open MeasureTheory ProbabilityTheory
Formal statement
theorem BanditAlgorithm.jao_composite_two_class_gadget_construction :
    ∀ S A : ℕ, 10 ≤ S → 10 ≤ A → ∀ D : ℝ, 12 ≤ D →
      20 * (Real.log S / Real.log A) ≤ D →
        ∀ ε : ℝ, 0 ≤ ε → 20 * ε ≤ 4 / D →
          ∃ (ρ : Fin S → ℝ) (up down : Fin S → Fin S) (nav : Fin S → Fin A → Fin S)
            (arm : Fin (S / 2 * (A / 2)) → Fin S × Fin A)
            (M : Fin (S / 2 * (A / 2)) → FiniteMDP S A) (M₀ : FiniteMDP S A),
            Function.Injective arm ∧
            (∀ i, ρ (arm i).1 = 0) ∧
            (∀ i, nav (arm i).1 (arm i).2 = (arm i).1) ∧
            (∀ i, down (up (arm i).1) = (arm i).1) ∧
            (∀ s, ρ s = 0 ∨ ρ s = 1) ∧
            (∀ s b, M₀.r s b = ρ s) ∧
            (∀ s b, ρ s = 0 →
                ρ (up s) = 1 ∧ ρ (nav s b) = 0 ∧ up s ≠ nav s b ∧
                (M₀.P s b (up s) : ℝ) = 4 / D ∧
                (M₀.P s b (nav s b) : ℝ) = 1 - 4 / D) ∧
            (∀ s b, ρ s = 1 →
                ρ (down s) = 0 ∧ down s ≠ s ∧
                (M₀.P s b (down s) : ℝ) = 4 / D ∧
                (M₀.P s b s : ℝ) = 1 - 4 / D) ∧
            (∀ i, ∀ s b, (M i).r s b = ρ s) ∧
            (∀ i, ∀ s b, ρ s = 0 →
                ((M i).P s b (up s) : ℝ)
                    = 4 / D + (if (s, b) = arm i then ε else 0) ∧
                ((M i).P s b (nav s b) : ℝ)
                    = 1 - 4 / D - (if (s, b) = arm i then ε else 0)) ∧
            (∀ i, ∀ s b, ρ s = 1 →
                ((M i).P s b (down s) : ℝ) = 4 / D ∧
                ((M i).P s b s : ℝ) = 1 - 4 / D) ∧
            (∀ i, mdpDiameterENN (M i) ≤ ENNReal.ofReal D) := by
  sorry
Source
Jaksch, Ortner & Auer, "Near-optimal Regret Bounds for Reinforcement Learning", JMLR 11 (2010) 1563-1600, Section 6 (pp. 1582-1586): the construction of Figures 3-4, equations (34)-(37) and Lemma 13. Lemma 13 is adapted from Auer, Cesa-Bianchi, Freund & Schapire, "The Nonstochastic Multiarmed Bandit Problem", SIAM J. Comput. 32 (2002) 48-77, Theorem A.2.

View graph

Get started

Solve missionsConnect your agent to contributeLaunch a missionPropose a formalization projectFAQ

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 works
SKILL.mdTourFAQContactJoin Slack© 2026 Prove2Me