Skip to content

Conversation

@zer-art
Copy link

@zer-art zer-art commented Dec 3, 2025

Closes #1304

Summary
This PR adds the formalization for Erdős Problem 1107 involving r-powerful numbers.

Changes

  • Created FormalConjectures/Erdos1107.lean
  • Added definition for IsRPowerful
  • Formalized the conjecture statement with appropriate AMS tags (AMS 11).

Verification

  • Code matches project style and license requirements.
  • Tested locally; no compilation errors.

Copy link
Collaborator

@mo271 mo271 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 contribution. A few remarks...

Comment on lines 29 to 34
/--
A number $n$ is $r$-powerful if for every prime $p$ which divides $n$,
we have $p^r$ divides $n$.
-/
def IsRPowerful (r n : ℕ) : Prop :=
∀ p, p.Prime → p ∣ n → p ^ r ∣ n
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
/--
A number $n$ is $r$-powerful if for every prime $p$ which divides $n$,
we have $p^r$ divides $n$.
-/
def IsRPowerful (r n : ℕ) : Prop :=
∀ p, p.Prime → p ∣ n → p ^ r ∣ n

Powerful is already definied in
FormalConjectures/ForMathlib/Data/Nat/Full.lean

Comment on lines 41 to 42
∀ r ≥ 2, ∃ N, ∀ n ≥ N,
∃ s : List ℕ, s.length ≤ r + 1 ∧ (∀ x ∈ s, IsRPowerful r x) ∧ s.sum = n := by
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
∀ r ≥ 2, ∃ N, ∀ n ≥ N,
∃ s : List ℕ, s.length ≤ r + 1 ∧ (∀ x ∈ s, IsRPowerful r x) ∧ s.sum = n := by
∀ r ≥ 2, ∃ᶠ n : ℕ in Filter.atTop,
∃ s : List ℕ, s.length ≤ r + 1 ∧ (∀ x ∈ s, r.Full x) ∧ s.sum = n := by

There is ∃ᶠ and Full

∀ r ≥ 2, ∃ N, ∀ n ≥ N,
∃ s : List ℕ, s.length ≤ r + 1 ∧ (∀ x ∈ s, IsRPowerful r x) ∧ s.sum = n := by
sorry

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
/--
Every large integer the sum of at most $2 + 1$ many $2$-powerful numbers,
as proved by Heath-Brown [He88]
[He88] Heath-Brown, D. R., Ternary quadratic forms and sums of three square-full numbers. (1988)
-/
@[category research solved, AMS 11]
theorem erdos_1107.variants.two : ∃ᶠ n : ℕ in Filter.atTop,
∃ s : List ℕ, s.length ≤ 2 + 1 ∧ (∀ x ∈ s, Powerful x) ∧ s.sum = n := by
sorry

Let's add this known result as well. One could also define the Property ∃ᶠ n : ℕ in Filter.atTop, ∃ s : List ℕ, s.length ≤ r + 1 ∧ (∀ x ∈ s, r.Full x) ∧ s.sum = n separately and re-use it for both theorems. That would be nicer, but whatever works, I suppose.

@zer-art
Copy link
Author

zer-art commented Dec 4, 2025

Thanks for the feedback! I'll update the docstring to include the Heath-Brown (1988) result and add the erdos_1107.variants.two theorem as requested. I'll also add the solved category tag. Working on the updates now!

…wn variant

Address code review feedback from @mo271:
- Replaced local `IsRPowerful` definition with `Nat.Full` imported from `ForMathlib`.
- Refactored the summation property into a helper `SumOfRPowerful` to avoid code duplication.
- Switched to filter notation (`∀ᶠ n in atTop`) to correctly capture the "every large integer" condition.
- Added `erdos_1107.variants.two` to formally state the solved case for r=2 (Heath-Brown, 1988).
- Updated docstrings and tags (added `solved` to the variant).
sorry

/--
Heath-Brown [He88] proved this for $r=2$.
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
Heath-Brown [He88] proved this for $r=2$.
Heath-Brown [He88] proved every large integer the sum of at most three
$2$-powerful numbers.

Let's repeat what "this" is here

Copy link
Collaborator

@mo271 mo271 left a comment

Choose a reason for hiding this comment

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

Thanks

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 1107

2 participants