Changeset 1242 for branches/f4grobner/division.lisp
- Timestamp:
- 2015-06-11T15:05:51-07:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/f4grobner/division.lisp
r1241 r1242 64 64 (scalar-times-poly-1 ring c1 (monom-times-poly m g)))) 65 65 66 (defun check-loop-invariant (ring-and-order c f 0a fl r p66 (defun check-loop-invariant (ring-and-order c f a fl r p 67 67 &aux 68 68 (ring (ro-ring ring-and-order)) … … 70 70 "Check loop invariant of division algorithms, when we divide a 71 71 polynomial F by the list of polynomials FL. The invariant is the 72 identity C*F 0=SUM AI*FI+R+F, where F0 is the initial value of F, A is72 identity C*F=SUM AI*FI+R+P, where F0 is the initial value of F, A is 73 73 the list of partial quotients, R is the intermediate value of the 74 remainder, and Fis the intermediate value which eventually becomes74 remainder, and P is the intermediate value which eventually becomes 75 75 0." 76 (flet ((p-add ( p q) (poly-add ring-and-order p q))77 (p-sub ( p q) (poly-sub ring-and-order p q))78 (p-mul ( p q) (poly-mul ring-and-order p q)))76 (flet ((p-add (x y) (poly-add ring-and-order x y)) 77 (p-sub (x y) (poly-sub ring-and-order x y)) 78 (p-mul (x y) (poly-mul ring-and-order x y))) 79 79 (poly-zerop 80 80 (p-sub 81 (scalar-times-poly ring c f 0)81 (scalar-times-poly ring c f) 82 82 (reduce #'p-add 83 83 (list (inner-product a fl p-add p-mul p-zero)
Note:
See TracChangeset
for help on using the changeset viewer.