Sentence quantified = sentence.getQuantified();
Sentence quantifiedAfterSubs = (Sentence) quantified.accept(this, arg);
List<Variable> variables = new ArrayList<Variable>();
for (Variable v : sentence.getVariables()) {
Term st = substitution.get(v);
if (null != st) {
if (st instanceof Variable) {
// Only if it is a variable to I replace it, otherwise
// I drop it.
variables.add((Variable) st.copy());
}
} else {
// No substitution for the quantified variable, so
// keep it.
variables.add(v.copy());