Principal declarations
theorem Game.rolloutWinner_channel
Module NimGame
(lean/phase2/NimGame.lean, lines 171–176) · file SHA-256 23df6bb87ecfd344… Axioms reported by the fresh build: propext, Quot.sound
RO_{pi_0}(P) = sigma_0 and RO_{pi_j}(P) = sigma_j XOR sigma_0 (j ≥ 1), proved for
the executed rollout.
Statement as elaborated and printed by Lean 4.26.0
∀ (j : ℕ) (p : List ℕ), NimAudit.Game.rolloutWinner j p = NimAudit.channel j (NimAudit.nimSum p)
Exact source text, lines 171–176
171/-- RO_{pi_0}(P) = sigma_0 and RO_{pi_j}(P) = sigma_j XOR sigma_0 (j ≥ 1), proved for172 the executed rollout. -/173theorem rolloutWinner_channel (j : Nat) (p : List Nat) :174 rolloutWinner j p = channel j (nimSum p) := by175 rw [rolloutWinner_eq]176 exact rolloutMoves_parity j p
Project declarations in the statement: Game.rolloutWinner, channel, nimSum
Project declarations used by the proof or definition body
Game.rolloutWinner, Game.rolloutWinner_eq, Rollout.rolloutMoves, Rollout.rolloutMoves_parity, channel, nimSum
theorem Prob.rollout_outcome_linear
Module NimProbability
(lean/phase2/NimProbability.lean, lines 920–923) · file SHA-256 1d5d7977a43e854d… Axioms reported by the fresh build: propext, Quot.sound
RO_{pi_j}(P), the executed rollout outcome, is the linear functional <w_j, sigma(P)>.
Statement as elaborated and printed by Lean 4.26.0
∀ {B j : ℕ},
j < B →
∀ (P : List ℕ),
NimAudit.Game.rolloutWinner j P =
NimAudit.Prob.dotB B (NimAudit.Prob.headVec j) (NimAudit.nimSum P)
Exact source text, lines 920–923
920/-- RO_{pi_j}(P), the executed rollout outcome, is the linear functional <w_j, sigma(P)>. -/921theorem rollout_outcome_linear {B j : Nat} (hj : j < B) (P : List Nat) :922 rolloutWinner j P = dotB B (headVec j) (nimSum P) := by923 rw [rolloutWinner_channel, head_linear hj]
Project declarations in the statement: Game.rolloutWinner, Prob.dotB, Prob.headVec, nimSum
Project declarations used by the proof or definition body
Game.rolloutWinner, Game.rolloutWinner_channel, Prob.dotB, Prob.headVec, Prob.head_linear, channel, nimSum
theorem Game.reconstruct_eq
Module NimGame
(lean/phase2/NimGame.lean, lines 224–240) · file SHA-256 23df6bb87ecfd344… Axioms reported by the fresh build: propext, Quot.sound
RECONSTRUCTION: on a B-bit board (any N, including the empty and terminal
boards), the B rollout outcomes determine the full nim-sum.
Statement as elaborated and printed by Lean 4.26.0
∀ {B : ℕ} {p : List ℕ},
NimAudit.Game.Width B p →
NimAudit.Game.reconstruct B (NimAudit.Game.outcomes p) = NimAudit.nimSum p
Exact source text, lines 224–240
224/-- RECONSTRUCTION: on a B-bit board (any N, including the empty and terminal225 boards), the B rollout outcomes determine the full nim-sum. -/226theorem reconstruct_eq {B : Nat} {p : List Nat} (hw : Width B p) :227 reconstruct B (outcomes p) = nimSum p := by228 apply Nat.eq_of_testBit_eq229 intro i230 rw [reconstruct, testBit_ofBits]231 by_cases hi : i < B232 · simp only [hi, decide_true, Bool.true_and, recoverBit, outcomes, rolloutWinner_channel]233 by_cases h0 : i = 0234 · subst h0; simp [channel]235 · simp only [h0, if_false, channel, if_true]236 cases (nimSum p).testBit i <;> cases (nimSum p).testBit 0 <;> rfl237 · simp only [hi, decide_false, Bool.false_and]238 symm239 apply Nat.testBit_lt_two_pow240 exact Nat.lt_of_lt_of_le (nimSum_lt hw) (Nat.pow_le_pow_right (by decide) (by omega))
Project declarations in the statement: Game.Width, Game.outcomes, Game.reconstruct, nimSum
Project declarations used by the proof or definition body
Game.Width, Game.nimSum_lt, Game.ofBits, Game.outcomes, Game.reconstruct, Game.recoverBit, Game.rolloutWinner, Game.rolloutWinner_channel, Game.testBit_ofBits, channel, nimSum
Definitions these statements use
def channel
Module NimCore
(lean/NimCore.lean, lines 77–78) · file SHA-256 b07db6c505210d5a…
Statement as elaborated and printed by Lean 4.26.0
ℕ → ℕ → Bool
Exact source text, lines 77–78
77def channel (j sigma : Nat) : Bool :=78 if j = 0 then sigma.testBit 0 else xor (sigma.testBit j) (sigma.testBit 0)
Project declarations in the statement: none
Project declarations used by the proof or definition body
none
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
def Prob.dotB
Module NimProbability
(lean/phase2/NimProbability.lean, lines 259–262) · file SHA-256 1d5d7977a43e854d…
The F_2 inner product of the first B bits of u and v.
Statement as elaborated and printed by Lean 4.26.0
ℕ → ℕ → ℕ → Bool
Exact source text, lines 259–262
259/-- The F_2 inner product of the first B bits of u and v. -/260def dotB : Nat → Nat → Nat → Bool261 | 0, _, _ => false262 | B + 1, u, v => xor (dotB B u v) (u.testBit B && v.testBit B)
Project declarations in the statement: none
Project declarations used by the proof or definition body
none
def Prob.headVec
Module NimProbability
(lean/phase2/NimProbability.lean, lines 875–876) · file SHA-256 1d5d7977a43e854d…
The vector w_j with RO_{pi_j}(P) = <w_j, sigma(P)>: w_0 = 1, w_j = 2^j XOR 1.
Statement as elaborated and printed by Lean 4.26.0
ℕ → ℕ
Exact source text, lines 875–876
875/-- The vector w_j with RO_{pi_j}(P) = <w_j, sigma(P)>: w_0 = 1, w_j = 2^j XOR 1. -/876def headVec (j : Nat) : Nat := if j = 0 then 1 else 2 ^ j ^^^ 1
Project declarations in the statement: none
Project declarations used by the proof or definition body
none
def Game.Width
Module NimGame
(lean/phase2/NimGame.lean, lines 31–32) · file SHA-256 23df6bb87ecfd344…
B-bit board: every heap is below 2^B.
Statement as elaborated and printed by Lean 4.26.0
ℕ → List ℕ → Prop
Exact source text, lines 31–32
31/-- B-bit board: every heap is below 2^B. -/32def Width (B : Nat) (p : List Nat) : Prop := ∀ x ∈ p, x < 2 ^ B
Project declarations in the statement: none
Project declarations used by the proof or definition body
none
def Game.outcomes
Module NimGame
(lean/phase2/NimGame.lean, lines 214–215) · file SHA-256 23df6bb87ecfd344…
The B actual rollout measurements of board p.
Statement as elaborated and printed by Lean 4.26.0
List ℕ → ℕ → Bool
Exact source text, lines 214–215
214/-- The B actual rollout measurements of board p. -/215def outcomes (p : List Nat) : Nat → Bool := fun j => rolloutWinner j p
Project declarations in the statement: none
Project declarations used by the proof or definition body
Game.rolloutWinner
def Game.reconstruct
Module NimGame
(lean/phase2/NimGame.lean, lines 211–212) · file SHA-256 23df6bb87ecfd344…
The nim-sum reconstructed from the B rollout outcomes o 0, ..., o (B-1).
Statement as elaborated and printed by Lean 4.26.0
ℕ → (ℕ → Bool) → ℕ
Exact source text, lines 211–212
211/-- The nim-sum reconstructed from the B rollout outcomes o 0, ..., o (B-1). -/212def reconstruct (B : Nat) (o : Nat → Bool) : Nat := ofBits B (recoverBit o)
Project declarations in the statement: none
Project declarations used by the proof or definition body
Game.ofBits, Game.recoverBit
Full modules
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).