Polynomial.LinPoly
Linear(ised) polynomials represented as a Vect.t
i.e a sorted association list. The constant is the coefficient of the variable 0
Each linear polynomial can be interpreted as a multi-variate polynomial. There is a bijection mapping between a linear variable and a monomial (see module MonT
)
type t = Vect.t
Each variable of a linear polynomial is mapped to a monomial. This is done using the monomial tables of the module MonT.
module MonT : sig ... end
val coq_poly_of_linpol : (NumCompat.Q.t -> 'a) -> t -> 'a Mc.pExpr
coq_poly_of_linpol c p
val of_monomial : Monomial.t -> t
of_monomial m
val variables : t -> Mutils.ISet.t
variables p
val is_linear : t -> bool
is_linear p
val constant : NumCompat.Q.t -> t
constant c
search_linear pred p
val search_linear : (NumCompat.Q.t -> bool) -> t -> var option
val search_all_linear : (NumCompat.Q.t -> bool) -> t -> var list
search_all_linear pred p
val collect_square : t -> Monomial.t MonMap.t
collect_square p
val monomials : t -> Mutils.ISet.t
monomials p
val degree : t -> int
degree p
val pp_var : Stdlib.out_channel -> var -> unit
pp_var o v
pretty-prints a monomial indexed by v.
val pp : Stdlib.out_channel -> t -> unit
pp o p
pretty-prints a polynomial.