Principal declarations
theorem Shootout.ahL_counts
Module Shootout
(lean/phase7/Shootout.lean, lines 1368–1374) · file SHA-256 1abd814426d345b9… Axioms reported by the fresh build: propext, Classical.choice, Quot.sound
COUNTS OF THE EXECUTED MOVE PATH (B ≥ 1): 1 reset tick + exactly totalRolloutMoves + 2B
loop ticks (Σ L_h legal moves, B terminal tests, B consume ticks), then one readout.
Statement as elaborated and printed by Lean 4.26.0
∀ {B N r : ℕ},
1 ≤ B →
B ≤ 2 ^ r →
∀ {P : List ℕ},
P.length = N →
NimAudit.Game.Width B P →
∀ (x0 : ℕ → Bool),
1 +
(NimAudit.Shootout.loopRun (NimAudit.Shootout.cstep false B N r P false)
(B * N + 2) (NimAudit.Shootout.Tmax B N)
(NimAudit.Shootout.cstep false B N r P true x0)).2 =
NimAudit.Game.totalRolloutMoves B P + 2 * B + 1
Exact source text, lines 1368–1374
1368/-- COUNTS OF THE EXECUTED MOVE PATH (B ≥ 1): 1 reset tick + exactly totalRolloutMoves + 2B1369 loop ticks (Σ L_h legal moves, B terminal tests, B consume ticks), then one readout. -/1370theorem ahL_counts {B N r : Nat} (hB : 1 ≤ B) (hBr : B ≤ 2 ^ r) {P : List Nat} (hP : P.length = N) (hw : Width B P)1371 (x0 : Nat → Bool) :1372 1 + (loopRun (cstep false B N r P false) (B * N + 2) (Tmax B N) (cstep false B N r P true x0)).2 =1373 totalRolloutMoves B P + 2 * B + 1 := by1374 rw [(ah_loop hB hBr hP hw x0).1, ahT_total hB]; omega
Project declarations in the statement: Game.Width, Game.totalRolloutMoves, Shootout.Tmax, Shootout.cstep, Shootout.loopRun
Project declarations used by the proof or definition body
Game.Width, Game.rolloutWinner, Game.totalRolloutMoves, Shootout.Tmax, Shootout.ahT, Shootout.ahT_total, Shootout.ah_loop, Shootout.cstep, Shootout.loopRun, Shootout.oW
theorem Shootout.ah_counts
Module Shootout
(lean/phase7/Shootout.lean, lines 1249–1259) · file SHA-256 1abd814426d345b9… Axioms reported by the fresh build: propext, Quot.sound
COUNTS, ALL HEADS (move path, B ≥ 1): 1 reset tick + totalRolloutMoves legal moves + B
terminal tests + B consume ticks = totalRolloutMoves + 2B + 1 controller ticks, then ONE
readout-network evaluation: totalRolloutMoves + 2B + 2 network evaluations in all
(phase 6's functional composition counted totalRolloutMoves + 2B + 1: B separate
resets instead of 1 reset + B consume/reload ticks).
Statement as elaborated and printed by Lean 4.26.0
∀ {B : ℕ},
1 ≤ B →
∀ {P : List ℕ},
NimAudit.Game.Width B P →
1 + NimAudit.Shootout.ahT P (B - 1) 0 = NimAudit.Game.totalRolloutMoves B P + 2 * B + 1 ∧
NimAudit.Shootout.ahT P (B - 1) 0 ≤ NimAudit.Shootout.Tmax B P.length ∧
NimAudit.Game.totalRolloutMoves B P ≤ B * (P.length * (2 ^ B - 1))
Exact source text, lines 1249–1259
1249/-- COUNTS, ALL HEADS (move path, B ≥ 1): 1 reset tick + totalRolloutMoves legal moves + B1250 terminal tests + B consume ticks = totalRolloutMoves + 2B + 1 controller ticks, then ONE1251 readout-network evaluation: totalRolloutMoves + 2B + 2 network evaluations in all1252 (phase 6's functional composition counted totalRolloutMoves + 2B + 1: B separate1253 resets instead of 1 reset + B consume/reload ticks). -/1254theorem ah_counts {B : Nat} (hB : 1 ≤ B) {P : List Nat} (hw : Width B P) :1255 1 + ahT P (B - 1) 0 = totalRolloutMoves B P + 2 * B + 1 ∧1256 ahT P (B - 1) 0 ≤ Tmax B P.length ∧1257 totalRolloutMoves B P ≤ B * (P.length * (2 ^ B - 1)) := by1258 refine ⟨by rw [ahT_total hB]; omega, ?_, totalRolloutMoves_le hw⟩1259 have := ahT_le B hw (B - 1) 0; unfold Tmax; rw [show B - 1 + 1 = B by omega] at this; exact this
Project declarations in the statement: Game.Width, Game.totalRolloutMoves, Shootout.Tmax, Shootout.ahT
Project declarations used by the proof or definition body
Game.Width, Game.totalRolloutMoves, Game.totalRolloutMoves_le, RolloutExec.clockBound, Shootout.Tmax, Shootout.ahT, Shootout.ahT_le, Shootout.ahT_total
theorem Shootout.ee_counts
Module Shootout
(lean/phase7/Shootout.lean, lines 1233–1247) · file SHA-256 1abd814426d345b9… Axioms reported by the fresh build: propext, Classical.choice, Quot.sound
COUNTS, EARLY EXIT (B ≥ 1): with R = number of heads queried (R ≤ B, R = 1 when
RO_{π₀}(P) = 1), the controller executes 1 reset tick + Σ_{h<R} L_h policy steps that
are legal simulated moves + R terminal-test steps + R consume ticks (R − 1 of which also
reload the board for the next head; the last stops) — i.e. 1 + Σ_{h<R} L_h + 2R ticks —
and then holds. The padded clock runs 1 + Tmax ticks instead.
Statement as elaborated and printed by Lean 4.26.0
∀ {B : ℕ},
1 ≤ B →
∀ {P : List ℕ},
NimAudit.Game.Width B P →
NimAudit.Shootout.eeT B P (B - 1) 0 =
(List.map (fun h => NimAudit.Rollout.rolloutMoves h P)
(List.range (NimAudit.Shootout.eeR P (B - 1) 0))).sum +
2 * NimAudit.Shootout.eeR P (B - 1) 0 ∧
NimAudit.Shootout.eeR P (B - 1) 0 ≤ B ∧
(NimAudit.Game.rolloutWinner 0 P = true → NimAudit.Shootout.eeR P (B - 1) 0 = 1) ∧
NimAudit.Shootout.eeT B P (B - 1) 0 ≤ NimAudit.Shootout.Tmax B P.length
Exact source text, lines 1233–1247
1233/-- COUNTS, EARLY EXIT (B ≥ 1): with R = number of heads queried (R ≤ B, R = 1 when1234 RO_{π₀}(P) = 1), the controller executes 1 reset tick + Σ_{h<R} L_h policy steps that1235 are legal simulated moves + R terminal-test steps + R consume ticks (R − 1 of which also1236 reload the board for the next head; the last stops) — i.e. 1 + Σ_{h<R} L_h + 2R ticks —1237 and then holds. The padded clock runs 1 + Tmax ticks instead. -/1238theorem ee_counts {B : Nat} (hB : 1 ≤ B) {P : List Nat} (hw : Width B P) :1239 eeT B P (B - 1) 0 = ((List.range (eeR P (B - 1) 0)).map (fun h => rolloutMoves h P)).sum + 2 * eeR P (B - 1) 0 ∧1240 eeR P (B - 1) 0 ≤ B ∧ (rolloutWinner 0 P = true → eeR P (B - 1) 0 = 1) ∧1241 eeT B P (B - 1) 0 ≤ Tmax B P.length := by1242 refine ⟨by rw [eeT_sum, sum_plus_two, List.range_eq_range'], (ee_spec hB hw).2.2.2.2.2.1, fun h0 => ?_,1243 (ee_spec hB hw).2.2.2.2.2.2.1⟩1244 obtain ⟨k, hk⟩ : ∃ k, B - 1 = k := ⟨_, rfl⟩1245 rw [hk]; cases k with1246 | zero => rfl1247 | succ k => simp [eeR, h0]
Project declarations in the statement: Game.Width, Game.rolloutWinner, Rollout.rolloutMoves, Shootout.Tmax, Shootout.eeR, Shootout.eeT
Project declarations used by the proof or definition body
Game.Width, Game.rolloutWinner, Misc.FSM.run, Misc.shootout, Rollout.rolloutMoves, Shootout.OS.dec, Shootout.OS.j, Shootout.OS.run, Shootout.Tmax, Shootout.arun, Shootout.eeR, Shootout.eeT, Shootout.eeT_sum, Shootout.ee_spec, Shootout.initOS, Shootout.sum_plus_two, nimSum
Definitions these statements use
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.totalRolloutMoves
Module NimGame
(lean/phase2/NimGame.lean, lines 450–452) · file SHA-256 23df6bb87ecfd344…
Total simulated moves of the B root rollouts.
Statement as elaborated and printed by Lean 4.26.0
ℕ → List ℕ → ℕ
Exact source text, lines 450–452
450/-- Total simulated moves of the B root rollouts. -/451def totalRolloutMoves (B : Nat) (p : List Nat) : Nat :=452 ((List.range B).map (fun j => rolloutMoves j p)).sum
Project declarations in the statement: none
Project declarations used by the proof or definition body
Rollout.rolloutMoves
def Shootout.Tmax
Module Shootout
(lean/phase7/Shootout.lean, lines 706–707) · file SHA-256 1abd814426d345b9…
The fixed padded clock (ticks after the reset tick): B·(N(2^B − 1) + 2).
Statement as elaborated and printed by Lean 4.26.0
ℕ → ℕ → ℕ
Exact source text, lines 706–707
706/-- The fixed padded clock (ticks after the reset tick): B·(N(2^B − 1) + 2). -/707def Tmax (B N : Nat) : Nat := B * (clockBound B N + 1)
Project declarations in the statement: none
Project declarations used by the proof or definition body
RolloutExec.clockBound
def Shootout.cstep
Module Shootout
(lean/phase7/Shootout.lean, lines 139–141) · file SHA-256 1abd814426d345b9…
One clocked bit-level update.
Statement as elaborated and printed by Lean 4.26.0
Bool → ℕ → ℕ → ℕ → List ℕ → Bool → (ℕ → Bool) → ℕ → Bool
Exact source text, lines 139–141
139/-- One clocked bit-level update. -/140def cstep (early : Bool) (B N r : Nat) (P : List Nat) (rst : Bool) (x : Nat → Bool) : Nat → Bool := fun w =>141 if w < SW B N r then eval (zIn B N r x rst P) ((cForms early B N r).getD w (const false)) else false
Project declarations in the statement: none
Project declarations used by the proof or definition body
AC0.Circ, AC0.Circ.const, AC0.Circ.eval, Shootout.SW, Shootout.cForms, Shootout.zIn
def Shootout.loopRun
Module Shootout
(lean/phase7/Shootout.lean, lines 776–780) · file SHA-256 1abd814426d345b9…
Clock the update while the run wire is 1 (fuel f); returns the registers and the number
of ticks executed.
Statement as elaborated and printed by Lean 4.26.0
((ℕ → Bool) → ℕ → Bool) → ℕ → ℕ → (ℕ → Bool) → (ℕ → Bool) × ℕ
Exact source text, lines 776–780
776/-- Clock the update while the run wire is 1 (fuel f); returns the registers and the number777 of ticks executed. -/778def loopRun (step : (Nat → Bool) → (Nat → Bool)) (hw : Nat) : Nat → (Nat → Bool) → (Nat → Bool) × Nat779 | 0, x => (x, 0)780 | f + 1, x => if x hw = true then ((loopRun step hw f (step x)).1, (loopRun step hw f (step x)).2 + 1) else (x, 0)
Project declarations in the statement: none
Project declarations used by the proof or definition body
none
def Shootout.ahT
Module Shootout
(lean/phase7/Shootout.lean, lines 814–817) · file SHA-256 1abd814426d345b9…
Ticks of the all-head schedule from head j with k + 1 heads left.
Statement as elaborated and printed by Lean 4.26.0
List ℕ → ℕ → ℕ → ℕ
Exact source text, lines 814–817
814/-- Ticks of the all-head schedule from head j with k + 1 heads left. -/815def ahT (P : List Nat) : Nat → Nat → Nat816 | 0, j => rolloutMoves j P + 2817 | k + 1, j => rolloutMoves j P + 2 + ahT P k (j + 1)
Project declarations in the statement: none
Project declarations used by the proof or definition body
Rollout.rolloutMoves
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.rolloutMoves
Module NimRollout
(lean/NimRollout.lean, lines 205–214) · file SHA-256 1a99428d71573d31…
The simulator: apply `policyStep` until no move is available, counting moves.
Termination is justified by `policyMove_count`.
Statement as elaborated and printed by Lean 4.26.0
ℕ → List ℕ → ℕ
Exact source text, lines 205–214
205/-- The simulator: apply `policyStep` until no move is available, counting moves.206 Termination is justified by `policyMove_count`. -/207def rolloutMoves (j : Nat) (p : List Nat) : Nat :=208 match h : policyStep j p with209 | none => 0210 | some q => rolloutMoves j q + 1211termination_by rolloutCount j p212decreasing_by213 have := policyMove_count (policyStep_some h)214 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 Shootout.eeR
Module Shootout
(lean/phase7/Shootout.lean, lines 617–620) · file SHA-256 1abd814426d345b9…
Rollouts (head queries) executed by the early-exit schedule.
Statement as elaborated and printed by Lean 4.26.0
List ℕ → ℕ → ℕ → ℕ
Exact source text, lines 617–620
617/-- Rollouts (head queries) executed by the early-exit schedule. -/618def eeR (P : List Nat) : Nat → Nat → Nat619 | 0, _ => 1620 | k + 1, j => if rolloutWinner j P then 1 else eeR P k (j + 1) + 1
Project declarations in the statement: none
Project declarations used by the proof or definition body
Game.rolloutWinner
def Shootout.eeT
Module Shootout
(lean/phase7/Shootout.lean, lines 612–615) · file SHA-256 1abd814426d345b9…
Ticks used by the early-exit schedule from head j with k + 1 heads left.
Statement as elaborated and printed by Lean 4.26.0
ℕ → List ℕ → ℕ → ℕ → ℕ
Exact source text, lines 612–615
612/-- Ticks used by the early-exit schedule from head j with k + 1 heads left. -/613def eeT (B : Nat) (P : List Nat) : Nat → Nat → Nat614 | 0, j => rolloutMoves j P + 2615 | k + 1, j => if rolloutWinner j P then rolloutMoves j P + 2 else rolloutMoves j P + 2 + eeT B P k (j + 1)
Project declarations in the statement: none
Project declarations used by the proof or definition body
Game.rolloutWinner, Rollout.rolloutMoves
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).