AFTD Auto-Formalizing Theoretical Domains

spider_grundy_val

def

The Grundy value spider_grundy_val of the 3-legged spider tree with leg parameters x, y, z : ℕ is defined as spider_gamma (x + y + z + 1) CentreStatus.none [(x, SpiderLegEnd.free), (y, SpiderLegEnd.free), (z, SpiderLegEnd.free)].

Statement

def spider_grundy_val (x y z : ℕ) : ℕ
Defined in
scout/2610-15145-nim-heaps-in-the-game-of-cycles-the-parity-conjecture-fails.md, Proposition 6.1
Verified
18 Oct 2026
Axioms
none listed
Built on 3
  • spider_gammaThe function spider_gamma computes a natural number from a fuel parameter fuel : ℕ, a centre status s : CentreStatus, and a list of spider…
  • SpiderLegEndThe end condition of an attached leg in a spider state is either free (no arc on the leg), inward (pointing towards the centre), or…
  • CentreStatusThe status of the central vertex in a spider state: none (no marked arcs incident), incoming (at least one incoming arc), outgoing (at…
Used by 8

Read back from the Lean

spider_grundy_val defines a function of three natural numbers $x, y, z : ℕ$ that returns a natural number, defined as spider_gamma (x + y + z + 1) CentreStatus.none [(x, SpiderLegEnd.free), (y, SpiderLegEnd.free), (z, SpiderLegEnd.free)].

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

/-- Grundy value of the 3-legged spider tree S(x, y, z) in the Game of Arrows. -/
def spider_grundy_val (x y z : ℕ) : ℕ :=
  spider_gamma (x + y + z + 1) .none [(x, .free), (y, .free), (z, .free)]
See it in the graphDiscuss this resultChallenge it