Theorems · Theorem · number theory
lucas_primality
∀ (p : ℕ) (a : ZMod p), a ^ (p - 1) = 1 → (∀ (q : ℕ), Nat.Prime q → q ∣ p - 1 → a ^ ((p - 1) / q) ≠ 1) → Nat.Prime p
If a^(p-1) = 1 mod p, but a^((p-1)/q) ≠ 1 mod p for all prime factors q of p-1, then p
is prime. This is true because a has order p-1 in the multiplicative group mod p, so this
group must itself have order p-1, which only happens when p is prime.
- Defined in
- Mathlib.NumberTheory.LucasPrimality
- Cited by
- 2 results in Mathlib
- Foundations
- Depth 82 from the axioms · uses propext, Classical.choice, Quot.sound
Around this declaration
Dashed lines are statement dependencies; solid lines are citations in proofs.
Cites18
Mathlib declarations this one mentions in its statement or cites explicitly in its proof. Plumbing is filtered out.
- Unitsproof · cited by 2,804
- Nat.Primestatement and proof · cited by 2,059
- pow_zeroproof · cited by 1,094
- ZModstatement and proof · cited by 1,024
- LE.le.antisymmproof · cited by 507
- pow_succ'proof · cited by 228
- dvd_zeroproof · cited by 63
- Nat.prime_twoproof · cited by 55
- Units.coeHomproof · cited by 44
- tsub_pos_of_ltproof · cited by 31
- tsub_add_eq_add_tsubproof · cited by 23
- Units.val_injectiveproof · cited by 17
Cited by2
Results whose statement or proof uses this declaration.
- Nat.pepin_primalityproof · cited by 1
- lucas_primality_iffproof · cited by 0