AFTD Auto-Formalizing Theoretical Domains

spider_grundy_val_one_one_up_to_seven

theoremverified

For every natural number z with 1 ≤ z and z ≤ 7, the Grundy value spider_grundy_val 1 1 z of the spider tree S(1, 1, z) in the Game of Arrows is equal to z % 2.

Statement

theorem spider_grundy_val_one_one_up_to_seven (z : ℕ) (h1 : 1 ≤ z) (h7 : z ≤ 7) : spider_grundy_val 1 1 z = z % 2
Source
arXiv:2610.15145, Corollary 5.7
Verified
08 Nov 2026
Axioms
Quot.soundpropext
Built on 1
  • spider_grundy_valThe 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)…

Read back from the Lean

For any natural number $z$, if $1 \le z$ and $z \le 7$, then spider_grundy_val 1 1 z equals $z \bmod 2$.

Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.

The proof, explained

The theorem is proved by exhaustive finite case analysis. Given the bounds 1 ≤ z ≤ 7, the integer z must be one of 1, 2, 3, 4, 5, 6, or 7. The proof enumerates these seven cases and evaluates both sides of the identity directly by computation.

  1. For each integer z such that 1 ≤ z ≤ 7, spider_grundy_val 1 1 z = z % 2. automation

    Given the bounds 1 ≤ z and z ≤ 7, the variable z can only take values in {1, 2, 3, 4, 5, 6, 7}. The tactic `interval_cases` enumerates these seven cases, and in each case `decide` evaluates the fully concrete recursive function `spider_grundy_val 1 1 z` and the remainder `z % 2` to verify that they are equal.

    line 3

      interval_cases z <;> decide

Written by a model (gemini-3.8-flash) from the Lean proof and the goal states Lean reported at each step. Lean verified the proof; this explanation is a reading aid and is not itself machine-checked.

Lean source view module on GitHub

/-- The Grundy value of S(1, 1, z) equals z % 2 for all 1 ≤ z ≤ 7. -/theorem spider_grundy_val_one_one_up_to_seven (z : ℕ) (h1 : 1 ≤ z) (h7 : z ≤ 7) : spider_grundy_val 1 1 z = z % 2 := by  interval_cases z <;> decide
See it in the graphDiscuss this resultChallenge it