Number theory · existing Mathlib theorem
Fermat's Little Theorem
Choose a prime modulus p and a number n not divisible by p. Raising n to the power p−1 returns the unit residue 1 after reduction modulo p.
- Fermat's Little Theorem
- prime modulus
- modular exponentiation
- coprimality
Four separate status axes
These states distinguish upstream identity, local reproduction, review, and Atlas acceptance. This page is part of the public, read-only Mathlib landmark collection.
Formal orientation
Statement map
This deterministic map orients the reader from the mathematical summary to the pinned declaration and exact checked form. The HTML statement below is authoritative.
The theorem at a glance
Fermat's Little Theorem — exact coprime exponent form
A source-bound editorial overview of the exact Mathlib formulation. The image is explanatory; the statement map, formal type, and pinned source remain authoritative.
Fermat's Little Theorem — exact coprime exponent form

Detailed visual description
The retained poster presents the exact prime-modulus hypotheses, exponent p−1 conclusion, reading sequence, and boundary excluding the alternate n^p form, converses, and primality tests.
A unit residue returns to one

Detailed visual description
The theorem begins with a prime modulus and a coprime natural number, then concludes a precise congruence after p−1 repeated multiplications.
Complementary intuition
A mathematical landmark
Fermat's Little Theorem is a basic structural fact about arithmetic modulo a prime and a starting point for modern primality tests, finite-field calculations, and public-key cryptography.
The low-text schematic gives the theorem a visual identity; it does not replace the source-bound poster or exact statement.
Authoritative formal type
Exact Mathlib statement
theorem Nat.ModEq.pow_card_sub_one_eq_one {p : ℕ} (hp : Nat.Prime p) {n : ℕ} (hpn : n.Coprime p) : n ^ (p - 1) ≡ 1 [MOD p]Selected evidence declaration text
theorem Nat.ModEq.pow_card_sub_one_eq_one {p : ℕ} (hp : Nat.Prime p) {n : ℕ} (hpn : n.Coprime p) : n ^ (p - 1) ≡ 1 [MOD p]Claim boundary
No new theorem is claimed
This target indexes Mathlib's natural-number congruence form: if p is prime and n is coprime to p, then n^(p-1) is congruent to 1 modulo p. It does not state the alternate n^p congruent to n form, primality converses, or a new proof.
- The selected declaration is the coprime exponent form, not the alternate n^p congruent to n form.
- It is not a converse and does not characterize primes.
- ProofAtlas is indexing an existing Mathlib theorem, not claiming new mathematics.
Provenance
Origin and evidence stay separate
- Existing declaration
Nat.ModEq.pow_card_sub_one_eq_onein mathlib- Relationship
- The checked artifact is the upstream declaration itself
- Preferred checked artifact
artifact.library.mathlib.fermat-little-theorem.v001- Source handling
- Verified upstream reference; no mirrored source package