AFTD Auto-Formalizing Theoretical Domains

block_snake_seq_two

def

The block-snake picking sequence for two agents (Fin 2) dividing 2k + 1 items, represented as a List (Fin 2) of length 2k + 1 constructed via List.ofFn, where the turn index t : Fin (2 * k + 1) has picker 0 if t.val < 2 * k and t.val % 2 = 0, and picker 1 otherwise.

Statement

def block_snake_seq_two (k : ℕ) : List (Fin 2)
Defined in
arXiv:2611.09685 Section 4.1
Verified
09 Nov 2026
Axioms
none listed
Used by 3

Read back from the Lean

block_snake_seq_two is a definition that, given a natural number $k$, produces a list of elements in $\text{Fin } 2$ of length $2k + 1$, constructed via List.ofFn on the domain $\text{Fin }(2k + 1)$. For each index $t \in \{0, \dots, 2k\}$, the $t$-th element is $0$ if $t \bmod 2 = 0$ and $t < 2k$, and is $1$ otherwise (that is, if $t$ is odd or $t = 2k$).

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

/-- The block-snake picking sequence for two agents and 2k + 1 items. -/
def block_snake_seq_two (k : ℕ) : List (Fin 2) := List.ofFn (fun t : Fin (2 * k + 1) => if t.val % 2 = 0 ∧ t.val < 2 * k then 0 else 1)
See it in the graphDiscuss this resultChallenge it