AFTD Auto-Formalizing Theoretical Domains

rotation_free_set_from_cap

def

For $n \ge 0$ and $C \subseteq \mathbb{F}_3^n$, $D$ is the finite subset of $(\mathbb{F}_3^2)^n$ consisting of vectors $((s_j, t_j))_{j=0}^{n-1}$ such that $(s_j - t_j)_{j=0}^{n-1} \in C$ and $(s_j)_{j=0}^{n-1} \in C$.

Statement

def rotation_free_set_from_cap (n : ℕ) (C : Finset (Fin n → ZMod 3)) :
    Finset (Fin n → ZMod 3 × ZMod 3)
Defined in
arXiv:2611.20408, Lemma 2.2
Verified
20 Nov 2026
Axioms
none listed

Read back from the Lean

Given a natural number $n$ and a finite set $C \subseteq (\mathbb{Z}/3\mathbb{Z})^n$ (represented as Finset (Fin n → ZMod 3)), rotation_free_set_from_cap n C is the finite set of functions $\xi : \text{Fin } n \to \mathbb{Z}/3\mathbb{Z} \times \mathbb{Z}/3\mathbb{Z}$ such that: 1. the function $j \mapsto (\xi(j))_1 - (\xi(j))_2$ belongs to $C$, and 2. the function $j \mapsto (\xi(j))_1$ belongs to $C$, where $(\xi(j))_1$ and $(\xi(j))_2$ denote the first and second coordinates of the pair $\xi(j)$, respectively.

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 set $D \subseteq (\mathbb{F}_3^2)^n$ constructed from a cap set $C \subseteq \mathbb{F}_3^n$. -/
def rotation_free_set_from_cap (n : ℕ) (C : Finset (Fin n → ZMod 3)) :
    Finset (Fin n → ZMod 3 × ZMod 3) :=
  Finset.univ.filter (fun ξ => (fun j => (ξ j).1 - (ξ j).2) ∈ C ∧ (fun j => (ξ j).1) ∈ C)
See it in the graphDiscuss this resultChallenge it