# Identifying codes of Archimedean grids — computer verification

This repository contains the script `verify.py`, which checks the computer-assisted part of the
proof of Theorem 8 (snub hexagonal grid 3^4.6, Section 7) of the paper

> R. M. Sampaio, *Identifying codes of Archimedean grids*.

All other proofs of the paper are by hand. Run the script with Python 3.8 or later (no external
packages are needed):

```
python3 verify.py
```

It runs in a few seconds and checks:

- the facts (F1)–(F3) of Section 7;
- that Table 3 is a correct certificate for the lower bound 1/3, with the rules (R1) and (R2)
  of Table 2: every vertex outside the code receives exactly 1; the 59 rows partition all
  configurations of the ball of radius 2 around a codeword `u`; the rows marked impossible
  contain no admissible configuration; every entry `q_w` is the exact maximum of the amount
  that `u` sends to `w`, and every entry `r` is the exact minimum of the amount that `u`
  receives; and every row satisfies `sum <= 2 + r`;
- the remark at the end of Section 7: no rule in which every vertex splits its charge according
  to fixed priorities among the positions `v1, ..., v5` achieves the bound 1/3.

A configuration is admissible if it satisfies the two conditions stated in the proof of
Theorem 8. All arithmetic on charges is exact (`fractions.Fraction`).
