# Solver Notes

## Formula Notes

- The visible training instance is a clique-existence encoding. It has `k`
  positive slot clauses, each requiring one selected graph vertex, and binary
  negative clauses for incompatible pairs.
- Variables are arranged as `slot x vertex`. The visible file has 10 slots and
  18 vertices per slot.
- The graph vertices are partitioned into 9 groups. Any two selected vertices
  from the same group are forbidden, both within a slot and across different
  slots. This makes the maximum clique size 9, so a 10-clique formula is
  unsatisfiable by pigeonhole counting.
- Baseline results mention the same family at `clique_n2_k10` through
  `clique_n5_k10`; this solver does not use filenames or comments and instead
  recovers the slot clauses, vertex groups, and required binary support from
  the sanitized CNF.

## Techniques Used

- Structural detection of partitioned clique encodings from clause shapes.
- Union-find recovery of the forbidden vertex groups.
- Conservative proof precheck: before answering UNSAT, every pair of variables
  inside each recovered group across all slots must have an explicit negative
  binary clause.
- VeriPB proof generation:
  - For each group, a `pbc` subproof derives an at-most-one constraint over all
    variables in that group. Under the negated goal, setting any group variable
    true forces all other group variables false by RUP, contradicting the
    assumption that at least two are true.
  - A final cutting-planes sum combines the group at-most-one constraints with
    the slot at-least-one clauses. Since there are more slots than groups, the
    normalized sum is a contradiction.

## Remaining Things To Try

- If future hidden instances include satisfiable cases with `slots <= groups`,
  add model construction by selecting one representative from distinct groups.
- Add support for non-complete or irregular color-class proofs if the family is
  broadened beyond the current partitioned-clique structure.
- Consider proof deletion if much larger variants increase checker memory,
  though the current proof is tiny for the observed parameter regime.

## Known Limitations

- The solver only commits to UNSAT for the recovered partitioned clique
  structure with complete binary support for every group at-most-one proof.
- It returns UNKNOWN for arbitrary clique encodings, general SAT, malformed
  files, extra variables outside the slot partition, unsupported clause shapes,
  or cases where the pigeonhole contradiction is absent.
- It does not depend on DIMACS comments, file names, hashes, or training
  instance identities.

## Changelog

- Initial scaffold: placeholder UNKNOWN solver.
- 2026-05-06: Recovered the partitioned clique / pigeonhole encoding from the
  visible training formula.
- 2026-05-06: Implemented a C++ structural detector and VeriPB proof emitter
  using per-group proof-by-contradiction at-most-one constraints plus a final
  cutting-planes contradiction.
- 2026-05-06: Verified locally on the visible training instance with
  `veripb --cnf`.
