Changeset 1241 for branches/f4grobner
- Timestamp:
- 2015-06-11T15:04:51-07:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/f4grobner/division.lisp
r1240 r1241 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 f66 (defun check-loop-invariant (ring-and-order c f0 a fl r p 67 67 &aux 68 68 (ring (ro-ring ring-and-order)) … … 83 83 (list (inner-product a fl p-add p-mul p-zero) 84 84 r 85 f))))))85 p)))))) 86 86 87 87 … … 98 98 the quotients is initialized to default." 99 99 (declare (type poly f) (list fl)) 100 ;; Loop invariant: c*f 0=sum ai*fi+r+p, where f0 is the initial value of f100 ;; Loop invariant: c*f=sum ai*fi+r+p, where p must eventually become 0 101 101 (do ((r (make-poly-zero)) 102 102 (c (funcall (ring-unit ring))) … … 121 121 (setf (poly-sugar r) (max (poly-sugar r) (term-sugar (poly-lt p)))) 122 122 (pop (poly-termlist p)) ;remove lt(p) from p 123 ;; Run the check here 124 (assert (check-loop-invariant ring-and-order c f a fl r p)) 123 125 t) 124 126 ((monom-divides-p (poly-lm (car fl)) (poly-lm p)) ;division occurred
Note:
See TracChangeset
for help on using the changeset viewer.