Changeset 240
- Timestamp:
- 2015-06-05T16:09:22-07:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/f4grobner/ngrobner.lisp
r223 r240 251 251 (warn "~%Ring specification ~A is not recognized. Using default.~%" ring) 252 252 nil))) 253 254 255 256 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;257 ;;258 ;; Conversion from internal form to Maxima general form259 ;;260 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;261 262 (defun maxima-head ()263 (if $poly_return_term_list264 '(mlist)265 '(mplus)))266 267 (defun coerce-to-maxima (poly-type object vars)268 (case poly-type269 (:polynomial270 `(,(maxima-head) ,@(mapcar #'(lambda (term) (coerce-to-maxima :term term vars)) (poly-termlist object))))271 (:poly-list272 `((mlist) ,@(mapcar #'(lambda (p) (funcall *ratdisrep-fun* (coerce-to-maxima :polynomial p vars))) object)))273 (:term274 `((mtimes) ,(funcall *ratdisrep-fun* (term-coeff object))275 ,@(mapcar #'(lambda (var power) `((mexpt) ,var ,power))276 vars (monom-exponents (term-monom object)))))277 ;; Assumes that Lisp and Maxima logicals coincide278 (:logical object)279 (otherwise280 object)))281 282 283
Note:
See TracChangeset
for help on using the changeset viewer.