Skip to content

Conversation

@kesslermaximilian
Copy link

Formalizes https://www.erdosproblems.com/884.
Closes #1001.

A few questions: I wasn't able to find mathlib functionality for the ordered list of divisors of a natural number, so I quickly wrote my own abbreviation.

Also, would it fit the project scope to also formalize the statement of Tao's paper, disproving this conjecture under assumption of hardy-littlewood? If so, there is currently only the general hardy-littlewood statement formalized in this repository, but Tao only requires a qualitative statement about existence, not density of admissable prime-tuples.

@google-cla
Copy link

google-cla bot commented Nov 20, 2025

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@kesslermaximilian
Copy link
Author

kesslermaximilian commented Nov 20, 2025

Edit: I fixed the issue myself.

I'm trying to sign the CLA right now, which I did with some google-account now (meh...). However, in the troubleshooting explanation, I am confused by the line:

  • You may not be using the email associated with your CLA in your Git commits. Check that the email set on your git commits matches the email associated with your CLA.
    Does that mean that I have to make my git commits using a gmail-address? Do I need to somehow link the gmail with my github?
    I'd appreciate some help in how I can resolve this, thanks in advance.

@mo271
Copy link
Collaborator

mo271 commented Nov 21, 2025

Seems like it works now? Do you still need help here?
you can change the author of a commit later

 git commit --amend --author="Your Name <your_name@gmail.com>" --no-edit

and then force push.
To see what email address was used you can do git log or add patch to the github url for the commit:
https://github.com/google-deepmind/formal-conjectures/commit/30528027c6f71f889497b1f889607244284c48ed.patch

I think if you add multiple email addresses to your github account you can sign the CLA only with one of them and it should still work for the other ones?

@mo271 mo271 added the erdos-problems Erdős Problems label Nov 21, 2025
@kesslermaximilian
Copy link
Author

Yeah, regarding the CLA, things worked out now. But obviously, this PR still needs to be reviewed, etc.

By convention, we set `divisors_increasing 0 = ∅`.
As a `Finset`, this is the same as `Nat.divisors`
-/
abbrev divisors_increasing (n : ℕ) : List ℕ := (List.range (n + 1)).filter (· ∣ n)
Copy link
Collaborator

@callesonne callesonne Nov 23, 2025

Choose a reason for hiding this comment

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

Instead of defining this, I would use Nat.nth (· ∣ n) i to pick out the i:th smallest divisor of n (to answer the question in the PR description).

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 Calle on this one. Note that you could also define this as n.divisors.sort.

Copy link
Author

Choose a reason for hiding this comment

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

Thanks for the suggestion, I updated my code accordingly.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Thanks! Make sure to also delete the old divisors_increasing

By convention, we set `divisors_increasing 0 = ∅`.
As a `Finset`, this is the same as `Nat.divisors`
-/
abbrev divisors_increasing (n : ℕ) : List ℕ := (List.range (n + 1)).filter (· ∣ n)
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 Calle on this one. Note that you could also define this as n.divisors.sort.

@kesslermaximilian
Copy link
Author

Thanks for your comments / review. I updated the PR using your suggestions now.

Statement of Erdos conjecture 884. See `erdos_884` for the problem asking whether this is true.
-/
def erdos_884_stmt : Prop :=
sum_inv_of_divisor_pair_differences =O[Filter.atTop] (1 + sum_inv_of_divisor_pair_differences)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Shouldn't the RHS be 1 + sum_inv_of_consecutive_divisors?

Copy link
Author

Choose a reason for hiding this comment

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

Oh yes, of course.
Thanks for catching that

Copy link
Author

Choose a reason for hiding this comment

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

I pushed a new commit fixing this

Copy link
Collaborator

@callesonne callesonne left a comment

Choose a reason for hiding this comment

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

Some more comments :)

Comment on lines 54 to 63
For a natural number n, let `1 = d₁ < ⋯ < d_{τ(n)} = n` denote the divisors of n
in increasing order.
Does it hold that
`∑ 1 ≤ i < j ≤ τ(n), 1 / (d_j - d_i) ⟪ 1 + ∑ 1 ≤ i < τ(n), 1 / (d_{i + 1} - d_i)`
for `n → ∞`, i.e.
`∑ 1 ≤ i < j ≤ τ(n), 1 / (d_j - d_i) ∈ O (1 + ∑ 1 ≤ i < τ(n), 1 / (d_{i + 1} - d_i))`?

