{
  "id": "959",
  "ident": "NS.00959",
  "slug": "erdos-1194",
  "title": "Erdős Problem 1194",
  "status": "open",
  "statement_status": "reviewed",
  "statement_md": "Let $A\\subset\\mathbb{N}$ be such that every integer $n\\geq 1$ can be written uniquely as\n$a_n-b_n$ for some $a_n,b_n\\in A$. How fast must $a_n/n$ increase?\n\nA question of Erdős [Er80, p. 100]. Here $a_n$ is the larger element of the representation of\n$n$, not the $n$th element of $A$. We read \"must increase\" as: the answer is the set of\nnon-decreasing $G$ such that every such $A$ has $a_n \\geq c\\,n\\,G(n)$ for infinitely many $n$,\nfor some $c>0$ depending on $A$.",
  "subjects": [
    "math.CO",
    "math.NT",
    "msc:05",
    "msc:11"
  ],
  "tags": [
    "question"
  ],
  "collection": "erdos",
  "source_url": null,
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "Erdos1194.erdos_1194",
  "statement_lean": "theorem erdos_1194 :\n    {G : ℕ → ℝ | Monotone G ∧ ∀ A : Set ℕ, IsPerfectDifferenceSetInt A →\n      ∃ c > (0 : ℝ), HasLargeElement A (fun n ↦ c * G n * n)} = erdos_1194.answer",
  "challenge_source": "/-\nCopyright 2026 The Formal Conjectures Authors.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    https://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n-/\nmodule\n\npublic import FormalConjecturesUtil\n\n/-!\n# Erdős Problem 1194\n\n*References:*\n- [erdosproblems.com/1194](https://www.erdosproblems.com/1194)\n- [Er80] Erdős, Paul, *A survey of problems in combinatorial number theory*. Ann. Discrete Math.\n  6 (1980), 89-115. [PDF](https://www.renyi.hu/~p_erdos/1980-03.pdf)\n- [HaRo66] Halberstam, H. and Roth, K. F., *Sequences. Vol. I*. Oxford University Press, Oxford\n  (1966), xx+291.\n- [Le04] Lev, Vsevolod F., *Reconstructing integer sets from their representation functions*.\n  Electron. J. Combin. 11 (2004), Research Paper 78, 6 pp.\n  [Link](https://www.combinatorics.org/ojs/index.php/eljc/article/view/v11i1r78)\n-/\n\n@[expose] public section\n\nopen Filter\n\nnamespace Erdos1194\n\n/-- `IsPerfectDifferenceSetInt A` says that `A` is a set of positive integers such that every\nnonzero integer is $a - b$ for exactly one pair `(a, b)` of distinct elements of `A`. This is the\nnotion over $\\mathbb{Z}$ of [Er80] and [Le04], that is, `IsPerfectDifferenceSet A 0`\n(as `ZMod 0 = ℤ`). -/\ndef IsPerfectDifferenceSetInt (A : Set ℕ) : Prop :=\n  0 ∉ A ∧ IsPerfectDifferenceSet A 0\n\n/-- `IsLargerElement A n a` says that `a` is the larger element of a representation\n$n = a - b$ with $a, b \\in A$. If `A` is a perfect difference set and $n \\geq 1$, there is exactly\none such `a`, and it is the element $a_n$ of the problem (not the $n$th element of `A`). -/\ndef IsLargerElement (A : Set ℕ) (n a : ℕ) : Prop :=\n  a ∈ A ∧ ∃ b ∈ A, a = b + n\n\n/-- `HasLargeElement A f` says that $a_n \\geq f(n)$ for infinitely many $n$, where $a_n$ is the\nlarger element of the representation of $n$ as a difference of two elements of `A`. -/\ndef HasLargeElement (A : Set ℕ) (f : ℕ → ℝ) : Prop :=\n  ∃ᶠ n in atTop, ∃ a, IsLargerElement A n a ∧ f n ≤ a\n\n/-- In a perfect difference set every $n \\geq 1$ has a representation $n = a - b$, so some `a`\nsatisfies `IsLargerElement A n a`. -/\n@[category API, AMS 5 11]\ntheorem IsPerfectDifferenceSetInt.exists_isLargerElement {A : Set ℕ}\n    (hA : IsPerfectDifferenceSetInt A) {n : ℕ} (hn : 0 < n) : ∃ a, IsLargerElement A n a := by\n  have hn' : (n : ZMod 0) ∈ {x : ZMod 0 | x ≠ 0} := by\n    simpa [ZMod.natCast_eq_zero_iff] using hn.ne'\n  obtain ⟨⟨a, b⟩, ⟨ha, hb, -⟩, hab⟩ := hA.2.surjOn hn'\n  refine ⟨a, ha, b, hb, ?_⟩\n  have h : ((a : ℤ) - b : ℤ) = n := hab\n  omega\n\n/-- In a perfect difference set the larger element of the representation of $n \\geq 1$ is\nunique, so $a_n$ is well defined. -/\n@[category API, AMS 5 11]\ntheorem IsLargerElement.unique {A : Set ℕ} {n a a' : ℕ} (hA : IsPerfectDifferenceSetInt A)\n    (hn : 0 < n) (h : IsLargerElement A n a) (h' : IsLargerElement A n a') : a = a' := by\n  obtain ⟨ha, b, hb, rfl⟩ := h\n  obtain ⟨ha', b', hb', rfl⟩ := h'\n  have h1 : (b + n, b) ∈ A.offDiag := Set.mem_offDiag.2 ⟨ha, hb, (show b + n ≠ b by omega)⟩\n  have h2 : (b' + n, b') ∈ A.offDiag := Set.mem_offDiag.2 ⟨ha', hb', (show b' + n ≠ b' by omega)⟩\n  have e := hA.2.injOn h1 h2 (by simp)\n  exact congrArg Prod.fst e\n\n/-- The larger element of a representation of $n$ is at least $n$, so $a_n / n \\geq 1$. -/\n@[category API, AMS 5 11]\ntheorem IsLargerElement.le_self {A : Set ℕ} {n a : ℕ} (h : IsLargerElement A n a) : n ≤ a := by\n  obtain ⟨-, b, -, hab⟩ := h\n  omega\n\ndef erdos_1194.answer : Set (ℕ → ℝ) := sorry\n\n/--\nLet $A\\subset\\mathbb{N}$ be such that every integer $n\\geq 1$ can be written uniquely as\n$a_n-b_n$ for some $a_n,b_n\\in A$. How fast must $a_n/n$ increase?\n\nA question of Erdős [Er80, p. 100]. Here $a_n$ is the larger element of the representation of\n$n$, not the $n$th element of $A$. We read \"must increase\" as: the answer is the set of\nnon-decreasing $G$ such that every such $A$ has $a_n \\geq c\\,n\\,G(n)$ for infinitely many $n$,\nfor some $c>0$ depending on $A$.\n-/\n@[category research open, question value, AMS 5 11]\ntheorem erdos_1194 :\n    {G : ℕ → ℝ | Monotone G ∧ ∀ A : Set ℕ, IsPerfectDifferenceSetInt A →\n      ∃ c > (0 : ℝ), HasLargeElement A (fun n ↦ c * G n * n)} = erdos_1194.answer := by\n  sorry\n\nset_option linter.style.formal_proof_palomar false in\n/--\nSuch a set is called a perfect difference set; they can be constructed, for example, by a greedy\napproach (as detailed by Lev [Le04]).\n\nErdős [Er80, p. 100] remarks that it is easy to construct such a sequence, and [Le04, Section 3]\nconstructs a perfect difference set $A\\subseteq\\mathbb{N}$ (positive integers) greedily.\n-/\n@[category research solved, AMS 5 11, formal_proof using other_system at \"https://github.com/karlesmarin/formalizations/blob/b4caeff9652712dce8b8eb0c03cfb459d2057dee/Isabelle/AFP/Perfect_Difference_Sets/Perfect_Difference_Set.thy#L282\"]\ntheorem erdos_1194.variants.exists_perfect_difference_set :\n    ∃ A : Set ℕ, IsPerfectDifferenceSetInt A := by\n  sorry\n\nset_option linter.style.formal_proof_palomar false in\n/--\nThe greedy construction achieves $a_n\\ll n^3$.\n\nIn the greedy construction of [Le04, Section 3], step $k$ adds $z_k$ and $z_k+d_k$, where $d_k$ is\nthe least non-negative integer that is not yet a difference and $z_k$ is the least admissible\npositive integer. There are $O(k^3)$ excluded choices for $z_k$ and $d_k=O(k^2)$, so every element\nadded by step $k$ is $O(k^3)$. As $d_1=0$ and the $d_k$ increase, $n$ is represented by step\n$n+1$, which gives $a_n\\ll n^3$.\n-/\n@[category research solved, AMS 5 11, formal_proof using other_system at \"https://github.com/karlesmarin/formalizations/blob/b4caeff9652712dce8b8eb0c03cfb459d2057dee/Isabelle/AFP/Perfect_Difference_Sets/Perfect_Difference_Bound.thy#L343\"]\ntheorem erdos_1194.variants.greedy_upper_bound :\n    ∃ A : Set ℕ, IsPerfectDifferenceSetInt A ∧ ∃ C : ℝ, ∀ n : ℕ, 0 < n →\n      ∀ a, IsLargerElement A n a → (a : ℝ) ≤ C * (n : ℝ) ^ 3 := by\n  sorry\n\n/--\nErdős [Er80, p. 100] wrote it is 'easy to see' that\n$$\\limsup_{n\\to \\infty}\\frac{a_n}{n}=\\infty.$$\nIndeed, since $A$ must be a Sidon set, if $a_n \\leq f(n)n$ for all $n$, then all differences in\n$[1,x/f(x)]$ can be realised by differences from $A\\cap [1,x]$, and hence\n$\\lvert A\\cap [1,x]\\rvert^2 \\gg x/f(x)$. Erdős (see for example [HaRo66]) proved that for\ninfinitely many $x$, $\\lvert A\\cap [1,x]\\rvert \\ll (x/\\log x)^{1/2}$, which is a contradiction for\na suitable choice of $f$.\n\nFormally: for every perfect difference set $A$ and every $C$, $a_n \\geq Cn$ for infinitely many\n$n$.\n-/\n@[category research solved, AMS 5 11]\ntheorem erdos_1194.variants.limsup_eq_top :\n    ∀ A : Set ℕ, IsPerfectDifferenceSetInt A → ∀ C : ℝ, HasLargeElement A (fun n ↦ C * n) := by\n  sorry\n\nend Erdos1194\n",
  "statement_hash": "ab430552a171b0bef0e1cf7ad17149b6d120bc6f367c375f729db33eed55dab9",
  "toolchain": "leanprover/lean4:v4.33.1",
  "upstream_commit": "f9b3868d5ca994a7bf95039bcec05338c0c21e2f",
  "workspace": "formal-conjectures",
  "field": "math",
  "formalization": "formal",
  "verification": "lean-kernel",
  "license": "Apache-2.0",
  "attribution": "google-deepmind/formal-conjectures contributors",
  "metric_name": null,
  "metric_direction": null,
  "critiques": [],
  "public_partial_proofs": [],
  "research_threads": [],
  "instructions": "Read research_threads first: other people's public repositories and what they already tried. Write Solution.lean starting from challenge_source. Keep every definition identical, prove decl_name with exactly the same type, no sorry in its dependency closure, no new axioms, no native_decide, no metaprogramming. Submit with POST /api/v1/submissions."
}