Principal declarations
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 Rollout.policyStep
Module NimRollout
(lean/NimRollout.lean, lines 116–120) · file SHA-256 1a99428d71573d31…
One step of `pi_j` with first-eligible tie-breaking; `none` means no move.
Statement as elaborated and printed by Lean 4.26.0
ℕ → List ℕ → Option (List ℕ)
Exact source text, lines 116–120
116/-- One step of `pi_j` with first-eligible tie-breaking; `none` means no move. -/117def policyStep (j : Nat) (p : List Nat) : Option (List Nat) :=118 match subFirstGe (2 ^ j) p with119 | some q => some q120 | none => subFirstPos p
Project declarations in the statement: none
Project declarations used by the proof or definition body
Rollout.subFirstGe, Rollout.subFirstPos
def Rollout.PolicyMove
Module NimRollout
(lean/NimRollout.lean, lines 28–32) · file SHA-256 1a99428d71573d31…
One legal move of the structured policy `pi_j` (tie-breaking unspecified).
Statement as elaborated and printed by Lean 4.26.0
ℕ → List ℕ → List ℕ → Prop
Exact source text, lines 28–32
28/-- One legal move of the structured policy `pi_j` (tie-breaking unspecified). -/29def PolicyMove (j : Nat) (p q : List Nat) : Prop :=30 (∃ pre x post, p = pre ++ x :: post ∧ 2 ^ j ≤ x ∧ q = pre ++ (x - 2 ^ j) :: post) ∨31 ((∀ x ∈ p, x < 2 ^ j) ∧32 ∃ pre x post, p = pre ++ x :: post ∧ 0 < x ∧ q = pre ++ (x - 1) :: post)
Project declarations in the statement: none
Project declarations used by the proof or definition body
none
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
Definitions these statements use
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 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
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).