if (f.op() == FormulaOperator.AND) {
for(Iterator<Formula> i = f.iterator(); i.hasNext();) if (!simplify_in(i.next())) return false;
}
}
if (form instanceof BinaryFormula) {
BinaryFormula f = (BinaryFormula)form;
if (f.op() == FormulaOperator.AND) {
return simplify_in(f.left()) && simplify_in(f.right());
}
}
if (form instanceof ComparisonFormula) {
ComparisonFormula f = (ComparisonFormula)form;
if (f.op() == ExprCompOperator.SUBSET) {
if (!simplify_in(f.left(), f.right())) return false;
}
if (f.op() == ExprCompOperator.EQUALS) {
if (!simplify_in(f.left(), f.right())) return false;
if (!simplify_in(f.right(), f.left())) return false;
}
}
return true;
}