Alphabeta Math
TheoremStatement: Literature-sourcedProof: AI-adaptedSession-authored (Fable 5 assisted)precheck passaudited 2026-08-01
How statement and proof provenance work

The first chip identifies the source of the statement or construction; the second identifies the source of its local proof or verification.

  • Literature-sourced — the exact statement appears in a cited source; only wording and notation differ.
  • AI-adapted — a semantically identical restatement of literature-sourced material, modulo indexing, notation, and boundary cases adopted by the library.
  • AI-generated — a genuinely novel statement formulated by AI, with no source for the claim itself.

These labels describe origin, not correctness: citations and verification chips remain separate evidence.

Fermat's little theorem: for prime pp, pap\nmid a implies ap11(modp)a^{p-1}\equiv1\pmod p, and always apa(modp)a^p\equiv a\pmod p

Statement

Let pp be a prime integer and aZa\in\mathbb Z. If pap\nmid a, then

ap11(modp).a^{p-1}\equiv1\pmod p.

For every integer aa, without the nondivisibility hypothesis,

apa(modp).a^p\equiv a\pmod p.

Facts & Assumptions

Given: A prime integer pp and an integer aa.

[L1]

Euler's theorem gives aφ(p)1(modp)a^{\varphi(p)}\equiv1\pmod p when gcd(a,p)=1\gcd(a,p)=1, and φ(p)=p1\varphi(p)=p-1 for prime pp (Euler's theorem: if n1n\ge1 and gcd(a,n)=1\gcd(a,n)=1, then aφ(n)1(modn)a^{\varphi(n)}\equiv1\pmod n, φ(1)=1\varphi(1)=1, and φ(p)=p1\varphi(p)=p-1 for every prime pp).

Proof

technique · cases
1.1

Assume first that pap\nmid a. Then gcd(a,p)=1\gcd(a,p)=1, so [L1] gives ap11(modp)a^{p-1}\equiv1\pmod p. Multiplying by aa and using [L2] gives apa(modp)a^p\equiv a\pmod p.

assume-case nondivF1L1F2L2
1.2

Assume instead that pap\mid a. Then a0(modp)a\equiv0\pmod p, so repeated multiplication gives ap0p=0a(modp)a^p\equiv0^p=0\equiv a\pmod p.

assume-case divF1F2
2.1

The first assertion is contained in step 1.1, and the two exhaustive cases pap\nmid a and pap\mid a give the unconditional congruence.

step 1.1step 1.2cases-exhaustive

Depends on

Used by

Dependency tree · next 3 levels

Direct dependencies and their dependencies through the next three levels: 91 results over 24 levels. An arrow runs from a result to what uses it, and this result sits at the bottom with a heavier outline. Click the chart to enlarge it.

Sources