diff --git a/src/ast/simplifiers/solve_eqs.cpp b/src/ast/simplifiers/solve_eqs.cpp index fbc6fbb02..c97cab7c9 100644 --- a/src/ast/simplifiers/solve_eqs.cpp +++ b/src/ast/simplifiers/solve_eqs.cpp @@ -212,12 +212,13 @@ namespace euf { auto [f, p, d] = m_fmls[i](); auto [new_f, new_dep] = rp->replace_with_dep(f); proof_ref new_pr(m); - m_rewriter(new_f, new_f, new_pr); - if (new_f == f) + expr_ref tmp(m); + m_rewriter(new_f, tmp, new_pr); + if (tmp == f) continue; new_dep = m.mk_join(d, new_dep); old_fmls.push_back(m_fmls[i]); - m_fmls.update(i, dependent_expr(m, new_f, mp(p, new_pr), new_dep)); + m_fmls.update(i, dependent_expr(m, tmp, mp(p, new_pr), new_dep)); } } diff --git a/src/sat/smt/pb_internalize.cpp b/src/sat/smt/pb_internalize.cpp index 42b06872a..391b643f5 100644 --- a/src/sat/smt/pb_internalize.cpp +++ b/src/sat/smt/pb_internalize.cpp @@ -30,7 +30,7 @@ namespace pb { if (m_pb.is_pb(e)) { sat::literal lit = internalize_pb(e, sign, root); if (m_ctx && !root && lit != sat::null_literal) - m_ctx->attach_lit(lit, e); + m_ctx->attach_lit(literal(lit.var(), false), e); return lit; } UNREACHABLE();