mirror of
https://github.com/Z3Prover/z3
synced 2025-10-16 04:20:25 +00:00
elem
This commit is contained in:
parent
984e98c88f
commit
bf03886a87
3 changed files with 18 additions and 14 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue