Fact Pell_sym x y : Pell x y <-> Pell y x.

(* Specifications: *)
Theorem Pell_zero_left y : Pell 0 y <-> y = 1 \/ y = -1.
Theorem Pell_zero_right x : Pell x 0 <-> x = 1 \/ x = -1.
Theorem Pell_not_diag x : ~ Pell x x.
Theorem Pell_opposite_not x y : y < 0 -> 0 < x -> ~ Pell x y.
Theorem Pell_alpha x y : 0 <= y < x -> Pell x y -> { n | x = α (S (S n)) /\ y = α (S n) }.
End Pell.
Theorem alpha_nat_Pell b n :
2 <= b -> alpha_nat b (S n)*alpha_nat b (S n) +  alpha_nat b n * alpha_nat b n
= 1 + b*(alpha_nat b (S n) * alpha_nat b n).
Theorem alpha_nat_Pell' b n :
2 <= b -> alpha_nat b n*alpha_nat b n +  alpha_nat b (S n) * alpha_nat b (S n)
= 1 + b*(alpha_nat b n * alpha_nat b (S n)).
Theorem Pell_alpha_nat b x y : 2 <= b -> y <= x -> x*x+y*y = 1+b*(x*y) -> { n | x = alpha_nat b (S n) /\ y = alpha_nat b n }.
Corollary Pell_alpha_nat' b x y : 2 <= b -> x*x+y*y = 1+b*(x*y) -> { n | x = alpha_nat b n }.
Theorem alpha_nat_2lm b n m l j v :
2 <= b
-> v = alpha_nat b (S (S m)) - alpha_nat b m
-> arem n (S m) l j
-> rem (alpha_nat b n) v = rem (alpha_nat b j) v
\/ rem (alpha_nat b n + alpha_nat b j) v = 0.