Module Poly
Polynomials
The basic data structure used in Cooper quantifier elimination
- author
- Ruoyu Zhang
type poly
= psummand list
poly is a list of psummands
type preAtom
=
|
GT of poly
|
EQ of poly
|
INEQ of poly
|
DIVISIBLE of Numeral.t * poly
|
INDIVISIBLE of Numeral.t * poly
For a polynomial p and integer i, a Presburger Atom could be p > 0, p = 0, p != 0, i | p, i !| p
type cformula
= preAtom list
cformula is a list of Presburger Atom conjuncted together
val pp_print_poly : Stdlib.Format.formatter -> poly -> unit
Print a polynomial
val pp_print_cformula : Stdlib.Format.formatter -> cformula -> unit
Print a cformula
val poly_is_constant : poly -> bool
Return true when the polynomial is a constant, false otherwise
val get_coe_in_poly : Var.t -> poly -> Numeral.t
Return the coefficient of a variable in a polynomial
val add_two_polys : (Var.t -> Var.t -> int) -> poly -> poly -> poly -> poly
Add two polynomials with a ordering of varialbes and a accumulator
val psummand_contains_variable : Var.t -> psummand -> bool
Return true when the psummand contains the variable, false otherwise