Module Polynomial.WithProof
module WithProof
constructs polynomials packed with the proof that their sign is correct.
type t
= (LinPoly.t * op) * ProofFormat.prf_rule
val compare : t -> t -> int
val annot : string -> t -> t
val of_cstr : (cstr * ProofFormat.prf_rule) -> t
val output : Stdlib.out_channel -> t -> unit
out_channel chan c
pretty-prints the constraintc
over the channelchan
val output_sys : Stdlib.out_channel -> t list -> unit
val zero : t
zero
represents the tautology (0=0)
val const : NumCompat.Q.t -> t
const n
represents the tautology (n>=0)
val mult : LinPoly.t -> t -> t
mult p q
- returns
the polynomial p*q with its sign and proof.
- raises InvalidProof
if p is not a constant and p is not an equality
val cutting_plane : t -> t option
cutting_plane p
does integer reasoning and adjust the constant to be integral
val linear_pivot : t list -> t -> Vect.var -> t -> t option
linear_pivot sys p x q
- returns
the polynomial
q
wherex
is eliminated using the polynomialp
The pivoting operation is only defined if- p is linear in x i.e p = a.x+b and x neither occurs in a and b
- The pivoting also requires some sign conditions for
a