spider_grundy_val_one_three_up_to_three
For every natural number z with 1 ≤ z and z ≤ 3, the Grundy value spider_grundy_val 1 3 z of the spider tree S(1, 3, z) in the Game of Arrows is equal to z % 2.
Statement
theorem spider_grundy_val_one_three_up_to_three (z : ℕ) (h1 : 1 ≤ z) (h3 : z ≤ 3) :
spider_grundy_val 1 3 z = z % 2- Source
- folklore
- Verified
- 20 Oct 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)…
- Used by 1
- spider_grundy_val_one_three_up_to_fourFor every natural number z with 1 ≤ z and z ≤ 4, the Grundy value spider_grundy_val 1 3 z of the spider tree S(1, 3, z) in the Game of…
Read back from the Lean
For every natural number $z$, if $1 \le z$ and $z \le 3$ (that is, for $z \in \{1, 2, 3\}$), the value of spider_grundy_val 1 3 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 finite case exhaustion on $z$. Since $1 \le z \le 3$, $z$ must be 1, 2, or 3. In each case, both sides of the identity are fully concrete, and the equality is verified by computational reduction of the recursive game-tree function `spider_grundy_val`.
For each integer $z$ satisfying $1 \le z \le 3$, $\text{spider\_grundy\_val}(1, 3, z) = z \bmod 2$. automation
The hypotheses $1 \le z$ and $z \le 3$ leave only three possible values for $z$: 1, 2, and 3 (`interval_cases z`). For each value ($z = 1$, $z = 2$, and $z = 3$), both the spider Grundy value $\text{spider\_grundy\_val}(1, 3, z)$ and the remainder $z \bmod 2$ reduce to closed numerical expressions via the recursive definition of `spider_gamma`. Lean's decision procedure (`decide`) evaluates both sides and confirms equality in each case.
interval_cases z <;> decide
- The tactic `decide` establishes each equation by purely computational evaluation of the recursive definitions `spider_grundy_val` and `spider_gamma`. The game-tree exploration and mex computations are carried out internally by the Lean evaluator.
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
Choose a tactic — a marked line — to see the goals Lean had before and after it, as in Lean’s infoview. Step with ← → or j k.
/-- The Grundy value of the spider S(1, 3, z) in the Game of Arrows equals z % 2 for all 1 ≤ z ≤ 3. -/theorem spider_grundy_val_one_three_up_to_three (z : ℕ) (h1 : 1 ≤ z) (h3 : z ≤ 3) : spider_grundy_val 1 3 z = z % 2 := by interval_cases z <;> decide