FormalConjectures/Wikipedia/WilsonPrime.lean

GitHub source file

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:

Imports (1)
  1. def WilsonPrime.IsWilsonPrime A Wilson prime is a prime $p$ such that $p^2 \mid (p-1)!+1$ line 38 source

    Source documentation

    A Wilson prime is a prime $p$ such that $p^2 \mid (p-1)!+1$.

    standard axioms: propext what this means

    Statement uses: Nat

    Proof uses: And, Nat.Prime, Dvd.dvd, HPow.hPow, OfNat.ofNat, HAdd.hAdd, Nat.factorial, HSub.hSub

    10 instances, coercions and auxiliary constants left out.

    def IsWilsonPrime (p : ℕ) : Prop :=
    …
  2. theorem WilsonPrime.infinitely_many_wilson_primes There are infinitely many Wilson primes sorry line 43 source

    Source documentation

    There are infinitely many Wilson primes.

    depends on sorry what this means

    Statement uses: Set.Infinite, Nat, Set.ofPred, WilsonPrime.IsWilsonPrime

    Proof uses: sorryAx, Lean.Name, Bool.false, Lean.Name.num, Lean.Name.str, Lean.Name.anonymous, OfNat.ofNat

    1 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

  3. theorem WilsonPrime.isWilsonPrime_five The prime $5$ is a Wilson prime line 48 source

    Source documentation

    The prime $5$ is a Wilson prime.

    standard axioms: Classical.choice, Quot.sound, propext what this means

    Statement uses: WilsonPrime.IsWilsonPrime, OfNat.ofNat, Nat

    Proof 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_refl and 11 more

    16 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

  4. theorem WilsonPrime.isWilsonPrime_thirteen The prime $13$ is a Wilson prime line 53 source

    Source documentation

    The prime $13$ is a Wilson prime.

    standard axioms: Classical.choice, Quot.sound, propext what this means

    Statement uses: WilsonPrime.IsWilsonPrime, OfNat.ofNat, Nat

    Proof 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_refl and 12 more

    16 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

  5. theorem WilsonPrime.not_isWilsonPrime_one The primality condition excludes $1$, which satisfies the divisibility condition alone line 58 source

    Source 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, Nat

    Proof 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_pow and 8 more

    16 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

  6. theorem WilsonPrime.not_isWilsonPrime_seven The prime $7$ is not a Wilson prime line 63 source

    Source 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, Nat

    Proof 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_4 and 16 more

    16 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