{
  "id": "923",
  "ident": "NS.00923",
  "slug": "erdos-1187",
  "title": "Erdős Problem 1187",
  "status": "solved",
  "statement_status": "reviewed",
  "statement_md": "Let $k\\geq 3$. Is it true that, in any finite colouring of the integers, there are monochromatic\narithmetic progressions of primes of length $k$?\n\nIt follows from the theorem of Green and Tao [GrTa08] (that any set of primes with positive\nrelative density contains arbitrarily long arithmetic progressions) that the answer to the first\nquestion is yes for any $k\\geq 3$.\n\nSee also [219](https://www.erdosproblems.com/219).",
  "subjects": [
    "math.CO",
    "math.NT",
    "msc:05",
    "msc:11"
  ],
  "tags": [
    "question",
    "formal_proof"
  ],
  "collection": "erdos",
  "source_url": null,
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "Erdos1187.erdos_1187.parts.i",
  "statement_lean": "theorem erdos_1187.parts.i : ∀ k : ℕ, 3 ≤ k →\n    ∀ (κ : Type) [Finite κ] (c : ℤ → κ), ∃ S : Set ℤ, S.IsAPOfLength k ∧\n      (∀ n ∈ S, ∃ p : ℕ, p.Prime ∧ (p : ℤ) = n) ∧\n        ∃ γ : κ, ∀ n ∈ S, c 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 1187\n\n*References:*\n- [erdosproblems.com/1187](https://www.erdosproblems.com/1187)\n- [Er80] Erdős, Paul, *A survey of problems in combinatorial number theory*. Ann. Discrete Math.\n  (1980), 89-115.\n- [GrTa08] Green, Ben and Tao, Terence, *The primes contain arbitrarily long arithmetic\n  progressions*. Ann. of Math. (2) (2008), 481-547.\n-/\n\n@[expose] public section\n\nnamespace Erdos1187\n\nset_option linter.style.formal_proof_palomar false in\n/--\nLet $k\\geq 3$. Is it true that, in any finite colouring of the integers, there are monochromatic\narithmetic progressions of primes of length $k$?\n\nIt follows from the theorem of Green and Tao [GrTa08] (that any set of primes with positive\nrelative density contains arbitrarily long arithmetic progressions) that the answer to the first\nquestion is yes for any $k\\geq 3$.\n\nSee also [219](https://www.erdosproblems.com/219).\n-/\n@[category research solved, question, AMS 5 11, formal_proof using lean4 at\n  \"https://github.com/plby/lean-proofs/blob/8822f7ddef30fadbd92e1c6ab4ed897af356af5e/src/latest/ErdosProblems/Erdos1187.lean#L246\"]\ntheorem erdos_1187.parts.i : ∀ k : ℕ, 3 ≤ k →\n    ∀ (κ : Type) [Finite κ] (c : ℤ → κ), ∃ S : Set ℤ, S.IsAPOfLength k ∧\n      (∀ n ∈ S, ∃ p : ℕ, p.Prime ∧ (p : ℤ) = n) ∧\n        ∃ γ : κ, ∀ n ∈ S, c n = γ := by\n  sorry\n\nset_option linter.style.formal_proof_palomar false in\n/--\nLet $k\\geq 3$. In any finite colouring of the integers, are there monochromatic arithmetic\nprogressions of length $k$ whose common difference is a prime?\n\nThe answer to the second question is trivially no: colouring the integers by their residue modulo\n$4$ creates a colouring in which there is not even any monochromatic pair of integers whose\ndifference is a prime. Alternatively, one can just use $2$ colours and avoid any $3$-term\nprogressions whose difference is a prime by colouring $0,1\\pmod{4}$ red and $2,3\\pmod{4}$ blue.\n-/\n@[category research solved, question, AMS 5 11, formal_proof using lean4 at\n  \"https://github.com/plby/lean-proofs/blob/8822f7ddef30fadbd92e1c6ab4ed897af356af5e/src/latest/ErdosProblems/Erdos1187.lean#L246\"]\ntheorem erdos_1187.parts.ii : ¬ ∀ k : ℕ, 3 ≤ k →\n    ∀ (κ : Type) [Finite κ] (c : ℤ → κ), ∃ (a : ℤ) (p : ℕ) (S : Set ℤ), p.Prime ∧\n      S.IsAPOfLengthWith k a p ∧ ∃ γ : κ, ∀ n ∈ S, c n = γ := by\n  sorry\n\nend Erdos1187\n",
  "statement_hash": "a864939110456c6e1e05eaf9085b8730aa96f4de63174abb8e731605ca446cd6",
  "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."
}