Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 16 additions & 5 deletions FormalConjectures/Wikipedia/WallSunSun.lean
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,26 @@ $p$-th Lucas number. It is conjectured that there are infinitely many Wall-Sun-S
theorem infinite_isWallSunSunPrime : {p : ℕ | IsWallSunSunPrime p}.Infinite := by
sorry

/-- Fundamental discriminants are those integers `D` that appear as discriminants of quadratic
fields.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does mathlib not have the notion of a discriminant of a quadratic field?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure it does, but the notion of fundamental discriminant can be described very elementarily. That it corresponds to discriminants of quadratic fields is definitely something we should state, if that's what you mean

Copy link
Member

@Paul-Lez Paul-Lez Jan 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could be a nice category test or category undergradute statement!


`D` is a fundamental discriminant if it is either of the form `4m` for `m` congruent to `2` or `3`
mod `4` squarefree, or if it congruent to `1` mod `4` and squarefree. -/
def IsFundamentalDiscriminant (D : ℤ) : Prop :=
4 ∣ D ∧ (D / 4 ≡ 2 [ZMOD 4] ∨ D / 4 ≡ 3 [ZMOD 4]) ∧ Squarefree (D / 4) ∨
D ≡ 1 [ZMOD 4] ∧ Squarefree D

/--
A Lucas–Wieferich prime associated with $(a,b)$ is an odd prime $p$, not dividing $a^2 - b$, such
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)$.
The discriminant of this number is the quantity $a^2 - 4b$. It is conjectured that there are
infinitely many Lucas–Wieferich primes of any given discriminant.
infinitely many Lucas–Wieferich primes of any given non-one fundamental discriminant.

TODO: Source this conjecture
-/
@[category research open, AMS 11]
theorem infinite_isWallSunSunPrime_of_disc_eq {D : } (hD : 0 < D)
(hD : D ≡ 0 [MOD 4] ∨ D ≡ 1 [MOD 4]) :
{p : ℕ | ∃ a b : ℕ, a ^ 2 - 4 * b = D ∧ IsLucasWieferichPrime a b p}.Infinite := by
theorem infinite_isWallSunSunPrime_of_disc_eq {D : } (hD : IsFundamentalDiscriminant D)
(hD : D ≠ 1) :
{p : ℕ | ∃ a b, a ^ 2 - 4 * b = D ∧ IsLucasWieferichPrime a b p}.Infinite := by
sorry
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ 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
-/
structure IsLucasWieferichPrime (a b p : ℕ) : Prop where
structure IsLucasWieferichPrime (a b : ℤ) (p : ℕ) : Prop where
prime : p.Prime
odd : Odd p
not_dvd : ¬(p : ℤ) ∣ a ^ 2 - 4 * b
Expand Down
Loading