- Timestamp:
- 2015-06-05T12:02:06-07:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/f4grobner/mx-grobner.lisp
r104 r105 71 71 are assumed to be defined.") 72 72 73 74 75 76 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;77 ;;78 ;; Conversion from internal form to Maxima general form79 ;;80 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;81 82 (defun maxima-head ()83 (if $poly_return_term_list84 '(mlist)85 '(mplus)))86 87 (defun coerce-to-maxima (poly-type object vars)88 (case poly-type89 (:polynomial90 `(,(maxima-head) ,@(mapcar #'(lambda (term) (coerce-to-maxima :term term vars)) (poly-termlist object))))91 (:poly-list92 `((mlist) ,@(mapcar #'(lambda (p) ($ratdisrep (coerce-to-maxima :polynomial p vars))) object)))93 (:term94 `((mtimes) ,($ratdisrep (term-coeff object))95 ,@(mapcar #'(lambda (var power) `((mexpt) ,var ,power))96 vars (monom-exponents (term-monom object)))))97 ;; Assumes that Lisp and Maxima logicals coincide98 (:logical object)99 (otherwise100 object)))101 73 102 74
Note:
See TracChangeset
for help on using the changeset viewer.