Though we support real algebraic models now for theory combination, cvc5/cvc5-projects#451 uncovered the possibility to assert if an equality was in fact not equal during theory combination and the difference was real algebraic.
This PR fixes this issue by adding the proper check.
Fixes cvc5/cvc5-projects#451.
{
return expr.getConst<Rational>().isZero();
}
- Assert(expr.getKind() != Kind::REAL_ALGEBRAIC_NUMBER);
+ if (expr.getKind() == Kind::REAL_ALGEBRAIC_NUMBER)
+ {
+ return isZero(expr.getOperator().getConst<RealAlgebraicNumber>());
+ }
return std::nullopt;
}
regress0/nl/pow2-pow-isabelle.smt2
regress0/nl/proj-issue-348.smt2
regress0/nl/proj-issue-444-memout-eqelim.smt2
+ regress0/nl/proj-issue-451-ran-combination-1.smt2
+ regress0/nl/proj-issue-451-ran-combination-2.smt2
regress0/nl/real-as-int.smt2
regress0/nl/real-div-ufnra.smt2
regress0/nl/sin-cos-346-b-chunk-0169.smt2
--- /dev/null
+; REQUIRES: poly
+; EXPECT: sat
+(set-option :global-declarations true)
+(set-logic QF_NRA)
+(set-option :produce-unsat-cores true)
+(declare-const _x0 Real)
+(check-sat-assuming ( (>= (/ _x0 _x0) (/ (/ 2079598914 691107) _x0)) (and (> (/ (/ (/ 2079598914 691107) _x0) _x0) _x0) (> (- _x0) _x0))))
--- /dev/null
+; REQUIRES: poly
+; EXPECT: sat
+(set-logic QF_NRA)
+(declare-const x6 Real)
+(set-option :produce-unsat-cores true)
+(declare-const x Real)
+(assert (= x6 (/ x x)))
+(assert (> (- x) 0.0))
+(assert (> (/ 2 x x) x))
+(check-sat)