Changeset 100 for branches/f4grobner
- Timestamp:
- 2015-06-05T11:59:36-07:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/f4grobner/mx-grobner.lisp
r99 r100 32 32 ;;FUNCTS is loaded because it contains the definition of LCM 33 33 ($load "functs") 34 35 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;36 ;;37 ;; Coefficient ring operations38 ;;39 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;40 ;;41 ;; These are ALL operations that are performed on the coefficients by42 ;; the package, and thus the coefficient ring can be changed by merely43 ;; redefining these operations.44 ;;45 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;46 47 (defstruct (ring)48 (parse #'identity :type function)49 (unit #'identity :type function)50 (zerop #'identity :type function)51 (add #'identity :type function)52 (sub #'identity :type function)53 (uminus #'identity :type function)54 (mul #'identity :type function)55 (div #'identity :type function)56 (lcm #'identity :type function)57 (ezgcd #'identity :type function)58 (gcd #'identity :type function))59 60 (defparameter *ring-of-integers*61 (make-ring62 :parse #'identity63 :unit #'(lambda () 1)64 :zerop #'zerop65 :add #'+66 :sub #'-67 :uminus #'-68 :mul #'*69 :div #'/70 :lcm #'lcm71 :ezgcd #'(lambda (x y &aux (c (gcd x y))) (values c (/ x c) (/ y c)))72 :gcd #'gcd)73 "The ring of integers.")74 75 76 77 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;78 ;;79 ;; This is how we perform operations on coefficients80 ;; using Maxima functions.81 ;;82 ;; Functions and macros dealing with internal representation structure83 ;;84 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;85 34 86 35
Note:
See TracChangeset
for help on using the changeset viewer.