The shift rule for the Fermat quotient #
For the Fermat quotient q(l) = (l^(p−1) − 1)/p:
(l + p t)^(p−1) ≡ l^(p−1) − p t l^(p−2) (mod p²), hence q(l + p t) ≡ q(l) − t / l (mod p).
The binomial step is Mathlib's sq_dvd_add_pow_sub_sub.
Main results #
ConjeturaC.sq_dvd_shift,ConjeturaC.pow_shift_zmod_sq: the congruence modulop².ConjeturaC.fermatQuot_shift:q(l + p t) ≡ q(l) − t l⁻¹ (mod p)forp ∤ l.