if (m.lhs instanceof ANumber) { // a (bx) = (ab) x
l = a.multiply((ANumber) m.lhs);
r = m.rhs;
} else if (m.rhs instanceof ANumber) { // a (xb) = (ab) x
l = a.multiply((ANumber) m.rhs);
r = m.lhs;
}
} else if (r instanceof Negation) { // a (-x) = -ax
l = a.negate();
r = ((Negation) r).getChild();