close Warning: Can't synchronize with repository "(default)" (The repository directory has changed, you should resynchronize the repository with: trac-admin $ENV repository resync '(default)'). Look in the Trac log for more information.

Changeset 1672 for branches


Ignore:
Timestamp:
2015-06-14T20:55:07-07:00 (9 years ago)
Author:
Marek Rychlik
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/f4grobner/mx-grobner.lisp

    r1671 r1672  
    172172                                        :order (find-order)
    173173                                        :primary-elimination-order primary-elimination-order
    174                                         :secondary-elimination-order secondary-elimination-order))
    175                        (ring (ro-order ring-and-order)))
     174                                        :secondary-elimination-order secondary-elimination-order)))
    176175  "Convert a maxima polynomial expression EXPR in variables VARS to internal form."
    177176  (labels ((parse (arg) (maxima->poly arg vars ring order primary-elimination-order secondary-elimination-order))
     
    181180     ((member expr vars :test #'equal-test-p)
    182181      (let ((pos (position expr vars :test #'equal-test-p)))
    183         (make-poly-variable ring (length vars) pos)))
     182        (make-poly-variable (ro-ring ring-and-order) (length vars) pos)))
    184183     ((free-of-vars expr vars)
    185184      ;;This means that variable-free CRE and Poisson forms will be converted
    186185      ;;to coefficients intact
    187       (coerce-coeff ring expr vars))
     186      (coerce-coeff (ro-ring ring-and-order) expr vars))
    188187     (t
    189188      (case (caar expr)
    190189        (mplus (reduce #'(lambda (x y) (poly-add ring-and-order x y)) (parse-list (cdr expr))))
    191         (mminus (poly-uminus ring (parse (cadr expr))))
     190        (mminus (poly-uminus (ro-ring ring-and-order) (parse (cadr expr))))
    192191        (mtimes
    193192         (if (endp (cddr expr))         ;unary
     
    199198           ;;Special handling of (expt var pow)
    200199           (let ((pos (position (cadr expr) vars :test #'equal-test-p)))
    201              (make-poly-variable ring (length vars) pos (caddr expr))))
     200             (make-poly-variable (ro-ring ring-and-order) (length vars) pos (caddr expr))))
    202201          ((not (and (integerp (caddr expr)) (plusp (caddr expr))))
    203202           ;; Negative power means division in coefficient ring
     
    205204           (mtell "~%Warning: Expression ~%~M~%contains power which is not a positive integer. Parsing as coefficient.~%"
    206205                  expr)
    207            (coerce-coeff ring expr vars))
    208           (t (poly-expt ring (parse (cadr expr)) (caddr expr)))))
     206           (coerce-coeff (ro-ring ring-and-order) expr vars))
     207          (t (poly-expt (ro-ring ring-and-order) (parse (cadr expr)) (caddr expr)))))
    209208        (mrat (parse ($ratdisrep expr)))
    210209        (mpois (parse ($outofpois expr)))
Note: See TracChangeset for help on using the changeset viewer.