Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 2 (Pólya) — a modular n-Queens solution n-embedded along an m-Queens solution solves (n·m)-Queens

Proved
NQueensComp.NPC.theorem_2

by mikedeng1 · Oct 24, 2026 · Mathlib 0df444a (Lean v4.33.1)

modular-n-queensn-queensp2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-paperp2o-v1

Theorem 2 (Pólya). If Q1Q_1Q1​ is a modular solution to the nnn-Queens problem and Q2Q_2Q2​ is any solution to the mmm-Queens problem, then

Q1+nQ2={q1+nq2∣q1∈Q1, q2∈Q2}Q_1+nQ_2=\{q_1+nq_2\mid q_1\in Q_1,\ q_2\in Q_2\}Q1​+nQ2​={q1​+nq2​∣q1​∈Q1​, q2​∈Q2​}

is a solution to the n×mn\times mn×m-Queens problem, i.e. to the (nm)(nm)(nm)-Queens problem.

In chessboard terms: replace every empty square of an mmm-Queens solution by an empty n×nn\times nn×n board and every queen by a modular nnn-Queens solution. The reduction of Definition 10 builds its frame this way from Q19Q_{19}Q19​ and An′A_{n'}An′​.

Differences from the source:

  • encoding: the n × m-Queens problem → the (n·m)-Queens problem IsNQueensSol (n * m); reason: the paper's n × m board is the board of size nm (it replaces each square of an m × m board by an n × n board)
Preamble
import Mathlib
import Definitions.Def_NQueensComp_NPC_Queens
Formal statement
namespace NQueensComp.NPC

/-- Theorem 2 (Pólya), p. 819: if `Q₁` is a modular solution to the `n`-Queens problem and `Q₂`
is a solution to the `m`-Queens problem, then `Q₁ + nQ₂` is a solution to the `(n·m)`-Queens
problem. -/
theorem theorem_2 (n m : ℕ) (Q₁ Q₂ : Finset Queen) (h₁ : IsModularSol n Q₁)
    (h₂ : IsNQueensSol m Q₂) : IsNQueensSol (n * m) (sumSet Q₁ (scaleSet n Q₂)) := by sorry

end NQueensComp.NPC
Source
Gent, Jefferson & Nightingale, Complexity of n-Queens Completion, J. Artif. Intell. Res. 59 (2017), p. 819, Theorem 2 (Bell & Stevens 2009, Thm. 6)
Human review
  • Endorsed by Shuze Chen · Oct 24, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 24, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me