Changeset 2352
- Timestamp:
- 2015-06-18T20:48:59-07:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/f4grobner/term.lisp
r2348 r2352 72 72 :coeff coeff)) 73 73 74 (defmethod ring-mul ((term1 term) (term2 term)) 74 |# 75 76 (defmethod r* ((term1 term) (term2 term)) 75 77 "Returns the product of the terms TERM1 and TERM2, 76 78 or NIL when the product is 0. This definition takes care of divisors of 0 77 79 in the coefficient ring." 78 (let ((c (ring-mul (term-coeff term1) (term-coeff term2)))) 79 (unless (ring-zerop c) 80 (make-term :monom (monom-mul (term-monom term1) (term-monom term2)) 81 :coeff c)))) 80 (format t "TERM::R* called with:~& TERM1: ~A~& TERM2: ~A~%" term1 term2) 81 (call-next-method)) 82 82 83 (defun term-sugar (term) 84 (declare (type term term)) 85 (monom-sugar (term-monom term))) 86 87 ;; Does the term depend on variable K? 88 (defun term-depends-p (term k) 89 "Return T if the term TERM depends on variable number K." 90 (declare (type term term) (type fixnum k)) 91 (monom-depends-p (term-monom term) k)) 83 #| 92 84 93 85 (defun term->cons (term)
Note:
See TracChangeset
for help on using the changeset viewer.