mirror of
https://github.com/Z3Prover/z3
synced 2025-04-22 16:45:31 +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) {
|
||||
|
|
|
@ -103,5 +103,6 @@ struct basics: common {
|
|||
// -> |fc[factor_index]| <= |rm|
|
||||
void generate_pl(const monic& rm, const factorization& fc, int factor_index);
|
||||
bool is_separated_from_zero(const factorization&) const;
|
||||
bool factorization_has_real(const factorization&) const;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -283,8 +283,8 @@ public:
|
|||
const rational& get_upper_bound(unsigned j) const;
|
||||
const rational& get_lower_bound(unsigned j) const;
|
||||
|
||||
bool zero_is_an_inner_point_of_bounds(lpvar j) const;
|
||||
|
||||
bool zero_is_an_inner_point_of_bounds(lpvar j) const;
|
||||
bool var_is_int(lpvar j) const { return m_lar_solver.column_is_int(j); }
|
||||
int rat_sign(const monic& m) const;
|
||||
inline int rat_sign(lpvar j) const { return nla::rat_sign(val(j)); }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue