public override bool isValidMatch(Term toMatch,
List<Variable> toMatchVariables, Term possibleMatch,
Dictionary<Variable, Term> substitution)
{
// Demodulation only allows substitution in the equation only,
// if the substitution contains variables not in the toMatch
// side of the equation (i.e. left hand side), then
// it is not a legal demodulation match.
// Note: see:
// http://logic.stanford.edu/classes/cs157/2008/lectures/lecture15.pdf
// slide 23 for an example.
bool contained = !substitution.Keys.Except(toMatchVariables).Any();
if (contained)
{
return true;
}
return false;
}
}