{
Trace("sets-cg-debug") << "...build for " << f1 << std::endl;
Assert(d_equalityEngine->hasTerm(f1));
- // break into index based on operator, and type of first argument (since
- // some operators are parametric)
- TypeNode tn = f1[0].getType();
+ // break into index based on operator, and the type of the element
+ // type of the proper set, which notice must be safe wrt subtyping.
+ TypeNode tn;
+ if (k == kind::SINGLETON)
+ {
+ // get the type of the singleton set (not the type of its element)
+ tn = f1.getType().getSetElementType();
+ }
+ else
+ {
+ Assert (k == kind::MEMBER);
+ // get the element type of the set (not the type of the element)
+ tn = f1[1].getType().getSetElementType();
+ }
std::vector<TNode> reps;
bool hasCareArg = false;
for (unsigned j = 0; j < f1.getNumChildren(); j++)
regress1/sets/choose2.smt2
regress1/sets/choose3.smt2
regress1/sets/choose4.smt2
+ regress1/sets/issue5705-cg-subtyping.smt2
regress1/sets/ListElem.hs.fqout.cvc4.38.smt2
regress1/sets/ListElts.hs.fqout.cvc4.317.smt2
regress1/sets/TalkingAboutSets.hs.fqout.cvc4.3577.smt2
--- /dev/null
+(set-logic QF_LIRAFS)
+(set-info :status sat)
+(declare-fun s () (Set Real))
+(declare-fun t3 () (Set Real))
+(assert (or (member 1.0 t3) (member 0.0 s)))
+(assert (not (= t3 (setminus s (singleton 1.0)))))
+(check-sat)