FormalConjectures/Wikipedia/WieferichPrime.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

7 declarations, 4 contain sorry, 0 declared as axioms

Wieferich primes

A Wieferich prime is a prime $p$ with $2^{p-1} \equiv 1 \pmod{p^2}$. The only known examples are $1093$ and $3511$. It is conjectured that there are infinitely many Wieferich primes; a heuristic argument suggests that the number of Wieferich primes up to $x$ grows like $\log \log x$.

More generally, a prime $p$ is a Wieferich prime to base $a$ if $a^{p-1} \equiv 1 \pmod{p^2}$. Wikipedia's list of unsolved problems also asks whether there are infinitely many Wieferich primes to every base $a > 0$, and whether there is any Wieferich prime to base $47$. It is also not known whether there is any Wieferich prime besides $1093$ and $3511$.

References:

Imports (1)
  1. theorem WieferichPrime.infinite_isWieferichPrime There are infinitely many Wieferich primes sorry line 46 source

    Source documentation

    There are infinitely many Wieferich primes.

    depends on sorry what this means

    Statement uses: Set.Infinite, Nat, Set.ofPred, IsWieferichPrime

    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 infinite_isWieferichPrime : {p : ℕ | IsWieferichPrime p}.Infinite := by
    …

    Mentions: IsWieferichPrime

  2. theorem WieferichPrime.isWieferichPrime_iff Are $1093$ and $3511$ the only Wieferich primes? sorry line 56 source

    Source documentation

    Are $1093$ and $3511$ the only Wieferich primes? They are the only known ones: PrimeGrid's search, completed in 2022, shows that any other Wieferich prime exceeds $2^{64}$. On the other hand, the heuristic count of $\log \log x$ Wieferich primes up to $x$ predicts that there are infinitely many, see infinite_isWieferichPrime.

    depends on sorry what this means

    Statement uses: Iff, True, Nat, IsWieferichPrime, Or, Eq, OfNat.ofNat

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

    2 instances, coercions and auxiliary constants left out.

    Tactic trace: 1 steps

    Open to load the checked before-and-after goal states.

    theorem isWieferichPrime_iff :
        answer(sorry) ↔ ∀ p, IsWieferichPrime p ↔ p = 1093 ∨ p = 3511 := by
    …

    Mentions: IsWieferichPrime

  3. theorem WieferichPrime.infinite_isWieferichPrimeBase For any given integer $a > 0$, are there infinitely many primes $p$ such that $a^{p-1} \equiv 1 \pmod{p^2}$? sorry line 67 source

    Source documentation

    For any given integer $a > 0$, are there infinitely many primes $p$ such that $a^{p-1} \equiv 1 \pmod{p^2}$? The case $a = 1$ is trivial, since every prime qualifies (isWieferichPrimeBase_one_iff). So is the case $a = 0$ under our definition (isWieferichPrimeBase_zero_iff), which is why the source's restriction to $a > 0$ is dropped.

    depends on sorry what this means

    Statement uses: Iff, True, Nat, Set.Infinite, Set.ofPred, IsWieferichPrimeBase

    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 infinite_isWieferichPrimeBase :
        answer(sorry) ↔ ∀ a : ℕ, {p : ℕ | IsWieferichPrimeBase a p}.Infinite := by
    …

    Mentions: IsWieferichPrimeBase

  4. theorem WieferichPrime.exists_isWieferichPrimeBase_47 Are there any Wieferich primes to base $47$? sorry line 73 source

    Source documentation

    Are there any Wieferich primes to base $47$? None is currently known.

    depends on sorry what this means

    Statement uses: Iff, True, Exists, Nat, IsWieferichPrimeBase, OfNat.ofNat

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

    2 instances, coercions and auxiliary constants left out.

    Tactic trace: 1 steps

    Open to load the checked before-and-after goal states.

    theorem exists_isWieferichPrimeBase_47 : answer(sorry) ↔ ∃ p, IsWieferichPrimeBase 47 p := by
    …

    Mentions: IsWieferichPrimeBase

  5. theorem WieferichPrime.isWieferichPrime_1093 The prime $1093$ is a Wieferich prime: $2^{1092} \equiv 1 \pmod{1093^2}$ line 78 source

    Source documentation

    The prime $1093$ is a Wieferich prime: $2^{1092} \equiv 1 \pmod{1093^2}$.

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

    Statement uses: IsWieferichPrime, OfNat.ofNat, Nat

    2 instances, coercions and auxiliary constants left out.

    Tactic trace: 1 steps

    Open to load the checked before-and-after goal states.

    theorem isWieferichPrime_1093 : IsWieferichPrime 1093 := by
    …

    Mentions: IsWieferichPrime

  6. theorem WieferichPrime.isWieferichPrime_3511 The prime $3511$ is a Wieferich prime: $2^{3510} \equiv 1 \pmod{3511^2}$ line 83 source

    Source documentation

    The prime $3511$ is a Wieferich prime: $2^{3510} \equiv 1 \pmod{3511^2}$.

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

    Statement uses: IsWieferichPrime, OfNat.ofNat, Nat

    Proof uses: IsWieferichPrimeBase.mk, 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, Mathlib.Meta.NormNum.minFacHelper_3, Bool.false, Mathlib.Meta.NormNum.minFacHelper_2, Mathlib.Meta.NormNum.not_prime_mul_of_ble, Mathlib.Meta.NormNum.minFacHelper_0

    4 instances, coercions and auxiliary constants left out.

    Tactic trace: 2 steps

    Open to load the checked before-and-after goal states.

    theorem isWieferichPrime_3511 : IsWieferichPrime 3511 :=
    …

    Mentions: IsWieferichPrime

  7. theorem WieferichPrime.not_isWieferichPrime_two The prime $2$ is not a Wieferich prime, so no hypothesis excluding it is needed line 88 source

    Source documentation

    The prime $2$ is not a Wieferich prime, so no hypothesis excluding it is needed.

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

    Statement uses: Not, IsWieferichPrime, OfNat.ofNat, Nat

    Proof uses: of_decide_eq_true, id, Eq, Bool, Decidable.decide, Bool.true, Eq.refl

    4 instances, coercions and auxiliary constants left out.

    Tactic trace: 1 steps

    Open to load the checked before-and-after goal states.

    theorem not_isWieferichPrime_two : ¬ IsWieferichPrime 2 := by
    …

    Mentions: IsWieferichPrime