Expand description
Pseudo-Boolean constraints + cutting planes — a proof system STRICTLY STRONGER than resolution.
Resolution (and therefore CDCL — ours and Z3’s) needs EXPONENTIALLY long refutations of the pigeonhole principle and of many counting/cardinality problems. Cutting planes refutes them in POLYNOMIAL size by reasoning about linear 0/1 inequalities directly: it p-simulates resolution and has short proofs where resolution provably cannot.
This is the certified core: a normalized PB constraint Σ aᵢ·ℓᵢ ≥ d (coeffs > 0, each variable
once, ℓ a literal x or ¬x) and the four sound cutting-plane rules — addition (with
literal cancellation via x + ¬x = 1), multiplication, division-with-rounding (the
Gomory–Chvátal cut, sound only because variables are integral), and saturation — each of
which is implied by its premises, so deriving the trivially-false 0 ≥ 1 refutes the inputs.
Every rule is pinned against a brute-force oracle. The headline is php_refutation: the
classic Cook–Coullard–Turán linear-size refutation of PHP — pure algebra where resolution
explodes.
Structs§
- Cardinality
Theory - A live cardinality theory for the CDCL engine (
crate::cdcl::Theory) — the trail-driven twin of the static cutting-plane refuterrefute_clausal. It propagates and conflicts on unit-coefficient cardinality constraints (Σ ℓ ≥ k, covering clauses, at-least-k, and at-most-k) directly on the solver’s trail (stateless: it rebuilds the partial assignment each call, so it can never desync), so it FUSES with a GF(2) parity theory (crate::xor_engine::XorEngine) under onecrate::cdcl::Solver::solve_with: parity and counting reason together on the shared trail. That is exactly the structure that defeats either alone — e.g. minimal-disagreement parity, a parity core plus a residual cardinality core, where Gaussian elimination handles the parity and cardinality propagation handles the counting, but neither is a refutation by itself. - PbConstraint
- A normalized pseudo-Boolean constraint
Σ coeff·lit ≥ degree: everycoeff > 0, every variable appears at most once, and the literal sign rides the entry —(coeff, positive)withpositive == falsemeaning the literal¬x.degreemay be ≤ 0 (then the constraint is trivially true) or exceed the coefficient sum (then it is a contradiction).
Functions§
- coeff_
symmetry_ generators - The coefficient-symmetry generators of a pseudo-Boolean system: adjacent transpositions of variables
that share a coefficient profile — the same
(coeff, sign)(or absence) in every constraint. Such variables are interchangeable because each constraint is a weighted sum, blind to which equal-weight variable carries which value. Each generator is a genuine symmetry (is_pb_symmetry); together they generate the full product of symmetric groups on the profile classes. Variables in no constraint are excluded (free, not a constraint symmetry). - is_
pb_ symmetry - Does the variable permutation
permpreserve every constraint? (term(perm[v]) == term(v)for allv— a relabelling that fixes each constraint’s coefficient/sign structure, hence its solution set.) - php_
refutation - Refute the pigeonhole principle PHP(
n,n−1) with the classic Cook–Coullard–Turán cutting- plane proof: sum alln“each pigeon in ≥1 hole” constraints with alln−1“each hole holds ≤1 pigeon” constraints. Everyxmeets its¬xand cancels, collapsing the whole system to the trivially-false0 ≥ 1in just2n−1additions — linear size, where resolution needs exponentially many steps. Returns the final derived constraint (a contradiction). - refute_
clausal - Refute
eby CUTTING PLANES when it is a cardinality/pigeonhole-shaped CNF. The pairwise encoding loses the cardinality structure, so we RECOVER it: the binary exclusions¬(a∧b)form conflict cliques, each a genuine “at most one” group; summing thoseat_most(group,1)cardinality constraints with the positive “at least one” clauses cancels every literal against its negation and collapses a pigeonhole-shaped system to0 ≥ 1— POLYNOMIAL, where resolution/CDCL explode.