}
private Map<Expression, List<Expression>> selectLikeTerms(List<Expression> evaluated) {
Map<Expression, List<Expression>> selected = new HashMap(); // ai*f(x) -> a1, a2, ... an
TerminationPattern c = new Constant();
TerminationPattern f = new FunctionPattern(new Variable());
ExpressionPattern p = new Multiplication(c, f);
for (Expression e : evaluated) {
if (e.isConstant()) {
continue;