mirror of
https://github.com/Z3Prover/z3
synced 2025-04-23 17:15:31 +00:00
fix unsoundness bug
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
869643a551
commit
04c55c34e5
2 changed files with 32 additions and 4 deletions
|
@ -6317,6 +6317,27 @@ namespace polynomial {
|
|||
return R.mk();
|
||||
}
|
||||
|
||||
// x*q = p
|
||||
//
|
||||
// md = degree of x in p
|
||||
// P = m0 + ...
|
||||
// m0 = x^dm*m1
|
||||
// m1 * p^dm * q^{md - dm}
|
||||
// P' = m1 + ...
|
||||
// property would be that x*q = p => P > 0 <=> P' > 0
|
||||
// requires that q > 0
|
||||
// Reasoning:
|
||||
// P > 0
|
||||
// <=> { since q > 0 }
|
||||
// q^md * P > 0
|
||||
// <=>
|
||||
// q^md*x^dm*m0 + .. > 0
|
||||
// <=>
|
||||
// q^{md-dm}*(xq)^dm*m0 + ... > 0
|
||||
// <=>
|
||||
// q^{md-dm}*p^dm + .. > 0
|
||||
// <=>
|
||||
// P' > 0
|
||||
void substitute(polynomial const* r, var x, polynomial const* p, polynomial const* q, polynomial_ref& result) {
|
||||
unsigned md = degree(r, x);
|
||||
if (md == 0) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue