FormalConjectures/Wikipedia/WieferichPrime.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
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:
- Wikipedia, List of unsolved problems in mathematics
- Wikipedia, Wieferich prime
- OEIS A001220
- P. Ribenboim, Die Welt der Primzahlen, 2nd ed., Springer (2006), pp. 242–243.
- PrimeGrid, Wieferich and Wall–Sun–Sun Prime Search
Imports (1)
- theorem
WieferichPrime.infinite_isWieferichPrimeThere are infinitely many Wieferich primes sorry line 46 sourceSource documentation
There are infinitely many Wieferich primes.
depends on sorry what this means
Statement uses:
Set.Infinite,Nat,Set.ofPred, IsWieferichPrimeProof 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 infinite_isWieferichPrime : {p : ℕ | IsWieferichPrime p}.Infinite := by …Mentions: IsWieferichPrime
- theorem
WieferichPrime.isWieferichPrime_iffAre $1093$ and $3511$ the only Wieferich primes? sorry line 56 sourceSource 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.ofNatProof uses:
sorryAx,Lean.Name,Bool.false,Lean.Name.num,Lean.Name.str,Lean.Name.anonymous2 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
- theorem
WieferichPrime.infinite_isWieferichPrimeBaseFor any given integer $a > 0$, are there infinitely many primes $p$ such that $a^{p-1} \equiv 1 \pmod{p^2}$? sorry line 67 sourceSource 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, IsWieferichPrimeBaseProof 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 infinite_isWieferichPrimeBase : answer(sorry) ↔ ∀ a : ℕ, {p : ℕ | IsWieferichPrimeBase a p}.Infinite := by …Mentions: IsWieferichPrimeBase
- theorem
WieferichPrime.exists_isWieferichPrimeBase_47Are there any Wieferich primes to base $47$? sorry line 73 sourceSource 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.ofNatProof uses:
sorryAx,Lean.Name,Bool.false,Lean.Name.num,Lean.Name.str,Lean.Name.anonymous2 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
- theorem
WieferichPrime.isWieferichPrime_1093The prime $1093$ is a Wieferich prime: $2^{1092} \equiv 1 \pmod{1093^2}$ line 78 sourceSource 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,Nat2 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
- theorem
WieferichPrime.isWieferichPrime_3511The prime $3511$ is a Wieferich prime: $2^{3510} \equiv 1 \pmod{3511^2}$ line 83 sourceSource 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,NatProof 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_04 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
- theorem
WieferichPrime.not_isWieferichPrime_twoThe prime $2$ is not a Wieferich prime, so no hypothesis excluding it is needed line 88 sourceSource 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,NatProof uses:
of_decide_eq_true,id,Eq,Bool,Decidable.decide,Bool.true,Eq.refl4 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