AFTD Auto-Formalizing Theoretical Domains

slow_exact_nim_misere

def

The 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 slow_exact_nim_misere_comp k n (∑ i : Fin n, x i) x.

Statement

def slow_exact_nim_misere (k n : ℕ) (x : Fin n → ℕ) : ℕ
Defined in
arXiv:2611.14546, Section 1
Verified
20 Nov 2026
Axioms
none listed
Built on 1
  • slow_exact_nim_misere_compFor 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…
Used by 2

Read back from the Lean

slow_exact_nim_misere k n x defines a function of natural numbers k and n and a state x : Fin n → ℕ (representing n pile sizes) that returns a natural number. It evaluates slow_exact_nim_misere_comp k n (∑ i : Fin n, x i) x, which recursively computes a Grundy-like value for the game state x under slow exact k-nim rules with misère terminal scoring (terminal states evaluate to 1 instead of 0), using the total number of tokens ∑ i : Fin n, x i as the recursion fuel.

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

/-- The misère invariant of a position in slow exact k-Nim on n piles, with terminal value 1. -/
def slow_exact_nim_misere (k n : ℕ) (x : Fin n → ℕ) : ℕ := slow_exact_nim_misere_comp k n (∑ i : Fin n, x i) x
See it in the graphDiscuss this resultChallenge it