Changeset 107 for branches/f4grobner
- Timestamp:
- 2015-06-05T12:02:57-07:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/f4grobner/grobner.lisp
r97 r107 254 254 (otherwise 255 255 object))) 256 257 258 259 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;260 ;;261 ;; Maxima expression ring262 ;;263 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;264 265 (defparameter *expression-ring*266 (make-ring267 ;;(defun coeff-zerop (expr) (meval1 `(($is) (($equal) ,expr 0))))268 :parse #'(lambda (expr)269 (when modulus (setf expr ($rat expr)))270 expr)271 :unit #'(lambda () (if modulus ($rat 1) 1))272 :zerop #'(lambda (expr)273 ;;When is exactly a maxima expression equal to 0?274 (cond ((numberp expr)275 (= expr 0))276 ((atom expr) nil)277 (t278 (case (caar expr)279 (mrat (eql ($ratdisrep expr) 0))280 (otherwise (eql ($totaldisrep expr) 0))))))281 :add #'(lambda (x y) (m+ x y))282 :sub #'(lambda (x y) (m- x y))283 :uminus #'(lambda (x) (m- x))284 :mul #'(lambda (x y) (m* x y))285 ;;(defun coeff-div (x y) (cadr ($divide x y)))286 :div #'(lambda (x y) (m// x y))287 :lcm #'(lambda (x y) (meval1 `((|$LCM|) ,x ,y)))288 :ezgcd #'(lambda (x y) (apply #'values (cdr ($ezgcd ($totaldisrep x) ($totaldisrep y)))))289 ;; :gcd #'(lambda (x y) (second ($ezgcd x y)))))290 :gcd #'(lambda (x y) ($gcd x y))))291 292 (defvar *maxima-ring* *expression-ring*293 "The ring of coefficients, over which all polynomials294 are assumed to be defined.")295 256 296 257
Note:
See TracChangeset
for help on using the changeset viewer.