Skip to content

Conversation

@CoolRmal
Copy link
Collaborator

@CoolRmal CoolRmal commented Jan 5, 2026

Closes #699

I only include the strongest result.

@YaelDillies YaelDillies added ams-11: Number theory erdos-problems Erdős Problems awaiting-author The author should answer a question or perform changes. Reply when done. labels Jan 6, 2026
@CoolRmal
Copy link
Collaborator Author

CoolRmal commented Jan 7, 2026

I think I addressed all your comments. I'll work on the proof of bounded_gap_legendre.

@YaelDillies
Copy link
Collaborator

Do you want to prove it in this PR or the next one?

@YaelDillies YaelDillies removed the awaiting-author The author should answer a question or perform changes. Reply when done. label Jan 7, 2026
Comment on lines 45 to 47
(∃ c > 0, ∀ᶠ n in atTop, (n + 1).nth Nat.Prime - n.nth Nat.Prime <
(n.nth Nat.Prime : ℝ) ^ (1 / (2 : ℝ) - c))
→ ∀ᶠ n in atTop, ∃ p ∈ Set.Ioo (n ^ 2) ((n + 1) ^ 2), Prime p := by
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

After some thoughts, I think they only want the statement to be true eventually, because otherwise we are assuming the following two (and potentially more) absurd inequalities:

  • $2 = 5 - 3 &lt; 3 ^ {1 / 2 - c}$
  • $4 = 11 - 7 &lt; 7 ^ {1/2 - c }$

I also used Nat.Prime instead of Prime.

Copy link
Collaborator

Choose a reason for hiding this comment

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

But then the Ferreira statement below is the same but unconditional, right? @mo271, what do you suggest here?

Copy link
Member

Choose a reason for hiding this comment

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

I agree with @YaelDillies on this one: I think the goal of the theorem should quantify over all n (but this is fine: to avoid the absurd inequalities you mention we only need to take sufficiently large n in the hypothesis of the theorem)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@Paul-Lez Should I keep this theorem then? I think Yaël is suggesting that this theorem is not needed because it is not better than Ferreira's statement.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think I have convinced myself that this statement is worth having on the basis that what we're interested in in this repo isn't results but proofs. An AI proving the implication you are adding would be interested, even if the statement can theoretically be made stronger

Copy link
Member

@Paul-Lez Paul-Lez left a comment

Choose a reason for hiding this comment

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

Thanks for the PR! Added a few comments

/-- Is it true that for any `n ≥ 1` and any `k`, if `n + 1, ..., n + k` are all composite, then
there are distinct primes `p₁, ... pₖ` such that `pᵢ ∣ n + i` for all `1 ≤ i ≤ k`? -/
@[category research open, AMS 11]
theorem erdos_375 : answer(sorry) ↔ ∀ n ≥ 1, ∀ k, (∀ i < k, ¬ (n + i + 1).Prime) →
Copy link
Member

Choose a reason for hiding this comment

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

Given that you're using erdos_375 as as assumption later on, I would suggest the following:

  1. Define a predicate Erdos375 (as a def)
  2. State erdos_375 as answer(sorry) ↔ erdos_375
  3. State the other implications using Erdos375.

This will help with maintainability (e.g. only need to fix the statement of erdos_375 once if it breaks) and readability of the downstream implications!

· exact this n hn k hk h p hp y x hxy.symm hr.symm (by grind)
· have hy : y = x + 1 := by grind
have := hy ▸ Nat.dvd_sub (hp y).2 (hxy ▸ (hp x).2)
have := (hp 1).1
Copy link
Member

Choose a reason for hiding this comment

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

(very nitpicky) you can get rid of this line

Suggested change
have := (hp 1).1

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The goal is not solved if I delete this line.

there are distinct primes `p₁, ... pₖ` such that `pᵢ ∣ n + i` for all `1 ≤ i ≤ k`. This is proved
in [RST75]. -/
@[category research solved, AMS 11]
theorem erdos_375.log : ∃ c > 0, ∀ n k : ℕ,
Copy link
Member

Choose a reason for hiding this comment

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

I think the "n sufficiently large" condition is missing otherwise?

Suggested change
theorem erdos_375.log : ∃ c > 0, ∀ n k : ℕ,
theorem erdos_375.log : ∃ c > 0, ∀ᶠ (n : ℕ) in Filter.atTop, ∀ k : ℕ,

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yael suggested me this. The reason is that one can always take c small enough so that k < c * (log n / (log (log n))) implies that k : ℕ is zero until n is large.

Screenshot 2026-01-16 at 7 10 03 PM

Comment on lines 45 to 47
(∃ c > 0, ∀ᶠ n in atTop, (n + 1).nth Nat.Prime - n.nth Nat.Prime <
(n.nth Nat.Prime : ℝ) ^ (1 / (2 : ℝ) - c))
→ ∀ᶠ n in atTop, ∃ p ∈ Set.Ioo (n ^ 2) ((n + 1) ^ 2), Prime p := by
Copy link
Member

Choose a reason for hiding this comment

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

I agree with @YaelDillies on this one: I think the goal of the theorem should quantify over all n (but this is fine: to avoid the absurd inequalities you mention we only need to take sufficiently large n in the hypothesis of the theorem)

Comment on lines 40 to 47
/-- If there exists a constant `c > 0` such that
`(n + 1).nth Nat.Prime - n.nth Nat.Prime < (n.nth Nat.Prime) ^ (1 / 2 - c)` for all `n`, then
Legendre's conjecture is true. -/
@[category research solved, AMS 11]
theorem bounded_gap_legendre :
(∃ c > 0, ∀ᶠ n in atTop, (n + 1).nth Nat.Prime - n.nth Nat.Prime <
(n.nth Nat.Prime : ℝ) ^ (1 / (2 : ℝ) - c))
→ ∀ᶠ n in atTop, ∃ p ∈ Set.Ioo (n ^ 2) ((n + 1) ^ 2), Prime p := by
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
/-- If there exists a constant `c > 0` such that
`(n + 1).nth Nat.Prime - n.nth Nat.Prime < (n.nth Nat.Prime) ^ (1 / 2 - c)` for all `n`, then
Legendre's conjecture is true. -/
@[category research solved, AMS 11]
theorem bounded_gap_legendre :
(∃ c > 0, ∀ᶠ n in atTop, (n + 1).nth Nat.Prime - n.nth Nat.Prime <
(n.nth Nat.Prime : ℝ) ^ (1 / (2 : ℝ) - c))
∀ᶠ n in atTop, ∃ p ∈ Set.Ioo (n ^ 2) ((n + 1) ^ 2), Prime p := by
/-- If there exists a constant `c > 0` such that
`(n + 1).nth Nat.Prime - n.nth Nat.Prime < (n.nth Nat.Prime) ^ (1 / 2 - c)` for sufficiently large `n`, then
Legendre's conjecture is true. -/
@[category research solved, AMS 11]
theorem bounded_gap_legendre
(H : ∃ c > 0, ∀ᶠ n in atTop, (n + 1).nth Nat.Prime - n.nth Nat.Prime <
(n.nth Nat.Prime : ℝ) ^ (1 / (2 : ℝ) - c)) :
∀ᶠ n in atTop, ∃ p ∈ Set.Ioo (n ^ 2) ((n + 1) ^ 2), Prime p := by

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Erdős Problem 375

3 participants