diff_squares
def
The set of squared differences of a finite subset $A$ in a commutative ring is $(A - A)^2 = \{(a - b)^2 : a, b \in A\}$.
Statement
def diff_squares {F : Type*} [CommRing F] [DecidableEq F] (A : Finset F) : Finset F
- Defined in
- arXiv:2610.34758, Section 1
- Verified
- 28 Oct 2026
- Axioms
- none listed
- Used by 1
- difference_squares_avoiding_gp3_boundsLet $p \ge 7$ be a prime and let $A \subset \mathbb{F}_p$ be nonempty. If the set of squared differences $(A - A)^2$ contains no…
Read back from the Lean
For a commutative ring F with decidable equality and a finite set A ⊆ F, diff_squares A is defined as the finite subset of F consisting of all elements of the form (a - b)^2 for a, b ∈ A, obtained as the image of the Cartesian product A ×ˢ A under the mapping (a, b) ↦ (a - b)^2.
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 of squared differences of a finite subset in a commutative ring. -/ def diff_squares {F : Type*} [CommRing F] [DecidableEq F] (A : Finset F) : Finset F := (A ×ˢ A).image (fun (a, b) => (a - b) ^ 2)