3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-10-16 04:20:25 +00:00
This commit is contained in:
Jakob Rath 2023-02-07 09:57:32 +01:00
parent 984e98c88f
commit bf03886a87
3 changed files with 18 additions and 14 deletions

View file

@ -340,6 +340,18 @@ namespace polysat {
return ult(a + shift, b + shift);
}
/** Membership test t \in [lo; hi[ is equivalent to t - lo < hi - lo. */
signed_constraint constraint_manager::elem(pdd const& t, pdd const& lo, pdd const& hi) {
return ult(t - lo, hi - lo);
}
signed_constraint constraint_manager::elem(pdd const& t, interval const& i) {
if (i.is_full())
return eq(t.manager().zero());
else
return elem(t, i.lo(), i.hi());
}
/** unsigned quotient/remainder */
std::pair<pdd, pdd> constraint_manager::quot_rem(pdd const& a, pdd const& b) {
auto& m = a.manager();