login  home  contents  what's new  discussion  bug reports     help  links  subscribe  changes  refresh  edit

Edit detail for SandBoxGroebnerBasis revision 3 of 8

1 2 3 4 5 6 7 8
Editor: Bill Page
Time: 2011/02/08 21:52:42 GMT-8
Note: part 1

changed:
-For us, the most important AXIOM commands are [normalForm], for doing the division algorithm, and [groebner], for computing a Groebner basis.
-
-A distinctive feature of AXIOM is that every object has a specific type. In particular, this affects the way AXIOM works with monomial orders: an order is encoded in a special kind of type. For example, suppose we want to use lex order on $\mathbb{Q}[x,y,z]$ with $x > y > z$
-This is done using the type $DMP([x,y,z], FRAC INT)$ (remember that AXIOM encloses a list inside brackets ![...]). Here $DMP$ stands for "Distributed Multivariate Polynomial", and $FRAC INT$ means fractions of integers, i.e. rational numbers.
For us, the most important AXIOM commands are [normalForm], for doing
the division algorithm, and [groebner], for computing a Groebner basis.

A distinctive feature of AXIOM is that every object has a specific type.
In particular, this affects the way AXIOM works with monomial orders:
an order is encoded in a special kind of type. For example, suppose
we want to use lex order on $\mathbb{Q}[x,y,z]$ with $x > y > z$.
This is done using the type::

  DMP([x,y,z], FRAC INT)

(remember that AXIOM encloses a list inside brackets ![...]).
Here 'DMP' stands for "Distributed Multivariate Polynomial", and
'FRAC INT' means fractions of integers, i.e. rational numbers.
Similarly, grevlex for $\mathbb{Q}[x,y,z]$ with $x>y>z$ means
using the type::

  HDMP([x,y,z],FRAC INT)

where 'HDMP' stands for
"Homogeneous Distributed Multivariate Polynomial". At the end of the
section, we will explain how to get AXIOM to work with grlex order.

To see how this works in practice, we will divide $x^3 + 3y^2$ by
$x^2 + y$ and $x + 2xy$ using grevlex order with $x>y$. We first give
the three polynomials names and declare their types:
\begin{axiom}
f : HDMP([x,y], FRAC INT) := x^3+3*y^2
g : HDMP([x,y], FRAC INT) := x^2+y
h : HDMP([x,y], FRAC INT) := x+2*x*y
\end{axiom}
(Here colon : indicates a type declaration. You can save typing
by giving <pre>HDMP([x,y], FRAC INT)</pre> a symbolic name.) Then
the remainder is computed by the command:
\begin{axiom}
normalForm(f,[g,h])
\end{axiom}
The output is the remainder of 'f' on division by 'g', 'h'. In
general the syntax of the command is::

  normalForm(poly, polylist)

where 'poly' is the polynomial to be divided by the polynomials in
the list 'polylist' (assuming that everything has been declared to
be of the appropriate type).

To do the same computation using lex order with $x>y$, first issue
the command:
\begin{axiom}
Lex := DMP([x,y], FRAC INT)
\end{axiom}
to give::

  DMP([x,y], FRAC INT)

the symbolic name 'Lex', and then type:
\begin{axiom}
normalForm(f::Lex, [g::Lex, h::Lex])
\end{axiom}
Here, we are using AXIOM's type conversion facility '::' to convert
from one type to another.


Adapted from Ideals, Varieties, and Algorithms Third Edition, 2007

Appendix C

Computer Algebra Systems

  1. AXIOM

For us, the most important AXIOM commands are [normalForm]?, for doing the division algorithm, and [groebner]?, for computing a Groebner basis.

A distinctive feature of AXIOM is that every object has a specific type. In particular, this affects the way AXIOM works with monomial orders: an order is encoded in a special kind of type. For example, suppose we want to use lex order on \mathbb{Q}[x,y,z] with x > y > z. This is done using the type:

  DMP([x,y,z], FRAC INT)

(remember that AXIOM encloses a list inside brackets [...]). Here DMP stands for "Distributed Multivariate Polynomial", and FRAC INT means fractions of integers, i.e. rational numbers. Similarly, grevlex for \mathbb{Q}[x,y,z] with x>y>z means using the type:

  HDMP([x,y,z],FRAC INT)

where HDMP stands for "Homogeneous Distributed Multivariate Polynomial". At the end of the section, we will explain how to get AXIOM to work with grlex order.

To see how this works in practice, we will divide x^3 + 3y^2 by x^2 + y and x + 2xy using grevlex order with x>y. We first give the three polynomials names and declare their types:

axiom
f : HDMP([x,y], FRAC INT) := x^3+3*y^2

\label{eq1}{x^3}+{3 \ {y^2}}(1)
Type: HomogeneousDistributedMultivariatePolynomial?([x,y],Fraction(Integer))
axiom
g : HDMP([x,y], FRAC INT) := x^2+y

\label{eq2}{x^2}+ y(2)
Type: HomogeneousDistributedMultivariatePolynomial?([x,y],Fraction(Integer))
axiom
h : HDMP([x,y], FRAC INT) := x+2*x*y

\label{eq3}{2 \  x \  y}+ x(3)
Type: HomogeneousDistributedMultivariatePolynomial?([x,y],Fraction(Integer))

(Here colon : indicates a type declaration. You can save typing by giving

HDMP([x,y], FRAC INT)
a symbolic name.) Then the remainder is computed by the command:
axiom
normalForm(f,[g,h])

\label{eq4}{3 \ {y^2}}+{{1 \over 2}\  x}(4)
Type: HomogeneousDistributedMultivariatePolynomial?([x,y],Fraction(Integer))

The output is the remainder of f on division by g, h. In general the syntax of the command is:

  normalForm(poly, polylist)

where poly is the polynomial to be divided by the polynomials in the list polylist (assuming that everything has been declared to be of the appropriate type).

To do the same computation using lex order with x>y, first issue the command:

axiom
Lex := DMP([x,y], FRAC INT)

\label{eq5}\hbox{\axiomType{DistributedMultivariatePolynomial}\ } ([ x , y ] , \hbox{\axiomType{Fraction}\ } (\hbox{\axiomType{Integer}\ }))(5)
Type: Domain

to give:

  DMP([x,y], FRAC INT)

the symbolic name Lex, and then type:

axiom
normalForm(f::Lex, [g::Lex, h::Lex])

\label{eq6}{{1 \over 2}\  x}+{3 \ {y^2}}(6)
Type: DistributedMultivariatePolynomial?([x,y],Fraction(Integer))

Here, we are using AXIOM's type conversion facility :: to convert from one type to another.