equality overridden for lambdas (hence terms) so it does not depend on variable