A Pell identity for
ProvedPellEquation.xn_sub_one_mulA factored form of the Pell equation.
Let and let be the -th solution of the Pell equation , so that . Then
The left-hand side is , so the identity is exactly the Pell equation itself, rewritten so that the factor appears explicitly. Writing it this way exposes as a divisor of , which is what one needs when analysing the divisibility of Pell solutions — for instance showing that a prime dividing cannot divide for odd , or extracting square factors from .
Pell solutions grow exponentially and satisfy the linear recurrences , , which makes them a standard source of explicit integer sequences with prescribed divisibility — the mechanism behind Matiyasevich's resolution of Hilbert's tenth problem, and behind elementary constructions of integers with controlled prime factorisations.
Formalization note. Pell.xn and Pell.yn are Mathlib's Pell solutions for the equation
; the expression is written that way to stay within
, where makes the truncated subtraction exact.
import Mathlib
namespace PellEquation
theorem xn_sub_one_mul {a : ℕ} (a1 : 1 < a) (m : ℕ) :
(Pell.xn a1 m - 1) * (Pell.xn a1 m - 1 + 2)
= (a ^ 2 - 1) * (Pell.yn a1 m * Pell.yn a1 m) := by sorry
end PellEquation