FormalConjectures/Wikipedia/WilsonPrime.lean
Explanation legend Lean4 Domain Explanation Language (L4DEL)
L4DEL explanations are a separate layer. They do not change the Lean source. Intuition is explanatory prose; numbered items are a reading path; sources link the wording back to evidence.
- L4DEL
- Lean4 Domain Explanation Language
Credit: The upstream authors and contributors retain credit for the project and mathematics. lean4-explainer only renders their pinned source and adds the separately disclosed explanation layer.
Project sources: Pinned project documentation, Formal Conjectures paper, arXiv v1
6 declarations, 1 contain sorry, 0 declared as axioms
Wilson primes
A Wilson prime is a prime $p$ for which $p^2$ divides $(p-1)!+1$. The only known examples are $5$, $13$, and $563$. It is conjectured that infinitely many Wilson primes exist.
References:
- Wikipedia, Wilson prime
- OEIS A007540
- E. Costa, R. Gerbicz, and D. Harvey, A search for Wilson primes
Imports (1)
- def
WilsonPrime.IsWilsonPrimeA Wilson prime is a prime $p$ such that $p^2 \mid (p-1)!+1$ line 38 sourceSource documentation
A Wilson prime is a prime $p$ such that $p^2 \mid (p-1)!+1$.
standard axioms: propext what this means
Statement uses:
NatProof uses:
And,Nat.Prime,Dvd.dvd,HPow.hPow,OfNat.ofNat,HAdd.hAdd,Nat.factorial,HSub.hSub10 instances, coercions and auxiliary constants left out.
def IsWilsonPrime (p : ℕ) : Prop := …
- theorem
WilsonPrime.infinitely_many_wilson_primesThere are infinitely many Wilson primes sorry line 43 sourceSource documentation
There are infinitely many Wilson primes.
depends on sorry what this means
Statement uses:
Set.Infinite,Nat,Set.ofPred, WilsonPrime.IsWilsonPrimeProof uses:
sorryAx,Lean.Name,Bool.false,Lean.Name.num,Lean.Name.str,Lean.Name.anonymous,OfNat.ofNat1 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
theorem infinitely_many_wilson_primes : Set.Infinite {p : ℕ | IsWilsonPrime p} := by …Mentions: WilsonPrime.IsWilsonPrime
- theorem
WilsonPrime.isWilsonPrime_fiveThe prime $5$ is a Wilson prime line 48 sourceSource documentation
The prime $5$ is a Wilson prime.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses: WilsonPrime.IsWilsonPrime,
OfNat.ofNat,NatProof uses:
of_eq_true,And,Nat.Prime,Dvd.dvd,HPow.hPow,HAdd.hAdd,Nat.factorial,HSub.hSub,Eq.trans,True,congr,congrArg,eq_true,Mathlib.Meta.NormNum.isNat_prime_2,Mathlib.Meta.NormNum.isNat_ofNat,Eq.refl,Bool,Bool.true,Mathlib.Meta.NormNum.isNat_minFac_4,Mathlib.Meta.NormNum.IsNat.raw_refland 11 more16 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
theorem isWilsonPrime_five : IsWilsonPrime 5 := by …
Mentions: WilsonPrime.IsWilsonPrime
- theorem
WilsonPrime.isWilsonPrime_thirteenThe prime $13$ is a Wilson prime line 53 sourceSource documentation
The prime $13$ is a Wilson prime.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses: WilsonPrime.IsWilsonPrime,
OfNat.ofNat,NatProof uses:
of_eq_true,And,Nat.Prime,Dvd.dvd,HPow.hPow,HAdd.hAdd,Nat.factorial,HSub.hSub,Eq.trans,True,congr,congrArg,eq_true,Mathlib.Meta.NormNum.isNat_prime_2,Mathlib.Meta.NormNum.isNat_ofNat,Eq.refl,Bool,Bool.true,Mathlib.Meta.NormNum.isNat_minFac_4,Mathlib.Meta.NormNum.IsNat.raw_refland 12 more16 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
theorem isWilsonPrime_thirteen : IsWilsonPrime 13 := by …
Mentions: WilsonPrime.IsWilsonPrime
- theorem
WilsonPrime.not_isWilsonPrime_oneThe primality condition excludes $1$, which satisfies the divisibility condition alone line 58 sourceSource documentation
The primality condition excludes $1$, which satisfies the divisibility condition alone.
standard axioms: propext what this means
Statement uses:
Not, WilsonPrime.IsWilsonPrime,OfNat.ofNat,NatProof uses:
of_eq_true,Eq.trans,True,False,congrArg,And,Nat.Prime,Dvd.dvd,HPow.hPow,HAdd.hAdd,Nat.factorial,HSub.hSub,congr,eq_false,Mathlib.Meta.NormNum.isNat_prime_1,Mathlib.Meta.NormNum.isNat_ofNat,Eq.refl,eq_true,Mathlib.Meta.NormNum.isNat_dvd_true,Mathlib.Meta.NormNum.isNat_powand 8 more16 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
theorem not_isWilsonPrime_one : ¬ IsWilsonPrime 1 := by …
Mentions: WilsonPrime.IsWilsonPrime
- theorem
WilsonPrime.not_isWilsonPrime_sevenThe prime $7$ is not a Wilson prime line 63 sourceSource documentation
The prime $7$ is not a Wilson prime.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Not, WilsonPrime.IsWilsonPrime,OfNat.ofNat,NatProof uses:
of_eq_true,Eq.trans,True,False,congrArg,And,Nat.Prime,Dvd.dvd,HPow.hPow,HAdd.hAdd,Nat.factorial,HSub.hSub,congr,eq_true,Mathlib.Meta.NormNum.isNat_prime_2,Mathlib.Meta.NormNum.isNat_ofNat,Eq.refl,Bool,Bool.true,Mathlib.Meta.NormNum.isNat_minFac_4and 16 more16 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
theorem not_isWilsonPrime_seven : ¬ IsWilsonPrime 7 := by …
Mentions: WilsonPrime.IsWilsonPrime