AFTD Auto-Formalizing Theoretical Domains

three_val_poly_eval_mem

theoremverified

In any commutative ring $K$, the polynomial $(x - a) * (x - b) * (x - c)$ evaluates to $0$ at any $x \in \{a, b, c\}$.

Statement

theorem three_val_poly_eval_mem {K : Type*} [CommRing K] (a b c x : K)
    (hx : x ∈ ({a, b, c} : Set K)) :
    (x - a) * (x - b) * (x - c) = 0
Source
arXiv:2610.39908, Proposition A.1 proof, Low-rank matrices with three prescribed off-diagonal values over F_p
Verified
03 Nov 2026
Axioms
Quot.soundpropext

Read back from the Lean

For any commutative ring $K$ and any elements $a, b, c, x \in K$, if $x \in \{a, b, c\}$, then $(x - a) * (x - b) * (x - c) = 0$.

Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.

The proof, explained

The proof proceeds by case analysis on the membership $x \in \{a, b, c\}$. Since $x$ must equal $a$, $b$, or $c$, one of the linear factors in $(x - a)(x - b)(x - c)$ vanishes in each case. Commutative ring arithmetic then confirms that the entire product evaluates to zero.

  1. $(x - a)(x - b)(x - c) = 0$ automation

    The membership hypothesis $x \in \{a, b, c\}$ (`hx`) splits into three possibilities: $x = a$, $x = b$, or $x = c$. In each branch, substituting this equality turns one of the factors into $x - x = 0$, and polynomial arithmetic in a commutative ring (`ring`) reduces the product to $0$.

    line 5

      rcases hx with rfl | rfl | rfl <;> ring

Written by a model (gemini-3.8-flash) from the Lean proof and the goal states Lean reported at each step. Lean verified the proof; this explanation is a reading aid and is not itself machine-checked.

Lean source view module on GitHub

/-- The polynomial (X - a)(X - b)(X - c) vanishes at each of a, b, c. -/theorem three_val_poly_eval_mem {K : Type*} [CommRing K] (a b c x : K)    (hx : x ∈ ({a, b, c} : Set K)) :    (x - a) * (x - b) * (x - c) = 0 := by  rcases hx with rfl | rfl | rfl <;> ring
See it in the graphDiscuss this resultChallenge it