close Warning: Can't synchronize with repository "(default)" (The repository directory has changed, you should resynchronize the repository with: trac-admin $ENV repository resync '(default)'). Look in the Trac log for more information.

Changeset 105 for branches


Ignore:
Timestamp:
2015-06-05T12:02:06-07:00 (10 years ago)
Author:
Marek Rychlik
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/f4grobner/mx-grobner.lisp

    r104 r105  
    7171are assumed to be defined.")
    7272
    73 
    74 
    75 
    76 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    77 ;;
    78 ;; Conversion from internal form to Maxima general form
    79 ;;
    80 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    81 
    82 (defun maxima-head ()
    83   (if $poly_return_term_list
    84       '(mlist)
    85     '(mplus)))
    86 
    87 (defun coerce-to-maxima (poly-type object vars)
    88   (case poly-type
    89     (:polynomial
    90      `(,(maxima-head) ,@(mapcar #'(lambda (term) (coerce-to-maxima :term term vars)) (poly-termlist object))))
    91     (:poly-list
    92      `((mlist) ,@(mapcar #'(lambda (p) ($ratdisrep (coerce-to-maxima :polynomial p vars))) object)))
    93     (:term
    94      `((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 coincide
    98     (:logical object)
    99     (otherwise
    100      object)))
    10173
    10274
Note: See TracChangeset for help on using the changeset viewer.