modular_queens_attack
Two queens at positions x and y in (Z/nZ)^d attack each other if their difference x - y is a nonzero scalar multiple of a nonzero vector with coordinates in {-1, 0, 1}.
Statement
def modular_queens_attack {d n : ℕ} (x y : Fin d → ZMod n) : Prop
- Defined in
- arXiv:2611.14754 Sec. 1
- Verified
- 14 Nov 2026
- Axioms
- none listed
- Used by 3
- op_1592_zmod2_queens_card_le_oneOn any d-dimensional modular board (Z/2Z)^d, any set of mutually non-attacking queens has cardinality at most 1.
- is_non_attacking_queensA finite set of queens in (Z/nZ)^d is mutually non-attacking if no two distinct queens in the set attack each other.
- op_1592_not_always_n_sq_minus_one_queensIt is not the case that for every integer n ≥ 2 all of whose prime factors are at most 7, one can place n^2 - 1 mutually non-attacking…
Read back from the Lean
Given natural numbers $d$ and $n$, and two vectors $x, y \in (\mathbb{Z}/n\mathbb{Z})^d$, modular_queens_attack x y asserts that there exist a scalar $c \in \mathbb{Z}/n\mathbb{Z}$ and a sign vector $v : \mathrm{Fin}\ d \to \mathrm{SignType}$ such that:
1. $c \neq 0$,
2. $v \neq 0$ (i.e., $v$ is not the all-zero vector), and
3. for every coordinate $i \in \mathrm{Fin}\ d$, $x_i - y_i = c \cdot \mathrm{cast}(v_i)$ in $\mathbb{Z}/n\mathbb{Z}$ (where $\mathrm{cast}(v_i) \in \{-1, 0, 1\}$).
In other words, the difference vector $x - y$ is a non-zero scalar multiple in $(\mathbb{Z}/n\mathbb{Z})^d$ of a non-zero direction vector with entries in $\{-1, 0, 1\}$.
Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.
Lean source view module on GitHub
/-- Two queens at positions x and y in (Z/nZ)^d attack each other if x - y = c * v for nonzero c and nonzero v in {-1,0,1}^d. -/ def modular_queens_attack {d n : ℕ} (x y : Fin d → ZMod n) : Prop := ∃ (c : ZMod n) (v : Fin d → SignType), c ≠ 0 ∧ v ≠ 0 ∧ ∀ i : Fin d, x i - y i = c * (SignType.cast (v i) : ZMod n)