}
// Checks whether "var" is used as a binary in "formula"
private boolean varIsBinary(Formula formula, String var) {
boolean isBinary = false;
LispTree tree = formula.toLispTree();
VariableFormula vf = new VariableFormula(var);
for (LispTree child : tree.children) {
if (child.isLeaf())
continue;
if (child.children.size() == 2 && vf.equals(Formulas.fromLispTree(child.child(0)))) {