FormalConjectures/Wikipedia/Selfridge.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
9 declarations, 2 contain sorry, 0 declared as axioms
Selfridge's conjectures
Reference: Wikipedia
Imports (1)
Imported by 1 file
- structure
Selfridge.IsSelfridgeA numberpsatisfies the Selfridge condition if 1 line 43 sourceSource documentation
A number
psatisfies the Selfridge condition ifpis odd,p ≡ ± 2 (mod 5),2^(p-1) ≡ 1 (mod p)(p+1).fib ≡ 0 (mod p)
This is the condition that is tested in the PSW conjecture. Note: this is non-standard terminology.
standard axioms: propext what this means
Statement uses:
Natstructure IsSelfridge (p : ℕ) where …
- structure
Selfridge.IsPseudoSelfridgeA numberpsatisfies the Pseudo Selfridge condition if 1 line 61 sourceSource documentation
A number
psatisfies the Pseudo Selfridge condition ifpis odd,p ≡ ± 1 (mod 5),2^(p-1) ≡ 1 (mod p)(p-1).fib ≡ 0 (mod p)
This is a variant of the condition that is tested in the PSW conjecture, and appears in the wiki page mentioned above.
Note: this is non-standard terminology.
standard axioms: propext what this means
Statement uses:
Natstructure IsPseudoSelfridge (p : ℕ) where …
- theorem
Selfridge.selfridge_conjecturePSW conjecture (Selfridge's test) Let $p$ be an odd number, with $p \equiv \pm 2 \pmod{5}$, $2^{p-1} \equiv 1 \pmod{p}$ and $F_{p+1} \equiv 0 \pmod{p}$, then $p$ is a prime number sorry line 73 sourceSource documentation
PSW conjecture (Selfridge's test) Let $p$ be an odd number, with $p \equiv \pm 2 \pmod{5}$, $2^{p-1} \equiv 1 \pmod{p}$ and $F_{p+1} \equiv 0 \pmod{p}$, then $p$ is a prime number.
depends on sorry what this means
Statement uses:
Nat, Selfridge.IsSelfridge,Nat.PrimeProof 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 selfridge_conjecture (p : ℕ) (hp : IsSelfridge p) : p.Prime := by …
Mentions: Selfridge.IsSelfridge
- theorem
Selfridge.selfridge_conjecture.variants.exist_pseudo_counterexampleSelfridge's test variant: Let $p$ be an odd number, with $p \equiv \pm 1 \pmod{5}$, $2^{p-1} \equiv 1 \pmod{p}$ and $F_{p-1} \equiv 0 \pmod{p}$, then $p$ is a prime number line 84 sourceSource documentation
Selfridge's test variant: Let $p$ be an odd number, with $p \equiv \pm 1 \pmod{5}$, $2^{p-1} \equiv 1 \pmod{p}$ and $F_{p-1} \equiv 0 \pmod{p}$, then $p$ is a prime number.
This test does not work.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Exists,Nat,And,GT.gt,OfNat.ofNat, Selfridge.IsPseudoSelfridge,Not,Nat.PrimeProof uses:
Exists.intro,And.intro,Mathlib.Meta.NormNum.isNat_lt_true,Mathlib.Meta.NormNum.isNat_ofNat,Eq.refl,Bool,Bool.false,Selfridge.IsPseudoSelfridge.mk,Iff.mp,Eq,HMod.hMod,Bool.rec,Odd,Bool.true,Iff.symm,Nat.odd_iff,Mathlib.Meta.NormNum.isNat_eq_true,Mathlib.Meta.NormNum.isNat_natMod,of_eq_true,Orand 36 more31 instances, coercions and auxiliary constants left out.
Tactic trace: 4 steps
Open to load the checked before-and-after goal states.
theorem selfridge_conjecture.variants.exist_pseudo_counterexample : ∃ n > 1, IsPseudoSelfridge n ∧ ¬ n.Prime := by …Mentions: Selfridge.IsPseudoSelfridge
- theorem
Selfridge.selfridge_conjecture.variants.pseudo_counterexampleSelfridge's test variant: Let $p$ be an odd number, with $p \equiv \pm 1 \pmod{5}$, $2^{p-1} \equiv 1 \pmod{p}$ and $F_{p-1} \equiv 0 \pmod{p}$, then $p$ is a prime number line 98 sourceSource documentation
Selfridge's test variant: Let $p$ be an odd number, with $p \equiv \pm 1 \pmod{5}$, $2^{p-1} \equiv 1 \pmod{p}$ and $F_{p-1} \equiv 0 \pmod{p}$, then $p$ is a prime number.
The number $6601$ is a conterexample to this test satisfying $6601 ≡ 1 \mod 5$
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
And, Selfridge.IsPseudoSelfridge,OfNat.ofNat,Nat,Not,Nat.Prime,Nat.ModEqProof uses:
And.intro,Selfridge.IsPseudoSelfridge.mk,Iff.mp,Eq,HMod.hMod,Bool.rec,Bool,Odd,Bool.true,Iff.symm,Nat.odd_iff,Mathlib.Meta.NormNum.isNat_eq_true,Mathlib.Meta.NormNum.isNat_natMod,Mathlib.Meta.NormNum.isNat_ofNat,Eq.refl,of_eq_true,Or,Eq.trans,True,Falseand 33 more23 instances, coercions and auxiliary constants left out.
Tactic trace: 3 steps
Open to load the checked before-and-after goal states.
theorem selfridge_conjecture.variants.pseudo_counterexample : IsPseudoSelfridge 6601 ∧ ¬ (6601).Prime ∧ 6601 ≡ 1 [MOD 5] := by …Mentions: Selfridge.IsPseudoSelfridge
- theorem
Selfridge.selfridge_conjecture.variants.pseudo_counterexample'Selfridge's test variant: Let $p$ be an odd number, with $p \equiv \pm 1 \pmod{5}$, $2^{p-1} \equiv 1 \pmod{p}$ and $F_{p-1} \equiv 0 \pmod{p}$, then $p$ is a prime number line 111 sourceSource documentation
Selfridge's test variant: Let $p$ be an odd number, with $p \equiv \pm 1 \pmod{5}$, $2^{p-1} \equiv 1 \pmod{p}$ and $F_{p-1} \equiv 0 \pmod{p}$, then $p$ is a prime number.
The number $30889$ is a conterexample to this test satisfying $30889 ≡ - 1 \mod 5$
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
And, Selfridge.IsPseudoSelfridge,OfNat.ofNat,Nat,Not,Nat.Prime,Nat.ModEqProof uses:
And.intro,Selfridge.IsPseudoSelfridge.mk,Iff.mp,Eq,HMod.hMod,Bool.rec,Bool,Odd,Bool.true,Iff.symm,Nat.odd_iff,Mathlib.Meta.NormNum.isNat_eq_true,Mathlib.Meta.NormNum.isNat_natMod,Mathlib.Meta.NormNum.isNat_ofNat,Eq.refl,of_eq_true,Or,Eq.trans,True,Falseand 33 more23 instances, coercions and auxiliary constants left out.
Tactic trace: 3 steps
Open to load the checked before-and-after goal states.
theorem selfridge_conjecture.variants.pseudo_counterexample' : IsPseudoSelfridge 30889 ∧ ¬ (30889).Prime ∧ 30889 ≡ 4 [MOD 5] := by …Mentions: Selfridge.IsPseudoSelfridge
- def
Selfridge.fermatFactorsOEIS A46052 The number of distinct prime factors of nth Fermat number line 129 sourceSource documentation
OEIS A46052 The number of distinct prime factors of nth Fermat number. Known terms: 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 4, 5
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
NatProof uses:
Finset.card,Nat.primeFactors,Nat.fermatNumberdef fermatFactors (n : ℕ) : ℕ := n.fermatNumber.primeFactors.card …
- theorem
Selfridge.selfridge_seq_conjectureSelfridge conjectured that the number of prime factors of then-th Fermat number does not grow monotonically in $n$ sorry line 136 sourceSource documentation
Selfridge conjectured that the number of prime factors of the
n-th Fermat number does not grow monotonically in $n$.depends on sorry what this means
Statement uses:
Not,Monotone,Nat, Selfridge.fermatFactorsProof uses:
sorryAx,Lean.Name,Bool.false,Lean.Name.num,Lean.Name.str,Lean.Name.anonymous,OfNat.ofNat3 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
theorem selfridge_seq_conjecture : ¬ Monotone fermatFactors := by …
Mentions: Selfridge.fermatFactors
- theorem
Selfridge.selfridge_seq_conjecture.variants.sufficient_conditionSelfridge conjectured that the number of prime factors of then-th Fermat number does not grow monotonically in $n$ line 147 sourceSource documentation
Selfridge conjectured that the number of prime factors of the
n-th Fermat number does not grow monotonically in $n$.A sufficient condition for this conjecture to hold is that there exists a Fermat prime larger than 65537.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Prime,Nat.fermatNumber,GE.ge,OfNat.ofNat,Not,Monotone, Selfridge.fermatFactorsProof uses:
Eq,of_eq_true,Eq.trans,True,congrFun',congrArg,Finset.card,Nat.primeFactors,Singleton.singleton,Finset,Nat.Prime.primeFactors,Prime.nat_prime,Finset.card_singleton,eq_self,HMul.hMul,congr,Mathlib.Meta.NormNum.IsNat.to_eq,HAdd.hAdd,HPow.hPow,Mathlib.Meta.NormNum.isNat_addand 35 more35 instances, coercions and auxiliary constants left out.
Tactic trace: 14 steps
Open to load the checked before-and-after goal states.
theorem selfridge_seq_conjecture.variants.sufficient_condition (n : ℕ) (hn : Prime n.fermatNumber) (hn' : n ≥ 5) : type_of% selfridge_seq_conjecture := by …Mentions: Selfridge.selfridge_seq_conjecture