formalist(OPE-6): n-queens namesake theorem, zero sorry (supersedes #4) - #6
Open
agentforce314 wants to merge 2 commits into
Open
agentforce314 wants to merge 2 commits into
agentforce314 wants to merge 2 commits into
Conversation
…y on branch only) - New ProofLab/NQueensTheorem.lean: NonAttacking (Fin n → Fin n) and n_queens_exists_iff copied verbatim from the Scout pin; optional split queens_exists_of_four_le; both tagged STUB: proof in OPE-6 - decide-level sanity: NonAttacking ![1,3,0,2] (PR Paul3435#174 n=4 witness) - ProofLab.lean imports the new module; ProofLab/NQueens.lean untouched - STATEMENT.md: carries PR #3 text + appended 'Lean pin' section with build tail and #print axioms (now [sorryAx]; done requires none) - Verify: lake build ProofLab.NQueensTheorem exit 0, 2 sorry warnings Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
… E1/E2 + corner extension) Proves n_queens_exists_iff and queens_exists_of_four_le in ProofLab/NQueensTheorem.lean; frozen statements from the OPE-4 pin are byte-identical. Route is the Attack Lead's (OPE-5) 3-formula partition, entirely in ℕ → ℕ with one Fin transfer lemma. n = 2, 3 nonexistence by kernel decide on the function encoding. #print axioms: [propext, Classical.choice, Quot.sound]. Supersedes PR #4. Deviations from the LOG text: f₂ pieces P3/P4 written with the addition first (2*r + 2 - …) to avoid ℕ truncation; e2_no_fix needs 4 ≤ n. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This was referenced Sep 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
OPE-6 (Formalist). Lean 4 + Mathlib proof of the n-queens namesake theorem, zero
sorry. Supersedes PR #4 (branch is built onope/4-nqueens-statement-pin; this PR contains PR #4's statement pin plus the proof, so #4 can be closed unmerged).Status: known-classical, formalize-only, no novelty claim. Do not merge — board merges after Adversarial Reviewer (OPE-7) sign-off.
catalog/,docs/PROBLEM_LEDGER.md,STATEMENT.mddeliberately untouched per Director instruction.What is proved (
proofs/lean-project/ProofLab/NQueensTheorem.lean)def NonAttackingand both theorem statements are byte-identical to the OPE-4 pin (checked bydiffof the extracted blocks).Route (Attack Lead OPE-5,
attacks/n-queens-20260912-180329/LOG.md)nonAttacking_of_nat— the onlyFinlemma; everything else isℕ → ℕ.GoodEven n f— bound / injective / anti-diag / main-diag / no fixed point.f₁(n % 6 ∈ {0,4}),f₂(n % 6 = 2,8 ≤ n), each five lemmas bysimp only [f]; split_ifs <;> omega.corner m g— odd boardsm + 1from aGoodEven m g;no_fixis used exactly incorner_main.n = 2, 3:unfold NonAttacking; decideon the function encoding (4 / 27 functions) — kernel handled it, no bridge to Level A needed.n = 0, 1:id.Deviations from the LOG text (both arithmetic, both flagged in the file header)
f₂pieces P3/P4 written2 * r + 2 - n / 2/2 * r + 2 - 3 * (n / 2)instead of2 * r - 3 * (n / 2) + 2: the latter truncates in ℕ when2r ∈ {3h−2, 3h−1}(e.g.n = 14, r = 10). Python verifier used signed ints so never saw it. Values agree on every evaluated branch.e2_no_fixtakes4 ≤ n: atn = 2(h = 1)f₂fixes both rows. Irrelevant to assembly (8 ≤ nthere).Gate output
Verify
Residual risks (for OPE-7)
NonAttackingis the intended predicate (both diagonal families,n = 0vacuous) — the proof is only as good as the pin.omegacloses every arithmetic case;decideonFin 3 → Fin 3compiles in seconds on Lean 4.10.0. Sanityexamples checkf₁ 4 = [1,3,0,2]andf₂ 8 = [3,5,7,1,6,0,2,4].🤖 Generated with Claude Code