{
  "id": "1289",
  "ident": "NS.01289",
  "slug": "erdos-202",
  "title": "Erdős Problem 202",
  "status": "solved",
  "statement_status": "reviewed",
  "statement_md": "Let $n_1<\\cdots < n_r\\leq N$ with associated $a_i\\pmod{n_i}$ such that the congruence classes are\ndisjoint (that is, every integer is $\\equiv a_i\\pmod{n_i}$ for at most one $1\\leq i\\leq r$). How\nlarge can $r$ be in terms of $N$?\n\nLet $f(N)$ be the maximum possible $r$, and let $L(N)=\\exp(\\sqrt{\\log N\\log\\log N})$.\n\nThis was proved by GPT-5.4 Pro (prompted by Ho Boon Suan), using the argument of [BFV13] together\nwith the resolution of the Kahn-Kalai conjecture by Park and Pham [PaPh24], so that\n$$f(N)= N L(N)^{-1+o(1)}.$$",
  "subjects": [
    "math.CO",
    "math.NT",
    "msc:05",
    "msc:11"
  ],
  "tags": [
    "formal_proof"
  ],
  "collection": "erdos",
  "source_url": null,
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "Erdos202.erdos_202",
  "statement_lean": "theorem erdos_202 : ∃ o : ℕ → ℝ, o =o[atTop] (1 : ℕ → ℝ) ∧\n    ∀ᶠ N : ℕ in atTop, (f N : ℝ) = (N : ℝ) * scaleL N ^ (-1 + o N)",
  "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 202\n\n*References:*\n- [erdosproblems.com/202](https://www.erdosproblems.com/202)\n- [BFV13] de la Bretèche, Régis and Ford, Kevin and Vandehey, Joseph, *On non-intersecting\n  arithmetic progressions*. Acta Arith. (2013), 381-392.\n- [Ch05] Chen, Yong-Gao, *On disjoint arithmetic progressions*. Acta Arith. (2005), 143-148.\n- [Cr03b] Croot, III, Ernest S., *On non-intersecting arithmetic progressions*. Acta Arith.\n  (2003), 233-238.\n- [ErSz68] Erdős, P. and Szemerédi, E., *On a problem of P. Erdős and S. Stein*. Acta Arith.\n  (1968), 85-90.\n- [PaPh24] Park, Jinyoung and Pham, Huy Tuan, *A proof of the Kahn-Kalai conjecture*. J. Amer.\n  Math. Soc. (2024), 235-243.\n-/\n\n@[expose] public section\n\nopen Filter Real\n\nnamespace Erdos202\n\n/--\n`f N` is the maximum possible `r` such that there are moduli $n_1<\\cdots<n_r\\leq N$ with\nassociated residues $a_i\\pmod{n_i}$ whose congruence classes are disjoint.\n-/\nnoncomputable def f (N : ℕ) : ℕ :=\n  sSup {r : ℕ | ∃ n : Fin r → ℕ, ∃ a : Fin r → ℤ,\n    StrictMono n ∧ (∀ i, 0 < n i ∧ n i ≤ N) ∧\n    ∀ m : ℤ, ∀ i j : Fin r, m ≡ a i [ZMOD (n i : ℤ)] → m ≡ a j [ZMOD (n j : ℤ)] → i = j}\n\nset_option linter.style.formal_proof_palomar false in\n/--\nLet $n_1<\\cdots < n_r\\leq N$ with associated $a_i\\pmod{n_i}$ such that the congruence classes are\ndisjoint (that is, every integer is $\\equiv a_i\\pmod{n_i}$ for at most one $1\\leq i\\leq r$). How\nlarge can $r$ be in terms of $N$?\n\nLet $f(N)$ be the maximum possible $r$, and let $L(N)=\\exp(\\sqrt{\\log N\\log\\log N})$.\n\nThis was proved by GPT-5.4 Pro (prompted by Ho Boon Suan), using the argument of [BFV13] together\nwith the resolution of the Kahn-Kalai conjecture by Park and Pham [PaPh24], so that\n$$f(N)= N L(N)^{-1+o(1)}.$$\n-/\n@[category research solved, AMS 5 11, formal_proof using lean4 at \"https://github.com/plby/lean-proofs/blob/main/src/v4.29.1/ErdosProblems/Erdos202.lean\"]\ntheorem erdos_202 : ∃ o : ℕ → ℝ, o =o[atTop] (1 : ℕ → ℝ) ∧\n    ∀ᶠ N : ℕ in atTop, (f N : ℝ) = (N : ℝ) * scaleL N ^ (-1 + o N) := by\n  sorry\n\n/--\nErdős and Stein conjectured that $f(N)=o(N)$, which was proved by Erdős and Szemerédi [ErSz68].\n-/\n@[category research solved, AMS 5 11]\ntheorem erdos_202.variants.erdos_szemeredi :\n    (fun N => (f N : ℝ)) =o[atTop] (fun N : ℕ => (N : ℝ)) := by\n  sorry\n\nend Erdos202\n",
  "statement_hash": "7142f4012da962f3d0140098610ac4aca91fa97d1335000e5a026e775ef0b823",
  "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."
}