Skip to main content

affine_parity_symmetries

Function affine_parity_symmetries 

Source
pub fn affine_parity_symmetries(
    num_vars: usize,
    clauses: &[Vec<Lit>],
) -> Vec<Vec<(Vec<usize>, bool)>>
Expand description

Detect affine (shear) symmetries of a fused instance that preserve the model set — the affine parity symmetries a variable-permutation break structurally cannot express (an image bit becomes an XOR of two variables). For a variable i that appears in NO non-parity (cardinality / residual) clause and any j ≠ i, the shear x_i ↦ x_i ⊕ x_j moves only position i, so it leaves the cardinality/residual intact; it is a model-set symmetry iff it maps the parity SOLUTION SPACE to itself (checked on the space’s affine spanning set — particular ⊕ each kernel basis vector). Each valid shear is returned as an SBP affine-map spec (identity except output i = ⊕{i,j}) for crate::sym_break::affine_lex_leader_sbp. Gated to num_vars ≤ 64.