[4392] | 1 |
|
---|
[4391] | 2 | ;;poly_grobner([x^3-x^2+2,y-2*x^2+1,z-3*x+5],[x,y,z]);
|
---|
| 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]
|
---|
| 4 |
|
---|
| 5 | (in-package :5am-buchberger)
|
---|
[4392] | 6 | (proclaim '(special fl ref-gb sp sp-rem))
|
---|
[4391] | 7 |
|
---|
[4392] | 8 | (setf grobner-debug::$poly_grobner_debug nil)
|
---|
[4391] | 9 |
|
---|
| 10 | (setf fl (cdr (string->poly "[x^3-x^2+2,y-2*x^2+1,z-3*x+5]" '(x y z)))
|
---|
| 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))))
|
---|
| 12 |
|
---|
[4392] | 13 | (format t "~%")
|
---|
| 14 | (format t "FL --> ~A~%" (poly->string (cons :[ fl)))
|
---|
| 15 | (format t "REF-GB --> ~A~%" (poly->string (cons :[ ref-gb)))
|
---|
[4391] | 16 |
|
---|
[4392] | 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)))
|
---|
[4393] | 22 | (format t "SPOLY(~A,~A) --> ~A~%"
|
---|
| 23 | (poly->string (elt fl i))
|
---|
| 24 | (poly->string (elt fl j))
|
---|
| 25 | (poly->string sp))
|
---|
[4392] | 26 | (setf sp-rem (normal-form sp fl))
|
---|
[4394] | 27 | (format t "NORMAL-FORM(~A,~A) --> ~A~%"
|
---|
[4401] | 28 | (poly->string sp)
|
---|
[4394] | 29 | (poly->string (cons :[ fl))
|
---|
| 30 | (poly->string sp-rem))
|
---|
[4392] | 31 | )
|
---|
| 32 | )
|
---|
[4391] | 33 |
|
---|
| 34 |
|
---|
| 35 | ;;(setf gb (buchberger fl))
|
---|