slow_exact_nim_misere_comp
For natural numbers k and n, fuel : ℕ, and position x : Fin n → ℕ, the fuel-bounded misère invariant slow_exact_nim_misere_comp k n fuel x is 1 when fuel = 0 or when x has no legal followers, and when fuel = fuel' + 1 and x has legal followers it is finset_mex applied to the image of slow_exact_nim_followers k n x under slow_exact_nim_misere_comp k n fuel'.
Statement
def slow_exact_nim_misere_comp (k n : ℕ) : ℕ → (Fin n → ℕ) → ℕ- Defined in
- arXiv:2611.14546, Section 1
- Verified
- 20 Nov 2026
- Axioms
- none listed
- Built on 2
- 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…
- 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.
- Used by 2
- slow_exact_nim_misereThe misère invariant slow_exact_nim_misere k n x of a position x : Fin n → ℕ in slow exact k-Nim on n piles is defined as…
- op_2051_slow_exact_nim_joint_seven_witnessIn slow exact k-Nim on k+2 piles, for every integer k ≥ 3, the geometric padded witness position slow_exact_nim_geometric_padded_witness 2…
Read back from the Lean
A recursive definition of slow_exact_nim_misere_comp k n fuel x, which takes parameters k, n : ℕ, a recursion bound fuel : ℕ, and a game state x : Fin n → ℕ (representing the sizes of n piles). A move consists of choosing k piles that each have positive size and decrementing each of them by 1.
- If fuel = 0, it returns 1 for any state x.
- If fuel = fuel' + 1:
- If there is at least one valid move from x, it returns the minimum excluded natural number (mex) of slow_exact_nim_misere_comp k n fuel' y evaluated over all states y reachable from x in one valid move.
- If no valid move is possible from x (i.e., fewer than k piles are strictly positive), it returns 1.
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 computation of the misère invariant for slow exact k-Nim on n piles. -/ def slow_exact_nim_misere_comp (k n : ℕ) : ℕ → (Fin n → ℕ) → ℕ | 0, _ => 1 | fuel + 1, x => if (slow_exact_nim_followers k n x).Nonempty then finset_mex ((slow_exact_nim_followers k n x).image (slow_exact_nim_misere_comp k n fuel)) else 1