- Timestamp:
- 2015-06-17T18:55:38-07:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/f4grobner/ring.lisp
r2058 r2059 87 87 |# 88 88 89 (defgeneric parse (object)89 (defgeneric ring-parse (object) 90 90 (:method ((object t)) object)) 91 91 92 (defgeneric unit-for (object)92 (defgeneric ring-unit-for (object) 93 93 (:method ((self number)) 1)) 94 94 95 (defgeneric zerop (object)95 (defgeneric ring-zerop (object) 96 96 (:method ((self number)) (zerop self))) 97 97 98 (defgeneric add (x y)98 (defgeneric ring-add (x y) 99 99 (:method ((x number) (y number)) (+ x y))) 100 100 101 (defgeneric mul (x y)101 (defgeneric ring-mul (x y) 102 102 (:method ((x number) (y number)) (* x y))) 103 103 104 (defgeneric div (x y)104 (defgeneric ring-div (x y) 105 105 (:method ((x number) (y number)) (/ x y))) 106 106 107 (defgeneric lcm (x y)107 (defgeneric ring-lcm (x y) 108 108 (:method ((x integer) (y integer)) (lcm x y))) 109 109 110 (defgeneric ezgcd (x y)110 (defgeneric ring-ezgcd (x y) 111 111 (:method ((x integer) (y integer) 112 112 &aux (c (gcd x y))) 113 113 (values c (/ x c) (/ y c)))) 114 114 115 (defgeneric gcd (x y)115 (defgeneric ring-gcd (x y) 116 116 (:method ((x integer) (y integer)) 117 117 (gcd x y))) 118 118 119 (defgeneric dimension (object)119 (defgeneric ring-dimension (object) 120 120 (:method ((object integer)) 1)) 121 121
Note:
See TracChangeset
for help on using the changeset viewer.