Interactively define a ring. You are asked for some obvious information, and then for some more obscure information.
The following information is requested:
Very often, one types <return> to requests (1), (4) and (5). The following examples define rings, using these defaults.
% ; first define a ring with variables {a,b,c,d}:
% ring R
! characteristic (if not 31991) ? <return>
! number of variables ? 4
! 4 variables, please ? a-d
! variable weights (if not all 1) ? <return>
! monomial order (if not rev. lex.) ? <return>
; largest degree of a monomial : 512
% <return>
; second, define a ring with variables {x,y,z,a[1,1], ..., a[2,2]}
% ; (7 variables in all)
% ring S
! characteristic (if not 31991) ? <return>
! number of variables ? 7
! 7 variables, please ? xyza[1,1]-a[2,2]
! variable weights (if not all 1) ? <return>
! monomial order (if not rev. lex.) ? <return>
; largest degree of a monomial : 76
% <return>
; display these rings using the "pring" command
% pring R
; ring R
; characteristic : 31991
; number of variables : 4
; variables : abcd
; weights : 1 1 1 1
; monomial order : 4 c
; top degree of a monomial : 512
% pring S
; ring S
; characteristic : 31991
; number of variables : 7
; variables : xyza[1,1]a[1,2]a[2,1]a[2,2]
; weights : 1 1 1 1 1 1 1
; monomial order : 7 c
; top degree of a monomial : 76
The standard (Gröbner) basis computations in Macaulay require every
ideal to be homogeneous, and each matrix to be graded. The weights of the
ring variables can often be set so that an ideal is homogeneous. For example,
let
. This ideal is not homogeneous.
However, if we set the weight of s, t to one, and the weight of x to
3, y to 6, and z to 5, then each generator of I is homogeneous with
respect to these weights. This is often used with elimination of variables.
% ; define a ring with variables {a,b,c,d,e} having weights 5,3,1,1,1
% ; notice that the last "1" typed is repeated, so that the variables
% ; c,d,e all have weight one.
% ring R
! characteristic (if not 31991) ? <return>
! number of variables ? 5
! 5 variables, please ? a-e
! variable weights (if not all 1) ? 5 3 1
! monomial order (if not rev. lex.) ? <return>
; largest degree of a monomial : 372
% pring R
; ring R
; characteristic : 31991
; number of variables : 5
; variables : abcde
; weights : 5 3 1 1 1
; monomial order : 5 c
; top degree of a monomial : 372
See Appendix A for more examples.
Caveat: the weight of each variable must be a positive integer. If any of the elements of the integer list are negative, every weight is increased by the same amount in order for the weights to be all positive.
The format for monomial orders is rather complicated, and a whole section (section 5.4) is devoted to it.