# Solver Notes

## Formula Notes

The family is a bounded synchronizing-word encoding for complete binary DFAs.
For `Q` automaton states and word length `L`, the CNF has `Q * L` state-image
variables followed by `2 * L` selector variables. A positive selector pair
chooses one of the two letters at each word position. Initial binary clauses
force the image of the full state set after the first letter. Ternary clauses
propagate active image states through later letters. The final negative-binary
block enforces that the last image has size at most one.

The `crn_*` instances are Černý automata: one letter is a single directed
cycle and the other letter fixes every state except one state that moves to
its cycle successor. Their shortest synchronizing length is `(Q - 1)^2`, which
matches the local `crn_11_99/100`, `crn_20_360/361`, and baseline
`crn_40_1520/1521` names.

The `rnd_*` instances are random complete binary automata near their
synchronization thresholds. The visible satisfiable random instances are solved
by bounded power-automaton search and local high-level search over binary words.
The visible random unsat instances are proved by a reachable-subset refutation:
when a subset contains a state pair whose pair-automaton distance exceeds the
remaining suffix, the solver derives a hinted RUP pair-bad clause; otherwise it
branches over the next selected letter and derives a hinted bad-subset clause.
The hints are essential. The same proof without hints produced a 293 MB
`rnd_100_28_u` proof that did not finish checking inside a 300 second cap;
with hints, local checking took about 9.6 seconds for `rnd_100_28_u` and about
20.2 seconds for `rnd_150_29_u`.

## Techniques Used

- Structural detector that derives `Q`, `L`, selector layout, and DFA
  transitions from clause shapes only. It does not use comments, filenames, or
  hashes.
- Direct high-level synchronization solving on bitset subsets instead of CDCL.
- Closed-form Černý synchronizing word construction.
- VeriPB RUP proof generation for Černý lower-bound UNSAT instances up to 25
  states. The proof derives backward "bad subset" clauses from the final
  singleton constraint and selector clauses; local `Q=11` and `Q=20` unsat
  proofs verify with VeriPB.
- Beam search with pair-distance lower bounds, followed by deterministic local
  word search for random automata.
- Hinted VeriPB RUP subset proofs for random UNSAT instances, using original
  propagation, selector, initial-image, and final-pair clause IDs as hints.
- Full model reconstruction and independent original-CNF clause checking before
  printing `SATISFIABLE`.

## Remaining Things To Try

- Extend or compress the Černý proof for larger hidden instances such as
  `Q=40`; the current implementation deliberately caps proof generation at
  `Q<=25` to avoid oversized proofs. A synthetic `Q=40, L=1520` run finished
  proof generation in about 497 seconds but produced a 41 GB proof, so this
  needs a much more compact proof family before enabling.
- Add proof deletion or a symbolic Černý theorem proof. The random hinted proof
  is large but checker-friendly; the current Černý subset proof does not scale
  to `Q=40`.
- Tune bounded random search further for larger hidden random instances if the
  broker shows missed satisfiable cases.

## Known Limitations

- Random UNSAT proof generation is capped at `Q<=180` and `L<=80`; unsupported
  or structurally irregular cases return `UNKNOWN`.
- Černý UNSAT proof generation is conservative and capped at 25 states.
- Random search is incomplete. A missed synchronizing word causes `UNKNOWN`,
  never an invalid SAT answer, because every candidate model is checked against
  the input CNF.

## Changelog

- Replaced the placeholder solver with a C++ synchronizing-automaton detector,
  word finder, SAT assignment mapper, and CNF model checker.
- Added Černý-family closed-form solving and fast unknown return below the
  `(Q - 1)^2` length threshold.
- Added bounded beam/local search for random automata and relaxed transition
  recovery to tolerate omitted duplicate/irregular transition clauses observed
  in `rnd_150_42_s`.
- Added VeriPB RUP proof generation for visible-size Černý UNSAT formulas and
  fixed the empty-proof stub syntax for non-UNSAT exits.
- Measured a direct random-UNSAT subset proof; kept it out of the submitted
  solver because the unhinted proof is too large for reliable checker runtime.
- Tested the same Černý proof construction on synthetic `Q=40, L=1520` and
  kept the `Q<=25` cap after observing a 41 GB proof.
- Added hinted random-UNSAT subset proofs. Local results: `rnd_100_28_u`
  generates a 364 MB proof in about 20.6 seconds and verifies in about 9.6
  seconds; `rnd_150_29_u` generates a 741 MB proof in about 28.2 seconds and
  verifies in about 20.2 seconds.
