AFTD Auto-Formalizing Theoretical Domains

spider_grundy_val_two_two_up_to_three

theoremverified

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

Statement

theorem spider_grundy_val_two_two_up_to_three (z : ℕ) (h1 : 1 ≤ z) (h3 : z ≤ 3) : spider_grundy_val 2 2 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 every natural number $z$ satisfying $1 \le z$ and $z \le 3$, spider_grundy_val 2 2 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 proof proceeds by finite case exhaustion and computational evaluation. Given $1 \le z \le 3$, the natural number $z$ can only be 1, 2, or 3. For each of these three concrete instances, the identity reduces to an executable calculation of the Grundy value, which Lean evaluates directly.

  1. For each possible value $z \in \{1, 2, 3\}$, $\mathrm{spider\_grundy\_val}(2, 2, z) = z \bmod 2$. automation

    The hypotheses $1 \le z$ and $z \le 3$ constrain $z$ to the discrete interval $\{1, 2, 3\}$. The `interval_cases` tactic splits into three cases: $z = 1$, $z = 2$, and $z = 3$. Lean's `decide` tactic then evaluates the finite game-tree search defined by `spider_grundy_val` on each input, verifying that the resulting values are $1$, $0$, and $1$ respectively, matching $z \bmod 2$.

    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(2, 2, z) equals z % 2 for all 1 ≤ z ≤ 3. -/theorem spider_grundy_val_two_two_up_to_three (z : ℕ) (h1 : 1 ≤ z) (h3 : z ≤ 3) : spider_grundy_val 2 2 z = z % 2 := by  interval_cases z <;> decide
See it in the graphDiscuss this resultChallenge it