This PR fixes a subtle corner case in the generalization within the coverings solver. When generalizing a single interval that spans the whole real line (i.e. from -infty to infty) that is based on multiple polynomials (most likely because the origin constraint factored) we did not include their pairwise resultants.
This detail is arguably missing in the paper, or rather hidden in a very vague notion of "performing standard CAD simplifications".
Fixes #8638.
// Add all discriminants
res.add(discriminant(p));
+ // Add pairwise resultants
+ for (const auto& q : i.d_mainPolys)
+ {
+ // avoid symmetric duplicates
+ if (p >= q) continue;
+ res.add(resultant(p, q));
+ }
+
for (const auto& q : requiredCoefficients(p))
{
// Add all required coefficients
regress0/nl/issue8414-ran-rational.smt2
regress0/nl/issue8515-cov-iand.smt2
regress0/nl/issue8516-cov-sin.smt2
+ regress0/nl/issue8638-cov-resultants.smt2
regress0/nl/lazard-spurious-root.smt2
regress0/nl/magnitude-wrong-1020-m.smt2
regress0/nl/mult-po.smt2
--- /dev/null
+; REQUIRES: poly
+; EXPECT: sat
+(set-logic QF_NRA)
+(declare-fun y () Real)
+(declare-fun p () Real)
+(declare-fun c () Real)
+(assert (< 1 c))
+(assert (< 0.0 (/ (+ y p 1.0) c)))
+(assert (and (> (* y y y y) 0) (> (* y y y p) 0)))
+(check-sat)
\ No newline at end of file