slow_exact_nim_grundy_comp
For natural numbers k and n, fuel : ℕ, and position x : Fin n → ℕ, the fuel-bounded Sprague-Grundy value slow_exact_nim_grundy_comp k n fuel x is 0 when fuel = 0, and when fuel = fuel' + 1 it is finset_mex applied to the image of slow_exact_nim_followers k n x under slow_exact_nim_grundy_comp k n fuel'.
Statement
def slow_exact_nim_grundy_comp (k n : ℕ) : ℕ → (Fin n → ℕ) → ℕ- Defined in
- arXiv:2611.14546, Section 1
- Verified
- 14 Nov 2026
- Axioms
- none listed
- Built on 2
- finset_mexThe minimum excluded natural number (mex) of a finite set of natural numbers s, defined as the smallest natural number not belonging to s.
- slow_exact_nim_followersFor natural numbers k and n and a position x : Fin n → ℕ, the finite set of legal followers slow_exact_nim_followers k n x is the set of…
- Used by 2
- slow_exact_nim_grundyThe Sprague-Grundy value slow_exact_nim_grundy k n x of a position x : Fin n → ℕ in slow exact k-Nim on n piles is defined as…
- op_1600_slow_exact_nim_bounded_grundyIn the normal-play game of slow exact k-Nim on k+2 piles, for every integer k ≥ 3, the range of the Sprague-Grundy function is bounded:…
Read back from the Lean
The declaration slow_exact_nim_grundy_comp defines a fuel-bounded Grundy (nim-value) computation for an exact Nim game variant.
Given parameters k, n : ℕ, it is a function taking a fuel parameter fuel : ℕ and a game state x : Fin n → ℕ (representing n pile sizes) and returning a natural number:
- If fuel = 0, it returns 0 regardless of the state x.
- If the fuel is fuel + 1, it computes the minimum excluded value (finset_mex) of the set of recursive Grundy values (evaluated with fuel fuel) of all follower states in slow_exact_nim_followers k n x.
Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.
Lean source view module on GitHub
/-- Fuel-bounded Sprague-Grundy evaluation for slow exact k-Nim. -/ def slow_exact_nim_grundy_comp (k n : ℕ) : ℕ → (Fin n → ℕ) → ℕ | 0, _ => 0 | fuel + 1, x => finset_mex ((slow_exact_nim_followers k n x).image (slow_exact_nim_grundy_comp k n fuel))