3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-28 11:25:51 +00:00

port Grobner, add fixed var dependencies to create_sum_from_row()

Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
This commit is contained in:
Lev Nachmanson 2019-10-17 17:52:51 -07:00
parent b3fc12ffdc
commit 7fbf3e0707
11 changed files with 87 additions and 44 deletions

View file

@ -357,6 +357,9 @@ nex * nex_creator::simplify_mul(nex_mul *e) {
simplify_children_of_mul(e->children(), coeff);
if (e->size() == 1 && (*e)[0].pow() == 1 && coeff.is_one())
return (*e)[0].e();
if (e->size() == 0 || e->coeff().is_zero())
return mk_scalar(e->coeff());
TRACE("nla_cn_details", tout << *e << "\n";);
SASSERT(is_simplified(e));
return e;
@ -540,7 +543,10 @@ void nex_creator::simplify_children_of_sum(ptr_vector<nex> & children) {
} else if (is_zero_scalar(e)) {
skipped ++;
continue;
} else {
} else if (e->is_mul() && to_mul(e)->coeff().is_zero() ) {
skipped ++;
continue;
}else {
unsigned offset = to_promote.size() + skipped;
if (offset) {
children[j - offset] = e;