Wilson theorem
On this page
This English edition is an AI candidate and does not yet have an OCME Atlas (GPT-6) Twin closure receipt.
An integer n>1 is prime exactly when (n−1)! is congruent to−1 modulo n.
mko-wilson-theorem · theorem · v0.10.0
Mathematical statement
Qualify the integer domain n>1. For a prime modulus list the inverses of every nonzero residue and cancel the distinct inverse pairs. When p>2 the self-inverse residues are1 and p−1; at p=2 they coincide. Exact factorial tables check the congruence at the specified modulus. Composite instances do not replace the converse proof, and a finite testing range does not prove the universal equivalence. Wilson factorial congruence and Fermat power congruence are different statements.
Representative formula (exact TeX)
W(n)=b
Assumptions
- The modulus is an exact integer and n>1 is checked first.
- Inverse pairing is used on the entire nonzero residue set only at a prime modulus.
Symbol scope
W— Wilson predicaten— integer modulusb— prime-congruence equivalence
Intuition, definition, and misconceptions
Check the domain and prime/composite status first.
List all inverse pairs and handle p=2 separately.
Finite examples do not replace either general proof direction.
Wilson is not Fermat little theorem; p=2 cannot be omitted and finite testing is not a universal proof.
Adopted derivation guide
Complete inverse pairing and both Wilson directionsThe original MKO is retained. The guide has its own append-only revision and verification boundaries, not a new Lean proof.
Prerequisites
- Prime natural number — State the prime iff criterion.
- Natural-number congruence modulo a positive modulus — Express the factorial congruence.
- Factorial — Use (n−1)!.
- Modular inverse — Support prime-direction inverse pairing.
Verification boundary
Modular factorial computation certifies only the specified modulus.
not_formalized
This does not mean the content is false; it means no replayable computational or formal evidence is registered yet.
Next obligation
Add Wilson quotients and primality algorithms.
Same-source structured data
This page and the interactive view use the same object and existing language edition; this adds no proof or human review.
Canonical MKO JSON · Plain Markdown