Changeset 1237 for branches/f4grobner
- Timestamp:
- 2015-06-11T14:50:23-07:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/f4grobner/division.lisp
r1236 r1237 64 64 (scalar-times-poly-1 ring c1 (monom-times-poly m g)))) 65 65 66 (defun check-loop-invariant (ring-and-order c f0 a fl r f 67 &aux 68 (ring (ro-ring ring-and-order)) 69 (p-zero (make-poly-zero))) 70 "Loop invariant: c*f0=sum ai*fi+r+f, where f0 is the initial value of f" 71 (flet ((p-add (p q) (poly-add ring-and-order p q)) 72 (p-sub (p q) (poly-sub ring-and-order p q)) 73 (p-mul (p q) (poly-mul ring-and-order p q))) 74 (poly-zerop 75 (p-sub 76 (scalar-times-poly ring c f0) 77 (reduce #'p-add 78 (list (inner-product a fl p-add p-mul p-zero) 79 r 80 f)))))) 81 82 83 66 84 (defun poly-pseudo-divide (ring-and-order f fl 67 85 &aux … … 76 94 the quotients is initialized to default." 77 95 (declare (type poly f) (list fl)) 96 ;; Loop invariant: c*f0=sum ai*fi+r+f, where f0 is the initial value of f 78 97 (do ((r (make-poly-zero)) 79 98 (c (funcall (ring-unit ring)))
Note:
See TracChangeset
for help on using the changeset viewer.