if (node.getKind() == kind::ITE && !nodeType.isBoolean())
{
// Here, we eliminate the ITE if we are not Boolean and if we do not contain
- // a bound variable.
- if (!inQuant || !expr::hasBoundVar(node))
+ // a free variable.
+ if (!inQuant || !expr::hasFreeVar(node))
{
skolem = getSkolemForNode(node);
if (skolem.isNull())
else if (node.getKind() == kind::LAMBDA)
{
// if a lambda, do lambda-lifting
- if (!inQuant)
+ if (!inQuant || !expr::hasFreeVar(node))
{
skolem = getSkolemForNode(node);
if (skolem.isNull())
// If a witness choice
// For details on this operator, see
// http://planetmath.org/hilbertsvarepsilonoperator.
- if (!inQuant)
+ if (!inQuant || !expr::hasFreeVar(node))
{
skolem = getSkolemForNode(node);
if (skolem.isNull())