{
  "id": "4264",
  "ident": "NS.04264",
  "slug": "green-97",
  "title": "Ben Green's Open Problem 97",
  "status": "open",
  "statement_status": "reviewed",
  "statement_md": "In how many ways (asymptotically) $Q(n)$ may $n$ non-attacking queens be placed on an\n$n \\times n$ chessboard?\n\nThis is the $n$-queens problem, see [Gr24, Problem 97]. We read \"asymptotically\" as: find an\nexplicit function `green_97.answer` with $Q(n) \\sim$ `green_97.answer n`. The function\n$n \\mapsto Q(n)$ itself is not an explicit answer. [Gr24] notes that an asymptotic \"rather than\nan asymptotic for the log\" is open. What is known is $Q(n) = ((1+o(1))\\, n e^{-\\alpha})^n$ for a\nconstant $1.94 < \\alpha < 1.9449$ [Si23], see `green_97.variants.simkin`.",
  "subjects": [
    "math.CO",
    "msc:05"
  ],
  "tags": [
    "question"
  ],
  "collection": "green",
  "source_url": null,
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "Green97.green_97",
  "statement_lean": "theorem green_97 :\n    (fun n : ℕ ↦ (numQueens n : ℝ)) ~[atTop] green_97.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# Ben Green's Open Problem 97\n\n*References:*\n- [Gr24] [Green, Ben. \"100 open problems.\" (2024).](https://people.maths.ox.ac.uk/greenbj/papers/open-problems.pdf#problem.97)\n- [Si23] Simkin, M., *The number of $n$-queens configurations*. Adv. Math. 427 (2023),\n  Paper No. 109127. [arXiv:2107.13460](https://arxiv.org/abs/2107.13460)\n- [BoKe21] Bowtell, C. and Keevash, P., *The $n$-queens problem*.\n  [arXiv:2109.08083](https://arxiv.org/abs/2109.08083) (2021).\n- [NAB23] Nobel, P., Agrawal, A. and Boyd, S., *Computing tighter bounds on the $n$-queens\n  constant via Newton's method*. Optim. Lett. 17 (2023), 1229--1240.\n  [arXiv:2112.03336](https://arxiv.org/abs/2112.03336)\n- [EMM19] Eberhard, S., Manners, F. and Mrazović, R., *Additive triples of bijections, or the\n  toroidal semiqueens problem*. J. Eur. Math. Soc. 21 (2019), 441--463.\n  [arXiv:1510.05987](https://arxiv.org/abs/1510.05987)\n-/\n\n@[expose] public section\n\nopen Filter Asymptotics\nopen scoped Nat Topology\n\nnamespace Green97\n\n/--\nThe permutation `σ` of `Fin n` is a placement of $n$ non-attacking queens on the $n \\times n$\nboard, with the queen of row `i` in column `σ i`.\n\nA placement of $n$ queens on an $n \\times n$ board has exactly one queen in each row and in each\ncolumn, so it is a permutation. Two queens on the same diagonal have the same value of\n`σ i - i` or of `σ i + i`, computed in $\\mathbb{Z}$.\n-/\ndef IsQueens {n : ℕ} (σ : Equiv.Perm (Fin n)) : Prop :=\n  (Function.Injective fun i : Fin n ↦ ((σ i).val : ℤ) - (i.val : ℤ)) ∧\n    Function.Injective fun i : Fin n ↦ ((σ i).val : ℤ) + (i.val : ℤ)\n\ninstance {n : ℕ} : DecidablePred (IsQueens (n := n)) := fun σ ↦ by\n  unfold IsQueens\n  infer_instance\n\n/--\n`numQueens n` is $Q(n)$, the number of ways to place $n$ non-attacking queens on an $n \\times n$\nchessboard (`IsQueens`). For $n = 0$ there is one (empty) placement.\n-/\ndef numQueens (n : ℕ) : ℕ :=\n  (Finset.univ.filter fun σ : Equiv.Perm (Fin n) ↦ IsQueens σ).card\n\n/--\nThe permutation `σ` of `Fin n` is a placement of $n$ non-attacking queens on the toroidal\n$n \\times n$ board: as for `IsQueens`, but the diagonals wrap around, so `σ i - i` and `σ i + i`\nare computed in $\\mathbb{Z}/n\\mathbb{Z}$.\n-/\ndef IsToroidalQueens {n : ℕ} (σ : Equiv.Perm (Fin n)) : Prop :=\n  (Function.Injective fun i : Fin n ↦ ((σ i).val : ZMod n) - (i.val : ZMod n)) ∧\n    Function.Injective fun i : Fin n ↦ ((σ i).val : ZMod n) + (i.val : ZMod n)\n\ninstance {n : ℕ} : DecidablePred (IsToroidalQueens (n := n)) := fun σ ↦ by\n  unfold IsToroidalQueens\n  infer_instance\n\n/--\n`numToroidalQueens n` is $T(n)$, the number of ways to place $n$ non-attacking queens on the\ntoroidal $n \\times n$ board (`IsToroidalQueens`).\n-/\ndef numToroidalQueens (n : ℕ) : ℕ :=\n  (Finset.univ.filter fun σ : Equiv.Perm (Fin n) ↦ IsToroidalQueens σ).card\n\n/--\nThe filter on `ℕ` for $n \\to \\infty$ through the integers with $n \\equiv 1, 5 \\pmod 6$. For\n$n \\ge 1$, these are exactly the $n$ for which $T(n) > 0$ (Pólya, see [BoKe21, Chapter 1]).\n-/\nnoncomputable def toroidalDegrees : Filter ℕ :=\n  atTop ⊓ Filter.principal {n : ℕ | n % 6 = 1 ∨ n % 6 = 5}\n\n/-- The 4-queens problem has $2$ solutions. -/\n@[category test, AMS 5]\ntheorem numQueens_four : numQueens 4 = 2 := by\n  decide +kernel\n\n/-- The 3-queens problem has no solution. -/\n@[category test, AMS 5]\ntheorem numQueens_three : numQueens 3 = 0 := by\n  decide +kernel\n\n/-- On the toroidal $5 \\times 5$ board there are $10$ placements of $5$ non-attacking queens. -/\n@[category test, AMS 5]\ntheorem numToroidalQueens_five : numToroidalQueens 5 = 10 := by\n  decide +kernel\n\ndef green_97.answer : ℕ → ℝ := sorry\n\n/--\nIn how many ways (asymptotically) $Q(n)$ may $n$ non-attacking queens be placed on an\n$n \\times n$ chessboard?\n\nThis is the $n$-queens problem, see [Gr24, Problem 97]. We read \"asymptotically\" as: find an\nexplicit function `green_97.answer` with $Q(n) \\sim$ `green_97.answer n`. The function\n$n \\mapsto Q(n)$ itself is not an explicit answer. [Gr24] notes that an asymptotic \"rather than\nan asymptotic for the log\" is open. What is known is $Q(n) = ((1+o(1))\\, n e^{-\\alpha})^n$ for a\nconstant $1.94 < \\alpha < 1.9449$ [Si23], see `green_97.variants.simkin`.\n-/\n@[category research open, question value, AMS 5]\ntheorem green_97 :\n    (fun n : ℕ ↦ (numQueens n : ℝ)) ~[atTop] green_97.answer := by\n  sorry\n\n/--\n**Simkin's theorem.** There is a constant $1.94 < \\alpha < 1.9449$ such that\n$$\\lim_{n \\to \\infty} \\frac{Q(n)^{1/n}}{n} = e^{-\\alpha},$$\nthat is, $Q(n) = ((1+o(1))\\, n e^{-\\alpha})^n$ [Si23, Theorem 1.1]. The constant $\\alpha$ is\ndefined in [Si23] as the solution of a convex optimisation problem over Borel probability measures\non the square $[-1/2, 1/2]^2$. The limit determines $\\alpha$ uniquely. Nobel, Agrawal and Boyd\n[NAB23] combined Simkin's formulation with a sharper bound of Knuth, solved the resulting convex\nproblems numerically, and report the tighter range\n$\\alpha \\in [1.944000752, 1.944001082]$.\n-/\n@[category research solved, AMS 5]\ntheorem green_97.variants.simkin :\n    ∃ α : ℝ, 1.94 < α ∧ α < 1.9449 ∧\n      Tendsto (fun n : ℕ ↦ (numQueens n : ℝ) ^ ((1 : ℝ) / n) / n) atTop\n        (𝓝 (Real.exp (-α))) := by\n  sorry\n\ndef green_97.variants.alpha.answer : ℝ := sorry\n\n/--\nFind an explicit value for the constant $\\alpha$ of `green_97.variants.simkin`, that is, the\nnumber with $Q(n)^{1/n}/n \\to e^{-\\alpha}$.\n\n[Gr24] writes that \"an explicit solution remains an open problem\". The value $\\alpha$ is the\nsolution of an entropy optimisation problem [Si23]. As for `green_97`, an explicit closed form is\nintended.\n-/\n@[category research open, question value, AMS 5]\ntheorem green_97.variants.alpha :\n    Tendsto (fun n : ℕ ↦ (numQueens n : ℝ) ^ ((1 : ℝ) / n) / n) atTop\n      (𝓝 (Real.exp (-green_97.variants.alpha.answer))) := by\n  sorry\n\n/--\n**Bowtell and Keevash.** For $n \\equiv 1, 5 \\pmod 6$ the number of toroidal $n$-queens\nconfigurations satisfies $T(n) = ((1+o(1))\\, n e^{-3})^n$ [BoKe21, Theorem 1.2]. The filter\n`toroidalDegrees` restricts to these $n$, because $T(n) = 0$ for all other $n \\ge 1$.\n-/\n@[category research solved, AMS 5]\ntheorem green_97.variants.bowtell_keevash :\n    Tendsto (fun n : ℕ ↦ (numToroidalQueens n : ℝ) ^ ((1 : ℝ) / n) / n) toroidalDegrees\n      (𝓝 (Real.exp (-3))) := by\n  sorry\n\ndef green_97.variants.toroidal.answer : ℕ → ℝ := sorry\n\n/--\nFind an asymptotic for the number $T(n)$ of toroidal $n$-queens configurations, for\n$n \\equiv 1, 5 \\pmod 6$.\n\n[Gr24] writes, after the result of [BoKe21], that the problem of \"obtaining an asymptotic (rather\nthan an asymptotic for the log) remains open\". [BoKe21] proved the asymptotic of the logarithm, see\n`green_97.variants.bowtell_keevash`. We read \"asymptotic\" as for `green_97`: an explicit function\nis intended.\n-/\n@[category research open, question value, AMS 5]\ntheorem green_97.variants.toroidal :\n    (fun n : ℕ ↦ (numToroidalQueens n : ℝ)) ~[toroidalDegrees]\n      green_97.variants.toroidal.answer := by\n  sorry\n\n/--\n`numAdditiveTriples n` is the number of pairs $(\\pi_1, \\pi_2)$ of bijections\n$\\{1, \\dots, n\\} \\to \\mathbb{Z}/n\\mathbb{Z}$ such that $\\pi_1 + \\pi_2$ is also a bijection\n[EMM19, Section 1]. It is $n!$ times the number of arrangements of $n$ mutually non-attacking\nsemiqueens on the toroidal $n \\times n$ board, where a semiqueen moves along rows, columns and\none diagonal direction.\n-/\nnoncomputable def numAdditiveTriples (n : ℕ) : ℕ :=\n  Nat.card {π : (Fin n ≃ ZMod n) × (Fin n ≃ ZMod n) //\n    Function.Bijective fun i ↦ π.1 i + π.2 i}\n\n/--\n**Eberhard, Manners and Mrazović.** For odd $n$, the number $s_n$ of pairs $(\\pi_1, \\pi_2)$ of\nbijections $\\{1, \\dots, n\\} \\to \\mathbb{Z}/n\\mathbb{Z}$ with $\\pi_1 + \\pi_2$ also a bijection is\n$$s_n = (e^{-1/2} + o(1))\\, \\frac{(n!)^3}{n^{n-1}}$$\n[EMM19, Theorem 1.2]. [Gr24] refers to this paper for the variant of the toroidal question where\nonly $\\pi_1$, $\\pi_2$ and $\\pi_1 - \\pi_2$ are required to be bijections. Replacing $\\pi_2$ by\n$-\\pi_2$ shows that this variant has the same count $s_n$. For even $n$, $s_n = 0$\n[EMM19, Section 1], so the theorem is stated for odd $n$.\n-/\n@[category research solved, AMS 5]\ntheorem green_97.variants.eberhard_manners_mrazovic :\n    (fun n : ℕ ↦ (numAdditiveTriples n : ℝ)) ~[atTop ⊓ Filter.principal {n : ℕ | Odd n}]\n      fun n : ℕ ↦ Real.exp (-(1 / 2)) * ((n ! : ℕ) : ℝ) ^ 3 / (n : ℝ) ^ (n - 1) := by\n  sorry\n\nend Green97\n",
  "statement_hash": "d989976f96d4fd30781b7deb087f21446d3d424e04d91b2dd81a6ffbae10d83b",
  "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."
}