/-
Copyright 2025 The Formal Conjectures Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-/
import FormalConjecturesUtilErdős Problem 899
Reference: erdosproblems.com/899
open Filter Setopen scoped Pointwise Topologynamespace Erdos899open Erdos899Let $A\subseteq\mathbb{N}$ be an infinite set such that $|A\cap {1, ..., N}| = o(N)$. Is it true that $$ \limsup_{N\to\infty}\frac{|(A - A)\cap {1, ..., N}|}{|A \cap {1, ..., N}|} = \infty? $$
The answer is yes, proved by Ruzsa [Ru78].
[Ru78] Ruzsa, I. Z., On the cardinality of {$A+A$}\ and {$A-A$}. (1978), 933--938.
@[category research solved, AMS 5,
formal_proof using lean4 at "https://github.com/plby/lean-proofs/blob/dfe2d78128b493c572cf525b1b8edf4897fb7664/src/latest/ErdosProblems/Erdos899.lean#L793"]
theorem erdos_899 : answer(True) ↔ ∀ (A : Set ℕ), A.Infinite →
Tendsto (fun N => (A ∩ Icc 1 N |>.ncard : ℝ) / N) atTop (𝓝 0) →
atTop.limsup (fun N => ((A - A : Set ℕ) ∩ Icc 1 N |>.ncard : EReal) /
(A ∩ Icc 1 N).ncard) = ⊤ := ⊢ True ↔
∀ (A : Set ℕ),
A.Infinite →
Tendsto (fun N ↦ ↑(A ∩ Icc 1 N).ncard / ↑N) atTop (𝓝 0) →
limsup (fun N ↦ ↑((A - A) ∩ Icc 1 N).ncard / ↑(A ∩ Icc 1 N).ncard) atTop = ⊤
All goals completed! 🐙end Erdos899