AFTD Auto-Formalizing Theoretical Domains

finite_plane_is_equilateral_triangle

def

Three points $X, Y, Z \in \mathbb{F}_p^2$ form an equilateral triangle with nonzero squared side length if they are pairwise distinct and $\|X-Y\|^2 = \|Y-Z\|^2 = \|Z-X\|^2 \neq 0$.

Statement

def finite_plane_is_equilateral_triangle {p : ℕ} (X Y Z : ZMod p × ZMod p) : Prop
Defined in
arXiv:2611.20408, Section 1, equation (1)
Verified
22 Nov 2026
Axioms
none listed
Built on 1
  • finite_plane_sq_normThe squared norm of a vector $(a, b) \in \mathbb{F}_p^2$ is defined as $\|(a, b)\|^2 = a^2 + b^2$.

Read back from the Lean

The proposition that three points $X, Y, Z \in (\mathbb{Z}/p\mathbb{Z})^2$ form an equilateral triangle in the finite affine plane over $\mathbb{Z}/p\mathbb{Z}$, meaning that $X, Y, Z$ are pairwise distinct ($X \neq Y$, $Y \neq Z$, and $Z \neq X$), the squared norm of $X - Y$ equals the squared norm of $Y - Z$, the squared norm of $Y - Z$ equals the squared norm of $Z - X$, and the squared norm of $X - Y$ is non-zero in $\mathbb{Z}/p\mathbb{Z}$.

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

/-- Predicate asserting that three points in (ZMod p)^2 form an equilateral triangle with nonzero squared side length. -/
def finite_plane_is_equilateral_triangle {p : ℕ} (X Y Z : ZMod p × ZMod p) : Prop :=
  X ≠ Y ∧ Y ≠ Z ∧ Z ≠ X ∧
  finite_plane_sq_norm (X - Y) = finite_plane_sq_norm (Y - Z) ∧
  finite_plane_sq_norm (Y - Z) = finite_plane_sq_norm (Z - X) ∧
  finite_plane_sq_norm (X - Y) ≠ 0
See it in the graphDiscuss this resultChallenge it