Documentation

Little.Basic

Little.Basic #

This file provides Fermat's little theorem.

Results #

Notes #

You should use Nat.ModEq.pow_totient instead of mod_pow_Fermat.

theorem mod_add_pow {p m n : ℕ} (hp : Nat.Prime p) :
(m + n) ^ p ≡ m ^ p + n ^ p [MOD p]
theorem mod_pow_Fermat {p n : ℕ} (hp : Nat.Prime p) :
n ^ p ≡ n [MOD p]

Fermat's little theorem