In September 2025, Terence Tao gave a conditional _negative_ answer to this conjecture,
see `erdos_884_fales_of_hardy_littlewood` for this implication.
However, the conjecture itself remains open.
Copy link
Collaborator

Choose a reason for hiding this comment

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

We usually write our docstrings over erdos problems using latex. Could you also do this?

Copy link
Author

Choose a reason for hiding this comment

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

yes, I did so now

Comment on lines 47 to 49
/--
Statement of Erdos conjecture 884. See `erdos_884` for the problem asking whether this is true.
-/
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could you include the problem statement in this docstring as well (you can copy-paste from below if you wish).

Copy link
Author

Choose a reason for hiding this comment

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

done

Statement of Erdos conjecture 884. See `erdos_884` for the problem asking whether this is true.
-/
def erdos_884_stmt : Prop :=
sum_inv_of_divisor_pair_differences =O[Filter.atTop] (1 + sum_inv_of_consecutive_divisors)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
sum_inv_of_divisor_pair_differences =O[Filter.atTop] (1 + sum_inv_of_consecutive_divisors)
sum_inv_of_divisor_pair_differences 1 + sum_inv_of_consecutive_divisors

We have this notation in ForMathlib (and I think you should be able to remove the parenthesis).

Copy link
Author

Choose a reason for hiding this comment

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

thanks, I did not know this notation, I inserted it now

By convention, we set `divisors_increasing 0 = ∅`.
As a `Finset`, this is the same as `Nat.divisors`
-/
abbrev divisors_increasing (n : ℕ) : List ℕ := (List.range (n + 1)).filter (· ∣ n)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please remove this now that it is not used anymore.

Copy link
Author

Choose a reason for hiding this comment

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

oh yes, done

@YaelDillies YaelDillies added the awaiting-author The author should answer a question or perform changes. Reply when done. label Dec 9, 2025
@YaelDillies YaelDillies changed the title Add Erdos Problem 884 feat(ErdosProblems): 884 Jan 3, 2026
- Write doc comment in LaTeX.
- Remove divisors_increasing definition
- Use notation for BigO
- Copy doc comment to problem statement as well
@kesslermaximilian
Copy link
Author

Hey. Sorry for the long period of inactivity. I responded to all the comments from the review now and updated the PR.
Thanks for your patience and the (continued) feedback

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.

A few minor nitpicks and then this should be ready to merge!

@[category research solved, AMS 11]
theorem erdos_884_false_of_hardy_littlewood :
∀ (k : ℕ) (m : Fin k.succ → ℕ), HardyLittlewood.FirstHardyLittlewoodConjectureFor m
→ ¬ erdos_884_stmt := by sorry
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
→ ¬ erdos_884_stmt := by sorry
→ ¬ erdos_884_stmt := by
sorry

see `erdos_884_false_of_hardy_littlewood` for this implication.
However, the conjecture itself remains open.
-/
def erdos_884_stmt : Prop :=
Copy link
Member

Choose a reason for hiding this comment

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

(to stick a little closer to this repo's convention!)

Suggested change
def erdos_884_stmt : Prop :=
def Erdos884 : Prop :=


namespace Erdos884

noncomputable abbrev sum_inv_of_divisor_pair_differences (n : ℕ) : ℚ :=
Copy link
Member

Choose a reason for hiding this comment

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

I'd suggest this name to sick a little closer to the Mathlib naming conventions

Suggested change
noncomputable abbrev sum_inv_of_divisor_pair_differences (n : ℕ) : ℚ :=
noncomputable abbrev sumDivisorInvPairwiseDifference (n : ℕ) : ℚ :=

∑ j : Fin n.divisors.card, ∑ i : Fin j,
(1 : ℚ) / (Nat.nth (· ∣ n) j - Nat.nth (· ∣ n) i )

noncomputable abbrev sum_inv_of_consecutive_divisors (n : ℕ) : ℚ :=
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
noncomputable abbrev sum_inv_of_consecutive_divisors (n : ℕ) : ℚ :=
noncomputable abbrev sumDivisorInvConsecutiveDifference (n : ℕ) : ℚ :=

@kesslermaximilian
Copy link
Author

Thanks, updated the PR according to your feedback.

@kesslermaximilian
Copy link
Author

@Paul-Lez Not trying to rush you, just wanted to check in whether you saw that I updated the PR. I appreciate all your time and effort you put into this as well.

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

Labels

awaiting-author The author should answer a question or perform changes. Reply when done. erdos-problems Erdős Problems

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Erdős Problem 884

6 participants