# Registered protocol 5: rotated orders and a local sweep

Frozen on 29 November 2026, after protocol 4 was scored and published (pull requests #30 and #31), and before any run
under this protocol beyond those named below. Corrections are dated addenda at the end.

## Why

On the mutilated chessboard the automatic sweep wrote proofs 2.0 to 2.4 times larger than Bryant and Heule's
hand-made column scan, although this prover reproduces their published sizes within 1.2% when given their schedule
(`column_scan.py`). Two causes were identified while exploring after protocol 4:

1. the board's two removed corners lie on a diagonal, so the two slowest eigenvectors, nearly tied, point along the
   diagonals and the sweep runs diagonally, across a longer frontier;
2. each clause went to the slice of its own earliest variable, which split a square's exactly-one constraint between
   two slices.

## What changes

- **`auto5` orders** (`spectral.py`, `rotate=True`): as `auto3`, except that when the time and transverse directions
  each come from a cluster of at most two eigenvalues and their eigenvalues are within a factor TIE = 1.2, the pair is
  rotated through ANGLES = 12 angles and the rotation whose sweep has the smallest frontier (the most variables shared
  by finished and unfinished clauses at a slice boundary) is kept. Large symmetric clusters (pigeonhole) are never
  rotated.
- **`sweep3` schedule** (`schedule.py`, `local=True`): as `sweep2`, except that a clause joins the slice of a larger
  clause that contains all its variables and has at most LOCAL = 2 times as many, and every variable is quantified as
  soon as all the clauses containing it have been conjoined.
- Proof steps are compact (protocol 4). With the new options off, the proofs of protocols 1–4 are reproduced byte for
  byte (checked on four formulas).

## What was seen before this freeze

On shuffle 10 (protocol 4's formulas), with compact steps:
- `chess` 16, 24, 32 and 40: 100,341, 298,042, 620,753 and 1,143,274 proof clauses with the new method (against
  1,851,292 at n = 40 with protocol 4's).
- At n = 24, the new method against protocol 4's on the same formulas: `chess-random` 0.70, `chess-rect` 0.75,
  `chess-four` 0.69, `tseitin-cylinder` 0.89, `tseitin-torus` 1.011, `php-direct` and `php-sinz` 1.000; `php-onto`
  1,262,346 and `tseitin-grid` 213,283 clauses with the new method.
- Before the restriction to clusters of at most two eigenvalues, rotation on `php-onto` 24 exceeded 4 GB.
- Variants explored and not adopted: grouping into any larger clause (made `php-onto` 19% larger), folding a slice's
  clauses one at a time.

Shuffle 11, used here, has not been run.

## Frozen files (SHA-256)

```
7d02ab5e147b1a5819acc4ef54fe58c31654ca2540e039807d3f2210fa8fb5ab  prover.py
bf746500d1f5bd92454d563e1ec44c71492f418f6824df9d9b64757c7ad68445  schedule.py
f5870485df48ba19fbbdcdac6232eb8bd82c95126c26058661aa267b6990ecfa  spectral.py
c67397c28429122658f19e52542f44348358c5dd50e1912e92278bb49df8b135  orders.py
21509b0ef4e947653200ef1d39c1e01db01b2a2720ac1cdd1bc961e4593b333a  families.py
2cff6fd48d5d0623565402a3101b2dc0783430015586328f6222457cbe706c8e  run.py
26a4081473de23c174b15fa1c12195678c104d2dbec00772ca426667c7cc2de1  experiment.py
c2ca30e5181c1d7031ccc7a4e6f4600309d33721f3de0c8338105ff4de19ac4c  analyze.py
157765bce470ea0b53995b0dbd0a30ba64b5c47a78d890d7bfed4f745d1ab9c5  theory.py
```

## Runs

`python3 experiment.py --protocol 5` runs 20 series (`--protocol 5 --list`): the new method (`auto5`, `sweep3`, compact)
on ten structured families, and protocol 4's method (`auto3`, `sweep2`, compact) on the same shuffle-11 formulas at
n = 16, 24, 32 and 40. Limits as before: 50 million proof clauses, 1,800 seconds and 7 GiB per run.

## Hypotheses and how they are scored (`analyze.py --protocol 5`)

- **V0 (soundness).** Every "unsat" run has a proof that `lrat-check` verifies.
- **V1 (the chessboard).** At n = 16, 24, 32 and 40 the new method's proof, counted with its input clauses as Bryant and
  Heule count, is at most 1.6 times their published column-scan proof (71,533; 202,375; 428,145; 772,523).
- **V2 (nothing gets worse).** On the same shuffle-11 formulas, at every size where both methods have verified proofs,
  the new proof is at most 1.05 times protocol 4's.
- **V3 (scaling).** For each of the ten families: verified proofs up to n ≥ 32, the power fit beats the exponential fit
  over n ≥ 16, exponent at most 5.
- **V4 (the pigeonhole theorem).** For every verified `php-direct` run, the largest state equals
  max_i (n − i)(i + 1)(n + 1 − i).

## Addenda
