AFTD Auto-Formalizing Theoretical Domains

perm_offset_rook_number_four_sanity

theoremverified

For n = 4, the 4-th rook number for {-1, 0} is 2, and the 4-th rook number for {-1, 1} is 4: perm_offset_rook_number 4 {-1, 0} 4 = 2 and perm_offset_rook_number 4 {-1, 1} 4 = 4.

Statement

theorem perm_offset_rook_number_four_sanity :
    perm_offset_rook_number 4 {-1, 0} 4 = 2 ∧ perm_offset_rook_number 4 {-1, 1} 4 = 4
Source
arXiv:2610.23958 Section 6
Verified
24 Oct 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 1
  • perm_offset_rook_numberGiven a natural number n, a finite subset S ⊆ ℤ, and k ∈ ℕ, perm_offset_rook_number n S k is the number of k-element subsets R of cells…

Read back from the Lean

Both of the following equalities hold: 1. perm_offset_rook_number 4 {-1, 0} 4 = 2 2. perm_offset_rook_number 4 {-1, 1} 4 = 4

Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.

The proof, explained

The theorem is a sanity check verifying the number of non-attacking 4-rook placements on a 4 × 4 board for two specific allowed offset sets: {-1, 0} (which yields 2 placements) and {-1, 1} (which yields 4 placements). Because all structures involved are finite and all predicates are decidable, the proof proceeds entirely by finite computational verification using the `decide` tactic.

  1. perm_offset_rook_number 4 {-1, 0} 4 = 2 ∧ perm_offset_rook_number 4 {-1, 1} 4 = 4 automation

    The statement is a conjunction of two explicit evaluations of the rook counting function for a 4 × 4 board. Because the board Fin 4 × Fin 4 is finite, the 4-element subsets are finite, and the non-attacking condition is decidable, the `decide` tactic verifies the equalities directly by exhaustive finite computation.

    line 4

      decide

Written by a model (gemini-3.8-flash) from the Lean proof and the goal states Lean reported at each step. Lean verified the proof; this explanation is a reading aid and is not itself machine-checked.

Lean source view module on GitHub

/-- Sanity check: the 4-rook placements on 4x4 boards for {-1, 0} and {-1, 1} count 2 and 4 respectively. -/theorem perm_offset_rook_number_four_sanity :    perm_offset_rook_number 4 {-1, 0} 4 = 2 ∧ perm_offset_rook_number 4 {-1, 1} 4 = 4 := by  decide
See it in the graphDiscuss this resultChallenge it