FormalConjecturesForMathlib/NumberTheory/WallSunSunPrimes.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, 0 contain sorry, 0 declared as axioms
Wall-Sun-Sun primes
References:
Imported by 1 file
- def
LucasSequence.UThe Lucas sequence of the first kind $U_0(P, Q) = 0$, $U_1(P, Q)=1$, $U_{n+2}(P, Q)=PU_{n+1}(P, Q)-QU_n(P, Q)$ line 38 sourceSource documentation
The Lucas sequence of the first kind $U_0(P, Q) = 0$, $U_1(P, Q)=1$, $U_{n+2}(P, Q)=PU_{n+1}(P, Q)-QU_n(P, Q)$
no axioms what this means
Statement uses:
Int,Nat2 instances, coercions and auxiliary constants left out.
def LucasSequence.U (P Q : ℤ) : ℕ → ℤ | 0 => 0 | 1 => 1 | n + 2 => P * LucasSequence.U P Q (n + 1) - Q * LucasSequence.U P Q n /-- **The Lucas sequence of the second kind** $V_0(P, Q) = 0$, $V_1(P, Q)=P$, $V_{n+2}(P, Q)=PV_{n+1}(P, Q)-QV_n(P, Q)$ -/ - def
LucasSequence.VThe Lucas sequence of the second kind $V_0(P, Q) = 0$, $V_1(P, Q)=P$, $V_{n+2}(P, Q)=PV_{n+1}(P, Q)-QV_n(P, Q)$ line 47 sourceSource documentation
The Lucas sequence of the second kind $V_0(P, Q) = 0$, $V_1(P, Q)=P$, $V_{n+2}(P, Q)=PV_{n+1}(P, Q)-QV_n(P, Q)$
no axioms what this means
Statement uses:
Int,Nat2 instances, coercions and auxiliary constants left out.
def LucasSequence.V (P Q : ℤ) : ℕ → ℤ | 0 => 2 | 1 => P | n + 2 => P * LucasSequence.V P Q (n + 1) - Q * LucasSequence.V P Q n /-- **The Lucas numbers** $L_0 = 2$, $L_1=1$, $L_{n+2} = L_{n+1}+L_n$ -/ - def
lucasNumberThe Lucas numbers $L_0 = 2$, $L_1=1$, $L_{n+2} = L_{n+1}+L_n$ line 56 sourceSource documentation
The Lucas numbers $L_0 = 2$, $L_1=1$, $L_{n+2} = L_{n+1}+L_n$
no axioms what this means
Statement uses:
Nat,IntProof uses: LucasSequence.V,
OfNat.ofNat,Neg.neg2 instances, coercions and auxiliary constants left out.
def lucasNumber : ℕ → ℤ := LucasSequence.V 1 (-1)
Mentions: LucasSequence.V
- structure
IsWallSunSunPrimeWall–Sun–Sun prime A prime $p$ is a Wall–Sun–Sun prime if and only if $L_p \equiv 1 \pmod{p^2}$, where $L_p$ is the $p$-th Lucas number line 63 sourceSource documentation
Wall–Sun–Sun prime A prime $p$ is a Wall–Sun–Sun prime if and only if $L_p \equiv 1 \pmod{p^2}$, where $L_p$ is the $p$-th Lucas number.
standard axioms: propext what this means
Statement uses:
Natstructure IsWallSunSunPrime (p : ℕ) : Prop where …
- structure
IsLucasWieferichPrimeDocumented declaration: IsLucasWieferichPrime line 77 sourceSource documentation
Lucas–Wieferich prime A Lucas–Wieferich prime associated with $(a,b)$ is an odd prime $p$, not dividing $a^2 - 4b$, such that $U_{p-\varepsilon}(a,b) \equiv 0 \pmod{p^2}$ where $U(a,b)$ is the Lucas sequence of the first kind and $\varepsilon$ is the Legendre symbol $\left({\tfrac {a^{2}-4b}{p}}\right)$.
See first paragraph of https://en.wikipedia.org/wiki/Wall%E2%80%93Sun%E2%80%93Sun_prime#Wall%E2%80%93Sun%E2%80%93Sun_primes_with_discriminant_D for the condition that $p$ is odd and coprime to the discriminant
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Int,Natstructure IsLucasWieferichPrime (a b : ℤ) (p : ℕ) : Prop where …
- theorem
LucasSequence.dvd_U_two_mulThe parameter $P$ divides every even-indexed term of the Lucas sequence $U(P, Q)$ line 84 sourceSource documentation
The parameter $P$ divides every even-indexed term of the Lucas sequence $U(P, Q)$.
standard axioms: Quot.sound, propext what this means
Statement uses:
Int,Nat,Dvd.dvd, LucasSequence.U,HMul.hMul,OfNat.ofNatProof uses:
Nat.recAux,of_eq_true,Eq.mpr,HAdd.hAdd,id,Eq,congrArg,Nat.succ,Nat.mul_succ,dvd_sub,dvd_mul_right,dvd_mul_of_dvd_right25 instances, coercions and auxiliary constants left out.
Tactic trace: 5 steps
Open to load the checked before-and-after goal states.
theorem LucasSequence.dvd_U_two_mul (P Q : ℤ) (k : ℕ) : P ∣ LucasSequence.U P Q (2 * k) := by …
Mentions: LucasSequence.U
- theorem
IsLucasWieferichPrime.of_sq_dvdDocumented declaration: of_sq_dvd line 95 sourceSource documentation
If $p^2 \mid a$, then every odd prime $p$ not dividing $a^2 - 4b$ is a Lucas–Wieferich prime associated with $(a, b)$: the index $p - \left(\tfrac{a^2-4b}{p}\right)$ is even, and $a$ divides every even-indexed term of $U(a, b)$.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Int,Nat,Nat.Prime,Odd,Not,Dvd.dvd,HSub.hSub,HPow.hPow,OfNat.ofNat,HMul.hMul, IsLucasWieferichPrimeProof uses:
IsLucasWieferichPrime.mk,Eq.mpr,Int.ModEq, LucasSequence.U,Int.toNat,jacobiSym,id,Eq,congrArg,propext,Int.modEq_zero_iff_dvd,Int.gcd,Int.natAbs,Iff.mpr,Int.natCast_dvd,Nat.gcd,Int.gcd_eq_natAbs,Int.natAbs_natCast,Nat.gcd_comm,Nat.Coprimeand 8 more50 instances, coercions and auxiliary constants left out.
Tactic trace: 20 steps
Open to load the checked before-and-after goal states.
theorem IsLucasWieferichPrime.of_sq_dvd {a b : ℤ} {p : ℕ} (hp : p.Prime) (hodd : Odd p) (hpd : ¬(p : ℤ) ∣ a ^ 2 - 4 * b) (ha : (p : ℤ) ^ 2 ∣ a) : IsLucasWieferichPrime a b p := by …Mentions: IsLucasWieferichPrime