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 1237 for branches/f4grobner


Ignore:
Timestamp:
2015-06-11T14:50:23-07:00 (9 years ago)
Author:
Marek Rychlik
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/f4grobner/division.lisp

    r1236 r1237  
    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
     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
    6684(defun poly-pseudo-divide (ring-and-order f fl
    6785                           &aux
     
    7694the quotients is initialized to default."
    7795  (declare (type poly f) (list fl))
     96  ;; Loop invariant: c*f0=sum ai*fi+r+f, where f0 is the initial value of f
    7897  (do ((r (make-poly-zero))
    7998       (c (funcall (ring-unit ring)))
Note: See TracChangeset for help on using the changeset viewer.