Parity of the number of completions #
Written by Claude (Anthropic) at Richard Bean's request, October 2026, for version 0.2.0. This is Theorem A of the paper: below the quarter bound, every set of clues taken from a Latin square has an even number of completions.
The coefficient computation in Counting.lean holds for every set of clues,
not only for defining sets: the square-free coefficient counts, modulo two,
the row choices that produce Latin squares. Those row choices correspond
exactly to the completions. The vanishing argument used in LowerBound.lean
makes the coefficient zero below the quarter bound.
The square-free coefficient counts the Latin row choices modulo two.
Every completion arises from one permutation of the free cells in each row.
Theorem A, in the cell form used throughout this package: if fewer than
n * n / 4 cells of a Latin square L are given, the number of Latin squares
that agree with L on those cells is even.