Changeset 241 for branches/f4grobner
- Timestamp:
- 2015-06-05T16:09:38-07:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/f4grobner/mx-grobner.lisp
r237 r241 161 161 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 162 162 ;; 163 ;; Conversion from internal form to Maxima general form 164 ;; 165 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 166 167 (defun maxima-head () 168 (if $poly_return_term_list 169 '(mlist) 170 '(mplus))) 171 172 (defun coerce-to-maxima (poly-type object vars) 173 (case poly-type 174 (:polynomial 175 `(,(maxima-head) ,@(mapcar #'(lambda (term) (coerce-to-maxima :term term vars)) (poly-termlist object)))) 176 (:poly-list 177 `((mlist) ,@(mapcar #'(lambda (p) (funcall *ratdisrep-fun* (coerce-to-maxima :polynomial p vars))) object))) 178 (:term 179 `((mtimes) ,(funcall *ratdisrep-fun* (term-coeff object)) 180 ,@(mapcar #'(lambda (var power) `((mexpt) ,var ,power)) 181 vars (monom-exponents (term-monom object))))) 182 ;; Assumes that Lisp and Maxima logicals coincide 183 (:logical object) 184 (otherwise 185 object))) 186 187 188 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 189 ;; 163 190 ;; Unary and binary operation definition facility 164 191 ;;
Note:
See TracChangeset
for help on using the changeset viewer.