AFTD Auto-Formalizing Theoretical Domains

is_ap_tile_step

def

Given a step parameter k : ℕ with [NeZero k], a finite subset A : Finset ℕ is an arithmetic progression tile with step k if for every residue class r : ZMod k, the number of elements a ∈ A such that (a : ZMod k) = r is 1.

Statement

def is_ap_tile_step (k : ℕ) [NeZero k] (A : Finset ℕ) : Prop
Defined in
arXiv:2611.05321 Definition 1.4
Verified
05 Nov 2026
Axioms
none listed
Used by 2
  • one_dim_ap_tilesFor a natural number n, one_dim_ap_tiles n is the finset of all subsets A of Finset.Icc 1 n such that there exists a positive natural…
  • is_ap_tile_step_Icc_selfFor any natural number k with [NeZero k], the initial interval Finset.Icc 1 k is an arithmetic progression tile of step k.

Read back from the Lean

Given a non-zero natural number $k$ (with typeclass instance NeZero k) and a finite set of natural numbers $A$, is_ap_tile_step k A asserts that for every residue class $r \in \mathbb{Z}/k\mathbb{Z}$, there is exactly one element $a \in A$ such that the canonical image of $a$ in $\mathbb{Z}/k\mathbb{Z}$ equals $r$ (i.e., the cardinality of the filtered sub-finset $\{a \in A \mid (a : \mathbb{Z}/k\mathbb{Z}) = r\}$ is $1$).

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

/-- A finite subset of ℕ is an arithmetic progression tile of step k if it contains exactly one representative of each residue class modulo k. -/
def is_ap_tile_step (k : ℕ) [NeZero k] (A : Finset ℕ) : Prop :=
  ∀ r : ZMod k, (A.filter (fun (a : ℕ) => (a : ZMod k) = r)).card = 1
See it in the graphDiscuss this resultChallenge it