Public Mathlib landmark · existing upstream theorem · read-only

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.

Four separate status axes

Upstream indexedPinned source bytes verified locally
Locally reproducedExact upstream declaration replayed
Reviewed page2 of 3 presentation reviews recorded
Accepted Atlas resultNot recorded for the preferred artifact

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

Statement map for Fermat's Little TheoremIf p is prime and n is coprime to p, then n^(p-1) is congruent to 1 modulo p. The pinned upstream declaration is Nat.ModEq.pow_card_sub_one_eq_one. The exact checked statement is 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].Mathematical readingIf p is prime and n iscoprime to p, thenn^(p-1) is congruent to1 modulo p.Pinned declarationmathlib ·Nat.ModEq.pow_card_sub_one_eq_oneExact checked formtheoremNat.ModEq.pow_card_sub_one_eq_one{p : ℕ} (hp : Nat.Primep) {n : ℕ} (hpn :n.Coprime p) : n ^ (p -1) ≡ 1 [MOD p]Statement map for Fermat's Little TheoremIf p is prime and n is coprime to p, then n^(p-1) is congruent to 1 modulo p. The pinned upstream declaration is Nat.ModEq.pow_card_sub_one_eq_one. The exact checked statement is 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].Mathematical readingIf p is prime and n iscoprime to p, thenn^(p-1) is congruent to1 modulo p.Pinned declarationmathlib ·Nat.ModEq.pow_card_sub_one_eq_oneExact checked formtheoremNat.ModEq.pow_card_sub_one_eq_one{p : ℕ} (hp : Nat.Primep) {n : ℕ} (hpn :n.Coprime p) : n ^ (p -1) ≡ 1 [MOD p]

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.

The selected Mathlib theorem states the coprime exponent form of Fermat's Little Theorem. Generated explanation only; the exact HTML statement and pinned source are authoritative.
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.

For prime p and n coprime to p, the exponent p−1 returns n to residue 1 modulo p. Generated explanation only; the exact HTML statement and pinned source are authoritative.
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.

Provenance

Origin and evidence stay separate

Existing declaration
Nat.ModEq.pow_card_sub_one_eq_one in 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