{
  "id": "3171",
  "ident": "NS.03171",
  "slug": "erdos-781",
  "title": "Erdős Problem 781",
  "status": "solved",
  "statement_status": "reviewed",
  "statement_md": "Let $f(k)$ be the minimal $n$ such that any $2$-colouring of $\\{1,\\ldots,n\\}$ contains a\nmonochromatic $k$-term descending wave: a sequence $x_1<\\cdots <x_k$ such that, for $1<j<k$,\n$$x_j \\geq \\frac{x_{j+1}+x_{j-1}}{2}.$$\nEstimate $f(k)$.\n\nBrown, Erdős, and Freedman [BEF90] proved $k^2-k+1\\leq f(k) \\leq \\frac{k^3-4k+9}{3}$. Resolved by\nAlon and Spencer [AlSp89] who proved that in fact $f(k) \\gg k^3$, so that $f(k)\\asymp k^3$.",
  "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": "Erdos781.erdos_781.parts.i",
  "statement_lean": "theorem erdos_781.parts.i : (fun k ↦ (f k : ℝ)) =Θ[atTop] fun k ↦ (k : ℝ) ^ 3",
  "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 781\n\n*References:*\n- [erdosproblems.com/781](https://www.erdosproblems.com/781)\n- [BEF90] Brown, T. C. and Erdős, P. and Freedman, A. R., _Quasi-progressions and descending\n  waves_. J. Combin. Theory Ser. A (1990), 81-95.\n- [AlSp89] Alon, N. and Spencer, Joel, _Ascending waves_. J. Combin. Theory Ser. A (1989),\n  275-287.\n-/\n\n@[expose] public section\n\nopen Filter Asymptotics\n\nnamespace Erdos781\n\n/-- A $k$-term *descending wave* is a sequence $x_1<\\cdots <x_k$ such that, for $1<j<k$,\n$x_j \\geq \\frac{x_{j+1}+x_{j-1}}{2}$. -/\ndef IsDescendingWave {k : ℕ} (x : Fin k → ℕ) : Prop :=\n  StrictMono x ∧\n    ∀ i j l : Fin k, (i : ℕ) + 1 = j → (j : ℕ) + 1 = l → x i + x l ≤ 2 * x j\n\n/-- `f k` is the minimal `n` such that any $2$-colouring of $\\{1,\\ldots,n\\}$ (identified with\n`Fin n`) contains a monochromatic $k$-term descending wave. -/\nnoncomputable def f (k : ℕ) : ℕ :=\n  sInf {n | ∀ c : Fin n → Fin 2, ∃ x : Fin k → Fin n,\n    IsDescendingWave (fun i ↦ (x i : ℕ)) ∧ ∃ γ, ∀ i, c (x i) = γ}\n\nset_option linter.style.formal_proof_palomar false in\n/--\nLet $f(k)$ be the minimal $n$ such that any $2$-colouring of $\\{1,\\ldots,n\\}$ contains a\nmonochromatic $k$-term descending wave: a sequence $x_1<\\cdots <x_k$ such that, for $1<j<k$,\n$$x_j \\geq \\frac{x_{j+1}+x_{j-1}}{2}.$$\nEstimate $f(k)$.\n\nBrown, Erdős, and Freedman [BEF90] proved $k^2-k+1\\leq f(k) \\leq \\frac{k^3-4k+9}{3}$. Resolved by\nAlon and Spencer [AlSp89] who proved that in fact $f(k) \\gg k^3$, so that $f(k)\\asymp k^3$.\n-/\n@[category research solved, AMS 5 11, formal_proof using lean4 at\n  \"https://github.com/plby/lean-proofs/blob/8822f7ddef30fadbd92e1c6ab4ed897af356af5e/src/latest/ErdosProblems/Erdos781.lean#L3202\"]\ntheorem erdos_781.parts.i : (fun k ↦ (f k : ℝ)) =Θ[atTop] fun k ↦ (k : ℝ) ^ 3 := by\n  sorry\n\nset_option linter.style.formal_proof_palomar false in\n/--\nIs it true that $f(k)=k^2-k+1$ for all $k$?\n\nThe answer is no, since $f(k)\\gg k^3$ by Alon and Spencer [AlSp89].\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/Erdos781.lean#L3202\"]\ntheorem erdos_781.parts.ii : ¬ ∀ k ≥ 1, f k = k ^ 2 - k + 1 := by\n  sorry\n\n/-- Brown, Erdős, and Freedman [BEF90] proved $k^2-k+1\\leq f(k) \\leq \\frac{k^3-4k+9}{3}$. -/\n@[category research solved, AMS 5 11]\ntheorem erdos_781.variants.brown_erdos_freedman (k : ℕ) (hk : 1 ≤ k) :\n    k ^ 2 - k + 1 ≤ f k ∧ (f k : ℚ) ≤ (k ^ 3 - 4 * k + 9) / 3 := by\n  sorry\n\nend Erdos781\n",
  "statement_hash": "80e1342566670299b1e9f13d08de08c6df3cbebe82350a46e40b1bafa0a2a23c",
  "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."
}