AFTD Auto-Formalizing Theoretical Domains

chessboard

def

For any natural number n, the chessboard of size n is the finite set of pairs of natural numbers (Finset (ℕ × ℕ)) given by the Cartesian product (Finset.range n) ×ˢ (Finset.range n).

Statement

def chessboard (n : ℕ) : Finset (ℕ × ℕ)
Defined in
arXiv:2611.12329 Piercing a Chessboard with Restricted Slopes, Section 1
Verified
12 Nov 2026
Axioms
none listed
Used by 2
  • asTraceThe trace of an ascending shallow path with coordinate function a : ℤ → ℤ on the n × n chessboard is the finite set of cells in chessboard…
  • as_dt_path_intersection_le_twoFor any natural number n and any coordinate functions a1 and a2 satisfying IsASPath, the intersection of asTrace n a1 and dtTrace n a2 has…

Read back from the Lean

For a natural number n, chessboard n is defined as the Cartesian product of Finset.range n with itself, which is the finite set of all pairs of natural numbers (r, c) such that r < n and c < n.

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 n x n chessboard of cells {0, ..., n-1} x {0, ..., n-1} as a Finset of pairs of natural numbers. -/
def chessboard (n : ℕ) : Finset (ℕ × ℕ) := (Finset.range n) ×ˢ (Finset.range n)
See it in the graphDiscuss this resultChallenge it