AFTD Auto-Formalizing Theoretical Domains

quaternary_0331012_heap_options

def

In the quaternary game 0.331012, the set of heap sizes reachable by a legal move on a single heap of size h (removal to size 0 if h ∈ {1, 2, 3, 5}, and subtraction to h - 1 if 1 < h, h - 2 if 2 < h, and h - 6 if 6 < h).

Statement

def quaternary_0331012_heap_options (h : ℕ) : Finset ℕ
Defined in
arXiv:2611.29198, Theorem 5.4
Verified
27 Nov 2026
Axioms
none listed
Used by 2

Read back from the Lean

quaternary_0331012_heap_options is defined as a function taking a natural number $h$ and returning the finite set of natural numbers (a Finset ℕ) given by the union of: 1. $\{0\}$ if $h = 1$, $h = 2$, $h = 3$, or $h = 5$, and the empty set $\emptyset$ otherwise; 2. $\{h - 1\}$ if $1 < h$, and $\emptyset$ otherwise; 3. $\{h - 2\}$ if $2 < h$, and $\emptyset$ otherwise; 4. $\{h - 6\}$ if $6 < h$, and $\emptyset$ otherwise.

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

/-- Single-heap move options in the quaternary game 0.331012. -/
def quaternary_0331012_heap_options (h : ℕ) : Finset ℕ :=
  (if h = 1 ∨ h = 2 ∨ h = 3 ∨ h = 5 then {0} else ∅) ∪
  (if 1 < h then {h - 1} else ∅) ∪
  (if 2 < h then {h - 2} else ∅) ∪
  (if 6 < h then {h - 6} else ∅)
See it in the graphDiscuss this resultChallenge it