Documentation for package rsm.mpoly


Author : R. Scott McIntire

Version: 1.1

Overview:

This package allows users to perform rudimentary computations with
multivariate polynomials. The user may also change the arithmetic modulus of the
computation to any integer greater than 1. When the modulus is a prime, the
default is to assume that the polynomials are over the field Z_p. In this case
any variable power X^p is equivalent to X; as such, this information is used to
reduce polynomials powers. If this behavior is not desired one may use the
function use-power-modulus with a null value to turn this behavior off.

REQUIRES: package rsm.filter.

Export Summary:

poly (&rest (c (&rest powers))) : Construct a polynomial.
lt (poly) : Returns the leading term (using the current ordering) 
            as (coeff . #(power-vector)).
lp (poly) : Returns the leading power (using the current ordering) 
            as #(power-vector).
lc (poly) : Returns the leading coefficient (using the current ordering).

+  (poly1 &rest polys)  : Add one or more polynomials.
*  (poly1 &rest polys)  : Multiply one or more polynomials.
^  (poly n)             : Raise a polynomial to a non-negative integer power.

poly-p (arg)  : True if argument is a polynomial.

mul-poly-term : Multiply a polynomial by a term.
poly-scalar-mul (c poly) : Multiply a polynomial by a scalar.
poly-scalar-add (c poly) : Add a scalar to  a polynomial.

set-order (lex-type) : Sets the order by which terms are compared.
get-order (lex-type) : Gets the order by which terms are compared.

set-modulus (n) : Sets the modulus. If <n> is nil, no modulus is used.
get-modulus (n) : Gets the modulus - nil by default 
                  (That is, no modulus is used by default.)
use-power-modulus (Bool) : Turn on or off the simplification x^modulus = x.
report-state () : Report the state of parameters that control 
                  polynomial computation.
get-state ()    : Get the state of parameters that control 
                  polynomial computation.

*   (p1 &rest ps)

Multiplies one or more polynomials (or numbers). The first argument must 
be a polynomial.

+   (p1 &rest ps)

Add one or more polynomials (or numbers). The first argument must be 
a polynomial.

^   (poly n)

Returns <poly> raised to the <n>th power.

get-modulus ()

Get the current modulus.

get-order ()

Get the ordering type currently used.

get-state ()

Return state information that determines how polynomial 
calculations are computed.

lc   (poly)

Return the leading coefficient of <poly> (using the current ordering).

lp   (poly)

Return the leading power of <poly> (using the current ordering)
in the form #(power-vector).

lt   (poly)

Return the leading term of <poly> (using the current ordering)
in the form (coeff . #(power-vector)).

make-zero-poly   (f)

Make the zero polynomial of the same type as <f>.

mul-poly-term   (poly term)

Multiply polynomial <poly> by term, <term>.

poly   (&whole args &rest r)

Constructor macro for polynomials.
Example: (rsm.mpoly:poly (2 (1 3)) (10 (2 1)) (4 (1 1)))
creates the polynomial 2xy^3 + 10x^2y + 4xy.

poly-p   (object)

Is object a polynomial?

poly-scalar-add   (c poly)

Add a scalar to a polynomial.

poly-scalar-mul   (c poly)

Multiply a polynomial by a scalar.

report-state ()

Write state information that determines how polynomial 
calculations are computed.

set-modulus   (mod)

Set the modulus to <mod>.

set-order   (order)

Set the ordering used for computation and printing.
Returns the previous ordering type.

term   (c (&rest powers))

Macro to construct a term.
Example: (rsm.mpoly:term (2 (1 3)))
creates the term 2xy^3.

use-power-modulus   (val)

A non nil value sets the "power-modulus" to true; false otherwise.
Returns the previous value of the "power modulus".