3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-23 17:15:31 +00:00

fix nex simplification

Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
This commit is contained in:
Lev Nachmanson 2019-10-02 14:28:28 -07:00
parent 0c6336c85d
commit 13434a2589
2 changed files with 30 additions and 19 deletions

View file

@ -196,7 +196,7 @@ bool nex_creator::less_than_on_var_nex(const nex_var* a, const nex* b) const {
case expr_type::MUL:
{
if (b->get_degree() > 1)
return false;
return true;
auto it = to_mul(b)->children().begin();
const nex_pow & c = *it;
const nex * f = c.e();
@ -319,10 +319,11 @@ nex * nex_creator::simplify_mul(nex_mul *e) {
}
nex* nex_creator::simplify_sum(nex_sum *e) {
TRACE("nla_cn_details", tout << "was e = " << *e << "\n";);
simplify_children_of_sum(e->children());
if (e->size() == 1)
return e->children()[0];
return e;
nex *r = e->size() == 1? e->children()[0]: e;
TRACE("nla_cn_details", tout << "became r = " << *r << "\n";);
return r;
}
bool nex_creator::sum_is_simplified(const nex_sum* e) const {