# Solver Notes

## Formula Notes

- The visible `sum_of_three_cubes_*` instances are regular bit-vector
  arithmetic CNFs.  After the false sentinel variable, they have three
  equal-width primary vectors followed by a width-sized constant `1` vector.
  The final equality is to the small constant `3`.
- The polarity/sign convention is not the usual signed three-root equation.
  The CNF accepts the unsigned magnitude identity `4^3 + 4^3 - 5^3 = 3`
  across all visible widths (`33`, `165`, and `906` files).
- Brocard instances have a different structure with many excluded bit-vector
  values.  No VeriPB proof strategy is implemented yet, so they are currently
  reported as `UNKNOWN`.

## Techniques Used

- Structural detector for the three-cube layout based only on sanitized CNF
  shape: `-1` sentinel, three primary vectors, and the initial constant-one
  vector.  No comments, hashes, or filenames are used.
- Direct high-level witness injection for the recovered equation: assign
  primary vectors to `(4, 4, 5)`, then try a short catalog of published
  magnitude witnesses for variants that exclude the small identity.
- Watched-literal propagation completes most Tseitin variables.  A bounded
  residual DPLL pass fills the small set of late adder/comparator variables.
- Full model validation scans every original clause before printing
  `SATISFIABLE`.

## Remaining Things To Try

- Derive a compact VeriPB proof for the Brocard UNSAT instances.  The visible
  formulas are not pure unit-propagation UNSAT, so `rup >= 1` is insufficient.
- Decode the Brocard high-level arithmetic/exclusion proof and map it to PB
  constraints.
- If a future three-cube variant rejects `(4,4,5)`, inspect whether the final
  target or sign convention changed before enabling the experimental CDCL
  fallback.

## Known Limitations

- UNSAT is never claimed.  Unsupported structures and failed model validation
  return `UNKNOWN`.
- The three-cube detector is intentionally conservative; formulas that do not
  match the visible bit-vector layout are skipped.
- The optional CDCL code is compiled in for local experiments but is disabled
  by default at evaluation time because it did not solve the visible formulas
  faster than the direct witness.

## Changelog

- Replaced scaffold with a C++ parser, watched propagation, model completion,
  and clause validation.
- Added repeatable CNF analysis tools under `tools/`.
- Recovered the three-cube sign convention and installed the structural
  `(4, 4, 5)` witness path.
- Added published magnitude witnesses for nontrivial three-cube variants,
  still guarded by full CNF validation.
- Added a width gate to avoid spending catalog time on very large unsupported
  sum instances.
- Added metadata describing the specialized SAT-only strategy.
