Expand description
Parametric generators for symmetry-rich SAT families — the canonical hard cases where
symmetry breaking earns its keep. They are programmatic (reproducible, offline, parametric)
rather than vendored .cnf files, and each is pinned to its known verdict so the solver and
the certified pipeline can be tested against ground truth.
Enums§
- Expected
Verdict - The known verdict of a generated instance, for test oracles.
Functions§
- clique_
coloring - Graph
k-coloring of the complete graphK_n— the canonical color-permutation symmetry family (the color groupS_kacts, on top of the vertex groupS_n). It is unsatisfiable exactly whenk < n(a clique of sizenneedsncolors). The variable “vertexvtakes colorc” lives at indexv*k + c. - functional_
php - The functional pigeonhole principle FPHP(n):
php(n)strengthened so each pigeon sits in at most one hole (the placement is a function, not a relation). Adds the “no pigeon in two holes” clauses on top of PHP; still UNSAT, stillS_n × S_{n−1}-symmetric, and the standard strengthening used to check that symmetry breaking survives the extra functional clauses. Same layout asphp. - grid_
tseitin - The Tseitin formula on a
w × ngrid with odd total charge — UNSATISFIABLE, and the sharpest indictment of resolution search there is. A grid has treewidth exactlyw(a fixed constant, independent of the lengthn), so a POLYNOMIAL-size, bounded-width resolution refutation provably EXISTS. Yet CDCL solvers without Gaussian reasoning blow up on the parity regardless — they cannot find the short proof that is known to exist — while Gaussian elimination over GF(2) decides it in near-linear time. One Boolean per grid edge; per vertex, the XOR of its incident edges equals its charge (vertex 0 charged, the rest not — an odd sum, hence inconsistent). Returns the XOR system (forcrate::xorsat) and the equisatisfiable CNF. - ksat_
threshold_ first_ moment_ upper - The first-moment (counting) upper bound on the random k-SAT satisfiability threshold:
α*(k) = ln 2 / ln(2ᵏ / (2ᵏ − 1)). Above this clause density the expected number of satisfying assignmentsE[X] = 2ⁿ(1 − 2⁻ᵏ)^{αn} = (2·(1 − 2⁻ᵏ)^α)ⁿhas per-variable base< 1, soE[X] → 0and the instance is UNSAT with high probability (Markov) — a rigorous upper bound on the true threshold, exact and closed-form (no sampling). The sequence climbs as2ᵏ ln 2 − (ln 2)/2, asymptotically doubling per k:2.41, 5.19, 10.74, 21.83, 44.02, …fork = 2, 3, 4, 5, 6, …. The true thresholds (≈ 1, 4.27, 9.93, 21.1, …) lie below it; the gap → ½ as k → ∞ (the difference between the first-moment bound2ᵏln2 − ½ln2and the sharp value2ᵏln2 − (1+ln2)/2). - mod_
counting - The modular counting principle
Count_q(n): can then-element set{0,…,n−1}be exactly partitioned into blocks of sizeq? A Boolean perq-subset (hyperedge); clauses force every element to lie in ≥ 1 chosen block and forbid any two overlapping blocks — so the chosen blocks are a perfectq-cover (an exact partition). That exists iffq ∣ n, hence the formula is UNSAT exactly whenq ∤ n. This is the canonical modular family — the obstruction is a counting argument modqthat resolution cannot make at low width (Ajtai; Beame–Pitassi), the natural target of the GF(q) / mod-mrung.q = 2is perfect matching on the complete graphK_n(UNSAT for oddn). The hyperedge count isC(n, q), so keepn,qsmall. - mod_
counting_ edges - The edge layout of
mod_counting: variableeis theq-subsetmod_counting_edges(n, q)[e]of the point set{0,…,n−1}— the map a witness-support predicate needs to read a monomial as a set of blocks. - mod_
counting_ groups - The exactly-one groups of
mod_counting’s linear encoding: for each point, the variables of its covering clause — the incidentq-subsets, in the same variable order asmod_counting. Feed topolycalc::exactly_one_linear_generatorsfor the degree-1 point generators plus overlap pairs (the encoding the modular-counting degree lower bounds are stated against). - mod_
m_ tseitin_ expander - The composite-modulus sibling of
mod_p_tseitin_expander: the same total-charge-2 divergence obstruction overℤ/mfor a squarefree compositem(e.g.m = 6), with a mixed-radix one-hot Boolean encoding (mvalues per edge). By CRTℤ/m ≅ ∏ GF(pᵢ), so the system is inconsistent overℤ/mexactly when it is inconsistent over some prime factor — total charge2 ≢ 0 (mod m)for anym ≥ 3that does not divide2— andcrate::modm::solvedecides it through that factor with a solver-free re-checkable certificate (crate::modm::is_refutation). This drives the ring route (ℤ/mGaussian via CRT), not the prime-field route, on a CNF that resolution still walls on. - mod_
p_ consistent_ onehot - A satisfiable sibling of
mod_p_tseitin_expanderover the same 3-regular graph and the same one-hot Boolean encoding, but with a charge distribution whose total≡ 0 (mod p). The divergence systemΣ_out x − Σ_in x ≡ charge(v)is consistent exactly when the charges sum to zero (summing all vertex equations telescopes the left side to0), so this instance is SAT — the control for the GF(p) route’s model-returning path. Charge:+1at vertex 0,−1 (= p−1)at vertex 1, zero elsewhere. - mod_
p_ tseitin_ expander - The mod-
pTseitin obstruction on a random 3-regular expander — the parity crush carried to every prime. Each edge carries aGF(p)flow variable; orient each edge and impose, at every vertex, the signed divergenceΣ_out − Σ_in ≡ charge (mod p). Summing all vertices telescopes the edge variables to0, so the system is inconsistent exactly when the total charge≢ 0 (mod p). We charge two vertices (total2): inconsistent overGF(p)for every odd primep, yet consistent overGF(2)(2 ≡ 0) — a family the parity cut is structurally blind to, decided instantly by Gaussian elimination over the rightGF(p), and (on an expander) exponentially hard for resolution. Returns theGF(p)system (forcrate::modp), the equisatisfiable one-hot Boolean CNF (for resolution solvers), and theGF(p)verdict. - mutilated_
chessboard - The mutilated chessboard: an
n×nboard with two OPPOSITE corners removed, asking for a perfect domino tiling. Every domino covers one black and one white square, but the two removed corners share a colour (for evenn), so the black/white counts differ by two and no tiling exists — UNSAT, and a textbook resolution-exponential family. The infeasibility is a bipartite-matching (Hall) obstruction, which our covering route certifies in polynomial time. Variables are dominoes (grid edges between adjacent surviving squares); each surviving square must be covered by exactly one.nmust be even (so the parity argument bites). - onto_
php - The onto (bijective) pigeonhole principle onto-FPHP(n):
functional_php(n)further forced to be onto — every hole receives at least one pigeon. The placement is now a bijectionn → n−1, which cannot exist; UNSAT. This is the hardest standard PHP variant for symmetry reasoning (it pins both the pigeon and the hole side), and the maximal clause set over the sharedphplayout. - ordering_
principle - The linear ordering principle GT(n): no finite strict total order lacks a maximal element — yet
this formula asserts exactly that, so it is UNSAT.
x[i][j](indexi*n + j) reads “i < j”. Antisymmetry + totality + transitivity force a linear order, and the “every element has a greater one” clauses then contradict finiteness. A canonical resolution-hard family — it stresses the CDCL core / cutting-plane reasoning rather than a matching or parity specialist. - parity_
exactly_ one - Coupled exactly-one + parity — a scalable MIXED family that needs BOTH structures at once. The
selectors
x₀…x_{n-1}are constrained to exactly one true (an at-most-one clique + an at-least-one clause — a cardinality covering) AND to even total parity⊕ xᵢ = 0(a GF(2) system, encoded by a width-3 prefix-XOR chain with auxiliariessᵢ = ⊕_{j≤i} xⱼplus the units_{n-1} = 0). Exactly-one forces an ODD selector count, the parity forces EVEN — UNSAT, yet neither substructure alone is (the parity chain is satisfiable, exactly-one is satisfiable). The canonical shape for the fused parity+cardinality route (crate::lyapunov::fused_parity_cardinality_decide);2nvariables. - parity_
unsat - A guaranteed-unsatisfiable random 3-XOR (parity) system — the
k = 3case ofrandom_kxor: at leastm3-XOR equations overnvariables, all consistent with a planted assignment except one flipped row, built up to maximal GF(2) rank so the inconsistency holds for any seed (seerandom_kxorfor why the naive single flip does not suffice). Full-rank 3-XOR above the XOR-SAT threshold is exponentially hard for resolution (Ben-Sasson–Wigderson 2001), hence for every CDCL solver — yet linear for Gaussian elimination over GF(2). Returns the XOR equations (forcrate::xorsat) and the equisatisfiable CNF (for a resolution solver). - pebbling_
pyramid - The pebbling contradiction on the pyramid DAG of the given
height— the canonical resolution space family (Ben-Sasson–Wigderson; Nordström). The pyramid has rows0..=heightwith rowrholdingr+1nodes; each node(r, i)forr < heighthas the two predecessors(r+1, i)and(r+1, i+1)below it. One Boolean per node “is pebbled”: every source (bottom row) is asserted pebbled (unit), pebbling propagates up (pebbled(a) ∧ pebbled(b) → pebbled(parent)), and the apex(0,0)is asserted unpebbled — a contradiction, so UNSAT. Refutation size is linear (unit propagation alone closes it), but refuting it in small space provably is not — the axis pigeonhole and parity do not touch. - php
- The pigeonhole principle PHP(n):
npigeons inton-1holes — unsatisfiable, and the textbook symmetry / resolution-hard family (any resolution refutation is exponential, while breaking theS_n × S_{n-1}symmetry collapses it). The variable for “pigeonpsits in holeh” lives at indexp*(n-1) + h, so pigeons index rows and holes index columns. - ramsey
- The Ramsey formula
Ramsey(s, t; n): 2-colour the edges of the complete graphK_n(one Boolean per edge — true = red, false = blue) avoiding every redK_sand every blueK_t. For eachs-clique a clause forbids all its edges being red; for eacht-clique a clause forbids all blue. Such a colouring exists iffn < R(s, t), so the formula is UNSAT exactly whenn ≥ R(s, t). A genuinely different geometry from pigeonhole/parity — clique structure, not covering or counting — and a classic CDCL stress family (Ramsey(3,3;6)is the smallest UNSAT case). Panics for(s, t)whose Ramsey number is unknown (so the verdict is never guessed); seeramsey_number. - ramsey_
number - The known two-colour Ramsey numbers
R(s, t)for the small(s, t)we can actually build CNFs for (symmetric:R(s, t) = R(t, s));Nonewhen the value is still an open problem.R(s, t)is the leastnsuch that every red/blue colouring ofK_n’s edges contains a redK_sor a blueK_t. - random_
3sat - A random 3-SAT instance:
num_clausesclauses of three distinct variables with random signs, overvarsvariables, from a seeded SplitMix64 stream (reproducible — no wall-clock). Near the clause/variable ratio 4.26 these are the canonical hard, non-symmetric benchmarks — the general-instance control where raw CDCL quality (not symmetry breaking) decides the race. - random_
ksat - A random k-SAT instance:
num_clausesclauses ofkdistinct variables with random signs, overvarsvariables, from a seeded SplitMix64 stream (reproducible — no wall-clock). Generalizesrandom_3sat. The satisfiability threshold climbs withkroughly asα_k ≈ 2ᵏ ln 2(≈ 4.27 for k=3, ≈ 9.93 for k=4, ≈ 21.1 for k=5). Requiresk ≤ vars. - random_
kxor - A guaranteed-unsatisfiable random k-XOR (parity) system over
nvariables: at leastmequations ofkdistinct variables, all consistent with a planted assignmentpexcept one whose right-hand side is flipped. Generalizesparity_unsat(thek = 3case). - tseitin_
expander - The Tseitin formula on a random 3-regular expander with odd total charge — UNSATISFIABLE,
exponentially hard for resolution (so every CDCL solver blows up), yet solved in polynomial time
by Gaussian elimination over GF(2). A non-pigeonhole hard family: the hardness is parity /
graph expansion, not covering symmetry. One Boolean per edge; per vertex, the XOR of its incident
edges equals that vertex’s charge (vertex 0 charged, the rest not — an odd sum, hence
inconsistent). Returns the XOR system (for
crate::xorsat) and the equisatisfiable CNF. - weak_
php - The weak pigeonhole principle
PHP^{holes}_{pigeons}:pigeonspigeons intoholesholes — unsatisfiable exactly whenpigeons > holes. Generalizesphp(which is the tightholes = pigeons − 1case) to any hole count, including the weak regime (holes = 2·pigeons,pigeons², …) used to probe how far symmetry breaking scales as the holes-to-pigeons ratio grows. Same variable layout asphp— “pigeonpin holeh” at indexp*holes + h— soweak_php(n, n−1)is byte-for-bytephp(n).