NIM paper · interactive edition Interactive edition · paper, explanations and Lean proofs.

Section 5.4, paragraph 3With arbitrary start positions, one rollout of π₀ on the boards of k-th bits returns σ_k(P)

Checked theorem Lean checks a formal statement corresponding to this claim.

1 Paper text

Allowing arbitrary start positions would defeat the single-channel restriction: querying π0\pi_0 on heaps consisting of the kkth bits of PP returns σk(P)\sigma_k(P). Likewise, an unrestricted sequential controller could compute the nim-sum itself. The lower bound therefore concerns the stated measurement/readout model, not general MCTS or all single-policy algorithms.

Generated from paper_jmlr.tex, lines 646–646.

2 Explain this

If the planner could start rollouts anywhere, the restriction would be meaningless. Example: build the board whose heaps are the kk-th bits of the heaps of PP (each heap becomes 00 or 11). A rollout of π0\pi_0 on it removes one stone per move, so the outcome is the parity of the number of ones, which is bit kk of the nim-sum of PP. Doing this for each kk recovers the whole nim-sum with one policy. So the lower bound must restrict queries.

3 How this is formalised

Misc.bitBoard_query: one rollout of π0\pi_0 on the board of kk-th bits of PP returns σk(P)\sigma_k(P); Misc.nimSum_bitBoard is the underlying identity (the low bit of that board's nim-sum is bit kk of nim⁡(P)\operatorname{nim}(P)).

Coverage record
Paper anchorsec:search-gap-p3 (website anchor; the manuscript has no label here)
Displayed asSection 5.4, paragraph 3
ClaimWith arbitrary start positions, one rollout of π₀ on the boards of k-th bits returns σ_k(P)
Coverage categoryChecked theorem
Statement sourcepaper_jmlr.tex lines 646–646; SHA-256 of the normalised block source 66e6302b0b41babe…
Lean declarations
Depends onDefinition 5.7
Explanationsexplain/c-arbitrary-starts, formal/c-arbitrary-starts
Build evidencefresh isolated rebuild, audit report

4 Lean statement and source

Principal declarations

theorem Misc.bitBoard_query

Module Misc (lean/phase6/Misc.lean, lines 843–847) · file SHA-256 07766c03566dbfca… Axioms reported by the fresh build: propext, Quot.sound

WHY ARBITRARY START POSITIONS ARE EXCLUDED (Definition def:agent-types): a single rollout of π₀ on the board whose heaps are the k-th bits of P returns σ_k(P).

Statement as elaborated and printed by Lean 4.26.0

∀ (k : ℕ) (P : List ℕ),
  NimAudit.Game.rolloutWinner 0 (List.map (fun h => if h.testBit k = true then 1 else 0) P) =
    (NimAudit.nimSum P).testBit k
Exact source text, lines 843–847
843/-- WHY ARBITRARY START POSITIONS ARE EXCLUDED (Definition def:agent-types): a single844    rollout of π₀ on the board whose heaps are the k-th bits of P returns σ_k(P). -/845theorem bitBoard_query (k : Nat) (P : List Nat) :846    rolloutWinner 0 (P.map (fun h => if h.testBit k then 1 else 0)) = (nimSum P).testBit k := by847  rw [rolloutWinner_channel]; simp only [channel, if_true]; exact nimSum_bitBoard k P

Project declarations in the statement: Game.rolloutWinner, nimSum

Project declarations used by the proof or definition body

Game.rolloutWinner, Game.rolloutWinner_channel, Misc.nimSum_bitBoard, channel, nimSum

theorem Misc.nimSum_bitBoard

Module Misc (lean/phase6/Misc.lean, lines 834–841) · file SHA-256 07766c03566dbfca… Axioms reported by the fresh build: propext, Quot.sound

Statement as elaborated and printed by Lean 4.26.0

∀ (k : ℕ) (P : List ℕ),
  (NimAudit.nimSum (List.map (fun h => if h.testBit k = true then 1 else 0) P)).testBit 0 =
    (NimAudit.nimSum P).testBit k
Exact source text, lines 834–841
834theorem nimSum_bitBoard (k : Nat) : ∀ P : List Nat,835    (nimSum (P.map (fun h => if h.testBit k then 1 else 0))).testBit 0 = (nimSum P).testBit k836  | [] => by simp [nimSum]837  | h :: P => by838    have ih := nimSum_bitBoard k P839    simp only [List.map_cons, nimSum] at ih ⊢840    rw [Nat.testBit_xor, Nat.testBit_xor, ih]841    by_cases hb : h.testBit k <;> simp [hb]

Project declarations in the statement: nimSum

Project declarations used by the proof or definition body

nimSum

Definitions these statements use

def Game.rolloutWinner

Module NimGame (lean/phase2/NimGame.lean, lines 142–152) · file SHA-256 23df6bb87ecfd344…

Rollout outcome RO_{pi_j}(P) as a game: both players follow pi_j; the result is `true` iff the player to move at P (the first player) wins under normal play. At a terminal start it is `false`.

Statement as elaborated and printed by Lean 4.26.0

ℕ → List ℕ → Bool
Exact source text, lines 142–152
142/-- Rollout outcome RO_{pi_j}(P) as a game: both players follow pi_j; the result is143    `true` iff the player to move at P (the first player) wins under normal play.144    At a terminal start it is `false`. -/145def rolloutWinner (j : Nat) (p : List Nat) : Bool :=146  match h : policyStep j p with147  | none => false148  | some q => !rolloutWinner j q149termination_by rolloutCount j p150decreasing_by151  have := policyMove_count (policyStep_some h)152  omega

Project declarations in the statement: none

Project declarations used by the proof or definition body

Rollout.policyMove_count, Rollout.policyStep, Rollout.policyStep_some, rolloutCount

def nimSum

Module NimCore (lean/NimCore.lean, lines 7–9) · file SHA-256 b07db6c505210d5a…

Statement as elaborated and printed by Lean 4.26.0

List ℕ → ℕ
Exact source text, lines 7–9
7def nimSum : List Nat → Nat8  | [] => 09  | h :: t => h ^^^ nimSum t

Project declarations in the statement: none

Project declarations used by the proof or definition body

none

Full modules

ModuleFileLinesImports
Misclean/phase6/Misc.lean912Bypass
NimCorelean/NimCore.lean139Std
NimGamelean/phase2/NimGame.lean634NimRollout

Build evidence: fresh isolated rebuild of all 38 bundled modules with Lean (version 4.26.0, started 2026-10-10T15:21:56Z, finished 2026-10-10T15:27:00Z: 38/38 modules compiled, 1588 axiom reports, no errors. See Build for the commands and the independent audit of 2026-10-10 (dated evidence).