Index: branches/f4grobner/mx-grobner-0.lisp
===================================================================
--- branches/f4grobner/mx-grobner-0.lisp	(revision 1658)
+++ branches/f4grobner/mx-grobner-0.lisp	(revision 1670)
@@ -69,5 +69,5 @@
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
-(defparameter *maxima-ring*
+(defparameter +maxima-ring+
     (make-ring 
      ;;(defun coeff-zerop (expr) (meval1 `(($is) (($equal) ,expr 0))))
@@ -127,17 +127,17 @@
      ((member expr vars :test #'equal-test-p)
       (let ((pos (position expr vars :test #'equal-test-p)))
-	(make-poly-variable *maxima-ring* (length vars) pos)))
+	(make-poly-variable +maxima-ring+ (length vars) pos)))
      ((free-of-vars expr vars)
       ;;This means that variable-free CRE and Poisson forms will be converted
       ;;to coefficients intact
-      (coerce-coeff *maxima-ring* expr vars))
+      (coerce-coeff +maxima-ring+ expr vars))
      (t
       (case (caar expr)
-	(mplus (reduce #'(lambda (x y) (poly-add *maxima-ring* x y)) (parse-list (cdr expr))))
-	(mminus (poly-uminus *maxima-ring* (parse (cadr expr))))
+	(mplus (reduce #'(lambda (x y) (poly-add +maxima-ring+ x y)) (parse-list (cdr expr))))
+	(mminus (poly-uminus +maxima-ring+ (parse (cadr expr))))
 	(mtimes
 	 (if (endp (cddr expr))		;unary
 	     (parse (cdr expr))
-	   (reduce #'(lambda (p q) (poly-mul *maxima-ring* p q)) (parse-list (cdr expr)))))
+	   (reduce #'(lambda (p q) (poly-mul +maxima-ring+ p q)) (parse-list (cdr expr)))))
 	(mexpt
 	 (cond
@@ -145,5 +145,5 @@
 	   ;;Special handling of (expt var pow)
 	   (let ((pos (position (cadr expr) vars :test #'equal-test-p)))
-	     (make-poly-variable *maxima-ring* (length vars) pos (caddr expr))))
+	     (make-poly-variable +maxima-ring+ (length vars) pos (caddr expr))))
 	  ((not (and (integerp (caddr expr)) (plusp (caddr expr))))
 	   ;; Negative power means division in coefficient ring
@@ -151,10 +151,10 @@
 	   (mtell "~%Warning: Expression ~%~M~%contains power which is not a positive integer. Parsing as coefficient.~%"
 		  expr)
-	   (coerce-coeff *maxima-ring* expr vars))
-	  (t (poly-expt *maxima-ring* (parse (cadr expr)) (caddr expr)))))
+	   (coerce-coeff +maxima-ring+ expr vars))
+	  (t (poly-expt +maxima-ring+ (parse (cadr expr)) (caddr expr)))))
 	(mrat (parse ($ratdisrep expr)))
 	(mpois (parse ($outofpois expr)))
 	(otherwise
-	 (coerce-coeff *maxima-ring* expr vars)))))))
+	 (coerce-coeff +maxima-ring+ expr vars)))))))
 
 (defun parse-poly-list (expr vars)
@@ -211,5 +211,5 @@
 			     (p (parse-poly p vars)))
      ,@(when documentation-supplied-p (list documentation))
-     (coerce-to-maxima :polynomial (,fun-name *maxima-ring* p) vars)))
+     (coerce-to-maxima :polynomial (,fun-name +maxima-ring+ p) vars)))
 
 (defmacro define-binop (maxima-name fun-name
@@ -222,5 +222,5 @@
 			     (q (parse-poly q vars)))
      ,@(when documentation-supplied-p (list documentation))
-     (coerce-to-maxima :polynomial (,fun-name *maxima-ring* p q) vars)))
+     (coerce-to-maxima :polynomial (,fun-name +maxima-ring+ p q) vars)))
 
 
@@ -260,6 +260,6 @@
    ((symbolp ring)
     (case ring
-      ((maxima-ring  :maxima-ring $expression_ring) *maxima-ring*) 
-      ((ring-of-integers :ring-of-integers $ring_of_integers) *ring-of-integers*) 
+      ((maxima-ring  :maxima-ring $expression_ring) +maxima-ring+) 
+      ((ring-of-integers :ring-of-integers $ring_of_integers) +ring-of-integers+) 
       (otherwise
        (mtell "~%Warning: Ring ~M not found. Using default.~%" ring))))
@@ -283,5 +283,5 @@
 (defmacro with-coefficient-ring ((ring) &body body)
   "Evaluate BODY with coefficient ring set to RING."
-  `(let ((*maxima-ring* (or (find-ring ,ring) *maxima-ring*)))
+  `(let ((+maxima-ring+ (or (find-ring ,ring) +maxima-ring+)))
      . ,body))
 
@@ -289,5 +289,5 @@
   "Evaluate BODY with monomial order set to ORDER and coefficient ring set to RING."
   `(let ((*monomial-order* (or (find-order ,order) *monomial-order*))
-	 (*maxima-ring* (or (find-ring ,ring) *maxima-ring*)))
+	 (+maxima-ring+ (or (find-ring ,ring) +maxima-ring+)))
      . ,body))
 
@@ -380,9 +380,9 @@
 (defmfun $poly_expt (p n vars)
   (with-parsed-polynomials ((vars) :polynomials (p) :value-type :polynomial)
-    (poly-expt *maxima-ring* p n)))
+    (poly-expt +maxima-ring+ p n)))
 
 (defmfun $poly_content (p vars)
   (with-parsed-polynomials ((vars) :polynomials (p))
-    (poly-content *maxima-ring* p)))
+    (poly-content +maxima-ring+ p)))
 
 (defmfun $poly_pseudo_divide (f fl vars
@@ -391,5 +391,5 @@
 				 (fl (parse-poly-list fl vars)))
   (multiple-value-bind (quot rem c division-count)
-      (poly-pseudo-divide *maxima-ring* f fl)
+      (poly-pseudo-divide +maxima-ring+ f fl)
     `((mlist)
       ,(coerce-to-maxima :poly-list quot vars)
@@ -400,5 +400,5 @@
 (defmfun $poly_exact_divide (f g vars)
   (with-parsed-polynomials ((vars) :polynomials (f g) :value-type :polynomial)
-    (poly-exact-divide *maxima-ring* f g)))
+    (poly-exact-divide +maxima-ring+ f g)))
 
 (defmfun $poly_normal_form (f fl vars)
@@ -406,18 +406,18 @@
 				   :poly-lists (fl)
 				   :value-type :polynomial)
-    (normal-form *maxima-ring* f (remzero fl) nil)))
+    (normal-form +maxima-ring+ f (remzero fl) nil)))
 
 (defmfun $poly_buchberger_criterion (g vars)
   (with-parsed-polynomials ((vars) :poly-lists (g) :value-type :logical)
-    (buchberger-criterion *maxima-ring* g)))
+    (buchberger-criterion +maxima-ring+ g)))
 
 (defmfun $poly_buchberger (fl vars)
   (with-parsed-polynomials ((vars) :poly-lists (fl) :value-type :poly-list)
-    (buchberger *maxima-ring*  (remzero fl) 0 nil)))
+    (buchberger +maxima-ring+  (remzero fl) 0 nil)))
 
 (defmfun $poly_reduction (plist vars)
   (with-parsed-polynomials ((vars) :poly-lists (plist)
 				   :value-type :poly-list)
-    (reduction *maxima-ring* plist)))
+    (reduction +maxima-ring+ plist)))
 
 (defmfun $poly_minimization (plist vars)
@@ -429,15 +429,15 @@
   (with-parsed-polynomials ((vars) :poly-lists (plist)
 				   :value-type :poly-list)
-    (poly-normalize-list *maxima-ring* plist)))
+    (poly-normalize-list +maxima-ring+ plist)))
 
 (defmfun $poly_grobner (f vars)
   (with-parsed-polynomials ((vars) :poly-lists (f)
 				   :value-type :poly-list)
-    (grobner *maxima-ring* (remzero f))))
+    (grobner +maxima-ring+ (remzero f))))
 
 (defmfun $poly_reduced_grobner (f vars)
   (with-parsed-polynomials ((vars) :poly-lists (f)
 				   :value-type :poly-list)
-    (reduced-grobner *maxima-ring* (remzero f))))
+    (reduced-grobner +maxima-ring+ (remzero f))))
 
 (defmfun $poly_depends_p (p var mvars
@@ -451,17 +451,17 @@
   (with-parsed-polynomials ((vars) :poly-lists (flist)
 				   :value-type :poly-list)
-    (elimination-ideal *maxima-ring* flist k nil 0)))
+    (elimination-ideal +maxima-ring+ flist k nil 0)))
 
 (defmfun $poly_colon_ideal (f g vars)
   (with-parsed-polynomials ((vars) :poly-lists (f g) :value-type :poly-list)
-    (colon-ideal *maxima-ring* f g nil)))
+    (colon-ideal +maxima-ring+ f g nil)))
 
 (defmfun $poly_ideal_intersection (f g vars)
   (with-parsed-polynomials ((vars) :poly-lists (f g) :value-type :poly-list)  
-    (ideal-intersection *maxima-ring* f g nil)))
+    (ideal-intersection +maxima-ring+ f g nil)))
 
 (defmfun $poly_lcm (f g vars)
   (with-parsed-polynomials ((vars) :polynomials (f g) :value-type :polynomial)
-    (poly-lcm *maxima-ring* f g)))
+    (poly-lcm +maxima-ring+ f g)))
 
 (defmfun $poly_gcd (f g vars)
@@ -470,18 +470,18 @@
 (defmfun $poly_grobner_equal (g1 g2 vars)
   (with-parsed-polynomials ((vars) :poly-lists (g1 g2))
-    (grobner-equal *maxima-ring* g1 g2)))
+    (grobner-equal +maxima-ring+ g1 g2)))
 
 (defmfun $poly_grobner_subsetp (g1 g2 vars)
   (with-parsed-polynomials ((vars) :poly-lists (g1 g2))
-    (grobner-subsetp *maxima-ring* g1 g2)))
+    (grobner-subsetp +maxima-ring+ g1 g2)))
 
 (defmfun $poly_grobner_member (p g vars)
   (with-parsed-polynomials ((vars) :polynomials (p) :poly-lists (g))
-    (grobner-member *maxima-ring* p g)))
+    (grobner-member +maxima-ring+ p g)))
 
 (defmfun $poly_ideal_saturation1 (f p vars)
   (with-parsed-polynomials ((vars) :poly-lists (f) :polynomials (p)
 				   :value-type :poly-list)
-    (ideal-saturation-1 *maxima-ring* f p 0)))
+    (ideal-saturation-1 +maxima-ring+ f p 0)))
 
 (defmfun $poly_saturation_extension (f plist vars new-vars)
@@ -489,5 +489,5 @@
 			    :poly-lists (f plist)
 			    :value-type :poly-list)
-    (saturation-extension *maxima-ring* f plist)))
+    (saturation-extension +maxima-ring+ f plist)))
 
 (defmfun $poly_polysaturation_extension (f plist vars new-vars)
@@ -495,15 +495,15 @@
 			    :poly-lists (f plist)
 			    :value-type :poly-list)
-    (polysaturation-extension *maxima-ring* f plist)))
+    (polysaturation-extension +maxima-ring+ f plist)))
 
 (defmfun $poly_ideal_polysaturation1 (f plist vars)
   (with-parsed-polynomials ((vars) :poly-lists (f plist)
 				   :value-type :poly-list)
-    (ideal-polysaturation-1 *maxima-ring* f plist 0 nil)))
+    (ideal-polysaturation-1 +maxima-ring+ f plist 0 nil)))
 
 (defmfun $poly_ideal_saturation (f g vars)
   (with-parsed-polynomials ((vars) :poly-lists (f g)
 				   :value-type  :poly-list)
-    (ideal-saturation *maxima-ring* f g 0 nil)))
+    (ideal-saturation +maxima-ring+ f g 0 nil)))
 
 (defmfun $poly_ideal_polysaturation (f ideal-list vars)
@@ -511,5 +511,5 @@
 				   :poly-list-lists (ideal-list)
 				   :value-type :poly-list)
-    (ideal-polysaturation *maxima-ring* f ideal-list 0 nil)))
+    (ideal-polysaturation +maxima-ring+ f ideal-list 0 nil)))
 
 (defmfun $poly_lt (f vars)
@@ -519,4 +519,4 @@
 (defmfun $poly_lm (f vars)
   (with-parsed-polynomials ((vars) :polynomials (f) :value-type :polynomial)
-    (make-poly-from-termlist (list (make-term (poly-lm f) (funcall (ring-unit *maxima-ring*)))))))
-
+    (make-poly-from-termlist (list (make-term (poly-lm f) (funcall (ring-unit +maxima-ring+)))))))
+
