incr-set prlevel 1
if #0=3 START
incr-set prlevel -1
;;; Usage:
;;; 	<ring n varlist ringname
;;;
;;; creates a ring with n variables, specified by varlist
;;; ( eg a-z  or  x[1,1]-x[2,3]st ).
;;;
incr-set prlevel 1
jump END
;;; Parameters:
;;;		n >0  number of variables 
;;;	    varlist = specification of variables 
;;;               acceptable to the ring command
;;; Output values:
;;;	    A ring is created named ringname 
;;;     (which then refers to the ideal of variables.)
;;; 
;;;	This creates a ring, with default characteristic, 
;;; weight one variables,
;;; and reverse lex. order,using the given variables.  
;;; If too few variables 
;;; given, variables A[1]A[2]... are used. 
;;; The monomial order is set
;;; so that THE COMPONENT COMES FIRST.  
;;; This optimizes the computation of
;;; resolutions.  (Of course one must not 
;;; set up a ring for elimination with
;;; a monomial order of this type!  But 
;;; rings defined with <ring cannot be 
;;; used for elimination anyway.  If 
;;; tensor_ring (old ring-sum) is used
;;; the location of the component is t
;;; aken from the second ring, so that
;;; using a ring created by <ring cannot
;;; cause problems even there.

; created 2/6/89 Mike Stillman
START:
ring #3
    ;
    #1
    #(2)A[1]-A[#1]
    ;
    c
END:
incr-set prlevel -1
$;;;;;;;; EXAMPLE SECTION ;;;;;;;;;;;;;;;;;;;;;;;;;
<ring
<ring 9 ABCx[1,1]-x[2,3]a-z r
;ring only takes as many variables as it needs.
pring
