- Timestamp:
- 2015-06-14T21:54:35-07:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/f4grobner/mx-grobner.lisp
r1709 r1710 189 189 ((member expr vars :test #'equal-test-p) 190 190 (let ((pos (position expr vars :test #'equal-test-p))) 191 (make-poly-variable (ro-ring ring-and-order)(length vars) pos)))191 (make-poly-variable ring (length vars) pos))) 192 192 ((free-of-vars expr vars) 193 193 ;;This means that variable-free CRE and Poisson forms will be converted 194 194 ;;to coefficients intact 195 (coerce-coeff (ro-ring ring-and-order)expr vars))195 (coerce-coeff ring expr vars)) 196 196 (t 197 197 (case (caar expr) 198 198 (mplus (reduce #'(lambda (x y) (poly-add ring-and-order x y)) (parse-list (cdr expr)))) 199 (mminus (poly-uminus (ro-ring ring-and-order)(parse (cadr expr))))199 (mminus (poly-uminus ring (parse (cadr expr)))) 200 200 (mtimes 201 201 (if (endp (cddr expr)) ;unary … … 207 207 ;;Special handling of (expt var pow) 208 208 (let ((pos (position (cadr expr) vars :test #'equal-test-p))) 209 (make-poly-variable (ro-ring ring-and-order)(length vars) pos (caddr expr))))209 (make-poly-variable ring (length vars) pos (caddr expr)))) 210 210 ((not (and (integerp (caddr expr)) (plusp (caddr expr)))) 211 211 ;; Negative power means division in coefficient ring … … 213 213 (mtell "~%Warning: Expression ~%~M~%contains power which is not a positive integer. Parsing as coefficient.~%" 214 214 expr) 215 (coerce-coeff (ro-ring ring-and-order)expr vars))216 (t (poly-expt (ro-ring ring-and-order)(parse (cadr expr)) (caddr expr)))))215 (coerce-coeff ring expr vars)) 216 (t (poly-expt ring (parse (cadr expr)) (caddr expr))))) 217 217 (mrat (parse ($ratdisrep expr))) 218 218 (mpois (parse ($outofpois expr))) 219 219 (otherwise 220 (coerce-coeff (ro-ring ring-and-order)expr vars)))))))220 (coerce-coeff ring expr vars))))))) 221 221 222 222 (defun maxima->poly-list (expr vars
Note:
See TracChangeset
for help on using the changeset viewer.