Changeset 1672 for branches/f4grobner
- Timestamp:
- 2015-06-14T20:55:07-07:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/f4grobner/mx-grobner.lisp
r1671 r1672 172 172 :order (find-order) 173 173 :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))) 176 175 "Convert a maxima polynomial expression EXPR in variables VARS to internal form." 177 176 (labels ((parse (arg) (maxima->poly arg vars ring order primary-elimination-order secondary-elimination-order)) … … 181 180 ((member expr vars :test #'equal-test-p) 182 181 (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))) 184 183 ((free-of-vars expr vars) 185 184 ;;This means that variable-free CRE and Poisson forms will be converted 186 185 ;;to coefficients intact 187 (coerce-coeff ringexpr vars))186 (coerce-coeff (ro-ring ring-and-order) expr vars)) 188 187 (t 189 188 (case (caar expr) 190 189 (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)))) 192 191 (mtimes 193 192 (if (endp (cddr expr)) ;unary … … 199 198 ;;Special handling of (expt var pow) 200 199 (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)))) 202 201 ((not (and (integerp (caddr expr)) (plusp (caddr expr)))) 203 202 ;; Negative power means division in coefficient ring … … 205 204 (mtell "~%Warning: Expression ~%~M~%contains power which is not a positive integer. Parsing as coefficient.~%" 206 205 expr) 207 (coerce-coeff ringexpr 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))))) 209 208 (mrat (parse ($ratdisrep expr))) 210 209 (mpois (parse ($outofpois expr)))
Note:
See TracChangeset
for help on using the changeset viewer.