use crate::cnf::{Clause, CnfFormula, Literal};
use crate::tests::pmc_oracle::brute_force_mc;
pub(crate) fn assert_learnts_are_implied(reduced: &CnfFormula, learnts: &[Vec<i32>]) {
let mut augmented = reduced.clone();
for clause in learnts {
augmented.clauses.push(Clause::new(
clause.iter().map(|&l| Literal::from(l)).collect(),
));
}
assert_eq!(
brute_force_mc(&augmented),
brute_force_mc(reduced),
"conjoining the {} harvested learnt clauses changed the model count — they are not \
implied by the formula they were harvested from",
learnts.len(),
);
}