TermEquality assertion = (TermEquality) possEqLit
.getAtomicSentence();
// Test matching for both sides of the equality
for (int x = 0; x < 2; x++) {
Term toMatch, toReplaceWith;
if (x == 0) {
toMatch = assertion.getTerm1();
toReplaceWith = assertion.getTerm2();
} else {
toMatch = assertion.getTerm2();
toReplaceWith = assertion.getTerm1();
}
for (Literal l1 : topClause.getLiterals()) {
IdentifyCandidateMatchingTerm icm = getMatchingSubstitution(
toMatch, l1.getAtomicSentence());
if (null != icm) {
Term replaceWith = substVisitor.subst(
icm.getMatchingSubstitution(),
toReplaceWith);
// Want to ignore reflexivity axiom situation,
// i.e. x = x