Module Monome.Int
type t= Z.t monome
val const : Z.t -> tEmpty monomial, from constant (decides type)
val of_list : Z.t -> (Z.t * term) list -> tval of_term : term -> t optionval of_term_exn : term -> ttry to get a monome from a term.
- raises NotLinear
if the term is not a proper monome.
val has_instances : t -> boolFor real or rational, always true. For integers, returns true iff g divides
m.constant, where g is the GCD ofcforcinm.coeffs.The intuition is that this returns
trueiff the monome actually has some instances in its type. Trivially true in reals or rationals, this is only the case for integers ifm.coeffs + m.constant = 0is a satisfiable diophantine equation.
val quotient : t -> Z.t -> t optionquotient e ctries to divideebyc, returninge/cif it is still an integer expression. For instance,quotient (2x + 4y) 2will returnSome (x + 2y)
val divisible : t -> Z.t -> booldivisible e nreturns true if all coefficients ofeare divisible bynand n is an int >= 2
val factorize : t -> (t * Z.t) optionFactorize
eintoSome (e',s)ife = e' x s, None otherwise (ie if s=1). In case it returnsSome (e', s),s > 1holds
val normalize_wrt_zero : t -> tAllows to multiply or divide by any positive number since we consider that the monome is equal to (or compared with) zero. For integer monomes, the result will have co-prime coefficients.
val reduce_same_factor : t -> t -> term -> t * treduce_same_factor m1 m2 tmultipliesm1andm2by some constants, so that their coefficient fortis the same.- raises Invalid_argument
if
tdoes not belong tom1orm2
val compare : (term -> term -> Comparison.t) -> t -> t -> Comparison.tCompare monomes as if they were multisets of terms, the coefficient in front of a term being its multiplicity.
val to_multiset : t -> Multisets.MT.tMultiset of terms with multiplicity
Modular Computations
module Modulo : sig ... endFind Solutions
module Solve : sig ... end