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

fixes in nex expressions

Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
This commit is contained in:
Lev Nachmanson 2019-10-03 17:06:03 -07:00
parent f9beef19ce
commit f8a45d2fb3
3 changed files with 114 additions and 1 deletions

View file

@ -124,6 +124,7 @@ public:
TRACE("nla_cn", tout << "no common factor\n"; );
return false;
}
TRACE("nla_cn", tout << "common factor f=" << *f << "\n";);
nex* c_over_f = m_nex_creator.mk_div(*c, f);
c_over_f = m_nex_creator.simplify(c_over_f);

View file

@ -558,7 +558,8 @@ nex * nex_creator::mk_div_by_mul(const nex* a, const nex_mul* b) {
if (a->is_sum()) {
return mk_div_sum_by_mul(to_sum(a), b);
}
if (a->is_var() || (a->is_mul() && to_mul(a)->size() == 1)) {
if (a->is_var()) {
SASSERT(b->get_degree() == 1 && !b->has_a_coeff() && get_vars_of_expr(a) == get_vars_of_expr(b));
return mk_scalar(rational(1));
}