Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Explicit Cunningham lower-bound constructions

Definition
friedmann_cunningham

by kmehltretter82 · Nov 2, 2026 · Mathlib 0df444a (Lean v4.33.1)

algorithm-analysisoliver-friedmanntheoretical-computer-science

Explicit graph-derived Avis–Friedmann family: source-specific cyclic column ordering, prescribed exceptional initial action, collapsed absorbing MDP, exact parity graph with repeated-priority semantics, policy-to-basis map, and actual polytope realizability/AUSO/cube-walk predicates.

Definition code
import Definitions.Def_friedmann_simplex
import Definitions.Def_friedmann_multiplicity
import Lean.Elab.Tactic.Omega

set_option autoImplicit false

/-! Linear programs derived from Avis–Friedmann's Figure 7 via §4.2. Column numbers are
the cyclic ordering (1), rather than an arbitrary enumeration. Parameters n<3
are given total definitions but are excluded from every paper-level target.
The reward contribution of the aliases b₁=c₁=g₁ is retained explicitly; see
notes/cunningham-source-crosswalk.txt for the discrepancy with displayed §4.4.
-/
namespace FriedmannCunningham

open FriedmannSimplex
open scoped BigOperators
open Matrix

inductive Kind where
  | a | b | c | d | e
  deriving DecidableEq

structure Name where
  kind : Kind
  level : ℕ
  one : Bool
  deriving DecidableEq

def rows (n : ℕ) : ℕ := 5 * (n - 1)
def cols (n : ℕ) : ℕ := 10 * (n - 1)

def rowName (n : ℕ) (r : Fin (rows n)) : Kind × ℕ :=
  if r.val < n - 1 then (.a, r.val + 2)
  else if r.val < (n - 1) + (n - 2) then (.b, r.val - (n - 1) + 2)
  else if r.val < 2 * (n - 1) + (n - 2) then
    (.c, r.val - ((n - 1) + (n - 2)) + 2)
  else if r.val < 3 * (n - 1) + (n - 2) then
    (.d, r.val - (2 * (n - 1) + (n - 2)) + 2)
  else (.e, r.val - (3 * (n - 1) + (n - 2)) + 1)

def columnName (n : ℕ) (j : Fin (cols n)) : Name :=
  let k := j.val
  if k = 0 then ⟨.e, 1, true⟩
  else if k < 4 * n - 5 then
    let i := (k - 1) / 4 + 2
    match (k - 1) % 4 with
    | 0 => ⟨.d, i, false⟩
    | 1 => ⟨.e, i, true⟩
    | 2 => ⟨.b, i, true⟩
    | _ => ⟨.b, i, false⟩
  else if k < 6 * n - 7 then
    ⟨.c, (k - (4 * n - 5)) / 2 + 2, decide ((k - (4 * n - 5)) % 2 = 1)⟩
  else if k < 7 * n - 7 then ⟨.e, k - (6 * n - 7) + 1, false⟩
  else if k < 8 * n - 8 then ⟨.d, k - (7 * n - 7) + 2, true⟩
  else ⟨.a, n - (k - (8 * n - 8)) / 2, decide ((k - (8 * n - 8)) % 2 = 0)⟩

def columnRank (n : ℕ) (v : Name) : ℕ :=
  match v.kind, v.one with
  | .e, true => if v.level = 1 then 0 else 4 * (v.level - 2) + 2
  | .d, false => 4 * (v.level - 2) + 1
  | .b, true => 4 * (v.level - 2) + 3
  | .b, false => 4 * (v.level - 2) + 4
  | .c, false => 4 * n - 5 + 2 * (v.level - 2)
  | .c, true => 4 * n - 5 + 2 * (v.level - 2) + 1
  | .e, false => 6 * n - 7 + (v.level - 1)
  | .d, true => 7 * n - 7 + (v.level - 2)
  | .a, true => 8 * n - 8 + 2 * (n - v.level)
  | .a, false => 8 * n - 8 + 2 * (n - v.level) + 1

def indicator (v : Name) (kind : Kind) (i : ℕ) (one : Bool) : ℚ :=
  if v = ⟨kind, i, one⟩ then 1 else 0

def scale (n : ℕ) : ℚ := 2 * n + 1
def epsilon (n : ℕ) : ℚ := 1 / scale n ^ (2 * n + 2)
def rewardG (n i : ℕ) : ℚ := (-scale n) ^ (2 * i - 1)
def rewardH (n i : ℕ) : ℚ := (-scale n) ^ (2 * i)

/-- Coefficient of a named action in the displayed conservation equation. -/
def coefficient (n : ℕ) (r : Kind × ℕ) (v : Name) : ℚ :=
  let i := r.2
  let x := fun k l b => indicator v k l b
  let own := x r.1 i false + x r.1 i true
  let active := x .a i true + x .b i true + x .c i true +
    x .d i true + x .e i true
  match r.1 with
  | .a =>
      if i = 2 then own - epsilon n *
        (x .b 2 false + x .c 2 false + x .d 2 false + x .e 1 true)
      else own - x .a (i - 1) false - epsilon n *
        (x .a (i - 1) true + x .b (i - 1) true + x .c (i - 1) true +
          x .d (i - 1) true + x .e (i - 1) true)
  | .b => own - x .b (i + 1) false - x .d (i + 1) false
  | .c =>
      if i = n then own - ∑ j ∈ Finset.range (n + 1), x .e j false
      else own - x .c (i + 1) false
  | .d => own - (1 - epsilon n) / 2 * active
  | .e =>
      if i = 1 then own - (1 - epsilon n) *
        (x .b 2 false + x .c 2 false + x .d 2 false + x .e 1 true)
      else own - (1 - epsilon n) / 2 * active

def objectiveCoefficient (n : ℕ) (v : Name) : ℚ :=
  (match v.kind, v.one with
  | .a, true | .b, true | .c, true => rewardG n v.level + epsilon n * rewardH n v.level
  | .d, true | .e, true => epsilon n * rewardH n v.level
  | .e, false => 1
  | _, _ => 0) +
    (rewardG n 1 + epsilon n * rewardH n 1) *
      (indicator v .b 2 false + indicator v .c 2 false + indicator v .d 2 false)

def program (n : ℕ) : LP (rows n) (cols n) where
  A r j := coefficient n (rowName n r) (columnName n j)
  b _ := 1
  c j := objectiveCoefficient n (columnName n j)

def initialBit (r : Kind × ℕ) : Bool :=
  r.1 == .d || (r.1 == .e && r.2 == 1)

def initialBasis (n : ℕ) (hn : 3 ≤ n) : Basis (rows n) (cols n) :=
  fun r =>
    let name := rowName n r
    ⟨columnRank n ⟨name.1, name.2, initialBit name⟩ % cols n, by
      apply Nat.mod_lt
      unfold cols
      omega⟩

def initialState (n : ℕ) (hn : 3 ≤ n) : State (rows n) (cols n) where
  basis := initialBasis n hn
  last := ⟨0, by unfold cols; omega⟩

/-- The order is identity because column numbers already follow (1). -/
def order (n : ℕ) : Fin (cols n) ≃ Fin (cols n) := Equiv.refl _

def rowRank (n : ℕ) (r : Kind × ℕ) : ℕ :=
  match r.1 with
  | .a => r.2 - 2
  | .b => (n - 1) + (r.2 - 2)
  | .c => (n - 1) + (n - 2) + (r.2 - 2)
  | .d => 2 * (n - 1) + (n - 2) + (r.2 - 2)
  | .e => 3 * (n - 1) + (n - 2) + (r.2 - 1)

def actionColumn (n : ℕ) (hn : 3 ≤ n) (r : Fin (rows n)) (one : Bool) :
    Fin (cols n) :=
  let name := rowName n r
  ⟨columnRank n ⟨name.1, name.2, one⟩ % cols n, by
    apply Nat.mod_lt
    unfold cols
    omega⟩

abbrev Policy (n : ℕ) := Fin (rows n) → Bool

def policyBasis (n : ℕ) (hn : 3 ≤ n) (σ : Policy n) : Basis (rows n) (cols n) :=
  fun r => actionColumn n hn r (σ r)

def initialPolicy (n : ℕ) : Policy n := fun r => initialBit (rowName n r)

/-- Transition probabilities between decision vertices after eliminating the
intermediate random vertices. The missing mass goes to the absorbing sink. -/
def transition (n : ℕ) (hn : 3 ≤ n) (r : Fin (rows n)) (one : Bool)
    (q : Fin (rows n)) : ℚ :=
  (if q = r then 1 else 0) - (program n).A q (actionColumn n hn r one)

def actionReward (n : ℕ) (hn : 3 ≤ n) (r : Fin (rows n)) (one : Bool) : ℚ :=
  (program n).c (actionColumn n hn r one)

noncomputable def policyValue (n : ℕ) (hn : 3 ≤ n) (σ : Policy n) :
    Fin (rows n) → ℚ :=
  (basisMatrix (program n) (policyBasis n hn σ))ᵀ⁻¹ *ᵥ
    (fun r => actionReward n hn r (σ r))

noncomputable def mdpImproving (n : ℕ) (hn : 3 ≤ n) (σ : Policy n)
    (r : Fin (rows n)) : Prop :=
  policyValue n hn σ r < actionReward n hn r (!σ r) +
    ∑ q : Fin (rows n), transition n hn r (!σ r) q * policyValue n hn σ q

structure MDPState (n : ℕ) where
  policy : Policy n
  last : Fin (cols n)

noncomputable def mdpStep (n : ℕ) (hn : 3 ≤ n) (s s' : MDPState n) : Prop :=
  ∃ r, mdpImproving n hn s.policy r ∧
    (∀ q, mdpImproving n hn s.policy q →
      cyclicDistance (order n) s.last (actionColumn n hn r (!s.policy r)) ≤
        cyclicDistance (order n) s.last (actionColumn n hn q (!s.policy q))) ∧
    s'.policy = Function.update s.policy r (!s.policy r) ∧
    s'.last = actionColumn n hn r (!s.policy r)

def initialMDPState (n : ℕ) (hn : 3 ≤ n) : MDPState n where
  policy := initialPolicy n
  last := ⟨0, by unfold cols; omega⟩

noncomputable def mdpRun (n : ℕ) (hn : 3 ≤ n) (s : ℕ → MDPState n) (T : ℕ) : Prop :=
  s 0 = initialMDPState n hn ∧
    (∀ t, t < T → mdpStep n hn (s t) (s (t + 1))) ∧
    ∀ r, ¬mdpImproving n hn (s T).policy r

def cubeAdjacent (n : ℕ) (σ τ : Policy n) : Prop :=
  ∃ r, σ r ≠ τ r ∧ ∀ q, q ≠ r → σ q = τ q

def inCubeFace (n : ℕ) (face : Fin (rows n) → Option Bool) (σ : Policy n) : Prop :=
  ∀ r b, face r = some b → σ r = b

noncomputable def cubeOrientation (n : ℕ) (hn : 3 ≤ n)
    (c : Fin (cols n) → ℚ) (σ τ : Policy n) : Prop :=
  cubeAdjacent n σ τ ∧
    objective { program n with c := c } (basicPoint (program n) (policyBasis n hn σ)) <
      objective { program n with c := c } (basicPoint (program n) (policyBasis n hn τ))

noncomputable def isAUSO (n : ℕ) (hn : 3 ≤ n) (c : Fin (cols n) → ℚ) : Prop :=
  (∀ σ τ, cubeAdjacent n σ τ →
    cubeOrientation n hn c σ τ ∨ cubeOrientation n hn c τ σ) ∧
  (∀ σ, ¬Relation.TransGen (cubeOrientation n hn c) σ σ) ∧
  ∀ face, ∃! σ, inCubeFace n face σ ∧
    ∀ τ, inCubeFace n face τ → ¬cubeOrientation n hn c σ τ

def isVertex {m k : ℕ} (P : LP m k) (x : Fin k → ℚ) : Prop :=
  feasible P x ∧ ∀ y z, feasible P y → feasible P z →
    (∀ j, x j = (y j + z j) / 2) → y = x ∧ z = x

def polytopeAdjacent {m k : ℕ} (P : LP m k) (x y : Fin k → ℚ) : Prop :=
  x ≠ y ∧ isVertex P x ∧ isVertex P y ∧
    ∀ z, feasible P z →
      (∀ j, x j = 0 → y j = 0 → z j = 0) →
      ∃ t : ℚ, 0 ≤ t ∧ t ≤ 1 ∧ ∀ j, z j = (1 - t) * x j + t * y j

/-- Realization uses actual extreme points and one-dimensional faces of the
feasible rational polytope, rather than a graph postulated as an extra field. -/
noncomputable def realizesCube (n : ℕ) (hn : 3 ≤ n) : Prop :=
  bounded (program n) ∧
  (∀ σ, isVertex (program n) (basicPoint (program n) (policyBasis n hn σ))) ∧
  (∀ x, isVertex (program n) x →
    ∃! σ, basicPoint (program n) (policyBasis n hn σ) = x) ∧
  ∀ σ τ, cubeAdjacent n σ τ ↔
    polytopeAdjacent (program n) (basicPoint (program n) (policyBasis n hn σ))
      (basicPoint (program n) (policyBasis n hn τ))

noncomputable def cubeStep (n : ℕ) (hn : 3 ≤ n) (c : Fin (cols n) → ℚ)
    (s s' : MDPState n) : Prop :=
  ∃ r, cubeOrientation n hn c s.policy (Function.update s.policy r (!s.policy r)) ∧
    (∀ q, cubeOrientation n hn c s.policy (Function.update s.policy q (!s.policy q)) →
      cyclicDistance (order n) s.last (actionColumn n hn r (!s.policy r)) ≤
        cyclicDistance (order n) s.last (actionColumn n hn q (!s.policy q))) ∧
    s'.policy = Function.update s.policy r (!s.policy r) ∧
    s'.last = actionColumn n hn r (!s.policy r)

noncomputable def cubeRun (n : ℕ) (hn : 3 ≤ n) (c : Fin (cols n) → ℚ)
    (s : ℕ → MDPState n) (T : ℕ) : Prop :=
  s 0 = initialMDPState n hn ∧
    (∀ t, t < T → cubeStep n hn c (s t) (s (t + 1))) ∧
    ∀ τ, ¬cubeOrientation n hn c (s T).policy τ

/- The parity-game companion uses the source's repeated priorities. -/

def vertices (n : ℕ) : ℕ := rows n + 3 * n + 2

def vertexCode (n : ℕ) (k : ℕ) : Fin (vertices n) :=
  ⟨k % vertices n, Nat.mod_lt _ (by unfold vertices; omega)⟩

def sinkVertex (n : ℕ) : Fin (vertices n) := vertexCode n (rows n + 3 * n + 1)
def sVertex (n : ℕ) : Fin (vertices n) := vertexCode n (rows n + 3 * n)
def fVertex (n i : ℕ) : Fin (vertices n) := vertexCode n (rows n + (i - 1))
def gVertex (n i : ℕ) : Fin (vertices n) := vertexCode n (rows n + n + (i - 1))
def hVertex (n i : ℕ) : Fin (vertices n) := vertexCode n (rows n + 2 * n + (i - 1))

def decisionVertex (n : ℕ) (k : Kind) (i : ℕ) : Fin (vertices n) :=
  if k = .a ∧ i = n + 1 then sinkVertex n
  else if (k = .b ∨ k = .c) ∧ i = 1 then gVertex n 1
  else vertexCode n (rowRank n (k, i))

def actionSource (n : ℕ) (j : Fin (cols n)) : Fin (vertices n) :=
  let v := columnName n j
  decisionVertex n v.kind v.level

def actionTarget (n : ℕ) (v : Name) : Fin (vertices n) :=
  match v.kind, v.one with
  | .a, true | .b, true | .c, true => gVertex n v.level
  | .a, false => decisionVertex n .a (v.level + 1)
  | .b, false | .d, false => decisionVertex n .b (v.level - 1)
  | .c, false => decisionVertex n .c (v.level - 1)
  | .d, true | .e, true => fVertex n v.level
  | .e, false => sVertex n

def gameSuccessors (n : ℕ) (v : Fin (vertices n)) : Finset (Fin (vertices n)) :=
  if hv : v.val < rows n then
    let r := rowName n ⟨v.val, hv⟩
    {actionTarget n ⟨r.1, r.2, false⟩, actionTarget n ⟨r.1, r.2, true⟩}
  else if v.val < rows n + n then
    let i := v.val - rows n + 1
    if i = 1 then {hVertex n i, decisionVertex n .e i}
    else {hVertex n i, decisionVertex n .d i, decisionVertex n .e i}
  else if v.val < rows n + 2 * n then
    {fVertex n (v.val - (rows n + n) + 1)}
  else if v.val < rows n + 3 * n then
    {decisionVertex n .a (v.val - (rows n + 2 * n) + 2)}
  else if v = sVertex n then {decisionVertex n .c n}
  else {sinkVertex n}

def gamePriority (n : ℕ) (v : Fin (vertices n)) : ℕ :=
  if hv : v.val < rows n then
    match (rowName n ⟨v.val, hv⟩).1 with
    | .a | .b | .c => 3
    | .d | .e => 5
  else if v.val < rows n + n then 6
  else if v.val < rows n + 2 * n then 2 * (v.val - (rows n + n) + 1) + 7
  else if v.val < rows n + 3 * n then 2 * (v.val - (rows n + 2 * n) + 1) + 8
  else if v = sVertex n then 8
  else 1

def parityGame (n : ℕ) : FriedmannParity.Game (Fin (vertices n)) where
  owner v := decide (rows n ≤ v.val)
  priority := gamePriority n
  edge v w := w ∈ gameSuccessors n v

def initialStrategy (n : ℕ) : Fin (vertices n) → Fin (vertices n) := fun v =>
  if hv : v.val < rows n then
    let r := rowName n ⟨v.val, hv⟩
    actionTarget n ⟨r.1, r.2, initialBit r⟩
  else v

structure ParityState (n : ℕ) where
  strategy : Fin (vertices n) → Fin (vertices n)
  last : Fin (cols n)

def initialParityState (n : ℕ) (hn : 3 ≤ n) : ParityState n where
  strategy := initialStrategy n
  last := ⟨0, by unfold cols; omega⟩

def parityStep (n : ℕ) (s s' : ParityState n) : Prop :=
  ∃ j : Fin (cols n),
    FriedmannMultiplicity.Improving (parityGame n) s.strategy
      (actionSource n j) (actionTarget n (columnName n j)) ∧
    (∀ k : Fin (cols n),
      FriedmannMultiplicity.Improving (parityGame n) s.strategy
        (actionSource n k) (actionTarget n (columnName n k)) →
      cyclicDistance (order n) s.last j ≤ cyclicDistance (order n) s.last k) ∧
    s'.strategy = Function.update s.strategy (actionSource n j)
      (actionTarget n (columnName n j)) ∧ s'.last = j

def parityRun (n : ℕ) (hn : 3 ≤ n) (s : ℕ → ParityState n) (T : ℕ) : Prop :=
  s 0 = initialParityState n hn ∧
    (∀ t, t ≤ T → FriedmannParity.Legal (parityGame n) false (s t).strategy) ∧
    (∀ t, t < T → parityStep n (s t) (s (t + 1))) ∧
    ¬FriedmannMultiplicity.Improvable (parityGame n) (s T).strategy

end FriedmannCunningham
Source
Avis and Friedmann, Mathematical Programming2017, §§2–4; https://arxiv.org/abs/1305.3944
Read-back

What the Lean code literally says, in plain math · Codex independent auditor (model identifier unavailable)

Kind. All indices and parameters described as natural numbers include zero. In the formulas below, a⊖b=max⁡(a−b,0)a\ominus b=\max(a-b,0)a⊖b=max(a−b,0) denotes subtraction in the natural numbers, ⌊a/b⌋\lfloor a/b\rfloor⌊a/b⌋ denotes natural-number division, and a mod ba\bmod bamodb denotes natural-number remainder. Boolean values are written 000 for false and 111 for true, and bˉ\bar bbˉ denotes their negation. A finite index set of size zero is empty. A rational matrix inverse is the total matrix inverse, which is the zero matrix when its determinant is zero; no nonzero-determinant condition is implicit in the notation. The type KKK consists of exactly five distinct constructors, denoted a,b,c,d,ea,b,c,d,ea,b,c,d,e, with decidable equality.

Name. All indices and parameters described as natural numbers include zero. In the formulas below, a⊖b=max⁡(a−b,0)a\ominus b=\max(a-b,0)a⊖b=max(a−b,0) denotes subtraction in the natural numbers, ⌊a/b⌋\lfloor a/b\rfloor⌊a/b⌋ denotes natural-number division, and a mod ba\bmod bamodb denotes natural-number remainder. Boolean values are written 000 for false and 111 for true, and bˉ\bar bbˉ denotes their negation. A finite index set of size zero is empty. A rational matrix inverse is the total matrix inverse, which is the zero matrix when its determinant is zero; no nonzero-determinant condition is implicit in the notation. The type KKK consists of exactly five distinct constructors, denoted a,b,c,d,ea,b,c,d,ea,b,c,d,e, with decidable equality. A name is a triple v=(κ,i,b)v=(\kappa,i,b)v=(κ,i,b) with kind κ∈K\kappa\in Kκ∈K, level i∈Ni\in\mathbb Ni∈N, and Boolean value b∈{0,1}b\in\{0,1\}b∈{0,1}. There are no restrictions on the level or on combinations of fields. Equality of names is decidable.

rows. All indices and parameters described as natural numbers include zero. In the formulas below, a⊖b=max⁡(a−b,0)a\ominus b=\max(a-b,0)a⊖b=max(a−b,0) denotes subtraction in the natural numbers, ⌊a/b⌋\lfloor a/b\rfloor⌊a/b⌋ denotes natural-number division, and a mod ba\bmod bamodb denotes natural-number remainder. Boolean values are written 000 for false and 111 for true, and bˉ\bar bbˉ denotes their negation. A finite index set of size zero is empty. A rational matrix inverse is the total matrix inverse, which is the zero matrix when its determinant is zero; no nonzero-determinant condition is implicit in the notation. For every n∈Nn\in\mathbb Nn∈N, the number of rows is mn=5(n⊖1)m_n=5(n\ominus1)mn​=5(n⊖1); write In={0,…,mn−1}I_n=\{0,\ldots,m_n-1\}In​={0,…,mn​−1} for its finite index set. Thus m0=m1=0m_0=m_1=0m0​=m1​=0.

cols. All indices and parameters described as natural numbers include zero. In the formulas below, a⊖b=max⁡(a−b,0)a\ominus b=\max(a-b,0)a⊖b=max(a−b,0) denotes subtraction in the natural numbers, ⌊a/b⌋\lfloor a/b\rfloor⌊a/b⌋ denotes natural-number division, and a mod ba\bmod bamodb denotes natural-number remainder. Boolean values are written 000 for false and 111 for true, and bˉ\bar bbˉ denotes their negation. A finite index set of size zero is empty. A rational matrix inverse is the total matrix inverse, which is the zero matrix when its determinant is zero; no nonzero-determinant condition is implicit in the notation. For every n∈Nn\in\mathbb Nn∈N, the number of columns is kn=10(n⊖1)k_n=10(n\ominus1)kn​=10(n⊖1); write Jn={0,…,kn−1}J_n=\{0,\ldots,k_n-1\}Jn​={0,…,kn​−1} for its finite index set. Thus k0=k1=0k_0=k_1=0k0​=k1​=0.

rowName. All indices and parameters described as natural numbers include zero. In the formulas below, a⊖b=max⁡(a−b,0)a\ominus b=\max(a-b,0)a⊖b=max(a−b,0) denotes subtraction in the natural numbers, ⌊a/b⌋\lfloor a/b\rfloor⌊a/b⌋ denotes natural-number division, and a mod ba\bmod bamodb denotes natural-number remainder. Boolean values are written 000 for false and 111 for true, and bˉ\bar bbˉ denotes their negation. A finite index set of size zero is empty. A rational matrix inverse is the total matrix inverse, which is the zero matrix when its determinant is zero; no nonzero-determinant condition is implicit in the notation. The type KKK consists of exactly five distinct constructors, denoted a,b,c,d,ea,b,c,d,ea,b,c,d,e, with decidable equality. For every n∈Nn\in\mathbb Nn∈N, the number of rows is mn=5(n⊖1)m_n=5(n\ominus1)mn​=5(n⊖1); write In={0,…,mn−1}I_n=\{0,\ldots,m_n-1\}In​={0,…,mn​−1} for its finite index set. Thus m0=m1=0m_0=m_1=0m0​=m1​=0. For every n∈Nn\in\mathbb Nn∈N and row index r∈In={0,…,mn−1}r\in I_n=\{0,\ldots,m_n-1\}r∈In​={0,…,mn​−1}, define its kind and level Rn(r)R_n(r)Rn​(r) by the following ordered cases: if r<n⊖1r<n\ominus1r<n⊖1, it is (a,r+2)(a,r+2)(a,r+2); otherwise, if r<(n⊖1)+(n⊖2)r<(n\ominus1)+(n\ominus2)r<(n⊖1)+(n⊖2), it is (b,r⊖(n⊖1)+2)(b,r\ominus(n\ominus1)+2)(b,r⊖(n⊖1)+2); otherwise, if r<2(n⊖1)+(n⊖2)r<2(n\ominus1)+(n\ominus2)r<2(n⊖1)+(n⊖2), it is (c,r⊖((n⊖1)+(n⊖2))+2)(c,r\ominus((n\ominus1)+(n\ominus2))+2)(c,r⊖((n⊖1)+(n⊖2))+2); otherwise, if r<3(n⊖1)+(n⊖2)r<3(n\ominus1)+(n\ominus2)r<3(n⊖1)+(n⊖2), it is (d,r⊖(2(n⊖1)+(n⊖2))+2)(d,r\ominus(2(n\ominus1)+(n\ominus2))+2)(d,r⊖(2(n⊖1)+(n⊖2))+2); otherwise it is (e,r⊖(3(n⊖1)+(n⊖2))+1)(e,r\ominus(3(n\ominus1)+(n\ominus2))+1)(e,r⊖(3(n⊖1)+(n⊖2))+1). There are no row indices when n=0n=0n=0 or n=1n=1n=1.

columnName. All indices and parameters described as natural numbers include zero. In the formulas below, a⊖b=max⁡(a−b,0)a\ominus b=\max(a-b,0)a⊖b=max(a−b,0) denotes subtraction in the natural numbers, ⌊a/b⌋\lfloor a/b\rfloor⌊a/b⌋ denotes natural-number division, and a mod ba\bmod bamodb denotes natural-number remainder. Boolean values are written 000 for false and 111 for true, and bˉ\bar bbˉ denotes their negation. A finite index set of size zero is empty. A rational matrix inverse is the total matrix inverse, which is the zero matrix when its determinant is zero; no nonzero-determinant condition is implicit in the notation. The type KKK consists of exactly five distinct constructors, denoted a,b,c,d,ea,b,c,d,ea,b,c,d,e, with decidable equality. A name is a triple v=(κ,i,b)v=(\kappa,i,b)v=(κ,i,b) with kind κ∈K\kappa\in Kκ∈K, level i∈Ni\in\mathbb Ni∈N, and Boolean value b∈{0,1}b\in\{0,1\}b∈{0,1}. There are no restrictions on the level or on combinations of fields. Equality of names is decidable. For every n∈Nn\in\mathbb Nn∈N, the number of columns is kn=10(n⊖1)k_n=10(n\ominus1)kn​=10(n⊖1); write Jn={0,…,kn−1}J_n=\{0,\ldots,k_n-1\}Jn​={0,…,kn​−1} for its finite index set. Thus k0=k1=0k_0=k_1=0k0​=k1​=0. For every n∈Nn\in\mathbb Nn∈N and column index j∈Jn={0,…,kn−1}j\in J_n=\{0,\ldots,k_n-1\}j∈Jn​={0,…,kn​−1}, define the name Nn(j)N_n(j)Nn​(j) by the following ordered cases. If j=0j=0j=0, use (e,1,1)(e,1,1)(e,1,1). Otherwise, if j<4n⊖5j<4n\ominus5j<4n⊖5, put i=⌊(j⊖1)/4⌋+2i=\lfloor(j\ominus1)/4\rfloor+2i=⌊(j⊖1)/4⌋+2 and use respectively (d,i,0)(d,i,0)(d,i,0), (e,i,1)(e,i,1)(e,i,1), (b,i,1)(b,i,1)(b,i,1), or (b,i,0)(b,i,0)(b,i,0) according as (j⊖1) mod 4(j\ominus1)\bmod4(j⊖1)mod4 is 000, 111, 222, or anything else. Otherwise, if j<6n⊖7j<6n\ominus7j<6n⊖7, put u=j⊖(4n⊖5)u=j\ominus(4n\ominus5)u=j⊖(4n⊖5) and use (c,⌊u/2⌋+2,b)(c,\lfloor u/2\rfloor+2,b)(c,⌊u/2⌋+2,b), where b=1b=1b=1 exactly when u mod 2=1u\bmod2=1umod2=1. Otherwise, if j<7n⊖7j<7n\ominus7j<7n⊖7, use (e,j⊖(6n⊖7)+1,0)(e,j\ominus(6n\ominus7)+1,0)(e,j⊖(6n⊖7)+1,0). Otherwise, if j<8n⊖8j<8n\ominus8j<8n⊖8, use (d,j⊖(7n⊖7)+2,1)(d,j\ominus(7n\ominus7)+2,1)(d,j⊖(7n⊖7)+2,1). In the last case put u=j⊖(8n⊖8)u=j\ominus(8n\ominus8)u=j⊖(8n⊖8) and use (a,n⊖⌊u/2⌋,b)(a,n\ominus\lfloor u/2\rfloor,b)(a,n⊖⌊u/2⌋,b), where b=1b=1b=1 exactly when u mod 2=0u\bmod2=0umod2=0. There are no column indices when n=0n=0n=0 or n=1n=1n=1.

columnRank. All indices and parameters described as natural numbers include zero. In the formulas below, a⊖b=max⁡(a−b,0)a\ominus b=\max(a-b,0)a⊖b=max(a−b,0) denotes subtraction in the natural numbers, ⌊a/b⌋\lfloor a/b\rfloor⌊a/b⌋ denotes natural-number division, and a mod ba\bmod bamodb denotes natural-number remainder. Boolean values are written 000 for false and 111 for true, and bˉ\bar bbˉ denotes their negation. A finite index set of size zero is empty. A rational matrix inverse is the total matrix inverse, which is the zero matrix when its determinant is zero; no nonzero-determinant condition is implicit in the notation. The type KKK consists of exactly five distinct constructors, denoted a,b,c,d,ea,b,c,d,ea,b,c,d,e, with decidable equality. A name is a triple v=(κ,i,b)v=(\kappa,i,b)v=(κ,i,b) with kind κ∈K\kappa\in Kκ∈K, level i∈Ni\in\mathbb Ni∈N, and Boolean value b∈{0,1}b\in\{0,1\}b∈{0,1}. There are no restrictions on the level or on combinations of fields. Equality of names is decidable. For every n∈Nn\in\mathbb Nn∈N, the number of columns is kn=10(n⊖1)k_n=10(n\ominus1)kn​=10(n⊖1); write Jn={0,…,kn−1}J_n=\{0,\ldots,k_n-1\}Jn​={0,…,kn​−1} for its finite index set. Thus k0=k1=0k_0=k_1=0k0​=k1​=0. For every n∈Nn\in\mathbb Nn∈N and every name (κ,i,b)(\kappa,i,b)(κ,i,b), define its natural-number rank Cn(κ,i,b)C_n(\kappa,i,b)Cn​(κ,i,b) as follows: Cn(e,i,1)=0C_n(e,i,1)=0Cn​(e,i,1)=0 if i=1i=1i=1, and Cn(e,i,1)=4(i⊖2)+2C_n(e,i,1)=4(i\ominus2)+2Cn​(e,i,1)=4(i⊖2)+2 otherwise; Cn(d,i,0)=4(i⊖2)+1C_n(d,i,0)=4(i\ominus2)+1Cn​(d,i,0)=4(i⊖2)+1; Cn(b,i,1)=4(i⊖2)+3C_n(b,i,1)=4(i\ominus2)+3Cn​(b,i,1)=4(i⊖2)+3; Cn(b,i,0)=4(i⊖2)+4C_n(b,i,0)=4(i\ominus2)+4Cn​(b,i,0)=4(i⊖2)+4; Cn(c,i,0)=(4n⊖5)+2(i⊖2)C_n(c,i,0)=(4n\ominus5)+2(i\ominus2)Cn​(c,i,0)=(4n⊖5)+2(i⊖2); Cn(c,i,1)=(4n⊖5)+2(i⊖2)+1C_n(c,i,1)=(4n\ominus5)+2(i\ominus2)+1Cn​(c,i,1)=(4n⊖5)+2(i⊖2)+1; Cn(e,i,0)=(6n⊖7)+(i⊖1)C_n(e,i,0)=(6n\ominus7)+(i\ominus1)Cn​(e,i,0)=(6n⊖7)+(i⊖1); Cn(d,i,1)=(7n⊖7)+(i⊖2)C_n(d,i,1)=(7n\ominus7)+(i\ominus2)Cn​(d,i,1)=(7n⊖7)+(i⊖2); Cn(a,i,1)=(8n⊖8)+2(n⊖i)C_n(a,i,1)=(8n\ominus8)+2(n\ominus i)Cn​(a,i,1)=(8n⊖8)+2(n⊖i); and Cn(a,i,0)=(8n⊖8)+2(n⊖i)+1C_n(a,i,0)=(8n\ominus8)+2(n\ominus i)+1Cn​(a,i,0)=(8n⊖8)+2(n⊖i)+1. The function is defined on every name, including levels outside the row or column ranges, and its output is a natural number, without a bound by knk_nkn​.

indicator. All indices and parameters described as natural numbers include zero. In the formulas below, a⊖b=max⁡(a−b,0)a\ominus b=\max(a-b,0)a⊖b=max(a−b,0) denotes subtraction in the natural numbers, ⌊a/b⌋\lfloor a/b\rfloor⌊a/b⌋ denotes natural-number division, and a mod ba\bmod bamodb denotes natural-number remainder. Boolean values are written 000 for false and 111 for true, and bˉ\bar bbˉ denotes their negation. A finite index set of size zero is empty. A rational matrix inverse is the total matrix inverse, which is the zero matrix when its determinant is zero; no nonzero-determinant condition is implicit in the notation. The type KKK consists of exactly five distinct constructors, denoted a,b,c,d,ea,b,c,d,ea,b,c,d,e, with decidable equality. A name is a triple v=(κ,i,b)v=(\kappa,i,b)v=(κ,i,b) with kind κ∈K\kappa\in Kκ∈K, level i∈Ni\in\mathbb Ni∈N, and Boolean value b∈{0,1}b\in\{0,1\}b∈{0,1}. There are no restrictions on the level or on combinations of fields. Equality of names is decidable. For every name vvv, every kind κ∈K\kappa\in Kκ∈K, every level i∈Ni\in\mathbb Ni∈N, and every Boolean bbb, the rational number δv(κ,i,b)\delta_v(\kappa,i,b)δv​(κ,i,b) is 111 if v=(κ,i,b)v=(\kappa,i,b)v=(κ,i,b) and is 000 otherwise.

scale. All indices and parameters described as natural numbers include zero. In the formulas below, a⊖b=max⁡(a−b,0)a\ominus b=\max(a-b,0)a⊖b=max(a−b,0) denotes subtraction in the natural numbers, ⌊a/b⌋\lfloor a/b\rfloor⌊a/b⌋ denotes natural-number division, and a mod ba\bmod bamodb denotes natural-number remainder. Boolean values are written 000 for false and 111 for true, and bˉ\bar bbˉ denotes their negation. A finite index set of size zero is empty. A rational matrix inverse is the total matrix inverse, which is the zero matrix when its determinant is zero; no nonzero-determinant condition is implicit in the notation. For every n∈Nn\in\mathbb Nn∈N, define the rational number Sn=2n+1S_n=2n+1Sn​=2n+1, with nnn regarded as a rational number in this formula. In particular, SnS_nSn​ is never zero.

epsilon. All indices and parameters described as natural numbers include zero. In the formulas below, a⊖b=max⁡(a−b,0)a\ominus b=\max(a-b,0)a⊖b=max(a−b,0) denotes subtraction in the natural numbers, ⌊a/b⌋\lfloor a/b\rfloor⌊a/b⌋ denotes natural-number division, and a mod ba\bmod bamodb denotes natural-number remainder. Boolean values are written 000 for false and 111 for true, and bˉ\bar bbˉ denotes their negation. A finite index set of size zero is empty. A rational matrix inverse is the total matrix inverse, which is the zero matrix when its determinant is zero; no nonzero-determinant condition is implicit in the notation. For every n∈Nn\in\mathbb Nn∈N, define the rational number Sn=2n+1S_n=2n+1Sn​=2n+1, with nnn regarded as a rational number in this formula. In particular, SnS_nSn​ is never zero. For every n∈Nn\in\mathbb Nn∈N, define the rational number εn=1/Sn2n+2\varepsilon_n=1/S_n^{2n+2}εn​=1/Sn2n+2​.

rewardG. All indices and parameters described as natural numbers include zero. In the formulas below, a⊖b=max⁡(a−b,0)a\ominus b=\max(a-b,0)a⊖b=max(a−b,0) denotes subtraction in the natural numbers, ⌊a/b⌋\lfloor a/b\rfloor⌊a/b⌋ denotes natural-number division, and a mod ba\bmod bamodb denotes natural-number remainder. Boolean values are written 000 for false and 111 for true, and bˉ\bar bbˉ denotes their negation. A finite index set of size zero is empty. A rational matrix inverse is the total matrix inverse, which is the zero matrix when its determinant is zero; no nonzero-determinant condition is implicit in the notation. For every n∈Nn\in\mathbb Nn∈N, define the rational number Sn=2n+1S_n=2n+1Sn​=2n+1, with nnn regarded as a rational number in this formula. In particular, SnS_nSn​ is never zero. For every pair n,i∈Nn,i\in\mathbb Nn,i∈N, define the rational reward Gn,i=(−Sn)2i⊖1G_{n,i}=(-S_n)^{2i\ominus1}Gn,i​=(−Sn​)2i⊖1. In particular, Gn,0=1G_{n,0}=1Gn,0​=1 because its exponent is zero.

rewardH. All indices and parameters described as natural numbers include zero. In the formulas below, a⊖b=max⁡(a−b,0)a\ominus b=\max(a-b,0)a⊖b=max(a−b,0) denotes subtraction in the natural numbers, ⌊a/b⌋\lfloor a/b\rfloor⌊a/b⌋ denotes natural-number division, and a mod ba\bmod bamodb denotes natural-number remainder. Boolean values are written 000 for false and 111 for true, and bˉ\bar bbˉ denotes their negation. A finite index set of size zero is empty. A rational matrix inverse is the total matrix inverse, which is the zero matrix when its determinant is zero; no nonzero-determinant condition is implicit in the notation. For every n∈Nn\in\mathbb Nn∈N, define the rational number Sn=2n+1S_n=2n+1Sn​=2n+1, with nnn regarded as a rational number in this formula. In particular, SnS_nSn​ is never zero. For every pair n,i∈Nn,i\in\mathbb Nn,i∈N, define the rational reward Hn,i=(−Sn)2iH_{n,i}=(-S_n)^{2i}Hn,i​=(−Sn​)2i. In particular, Hn,0=1H_{n,0}=1Hn,0​=1.

coefficient. All indices and parameters described as natural numbers include zero. In the formulas below, a⊖b=max⁡(a−b,0)a\ominus b=\max(a-b,0)a⊖b=max(a−b,0) denotes subtraction in the natural numbers, ⌊a/b⌋\lfloor a/b\rfloor⌊a/b⌋ denotes natural-number division, and a mod ba\bmod bamodb denotes natural-number remainder. Boolean values are written 000 for false and 111 for true, and bˉ\bar bbˉ denotes their negation. A finite index set of size zero is empty. A rational matrix inverse is the total matrix inverse, which is the zero matrix when its determinant is zero; no nonzero-determinant condition is implicit in the notation. The type KKK consists of exactly five distinct constructors, denoted a,b,c,d,ea,b,c,d,ea,b,c,d,e, with decidable equality. A name is a triple v=(κ,i,b)v=(\kappa,i,b)v=(κ,i,b) with kind κ∈K\kappa\in Kκ∈K, level i∈Ni\in\mathbb Ni∈N, and Boolean value b∈{0,1}b\in\{0,1\}b∈{0,1}. There are no restrictions on the level or on combinations of fields. Equality of names is decidable. For every name vvv, every kind κ∈K\kappa\in Kκ∈K, every level i∈Ni\in\mathbb Ni∈N, and every Boolean bbb, the rational number δv(κ,i,b)\delta_v(\kappa,i,b)δv​(κ,i,b) is 111 if v=(κ,i,b)v=(\kappa,i,b)v=(κ,i,b) and is 000 otherwise. For every n∈Nn\in\mathbb Nn∈N, define the rational number Sn=2n+1S_n=2n+1Sn​=2n+1, with nnn regarded as a rational number in this formula. In particular, SnS_nSn​ is never zero. For every n∈Nn\in\mathbb Nn∈N, define the rational number εn=1/Sn2n+2\varepsilon_n=1/S_n^{2n+2}εn​=1/Sn2n+2​. For every n∈Nn\in\mathbb Nn∈N, every pair (κ,i)∈K×N(\kappa,i)\in K\times\mathbb N(κ,i)∈K×N, and every name vvv, let xλ,l,b=δv(λ,l,b)x_{\lambda,l,b}=\delta_v(\lambda,l,b)xλ,l,b​=δv​(λ,l,b), o=xκ,i,0+xκ,i,1o=x_{\kappa,i,0}+x_{\kappa,i,1}o=xκ,i,0​+xκ,i,1​, and u=xa,i,1+xb,i,1+xc,i,1+xd,i,1+xe,i,1u=x_{a,i,1}+x_{b,i,1}+x_{c,i,1}+x_{d,i,1}+x_{e,i,1}u=xa,i,1​+xb,i,1​+xc,i,1​+xd,i,1​+xe,i,1​. The rational coefficient Fn((κ,i),v)F_n((\kappa,i),v)Fn​((κ,i),v) is defined by these cases: for κ=a\kappa=aκ=a and i=2i=2i=2, it is o−εn(xb,2,0+xc,2,0+xd,2,0+xe,1,1)o-\varepsilon_n(x_{b,2,0}+x_{c,2,0}+x_{d,2,0}+x_{e,1,1})o−εn​(xb,2,0​+xc,2,0​+xd,2,0​+xe,1,1​); for κ=a\kappa=aκ=a and i≠2i\ne2i=2, it is o−xa,i⊖1,0−εn(xa,i⊖1,1+xb,i⊖1,1+xc,i⊖1,1+xd,i⊖1,1+xe,i⊖1,1)o-x_{a,i\ominus1,0}-\varepsilon_n(x_{a,i\ominus1,1}+x_{b,i\ominus1,1}+x_{c,i\ominus1,1}+x_{d,i\ominus1,1}+x_{e,i\ominus1,1})o−xa,i⊖1,0​−εn​(xa,i⊖1,1​+xb,i⊖1,1​+xc,i⊖1,1​+xd,i⊖1,1​+xe,i⊖1,1​); for κ=b\kappa=bκ=b, it is o−xb,i+1,0−xd,i+1,0o-x_{b,i+1,0}-x_{d,i+1,0}o−xb,i+1,0​−xd,i+1,0​; for κ=c\kappa=cκ=c and i=ni=ni=n, it is o−∑j=0nxe,j,0o-\sum_{j=0}^{n}x_{e,j,0}o−∑j=0n​xe,j,0​, including the term j=0j=0j=0; for κ=c\kappa=cκ=c and i≠ni\ne ni=n, it is o−xc,i+1,0o-x_{c,i+1,0}o−xc,i+1,0​; for κ=d\kappa=dκ=d, it is o−1−εn2uo-\frac{1-\varepsilon_n}{2}uo−21−εn​​u; for κ=e\kappa=eκ=e and i=1i=1i=1, it is o−(1−εn)(xb,2,0+xc,2,0+xd,2,0+xe,1,1)o-(1-\varepsilon_n)(x_{b,2,0}+x_{c,2,0}+x_{d,2,0}+x_{e,1,1})o−(1−εn​)(xb,2,0​+xc,2,0​+xd,2,0​+xe,1,1​); and for κ=e\kappa=eκ=e and i≠1i\ne1i=1, it is o−1−εn2uo-\frac{1-\varepsilon_n}{2}uo−21−εn​​u. The pair and name need not correspond to indices of the program.

objectiveCoefficient. All indices and parameters described as natural numbers include zero. In the formulas below, a⊖b=max⁡(a−b,0)a\ominus b=\max(a-b,0)a⊖b=max(a−b,0) denotes subtraction in the natural numbers, ⌊a/b⌋\lfloor a/b\rfloor⌊a/b⌋ denotes natural-number division, and a mod ba\bmod bamodb denotes natural-number remainder. Boolean values are written 000 for false and 111 for true, and bˉ\bar bbˉ denotes their negation. A finite index set of size zero is empty. A rational matrix inverse is the total matrix inverse, which is the zero matrix when its determinant is zero; no nonzero-determinant condition is implicit in the notation. The type KKK consists of exactly five distinct constructors, denoted a,b,c,d,ea,b,c,d,ea,b,c,d,e, with decidable equality. A name is a triple v=(κ,i,b)v=(\kappa,i,b)v=(κ,i,b) with kind κ∈K\kappa\in Kκ∈K, level i∈Ni\in\mathbb Ni∈N, and Boolean value b∈{0,1}b\in\{0,1\}b∈{0,1}. There are no restrictions on the level or on combinations of fields. Equality of names is decidable. For every name vvv, every kind κ∈K\kappa\in Kκ∈K, every level i∈Ni\in\mathbb Ni∈N, and every Boolean bbb, the rational number δv(κ,i,b)\delta_v(\kappa,i,b)δv​(κ,i,b) is 111 if v=(κ,i,b)v=(\kappa,i,b)v=(κ,i,b) and is 000 otherwise. For every n∈Nn\in\mathbb Nn∈N, define the rational number Sn=2n+1S_n=2n+1Sn​=2n+1, with nnn regarded as a rational number in this formula. In particular, SnS_nSn​ is never zero. For every n∈Nn\in\mathbb Nn∈N, define the rational number εn=1/Sn2n+2\varepsilon_n=1/S_n^{2n+2}εn​=1/Sn2n+2​. For every pair n,i∈Nn,i\in\mathbb Nn,i∈N, define the rational reward Gn,i=(−Sn)2i⊖1G_{n,i}=(-S_n)^{2i\ominus1}Gn,i​=(−Sn​)2i⊖1. In particular, Gn,0=1G_{n,0}=1Gn,0​=1 because its exponent is zero. For every pair n,i∈Nn,i\in\mathbb Nn,i∈N, define the rational reward Hn,i=(−Sn)2iH_{n,i}=(-S_n)^{2i}Hn,i​=(−Sn​)2i. In particular, Hn,0=1H_{n,0}=1Hn,0​=1. For every n∈Nn\in\mathbb Nn∈N and every name v=(κ,i,b)v=(\kappa,i,b)v=(κ,i,b), define its rational objective coefficient Dn(v)D_n(v)Dn​(v) as a base contribution plus (Gn,1+εnHn,1)(δv(b,2,0)+δv(c,2,0)+δv(d,2,0))(G_{n,1}+\varepsilon_nH_{n,1})(\delta_v(b,2,0)+\delta_v(c,2,0)+\delta_v(d,2,0))(Gn,1​+εn​Hn,1​)(δv​(b,2,0)+δv​(c,2,0)+δv​(d,2,0)). The base contribution is Gn,i+εnHn,iG_{n,i}+\varepsilon_nH_{n,i}Gn,i​+εn​Hn,i​ when b=1b=1b=1 and κ∈{a,b,c}\kappa\in\{a,b,c\}κ∈{a,b,c}; it is εnHn,i\varepsilon_nH_{n,i}εn​Hn,i​ when b=1b=1b=1 and κ∈{d,e}\kappa\in\{d,e\}κ∈{d,e}; it is 111 when (κ,b)=(e,0)(\kappa,b)=(e,0)(κ,b)=(e,0); and it is 000 in every remaining case. In the subscripts of δv\delta_vδv​, b,c,db,c,db,c,d denote kinds, whereas the last coordinate of the name is the Boolean bbb. This defines a coefficient even for names outside all valid column ranges.

program. All indices and parameters described as natural numbers include zero. In the formulas below, a⊖b=max⁡(a−b,0)a\ominus b=\max(a-b,0)a⊖b=max(a−b,0) denotes subtraction in the natural numbers, ⌊a/b⌋\lfloor a/b\rfloor⌊a/b⌋ denotes natural-number division, and a mod ba\bmod bamodb denotes natural-number remainder. Boolean values are written 000 for false and 111 for true, and bˉ\bar bbˉ denotes their negation. A finite index set of size zero is empty. A rational matrix inverse is the total matrix inverse, which is the zero matrix when its determinant is zero; no nonzero-determinant condition is implicit in the notation. The type KKK consists of exactly five distinct constructors, denoted a,b,c,d,ea,b,c,d,ea,b,c,d,e, with decidable equality. For every n∈Nn\in\mathbb Nn∈N, the number of rows is mn=5(n⊖1)m_n=5(n\ominus1)mn​=5(n⊖1); write In={0,…,mn−1}I_n=\{0,\ldots,m_n-1\}In​={0,…,mn​−1} for its finite index set. Thus m0=m1=0m_0=m_1=0m0​=m1​=0. For every n∈Nn\in\mathbb Nn∈N and row index r∈In={0,…,mn−1}r\in I_n=\{0,\ldots,m_n-1\}r∈In​={0,…,mn​−1}, define its kind and level Rn(r)R_n(r)Rn​(r) by the following ordered cases: if r<n⊖1r<n\ominus1r<n⊖1, it is (a,r+2)(a,r+2)(a,r+2); otherwise, if r<(n⊖1)+(n⊖2)r<(n\ominus1)+(n\ominus2)r<(n⊖1)+(n⊖2), it is (b,r⊖(n⊖1)+2)(b,r\ominus(n\ominus1)+2)(b,r⊖(n⊖1)+2); otherwise, if r<2(n⊖1)+(n⊖2)r<2(n\ominus1)+(n\ominus2)r<2(n⊖1)+(n⊖2), it is (c,r⊖((n⊖1)+(n⊖2))+2)(c,r\ominus((n\ominus1)+(n\ominus2))+2)(c,r⊖((n⊖1)+(n⊖2))+2); otherwise, if r<3(n⊖1)+(n⊖2)r<3(n\ominus1)+(n\ominus2)r<3(n⊖1)+(n⊖2), it is (d,r⊖(2(n⊖1)+(n⊖2))+2)(d,r\ominus(2(n\ominus1)+(n\ominus2))+2)(d,r⊖(2(n⊖1)+(n⊖2))+2); otherwise it is (e,r⊖(3(n⊖1)+(n⊖2))+1)(e,r\ominus(3(n\ominus1)+(n\ominus2))+1)(e,r⊖(3(n⊖1)+(n⊖2))+1). There are no row indices when n=0n=0n=0 or n=1n=1n=1. A name is a triple v=(κ,i,b)v=(\kappa,i,b)v=(κ,i,b) with kind κ∈K\kappa\in Kκ∈K, level i∈Ni\in\mathbb Ni∈N, and Boolean value b∈{0,1}b\in\{0,1\}b∈{0,1}. There are no restrictions on the level or on combinations of fields. Equality of names is decidable. For every n∈Nn\in\mathbb Nn∈N, the number of columns is kn=10(n⊖1)k_n=10(n\ominus1)kn​=10(n⊖1); write Jn={0,…,kn−1}J_n=\{0,\ldots,k_n-1\}Jn​={0,…,kn​−1} for its finite index set. Thus k0=k1=0k_0=k_1=0k0​=k1​=0. For every n∈Nn\in\mathbb Nn∈N and column index j∈Jn={0,…,kn−1}j\in J_n=\{0,\ldots,k_n-1\}j∈Jn​={0,…,kn​−1}, define the name Nn(j)N_n(j)Nn​(j) by the following ordered cases. If j=0j=0j=0, use (e,1,1)(e,1,1)(e,1,1). Otherwise, if j<4n⊖5j<4n\ominus5j<4n⊖5, put i=⌊(j⊖1)/4⌋+2i=\lfloor(j\ominus1)/4\rfloor+2i=⌊(j⊖1)/4⌋+2 and use respectively (d,i,0)(d,i,0)(d,i,0), (e,i,1)(e,i,1)(e,i,1), (b,i,1)(b,i,1)(b,i,1), or (b,i,0)(b,i,0)(b,i,0) according as (j⊖1) mod 4(j\ominus1)\bmod4(j⊖1)mod4 is 000, 111, 222, or anything else. Otherwise, if j<6n⊖7j<6n\ominus7j<6n⊖7, put u=j⊖(4n⊖5)u=j\ominus(4n\ominus5)u=j⊖(4n⊖5) and use (c,⌊u/2⌋+2,b)(c,\lfloor u/2\rfloor+2,b)(c,⌊u/2⌋+2,b), where b=1b=1b=1 exactly when u mod 2=1u\bmod2=1umod2=1. Otherwise, if j<7n⊖7j<7n\ominus7j<7n⊖7, use (e,j⊖(6n⊖7)+1,0)(e,j\ominus(6n\ominus7)+1,0)(e,j⊖(6n⊖7)+1,0). Otherwise, if j<8n⊖8j<8n\ominus8j<8n⊖8, use (d,j⊖(7n⊖7)+2,1)(d,j\ominus(7n\ominus7)+2,1)(d,j⊖(7n⊖7)+2,1). In the last case put u=j⊖(8n⊖8)u=j\ominus(8n\ominus8)u=j⊖(8n⊖8) and use (a,n⊖⌊u/2⌋,b)(a,n\ominus\lfloor u/2\rfloor,b)(a,n⊖⌊u/2⌋,b), where b=1b=1b=1 exactly when u mod 2=0u\bmod2=0umod2=0. There are no column indices when n=0n=0n=0 or n=1n=1n=1. For every name vvv, every kind κ∈K\kappa\in Kκ∈K, every level i∈Ni\in\mathbb Ni∈N, and every Boolean bbb, the rational number δv(κ,i,b)\delta_v(\kappa,i,b)δv​(κ,i,b) is 111 if v=(κ,i,b)v=(\kappa,i,b)v=(κ,i,b) and is 000 otherwise. For every n∈Nn\in\mathbb Nn∈N, define the rational number Sn=2n+1S_n=2n+1Sn​=2n+1, with nnn regarded as a rational number in this formula. In particular, SnS_nSn​ is never zero. For every n∈Nn\in\mathbb Nn∈N, define the rational number εn=1/Sn2n+2\varepsilon_n=1/S_n^{2n+2}εn​=1/Sn2n+2​. For every n∈Nn\in\mathbb Nn∈N, every pair (κ,i)∈K×N(\kappa,i)\in K\times\mathbb N(κ,i)∈K×N, and every name vvv, let xλ,l,b=δv(λ,l,b)x_{\lambda,l,b}=\delta_v(\lambda,l,b)xλ,l,b​=δv​(λ,l,b), o=xκ,i,0+xκ,i,1o=x_{\kappa,i,0}+x_{\kappa,i,1}o=xκ,i,0​+xκ,i,1​, and u=xa,i,1+xb,i,1+xc,i,1+xd,i,1+xe,i,1u=x_{a,i,1}+x_{b,i,1}+x_{c,i,1}+x_{d,i,1}+x_{e,i,1}u=xa,i,1​+xb,i,1​+xc,i,1​+xd,i,1​+xe,i,1​. The rational coefficient Fn((κ,i),v)F_n((\kappa,i),v)Fn​((κ,i),v) is defined by these cases: for κ=a\kappa=aκ=a and i=2i=2i=2, it is o−εn(xb,2,0+xc,2,0+xd,2,0+xe,1,1)o-\varepsilon_n(x_{b,2,0}+x_{c,2,0}+x_{d,2,0}+x_{e,1,1})o−εn​(xb,2,0​+xc,2,0​+xd,2,0​+xe,1,1​); for κ=a\kappa=aκ=a and i≠2i\ne2i=2, it is o−xa,i⊖1,0−εn(xa,i⊖1,1+xb,i⊖1,1+xc,i⊖1,1+xd,i⊖1,1+xe,i⊖1,1)o-x_{a,i\ominus1,0}-\varepsilon_n(x_{a,i\ominus1,1}+x_{b,i\ominus1,1}+x_{c,i\ominus1,1}+x_{d,i\ominus1,1}+x_{e,i\ominus1,1})o−xa,i⊖1,0​−εn​(xa,i⊖1,1​+xb,i⊖1,1​+xc,i⊖1,1​+xd,i⊖1,1​+xe,i⊖1,1​); for κ=b\kappa=bκ=b, it is o−xb,i+1,0−xd,i+1,0o-x_{b,i+1,0}-x_{d,i+1,0}o−xb,i+1,0​−xd,i+1,0​; for κ=c\kappa=cκ=c and i=ni=ni=n, it is o−∑j=0nxe,j,0o-\sum_{j=0}^{n}x_{e,j,0}o−∑j=0n​xe,j,0​, including the term j=0j=0j=0; for κ=c\kappa=cκ=c and i≠ni\ne ni=n, it is o−xc,i+1,0o-x_{c,i+1,0}o−xc,i+1,0​; for κ=d\kappa=dκ=d, it is o−1−εn2uo-\frac{1-\varepsilon_n}{2}uo−21−εn​​u; for κ=e\kappa=eκ=e and i=1i=1i=1, it is o−(1−εn)(xb,2,0+xc,2,0+xd,2,0+xe,1,1)o-(1-\varepsilon_n)(x_{b,2,0}+x_{c,2,0}+x_{d,2,0}+x_{e,1,1})o−(1−εn​)(xb,2,0​+xc,2,0​+xd,2,0​+xe,1,1​); and for κ=e\kappa=eκ=e and i≠1i\ne1i=1, it is o−1−εn2uo-\frac{1-\varepsilon_n}{2}uo−21−εn​​u. The pair and name need not correspond to indices of the program. For every pair n,i∈Nn,i\in\mathbb Nn,i∈N, define the rational reward Gn,i=(−Sn)2i⊖1G_{n,i}=(-S_n)^{2i\ominus1}Gn,i​=(−Sn​)2i⊖1. In particular, Gn,0=1G_{n,0}=1Gn,0​=1 because its exponent is zero. For every pair n,i∈Nn,i\in\mathbb Nn,i∈N, define the rational reward Hn,i=(−Sn)2iH_{n,i}=(-S_n)^{2i}Hn,i​=(−Sn​)2i. In particular, Hn,0=1H_{n,0}=1Hn,0​=1. For every n∈Nn\in\mathbb Nn∈N and every name v=(κ,i,b)v=(\kappa,i,b)v=(κ,i,b), define its rational objective coefficient Dn(v)D_n(v)Dn​(v) as a base contribution plus (Gn,1+εnHn,1)(δv(b,2,0)+δv(c,2,0)+δv(d,2,0))(G_{n,1}+\varepsilon_nH_{n,1})(\delta_v(b,2,0)+\delta_v(c,2,0)+\delta_v(d,2,0))(Gn,1​+εn​Hn,1​)(δv​(b,2,0)+δv​(c,2,0)+δv​(d,2,0)). The base contribution is Gn,i+εnHn,iG_{n,i}+\varepsilon_nH_{n,i}Gn,i​+εn​Hn,i​ when b=1b=1b=1 and κ∈{a,b,c}\kappa\in\{a,b,c\}κ∈{a,b,c}; it is εnHn,i\varepsilon_nH_{n,i}εn​Hn,i​ when b=1b=1b=1 and κ∈{d,e}\kappa\in\{d,e\}κ∈{d,e}; it is 111 when (κ,b)=(e,0)(\kappa,b)=(e,0)(κ,b)=(e,0); and it is 000 in every remaining case. In the subscripts of δv\delta_vδv​, b,c,db,c,db,c,d denote kinds, whereas the last coordinate of the name is the Boolean bbb. This defines a coefficient even for names outside all valid column ranges. For every n∈Nn\in\mathbb Nn∈N, define the rational linear-program data Pn=(An,1,dn)P_n=(A_n,\mathbf1,d_n)Pn​=(An​,1,dn​) with mnm_nmn​ rows and knk_nkn​ columns by (An)rj=Fn(Rn(r),Nn(j))(A_n)_{rj}=F_n(R_n(r),N_n(j))(An​)rj​=Fn​(Rn​(r),Nn​(j)), (1)r=1(\mathbf1)_r=1(1)r​=1, and (dn)j=Dn(Nn(j))(d_n)_j=D_n(N_n(j))(dn​)j​=Dn​(Nn​(j)). The underlying linear-program type stores only a rational matrix, right-hand-side vector, and objective vector; it does not impose feasibility, rank, boundedness, or sign conditions. Its rational feasible points are the vectors x∈QJnx\in\mathbb Q^{J_n}x∈QJn​ with Anx=1A_nx=\mathbf1An​x=1 and xj≥0x_j\ge0xj​≥0 for every j∈Jnj\in J_nj∈Jn​, and its objective at xxx is ∑j∈Jn(dn)jxj\sum_{j\in J_n}(d_n)_jx_j∑j∈Jn​​(dn​)j​xj​. For n=0n=0n=0 or n=1n=1n=1, both index sets are empty.

initialBit. All indices and parameters described as natural numbers include zero. In the formulas below, a⊖b=max⁡(a−b,0)a\ominus b=\max(a-b,0)a⊖b=max(a−b,0) denotes subtraction in the natural numbers, ⌊a/b⌋\lfloor a/b\rfloor⌊a/b⌋ denotes natural-number division, and a mod ba\bmod bamodb denotes natural-number remainder. Boolean values are written 000 for false and 111 for true, and bˉ\bar bbˉ denotes their negation. A finite index set of size zero is empty. A rational matrix inverse is the total matrix inverse, which is the zero matrix when its determinant is zero; no nonzero-determinant condition is implicit in the notation. The type KKK consists of exactly five distinct constructors, denoted a,b,c,d,ea,b,c,d,ea,b,c,d,e, with decidable equality. For every pair (κ,i)∈K×N(\kappa,i)\in K\times\mathbb N(κ,i)∈K×N, define the Boolean b0(κ,i)b_0(\kappa,i)b0​(κ,i) to be 111 exactly when κ=d\kappa=dκ=d or both κ=e\kappa=eκ=e and i=1i=1i=1, and to be 000 otherwise.

initialBasis. All indices and parameters described as natural numbers include zero. In the formulas below, a⊖b=max⁡(a−b,0)a\ominus b=\max(a-b,0)a⊖b=max(a−b,0) denotes subtraction in the natural numbers, ⌊a/b⌋\lfloor a/b\rfloor⌊a/b⌋ denotes natural-number division, and a mod ba\bmod bamodb denotes natural-number remainder. Boolean values are written 000 for false and 111 for true, and bˉ\bar bbˉ denotes their negation. A finite index set of size zero is empty. A rational matrix inverse is the total matrix inverse, which is the zero matrix when its determinant is zero; no nonzero-determinant condition is implicit in the notation. The type KKK consists of exactly five distinct constructors, denoted a,b,c,d,ea,b,c,d,ea,b,c,d,e, with decidable equality. For every n∈Nn\in\mathbb Nn∈N, the number of rows is mn=5(n⊖1)m_n=5(n\ominus1)mn​=5(n⊖1); write In={0,…,mn−1}I_n=\{0,\ldots,m_n-1\}In​={0,…,mn​−1} for its finite index set. Thus m0=m1=0m_0=m_1=0m0​=m1​=0. For every n∈Nn\in\mathbb Nn∈N and row index r∈In={0,…,mn−1}r\in I_n=\{0,\ldots,m_n-1\}r∈In​={0,…,mn​−1}, define its kind and level Rn(r)R_n(r)Rn​(r) by the following ordered cases: if r<n⊖1r<n\ominus1r<n⊖1, it is (a,r+2)(a,r+2)(a,r+2); otherwise, if r<(n⊖1)+(n⊖2)r<(n\ominus1)+(n\ominus2)r<(n⊖1)+(n⊖2), it is (b,r⊖(n⊖1)+2)(b,r\ominus(n\ominus1)+2)(b,r⊖(n⊖1)+2); otherwise, if r<2(n⊖1)+(n⊖2)r<2(n\ominus1)+(n\ominus2)r<2(n⊖1)+(n⊖2), it is (c,r⊖((n⊖1)+(n⊖2))+2)(c,r\ominus((n\ominus1)+(n\ominus2))+2)(c,r⊖((n⊖1)+(n⊖2))+2); otherwise, if r<3(n⊖1)+(n⊖2)r<3(n\ominus1)+(n\ominus2)r<3(n⊖1)+(n⊖2), it is (d,r⊖(2(n⊖1)+(n⊖2))+2)(d,r\ominus(2(n\ominus1)+(n\ominus2))+2)(d,r⊖(2(n⊖1)+(n⊖2))+2); otherwise it is (e,r⊖(3(n⊖1)+(n⊖2))+1)(e,r\ominus(3(n\ominus1)+(n\ominus2))+1)(e,r⊖(3(n⊖1)+(n⊖2))+1). There are no row indices when n=0n=0n=0 or n=1n=1n=1. For every n∈Nn\in\mathbb Nn∈N, the number of columns is kn=10(n⊖1)k_n=10(n\ominus1)kn​=10(n⊖1); write Jn={0,…,kn−1}J_n=\{0,\ldots,k_n-1\}Jn​={0,…,kn​−1} for its finite index set. Thus k0=k1=0k_0=k_1=0k0​=k1​=0. A name is a triple v=(κ,i,b)v=(\kappa,i,b)v=(κ,i,b) with kind κ∈K\kappa\in Kκ∈K, level i∈Ni\in\mathbb Ni∈N, and Boolean value b∈{0,1}b\in\{0,1\}b∈{0,1}. There are no restrictions on the level or on combinations of fields. Equality of names is decidable. For every n∈Nn\in\mathbb Nn∈N and every name (κ,i,b)(\kappa,i,b)(κ,i,b), define its natural-number rank Cn(κ,i,b)C_n(\kappa,i,b)Cn​(κ,i,b) as follows: Cn(e,i,1)=0C_n(e,i,1)=0Cn​(e,i,1)=0 if i=1i=1i=1, and Cn(e,i,1)=4(i⊖2)+2C_n(e,i,1)=4(i\ominus2)+2Cn​(e,i,1)=4(i⊖2)+2 otherwise; Cn(d,i,0)=4(i⊖2)+1C_n(d,i,0)=4(i\ominus2)+1Cn​(d,i,0)=4(i⊖2)+1; Cn(b,i,1)=4(i⊖2)+3C_n(b,i,1)=4(i\ominus2)+3Cn​(b,i,1)=4(i⊖2)+3; Cn(b,i,0)=4(i⊖2)+4C_n(b,i,0)=4(i\ominus2)+4Cn​(b,i,0)=4(i⊖2)+4; Cn(c,i,0)=(4n⊖5)+2(i⊖2)C_n(c,i,0)=(4n\ominus5)+2(i\ominus2)Cn​(c,i,0)=(4n⊖5)+2(i⊖2); Cn(c,i,1)=(4n⊖5)+2(i⊖2)+1C_n(c,i,1)=(4n\ominus5)+2(i\ominus2)+1Cn​(c,i,1)=(4n⊖5)+2(i⊖2)+1; Cn(e,i,0)=(6n⊖7)+(i⊖1)C_n(e,i,0)=(6n\ominus7)+(i\ominus1)Cn​(e,i,0)=(6n⊖7)+(i⊖1); Cn(d,i,1)=(7n⊖7)+(i⊖2)C_n(d,i,1)=(7n\ominus7)+(i\ominus2)Cn​(d,i,1)=(7n⊖7)+(i⊖2); Cn(a,i,1)=(8n⊖8)+2(n⊖i)C_n(a,i,1)=(8n\ominus8)+2(n\ominus i)Cn​(a,i,1)=(8n⊖8)+2(n⊖i); and Cn(a,i,0)=(8n⊖8)+2(n⊖i)+1C_n(a,i,0)=(8n\ominus8)+2(n\ominus i)+1Cn​(a,i,0)=(8n⊖8)+2(n⊖i)+1. The function is defined on every name, including levels outside the row or column ranges, and its output is a natural number, without a bound by knk_nkn​. For every pair (κ,i)∈K×N(\kappa,i)\in K\times\mathbb N(κ,i)∈K×N, define the Boolean b0(κ,i)b_0(\kappa,i)b0​(κ,i) to be 111 exactly when κ=d\kappa=dκ=d or both κ=e\kappa=eκ=e and i=1i=1i=1, and to be 000 otherwise. For every n∈Nn\in\mathbb Nn∈N and every supplied proof of 3≤n3\le n3≤n, define Bn0:In→JnB_n^0:I_n\to J_nBn0​:In​→Jn​ by Bn0(r)=Cn(κ,i,b0(κ,i)) mod knB_n^0(r)=C_n(\kappa,i,b_0(\kappa,i))\bmod k_nBn0​(r)=Cn​(κ,i,b0​(κ,i))modkn​, where (κ,i)=Rn(r)(\kappa,i)=R_n(r)(κ,i)=Rn​(r). A basis here is merely a function from row indices to column indices; injectivity, nonsingularity, and feasibility are not fields of this type. The bound 3≤n3\le n3≤n makes kn>0k_n>0kn​>0, so the remainder is a column index.

initialState. All indices and parameters described as natural numbers include zero. In the formulas below, a⊖b=max⁡(a−b,0)a\ominus b=\max(a-b,0)a⊖b=max(a−b,0) denotes subtraction in the natural numbers, ⌊a/b⌋\lfloor a/b\rfloor⌊a/b⌋ denotes natural-number division, and a mod ba\bmod bamodb denotes natural-number remainder. Boolean values are written 000 for false and 111 for true, and bˉ\bar bbˉ denotes their negation. A finite index set of size zero is empty. A rational matrix inverse is the total matrix inverse, which is the zero matrix when its determinant is zero; no nonzero-determinant condition is implicit in the notation. The type KKK consists of exactly five distinct constructors, denoted a,b,c,d,ea,b,c,d,ea,b,c,d,e, with decidable equality. For every n∈Nn\in\mathbb Nn∈N, the number of rows is mn=5(n⊖1)m_n=5(n\ominus1)mn​=5(n⊖1); write In={0,…,mn−1}I_n=\{0,\ldots,m_n-1\}In​={0,…,mn​−1} for its finite index set. Thus m0=m1=0m_0=m_1=0m0​=m1​=0. For every n∈Nn\in\mathbb Nn∈N and row index r∈In={0,…,mn−1}r\in I_n=\{0,\ldots,m_n-1\}r∈In​={0,…,mn​−1}, define its kind and level Rn(r)R_n(r)Rn​(r) by the following ordered cases: if r<n⊖1r<n\ominus1r<n⊖1, it is (a,r+2)(a,r+2)(a,r+2); otherwise, if r<(n⊖1)+(n⊖2)r<(n\ominus1)+(n\ominus2)r<(n⊖1)+(n⊖2), it is (b,r⊖(n⊖1)+2)(b,r\ominus(n\ominus1)+2)(b,r⊖(n⊖1)+2); otherwise, if r<2(n⊖1)+(n⊖2)r<2(n\ominus1)+(n\ominus2)r<2(n⊖1)+(n⊖2), it is (c,r⊖((n⊖1)+(n⊖2))+2)(c,r\ominus((n\ominus1)+(n\ominus2))+2)(c,r⊖((n⊖1)+(n⊖2))+2); otherwise, if r<3(n⊖1)+(n⊖2)r<3(n\ominus1)+(n\ominus2)r<3(n⊖1)+(n⊖2), it is (d,r⊖(2(n⊖1)+(n⊖2))+2)(d,r\ominus(2(n\ominus1)+(n\ominus2))+2)(d,r⊖(2(n⊖1)+(n⊖2))+2); otherwise it is (e,r⊖(3(n⊖1)+(n⊖2))+1)(e,r\ominus(3(n\ominus1)+(n\ominus2))+1)(e,r⊖(3(n⊖1)+(n⊖2))+1). There are no row indices when n=0n=0n=0 or n=1n=1n=1. For every n∈Nn\in\mathbb Nn∈N, the number of columns is kn=10(n⊖1)k_n=10(n\ominus1)kn​=10(n⊖1); write Jn={0,…,kn−1}J_n=\{0,\ldots,k_n-1\}Jn​={0,…,kn​−1} for its finite index set. Thus k0=k1=0k_0=k_1=0k0​=k1​=0. A name is a triple v=(κ,i,b)v=(\kappa,i,b)v=(κ,i,b) with kind κ∈K\kappa\in Kκ∈K, level i∈Ni\in\mathbb Ni∈N, and Boolean value b∈{0,1}b\in\{0,1\}b∈{0,1}. There are no restrictions on the level or on combinations of fields. Equality of names is decidable. For every n∈Nn\in\mathbb Nn∈N and every name (κ,i,b)(\kappa,i,b)(κ,i,b), define its natural-number rank Cn(κ,i,b)C_n(\kappa,i,b)Cn​(κ,i,b) as follows: Cn(e,i,1)=0C_n(e,i,1)=0Cn​(e,i,1)=0 if i=1i=1i=1, and Cn(e,i,1)=4(i⊖2)+2C_n(e,i,1)=4(i\ominus2)+2Cn​(e,i,1)=4(i⊖2)+2 otherwise; Cn(d,i,0)=4(i⊖2)+1C_n(d,i,0)=4(i\ominus2)+1Cn​(d,i,0)=4(i⊖2)+1; Cn(b,i,1)=4(i⊖2)+3C_n(b,i,1)=4(i\ominus2)+3Cn​(b,i,1)=4(i⊖2)+3; Cn(b,i,0)=4(i⊖2)+4C_n(b,i,0)=4(i\ominus2)+4Cn​(b,i,0)=4(i⊖2)+4; Cn(c,i,0)=(4n⊖5)+2(i⊖2)C_n(c,i,0)=(4n\ominus5)+2(i\ominus2)Cn​(c,i,0)=(4n⊖5)+2(i⊖2); Cn(c,i,1)=(4n⊖5)+2(i⊖2)+1C_n(c,i,1)=(4n\ominus5)+2(i\ominus2)+1Cn​(c,i,1)=(4n⊖5)+2(i⊖2)+1; Cn(e,i,0)=(6n⊖7)+(i⊖1)C_n(e,i,0)=(6n\ominus7)+(i\ominus1)Cn​(e,i,0)=(6n⊖7)+(i⊖1); Cn(d,i,1)=(7n⊖7)+(i⊖2)C_n(d,i,1)=(7n\ominus7)+(i\ominus2)Cn​(d,i,1)=(7n⊖7)+(i⊖2); Cn(a,i,1)=(8n⊖8)+2(n⊖i)C_n(a,i,1)=(8n\ominus8)+2(n\ominus i)Cn​(a,i,1)=(8n⊖8)+2(n⊖i); and Cn(a,i,0)=(8n⊖8)+2(n⊖i)+1C_n(a,i,0)=(8n\ominus8)+2(n\ominus i)+1Cn​(a,i,0)=(8n⊖8)+2(n⊖i)+1. The function is defined on every name, including levels outside the row or column ranges, and its output is a natural number, without a bound by knk_nkn​. For every pair (κ,i)∈K×N(\kappa,i)\in K\times\mathbb N(κ,i)∈K×N, define the Boolean b0(κ,i)b_0(\kappa,i)b0​(κ,i) to be 111 exactly when κ=d\kappa=dκ=d or both κ=e\kappa=eκ=e and i=1i=1i=1, and to be 000 otherwise. For every n∈Nn\in\mathbb Nn∈N and every supplied proof of 3≤n3\le n3≤n, define Bn0:In→JnB_n^0:I_n\to J_nBn0​:In​→Jn​ by Bn0(r)=Cn(κ,i,b0(κ,i)) mod knB_n^0(r)=C_n(\kappa,i,b_0(\kappa,i))\bmod k_nBn0​(r)=Cn​(κ,i,b0​(κ,i))modkn​, where (κ,i)=Rn(r)(\kappa,i)=R_n(r)(κ,i)=Rn​(r). A basis here is merely a function from row indices to column indices; injectivity, nonsingularity, and feasibility are not fields of this type. The bound 3≤n3\le n3≤n makes kn>0k_n>0kn​>0, so the remainder is a column index. For every n∈Nn\in\mathbb Nn∈N and every supplied proof of 3≤n3\le n3≤n, the initial simplex state is the pair (Bn0,0)(B_n^0,0)(Bn0​,0). A simplex state consists of an arbitrary row-to-column function and a last-column index in JnJ_nJn​; the inequality supplies the validity of the index 000.

order. All indices and parameters described as natural numbers include zero. In the formulas below, a⊖b=max⁡(a−b,0)a\ominus b=\max(a-b,0)a⊖b=max(a−b,0) denotes subtraction in the natural numbers, ⌊a/b⌋\lfloor a/b\rfloor⌊a/b⌋ denotes natural-number division, and a mod ba\bmod bamodb denotes natural-number remainder. Boolean values are written 000 for false and 111 for true, and bˉ\bar bbˉ denotes their negation. A finite index set of size zero is empty. A rational matrix inverse is the total matrix inverse, which is the zero matrix when its determinant is zero; no nonzero-determinant condition is implicit in the notation. For every n∈Nn\in\mathbb Nn∈N, the number of columns is kn=10(n⊖1)k_n=10(n\ominus1)kn​=10(n⊖1); write Jn={0,…,kn−1}J_n=\{0,\ldots,k_n-1\}Jn​={0,…,kn​−1} for its finite index set. Thus k0=k1=0k_0=k_1=0k0​=k1​=0. For every n∈Nn\in\mathbb Nn∈N, the ordering equivalence on Jn={0,…,kn−1}J_n=\{0,\ldots,k_n-1\}Jn​={0,…,kn​−1} is the identity j↦jj\mapsto jj↦j, including the empty equivalence when n=0n=0n=0 or n=1n=1n=1.

rowRank. All indices and parameters described as natural numbers include zero. In the formulas below, a⊖b=max⁡(a−b,0)a\ominus b=\max(a-b,0)a⊖b=max(a−b,0) denotes subtraction in the natural numbers, ⌊a/b⌋\lfloor a/b\rfloor⌊a/b⌋ denotes natural-number division, and a mod ba\bmod bamodb denotes natural-number remainder. Boolean values are written 000 for false and 111 for true, and bˉ\bar bbˉ denotes their negation. A finite index set of size zero is empty. A rational matrix inverse is the total matrix inverse, which is the zero matrix when its determinant is zero; no nonzero-determinant condition is implicit in the notation. The type KKK consists of exactly five distinct constructors, denoted a,b,c,d,ea,b,c,d,ea,b,c,d,e, with decidable equality. For every n∈Nn\in\mathbb Nn∈N and pair (κ,i)∈K×N(\kappa,i)\in K\times\mathbb N(κ,i)∈K×N, define the natural-number row rank Qn(κ,i)Q_n(\kappa,i)Qn​(κ,i) by Qn(a,i)=i⊖2Q_n(a,i)=i\ominus2Qn​(a,i)=i⊖2, Qn(b,i)=(n⊖1)+(i⊖2)Q_n(b,i)=(n\ominus1)+(i\ominus2)Qn​(b,i)=(n⊖1)+(i⊖2), Qn(c,i)=(n⊖1)+(n⊖2)+(i⊖2)Q_n(c,i)=(n\ominus1)+(n\ominus2)+(i\ominus2)Qn​(c,i)=(n⊖1)+(n⊖2)+(i⊖2), Qn(d,i)=2(n⊖1)+(n⊖2)+(i⊖2)Q_n(d,i)=2(n\ominus1)+(n\ominus2)+(i\ominus2)Qn​(d,i)=2(n⊖1)+(n⊖2)+(i⊖2), and Qn(e,i)=3(n⊖1)+(n⊖2)+(i⊖1)Q_n(e,i)=3(n\ominus1)+(n\ominus2)+(i\ominus1)Qn​(e,i)=3(n⊖1)+(n⊖2)+(i⊖1). The input may have any level; the result has no imposed bound by the row count.

actionColumn. All indices and parameters described as natural numbers include zero. In the formulas below, a⊖b=max⁡(a−b,0)a\ominus b=\max(a-b,0)a⊖b=max(a−b,0) denotes subtraction in the natural numbers, ⌊a/b⌋\lfloor a/b\rfloor⌊a/b⌋ denotes natural-number division, and a mod ba\bmod bamodb denotes natural-number remainder. Boolean values are written 000 for false and 111 for true, and bˉ\bar bbˉ denotes their negation. A finite index set of size zero is empty. A rational matrix inverse is the total matrix inverse, which is the zero matrix when its determinant is zero; no nonzero-determinant condition is implicit in the notation. The type KKK consists of exactly five distinct constructors, denoted a,b,c,d,ea,b,c,d,ea,b,c,d,e, with decidable equality. For every n∈Nn\in\mathbb Nn∈N, the number of rows is mn=5(n⊖1)m_n=5(n\ominus1)mn​=5(n⊖1); write In={0,…,mn−1}I_n=\{0,\ldots,m_n-1\}In​={0,…,mn​−1} for its finite index set. Thus m0=m1=0m_0=m_1=0m0​=m1​=0. For every n∈Nn\in\mathbb Nn∈N and row index r∈In={0,…,mn−1}r\in I_n=\{0,\ldots,m_n-1\}r∈In​={0,…,mn​−1}, define its kind and level Rn(r)R_n(r)Rn​(r) by the following ordered cases: if r<n⊖1r<n\ominus1r<n⊖1, it is (a,r+2)(a,r+2)(a,r+2); otherwise, if r<(n⊖1)+(n⊖2)r<(n\ominus1)+(n\ominus2)r<(n⊖1)+(n⊖2), it is (b,r⊖(n⊖1)+2)(b,r\ominus(n\ominus1)+2)(b,r⊖(n⊖1)+2); otherwise, if r<2(n⊖1)+(n⊖2)r<2(n\ominus1)+(n\ominus2)r<2(n⊖1)+(n⊖2), it is (c,r⊖((n⊖1)+(n⊖2))+2)(c,r\ominus((n\ominus1)+(n\ominus2))+2)(c,r⊖((n⊖1)+(n⊖2))+2); otherwise, if r<3(n⊖1)+(n⊖2)r<3(n\ominus1)+(n\ominus2)r<3(n⊖1)+(n⊖2), it is (d,r⊖(2(n⊖1)+(n⊖2))+2)(d,r\ominus(2(n\ominus1)+(n\ominus2))+2)(d,r⊖(2(n⊖1)+(n⊖2))+2); otherwise it is (e,r⊖(3(n⊖1)+(n⊖2))+1)(e,r\ominus(3(n\ominus1)+(n\ominus2))+1)(e,r⊖(3(n⊖1)+(n⊖2))+1). There are no row indices when n=0n=0n=0 or n=1n=1n=1. For every n∈Nn\in\mathbb Nn∈N, the number of columns is kn=10(n⊖1)k_n=10(n\ominus1)kn​=10(n⊖1); write Jn={0,…,kn−1}J_n=\{0,\ldots,k_n-1\}Jn​={0,…,kn​−1} for its finite index set. Thus k0=k1=0k_0=k_1=0k0​=k1​=0. A name is a triple v=(κ,i,b)v=(\kappa,i,b)v=(κ,i,b) with kind κ∈K\kappa\in Kκ∈K, level i∈Ni\in\mathbb Ni∈N, and Boolean value b∈{0,1}b\in\{0,1\}b∈{0,1}. There are no restrictions on the level or on combinations of fields. Equality of names is decidable. For every n∈Nn\in\mathbb Nn∈N and every name (κ,i,b)(\kappa,i,b)(κ,i,b), define its natural-number rank Cn(κ,i,b)C_n(\kappa,i,b)Cn​(κ,i,b) as follows: Cn(e,i,1)=0C_n(e,i,1)=0Cn​(e,i,1)=0 if i=1i=1i=1, and Cn(e,i,1)=4(i⊖2)+2C_n(e,i,1)=4(i\ominus2)+2Cn​(e,i,1)=4(i⊖2)+2 otherwise; Cn(d,i,0)=4(i⊖2)+1C_n(d,i,0)=4(i\ominus2)+1Cn​(d,i,0)=4(i⊖2)+1; Cn(b,i,1)=4(i⊖2)+3C_n(b,i,1)=4(i\ominus2)+3Cn​(b,i,1)=4(i⊖2)+3; Cn(b,i,0)=4(i⊖2)+4C_n(b,i,0)=4(i\ominus2)+4Cn​(b,i,0)=4(i⊖2)+4; Cn(c,i,0)=(4n⊖5)+2(i⊖2)C_n(c,i,0)=(4n\ominus5)+2(i\ominus2)Cn​(c,i,0)=(4n⊖5)+2(i⊖2); Cn(c,i,1)=(4n⊖5)+2(i⊖2)+1C_n(c,i,1)=(4n\ominus5)+2(i\ominus2)+1Cn​(c,i,1)=(4n⊖5)+2(i⊖2)+1; Cn(e,i,0)=(6n⊖7)+(i⊖1)C_n(e,i,0)=(6n\ominus7)+(i\ominus1)Cn​(e,i,0)=(6n⊖7)+(i⊖1); Cn(d,i,1)=(7n⊖7)+(i⊖2)C_n(d,i,1)=(7n\ominus7)+(i\ominus2)Cn​(d,i,1)=(7n⊖7)+(i⊖2); Cn(a,i,1)=(8n⊖8)+2(n⊖i)C_n(a,i,1)=(8n\ominus8)+2(n\ominus i)Cn​(a,i,1)=(8n⊖8)+2(n⊖i); and Cn(a,i,0)=(8n⊖8)+2(n⊖i)+1C_n(a,i,0)=(8n\ominus8)+2(n\ominus i)+1Cn​(a,i,0)=(8n⊖8)+2(n⊖i)+1. The function is defined on every name, including levels outside the row or column ranges, and its output is a natural number, without a bound by knk_nkn​. For every n∈Nn\in\mathbb Nn∈N, every supplied proof of 3≤n3\le n3≤n, every row r∈Inr\in I_nr∈In​, and every Boolean bbb, the column for this action is jn(r,b)=Cn(κ,i,b) mod knj_n(r,b)=C_n(\kappa,i,b)\bmod k_njn​(r,b)=Cn​(κ,i,b)modkn​, where (κ,i)=Rn(r)(\kappa,i)=R_n(r)(κ,i)=Rn​(r). The positive column count makes this a member of JnJ_nJn​.

Policy. All indices and parameters described as natural numbers include zero. In the formulas below, a⊖b=max⁡(a−b,0)a\ominus b=\max(a-b,0)a⊖b=max(a−b,0) denotes subtraction in the natural numbers, ⌊a/b⌋\lfloor a/b\rfloor⌊a/b⌋ denotes natural-number division, and a mod ba\bmod bamodb denotes natural-number remainder. Boolean values are written 000 for false and 111 for true, and bˉ\bar bbˉ denotes their negation. A finite index set of size zero is empty. A rational matrix inverse is the total matrix inverse, which is the zero matrix when its determinant is zero; no nonzero-determinant condition is implicit in the notation. For every n∈Nn\in\mathbb Nn∈N, the number of rows is mn=5(n⊖1)m_n=5(n\ominus1)mn​=5(n⊖1); write In={0,…,mn−1}I_n=\{0,\ldots,m_n-1\}In​={0,…,mn​−1} for its finite index set. Thus m0=m1=0m_0=m_1=0m0​=m1​=0. For every n∈Nn\in\mathbb Nn∈N, a policy is any function σ:In→{0,1}\sigma:I_n\to\{0,1\}σ:In​→{0,1}. No additional conditions are imposed. For n=0n=0n=0 or n=1n=1n=1, there is exactly one such function, the empty function.

policyBasis. All indices and parameters described as natural numbers include zero. In the formulas below, a⊖b=max⁡(a−b,0)a\ominus b=\max(a-b,0)a⊖b=max(a−b,0) denotes subtraction in the natural numbers, ⌊a/b⌋\lfloor a/b\rfloor⌊a/b⌋ denotes natural-number division, and a mod ba\bmod bamodb denotes natural-number remainder. Boolean values are written 000 for false and 111 for true, and bˉ\bar bbˉ denotes their negation. A finite index set of size zero is empty. A rational matrix inverse is the total matrix inverse, which is the zero matrix when its determinant is zero; no nonzero-determinant condition is implicit in the notation. The type KKK consists of exactly five distinct constructors, denoted a,b,c,d,ea,b,c,d,ea,b,c,d,e, with decidable equality. For every n∈Nn\in\mathbb Nn∈N, the number of rows is mn=5(n⊖1)m_n=5(n\ominus1)mn​=5(n⊖1); write In={0,…,mn−1}I_n=\{0,\ldots,m_n-1\}In​={0,…,mn​−1} for its finite index set. Thus m0=m1=0m_0=m_1=0m0​=m1​=0. For every n∈Nn\in\mathbb Nn∈N and row index r∈In={0,…,mn−1}r\in I_n=\{0,\ldots,m_n-1\}r∈In​={0,…,mn​−1}, define its kind and level Rn(r)R_n(r)Rn​(r) by the following ordered cases: if r<n⊖1r<n\ominus1r<n⊖1, it is (a,r+2)(a,r+2)(a,r+2); otherwise, if r<(n⊖1)+(n⊖2)r<(n\ominus1)+(n\ominus2)r<(n⊖1)+(n⊖2), it is (b,r⊖(n⊖1)+2)(b,r\ominus(n\ominus1)+2)(b,r⊖(n⊖1)+2); otherwise, if r<2(n⊖1)+(n⊖2)r<2(n\ominus1)+(n\ominus2)r<2(n⊖1)+(n⊖2), it is (c,r⊖((n⊖1)+(n⊖2))+2)(c,r\ominus((n\ominus1)+(n\ominus2))+2)(c,r⊖((n⊖1)+(n⊖2))+2); otherwise, if r<3(n⊖1)+(n⊖2)r<3(n\ominus1)+(n\ominus2)r<3(n⊖1)+(n⊖2), it is (d,r⊖(2(n⊖1)+(n⊖2))+2)(d,r\ominus(2(n\ominus1)+(n\ominus2))+2)(d,r⊖(2(n⊖1)+(n⊖2))+2); otherwise it is (e,r⊖(3(n⊖1)+(n⊖2))+1)(e,r\ominus(3(n\ominus1)+(n\ominus2))+1)(e,r⊖(3(n⊖1)+(n⊖2))+1). There are no row indices when n=0n=0n=0 or n=1n=1n=1. For every n∈Nn\in\mathbb Nn∈N, the number of columns is kn=10(n⊖1)k_n=10(n\ominus1)kn​=10(n⊖1); write Jn={0,…,kn−1}J_n=\{0,\ldots,k_n-1\}Jn​={0,…,kn​−1} for its finite index set. Thus k0=k1=0k_0=k_1=0k0​=k1​=0. A name is a triple v=(κ,i,b)v=(\kappa,i,b)v=(κ,i,b) with kind κ∈K\kappa\in Kκ∈K, level i∈Ni\in\mathbb Ni∈N, and Boolean value b∈{0,1}b\in\{0,1\}b∈{0,1}. There are no restrictions on the level or on combinations of fields. Equality of names is decidable. For every n∈Nn\in\mathbb Nn∈N and every name (κ,i,b)(\kappa,i,b)(κ,i,b), define its natural-number rank Cn(κ,i,b)C_n(\kappa,i,b)Cn​(κ,i,b) as follows: Cn(e,i,1)=0C_n(e,i,1)=0Cn​(e,i,1)=0 if i=1i=1i=1, and Cn(e,i,1)=4(i⊖2)+2C_n(e,i,1)=4(i\ominus2)+2Cn​(e,i,1)=4(i⊖2)+2 otherwise; Cn(d,i,0)=4(i⊖2)+1C_n(d,i,0)=4(i\ominus2)+1Cn​(d,i,0)=4(i⊖2)+1; Cn(b,i,1)=4(i⊖2)+3C_n(b,i,1)=4(i\ominus2)+3Cn​(b,i,1)=4(i⊖2)+3; Cn(b,i,0)=4(i⊖2)+4C_n(b,i,0)=4(i\ominus2)+4Cn​(b,i,0)=4(i⊖2)+4; Cn(c,i,0)=(4n⊖5)+2(i⊖2)C_n(c,i,0)=(4n\ominus5)+2(i\ominus2)Cn​(c,i,0)=(4n⊖5)+2(i⊖2); Cn(c,i,1)=(4n⊖5)+2(i⊖2)+1C_n(c,i,1)=(4n\ominus5)+2(i\ominus2)+1Cn​(c,i,1)=(4n⊖5)+2(i⊖2)+1; Cn(e,i,0)=(6n⊖7)+(i⊖1)C_n(e,i,0)=(6n\ominus7)+(i\ominus1)Cn​(e,i,0)=(6n⊖7)+(i⊖1); Cn(d,i,1)=(7n⊖7)+(i⊖2)C_n(d,i,1)=(7n\ominus7)+(i\ominus2)Cn​(d,i,1)=(7n⊖7)+(i⊖2); Cn(a,i,1)=(8n⊖8)+2(n⊖i)C_n(a,i,1)=(8n\ominus8)+2(n\ominus i)Cn​(a,i,1)=(8n⊖8)+2(n⊖i); and Cn(a,i,0)=(8n⊖8)+2(n⊖i)+1C_n(a,i,0)=(8n\ominus8)+2(n\ominus i)+1Cn​(a,i,0)=(8n⊖8)+2(n⊖i)+1. The function is defined on every name, including levels outside the row or column ranges, and its output is a natural number, without a bound by knk_nkn​. For every n∈Nn\in\mathbb Nn∈N, every supplied proof of 3≤n3\le n3≤n, every row r∈Inr\in I_nr∈In​, and every Boolean bbb, the column for this action is jn(r,b)=Cn(κ,i,b) mod knj_n(r,b)=C_n(\kappa,i,b)\bmod k_njn​(r,b)=Cn​(κ,i,b)modkn​, where (κ,i)=Rn(r)(\kappa,i)=R_n(r)(κ,i)=Rn​(r). The positive column count makes this a member of JnJ_nJn​. For every n∈Nn\in\mathbb Nn∈N, a policy is any function σ:In→{0,1}\sigma:I_n\to\{0,1\}σ:In​→{0,1}. No additional conditions are imposed. For n=0n=0n=0 or n=1n=1n=1, there is exactly one such function, the empty function. For every n∈Nn\in\mathbb Nn∈N, every supplied proof of 3≤n3\le n3≤n, and every policy σ\sigmaσ, define the row-to-column function Bn,σ(r)=jn(r,σ(r))B_{n,\sigma}(r)=j_n(r,\sigma(r))Bn,σ​(r)=jn​(r,σ(r)) for every r∈Inr\in I_nr∈In​. Calling this function a basis imposes no injectivity, determinant, or feasibility condition.

initialPolicy. All indices and parameters described as natural numbers include zero. In the formulas below, a⊖b=max⁡(a−b,0)a\ominus b=\max(a-b,0)a⊖b=max(a−b,0) denotes subtraction in the natural numbers, ⌊a/b⌋\lfloor a/b\rfloor⌊a/b⌋ denotes natural-number division, and a mod ba\bmod bamodb denotes natural-number remainder. Boolean values are written 000 for false and 111 for true, and bˉ\bar bbˉ denotes their negation. A finite index set of size zero is empty. A rational matrix inverse is the total matrix inverse, which is the zero matrix when its determinant is zero; no nonzero-determinant condition is implicit in the notation. The type KKK consists of exactly five distinct constructors, denoted a,b,c,d,ea,b,c,d,ea,b,c,d,e, with decidable equality. For every n∈Nn\in\mathbb Nn∈N, the number of rows is mn=5(n⊖1)m_n=5(n\ominus1)mn​=5(n⊖1); write In={0,…,mn−1}I_n=\{0,\ldots,m_n-1\}In​={0,…,mn​−1} for its finite index set. Thus m0=m1=0m_0=m_1=0m0​=m1​=0. For every n∈Nn\in\mathbb Nn∈N and row index r∈In={0,…,mn−1}r\in I_n=\{0,\ldots,m_n-1\}r∈In​={0,…,mn​−1}, define its kind and level Rn(r)R_n(r)Rn​(r) by the following ordered cases: if r<n⊖1r<n\ominus1r<n⊖1, it is (a,r+2)(a,r+2)(a,r+2); otherwise, if r<(n⊖1)+(n⊖2)r<(n\ominus1)+(n\ominus2)r<(n⊖1)+(n⊖2), it is (b,r⊖(n⊖1)+2)(b,r\ominus(n\ominus1)+2)(b,r⊖(n⊖1)+2); otherwise, if r<2(n⊖1)+(n⊖2)r<2(n\ominus1)+(n\ominus2)r<2(n⊖1)+(n⊖2), it is (c,r⊖((n⊖1)+(n⊖2))+2)(c,r\ominus((n\ominus1)+(n\ominus2))+2)(c,r⊖((n⊖1)+(n⊖2))+2); otherwise, if r<3(n⊖1)+(n⊖2)r<3(n\ominus1)+(n\ominus2)r<3(n⊖1)+(n⊖2), it is (d,r⊖(2(n⊖1)+(n⊖2))+2)(d,r\ominus(2(n\ominus1)+(n\ominus2))+2)(d,r⊖(2(n⊖1)+(n⊖2))+2); otherwise it is (e,r⊖(3(n⊖1)+(n⊖2))+1)(e,r\ominus(3(n\ominus1)+(n\ominus2))+1)(e,r⊖(3(n⊖1)+(n⊖2))+1). There are no row indices when n=0n=0n=0 or n=1n=1n=1. For every pair (κ,i)∈K×N(\kappa,i)\in K\times\mathbb N(κ,i)∈K×N, define the Boolean b0(κ,i)b_0(\kappa,i)b0​(κ,i) to be 111 exactly when κ=d\kappa=dκ=d or both κ=e\kappa=eκ=e and i=1i=1i=1, and to be 000 otherwise. For every n∈Nn\in\mathbb Nn∈N, a policy is any function σ:In→{0,1}\sigma:I_n\to\{0,1\}σ:In​→{0,1}. No additional conditions are imposed. For n=0n=0n=0 or n=1n=1n=1, there is exactly one such function, the empty function. For every n∈Nn\in\mathbb Nn∈N, the initial policy is σn0(r)=b0(Rn(r))\sigma_n^0(r)=b_0(R_n(r))σn0​(r)=b0​(Rn​(r)) for each r∈Inr\in I_nr∈In​; equivalently it selects 111 exactly on rows of kind ddd and on the row of kind eee and level 111, and selects 000 on all other rows. This is the empty function if n=0n=0n=0 or n=1n=1n=1.

transition. All indices and parameters described as natural numbers include zero. In the formulas below, a⊖b=max⁡(a−b,0)a\ominus b=\max(a-b,0)a⊖b=max(a−b,0) denotes subtraction in the natural numbers, ⌊a/b⌋\lfloor a/b\rfloor⌊a/b⌋ denotes natural-number division, and a mod ba\bmod bamodb denotes natural-number remainder. Boolean values are written 000 for false and 111 for true, and bˉ\bar bbˉ denotes their negation. A finite index set of size zero is empty. A rational matrix inverse is the total matrix inverse, which is the zero matrix when its determinant is zero; no nonzero-determinant condition is implicit in the notation. The type KKK consists of exactly five distinct constructors, denoted a,b,c,d,ea,b,c,d,ea,b,c,d,e, with decidable equality. For every n∈Nn\in\mathbb Nn∈N, the number of rows is mn=5(n⊖1)m_n=5(n\ominus1)mn​=5(n⊖1); write In={0,…,mn−1}I_n=\{0,\ldots,m_n-1\}In​={0,…,mn​−1} for its finite index set. Thus m0=m1=0m_0=m_1=0m0​=m1​=0. For every n∈Nn\in\mathbb Nn∈N and row index r∈In={0,…,mn−1}r\in I_n=\{0,\ldots,m_n-1\}r∈In​={0,…,mn​−1}, define its kind and level Rn(r)R_n(r)Rn​(r) by the following ordered cases: if r<n⊖1r<n\ominus1r<n⊖1, it is (a,r+2)(a,r+2)(a,r+2); otherwise, if r<(n⊖1)+(n⊖2)r<(n\ominus1)+(n\ominus2)r<(n⊖1)+(n⊖2), it is (b,r⊖(n⊖1)+2)(b,r\ominus(n\ominus1)+2)(b,r⊖(n⊖1)+2); otherwise, if r<2(n⊖1)+(n⊖2)r<2(n\ominus1)+(n\ominus2)r<2(n⊖1)+(n⊖2), it is (c,r⊖((n⊖1)+(n⊖2))+2)(c,r\ominus((n\ominus1)+(n\ominus2))+2)(c,r⊖((n⊖1)+(n⊖2))+2); otherwise, if r<3(n⊖1)+(n⊖2)r<3(n\ominus1)+(n\ominus2)r<3(n⊖1)+(n⊖2), it is (d,r⊖(2(n⊖1)+(n⊖2))+2)(d,r\ominus(2(n\ominus1)+(n\ominus2))+2)(d,r⊖(2(n⊖1)+(n⊖2))+2); otherwise it is (e,r⊖(3(n⊖1)+(n⊖2))+1)(e,r\ominus(3(n\ominus1)+(n\ominus2))+1)(e,r⊖(3(n⊖1)+(n⊖2))+1). There are no row indices when n=0n=0n=0 or n=1n=1n=1. A name is a triple v=(κ,i,b)v=(\kappa,i,b)v=(κ,i,b) with kind κ∈K\kappa\in Kκ∈K, level i∈Ni\in\mathbb Ni∈N, and Boolean value b∈{0,1}b\in\{0,1\}b∈{0,1}. There are no restrictions on the level or on combinations of fields. Equality of names is decidable. For every n∈Nn\in\mathbb Nn∈N, the number of columns is kn=10(n⊖1)k_n=10(n\ominus1)kn​=10(n⊖1); write Jn={0,…,kn−1}J_n=\{0,\ldots,k_n-1\}Jn​={0,…,kn​−1} for its finite index set. Thus k0=k1=0k_0=k_1=0k0​=k1​=0. For every n∈Nn\in\mathbb Nn∈N and column index j∈Jn={0,…,kn−1}j\in J_n=\{0,\ldots,k_n-1\}j∈Jn​={0,…,kn​−1}, define the name Nn(j)N_n(j)Nn​(j) by the following ordered cases. If j=0j=0j=0, use (e,1,1)(e,1,1)(e,1,1). Otherwise, if j<4n⊖5j<4n\ominus5j<4n⊖5, put i=⌊(j⊖1)/4⌋+2i=\lfloor(j\ominus1)/4\rfloor+2i=⌊(j⊖1)/4⌋+2 and use respectively (d,i,0)(d,i,0)(d,i,0), (e,i,1)(e,i,1)(e,i,1), (b,i,1)(b,i,1)(b,i,1), or (b,i,0)(b,i,0)(b,i,0) according as (j⊖1) mod 4(j\ominus1)\bmod4(j⊖1)mod4 is 000, 111, 222, or anything else. Otherwise, if j<6n⊖7j<6n\ominus7j<6n⊖7, put u=j⊖(4n⊖5)u=j\ominus(4n\ominus5)u=j⊖(4n⊖5) and use (c,⌊u/2⌋+2,b)(c,\lfloor u/2\rfloor+2,b)(c,⌊u/2⌋+2,b), where b=1b=1b=1 exactly when u mod 2=1u\bmod2=1umod2=1. Otherwise, if j<7n⊖7j<7n\ominus7j<7n⊖7, use (e,j⊖(6n⊖7)+1,0)(e,j\ominus(6n\ominus7)+1,0)(e,j⊖(6n⊖7)+1,0). Otherwise, if j<8n⊖8j<8n\ominus8j<8n⊖8, use (d,j⊖(7n⊖7)+2,1)(d,j\ominus(7n\ominus7)+2,1)(d,j⊖(7n⊖7)+2,1). In the last case put u=j⊖(8n⊖8)u=j\ominus(8n\ominus8)u=j⊖(8n⊖8) and use (a,n⊖⌊u/2⌋,b)(a,n\ominus\lfloor u/2\rfloor,b)(a,n⊖⌊u/2⌋,b), where b=1b=1b=1 exactly when u mod 2=0u\bmod2=0umod2=0. There are no column indices when n=0n=0n=0 or n=1n=1n=1. For every name vvv, every kind κ∈K\kappa\in Kκ∈K, every level i∈Ni\in\mathbb Ni∈N, and every Boolean bbb, the rational number δv(κ,i,b)\delta_v(\kappa,i,b)δv​(κ,i,b) is 111 if v=(κ,i,b)v=(\kappa,i,b)v=(κ,i,b) and is 000 otherwise. For every n∈Nn\in\mathbb Nn∈N, define the rational number Sn=2n+1S_n=2n+1Sn​=2n+1, with nnn regarded as a rational number in this formula. In particular, SnS_nSn​ is never zero. For every n∈Nn\in\mathbb Nn∈N, define the rational number εn=1/Sn2n+2\varepsilon_n=1/S_n^{2n+2}εn​=1/Sn2n+2​. For every n∈Nn\in\mathbb Nn∈N, every pair (κ,i)∈K×N(\kappa,i)\in K\times\mathbb N(κ,i)∈K×N, and every name vvv, let xλ,l,b=δv(λ,l,b)x_{\lambda,l,b}=\delta_v(\lambda,l,b)xλ,l,b​=δv​(λ,l,b), o=xκ,i,0+xκ,i,1o=x_{\kappa,i,0}+x_{\kappa,i,1}o=xκ,i,0​+xκ,i,1​, and u=xa,i,1+xb,i,1+xc,i,1+xd,i,1+xe,i,1u=x_{a,i,1}+x_{b,i,1}+x_{c,i,1}+x_{d,i,1}+x_{e,i,1}u=xa,i,1​+xb,i,1​+xc,i,1​+xd,i,1​+xe,i,1​. The rational coefficient Fn((κ,i),v)F_n((\kappa,i),v)Fn​((κ,i),v) is defined by these cases: for κ=a\kappa=aκ=a and i=2i=2i=2, it is o−εn(xb,2,0+xc,2,0+xd,2,0+xe,1,1)o-\varepsilon_n(x_{b,2,0}+x_{c,2,0}+x_{d,2,0}+x_{e,1,1})o−εn​(xb,2,0​+xc,2,0​+xd,2,0​+xe,1,1​); for κ=a\kappa=aκ=a and i≠2i\ne2i=2, it is o−xa,i⊖1,0−εn(xa,i⊖1,1+xb,i⊖1,1+xc,i⊖1,1+xd,i⊖1,1+xe,i⊖1,1)o-x_{a,i\ominus1,0}-\varepsilon_n(x_{a,i\ominus1,1}+x_{b,i\ominus1,1}+x_{c,i\ominus1,1}+x_{d,i\ominus1,1}+x_{e,i\ominus1,1})o−xa,i⊖1,0​−εn​(xa,i⊖1,1​+xb,i⊖1,1​+xc,i⊖1,1​+xd,i⊖1,1​+xe,i⊖1,1​); for κ=b\kappa=bκ=b, it is o−xb,i+1,0−xd,i+1,0o-x_{b,i+1,0}-x_{d,i+1,0}o−xb,i+1,0​−xd,i+1,0​; for κ=c\kappa=cκ=c and i=ni=ni=n, it is o−∑j=0nxe,j,0o-\sum_{j=0}^{n}x_{e,j,0}o−∑j=0n​xe,j,0​, including the term j=0j=0j=0; for κ=c\kappa=cκ=c and i≠ni\ne ni=n, it is o−xc,i+1,0o-x_{c,i+1,0}o−xc,i+1,0​; for κ=d\kappa=dκ=d, it is o−1−εn2uo-\frac{1-\varepsilon_n}{2}uo−21−εn​​u; for κ=e\kappa=eκ=e and i=1i=1i=1, it is o−(1−εn)(xb,2,0+xc,2,0+xd,2,0+xe,1,1)o-(1-\varepsilon_n)(x_{b,2,0}+x_{c,2,0}+x_{d,2,0}+x_{e,1,1})o−(1−εn​)(xb,2,0​+xc,2,0​+xd,2,0​+xe,1,1​); and for κ=e\kappa=eκ=e and i≠1i\ne1i=1, it is o−1−εn2uo-\frac{1-\varepsilon_n}{2}uo−21−εn​​u. The pair and name need not correspond to indices of the program. For every pair n,i∈Nn,i\in\mathbb Nn,i∈N, define the rational reward Gn,i=(−Sn)2i⊖1G_{n,i}=(-S_n)^{2i\ominus1}Gn,i​=(−Sn​)2i⊖1. In particular, Gn,0=1G_{n,0}=1Gn,0​=1 because its exponent is zero. For every pair n,i∈Nn,i\in\mathbb Nn,i∈N, define the rational reward Hn,i=(−Sn)2iH_{n,i}=(-S_n)^{2i}Hn,i​=(−Sn​)2i. In particular, Hn,0=1H_{n,0}=1Hn,0​=1. For every n∈Nn\in\mathbb Nn∈N and every name v=(κ,i,b)v=(\kappa,i,b)v=(κ,i,b), define its rational objective coefficient Dn(v)D_n(v)Dn​(v) as a base contribution plus (Gn,1+εnHn,1)(δv(b,2,0)+δv(c,2,0)+δv(d,2,0))(G_{n,1}+\varepsilon_nH_{n,1})(\delta_v(b,2,0)+\delta_v(c,2,0)+\delta_v(d,2,0))(Gn,1​+εn​Hn,1​)(δv​(b,2,0)+δv​(c,2,0)+δv​(d,2,0)). The base contribution is Gn,i+εnHn,iG_{n,i}+\varepsilon_nH_{n,i}Gn,i​+εn​Hn,i​ when b=1b=1b=1 and κ∈{a,b,c}\kappa\in\{a,b,c\}κ∈{a,b,c}; it is εnHn,i\varepsilon_nH_{n,i}εn​Hn,i​ when b=1b=1b=1 and κ∈{d,e}\kappa\in\{d,e\}κ∈{d,e}; it is 111 when (κ,b)=(e,0)(\kappa,b)=(e,0)(κ,b)=(e,0); and it is 000 in every remaining case. In the subscripts of δv\delta_vδv​, b,c,db,c,db,c,d denote kinds, whereas the last coordinate of the name is the Boolean bbb. This defines a coefficient even for names outside all valid column ranges. For every n∈Nn\in\mathbb Nn∈N, define the rational linear-program data Pn=(An,1,dn)P_n=(A_n,\mathbf1,d_n)Pn​=(An​,1,dn​) with mnm_nmn​ rows and knk_nkn​ columns by (An)rj=Fn(Rn(r),Nn(j))(A_n)_{rj}=F_n(R_n(r),N_n(j))(An​)rj​=Fn​(Rn​(r),Nn​(j)), (1)r=1(\mathbf1)_r=1(1)r​=1, and (dn)j=Dn(Nn(j))(d_n)_j=D_n(N_n(j))(dn​)j​=Dn​(Nn​(j)). The underlying linear-program type stores only a rational matrix, right-hand-side vector, and objective vector; it does not impose feasibility, rank, boundedness, or sign conditions. Its rational feasible points are the vectors x∈QJnx\in\mathbb Q^{J_n}x∈QJn​ with Anx=1A_nx=\mathbf1An​x=1 and xj≥0x_j\ge0xj​≥0 for every j∈Jnj\in J_nj∈Jn​, and its objective at xxx is ∑j∈Jn(dn)jxj\sum_{j\in J_n}(d_n)_jx_j∑j∈Jn​​(dn​)j​xj​. For n=0n=0n=0 or n=1n=1n=1, both index sets are empty. For every n∈Nn\in\mathbb Nn∈N and every name (κ,i,b)(\kappa,i,b)(κ,i,b), define its natural-number rank Cn(κ,i,b)C_n(\kappa,i,b)Cn​(κ,i,b) as follows: Cn(e,i,1)=0C_n(e,i,1)=0Cn​(e,i,1)=0 if i=1i=1i=1, and Cn(e,i,1)=4(i⊖2)+2C_n(e,i,1)=4(i\ominus2)+2Cn​(e,i,1)=4(i⊖2)+2 otherwise; Cn(d,i,0)=4(i⊖2)+1C_n(d,i,0)=4(i\ominus2)+1Cn​(d,i,0)=4(i⊖2)+1; Cn(b,i,1)=4(i⊖2)+3C_n(b,i,1)=4(i\ominus2)+3Cn​(b,i,1)=4(i⊖2)+3; Cn(b,i,0)=4(i⊖2)+4C_n(b,i,0)=4(i\ominus2)+4Cn​(b,i,0)=4(i⊖2)+4; Cn(c,i,0)=(4n⊖5)+2(i⊖2)C_n(c,i,0)=(4n\ominus5)+2(i\ominus2)Cn​(c,i,0)=(4n⊖5)+2(i⊖2); Cn(c,i,1)=(4n⊖5)+2(i⊖2)+1C_n(c,i,1)=(4n\ominus5)+2(i\ominus2)+1Cn​(c,i,1)=(4n⊖5)+2(i⊖2)+1; Cn(e,i,0)=(6n⊖7)+(i⊖1)C_n(e,i,0)=(6n\ominus7)+(i\ominus1)Cn​(e,i,0)=(6n⊖7)+(i⊖1); Cn(d,i,1)=(7n⊖7)+(i⊖2)C_n(d,i,1)=(7n\ominus7)+(i\ominus2)Cn​(d,i,1)=(7n⊖7)+(i⊖2); Cn(a,i,1)=(8n⊖8)+2(n⊖i)C_n(a,i,1)=(8n\ominus8)+2(n\ominus i)Cn​(a,i,1)=(8n⊖8)+2(n⊖i); and Cn(a,i,0)=(8n⊖8)+2(n⊖i)+1C_n(a,i,0)=(8n\ominus8)+2(n\ominus i)+1Cn​(a,i,0)=(8n⊖8)+2(n⊖i)+1. The function is defined on every name, including levels outside the row or column ranges, and its output is a natural number, without a bound by knk_nkn​. For every n∈Nn\in\mathbb Nn∈N, every supplied proof of 3≤n3\le n3≤n, every row r∈Inr\in I_nr∈In​, and every Boolean bbb, the column for this action is jn(r,b)=Cn(κ,i,b) mod knj_n(r,b)=C_n(\kappa,i,b)\bmod k_njn​(r,b)=Cn​(κ,i,b)modkn​, where (κ,i)=Rn(r)(\kappa,i)=R_n(r)(κ,i)=Rn​(r). The positive column count makes this a member of JnJ_nJn​. For every n∈Nn\in\mathbb Nn∈N, every supplied proof of 3≤n3\le n3≤n, every pair of rows r,q∈Inr,q\in I_nr,q∈In​, and every Boolean bbb, define the rational number pn(r,b,q)=1q=r−(An)q,jn(r,b)p_n(r,b,q)=\mathbf1_{q=r}-(A_n)_{q,j_n(r,b)}pn​(r,b,q)=1q=r​−(An​)q,jn​(r,b)​, where 1q=r\mathbf1_{q=r}1q=r​ is 111 when q=rq=rq=r and 000 otherwise. The definition itself includes no assertion about its sign or about any sum of such numbers.

actionReward. All indices and parameters described as natural numbers include zero. In the formulas below, a⊖b=max⁡(a−b,0)a\ominus b=\max(a-b,0)a⊖b=max(a−b,0) denotes subtraction in the natural numbers, ⌊a/b⌋\lfloor a/b\rfloor⌊a/b⌋ denotes natural-number division, and a mod ba\bmod bamodb denotes natural-number remainder. Boolean values are written 000 for false and 111 for true, and bˉ\bar bbˉ denotes their negation. A finite index set of size zero is empty. A rational matrix inverse is the total matrix inverse, which is the zero matrix when its determinant is zero; no nonzero-determinant condition is implicit in the notation. The type KKK consists of exactly five distinct constructors, denoted a,b,c,d,ea,b,c,d,ea,b,c,d,e, with decidable equality. For every n∈Nn\in\mathbb Nn∈N, the number of rows is mn=5(n⊖1)m_n=5(n\ominus1)mn​=5(n⊖1); write In={0,…,mn−1}I_n=\{0,\ldots,m_n-1\}In​={0,…,mn​−1} for its finite index set. Thus m0=m1=0m_0=m_1=0m0​=m1​=0. For every n∈Nn\in\mathbb Nn∈N and row index r∈In={0,…,mn−1}r\in I_n=\{0,\ldots,m_n-1\}r∈In​={0,…,mn​−1}, define its kind and level Rn(r)R_n(r)Rn​(r) by the following ordered cases: if r<n⊖1r<n\ominus1r<n⊖1, it is (a,r+2)(a,r+2)(a,r+2); otherwise, if r<(n⊖1)+(n⊖2)r<(n\ominus1)+(n\ominus2)r<(n⊖1)+(n⊖2), it is (b,r⊖(n⊖1)+2)(b,r\ominus(n\ominus1)+2)(b,r⊖(n⊖1)+2); otherwise, if r<2(n⊖1)+(n⊖2)r<2(n\ominus1)+(n\ominus2)r<2(n⊖1)+(n⊖2), it is (c,r⊖((n⊖1)+(n⊖2))+2)(c,r\ominus((n\ominus1)+(n\ominus2))+2)(c,r⊖((n⊖1)+(n⊖2))+2); otherwise, if r<3(n⊖1)+(n⊖2)r<3(n\ominus1)+(n\ominus2)r<3(n⊖1)+(n⊖2), it is (d,r⊖(2(n⊖1)+(n⊖2))+2)(d,r\ominus(2(n\ominus1)+(n\ominus2))+2)(d,r⊖(2(n⊖1)+(n⊖2))+2); otherwise it is (e,r⊖(3(n⊖1)+(n⊖2))+1)(e,r\ominus(3(n\ominus1)+(n\ominus2))+1)(e,r⊖(3(n⊖1)+(n⊖2))+1). There are no row indices when n=0n=0n=0 or n=1n=1n=1. A name is a triple v=(κ,i,b)v=(\kappa,i,b)v=(κ,i,b) with kind κ∈K\kappa\in Kκ∈K, level i∈Ni\in\mathbb Ni∈N, and Boolean value b∈{0,1}b\in\{0,1\}b∈{0,1}. There are no restrictions on the level or on combinations of fields. Equality of names is decidable. For every n∈Nn\in\mathbb Nn∈N, the number of columns is kn=10(n⊖1)k_n=10(n\ominus1)kn​=10(n⊖1); write Jn={0,…,kn−1}J_n=\{0,\ldots,k_n-1\}Jn​={0,…,kn​−1} for its finite index set. Thus k0=k1=0k_0=k_1=0k0​=k1​=0. For every n∈Nn\in\mathbb Nn∈N and column index j∈Jn={0,…,kn−1}j\in J_n=\{0,\ldots,k_n-1\}j∈Jn​={0,…,kn​−1}, define the name Nn(j)N_n(j)Nn​(j) by the following ordered cases. If j=0j=0j=0, use (e,1,1)(e,1,1)(e,1,1). Otherwise, if j<4n⊖5j<4n\ominus5j<4n⊖5, put i=⌊(j⊖1)/4⌋+2i=\lfloor(j\ominus1)/4\rfloor+2i=⌊(j⊖1)/4⌋+2 and use respectively (d,i,0)(d,i,0)(d,i,0), (e,i,1)(e,i,1)(e,i,1), (b,i,1)(b,i,1)(b,i,1), or (b,i,0)(b,i,0)(b,i,0) according as (j⊖1) mod 4(j\ominus1)\bmod4(j⊖1)mod4 is 000, 111, 222, or anything else. Otherwise, if j<6n⊖7j<6n\ominus7j<6n⊖7, put u=j⊖(4n⊖5)u=j\ominus(4n\ominus5)u=j⊖(4n⊖5) and use (c,⌊u/2⌋+2,b)(c,\lfloor u/2\rfloor+2,b)(c,⌊u/2⌋+2,b), where b=1b=1b=1 exactly when u mod 2=1u\bmod2=1umod2=1. Otherwise, if j<7n⊖7j<7n\ominus7j<7n⊖7, use (e,j⊖(6n⊖7)+1,0)(e,j\ominus(6n\ominus7)+1,0)(e,j⊖(6n⊖7)+1,0). Otherwise, if j<8n⊖8j<8n\ominus8j<8n⊖8, use (d,j⊖(7n⊖7)+2,1)(d,j\ominus(7n\ominus7)+2,1)(d,j⊖(7n⊖7)+2,1). In the last case put u=j⊖(8n⊖8)u=j\ominus(8n\ominus8)u=j⊖(8n⊖8) and use (a,n⊖⌊u/2⌋,b)(a,n\ominus\lfloor u/2\rfloor,b)(a,n⊖⌊u/2⌋,b), where b=1b=1b=1 exactly when u mod 2=0u\bmod2=0umod2=0. There are no column indices when n=0n=0n=0 or n=1n=1n=1. For every name vvv, every kind κ∈K\kappa\in Kκ∈K, every level i∈Ni\in\mathbb Ni∈N, and every Boolean bbb, the rational number δv(κ,i,b)\delta_v(\kappa,i,b)δv​(κ,i,b) is 111 if v=(κ,i,b)v=(\kappa,i,b)v=(κ,i,b) and is 000 otherwise. For every n∈Nn\in\mathbb Nn∈N, define the rational number Sn=2n+1S_n=2n+1Sn​=2n+1, with nnn regarded as a rational number in this formula. In particular, SnS_nSn​ is never zero. For every n∈Nn\in\mathbb Nn∈N, define the rational number εn=1/Sn2n+2\varepsilon_n=1/S_n^{2n+2}εn​=1/Sn2n+2​. For every n∈Nn\in\mathbb Nn∈N, every pair (κ,i)∈K×N(\kappa,i)\in K\times\mathbb N(κ,i)∈K×N, and every name vvv, let xλ,l,b=δv(λ,l,b)x_{\lambda,l,b}=\delta_v(\lambda,l,b)xλ,l,b​=δv​(λ,l,b), o=xκ,i,0+xκ,i,1o=x_{\kappa,i,0}+x_{\kappa,i,1}o=xκ,i,0​+xκ,i,1​, and u=xa,i,1+xb,i,1+xc,i,1+xd,i,1+xe,i,1u=x_{a,i,1}+x_{b,i,1}+x_{c,i,1}+x_{d,i,1}+x_{e,i,1}u=xa,i,1​+xb,i,1​+xc,i,1​+xd,i,1​+xe,i,1​. The rational coefficient Fn((κ,i),v)F_n((\kappa,i),v)Fn​((κ,i),v) is defined by these cases: for κ=a\kappa=aκ=a and i=2i=2i=2, it is o−εn(xb,2,0+xc,2,0+xd,2,0+xe,1,1)o-\varepsilon_n(x_{b,2,0}+x_{c,2,0}+x_{d,2,0}+x_{e,1,1})o−εn​(xb,2,0​+xc,2,0​+xd,2,0​+xe,1,1​); for κ=a\kappa=aκ=a and i≠2i\ne2i=2, it is o−xa,i⊖1,0−εn(xa,i⊖1,1+xb,i⊖1,1+xc,i⊖1,1+xd,i⊖1,1+xe,i⊖1,1)o-x_{a,i\ominus1,0}-\varepsilon_n(x_{a,i\ominus1,1}+x_{b,i\ominus1,1}+x_{c,i\ominus1,1}+x_{d,i\ominus1,1}+x_{e,i\ominus1,1})o−xa,i⊖1,0​−εn​(xa,i⊖1,1​+xb,i⊖1,1​+xc,i⊖1,1​+xd,i⊖1,1​+xe,i⊖1,1​); for κ=b\kappa=bκ=b, it is o−xb,i+1,0−xd,i+1,0o-x_{b,i+1,0}-x_{d,i+1,0}o−xb,i+1,0​−xd,i+1,0​; for κ=c\kappa=cκ=c and i=ni=ni=n, it is o−∑j=0nxe,j,0o-\sum_{j=0}^{n}x_{e,j,0}o−∑j=0n​xe,j,0​, including the term j=0j=0j=0; for κ=c\kappa=cκ=c and i≠ni\ne ni=n, it is o−xc,i+1,0o-x_{c,i+1,0}o−xc,i+1,0​; for κ=d\kappa=dκ=d, it is o−1−εn2uo-\frac{1-\varepsilon_n}{2}uo−21−εn​​u; for κ=e\kappa=eκ=e and i=1i=1i=1, it is o−(1−εn)(xb,2,0+xc,2,0+xd,2,0+xe,1,1)o-(1-\varepsilon_n)(x_{b,2,0}+x_{c,2,0}+x_{d,2,0}+x_{e,1,1})o−(1−εn​)(xb,2,0​+xc,2,0​+xd,2,0​+xe,1,1​); and for κ=e\kappa=eκ=e and i≠1i\ne1i=1, it is o−1−εn2uo-\frac{1-\varepsilon_n}{2}uo−21−εn​​u. The pair and name need not correspond to indices of the program. For every pair n,i∈Nn,i\in\mathbb Nn,i∈N, define the rational reward Gn,i=(−Sn)2i⊖1G_{n,i}=(-S_n)^{2i\ominus1}Gn,i​=(−Sn​)2i⊖1. In particular, Gn,0=1G_{n,0}=1Gn,0​=1 because its exponent is zero. For every pair n,i∈Nn,i\in\mathbb Nn,i∈N, define the rational reward Hn,i=(−Sn)2iH_{n,i}=(-S_n)^{2i}Hn,i​=(−Sn​)2i. In particular, Hn,0=1H_{n,0}=1Hn,0​=1. For every n∈Nn\in\mathbb Nn∈N and every name v=(κ,i,b)v=(\kappa,i,b)v=(κ,i,b), define its rational objective coefficient Dn(v)D_n(v)Dn​(v) as a base contribution plus (Gn,1+εnHn,1)(δv(b,2,0)+δv(c,2,0)+δv(d,2,0))(G_{n,1}+\varepsilon_nH_{n,1})(\delta_v(b,2,0)+\delta_v(c,2,0)+\delta_v(d,2,0))(Gn,1​+εn​Hn,1​)(δv​(b,2,0)+δv​(c,2,0)+δv​(d,2,0)). The base contribution is Gn,i+εnHn,iG_{n,i}+\varepsilon_nH_{n,i}Gn,i​+εn​Hn,i​ when b=1b=1b=1 and κ∈{a,b,c}\kappa\in\{a,b,c\}κ∈{a,b,c}; it is εnHn,i\varepsilon_nH_{n,i}εn​Hn,i​ when b=1b=1b=1 and κ∈{d,e}\kappa\in\{d,e\}κ∈{d,e}; it is 111 when (κ,b)=(e,0)(\kappa,b)=(e,0)(κ,b)=(e,0); and it is 000 in every remaining case. In the subscripts of δv\delta_vδv​, b,c,db,c,db,c,d denote kinds, whereas the last coordinate of the name is the Boolean bbb. This defines a coefficient even for names outside all valid column ranges. For every n∈Nn\in\mathbb Nn∈N, define the rational linear-program data Pn=(An,1,dn)P_n=(A_n,\mathbf1,d_n)Pn​=(An​,1,dn​) with mnm_nmn​ rows and knk_nkn​ columns by (An)rj=Fn(Rn(r),Nn(j))(A_n)_{rj}=F_n(R_n(r),N_n(j))(An​)rj​=Fn​(Rn​(r),Nn​(j)), (1)r=1(\mathbf1)_r=1(1)r​=1, and (dn)j=Dn(Nn(j))(d_n)_j=D_n(N_n(j))(dn​)j​=Dn​(Nn​(j)). The underlying linear-program type stores only a rational matrix, right-hand-side vector, and objective vector; it does not impose feasibility, rank, boundedness, or sign conditions. Its rational feasible points are the vectors x∈QJnx\in\mathbb Q^{J_n}x∈QJn​ with Anx=1A_nx=\mathbf1An​x=1 and xj≥0x_j\ge0xj​≥0 for every j∈Jnj\in J_nj∈Jn​, and its objective at xxx is ∑j∈Jn(dn)jxj\sum_{j\in J_n}(d_n)_jx_j∑j∈Jn​​(dn​)j​xj​. For n=0n=0n=0 or n=1n=1n=1, both index sets are empty. For every n∈Nn\in\mathbb Nn∈N and every name (κ,i,b)(\kappa,i,b)(κ,i,b), define its natural-number rank Cn(κ,i,b)C_n(\kappa,i,b)Cn​(κ,i,b) as follows: Cn(e,i,1)=0C_n(e,i,1)=0Cn​(e,i,1)=0 if i=1i=1i=1, and Cn(e,i,1)=4(i⊖2)+2C_n(e,i,1)=4(i\ominus2)+2Cn​(e,i,1)=4(i⊖2)+2 otherwise; Cn(d,i,0)=4(i⊖2)+1C_n(d,i,0)=4(i\ominus2)+1Cn​(d,i,0)=4(i⊖2)+1; Cn(b,i,1)=4(i⊖2)+3C_n(b,i,1)=4(i\ominus2)+3Cn​(b,i,1)=4(i⊖2)+3; Cn(b,i,0)=4(i⊖2)+4C_n(b,i,0)=4(i\ominus2)+4Cn​(b,i,0)=4(i⊖2)+4; Cn(c,i,0)=(4n⊖5)+2(i⊖2)C_n(c,i,0)=(4n\ominus5)+2(i\ominus2)Cn​(c,i,0)=(4n⊖5)+2(i⊖2); Cn(c,i,1)=(4n⊖5)+2(i⊖2)+1C_n(c,i,1)=(4n\ominus5)+2(i\ominus2)+1Cn​(c,i,1)=(4n⊖5)+2(i⊖2)+1; Cn(e,i,0)=(6n⊖7)+(i⊖1)C_n(e,i,0)=(6n\ominus7)+(i\ominus1)Cn​(e,i,0)=(6n⊖7)+(i⊖1); Cn(d,i,1)=(7n⊖7)+(i⊖2)C_n(d,i,1)=(7n\ominus7)+(i\ominus2)Cn​(d,i,1)=(7n⊖7)+(i⊖2); Cn(a,i,1)=(8n⊖8)+2(n⊖i)C_n(a,i,1)=(8n\ominus8)+2(n\ominus i)Cn​(a,i,1)=(8n⊖8)+2(n⊖i); and Cn(a,i,0)=(8n⊖8)+2(n⊖i)+1C_n(a,i,0)=(8n\ominus8)+2(n\ominus i)+1Cn​(a,i,0)=(8n⊖8)+2(n⊖i)+1. The function is defined on every name, including levels outside the row or column ranges, and its output is a natural number, without a bound by knk_nkn​. For every n∈Nn\in\mathbb Nn∈N, every supplied proof of 3≤n3\le n3≤n, every row r∈Inr\in I_nr∈In​, and every Boolean bbb, the column for this action is jn(r,b)=Cn(κ,i,b) mod knj_n(r,b)=C_n(\kappa,i,b)\bmod k_njn​(r,b)=Cn​(κ,i,b)modkn​, where (κ,i)=Rn(r)(\kappa,i)=R_n(r)(κ,i)=Rn​(r). The positive column count makes this a member of JnJ_nJn​. For every n∈Nn\in\mathbb Nn∈N, every supplied proof of 3≤n3\le n3≤n, every row r∈Inr\in I_nr∈In​, and every Boolean bbb, define the rational action reward an(r,b)=(dn)jn(r,b)a_n(r,b)=(d_n)_{j_n(r,b)}an​(r,b)=(dn​)jn​(r,b)​.

policyValue. All indices and parameters described as natural numbers include zero. In the formulas below, a⊖b=max⁡(a−b,0)a\ominus b=\max(a-b,0)a⊖b=max(a−b,0) denotes subtraction in the natural numbers, ⌊a/b⌋\lfloor a/b\rfloor⌊a/b⌋ denotes natural-number division, and a mod ba\bmod bamodb denotes natural-number remainder. Boolean values are written 000 for false and 111 for true, and bˉ\bar bbˉ denotes their negation. A finite index set of size zero is empty. A rational matrix inverse is the total matrix inverse, which is the zero matrix when its determinant is zero; no nonzero-determinant condition is implicit in the notation. The type KKK consists of exactly five distinct constructors, denoted a,b,c,d,ea,b,c,d,ea,b,c,d,e, with decidable equality. For every n∈Nn\in\mathbb Nn∈N, the number of rows is mn=5(n⊖1)m_n=5(n\ominus1)mn​=5(n⊖1); write In={0,…,mn−1}I_n=\{0,\ldots,m_n-1\}In​={0,…,mn​−1} for its finite index set. Thus m0=m1=0m_0=m_1=0m0​=m1​=0. For every n∈Nn\in\mathbb Nn∈N and row index r∈In={0,…,mn−1}r\in I_n=\{0,\ldots,m_n-1\}r∈In​={0,…,mn​−1}, define its kind and level Rn(r)R_n(r)Rn​(r) by the following ordered cases: if r<n⊖1r<n\ominus1r<n⊖1, it is (a,r+2)(a,r+2)(a,r+2); otherwise, if r<(n⊖1)+(n⊖2)r<(n\ominus1)+(n\ominus2)r<(n⊖1)+(n⊖2), it is (b,r⊖(n⊖1)+2)(b,r\ominus(n\ominus1)+2)(b,r⊖(n⊖1)+2); otherwise, if r<2(n⊖1)+(n⊖2)r<2(n\ominus1)+(n\ominus2)r<2(n⊖1)+(n⊖2), it is (c,r⊖((n⊖1)+(n⊖2))+2)(c,r\ominus((n\ominus1)+(n\ominus2))+2)(c,r⊖((n⊖1)+(n⊖2))+2); otherwise, if r<3(n⊖1)+(n⊖2)r<3(n\ominus1)+(n\ominus2)r<3(n⊖1)+(n⊖2), it is (d,r⊖(2(n⊖1)+(n⊖2))+2)(d,r\ominus(2(n\ominus1)+(n\ominus2))+2)(d,r⊖(2(n⊖1)+(n⊖2))+2); otherwise it is (e,r⊖(3(n⊖1)+(n⊖2))+1)(e,r\ominus(3(n\ominus1)+(n\ominus2))+1)(e,r⊖(3(n⊖1)+(n⊖2))+1). There are no row indices when n=0n=0n=0 or n=1n=1n=1. A name is a triple v=(κ,i,b)v=(\kappa,i,b)v=(κ,i,b) with kind κ∈K\kappa\in Kκ∈K, level i∈Ni\in\mathbb Ni∈N, and Boolean value b∈{0,1}b\in\{0,1\}b∈{0,1}. There are no restrictions on the level or on combinations of fields. Equality of names is decidable. For every n∈Nn\in\mathbb Nn∈N, the number of columns is kn=10(n⊖1)k_n=10(n\ominus1)kn​=10(n⊖1); write Jn={0,…,kn−1}J_n=\{0,\ldots,k_n-1\}Jn​={0,…,kn​−1} for its finite index set. Thus k0=k1=0k_0=k_1=0k0​=k1​=0. For every n∈Nn\in\mathbb Nn∈N and column index j∈Jn={0,…,kn−1}j\in J_n=\{0,\ldots,k_n-1\}j∈Jn​={0,…,kn​−1}, define the name Nn(j)N_n(j)Nn​(j) by the following ordered cases. If j=0j=0j=0, use (e,1,1)(e,1,1)(e,1,1). Otherwise, if j<4n⊖5j<4n\ominus5j<4n⊖5, put i=⌊(j⊖1)/4⌋+2i=\lfloor(j\ominus1)/4\rfloor+2i=⌊(j⊖1)/4⌋+2 and use respectively (d,i,0)(d,i,0)(d,i,0), (e,i,1)(e,i,1)(e,i,1), (b,i,1)(b,i,1)(b,i,1), or (b,i,0)(b,i,0)(b,i,0) according as (j⊖1) mod 4(j\ominus1)\bmod4(j⊖1)mod4 is 000, 111, 222, or anything else. Otherwise, if j<6n⊖7j<6n\ominus7j<6n⊖7, put u=j⊖(4n⊖5)u=j\ominus(4n\ominus5)u=j⊖(4n⊖5) and use (c,⌊u/2⌋+2,b)(c,\lfloor u/2\rfloor+2,b)(c,⌊u/2⌋+2,b), where b=1b=1b=1 exactly when u mod 2=1u\bmod2=1umod2=1. Otherwise, if j<7n⊖7j<7n\ominus7j<7n⊖7, use (e,j⊖(6n⊖7)+1,0)(e,j\ominus(6n\ominus7)+1,0)(e,j⊖(6n⊖7)+1,0). Otherwise, if j<8n⊖8j<8n\ominus8j<8n⊖8, use (d,j⊖(7n⊖7)+2,1)(d,j\ominus(7n\ominus7)+2,1)(d,j⊖(7n⊖7)+2,1). In the last case put u=j⊖(8n⊖8)u=j\ominus(8n\ominus8)u=j⊖(8n⊖8) and use (a,n⊖⌊u/2⌋,b)(a,n\ominus\lfloor u/2\rfloor,b)(a,n⊖⌊u/2⌋,b), where b=1b=1b=1 exactly when u mod 2=0u\bmod2=0umod2=0. There are no column indices when n=0n=0n=0 or n=1n=1n=1. For every name vvv, every kind κ∈K\kappa\in Kκ∈K, every level i∈Ni\in\mathbb Ni∈N, and every Boolean bbb, the rational number δv(κ,i,b)\delta_v(\kappa,i,b)δv​(κ,i,b) is 111 if v=(κ,i,b)v=(\kappa,i,b)v=(κ,i,b) and is 000 otherwise. For every n∈Nn\in\mathbb Nn∈N, define the rational number Sn=2n+1S_n=2n+1Sn​=2n+1, with nnn regarded as a rational number in this formula. In particular, SnS_nSn​ is never zero. For every n∈Nn\in\mathbb Nn∈N, define the rational number εn=1/Sn2n+2\varepsilon_n=1/S_n^{2n+2}εn​=1/Sn2n+2​. For every n∈Nn\in\mathbb Nn∈N, every pair (κ,i)∈K×N(\kappa,i)\in K\times\mathbb N(κ,i)∈K×N, and every name vvv, let xλ,l,b=δv(λ,l,b)x_{\lambda,l,b}=\delta_v(\lambda,l,b)xλ,l,b​=δv​(λ,l,b), o=xκ,i,0+xκ,i,1o=x_{\kappa,i,0}+x_{\kappa,i,1}o=xκ,i,0​+xκ,i,1​, and u=xa,i,1+xb,i,1+xc,i,1+xd,i,1+xe,i,1u=x_{a,i,1}+x_{b,i,1}+x_{c,i,1}+x_{d,i,1}+x_{e,i,1}u=xa,i,1​+xb,i,1​+xc,i,1​+xd,i,1​+xe,i,1​. The rational coefficient Fn((κ,i),v)F_n((\kappa,i),v)Fn​((κ,i),v) is defined by these cases: for κ=a\kappa=aκ=a and i=2i=2i=2, it is o−εn(xb,2,0+xc,2,0+xd,2,0+xe,1,1)o-\varepsilon_n(x_{b,2,0}+x_{c,2,0}+x_{d,2,0}+x_{e,1,1})o−εn​(xb,2,0​+xc,2,0​+xd,2,0​+xe,1,1​); for κ=a\kappa=aκ=a and i≠2i\ne2i=2, it is o−xa,i⊖1,0−εn(xa,i⊖1,1+xb,i⊖1,1+xc,i⊖1,1+xd,i⊖1,1+xe,i⊖1,1)o-x_{a,i\ominus1,0}-\varepsilon_n(x_{a,i\ominus1,1}+x_{b,i\ominus1,1}+x_{c,i\ominus1,1}+x_{d,i\ominus1,1}+x_{e,i\ominus1,1})o−xa,i⊖1,0​−εn​(xa,i⊖1,1​+xb,i⊖1,1​+xc,i⊖1,1​+xd,i⊖1,1​+xe,i⊖1,1​); for κ=b\kappa=bκ=b, it is o−xb,i+1,0−xd,i+1,0o-x_{b,i+1,0}-x_{d,i+1,0}o−xb,i+1,0​−xd,i+1,0​; for κ=c\kappa=cκ=c and i=ni=ni=n, it is o−∑j=0nxe,j,0o-\sum_{j=0}^{n}x_{e,j,0}o−∑j=0n​xe,j,0​, including the term j=0j=0j=0; for κ=c\kappa=cκ=c and i≠ni\ne ni=n, it is o−xc,i+1,0o-x_{c,i+1,0}o−xc,i+1,0​; for κ=d\kappa=dκ=d, it is o−1−εn2uo-\frac{1-\varepsilon_n}{2}uo−21−εn​​u; for κ=e\kappa=eκ=e and i=1i=1i=1, it is o−(1−εn)(xb,2,0+xc,2,0+xd,2,0+xe,1,1)o-(1-\varepsilon_n)(x_{b,2,0}+x_{c,2,0}+x_{d,2,0}+x_{e,1,1})o−(1−εn​)(xb,2,0​+xc,2,0​+xd,2,0​+xe,1,1​); and for κ=e\kappa=eκ=e and i≠1i\ne1i=1, it is o−1−εn2uo-\frac{1-\varepsilon_n}{2}uo−21−εn​​u. The pair and name need not correspond to indices of the program. For every pair n,i∈Nn,i\in\mathbb Nn,i∈N, define the rational reward Gn,i=(−Sn)2i⊖1G_{n,i}=(-S_n)^{2i\ominus1}Gn,i​=(−Sn​)2i⊖1. In particular, Gn,0=1G_{n,0}=1Gn,0​=1 because its exponent is zero. For every pair n,i∈Nn,i\in\mathbb Nn,i∈N, define the rational reward Hn,i=(−Sn)2iH_{n,i}=(-S_n)^{2i}Hn,i​=(−Sn​)2i. In particular, Hn,0=1H_{n,0}=1Hn,0​=1. For every n∈Nn\in\mathbb Nn∈N and every name v=(κ,i,b)v=(\kappa,i,b)v=(κ,i,b), define its rational objective coefficient Dn(v)D_n(v)Dn​(v) as a base contribution plus (Gn,1+εnHn,1)(δv(b,2,0)+δv(c,2,0)+δv(d,2,0))(G_{n,1}+\varepsilon_nH_{n,1})(\delta_v(b,2,0)+\delta_v(c,2,0)+\delta_v(d,2,0))(Gn,1​+εn​Hn,1​)(δv​(b,2,0)+δv​(c,2,0)+δv​(d,2,0)). The base contribution is Gn,i+εnHn,iG_{n,i}+\varepsilon_nH_{n,i}Gn,i​+εn​Hn,i​ when b=1b=1b=1 and κ∈{a,b,c}\kappa\in\{a,b,c\}κ∈{a,b,c}; it is εnHn,i\varepsilon_nH_{n,i}εn​Hn,i​ when b=1b=1b=1 and κ∈{d,e}\kappa\in\{d,e\}κ∈{d,e}; it is 111 when (κ,b)=(e,0)(\kappa,b)=(e,0)(κ,b)=(e,0); and it is 000 in every remaining case. In the subscripts of δv\delta_vδv​, b,c,db,c,db,c,d denote kinds, whereas the last coordinate of the name is the Boolean bbb. This defines a coefficient even for names outside all valid column ranges. For every n∈Nn\in\mathbb Nn∈N, define the rational linear-program data Pn=(An,1,dn)P_n=(A_n,\mathbf1,d_n)Pn​=(An​,1,dn​) with mnm_nmn​ rows and knk_nkn​ columns by (An)rj=Fn(Rn(r),Nn(j))(A_n)_{rj}=F_n(R_n(r),N_n(j))(An​)rj​=Fn​(Rn​(r),Nn​(j)), (1)r=1(\mathbf1)_r=1(1)r​=1, and (dn)j=Dn(Nn(j))(d_n)_j=D_n(N_n(j))(dn​)j​=Dn​(Nn​(j)). The underlying linear-program type stores only a rational matrix, right-hand-side vector, and objective vector; it does not impose feasibility, rank, boundedness, or sign conditions. Its rational feasible points are the vectors x∈QJnx\in\mathbb Q^{J_n}x∈QJn​ with Anx=1A_nx=\mathbf1An​x=1 and xj≥0x_j\ge0xj​≥0 for every j∈Jnj\in J_nj∈Jn​, and its objective at xxx is ∑j∈Jn(dn)jxj\sum_{j\in J_n}(d_n)_jx_j∑j∈Jn​​(dn​)j​xj​. For n=0n=0n=0 or n=1n=1n=1, both index sets are empty. For every n∈Nn\in\mathbb Nn∈N and every name (κ,i,b)(\kappa,i,b)(κ,i,b), define its natural-number rank Cn(κ,i,b)C_n(\kappa,i,b)Cn​(κ,i,b) as follows: Cn(e,i,1)=0C_n(e,i,1)=0Cn​(e,i,1)=0 if i=1i=1i=1, and Cn(e,i,1)=4(i⊖2)+2C_n(e,i,1)=4(i\ominus2)+2Cn​(e,i,1)=4(i⊖2)+2 otherwise; Cn(d,i,0)=4(i⊖2)+1C_n(d,i,0)=4(i\ominus2)+1Cn​(d,i,0)=4(i⊖2)+1; Cn(b,i,1)=4(i⊖2)+3C_n(b,i,1)=4(i\ominus2)+3Cn​(b,i,1)=4(i⊖2)+3; Cn(b,i,0)=4(i⊖2)+4C_n(b,i,0)=4(i\ominus2)+4Cn​(b,i,0)=4(i⊖2)+4; Cn(c,i,0)=(4n⊖5)+2(i⊖2)C_n(c,i,0)=(4n\ominus5)+2(i\ominus2)Cn​(c,i,0)=(4n⊖5)+2(i⊖2); Cn(c,i,1)=(4n⊖5)+2(i⊖2)+1C_n(c,i,1)=(4n\ominus5)+2(i\ominus2)+1Cn​(c,i,1)=(4n⊖5)+2(i⊖2)+1; Cn(e,i,0)=(6n⊖7)+(i⊖1)C_n(e,i,0)=(6n\ominus7)+(i\ominus1)Cn​(e,i,0)=(6n⊖7)+(i⊖1); Cn(d,i,1)=(7n⊖7)+(i⊖2)C_n(d,i,1)=(7n\ominus7)+(i\ominus2)Cn​(d,i,1)=(7n⊖7)+(i⊖2); Cn(a,i,1)=(8n⊖8)+2(n⊖i)C_n(a,i,1)=(8n\ominus8)+2(n\ominus i)Cn​(a,i,1)=(8n⊖8)+2(n⊖i); and Cn(a,i,0)=(8n⊖8)+2(n⊖i)+1C_n(a,i,0)=(8n\ominus8)+2(n\ominus i)+1Cn​(a,i,0)=(8n⊖8)+2(n⊖i)+1. The function is defined on every name, including levels outside the row or column ranges, and its output is a natural number, without a bound by knk_nkn​. For every n∈Nn\in\mathbb Nn∈N, every supplied proof of 3≤n3\le n3≤n, every row r∈Inr\in I_nr∈In​, and every Boolean bbb, the column for this action is jn(r,b)=Cn(κ,i,b) mod knj_n(r,b)=C_n(\kappa,i,b)\bmod k_njn​(r,b)=Cn​(κ,i,b)modkn​, where (κ,i)=Rn(r)(\kappa,i)=R_n(r)(κ,i)=Rn​(r). The positive column count makes this a member of JnJ_nJn​. For every n∈Nn\in\mathbb Nn∈N, a policy is any function σ:In→{0,1}\sigma:I_n\to\{0,1\}σ:In​→{0,1}. No additional conditions are imposed. For n=0n=0n=0 or n=1n=1n=1, there is exactly one such function, the empty function. For every n∈Nn\in\mathbb Nn∈N, every supplied proof of 3≤n3\le n3≤n, and every policy σ\sigmaσ, define the row-to-column function Bn,σ(r)=jn(r,σ(r))B_{n,\sigma}(r)=j_n(r,\sigma(r))Bn,σ​(r)=jn​(r,σ(r)) for every r∈Inr\in I_nr∈In​. Calling this function a basis imposes no injectivity, determinant, or feasibility condition. For every n∈Nn\in\mathbb Nn∈N, every supplied proof of 3≤n3\le n3≤n, every row r∈Inr\in I_nr∈In​, and every Boolean bbb, define the rational action reward an(r,b)=(dn)jn(r,b)a_n(r,b)=(d_n)_{j_n(r,b)}an​(r,b)=(dn​)jn​(r,b)​. For every n∈Nn\in\mathbb Nn∈N, every supplied proof of 3≤n3\le n3≤n, and every policy σ\sigmaσ, form the square matrix Mn,σM_{n,\sigma}Mn,σ​ indexed by InI_nIn​ in both coordinates, with (Mn,σ)q,r=(An)q,Bn,σ(r)(M_{n,\sigma})_{q,r}=(A_n)_{q,B_{n,\sigma}(r)}(Mn,σ​)q,r​=(An​)q,Bn,σ​(r)​. Define the rational value vector vn,σ=(Mn,σT)−1(an(r,σ(r)))r∈Inv_{n,\sigma}=(M_{n,\sigma}^{\mathsf T})^{-1}(a_n(r,\sigma(r)))_{r\in I_n}vn,σ​=(Mn,σT​)−1(an​(r,σ(r)))r∈In​​. The inverse is total; no invertibility hypothesis is imposed.

mdpImproving. All indices and parameters described as natural numbers include zero. In the formulas below, a⊖b=max⁡(a−b,0)a\ominus b=\max(a-b,0)a⊖b=max(a−b,0) denotes subtraction in the natural numbers, ⌊a/b⌋\lfloor a/b\rfloor⌊a/b⌋ denotes natural-number division, and a mod ba\bmod bamodb denotes natural-number remainder. Boolean values are written 000 for false and 111 for true, and bˉ\bar bbˉ denotes their negation. A finite index set of size zero is empty. A rational matrix inverse is the total matrix inverse, which is the zero matrix when its determinant is zero; no nonzero-determinant condition is implicit in the notation. The type KKK consists of exactly five distinct constructors, denoted a,b,c,d,ea,b,c,d,ea,b,c,d,e, with decidable equality. For every n∈Nn\in\mathbb Nn∈N, the number of rows is mn=5(n⊖1)m_n=5(n\ominus1)mn​=5(n⊖1); write In={0,…,mn−1}I_n=\{0,\ldots,m_n-1\}In​={0,…,mn​−1} for its finite index set. Thus m0=m1=0m_0=m_1=0m0​=m1​=0. For every n∈Nn\in\mathbb Nn∈N and row index r∈In={0,…,mn−1}r\in I_n=\{0,\ldots,m_n-1\}r∈In​={0,…,mn​−1}, define its kind and level Rn(r)R_n(r)Rn​(r) by the following ordered cases: if r<n⊖1r<n\ominus1r<n⊖1, it is (a,r+2)(a,r+2)(a,r+2); otherwise, if r<(n⊖1)+(n⊖2)r<(n\ominus1)+(n\ominus2)r<(n⊖1)+(n⊖2), it is (b,r⊖(n⊖1)+2)(b,r\ominus(n\ominus1)+2)(b,r⊖(n⊖1)+2); otherwise, if r<2(n⊖1)+(n⊖2)r<2(n\ominus1)+(n\ominus2)r<2(n⊖1)+(n⊖2), it is (c,r⊖((n⊖1)+(n⊖2))+2)(c,r\ominus((n\ominus1)+(n\ominus2))+2)(c,r⊖((n⊖1)+(n⊖2))+2); otherwise, if r<3(n⊖1)+(n⊖2)r<3(n\ominus1)+(n\ominus2)r<3(n⊖1)+(n⊖2), it is (d,r⊖(2(n⊖1)+(n⊖2))+2)(d,r\ominus(2(n\ominus1)+(n\ominus2))+2)(d,r⊖(2(n⊖1)+(n⊖2))+2); otherwise it is (e,r⊖(3(n⊖1)+(n⊖2))+1)(e,r\ominus(3(n\ominus1)+(n\ominus2))+1)(e,r⊖(3(n⊖1)+(n⊖2))+1). There are no row indices when n=0n=0n=0 or n=1n=1n=1. A name is a triple v=(κ,i,b)v=(\kappa,i,b)v=(κ,i,b) with kind κ∈K\kappa\in Kκ∈K, level i∈Ni\in\mathbb Ni∈N, and Boolean value b∈{0,1}b\in\{0,1\}b∈{0,1}. There are no restrictions on the level or on combinations of fields. Equality of names is decidable. For every n∈Nn\in\mathbb Nn∈N, the number of columns is kn=10(n⊖1)k_n=10(n\ominus1)kn​=10(n⊖1); write Jn={0,…,kn−1}J_n=\{0,\ldots,k_n-1\}Jn​={0,…,kn​−1} for its finite index set. Thus k0=k1=0k_0=k_1=0k0​=k1​=0. For every n∈Nn\in\mathbb Nn∈N and column index j∈Jn={0,…,kn−1}j\in J_n=\{0,\ldots,k_n-1\}j∈Jn​={0,…,kn​−1}, define the name Nn(j)N_n(j)Nn​(j) by the following ordered cases. If j=0j=0j=0, use (e,1,1)(e,1,1)(e,1,1). Otherwise, if j<4n⊖5j<4n\ominus5j<4n⊖5, put i=⌊(j⊖1)/4⌋+2i=\lfloor(j\ominus1)/4\rfloor+2i=⌊(j⊖1)/4⌋+2 and use respectively (d,i,0)(d,i,0)(d,i,0), (e,i,1)(e,i,1)(e,i,1), (b,i,1)(b,i,1)(b,i,1), or (b,i,0)(b,i,0)(b,i,0) according as (j⊖1) mod 4(j\ominus1)\bmod4(j⊖1)mod4 is 000, 111, 222, or anything else. Otherwise, if j<6n⊖7j<6n\ominus7j<6n⊖7, put u=j⊖(4n⊖5)u=j\ominus(4n\ominus5)u=j⊖(4n⊖5) and use (c,⌊u/2⌋+2,b)(c,\lfloor u/2\rfloor+2,b)(c,⌊u/2⌋+2,b), where b=1b=1b=1 exactly when u mod 2=1u\bmod2=1umod2=1. Otherwise, if j<7n⊖7j<7n\ominus7j<7n⊖7, use (e,j⊖(6n⊖7)+1,0)(e,j\ominus(6n\ominus7)+1,0)(e,j⊖(6n⊖7)+1,0). Otherwise, if j<8n⊖8j<8n\ominus8j<8n⊖8, use (d,j⊖(7n⊖7)+2,1)(d,j\ominus(7n\ominus7)+2,1)(d,j⊖(7n⊖7)+2,1). In the last case put u=j⊖(8n⊖8)u=j\ominus(8n\ominus8)u=j⊖(8n⊖8) and use (a,n⊖⌊u/2⌋,b)(a,n\ominus\lfloor u/2\rfloor,b)(a,n⊖⌊u/2⌋,b), where b=1b=1b=1 exactly when u mod 2=0u\bmod2=0umod2=0. There are no column indices when n=0n=0n=0 or n=1n=1n=1. For every name vvv, every kind κ∈K\kappa\in Kκ∈K, every level i∈Ni\in\mathbb Ni∈N, and every Boolean bbb, the rational number δv(κ,i,b)\delta_v(\kappa,i,b)δv​(κ,i,b) is 111 if v=(κ,i,b)v=(\kappa,i,b)v=(κ,i,b) and is 000 otherwise. For every n∈Nn\in\mathbb Nn∈N, define the rational number Sn=2n+1S_n=2n+1Sn​=2n+1, with nnn regarded as a rational number in this formula. In particular, SnS_nSn​ is never zero. For every n∈Nn\in\mathbb Nn∈N, define the rational number εn=1/Sn2n+2\varepsilon_n=1/S_n^{2n+2}εn​=1/Sn2n+2​. For every n∈Nn\in\mathbb Nn∈N, every pair (κ,i)∈K×N(\kappa,i)\in K\times\mathbb N(κ,i)∈K×N, and every name vvv, let xλ,l,b=δv(λ,l,b)x_{\lambda,l,b}=\delta_v(\lambda,l,b)xλ,l,b​=δv​(λ,l,b), o=xκ,i,0+xκ,i,1o=x_{\kappa,i,0}+x_{\kappa,i,1}o=xκ,i,0​+xκ,i,1​, and u=xa,i,1+xb,i,1+xc,i,1+xd,i,1+xe,i,1u=x_{a,i,1}+x_{b,i,1}+x_{c,i,1}+x_{d,i,1}+x_{e,i,1}u=xa,i,1​+xb,i,1​+xc,i,1​+xd,i,1​+xe,i,1​. The rational coefficient Fn((κ,i),v)F_n((\kappa,i),v)Fn​((κ,i),v) is defined by these cases: for κ=a\kappa=aκ=a and i=2i=2i=2, it is o−εn(xb,2,0+xc,2,0+xd,2,0+xe,1,1)o-\varepsilon_n(x_{b,2,0}+x_{c,2,0}+x_{d,2,0}+x_{e,1,1})o−εn​(xb,2,0​+xc,2,0​+xd,2,0​+xe,1,1​); for κ=a\kappa=aκ=a and i≠2i\ne2i=2, it is o−xa,i⊖1,0−εn(xa,i⊖1,1+xb,i⊖1,1+xc,i⊖1,1+xd,i⊖1,1+xe,i⊖1,1)o-x_{a,i\ominus1,0}-\varepsilon_n(x_{a,i\ominus1,1}+x_{b,i\ominus1,1}+x_{c,i\ominus1,1}+x_{d,i\ominus1,1}+x_{e,i\ominus1,1})o−xa,i⊖1,0​−εn​(xa,i⊖1,1​+xb,i⊖1,1​+xc,i⊖1,1​+xd,i⊖1,1​+xe,i⊖1,1​); for κ=b\kappa=bκ=b, it is o−xb,i+1,0−xd,i+1,0o-x_{b,i+1,0}-x_{d,i+1,0}o−xb,i+1,0​−xd,i+1,0​; for κ=c\kappa=cκ=c and i=ni=ni=n, it is o−∑j=0nxe,j,0o-\sum_{j=0}^{n}x_{e,j,0}o−∑j=0n​xe,j,0​, including the term j=0j=0j=0; for κ=c\kappa=cκ=c and i≠ni\ne ni=n, it is o−xc,i+1,0o-x_{c,i+1,0}o−xc,i+1,0​; for κ=d\kappa=dκ=d, it is o−1−εn2uo-\frac{1-\varepsilon_n}{2}uo−21−εn​​u; for κ=e\kappa=eκ=e and i=1i=1i=1, it is o−(1−εn)(xb,2,0+xc,2,0+xd,2,0+xe,1,1)o-(1-\varepsilon_n)(x_{b,2,0}+x_{c,2,0}+x_{d,2,0}+x_{e,1,1})o−(1−εn​)(xb,2,0​+xc,2,0​+xd,2,0​+xe,1,1​); and for κ=e\kappa=eκ=e and i≠1i\ne1i=1, it is o−1−εn2uo-\frac{1-\varepsilon_n}{2}uo−21−εn​​u. The pair and name need not correspond to indices of the program. For every pair n,i∈Nn,i\in\mathbb Nn,i∈N, define the rational reward Gn,i=(−Sn)2i⊖1G_{n,i}=(-S_n)^{2i\ominus1}Gn,i​=(−Sn​)2i⊖1. In particular, Gn,0=1G_{n,0}=1Gn,0​=1 because its exponent is zero. For every pair n,i∈Nn,i\in\mathbb Nn,i∈N, define the rational reward Hn,i=(−Sn)2iH_{n,i}=(-S_n)^{2i}Hn,i​=(−Sn​)2i. In particular, Hn,0=1H_{n,0}=1Hn,0​=1. For every n∈Nn\in\mathbb Nn∈N and every name v=(κ,i,b)v=(\kappa,i,b)v=(κ,i,b), define its rational objective coefficient Dn(v)D_n(v)Dn​(v) as a base contribution plus (Gn,1+εnHn,1)(δv(b,2,0)+δv(c,2,0)+δv(d,2,0))(G_{n,1}+\varepsilon_nH_{n,1})(\delta_v(b,2,0)+\delta_v(c,2,0)+\delta_v(d,2,0))(Gn,1​+εn​Hn,1​)(δv​(b,2,0)+δv​(c,2,0)+δv​(d,2,0)). The base contribution is Gn,i+εnHn,iG_{n,i}+\varepsilon_nH_{n,i}Gn,i​+εn​Hn,i​ when b=1b=1b=1 and κ∈{a,b,c}\kappa\in\{a,b,c\}κ∈{a,b,c}; it is εnHn,i\varepsilon_nH_{n,i}εn​Hn,i​ when b=1b=1b=1 and κ∈{d,e}\kappa\in\{d,e\}κ∈{d,e}; it is 111 when (κ,b)=(e,0)(\kappa,b)=(e,0)(κ,b)=(e,0); and it is 000 in every remaining case. In the subscripts of δv\delta_vδv​, b,c,db,c,db,c,d denote kinds, whereas the last coordinate of the name is the Boolean bbb. This defines a coefficient even for names outside all valid column ranges. For every n∈Nn\in\mathbb Nn∈N, define the rational linear-program data Pn=(An,1,dn)P_n=(A_n,\mathbf1,d_n)Pn​=(An​,1,dn​) with mnm_nmn​ rows and knk_nkn​ columns by (An)rj=Fn(Rn(r),Nn(j))(A_n)_{rj}=F_n(R_n(r),N_n(j))(An​)rj​=Fn​(Rn​(r),Nn​(j)), (1)r=1(\mathbf1)_r=1(1)r​=1, and (dn)j=Dn(Nn(j))(d_n)_j=D_n(N_n(j))(dn​)j​=Dn​(Nn​(j)). The underlying linear-program type stores only a rational matrix, right-hand-side vector, and objective vector; it does not impose feasibility, rank, boundedness, or sign conditions. Its rational feasible points are the vectors x∈QJnx\in\mathbb Q^{J_n}x∈QJn​ with Anx=1A_nx=\mathbf1An​x=1 and xj≥0x_j\ge0xj​≥0 for every j∈Jnj\in J_nj∈Jn​, and its objective at xxx is ∑j∈Jn(dn)jxj\sum_{j\in J_n}(d_n)_jx_j∑j∈Jn​​(dn​)j​xj​. For n=0n=0n=0 or n=1n=1n=1, both index sets are empty. For every n∈Nn\in\mathbb Nn∈N and every name (κ,i,b)(\kappa,i,b)(κ,i,b), define its natural-number rank Cn(κ,i,b)C_n(\kappa,i,b)Cn​(κ,i,b) as follows: Cn(e,i,1)=0C_n(e,i,1)=0Cn​(e,i,1)=0 if i=1i=1i=1, and Cn(e,i,1)=4(i⊖2)+2C_n(e,i,1)=4(i\ominus2)+2Cn​(e,i,1)=4(i⊖2)+2 otherwise; Cn(d,i,0)=4(i⊖2)+1C_n(d,i,0)=4(i\ominus2)+1Cn​(d,i,0)=4(i⊖2)+1; Cn(b,i,1)=4(i⊖2)+3C_n(b,i,1)=4(i\ominus2)+3Cn​(b,i,1)=4(i⊖2)+3; Cn(b,i,0)=4(i⊖2)+4C_n(b,i,0)=4(i\ominus2)+4Cn​(b,i,0)=4(i⊖2)+4; Cn(c,i,0)=(4n⊖5)+2(i⊖2)C_n(c,i,0)=(4n\ominus5)+2(i\ominus2)Cn​(c,i,0)=(4n⊖5)+2(i⊖2); Cn(c,i,1)=(4n⊖5)+2(i⊖2)+1C_n(c,i,1)=(4n\ominus5)+2(i\ominus2)+1Cn​(c,i,1)=(4n⊖5)+2(i⊖2)+1; Cn(e,i,0)=(6n⊖7)+(i⊖1)C_n(e,i,0)=(6n\ominus7)+(i\ominus1)Cn​(e,i,0)=(6n⊖7)+(i⊖1); Cn(d,i,1)=(7n⊖7)+(i⊖2)C_n(d,i,1)=(7n\ominus7)+(i\ominus2)Cn​(d,i,1)=(7n⊖7)+(i⊖2); Cn(a,i,1)=(8n⊖8)+2(n⊖i)C_n(a,i,1)=(8n\ominus8)+2(n\ominus i)Cn​(a,i,1)=(8n⊖8)+2(n⊖i); and Cn(a,i,0)=(8n⊖8)+2(n⊖i)+1C_n(a,i,0)=(8n\ominus8)+2(n\ominus i)+1Cn​(a,i,0)=(8n⊖8)+2(n⊖i)+1. The function is defined on every name, including levels outside the row or column ranges, and its output is a natural number, without a bound by knk_nkn​. For every n∈Nn\in\mathbb Nn∈N, every supplied proof of 3≤n3\le n3≤n, every row r∈Inr\in I_nr∈In​, and every Boolean bbb, the column for this action is jn(r,b)=Cn(κ,i,b) mod knj_n(r,b)=C_n(\kappa,i,b)\bmod k_njn​(r,b)=Cn​(κ,i,b)modkn​, where (κ,i)=Rn(r)(\kappa,i)=R_n(r)(κ,i)=Rn​(r). The positive column count makes this a member of JnJ_nJn​. For every n∈Nn\in\mathbb Nn∈N, a policy is any function σ:In→{0,1}\sigma:I_n\to\{0,1\}σ:In​→{0,1}. No additional conditions are imposed. For n=0n=0n=0 or n=1n=1n=1, there is exactly one such function, the empty function. For every n∈Nn\in\mathbb Nn∈N, every supplied proof of 3≤n3\le n3≤n, and every policy σ\sigmaσ, define the row-to-column function Bn,σ(r)=jn(r,σ(r))B_{n,\sigma}(r)=j_n(r,\sigma(r))Bn,σ​(r)=jn​(r,σ(r)) for every r∈Inr\in I_nr∈In​. Calling this function a basis imposes no injectivity, determinant, or feasibility condition. For every n∈Nn\in\mathbb Nn∈N, every supplied proof of 3≤n3\le n3≤n, every row r∈Inr\in I_nr∈In​, and every Boolean bbb, define the rational action reward an(r,b)=(dn)jn(r,b)a_n(r,b)=(d_n)_{j_n(r,b)}an​(r,b)=(dn​)jn​(r,b)​. For every n∈Nn\in\mathbb Nn∈N, every supplied proof of 3≤n3\le n3≤n, and every policy σ\sigmaσ, form the square matrix Mn,σM_{n,\sigma}Mn,σ​ indexed by InI_nIn​ in both coordinates, with (Mn,σ)q,r=(An)q,Bn,σ(r)(M_{n,\sigma})_{q,r}=(A_n)_{q,B_{n,\sigma}(r)}(Mn,σ​)q,r​=(An​)q,Bn,σ​(r)​. Define the rational value vector vn,σ=(Mn,σT)−1(an(r,σ(r)))r∈Inv_{n,\sigma}=(M_{n,\sigma}^{\mathsf T})^{-1}(a_n(r,\sigma(r)))_{r\in I_n}vn,σ​=(Mn,σT​)−1(an​(r,σ(r)))r∈In​​. The inverse is total; no invertibility hypothesis is imposed. For every n∈Nn\in\mathbb Nn∈N, every supplied proof of 3≤n3\le n3≤n, every pair of rows r,q∈Inr,q\in I_nr,q∈In​, and every Boolean bbb, define the rational number pn(r,b,q)=1q=r−(An)q,jn(r,b)p_n(r,b,q)=\mathbf1_{q=r}-(A_n)_{q,j_n(r,b)}pn​(r,b,q)=1q=r​−(An​)q,jn​(r,b)​, where 1q=r\mathbf1_{q=r}1q=r​ is 111 when q=rq=rq=r and 000 otherwise. The definition itself includes no assertion about its sign or about any sum of such numbers. For every n∈Nn\in\mathbb Nn∈N, every supplied proof of 3≤n3\le n3≤n, every policy σ\sigmaσ, and every row r∈Inr\in I_nr∈In​, the row is improving precisely when vn,σ(r)<an(r,σ(r)‾)+∑q∈Inpn(r,σ(r)‾,q)vn,σ(q)v_{n,\sigma}(r)<a_n(r,\overline{\sigma(r)})+\sum_{q\in I_n}p_n(r,\overline{\sigma(r)},q)v_{n,\sigma}(q)vn,σ​(r)<an​(r,σ(r)​)+∑q∈In​​pn​(r,σ(r)​,q)vn,σ​(q). The comparison is strict, and it compares the opposite Boolean action with the displayed total-inverse value.

MDPState. All indices and parameters described as natural numbers include zero. In the formulas below, a⊖b=max⁡(a−b,0)a\ominus b=\max(a-b,0)a⊖b=max(a−b,0) denotes subtraction in the natural numbers, ⌊a/b⌋\lfloor a/b\rfloor⌊a/b⌋ denotes natural-number division, and a mod ba\bmod bamodb denotes natural-number remainder. Boolean values are written 000 for false and 111 for true, and bˉ\bar bbˉ denotes their negation. A finite index set of size zero is empty. A rational matrix inverse is the total matrix inverse, which is the zero matrix when its determinant is zero; no nonzero-determinant condition is implicit in the notation. For every n∈Nn\in\mathbb Nn∈N, the number of rows is mn=5(n⊖1)m_n=5(n\ominus1)mn​=5(n⊖1); write In={0,…,mn−1}I_n=\{0,\ldots,m_n-1\}In​={0,…,mn​−1} for its finite index set. Thus m0=m1=0m_0=m_1=0m0​=m1​=0. For every n∈Nn\in\mathbb Nn∈N, a policy is any function σ:In→{0,1}\sigma:I_n\to\{0,1\}σ:In​→{0,1}. No additional conditions are imposed. For n=0n=0n=0 or n=1n=1n=1, there is exactly one such function, the empty function. For every n∈Nn\in\mathbb Nn∈N, the number of columns is kn=10(n⊖1)k_n=10(n\ominus1)kn​=10(n⊖1); write Jn={0,…,kn−1}J_n=\{0,\ldots,k_n-1\}Jn​={0,…,kn​−1} for its finite index set. Thus k0=k1=0k_0=k_1=0k0​=k1​=0. For every n∈Nn\in\mathbb Nn∈N, an MDP state is a pair (σ,ℓ)(\sigma,\ell)(σ,ℓ) consisting of an arbitrary policy σ:In→{0,1}\sigma:I_n\to\{0,1\}σ:In​→{0,1} and an index ℓ∈Jn\ell\in J_nℓ∈Jn​. No further fields or constraints are imposed. There are no such states when n=0n=0n=0 or n=1n=1n=1, because JnJ_nJn​ is empty.

mdpStep. All indices and parameters described as natural numbers include zero. In the formulas below, a⊖b=max⁡(a−b,0)a\ominus b=\max(a-b,0)a⊖b=max(a−b,0) denotes subtraction in the natural numbers, ⌊a/b⌋\lfloor a/b\rfloor⌊a/b⌋ denotes natural-number division, and a mod ba\bmod bamodb denotes natural-number remainder. Boolean values are written 000 for false and 111 for true, and bˉ\bar bbˉ denotes their negation. A finite index set of size zero is empty. A rational matrix inverse is the total matrix inverse, which is the zero matrix when its determinant is zero; no nonzero-determinant condition is implicit in the notation. For every n∈Nn\in\mathbb Nn∈N, the number of rows is mn=5(n⊖1)m_n=5(n\ominus1)mn​=5(n⊖1); write In={0,…,mn−1}I_n=\{0,\ldots,m_n-1\}In​={0,…,mn​−1} for its finite index set. Thus m0=m1=0m_0=m_1=0m0​=m1​=0. For every n∈Nn\in\mathbb Nn∈N, a policy is any function σ:In→{0,1}\sigma:I_n\to\{0,1\}σ:In​→{0,1}. No additional conditions are imposed. For n=0n=0n=0 or n=1n=1n=1, there is exactly one such function, the empty function. For every n∈Nn\in\mathbb Nn∈N, the number of columns is kn=10(n⊖1)k_n=10(n\ominus1)kn​=10(n⊖1); write Jn={0,…,kn−1}J_n=\{0,\ldots,k_n-1\}Jn​={0,…,kn​−1} for its finite index set. Thus k0=k1=0k_0=k_1=0k0​=k1​=0. For every n∈Nn\in\mathbb Nn∈N, an MDP state is a pair (σ,ℓ)(\sigma,\ell)(σ,ℓ) consisting of an arbitrary policy σ:In→{0,1}\sigma:I_n\to\{0,1\}σ:In​→{0,1} and an index ℓ∈Jn\ell\in J_nℓ∈Jn​. No further fields or constraints are imposed. There are no such states when n=0n=0n=0 or n=1n=1n=1, because JnJ_nJn​ is empty. The type KKK consists of exactly five distinct constructors, denoted a,b,c,d,ea,b,c,d,ea,b,c,d,e, with decidable equality. For every n∈Nn\in\mathbb Nn∈N and row index r∈In={0,…,mn−1}r\in I_n=\{0,\ldots,m_n-1\}r∈In​={0,…,mn​−1}, define its kind and level Rn(r)R_n(r)Rn​(r) by the following ordered cases: if r<n⊖1r<n\ominus1r<n⊖1, it is (a,r+2)(a,r+2)(a,r+2); otherwise, if r<(n⊖1)+(n⊖2)r<(n\ominus1)+(n\ominus2)r<(n⊖1)+(n⊖2), it is (b,r⊖(n⊖1)+2)(b,r\ominus(n\ominus1)+2)(b,r⊖(n⊖1)+2); otherwise, if r<2(n⊖1)+(n⊖2)r<2(n\ominus1)+(n\ominus2)r<2(n⊖1)+(n⊖2), it is (c,r⊖((n⊖1)+(n⊖2))+2)(c,r\ominus((n\ominus1)+(n\ominus2))+2)(c,r⊖((n⊖1)+(n⊖2))+2); otherwise, if r<3(n⊖1)+(n⊖2)r<3(n\ominus1)+(n\ominus2)r<3(n⊖1)+(n⊖2), it is (d,r⊖(2(n⊖1)+(n⊖2))+2)(d,r\ominus(2(n\ominus1)+(n\ominus2))+2)(d,r⊖(2(n⊖1)+(n⊖2))+2); otherwise it is (e,r⊖(3(n⊖1)+(n⊖2))+1)(e,r\ominus(3(n\ominus1)+(n\ominus2))+1)(e,r⊖(3(n⊖1)+(n⊖2))+1). There are no row indices when n=0n=0n=0 or n=1n=1n=1. A name is a triple v=(κ,i,b)v=(\kappa,i,b)v=(κ,i,b) with kind κ∈K\kappa\in Kκ∈K, level i∈Ni\in\mathbb Ni∈N, and Boolean value b∈{0,1}b\in\{0,1\}b∈{0,1}. There are no restrictions on the level or on combinations of fields. Equality of names is decidable. For every n∈Nn\in\mathbb Nn∈N and column index j∈Jn={0,…,kn−1}j\in J_n=\{0,\ldots,k_n-1\}j∈Jn​={0,…,kn​−1}, define the name Nn(j)N_n(j)Nn​(j) by the following ordered cases. If j=0j=0j=0, use (e,1,1)(e,1,1)(e,1,1). Otherwise, if j<4n⊖5j<4n\ominus5j<4n⊖5, put i=⌊(j⊖1)/4⌋+2i=\lfloor(j\ominus1)/4\rfloor+2i=⌊(j⊖1)/4⌋+2 and use respectively (d,i,0)(d,i,0)(d,i,0), (e,i,1)(e,i,1)(e,i,1), (b,i,1)(b,i,1)(b,i,1), or (b,i,0)(b,i,0)(b,i,0) according as (j⊖1) mod 4(j\ominus1)\bmod4(j⊖1)mod4 is 000, 111, 222, or anything else. Otherwise, if j<6n⊖7j<6n\ominus7j<6n⊖7, put u=j⊖(4n⊖5)u=j\ominus(4n\ominus5)u=j⊖(4n⊖5) and use (c,⌊u/2⌋+2,b)(c,\lfloor u/2\rfloor+2,b)(c,⌊u/2⌋+2,b), where b=1b=1b=1 exactly when u mod 2=1u\bmod2=1umod2=1. Otherwise, if j<7n⊖7j<7n\ominus7j<7n⊖7, use (e,j⊖(6n⊖7)+1,0)(e,j\ominus(6n\ominus7)+1,0)(e,j⊖(6n⊖7)+1,0). Otherwise, if j<8n⊖8j<8n\ominus8j<8n⊖8, use (d,j⊖(7n⊖7)+2,1)(d,j\ominus(7n\ominus7)+2,1)(d,j⊖(7n⊖7)+2,1). In the last case put u=j⊖(8n⊖8)u=j\ominus(8n\ominus8)u=j⊖(8n⊖8) and use (a,n⊖⌊u/2⌋,b)(a,n\ominus\lfloor u/2\rfloor,b)(a,n⊖⌊u/2⌋,b), where b=1b=1b=1 exactly when u mod 2=0u\bmod2=0umod2=0. There are no column indices when n=0n=0n=0 or n=1n=1n=1. For every name vvv, every kind κ∈K\kappa\in Kκ∈K, every level i∈Ni\in\mathbb Ni∈N, and every Boolean bbb, the rational number δv(κ,i,b)\delta_v(\kappa,i,b)δv​(κ,i,b) is 111 if v=(κ,i,b)v=(\kappa,i,b)v=(κ,i,b) and is 000 otherwise. For every n∈Nn\in\mathbb Nn∈N, define the rational number Sn=2n+1S_n=2n+1Sn​=2n+1, with nnn regarded as a rational number in this formula. In particular, SnS_nSn​ is never zero. For every n∈Nn\in\mathbb Nn∈N, define the rational number εn=1/Sn2n+2\varepsilon_n=1/S_n^{2n+2}εn​=1/Sn2n+2​. For every n∈Nn\in\mathbb Nn∈N, every pair (κ,i)∈K×N(\kappa,i)\in K\times\mathbb N(κ,i)∈K×N, and every name vvv, let xλ,l,b=δv(λ,l,b)x_{\lambda,l,b}=\delta_v(\lambda,l,b)xλ,l,b​=δv​(λ,l,b), o=xκ,i,0+xκ,i,1o=x_{\kappa,i,0}+x_{\kappa,i,1}o=xκ,i,0​+xκ,i,1​, and u=xa,i,1+xb,i,1+xc,i,1+xd,i,1+xe,i,1u=x_{a,i,1}+x_{b,i,1}+x_{c,i,1}+x_{d,i,1}+x_{e,i,1}u=xa,i,1​+xb,i,1​+xc,i,1​+xd,i,1​+xe,i,1​. The rational coefficient Fn((κ,i),v)F_n((\kappa,i),v)Fn​((κ,i),v) is defined by these cases: for κ=a\kappa=aκ=a and i=2i=2i=2, it is o−εn(xb,2,0+xc,2,0+xd,2,0+xe,1,1)o-\varepsilon_n(x_{b,2,0}+x_{c,2,0}+x_{d,2,0}+x_{e,1,1})o−εn​(xb,2,0​+xc,2,0​+xd,2,0​+xe,1,1​); for κ=a\kappa=aκ=a and i≠2i\ne2i=2, it is o−xa,i⊖1,0−εn(xa,i⊖1,1+xb,i⊖1,1+xc,i⊖1,1+xd,i⊖1,1+xe,i⊖1,1)o-x_{a,i\ominus1,0}-\varepsilon_n(x_{a,i\ominus1,1}+x_{b,i\ominus1,1}+x_{c,i\ominus1,1}+x_{d,i\ominus1,1}+x_{e,i\ominus1,1})o−xa,i⊖1,0​−εn​(xa,i⊖1,1​+xb,i⊖1,1​+xc,i⊖1,1​+xd,i⊖1,1​+xe,i⊖1,1​); for κ=b\kappa=bκ=b, it is o−xb,i+1,0−xd,i+1,0o-x_{b,i+1,0}-x_{d,i+1,0}o−xb,i+1,0​−xd,i+1,0​; for κ=c\kappa=cκ=c and i=ni=ni=n, it is o−∑j=0nxe,j,0o-\sum_{j=0}^{n}x_{e,j,0}o−∑j=0n​xe,j,0​, including the term j=0j=0j=0; for κ=c\kappa=cκ=c and i≠ni\ne ni=n, it is o−xc,i+1,0o-x_{c,i+1,0}o−xc,i+1,0​; for κ=d\kappa=dκ=d, it is o−1−εn2uo-\frac{1-\varepsilon_n}{2}uo−21−εn​​u; for κ=e\kappa=eκ=e and i=1i=1i=1, it is o−(1−εn)(xb,2,0+xc,2,0+xd,2,0+xe,1,1)o-(1-\varepsilon_n)(x_{b,2,0}+x_{c,2,0}+x_{d,2,0}+x_{e,1,1})o−(1−εn​)(xb,2,0​+xc,2,0​+xd,2,0​+xe,1,1​); and for κ=e\kappa=eκ=e and i≠1i\ne1i=1, it is o−1−εn2uo-\frac{1-\varepsilon_n}{2}uo−21−εn​​u. The pair and name need not correspond to indices of the program. For every pair n,i∈Nn,i\in\mathbb Nn,i∈N, define the rational reward Gn,i=(−Sn)2i⊖1G_{n,i}=(-S_n)^{2i\ominus1}Gn,i​=(−Sn​)2i⊖1. In particular, Gn,0=1G_{n,0}=1Gn,0​=1 because its exponent is zero. For every pair n,i∈Nn,i\in\mathbb Nn,i∈N, define the rational reward Hn,i=(−Sn)2iH_{n,i}=(-S_n)^{2i}Hn,i​=(−Sn​)2i. In particular, Hn,0=1H_{n,0}=1Hn,0​=1. For every n∈Nn\in\mathbb Nn∈N and every name v=(κ,i,b)v=(\kappa,i,b)v=(κ,i,b), define its rational objective coefficient Dn(v)D_n(v)Dn​(v) as a base contribution plus (Gn,1+εnHn,1)(δv(b,2,0)+δv(c,2,0)+δv(d,2,0))(G_{n,1}+\varepsilon_nH_{n,1})(\delta_v(b,2,0)+\delta_v(c,2,0)+\delta_v(d,2,0))(Gn,1​+εn​Hn,1​)(δv​(b,2,0)+δv​(c,2,0)+δv​(d,2,0)). The base contribution is Gn,i+εnHn,iG_{n,i}+\varepsilon_nH_{n,i}Gn,i​+εn​Hn,i​ when b=1b=1b=1 and κ∈{a,b,c}\kappa\in\{a,b,c\}κ∈{a,b,c}; it is εnHn,i\varepsilon_nH_{n,i}εn​Hn,i​ when b=1b=1b=1 and κ∈{d,e}\kappa\in\{d,e\}κ∈{d,e}; it is 111 when (κ,b)=(e,0)(\kappa,b)=(e,0)(κ,b)=(e,0); and it is 000 in every remaining case. In the subscripts of δv\delta_vδv​, b,c,db,c,db,c,d denote kinds, whereas the last coordinate of the name is the Boolean bbb. This defines a coefficient even for names outside all valid column ranges. For every n∈Nn\in\mathbb Nn∈N, define the rational linear-program data Pn=(An,1,dn)P_n=(A_n,\mathbf1,d_n)Pn​=(An​,1,dn​) with mnm_nmn​ rows and knk_nkn​ columns by (An)rj=Fn(Rn(r),Nn(j))(A_n)_{rj}=F_n(R_n(r),N_n(j))(An​)rj​=Fn​(Rn​(r),Nn​(j)), (1)r=1(\mathbf1)_r=1(1)r​=1, and (dn)j=Dn(Nn(j))(d_n)_j=D_n(N_n(j))(dn​)j​=Dn​(Nn​(j)). The underlying linear-program type stores only a rational matrix, right-hand-side vector, and objective vector; it does not impose feasibility, rank, boundedness, or sign conditions. Its rational feasible points are the vectors x∈QJnx\in\mathbb Q^{J_n}x∈QJn​ with Anx=1A_nx=\mathbf1An​x=1 and xj≥0x_j\ge0xj​≥0 for every j∈Jnj\in J_nj∈Jn​, and its objective at xxx is ∑j∈Jn(dn)jxj\sum_{j\in J_n}(d_n)_jx_j∑j∈Jn​​(dn​)j​xj​. For n=0n=0n=0 or n=1n=1n=1, both index sets are empty. For every n∈Nn\in\mathbb Nn∈N and every name (κ,i,b)(\kappa,i,b)(κ,i,b), define its natural-number rank Cn(κ,i,b)C_n(\kappa,i,b)Cn​(κ,i,b) as follows: Cn(e,i,1)=0C_n(e,i,1)=0Cn​(e,i,1)=0 if i=1i=1i=1, and Cn(e,i,1)=4(i⊖2)+2C_n(e,i,1)=4(i\ominus2)+2Cn​(e,i,1)=4(i⊖2)+2 otherwise; Cn(d,i,0)=4(i⊖2)+1C_n(d,i,0)=4(i\ominus2)+1Cn​(d,i,0)=4(i⊖2)+1; Cn(b,i,1)=4(i⊖2)+3C_n(b,i,1)=4(i\ominus2)+3Cn​(b,i,1)=4(i⊖2)+3; Cn(b,i,0)=4(i⊖2)+4C_n(b,i,0)=4(i\ominus2)+4Cn​(b,i,0)=4(i⊖2)+4; Cn(c,i,0)=(4n⊖5)+2(i⊖2)C_n(c,i,0)=(4n\ominus5)+2(i\ominus2)Cn​(c,i,0)=(4n⊖5)+2(i⊖2); Cn(c,i,1)=(4n⊖5)+2(i⊖2)+1C_n(c,i,1)=(4n\ominus5)+2(i\ominus2)+1Cn​(c,i,1)=(4n⊖5)+2(i⊖2)+1; Cn(e,i,0)=(6n⊖7)+(i⊖1)C_n(e,i,0)=(6n\ominus7)+(i\ominus1)Cn​(e,i,0)=(6n⊖7)+(i⊖1); Cn(d,i,1)=(7n⊖7)+(i⊖2)C_n(d,i,1)=(7n\ominus7)+(i\ominus2)Cn​(d,i,1)=(7n⊖7)+(i⊖2); Cn(a,i,1)=(8n⊖8)+2(n⊖i)C_n(a,i,1)=(8n\ominus8)+2(n\ominus i)Cn​(a,i,1)=(8n⊖8)+2(n⊖i); and Cn(a,i,0)=(8n⊖8)+2(n⊖i)+1C_n(a,i,0)=(8n\ominus8)+2(n\ominus i)+1Cn​(a,i,0)=(8n⊖8)+2(n⊖i)+1. The function is defined on every name, including levels outside the row or column ranges, and its output is a natural number, without a bound by knk_nkn​. For every n∈Nn\in\mathbb Nn∈N, every supplied proof of 3≤n3\le n3≤n, every row r∈Inr\in I_nr∈In​, and every Boolean bbb, the column for this action is jn(r,b)=Cn(κ,i,b) mod knj_n(r,b)=C_n(\kappa,i,b)\bmod k_njn​(r,b)=Cn​(κ,i,b)modkn​, where (κ,i)=Rn(r)(\kappa,i)=R_n(r)(κ,i)=Rn​(r). The positive column count makes this a member of JnJ_nJn​. For every n∈Nn\in\mathbb Nn∈N, every supplied proof of 3≤n3\le n3≤n, and every policy σ\sigmaσ, define the row-to-column function Bn,σ(r)=jn(r,σ(r))B_{n,\sigma}(r)=j_n(r,\sigma(r))Bn,σ​(r)=jn​(r,σ(r)) for every r∈Inr\in I_nr∈In​. Calling this function a basis imposes no injectivity, determinant, or feasibility condition. For every n∈Nn\in\mathbb Nn∈N, every supplied proof of 3≤n3\le n3≤n, every row r∈Inr\in I_nr∈In​, and every Boolean bbb, define the rational action reward an(r,b)=(dn)jn(r,b)a_n(r,b)=(d_n)_{j_n(r,b)}an​(r,b)=(dn​)jn​(r,b)​. For every n∈Nn\in\mathbb Nn∈N, every supplied proof of 3≤n3\le n3≤n, and every policy σ\sigmaσ, form the square matrix Mn,σM_{n,\sigma}Mn,σ​ indexed by InI_nIn​ in both coordinates, with (Mn,σ)q,r=(An)q,Bn,σ(r)(M_{n,\sigma})_{q,r}=(A_n)_{q,B_{n,\sigma}(r)}(Mn,σ​)q,r​=(An​)q,Bn,σ​(r)​. Define the rational value vector vn,σ=(Mn,σT)−1(an(r,σ(r)))r∈Inv_{n,\sigma}=(M_{n,\sigma}^{\mathsf T})^{-1}(a_n(r,\sigma(r)))_{r\in I_n}vn,σ​=(Mn,σT​)−1(an​(r,σ(r)))r∈In​​. The inverse is total; no invertibility hypothesis is imposed. For every n∈Nn\in\mathbb Nn∈N, every supplied proof of 3≤n3\le n3≤n, every pair of rows r,q∈Inr,q\in I_nr,q∈In​, and every Boolean bbb, define the rational number pn(r,b,q)=1q=r−(An)q,jn(r,b)p_n(r,b,q)=\mathbf1_{q=r}-(A_n)_{q,j_n(r,b)}pn​(r,b,q)=1q=r​−(An​)q,jn​(r,b)​, where 1q=r\mathbf1_{q=r}1q=r​ is 111 when q=rq=rq=r and 000 otherwise. The definition itself includes no assertion about its sign or about any sum of such numbers. For every n∈Nn\in\mathbb Nn∈N, every supplied proof of 3≤n3\le n3≤n, every policy σ\sigmaσ, and every row r∈Inr\in I_nr∈In​, the row is improving precisely when vn,σ(r)<an(r,σ(r)‾)+∑q∈Inpn(r,σ(r)‾,q)vn,σ(q)v_{n,\sigma}(r)<a_n(r,\overline{\sigma(r)})+\sum_{q\in I_n}p_n(r,\overline{\sigma(r)},q)v_{n,\sigma}(q)vn,σ​(r)<an​(r,σ(r)​)+∑q∈In​​pn​(r,σ(r)​,q)vn,σ​(q). The comparison is strict, and it compares the opposite Boolean action with the displayed total-inverse value. For every n∈Nn\in\mathbb Nn∈N, the ordering equivalence on Jn={0,…,kn−1}J_n=\{0,\ldots,k_n-1\}Jn​={0,…,kn​−1} is the identity j↦jj\mapsto jj↦j, including the empty equivalence when n=0n=0n=0 or n=1n=1n=1. For last-column index ℓ∈Jn\ell\in J_nℓ∈Jn​ and candidate column j∈Jnj\in J_nj∈Jn​, the cyclic distance used here is Δn(ℓ,j)=(j+kn−ℓ) mod kn\Delta_n(\ell,j)=(j+k_n-\ell)\bmod k_nΔn​(ℓ,j)=(j+kn​−ℓ)modkn​. It is the specialization of the formula ((o(j))+kn−ℓ) mod kn((o(j))+k_n-\ell)\bmod k_n((o(j))+kn​−ℓ)modkn​ to the identity ordering ooo. Subtraction in the numerator is natural-number subtraction; it does not truncate for these indices because j+kn≥ℓj+k_n\ge\ellj+kn​≥ℓ. In particular Δn(ℓ,ℓ)=0\Delta_n(\ell,\ell)=0Δn​(ℓ,ℓ)=0 whenever such an index exists. For every n∈Nn\in\mathbb Nn∈N, every supplied proof of 3≤n3\le n3≤n, and any two MDP states s=(σ,ℓ)s=(\sigma,\ell)s=(σ,ℓ) and s′=(σ′,ℓ′)s^{\prime}=(\sigma^{\prime},\ell^{\prime})s′=(σ′,ℓ′), an MDP step holds exactly when there exists r∈Inr\in I_nr∈In​ such that rrr is improving for σ\sigmaσ, for every q∈Inq\in I_nq∈In​ that is improving for σ\sigmaσ one has Δn(ℓ,jn(r,σ(r)‾))≤Δn(ℓ,jn(q,σ(q)‾))\Delta_n(\ell,j_n(r,\overline{\sigma(r)}))\le\Delta_n(\ell,j_n(q,\overline{\sigma(q)}))Δn​(ℓ,jn​(r,σ(r)​))≤Δn​(ℓ,jn​(q,σ(q)​)), the new policy is σ′(r)=σ(r)‾\sigma^{\prime}(r)=\overline{\sigma(r)}σ′(r)=σ(r)​ and σ′(q)=σ(q)\sigma^{\prime}(q)=\sigma(q)σ′(q)=σ(q) for all q≠rq\ne rq=r, and ℓ′=jn(r,σ(r)‾)\ell^{\prime}=j_n(r,\overline{\sigma(r)})ℓ′=jn​(r,σ(r)​). The comparison with every other improving row uses a non-strict inequality.

initialMDPState. All indices and parameters described as natural numbers include zero. In the formulas below, a⊖b=max⁡(a−b,0)a\ominus b=\max(a-b,0)a⊖b=max(a−b,0) denotes subtraction in the natural numbers, ⌊a/b⌋\lfloor a/b\rfloor⌊a/b⌋ denotes natural-number division, and a mod ba\bmod bamodb denotes natural-number remainder. Boolean values are written 000 for false and 111 for true, and bˉ\bar bbˉ denotes their negation. A finite index set of size zero is empty. A rational matrix inverse is the total matrix inverse, which is the zero matrix when its determinant is zero; no nonzero-determinant condition is implicit in the notation. For every n∈Nn\in\mathbb Nn∈N, the number of rows is mn=5(n⊖1)m_n=5(n\ominus1)mn​=5(n⊖1); write In={0,…,mn−1}I_n=\{0,\ldots,m_n-1\}In​={0,…,mn​−1} for its finite index set. Thus m0=m1=0m_0=m_1=0m0​=m1​=0. For every n∈Nn\in\mathbb Nn∈N, a policy is any function σ:In→{0,1}\sigma:I_n\to\{0,1\}σ:In​→{0,1}. No additional conditions are imposed. For n=0n=0n=0 or n=1n=1n=1, there is exactly one such function, the empty function. For every n∈Nn\in\mathbb Nn∈N, the number of columns is kn=10(n⊖1)k_n=10(n\ominus1)kn​=10(n⊖1); write Jn={0,…,kn−1}J_n=\{0,\ldots,k_n-1\}Jn​={0,…,kn​−1} for its finite index set. Thus k0=k1=0k_0=k_1=0k0​=k1​=0. For every n∈Nn\in\mathbb Nn∈N, an MDP state is a pair (σ,ℓ)(\sigma,\ell)(σ,ℓ) consisting of an arbitrary policy σ:In→{0,1}\sigma:I_n\to\{0,1\}σ:In​→{0,1} and an index ℓ∈Jn\ell\in J_nℓ∈Jn​. No further fields or constraints are imposed. There are no such states when n=0n=0n=0 or n=1n=1n=1, because JnJ_nJn​ is empty. The type KKK consists of exactly five distinct constructors, denoted a,b,c,d,ea,b,c,d,ea,b,c,d,e, with decidable equality. For every n∈Nn\in\mathbb Nn∈N and row index r∈In={0,…,mn−1}r\in I_n=\{0,\ldots,m_n-1\}r∈In​={0,…,mn​−1}, define its kind and level Rn(r)R_n(r)Rn​(r) by the following ordered cases: if r<n⊖1r<n\ominus1r<n⊖1, it is (a,r+2)(a,r+2)(a,r+2); otherwise, if r<(n⊖1)+(n⊖2)r<(n\ominus1)+(n\ominus2)r<(n⊖1)+(n⊖2), it is (b,r⊖(n⊖1)+2)(b,r\ominus(n\ominus1)+2)(b,r⊖(n⊖1)+2); otherwise, if r<2(n⊖1)+(n⊖2)r<2(n\ominus1)+(n\ominus2)r<2(n⊖1)+(n⊖2), it is (c,r⊖((n⊖1)+(n⊖2))+2)(c,r\ominus((n\ominus1)+(n\ominus2))+2)(c,r⊖((n⊖1)+(n⊖2))+2); otherwise, if r<3(n⊖1)+(n⊖2)r<3(n\ominus1)+(n\ominus2)r<3(n⊖1)+(n⊖2), it is (d,r⊖(2(n⊖1)+(n⊖2))+2)(d,r\ominus(2(n\ominus1)+(n\ominus2))+2)(d,r⊖(2(n⊖1)+(n⊖2))+2); otherwise it is (e,r⊖(3(n⊖1)+(n⊖2))+1)(e,r\ominus(3(n\ominus1)+(n\ominus2))+1)(e,r⊖(3(n⊖1)+(n⊖2))+1). There are no row indices when n=0n=0n=0 or n=1n=1n=1. For every pair (κ,i)∈K×N(\kappa,i)\in K\times\mathbb N(κ,i)∈K×N, define the Boolean b0(κ,i)b_0(\kappa,i)b0​(κ,i) to be 111 exactly when κ=d\kappa=dκ=d or both κ=e\kappa=eκ=e and i=1i=1i=1, and to be 000 otherwise. For every n∈Nn\in\mathbb Nn∈N, the initial policy is σn0(r)=b0(Rn(r))\sigma_n^0(r)=b_0(R_n(r))σn0​(r)=b0​(Rn​(r)) for each r∈Inr\in I_nr∈In​; equivalently it selects 111 exactly on rows of kind ddd and on the row of kind eee and level 111, and selects 000 on all other rows. This is the empty function if n=0n=0n=0 or n=1n=1n=1. For every n∈Nn\in\mathbb Nn∈N and every supplied proof of 3≤n3\le n3≤n, the initial MDP state is (σn0,0)(\sigma_n^0,0)(σn0​,0), with 0∈Jn0\in J_n0∈Jn​.

mdpRun. All indices and parameters described as natural numbers include zero. In the formulas below, a⊖b=max⁡(a−b,0)a\ominus b=\max(a-b,0)a⊖b=max(a−b,0) denotes subtraction in the natural numbers, ⌊a/b⌋\lfloor a/b\rfloor⌊a/b⌋ denotes natural-number division, and a mod ba\bmod bamodb denotes natural-number remainder. Boolean values are written 000 for false and 111 for true, and bˉ\bar bbˉ denotes their negation. A finite index set of size zero is empty. A rational matrix inverse is the total matrix inverse, which is the zero matrix when its determinant is zero; no nonzero-determinant condition is implicit in the notation. For every n∈Nn\in\mathbb Nn∈N, the number of rows is mn=5(n⊖1)m_n=5(n\ominus1)mn​=5(n⊖1); write In={0,…,mn−1}I_n=\{0,\ldots,m_n-1\}In​={0,…,mn​−1} for its finite index set. Thus m0=m1=0m_0=m_1=0m0​=m1​=0. For every n∈Nn\in\mathbb Nn∈N, a policy is any function σ:In→{0,1}\sigma:I_n\to\{0,1\}σ:In​→{0,1}. No additional conditions are imposed. For n=0n=0n=0 or n=1n=1n=1, there is exactly one such function, the empty function. For every n∈Nn\in\mathbb Nn∈N, the number of columns is kn=10(n⊖1)k_n=10(n\ominus1)kn​=10(n⊖1); write Jn={0,…,kn−1}J_n=\{0,\ldots,k_n-1\}Jn​={0,…,kn​−1} for its finite index set. Thus k0=k1=0k_0=k_1=0k0​=k1​=0. For every n∈Nn\in\mathbb Nn∈N, an MDP state is a pair (σ,ℓ)(\sigma,\ell)(σ,ℓ) consisting of an arbitrary policy σ:In→{0,1}\sigma:I_n\to\{0,1\}σ:In​→{0,1} and an index ℓ∈Jn\ell\in J_nℓ∈Jn​. No further fields or constraints are imposed. There are no such states when n=0n=0n=0 or n=1n=1n=1, because JnJ_nJn​ is empty. The type KKK consists of exactly five distinct constructors, denoted a,b,c,d,ea,b,c,d,ea,b,c,d,e, with decidable equality. For every n∈Nn\in\mathbb Nn∈N and row index r∈In={0,…,mn−1}r\in I_n=\{0,\ldots,m_n-1\}r∈In​={0,…,mn​−1}, define its kind and level Rn(r)R_n(r)Rn​(r) by the following ordered cases: if r<n⊖1r<n\ominus1r<n⊖1, it is (a,r+2)(a,r+2)(a,r+2); otherwise, if r<(n⊖1)+(n⊖2)r<(n\ominus1)+(n\ominus2)r<(n⊖1)+(n⊖2), it is (b,r⊖(n⊖1)+2)(b,r\ominus(n\ominus1)+2)(b,r⊖(n⊖1)+2); otherwise, if r<2(n⊖1)+(n⊖2)r<2(n\ominus1)+(n\ominus2)r<2(n⊖1)+(n⊖2), it is (c,r⊖((n⊖1)+(n⊖2))+2)(c,r\ominus((n\ominus1)+(n\ominus2))+2)(c,r⊖((n⊖1)+(n⊖2))+2); otherwise, if r<3(n⊖1)+(n⊖2)r<3(n\ominus1)+(n\ominus2)r<3(n⊖1)+(n⊖2), it is (d,r⊖(2(n⊖1)+(n⊖2))+2)(d,r\ominus(2(n\ominus1)+(n\ominus2))+2)(d,r⊖(2(n⊖1)+(n⊖2))+2); otherwise it is (e,r⊖(3(n⊖1)+(n⊖2))+1)(e,r\ominus(3(n\ominus1)+(n\ominus2))+1)(e,r⊖(3(n⊖1)+(n⊖2))+1). There are no row indices when n=0n=0n=0 or n=1n=1n=1. A name is a triple v=(κ,i,b)v=(\kappa,i,b)v=(κ,i,b) with kind κ∈K\kappa\in Kκ∈K, level i∈Ni\in\mathbb Ni∈N, and Boolean value b∈{0,1}b\in\{0,1\}b∈{0,1}. There are no restrictions on the level or on combinations of fields. Equality of names is decidable. For every n∈Nn\in\mathbb Nn∈N and column index j∈Jn={0,…,kn−1}j\in J_n=\{0,\ldots,k_n-1\}j∈Jn​={0,…,kn​−1}, define the name Nn(j)N_n(j)Nn​(j) by the following ordered cases. If j=0j=0j=0, use (e,1,1)(e,1,1)(e,1,1). Otherwise, if j<4n⊖5j<4n\ominus5j<4n⊖5, put i=⌊(j⊖1)/4⌋+2i=\lfloor(j\ominus1)/4\rfloor+2i=⌊(j⊖1)/4⌋+2 and use respectively (d,i,0)(d,i,0)(d,i,0), (e,i,1)(e,i,1)(e,i,1), (b,i,1)(b,i,1)(b,i,1), or (b,i,0)(b,i,0)(b,i,0) according as (j⊖1) mod 4(j\ominus1)\bmod4(j⊖1)mod4 is 000, 111, 222, or anything else. Otherwise, if j<6n⊖7j<6n\ominus7j<6n⊖7, put u=j⊖(4n⊖5)u=j\ominus(4n\ominus5)u=j⊖(4n⊖5) and use (c,⌊u/2⌋+2,b)(c,\lfloor u/2\rfloor+2,b)(c,⌊u/2⌋+2,b), where b=1b=1b=1 exactly when u mod 2=1u\bmod2=1umod2=1. Otherwise, if j<7n⊖7j<7n\ominus7j<7n⊖7, use (e,j⊖(6n⊖7)+1,0)(e,j\ominus(6n\ominus7)+1,0)(e,j⊖(6n⊖7)+1,0). Otherwise, if j<8n⊖8j<8n\ominus8j<8n⊖8, use (d,j⊖(7n⊖7)+2,1)(d,j\ominus(7n\ominus7)+2,1)(d,j⊖(7n⊖7)+2,1). In the last case put u=j⊖(8n⊖8)u=j\ominus(8n\ominus8)u=j⊖(8n⊖8) and use (a,n⊖⌊u/2⌋,b)(a,n\ominus\lfloor u/2\rfloor,b)(a,n⊖⌊u/2⌋,b), where b=1b=1b=1 exactly when u mod 2=0u\bmod2=0umod2=0. There are no column indices when n=0n=0n=0 or n=1n=1n=1. For every name vvv, every kind κ∈K\kappa\in Kκ∈K, every level i∈Ni\in\mathbb Ni∈N, and every Boolean bbb, the rational number δv(κ,i,b)\delta_v(\kappa,i,b)δv​(κ,i,b) is 111 if v=(κ,i,b)v=(\kappa,i,b)v=(κ,i,b) and is 000 otherwise. For every n∈Nn\in\mathbb Nn∈N, define the rational number Sn=2n+1S_n=2n+1Sn​=2n+1, with nnn regarded as a rational number in this formula. In particular, SnS_nSn​ is never zero. For every n∈Nn\in\mathbb Nn∈N, define the rational number εn=1/Sn2n+2\varepsilon_n=1/S_n^{2n+2}εn​=1/Sn2n+2​. For every n∈Nn\in\mathbb Nn∈N, every pair (κ,i)∈K×N(\kappa,i)\in K\times\mathbb N(κ,i)∈K×N, and every name vvv, let xλ,l,b=δv(λ,l,b)x_{\lambda,l,b}=\delta_v(\lambda,l,b)xλ,l,b​=δv​(λ,l,b), o=xκ,i,0+xκ,i,1o=x_{\kappa,i,0}+x_{\kappa,i,1}o=xκ,i,0​+xκ,i,1​, and u=xa,i,1+xb,i,1+xc,i,1+xd,i,1+xe,i,1u=x_{a,i,1}+x_{b,i,1}+x_{c,i,1}+x_{d,i,1}+x_{e,i,1}u=xa,i,1​+xb,i,1​+xc,i,1​+xd,i,1​+xe,i,1​. The rational coefficient Fn((κ,i),v)F_n((\kappa,i),v)Fn​((κ,i),v) is defined by these cases: for κ=a\kappa=aκ=a and i=2i=2i=2, it is o−εn(xb,2,0+xc,2,0+xd,2,0+xe,1,1)o-\varepsilon_n(x_{b,2,0}+x_{c,2,0}+x_{d,2,0}+x_{e,1,1})o−εn​(xb,2,0​+xc,2,0​+xd,2,0​+xe,1,1​); for κ=a\kappa=aκ=a and i≠2i\ne2i=2, it is o−xa,i⊖1,0−εn(xa,i⊖1,1+xb,i⊖1,1+xc,i⊖1,1+xd,i⊖1,1+xe,i⊖1,1)o-x_{a,i\ominus1,0}-\varepsilon_n(x_{a,i\ominus1,1}+x_{b,i\ominus1,1}+x_{c,i\ominus1,1}+x_{d,i\ominus1,1}+x_{e,i\ominus1,1})o−xa,i⊖1,0​−εn​(xa,i⊖1,1​+xb,i⊖1,1​+xc,i⊖1,1​+xd,i⊖1,1​+xe,i⊖1,1​); for κ=b\kappa=bκ=b, it is o−xb,i+1,0−xd,i+1,0o-x_{b,i+1,0}-x_{d,i+1,0}o−xb,i+1,0​−xd,i+1,0​; for κ=c\kappa=cκ=c and i=ni=ni=n, it is o−∑j=0nxe,j,0o-\sum_{j=0}^{n}x_{e,j,0}o−∑j=0n​xe,j,0​, including the term j=0j=0j=0; for κ=c\kappa=cκ=c and i≠ni\ne ni=n, it is o−xc,i+1,0o-x_{c,i+1,0}o−xc,i+1,0​; for κ=d\kappa=dκ=d, it is o−1−εn2uo-\frac{1-\varepsilon_n}{2}uo−21−εn​​u; for κ=e\kappa=eκ=e and i=1i=1i=1, it is o−(1−εn)(xb,2,0+xc,2,0+xd,2,0+xe,1,1)o-(1-\varepsilon_n)(x_{b,2,0}+x_{c,2,0}+x_{d,2,0}+x_{e,1,1})o−(1−εn​)(xb,2,0​+xc,2,0​+xd,2,0​+xe,1,1​); and for κ=e\kappa=eκ=e and i≠1i\ne1i=1, it is o−1−εn2uo-\frac{1-\varepsilon_n}{2}uo−21−εn​​u. The pair and name need not correspond to indices of the program. For every pair n,i∈Nn,i\in\mathbb Nn,i∈N, define the rational reward Gn,i=(−Sn)2i⊖1G_{n,i}=(-S_n)^{2i\ominus1}Gn,i​=(−Sn​)2i⊖1. In particular, Gn,0=1G_{n,0}=1Gn,0​=1 because its exponent is zero. For every pair n,i∈Nn,i\in\mathbb Nn,i∈N, define the rational reward Hn,i=(−Sn)2iH_{n,i}=(-S_n)^{2i}Hn,i​=(−Sn​)2i. In particular, Hn,0=1H_{n,0}=1Hn,0​=1. For every n∈Nn\in\mathbb Nn∈N and every name v=(κ,i,b)v=(\kappa,i,b)v=(κ,i,b), define its rational objective coefficient Dn(v)D_n(v)Dn​(v) as a base contribution plus (Gn,1+εnHn,1)(δv(b,2,0)+δv(c,2,0)+δv(d,2,0))(G_{n,1}+\varepsilon_nH_{n,1})(\delta_v(b,2,0)+\delta_v(c,2,0)+\delta_v(d,2,0))(Gn,1​+εn​Hn,1​)(δv​(b,2,0)+δv​(c,2,0)+δv​(d,2,0)). The base contribution is Gn,i+εnHn,iG_{n,i}+\varepsilon_nH_{n,i}Gn,i​+εn​Hn,i​ when b=1b=1b=1 and κ∈{a,b,c}\kappa\in\{a,b,c\}κ∈{a,b,c}; it is εnHn,i\varepsilon_nH_{n,i}εn​Hn,i​ when b=1b=1b=1 and κ∈{d,e}\kappa\in\{d,e\}κ∈{d,e}; it is 111 when (κ,b)=(e,0)(\kappa,b)=(e,0)(κ,b)=(e,0); and it is 000 in every remaining case. In the subscripts of δv\delta_vδv​, b,c,db,c,db,c,d denote kinds, whereas the last coordinate of the name is the Boolean bbb. This defines a coefficient even for names outside all valid column ranges. For every n∈Nn\in\mathbb Nn∈N, define the rational linear-program data Pn=(An,1,dn)P_n=(A_n,\mathbf1,d_n)Pn​=(An​,1,dn​) with mnm_nmn​ rows and knk_nkn​ columns by (An)rj=Fn(Rn(r),Nn(j))(A_n)_{rj}=F_n(R_n(r),N_n(j))(An​)rj​=Fn​(Rn​(r),Nn​(j)), (1)r=1(\mathbf1)_r=1(1)r​=1, and (dn)j=Dn(Nn(j))(d_n)_j=D_n(N_n(j))(dn​)j​=Dn​(Nn​(j)). The underlying linear-program type stores only a rational matrix, right-hand-side vector, and objective vector; it does not impose feasibility, rank, boundedness, or sign conditions. Its rational feasible points are the vectors x∈QJnx\in\mathbb Q^{J_n}x∈QJn​ with Anx=1A_nx=\mathbf1An​x=1 and xj≥0x_j\ge0xj​≥0 for every j∈Jnj\in J_nj∈Jn​, and its objective at xxx is ∑j∈Jn(dn)jxj\sum_{j\in J_n}(d_n)_jx_j∑j∈Jn​​(dn​)j​xj​. For n=0n=0n=0 or n=1n=1n=1, both index sets are empty. For every n∈Nn\in\mathbb Nn∈N and every name (κ,i,b)(\kappa,i,b)(κ,i,b), define its natural-number rank Cn(κ,i,b)C_n(\kappa,i,b)Cn​(κ,i,b) as follows: Cn(e,i,1)=0C_n(e,i,1)=0Cn​(e,i,1)=0 if i=1i=1i=1, and Cn(e,i,1)=4(i⊖2)+2C_n(e,i,1)=4(i\ominus2)+2Cn​(e,i,1)=4(i⊖2)+2 otherwise; Cn(d,i,0)=4(i⊖2)+1C_n(d,i,0)=4(i\ominus2)+1Cn​(d,i,0)=4(i⊖2)+1; Cn(b,i,1)=4(i⊖2)+3C_n(b,i,1)=4(i\ominus2)+3Cn​(b,i,1)=4(i⊖2)+3; Cn(b,i,0)=4(i⊖2)+4C_n(b,i,0)=4(i\ominus2)+4Cn​(b,i,0)=4(i⊖2)+4; Cn(c,i,0)=(4n⊖5)+2(i⊖2)C_n(c,i,0)=(4n\ominus5)+2(i\ominus2)Cn​(c,i,0)=(4n⊖5)+2(i⊖2); Cn(c,i,1)=(4n⊖5)+2(i⊖2)+1C_n(c,i,1)=(4n\ominus5)+2(i\ominus2)+1Cn​(c,i,1)=(4n⊖5)+2(i⊖2)+1; Cn(e,i,0)=(6n⊖7)+(i⊖1)C_n(e,i,0)=(6n\ominus7)+(i\ominus1)Cn​(e,i,0)=(6n⊖7)+(i⊖1); Cn(d,i,1)=(7n⊖7)+(i⊖2)C_n(d,i,1)=(7n\ominus7)+(i\ominus2)Cn​(d,i,1)=(7n⊖7)+(i⊖2); Cn(a,i,1)=(8n⊖8)+2(n⊖i)C_n(a,i,1)=(8n\ominus8)+2(n\ominus i)Cn​(a,i,1)=(8n⊖8)+2(n⊖i); and Cn(a,i,0)=(8n⊖8)+2(n⊖i)+1C_n(a,i,0)=(8n\ominus8)+2(n\ominus i)+1Cn​(a,i,0)=(8n⊖8)+2(n⊖i)+1. The function is defined on every name, including levels outside the row or column ranges, and its output is a natural number, without a bound by knk_nkn​. For every n∈Nn\in\mathbb Nn∈N, every supplied proof of 3≤n3\le n3≤n, every row r∈Inr\in I_nr∈In​, and every Boolean bbb, the column for this action is jn(r,b)=Cn(κ,i,b) mod knj_n(r,b)=C_n(\kappa,i,b)\bmod k_njn​(r,b)=Cn​(κ,i,b)modkn​, where (κ,i)=Rn(r)(\kappa,i)=R_n(r)(κ,i)=Rn​(r). The positive column count makes this a member of JnJ_nJn​. For every n∈Nn\in\mathbb Nn∈N, every supplied proof of 3≤n3\le n3≤n, and every policy σ\sigmaσ, define the row-to-column function Bn,σ(r)=jn(r,σ(r))B_{n,\sigma}(r)=j_n(r,\sigma(r))Bn,σ​(r)=jn​(r,σ(r)) for every r∈Inr\in I_nr∈In​. Calling this function a basis imposes no injectivity, determinant, or feasibility condition. For every n∈Nn\in\mathbb Nn∈N, every supplied proof of 3≤n3\le n3≤n, every row r∈Inr\in I_nr∈In​, and every Boolean bbb, define the rational action reward an(r,b)=(dn)jn(r,b)a_n(r,b)=(d_n)_{j_n(r,b)}an​(r,b)=(dn​)jn​(r,b)​. For every n∈Nn\in\mathbb Nn∈N, every supplied proof of 3≤n3\le n3≤n, and every policy σ\sigmaσ, form the square matrix Mn,σM_{n,\sigma}Mn,σ​ indexed by InI_nIn​ in both coordinates, with (Mn,σ)q,r=(An)q,Bn,σ(r)(M_{n,\sigma})_{q,r}=(A_n)_{q,B_{n,\sigma}(r)}(Mn,σ​)q,r​=(An​)q,Bn,σ​(r)​. Define the rational value vector vn,σ=(Mn,σT)−1(an(r,σ(r)))r∈Inv_{n,\sigma}=(M_{n,\sigma}^{\mathsf T})^{-1}(a_n(r,\sigma(r)))_{r\in I_n}vn,σ​=(Mn,σT​)−1(an​(r,σ(r)))r∈In​​. The inverse is total; no invertibility hypothesis is imposed. For every n∈Nn\in\mathbb Nn∈N, every supplied proof of 3≤n3\le n3≤n, every pair of rows r,q∈Inr,q\in I_nr,q∈In​, and every Boolean bbb, define the rational number pn(r,b,q)=1q=r−(An)q,jn(r,b)p_n(r,b,q)=\mathbf1_{q=r}-(A_n)_{q,j_n(r,b)}pn​(r,b,q)=1q=r​−(An​)q,jn​(r,b)​, where 1q=r\mathbf1_{q=r}1q=r​ is 111 when q=rq=rq=r and 000 otherwise. The definition itself includes no assertion about its sign or about any sum of such numbers. For every n∈Nn\in\mathbb Nn∈N, every supplied proof of 3≤n3\le n3≤n, every policy σ\sigmaσ, and every row r∈Inr\in I_nr∈In​, the row is improving precisely when vn,σ(r)<an(r,σ(r)‾)+∑q∈Inpn(r,σ(r)‾,q)vn,σ(q)v_{n,\sigma}(r)<a_n(r,\overline{\sigma(r)})+\sum_{q\in I_n}p_n(r,\overline{\sigma(r)},q)v_{n,\sigma}(q)vn,σ​(r)<an​(r,σ(r)​)+∑q∈In​​pn​(r,σ(r)​,q)vn,σ​(q). The comparison is strict, and it compares the opposite Boolean action with the displayed total-inverse value. For every n∈Nn\in\mathbb Nn∈N, the ordering equivalence on Jn={0,…,kn−1}J_n=\{0,\ldots,k_n-1\}Jn​={0,…,kn​−1} is the identity j↦jj\mapsto jj↦j, including the empty equivalence when n=0n=0n=0 or n=1n=1n=1. For last-column index ℓ∈Jn\ell\in J_nℓ∈Jn​ and candidate column j∈Jnj\in J_nj∈Jn​, the cyclic distance used here is Δn(ℓ,j)=(j+kn−ℓ) mod kn\Delta_n(\ell,j)=(j+k_n-\ell)\bmod k_nΔn​(ℓ,j)=(j+kn​−ℓ)modkn​. It is the specialization of the formula ((o(j))+kn−ℓ) mod kn((o(j))+k_n-\ell)\bmod k_n((o(j))+kn​−ℓ)modkn​ to the identity ordering ooo. Subtraction in the numerator is natural-number subtraction; it does not truncate for these indices because j+kn≥ℓj+k_n\ge\ellj+kn​≥ℓ. In particular Δn(ℓ,ℓ)=0\Delta_n(\ell,\ell)=0Δn​(ℓ,ℓ)=0 whenever such an index exists. For every n∈Nn\in\mathbb Nn∈N, every supplied proof of 3≤n3\le n3≤n, and any two MDP states s=(σ,ℓ)s=(\sigma,\ell)s=(σ,ℓ) and s′=(σ′,ℓ′)s^{\prime}=(\sigma^{\prime},\ell^{\prime})s′=(σ′,ℓ′), an MDP step holds exactly when there exists r∈Inr\in I_nr∈In​ such that rrr is improving for σ\sigmaσ, for every q∈Inq\in I_nq∈In​ that is improving for σ\sigmaσ one has Δn(ℓ,jn(r,σ(r)‾))≤Δn(ℓ,jn(q,σ(q)‾))\Delta_n(\ell,j_n(r,\overline{\sigma(r)}))\le\Delta_n(\ell,j_n(q,\overline{\sigma(q)}))Δn​(ℓ,jn​(r,σ(r)​))≤Δn​(ℓ,jn​(q,σ(q)​)), the new policy is σ′(r)=σ(r)‾\sigma^{\prime}(r)=\overline{\sigma(r)}σ′(r)=σ(r)​ and σ′(q)=σ(q)\sigma^{\prime}(q)=\sigma(q)σ′(q)=σ(q) for all q≠rq\ne rq=r, and ℓ′=jn(r,σ(r)‾)\ell^{\prime}=j_n(r,\overline{\sigma(r)})ℓ′=jn​(r,σ(r)​). The comparison with every other improving row uses a non-strict inequality. For every pair (κ,i)∈K×N(\kappa,i)\in K\times\mathbb N(κ,i)∈K×N, define the Boolean b0(κ,i)b_0(\kappa,i)b0​(κ,i) to be 111 exactly when κ=d\kappa=dκ=d or both κ=e\kappa=eκ=e and i=1i=1i=1, and to be 000 otherwise. For every n∈Nn\in\mathbb Nn∈N, the initial policy is σn0(r)=b0(Rn(r))\sigma_n^0(r)=b_0(R_n(r))σn0​(r)=b0​(Rn​(r)) for each r∈Inr\in I_nr∈In​; equivalently it selects 111 exactly on rows of kind ddd and on the row of kind eee and level 111, and selects 000 on all other rows. This is the empty function if n=0n=0n=0 or n=1n=1n=1. For every n∈Nn\in\mathbb Nn∈N and every supplied proof of 3≤n3\le n3≤n, the initial MDP state is (σn0,0)(\sigma_n^0,0)(σn0​,0), with 0∈Jn0\in J_n0∈Jn​. For every n∈Nn\in\mathbb Nn∈N, every supplied proof of 3≤n3\le n3≤n, every sequence s:N→MDPState(n)s:\mathbb N\to\mathrm{MDPState}(n)s:N→MDPState(n), and every T∈NT\in\mathbb NT∈N, the MDP-run predicate holds exactly when s(0)=(σn0,0)s(0)=(\sigma_n^0,0)s(0)=(σn0​,0), for every natural t<Tt<Tt<T the MDP-step predicate holds from s(t)s(t)s(t) to s(t+1)s(t+1)s(t+1), and no row r∈Inr\in I_nr∈In​ is improving for the policy component of s(T)s(T)s(T). This is a predicate on the specified s,Ts,Ts,T, not an existence assertion. It permits T=0T=0T=0 exactly when the initial policy has no improving row; values of s(t)s(t)s(t) for t>Tt>Tt>T are unrestricted by this predicate.

cubeAdjacent. All indices and parameters described as natural numbers include zero. In the formulas below, a⊖b=max⁡(a−b,0)a\ominus b=\max(a-b,0)a⊖b=max(a−b,0) denotes subtraction in the natural numbers, ⌊a/b⌋\lfloor a/b\rfloor⌊a/b⌋ denotes natural-number division, and a mod ba\bmod bamodb denotes natural-number remainder. Boolean values are written 000 for false and 111 for true, and bˉ\bar bbˉ denotes their negation. A finite index set of size zero is empty. A rational matrix inverse is the total matrix inverse, which is the zero matrix when its determinant is zero; no nonzero-determinant condition is implicit in the notation. For every n∈Nn\in\mathbb Nn∈N, the number of rows is mn=5(n⊖1)m_n=5(n\ominus1)mn​=5(n⊖1); write In={0,…,mn−1}I_n=\{0,\ldots,m_n-1\}In​={0,…,mn​−1} for its finite index set. Thus m0=m1=0m_0=m_1=0m0​=m1​=0. For every n∈Nn\in\mathbb Nn∈N, a policy is any function σ:In→{0,1}\sigma:I_n\to\{0,1\}σ:In​→{0,1}. No additional conditions are imposed. For n=0n=0n=0 or n=1n=1n=1, there is exactly one such function, the empty function. For every n∈Nn\in\mathbb Nn∈N and policies σ,τ:In→{0,1}\sigma,\tau:I_n\to\{0,1\}σ,τ:In​→{0,1}, cube adjacency means that there exists r∈Inr\in I_nr∈In​ with σ(r)≠τ(r)\sigma(r)\ne\tau(r)σ(r)=τ(r) and, for every q∈Inq\in I_nq∈In​ with q≠rq\ne rq=r, σ(q)=τ(q)\sigma(q)=\tau(q)σ(q)=τ(q). Thus it requires exactly one differing coordinate. If n=0n=0n=0 or n=1n=1n=1, no policies satisfy this relation, because there is no row rrr.

inCubeFace. All indices and parameters described as natural numbers include zero. In the formulas below, a⊖b=max⁡(a−b,0)a\ominus b=\max(a-b,0)a⊖b=max(a−b,0) denotes subtraction in the natural numbers, ⌊a/b⌋\lfloor a/b\rfloor⌊a/b⌋ denotes natural-number division, and a mod ba\bmod bamodb denotes natural-number remainder. Boolean values are written 000 for false and 111 for true, and bˉ\bar bbˉ denotes their negation. A finite index set of size zero is empty. A rational matrix inverse is the total matrix inverse, which is the zero matrix when its determinant is zero; no nonzero-determinant condition is implicit in the notation. For every n∈Nn\in\mathbb Nn∈N, the number of rows is mn=5(n⊖1)m_n=5(n\ominus1)mn​=5(n⊖1); write In={0,…,mn−1}I_n=\{0,\ldots,m_n-1\}In​={0,…,mn​−1} for its finite index set. Thus m0=m1=0m_0=m_1=0m0​=m1​=0. For every n∈Nn\in\mathbb Nn∈N, a policy is any function σ:In→{0,1}\sigma:I_n\to\{0,1\}σ:In​→{0,1}. No additional conditions are imposed. For n=0n=0n=0 or n=1n=1n=1, there is exactly one such function, the empty function. For every n∈Nn\in\mathbb Nn∈N, every face specification f:In→{none,some(0),some(1)}f:I_n\to\{\mathrm{none},\mathrm{some}(0),\mathrm{some}(1)\}f:In​→{none,some(0),some(1)}, and every policy σ\sigmaσ, membership in the face means that for every r∈Inr\in I_nr∈In​ and every Boolean bbb, the equality f(r)=some(b)f(r)=\mathrm{some}(b)f(r)=some(b) implies σ(r)=b\sigma(r)=bσ(r)=b. A value none\mathrm{none}none imposes no condition on that coordinate. The specifications include the whole cube (all values none\mathrm{none}none) and faces fixing every coordinate. When InI_nIn​ is empty the condition is vacuous.

cubeOrientation. All indices and parameters described as natural numbers include zero. In the formulas below, a⊖b=max⁡(a−b,0)a\ominus b=\max(a-b,0)a⊖b=max(a−b,0) denotes subtraction in the natural numbers, ⌊a/b⌋\lfloor a/b\rfloor⌊a/b⌋ denotes natural-number division, and a mod ba\bmod bamodb denotes natural-number remainder. Boolean values are written 000 for false and 111 for true, and bˉ\bar bbˉ denotes their negation. A finite index set of size zero is empty. A rational matrix inverse is the total matrix inverse, which is the zero matrix when its determinant is zero; no nonzero-determinant condition is implicit in the notation. For every n∈Nn\in\mathbb Nn∈N, the number of rows is mn=5(n⊖1)m_n=5(n\ominus1)mn​=5(n⊖1); write In={0,…,mn−1}I_n=\{0,\ldots,m_n-1\}In​={0,…,mn​−1} for its finite index set. Thus m0=m1=0m_0=m_1=0m0​=m1​=0. For every n∈Nn\in\mathbb Nn∈N, a policy is any function σ:In→{0,1}\sigma:I_n\to\{0,1\}σ:In​→{0,1}. No additional conditions are imposed. For n=0n=0n=0 or n=1n=1n=1, there is exactly one such function, the empty function. For every n∈Nn\in\mathbb Nn∈N and policies σ,τ:In→{0,1}\sigma,\tau:I_n\to\{0,1\}σ,τ:In​→{0,1}, cube adjacency means that there exists r∈Inr\in I_nr∈In​ with σ(r)≠τ(r)\sigma(r)\ne\tau(r)σ(r)=τ(r) and, for every q∈Inq\in I_nq∈In​ with q≠rq\ne rq=r, σ(q)=τ(q)\sigma(q)=\tau(q)σ(q)=τ(q). Thus it requires exactly one differing coordinate. If n=0n=0n=0 or n=1n=1n=1, no policies satisfy this relation, because there is no row rrr. The type KKK consists of exactly five distinct constructors, denoted a,b,c,d,ea,b,c,d,ea,b,c,d,e, with decidable equality. For every n∈Nn\in\mathbb Nn∈N and row index r∈In={0,…,mn−1}r\in I_n=\{0,\ldots,m_n-1\}r∈In​={0,…,mn​−1}, define its kind and level Rn(r)R_n(r)Rn​(r) by the following ordered cases: if r<n⊖1r<n\ominus1r<n⊖1, it is (a,r+2)(a,r+2)(a,r+2); otherwise, if r<(n⊖1)+(n⊖2)r<(n\ominus1)+(n\ominus2)r<(n⊖1)+(n⊖2), it is (b,r⊖(n⊖1)+2)(b,r\ominus(n\ominus1)+2)(b,r⊖(n⊖1)+2); otherwise, if r<2(n⊖1)+(n⊖2)r<2(n\ominus1)+(n\ominus2)r<2(n⊖1)+(n⊖2), it is (c,r⊖((n⊖1)+(n⊖2))+2)(c,r\ominus((n\ominus1)+(n\ominus2))+2)(c,r⊖((n⊖1)+(n⊖2))+2); otherwise, if r<3(n⊖1)+(n⊖2)r<3(n\ominus1)+(n\ominus2)r<3(n⊖1)+(n⊖2), it is (d,r⊖(2(n⊖1)+(n⊖2))+2)(d,r\ominus(2(n\ominus1)+(n\ominus2))+2)(d,r⊖(2(n⊖1)+(n⊖2))+2); otherwise it is (e,r⊖(3(n⊖1)+(n⊖2))+1)(e,r\ominus(3(n\ominus1)+(n\ominus2))+1)(e,r⊖(3(n⊖1)+(n⊖2))+1). There are no row indices when n=0n=0n=0 or n=1n=1n=1. A name is a triple v=(κ,i,b)v=(\kappa,i,b)v=(κ,i,b) with kind κ∈K\kappa\in Kκ∈K, level i∈Ni\in\mathbb Ni∈N, and Boolean value b∈{0,1}b\in\{0,1\}b∈{0,1}. There are no restrictions on the level or on combinations of fields. Equality of names is decidable. For every n∈Nn\in\mathbb Nn∈N, the number of columns is kn=10(n⊖1)k_n=10(n\ominus1)kn​=10(n⊖1); write Jn={0,…,kn−1}J_n=\{0,\ldots,k_n-1\}Jn​={0,…,kn​−1} for its finite index set. Thus k0=k1=0k_0=k_1=0k0​=k1​=0. For every n∈Nn\in\mathbb Nn∈N and column index j∈Jn={0,…,kn−1}j\in J_n=\{0,\ldots,k_n-1\}j∈Jn​={0,…,kn​−1}, define the name Nn(j)N_n(j)Nn​(j) by the following ordered cases. If j=0j=0j=0, use (e,1,1)(e,1,1)(e,1,1). Otherwise, if j<4n⊖5j<4n\ominus5j<4n⊖5, put i=⌊(j⊖1)/4⌋+2i=\lfloor(j\ominus1)/4\rfloor+2i=⌊(j⊖1)/4⌋+2 and use respectively (d,i,0)(d,i,0)(d,i,0), (e,i,1)(e,i,1)(e,i,1), (b,i,1)(b,i,1)(b,i,1), or (b,i,0)(b,i,0)(b,i,0) according as (j⊖1) mod 4(j\ominus1)\bmod4(j⊖1)mod4 is 000, 111, 222, or anything else. Otherwise, if j<6n⊖7j<6n\ominus7j<6n⊖7, put u=j⊖(4n⊖5)u=j\ominus(4n\ominus5)u=j⊖(4n⊖5) and use (c,⌊u/2⌋+2,b)(c,\lfloor u/2\rfloor+2,b)(c,⌊u/2⌋+2,b), where b=1b=1b=1 exactly when u mod 2=1u\bmod2=1umod2=1. Otherwise, if j<7n⊖7j<7n\ominus7j<7n⊖7, use (e,j⊖(6n⊖7)+1,0)(e,j\ominus(6n\ominus7)+1,0)(e,j⊖(6n⊖7)+1,0). Otherwise, if j<8n⊖8j<8n\ominus8j<8n⊖8, use (d,j⊖(7n⊖7)+2,1)(d,j\ominus(7n\ominus7)+2,1)(d,j⊖(7n⊖7)+2,1). In the last case put u=j⊖(8n⊖8)u=j\ominus(8n\ominus8)u=j⊖(8n⊖8) and use (a,n⊖⌊u/2⌋,b)(a,n\ominus\lfloor u/2\rfloor,b)(a,n⊖⌊u/2⌋,b), where b=1b=1b=1 exactly when u mod 2=0u\bmod2=0umod2=0. There are no column indices when n=0n=0n=0 or n=1n=1n=1. For every name vvv, every kind κ∈K\kappa\in Kκ∈K, every level i∈Ni\in\mathbb Ni∈N, and every Boolean bbb, the rational number δv(κ,i,b)\delta_v(\kappa,i,b)δv​(κ,i,b) is 111 if v=(κ,i,b)v=(\kappa,i,b)v=(κ,i,b) and is 000 otherwise. For every n∈Nn\in\mathbb Nn∈N, define the rational number Sn=2n+1S_n=2n+1Sn​=2n+1, with nnn regarded as a rational number in this formula. In particular, SnS_nSn​ is never zero. For every n∈Nn\in\mathbb Nn∈N, define the rational number εn=1/Sn2n+2\varepsilon_n=1/S_n^{2n+2}εn​=1/Sn2n+2​. For every n∈Nn\in\mathbb Nn∈N, every pair (κ,i)∈K×N(\kappa,i)\in K\times\mathbb N(κ,i)∈K×N, and every name vvv, let xλ,l,b=δv(λ,l,b)x_{\lambda,l,b}=\delta_v(\lambda,l,b)xλ,l,b​=δv​(λ,l,b), o=xκ,i,0+xκ,i,1o=x_{\kappa,i,0}+x_{\kappa,i,1}o=xκ,i,0​+xκ,i,1​, and u=xa,i,1+xb,i,1+xc,i,1+xd,i,1+xe,i,1u=x_{a,i,1}+x_{b,i,1}+x_{c,i,1}+x_{d,i,1}+x_{e,i,1}u=xa,i,1​+xb,i,1​+xc,i,1​+xd,i,1​+xe,i,1​. The rational coefficient Fn((κ,i),v)F_n((\kappa,i),v)Fn​((κ,i),v) is defined by these cases: for κ=a\kappa=aκ=a and i=2i=2i=2, it is o−εn(xb,2,0+xc,2,0+xd,2,0+xe,1,1)o-\varepsilon_n(x_{b,2,0}+x_{c,2,0}+x_{d,2,0}+x_{e,1,1})o−εn​(xb,2,0​+xc,2,0​+xd,2,0​+xe,1,1​); for κ=a\kappa=aκ=a and i≠2i\ne2i=2, it is o−xa,i⊖1,0−εn(xa,i⊖1,1+xb,i⊖1,1+xc,i⊖1,1+xd,i⊖1,1+xe,i⊖1,1)o-x_{a,i\ominus1,0}-\varepsilon_n(x_{a,i\ominus1,1}+x_{b,i\ominus1,1}+x_{c,i\ominus1,1}+x_{d,i\ominus1,1}+x_{e,i\ominus1,1})o−xa,i⊖1,0​−εn​(xa,i⊖1,1​+xb,i⊖1,1​+xc,i⊖1,1​+xd,i⊖1,1​+xe,i⊖1,1​); for κ=b\kappa=bκ=b, it is o−xb,i+1,0−xd,i+1,0o-x_{b,i+1,0}-x_{d,i+1,0}o−xb,i+1,0​−xd,i+1,0​; for κ=c\kappa=cκ=c and i=ni=ni=n, it is o−∑j=0nxe,j,0o-\sum_{j=0}^{n}x_{e,j,0}o−∑j=0n​xe,j,0​, including the term j=0j=0j=0; for κ=c\kappa=cκ=c and i≠ni\ne ni=n, it is o−xc,i+1,0o-x_{c,i+1,0}o−xc,i+1,0​; for κ=d\kappa=dκ=d, it is o−1−εn2uo-\frac{1-\varepsilon_n}{2}uo−21−εn​​u; for κ=e\kappa=eκ=e and i=1i=1i=1, it is o−(1−εn)(xb,2,0+xc,2,0+xd,2,0+xe,1,1)o-(1-\varepsilon_n)(x_{b,2,0}+x_{c,2,0}+x_{d,2,0}+x_{e,1,1})o−(1−εn​)(xb,2,0​+xc,2,0​+xd,2,0​+xe,1,1​); and for κ=e\kappa=eκ=e and i≠1i\ne1i=1, it is o−1−εn2uo-\frac{1-\varepsilon_n}{2}uo−21−εn​​u. The pair and name need not correspond to indices of the program. For every pair n,i∈Nn,i\in\mathbb Nn,i∈N, define the rational reward Gn,i=(−Sn)2i⊖1G_{n,i}=(-S_n)^{2i\ominus1}Gn,i​=(−Sn​)2i⊖1. In particular, Gn,0=1G_{n,0}=1Gn,0​=1 because its exponent is zero. For every pair n,i∈Nn,i\in\mathbb Nn,i∈N, define the rational reward Hn,i=(−Sn)2iH_{n,i}=(-S_n)^{2i}Hn,i​=(−Sn​)2i. In particular, Hn,0=1H_{n,0}=1Hn,0​=1. For every n∈Nn\in\mathbb Nn∈N and every name v=(κ,i,b)v=(\kappa,i,b)v=(κ,i,b), define its rational objective coefficient Dn(v)D_n(v)Dn​(v) as a base contribution plus (Gn,1+εnHn,1)(δv(b,2,0)+δv(c,2,0)+δv(d,2,0))(G_{n,1}+\varepsilon_nH_{n,1})(\delta_v(b,2,0)+\delta_v(c,2,0)+\delta_v(d,2,0))(Gn,1​+εn​Hn,1​)(δv​(b,2,0)+δv​(c,2,0)+δv​(d,2,0)). The base contribution is Gn,i+εnHn,iG_{n,i}+\varepsilon_nH_{n,i}Gn,i​+εn​Hn,i​ when b=1b=1b=1 and κ∈{a,b,c}\kappa\in\{a,b,c\}κ∈{a,b,c}; it is εnHn,i\varepsilon_nH_{n,i}εn​Hn,i​ when b=1b=1b=1 and κ∈{d,e}\kappa\in\{d,e\}κ∈{d,e}; it is 111 when (κ,b)=(e,0)(\kappa,b)=(e,0)(κ,b)=(e,0); and it is 000 in every remaining case. In the subscripts of δv\delta_vδv​, b,c,db,c,db,c,d denote kinds, whereas the last coordinate of the name is the Boolean bbb. This defines a coefficient even for names outside all valid column ranges. For every n∈Nn\in\mathbb Nn∈N, define the rational linear-program data Pn=(An,1,dn)P_n=(A_n,\mathbf1,d_n)Pn​=(An​,1,dn​) with mnm_nmn​ rows and knk_nkn​ columns by (An)rj=Fn(Rn(r),Nn(j))(A_n)_{rj}=F_n(R_n(r),N_n(j))(An​)rj​=Fn​(Rn​(r),Nn​(j)), (1)r=1(\mathbf1)_r=1(1)r​=1, and (dn)j=Dn(Nn(j))(d_n)_j=D_n(N_n(j))(dn​)j​=Dn​(Nn​(j)). The underlying linear-program type stores only a rational matrix, right-hand-side vector, and objective vector; it does not impose feasibility, rank, boundedness, or sign conditions. Its rational feasible points are the vectors x∈QJnx\in\mathbb Q^{J_n}x∈QJn​ with Anx=1A_nx=\mathbf1An​x=1 and xj≥0x_j\ge0xj​≥0 for every j∈Jnj\in J_nj∈Jn​, and its objective at xxx is ∑j∈Jn(dn)jxj\sum_{j\in J_n}(d_n)_jx_j∑j∈Jn​​(dn​)j​xj​. For n=0n=0n=0 or n=1n=1n=1, both index sets are empty. For every n∈Nn\in\mathbb Nn∈N and every name (κ,i,b)(\kappa,i,b)(κ,i,b), define its natural-number rank Cn(κ,i,b)C_n(\kappa,i,b)Cn​(κ,i,b) as follows: Cn(e,i,1)=0C_n(e,i,1)=0Cn​(e,i,1)=0 if i=1i=1i=1, and Cn(e,i,1)=4(i⊖2)+2C_n(e,i,1)=4(i\ominus2)+2Cn​(e,i,1)=4(i⊖2)+2 otherwise; Cn(d,i,0)=4(i⊖2)+1C_n(d,i,0)=4(i\ominus2)+1Cn​(d,i,0)=4(i⊖2)+1; Cn(b,i,1)=4(i⊖2)+3C_n(b,i,1)=4(i\ominus2)+3Cn​(b,i,1)=4(i⊖2)+3; Cn(b,i,0)=4(i⊖2)+4C_n(b,i,0)=4(i\ominus2)+4Cn​(b,i,0)=4(i⊖2)+4; Cn(c,i,0)=(4n⊖5)+2(i⊖2)C_n(c,i,0)=(4n\ominus5)+2(i\ominus2)Cn​(c,i,0)=(4n⊖5)+2(i⊖2); Cn(c,i,1)=(4n⊖5)+2(i⊖2)+1C_n(c,i,1)=(4n\ominus5)+2(i\ominus2)+1Cn​(c,i,1)=(4n⊖5)+2(i⊖2)+1; Cn(e,i,0)=(6n⊖7)+(i⊖1)C_n(e,i,0)=(6n\ominus7)+(i\ominus1)Cn​(e,i,0)=(6n⊖7)+(i⊖1); Cn(d,i,1)=(7n⊖7)+(i⊖2)C_n(d,i,1)=(7n\ominus7)+(i\ominus2)Cn​(d,i,1)=(7n⊖7)+(i⊖2); Cn(a,i,1)=(8n⊖8)+2(n⊖i)C_n(a,i,1)=(8n\ominus8)+2(n\ominus i)Cn​(a,i,1)=(8n⊖8)+2(n⊖i); and Cn(a,i,0)=(8n⊖8)+2(n⊖i)+1C_n(a,i,0)=(8n\ominus8)+2(n\ominus i)+1Cn​(a,i,0)=(8n⊖8)+2(n⊖i)+1. The function is defined on every name, including levels outside the row or column ranges, and its output is a natural number, without a bound by knk_nkn​. For every n∈Nn\in\mathbb Nn∈N, every supplied proof of 3≤n3\le n3≤n, every row r∈Inr\in I_nr∈In​, and every Boolean bbb, the column for this action is jn(r,b)=Cn(κ,i,b) mod knj_n(r,b)=C_n(\kappa,i,b)\bmod k_njn​(r,b)=Cn​(κ,i,b)modkn​, where (κ,i)=Rn(r)(\kappa,i)=R_n(r)(κ,i)=Rn​(r). The positive column count makes this a member of JnJ_nJn​. For every n∈Nn\in\mathbb Nn∈N, every supplied proof of 3≤n3\le n3≤n, and every policy σ\sigmaσ, define the row-to-column function Bn,σ(r)=jn(r,σ(r))B_{n,\sigma}(r)=j_n(r,\sigma(r))Bn,σ​(r)=jn​(r,σ(r)) for every r∈Inr\in I_nr∈In​. Calling this function a basis imposes no injectivity, determinant, or feasibility condition. For n≥3n\ge3n≥3 and a policy σ\sigmaσ, put (Mn,σ)q,r=(An)q,Bn,σ(r)(M_{n,\sigma})_{q,r}=(A_n)_{q,B_{n,\sigma}(r)}(Mn,σ​)q,r​=(An​)q,Bn,σ​(r)​, βn,σ=Mn,σ−11\beta_{n,\sigma}=M_{n,\sigma}^{-1}\mathbf1βn,σ​=Mn,σ−1​1, and xn,σ,j=∑r∈In: Bn,σ(r)=jβn,σ,rx_{n,\sigma,j}=\sum_{r\in I_n:\ B_{n,\sigma}(r)=j}\beta_{n,\sigma,r}xn,σ,j​=∑r∈In​: Bn,σ​(r)=j​βn,σ,r​ for every j∈Jnj\in J_nj∈Jn​. This is the basic point of the row-to-column function: repeated selected columns, if any, contribute by summation. The inverse is total, and these formulas alone impose no feasibility or determinant condition. For every n∈Nn\in\mathbb Nn∈N, every supplied proof of 3≤n3\le n3≤n, every rational vector c∈QJnc\in\mathbb Q^{J_n}c∈QJn​, and every two policies σ,τ\sigma,\tauσ,τ, the directed relation σ⟶cτ\sigma\longrightarrow_c\tauσ⟶c​τ holds exactly when they are cube-adjacent and ∑j∈Jncjxn,σ,j<∑j∈Jncjxn,τ,j\sum_{j\in J_n}c_jx_{n,\sigma,j}<\sum_{j\in J_n}c_jx_{n,\tau,j}∑j∈Jn​​cj​xn,σ,j​<∑j∈Jn​​cj​xn,τ,j​. The basic points in this comparison are formed from PnP_nPn​ with its original matrix and right-hand side; only the objective coefficients in the sums are replaced by ccc. The comparison is strict, so equality of the two sums gives no directed edge in either direction.

isAUSO. All indices and parameters described as natural numbers include zero. In the formulas below, a⊖b=max⁡(a−b,0)a\ominus b=\max(a-b,0)a⊖b=max(a−b,0) denotes subtraction in the natural numbers, ⌊a/b⌋\lfloor a/b\rfloor⌊a/b⌋ denotes natural-number division, and a mod ba\bmod bamodb denotes natural-number remainder. Boolean values are written 000 for false and 111 for true, and bˉ\bar bbˉ denotes their negation. A finite index set of size zero is empty. A rational matrix inverse is the total matrix inverse, which is the zero matrix when its determinant is zero; no nonzero-determinant condition is implicit in the notation. For every n∈Nn\in\mathbb Nn∈N, the number of rows is mn=5(n⊖1)m_n=5(n\ominus1)mn​=5(n⊖1); write In={0,…,mn−1}I_n=\{0,\ldots,m_n-1\}In​={0,…,mn​−1} for its finite index set. Thus m0=m1=0m_0=m_1=0m0​=m1​=0. For every n∈Nn\in\mathbb Nn∈N, a policy is any function σ:In→{0,1}\sigma:I_n\to\{0,1\}σ:In​→{0,1}. No additional conditions are imposed. For n=0n=0n=0 or n=1n=1n=1, there is exactly one such function, the empty function. For every n∈Nn\in\mathbb Nn∈N and policies σ,τ:In→{0,1}\sigma,\tau:I_n\to\{0,1\}σ,τ:In​→{0,1}, cube adjacency means that there exists r∈Inr\in I_nr∈In​ with σ(r)≠τ(r)\sigma(r)\ne\tau(r)σ(r)=τ(r) and, for every q∈Inq\in I_nq∈In​ with q≠rq\ne rq=r, σ(q)=τ(q)\sigma(q)=\tau(q)σ(q)=τ(q). Thus it requires exactly one differing coordinate. If n=0n=0n=0 or n=1n=1n=1, no policies satisfy this relation, because there is no row rrr. The type KKK consists of exactly five distinct constructors, denoted a,b,c,d,ea,b,c,d,ea,b,c,d,e, with decidable equality. For every n∈Nn\in\mathbb Nn∈N and row index r∈In={0,…,mn−1}r\in I_n=\{0,\ldots,m_n-1\}r∈In​={0,…,mn​−1}, define its kind and level Rn(r)R_n(r)Rn​(r) by the following ordered cases: if r<n⊖1r<n\ominus1r<n⊖1, it is (a,r+2)(a,r+2)(a,r+2); otherwise, if r<(n⊖1)+(n⊖2)r<(n\ominus1)+(n\ominus2)r<(n⊖1)+(n⊖2), it is (b,r⊖(n⊖1)+2)(b,r\ominus(n\ominus1)+2)(b,r⊖(n⊖1)+2); otherwise, if r<2(n⊖1)+(n⊖2)r<2(n\ominus1)+(n\ominus2)r<2(n⊖1)+(n⊖2), it is (c,r⊖((n⊖1)+(n⊖2))+2)(c,r\ominus((n\ominus1)+(n\ominus2))+2)(c,r⊖((n⊖1)+(n⊖2))+2); otherwise, if r<3(n⊖1)+(n⊖2)r<3(n\ominus1)+(n\ominus2)r<3(n⊖1)+(n⊖2), it is (d,r⊖(2(n⊖1)+(n⊖2))+2)(d,r\ominus(2(n\ominus1)+(n\ominus2))+2)(d,r⊖(2(n⊖1)+(n⊖2))+2); otherwise it is (e,r⊖(3(n⊖1)+(n⊖2))+1)(e,r\ominus(3(n\ominus1)+(n\ominus2))+1)(e,r⊖(3(n⊖1)+(n⊖2))+1). There are no row indices when n=0n=0n=0 or n=1n=1n=1. A name is a triple v=(κ,i,b)v=(\kappa,i,b)v=(κ,i,b) with kind κ∈K\kappa\in Kκ∈K, level i∈Ni\in\mathbb Ni∈N, and Boolean value b∈{0,1}b\in\{0,1\}b∈{0,1}. There are no restrictions on the level or on combinations of fields. Equality of names is decidable. For every n∈Nn\in\mathbb Nn∈N, the number of columns is kn=10(n⊖1)k_n=10(n\ominus1)kn​=10(n⊖1); write Jn={0,…,kn−1}J_n=\{0,\ldots,k_n-1\}Jn​={0,…,kn​−1} for its finite index set. Thus k0=k1=0k_0=k_1=0k0​=k1​=0. For every n∈Nn\in\mathbb Nn∈N and column index j∈Jn={0,…,kn−1}j\in J_n=\{0,\ldots,k_n-1\}j∈Jn​={0,…,kn​−1}, define the name Nn(j)N_n(j)Nn​(j) by the following ordered cases. If j=0j=0j=0, use (e,1,1)(e,1,1)(e,1,1). Otherwise, if j<4n⊖5j<4n\ominus5j<4n⊖5, put i=⌊(j⊖1)/4⌋+2i=\lfloor(j\ominus1)/4\rfloor+2i=⌊(j⊖1)/4⌋+2 and use respectively (d,i,0)(d,i,0)(d,i,0), (e,i,1)(e,i,1)(e,i,1), (b,i,1)(b,i,1)(b,i,1), or (b,i,0)(b,i,0)(b,i,0) according as (j⊖1) mod 4(j\ominus1)\bmod4(j⊖1)mod4 is 000, 111, 222, or anything else. Otherwise, if j<6n⊖7j<6n\ominus7j<6n⊖7, put u=j⊖(4n⊖5)u=j\ominus(4n\ominus5)u=j⊖(4n⊖5) and use (c,⌊u/2⌋+2,b)(c,\lfloor u/2\rfloor+2,b)(c,⌊u/2⌋+2,b), where b=1b=1b=1 exactly when u mod 2=1u\bmod2=1umod2=1. Otherwise, if j<7n⊖7j<7n\ominus7j<7n⊖7, use (e,j⊖(6n⊖7)+1,0)(e,j\ominus(6n\ominus7)+1,0)(e,j⊖(6n⊖7)+1,0). Otherwise, if j<8n⊖8j<8n\ominus8j<8n⊖8, use (d,j⊖(7n⊖7)+2,1)(d,j\ominus(7n\ominus7)+2,1)(d,j⊖(7n⊖7)+2,1). In the last case put u=j⊖(8n⊖8)u=j\ominus(8n\ominus8)u=j⊖(8n⊖8) and use (a,n⊖⌊u/2⌋,b)(a,n\ominus\lfloor u/2\rfloor,b)(a,n⊖⌊u/2⌋,b), where b=1b=1b=1 exactly when u mod 2=0u\bmod2=0umod2=0. There are no column indices when n=0n=0n=0 or n=1n=1n=1. For every name vvv, every kind κ∈K\kappa\in Kκ∈K, every level i∈Ni\in\mathbb Ni∈N, and every Boolean bbb, the rational number δv(κ,i,b)\delta_v(\kappa,i,b)δv​(κ,i,b) is 111 if v=(κ,i,b)v=(\kappa,i,b)v=(κ,i,b) and is 000 otherwise. For every n∈Nn\in\mathbb Nn∈N, define the rational number Sn=2n+1S_n=2n+1Sn​=2n+1, with nnn regarded as a rational number in this formula. In particular, SnS_nSn​ is never zero. For every n∈Nn\in\mathbb Nn∈N, define the rational number εn=1/Sn2n+2\varepsilon_n=1/S_n^{2n+2}εn​=1/Sn2n+2​. For every n∈Nn\in\mathbb Nn∈N, every pair (κ,i)∈K×N(\kappa,i)\in K\times\mathbb N(κ,i)∈K×N, and every name vvv, let xλ,l,b=δv(λ,l,b)x_{\lambda,l,b}=\delta_v(\lambda,l,b)xλ,l,b​=δv​(λ,l,b), o=xκ,i,0+xκ,i,1o=x_{\kappa,i,0}+x_{\kappa,i,1}o=xκ,i,0​+xκ,i,1​, and u=xa,i,1+xb,i,1+xc,i,1+xd,i,1+xe,i,1u=x_{a,i,1}+x_{b,i,1}+x_{c,i,1}+x_{d,i,1}+x_{e,i,1}u=xa,i,1​+xb,i,1​+xc,i,1​+xd,i,1​+xe,i,1​. The rational coefficient Fn((κ,i),v)F_n((\kappa,i),v)Fn​((κ,i),v) is defined by these cases: for κ=a\kappa=aκ=a and i=2i=2i=2, it is o−εn(xb,2,0+xc,2,0+xd,2,0+xe,1,1)o-\varepsilon_n(x_{b,2,0}+x_{c,2,0}+x_{d,2,0}+x_{e,1,1})o−εn​(xb,2,0​+xc,2,0​+xd,2,0​+xe,1,1​); for κ=a\kappa=aκ=a and i≠2i\ne2i=2, it is o−xa,i⊖1,0−εn(xa,i⊖1,1+xb,i⊖1,1+xc,i⊖1,1+xd,i⊖1,1+xe,i⊖1,1)o-x_{a,i\ominus1,0}-\varepsilon_n(x_{a,i\ominus1,1}+x_{b,i\ominus1,1}+x_{c,i\ominus1,1}+x_{d,i\ominus1,1}+x_{e,i\ominus1,1})o−xa,i⊖1,0​−εn​(xa,i⊖1,1​+xb,i⊖1,1​+xc,i⊖1,1​+xd,i⊖1,1​+xe,i⊖1,1​); for κ=b\kappa=bκ=b, it is o−xb,i+1,0−xd,i+1,0o-x_{b,i+1,0}-x_{d,i+1,0}o−xb,i+1,0​−xd,i+1,0​; for κ=c\kappa=cκ=c and i=ni=ni=n, it is o−∑j=0nxe,j,0o-\sum_{j=0}^{n}x_{e,j,0}o−∑j=0n​xe,j,0​, including the term j=0j=0j=0; for κ=c\kappa=cκ=c and i≠ni\ne ni=n, it is o−xc,i+1,0o-x_{c,i+1,0}o−xc,i+1,0​; for κ=d\kappa=dκ=d, it is o−1−εn2uo-\frac{1-\varepsilon_n}{2}uo−21−εn​​u; for κ=e\kappa=eκ=e and i=1i=1i=1, it is o−(1−εn)(xb,2,0+xc,2,0+xd,2,0+xe,1,1)o-(1-\varepsilon_n)(x_{b,2,0}+x_{c,2,0}+x_{d,2,0}+x_{e,1,1})o−(1−εn​)(xb,2,0​+xc,2,0​+xd,2,0​+xe,1,1​); and for κ=e\kappa=eκ=e and i≠1i\ne1i=1, it is o−1−εn2uo-\frac{1-\varepsilon_n}{2}uo−21−εn​​u. The pair and name need not correspond to indices of the program. For every pair n,i∈Nn,i\in\mathbb Nn,i∈N, define the rational reward Gn,i=(−Sn)2i⊖1G_{n,i}=(-S_n)^{2i\ominus1}Gn,i​=(−Sn​)2i⊖1. In particular, Gn,0=1G_{n,0}=1Gn,0​=1 because its exponent is zero. For every pair n,i∈Nn,i\in\mathbb Nn,i∈N, define the rational reward Hn,i=(−Sn)2iH_{n,i}=(-S_n)^{2i}Hn,i​=(−Sn​)2i. In particular, Hn,0=1H_{n,0}=1Hn,0​=1. For every n∈Nn\in\mathbb Nn∈N and every name v=(κ,i,b)v=(\kappa,i,b)v=(κ,i,b), define its rational objective coefficient Dn(v)D_n(v)Dn​(v) as a base contribution plus (Gn,1+εnHn,1)(δv(b,2,0)+δv(c,2,0)+δv(d,2,0))(G_{n,1}+\varepsilon_nH_{n,1})(\delta_v(b,2,0)+\delta_v(c,2,0)+\delta_v(d,2,0))(Gn,1​+εn​Hn,1​)(δv​(b,2,0)+δv​(c,2,0)+δv​(d,2,0)). The base contribution is Gn,i+εnHn,iG_{n,i}+\varepsilon_nH_{n,i}Gn,i​+εn​Hn,i​ when b=1b=1b=1 and κ∈{a,b,c}\kappa\in\{a,b,c\}κ∈{a,b,c}; it is εnHn,i\varepsilon_nH_{n,i}εn​Hn,i​ when b=1b=1b=1 and κ∈{d,e}\kappa\in\{d,e\}κ∈{d,e}; it is 111 when (κ,b)=(e,0)(\kappa,b)=(e,0)(κ,b)=(e,0); and it is 000 in every remaining case. In the subscripts of δv\delta_vδv​, b,c,db,c,db,c,d denote kinds, whereas the last coordinate of the name is the Boolean bbb. This defines a coefficient even for names outside all valid column ranges. For every n∈Nn\in\mathbb Nn∈N, define the rational linear-program data Pn=(An,1,dn)P_n=(A_n,\mathbf1,d_n)Pn​=(An​,1,dn​) with mnm_nmn​ rows and knk_nkn​ columns by (An)rj=Fn(Rn(r),Nn(j))(A_n)_{rj}=F_n(R_n(r),N_n(j))(An​)rj​=Fn​(Rn​(r),Nn​(j)), (1)r=1(\mathbf1)_r=1(1)r​=1, and (dn)j=Dn(Nn(j))(d_n)_j=D_n(N_n(j))(dn​)j​=Dn​(Nn​(j)). The underlying linear-program type stores only a rational matrix, right-hand-side vector, and objective vector; it does not impose feasibility, rank, boundedness, or sign conditions. Its rational feasible points are the vectors x∈QJnx\in\mathbb Q^{J_n}x∈QJn​ with Anx=1A_nx=\mathbf1An​x=1 and xj≥0x_j\ge0xj​≥0 for every j∈Jnj\in J_nj∈Jn​, and its objective at xxx is ∑j∈Jn(dn)jxj\sum_{j\in J_n}(d_n)_jx_j∑j∈Jn​​(dn​)j​xj​. For n=0n=0n=0 or n=1n=1n=1, both index sets are empty. For every n∈Nn\in\mathbb Nn∈N and every name (κ,i,b)(\kappa,i,b)(κ,i,b), define its natural-number rank Cn(κ,i,b)C_n(\kappa,i,b)Cn​(κ,i,b) as follows: Cn(e,i,1)=0C_n(e,i,1)=0Cn​(e,i,1)=0 if i=1i=1i=1, and Cn(e,i,1)=4(i⊖2)+2C_n(e,i,1)=4(i\ominus2)+2Cn​(e,i,1)=4(i⊖2)+2 otherwise; Cn(d,i,0)=4(i⊖2)+1C_n(d,i,0)=4(i\ominus2)+1Cn​(d,i,0)=4(i⊖2)+1; Cn(b,i,1)=4(i⊖2)+3C_n(b,i,1)=4(i\ominus2)+3Cn​(b,i,1)=4(i⊖2)+3; Cn(b,i,0)=4(i⊖2)+4C_n(b,i,0)=4(i\ominus2)+4Cn​(b,i,0)=4(i⊖2)+4; Cn(c,i,0)=(4n⊖5)+2(i⊖2)C_n(c,i,0)=(4n\ominus5)+2(i\ominus2)Cn​(c,i,0)=(4n⊖5)+2(i⊖2); Cn(c,i,1)=(4n⊖5)+2(i⊖2)+1C_n(c,i,1)=(4n\ominus5)+2(i\ominus2)+1Cn​(c,i,1)=(4n⊖5)+2(i⊖2)+1; Cn(e,i,0)=(6n⊖7)+(i⊖1)C_n(e,i,0)=(6n\ominus7)+(i\ominus1)Cn​(e,i,0)=(6n⊖7)+(i⊖1); Cn(d,i,1)=(7n⊖7)+(i⊖2)C_n(d,i,1)=(7n\ominus7)+(i\ominus2)Cn​(d,i,1)=(7n⊖7)+(i⊖2); Cn(a,i,1)=(8n⊖8)+2(n⊖i)C_n(a,i,1)=(8n\ominus8)+2(n\ominus i)Cn​(a,i,1)=(8n⊖8)+2(n⊖i); and Cn(a,i,0)=(8n⊖8)+2(n⊖i)+1C_n(a,i,0)=(8n\ominus8)+2(n\ominus i)+1Cn​(a,i,0)=(8n⊖8)+2(n⊖i)+1. The function is defined on every name, including levels outside the row or column ranges, and its output is a natural number, without a bound by knk_nkn​. For every n∈Nn\in\mathbb Nn∈N, every supplied proof of 3≤n3\le n3≤n, every row r∈Inr\in I_nr∈In​, and every Boolean bbb, the column for this action is jn(r,b)=Cn(κ,i,b) mod knj_n(r,b)=C_n(\kappa,i,b)\bmod k_njn​(r,b)=Cn​(κ,i,b)modkn​, where (κ,i)=Rn(r)(\kappa,i)=R_n(r)(κ,i)=Rn​(r). The positive column count makes this a member of JnJ_nJn​. For every n∈Nn\in\mathbb Nn∈N, every supplied proof of 3≤n3\le n3≤n, and every policy σ\sigmaσ, define the row-to-column function Bn,σ(r)=jn(r,σ(r))B_{n,\sigma}(r)=j_n(r,\sigma(r))Bn,σ​(r)=jn​(r,σ(r)) for every r∈Inr\in I_nr∈In​. Calling this function a basis imposes no injectivity, determinant, or feasibility condition. For n≥3n\ge3n≥3 and a policy σ\sigmaσ, put (Mn,σ)q,r=(An)q,Bn,σ(r)(M_{n,\sigma})_{q,r}=(A_n)_{q,B_{n,\sigma}(r)}(Mn,σ​)q,r​=(An​)q,Bn,σ​(r)​, βn,σ=Mn,σ−11\beta_{n,\sigma}=M_{n,\sigma}^{-1}\mathbf1βn,σ​=Mn,σ−1​1, and xn,σ,j=∑r∈In: Bn,σ(r)=jβn,σ,rx_{n,\sigma,j}=\sum_{r\in I_n:\ B_{n,\sigma}(r)=j}\beta_{n,\sigma,r}xn,σ,j​=∑r∈In​: Bn,σ​(r)=j​βn,σ,r​ for every j∈Jnj\in J_nj∈Jn​. This is the basic point of the row-to-column function: repeated selected columns, if any, contribute by summation. The inverse is total, and these formulas alone impose no feasibility or determinant condition. For every n∈Nn\in\mathbb Nn∈N, every supplied proof of 3≤n3\le n3≤n, every rational vector c∈QJnc\in\mathbb Q^{J_n}c∈QJn​, and every two policies σ,τ\sigma,\tauσ,τ, the directed relation σ⟶cτ\sigma\longrightarrow_c\tauσ⟶c​τ holds exactly when they are cube-adjacent and ∑j∈Jncjxn,σ,j<∑j∈Jncjxn,τ,j\sum_{j\in J_n}c_jx_{n,\sigma,j}<\sum_{j\in J_n}c_jx_{n,\tau,j}∑j∈Jn​​cj​xn,σ,j​<∑j∈Jn​​cj​xn,τ,j​. The basic points in this comparison are formed from PnP_nPn​ with its original matrix and right-hand side; only the objective coefficients in the sums are replaced by ccc. The comparison is strict, so equality of the two sums gives no directed edge in either direction. For every n∈Nn\in\mathbb Nn∈N, every face specification f:In→{none,some(0),some(1)}f:I_n\to\{\mathrm{none},\mathrm{some}(0),\mathrm{some}(1)\}f:In​→{none,some(0),some(1)}, and every policy σ\sigmaσ, membership in the face means that for every r∈Inr\in I_nr∈In​ and every Boolean bbb, the equality f(r)=some(b)f(r)=\mathrm{some}(b)f(r)=some(b) implies σ(r)=b\sigma(r)=bσ(r)=b. A value none\mathrm{none}none imposes no condition on that coordinate. The specifications include the whole cube (all values none\mathrm{none}none) and faces fixing every coordinate. When InI_nIn​ is empty the condition is vacuous. For every n∈Nn\in\mathbb Nn∈N, every supplied proof of 3≤n3\le n3≤n, and every rational objective vector c∈QJnc\in\mathbb Q^{J_n}c∈QJn​, the AUSO predicate is the conjunction of these three conditions: for every pair of policies σ,τ\sigma,\tauσ,τ that are cube-adjacent, either σ⟶cτ\sigma\longrightarrow_c\tauσ⟶c​τ or τ⟶cσ\tau\longrightarrow_c\sigmaτ⟶c​σ; for every policy σ\sigmaσ, there is no nonempty finite path of ⟶c\longrightarrow_c⟶c​ edges from σ\sigmaσ back to itself; and for every face specification fff, there exists exactly one policy σ\sigmaσ such that σ\sigmaσ belongs to that face and, for every policy τ\tauτ belonging to the same face, σ⟶cτ\sigma\longrightarrow_c\tauσ⟶c​τ does not hold. The last condition includes the entire cube and singleton faces, and its uniqueness ranges over all policies satisfying both stated requirements.

isVertex. All indices and parameters described as natural numbers include zero. In the formulas below, a⊖b=max⁡(a−b,0)a\ominus b=\max(a-b,0)a⊖b=max(a−b,0) denotes subtraction in the natural numbers, ⌊a/b⌋\lfloor a/b\rfloor⌊a/b⌋ denotes natural-number division, and a mod ba\bmod bamodb denotes natural-number remainder. Boolean values are written 000 for false and 111 for true, and bˉ\bar bbˉ denotes their negation. A finite index set of size zero is empty. A rational matrix inverse is the total matrix inverse, which is the zero matrix when its determinant is zero; no nonzero-determinant condition is implicit in the notation. For every pair of natural numbers m,km,km,k, every rational linear-program datum P=(A,b,c)P=(A,b,c)P=(A,b,c) with A∈Qm×kA\in\mathbb Q^{m\times k}A∈Qm×k, b∈Qmb\in\mathbb Q^mb∈Qm, and c∈Qkc\in\mathbb Q^kc∈Qk, and every x∈Qkx\in\mathbb Q^kx∈Qk, define xxx to be a vertex precisely when Ax=bAx=bAx=b and xj≥0x_j\ge0xj​≥0 for all jjj, and the following implication holds for every y,z∈Qky,z\in\mathbb Q^ky,z∈Qk: if Ay=bAy=bAy=b, yj≥0y_j\ge0yj​≥0 for all jjj, Az=bAz=bAz=b, zj≥0z_j\ge0zj​≥0 for all jjj, and xj=(yj+zj)/2x_j=(y_j+z_j)/2xj​=(yj​+zj​)/2 for every jjj, then y=xy=xy=x and z=xz=xz=x. The coordinate sets may be empty; the definition requires xxx itself to be feasible, and does not use the objective vector ccc.

polytopeAdjacent. All indices and parameters described as natural numbers include zero. In the formulas below, a⊖b=max⁡(a−b,0)a\ominus b=\max(a-b,0)a⊖b=max(a−b,0) denotes subtraction in the natural numbers, ⌊a/b⌋\lfloor a/b\rfloor⌊a/b⌋ denotes natural-number division, and a mod ba\bmod bamodb denotes natural-number remainder. Boolean values are written 000 for false and 111 for true, and bˉ\bar bbˉ denotes their negation. A finite index set of size zero is empty. A rational matrix inverse is the total matrix inverse, which is the zero matrix when its determinant is zero; no nonzero-determinant condition is implicit in the notation. For every pair of natural numbers m,km,km,k, every rational linear-program datum P=(A,b,c)P=(A,b,c)P=(A,b,c) with A∈Qm×kA\in\mathbb Q^{m\times k}A∈Qm×k, b∈Qmb\in\mathbb Q^mb∈Qm, and c∈Qkc\in\mathbb Q^kc∈Qk, and every x,y∈Qkx,y\in\mathbb Q^kx,y∈Qk, polytope adjacency means x≠yx\ne yx=y, both xxx and yyy are vertices, and for every z∈Qkz\in\mathbb Q^kz∈Qk, if Az=bAz=bAz=b, all zj≥0z_j\ge0zj​≥0, and for every jjj the two equalities xj=0x_j=0xj​=0 and yj=0y_j=0yj​=0 imply zj=0z_j=0zj​=0, then there exists a rational ttt with 0≤t≤10\le t\le10≤t≤1 and zj=(1−t)xj+tyjz_j=(1-t)x_j+ty_jzj​=(1−t)xj​+tyj​ for every jjj. Here a vector uuu is a vertex exactly when Au=bAu=bAu=b, all uj≥0u_j\ge0uj​≥0, and for every feasible rational v,wv,wv,w, the coordinatewise equality u=(v+w)/2u=(v+w)/2u=(v+w)/2 implies v=uv=uv=u and w=uw=uw=u; feasible means Av=bAv=bAv=b, vj≥0v_j\ge0vj​≥0 for all jjj, and similarly for www. No positivity of mmm or kkk is assumed; when k=0k=0k=0 there cannot be distinct x,yx,yx,y.

realizesCube. All indices and parameters described as natural numbers include zero. In the formulas below, a⊖b=max⁡(a−b,0)a\ominus b=\max(a-b,0)a⊖b=max(a−b,0) denotes subtraction in the natural numbers, ⌊a/b⌋\lfloor a/b\rfloor⌊a/b⌋ denotes natural-number division, and a mod ba\bmod bamodb denotes natural-number remainder. Boolean values are written 000 for false and 111 for true, and bˉ\bar bbˉ denotes their negation. A finite index set of size zero is empty. A rational matrix inverse is the total matrix inverse, which is the zero matrix when its determinant is zero; no nonzero-determinant condition is implicit in the notation. The type KKK consists of exactly five distinct constructors, denoted a,b,c,d,ea,b,c,d,ea,b,c,d,e, with decidable equality. For every n∈Nn\in\mathbb Nn∈N, the number of rows is mn=5(n⊖1)m_n=5(n\ominus1)mn​=5(n⊖1); write In={0,…,mn−1}I_n=\{0,\ldots,m_n-1\}In​={0,…,mn​−1} for its finite index set. Thus m0=m1=0m_0=m_1=0m0​=m1​=0. For every n∈Nn\in\mathbb Nn∈N and row index r∈In={0,…,mn−1}r\in I_n=\{0,\ldots,m_n-1\}r∈In​={0,…,mn​−1}, define its kind and level Rn(r)R_n(r)Rn​(r) by the following ordered cases: if r<n⊖1r<n\ominus1r<n⊖1, it is (a,r+2)(a,r+2)(a,r+2); otherwise, if r<(n⊖1)+(n⊖2)r<(n\ominus1)+(n\ominus2)r<(n⊖1)+(n⊖2), it is (b,r⊖(n⊖1)+2)(b,r\ominus(n\ominus1)+2)(b,r⊖(n⊖1)+2); otherwise, if r<2(n⊖1)+(n⊖2)r<2(n\ominus1)+(n\ominus2)r<2(n⊖1)+(n⊖2), it is (c,r⊖((n⊖1)+(n⊖2))+2)(c,r\ominus((n\ominus1)+(n\ominus2))+2)(c,r⊖((n⊖1)+(n⊖2))+2); otherwise, if r<3(n⊖1)+(n⊖2)r<3(n\ominus1)+(n\ominus2)r<3(n⊖1)+(n⊖2), it is (d,r⊖(2(n⊖1)+(n⊖2))+2)(d,r\ominus(2(n\ominus1)+(n\ominus2))+2)(d,r⊖(2(n⊖1)+(n⊖2))+2); otherwise it is (e,r⊖(3(n⊖1)+(n⊖2))+1)(e,r\ominus(3(n\ominus1)+(n\ominus2))+1)(e,r⊖(3(n⊖1)+(n⊖2))+1). There are no row indices when n=0n=0n=0 or n=1n=1n=1. A name is a triple v=(κ,i,b)v=(\kappa,i,b)v=(κ,i,b) with kind κ∈K\kappa\in Kκ∈K, level i∈Ni\in\mathbb Ni∈N, and Boolean value b∈{0,1}b\in\{0,1\}b∈{0,1}. There are no restrictions on the level or on combinations of fields. Equality of names is decidable. For every n∈Nn\in\mathbb Nn∈N, the number of columns is kn=10(n⊖1)k_n=10(n\ominus1)kn​=10(n⊖1); write Jn={0,…,kn−1}J_n=\{0,\ldots,k_n-1\}Jn​={0,…,kn​−1} for its finite index set. Thus k0=k1=0k_0=k_1=0k0​=k1​=0. For every n∈Nn\in\mathbb Nn∈N and column index j∈Jn={0,…,kn−1}j\in J_n=\{0,\ldots,k_n-1\}j∈Jn​={0,…,kn​−1}, define the name Nn(j)N_n(j)Nn​(j) by the following ordered cases. If j=0j=0j=0, use (e,1,1)(e,1,1)(e,1,1). Otherwise, if j<4n⊖5j<4n\ominus5j<4n⊖5, put i=⌊(j⊖1)/4⌋+2i=\lfloor(j\ominus1)/4\rfloor+2i=⌊(j⊖1)/4⌋+2 and use respectively (d,i,0)(d,i,0)(d,i,0), (e,i,1)(e,i,1)(e,i,1), (b,i,1)(b,i,1)(b,i,1), or (b,i,0)(b,i,0)(b,i,0) according as (j⊖1) mod 4(j\ominus1)\bmod4(j⊖1)mod4 is 000, 111, 222, or anything else. Otherwise, if j<6n⊖7j<6n\ominus7j<6n⊖7, put u=j⊖(4n⊖5)u=j\ominus(4n\ominus5)u=j⊖(4n⊖5) and use (c,⌊u/2⌋+2,b)(c,\lfloor u/2\rfloor+2,b)(c,⌊u/2⌋+2,b), where b=1b=1b=1 exactly when u mod 2=1u\bmod2=1umod2=1. Otherwise, if j<7n⊖7j<7n\ominus7j<7n⊖7, use (e,j⊖(6n⊖7)+1,0)(e,j\ominus(6n\ominus7)+1,0)(e,j⊖(6n⊖7)+1,0). Otherwise, if j<8n⊖8j<8n\ominus8j<8n⊖8, use (d,j⊖(7n⊖7)+2,1)(d,j\ominus(7n\ominus7)+2,1)(d,j⊖(7n⊖7)+2,1). In the last case put u=j⊖(8n⊖8)u=j\ominus(8n\ominus8)u=j⊖(8n⊖8) and use (a,n⊖⌊u/2⌋,b)(a,n\ominus\lfloor u/2\rfloor,b)(a,n⊖⌊u/2⌋,b), where b=1b=1b=1 exactly when u mod 2=0u\bmod2=0umod2=0. There are no column indices when n=0n=0n=0 or n=1n=1n=1. For every name vvv, every kind κ∈K\kappa\in Kκ∈K, every level i∈Ni\in\mathbb Ni∈N, and every Boolean bbb, the rational number δv(κ,i,b)\delta_v(\kappa,i,b)δv​(κ,i,b) is 111 if v=(κ,i,b)v=(\kappa,i,b)v=(κ,i,b) and is 000 otherwise. For every n∈Nn\in\mathbb Nn∈N, define the rational number Sn=2n+1S_n=2n+1Sn​=2n+1, with nnn regarded as a rational number in this formula. In particular, SnS_nSn​ is never zero. For every n∈Nn\in\mathbb Nn∈N, define the rational number εn=1/Sn2n+2\varepsilon_n=1/S_n^{2n+2}εn​=1/Sn2n+2​. For every n∈Nn\in\mathbb Nn∈N, every pair (κ,i)∈K×N(\kappa,i)\in K\times\mathbb N(κ,i)∈K×N, and every name vvv, let xλ,l,b=δv(λ,l,b)x_{\lambda,l,b}=\delta_v(\lambda,l,b)xλ,l,b​=δv​(λ,l,b), o=xκ,i,0+xκ,i,1o=x_{\kappa,i,0}+x_{\kappa,i,1}o=xκ,i,0​+xκ,i,1​, and u=xa,i,1+xb,i,1+xc,i,1+xd,i,1+xe,i,1u=x_{a,i,1}+x_{b,i,1}+x_{c,i,1}+x_{d,i,1}+x_{e,i,1}u=xa,i,1​+xb,i,1​+xc,i,1​+xd,i,1​+xe,i,1​. The rational coefficient Fn((κ,i),v)F_n((\kappa,i),v)Fn​((κ,i),v) is defined by these cases: for κ=a\kappa=aκ=a and i=2i=2i=2, it is o−εn(xb,2,0+xc,2,0+xd,2,0+xe,1,1)o-\varepsilon_n(x_{b,2,0}+x_{c,2,0}+x_{d,2,0}+x_{e,1,1})o−εn​(xb,2,0​+xc,2,0​+xd,2,0​+xe,1,1​); for κ=a\kappa=aκ=a and i≠2i\ne2i=2, it is o−xa,i⊖1,0−εn(xa,i⊖1,1+xb,i⊖1,1+xc,i⊖1,1+xd,i⊖1,1+xe,i⊖1,1)o-x_{a,i\ominus1,0}-\varepsilon_n(x_{a,i\ominus1,1}+x_{b,i\ominus1,1}+x_{c,i\ominus1,1}+x_{d,i\ominus1,1}+x_{e,i\ominus1,1})o−xa,i⊖1,0​−εn​(xa,i⊖1,1​+xb,i⊖1,1​+xc,i⊖1,1​+xd,i⊖1,1​+xe,i⊖1,1​); for κ=b\kappa=bκ=b, it is o−xb,i+1,0−xd,i+1,0o-x_{b,i+1,0}-x_{d,i+1,0}o−xb,i+1,0​−xd,i+1,0​; for κ=c\kappa=cκ=c and i=ni=ni=n, it is o−∑j=0nxe,j,0o-\sum_{j=0}^{n}x_{e,j,0}o−∑j=0n​xe,j,0​, including the term j=0j=0j=0; for κ=c\kappa=cκ=c and i≠ni\ne ni=n, it is o−xc,i+1,0o-x_{c,i+1,0}o−xc,i+1,0​; for κ=d\kappa=dκ=d, it is o−1−εn2uo-\frac{1-\varepsilon_n}{2}uo−21−εn​​u; for κ=e\kappa=eκ=e and i=1i=1i=1, it is o−(1−εn)(xb,2,0+xc,2,0+xd,2,0+xe,1,1)o-(1-\varepsilon_n)(x_{b,2,0}+x_{c,2,0}+x_{d,2,0}+x_{e,1,1})o−(1−εn​)(xb,2,0​+xc,2,0​+xd,2,0​+xe,1,1​); and for κ=e\kappa=eκ=e and i≠1i\ne1i=1, it is o−1−εn2uo-\frac{1-\varepsilon_n}{2}uo−21−εn​​u. The pair and name need not correspond to indices of the program. For every pair n,i∈Nn,i\in\mathbb Nn,i∈N, define the rational reward Gn,i=(−Sn)2i⊖1G_{n,i}=(-S_n)^{2i\ominus1}Gn,i​=(−Sn​)2i⊖1. In particular, Gn,0=1G_{n,0}=1Gn,0​=1 because its exponent is zero. For every pair n,i∈Nn,i\in\mathbb Nn,i∈N, define the rational reward Hn,i=(−Sn)2iH_{n,i}=(-S_n)^{2i}Hn,i​=(−Sn​)2i. In particular, Hn,0=1H_{n,0}=1Hn,0​=1. For every n∈Nn\in\mathbb Nn∈N and every name v=(κ,i,b)v=(\kappa,i,b)v=(κ,i,b), define its rational objective coefficient Dn(v)D_n(v)Dn​(v) as a base contribution plus (Gn,1+εnHn,1)(δv(b,2,0)+δv(c,2,0)+δv(d,2,0))(G_{n,1}+\varepsilon_nH_{n,1})(\delta_v(b,2,0)+\delta_v(c,2,0)+\delta_v(d,2,0))(Gn,1​+εn​Hn,1​)(δv​(b,2,0)+δv​(c,2,0)+δv​(d,2,0)). The base contribution is Gn,i+εnHn,iG_{n,i}+\varepsilon_nH_{n,i}Gn,i​+εn​Hn,i​ when b=1b=1b=1 and κ∈{a,b,c}\kappa\in\{a,b,c\}κ∈{a,b,c}; it is εnHn,i\varepsilon_nH_{n,i}εn​Hn,i​ when b=1b=1b=1 and κ∈{d,e}\kappa\in\{d,e\}κ∈{d,e}; it is 111 when (κ,b)=(e,0)(\kappa,b)=(e,0)(κ,b)=(e,0); and it is 000 in every remaining case. In the subscripts of δv\delta_vδv​, b,c,db,c,db,c,d denote kinds, whereas the last coordinate of the name is the Boolean bbb. This defines a coefficient even for names outside all valid column ranges. For every n∈Nn\in\mathbb Nn∈N, define the rational linear-program data Pn=(An,1,dn)P_n=(A_n,\mathbf1,d_n)Pn​=(An​,1,dn​) with mnm_nmn​ rows and knk_nkn​ columns by (An)rj=Fn(Rn(r),Nn(j))(A_n)_{rj}=F_n(R_n(r),N_n(j))(An​)rj​=Fn​(Rn​(r),Nn​(j)), (1)r=1(\mathbf1)_r=1(1)r​=1, and (dn)j=Dn(Nn(j))(d_n)_j=D_n(N_n(j))(dn​)j​=Dn​(Nn​(j)). The underlying linear-program type stores only a rational matrix, right-hand-side vector, and objective vector; it does not impose feasibility, rank, boundedness, or sign conditions. Its rational feasible points are the vectors x∈QJnx\in\mathbb Q^{J_n}x∈QJn​ with Anx=1A_nx=\mathbf1An​x=1 and xj≥0x_j\ge0xj​≥0 for every j∈Jnj\in J_nj∈Jn​, and its objective at xxx is ∑j∈Jn(dn)jxj\sum_{j\in J_n}(d_n)_jx_j∑j∈Jn​​(dn​)j​xj​. For n=0n=0n=0 or n=1n=1n=1, both index sets are empty. For every n∈Nn\in\mathbb Nn∈N and every name (κ,i,b)(\kappa,i,b)(κ,i,b), define its natural-number rank Cn(κ,i,b)C_n(\kappa,i,b)Cn​(κ,i,b) as follows: Cn(e,i,1)=0C_n(e,i,1)=0Cn​(e,i,1)=0 if i=1i=1i=1, and Cn(e,i,1)=4(i⊖2)+2C_n(e,i,1)=4(i\ominus2)+2Cn​(e,i,1)=4(i⊖2)+2 otherwise; Cn(d,i,0)=4(i⊖2)+1C_n(d,i,0)=4(i\ominus2)+1Cn​(d,i,0)=4(i⊖2)+1; Cn(b,i,1)=4(i⊖2)+3C_n(b,i,1)=4(i\ominus2)+3Cn​(b,i,1)=4(i⊖2)+3; Cn(b,i,0)=4(i⊖2)+4C_n(b,i,0)=4(i\ominus2)+4Cn​(b,i,0)=4(i⊖2)+4; Cn(c,i,0)=(4n⊖5)+2(i⊖2)C_n(c,i,0)=(4n\ominus5)+2(i\ominus2)Cn​(c,i,0)=(4n⊖5)+2(i⊖2); Cn(c,i,1)=(4n⊖5)+2(i⊖2)+1C_n(c,i,1)=(4n\ominus5)+2(i\ominus2)+1Cn​(c,i,1)=(4n⊖5)+2(i⊖2)+1; Cn(e,i,0)=(6n⊖7)+(i⊖1)C_n(e,i,0)=(6n\ominus7)+(i\ominus1)Cn​(e,i,0)=(6n⊖7)+(i⊖1); Cn(d,i,1)=(7n⊖7)+(i⊖2)C_n(d,i,1)=(7n\ominus7)+(i\ominus2)Cn​(d,i,1)=(7n⊖7)+(i⊖2); Cn(a,i,1)=(8n⊖8)+2(n⊖i)C_n(a,i,1)=(8n\ominus8)+2(n\ominus i)Cn​(a,i,1)=(8n⊖8)+2(n⊖i); and Cn(a,i,0)=(8n⊖8)+2(n⊖i)+1C_n(a,i,0)=(8n\ominus8)+2(n\ominus i)+1Cn​(a,i,0)=(8n⊖8)+2(n⊖i)+1. The function is defined on every name, including levels outside the row or column ranges, and its output is a natural number, without a bound by knk_nkn​. For every n∈Nn\in\mathbb Nn∈N, every supplied proof of 3≤n3\le n3≤n, every row r∈Inr\in I_nr∈In​, and every Boolean bbb, the column for this action is jn(r,b)=Cn(κ,i,b) mod knj_n(r,b)=C_n(\kappa,i,b)\bmod k_njn​(r,b)=Cn​(κ,i,b)modkn​, where (κ,i)=Rn(r)(\kappa,i)=R_n(r)(κ,i)=Rn​(r). The positive column count makes this a member of JnJ_nJn​. For every n∈Nn\in\mathbb Nn∈N, a policy is any function σ:In→{0,1}\sigma:I_n\to\{0,1\}σ:In​→{0,1}. No additional conditions are imposed. For n=0n=0n=0 or n=1n=1n=1, there is exactly one such function, the empty function. For every n∈Nn\in\mathbb Nn∈N, every supplied proof of 3≤n3\le n3≤n, and every policy σ\sigmaσ, define the row-to-column function Bn,σ(r)=jn(r,σ(r))B_{n,\sigma}(r)=j_n(r,\sigma(r))Bn,σ​(r)=jn​(r,σ(r)) for every r∈Inr\in I_nr∈In​. Calling this function a basis imposes no injectivity, determinant, or feasibility condition. For n≥3n\ge3n≥3 and a policy σ\sigmaσ, put (Mn,σ)q,r=(An)q,Bn,σ(r)(M_{n,\sigma})_{q,r}=(A_n)_{q,B_{n,\sigma}(r)}(Mn,σ​)q,r​=(An​)q,Bn,σ​(r)​, βn,σ=Mn,σ−11\beta_{n,\sigma}=M_{n,\sigma}^{-1}\mathbf1βn,σ​=Mn,σ−1​1, and xn,σ,j=∑r∈In: Bn,σ(r)=jβn,σ,rx_{n,\sigma,j}=\sum_{r\in I_n:\ B_{n,\sigma}(r)=j}\beta_{n,\sigma,r}xn,σ,j​=∑r∈In​: Bn,σ​(r)=j​βn,σ,r​ for every j∈Jnj\in J_nj∈Jn​. This is the basic point of the row-to-column function: repeated selected columns, if any, contribute by summation. The inverse is total, and these formulas alone impose no feasibility or determinant condition. For every n∈Nn\in\mathbb Nn∈N and policies σ,τ:In→{0,1}\sigma,\tau:I_n\to\{0,1\}σ,τ:In​→{0,1}, cube adjacency means that there exists r∈Inr\in I_nr∈In​ with σ(r)≠τ(r)\sigma(r)\ne\tau(r)σ(r)=τ(r) and, for every q∈Inq\in I_nq∈In​ with q≠rq\ne rq=r, σ(q)=τ(q)\sigma(q)=\tau(q)σ(q)=τ(q). Thus it requires exactly one differing coordinate. If n=0n=0n=0 or n=1n=1n=1, no policies satisfy this relation, because there is no row rrr. For every n∈Nn\in\mathbb Nn∈N and every supplied proof of 3≤n3\le n3≤n, cube realization is the conjunction of four requirements. First, there exists R∈QR\in\mathbb QR∈Q such that every rational xxx satisfying Anx=1A_nx=\mathbf1An​x=1 and xj≥0x_j\ge0xj​≥0 for all jjj also satisfies ∣xj∣≤R|x_j|\le R∣xj​∣≤R for every jjj; no sign condition on RRR is separately imposed. Second, for every policy σ\sigmaσ, xn,σx_{n,\sigma}xn,σ​ is a vertex. Third, for every rational vector xxx that is a vertex, there exists exactly one policy σ\sigmaσ with xn,σ=xx_{n,\sigma}=xxn,σ​=x. Fourth, for every pair of policies σ,τ\sigma,\tauσ,τ, their differing in exactly one coordinate is equivalent to the polytope adjacency of xn,σx_{n,\sigma}xn,σ​ and xn,τx_{n,\tau}xn,τ​. In these clauses, a vertex is a feasible rational vector uuu such that every feasible rational v,wv,wv,w with uj=(vj+wj)/2u_j=(v_j+w_j)/2uj​=(vj​+wj​)/2 for all jjj satisfy v=uv=uv=u and w=uw=uw=u. Polytope adjacency of u,vu,vu,v means that they are distinct vertices and every feasible rational zzz with zj=0z_j=0zj​=0 whenever uj=vj=0u_j=v_j=0uj​=vj​=0 has the form zj=(1−t)uj+tvjz_j=(1-t)u_j+tv_jzj​=(1−t)uj​+tvj​ for all jjj, for some rational ttt with 0≤t≤10\le t\le10≤t≤1. All feasibility in this paragraph means Anx=1A_nx=\mathbf1An​x=1 and coordinatewise nonnegativity.

cubeStep. All indices and parameters described as natural numbers include zero. In the formulas below, a⊖b=max⁡(a−b,0)a\ominus b=\max(a-b,0)a⊖b=max(a−b,0) denotes subtraction in the natural numbers, ⌊a/b⌋\lfloor a/b\rfloor⌊a/b⌋ denotes natural-number division, and a mod ba\bmod bamodb denotes natural-number remainder. Boolean values are written 000 for false and 111 for true, and bˉ\bar bbˉ denotes their negation. A finite index set of size zero is empty. A rational matrix inverse is the total matrix inverse, which is the zero matrix when its determinant is zero; no nonzero-determinant condition is implicit in the notation. For every n∈Nn\in\mathbb Nn∈N, the number of rows is mn=5(n⊖1)m_n=5(n\ominus1)mn​=5(n⊖1); write In={0,…,mn−1}I_n=\{0,\ldots,m_n-1\}In​={0,…,mn​−1} for its finite index set. Thus m0=m1=0m_0=m_1=0m0​=m1​=0. For every n∈Nn\in\mathbb Nn∈N, a policy is any function σ:In→{0,1}\sigma:I_n\to\{0,1\}σ:In​→{0,1}. No additional conditions are imposed. For n=0n=0n=0 or n=1n=1n=1, there is exactly one such function, the empty function. For every n∈Nn\in\mathbb Nn∈N, the number of columns is kn=10(n⊖1)k_n=10(n\ominus1)kn​=10(n⊖1); write Jn={0,…,kn−1}J_n=\{0,\ldots,k_n-1\}Jn​={0,…,kn​−1} for its finite index set. Thus k0=k1=0k_0=k_1=0k0​=k1​=0. For every n∈Nn\in\mathbb Nn∈N, an MDP state is a pair (σ,ℓ)(\sigma,\ell)(σ,ℓ) consisting of an arbitrary policy σ:In→{0,1}\sigma:I_n\to\{0,1\}σ:In​→{0,1} and an index ℓ∈Jn\ell\in J_nℓ∈Jn​. No further fields or constraints are imposed. There are no such states when n=0n=0n=0 or n=1n=1n=1, because JnJ_nJn​ is empty. For every n∈Nn\in\mathbb Nn∈N and policies σ,τ:In→{0,1}\sigma,\tau:I_n\to\{0,1\}σ,τ:In​→{0,1}, cube adjacency means that there exists r∈Inr\in I_nr∈In​ with σ(r)≠τ(r)\sigma(r)\ne\tau(r)σ(r)=τ(r) and, for every q∈Inq\in I_nq∈In​ with q≠rq\ne rq=r, σ(q)=τ(q)\sigma(q)=\tau(q)σ(q)=τ(q). Thus it requires exactly one differing coordinate. If n=0n=0n=0 or n=1n=1n=1, no policies satisfy this relation, because there is no row rrr. The type KKK consists of exactly five distinct constructors, denoted a,b,c,d,ea,b,c,d,ea,b,c,d,e, with decidable equality. For every n∈Nn\in\mathbb Nn∈N and row index r∈In={0,…,mn−1}r\in I_n=\{0,\ldots,m_n-1\}r∈In​={0,…,mn​−1}, define its kind and level Rn(r)R_n(r)Rn​(r) by the following ordered cases: if r<n⊖1r<n\ominus1r<n⊖1, it is (a,r+2)(a,r+2)(a,r+2); otherwise, if r<(n⊖1)+(n⊖2)r<(n\ominus1)+(n\ominus2)r<(n⊖1)+(n⊖2), it is (b,r⊖(n⊖1)+2)(b,r\ominus(n\ominus1)+2)(b,r⊖(n⊖1)+2); otherwise, if r<2(n⊖1)+(n⊖2)r<2(n\ominus1)+(n\ominus2)r<2(n⊖1)+(n⊖2), it is (c,r⊖((n⊖1)+(n⊖2))+2)(c,r\ominus((n\ominus1)+(n\ominus2))+2)(c,r⊖((n⊖1)+(n⊖2))+2); otherwise, if r<3(n⊖1)+(n⊖2)r<3(n\ominus1)+(n\ominus2)r<3(n⊖1)+(n⊖2), it is (d,r⊖(2(n⊖1)+(n⊖2))+2)(d,r\ominus(2(n\ominus1)+(n\ominus2))+2)(d,r⊖(2(n⊖1)+(n⊖2))+2); otherwise it is (e,r⊖(3(n⊖1)+(n⊖2))+1)(e,r\ominus(3(n\ominus1)+(n\ominus2))+1)(e,r⊖(3(n⊖1)+(n⊖2))+1). There are no row indices when n=0n=0n=0 or n=1n=1n=1. A name is a triple v=(κ,i,b)v=(\kappa,i,b)v=(κ,i,b) with kind κ∈K\kappa\in Kκ∈K, level i∈Ni\in\mathbb Ni∈N, and Boolean value b∈{0,1}b\in\{0,1\}b∈{0,1}. There are no restrictions on the level or on combinations of fields. Equality of names is decidable. For every n∈Nn\in\mathbb Nn∈N and column index j∈Jn={0,…,kn−1}j\in J_n=\{0,\ldots,k_n-1\}j∈Jn​={0,…,kn​−1}, define the name Nn(j)N_n(j)Nn​(j) by the following ordered cases. If j=0j=0j=0, use (e,1,1)(e,1,1)(e,1,1). Otherwise, if j<4n⊖5j<4n\ominus5j<4n⊖5, put i=⌊(j⊖1)/4⌋+2i=\lfloor(j\ominus1)/4\rfloor+2i=⌊(j⊖1)/4⌋+2 and use respectively (d,i,0)(d,i,0)(d,i,0), (e,i,1)(e,i,1)(e,i,1), (b,i,1)(b,i,1)(b,i,1), or (b,i,0)(b,i,0)(b,i,0) according as (j⊖1) mod 4(j\ominus1)\bmod4(j⊖1)mod4 is 000, 111, 222, or anything else. Otherwise, if j<6n⊖7j<6n\ominus7j<6n⊖7, put u=j⊖(4n⊖5)u=j\ominus(4n\ominus5)u=j⊖(4n⊖5) and use (c,⌊u/2⌋+2,b)(c,\lfloor u/2\rfloor+2,b)(c,⌊u/2⌋+2,b), where b=1b=1b=1 exactly when u mod 2=1u\bmod2=1umod2=1. Otherwise, if j<7n⊖7j<7n\ominus7j<7n⊖7, use (e,j⊖(6n⊖7)+1,0)(e,j\ominus(6n\ominus7)+1,0)(e,j⊖(6n⊖7)+1,0). Otherwise, if j<8n⊖8j<8n\ominus8j<8n⊖8, use (d,j⊖(7n⊖7)+2,1)(d,j\ominus(7n\ominus7)+2,1)(d,j⊖(7n⊖7)+2,1). In the last case put u=j⊖(8n⊖8)u=j\ominus(8n\ominus8)u=j⊖(8n⊖8) and use (a,n⊖⌊u/2⌋,b)(a,n\ominus\lfloor u/2\rfloor,b)(a,n⊖⌊u/2⌋,b), where b=1b=1b=1 exactly when u mod 2=0u\bmod2=0umod2=0. There are no column indices when n=0n=0n=0 or n=1n=1n=1. For every name vvv, every kind κ∈K\kappa\in Kκ∈K, every level i∈Ni\in\mathbb Ni∈N, and every Boolean bbb, the rational number δv(κ,i,b)\delta_v(\kappa,i,b)δv​(κ,i,b) is 111 if v=(κ,i,b)v=(\kappa,i,b)v=(κ,i,b) and is 000 otherwise. For every n∈Nn\in\mathbb Nn∈N, define the rational number Sn=2n+1S_n=2n+1Sn​=2n+1, with nnn regarded as a rational number in this formula. In particular, SnS_nSn​ is never zero. For every n∈Nn\in\mathbb Nn∈N, define the rational number εn=1/Sn2n+2\varepsilon_n=1/S_n^{2n+2}εn​=1/Sn2n+2​. For every n∈Nn\in\mathbb Nn∈N, every pair (κ,i)∈K×N(\kappa,i)\in K\times\mathbb N(κ,i)∈K×N, and every name vvv, let xλ,l,b=δv(λ,l,b)x_{\lambda,l,b}=\delta_v(\lambda,l,b)xλ,l,b​=δv​(λ,l,b), o=xκ,i,0+xκ,i,1o=x_{\kappa,i,0}+x_{\kappa,i,1}o=xκ,i,0​+xκ,i,1​, and u=xa,i,1+xb,i,1+xc,i,1+xd,i,1+xe,i,1u=x_{a,i,1}+x_{b,i,1}+x_{c,i,1}+x_{d,i,1}+x_{e,i,1}u=xa,i,1​+xb,i,1​+xc,i,1​+xd,i,1​+xe,i,1​. The rational coefficient Fn((κ,i),v)F_n((\kappa,i),v)Fn​((κ,i),v) is defined by these cases: for κ=a\kappa=aκ=a and i=2i=2i=2, it is o−εn(xb,2,0+xc,2,0+xd,2,0+xe,1,1)o-\varepsilon_n(x_{b,2,0}+x_{c,2,0}+x_{d,2,0}+x_{e,1,1})o−εn​(xb,2,0​+xc,2,0​+xd,2,0​+xe,1,1​); for κ=a\kappa=aκ=a and i≠2i\ne2i=2, it is o−xa,i⊖1,0−εn(xa,i⊖1,1+xb,i⊖1,1+xc,i⊖1,1+xd,i⊖1,1+xe,i⊖1,1)o-x_{a,i\ominus1,0}-\varepsilon_n(x_{a,i\ominus1,1}+x_{b,i\ominus1,1}+x_{c,i\ominus1,1}+x_{d,i\ominus1,1}+x_{e,i\ominus1,1})o−xa,i⊖1,0​−εn​(xa,i⊖1,1​+xb,i⊖1,1​+xc,i⊖1,1​+xd,i⊖1,1​+xe,i⊖1,1​); for κ=b\kappa=bκ=b, it is o−xb,i+1,0−xd,i+1,0o-x_{b,i+1,0}-x_{d,i+1,0}o−xb,i+1,0​−xd,i+1,0​; for κ=c\kappa=cκ=c and i=ni=ni=n, it is o−∑j=0nxe,j,0o-\sum_{j=0}^{n}x_{e,j,0}o−∑j=0n​xe,j,0​, including the term j=0j=0j=0; for κ=c\kappa=cκ=c and i≠ni\ne ni=n, it is o−xc,i+1,0o-x_{c,i+1,0}o−xc,i+1,0​; for κ=d\kappa=dκ=d, it is o−1−εn2uo-\frac{1-\varepsilon_n}{2}uo−21−εn​​u; for κ=e\kappa=eκ=e and i=1i=1i=1, it is o−(1−εn)(xb,2,0+xc,2,0+xd,2,0+xe,1,1)o-(1-\varepsilon_n)(x_{b,2,0}+x_{c,2,0}+x_{d,2,0}+x_{e,1,1})o−(1−εn​)(xb,2,0​+xc,2,0​+xd,2,0​+xe,1,1​); and for κ=e\kappa=eκ=e and i≠1i\ne1i=1, it is o−1−εn2uo-\frac{1-\varepsilon_n}{2}uo−21−εn​​u. The pair and name need not correspond to indices of the program. For every pair n,i∈Nn,i\in\mathbb Nn,i∈N, define the rational reward Gn,i=(−Sn)2i⊖1G_{n,i}=(-S_n)^{2i\ominus1}Gn,i​=(−Sn​)2i⊖1. In particular, Gn,0=1G_{n,0}=1Gn,0​=1 because its exponent is zero. For every pair n,i∈Nn,i\in\mathbb Nn,i∈N, define the rational reward Hn,i=(−Sn)2iH_{n,i}=(-S_n)^{2i}Hn,i​=(−Sn​)2i. In particular, Hn,0=1H_{n,0}=1Hn,0​=1. For every n∈Nn\in\mathbb Nn∈N and every name v=(κ,i,b)v=(\kappa,i,b)v=(κ,i,b), define its rational objective coefficient Dn(v)D_n(v)Dn​(v) as a base contribution plus (Gn,1+εnHn,1)(δv(b,2,0)+δv(c,2,0)+δv(d,2,0))(G_{n,1}+\varepsilon_nH_{n,1})(\delta_v(b,2,0)+\delta_v(c,2,0)+\delta_v(d,2,0))(Gn,1​+εn​Hn,1​)(δv​(b,2,0)+δv​(c,2,0)+δv​(d,2,0)). The base contribution is Gn,i+εnHn,iG_{n,i}+\varepsilon_nH_{n,i}Gn,i​+εn​Hn,i​ when b=1b=1b=1 and κ∈{a,b,c}\kappa\in\{a,b,c\}κ∈{a,b,c}; it is εnHn,i\varepsilon_nH_{n,i}εn​Hn,i​ when b=1b=1b=1 and κ∈{d,e}\kappa\in\{d,e\}κ∈{d,e}; it is 111 when (κ,b)=(e,0)(\kappa,b)=(e,0)(κ,b)=(e,0); and it is 000 in every remaining case. In the subscripts of δv\delta_vδv​, b,c,db,c,db,c,d denote kinds, whereas the last coordinate of the name is the Boolean bbb. This defines a coefficient even for names outside all valid column ranges. For every n∈Nn\in\mathbb Nn∈N, define the rational linear-program data Pn=(An,1,dn)P_n=(A_n,\mathbf1,d_n)Pn​=(An​,1,dn​) with mnm_nmn​ rows and knk_nkn​ columns by (An)rj=Fn(Rn(r),Nn(j))(A_n)_{rj}=F_n(R_n(r),N_n(j))(An​)rj​=Fn​(Rn​(r),Nn​(j)), (1)r=1(\mathbf1)_r=1(1)r​=1, and (dn)j=Dn(Nn(j))(d_n)_j=D_n(N_n(j))(dn​)j​=Dn​(Nn​(j)). The underlying linear-program type stores only a rational matrix, right-hand-side vector, and objective vector; it does not impose feasibility, rank, boundedness, or sign conditions. Its rational feasible points are the vectors x∈QJnx\in\mathbb Q^{J_n}x∈QJn​ with Anx=1A_nx=\mathbf1An​x=1 and xj≥0x_j\ge0xj​≥0 for every j∈Jnj\in J_nj∈Jn​, and its objective at xxx is ∑j∈Jn(dn)jxj\sum_{j\in J_n}(d_n)_jx_j∑j∈Jn​​(dn​)j​xj​. For n=0n=0n=0 or n=1n=1n=1, both index sets are empty. For every n∈Nn\in\mathbb Nn∈N and every name (κ,i,b)(\kappa,i,b)(κ,i,b), define its natural-number rank Cn(κ,i,b)C_n(\kappa,i,b)Cn​(κ,i,b) as follows: Cn(e,i,1)=0C_n(e,i,1)=0Cn​(e,i,1)=0 if i=1i=1i=1, and Cn(e,i,1)=4(i⊖2)+2C_n(e,i,1)=4(i\ominus2)+2Cn​(e,i,1)=4(i⊖2)+2 otherwise; Cn(d,i,0)=4(i⊖2)+1C_n(d,i,0)=4(i\ominus2)+1Cn​(d,i,0)=4(i⊖2)+1; Cn(b,i,1)=4(i⊖2)+3C_n(b,i,1)=4(i\ominus2)+3Cn​(b,i,1)=4(i⊖2)+3; Cn(b,i,0)=4(i⊖2)+4C_n(b,i,0)=4(i\ominus2)+4Cn​(b,i,0)=4(i⊖2)+4; Cn(c,i,0)=(4n⊖5)+2(i⊖2)C_n(c,i,0)=(4n\ominus5)+2(i\ominus2)Cn​(c,i,0)=(4n⊖5)+2(i⊖2); Cn(c,i,1)=(4n⊖5)+2(i⊖2)+1C_n(c,i,1)=(4n\ominus5)+2(i\ominus2)+1Cn​(c,i,1)=(4n⊖5)+2(i⊖2)+1; Cn(e,i,0)=(6n⊖7)+(i⊖1)C_n(e,i,0)=(6n\ominus7)+(i\ominus1)Cn​(e,i,0)=(6n⊖7)+(i⊖1); Cn(d,i,1)=(7n⊖7)+(i⊖2)C_n(d,i,1)=(7n\ominus7)+(i\ominus2)Cn​(d,i,1)=(7n⊖7)+(i⊖2); Cn(a,i,1)=(8n⊖8)+2(n⊖i)C_n(a,i,1)=(8n\ominus8)+2(n\ominus i)Cn​(a,i,1)=(8n⊖8)+2(n⊖i); and Cn(a,i,0)=(8n⊖8)+2(n⊖i)+1C_n(a,i,0)=(8n\ominus8)+2(n\ominus i)+1Cn​(a,i,0)=(8n⊖8)+2(n⊖i)+1. The function is defined on every name, including levels outside the row or column ranges, and its output is a natural number, without a bound by knk_nkn​. For every n∈Nn\in\mathbb Nn∈N, every supplied proof of 3≤n3\le n3≤n, every row r∈Inr\in I_nr∈In​, and every Boolean bbb, the column for this action is jn(r,b)=Cn(κ,i,b) mod knj_n(r,b)=C_n(\kappa,i,b)\bmod k_njn​(r,b)=Cn​(κ,i,b)modkn​, where (κ,i)=Rn(r)(\kappa,i)=R_n(r)(κ,i)=Rn​(r). The positive column count makes this a member of JnJ_nJn​. For every n∈Nn\in\mathbb Nn∈N, every supplied proof of 3≤n3\le n3≤n, and every policy σ\sigmaσ, define the row-to-column function Bn,σ(r)=jn(r,σ(r))B_{n,\sigma}(r)=j_n(r,\sigma(r))Bn,σ​(r)=jn​(r,σ(r)) for every r∈Inr\in I_nr∈In​. Calling this function a basis imposes no injectivity, determinant, or feasibility condition. For n≥3n\ge3n≥3 and a policy σ\sigmaσ, put (Mn,σ)q,r=(An)q,Bn,σ(r)(M_{n,\sigma})_{q,r}=(A_n)_{q,B_{n,\sigma}(r)}(Mn,σ​)q,r​=(An​)q,Bn,σ​(r)​, βn,σ=Mn,σ−11\beta_{n,\sigma}=M_{n,\sigma}^{-1}\mathbf1βn,σ​=Mn,σ−1​1, and xn,σ,j=∑r∈In: Bn,σ(r)=jβn,σ,rx_{n,\sigma,j}=\sum_{r\in I_n:\ B_{n,\sigma}(r)=j}\beta_{n,\sigma,r}xn,σ,j​=∑r∈In​: Bn,σ​(r)=j​βn,σ,r​ for every j∈Jnj\in J_nj∈Jn​. This is the basic point of the row-to-column function: repeated selected columns, if any, contribute by summation. The inverse is total, and these formulas alone impose no feasibility or determinant condition. For every n∈Nn\in\mathbb Nn∈N, every supplied proof of 3≤n3\le n3≤n, every rational vector c∈QJnc\in\mathbb Q^{J_n}c∈QJn​, and every two policies σ,τ\sigma,\tauσ,τ, the directed relation σ⟶cτ\sigma\longrightarrow_c\tauσ⟶c​τ holds exactly when they are cube-adjacent and ∑j∈Jncjxn,σ,j<∑j∈Jncjxn,τ,j\sum_{j\in J_n}c_jx_{n,\sigma,j}<\sum_{j\in J_n}c_jx_{n,\tau,j}∑j∈Jn​​cj​xn,σ,j​<∑j∈Jn​​cj​xn,τ,j​. The basic points in this comparison are formed from PnP_nPn​ with its original matrix and right-hand side; only the objective coefficients in the sums are replaced by ccc. The comparison is strict, so equality of the two sums gives no directed edge in either direction. For every n∈Nn\in\mathbb Nn∈N, the ordering equivalence on Jn={0,…,kn−1}J_n=\{0,\ldots,k_n-1\}Jn​={0,…,kn​−1} is the identity j↦jj\mapsto jj↦j, including the empty equivalence when n=0n=0n=0 or n=1n=1n=1. For last-column index ℓ∈Jn\ell\in J_nℓ∈Jn​ and candidate column j∈Jnj\in J_nj∈Jn​, the cyclic distance used here is Δn(ℓ,j)=(j+kn−ℓ) mod kn\Delta_n(\ell,j)=(j+k_n-\ell)\bmod k_nΔn​(ℓ,j)=(j+kn​−ℓ)modkn​. It is the specialization of the formula ((o(j))+kn−ℓ) mod kn((o(j))+k_n-\ell)\bmod k_n((o(j))+kn​−ℓ)modkn​ to the identity ordering ooo. Subtraction in the numerator is natural-number subtraction; it does not truncate for these indices because j+kn≥ℓj+k_n\ge\ellj+kn​≥ℓ. In particular Δn(ℓ,ℓ)=0\Delta_n(\ell,\ell)=0Δn​(ℓ,ℓ)=0 whenever such an index exists. For every n∈Nn\in\mathbb Nn∈N, every supplied proof of 3≤n3\le n3≤n, every rational objective vector c∈QJnc\in\mathbb Q^{J_n}c∈QJn​, and every pair of MDP states s=(σ,ℓ)s=(\sigma,\ell)s=(σ,ℓ) and s′=(σ′,ℓ′)s^{\prime}=(\sigma^{\prime},\ell^{\prime})s′=(σ′,ℓ′), a cube step holds exactly when there exists r∈Inr\in I_nr∈In​ such that σ⟶cσ(r)\sigma\longrightarrow_c\sigma^{(r)}σ⟶c​σ(r), and for every q∈Inq\in I_nq∈In​ with σ⟶cσ(q)\sigma\longrightarrow_c\sigma^{(q)}σ⟶c​σ(q) one has Δn(ℓ,jn(r,σ(r)‾))≤Δn(ℓ,jn(q,σ(q)‾))\Delta_n(\ell,j_n(r,\overline{\sigma(r)}))\le\Delta_n(\ell,j_n(q,\overline{\sigma(q)}))Δn​(ℓ,jn​(r,σ(r)​))≤Δn​(ℓ,jn​(q,σ(q)​)), and σ′=σ(r)\sigma^{\prime}=\sigma^{(r)}σ′=σ(r) and ℓ′=jn(r,σ(r)‾)\ell^{\prime}=j_n(r,\overline{\sigma(r)})ℓ′=jn​(r,σ(r)​). For each row qqq, σ(q)\sigma^{(q)}σ(q) is the policy obtained by negating σ(q)\sigma(q)σ(q) and keeping every other coordinate unchanged. The comparison of distances is non-strict, and this step predicate does not itself assume the AUSO predicate.

cubeRun. All indices and parameters described as natural numbers include zero. In the formulas below, a⊖b=max⁡(a−b,0)a\ominus b=\max(a-b,0)a⊖b=max(a−b,0) denotes subtraction in the natural numbers, ⌊a/b⌋\lfloor a/b\rfloor⌊a/b⌋ denotes natural-number division, and a mod ba\bmod bamodb denotes natural-number remainder. Boolean values are written 000 for false and 111 for true, and bˉ\bar bbˉ denotes their negation. A finite index set of size zero is empty. A rational matrix inverse is the total matrix inverse, which is the zero matrix when its determinant is zero; no nonzero-determinant condition is implicit in the notation. For every n∈Nn\in\mathbb Nn∈N, the number of rows is mn=5(n⊖1)m_n=5(n\ominus1)mn​=5(n⊖1); write In={0,…,mn−1}I_n=\{0,\ldots,m_n-1\}In​={0,…,mn​−1} for its finite index set. Thus m0=m1=0m_0=m_1=0m0​=m1​=0. For every n∈Nn\in\mathbb Nn∈N, a policy is any function σ:In→{0,1}\sigma:I_n\to\{0,1\}σ:In​→{0,1}. No additional conditions are imposed. For n=0n=0n=0 or n=1n=1n=1, there is exactly one such function, the empty function. For every n∈Nn\in\mathbb Nn∈N, the number of columns is kn=10(n⊖1)k_n=10(n\ominus1)kn​=10(n⊖1); write Jn={0,…,kn−1}J_n=\{0,\ldots,k_n-1\}Jn​={0,…,kn​−1} for its finite index set. Thus k0=k1=0k_0=k_1=0k0​=k1​=0. For every n∈Nn\in\mathbb Nn∈N, an MDP state is a pair (σ,ℓ)(\sigma,\ell)(σ,ℓ) consisting of an arbitrary policy σ:In→{0,1}\sigma:I_n\to\{0,1\}σ:In​→{0,1} and an index ℓ∈Jn\ell\in J_nℓ∈Jn​. No further fields or constraints are imposed. There are no such states when n=0n=0n=0 or n=1n=1n=1, because JnJ_nJn​ is empty. For every n∈Nn\in\mathbb Nn∈N and policies σ,τ:In→{0,1}\sigma,\tau:I_n\to\{0,1\}σ,τ:In​→{0,1}, cube adjacency means that there exists r∈Inr\in I_nr∈In​ with σ(r)≠τ(r)\sigma(r)\ne\tau(r)σ(r)=τ(r) and, for every q∈Inq\in I_nq∈In​ with q≠rq\ne rq=r, σ(q)=τ(q)\sigma(q)=\tau(q)σ(q)=τ(q). Thus it requires exactly one differing coordinate. If n=0n=0n=0 or n=1n=1n=1, no policies satisfy this relation, because there is no row rrr. The type KKK consists of exactly five distinct constructors, denoted a,b,c,d,ea,b,c,d,ea,b,c,d,e, with decidable equality. For every n∈Nn\in\mathbb Nn∈N and row index r∈In={0,…,mn−1}r\in I_n=\{0,\ldots,m_n-1\}r∈In​={0,…,mn​−1}, define its kind and level Rn(r)R_n(r)Rn​(r) by the following ordered cases: if r<n⊖1r<n\ominus1r<n⊖1, it is (a,r+2)(a,r+2)(a,r+2); otherwise, if r<(n⊖1)+(n⊖2)r<(n\ominus1)+(n\ominus2)r<(n⊖1)+(n⊖2), it is (b,r⊖(n⊖1)+2)(b,r\ominus(n\ominus1)+2)(b,r⊖(n⊖1)+2); otherwise, if r<2(n⊖1)+(n⊖2)r<2(n\ominus1)+(n\ominus2)r<2(n⊖1)+(n⊖2), it is (c,r⊖((n⊖1)+(n⊖2))+2)(c,r\ominus((n\ominus1)+(n\ominus2))+2)(c,r⊖((n⊖1)+(n⊖2))+2); otherwise, if r<3(n⊖1)+(n⊖2)r<3(n\ominus1)+(n\ominus2)r<3(n⊖1)+(n⊖2), it is (d,r⊖(2(n⊖1)+(n⊖2))+2)(d,r\ominus(2(n\ominus1)+(n\ominus2))+2)(d,r⊖(2(n⊖1)+(n⊖2))+2); otherwise it is (e,r⊖(3(n⊖1)+(n⊖2))+1)(e,r\ominus(3(n\ominus1)+(n\ominus2))+1)(e,r⊖(3(n⊖1)+(n⊖2))+1). There are no row indices when n=0n=0n=0 or n=1n=1n=1. A name is a triple v=(κ,i,b)v=(\kappa,i,b)v=(κ,i,b) with kind κ∈K\kappa\in Kκ∈K, level i∈Ni\in\mathbb Ni∈N, and Boolean value b∈{0,1}b\in\{0,1\}b∈{0,1}. There are no restrictions on the level or on combinations of fields. Equality of names is decidable. For every n∈Nn\in\mathbb Nn∈N and column index j∈Jn={0,…,kn−1}j\in J_n=\{0,\ldots,k_n-1\}j∈Jn​={0,…,kn​−1}, define the name Nn(j)N_n(j)Nn​(j) by the following ordered cases. If j=0j=0j=0, use (e,1,1)(e,1,1)(e,1,1). Otherwise, if j<4n⊖5j<4n\ominus5j<4n⊖5, put i=⌊(j⊖1)/4⌋+2i=\lfloor(j\ominus1)/4\rfloor+2i=⌊(j⊖1)/4⌋+2 and use respectively (d,i,0)(d,i,0)(d,i,0), (e,i,1)(e,i,1)(e,i,1), (b,i,1)(b,i,1)(b,i,1), or (b,i,0)(b,i,0)(b,i,0) according as (j⊖1) mod 4(j\ominus1)\bmod4(j⊖1)mod4 is 000, 111, 222, or anything else. Otherwise, if j<6n⊖7j<6n\ominus7j<6n⊖7, put u=j⊖(4n⊖5)u=j\ominus(4n\ominus5)u=j⊖(4n⊖5) and use (c,⌊u/2⌋+2,b)(c,\lfloor u/2\rfloor+2,b)(c,⌊u/2⌋+2,b), where b=1b=1b=1 exactly when u mod 2=1u\bmod2=1umod2=1. Otherwise, if j<7n⊖7j<7n\ominus7j<7n⊖7, use (e,j⊖(6n⊖7)+1,0)(e,j\ominus(6n\ominus7)+1,0)(e,j⊖(6n⊖7)+1,0). Otherwise, if j<8n⊖8j<8n\ominus8j<8n⊖8, use (d,j⊖(7n⊖7)+2,1)(d,j\ominus(7n\ominus7)+2,1)(d,j⊖(7n⊖7)+2,1). In the last case put u=j⊖(8n⊖8)u=j\ominus(8n\ominus8)u=j⊖(8n⊖8) and use (a,n⊖⌊u/2⌋,b)(a,n\ominus\lfloor u/2\rfloor,b)(a,n⊖⌊u/2⌋,b), where b=1b=1b=1 exactly when u mod 2=0u\bmod2=0umod2=0. There are no column indices when n=0n=0n=0 or n=1n=1n=1. For every name vvv, every kind κ∈K\kappa\in Kκ∈K, every level i∈Ni\in\mathbb Ni∈N, and every Boolean bbb, the rational number δv(κ,i,b)\delta_v(\kappa,i,b)δv​(κ,i,b) is 111 if v=(κ,i,b)v=(\kappa,i,b)v=(κ,i,b) and is 000 otherwise. For every n∈Nn\in\mathbb Nn∈N, define the rational number Sn=2n+1S_n=2n+1Sn​=2n+1, with nnn regarded as a rational number in this formula. In particular, SnS_nSn​ is never zero. For every n∈Nn\in\mathbb Nn∈N, define the rational number εn=1/Sn2n+2\varepsilon_n=1/S_n^{2n+2}εn​=1/Sn2n+2​. For every n∈Nn\in\mathbb Nn∈N, every pair (κ,i)∈K×N(\kappa,i)\in K\times\mathbb N(κ,i)∈K×N, and every name vvv, let xλ,l,b=δv(λ,l,b)x_{\lambda,l,b}=\delta_v(\lambda,l,b)xλ,l,b​=δv​(λ,l,b), o=xκ,i,0+xκ,i,1o=x_{\kappa,i,0}+x_{\kappa,i,1}o=xκ,i,0​+xκ,i,1​, and u=xa,i,1+xb,i,1+xc,i,1+xd,i,1+xe,i,1u=x_{a,i,1}+x_{b,i,1}+x_{c,i,1}+x_{d,i,1}+x_{e,i,1}u=xa,i,1​+xb,i,1​+xc,i,1​+xd,i,1​+xe,i,1​. The rational coefficient Fn((κ,i),v)F_n((\kappa,i),v)Fn​((κ,i),v) is defined by these cases: for κ=a\kappa=aκ=a and i=2i=2i=2, it is o−εn(xb,2,0+xc,2,0+xd,2,0+xe,1,1)o-\varepsilon_n(x_{b,2,0}+x_{c,2,0}+x_{d,2,0}+x_{e,1,1})o−εn​(xb,2,0​+xc,2,0​+xd,2,0​+xe,1,1​); for κ=a\kappa=aκ=a and i≠2i\ne2i=2, it is o−xa,i⊖1,0−εn(xa,i⊖1,1+xb,i⊖1,1+xc,i⊖1,1+xd,i⊖1,1+xe,i⊖1,1)o-x_{a,i\ominus1,0}-\varepsilon_n(x_{a,i\ominus1,1}+x_{b,i\ominus1,1}+x_{c,i\ominus1,1}+x_{d,i\ominus1,1}+x_{e,i\ominus1,1})o−xa,i⊖1,0​−εn​(xa,i⊖1,1​+xb,i⊖1,1​+xc,i⊖1,1​+xd,i⊖1,1​+xe,i⊖1,1​); for κ=b\kappa=bκ=b, it is o−xb,i+1,0−xd,i+1,0o-x_{b,i+1,0}-x_{d,i+1,0}o−xb,i+1,0​−xd,i+1,0​; for κ=c\kappa=cκ=c and i=ni=ni=n, it is o−∑j=0nxe,j,0o-\sum_{j=0}^{n}x_{e,j,0}o−∑j=0n​xe,j,0​, including the term j=0j=0j=0; for κ=c\kappa=cκ=c and i≠ni\ne ni=n, it is o−xc,i+1,0o-x_{c,i+1,0}o−xc,i+1,0​; for κ=d\kappa=dκ=d, it is o−1−εn2uo-\frac{1-\varepsilon_n}{2}uo−21−εn​​u; for κ=e\kappa=eκ=e and i=1i=1i=1, it is o−(1−εn)(xb,2,0+xc,2,0+xd,2,0+xe,1,1)o-(1-\varepsilon_n)(x_{b,2,0}+x_{c,2,0}+x_{d,2,0}+x_{e,1,1})o−(1−εn​)(xb,2,0​+xc,2,0​+xd,2,0​+xe,1,1​); and for κ=e\kappa=eκ=e and i≠1i\ne1i=1, it is o−1−εn2uo-\frac{1-\varepsilon_n}{2}uo−21−εn​​u. The pair and name need not correspond to indices of the program. For every pair n,i∈Nn,i\in\mathbb Nn,i∈N, define the rational reward Gn,i=(−Sn)2i⊖1G_{n,i}=(-S_n)^{2i\ominus1}Gn,i​=(−Sn​)2i⊖1. In particular, Gn,0=1G_{n,0}=1Gn,0​=1 because its exponent is zero. For every pair n,i∈Nn,i\in\mathbb Nn,i∈N, define the rational reward Hn,i=(−Sn)2iH_{n,i}=(-S_n)^{2i}Hn,i​=(−Sn​)2i. In particular, Hn,0=1H_{n,0}=1Hn,0​=1. For every n∈Nn\in\mathbb Nn∈N and every name v=(κ,i,b)v=(\kappa,i,b)v=(κ,i,b), define its rational objective coefficient Dn(v)D_n(v)Dn​(v) as a base contribution plus (Gn,1+εnHn,1)(δv(b,2,0)+δv(c,2,0)+δv(d,2,0))(G_{n,1}+\varepsilon_nH_{n,1})(\delta_v(b,2,0)+\delta_v(c,2,0)+\delta_v(d,2,0))(Gn,1​+εn​Hn,1​)(δv​(b,2,0)+δv​(c,2,0)+δv​(d,2,0)). The base contribution is Gn,i+εnHn,iG_{n,i}+\varepsilon_nH_{n,i}Gn,i​+εn​Hn,i​ when b=1b=1b=1 and κ∈{a,b,c}\kappa\in\{a,b,c\}κ∈{a,b,c}; it is εnHn,i\varepsilon_nH_{n,i}εn​Hn,i​ when b=1b=1b=1 and κ∈{d,e}\kappa\in\{d,e\}κ∈{d,e}; it is 111 when (κ,b)=(e,0)(\kappa,b)=(e,0)(κ,b)=(e,0); and it is 000 in every remaining case. In the subscripts of δv\delta_vδv​, b,c,db,c,db,c,d denote kinds, whereas the last coordinate of the name is the Boolean bbb. This defines a coefficient even for names outside all valid column ranges. For every n∈Nn\in\mathbb Nn∈N, define the rational linear-program data Pn=(An,1,dn)P_n=(A_n,\mathbf1,d_n)Pn​=(An​,1,dn​) with mnm_nmn​ rows and knk_nkn​ columns by (An)rj=Fn(Rn(r),Nn(j))(A_n)_{rj}=F_n(R_n(r),N_n(j))(An​)rj​=Fn​(Rn​(r),Nn​(j)), (1)r=1(\mathbf1)_r=1(1)r​=1, and (dn)j=Dn(Nn(j))(d_n)_j=D_n(N_n(j))(dn​)j​=Dn​(Nn​(j)). The underlying linear-program type stores only a rational matrix, right-hand-side vector, and objective vector; it does not impose feasibility, rank, boundedness, or sign conditions. Its rational feasible points are the vectors x∈QJnx\in\mathbb Q^{J_n}x∈QJn​ with Anx=1A_nx=\mathbf1An​x=1 and xj≥0x_j\ge0xj​≥0 for every j∈Jnj\in J_nj∈Jn​, and its objective at xxx is ∑j∈Jn(dn)jxj\sum_{j\in J_n}(d_n)_jx_j∑j∈Jn​​(dn​)j​xj​. For n=0n=0n=0 or n=1n=1n=1, both index sets are empty. For every n∈Nn\in\mathbb Nn∈N and every name (κ,i,b)(\kappa,i,b)(κ,i,b), define its natural-number rank Cn(κ,i,b)C_n(\kappa,i,b)Cn​(κ,i,b) as follows: Cn(e,i,1)=0C_n(e,i,1)=0Cn​(e,i,1)=0 if i=1i=1i=1, and Cn(e,i,1)=4(i⊖2)+2C_n(e,i,1)=4(i\ominus2)+2Cn​(e,i,1)=4(i⊖2)+2 otherwise; Cn(d,i,0)=4(i⊖2)+1C_n(d,i,0)=4(i\ominus2)+1Cn​(d,i,0)=4(i⊖2)+1; Cn(b,i,1)=4(i⊖2)+3C_n(b,i,1)=4(i\ominus2)+3Cn​(b,i,1)=4(i⊖2)+3; Cn(b,i,0)=4(i⊖2)+4C_n(b,i,0)=4(i\ominus2)+4Cn​(b,i,0)=4(i⊖2)+4; Cn(c,i,0)=(4n⊖5)+2(i⊖2)C_n(c,i,0)=(4n\ominus5)+2(i\ominus2)Cn​(c,i,0)=(4n⊖5)+2(i⊖2); Cn(c,i,1)=(4n⊖5)+2(i⊖2)+1C_n(c,i,1)=(4n\ominus5)+2(i\ominus2)+1Cn​(c,i,1)=(4n⊖5)+2(i⊖2)+1; Cn(e,i,0)=(6n⊖7)+(i⊖1)C_n(e,i,0)=(6n\ominus7)+(i\ominus1)Cn​(e,i,0)=(6n⊖7)+(i⊖1); Cn(d,i,1)=(7n⊖7)+(i⊖2)C_n(d,i,1)=(7n\ominus7)+(i\ominus2)Cn​(d,i,1)=(7n⊖7)+(i⊖2); Cn(a,i,1)=(8n⊖8)+2(n⊖i)C_n(a,i,1)=(8n\ominus8)+2(n\ominus i)Cn​(a,i,1)=(8n⊖8)+2(n⊖i); and Cn(a,i,0)=(8n⊖8)+2(n⊖i)+1C_n(a,i,0)=(8n\ominus8)+2(n\ominus i)+1Cn​(a,i,0)=(8n⊖8)+2(n⊖i)+1. The function is defined on every name, including levels outside the row or column ranges, and its output is a natural number, without a bound by knk_nkn​. For every n∈Nn\in\mathbb Nn∈N, every supplied proof of 3≤n3\le n3≤n, every row r∈Inr\in I_nr∈In​, and every Boolean bbb, the column for this action is jn(r,b)=Cn(κ,i,b) mod knj_n(r,b)=C_n(\kappa,i,b)\bmod k_njn​(r,b)=Cn​(κ,i,b)modkn​, where (κ,i)=Rn(r)(\kappa,i)=R_n(r)(κ,i)=Rn​(r). The positive column count makes this a member of JnJ_nJn​. For every n∈Nn\in\mathbb Nn∈N, every supplied proof of 3≤n3\le n3≤n, and every policy σ\sigmaσ, define the row-to-column function Bn,σ(r)=jn(r,σ(r))B_{n,\sigma}(r)=j_n(r,\sigma(r))Bn,σ​(r)=jn​(r,σ(r)) for every r∈Inr\in I_nr∈In​. Calling this function a basis imposes no injectivity, determinant, or feasibility condition. For n≥3n\ge3n≥3 and a policy σ\sigmaσ, put (Mn,σ)q,r=(An)q,Bn,σ(r)(M_{n,\sigma})_{q,r}=(A_n)_{q,B_{n,\sigma}(r)}(Mn,σ​)q,r​=(An​)q,Bn,σ​(r)​, βn,σ=Mn,σ−11\beta_{n,\sigma}=M_{n,\sigma}^{-1}\mathbf1βn,σ​=Mn,σ−1​1, and xn,σ,j=∑r∈In: Bn,σ(r)=jβn,σ,rx_{n,\sigma,j}=\sum_{r\in I_n:\ B_{n,\sigma}(r)=j}\beta_{n,\sigma,r}xn,σ,j​=∑r∈In​: Bn,σ​(r)=j​βn,σ,r​ for every j∈Jnj\in J_nj∈Jn​. This is the basic point of the row-to-column function: repeated selected columns, if any, contribute by summation. The inverse is total, and these formulas alone impose no feasibility or determinant condition. For every n∈Nn\in\mathbb Nn∈N, every supplied proof of 3≤n3\le n3≤n, every rational vector c∈QJnc\in\mathbb Q^{J_n}c∈QJn​, and every two policies σ,τ\sigma,\tauσ,τ, the directed relation σ⟶cτ\sigma\longrightarrow_c\tauσ⟶c​τ holds exactly when they are cube-adjacent and ∑j∈Jncjxn,σ,j<∑j∈Jncjxn,τ,j\sum_{j\in J_n}c_jx_{n,\sigma,j}<\sum_{j\in J_n}c_jx_{n,\tau,j}∑j∈Jn​​cj​xn,σ,j​<∑j∈Jn​​cj​xn,τ,j​. The basic points in this comparison are formed from PnP_nPn​ with its original matrix and right-hand side; only the objective coefficients in the sums are replaced by ccc. The comparison is strict, so equality of the two sums gives no directed edge in either direction. For every n∈Nn\in\mathbb Nn∈N, the ordering equivalence on Jn={0,…,kn−1}J_n=\{0,\ldots,k_n-1\}Jn​={0,…,kn​−1} is the identity j↦jj\mapsto jj↦j, including the empty equivalence when n=0n=0n=0 or n=1n=1n=1. For last-column index ℓ∈Jn\ell\in J_nℓ∈Jn​ and candidate column j∈Jnj\in J_nj∈Jn​, the cyclic distance used here is Δn(ℓ,j)=(j+kn−ℓ) mod kn\Delta_n(\ell,j)=(j+k_n-\ell)\bmod k_nΔn​(ℓ,j)=(j+kn​−ℓ)modkn​. It is the specialization of the formula ((o(j))+kn−ℓ) mod kn((o(j))+k_n-\ell)\bmod k_n((o(j))+kn​−ℓ)modkn​ to the identity ordering ooo. Subtraction in the numerator is natural-number subtraction; it does not truncate for these indices because j+kn≥ℓj+k_n\ge\ellj+kn​≥ℓ. In particular Δn(ℓ,ℓ)=0\Delta_n(\ell,\ell)=0Δn​(ℓ,ℓ)=0 whenever such an index exists. For every n∈Nn\in\mathbb Nn∈N, every supplied proof of 3≤n3\le n3≤n, every rational objective vector c∈QJnc\in\mathbb Q^{J_n}c∈QJn​, and every pair of MDP states s=(σ,ℓ)s=(\sigma,\ell)s=(σ,ℓ) and s′=(σ′,ℓ′)s^{\prime}=(\sigma^{\prime},\ell^{\prime})s′=(σ′,ℓ′), a cube step holds exactly when there exists r∈Inr\in I_nr∈In​ such that σ⟶cσ(r)\sigma\longrightarrow_c\sigma^{(r)}σ⟶c​σ(r), and for every q∈Inq\in I_nq∈In​ with σ⟶cσ(q)\sigma\longrightarrow_c\sigma^{(q)}σ⟶c​σ(q) one has Δn(ℓ,jn(r,σ(r)‾))≤Δn(ℓ,jn(q,σ(q)‾))\Delta_n(\ell,j_n(r,\overline{\sigma(r)}))\le\Delta_n(\ell,j_n(q,\overline{\sigma(q)}))Δn​(ℓ,jn​(r,σ(r)​))≤Δn​(ℓ,jn​(q,σ(q)​)), and σ′=σ(r)\sigma^{\prime}=\sigma^{(r)}σ′=σ(r) and ℓ′=jn(r,σ(r)‾)\ell^{\prime}=j_n(r,\overline{\sigma(r)})ℓ′=jn​(r,σ(r)​). For each row qqq, σ(q)\sigma^{(q)}σ(q) is the policy obtained by negating σ(q)\sigma(q)σ(q) and keeping every other coordinate unchanged. The comparison of distances is non-strict, and this step predicate does not itself assume the AUSO predicate. For every pair (κ,i)∈K×N(\kappa,i)\in K\times\mathbb N(κ,i)∈K×N, define the Boolean b0(κ,i)b_0(\kappa,i)b0​(κ,i) to be 111 exactly when κ=d\kappa=dκ=d or both κ=e\kappa=eκ=e and i=1i=1i=1, and to be 000 otherwise. For every n∈Nn\in\mathbb Nn∈N, the initial policy is σn0(r)=b0(Rn(r))\sigma_n^0(r)=b_0(R_n(r))σn0​(r)=b0​(Rn​(r)) for each r∈Inr\in I_nr∈In​; equivalently it selects 111 exactly on rows of kind ddd and on the row of kind eee and level 111, and selects 000 on all other rows. This is the empty function if n=0n=0n=0 or n=1n=1n=1. For every n∈Nn\in\mathbb Nn∈N and every supplied proof of 3≤n3\le n3≤n, the initial MDP state is (σn0,0)(\sigma_n^0,0)(σn0​,0), with 0∈Jn0\in J_n0∈Jn​. For every n∈Nn\in\mathbb Nn∈N, every supplied proof of 3≤n3\le n3≤n, every rational objective vector c∈QJnc\in\mathbb Q^{J_n}c∈QJn​, every sequence s:N→MDPState(n)s:\mathbb N\to\mathrm{MDPState}(n)s:N→MDPState(n), and every natural TTT, a cube run holds exactly when s(0)=(σn0,0)s(0)=(\sigma_n^0,0)s(0)=(σn0​,0), for every natural t<Tt<Tt<T there is a cube step from s(t)s(t)s(t) to s(t+1)s(t+1)s(t+1), and for every policy τ\tauτ there is no edge from the policy of s(T)s(T)s(T) to τ\tauτ under ⟶c\longrightarrow_c⟶c​. This predicate permits T=0T=0T=0 when the initial policy already has no outgoing edge, and imposes no condition on s(t)s(t)s(t) for t>Tt>Tt>T. It does not itself assert that the orientation is an AUSO.

vertices. All indices and parameters described as natural numbers include zero. In the formulas below, a⊖b=max⁡(a−b,0)a\ominus b=\max(a-b,0)a⊖b=max(a−b,0) denotes subtraction in the natural numbers, ⌊a/b⌋\lfloor a/b\rfloor⌊a/b⌋ denotes natural-number division, and a mod ba\bmod bamodb denotes natural-number remainder. Boolean values are written 000 for false and 111 for true, and bˉ\bar bbˉ denotes their negation. A finite index set of size zero is empty. A rational matrix inverse is the total matrix inverse, which is the zero matrix when its determinant is zero; no nonzero-determinant condition is implicit in the notation. For every n∈Nn\in\mathbb Nn∈N, the number of rows is mn=5(n⊖1)m_n=5(n\ominus1)mn​=5(n⊖1); write In={0,…,mn−1}I_n=\{0,\ldots,m_n-1\}In​={0,…,mn​−1} for its finite index set. Thus m0=m1=0m_0=m_1=0m0​=m1​=0. For every n∈Nn\in\mathbb Nn∈N, the vertex count is vn=mn+3n+2v_n=m_n+3n+2vn​=mn​+3n+2; write Vn={0,…,vn−1}V_n=\{0,\ldots,v_n-1\}Vn​={0,…,vn​−1} for the vertex index set. Thus vn>0v_n>0vn​>0 for every nnn, including v0=2v_0=2v0​=2.

vertexCode. All indices and parameters described as natural numbers include zero. In the formulas below, a⊖b=max⁡(a−b,0)a\ominus b=\max(a-b,0)a⊖b=max(a−b,0) denotes subtraction in the natural numbers, ⌊a/b⌋\lfloor a/b\rfloor⌊a/b⌋ denotes natural-number division, and a mod ba\bmod bamodb denotes natural-number remainder. Boolean values are written 000 for false and 111 for true, and bˉ\bar bbˉ denotes their negation. A finite index set of size zero is empty. A rational matrix inverse is the total matrix inverse, which is the zero matrix when its determinant is zero; no nonzero-determinant condition is implicit in the notation. For every n∈Nn\in\mathbb Nn∈N, the number of rows is mn=5(n⊖1)m_n=5(n\ominus1)mn​=5(n⊖1); write In={0,…,mn−1}I_n=\{0,\ldots,m_n-1\}In​={0,…,mn​−1} for its finite index set. Thus m0=m1=0m_0=m_1=0m0​=m1​=0. For every n∈Nn\in\mathbb Nn∈N, the vertex count is vn=mn+3n+2v_n=m_n+3n+2vn​=mn​+3n+2; write Vn={0,…,vn−1}V_n=\{0,\ldots,v_n-1\}Vn​={0,…,vn​−1} for the vertex index set. Thus vn>0v_n>0vn​>0 for every nnn, including v0=2v_0=2v0​=2. For every n,k∈Nn,k\in\mathbb Nn,k∈N, the vertex code is [k]n=k mod vn[k]_n=k\bmod v_n[k]n​=kmodvn​, interpreted as an element of Vn={0,…,vn−1}V_n=\{0,\ldots,v_n-1\}Vn​={0,…,vn​−1}. Every natural code is permitted and is reduced modulo the positive vertex count.

sinkVertex. All indices and parameters described as natural numbers include zero. In the formulas below, a⊖b=max⁡(a−b,0)a\ominus b=\max(a-b,0)a⊖b=max(a−b,0) denotes subtraction in the natural numbers, ⌊a/b⌋\lfloor a/b\rfloor⌊a/b⌋ denotes natural-number division, and a mod ba\bmod bamodb denotes natural-number remainder. Boolean values are written 000 for false and 111 for true, and bˉ\bar bbˉ denotes their negation. A finite index set of size zero is empty. A rational matrix inverse is the total matrix inverse, which is the zero matrix when its determinant is zero; no nonzero-determinant condition is implicit in the notation. For every n∈Nn\in\mathbb Nn∈N, the number of rows is mn=5(n⊖1)m_n=5(n\ominus1)mn​=5(n⊖1); write In={0,…,mn−1}I_n=\{0,\ldots,m_n-1\}In​={0,…,mn​−1} for its finite index set. Thus m0=m1=0m_0=m_1=0m0​=m1​=0. For every n∈Nn\in\mathbb Nn∈N, the vertex count is vn=mn+3n+2v_n=m_n+3n+2vn​=mn​+3n+2; write Vn={0,…,vn−1}V_n=\{0,\ldots,v_n-1\}Vn​={0,…,vn​−1} for the vertex index set. Thus vn>0v_n>0vn​>0 for every nnn, including v0=2v_0=2v0​=2. For every n,k∈Nn,k\in\mathbb Nn,k∈N, the vertex code is [k]n=k mod vn[k]_n=k\bmod v_n[k]n​=kmodvn​, interpreted as an element of Vn={0,…,vn−1}V_n=\{0,\ldots,v_n-1\}Vn​={0,…,vn​−1}. Every natural code is permitted and is reduced modulo the positive vertex count. For every n∈Nn\in\mathbb Nn∈N, the designated sink vertex is zn=[mn+3n+1]nz_n=[m_n+3n+1]_nzn​=[mn​+3n+1]n​.

sVertex. All indices and parameters described as natural numbers include zero. In the formulas below, a⊖b=max⁡(a−b,0)a\ominus b=\max(a-b,0)a⊖b=max(a−b,0) denotes subtraction in the natural numbers, ⌊a/b⌋\lfloor a/b\rfloor⌊a/b⌋ denotes natural-number division, and a mod ba\bmod bamodb denotes natural-number remainder. Boolean values are written 000 for false and 111 for true, and bˉ\bar bbˉ denotes their negation. A finite index set of size zero is empty. A rational matrix inverse is the total matrix inverse, which is the zero matrix when its determinant is zero; no nonzero-determinant condition is implicit in the notation. For every n∈Nn\in\mathbb Nn∈N, the number of rows is mn=5(n⊖1)m_n=5(n\ominus1)mn​=5(n⊖1); write In={0,…,mn−1}I_n=\{0,\ldots,m_n-1\}In​={0,…,mn​−1} for its finite index set. Thus m0=m1=0m_0=m_1=0m0​=m1​=0. For every n∈Nn\in\mathbb Nn∈N, the vertex count is vn=mn+3n+2v_n=m_n+3n+2vn​=mn​+3n+2; write Vn={0,…,vn−1}V_n=\{0,\ldots,v_n-1\}Vn​={0,…,vn​−1} for the vertex index set. Thus vn>0v_n>0vn​>0 for every nnn, including v0=2v_0=2v0​=2. For every n,k∈Nn,k\in\mathbb Nn,k∈N, the vertex code is [k]n=k mod vn[k]_n=k\bmod v_n[k]n​=kmodvn​, interpreted as an element of Vn={0,…,vn−1}V_n=\{0,\ldots,v_n-1\}Vn​={0,…,vn​−1}. Every natural code is permitted and is reduced modulo the positive vertex count. For every n∈Nn\in\mathbb Nn∈N, the designated vertex sns_nsn​ is [mn+3n]n[m_n+3n]_n[mn​+3n]n​.

fVertex. All indices and parameters described as natural numbers include zero. In the formulas below, a⊖b=max⁡(a−b,0)a\ominus b=\max(a-b,0)a⊖b=max(a−b,0) denotes subtraction in the natural numbers, ⌊a/b⌋\lfloor a/b\rfloor⌊a/b⌋ denotes natural-number division, and a mod ba\bmod bamodb denotes natural-number remainder. Boolean values are written 000 for false and 111 for true, and bˉ\bar bbˉ denotes their negation. A finite index set of size zero is empty. A rational matrix inverse is the total matrix inverse, which is the zero matrix when its determinant is zero; no nonzero-determinant condition is implicit in the notation. For every n∈Nn\in\mathbb Nn∈N, the number of rows is mn=5(n⊖1)m_n=5(n\ominus1)mn​=5(n⊖1); write In={0,…,mn−1}I_n=\{0,\ldots,m_n-1\}In​={0,…,mn​−1} for its finite index set. Thus m0=m1=0m_0=m_1=0m0​=m1​=0. For every n∈Nn\in\mathbb Nn∈N, the vertex count is vn=mn+3n+2v_n=m_n+3n+2vn​=mn​+3n+2; write Vn={0,…,vn−1}V_n=\{0,\ldots,v_n-1\}Vn​={0,…,vn​−1} for the vertex index set. Thus vn>0v_n>0vn​>0 for every nnn, including v0=2v_0=2v0​=2. For every n,k∈Nn,k\in\mathbb Nn,k∈N, the vertex code is [k]n=k mod vn[k]_n=k\bmod v_n[k]n​=kmodvn​, interpreted as an element of Vn={0,…,vn−1}V_n=\{0,\ldots,v_n-1\}Vn​={0,…,vn​−1}. Every natural code is permitted and is reduced modulo the positive vertex count. For every n,i∈Nn,i\in\mathbb Nn,i∈N, define fn,i=[mn+(i⊖1)]nf_{n,i}=[m_n+(i\ominus1)]_nfn,i​=[mn​+(i⊖1)]n​. In particular, i=0i=0i=0 and i=1i=1i=1 give the same value, and levels larger than nnn are still defined by the same remainder.

gVertex. All indices and parameters described as natural numbers include zero. In the formulas below, a⊖b=max⁡(a−b,0)a\ominus b=\max(a-b,0)a⊖b=max(a−b,0) denotes subtraction in the natural numbers, ⌊a/b⌋\lfloor a/b\rfloor⌊a/b⌋ denotes natural-number division, and a mod ba\bmod bamodb denotes natural-number remainder. Boolean values are written 000 for false and 111 for true, and bˉ\bar bbˉ denotes their negation. A finite index set of size zero is empty. A rational matrix inverse is the total matrix inverse, which is the zero matrix when its determinant is zero; no nonzero-determinant condition is implicit in the notation. For every n∈Nn\in\mathbb Nn∈N, the number of rows is mn=5(n⊖1)m_n=5(n\ominus1)mn​=5(n⊖1); write In={0,…,mn−1}I_n=\{0,\ldots,m_n-1\}In​={0,…,mn​−1} for its finite index set. Thus m0=m1=0m_0=m_1=0m0​=m1​=0. For every n∈Nn\in\mathbb Nn∈N, the vertex count is vn=mn+3n+2v_n=m_n+3n+2vn​=mn​+3n+2; write Vn={0,…,vn−1}V_n=\{0,\ldots,v_n-1\}Vn​={0,…,vn​−1} for the vertex index set. Thus vn>0v_n>0vn​>0 for every nnn, including v0=2v_0=2v0​=2. For every n,k∈Nn,k\in\mathbb Nn,k∈N, the vertex code is [k]n=k mod vn[k]_n=k\bmod v_n[k]n​=kmodvn​, interpreted as an element of Vn={0,…,vn−1}V_n=\{0,\ldots,v_n-1\}Vn​={0,…,vn​−1}. Every natural code is permitted and is reduced modulo the positive vertex count. For every n,i∈Nn,i\in\mathbb Nn,i∈N, define gn,i=[mn+n+(i⊖1)]ng_{n,i}=[m_n+n+(i\ominus1)]_ngn,i​=[mn​+n+(i⊖1)]n​. In particular, i=0i=0i=0 and i=1i=1i=1 give the same value, and levels larger than nnn are still defined by the same remainder.

hVertex. All indices and parameters described as natural numbers include zero. In the formulas below, a⊖b=max⁡(a−b,0)a\ominus b=\max(a-b,0)a⊖b=max(a−b,0) denotes subtraction in the natural numbers, ⌊a/b⌋\lfloor a/b\rfloor⌊a/b⌋ denotes natural-number division, and a mod ba\bmod bamodb denotes natural-number remainder. Boolean values are written 000 for false and 111 for true, and bˉ\bar bbˉ denotes their negation. A finite index set of size zero is empty. A rational matrix inverse is the total matrix inverse, which is the zero matrix when its determinant is zero; no nonzero-determinant condition is implicit in the notation. For every n∈Nn\in\mathbb Nn∈N, the number of rows is mn=5(n⊖1)m_n=5(n\ominus1)mn​=5(n⊖1); write In={0,…,mn−1}I_n=\{0,\ldots,m_n-1\}In​={0,…,mn​−1} for its finite index set. Thus m0=m1=0m_0=m_1=0m0​=m1​=0. For every n∈Nn\in\mathbb Nn∈N, the vertex count is vn=mn+3n+2v_n=m_n+3n+2vn​=mn​+3n+2; write Vn={0,…,vn−1}V_n=\{0,\ldots,v_n-1\}Vn​={0,…,vn​−1} for the vertex index set. Thus vn>0v_n>0vn​>0 for every nnn, including v0=2v_0=2v0​=2. For every n,k∈Nn,k\in\mathbb Nn,k∈N, the vertex code is [k]n=k mod vn[k]_n=k\bmod v_n[k]n​=kmodvn​, interpreted as an element of Vn={0,…,vn−1}V_n=\{0,\ldots,v_n-1\}Vn​={0,…,vn​−1}. Every natural code is permitted and is reduced modulo the positive vertex count. For every n,i∈Nn,i\in\mathbb Nn,i∈N, define hn,i=[mn+2n+(i⊖1)]nh_{n,i}=[m_n+2n+(i\ominus1)]_nhn,i​=[mn​+2n+(i⊖1)]n​. In particular, i=0i=0i=0 and i=1i=1i=1 give the same value, and levels larger than nnn are still defined by the same remainder.

decisionVertex. All indices and parameters described as natural numbers include zero. In the formulas below, a⊖b=max⁡(a−b,0)a\ominus b=\max(a-b,0)a⊖b=max(a−b,0) denotes subtraction in the natural numbers, ⌊a/b⌋\lfloor a/b\rfloor⌊a/b⌋ denotes natural-number division, and a mod ba\bmod bamodb denotes natural-number remainder. Boolean values are written 000 for false and 111 for true, and bˉ\bar bbˉ denotes their negation. A finite index set of size zero is empty. A rational matrix inverse is the total matrix inverse, which is the zero matrix when its determinant is zero; no nonzero-determinant condition is implicit in the notation. For every n∈Nn\in\mathbb Nn∈N, the number of rows is mn=5(n⊖1)m_n=5(n\ominus1)mn​=5(n⊖1); write In={0,…,mn−1}I_n=\{0,\ldots,m_n-1\}In​={0,…,mn​−1} for its finite index set. Thus m0=m1=0m_0=m_1=0m0​=m1​=0. For every n∈Nn\in\mathbb Nn∈N, the vertex count is vn=mn+3n+2v_n=m_n+3n+2vn​=mn​+3n+2; write Vn={0,…,vn−1}V_n=\{0,\ldots,v_n-1\}Vn​={0,…,vn​−1} for the vertex index set. Thus vn>0v_n>0vn​>0 for every nnn, including v0=2v_0=2v0​=2. For every n,k∈Nn,k\in\mathbb Nn,k∈N, the vertex code is [k]n=k mod vn[k]_n=k\bmod v_n[k]n​=kmodvn​, interpreted as an element of Vn={0,…,vn−1}V_n=\{0,\ldots,v_n-1\}Vn​={0,…,vn​−1}. Every natural code is permitted and is reduced modulo the positive vertex count. For every n∈Nn\in\mathbb Nn∈N, the designated sink vertex is zn=[mn+3n+1]nz_n=[m_n+3n+1]_nzn​=[mn​+3n+1]n​. For every n,i∈Nn,i\in\mathbb Nn,i∈N, define gn,i=[mn+n+(i⊖1)]ng_{n,i}=[m_n+n+(i\ominus1)]_ngn,i​=[mn​+n+(i⊖1)]n​. In particular, i=0i=0i=0 and i=1i=1i=1 give the same value, and levels larger than nnn are still defined by the same remainder. The type KKK consists of exactly five distinct constructors, denoted a,b,c,d,ea,b,c,d,ea,b,c,d,e, with decidable equality. For every n∈Nn\in\mathbb Nn∈N and pair (κ,i)∈K×N(\kappa,i)\in K\times\mathbb N(κ,i)∈K×N, define the natural-number row rank Qn(κ,i)Q_n(\kappa,i)Qn​(κ,i) by Qn(a,i)=i⊖2Q_n(a,i)=i\ominus2Qn​(a,i)=i⊖2, Qn(b,i)=(n⊖1)+(i⊖2)Q_n(b,i)=(n\ominus1)+(i\ominus2)Qn​(b,i)=(n⊖1)+(i⊖2), Qn(c,i)=(n⊖1)+(n⊖2)+(i⊖2)Q_n(c,i)=(n\ominus1)+(n\ominus2)+(i\ominus2)Qn​(c,i)=(n⊖1)+(n⊖2)+(i⊖2), Qn(d,i)=2(n⊖1)+(n⊖2)+(i⊖2)Q_n(d,i)=2(n\ominus1)+(n\ominus2)+(i\ominus2)Qn​(d,i)=2(n⊖1)+(n⊖2)+(i⊖2), and Qn(e,i)=3(n⊖1)+(n⊖2)+(i⊖1)Q_n(e,i)=3(n\ominus1)+(n\ominus2)+(i\ominus1)Qn​(e,i)=3(n⊖1)+(n⊖2)+(i⊖1). The input may have any level; the result has no imposed bound by the row count. For every n∈Nn\in\mathbb Nn∈N, every kind κ∈K\kappa\in Kκ∈K, and every level i∈Ni\in\mathbb Ni∈N, define dn,κ,id_{n,\kappa,i}dn,κ,i​ by the following ordered cases: if κ=a\kappa=aκ=a and i=n+1i=n+1i=n+1, use znz_nzn​; otherwise, if κ∈{b,c}\kappa\in\{b,c\}κ∈{b,c} and i=1i=1i=1, use gn,1g_{n,1}gn,1​; otherwise use [Qn(κ,i)]n[Q_n(\kappa,i)]_n[Qn​(κ,i)]n​. Thus arbitrary levels are allowed, with truncated subtraction and remainder in the last case.

actionSource. All indices and parameters described as natural numbers include zero. In the formulas below, a⊖b=max⁡(a−b,0)a\ominus b=\max(a-b,0)a⊖b=max(a−b,0) denotes subtraction in the natural numbers, ⌊a/b⌋\lfloor a/b\rfloor⌊a/b⌋ denotes natural-number division, and a mod ba\bmod bamodb denotes natural-number remainder. Boolean values are written 000 for false and 111 for true, and bˉ\bar bbˉ denotes their negation. A finite index set of size zero is empty. A rational matrix inverse is the total matrix inverse, which is the zero matrix when its determinant is zero; no nonzero-determinant condition is implicit in the notation. The type KKK consists of exactly five distinct constructors, denoted a,b,c,d,ea,b,c,d,ea,b,c,d,e, with decidable equality. A name is a triple v=(κ,i,b)v=(\kappa,i,b)v=(κ,i,b) with kind κ∈K\kappa\in Kκ∈K, level i∈Ni\in\mathbb Ni∈N, and Boolean value b∈{0,1}b\in\{0,1\}b∈{0,1}. There are no restrictions on the level or on combinations of fields. Equality of names is decidable. For every n∈Nn\in\mathbb Nn∈N, the number of columns is kn=10(n⊖1)k_n=10(n\ominus1)kn​=10(n⊖1); write Jn={0,…,kn−1}J_n=\{0,\ldots,k_n-1\}Jn​={0,…,kn​−1} for its finite index set. Thus k0=k1=0k_0=k_1=0k0​=k1​=0. For every n∈Nn\in\mathbb Nn∈N and column index j∈Jn={0,…,kn−1}j\in J_n=\{0,\ldots,k_n-1\}j∈Jn​={0,…,kn​−1}, define the name Nn(j)N_n(j)Nn​(j) by the following ordered cases. If j=0j=0j=0, use (e,1,1)(e,1,1)(e,1,1). Otherwise, if j<4n⊖5j<4n\ominus5j<4n⊖5, put i=⌊(j⊖1)/4⌋+2i=\lfloor(j\ominus1)/4\rfloor+2i=⌊(j⊖1)/4⌋+2 and use respectively (d,i,0)(d,i,0)(d,i,0), (e,i,1)(e,i,1)(e,i,1), (b,i,1)(b,i,1)(b,i,1), or (b,i,0)(b,i,0)(b,i,0) according as (j⊖1) mod 4(j\ominus1)\bmod4(j⊖1)mod4 is 000, 111, 222, or anything else. Otherwise, if j<6n⊖7j<6n\ominus7j<6n⊖7, put u=j⊖(4n⊖5)u=j\ominus(4n\ominus5)u=j⊖(4n⊖5) and use (c,⌊u/2⌋+2,b)(c,\lfloor u/2\rfloor+2,b)(c,⌊u/2⌋+2,b), where b=1b=1b=1 exactly when u mod 2=1u\bmod2=1umod2=1. Otherwise, if j<7n⊖7j<7n\ominus7j<7n⊖7, use (e,j⊖(6n⊖7)+1,0)(e,j\ominus(6n\ominus7)+1,0)(e,j⊖(6n⊖7)+1,0). Otherwise, if j<8n⊖8j<8n\ominus8j<8n⊖8, use (d,j⊖(7n⊖7)+2,1)(d,j\ominus(7n\ominus7)+2,1)(d,j⊖(7n⊖7)+2,1). In the last case put u=j⊖(8n⊖8)u=j\ominus(8n\ominus8)u=j⊖(8n⊖8) and use (a,n⊖⌊u/2⌋,b)(a,n\ominus\lfloor u/2\rfloor,b)(a,n⊖⌊u/2⌋,b), where b=1b=1b=1 exactly when u mod 2=0u\bmod2=0umod2=0. There are no column indices when n=0n=0n=0 or n=1n=1n=1. For every n∈Nn\in\mathbb Nn∈N, the number of rows is mn=5(n⊖1)m_n=5(n\ominus1)mn​=5(n⊖1); write In={0,…,mn−1}I_n=\{0,\ldots,m_n-1\}In​={0,…,mn​−1} for its finite index set. Thus m0=m1=0m_0=m_1=0m0​=m1​=0. For every n∈Nn\in\mathbb Nn∈N, the vertex count is vn=mn+3n+2v_n=m_n+3n+2vn​=mn​+3n+2; write Vn={0,…,vn−1}V_n=\{0,\ldots,v_n-1\}Vn​={0,…,vn​−1} for the vertex index set. Thus vn>0v_n>0vn​>0 for every nnn, including v0=2v_0=2v0​=2. For every n,k∈Nn,k\in\mathbb Nn,k∈N, the vertex code is [k]n=k mod vn[k]_n=k\bmod v_n[k]n​=kmodvn​, interpreted as an element of Vn={0,…,vn−1}V_n=\{0,\ldots,v_n-1\}Vn​={0,…,vn​−1}. Every natural code is permitted and is reduced modulo the positive vertex count. For every n∈Nn\in\mathbb Nn∈N, the designated sink vertex is zn=[mn+3n+1]nz_n=[m_n+3n+1]_nzn​=[mn​+3n+1]n​. For every n,i∈Nn,i\in\mathbb Nn,i∈N, define gn,i=[mn+n+(i⊖1)]ng_{n,i}=[m_n+n+(i\ominus1)]_ngn,i​=[mn​+n+(i⊖1)]n​. In particular, i=0i=0i=0 and i=1i=1i=1 give the same value, and levels larger than nnn are still defined by the same remainder. For every n∈Nn\in\mathbb Nn∈N and pair (κ,i)∈K×N(\kappa,i)\in K\times\mathbb N(κ,i)∈K×N, define the natural-number row rank Qn(κ,i)Q_n(\kappa,i)Qn​(κ,i) by Qn(a,i)=i⊖2Q_n(a,i)=i\ominus2Qn​(a,i)=i⊖2, Qn(b,i)=(n⊖1)+(i⊖2)Q_n(b,i)=(n\ominus1)+(i\ominus2)Qn​(b,i)=(n⊖1)+(i⊖2), Qn(c,i)=(n⊖1)+(n⊖2)+(i⊖2)Q_n(c,i)=(n\ominus1)+(n\ominus2)+(i\ominus2)Qn​(c,i)=(n⊖1)+(n⊖2)+(i⊖2), Qn(d,i)=2(n⊖1)+(n⊖2)+(i⊖2)Q_n(d,i)=2(n\ominus1)+(n\ominus2)+(i\ominus2)Qn​(d,i)=2(n⊖1)+(n⊖2)+(i⊖2), and Qn(e,i)=3(n⊖1)+(n⊖2)+(i⊖1)Q_n(e,i)=3(n\ominus1)+(n\ominus2)+(i\ominus1)Qn​(e,i)=3(n⊖1)+(n⊖2)+(i⊖1). The input may have any level; the result has no imposed bound by the row count. For every n∈Nn\in\mathbb Nn∈N, every kind κ∈K\kappa\in Kκ∈K, and every level i∈Ni\in\mathbb Ni∈N, define dn,κ,id_{n,\kappa,i}dn,κ,i​ by the following ordered cases: if κ=a\kappa=aκ=a and i=n+1i=n+1i=n+1, use znz_nzn​; otherwise, if κ∈{b,c}\kappa\in\{b,c\}κ∈{b,c} and i=1i=1i=1, use gn,1g_{n,1}gn,1​; otherwise use [Qn(κ,i)]n[Q_n(\kappa,i)]_n[Qn​(κ,i)]n​. Thus arbitrary levels are allowed, with truncated subtraction and remainder in the last case. For every n∈Nn\in\mathbb Nn∈N and column j∈Jnj\in J_nj∈Jn​, if Nn(j)=(κ,i,b)N_n(j)=(\kappa,i,b)Nn​(j)=(κ,i,b) then its source is src⁡n(j)=dn,κ,i\operatorname{src}_n(j)=d_{n,\kappa,i}srcn​(j)=dn,κ,i​. The Boolean component does not affect this source.

actionTarget. All indices and parameters described as natural numbers include zero. In the formulas below, a⊖b=max⁡(a−b,0)a\ominus b=\max(a-b,0)a⊖b=max(a−b,0) denotes subtraction in the natural numbers, ⌊a/b⌋\lfloor a/b\rfloor⌊a/b⌋ denotes natural-number division, and a mod ba\bmod bamodb denotes natural-number remainder. Boolean values are written 000 for false and 111 for true, and bˉ\bar bbˉ denotes their negation. A finite index set of size zero is empty. A rational matrix inverse is the total matrix inverse, which is the zero matrix when its determinant is zero; no nonzero-determinant condition is implicit in the notation. The type KKK consists of exactly five distinct constructors, denoted a,b,c,d,ea,b,c,d,ea,b,c,d,e, with decidable equality. A name is a triple v=(κ,i,b)v=(\kappa,i,b)v=(κ,i,b) with kind κ∈K\kappa\in Kκ∈K, level i∈Ni\in\mathbb Ni∈N, and Boolean value b∈{0,1}b\in\{0,1\}b∈{0,1}. There are no restrictions on the level or on combinations of fields. Equality of names is decidable. For every n∈Nn\in\mathbb Nn∈N, the number of rows is mn=5(n⊖1)m_n=5(n\ominus1)mn​=5(n⊖1); write In={0,…,mn−1}I_n=\{0,\ldots,m_n-1\}In​={0,…,mn​−1} for its finite index set. Thus m0=m1=0m_0=m_1=0m0​=m1​=0. For every n∈Nn\in\mathbb Nn∈N, the vertex count is vn=mn+3n+2v_n=m_n+3n+2vn​=mn​+3n+2; write Vn={0,…,vn−1}V_n=\{0,\ldots,v_n-1\}Vn​={0,…,vn​−1} for the vertex index set. Thus vn>0v_n>0vn​>0 for every nnn, including v0=2v_0=2v0​=2. For every n,k∈Nn,k\in\mathbb Nn,k∈N, the vertex code is [k]n=k mod vn[k]_n=k\bmod v_n[k]n​=kmodvn​, interpreted as an element of Vn={0,…,vn−1}V_n=\{0,\ldots,v_n-1\}Vn​={0,…,vn​−1}. Every natural code is permitted and is reduced modulo the positive vertex count. For every n∈Nn\in\mathbb Nn∈N, the designated sink vertex is zn=[mn+3n+1]nz_n=[m_n+3n+1]_nzn​=[mn​+3n+1]n​. For every n,i∈Nn,i\in\mathbb Nn,i∈N, define gn,i=[mn+n+(i⊖1)]ng_{n,i}=[m_n+n+(i\ominus1)]_ngn,i​=[mn​+n+(i⊖1)]n​. In particular, i=0i=0i=0 and i=1i=1i=1 give the same value, and levels larger than nnn are still defined by the same remainder. For every n∈Nn\in\mathbb Nn∈N and pair (κ,i)∈K×N(\kappa,i)\in K\times\mathbb N(κ,i)∈K×N, define the natural-number row rank Qn(κ,i)Q_n(\kappa,i)Qn​(κ,i) by Qn(a,i)=i⊖2Q_n(a,i)=i\ominus2Qn​(a,i)=i⊖2, Qn(b,i)=(n⊖1)+(i⊖2)Q_n(b,i)=(n\ominus1)+(i\ominus2)Qn​(b,i)=(n⊖1)+(i⊖2), Qn(c,i)=(n⊖1)+(n⊖2)+(i⊖2)Q_n(c,i)=(n\ominus1)+(n\ominus2)+(i\ominus2)Qn​(c,i)=(n⊖1)+(n⊖2)+(i⊖2), Qn(d,i)=2(n⊖1)+(n⊖2)+(i⊖2)Q_n(d,i)=2(n\ominus1)+(n\ominus2)+(i\ominus2)Qn​(d,i)=2(n⊖1)+(n⊖2)+(i⊖2), and Qn(e,i)=3(n⊖1)+(n⊖2)+(i⊖1)Q_n(e,i)=3(n\ominus1)+(n\ominus2)+(i\ominus1)Qn​(e,i)=3(n⊖1)+(n⊖2)+(i⊖1). The input may have any level; the result has no imposed bound by the row count. For every n∈Nn\in\mathbb Nn∈N, every kind κ∈K\kappa\in Kκ∈K, and every level i∈Ni\in\mathbb Ni∈N, define dn,κ,id_{n,\kappa,i}dn,κ,i​ by the following ordered cases: if κ=a\kappa=aκ=a and i=n+1i=n+1i=n+1, use znz_nzn​; otherwise, if κ∈{b,c}\kappa\in\{b,c\}κ∈{b,c} and i=1i=1i=1, use gn,1g_{n,1}gn,1​; otherwise use [Qn(κ,i)]n[Q_n(\kappa,i)]_n[Qn​(κ,i)]n​. Thus arbitrary levels are allowed, with truncated subtraction and remainder in the last case. For every n,i∈Nn,i\in\mathbb Nn,i∈N, define fn,i=[mn+(i⊖1)]nf_{n,i}=[m_n+(i\ominus1)]_nfn,i​=[mn​+(i⊖1)]n​. In particular, i=0i=0i=0 and i=1i=1i=1 give the same value, and levels larger than nnn are still defined by the same remainder. For every n∈Nn\in\mathbb Nn∈N, the designated vertex sns_nsn​ is [mn+3n]n[m_n+3n]_n[mn​+3n]n​. For every n∈Nn\in\mathbb Nn∈N and every name (κ,i,b)(\kappa,i,b)(κ,i,b), its target tgt⁡n(κ,i,b)\operatorname{tgt}_n(\kappa,i,b)tgtn​(κ,i,b) is gn,ig_{n,i}gn,i​ when b=1b=1b=1 and κ∈{a,b,c}\kappa\in\{a,b,c\}κ∈{a,b,c}; dn,a,i+1d_{n,a,i+1}dn,a,i+1​ when (κ,b)=(a,0)(\kappa,b)=(a,0)(κ,b)=(a,0); dn,b,i⊖1d_{n,b,i\ominus1}dn,b,i⊖1​ when b=0b=0b=0 and κ∈{b,d}\kappa\in\{b,d\}κ∈{b,d}; dn,c,i⊖1d_{n,c,i\ominus1}dn,c,i⊖1​ when (κ,b)=(c,0)(\kappa,b)=(c,0)(κ,b)=(c,0); fn,if_{n,i}fn,i​ when b=1b=1b=1 and κ∈{d,e}\kappa\in\{d,e\}κ∈{d,e}; and sns_nsn​ when (κ,b)=(e,0)(\kappa,b)=(e,0)(κ,b)=(e,0). The definition is total for all names, including level zero.

gameSuccessors. All indices and parameters described as natural numbers include zero. In the formulas below, a⊖b=max⁡(a−b,0)a\ominus b=\max(a-b,0)a⊖b=max(a−b,0) denotes subtraction in the natural numbers, ⌊a/b⌋\lfloor a/b\rfloor⌊a/b⌋ denotes natural-number division, and a mod ba\bmod bamodb denotes natural-number remainder. Boolean values are written 000 for false and 111 for true, and bˉ\bar bbˉ denotes their negation. A finite index set of size zero is empty. A rational matrix inverse is the total matrix inverse, which is the zero matrix when its determinant is zero; no nonzero-determinant condition is implicit in the notation. The type KKK consists of exactly five distinct constructors, denoted a,b,c,d,ea,b,c,d,ea,b,c,d,e, with decidable equality. For every n∈Nn\in\mathbb Nn∈N, the number of rows is mn=5(n⊖1)m_n=5(n\ominus1)mn​=5(n⊖1); write In={0,…,mn−1}I_n=\{0,\ldots,m_n-1\}In​={0,…,mn​−1} for its finite index set. Thus m0=m1=0m_0=m_1=0m0​=m1​=0. For every n∈Nn\in\mathbb Nn∈N and row index r∈In={0,…,mn−1}r\in I_n=\{0,\ldots,m_n-1\}r∈In​={0,…,mn​−1}, define its kind and level Rn(r)R_n(r)Rn​(r) by the following ordered cases: if r<n⊖1r<n\ominus1r<n⊖1, it is (a,r+2)(a,r+2)(a,r+2); otherwise, if r<(n⊖1)+(n⊖2)r<(n\ominus1)+(n\ominus2)r<(n⊖1)+(n⊖2), it is (b,r⊖(n⊖1)+2)(b,r\ominus(n\ominus1)+2)(b,r⊖(n⊖1)+2); otherwise, if r<2(n⊖1)+(n⊖2)r<2(n\ominus1)+(n\ominus2)r<2(n⊖1)+(n⊖2), it is (c,r⊖((n⊖1)+(n⊖2))+2)(c,r\ominus((n\ominus1)+(n\ominus2))+2)(c,r⊖((n⊖1)+(n⊖2))+2); otherwise, if r<3(n⊖1)+(n⊖2)r<3(n\ominus1)+(n\ominus2)r<3(n⊖1)+(n⊖2), it is (d,r⊖(2(n⊖1)+(n⊖2))+2)(d,r\ominus(2(n\ominus1)+(n\ominus2))+2)(d,r⊖(2(n⊖1)+(n⊖2))+2); otherwise it is (e,r⊖(3(n⊖1)+(n⊖2))+1)(e,r\ominus(3(n\ominus1)+(n\ominus2))+1)(e,r⊖(3(n⊖1)+(n⊖2))+1). There are no row indices when n=0n=0n=0 or n=1n=1n=1. A name is a triple v=(κ,i,b)v=(\kappa,i,b)v=(κ,i,b) with kind κ∈K\kappa\in Kκ∈K, level i∈Ni\in\mathbb Ni∈N, and Boolean value b∈{0,1}b\in\{0,1\}b∈{0,1}. There are no restrictions on the level or on combinations of fields. Equality of names is decidable. For every n∈Nn\in\mathbb Nn∈N, the vertex count is vn=mn+3n+2v_n=m_n+3n+2vn​=mn​+3n+2; write Vn={0,…,vn−1}V_n=\{0,\ldots,v_n-1\}Vn​={0,…,vn​−1} for the vertex index set. Thus vn>0v_n>0vn​>0 for every nnn, including v0=2v_0=2v0​=2. For every n,k∈Nn,k\in\mathbb Nn,k∈N, the vertex code is [k]n=k mod vn[k]_n=k\bmod v_n[k]n​=kmodvn​, interpreted as an element of Vn={0,…,vn−1}V_n=\{0,\ldots,v_n-1\}Vn​={0,…,vn​−1}. Every natural code is permitted and is reduced modulo the positive vertex count. For every n∈Nn\in\mathbb Nn∈N, the designated sink vertex is zn=[mn+3n+1]nz_n=[m_n+3n+1]_nzn​=[mn​+3n+1]n​. For every n,i∈Nn,i\in\mathbb Nn,i∈N, define gn,i=[mn+n+(i⊖1)]ng_{n,i}=[m_n+n+(i\ominus1)]_ngn,i​=[mn​+n+(i⊖1)]n​. In particular, i=0i=0i=0 and i=1i=1i=1 give the same value, and levels larger than nnn are still defined by the same remainder. For every n∈Nn\in\mathbb Nn∈N and pair (κ,i)∈K×N(\kappa,i)\in K\times\mathbb N(κ,i)∈K×N, define the natural-number row rank Qn(κ,i)Q_n(\kappa,i)Qn​(κ,i) by Qn(a,i)=i⊖2Q_n(a,i)=i\ominus2Qn​(a,i)=i⊖2, Qn(b,i)=(n⊖1)+(i⊖2)Q_n(b,i)=(n\ominus1)+(i\ominus2)Qn​(b,i)=(n⊖1)+(i⊖2), Qn(c,i)=(n⊖1)+(n⊖2)+(i⊖2)Q_n(c,i)=(n\ominus1)+(n\ominus2)+(i\ominus2)Qn​(c,i)=(n⊖1)+(n⊖2)+(i⊖2), Qn(d,i)=2(n⊖1)+(n⊖2)+(i⊖2)Q_n(d,i)=2(n\ominus1)+(n\ominus2)+(i\ominus2)Qn​(d,i)=2(n⊖1)+(n⊖2)+(i⊖2), and Qn(e,i)=3(n⊖1)+(n⊖2)+(i⊖1)Q_n(e,i)=3(n\ominus1)+(n\ominus2)+(i\ominus1)Qn​(e,i)=3(n⊖1)+(n⊖2)+(i⊖1). The input may have any level; the result has no imposed bound by the row count. For every n∈Nn\in\mathbb Nn∈N, every kind κ∈K\kappa\in Kκ∈K, and every level i∈Ni\in\mathbb Ni∈N, define dn,κ,id_{n,\kappa,i}dn,κ,i​ by the following ordered cases: if κ=a\kappa=aκ=a and i=n+1i=n+1i=n+1, use znz_nzn​; otherwise, if κ∈{b,c}\kappa\in\{b,c\}κ∈{b,c} and i=1i=1i=1, use gn,1g_{n,1}gn,1​; otherwise use [Qn(κ,i)]n[Q_n(\kappa,i)]_n[Qn​(κ,i)]n​. Thus arbitrary levels are allowed, with truncated subtraction and remainder in the last case. For every n,i∈Nn,i\in\mathbb Nn,i∈N, define fn,i=[mn+(i⊖1)]nf_{n,i}=[m_n+(i\ominus1)]_nfn,i​=[mn​+(i⊖1)]n​. In particular, i=0i=0i=0 and i=1i=1i=1 give the same value, and levels larger than nnn are still defined by the same remainder. For every n∈Nn\in\mathbb Nn∈N, the designated vertex sns_nsn​ is [mn+3n]n[m_n+3n]_n[mn​+3n]n​. For every n∈Nn\in\mathbb Nn∈N and every name (κ,i,b)(\kappa,i,b)(κ,i,b), its target tgt⁡n(κ,i,b)\operatorname{tgt}_n(\kappa,i,b)tgtn​(κ,i,b) is gn,ig_{n,i}gn,i​ when b=1b=1b=1 and κ∈{a,b,c}\kappa\in\{a,b,c\}κ∈{a,b,c}; dn,a,i+1d_{n,a,i+1}dn,a,i+1​ when (κ,b)=(a,0)(\kappa,b)=(a,0)(κ,b)=(a,0); dn,b,i⊖1d_{n,b,i\ominus1}dn,b,i⊖1​ when b=0b=0b=0 and κ∈{b,d}\kappa\in\{b,d\}κ∈{b,d}; dn,c,i⊖1d_{n,c,i\ominus1}dn,c,i⊖1​ when (κ,b)=(c,0)(\kappa,b)=(c,0)(κ,b)=(c,0); fn,if_{n,i}fn,i​ when b=1b=1b=1 and κ∈{d,e}\kappa\in\{d,e\}κ∈{d,e}; and sns_nsn​ when (κ,b)=(e,0)(\kappa,b)=(e,0)(κ,b)=(e,0). The definition is total for all names, including level zero. For every n,i∈Nn,i\in\mathbb Nn,i∈N, define hn,i=[mn+2n+(i⊖1)]nh_{n,i}=[m_n+2n+(i\ominus1)]_nhn,i​=[mn​+2n+(i⊖1)]n​. In particular, i=0i=0i=0 and i=1i=1i=1 give the same value, and levels larger than nnn are still defined by the same remainder. For every n∈Nn\in\mathbb Nn∈N and vertex v∈Vnv\in V_nv∈Vn​, regarding vvv as its natural index, the finite successor set En(v)E_n(v)En​(v) is given by these ordered cases. If v<mnv<m_nv<mn​, write (κ,i)=Rn(v)(\kappa,i)=R_n(v)(κ,i)=Rn​(v) and use {tgt⁡n(κ,i,0),tgt⁡n(κ,i,1)}\{\operatorname{tgt}_n(\kappa,i,0),\operatorname{tgt}_n(\kappa,i,1)\}{tgtn​(κ,i,0),tgtn​(κ,i,1)}. Otherwise, if v<mn+nv<m_n+nv<mn​+n, put i=v⊖mn+1i=v\ominus m_n+1i=v⊖mn​+1; if i=1i=1i=1 use {hn,i,dn,e,i}\{h_{n,i},d_{n,e,i}\}{hn,i​,dn,e,i​}, and otherwise use {hn,i,dn,d,i,dn,e,i}\{h_{n,i},d_{n,d,i},d_{n,e,i}\}{hn,i​,dn,d,i​,dn,e,i​}. Otherwise, if v<mn+2nv<m_n+2nv<mn​+2n, use {fn,v⊖(mn+n)+1}\{f_{n,v\ominus(m_n+n)+1}\}{fn,v⊖(mn​+n)+1​}. Otherwise, if v<mn+3nv<m_n+3nv<mn​+3n, use {dn,a,v⊖(mn+2n)+2}\{d_{n,a,v\ominus(m_n+2n)+2}\}{dn,a,v⊖(mn​+2n)+2​}. Otherwise, if v=snv=s_nv=sn​, use {dn,c,n}\{d_{n,c,n}\}{dn,c,n​}. In every remaining case use {zn}\{z_n\}{zn​}. These are finite sets, so any duplicate entries are identified.

gamePriority. All indices and parameters described as natural numbers include zero. In the formulas below, a⊖b=max⁡(a−b,0)a\ominus b=\max(a-b,0)a⊖b=max(a−b,0) denotes subtraction in the natural numbers, ⌊a/b⌋\lfloor a/b\rfloor⌊a/b⌋ denotes natural-number division, and a mod ba\bmod bamodb denotes natural-number remainder. Boolean values are written 000 for false and 111 for true, and bˉ\bar bbˉ denotes their negation. A finite index set of size zero is empty. A rational matrix inverse is the total matrix inverse, which is the zero matrix when its determinant is zero; no nonzero-determinant condition is implicit in the notation. The type KKK consists of exactly five distinct constructors, denoted a,b,c,d,ea,b,c,d,ea,b,c,d,e, with decidable equality. For every n∈Nn\in\mathbb Nn∈N, the number of rows is mn=5(n⊖1)m_n=5(n\ominus1)mn​=5(n⊖1); write In={0,…,mn−1}I_n=\{0,\ldots,m_n-1\}In​={0,…,mn​−1} for its finite index set. Thus m0=m1=0m_0=m_1=0m0​=m1​=0. For every n∈Nn\in\mathbb Nn∈N and row index r∈In={0,…,mn−1}r\in I_n=\{0,\ldots,m_n-1\}r∈In​={0,…,mn​−1}, define its kind and level Rn(r)R_n(r)Rn​(r) by the following ordered cases: if r<n⊖1r<n\ominus1r<n⊖1, it is (a,r+2)(a,r+2)(a,r+2); otherwise, if r<(n⊖1)+(n⊖2)r<(n\ominus1)+(n\ominus2)r<(n⊖1)+(n⊖2), it is (b,r⊖(n⊖1)+2)(b,r\ominus(n\ominus1)+2)(b,r⊖(n⊖1)+2); otherwise, if r<2(n⊖1)+(n⊖2)r<2(n\ominus1)+(n\ominus2)r<2(n⊖1)+(n⊖2), it is (c,r⊖((n⊖1)+(n⊖2))+2)(c,r\ominus((n\ominus1)+(n\ominus2))+2)(c,r⊖((n⊖1)+(n⊖2))+2); otherwise, if r<3(n⊖1)+(n⊖2)r<3(n\ominus1)+(n\ominus2)r<3(n⊖1)+(n⊖2), it is (d,r⊖(2(n⊖1)+(n⊖2))+2)(d,r\ominus(2(n\ominus1)+(n\ominus2))+2)(d,r⊖(2(n⊖1)+(n⊖2))+2); otherwise it is (e,r⊖(3(n⊖1)+(n⊖2))+1)(e,r\ominus(3(n\ominus1)+(n\ominus2))+1)(e,r⊖(3(n⊖1)+(n⊖2))+1). There are no row indices when n=0n=0n=0 or n=1n=1n=1. For every n∈Nn\in\mathbb Nn∈N, the vertex count is vn=mn+3n+2v_n=m_n+3n+2vn​=mn​+3n+2; write Vn={0,…,vn−1}V_n=\{0,\ldots,v_n-1\}Vn​={0,…,vn​−1} for the vertex index set. Thus vn>0v_n>0vn​>0 for every nnn, including v0=2v_0=2v0​=2. For every n,k∈Nn,k\in\mathbb Nn,k∈N, the vertex code is [k]n=k mod vn[k]_n=k\bmod v_n[k]n​=kmodvn​, interpreted as an element of Vn={0,…,vn−1}V_n=\{0,\ldots,v_n-1\}Vn​={0,…,vn​−1}. Every natural code is permitted and is reduced modulo the positive vertex count. For every n∈Nn\in\mathbb Nn∈N, the designated vertex sns_nsn​ is [mn+3n]n[m_n+3n]_n[mn​+3n]n​. For every n∈Nn\in\mathbb Nn∈N and vertex v∈Vnv\in V_nv∈Vn​, regarded as its natural index, define the natural priority πn(v)\pi_n(v)πn​(v) by these ordered cases: if v<mnv<m_nv<mn​, use 333 for row kinds a,b,ca,b,ca,b,c in Rn(v)R_n(v)Rn​(v) and use 555 for row kinds d,ed,ed,e; otherwise, if v<mn+nv<m_n+nv<mn​+n, use 666; otherwise, if v<mn+2nv<m_n+2nv<mn​+2n, use 2(v⊖(mn+n)+1)+72(v\ominus(m_n+n)+1)+72(v⊖(mn​+n)+1)+7; otherwise, if v<mn+3nv<m_n+3nv<mn​+3n, use 2(v⊖(mn+2n)+1)+82(v\ominus(m_n+2n)+1)+82(v⊖(mn​+2n)+1)+8; otherwise, if v=snv=s_nv=sn​, use 888; and in every remaining case use 111. No distinctness condition on these priority values is part of this definition.

parityGame. All indices and parameters described as natural numbers include zero. In the formulas below, a⊖b=max⁡(a−b,0)a\ominus b=\max(a-b,0)a⊖b=max(a−b,0) denotes subtraction in the natural numbers, ⌊a/b⌋\lfloor a/b\rfloor⌊a/b⌋ denotes natural-number division, and a mod ba\bmod bamodb denotes natural-number remainder. Boolean values are written 000 for false and 111 for true, and bˉ\bar bbˉ denotes their negation. A finite index set of size zero is empty. A rational matrix inverse is the total matrix inverse, which is the zero matrix when its determinant is zero; no nonzero-determinant condition is implicit in the notation. The type KKK consists of exactly five distinct constructors, denoted a,b,c,d,ea,b,c,d,ea,b,c,d,e, with decidable equality. For every n∈Nn\in\mathbb Nn∈N, the number of rows is mn=5(n⊖1)m_n=5(n\ominus1)mn​=5(n⊖1); write In={0,…,mn−1}I_n=\{0,\ldots,m_n-1\}In​={0,…,mn​−1} for its finite index set. Thus m0=m1=0m_0=m_1=0m0​=m1​=0. For every n∈Nn\in\mathbb Nn∈N and row index r∈In={0,…,mn−1}r\in I_n=\{0,\ldots,m_n-1\}r∈In​={0,…,mn​−1}, define its kind and level Rn(r)R_n(r)Rn​(r) by the following ordered cases: if r<n⊖1r<n\ominus1r<n⊖1, it is (a,r+2)(a,r+2)(a,r+2); otherwise, if r<(n⊖1)+(n⊖2)r<(n\ominus1)+(n\ominus2)r<(n⊖1)+(n⊖2), it is (b,r⊖(n⊖1)+2)(b,r\ominus(n\ominus1)+2)(b,r⊖(n⊖1)+2); otherwise, if r<2(n⊖1)+(n⊖2)r<2(n\ominus1)+(n\ominus2)r<2(n⊖1)+(n⊖2), it is (c,r⊖((n⊖1)+(n⊖2))+2)(c,r\ominus((n\ominus1)+(n\ominus2))+2)(c,r⊖((n⊖1)+(n⊖2))+2); otherwise, if r<3(n⊖1)+(n⊖2)r<3(n\ominus1)+(n\ominus2)r<3(n⊖1)+(n⊖2), it is (d,r⊖(2(n⊖1)+(n⊖2))+2)(d,r\ominus(2(n\ominus1)+(n\ominus2))+2)(d,r⊖(2(n⊖1)+(n⊖2))+2); otherwise it is (e,r⊖(3(n⊖1)+(n⊖2))+1)(e,r\ominus(3(n\ominus1)+(n\ominus2))+1)(e,r⊖(3(n⊖1)+(n⊖2))+1). There are no row indices when n=0n=0n=0 or n=1n=1n=1. A name is a triple v=(κ,i,b)v=(\kappa,i,b)v=(κ,i,b) with kind κ∈K\kappa\in Kκ∈K, level i∈Ni\in\mathbb Ni∈N, and Boolean value b∈{0,1}b\in\{0,1\}b∈{0,1}. There are no restrictions on the level or on combinations of fields. Equality of names is decidable. For every n∈Nn\in\mathbb Nn∈N, the vertex count is vn=mn+3n+2v_n=m_n+3n+2vn​=mn​+3n+2; write Vn={0,…,vn−1}V_n=\{0,\ldots,v_n-1\}Vn​={0,…,vn​−1} for the vertex index set. Thus vn>0v_n>0vn​>0 for every nnn, including v0=2v_0=2v0​=2. For every n,k∈Nn,k\in\mathbb Nn,k∈N, the vertex code is [k]n=k mod vn[k]_n=k\bmod v_n[k]n​=kmodvn​, interpreted as an element of Vn={0,…,vn−1}V_n=\{0,\ldots,v_n-1\}Vn​={0,…,vn​−1}. Every natural code is permitted and is reduced modulo the positive vertex count. For every n∈Nn\in\mathbb Nn∈N, the designated sink vertex is zn=[mn+3n+1]nz_n=[m_n+3n+1]_nzn​=[mn​+3n+1]n​. For every n,i∈Nn,i\in\mathbb Nn,i∈N, define gn,i=[mn+n+(i⊖1)]ng_{n,i}=[m_n+n+(i\ominus1)]_ngn,i​=[mn​+n+(i⊖1)]n​. In particular, i=0i=0i=0 and i=1i=1i=1 give the same value, and levels larger than nnn are still defined by the same remainder. For every n∈Nn\in\mathbb Nn∈N and pair (κ,i)∈K×N(\kappa,i)\in K\times\mathbb N(κ,i)∈K×N, define the natural-number row rank Qn(κ,i)Q_n(\kappa,i)Qn​(κ,i) by Qn(a,i)=i⊖2Q_n(a,i)=i\ominus2Qn​(a,i)=i⊖2, Qn(b,i)=(n⊖1)+(i⊖2)Q_n(b,i)=(n\ominus1)+(i\ominus2)Qn​(b,i)=(n⊖1)+(i⊖2), Qn(c,i)=(n⊖1)+(n⊖2)+(i⊖2)Q_n(c,i)=(n\ominus1)+(n\ominus2)+(i\ominus2)Qn​(c,i)=(n⊖1)+(n⊖2)+(i⊖2), Qn(d,i)=2(n⊖1)+(n⊖2)+(i⊖2)Q_n(d,i)=2(n\ominus1)+(n\ominus2)+(i\ominus2)Qn​(d,i)=2(n⊖1)+(n⊖2)+(i⊖2), and Qn(e,i)=3(n⊖1)+(n⊖2)+(i⊖1)Q_n(e,i)=3(n\ominus1)+(n\ominus2)+(i\ominus1)Qn​(e,i)=3(n⊖1)+(n⊖2)+(i⊖1). The input may have any level; the result has no imposed bound by the row count. For every n∈Nn\in\mathbb Nn∈N, every kind κ∈K\kappa\in Kκ∈K, and every level i∈Ni\in\mathbb Ni∈N, define dn,κ,id_{n,\kappa,i}dn,κ,i​ by the following ordered cases: if κ=a\kappa=aκ=a and i=n+1i=n+1i=n+1, use znz_nzn​; otherwise, if κ∈{b,c}\kappa\in\{b,c\}κ∈{b,c} and i=1i=1i=1, use gn,1g_{n,1}gn,1​; otherwise use [Qn(κ,i)]n[Q_n(\kappa,i)]_n[Qn​(κ,i)]n​. Thus arbitrary levels are allowed, with truncated subtraction and remainder in the last case. For every n,i∈Nn,i\in\mathbb Nn,i∈N, define fn,i=[mn+(i⊖1)]nf_{n,i}=[m_n+(i\ominus1)]_nfn,i​=[mn​+(i⊖1)]n​. In particular, i=0i=0i=0 and i=1i=1i=1 give the same value, and levels larger than nnn are still defined by the same remainder. For every n∈Nn\in\mathbb Nn∈N, the designated vertex sns_nsn​ is [mn+3n]n[m_n+3n]_n[mn​+3n]n​. For every n∈Nn\in\mathbb Nn∈N and every name (κ,i,b)(\kappa,i,b)(κ,i,b), its target tgt⁡n(κ,i,b)\operatorname{tgt}_n(\kappa,i,b)tgtn​(κ,i,b) is gn,ig_{n,i}gn,i​ when b=1b=1b=1 and κ∈{a,b,c}\kappa\in\{a,b,c\}κ∈{a,b,c}; dn,a,i+1d_{n,a,i+1}dn,a,i+1​ when (κ,b)=(a,0)(\kappa,b)=(a,0)(κ,b)=(a,0); dn,b,i⊖1d_{n,b,i\ominus1}dn,b,i⊖1​ when b=0b=0b=0 and κ∈{b,d}\kappa\in\{b,d\}κ∈{b,d}; dn,c,i⊖1d_{n,c,i\ominus1}dn,c,i⊖1​ when (κ,b)=(c,0)(\kappa,b)=(c,0)(κ,b)=(c,0); fn,if_{n,i}fn,i​ when b=1b=1b=1 and κ∈{d,e}\kappa\in\{d,e\}κ∈{d,e}; and sns_nsn​ when (κ,b)=(e,0)(\kappa,b)=(e,0)(κ,b)=(e,0). The definition is total for all names, including level zero. For every n,i∈Nn,i\in\mathbb Nn,i∈N, define hn,i=[mn+2n+(i⊖1)]nh_{n,i}=[m_n+2n+(i\ominus1)]_nhn,i​=[mn​+2n+(i⊖1)]n​. In particular, i=0i=0i=0 and i=1i=1i=1 give the same value, and levels larger than nnn are still defined by the same remainder. For every n∈Nn\in\mathbb Nn∈N and vertex v∈Vnv\in V_nv∈Vn​, regarding vvv as its natural index, the finite successor set En(v)E_n(v)En​(v) is given by these ordered cases. If v<mnv<m_nv<mn​, write (κ,i)=Rn(v)(\kappa,i)=R_n(v)(κ,i)=Rn​(v) and use {tgt⁡n(κ,i,0),tgt⁡n(κ,i,1)}\{\operatorname{tgt}_n(\kappa,i,0),\operatorname{tgt}_n(\kappa,i,1)\}{tgtn​(κ,i,0),tgtn​(κ,i,1)}. Otherwise, if v<mn+nv<m_n+nv<mn​+n, put i=v⊖mn+1i=v\ominus m_n+1i=v⊖mn​+1; if i=1i=1i=1 use {hn,i,dn,e,i}\{h_{n,i},d_{n,e,i}\}{hn,i​,dn,e,i​}, and otherwise use {hn,i,dn,d,i,dn,e,i}\{h_{n,i},d_{n,d,i},d_{n,e,i}\}{hn,i​,dn,d,i​,dn,e,i​}. Otherwise, if v<mn+2nv<m_n+2nv<mn​+2n, use {fn,v⊖(mn+n)+1}\{f_{n,v\ominus(m_n+n)+1}\}{fn,v⊖(mn​+n)+1​}. Otherwise, if v<mn+3nv<m_n+3nv<mn​+3n, use {dn,a,v⊖(mn+2n)+2}\{d_{n,a,v\ominus(m_n+2n)+2}\}{dn,a,v⊖(mn​+2n)+2​}. Otherwise, if v=snv=s_nv=sn​, use {dn,c,n}\{d_{n,c,n}\}{dn,c,n​}. In every remaining case use {zn}\{z_n\}{zn​}. These are finite sets, so any duplicate entries are identified. For every n∈Nn\in\mathbb Nn∈N and vertex v∈Vnv\in V_nv∈Vn​, regarded as its natural index, define the natural priority πn(v)\pi_n(v)πn​(v) by these ordered cases: if v<mnv<m_nv<mn​, use 333 for row kinds a,b,ca,b,ca,b,c in Rn(v)R_n(v)Rn​(v) and use 555 for row kinds d,ed,ed,e; otherwise, if v<mn+nv<m_n+nv<mn​+n, use 666; otherwise, if v<mn+2nv<m_n+2nv<mn​+2n, use 2(v⊖(mn+n)+1)+72(v\ominus(m_n+n)+1)+72(v⊖(mn​+n)+1)+7; otherwise, if v<mn+3nv<m_n+3nv<mn​+3n, use 2(v⊖(mn+2n)+1)+82(v\ominus(m_n+2n)+1)+82(v⊖(mn​+2n)+1)+8; otherwise, if v=snv=s_nv=sn​, use 888; and in every remaining case use 111. No distinctness condition on these priority values is part of this definition. For every n∈Nn\in\mathbb Nn∈N, define the finite game on VnV_nVn​ by assigning owner 111 to a vertex vvv exactly when mn≤vm_n\le vmn​≤v, and owner 000 otherwise, assigning priority πn(v)\pi_n(v)πn​(v), and declaring an edge from vvv to www exactly when w∈En(v)w\in E_n(v)w∈En​(v). The game data consist only of the owner function, natural priority function, and edge relation; no further game property is a field.

initialStrategy. All indices and parameters described as natural numbers include zero. In the formulas below, a⊖b=max⁡(a−b,0)a\ominus b=\max(a-b,0)a⊖b=max(a−b,0) denotes subtraction in the natural numbers, ⌊a/b⌋\lfloor a/b\rfloor⌊a/b⌋ denotes natural-number division, and a mod ba\bmod bamodb denotes natural-number remainder. Boolean values are written 000 for false and 111 for true, and bˉ\bar bbˉ denotes their negation. A finite index set of size zero is empty. A rational matrix inverse is the total matrix inverse, which is the zero matrix when its determinant is zero; no nonzero-determinant condition is implicit in the notation. The type KKK consists of exactly five distinct constructors, denoted a,b,c,d,ea,b,c,d,ea,b,c,d,e, with decidable equality. For every n∈Nn\in\mathbb Nn∈N, the number of rows is mn=5(n⊖1)m_n=5(n\ominus1)mn​=5(n⊖1); write In={0,…,mn−1}I_n=\{0,\ldots,m_n-1\}In​={0,…,mn​−1} for its finite index set. Thus m0=m1=0m_0=m_1=0m0​=m1​=0. For every n∈Nn\in\mathbb Nn∈N and row index r∈In={0,…,mn−1}r\in I_n=\{0,\ldots,m_n-1\}r∈In​={0,…,mn​−1}, define its kind and level Rn(r)R_n(r)Rn​(r) by the following ordered cases: if r<n⊖1r<n\ominus1r<n⊖1, it is (a,r+2)(a,r+2)(a,r+2); otherwise, if r<(n⊖1)+(n⊖2)r<(n\ominus1)+(n\ominus2)r<(n⊖1)+(n⊖2), it is (b,r⊖(n⊖1)+2)(b,r\ominus(n\ominus1)+2)(b,r⊖(n⊖1)+2); otherwise, if r<2(n⊖1)+(n⊖2)r<2(n\ominus1)+(n\ominus2)r<2(n⊖1)+(n⊖2), it is (c,r⊖((n⊖1)+(n⊖2))+2)(c,r\ominus((n\ominus1)+(n\ominus2))+2)(c,r⊖((n⊖1)+(n⊖2))+2); otherwise, if r<3(n⊖1)+(n⊖2)r<3(n\ominus1)+(n\ominus2)r<3(n⊖1)+(n⊖2), it is (d,r⊖(2(n⊖1)+(n⊖2))+2)(d,r\ominus(2(n\ominus1)+(n\ominus2))+2)(d,r⊖(2(n⊖1)+(n⊖2))+2); otherwise it is (e,r⊖(3(n⊖1)+(n⊖2))+1)(e,r\ominus(3(n\ominus1)+(n\ominus2))+1)(e,r⊖(3(n⊖1)+(n⊖2))+1). There are no row indices when n=0n=0n=0 or n=1n=1n=1. A name is a triple v=(κ,i,b)v=(\kappa,i,b)v=(κ,i,b) with kind κ∈K\kappa\in Kκ∈K, level i∈Ni\in\mathbb Ni∈N, and Boolean value b∈{0,1}b\in\{0,1\}b∈{0,1}. There are no restrictions on the level or on combinations of fields. Equality of names is decidable. For every n∈Nn\in\mathbb Nn∈N, the vertex count is vn=mn+3n+2v_n=m_n+3n+2vn​=mn​+3n+2; write Vn={0,…,vn−1}V_n=\{0,\ldots,v_n-1\}Vn​={0,…,vn​−1} for the vertex index set. Thus vn>0v_n>0vn​>0 for every nnn, including v0=2v_0=2v0​=2. For every n,k∈Nn,k\in\mathbb Nn,k∈N, the vertex code is [k]n=k mod vn[k]_n=k\bmod v_n[k]n​=kmodvn​, interpreted as an element of Vn={0,…,vn−1}V_n=\{0,\ldots,v_n-1\}Vn​={0,…,vn​−1}. Every natural code is permitted and is reduced modulo the positive vertex count. For every n∈Nn\in\mathbb Nn∈N, the designated sink vertex is zn=[mn+3n+1]nz_n=[m_n+3n+1]_nzn​=[mn​+3n+1]n​. For every n,i∈Nn,i\in\mathbb Nn,i∈N, define gn,i=[mn+n+(i⊖1)]ng_{n,i}=[m_n+n+(i\ominus1)]_ngn,i​=[mn​+n+(i⊖1)]n​. In particular, i=0i=0i=0 and i=1i=1i=1 give the same value, and levels larger than nnn are still defined by the same remainder. For every n∈Nn\in\mathbb Nn∈N and pair (κ,i)∈K×N(\kappa,i)\in K\times\mathbb N(κ,i)∈K×N, define the natural-number row rank Qn(κ,i)Q_n(\kappa,i)Qn​(κ,i) by Qn(a,i)=i⊖2Q_n(a,i)=i\ominus2Qn​(a,i)=i⊖2, Qn(b,i)=(n⊖1)+(i⊖2)Q_n(b,i)=(n\ominus1)+(i\ominus2)Qn​(b,i)=(n⊖1)+(i⊖2), Qn(c,i)=(n⊖1)+(n⊖2)+(i⊖2)Q_n(c,i)=(n\ominus1)+(n\ominus2)+(i\ominus2)Qn​(c,i)=(n⊖1)+(n⊖2)+(i⊖2), Qn(d,i)=2(n⊖1)+(n⊖2)+(i⊖2)Q_n(d,i)=2(n\ominus1)+(n\ominus2)+(i\ominus2)Qn​(d,i)=2(n⊖1)+(n⊖2)+(i⊖2), and Qn(e,i)=3(n⊖1)+(n⊖2)+(i⊖1)Q_n(e,i)=3(n\ominus1)+(n\ominus2)+(i\ominus1)Qn​(e,i)=3(n⊖1)+(n⊖2)+(i⊖1). The input may have any level; the result has no imposed bound by the row count. For every n∈Nn\in\mathbb Nn∈N, every kind κ∈K\kappa\in Kκ∈K, and every level i∈Ni\in\mathbb Ni∈N, define dn,κ,id_{n,\kappa,i}dn,κ,i​ by the following ordered cases: if κ=a\kappa=aκ=a and i=n+1i=n+1i=n+1, use znz_nzn​; otherwise, if κ∈{b,c}\kappa\in\{b,c\}κ∈{b,c} and i=1i=1i=1, use gn,1g_{n,1}gn,1​; otherwise use [Qn(κ,i)]n[Q_n(\kappa,i)]_n[Qn​(κ,i)]n​. Thus arbitrary levels are allowed, with truncated subtraction and remainder in the last case. For every n,i∈Nn,i\in\mathbb Nn,i∈N, define fn,i=[mn+(i⊖1)]nf_{n,i}=[m_n+(i\ominus1)]_nfn,i​=[mn​+(i⊖1)]n​. In particular, i=0i=0i=0 and i=1i=1i=1 give the same value, and levels larger than nnn are still defined by the same remainder. For every n∈Nn\in\mathbb Nn∈N, the designated vertex sns_nsn​ is [mn+3n]n[m_n+3n]_n[mn​+3n]n​. For every n∈Nn\in\mathbb Nn∈N and every name (κ,i,b)(\kappa,i,b)(κ,i,b), its target tgt⁡n(κ,i,b)\operatorname{tgt}_n(\kappa,i,b)tgtn​(κ,i,b) is gn,ig_{n,i}gn,i​ when b=1b=1b=1 and κ∈{a,b,c}\kappa\in\{a,b,c\}κ∈{a,b,c}; dn,a,i+1d_{n,a,i+1}dn,a,i+1​ when (κ,b)=(a,0)(\kappa,b)=(a,0)(κ,b)=(a,0); dn,b,i⊖1d_{n,b,i\ominus1}dn,b,i⊖1​ when b=0b=0b=0 and κ∈{b,d}\kappa\in\{b,d\}κ∈{b,d}; dn,c,i⊖1d_{n,c,i\ominus1}dn,c,i⊖1​ when (κ,b)=(c,0)(\kappa,b)=(c,0)(κ,b)=(c,0); fn,if_{n,i}fn,i​ when b=1b=1b=1 and κ∈{d,e}\kappa\in\{d,e\}κ∈{d,e}; and sns_nsn​ when (κ,b)=(e,0)(\kappa,b)=(e,0)(κ,b)=(e,0). The definition is total for all names, including level zero. For every pair (κ,i)∈K×N(\kappa,i)\in K\times\mathbb N(κ,i)∈K×N, define the Boolean b0(κ,i)b_0(\kappa,i)b0​(κ,i) to be 111 exactly when κ=d\kappa=dκ=d or both κ=e\kappa=eκ=e and i=1i=1i=1, and to be 000 otherwise. For every n∈Nn\in\mathbb Nn∈N, the initial strategy is a total function ηn:Vn→Vn\eta_n:V_n\to V_nηn​:Vn​→Vn​: for v<mnv<m_nv<mn​, write (κ,i)=Rn(v)(\kappa,i)=R_n(v)(κ,i)=Rn​(v) and put ηn(v)=tgt⁡n(κ,i,b0(κ,i))\eta_n(v)=\operatorname{tgt}_n(\kappa,i,b_0(\kappa,i))ηn​(v)=tgtn​(κ,i,b0​(κ,i)); for every other vvv, put ηn(v)=v\eta_n(v)=vηn​(v)=v. The definition does not restrict its input to vertices of one owner.

ParityState. All indices and parameters described as natural numbers include zero. In the formulas below, a⊖b=max⁡(a−b,0)a\ominus b=\max(a-b,0)a⊖b=max(a−b,0) denotes subtraction in the natural numbers, ⌊a/b⌋\lfloor a/b\rfloor⌊a/b⌋ denotes natural-number division, and a mod ba\bmod bamodb denotes natural-number remainder. Boolean values are written 000 for false and 111 for true, and bˉ\bar bbˉ denotes their negation. A finite index set of size zero is empty. A rational matrix inverse is the total matrix inverse, which is the zero matrix when its determinant is zero; no nonzero-determinant condition is implicit in the notation. For every n∈Nn\in\mathbb Nn∈N, the number of rows is mn=5(n⊖1)m_n=5(n\ominus1)mn​=5(n⊖1); write In={0,…,mn−1}I_n=\{0,\ldots,m_n-1\}In​={0,…,mn​−1} for its finite index set. Thus m0=m1=0m_0=m_1=0m0​=m1​=0. For every n∈Nn\in\mathbb Nn∈N, the vertex count is vn=mn+3n+2v_n=m_n+3n+2vn​=mn​+3n+2; write Vn={0,…,vn−1}V_n=\{0,\ldots,v_n-1\}Vn​={0,…,vn​−1} for the vertex index set. Thus vn>0v_n>0vn​>0 for every nnn, including v0=2v_0=2v0​=2. For every n∈Nn\in\mathbb Nn∈N, the number of columns is kn=10(n⊖1)k_n=10(n\ominus1)kn​=10(n⊖1); write Jn={0,…,kn−1}J_n=\{0,\ldots,k_n-1\}Jn​={0,…,kn​−1} for its finite index set. Thus k0=k1=0k_0=k_1=0k0​=k1​=0. For every n∈Nn\in\mathbb Nn∈N, a parity state is a pair (η,ℓ)(\eta,\ell)(η,ℓ) with an arbitrary function η:Vn→Vn\eta:V_n\to V_nη:Vn​→Vn​ and a last-column index ℓ∈Jn\ell\in J_nℓ∈Jn​. No legality condition is a field. There are no such states for n=0n=0n=0 or n=1n=1n=1, because the last-column set is empty.

initialParityState. All indices and parameters described as natural numbers include zero. In the formulas below, a⊖b=max⁡(a−b,0)a\ominus b=\max(a-b,0)a⊖b=max(a−b,0) denotes subtraction in the natural numbers, ⌊a/b⌋\lfloor a/b\rfloor⌊a/b⌋ denotes natural-number division, and a mod ba\bmod bamodb denotes natural-number remainder. Boolean values are written 000 for false and 111 for true, and bˉ\bar bbˉ denotes their negation. A finite index set of size zero is empty. A rational matrix inverse is the total matrix inverse, which is the zero matrix when its determinant is zero; no nonzero-determinant condition is implicit in the notation. For every n∈Nn\in\mathbb Nn∈N, the number of rows is mn=5(n⊖1)m_n=5(n\ominus1)mn​=5(n⊖1); write In={0,…,mn−1}I_n=\{0,\ldots,m_n-1\}In​={0,…,mn​−1} for its finite index set. Thus m0=m1=0m_0=m_1=0m0​=m1​=0. For every n∈Nn\in\mathbb Nn∈N, the vertex count is vn=mn+3n+2v_n=m_n+3n+2vn​=mn​+3n+2; write Vn={0,…,vn−1}V_n=\{0,\ldots,v_n-1\}Vn​={0,…,vn​−1} for the vertex index set. Thus vn>0v_n>0vn​>0 for every nnn, including v0=2v_0=2v0​=2. For every n∈Nn\in\mathbb Nn∈N, the number of columns is kn=10(n⊖1)k_n=10(n\ominus1)kn​=10(n⊖1); write Jn={0,…,kn−1}J_n=\{0,\ldots,k_n-1\}Jn​={0,…,kn​−1} for its finite index set. Thus k0=k1=0k_0=k_1=0k0​=k1​=0. For every n∈Nn\in\mathbb Nn∈N, a parity state is a pair (η,ℓ)(\eta,\ell)(η,ℓ) with an arbitrary function η:Vn→Vn\eta:V_n\to V_nη:Vn​→Vn​ and a last-column index ℓ∈Jn\ell\in J_nℓ∈Jn​. No legality condition is a field. There are no such states for n=0n=0n=0 or n=1n=1n=1, because the last-column set is empty. The type KKK consists of exactly five distinct constructors, denoted a,b,c,d,ea,b,c,d,ea,b,c,d,e, with decidable equality. For every n∈Nn\in\mathbb Nn∈N and row index r∈In={0,…,mn−1}r\in I_n=\{0,\ldots,m_n-1\}r∈In​={0,…,mn​−1}, define its kind and level Rn(r)R_n(r)Rn​(r) by the following ordered cases: if r<n⊖1r<n\ominus1r<n⊖1, it is (a,r+2)(a,r+2)(a,r+2); otherwise, if r<(n⊖1)+(n⊖2)r<(n\ominus1)+(n\ominus2)r<(n⊖1)+(n⊖2), it is (b,r⊖(n⊖1)+2)(b,r\ominus(n\ominus1)+2)(b,r⊖(n⊖1)+2); otherwise, if r<2(n⊖1)+(n⊖2)r<2(n\ominus1)+(n\ominus2)r<2(n⊖1)+(n⊖2), it is (c,r⊖((n⊖1)+(n⊖2))+2)(c,r\ominus((n\ominus1)+(n\ominus2))+2)(c,r⊖((n⊖1)+(n⊖2))+2); otherwise, if r<3(n⊖1)+(n⊖2)r<3(n\ominus1)+(n\ominus2)r<3(n⊖1)+(n⊖2), it is (d,r⊖(2(n⊖1)+(n⊖2))+2)(d,r\ominus(2(n\ominus1)+(n\ominus2))+2)(d,r⊖(2(n⊖1)+(n⊖2))+2); otherwise it is (e,r⊖(3(n⊖1)+(n⊖2))+1)(e,r\ominus(3(n\ominus1)+(n\ominus2))+1)(e,r⊖(3(n⊖1)+(n⊖2))+1). There are no row indices when n=0n=0n=0 or n=1n=1n=1. A name is a triple v=(κ,i,b)v=(\kappa,i,b)v=(κ,i,b) with kind κ∈K\kappa\in Kκ∈K, level i∈Ni\in\mathbb Ni∈N, and Boolean value b∈{0,1}b\in\{0,1\}b∈{0,1}. There are no restrictions on the level or on combinations of fields. Equality of names is decidable. For every n,k∈Nn,k\in\mathbb Nn,k∈N, the vertex code is [k]n=k mod vn[k]_n=k\bmod v_n[k]n​=kmodvn​, interpreted as an element of Vn={0,…,vn−1}V_n=\{0,\ldots,v_n-1\}Vn​={0,…,vn​−1}. Every natural code is permitted and is reduced modulo the positive vertex count. For every n∈Nn\in\mathbb Nn∈N, the designated sink vertex is zn=[mn+3n+1]nz_n=[m_n+3n+1]_nzn​=[mn​+3n+1]n​. For every n,i∈Nn,i\in\mathbb Nn,i∈N, define gn,i=[mn+n+(i⊖1)]ng_{n,i}=[m_n+n+(i\ominus1)]_ngn,i​=[mn​+n+(i⊖1)]n​. In particular, i=0i=0i=0 and i=1i=1i=1 give the same value, and levels larger than nnn are still defined by the same remainder. For every n∈Nn\in\mathbb Nn∈N and pair (κ,i)∈K×N(\kappa,i)\in K\times\mathbb N(κ,i)∈K×N, define the natural-number row rank Qn(κ,i)Q_n(\kappa,i)Qn​(κ,i) by Qn(a,i)=i⊖2Q_n(a,i)=i\ominus2Qn​(a,i)=i⊖2, Qn(b,i)=(n⊖1)+(i⊖2)Q_n(b,i)=(n\ominus1)+(i\ominus2)Qn​(b,i)=(n⊖1)+(i⊖2), Qn(c,i)=(n⊖1)+(n⊖2)+(i⊖2)Q_n(c,i)=(n\ominus1)+(n\ominus2)+(i\ominus2)Qn​(c,i)=(n⊖1)+(n⊖2)+(i⊖2), Qn(d,i)=2(n⊖1)+(n⊖2)+(i⊖2)Q_n(d,i)=2(n\ominus1)+(n\ominus2)+(i\ominus2)Qn​(d,i)=2(n⊖1)+(n⊖2)+(i⊖2), and Qn(e,i)=3(n⊖1)+(n⊖2)+(i⊖1)Q_n(e,i)=3(n\ominus1)+(n\ominus2)+(i\ominus1)Qn​(e,i)=3(n⊖1)+(n⊖2)+(i⊖1). The input may have any level; the result has no imposed bound by the row count. For every n∈Nn\in\mathbb Nn∈N, every kind κ∈K\kappa\in Kκ∈K, and every level i∈Ni\in\mathbb Ni∈N, define dn,κ,id_{n,\kappa,i}dn,κ,i​ by the following ordered cases: if κ=a\kappa=aκ=a and i=n+1i=n+1i=n+1, use znz_nzn​; otherwise, if κ∈{b,c}\kappa\in\{b,c\}κ∈{b,c} and i=1i=1i=1, use gn,1g_{n,1}gn,1​; otherwise use [Qn(κ,i)]n[Q_n(\kappa,i)]_n[Qn​(κ,i)]n​. Thus arbitrary levels are allowed, with truncated subtraction and remainder in the last case. For every n,i∈Nn,i\in\mathbb Nn,i∈N, define fn,i=[mn+(i⊖1)]nf_{n,i}=[m_n+(i\ominus1)]_nfn,i​=[mn​+(i⊖1)]n​. In particular, i=0i=0i=0 and i=1i=1i=1 give the same value, and levels larger than nnn are still defined by the same remainder. For every n∈Nn\in\mathbb Nn∈N, the designated vertex sns_nsn​ is [mn+3n]n[m_n+3n]_n[mn​+3n]n​. For every n∈Nn\in\mathbb Nn∈N and every name (κ,i,b)(\kappa,i,b)(κ,i,b), its target tgt⁡n(κ,i,b)\operatorname{tgt}_n(\kappa,i,b)tgtn​(κ,i,b) is gn,ig_{n,i}gn,i​ when b=1b=1b=1 and κ∈{a,b,c}\kappa\in\{a,b,c\}κ∈{a,b,c}; dn,a,i+1d_{n,a,i+1}dn,a,i+1​ when (κ,b)=(a,0)(\kappa,b)=(a,0)(κ,b)=(a,0); dn,b,i⊖1d_{n,b,i\ominus1}dn,b,i⊖1​ when b=0b=0b=0 and κ∈{b,d}\kappa\in\{b,d\}κ∈{b,d}; dn,c,i⊖1d_{n,c,i\ominus1}dn,c,i⊖1​ when (κ,b)=(c,0)(\kappa,b)=(c,0)(κ,b)=(c,0); fn,if_{n,i}fn,i​ when b=1b=1b=1 and κ∈{d,e}\kappa\in\{d,e\}κ∈{d,e}; and sns_nsn​ when (κ,b)=(e,0)(\kappa,b)=(e,0)(κ,b)=(e,0). The definition is total for all names, including level zero. For every pair (κ,i)∈K×N(\kappa,i)\in K\times\mathbb N(κ,i)∈K×N, define the Boolean b0(κ,i)b_0(\kappa,i)b0​(κ,i) to be 111 exactly when κ=d\kappa=dκ=d or both κ=e\kappa=eκ=e and i=1i=1i=1, and to be 000 otherwise. For every n∈Nn\in\mathbb Nn∈N, the initial strategy is a total function ηn:Vn→Vn\eta_n:V_n\to V_nηn​:Vn​→Vn​: for v<mnv<m_nv<mn​, write (κ,i)=Rn(v)(\kappa,i)=R_n(v)(κ,i)=Rn​(v) and put ηn(v)=tgt⁡n(κ,i,b0(κ,i))\eta_n(v)=\operatorname{tgt}_n(\kappa,i,b_0(\kappa,i))ηn​(v)=tgtn​(κ,i,b0​(κ,i)); for every other vvv, put ηn(v)=v\eta_n(v)=vηn​(v)=v. The definition does not restrict its input to vertices of one owner. For every n∈Nn\in\mathbb Nn∈N and every supplied proof of 3≤n3\le n3≤n, the initial parity state is (ηn,0)(\eta_n,0)(ηn​,0), with 0∈Jn0\in J_n0∈Jn​.

parityStep. All indices and parameters described as natural numbers include zero. In the formulas below, a⊖b=max⁡(a−b,0)a\ominus b=\max(a-b,0)a⊖b=max(a−b,0) denotes subtraction in the natural numbers, ⌊a/b⌋\lfloor a/b\rfloor⌊a/b⌋ denotes natural-number division, and a mod ba\bmod bamodb denotes natural-number remainder. Boolean values are written 000 for false and 111 for true, and bˉ\bar bbˉ denotes their negation. A finite index set of size zero is empty. A rational matrix inverse is the total matrix inverse, which is the zero matrix when its determinant is zero; no nonzero-determinant condition is implicit in the notation. For every n∈Nn\in\mathbb Nn∈N, the number of rows is mn=5(n⊖1)m_n=5(n\ominus1)mn​=5(n⊖1); write In={0,…,mn−1}I_n=\{0,\ldots,m_n-1\}In​={0,…,mn​−1} for its finite index set. Thus m0=m1=0m_0=m_1=0m0​=m1​=0. For every n∈Nn\in\mathbb Nn∈N, the vertex count is vn=mn+3n+2v_n=m_n+3n+2vn​=mn​+3n+2; write Vn={0,…,vn−1}V_n=\{0,\ldots,v_n-1\}Vn​={0,…,vn​−1} for the vertex index set. Thus vn>0v_n>0vn​>0 for every nnn, including v0=2v_0=2v0​=2. For every n∈Nn\in\mathbb Nn∈N, the number of columns is kn=10(n⊖1)k_n=10(n\ominus1)kn​=10(n⊖1); write Jn={0,…,kn−1}J_n=\{0,\ldots,k_n-1\}Jn​={0,…,kn​−1} for its finite index set. Thus k0=k1=0k_0=k_1=0k0​=k1​=0. For every n∈Nn\in\mathbb Nn∈N, a parity state is a pair (η,ℓ)(\eta,\ell)(η,ℓ) with an arbitrary function η:Vn→Vn\eta:V_n\to V_nη:Vn​→Vn​ and a last-column index ℓ∈Jn\ell\in J_nℓ∈Jn​. No legality condition is a field. There are no such states for n=0n=0n=0 or n=1n=1n=1, because the last-column set is empty. The type KKK consists of exactly five distinct constructors, denoted a,b,c,d,ea,b,c,d,ea,b,c,d,e, with decidable equality. A name is a triple v=(κ,i,b)v=(\kappa,i,b)v=(κ,i,b) with kind κ∈K\kappa\in Kκ∈K, level i∈Ni\in\mathbb Ni∈N, and Boolean value b∈{0,1}b\in\{0,1\}b∈{0,1}. There are no restrictions on the level or on combinations of fields. Equality of names is decidable. For every n∈Nn\in\mathbb Nn∈N and column index j∈Jn={0,…,kn−1}j\in J_n=\{0,\ldots,k_n-1\}j∈Jn​={0,…,kn​−1}, define the name Nn(j)N_n(j)Nn​(j) by the following ordered cases. If j=0j=0j=0, use (e,1,1)(e,1,1)(e,1,1). Otherwise, if j<4n⊖5j<4n\ominus5j<4n⊖5, put i=⌊(j⊖1)/4⌋+2i=\lfloor(j\ominus1)/4\rfloor+2i=⌊(j⊖1)/4⌋+2 and use respectively (d,i,0)(d,i,0)(d,i,0), (e,i,1)(e,i,1)(e,i,1), (b,i,1)(b,i,1)(b,i,1), or (b,i,0)(b,i,0)(b,i,0) according as (j⊖1) mod 4(j\ominus1)\bmod4(j⊖1)mod4 is 000, 111, 222, or anything else. Otherwise, if j<6n⊖7j<6n\ominus7j<6n⊖7, put u=j⊖(4n⊖5)u=j\ominus(4n\ominus5)u=j⊖(4n⊖5) and use (c,⌊u/2⌋+2,b)(c,\lfloor u/2\rfloor+2,b)(c,⌊u/2⌋+2,b), where b=1b=1b=1 exactly when u mod 2=1u\bmod2=1umod2=1. Otherwise, if j<7n⊖7j<7n\ominus7j<7n⊖7, use (e,j⊖(6n⊖7)+1,0)(e,j\ominus(6n\ominus7)+1,0)(e,j⊖(6n⊖7)+1,0). Otherwise, if j<8n⊖8j<8n\ominus8j<8n⊖8, use (d,j⊖(7n⊖7)+2,1)(d,j\ominus(7n\ominus7)+2,1)(d,j⊖(7n⊖7)+2,1). In the last case put u=j⊖(8n⊖8)u=j\ominus(8n\ominus8)u=j⊖(8n⊖8) and use (a,n⊖⌊u/2⌋,b)(a,n\ominus\lfloor u/2\rfloor,b)(a,n⊖⌊u/2⌋,b), where b=1b=1b=1 exactly when u mod 2=0u\bmod2=0umod2=0. There are no column indices when n=0n=0n=0 or n=1n=1n=1. For every n,k∈Nn,k\in\mathbb Nn,k∈N, the vertex code is [k]n=k mod vn[k]_n=k\bmod v_n[k]n​=kmodvn​, interpreted as an element of Vn={0,…,vn−1}V_n=\{0,\ldots,v_n-1\}Vn​={0,…,vn​−1}. Every natural code is permitted and is reduced modulo the positive vertex count. For every n∈Nn\in\mathbb Nn∈N, the designated sink vertex is zn=[mn+3n+1]nz_n=[m_n+3n+1]_nzn​=[mn​+3n+1]n​. For every n,i∈Nn,i\in\mathbb Nn,i∈N, define gn,i=[mn+n+(i⊖1)]ng_{n,i}=[m_n+n+(i\ominus1)]_ngn,i​=[mn​+n+(i⊖1)]n​. In particular, i=0i=0i=0 and i=1i=1i=1 give the same value, and levels larger than nnn are still defined by the same remainder. For every n∈Nn\in\mathbb Nn∈N and pair (κ,i)∈K×N(\kappa,i)\in K\times\mathbb N(κ,i)∈K×N, define the natural-number row rank Qn(κ,i)Q_n(\kappa,i)Qn​(κ,i) by Qn(a,i)=i⊖2Q_n(a,i)=i\ominus2Qn​(a,i)=i⊖2, Qn(b,i)=(n⊖1)+(i⊖2)Q_n(b,i)=(n\ominus1)+(i\ominus2)Qn​(b,i)=(n⊖1)+(i⊖2), Qn(c,i)=(n⊖1)+(n⊖2)+(i⊖2)Q_n(c,i)=(n\ominus1)+(n\ominus2)+(i\ominus2)Qn​(c,i)=(n⊖1)+(n⊖2)+(i⊖2), Qn(d,i)=2(n⊖1)+(n⊖2)+(i⊖2)Q_n(d,i)=2(n\ominus1)+(n\ominus2)+(i\ominus2)Qn​(d,i)=2(n⊖1)+(n⊖2)+(i⊖2), and Qn(e,i)=3(n⊖1)+(n⊖2)+(i⊖1)Q_n(e,i)=3(n\ominus1)+(n\ominus2)+(i\ominus1)Qn​(e,i)=3(n⊖1)+(n⊖2)+(i⊖1). The input may have any level; the result has no imposed bound by the row count. For every n∈Nn\in\mathbb Nn∈N, every kind κ∈K\kappa\in Kκ∈K, and every level i∈Ni\in\mathbb Ni∈N, define dn,κ,id_{n,\kappa,i}dn,κ,i​ by the following ordered cases: if κ=a\kappa=aκ=a and i=n+1i=n+1i=n+1, use znz_nzn​; otherwise, if κ∈{b,c}\kappa\in\{b,c\}κ∈{b,c} and i=1i=1i=1, use gn,1g_{n,1}gn,1​; otherwise use [Qn(κ,i)]n[Q_n(\kappa,i)]_n[Qn​(κ,i)]n​. Thus arbitrary levels are allowed, with truncated subtraction and remainder in the last case. For every n∈Nn\in\mathbb Nn∈N and column j∈Jnj\in J_nj∈Jn​, if Nn(j)=(κ,i,b)N_n(j)=(\kappa,i,b)Nn​(j)=(κ,i,b) then its source is src⁡n(j)=dn,κ,i\operatorname{src}_n(j)=d_{n,\kappa,i}srcn​(j)=dn,κ,i​. The Boolean component does not affect this source. For every n,i∈Nn,i\in\mathbb Nn,i∈N, define fn,i=[mn+(i⊖1)]nf_{n,i}=[m_n+(i\ominus1)]_nfn,i​=[mn​+(i⊖1)]n​. In particular, i=0i=0i=0 and i=1i=1i=1 give the same value, and levels larger than nnn are still defined by the same remainder. For every n∈Nn\in\mathbb Nn∈N, the designated vertex sns_nsn​ is [mn+3n]n[m_n+3n]_n[mn​+3n]n​. For every n∈Nn\in\mathbb Nn∈N and every name (κ,i,b)(\kappa,i,b)(κ,i,b), its target tgt⁡n(κ,i,b)\operatorname{tgt}_n(\kappa,i,b)tgtn​(κ,i,b) is gn,ig_{n,i}gn,i​ when b=1b=1b=1 and κ∈{a,b,c}\kappa\in\{a,b,c\}κ∈{a,b,c}; dn,a,i+1d_{n,a,i+1}dn,a,i+1​ when (κ,b)=(a,0)(\kappa,b)=(a,0)(κ,b)=(a,0); dn,b,i⊖1d_{n,b,i\ominus1}dn,b,i⊖1​ when b=0b=0b=0 and κ∈{b,d}\kappa\in\{b,d\}κ∈{b,d}; dn,c,i⊖1d_{n,c,i\ominus1}dn,c,i⊖1​ when (κ,b)=(c,0)(\kappa,b)=(c,0)(κ,b)=(c,0); fn,if_{n,i}fn,i​ when b=1b=1b=1 and κ∈{d,e}\kappa\in\{d,e\}κ∈{d,e}; and sns_nsn​ when (κ,b)=(e,0)(\kappa,b)=(e,0)(κ,b)=(e,0). The definition is total for all names, including level zero. For every n∈Nn\in\mathbb Nn∈N, the ordering equivalence on Jn={0,…,kn−1}J_n=\{0,\ldots,k_n-1\}Jn​={0,…,kn​−1} is the identity j↦jj\mapsto jj↦j, including the empty equivalence when n=0n=0n=0 or n=1n=1n=1. For last-column index ℓ∈Jn\ell\in J_nℓ∈Jn​ and candidate column j∈Jnj\in J_nj∈Jn​, the cyclic distance used here is Δn(ℓ,j)=(j+kn−ℓ) mod kn\Delta_n(\ell,j)=(j+k_n-\ell)\bmod k_nΔn​(ℓ,j)=(j+kn​−ℓ)modkn​. It is the specialization of the formula ((o(j))+kn−ℓ) mod kn((o(j))+k_n-\ell)\bmod k_n((o(j))+kn​−ℓ)modkn​ to the identity ordering ooo. Subtraction in the numerator is natural-number subtraction; it does not truncate for these indices because j+kn≥ℓj+k_n\ge\ellj+kn​≥ℓ. In particular Δn(ℓ,ℓ)=0\Delta_n(\ell,\ell)=0Δn​(ℓ,ℓ)=0 whenever such an index exists. For every n∈Nn\in\mathbb Nn∈N and row index r∈In={0,…,mn−1}r\in I_n=\{0,\ldots,m_n-1\}r∈In​={0,…,mn​−1}, define its kind and level Rn(r)R_n(r)Rn​(r) by the following ordered cases: if r<n⊖1r<n\ominus1r<n⊖1, it is (a,r+2)(a,r+2)(a,r+2); otherwise, if r<(n⊖1)+(n⊖2)r<(n\ominus1)+(n\ominus2)r<(n⊖1)+(n⊖2), it is (b,r⊖(n⊖1)+2)(b,r\ominus(n\ominus1)+2)(b,r⊖(n⊖1)+2); otherwise, if r<2(n⊖1)+(n⊖2)r<2(n\ominus1)+(n\ominus2)r<2(n⊖1)+(n⊖2), it is (c,r⊖((n⊖1)+(n⊖2))+2)(c,r\ominus((n\ominus1)+(n\ominus2))+2)(c,r⊖((n⊖1)+(n⊖2))+2); otherwise, if r<3(n⊖1)+(n⊖2)r<3(n\ominus1)+(n\ominus2)r<3(n⊖1)+(n⊖2), it is (d,r⊖(2(n⊖1)+(n⊖2))+2)(d,r\ominus(2(n\ominus1)+(n\ominus2))+2)(d,r⊖(2(n⊖1)+(n⊖2))+2); otherwise it is (e,r⊖(3(n⊖1)+(n⊖2))+1)(e,r\ominus(3(n\ominus1)+(n\ominus2))+1)(e,r⊖(3(n⊖1)+(n⊖2))+1). There are no row indices when n=0n=0n=0 or n=1n=1n=1. For every n,i∈Nn,i\in\mathbb Nn,i∈N, define hn,i=[mn+2n+(i⊖1)]nh_{n,i}=[m_n+2n+(i\ominus1)]_nhn,i​=[mn​+2n+(i⊖1)]n​. In particular, i=0i=0i=0 and i=1i=1i=1 give the same value, and levels larger than nnn are still defined by the same remainder. For every n∈Nn\in\mathbb Nn∈N and vertex v∈Vnv\in V_nv∈Vn​, regarding vvv as its natural index, the finite successor set En(v)E_n(v)En​(v) is given by these ordered cases. If v<mnv<m_nv<mn​, write (κ,i)=Rn(v)(\kappa,i)=R_n(v)(κ,i)=Rn​(v) and use {tgt⁡n(κ,i,0),tgt⁡n(κ,i,1)}\{\operatorname{tgt}_n(\kappa,i,0),\operatorname{tgt}_n(\kappa,i,1)\}{tgtn​(κ,i,0),tgtn​(κ,i,1)}. Otherwise, if v<mn+nv<m_n+nv<mn​+n, put i=v⊖mn+1i=v\ominus m_n+1i=v⊖mn​+1; if i=1i=1i=1 use {hn,i,dn,e,i}\{h_{n,i},d_{n,e,i}\}{hn,i​,dn,e,i​}, and otherwise use {hn,i,dn,d,i,dn,e,i}\{h_{n,i},d_{n,d,i},d_{n,e,i}\}{hn,i​,dn,d,i​,dn,e,i​}. Otherwise, if v<mn+2nv<m_n+2nv<mn​+2n, use {fn,v⊖(mn+n)+1}\{f_{n,v\ominus(m_n+n)+1}\}{fn,v⊖(mn​+n)+1​}. Otherwise, if v<mn+3nv<m_n+3nv<mn​+3n, use {dn,a,v⊖(mn+2n)+2}\{d_{n,a,v\ominus(m_n+2n)+2}\}{dn,a,v⊖(mn​+2n)+2​}. Otherwise, if v=snv=s_nv=sn​, use {dn,c,n}\{d_{n,c,n}\}{dn,c,n​}. In every remaining case use {zn}\{z_n\}{zn​}. These are finite sets, so any duplicate entries are identified. For every n∈Nn\in\mathbb Nn∈N and vertex v∈Vnv\in V_nv∈Vn​, regarded as its natural index, define the natural priority πn(v)\pi_n(v)πn​(v) by these ordered cases: if v<mnv<m_nv<mn​, use 333 for row kinds a,b,ca,b,ca,b,c in Rn(v)R_n(v)Rn​(v) and use 555 for row kinds d,ed,ed,e; otherwise, if v<mn+nv<m_n+nv<mn​+n, use 666; otherwise, if v<mn+2nv<m_n+2nv<mn​+2n, use 2(v⊖(mn+n)+1)+72(v\ominus(m_n+n)+1)+72(v⊖(mn​+n)+1)+7; otherwise, if v<mn+3nv<m_n+3nv<mn​+3n, use 2(v⊖(mn+2n)+1)+82(v\ominus(m_n+2n)+1)+82(v⊖(mn​+2n)+1)+8; otherwise, if v=snv=s_nv=sn​, use 888; and in every remaining case use 111. No distinctness condition on these priority values is part of this definition. For every n∈Nn\in\mathbb Nn∈N, define the finite game on VnV_nVn​ by assigning owner 111 to a vertex vvv exactly when mn≤vm_n\le vmn​≤v, and owner 000 otherwise, assigning priority πn(v)\pi_n(v)πn​(v), and declaring an edge from vvv to www exactly when w∈En(v)w\in E_n(v)w∈En​(v). The game data consist only of the owner function, natural priority function, and edge relation; no further game property is a field. For this game and any total functions η,θ:Vn→Vn\eta,\theta:V_n\to V_nη,θ:Vn​→Vn​, call θ\thetaθ legal for owner 111 if θ(v)∈En(v)\theta(v)\in E_n(v)θ(v)∈En​(v) for every vertex with owner 111; values at owner-000 vertices are unrestricted. Starting at any v∈Vnv\in V_nv∈Vn​, form the infinite play u0=vu_0=vu0​=v and ut+1=η(ut)u_{t+1}=\eta(u_t)ut+1​=η(ut​) when utu_tut​ has owner 000, or ut+1=θ(ut)u_{t+1}=\theta(u_t)ut+1​=θ(ut​) when it has owner 111. Let UUU be the set of vertices visited arbitrarily late: w∈Uw\in Uw∈U means that for every natural ttt there is k≥tk\ge tk≥t with uk=wu_k=wuk​=w. Let ppp be the supremum of the priorities of vertices in UUU, with supremum 000 for the empty set. Choose a vertex w∈Uw\in Uw∈U with priority ppp if one exists, and otherwise choose the starting vertex vvv. Let hhh be the least natural index with uh=wu_h=wuh​=w if such an index exists, and use h=0h=0h=0 otherwise. The play valuation is the triple (p,A,h)(p,A,h)(p,A,h), where A={ut:0≤t<h, p<πn(ut)}A=\{u_t:0\le t<h,\ p<\pi_n(u_t)\}A={ut​:0≤t<h, p<πn​(ut​)} is a finite set of vertices, not a list of visits. For a finite vertex set AAA and a natural priority qqq, let NA(q)=∣{v∈A:πn(v)=q}∣N_A(q)=|\{v\in A:\pi_n(v)=q\}|NA​(q)=∣{v∈A:πn​(v)=q}∣. Define A≺BA\prec BA≺B when there exists q∈Nq\in\mathbb Nq∈N with NA(q)≠NB(q)N_A(q)\ne N_B(q)NA​(q)=NB​(q), with NA(r)=NB(r)N_A(r)=N_B(r)NA​(r)=NB​(r) for every natural r>qr>qr>q, and with either qqq even and NA(q)<NB(q)N_A(q)<N_B(q)NA​(q)<NB​(q), or qqq odd and NB(q)<NA(q)N_B(q)<N_A(q)NB​(q)<NA​(q). Define count equivalence A∼BA\sim BA∼B by NA(q)=NB(q)N_A(q)=N_B(q)NA​(q)=NB​(q) for every natural qqq. Put ρ(p)=p\rho(p)=pρ(p)=p as an integer if ppp is even and ρ(p)=−p\rho(p)=-pρ(p)=−p if it is odd. For valuations a=(p,A,h)a=(p,A,h)a=(p,A,h) and b=(q,B,l)b=(q,B,l)b=(q,B,l), write a≺Gba\prec_G ba≺G​b exactly when ρ(p)<ρ(q)\rho(p)<\rho(q)ρ(p)<ρ(q), or p=qp=qp=q and A≺BA\prec BA≺B, or p=qp=qp=q, A∼BA\sim BA∼B, and either ppp odd with h<lh<lh<l or ppp even with l<hl<hl<h. Write a⪯Gba\preceq_G ba⪯G​b to mean ¬(b≺Ga)\neg(b\prec_G a)¬(b≺G​a). A minimum valuation for the function η\etaη at a starting vertex vvv is a valuation aaa that is the play valuation from vvv for at least one legal owner-111 function θ\thetaθ and satisfies a⪯Gba\preceq_G ba⪯G​b for the play valuation bbb of every legal owner-111 function θ\thetaθ. Define Wη(v)W_\eta(v)Wη​(v) by choosing such a minimum if any exists and using (0,∅,0)(0,\varnothing,0)(0,∅,0) if none exists. There is no separate legality hypothesis on η\etaη in these valuation definitions. Finally, a pair (v,w)(v,w)(v,w) is improving for η\etaη precisely when vvv has owner 000, w∈En(v)w\in E_n(v)w∈En​(v), and Wη(η(v))≺GWη(w)W_\eta(\eta(v))\prec_G W_\eta(w)Wη​(η(v))≺G​Wη​(w); the strategy is improvable precisely when at least one such pair of vertices exists. For every n∈Nn\in\mathbb Nn∈N and every two parity states (η,ℓ)(\eta,\ell)(η,ℓ) and (η′,ℓ′)(\eta^{\prime},\ell^{\prime})(η′,ℓ′), a parity step holds precisely when there exists a column j∈Jnj\in J_nj∈Jn​ such that (src⁡n(j),tgt⁡n(Nn(j)))(\operatorname{src}_n(j),\operatorname{tgt}_n(N_n(j)))(srcn​(j),tgtn​(Nn​(j))) is improving for η\etaη, for every column k∈Jnk\in J_nk∈Jn​ whose corresponding pair is improving one has Δn(ℓ,j)≤Δn(ℓ,k)\Delta_n(\ell,j)\le\Delta_n(\ell,k)Δn​(ℓ,j)≤Δn​(ℓ,k), the function η′\eta^{\prime}η′ sends src⁡n(j)\operatorname{src}_n(j)srcn​(j) to tgt⁡n(Nn(j))\operatorname{tgt}_n(N_n(j))tgtn​(Nn​(j)) and agrees with η\etaη at every other vertex, and ℓ′=j\ell^{\prime}=jℓ′=j. The minimum-distance condition is non-strict. No hypothesis 3≤n3\le n3≤n and no legality condition on either state is included in this step predicate; when n=0n=0n=0 or n=1n=1n=1 no parity states exist.

parityRun. All indices and parameters described as natural numbers include zero. In the formulas below, a⊖b=max⁡(a−b,0)a\ominus b=\max(a-b,0)a⊖b=max(a−b,0) denotes subtraction in the natural numbers, ⌊a/b⌋\lfloor a/b\rfloor⌊a/b⌋ denotes natural-number division, and a mod ba\bmod bamodb denotes natural-number remainder. Boolean values are written 000 for false and 111 for true, and bˉ\bar bbˉ denotes their negation. A finite index set of size zero is empty. A rational matrix inverse is the total matrix inverse, which is the zero matrix when its determinant is zero; no nonzero-determinant condition is implicit in the notation. For every n∈Nn\in\mathbb Nn∈N, the number of rows is mn=5(n⊖1)m_n=5(n\ominus1)mn​=5(n⊖1); write In={0,…,mn−1}I_n=\{0,\ldots,m_n-1\}In​={0,…,mn​−1} for its finite index set. Thus m0=m1=0m_0=m_1=0m0​=m1​=0. For every n∈Nn\in\mathbb Nn∈N, the vertex count is vn=mn+3n+2v_n=m_n+3n+2vn​=mn​+3n+2; write Vn={0,…,vn−1}V_n=\{0,\ldots,v_n-1\}Vn​={0,…,vn​−1} for the vertex index set. Thus vn>0v_n>0vn​>0 for every nnn, including v0=2v_0=2v0​=2. For every n∈Nn\in\mathbb Nn∈N, the number of columns is kn=10(n⊖1)k_n=10(n\ominus1)kn​=10(n⊖1); write Jn={0,…,kn−1}J_n=\{0,\ldots,k_n-1\}Jn​={0,…,kn​−1} for its finite index set. Thus k0=k1=0k_0=k_1=0k0​=k1​=0. For every n∈Nn\in\mathbb Nn∈N, a parity state is a pair (η,ℓ)(\eta,\ell)(η,ℓ) with an arbitrary function η:Vn→Vn\eta:V_n\to V_nη:Vn​→Vn​ and a last-column index ℓ∈Jn\ell\in J_nℓ∈Jn​. No legality condition is a field. There are no such states for n=0n=0n=0 or n=1n=1n=1, because the last-column set is empty. The type KKK consists of exactly five distinct constructors, denoted a,b,c,d,ea,b,c,d,ea,b,c,d,e, with decidable equality. A name is a triple v=(κ,i,b)v=(\kappa,i,b)v=(κ,i,b) with kind κ∈K\kappa\in Kκ∈K, level i∈Ni\in\mathbb Ni∈N, and Boolean value b∈{0,1}b\in\{0,1\}b∈{0,1}. There are no restrictions on the level or on combinations of fields. Equality of names is decidable. For every n∈Nn\in\mathbb Nn∈N and column index j∈Jn={0,…,kn−1}j\in J_n=\{0,\ldots,k_n-1\}j∈Jn​={0,…,kn​−1}, define the name Nn(j)N_n(j)Nn​(j) by the following ordered cases. If j=0j=0j=0, use (e,1,1)(e,1,1)(e,1,1). Otherwise, if j<4n⊖5j<4n\ominus5j<4n⊖5, put i=⌊(j⊖1)/4⌋+2i=\lfloor(j\ominus1)/4\rfloor+2i=⌊(j⊖1)/4⌋+2 and use respectively (d,i,0)(d,i,0)(d,i,0), (e,i,1)(e,i,1)(e,i,1), (b,i,1)(b,i,1)(b,i,1), or (b,i,0)(b,i,0)(b,i,0) according as (j⊖1) mod 4(j\ominus1)\bmod4(j⊖1)mod4 is 000, 111, 222, or anything else. Otherwise, if j<6n⊖7j<6n\ominus7j<6n⊖7, put u=j⊖(4n⊖5)u=j\ominus(4n\ominus5)u=j⊖(4n⊖5) and use (c,⌊u/2⌋+2,b)(c,\lfloor u/2\rfloor+2,b)(c,⌊u/2⌋+2,b), where b=1b=1b=1 exactly when u mod 2=1u\bmod2=1umod2=1. Otherwise, if j<7n⊖7j<7n\ominus7j<7n⊖7, use (e,j⊖(6n⊖7)+1,0)(e,j\ominus(6n\ominus7)+1,0)(e,j⊖(6n⊖7)+1,0). Otherwise, if j<8n⊖8j<8n\ominus8j<8n⊖8, use (d,j⊖(7n⊖7)+2,1)(d,j\ominus(7n\ominus7)+2,1)(d,j⊖(7n⊖7)+2,1). In the last case put u=j⊖(8n⊖8)u=j\ominus(8n\ominus8)u=j⊖(8n⊖8) and use (a,n⊖⌊u/2⌋,b)(a,n\ominus\lfloor u/2\rfloor,b)(a,n⊖⌊u/2⌋,b), where b=1b=1b=1 exactly when u mod 2=0u\bmod2=0umod2=0. There are no column indices when n=0n=0n=0 or n=1n=1n=1. For every n,k∈Nn,k\in\mathbb Nn,k∈N, the vertex code is [k]n=k mod vn[k]_n=k\bmod v_n[k]n​=kmodvn​, interpreted as an element of Vn={0,…,vn−1}V_n=\{0,\ldots,v_n-1\}Vn​={0,…,vn​−1}. Every natural code is permitted and is reduced modulo the positive vertex count. For every n∈Nn\in\mathbb Nn∈N, the designated sink vertex is zn=[mn+3n+1]nz_n=[m_n+3n+1]_nzn​=[mn​+3n+1]n​. For every n,i∈Nn,i\in\mathbb Nn,i∈N, define gn,i=[mn+n+(i⊖1)]ng_{n,i}=[m_n+n+(i\ominus1)]_ngn,i​=[mn​+n+(i⊖1)]n​. In particular, i=0i=0i=0 and i=1i=1i=1 give the same value, and levels larger than nnn are still defined by the same remainder. For every n∈Nn\in\mathbb Nn∈N and pair (κ,i)∈K×N(\kappa,i)\in K\times\mathbb N(κ,i)∈K×N, define the natural-number row rank Qn(κ,i)Q_n(\kappa,i)Qn​(κ,i) by Qn(a,i)=i⊖2Q_n(a,i)=i\ominus2Qn​(a,i)=i⊖2, Qn(b,i)=(n⊖1)+(i⊖2)Q_n(b,i)=(n\ominus1)+(i\ominus2)Qn​(b,i)=(n⊖1)+(i⊖2), Qn(c,i)=(n⊖1)+(n⊖2)+(i⊖2)Q_n(c,i)=(n\ominus1)+(n\ominus2)+(i\ominus2)Qn​(c,i)=(n⊖1)+(n⊖2)+(i⊖2), Qn(d,i)=2(n⊖1)+(n⊖2)+(i⊖2)Q_n(d,i)=2(n\ominus1)+(n\ominus2)+(i\ominus2)Qn​(d,i)=2(n⊖1)+(n⊖2)+(i⊖2), and Qn(e,i)=3(n⊖1)+(n⊖2)+(i⊖1)Q_n(e,i)=3(n\ominus1)+(n\ominus2)+(i\ominus1)Qn​(e,i)=3(n⊖1)+(n⊖2)+(i⊖1). The input may have any level; the result has no imposed bound by the row count. For every n∈Nn\in\mathbb Nn∈N, every kind κ∈K\kappa\in Kκ∈K, and every level i∈Ni\in\mathbb Ni∈N, define dn,κ,id_{n,\kappa,i}dn,κ,i​ by the following ordered cases: if κ=a\kappa=aκ=a and i=n+1i=n+1i=n+1, use znz_nzn​; otherwise, if κ∈{b,c}\kappa\in\{b,c\}κ∈{b,c} and i=1i=1i=1, use gn,1g_{n,1}gn,1​; otherwise use [Qn(κ,i)]n[Q_n(\kappa,i)]_n[Qn​(κ,i)]n​. Thus arbitrary levels are allowed, with truncated subtraction and remainder in the last case. For every n∈Nn\in\mathbb Nn∈N and column j∈Jnj\in J_nj∈Jn​, if Nn(j)=(κ,i,b)N_n(j)=(\kappa,i,b)Nn​(j)=(κ,i,b) then its source is src⁡n(j)=dn,κ,i\operatorname{src}_n(j)=d_{n,\kappa,i}srcn​(j)=dn,κ,i​. The Boolean component does not affect this source. For every n,i∈Nn,i\in\mathbb Nn,i∈N, define fn,i=[mn+(i⊖1)]nf_{n,i}=[m_n+(i\ominus1)]_nfn,i​=[mn​+(i⊖1)]n​. In particular, i=0i=0i=0 and i=1i=1i=1 give the same value, and levels larger than nnn are still defined by the same remainder. For every n∈Nn\in\mathbb Nn∈N, the designated vertex sns_nsn​ is [mn+3n]n[m_n+3n]_n[mn​+3n]n​. For every n∈Nn\in\mathbb Nn∈N and every name (κ,i,b)(\kappa,i,b)(κ,i,b), its target tgt⁡n(κ,i,b)\operatorname{tgt}_n(\kappa,i,b)tgtn​(κ,i,b) is gn,ig_{n,i}gn,i​ when b=1b=1b=1 and κ∈{a,b,c}\kappa\in\{a,b,c\}κ∈{a,b,c}; dn,a,i+1d_{n,a,i+1}dn,a,i+1​ when (κ,b)=(a,0)(\kappa,b)=(a,0)(κ,b)=(a,0); dn,b,i⊖1d_{n,b,i\ominus1}dn,b,i⊖1​ when b=0b=0b=0 and κ∈{b,d}\kappa\in\{b,d\}κ∈{b,d}; dn,c,i⊖1d_{n,c,i\ominus1}dn,c,i⊖1​ when (κ,b)=(c,0)(\kappa,b)=(c,0)(κ,b)=(c,0); fn,if_{n,i}fn,i​ when b=1b=1b=1 and κ∈{d,e}\kappa\in\{d,e\}κ∈{d,e}; and sns_nsn​ when (κ,b)=(e,0)(\kappa,b)=(e,0)(κ,b)=(e,0). The definition is total for all names, including level zero. For every n∈Nn\in\mathbb Nn∈N, the ordering equivalence on Jn={0,…,kn−1}J_n=\{0,\ldots,k_n-1\}Jn​={0,…,kn​−1} is the identity j↦jj\mapsto jj↦j, including the empty equivalence when n=0n=0n=0 or n=1n=1n=1. For last-column index ℓ∈Jn\ell\in J_nℓ∈Jn​ and candidate column j∈Jnj\in J_nj∈Jn​, the cyclic distance used here is Δn(ℓ,j)=(j+kn−ℓ) mod kn\Delta_n(\ell,j)=(j+k_n-\ell)\bmod k_nΔn​(ℓ,j)=(j+kn​−ℓ)modkn​. It is the specialization of the formula ((o(j))+kn−ℓ) mod kn((o(j))+k_n-\ell)\bmod k_n((o(j))+kn​−ℓ)modkn​ to the identity ordering ooo. Subtraction in the numerator is natural-number subtraction; it does not truncate for these indices because j+kn≥ℓj+k_n\ge\ellj+kn​≥ℓ. In particular Δn(ℓ,ℓ)=0\Delta_n(\ell,\ell)=0Δn​(ℓ,ℓ)=0 whenever such an index exists. For every n∈Nn\in\mathbb Nn∈N and row index r∈In={0,…,mn−1}r\in I_n=\{0,\ldots,m_n-1\}r∈In​={0,…,mn​−1}, define its kind and level Rn(r)R_n(r)Rn​(r) by the following ordered cases: if r<n⊖1r<n\ominus1r<n⊖1, it is (a,r+2)(a,r+2)(a,r+2); otherwise, if r<(n⊖1)+(n⊖2)r<(n\ominus1)+(n\ominus2)r<(n⊖1)+(n⊖2), it is (b,r⊖(n⊖1)+2)(b,r\ominus(n\ominus1)+2)(b,r⊖(n⊖1)+2); otherwise, if r<2(n⊖1)+(n⊖2)r<2(n\ominus1)+(n\ominus2)r<2(n⊖1)+(n⊖2), it is (c,r⊖((n⊖1)+(n⊖2))+2)(c,r\ominus((n\ominus1)+(n\ominus2))+2)(c,r⊖((n⊖1)+(n⊖2))+2); otherwise, if r<3(n⊖1)+(n⊖2)r<3(n\ominus1)+(n\ominus2)r<3(n⊖1)+(n⊖2), it is (d,r⊖(2(n⊖1)+(n⊖2))+2)(d,r\ominus(2(n\ominus1)+(n\ominus2))+2)(d,r⊖(2(n⊖1)+(n⊖2))+2); otherwise it is (e,r⊖(3(n⊖1)+(n⊖2))+1)(e,r\ominus(3(n\ominus1)+(n\ominus2))+1)(e,r⊖(3(n⊖1)+(n⊖2))+1). There are no row indices when n=0n=0n=0 or n=1n=1n=1. For every n,i∈Nn,i\in\mathbb Nn,i∈N, define hn,i=[mn+2n+(i⊖1)]nh_{n,i}=[m_n+2n+(i\ominus1)]_nhn,i​=[mn​+2n+(i⊖1)]n​. In particular, i=0i=0i=0 and i=1i=1i=1 give the same value, and levels larger than nnn are still defined by the same remainder. For every n∈Nn\in\mathbb Nn∈N and vertex v∈Vnv\in V_nv∈Vn​, regarding vvv as its natural index, the finite successor set En(v)E_n(v)En​(v) is given by these ordered cases. If v<mnv<m_nv<mn​, write (κ,i)=Rn(v)(\kappa,i)=R_n(v)(κ,i)=Rn​(v) and use {tgt⁡n(κ,i,0),tgt⁡n(κ,i,1)}\{\operatorname{tgt}_n(\kappa,i,0),\operatorname{tgt}_n(\kappa,i,1)\}{tgtn​(κ,i,0),tgtn​(κ,i,1)}. Otherwise, if v<mn+nv<m_n+nv<mn​+n, put i=v⊖mn+1i=v\ominus m_n+1i=v⊖mn​+1; if i=1i=1i=1 use {hn,i,dn,e,i}\{h_{n,i},d_{n,e,i}\}{hn,i​,dn,e,i​}, and otherwise use {hn,i,dn,d,i,dn,e,i}\{h_{n,i},d_{n,d,i},d_{n,e,i}\}{hn,i​,dn,d,i​,dn,e,i​}. Otherwise, if v<mn+2nv<m_n+2nv<mn​+2n, use {fn,v⊖(mn+n)+1}\{f_{n,v\ominus(m_n+n)+1}\}{fn,v⊖(mn​+n)+1​}. Otherwise, if v<mn+3nv<m_n+3nv<mn​+3n, use {dn,a,v⊖(mn+2n)+2}\{d_{n,a,v\ominus(m_n+2n)+2}\}{dn,a,v⊖(mn​+2n)+2​}. Otherwise, if v=snv=s_nv=sn​, use {dn,c,n}\{d_{n,c,n}\}{dn,c,n​}. In every remaining case use {zn}\{z_n\}{zn​}. These are finite sets, so any duplicate entries are identified. For every n∈Nn\in\mathbb Nn∈N and vertex v∈Vnv\in V_nv∈Vn​, regarded as its natural index, define the natural priority πn(v)\pi_n(v)πn​(v) by these ordered cases: if v<mnv<m_nv<mn​, use 333 for row kinds a,b,ca,b,ca,b,c in Rn(v)R_n(v)Rn​(v) and use 555 for row kinds d,ed,ed,e; otherwise, if v<mn+nv<m_n+nv<mn​+n, use 666; otherwise, if v<mn+2nv<m_n+2nv<mn​+2n, use 2(v⊖(mn+n)+1)+72(v\ominus(m_n+n)+1)+72(v⊖(mn​+n)+1)+7; otherwise, if v<mn+3nv<m_n+3nv<mn​+3n, use 2(v⊖(mn+2n)+1)+82(v\ominus(m_n+2n)+1)+82(v⊖(mn​+2n)+1)+8; otherwise, if v=snv=s_nv=sn​, use 888; and in every remaining case use 111. No distinctness condition on these priority values is part of this definition. For every n∈Nn\in\mathbb Nn∈N, define the finite game on VnV_nVn​ by assigning owner 111 to a vertex vvv exactly when mn≤vm_n\le vmn​≤v, and owner 000 otherwise, assigning priority πn(v)\pi_n(v)πn​(v), and declaring an edge from vvv to www exactly when w∈En(v)w\in E_n(v)w∈En​(v). The game data consist only of the owner function, natural priority function, and edge relation; no further game property is a field. For this game and any total functions η,θ:Vn→Vn\eta,\theta:V_n\to V_nη,θ:Vn​→Vn​, call θ\thetaθ legal for owner 111 if θ(v)∈En(v)\theta(v)\in E_n(v)θ(v)∈En​(v) for every vertex with owner 111; values at owner-000 vertices are unrestricted. Starting at any v∈Vnv\in V_nv∈Vn​, form the infinite play u0=vu_0=vu0​=v and ut+1=η(ut)u_{t+1}=\eta(u_t)ut+1​=η(ut​) when utu_tut​ has owner 000, or ut+1=θ(ut)u_{t+1}=\theta(u_t)ut+1​=θ(ut​) when it has owner 111. Let UUU be the set of vertices visited arbitrarily late: w∈Uw\in Uw∈U means that for every natural ttt there is k≥tk\ge tk≥t with uk=wu_k=wuk​=w. Let ppp be the supremum of the priorities of vertices in UUU, with supremum 000 for the empty set. Choose a vertex w∈Uw\in Uw∈U with priority ppp if one exists, and otherwise choose the starting vertex vvv. Let hhh be the least natural index with uh=wu_h=wuh​=w if such an index exists, and use h=0h=0h=0 otherwise. The play valuation is the triple (p,A,h)(p,A,h)(p,A,h), where A={ut:0≤t<h, p<πn(ut)}A=\{u_t:0\le t<h,\ p<\pi_n(u_t)\}A={ut​:0≤t<h, p<πn​(ut​)} is a finite set of vertices, not a list of visits. For a finite vertex set AAA and a natural priority qqq, let NA(q)=∣{v∈A:πn(v)=q}∣N_A(q)=|\{v\in A:\pi_n(v)=q\}|NA​(q)=∣{v∈A:πn​(v)=q}∣. Define A≺BA\prec BA≺B when there exists q∈Nq\in\mathbb Nq∈N with NA(q)≠NB(q)N_A(q)\ne N_B(q)NA​(q)=NB​(q), with NA(r)=NB(r)N_A(r)=N_B(r)NA​(r)=NB​(r) for every natural r>qr>qr>q, and with either qqq even and NA(q)<NB(q)N_A(q)<N_B(q)NA​(q)<NB​(q), or qqq odd and NB(q)<NA(q)N_B(q)<N_A(q)NB​(q)<NA​(q). Define count equivalence A∼BA\sim BA∼B by NA(q)=NB(q)N_A(q)=N_B(q)NA​(q)=NB​(q) for every natural qqq. Put ρ(p)=p\rho(p)=pρ(p)=p as an integer if ppp is even and ρ(p)=−p\rho(p)=-pρ(p)=−p if it is odd. For valuations a=(p,A,h)a=(p,A,h)a=(p,A,h) and b=(q,B,l)b=(q,B,l)b=(q,B,l), write a≺Gba\prec_G ba≺G​b exactly when ρ(p)<ρ(q)\rho(p)<\rho(q)ρ(p)<ρ(q), or p=qp=qp=q and A≺BA\prec BA≺B, or p=qp=qp=q, A∼BA\sim BA∼B, and either ppp odd with h<lh<lh<l or ppp even with l<hl<hl<h. Write a⪯Gba\preceq_G ba⪯G​b to mean ¬(b≺Ga)\neg(b\prec_G a)¬(b≺G​a). A minimum valuation for the function η\etaη at a starting vertex vvv is a valuation aaa that is the play valuation from vvv for at least one legal owner-111 function θ\thetaθ and satisfies a⪯Gba\preceq_G ba⪯G​b for the play valuation bbb of every legal owner-111 function θ\thetaθ. Define Wη(v)W_\eta(v)Wη​(v) by choosing such a minimum if any exists and using (0,∅,0)(0,\varnothing,0)(0,∅,0) if none exists. There is no separate legality hypothesis on η\etaη in these valuation definitions. Finally, a pair (v,w)(v,w)(v,w) is improving for η\etaη precisely when vvv has owner 000, w∈En(v)w\in E_n(v)w∈En​(v), and Wη(η(v))≺GWη(w)W_\eta(\eta(v))\prec_G W_\eta(w)Wη​(η(v))≺G​Wη​(w); the strategy is improvable precisely when at least one such pair of vertices exists. For every n∈Nn\in\mathbb Nn∈N and every two parity states (η,ℓ)(\eta,\ell)(η,ℓ) and (η′,ℓ′)(\eta^{\prime},\ell^{\prime})(η′,ℓ′), a parity step holds precisely when there exists a column j∈Jnj\in J_nj∈Jn​ such that (src⁡n(j),tgt⁡n(Nn(j)))(\operatorname{src}_n(j),\operatorname{tgt}_n(N_n(j)))(srcn​(j),tgtn​(Nn​(j))) is improving for η\etaη, for every column k∈Jnk\in J_nk∈Jn​ whose corresponding pair is improving one has Δn(ℓ,j)≤Δn(ℓ,k)\Delta_n(\ell,j)\le\Delta_n(\ell,k)Δn​(ℓ,j)≤Δn​(ℓ,k), the function η′\eta^{\prime}η′ sends src⁡n(j)\operatorname{src}_n(j)srcn​(j) to tgt⁡n(Nn(j))\operatorname{tgt}_n(N_n(j))tgtn​(Nn​(j)) and agrees with η\etaη at every other vertex, and ℓ′=j\ell^{\prime}=jℓ′=j. The minimum-distance condition is non-strict. No hypothesis 3≤n3\le n3≤n and no legality condition on either state is included in this step predicate; when n=0n=0n=0 or n=1n=1n=1 no parity states exist. For every pair (κ,i)∈K×N(\kappa,i)\in K\times\mathbb N(κ,i)∈K×N, define the Boolean b0(κ,i)b_0(\kappa,i)b0​(κ,i) to be 111 exactly when κ=d\kappa=dκ=d or both κ=e\kappa=eκ=e and i=1i=1i=1, and to be 000 otherwise. For every n∈Nn\in\mathbb Nn∈N, the initial strategy is a total function ηn:Vn→Vn\eta_n:V_n\to V_nηn​:Vn​→Vn​: for v<mnv<m_nv<mn​, write (κ,i)=Rn(v)(\kappa,i)=R_n(v)(κ,i)=Rn​(v) and put ηn(v)=tgt⁡n(κ,i,b0(κ,i))\eta_n(v)=\operatorname{tgt}_n(\kappa,i,b_0(\kappa,i))ηn​(v)=tgtn​(κ,i,b0​(κ,i)); for every other vvv, put ηn(v)=v\eta_n(v)=vηn​(v)=v. The definition does not restrict its input to vertices of one owner. For every n∈Nn\in\mathbb Nn∈N and every supplied proof of 3≤n3\le n3≤n, the initial parity state is (ηn,0)(\eta_n,0)(ηn​,0), with 0∈Jn0\in J_n0∈Jn​. For every n∈Nn\in\mathbb Nn∈N, every supplied proof of 3≤n3\le n3≤n, every sequence s:N→ParityState(n)s:\mathbb N\to\mathrm{ParityState}(n)s:N→ParityState(n), and every natural TTT, a parity run holds exactly when s(0)=(ηn,0)s(0)=(\eta_n,0)s(0)=(ηn​,0), for every natural t≤Tt\le Tt≤T the strategy ηt\eta_tηt​ in s(t)s(t)s(t) satisfies ηt(v)∈En(v)\eta_t(v)\in E_n(v)ηt​(v)∈En​(v) for every owner-000 vertex vvv, for every natural t<Tt<Tt<T there is a parity step from s(t)s(t)s(t) to s(t+1)s(t+1)s(t+1), and the strategy in s(T)s(T)s(T) has no improving pair (v,w)(v,w)(v,w) among any vertices of VnV_nVn​. The final condition quantifies over all vertex pairs, not just column labels. The definition permits T=0T=0T=0 if the initial strategy is legal for owner 000 and has no improving pair; it imposes no condition on s(t)s(t)s(t) for t>Tt>Tt>T.

Human review
  • Endorsed by Shuze Chen · Nov 3, 2026

    Confirmed by the moderator at approval.

  • Endorsed by kmehltretter82 · Nov 3, 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 paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me