{
  "id": "768",
  "ident": "NS.00768",
  "slug": "erdos-1138",
  "title": "Erdős Problem 1138",
  "status": "solved",
  "statement_status": "reviewed",
  "statement_md": "**Erdős Problem 1138.**\nLet $x/2 < y < x$ and $C > 1$. If $d = \\max_{p_n < x}(p_{n+1} - p_n)$,\nwhere $p_n$ denotes the $n$-th prime, then is it true that\n$$\\pi(y + Cd) - \\pi(y) \\sim \\frac{Cd}{\\log y}$$?",
  "subjects": [
    "math.NT",
    "msc:11"
  ],
  "tags": [
    "question",
    "formal_proof"
  ],
  "collection": "erdos",
  "source_url": null,
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "Erdos1138.erdos_1138",
  "statement_lean": "theorem erdos_1138 : ¬ ∀C > 1,\n    primeCount_Ioc_mul_const C ~[snd_gt_half_fst] fun (x, y) ↦\n      C * (sup_primeGap x) / Real.log y",
  "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 1138\n\n*References:*\n- [erdosproblems.com/1138](https://www.erdosproblems.com/1138)\n- [Va99] Vardi, I., Prime census. (1999).\n- [Kum26] Kumrawat, S., [Disproof of Erdős Problem 1138](https://sourish-kumrawat.github.io/papers/Erdos_1138.pdf).\n\nNote that the conjecture has a claimed disproof found at:\nhttps://sourish-kumrawat.github.io/papers/Erdos_1138.pdf,\nsee the discussion section on the Erdos problems website for more information.\n-/\n\n@[expose] public section\n\nopen Nat Filter Asymptotics Real Set\n\nnamespace Erdos1138\n\n/--\nThe filter on $\\mathbb{R} \\times \\mathbb{R}$ corresponding to sending $x \\to \\infty$ subject to $x/2 < y < x$\n-/\nabbrev snd_gt_half_fst : Filter (ℝ × ℝ) := atTop.comap Prod.fst ⊓ 𝓟 {p | p.2 ∈ Ioo (p.1 / 2) p.1}\n\n/-- Given a pair $(x,y)$, this is the amount of primes in the interval above $y$, of length\nequalling the largest prime gap before $x$, scaled by a constant $C$.\n-/\nnoncomputable def primeCount_Ioc_mul_const (C : ℝ) : (ℝ × ℝ) → ℝ :=\n  fun (x, y) ↦ (primeCounting ⌊y + C * sup_primeGap x⌋₊ - primeCounting ⌊y⌋₊)\n\nset_option linter.style.formal_proof_palomar false in\n/--\n**Erdős Problem 1138.**\nLet $x/2 < y < x$ and $C > 1$. If $d = \\max_{p_n < x}(p_{n+1} - p_n)$,\nwhere $p_n$ denotes the $n$-th prime, then is it true that\n$$\\pi(y + Cd) - \\pi(y) \\sim \\frac{Cd}{\\log y}$$?\n-/\n@[category research solved, question, AMS 11,\nformal_proof using formal_conjectures at \"https://github.com/YanYablonovskiy/formal-conjectures/blob/7c134317104d3b98ecc751afbb79ec0adddf8e7c/FormalConjectures/ErdosProblems/1138a.lean#L496\"]\ntheorem erdos_1138 : ¬ ∀C > 1,\n    primeCount_Ioc_mul_const C ~[snd_gt_half_fst] fun (x, y) ↦\n      C * (sup_primeGap x) / Real.log y := by\n  sorry\n\nend Erdos1138\n",
  "statement_hash": "23a3b2a57f458d07879fe1ea8883c08fbbc607315d4224de622c11bd876af5f5",
  "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."
}