Changeset 4392 for branches/f4grobner
- Timestamp:
- 2016-06-07T14:19:54-07:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/f4grobner/test5.lisp
r4391 r4392 1 1 2 ;;poly_grobner([x^3-x^2+2,y-2*x^2+1,z-3*x+5],[x,y,z]); 2 3 ;;[x^3-x^2+2,y-2*x^2+1,z-3*x+5,2*z^2+20*z-9*y+41,(-z^3)-12*z^2-45*z-104] 3 4 4 5 (in-package :5am-buchberger) 6 (proclaim '(special fl ref-gb sp sp-rem)) 5 7 8 (setf grobner-debug::$poly_grobner_debug nil) 6 9 7 10 (setf fl (cdr (string->poly "[x^3-x^2+2,y-2*x^2+1,z-3*x+5]" '(x y z))) 8 11 ref-gb (cdr (string->poly "[x^3-x^2+2,y-2*x^2+1,z-3*x+5,2*z^2+20*z-9*y+41,(-z^3)-12*z^2-45*z-104]" '(x y z)))) 9 12 10 (format t "~S~%" (poly->string (cons :[ fl))) 11 (format t "~S~%" (poly->string (cons :[ ref-gb))) 13 (format t "~%") 14 (format t "FL --> ~A~%" (poly->string (cons :[ fl))) 15 (format t "REF-GB --> ~A~%" (poly->string (cons :[ ref-gb))) 12 16 13 (setf sp-0-1 (s-polynomial (elt fl 0) (elt fl 1))) 14 (format t "~S~%" (poly->string sp-0-1)) 17 (loop for i from 0 below (length fl) 18 do 19 (loop for j from (1+ i) below (length fl) 20 do 21 (setf sp (s-polynomial (elt fl i) (elt fl j))) 22 (format t "SPOLY(~A,~A) --> ~A~%" (poly->string (elt fl i)) (poly->string (elt fl j)) (poly->string sp)) 23 (setf sp-rem (normal-form sp fl)) 24 (format t "NORMAL-FORM(~A,~A) --> ~A~%" (poly->string sp-rem) (poly->string (cons :[ fl)) (poly->string sp-rem)) 25 ) 26 ) 15 27 16 (setf sp-0-2 (s-polynomial (elt fl 0) (elt fl 2)))17 (format t "~S~%" (poly->string sp-0-2))18 28 19 (setf sp-1-2 (s-polynomial (elt fl 1) (elt fl 2)))20 (format t "~S~%" (poly->string sp-1-2))21 22 (setf grobner-debug::$poly_grobner_debug t)23 29 ;;(setf gb (buchberger fl))
Note:
See TracChangeset
for help on using the changeset viewer.