Alphabeta Math
TheoremStatement: Literature-sourcedProof: AI-adaptedprecheck passaudited 2026-07-31
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.

Wilson's theorem: for every prime p, (p−1)!≡−1(modp)

Statement

For every prime p,

(p−1)!≡−1(modp).

Facts & Assumptions

Given: A prime p.

[L1]

The unit classes modulo p other than [1]p and [−1]p occur in disjoint inverse pairs, while those displayed classes are the only self-inverse ones; at p=2 they coincide (In (Z/p)×, inversion pairs every class except [1]p and [−1]p, which are the only self-inverse classes).

[L4]

Equality of residue classes modulo p is equivalent to congruence modulo p (The congruence class [a]n and the quotient set Z/n), and congruence means divisibility of the difference (Congruence modulo an integer: a≡b(modn) when n∣(a−b), including the moduli 0 and 1).

[L5]

The quotient Z/p is a field, so every nonzero class is a unit (For every prime p, the two operations on Z/p make it a field).

[F1]

Products of residue classes are computed by multiplying representatives: [a]p[b]p=[ab]p (Addition and multiplication on Z/n by [a]n+[b]n=[a+b]n and [a]n[b]n=[ab]n).

Proof

technique · direct
1.1

By [L5], the nonzero classes are exactly the unit classes. Multiply them all and regroup by [L1]: every two-element inverse pair contributes [1]p. If the two displayed self-inverse classes are distinct, their contribution is [1]p[−1]p=[−1]p; if they coincide, their single common contribution is itself [−1]p. Thus in every case the product of all nonzero classes is [−1]p.

L1L3L5
2.1

By [L2] and [F1], that same class product is [(p−1)!]p. Therefore [(p−1)!]p=[−1]p, which is exactly (p−1)!≡−1(modp) by [L4].

step 1.1L2L4F1∎

Depends on

Used by

Nothing in the library uses this result yet.

Dependency tree · two levels

52 results within two dependency steps of this one, each drawn at its shortest distance from it. An arrow runs from a result to what uses it, so the chart reads left to right and ends at this result, which carries a heavier outline. Every node is a link to that result. Click elsewhere on the chart to enlarge it.

Sources