Expand description
General symmetry detection for CNF — the engine behind certified symmetry breaking.
A symmetry of a formula is a literal permutation σ (respecting negation) that maps the
clause set onto itself: σ(F) = F. Such a σ permutes models, so adding a lex-leader
predicate that keeps the canonical representative of each orbit is satisfiability-preserving
— and, with the witness σ, independently certifiable by the PR checker (crate::pr).
The cornerstone is the soundness gate perm_is_automorphism: whatever search produces
a candidate generator, it is re-verified here by clause-multiset invariance before any use.
A detector that emits a non-symmetry is caught and dropped; a detector that misses a symmetry
only costs search speed. So the intricate part — finding generators — is never
soundness-critical; this gate is.
Structs§
- Automorphism
Index - An incrementally-maintained clause database for fast repeated automorphism checks.
Functions§
- aut_
order |Aut(F)|— the exact number of formula automorphisms, via the Schreier–Sims backend.- automorphism_
group - The formula’s automorphism group as a BSGS — Schreier–Sims as the symmetry backend. The detected
generators (
find_generators) are bridged to permutations of the2·num_varsliteral points and a base + strong generating set is built, so the symmetry layer can compute|Aut(F)|(crate::permgroup::Bsgs::order) and decide membership / cosets (crate::permgroup::Bsgs::contains) in polynomial time — group computations it previously could not do (it worked only with the raw generators). The stabilizer chain is the symmetry break, generalized from the abelian linear engines to an arbitrary (non-abelian) permutation group. - find_
generators - Find a generating set of the symmetry group of
clauses— literal permutationsσwithσ(F) = F. Each returned generator is independently verified byperm_is_automorphism. - perm_
is_ automorphism - Is
sigmaa genuine automorphism ofclauses— does applying it map the clause set exactly onto itself? The independent re-verification every generator must pass.