mirror of
https://github.com/Z3Prover/z3
synced 2025-07-18 02:16:40 +00:00
do not produce proportional lemma for non-integral vars
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
This commit is contained in:
parent
0ee541204f
commit
2ad94026a0
3 changed files with 14 additions and 2 deletions
|
@ -390,6 +390,8 @@ bool basics::basic_lemma_for_mon_neutral_derived(const monic& rm, const factoriz
|
|||
|
||||
// x != 0 or y = 0 => |xy| >= |y|
|
||||
void basics::proportion_lemma_model_based(const monic& rm, const factorization& factorization) {
|
||||
if (factorization_has_real(factorization)) // todo: handle the situaiton when all factors are greater than 1,
|
||||
return; // or smaller than 1
|
||||
rational rmv = abs(val(rm));
|
||||
if (rmv.is_zero()) {
|
||||
SASSERT(c().has_zero_factor(factorization));
|
||||
|
@ -490,6 +492,15 @@ bool basics::is_separated_from_zero(const factorization& f) const {
|
|||
return true;
|
||||
}
|
||||
|
||||
bool basics::factorization_has_real(const factorization& f) const {
|
||||
for (const factor& fc: f) {
|
||||
lpvar j = var(fc);
|
||||
if (!c().var_is_int(j))
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
// here we use the fact xy = 0 -> x = 0 or y = 0
|
||||
void basics::basic_lemma_for_mon_zero_model_based(const monic& rm, const factorization& f) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue