3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-29 11:55:51 +00:00
z3/src/math/lp/nla_tangent_lemmas.h
Lev Nachmanson fd1e0e4d80 fixes for mixed case
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2020-01-28 10:04:21 -08:00

60 lines
1.2 KiB
C++

/*++
Copyright (c) 2017 Microsoft Corporation
Module Name:
<name>
Abstract:
<abstract>
Author:
Nikolaj Bjorner (nbjorner)
Lev Nachmanson (levnach)
Revision History:
--*/
#pragma once
#include "util/rational.h"
#include "math/lp/factorization.h"
#include "math/lp/nla_common.h"
namespace nla {
class core;
struct point {
rational x;
rational y;
point(const rational& a, const rational& b): x(a), y(b) {}
point() {}
inline point& operator*=(rational a) {
x *= a;
y *= a;
return *this;
}
inline point& operator/=(rational a) {
x /= a;
y /= a;
return *this;
}
inline point operator+(const point& b) const {
return point(x + b.x, y + b.y);
}
inline point operator-(const point& b) const {
return point(x - b.x, y - b.y);
}
};
inline std::ostream& operator<<(std::ostream& out, point const& a) { return out << "(" << a.x << ", " << a.y << ")"; }
struct tangents : common {
tangents(core *core);
void tangent_lemma();
void generate_explanations_of_tang_lemma(const monic& rm, const factorization& bf, lp::explanation& exp);
}; // end of tangents
} // end of namespace