// It could be that the guard condition is a constant disequality. In this case,
// we need to change it to a different format.
- if (childProof->d_id == theory::eq::MERGED_THROUGH_CONSTANTS) {
+ if (childProof->d_id == theory::eq::MERGED_THROUGH_CONSTANTS && childProof->d_children.size() != 0) {
// The proof has two children, explaining why each index is a (different) constant.
Assert(childProof->d_children.size() == 2);
}
if (eqp) {
- if(eqp->d_children.size() == 1) {
+ if (eqp->d_children.size() == 0) {
+ // Corner case where this is actually a disequality between two constants
+ Debug("pf::ee") << "Encountered a constant disequality (not a transitivity proof): "
+ << eqp->d_node << std::endl;
+ Assert(eqp->d_node[0][0].isConst());
+ Assert(eqp->d_node[0][1].isConst());
+ eqp->d_id = MERGED_THROUGH_CONSTANTS;
+ } else if (eqp->d_children.size() == 1) {
// The transitivity proof has just one child. Simplify.
EqProof* temp = eqp->d_children[0];
eqp->d_children.clear();