close Warning: Can't synchronize with repository "(default)" (The repository directory has changed, you should resynchronize the repository with: trac-admin $ENV repository resync '(default)'). Look in the Trac log for more information.

Changeset 1241 for branches


Ignore:
Timestamp:
2015-06-11T15:04:51-07:00 (9 years ago)
Author:
Marek Rychlik
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/f4grobner/division.lisp

    r1240 r1241  
    6464            (scalar-times-poly-1 ring c1 (monom-times-poly m g))))
    6565
    66 (defun check-loop-invariant (ring-and-order c f0 a fl r f
     66(defun check-loop-invariant (ring-and-order c f0 a fl r p
    6767                             &aux
    6868                               (ring (ro-ring ring-and-order))
     
    8383              (list (inner-product a fl p-add p-mul p-zero)
    8484                    r
    85                     f))))))
     85                    p))))))
    8686 
    8787
     
    9898the quotients is initialized to default."
    9999  (declare (type poly f) (list fl))
    100   ;; Loop invariant: c*f0=sum ai*fi+r+p, where f0 is the initial value of f
     100  ;; Loop invariant: c*f=sum ai*fi+r+p, where p must eventually become 0
    101101  (do ((r (make-poly-zero))
    102102       (c (funcall (ring-unit ring)))
     
    121121            (setf (poly-sugar r) (max (poly-sugar r) (term-sugar (poly-lt p))))
    122122            (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))
    123125            t)
    124126           ((monom-divides-p (poly-lm (car fl)) (poly-lm p)) ;division occurred
Note: See TracChangeset for help on using the changeset viewer.