FormalConjectures/Wikipedia/WallSunSun.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
13 declarations, 9 contain sorry, 0 declared as axioms
Infinitude of Wall–Sun–Sun primes
References:
- Wikipedia
- [EJ10] A.-S. Elsenhans and J. Jahnel, The Fibonacci sequence modulo $p^2$ – An investigation by computer for $p < 10^{14}$, arXiv:1006.0824
Imports (1)
- lemma
QuadraticAlgebra.discr_rat_of_modEq_oneThe discriminant ofℚ[√d]ford ≥ 2squarefree congruent to 1 mod 4 isdsorry line 39 sourceSource documentation
The discriminant of
ℚ[√d]ford ≥ 2squarefree congruent to 1 mod 4 isd.depends on sorry what this means
Statement uses:
Int,Fact,Squarefree,Ne,OfNat.ofNat,Int.ModEq,Eq,NumberField.discr,QuadraticAlgebra,RatProof uses:
sorryAx,Lean.Name,Bool.false,Lean.Name.num,Lean.Name.str,Lean.Name.anonymous,Nat27 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
lemma discr_rat_of_modEq_one (hd₄ : d ≡ 1 [ZMOD 4]) : discr (QuadraticAlgebra ℚ d 0) = d := by …
- lemma
QuadraticAlgebra.discr_rat_of_not_modEq_oneThe discriminant ofℚ[√d]ford ≥ 2squarefree not congruent to 1 mod 4 is4 * dsorry line 44 sourceSource documentation
The discriminant of
ℚ[√d]ford ≥ 2squarefree not congruent to 1 mod 4 is4 * d.depends on sorry what this means
Statement uses:
Int,Fact,Squarefree,Ne,OfNat.ofNat,Not,Int.ModEq,Eq,NumberField.discr,QuadraticAlgebra,Rat,HMul.hMulProof uses:
sorryAx,Lean.Name,Bool.false,Lean.Name.num,Lean.Name.str,Lean.Name.anonymous,Nat31 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
lemma discr_rat_of_not_modEq_one (hd₄ : ¬ d ≡ 1 [ZMOD 4]) : discr (QuadraticAlgebra ℚ d 0) = 4 * d := by … - lemma
Algebra.exists_quadraticAlgebra_of_isQuadraticExtensionA quadratic algebraLover a fieldKis isomorphic to the explicit quadratic algebraQuadraticAlgebra K a bfor somea b : Ksorry line 57 sourceSource documentation
A quadratic algebra
Lover a fieldKis isomorphic to the explicit quadratic algebraQuadraticAlgebra K a bfor somea b : K.depends on sorry what this means
Statement uses:
Field,Algebra,Algebra.IsQuadraticExtension,Exists,Nonempty,AlgEquiv,QuadraticAlgebraProof uses:
sorryAx,Lean.Name,Bool.false,Lean.Name.num,Lean.Name.str,Lean.Name.anonymous,OfNat.ofNat,Nat41 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
lemma exists_quadraticAlgebra_of_isQuadraticExtension [IsQuadraticExtension K L] : ∃ a b, Nonempty (L ≃ₐ[K] QuadraticAlgebra K a b) := by … - lemma
Algebra.isQuadraticExtension_iff_exists_quadraticAlgebraAn algebraLis quadratic over a fieldKiff it is isomorphic to the explicit quadratic algebraQuadraticAlgebra K a bfor somea b : Ksorry line 64 sourceSource documentation
An algebra
Lis quadratic over a fieldKiff it is isomorphic to the explicit quadratic algebraQuadraticAlgebra K a bfor somea b : K.depends on sorry what this means
Statement uses:
Field,Algebra,Iff,Algebra.IsQuadraticExtension,Exists,Nonempty,AlgEquiv,QuadraticAlgebraProof uses:
Iff.intro, Algebra.exists_quadraticAlgebra_of_isQuadraticExtension,sorryAx,Lean.Name,Bool.false,Lean.Name.num,Lean.Name.str,Lean.Name.anonymous,OfNat.ofNat,Nat43 instances, coercions and auxiliary constants left out.
Tactic trace: 2 steps
Open to load the checked before-and-after goal states.
lemma isQuadraticExtension_iff_exists_quadraticAlgebra : IsQuadraticExtension K L ↔ ∃ a b, Nonempty (L ≃ₐ[K] QuadraticAlgebra K a b) where … - lemma
NumberField.exists_quadraticAlgebra_of_isQuadraticExtensionA quadratic number fieldKis isomorphic to the explicit quadratic fieldQuadraticAlgebra ℚ d 0for some squarefreed : ℤnot equal to 1 sorry line 78 sourceSource documentation
A quadratic number field
Kis isomorphic to the explicit quadratic fieldQuadraticAlgebra ℚ d 0for some squarefreed : ℤnot equal to 1.depends on sorry what this means
Statement uses:
Field,NumberField,Algebra.IsQuadraticExtension,Rat,Exists,Int,And,Ne,OfNat.ofNat,Squarefree,Nonempty,RingEquiv,QuadraticAlgebraProof uses:
sorryAx,Lean.Name,Bool.false,Lean.Name.num,Lean.Name.str,Lean.Name.anonymous,Nat45 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
lemma exists_quadraticAlgebra_of_isQuadraticExtension [IsQuadraticExtension ℚ K] : ∃ d ≠ (1 : ℤ), Squarefree d ∧ Nonempty (K ≃+* QuadraticAlgebra ℚ d 0) := by … - lemma
NumberField.isQuadraticExtension_iff_exists_quadraticAlgebraA number fieldKis quadratic iff it is isomorphic to the explicit quadratic fieldQuadraticAlgebra ℚ d 0for some squarefreed : ℤnot equal to 1 sorry line 85 sourceSource documentation
A number field
Kis quadratic iff it is isomorphic to the explicit quadratic fieldQuadraticAlgebra ℚ d 0for some squarefreed : ℤnot equal to 1.depends on sorry what this means
Statement uses:
Field,NumberField,Iff,Algebra.IsQuadraticExtension,Rat,Exists,Int,And,Ne,OfNat.ofNat,Squarefree,Nonempty,RingEquiv,QuadraticAlgebraProof uses:
Iff.intro, NumberField.exists_quadraticAlgebra_of_isQuadraticExtension,sorryAx,Lean.Name,Bool.false,Lean.Name.num,Lean.Name.str,Lean.Name.anonymous,Nat48 instances, coercions and auxiliary constants left out.
Tactic trace: 2 steps
Open to load the checked before-and-after goal states.
lemma isQuadraticExtension_iff_exists_quadraticAlgebra : IsQuadraticExtension ℚ K ↔ ∃ d ≠ (1 : ℤ), Squarefree d ∧ Nonempty (K ≃+* QuadraticAlgebra ℚ d 0) where … - lemma
NumberField.isFundamentalDiscr_iff_exists_discr_quadraticAlgebraAn integerDis a fundamental discriminant iff it is the discriminant of the explicit quadratic fieldQuadraticAlgebra ℚ d 0for some squarefreed : ℤnot equal to 1 line 94 sourceSource documentation
An integer
Dis a fundamental discriminant iff it is the discriminant of the explicit quadratic fieldQuadraticAlgebra ℚ d 0for some squarefreed : ℤnot equal to 1.depends on sorry what this means
Statement uses:
Int,Iff, NumberField.IsFundamentalDiscr,Exists,Fact,Ne,OfNat.ofNat,Squarefree,Eq,NumberField.discr,QuadraticAlgebra,RatProof uses:
Iff.intro,And,Dvd.dvd,Not,Int.ModEq,HDiv.hDiv,HMul.hMul,Fact.mk,False,False.elim,Eq.mp,Eq.trans,True,congrArg,not_true_eq_false,Eq.symm,mul_div_cancel_left₀,of_eq_true,Nat,not_false_eq_trueand 13 more57 instances, coercions and auxiliary constants left out.
Tactic trace: 15 steps
Open to load the checked before-and-after goal states.
lemma isFundamentalDiscr_iff_exists_discr_quadraticAlgebra {D : ℤ} : IsFundamentalDiscr D ↔ ∃ (d : ℤ) (_ : Fact <| d ≠ 1) (_ : Fact <| Squarefree d), discr (QuadraticAlgebra ℚ d 0) = D where …Mentions: NumberField.IsFundamentalDiscr
- lemma
NumberField.isFundamentalDiscr_iff_exists_discr_numberFieldAn integerDis a fundamental discriminant iff it is the discriminant of some number field line 111 sourceSource documentation
An integer
Dis a fundamental discriminant iff it is the discriminant of some number field.depends on sorry what this means
Statement uses:
Int,Iff, NumberField.IsFundamentalDiscr,Exists,Field,NumberField,And,Algebra.IsQuadraticExtension,Rat,Eq,NumberField.discrProof uses:
Eq.mpr,Fact,Ne,OfNat.ofNat,Squarefree,QuadraticAlgebra,id,congrArg,propext, NumberField.isFundamentalDiscr_iff_exists_discr_quadraticAlgebra,Iff.intro,Exists.intro,inferInstance,And.intro,rfl,Nonempty,RingEquiv, NumberField.exists_quadraticAlgebra_of_isQuadraticExtension,Fact.mk,NumberField.discr_eq_discr_of_ringEquivand 1 more44 instances, coercions and auxiliary constants left out.
Tactic trace: 11 steps
Open to load the checked before-and-after goal states.
lemma isFundamentalDiscr_iff_exists_discr_numberField {D : ℤ} : IsFundamentalDiscr D ↔ ∃ (K : Type) (_ : Field K) (_ : NumberField K), IsQuadraticExtension ℚ K ∧ discr K = D := by …Mentions: NumberField.IsFundamentalDiscr
- theorem
WallSunSun.exists_isWallSunSunPrimeA 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 sorry line 135 sourceSource documentation
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. It is conjectured that there is at least one Wall–Sun–Sun prime.
depends on sorry what this means
Statement uses:
Exists,Nat, IsWallSunSunPrimeProof 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 exists_isWallSunSunPrime : ∃ p, IsWallSunSunPrime p := by …
Mentions: IsWallSunSunPrime
- theorem
WallSunSun.infinite_isWallSunSunPrimeA 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 sorry line 143 sourceSource documentation
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. It is conjectured that there are infinitely many Wall-Sun-Sun primes.
depends on sorry what this means
Statement uses:
Set.Infinite,Nat,Set.ofPred, IsWallSunSunPrimeProof 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_isWallSunSunPrime : {p : ℕ | IsWallSunSunPrime p}.Infinite := by …Mentions: IsWallSunSunPrime
- lemma
WallSunSun.exists_parametersline 147 source - theorem
WallSunSun.infinite_isWallSunSunPrime_of_disc_eq_varying_parametersAn earlier formulation ofinfinite_isWallSunSunPrime_of_disc_eq, which chose the Lucas parameters $(a, b)$ separately for every prime $p$, was degenerate: it is provable line 165 sourceSource documentation
An earlier formulation of
infinite_isWallSunSunPrime_of_disc_eq, which chose the Lucas parameters $(a, b)$ separately for every prime $p$, was degenerate: it is provable.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Int, NumberField.IsFundamentalDiscr,Set.Infinite,Nat,Set.ofPred,Exists,And,Eq,HSub.hSub,HPow.hPow,OfNat.ofNat,HMul.hMul, IsLucasWieferichPrimeProof uses:
Ne,False,False.elim,Eq.mp,Eq.trans,Or,Dvd.dvd,Not,Int.ModEq,HDiv.hDiv,Squarefree,congr,congrArg,True,congrFun',EuclideanDomain.zero_div,and_false,not_false_eq_true,or_self,Eq.symmand 27 more75 instances, coercions and auxiliary constants left out.
Tactic trace: 28 steps
Open to load the checked before-and-after goal states.
theorem infinite_isWallSunSunPrime_of_disc_eq_varying_parameters {D : ℤ} (hD : IsFundamentalDiscr D) : {p : ℕ | ∃ a b, a ^ 2 - 4 * b = D ∧ IsLucasWieferichPrime a b p}.Infinite := by …Mentions: IsLucasWieferichPrime
- theorem
WallSunSun.infinite_isWallSunSunPrime_of_disc_eqLet $K$ be a real quadratic field of discriminant $D$ and let $\varepsilon$ be a fundamental unit of $K$ sorry line 214 sourceSource documentation
Let $K$ be a real quadratic field of discriminant $D$ and let $\varepsilon$ be a fundamental unit of $K$. Following [EJ10, Remark 2.2.8], an odd prime $p \nmid D$ is a Wall–Sun–Sun prime for $K$ if, in $\mathcal{O}_K$, $\varepsilon^{p-1} \equiv 1 \pmod{p^2}$ when $\left(\tfrac{D}{p}\right) = 1$, and $\varepsilon^{2p+2} \equiv 1 \pmod{p^2}$ when $\left(\tfrac{D}{p}\right) = -1$. Both exponents are even, so the condition does not depend on the choice of $\varepsilon$, and it is equivalent to asking the same congruence for every unit of $K$. For $K = \mathbb{Q}(\sqrt{5})$ and $\varepsilon = \frac{1 + \sqrt{5}}{2}$ these are the classical Wall–Sun–Sun primes other than $2$ and $5$ [EJ10, Proposition 2.2.6].
It is conjectured that for every fundamental discriminant $D \neq 1$ there are infinitely many Wall–Sun–Sun primes with discriminant $D$ (Wikipedia; [EJ10, §4.1] gives the heuristic for $\mathbb{Q}(\sqrt{5})$). It is stated here for $D > 0$ only. Wikipedia's sentence also covers $D < 0$, but [EJ10] gives the definition above only for real quadratic fields, and its literal extension to imaginary quadratic fields is degenerate: there every unit is a root of unity of order dividing $4$ or $6$, and that order divides the relevant exponent $p - 1$ or $2p + 2$ for every odd prime $p \nmid D$.
depends on sorry what this means
Statement uses:
Field,NumberField,Algebra.IsQuadraticExtension,Rat,NumberField.IsTotallyReal,Int,Eq,NumberField.discr,Set.Infinite,Nat,Set.ofPred,And,Nat.Prime,Odd,Not,Dvd.dvd,Units,NumberField.RingOfIntegers,HPow.hPow,OfNat.ofNatand 5 moreProof uses:
sorryAx,Lean.Name,Bool.false,Lean.Name.num,Lean.Name.str,Lean.Name.anonymous92 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
theorem infinite_isWallSunSunPrime_of_disc_eq {K : Type*} [Field K] [NumberField K] [IsQuadraticExtension ℚ K] [IsTotallyReal K] {D : ℤ} (hD : discr K = D) : {p : ℕ | p.Prime ∧ Odd p ∧ ¬ (p : ℤ) ∣ D ∧ ∀ ε : (𝓞 K)ˣ, (p : 𝓞 K) ^ 2 ∣ (ε : 𝓞 K) ^ (if J(D | p) = 1 then p - 1 else 2 * p + 2) - 1}.Infinite := by …