pub fn mod_p_consistent_onehot(
n: usize,
p: u64,
seed: u64,
) -> (Vec<ModpEquation>, DimacsCnf, ExpectedVerdict)Expand description
A satisfiable sibling of mod_p_tseitin_expander over 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 to 0), so this instance is SAT — the control for the GF(p)
route’s model-returning path. Charge: +1 at vertex 0, −1 (= p−1) at vertex 1, zero elsewhere.