diff --git a/books/ps/v104coercevectormatrixpackage.ps b/books/ps/v104coercevectormatrixpackage.ps new file mode 100644 index 0000000..9845bc3 --- /dev/null +++ b/books/ps/v104coercevectormatrixpackage.ps @@ -0,0 +1,281 @@ +%!PS-Adobe-2.0 +%%Creator: Graphviz version 2.16.1 (Mon Jul 7 18:20:33 UTC 2008) +%%For: (root) root +%%Title: pic +%%Pages: (atend) +%%BoundingBox: (atend) +%%EndComments +save +%%BeginProlog +/DotDict 200 dict def +DotDict begin + +/setupLatin1 { +mark +/EncodingVector 256 array def + EncodingVector 0 + +ISOLatin1Encoding 0 255 getinterval putinterval +EncodingVector 45 /hyphen put + +% Set up ISO Latin 1 character encoding +/starnetISO { + dup dup findfont dup length dict begin + { 1 index /FID ne { def }{ pop pop } ifelse + } forall + /Encoding EncodingVector def + currentdict end definefont +} def +/Times-Roman starnetISO def +/Times-Italic starnetISO def +/Times-Bold starnetISO def +/Times-BoldItalic starnetISO def +/Helvetica starnetISO def +/Helvetica-Oblique starnetISO def +/Helvetica-Bold starnetISO def +/Helvetica-BoldOblique starnetISO def +/Courier starnetISO def +/Courier-Oblique starnetISO def +/Courier-Bold starnetISO def +/Courier-BoldOblique starnetISO def +cleartomark +} bind def + +%%BeginResource: procset graphviz 0 0 +/coord-font-family /Times-Roman def +/default-font-family /Times-Roman def +/coordfont coord-font-family findfont 8 scalefont def + +/InvScaleFactor 1.0 def +/set_scale { + dup 1 exch div /InvScaleFactor exch def + scale +} bind def + +% styles +/solid { [] 0 setdash } bind def +/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def +/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def +/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def +/bold { 2 setlinewidth } bind def +/filled { } bind def +/unfilled { } bind def +/rounded { } bind def +/diagonals { } bind def + +% hooks for setting color +/nodecolor { sethsbcolor } bind def +/edgecolor { sethsbcolor } bind def +/graphcolor { sethsbcolor } bind def +/nopcolor {pop pop pop} bind def + +/beginpage { % i j npages + /npages exch def + /j exch def + /i exch def + /str 10 string def + npages 1 gt { + gsave + coordfont setfont + 0 0 moveto + (\() show i str cvs show (,) show j str cvs show (\)) show + grestore + } if +} bind def + +/set_font { + findfont exch + scalefont setfont +} def + +% draw text fitted to its expected width +/alignedtext { % width text + /text exch def + /width exch def + gsave + width 0 gt { + [] 0 setdash + text stringwidth pop width exch sub text length div 0 text ashow + } if + grestore +} def + +/boxprim { % xcorner ycorner xsize ysize + 4 2 roll + moveto + 2 copy + exch 0 rlineto + 0 exch rlineto + pop neg 0 rlineto + closepath +} bind def + +/ellipse_path { + /ry exch def + /rx exch def + /y exch def + /x exch def + matrix currentmatrix + newpath + x y translate + rx ry scale + 0 0 1 0 360 arc + setmatrix +} bind def + +/endpage { showpage } bind def +/showpage { } def + +/layercolorseq + [ % layer color sequence - darkest to lightest + [0 0 0] + [.2 .8 .8] + [.4 .8 .8] + [.6 .8 .8] + [.8 .8 .8] + ] +def + +/layerlen layercolorseq length def + +/setlayer {/maxlayer exch def /curlayer exch def + layercolorseq curlayer 1 sub layerlen mod get + aload pop sethsbcolor + /nodecolor {nopcolor} def + /edgecolor {nopcolor} def + /graphcolor {nopcolor} def +} bind def + +/onlayer { curlayer ne {invis} if } def + +/onlayers { + /myupper exch def + /mylower exch def + curlayer mylower lt + curlayer myupper gt + or + {invis} if +} def + +/curlayer 0 def + +%%EndResource +%%EndProlog +%%BeginSetup +14 default-font-family set_font +1 setmiterlimit +% /arrowlength 10 def +% /arrowwidth 5 def + +% make sure pdfmark is harmless for PS-interpreters other than Distiller +/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse +% make '<<' and '>>' safe on PS Level 1 devices +/languagelevel where {pop languagelevel}{1} ifelse +2 lt { + userdict (<<) cvn ([) cvn load put + userdict (>>) cvn ([) cvn load put +} if + +%%EndSetup +setupLatin1 +%%Page: 1 1 +%%PageBoundingBox: 36 36 110 152 +%%PageOrientation: Portrait +0 0 1 beginpage +gsave +36 36 74 116 boxprim clip newpath +1 1 set_scale 0 rotate 40 40 translate +0.167 0.600 1.000 graphcolor +newpath -4 -4 moveto +-4 716 lineto +536 716 lineto +536 -4 lineto +closepath fill +1 setlinewidth +0.167 0.600 1.000 graphcolor +newpath -4 -4 moveto +-4 716 lineto +536 716 lineto +536 -4 lineto +closepath stroke +% CVMP +gsave +[ /Rect [ 5 72 61 108 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=CVMP) >> + /Subtype /Link +/ANN pdfmark +0.939 0.733 1.000 nodecolor +newpath 61 108 moveto +5 108 lineto +5 72 lineto +61 72 lineto +closepath fill +1 setlinewidth +filled +0.939 0.733 1.000 nodecolor +newpath 61 108 moveto +5 108 lineto +5 72 lineto +61 72 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +13 85.9 moveto 40 (CVMP) alignedtext +grestore +% PFECAT +gsave +[ /Rect [ 0 0 66 36 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=PFECAT) >> + /Subtype /Link +/ANN pdfmark +0.606 0.733 1.000 nodecolor +newpath 66 36 moveto +2.24404e-14 36 lineto +8.44116e-15 1.06581e-14 lineto +66 0 lineto +closepath fill +1 setlinewidth +filled +0.606 0.733 1.000 nodecolor +newpath 66 36 moveto +2.24404e-14 36 lineto +8.44116e-15 1.06581e-14 lineto +66 0 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +7.5 13.9 moveto 51 (PFECAT) alignedtext +grestore +% CVMP->PFECAT +gsave +1 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 33 72 moveto +33 64 33 55 33 46 curveto +stroke +0.000 0.000 0.000 edgecolor +newpath 36.5001 46 moveto +33 36 lineto +29.5001 46 lineto +closepath fill +1 setlinewidth +solid +0.000 0.000 0.000 edgecolor +newpath 36.5001 46 moveto +33 36 lineto +29.5001 46 lineto +closepath stroke +grestore +endpage +showpage +grestore +%%PageTrailer +%%EndPage: 1 +%%Trailer +%%Pages: 1 +%%BoundingBox: 36 36 110 152 +end +restore +%%EOF diff --git a/books/ps/v104generalhenselpackage.ps b/books/ps/v104generalhenselpackage.ps new file mode 100644 index 0000000..05e1021 --- /dev/null +++ b/books/ps/v104generalhenselpackage.ps @@ -0,0 +1,281 @@ +%!PS-Adobe-2.0 +%%Creator: Graphviz version 2.16.1 (Mon Jul 7 18:20:33 UTC 2008) +%%For: (root) root +%%Title: pic +%%Pages: (atend) +%%BoundingBox: (atend) +%%EndComments +save +%%BeginProlog +/DotDict 200 dict def +DotDict begin + +/setupLatin1 { +mark +/EncodingVector 256 array def + EncodingVector 0 + +ISOLatin1Encoding 0 255 getinterval putinterval +EncodingVector 45 /hyphen put + +% Set up ISO Latin 1 character encoding +/starnetISO { + dup dup findfont dup length dict begin + { 1 index /FID ne { def }{ pop pop } ifelse + } forall + /Encoding EncodingVector def + currentdict end definefont +} def +/Times-Roman starnetISO def +/Times-Italic starnetISO def +/Times-Bold starnetISO def +/Times-BoldItalic starnetISO def +/Helvetica starnetISO def +/Helvetica-Oblique starnetISO def +/Helvetica-Bold starnetISO def +/Helvetica-BoldOblique starnetISO def +/Courier starnetISO def +/Courier-Oblique starnetISO def +/Courier-Bold starnetISO def +/Courier-BoldOblique starnetISO def +cleartomark +} bind def + +%%BeginResource: procset graphviz 0 0 +/coord-font-family /Times-Roman def +/default-font-family /Times-Roman def +/coordfont coord-font-family findfont 8 scalefont def + +/InvScaleFactor 1.0 def +/set_scale { + dup 1 exch div /InvScaleFactor exch def + scale +} bind def + +% styles +/solid { [] 0 setdash } bind def +/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def +/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def +/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def +/bold { 2 setlinewidth } bind def +/filled { } bind def +/unfilled { } bind def +/rounded { } bind def +/diagonals { } bind def + +% hooks for setting color +/nodecolor { sethsbcolor } bind def +/edgecolor { sethsbcolor } bind def +/graphcolor { sethsbcolor } bind def +/nopcolor {pop pop pop} bind def + +/beginpage { % i j npages + /npages exch def + /j exch def + /i exch def + /str 10 string def + npages 1 gt { + gsave + coordfont setfont + 0 0 moveto + (\() show i str cvs show (,) show j str cvs show (\)) show + grestore + } if +} bind def + +/set_font { + findfont exch + scalefont setfont +} def + +% draw text fitted to its expected width +/alignedtext { % width text + /text exch def + /width exch def + gsave + width 0 gt { + [] 0 setdash + text stringwidth pop width exch sub text length div 0 text ashow + } if + grestore +} def + +/boxprim { % xcorner ycorner xsize ysize + 4 2 roll + moveto + 2 copy + exch 0 rlineto + 0 exch rlineto + pop neg 0 rlineto + closepath +} bind def + +/ellipse_path { + /ry exch def + /rx exch def + /y exch def + /x exch def + matrix currentmatrix + newpath + x y translate + rx ry scale + 0 0 1 0 360 arc + setmatrix +} bind def + +/endpage { showpage } bind def +/showpage { } def + +/layercolorseq + [ % layer color sequence - darkest to lightest + [0 0 0] + [.2 .8 .8] + [.4 .8 .8] + [.6 .8 .8] + [.8 .8 .8] + ] +def + +/layerlen layercolorseq length def + +/setlayer {/maxlayer exch def /curlayer exch def + layercolorseq curlayer 1 sub layerlen mod get + aload pop sethsbcolor + /nodecolor {nopcolor} def + /edgecolor {nopcolor} def + /graphcolor {nopcolor} def +} bind def + +/onlayer { curlayer ne {invis} if } def + +/onlayers { + /myupper exch def + /mylower exch def + curlayer mylower lt + curlayer myupper gt + or + {invis} if +} def + +/curlayer 0 def + +%%EndResource +%%EndProlog +%%BeginSetup +14 default-font-family set_font +1 setmiterlimit +% /arrowlength 10 def +% /arrowwidth 5 def + +% make sure pdfmark is harmless for PS-interpreters other than Distiller +/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse +% make '<<' and '>>' safe on PS Level 1 devices +/languagelevel where {pop languagelevel}{1} ifelse +2 lt { + userdict (<<) cvn ([) cvn load put + userdict (>>) cvn ([) cvn load put +} if + +%%EndSetup +setupLatin1 +%%Page: 1 1 +%%PageBoundingBox: 36 36 124 152 +%%PageOrientation: Portrait +0 0 1 beginpage +gsave +36 36 88 116 boxprim clip newpath +1 1 set_scale 0 rotate 40 40 translate +0.167 0.600 1.000 graphcolor +newpath -4 -4 moveto +-4 716 lineto +536 716 lineto +536 -4 lineto +closepath fill +1 setlinewidth +0.167 0.600 1.000 graphcolor +newpath -4 -4 moveto +-4 716 lineto +536 716 lineto +536 -4 lineto +closepath stroke +% GHENSEL +gsave +[ /Rect [ 0 72 80 108 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=GHENSEL) >> + /Subtype /Link +/ANN pdfmark +0.939 0.733 1.000 nodecolor +newpath 80 108 moveto +2.13163e-14 108 lineto +7.10543e-15 72 lineto +80 72 lineto +closepath fill +1 setlinewidth +filled +0.939 0.733 1.000 nodecolor +newpath 80 108 moveto +2.13163e-14 108 lineto +7.10543e-15 72 lineto +80 72 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +8 85.9 moveto 64 (GHENSEL) alignedtext +grestore +% PFECAT +gsave +[ /Rect [ 7 0 73 36 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=PFECAT) >> + /Subtype /Link +/ANN pdfmark +0.606 0.733 1.000 nodecolor +newpath 73 36 moveto +7 36 lineto +7 1.06581e-14 lineto +73 0 lineto +closepath fill +1 setlinewidth +filled +0.606 0.733 1.000 nodecolor +newpath 73 36 moveto +7 36 lineto +7 1.06581e-14 lineto +73 0 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +14.5 13.9 moveto 51 (PFECAT) alignedtext +grestore +% GHENSEL->PFECAT +gsave +1 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 40 72 moveto +40 64 40 55 40 46 curveto +stroke +0.000 0.000 0.000 edgecolor +newpath 43.5001 46 moveto +40 36 lineto +36.5001 46 lineto +closepath fill +1 setlinewidth +solid +0.000 0.000 0.000 edgecolor +newpath 43.5001 46 moveto +40 36 lineto +36.5001 46 lineto +closepath stroke +grestore +endpage +showpage +grestore +%%PageTrailer +%%EndPage: 1 +%%Trailer +%%Pages: 1 +%%BoundingBox: 36 36 124 152 +end +restore +%%EOF diff --git a/books/ps/v104generalpolynomialgcdpackage.ps b/books/ps/v104generalpolynomialgcdpackage.ps new file mode 100644 index 0000000..7d50069 --- /dev/null +++ b/books/ps/v104generalpolynomialgcdpackage.ps @@ -0,0 +1,281 @@ +%!PS-Adobe-2.0 +%%Creator: Graphviz version 2.16.1 (Mon Jul 7 18:20:33 UTC 2008) +%%For: (root) root +%%Title: pic +%%Pages: (atend) +%%BoundingBox: (atend) +%%EndComments +save +%%BeginProlog +/DotDict 200 dict def +DotDict begin + +/setupLatin1 { +mark +/EncodingVector 256 array def + EncodingVector 0 + +ISOLatin1Encoding 0 255 getinterval putinterval +EncodingVector 45 /hyphen put + +% Set up ISO Latin 1 character encoding +/starnetISO { + dup dup findfont dup length dict begin + { 1 index /FID ne { def }{ pop pop } ifelse + } forall + /Encoding EncodingVector def + currentdict end definefont +} def +/Times-Roman starnetISO def +/Times-Italic starnetISO def +/Times-Bold starnetISO def +/Times-BoldItalic starnetISO def +/Helvetica starnetISO def +/Helvetica-Oblique starnetISO def +/Helvetica-Bold starnetISO def +/Helvetica-BoldOblique starnetISO def +/Courier starnetISO def +/Courier-Oblique starnetISO def +/Courier-Bold starnetISO def +/Courier-BoldOblique starnetISO def +cleartomark +} bind def + +%%BeginResource: procset graphviz 0 0 +/coord-font-family /Times-Roman def +/default-font-family /Times-Roman def +/coordfont coord-font-family findfont 8 scalefont def + +/InvScaleFactor 1.0 def +/set_scale { + dup 1 exch div /InvScaleFactor exch def + scale +} bind def + +% styles +/solid { [] 0 setdash } bind def +/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def +/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def +/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def +/bold { 2 setlinewidth } bind def +/filled { } bind def +/unfilled { } bind def +/rounded { } bind def +/diagonals { } bind def + +% hooks for setting color +/nodecolor { sethsbcolor } bind def +/edgecolor { sethsbcolor } bind def +/graphcolor { sethsbcolor } bind def +/nopcolor {pop pop pop} bind def + +/beginpage { % i j npages + /npages exch def + /j exch def + /i exch def + /str 10 string def + npages 1 gt { + gsave + coordfont setfont + 0 0 moveto + (\() show i str cvs show (,) show j str cvs show (\)) show + grestore + } if +} bind def + +/set_font { + findfont exch + scalefont setfont +} def + +% draw text fitted to its expected width +/alignedtext { % width text + /text exch def + /width exch def + gsave + width 0 gt { + [] 0 setdash + text stringwidth pop width exch sub text length div 0 text ashow + } if + grestore +} def + +/boxprim { % xcorner ycorner xsize ysize + 4 2 roll + moveto + 2 copy + exch 0 rlineto + 0 exch rlineto + pop neg 0 rlineto + closepath +} bind def + +/ellipse_path { + /ry exch def + /rx exch def + /y exch def + /x exch def + matrix currentmatrix + newpath + x y translate + rx ry scale + 0 0 1 0 360 arc + setmatrix +} bind def + +/endpage { showpage } bind def +/showpage { } def + +/layercolorseq + [ % layer color sequence - darkest to lightest + [0 0 0] + [.2 .8 .8] + [.4 .8 .8] + [.6 .8 .8] + [.8 .8 .8] + ] +def + +/layerlen layercolorseq length def + +/setlayer {/maxlayer exch def /curlayer exch def + layercolorseq curlayer 1 sub layerlen mod get + aload pop sethsbcolor + /nodecolor {nopcolor} def + /edgecolor {nopcolor} def + /graphcolor {nopcolor} def +} bind def + +/onlayer { curlayer ne {invis} if } def + +/onlayers { + /myupper exch def + /mylower exch def + curlayer mylower lt + curlayer myupper gt + or + {invis} if +} def + +/curlayer 0 def + +%%EndResource +%%EndProlog +%%BeginSetup +14 default-font-family set_font +1 setmiterlimit +% /arrowlength 10 def +% /arrowwidth 5 def + +% make sure pdfmark is harmless for PS-interpreters other than Distiller +/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse +% make '<<' and '>>' safe on PS Level 1 devices +/languagelevel where {pop languagelevel}{1} ifelse +2 lt { + userdict (<<) cvn ([) cvn load put + userdict (>>) cvn ([) cvn load put +} if + +%%EndSetup +setupLatin1 +%%Page: 1 1 +%%PageBoundingBox: 36 36 126 152 +%%PageOrientation: Portrait +0 0 1 beginpage +gsave +36 36 90 116 boxprim clip newpath +1 1 set_scale 0 rotate 40 40 translate +0.167 0.600 1.000 graphcolor +newpath -4 -4 moveto +-4 716 lineto +536 716 lineto +536 -4 lineto +closepath fill +1 setlinewidth +0.167 0.600 1.000 graphcolor +newpath -4 -4 moveto +-4 716 lineto +536 716 lineto +536 -4 lineto +closepath stroke +% GENPGCD +gsave +[ /Rect [ 0 72 82 108 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=GENPGCD) >> + /Subtype /Link +/ANN pdfmark +0.939 0.733 1.000 nodecolor +newpath 82 108 moveto +2.96881e-14 108 lineto +8.62851e-15 72 lineto +82 72 lineto +closepath fill +1 setlinewidth +filled +0.939 0.733 1.000 nodecolor +newpath 82 108 moveto +2.96881e-14 108 lineto +8.62851e-15 72 lineto +82 72 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +7.5 85.9 moveto 67 (GENPGCD) alignedtext +grestore +% PFECAT +gsave +[ /Rect [ 8 0 74 36 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=PFECAT) >> + /Subtype /Link +/ANN pdfmark +0.606 0.733 1.000 nodecolor +newpath 74 36 moveto +8 36 lineto +8 1.06581e-14 lineto +74 0 lineto +closepath fill +1 setlinewidth +filled +0.606 0.733 1.000 nodecolor +newpath 74 36 moveto +8 36 lineto +8 1.06581e-14 lineto +74 0 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +15.5 13.9 moveto 51 (PFECAT) alignedtext +grestore +% GENPGCD->PFECAT +gsave +1 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 41 72 moveto +41 64 41 55 41 46 curveto +stroke +0.000 0.000 0.000 edgecolor +newpath 44.5001 46 moveto +41 36 lineto +37.5001 46 lineto +closepath fill +1 setlinewidth +solid +0.000 0.000 0.000 edgecolor +newpath 44.5001 46 moveto +41 36 lineto +37.5001 46 lineto +closepath stroke +grestore +endpage +showpage +grestore +%%PageTrailer +%%EndPage: 1 +%%Trailer +%%Pages: 1 +%%BoundingBox: 36 36 126 152 +end +restore +%%EOF diff --git a/books/ps/v104generateunivariatepowerseries.ps b/books/ps/v104generateunivariatepowerseries.ps new file mode 100644 index 0000000..0732323 --- /dev/null +++ b/books/ps/v104generateunivariatepowerseries.ps @@ -0,0 +1,326 @@ +%!PS-Adobe-2.0 +%%Creator: Graphviz version 2.16.1 (Mon Jul 7 18:20:33 UTC 2008) +%%For: (root) root +%%Title: pic +%%Pages: (atend) +%%BoundingBox: (atend) +%%EndComments +save +%%BeginProlog +/DotDict 200 dict def +DotDict begin + +/setupLatin1 { +mark +/EncodingVector 256 array def + EncodingVector 0 + +ISOLatin1Encoding 0 255 getinterval putinterval +EncodingVector 45 /hyphen put + +% Set up ISO Latin 1 character encoding +/starnetISO { + dup dup findfont dup length dict begin + { 1 index /FID ne { def }{ pop pop } ifelse + } forall + /Encoding EncodingVector def + currentdict end definefont +} def +/Times-Roman starnetISO def +/Times-Italic starnetISO def +/Times-Bold starnetISO def +/Times-BoldItalic starnetISO def +/Helvetica starnetISO def +/Helvetica-Oblique starnetISO def +/Helvetica-Bold starnetISO def +/Helvetica-BoldOblique starnetISO def +/Courier starnetISO def +/Courier-Oblique starnetISO def +/Courier-Bold starnetISO def +/Courier-BoldOblique starnetISO def +cleartomark +} bind def + +%%BeginResource: procset graphviz 0 0 +/coord-font-family /Times-Roman def +/default-font-family /Times-Roman def +/coordfont coord-font-family findfont 8 scalefont def + +/InvScaleFactor 1.0 def +/set_scale { + dup 1 exch div /InvScaleFactor exch def + scale +} bind def + +% styles +/solid { [] 0 setdash } bind def +/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def +/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def +/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def +/bold { 2 setlinewidth } bind def +/filled { } bind def +/unfilled { } bind def +/rounded { } bind def +/diagonals { } bind def + +% hooks for setting color +/nodecolor { sethsbcolor } bind def +/edgecolor { sethsbcolor } bind def +/graphcolor { sethsbcolor } bind def +/nopcolor {pop pop pop} bind def + +/beginpage { % i j npages + /npages exch def + /j exch def + /i exch def + /str 10 string def + npages 1 gt { + gsave + coordfont setfont + 0 0 moveto + (\() show i str cvs show (,) show j str cvs show (\)) show + grestore + } if +} bind def + +/set_font { + findfont exch + scalefont setfont +} def + +% draw text fitted to its expected width +/alignedtext { % width text + /text exch def + /width exch def + gsave + width 0 gt { + [] 0 setdash + text stringwidth pop width exch sub text length div 0 text ashow + } if + grestore +} def + +/boxprim { % xcorner ycorner xsize ysize + 4 2 roll + moveto + 2 copy + exch 0 rlineto + 0 exch rlineto + pop neg 0 rlineto + closepath +} bind def + +/ellipse_path { + /ry exch def + /rx exch def + /y exch def + /x exch def + matrix currentmatrix + newpath + x y translate + rx ry scale + 0 0 1 0 360 arc + setmatrix +} bind def + +/endpage { showpage } bind def +/showpage { } def + +/layercolorseq + [ % layer color sequence - darkest to lightest + [0 0 0] + [.2 .8 .8] + [.4 .8 .8] + [.6 .8 .8] + [.8 .8 .8] + ] +def + +/layerlen layercolorseq length def + +/setlayer {/maxlayer exch def /curlayer exch def + layercolorseq curlayer 1 sub layerlen mod get + aload pop sethsbcolor + /nodecolor {nopcolor} def + /edgecolor {nopcolor} def + /graphcolor {nopcolor} def +} bind def + +/onlayer { curlayer ne {invis} if } def + +/onlayers { + /myupper exch def + /mylower exch def + curlayer mylower lt + curlayer myupper gt + or + {invis} if +} def + +/curlayer 0 def + +%%EndResource +%%EndProlog +%%BeginSetup +14 default-font-family set_font +1 setmiterlimit +% /arrowlength 10 def +% /arrowwidth 5 def + +% make sure pdfmark is harmless for PS-interpreters other than Distiller +/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse +% make '<<' and '>>' safe on PS Level 1 devices +/languagelevel where {pop languagelevel}{1} ifelse +2 lt { + userdict (<<) cvn ([) cvn load put + userdict (>>) cvn ([) cvn load put +} if + +%%EndSetup +setupLatin1 +%%Page: 1 1 +%%PageBoundingBox: 36 36 170 152 +%%PageOrientation: Portrait +0 0 1 beginpage +gsave +36 36 134 116 boxprim clip newpath +1 1 set_scale 0 rotate 40 40 translate +0.167 0.600 1.000 graphcolor +newpath -4 -4 moveto +-4 716 lineto +536 716 lineto +536 -4 lineto +closepath fill +1 setlinewidth +0.167 0.600 1.000 graphcolor +newpath -4 -4 moveto +-4 716 lineto +536 716 lineto +536 -4 lineto +closepath stroke +% GENUPS +gsave +[ /Rect [ 28 72 98 108 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=GENUPS) >> + /Subtype /Link +/ANN pdfmark +0.939 0.733 1.000 nodecolor +newpath 98 108 moveto +28 108 lineto +28 72 lineto +98 72 lineto +closepath fill +1 setlinewidth +filled +0.939 0.733 1.000 nodecolor +newpath 98 108 moveto +28 108 lineto +28 72 lineto +98 72 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +35.5 85.9 moveto 55 (GENUPS) alignedtext +grestore +% ACF +gsave +[ /Rect [ 0 0 54 36 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=ACF) >> + /Subtype /Link +/ANN pdfmark +0.606 0.733 1.000 nodecolor +newpath 54 36 moveto +2.13163e-14 36 lineto +3.55271e-15 1.06581e-14 lineto +54 0 lineto +closepath fill +1 setlinewidth +filled +0.606 0.733 1.000 nodecolor +newpath 54 36 moveto +2.13163e-14 36 lineto +3.55271e-15 1.06581e-14 lineto +54 0 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +13.5 13.9 moveto 27 (ACF) alignedtext +grestore +% GENUPS->ACF +gsave +1 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 54 72 moveto +50 64 45 54 40 45 curveto +stroke +0.000 0.000 0.000 edgecolor +newpath 43.2598 43.7166 moveto +36 36 lineto +36.8631 46.5596 lineto +closepath fill +1 setlinewidth +solid +0.000 0.000 0.000 edgecolor +newpath 43.2598 43.7166 moveto +36 36 lineto +36.8631 46.5596 lineto +closepath stroke +grestore +% FS +gsave +[ /Rect [ 72 0 126 36 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=FS) >> + /Subtype /Link +/ANN pdfmark +0.606 0.733 1.000 nodecolor +newpath 126 36 moveto +72 36 lineto +72 1.06581e-14 lineto +126 0 lineto +closepath fill +1 setlinewidth +filled +0.606 0.733 1.000 nodecolor +newpath 126 36 moveto +72 36 lineto +72 1.06581e-14 lineto +126 0 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +91.5 13.9 moveto 15 (FS) alignedtext +grestore +% GENUPS->FS +gsave +1 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 72 72 moveto +76 64 81 54 86 45 curveto +stroke +0.000 0.000 0.000 edgecolor +newpath 89.1369 46.5596 moveto +90 36 lineto +82.7402 43.7166 lineto +closepath fill +1 setlinewidth +solid +0.000 0.000 0.000 edgecolor +newpath 89.1369 46.5596 moveto +90 36 lineto +82.7402 43.7166 lineto +closepath stroke +grestore +endpage +showpage +grestore +%%PageTrailer +%%EndPage: 1 +%%Trailer +%%Pages: 1 +%%BoundingBox: 36 36 170 152 +end +restore +%%EOF diff --git a/books/ps/v104genexeuclid.ps b/books/ps/v104genexeuclid.ps new file mode 100644 index 0000000..15582be --- /dev/null +++ b/books/ps/v104genexeuclid.ps @@ -0,0 +1,281 @@ +%!PS-Adobe-2.0 +%%Creator: Graphviz version 2.16.1 (Mon Jul 7 18:20:33 UTC 2008) +%%For: (root) root +%%Title: pic +%%Pages: (atend) +%%BoundingBox: (atend) +%%EndComments +save +%%BeginProlog +/DotDict 200 dict def +DotDict begin + +/setupLatin1 { +mark +/EncodingVector 256 array def + EncodingVector 0 + +ISOLatin1Encoding 0 255 getinterval putinterval +EncodingVector 45 /hyphen put + +% Set up ISO Latin 1 character encoding +/starnetISO { + dup dup findfont dup length dict begin + { 1 index /FID ne { def }{ pop pop } ifelse + } forall + /Encoding EncodingVector def + currentdict end definefont +} def +/Times-Roman starnetISO def +/Times-Italic starnetISO def +/Times-Bold starnetISO def +/Times-BoldItalic starnetISO def +/Helvetica starnetISO def +/Helvetica-Oblique starnetISO def +/Helvetica-Bold starnetISO def +/Helvetica-BoldOblique starnetISO def +/Courier starnetISO def +/Courier-Oblique starnetISO def +/Courier-Bold starnetISO def +/Courier-BoldOblique starnetISO def +cleartomark +} bind def + +%%BeginResource: procset graphviz 0 0 +/coord-font-family /Times-Roman def +/default-font-family /Times-Roman def +/coordfont coord-font-family findfont 8 scalefont def + +/InvScaleFactor 1.0 def +/set_scale { + dup 1 exch div /InvScaleFactor exch def + scale +} bind def + +% styles +/solid { [] 0 setdash } bind def +/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def +/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def +/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def +/bold { 2 setlinewidth } bind def +/filled { } bind def +/unfilled { } bind def +/rounded { } bind def +/diagonals { } bind def + +% hooks for setting color +/nodecolor { sethsbcolor } bind def +/edgecolor { sethsbcolor } bind def +/graphcolor { sethsbcolor } bind def +/nopcolor {pop pop pop} bind def + +/beginpage { % i j npages + /npages exch def + /j exch def + /i exch def + /str 10 string def + npages 1 gt { + gsave + coordfont setfont + 0 0 moveto + (\() show i str cvs show (,) show j str cvs show (\)) show + grestore + } if +} bind def + +/set_font { + findfont exch + scalefont setfont +} def + +% draw text fitted to its expected width +/alignedtext { % width text + /text exch def + /width exch def + gsave + width 0 gt { + [] 0 setdash + text stringwidth pop width exch sub text length div 0 text ashow + } if + grestore +} def + +/boxprim { % xcorner ycorner xsize ysize + 4 2 roll + moveto + 2 copy + exch 0 rlineto + 0 exch rlineto + pop neg 0 rlineto + closepath +} bind def + +/ellipse_path { + /ry exch def + /rx exch def + /y exch def + /x exch def + matrix currentmatrix + newpath + x y translate + rx ry scale + 0 0 1 0 360 arc + setmatrix +} bind def + +/endpage { showpage } bind def +/showpage { } def + +/layercolorseq + [ % layer color sequence - darkest to lightest + [0 0 0] + [.2 .8 .8] + [.4 .8 .8] + [.6 .8 .8] + [.8 .8 .8] + ] +def + +/layerlen layercolorseq length def + +/setlayer {/maxlayer exch def /curlayer exch def + layercolorseq curlayer 1 sub layerlen mod get + aload pop sethsbcolor + /nodecolor {nopcolor} def + /edgecolor {nopcolor} def + /graphcolor {nopcolor} def +} bind def + +/onlayer { curlayer ne {invis} if } def + +/onlayers { + /myupper exch def + /mylower exch def + curlayer mylower lt + curlayer myupper gt + or + {invis} if +} def + +/curlayer 0 def + +%%EndResource +%%EndProlog +%%BeginSetup +14 default-font-family set_font +1 setmiterlimit +% /arrowlength 10 def +% /arrowwidth 5 def + +% make sure pdfmark is harmless for PS-interpreters other than Distiller +/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse +% make '<<' and '>>' safe on PS Level 1 devices +/languagelevel where {pop languagelevel}{1} ifelse +2 lt { + userdict (<<) cvn ([) cvn load put + userdict (>>) cvn ([) cvn load put +} if + +%%EndSetup +setupLatin1 +%%Page: 1 1 +%%PageBoundingBox: 36 36 116 152 +%%PageOrientation: Portrait +0 0 1 beginpage +gsave +36 36 80 116 boxprim clip newpath +1 1 set_scale 0 rotate 40 40 translate +0.167 0.600 1.000 graphcolor +newpath -4 -4 moveto +-4 716 lineto +536 716 lineto +536 -4 lineto +closepath fill +1 setlinewidth +0.167 0.600 1.000 graphcolor +newpath -4 -4 moveto +-4 716 lineto +536 716 lineto +536 -4 lineto +closepath stroke +% GENEEZ +gsave +[ /Rect [ 0 72 72 108 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=GENEEZ) >> + /Subtype /Link +/ANN pdfmark +0.939 0.733 1.000 nodecolor +newpath 72 108 moveto +2.84217e-14 108 lineto +7.10543e-15 72 lineto +72 72 lineto +closepath fill +1 setlinewidth +filled +0.939 0.733 1.000 nodecolor +newpath 72 108 moveto +2.84217e-14 108 lineto +7.10543e-15 72 lineto +72 72 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +8 85.9 moveto 56 (GENEEZ) alignedtext +grestore +% PFECAT +gsave +[ /Rect [ 3 0 69 36 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=PFECAT) >> + /Subtype /Link +/ANN pdfmark +0.606 0.733 1.000 nodecolor +newpath 69 36 moveto +3 36 lineto +3 1.06581e-14 lineto +69 0 lineto +closepath fill +1 setlinewidth +filled +0.606 0.733 1.000 nodecolor +newpath 69 36 moveto +3 36 lineto +3 1.06581e-14 lineto +69 0 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +10.5 13.9 moveto 51 (PFECAT) alignedtext +grestore +% GENEEZ->PFECAT +gsave +1 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 36 72 moveto +36 64 36 55 36 46 curveto +stroke +0.000 0.000 0.000 edgecolor +newpath 39.5001 46 moveto +36 36 lineto +32.5001 46 lineto +closepath fill +1 setlinewidth +solid +0.000 0.000 0.000 edgecolor +newpath 39.5001 46 moveto +36 36 lineto +32.5001 46 lineto +closepath stroke +grestore +endpage +showpage +grestore +%%PageTrailer +%%EndPage: 1 +%%Trailer +%%Pages: 1 +%%BoundingBox: 36 36 116 152 +end +restore +%%EOF diff --git a/books/ps/v104genufactorize.ps b/books/ps/v104genufactorize.ps new file mode 100644 index 0000000..9a74aff --- /dev/null +++ b/books/ps/v104genufactorize.ps @@ -0,0 +1,326 @@ +%!PS-Adobe-2.0 +%%Creator: Graphviz version 2.16.1 (Mon Jul 7 18:20:33 UTC 2008) +%%For: (root) root +%%Title: pic +%%Pages: (atend) +%%BoundingBox: (atend) +%%EndComments +save +%%BeginProlog +/DotDict 200 dict def +DotDict begin + +/setupLatin1 { +mark +/EncodingVector 256 array def + EncodingVector 0 + +ISOLatin1Encoding 0 255 getinterval putinterval +EncodingVector 45 /hyphen put + +% Set up ISO Latin 1 character encoding +/starnetISO { + dup dup findfont dup length dict begin + { 1 index /FID ne { def }{ pop pop } ifelse + } forall + /Encoding EncodingVector def + currentdict end definefont +} def +/Times-Roman starnetISO def +/Times-Italic starnetISO def +/Times-Bold starnetISO def +/Times-BoldItalic starnetISO def +/Helvetica starnetISO def +/Helvetica-Oblique starnetISO def +/Helvetica-Bold starnetISO def +/Helvetica-BoldOblique starnetISO def +/Courier starnetISO def +/Courier-Oblique starnetISO def +/Courier-Bold starnetISO def +/Courier-BoldOblique starnetISO def +cleartomark +} bind def + +%%BeginResource: procset graphviz 0 0 +/coord-font-family /Times-Roman def +/default-font-family /Times-Roman def +/coordfont coord-font-family findfont 8 scalefont def + +/InvScaleFactor 1.0 def +/set_scale { + dup 1 exch div /InvScaleFactor exch def + scale +} bind def + +% styles +/solid { [] 0 setdash } bind def +/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def +/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def +/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def +/bold { 2 setlinewidth } bind def +/filled { } bind def +/unfilled { } bind def +/rounded { } bind def +/diagonals { } bind def + +% hooks for setting color +/nodecolor { sethsbcolor } bind def +/edgecolor { sethsbcolor } bind def +/graphcolor { sethsbcolor } bind def +/nopcolor {pop pop pop} bind def + +/beginpage { % i j npages + /npages exch def + /j exch def + /i exch def + /str 10 string def + npages 1 gt { + gsave + coordfont setfont + 0 0 moveto + (\() show i str cvs show (,) show j str cvs show (\)) show + grestore + } if +} bind def + +/set_font { + findfont exch + scalefont setfont +} def + +% draw text fitted to its expected width +/alignedtext { % width text + /text exch def + /width exch def + gsave + width 0 gt { + [] 0 setdash + text stringwidth pop width exch sub text length div 0 text ashow + } if + grestore +} def + +/boxprim { % xcorner ycorner xsize ysize + 4 2 roll + moveto + 2 copy + exch 0 rlineto + 0 exch rlineto + pop neg 0 rlineto + closepath +} bind def + +/ellipse_path { + /ry exch def + /rx exch def + /y exch def + /x exch def + matrix currentmatrix + newpath + x y translate + rx ry scale + 0 0 1 0 360 arc + setmatrix +} bind def + +/endpage { showpage } bind def +/showpage { } def + +/layercolorseq + [ % layer color sequence - darkest to lightest + [0 0 0] + [.2 .8 .8] + [.4 .8 .8] + [.6 .8 .8] + [.8 .8 .8] + ] +def + +/layerlen layercolorseq length def + +/setlayer {/maxlayer exch def /curlayer exch def + layercolorseq curlayer 1 sub layerlen mod get + aload pop sethsbcolor + /nodecolor {nopcolor} def + /edgecolor {nopcolor} def + /graphcolor {nopcolor} def +} bind def + +/onlayer { curlayer ne {invis} if } def + +/onlayers { + /myupper exch def + /mylower exch def + curlayer mylower lt + curlayer myupper gt + or + {invis} if +} def + +/curlayer 0 def + +%%EndResource +%%EndProlog +%%BeginSetup +14 default-font-family set_font +1 setmiterlimit +% /arrowlength 10 def +% /arrowwidth 5 def + +% make sure pdfmark is harmless for PS-interpreters other than Distiller +/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse +% make '<<' and '>>' safe on PS Level 1 devices +/languagelevel where {pop languagelevel}{1} ifelse +2 lt { + userdict (<<) cvn ([) cvn load put + userdict (>>) cvn ([) cvn load put +} if + +%%EndSetup +setupLatin1 +%%Page: 1 1 +%%PageBoundingBox: 36 36 200 152 +%%PageOrientation: Portrait +0 0 1 beginpage +gsave +36 36 164 116 boxprim clip newpath +1 1 set_scale 0 rotate 40 40 translate +0.167 0.600 1.000 graphcolor +newpath -4 -4 moveto +-4 716 lineto +536 716 lineto +536 -4 lineto +closepath fill +1 setlinewidth +0.167 0.600 1.000 graphcolor +newpath -4 -4 moveto +-4 716 lineto +536 716 lineto +536 -4 lineto +closepath stroke +% GENUFACT +gsave +[ /Rect [ 40 72 130 108 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=GENUFACT) >> + /Subtype /Link +/ANN pdfmark +0.939 0.733 1.000 nodecolor +newpath 130 108 moveto +40 108 lineto +40 72 lineto +130 72 lineto +closepath fill +1 setlinewidth +filled +0.939 0.733 1.000 nodecolor +newpath 130 108 moveto +40 108 lineto +40 72 lineto +130 72 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +47.5 85.9 moveto 75 (GENUFACT) alignedtext +grestore +% COMPCAT +gsave +[ /Rect [ 0 0 84 36 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=COMPCAT) >> + /Subtype /Link +/ANN pdfmark +0.606 0.733 1.000 nodecolor +newpath 84 36 moveto +2.84217e-14 36 lineto +7.10543e-15 1.06581e-14 lineto +84 0 lineto +closepath fill +1 setlinewidth +filled +0.606 0.733 1.000 nodecolor +newpath 84 36 moveto +2.84217e-14 36 lineto +7.10543e-15 1.06581e-14 lineto +84 0 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +8 13.9 moveto 68 (COMPCAT) alignedtext +grestore +% GENUFACT->COMPCAT +gsave +1 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 74 72 moveto +69 64 63 54 58 45 curveto +stroke +0.000 0.000 0.000 edgecolor +newpath 60.916 43.0418 moveto +53 36 lineto +54.7969 46.4414 lineto +closepath fill +1 setlinewidth +solid +0.000 0.000 0.000 edgecolor +newpath 60.916 43.0418 moveto +53 36 lineto +54.7969 46.4414 lineto +closepath stroke +grestore +% ACF +gsave +[ /Rect [ 102 0 156 36 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=ACF) >> + /Subtype /Link +/ANN pdfmark +0.606 0.733 1.000 nodecolor +newpath 156 36 moveto +102 36 lineto +102 1.06581e-14 lineto +156 0 lineto +closepath fill +1 setlinewidth +filled +0.606 0.733 1.000 nodecolor +newpath 156 36 moveto +102 36 lineto +102 1.06581e-14 lineto +156 0 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +115.5 13.9 moveto 27 (ACF) alignedtext +grestore +% GENUFACT->ACF +gsave +1 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 96 72 moveto +101 64 107 54 113 45 curveto +stroke +0.000 0.000 0.000 edgecolor +newpath 116.203 46.4414 moveto +118 36 lineto +110.084 43.0418 lineto +closepath fill +1 setlinewidth +solid +0.000 0.000 0.000 edgecolor +newpath 116.203 46.4414 moveto +118 36 lineto +110.084 43.0418 lineto +closepath stroke +grestore +endpage +showpage +grestore +%%PageTrailer +%%EndPage: 1 +%%Trailer +%%Pages: 1 +%%BoundingBox: 36 36 200 152 +end +restore +%%EOF diff --git a/books/ps/v104graphicsdefaults.ps b/books/ps/v104graphicsdefaults.ps new file mode 100644 index 0000000..3b0bc86 --- /dev/null +++ b/books/ps/v104graphicsdefaults.ps @@ -0,0 +1,276 @@ +%!PS-Adobe-2.0 +%%Creator: Graphviz version 2.16.1 (Mon Jul 7 18:20:33 UTC 2008) +%%For: (root) root +%%Title: pic +%%Pages: (atend) +%%BoundingBox: (atend) +%%EndComments +save +%%BeginProlog +/DotDict 200 dict def +DotDict begin + +/setupLatin1 { +mark +/EncodingVector 256 array def + EncodingVector 0 + +ISOLatin1Encoding 0 255 getinterval putinterval +EncodingVector 45 /hyphen put + +% Set up ISO Latin 1 character encoding +/starnetISO { + dup dup findfont dup length dict begin + { 1 index /FID ne { def }{ pop pop } ifelse + } forall + /Encoding EncodingVector def + currentdict end definefont +} def +/Times-Roman starnetISO def +/Times-Italic starnetISO def +/Times-Bold starnetISO def +/Times-BoldItalic starnetISO def +/Helvetica starnetISO def +/Helvetica-Oblique starnetISO def +/Helvetica-Bold starnetISO def +/Helvetica-BoldOblique starnetISO def +/Courier starnetISO def +/Courier-Oblique starnetISO def +/Courier-Bold starnetISO def +/Courier-BoldOblique starnetISO def +cleartomark +} bind def + +%%BeginResource: procset graphviz 0 0 +/coord-font-family /Times-Roman def +/default-font-family /Times-Roman def +/coordfont coord-font-family findfont 8 scalefont def + +/InvScaleFactor 1.0 def +/set_scale { + dup 1 exch div /InvScaleFactor exch def + scale +} bind def + +% styles +/solid { [] 0 setdash } bind def +/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def +/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def +/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def +/bold { 2 setlinewidth } bind def +/filled { } bind def +/unfilled { } bind def +/rounded { } bind def +/diagonals { } bind def + +% hooks for setting color +/nodecolor { sethsbcolor } bind def +/edgecolor { sethsbcolor } bind def +/graphcolor { sethsbcolor } bind def +/nopcolor {pop pop pop} bind def + +/beginpage { % i j npages + /npages exch def + /j exch def + /i exch def + /str 10 string def + npages 1 gt { + gsave + coordfont setfont + 0 0 moveto + (\() show i str cvs show (,) show j str cvs show (\)) show + grestore + } if +} bind def + +/set_font { + findfont exch + scalefont setfont +} def + +% draw text fitted to its expected width +/alignedtext { % width text + /text exch def + /width exch def + gsave + width 0 gt { + [] 0 setdash + text stringwidth pop width exch sub text length div 0 text ashow + } if + grestore +} def + +/boxprim { % xcorner ycorner xsize ysize + 4 2 roll + moveto + 2 copy + exch 0 rlineto + 0 exch rlineto + pop neg 0 rlineto + closepath +} bind def + +/ellipse_path { + /ry exch def + /rx exch def + /y exch def + /x exch def + matrix currentmatrix + newpath + x y translate + rx ry scale + 0 0 1 0 360 arc + setmatrix +} bind def + +/endpage { showpage } bind def +/showpage { } def + +/layercolorseq + [ % layer color sequence - darkest to lightest + [0 0 0] + [.2 .8 .8] + [.4 .8 .8] + [.6 .8 .8] + [.8 .8 .8] + ] +def + +/layerlen layercolorseq length def + +/setlayer {/maxlayer exch def /curlayer exch def + layercolorseq curlayer 1 sub layerlen mod get + aload pop sethsbcolor + /nodecolor {nopcolor} def + /edgecolor {nopcolor} def + /graphcolor {nopcolor} def +} bind def + +/onlayer { curlayer ne {invis} if } def + +/onlayers { + /myupper exch def + /mylower exch def + curlayer mylower lt + curlayer myupper gt + or + {invis} if +} def + +/curlayer 0 def + +%%EndResource +%%EndProlog +%%BeginSetup +14 default-font-family set_font +1 setmiterlimit +% /arrowlength 10 def +% /arrowwidth 5 def + +% make sure pdfmark is harmless for PS-interpreters other than Distiller +/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse +% make '<<' and '>>' safe on PS Level 1 devices +/languagelevel where {pop languagelevel}{1} ifelse +2 lt { + userdict (<<) cvn ([) cvn load put + userdict (>>) cvn ([) cvn load put +} if + +%%EndSetup +setupLatin1 +%%Page: 1 1 +%%PageBoundingBox: 36 36 110 152 +%%PageOrientation: Portrait +0 0 1 beginpage +gsave +36 36 74 116 boxprim clip newpath +1 1 set_scale 0 rotate 40 40 translate +0.167 0.600 1.000 graphcolor +newpath -4 -4 moveto +-4 716 lineto +536 716 lineto +536 -4 lineto +closepath fill +1 setlinewidth +0.167 0.600 1.000 graphcolor +newpath -4 -4 moveto +-4 716 lineto +536 716 lineto +536 -4 lineto +closepath stroke +% GRDEF +gsave +[ /Rect [ 2 72 64 108 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=GRDEF) >> + /Subtype /Link +/ANN pdfmark +0.939 0.733 1.000 nodecolor +newpath 64 108 moveto +2 108 lineto +2 72 lineto +64 72 lineto +closepath fill +1 setlinewidth +filled +0.939 0.733 1.000 nodecolor +newpath 64 108 moveto +2 108 lineto +2 72 lineto +64 72 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +10 85.9 moveto 46 (GRDEF) alignedtext +grestore +% Package +gsave +0.939 0.733 1.000 nodecolor +newpath 66 36 moveto +2.13163e-14 36 lineto +0 1.06581e-14 lineto +66 0 lineto +closepath fill +1 setlinewidth +filled +0.939 0.733 1.000 nodecolor +newpath 66 36 moveto +2.13163e-14 36 lineto +0 1.06581e-14 lineto +66 0 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +8 13.9 moveto 50 (Package) alignedtext +grestore +% GRDEF->Package +gsave +1 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 33 72 moveto +33 64 33 55 33 46 curveto +stroke +0.000 0.000 0.000 edgecolor +newpath 36.5001 46 moveto +33 36 lineto +29.5001 46 lineto +closepath fill +1 setlinewidth +solid +0.000 0.000 0.000 edgecolor +newpath 36.5001 46 moveto +33 36 lineto +29.5001 46 lineto +closepath stroke +grestore +endpage +showpage +grestore +%%PageTrailer +%%EndPage: 1 +%%Trailer +%%Pages: 1 +%%BoundingBox: 36 36 110 152 +end +restore +%%EOF diff --git a/books/ps/v104groebnerfactorizationpackage.ps b/books/ps/v104groebnerfactorizationpackage.ps new file mode 100644 index 0000000..cc2d75d --- /dev/null +++ b/books/ps/v104groebnerfactorizationpackage.ps @@ -0,0 +1,281 @@ +%!PS-Adobe-2.0 +%%Creator: Graphviz version 2.16.1 (Mon Jul 7 18:20:33 UTC 2008) +%%For: (root) root +%%Title: pic +%%Pages: (atend) +%%BoundingBox: (atend) +%%EndComments +save +%%BeginProlog +/DotDict 200 dict def +DotDict begin + +/setupLatin1 { +mark +/EncodingVector 256 array def + EncodingVector 0 + +ISOLatin1Encoding 0 255 getinterval putinterval +EncodingVector 45 /hyphen put + +% Set up ISO Latin 1 character encoding +/starnetISO { + dup dup findfont dup length dict begin + { 1 index /FID ne { def }{ pop pop } ifelse + } forall + /Encoding EncodingVector def + currentdict end definefont +} def +/Times-Roman starnetISO def +/Times-Italic starnetISO def +/Times-Bold starnetISO def +/Times-BoldItalic starnetISO def +/Helvetica starnetISO def +/Helvetica-Oblique starnetISO def +/Helvetica-Bold starnetISO def +/Helvetica-BoldOblique starnetISO def +/Courier starnetISO def +/Courier-Oblique starnetISO def +/Courier-Bold starnetISO def +/Courier-BoldOblique starnetISO def +cleartomark +} bind def + +%%BeginResource: procset graphviz 0 0 +/coord-font-family /Times-Roman def +/default-font-family /Times-Roman def +/coordfont coord-font-family findfont 8 scalefont def + +/InvScaleFactor 1.0 def +/set_scale { + dup 1 exch div /InvScaleFactor exch def + scale +} bind def + +% styles +/solid { [] 0 setdash } bind def +/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def +/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def +/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def +/bold { 2 setlinewidth } bind def +/filled { } bind def +/unfilled { } bind def +/rounded { } bind def +/diagonals { } bind def + +% hooks for setting color +/nodecolor { sethsbcolor } bind def +/edgecolor { sethsbcolor } bind def +/graphcolor { sethsbcolor } bind def +/nopcolor {pop pop pop} bind def + +/beginpage { % i j npages + /npages exch def + /j exch def + /i exch def + /str 10 string def + npages 1 gt { + gsave + coordfont setfont + 0 0 moveto + (\() show i str cvs show (,) show j str cvs show (\)) show + grestore + } if +} bind def + +/set_font { + findfont exch + scalefont setfont +} def + +% draw text fitted to its expected width +/alignedtext { % width text + /text exch def + /width exch def + gsave + width 0 gt { + [] 0 setdash + text stringwidth pop width exch sub text length div 0 text ashow + } if + grestore +} def + +/boxprim { % xcorner ycorner xsize ysize + 4 2 roll + moveto + 2 copy + exch 0 rlineto + 0 exch rlineto + pop neg 0 rlineto + closepath +} bind def + +/ellipse_path { + /ry exch def + /rx exch def + /y exch def + /x exch def + matrix currentmatrix + newpath + x y translate + rx ry scale + 0 0 1 0 360 arc + setmatrix +} bind def + +/endpage { showpage } bind def +/showpage { } def + +/layercolorseq + [ % layer color sequence - darkest to lightest + [0 0 0] + [.2 .8 .8] + [.4 .8 .8] + [.6 .8 .8] + [.8 .8 .8] + ] +def + +/layerlen layercolorseq length def + +/setlayer {/maxlayer exch def /curlayer exch def + layercolorseq curlayer 1 sub layerlen mod get + aload pop sethsbcolor + /nodecolor {nopcolor} def + /edgecolor {nopcolor} def + /graphcolor {nopcolor} def +} bind def + +/onlayer { curlayer ne {invis} if } def + +/onlayers { + /myupper exch def + /mylower exch def + curlayer mylower lt + curlayer myupper gt + or + {invis} if +} def + +/curlayer 0 def + +%%EndResource +%%EndProlog +%%BeginSetup +14 default-font-family set_font +1 setmiterlimit +% /arrowlength 10 def +% /arrowwidth 5 def + +% make sure pdfmark is harmless for PS-interpreters other than Distiller +/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse +% make '<<' and '>>' safe on PS Level 1 devices +/languagelevel where {pop languagelevel}{1} ifelse +2 lt { + userdict (<<) cvn ([) cvn load put + userdict (>>) cvn ([) cvn load put +} if + +%%EndSetup +setupLatin1 +%%Page: 1 1 +%%PageBoundingBox: 36 36 110 152 +%%PageOrientation: Portrait +0 0 1 beginpage +gsave +36 36 74 116 boxprim clip newpath +1 1 set_scale 0 rotate 40 40 translate +0.167 0.600 1.000 graphcolor +newpath -4 -4 moveto +-4 716 lineto +536 716 lineto +536 -4 lineto +closepath fill +1 setlinewidth +0.167 0.600 1.000 graphcolor +newpath -4 -4 moveto +-4 716 lineto +536 716 lineto +536 -4 lineto +closepath stroke +% GBF +gsave +[ /Rect [ 6 72 60 108 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=GBF) >> + /Subtype /Link +/ANN pdfmark +0.939 0.733 1.000 nodecolor +newpath 60 108 moveto +6 108 lineto +6 72 lineto +60 72 lineto +closepath fill +1 setlinewidth +filled +0.939 0.733 1.000 nodecolor +newpath 60 108 moveto +6 108 lineto +6 72 lineto +60 72 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +19.5 85.9 moveto 27 (GBF) alignedtext +grestore +% PFECAT +gsave +[ /Rect [ 0 0 66 36 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=PFECAT) >> + /Subtype /Link +/ANN pdfmark +0.606 0.733 1.000 nodecolor +newpath 66 36 moveto +2.24404e-14 36 lineto +8.44116e-15 1.06581e-14 lineto +66 0 lineto +closepath fill +1 setlinewidth +filled +0.606 0.733 1.000 nodecolor +newpath 66 36 moveto +2.24404e-14 36 lineto +8.44116e-15 1.06581e-14 lineto +66 0 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +7.5 13.9 moveto 51 (PFECAT) alignedtext +grestore +% GBF->PFECAT +gsave +1 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 33 72 moveto +33 64 33 55 33 46 curveto +stroke +0.000 0.000 0.000 edgecolor +newpath 36.5001 46 moveto +33 36 lineto +29.5001 46 lineto +closepath fill +1 setlinewidth +solid +0.000 0.000 0.000 edgecolor +newpath 36.5001 46 moveto +33 36 lineto +29.5001 46 lineto +closepath stroke +grestore +endpage +showpage +grestore +%%PageTrailer +%%EndPage: 1 +%%Trailer +%%Pages: 1 +%%BoundingBox: 36 36 110 152 +end +restore +%%EOF diff --git a/books/ps/v104groebnerinternalpackage.ps b/books/ps/v104groebnerinternalpackage.ps new file mode 100644 index 0000000..c6033d9 --- /dev/null +++ b/books/ps/v104groebnerinternalpackage.ps @@ -0,0 +1,281 @@ +%!PS-Adobe-2.0 +%%Creator: Graphviz version 2.16.1 (Mon Jul 7 18:20:33 UTC 2008) +%%For: (root) root +%%Title: pic +%%Pages: (atend) +%%BoundingBox: (atend) +%%EndComments +save +%%BeginProlog +/DotDict 200 dict def +DotDict begin + +/setupLatin1 { +mark +/EncodingVector 256 array def + EncodingVector 0 + +ISOLatin1Encoding 0 255 getinterval putinterval +EncodingVector 45 /hyphen put + +% Set up ISO Latin 1 character encoding +/starnetISO { + dup dup findfont dup length dict begin + { 1 index /FID ne { def }{ pop pop } ifelse + } forall + /Encoding EncodingVector def + currentdict end definefont +} def +/Times-Roman starnetISO def +/Times-Italic starnetISO def +/Times-Bold starnetISO def +/Times-BoldItalic starnetISO def +/Helvetica starnetISO def +/Helvetica-Oblique starnetISO def +/Helvetica-Bold starnetISO def +/Helvetica-BoldOblique starnetISO def +/Courier starnetISO def +/Courier-Oblique starnetISO def +/Courier-Bold starnetISO def +/Courier-BoldOblique starnetISO def +cleartomark +} bind def + +%%BeginResource: procset graphviz 0 0 +/coord-font-family /Times-Roman def +/default-font-family /Times-Roman def +/coordfont coord-font-family findfont 8 scalefont def + +/InvScaleFactor 1.0 def +/set_scale { + dup 1 exch div /InvScaleFactor exch def + scale +} bind def + +% styles +/solid { [] 0 setdash } bind def +/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def +/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def +/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def +/bold { 2 setlinewidth } bind def +/filled { } bind def +/unfilled { } bind def +/rounded { } bind def +/diagonals { } bind def + +% hooks for setting color +/nodecolor { sethsbcolor } bind def +/edgecolor { sethsbcolor } bind def +/graphcolor { sethsbcolor } bind def +/nopcolor {pop pop pop} bind def + +/beginpage { % i j npages + /npages exch def + /j exch def + /i exch def + /str 10 string def + npages 1 gt { + gsave + coordfont setfont + 0 0 moveto + (\() show i str cvs show (,) show j str cvs show (\)) show + grestore + } if +} bind def + +/set_font { + findfont exch + scalefont setfont +} def + +% draw text fitted to its expected width +/alignedtext { % width text + /text exch def + /width exch def + gsave + width 0 gt { + [] 0 setdash + text stringwidth pop width exch sub text length div 0 text ashow + } if + grestore +} def + +/boxprim { % xcorner ycorner xsize ysize + 4 2 roll + moveto + 2 copy + exch 0 rlineto + 0 exch rlineto + pop neg 0 rlineto + closepath +} bind def + +/ellipse_path { + /ry exch def + /rx exch def + /y exch def + /x exch def + matrix currentmatrix + newpath + x y translate + rx ry scale + 0 0 1 0 360 arc + setmatrix +} bind def + +/endpage { showpage } bind def +/showpage { } def + +/layercolorseq + [ % layer color sequence - darkest to lightest + [0 0 0] + [.2 .8 .8] + [.4 .8 .8] + [.6 .8 .8] + [.8 .8 .8] + ] +def + +/layerlen layercolorseq length def + +/setlayer {/maxlayer exch def /curlayer exch def + layercolorseq curlayer 1 sub layerlen mod get + aload pop sethsbcolor + /nodecolor {nopcolor} def + /edgecolor {nopcolor} def + /graphcolor {nopcolor} def +} bind def + +/onlayer { curlayer ne {invis} if } def + +/onlayers { + /myupper exch def + /mylower exch def + curlayer mylower lt + curlayer myupper gt + or + {invis} if +} def + +/curlayer 0 def + +%%EndResource +%%EndProlog +%%BeginSetup +14 default-font-family set_font +1 setmiterlimit +% /arrowlength 10 def +% /arrowwidth 5 def + +% make sure pdfmark is harmless for PS-interpreters other than Distiller +/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse +% make '<<' and '>>' safe on PS Level 1 devices +/languagelevel where {pop languagelevel}{1} ifelse +2 lt { + userdict (<<) cvn ([) cvn load put + userdict (>>) cvn ([) cvn load put +} if + +%%EndSetup +setupLatin1 +%%Page: 1 1 +%%PageBoundingBox: 36 36 130 152 +%%PageOrientation: Portrait +0 0 1 beginpage +gsave +36 36 94 116 boxprim clip newpath +1 1 set_scale 0 rotate 40 40 translate +0.167 0.600 1.000 graphcolor +newpath -4 -4 moveto +-4 716 lineto +536 716 lineto +536 -4 lineto +closepath fill +1 setlinewidth +0.167 0.600 1.000 graphcolor +newpath -4 -4 moveto +-4 716 lineto +536 716 lineto +536 -4 lineto +closepath stroke +% GBINTERN +gsave +[ /Rect [ 0 72 86 108 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=GBINTERN) >> + /Subtype /Link +/ANN pdfmark +0.939 0.733 1.000 nodecolor +newpath 86 108 moveto +2.7485e-14 108 lineto +6.41154e-15 72 lineto +86 72 lineto +closepath fill +1 setlinewidth +filled +0.939 0.733 1.000 nodecolor +newpath 86 108 moveto +2.7485e-14 108 lineto +6.41154e-15 72 lineto +86 72 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +7.5 85.9 moveto 71 (GBINTERN) alignedtext +grestore +% PFECAT +gsave +[ /Rect [ 10 0 76 36 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=PFECAT) >> + /Subtype /Link +/ANN pdfmark +0.606 0.733 1.000 nodecolor +newpath 76 36 moveto +10 36 lineto +10 1.06581e-14 lineto +76 0 lineto +closepath fill +1 setlinewidth +filled +0.606 0.733 1.000 nodecolor +newpath 76 36 moveto +10 36 lineto +10 1.06581e-14 lineto +76 0 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +17.5 13.9 moveto 51 (PFECAT) alignedtext +grestore +% GBINTERN->PFECAT +gsave +1 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 43 72 moveto +43 64 43 55 43 46 curveto +stroke +0.000 0.000 0.000 edgecolor +newpath 46.5001 46 moveto +43 36 lineto +39.5001 46 lineto +closepath fill +1 setlinewidth +solid +0.000 0.000 0.000 edgecolor +newpath 46.5001 46 moveto +43 36 lineto +39.5001 46 lineto +closepath stroke +grestore +endpage +showpage +grestore +%%PageTrailer +%%EndPage: 1 +%%Trailer +%%Pages: 1 +%%BoundingBox: 36 36 130 152 +end +restore +%%EOF diff --git a/books/ps/v104groebnerpackage.ps b/books/ps/v104groebnerpackage.ps new file mode 100644 index 0000000..35afd03 --- /dev/null +++ b/books/ps/v104groebnerpackage.ps @@ -0,0 +1,326 @@ +%!PS-Adobe-2.0 +%%Creator: Graphviz version 2.16.1 (Mon Jul 7 18:20:33 UTC 2008) +%%For: (root) root +%%Title: pic +%%Pages: (atend) +%%BoundingBox: (atend) +%%EndComments +save +%%BeginProlog +/DotDict 200 dict def +DotDict begin + +/setupLatin1 { +mark +/EncodingVector 256 array def + EncodingVector 0 + +ISOLatin1Encoding 0 255 getinterval putinterval +EncodingVector 45 /hyphen put + +% Set up ISO Latin 1 character encoding +/starnetISO { + dup dup findfont dup length dict begin + { 1 index /FID ne { def }{ pop pop } ifelse + } forall + /Encoding EncodingVector def + currentdict end definefont +} def +/Times-Roman starnetISO def +/Times-Italic starnetISO def +/Times-Bold starnetISO def +/Times-BoldItalic starnetISO def +/Helvetica starnetISO def +/Helvetica-Oblique starnetISO def +/Helvetica-Bold starnetISO def +/Helvetica-BoldOblique starnetISO def +/Courier starnetISO def +/Courier-Oblique starnetISO def +/Courier-Bold starnetISO def +/Courier-BoldOblique starnetISO def +cleartomark +} bind def + +%%BeginResource: procset graphviz 0 0 +/coord-font-family /Times-Roman def +/default-font-family /Times-Roman def +/coordfont coord-font-family findfont 8 scalefont def + +/InvScaleFactor 1.0 def +/set_scale { + dup 1 exch div /InvScaleFactor exch def + scale +} bind def + +% styles +/solid { [] 0 setdash } bind def +/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def +/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def +/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def +/bold { 2 setlinewidth } bind def +/filled { } bind def +/unfilled { } bind def +/rounded { } bind def +/diagonals { } bind def + +% hooks for setting color +/nodecolor { sethsbcolor } bind def +/edgecolor { sethsbcolor } bind def +/graphcolor { sethsbcolor } bind def +/nopcolor {pop pop pop} bind def + +/beginpage { % i j npages + /npages exch def + /j exch def + /i exch def + /str 10 string def + npages 1 gt { + gsave + coordfont setfont + 0 0 moveto + (\() show i str cvs show (,) show j str cvs show (\)) show + grestore + } if +} bind def + +/set_font { + findfont exch + scalefont setfont +} def + +% draw text fitted to its expected width +/alignedtext { % width text + /text exch def + /width exch def + gsave + width 0 gt { + [] 0 setdash + text stringwidth pop width exch sub text length div 0 text ashow + } if + grestore +} def + +/boxprim { % xcorner ycorner xsize ysize + 4 2 roll + moveto + 2 copy + exch 0 rlineto + 0 exch rlineto + pop neg 0 rlineto + closepath +} bind def + +/ellipse_path { + /ry exch def + /rx exch def + /y exch def + /x exch def + matrix currentmatrix + newpath + x y translate + rx ry scale + 0 0 1 0 360 arc + setmatrix +} bind def + +/endpage { showpage } bind def +/showpage { } def + +/layercolorseq + [ % layer color sequence - darkest to lightest + [0 0 0] + [.2 .8 .8] + [.4 .8 .8] + [.6 .8 .8] + [.8 .8 .8] + ] +def + +/layerlen layercolorseq length def + +/setlayer {/maxlayer exch def /curlayer exch def + layercolorseq curlayer 1 sub layerlen mod get + aload pop sethsbcolor + /nodecolor {nopcolor} def + /edgecolor {nopcolor} def + /graphcolor {nopcolor} def +} bind def + +/onlayer { curlayer ne {invis} if } def + +/onlayers { + /myupper exch def + /mylower exch def + curlayer mylower lt + curlayer myupper gt + or + {invis} if +} def + +/curlayer 0 def + +%%EndResource +%%EndProlog +%%BeginSetup +14 default-font-family set_font +1 setmiterlimit +% /arrowlength 10 def +% /arrowwidth 5 def + +% make sure pdfmark is harmless for PS-interpreters other than Distiller +/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse +% make '<<' and '>>' safe on PS Level 1 devices +/languagelevel where {pop languagelevel}{1} ifelse +2 lt { + userdict (<<) cvn ([) cvn load put + userdict (>>) cvn ([) cvn load put +} if + +%%EndSetup +setupLatin1 +%%Page: 1 1 +%%PageBoundingBox: 36 36 194 152 +%%PageOrientation: Portrait +0 0 1 beginpage +gsave +36 36 158 116 boxprim clip newpath +1 1 set_scale 0 rotate 40 40 translate +0.167 0.600 1.000 graphcolor +newpath -4 -4 moveto +-4 716 lineto +536 716 lineto +536 -4 lineto +closepath fill +1 setlinewidth +0.167 0.600 1.000 graphcolor +newpath -4 -4 moveto +-4 716 lineto +536 716 lineto +536 -4 lineto +closepath stroke +% GB +gsave +[ /Rect [ 48 72 102 108 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=GB) >> + /Subtype /Link +/ANN pdfmark +0.939 0.733 1.000 nodecolor +newpath 102 108 moveto +48 108 lineto +48 72 lineto +102 72 lineto +closepath fill +1 setlinewidth +filled +0.939 0.733 1.000 nodecolor +newpath 102 108 moveto +48 108 lineto +48 72 lineto +102 72 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +65 85.9 moveto 20 (GB) alignedtext +grestore +% PFECAT +gsave +[ /Rect [ 0 0 66 36 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=PFECAT) >> + /Subtype /Link +/ANN pdfmark +0.606 0.733 1.000 nodecolor +newpath 66 36 moveto +2.24404e-14 36 lineto +8.44116e-15 1.06581e-14 lineto +66 0 lineto +closepath fill +1 setlinewidth +filled +0.606 0.733 1.000 nodecolor +newpath 66 36 moveto +2.24404e-14 36 lineto +8.44116e-15 1.06581e-14 lineto +66 0 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +7.5 13.9 moveto 51 (PFECAT) alignedtext +grestore +% GB->PFECAT +gsave +1 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 64 72 moveto +59 64 54 54 48 45 curveto +stroke +0.000 0.000 0.000 edgecolor +newpath 50.916 43.0418 moveto +43 36 lineto +44.7969 46.4414 lineto +closepath fill +1 setlinewidth +solid +0.000 0.000 0.000 edgecolor +newpath 50.916 43.0418 moveto +43 36 lineto +44.7969 46.4414 lineto +closepath stroke +grestore +% STRING +gsave +[ /Rect [ 84 0 150 36 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.3.pdf#nameddest=STRING) >> + /Subtype /Link +/ANN pdfmark +0.273 0.733 1.000 nodecolor +newpath 150 36 moveto +84 36 lineto +84 1.06581e-14 lineto +150 0 lineto +closepath fill +1 setlinewidth +filled +0.273 0.733 1.000 nodecolor +newpath 150 36 moveto +84 36 lineto +84 1.06581e-14 lineto +150 0 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +92 13.9 moveto 50 (STRING) alignedtext +grestore +% GB->STRING +gsave +1 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 86 72 moveto +91 64 96 54 102 45 curveto +stroke +0.000 0.000 0.000 edgecolor +newpath 105.203 46.4414 moveto +107 36 lineto +99.084 43.0418 lineto +closepath fill +1 setlinewidth +solid +0.000 0.000 0.000 edgecolor +newpath 105.203 46.4414 moveto +107 36 lineto +99.084 43.0418 lineto +closepath stroke +grestore +endpage +showpage +grestore +%%PageTrailer +%%EndPage: 1 +%%Trailer +%%Pages: 1 +%%BoundingBox: 36 36 194 152 +end +restore +%%EOF diff --git a/books/ps/v104groebnersolve.ps b/books/ps/v104groebnersolve.ps new file mode 100644 index 0000000..6e0b2a7 --- /dev/null +++ b/books/ps/v104groebnersolve.ps @@ -0,0 +1,326 @@ +%!PS-Adobe-2.0 +%%Creator: Graphviz version 2.16.1 (Mon Jul 7 18:20:33 UTC 2008) +%%For: (root) root +%%Title: pic +%%Pages: (atend) +%%BoundingBox: (atend) +%%EndComments +save +%%BeginProlog +/DotDict 200 dict def +DotDict begin + +/setupLatin1 { +mark +/EncodingVector 256 array def + EncodingVector 0 + +ISOLatin1Encoding 0 255 getinterval putinterval +EncodingVector 45 /hyphen put + +% Set up ISO Latin 1 character encoding +/starnetISO { + dup dup findfont dup length dict begin + { 1 index /FID ne { def }{ pop pop } ifelse + } forall + /Encoding EncodingVector def + currentdict end definefont +} def +/Times-Roman starnetISO def +/Times-Italic starnetISO def +/Times-Bold starnetISO def +/Times-BoldItalic starnetISO def +/Helvetica starnetISO def +/Helvetica-Oblique starnetISO def +/Helvetica-Bold starnetISO def +/Helvetica-BoldOblique starnetISO def +/Courier starnetISO def +/Courier-Oblique starnetISO def +/Courier-Bold starnetISO def +/Courier-BoldOblique starnetISO def +cleartomark +} bind def + +%%BeginResource: procset graphviz 0 0 +/coord-font-family /Times-Roman def +/default-font-family /Times-Roman def +/coordfont coord-font-family findfont 8 scalefont def + +/InvScaleFactor 1.0 def +/set_scale { + dup 1 exch div /InvScaleFactor exch def + scale +} bind def + +% styles +/solid { [] 0 setdash } bind def +/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def +/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def +/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def +/bold { 2 setlinewidth } bind def +/filled { } bind def +/unfilled { } bind def +/rounded { } bind def +/diagonals { } bind def + +% hooks for setting color +/nodecolor { sethsbcolor } bind def +/edgecolor { sethsbcolor } bind def +/graphcolor { sethsbcolor } bind def +/nopcolor {pop pop pop} bind def + +/beginpage { % i j npages + /npages exch def + /j exch def + /i exch def + /str 10 string def + npages 1 gt { + gsave + coordfont setfont + 0 0 moveto + (\() show i str cvs show (,) show j str cvs show (\)) show + grestore + } if +} bind def + +/set_font { + findfont exch + scalefont setfont +} def + +% draw text fitted to its expected width +/alignedtext { % width text + /text exch def + /width exch def + gsave + width 0 gt { + [] 0 setdash + text stringwidth pop width exch sub text length div 0 text ashow + } if + grestore +} def + +/boxprim { % xcorner ycorner xsize ysize + 4 2 roll + moveto + 2 copy + exch 0 rlineto + 0 exch rlineto + pop neg 0 rlineto + closepath +} bind def + +/ellipse_path { + /ry exch def + /rx exch def + /y exch def + /x exch def + matrix currentmatrix + newpath + x y translate + rx ry scale + 0 0 1 0 360 arc + setmatrix +} bind def + +/endpage { showpage } bind def +/showpage { } def + +/layercolorseq + [ % layer color sequence - darkest to lightest + [0 0 0] + [.2 .8 .8] + [.4 .8 .8] + [.6 .8 .8] + [.8 .8 .8] + ] +def + +/layerlen layercolorseq length def + +/setlayer {/maxlayer exch def /curlayer exch def + layercolorseq curlayer 1 sub layerlen mod get + aload pop sethsbcolor + /nodecolor {nopcolor} def + /edgecolor {nopcolor} def + /graphcolor {nopcolor} def +} bind def + +/onlayer { curlayer ne {invis} if } def + +/onlayers { + /myupper exch def + /mylower exch def + curlayer mylower lt + curlayer myupper gt + or + {invis} if +} def + +/curlayer 0 def + +%%EndResource +%%EndProlog +%%BeginSetup +14 default-font-family set_font +1 setmiterlimit +% /arrowlength 10 def +% /arrowwidth 5 def + +% make sure pdfmark is harmless for PS-interpreters other than Distiller +/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse +% make '<<' and '>>' safe on PS Level 1 devices +/languagelevel where {pop languagelevel}{1} ifelse +2 lt { + userdict (<<) cvn ([) cvn load put + userdict (>>) cvn ([) cvn load put +} if + +%%EndSetup +setupLatin1 +%%Page: 1 1 +%%PageBoundingBox: 36 36 202 152 +%%PageOrientation: Portrait +0 0 1 beginpage +gsave +36 36 166 116 boxprim clip newpath +1 1 set_scale 0 rotate 40 40 translate +0.167 0.600 1.000 graphcolor +newpath -4 -4 moveto +-4 716 lineto +536 716 lineto +536 -4 lineto +closepath fill +1 setlinewidth +0.167 0.600 1.000 graphcolor +newpath -4 -4 moveto +-4 716 lineto +536 716 lineto +536 -4 lineto +closepath stroke +% GROEBSOL +gsave +[ /Rect [ 32 72 122 108 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=GROEBSOL) >> + /Subtype /Link +/ANN pdfmark +0.939 0.733 1.000 nodecolor +newpath 122 108 moveto +32 108 lineto +32 72 lineto +122 72 lineto +closepath fill +1 setlinewidth +filled +0.939 0.733 1.000 nodecolor +newpath 122 108 moveto +32 108 lineto +32 72 lineto +122 72 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +40 85.9 moveto 74 (GROEBSOL) alignedtext +grestore +% PFECAT +gsave +[ /Rect [ 0 0 66 36 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=PFECAT) >> + /Subtype /Link +/ANN pdfmark +0.606 0.733 1.000 nodecolor +newpath 66 36 moveto +2.24404e-14 36 lineto +8.44116e-15 1.06581e-14 lineto +66 0 lineto +closepath fill +1 setlinewidth +filled +0.606 0.733 1.000 nodecolor +newpath 66 36 moveto +2.24404e-14 36 lineto +8.44116e-15 1.06581e-14 lineto +66 0 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +7.5 13.9 moveto 51 (PFECAT) alignedtext +grestore +% GROEBSOL->PFECAT +gsave +1 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 66 72 moveto +61 64 55 54 49 45 curveto +stroke +0.000 0.000 0.000 edgecolor +newpath 51.916 43.0418 moveto +44 36 lineto +45.7969 46.4414 lineto +closepath fill +1 setlinewidth +solid +0.000 0.000 0.000 edgecolor +newpath 51.916 43.0418 moveto +44 36 lineto +45.7969 46.4414 lineto +closepath stroke +grestore +% DIRPCAT +gsave +[ /Rect [ 84 0 158 36 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=DIRPCAT) >> + /Subtype /Link +/ANN pdfmark +0.606 0.733 1.000 nodecolor +newpath 158 36 moveto +84 36 lineto +84 1.06581e-14 lineto +158 0 lineto +closepath fill +1 setlinewidth +filled +0.606 0.733 1.000 nodecolor +newpath 158 36 moveto +84 36 lineto +84 1.06581e-14 lineto +158 0 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +92 13.9 moveto 58 (DIRPCAT) alignedtext +grestore +% GROEBSOL->DIRPCAT +gsave +1 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 88 72 moveto +93 64 99 54 105 45 curveto +stroke +0.000 0.000 0.000 edgecolor +newpath 108.203 46.4414 moveto +110 36 lineto +102.084 43.0418 lineto +closepath fill +1 setlinewidth +solid +0.000 0.000 0.000 edgecolor +newpath 108.203 46.4414 moveto +110 36 lineto +102.084 43.0418 lineto +closepath stroke +grestore +endpage +showpage +grestore +%%PageTrailer +%%EndPage: 1 +%%Trailer +%%Pages: 1 +%%BoundingBox: 36 36 202 152 +end +restore +%%EOF diff --git a/books/ps/v104orderingfunctions.ps b/books/ps/v104orderingfunctions.ps new file mode 100644 index 0000000..feef5e1 --- /dev/null +++ b/books/ps/v104orderingfunctions.ps @@ -0,0 +1,281 @@ +%!PS-Adobe-2.0 +%%Creator: Graphviz version 2.16.1 (Mon Jul 7 18:20:33 UTC 2008) +%%For: (root) root +%%Title: pic +%%Pages: (atend) +%%BoundingBox: (atend) +%%EndComments +save +%%BeginProlog +/DotDict 200 dict def +DotDict begin + +/setupLatin1 { +mark +/EncodingVector 256 array def + EncodingVector 0 + +ISOLatin1Encoding 0 255 getinterval putinterval +EncodingVector 45 /hyphen put + +% Set up ISO Latin 1 character encoding +/starnetISO { + dup dup findfont dup length dict begin + { 1 index /FID ne { def }{ pop pop } ifelse + } forall + /Encoding EncodingVector def + currentdict end definefont +} def +/Times-Roman starnetISO def +/Times-Italic starnetISO def +/Times-Bold starnetISO def +/Times-BoldItalic starnetISO def +/Helvetica starnetISO def +/Helvetica-Oblique starnetISO def +/Helvetica-Bold starnetISO def +/Helvetica-BoldOblique starnetISO def +/Courier starnetISO def +/Courier-Oblique starnetISO def +/Courier-Bold starnetISO def +/Courier-BoldOblique starnetISO def +cleartomark +} bind def + +%%BeginResource: procset graphviz 0 0 +/coord-font-family /Times-Roman def +/default-font-family /Times-Roman def +/coordfont coord-font-family findfont 8 scalefont def + +/InvScaleFactor 1.0 def +/set_scale { + dup 1 exch div /InvScaleFactor exch def + scale +} bind def + +% styles +/solid { [] 0 setdash } bind def +/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def +/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def +/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def +/bold { 2 setlinewidth } bind def +/filled { } bind def +/unfilled { } bind def +/rounded { } bind def +/diagonals { } bind def + +% hooks for setting color +/nodecolor { sethsbcolor } bind def +/edgecolor { sethsbcolor } bind def +/graphcolor { sethsbcolor } bind def +/nopcolor {pop pop pop} bind def + +/beginpage { % i j npages + /npages exch def + /j exch def + /i exch def + /str 10 string def + npages 1 gt { + gsave + coordfont setfont + 0 0 moveto + (\() show i str cvs show (,) show j str cvs show (\)) show + grestore + } if +} bind def + +/set_font { + findfont exch + scalefont setfont +} def + +% draw text fitted to its expected width +/alignedtext { % width text + /text exch def + /width exch def + gsave + width 0 gt { + [] 0 setdash + text stringwidth pop width exch sub text length div 0 text ashow + } if + grestore +} def + +/boxprim { % xcorner ycorner xsize ysize + 4 2 roll + moveto + 2 copy + exch 0 rlineto + 0 exch rlineto + pop neg 0 rlineto + closepath +} bind def + +/ellipse_path { + /ry exch def + /rx exch def + /y exch def + /x exch def + matrix currentmatrix + newpath + x y translate + rx ry scale + 0 0 1 0 360 arc + setmatrix +} bind def + +/endpage { showpage } bind def +/showpage { } def + +/layercolorseq + [ % layer color sequence - darkest to lightest + [0 0 0] + [.2 .8 .8] + [.4 .8 .8] + [.6 .8 .8] + [.8 .8 .8] + ] +def + +/layerlen layercolorseq length def + +/setlayer {/maxlayer exch def /curlayer exch def + layercolorseq curlayer 1 sub layerlen mod get + aload pop sethsbcolor + /nodecolor {nopcolor} def + /edgecolor {nopcolor} def + /graphcolor {nopcolor} def +} bind def + +/onlayer { curlayer ne {invis} if } def + +/onlayers { + /myupper exch def + /mylower exch def + curlayer mylower lt + curlayer myupper gt + or + {invis} if +} def + +/curlayer 0 def + +%%EndResource +%%EndProlog +%%BeginSetup +14 default-font-family set_font +1 setmiterlimit +% /arrowlength 10 def +% /arrowwidth 5 def + +% make sure pdfmark is harmless for PS-interpreters other than Distiller +/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse +% make '<<' and '>>' safe on PS Level 1 devices +/languagelevel where {pop languagelevel}{1} ifelse +2 lt { + userdict (<<) cvn ([) cvn load put + userdict (>>) cvn ([) cvn load put +} if + +%%EndSetup +setupLatin1 +%%Page: 1 1 +%%PageBoundingBox: 36 36 124 152 +%%PageOrientation: Portrait +0 0 1 beginpage +gsave +36 36 88 116 boxprim clip newpath +1 1 set_scale 0 rotate 40 40 translate +0.167 0.600 1.000 graphcolor +newpath -4 -4 moveto +-4 716 lineto +536 716 lineto +536 -4 lineto +closepath fill +1 setlinewidth +0.167 0.600 1.000 graphcolor +newpath -4 -4 moveto +-4 716 lineto +536 716 lineto +536 -4 lineto +closepath stroke +% ORDFUNS +gsave +[ /Rect [ 0 72 80 108 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=ORDFUNS) >> + /Subtype /Link +/ANN pdfmark +0.939 0.733 1.000 nodecolor +newpath 80 108 moveto +3.02917e-14 108 lineto +9.23914e-15 72 lineto +80 72 lineto +closepath fill +1 setlinewidth +filled +0.939 0.733 1.000 nodecolor +newpath 80 108 moveto +3.02917e-14 108 lineto +9.23914e-15 72 lineto +80 72 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +7.5 85.9 moveto 65 (ORDFUNS) alignedtext +grestore +% IVECTOR +gsave +[ /Rect [ 1 0 79 36 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.3.pdf#nameddest=IVECTOR) >> + /Subtype /Link +/ANN pdfmark +0.273 0.733 1.000 nodecolor +newpath 79 36 moveto +1 36 lineto +1 1.06581e-14 lineto +79 0 lineto +closepath fill +1 setlinewidth +filled +0.273 0.733 1.000 nodecolor +newpath 79 36 moveto +1 36 lineto +1 1.06581e-14 lineto +79 0 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +9 13.9 moveto 62 (IVECTOR) alignedtext +grestore +% ORDFUNS->IVECTOR +gsave +1 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 40 72 moveto +40 64 40 55 40 46 curveto +stroke +0.000 0.000 0.000 edgecolor +newpath 43.5001 46 moveto +40 36 lineto +36.5001 46 lineto +closepath fill +1 setlinewidth +solid +0.000 0.000 0.000 edgecolor +newpath 43.5001 46 moveto +40 36 lineto +36.5001 46 lineto +closepath stroke +grestore +endpage +showpage +grestore +%%PageTrailer +%%EndPage: 1 +%%Trailer +%%Pages: 1 +%%BoundingBox: 36 36 124 152 +end +restore +%%EOF diff --git a/src/algebra/gb.spad.pamphlet b/src/algebra/gb.spad.pamphlet deleted file mode 100644 index e62ca71..0000000 --- a/src/algebra/gb.spad.pamphlet +++ /dev/null @@ -1,211 +0,0 @@ -\documentclass{article} -\usepackage{axiom} -\begin{document} -\title{\$SPAD/src/algebra gb.spad} -\author{Rudiger Gebauer, Barry Trager} -\maketitle -\begin{abstract} -\end{abstract} -\eject -\tableofcontents -\eject -\begin{verbatim} ---------- GROEBNER PACKAGE DRAFT 06 12/01/1986 ---------- ---------- Example to call groebner: ---------- ---------- s1:DMP[w,p,z,t,s,b]RN:= 45*p + 35*s - 165*b - 36 ---------- s2:DMP[w,p,z,t,s,b]RN:= 35*p + 40*z + 25*t - 27*s ---------- s3:DMP[w,p,z,t,s,b]RN:= 15*w + 25*p*s + 30*z - 18*t - 165*b**2 ---------- s4:DMP[w,p,z,t,s,b]RN:= -9*w + 15*p*t + 20*z*s ---------- s5:DMP[w,p,z,t,s,b]RN:= w*p + 2*z*t - 11*b**3 ---------- s6:DMP[w,p,z,t,s,b]RN:= 99*w - 11*b*s + 3*b**2 ---------- s7:DMP[w,p,z,t,s,b]RN:= b**2 + 33/50*b + 2673/10000 ---------- ---------- sn7:=[s1,s2,s3,s4,s5,s6,s7] ---------- ---------- groebner(sn7,info) ---------- -------------------------------------------------------------------------- ---------- ---------- groebner -> calculate minimal Groebner Basis ---------- ---------- all reductions are TOTAL reductions ---------- ---------- use string " redcrit " and you get the reduced critpairs ---------- printed ---------- ---------- use string " info " and you get information about ---------- ---------- ci => Leading monomial for critpair calculation ---------- tci => Number of terms of polynomial i ---------- cj => Leading monomial for critpair calculation ---------- tcj => Number of terms of polynomial j ---------- c => Leading monomial of critpair polynomial ---------- tc => Number of terms of critpair polynomial ---------- rc => Leading monomial of redcritpair polynomial ---------- trc => Number of terms of redcritpair polynomial ---------- tF => Number of polynomials in reduction list F ---------- tD => Number of critpairs still to do ---------- -\end{verbatim} -\section{package GB GroebnerPackage} -<>= -)abbrev package GB GroebnerPackage -++ Authors: Gebauer, Trager -++ Date Created: 12-1-86 -++ Date Last Updated: 2-28-91 -++ Basic Functions: groebner normalForm -++ Related Constructors: Ideal, IdealDecompositionPackage -++ Also See: -++ AMS Classifications: -++ Keywords: groebner basis, polynomial ideal -++ References: -++ Description: \spadtype{GroebnerPackage} computes groebner -++ bases for polynomial ideals. The basic computation provides -++ a distinguished set of generators for polynomial ideals over fields. -++ This basis allows an easy test for membership: the operation \spadfun{normalForm} -++ returns zero on ideal members. When the provided coefficient domain, Dom, -++ is not a field, the result is equivalent to considering the extended -++ ideal with \spadtype{Fraction(Dom)} as coefficients, but considerably more efficient -++ since all calculations are performed in Dom. Additional argument "info" and "redcrit" -++ can be given to provide incremental information during -++ computation. Argument "info" produces a computational summary for each s-polynomial. -++ Argument "redcrit" prints out the reduced critical pairs. The term ordering -++ is determined by the polynomial type used. Suggested types include -++ \spadtype{DistributedMultivariatePolynomial}, -++ \spadtype{HomogeneousDistributedMultivariatePolynomial}, -++ \spadtype{GeneralDistributedMultivariatePolynomial}. - -GroebnerPackage(Dom, Expon, VarSet, Dpol): T == C where - - Dom: GcdDomain - Expon: OrderedAbelianMonoidSup - VarSet: OrderedSet - Dpol: PolynomialCategory(Dom, Expon, VarSet) - - T== with - - groebner: List(Dpol) -> List(Dpol) - ++ groebner(lp) computes a groebner basis for a polynomial ideal - ++ generated by the list of polynomials lp. - groebner: ( List(Dpol), String ) -> List(Dpol) - ++ groebner(lp, infoflag) computes a groebner basis - ++ for a polynomial ideal - ++ generated by the list of polynomials lp. - ++ Argument infoflag is used to get information on the computation. - ++ If infoflag is "info", then summary information - ++ is displayed for each s-polynomial generated. - ++ If infoflag is "redcrit", the reduced critical pairs are displayed. - ++ If infoflag is any other string, no information is printed during computation. - groebner: ( List(Dpol), String, String ) -> List(Dpol) - ++ groebner(lp, "info", "redcrit") computes a groebner basis - ++ for a polynomial ideal generated by the list of polynomials lp, - ++ displaying both a summary of the critical pairs considered ("info") - ++ and the result of reducing each critical pair ("redcrit"). - ++ If the second or third arguments have any other string value, - ++ the indicated information is suppressed. - - if Dom has Field then - normalForm: (Dpol, List(Dpol)) -> Dpol - ++ normalForm(poly,gb) reduces the polynomial poly modulo the - ++ precomputed groebner basis gb giving a canonical representative - ++ of the residue class. - C== add - import OutputForm - import GroebnerInternalPackage(Dom,Expon,VarSet,Dpol) - - if Dom has Field then - monicize(p: Dpol):Dpol == --- one?(lc := leadingCoefficient p) => p - ((lc := leadingCoefficient p) = 1) => p - inv(lc)*p - - normalForm(p : Dpol, l : List(Dpol)) : Dpol == - redPol(p,map(monicize,l)) - - ------ MAIN ALGORITHM GROEBNER ------------------------ - - groebner( Pol: List(Dpol) ) == - Pol=[] => Pol - Pol:=[x for x in Pol | x ^= 0] - Pol=[] => [0] - minGbasis(sort( degree #1 > degree #2, gbasis(Pol,0,0))) - - groebner( Pol: List(Dpol), xx1: String) == - Pol=[] => Pol - Pol:=[x for x in Pol | x ^= 0] - Pol=[] => [0] - xx1 = "redcrit" => - minGbasis(sort( degree #1 > degree #2, gbasis(Pol,1,0))) - xx1 = "info" => - minGbasis(sort( degree #1 > degree #2, gbasis(Pol,2,1))) - messagePrint(" ") - messagePrint("WARNING: options are - redcrit and/or info - ") - messagePrint(" you didn't type them correct") - messagePrint(" please try again") - messagePrint(" ") - [] - - groebner( Pol: List(Dpol), xx1: String, xx2: String) == - Pol=[] => Pol - Pol:=[x for x in Pol | x ^= 0] - Pol=[] => [0] - (xx1 = "redcrit" and xx2 = "info") or - (xx1 = "info" and xx2 = "redcrit") => - minGbasis(sort( degree #1 > degree #2, gbasis(Pol,1,1))) - xx1 = "redcrit" and xx2 = "redcrit" => - minGbasis(sort( degree #1 > degree #2, gbasis(Pol,1,0))) - xx1 = "info" and xx2 = "info" => - minGbasis(sort( degree #1 > degree #2, gbasis(Pol,2,1))) - messagePrint(" ") - messagePrint("WARNING: options are - redcrit and/or info - ") - messagePrint(" you didn't type them correctly") - messagePrint(" please try again ") - messagePrint(" ") - [] - -@ -\section{License} -<>= ---Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd. ---All rights reserved. --- ---Redistribution and use in source and binary forms, with or without ---modification, are permitted provided that the following conditions are ---met: --- --- - Redistributions of source code must retain the above copyright --- notice, this list of conditions and the following disclaimer. --- --- - Redistributions in binary form must reproduce the above copyright --- notice, this list of conditions and the following disclaimer in --- the documentation and/or other materials provided with the --- distribution. --- --- - Neither the name of The Numerical ALgorithms Group Ltd. nor the --- names of its contributors may be used to endorse or promote products --- derived from this software without specific prior written permission. --- ---THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS ---IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED ---TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A ---PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER ---OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, ---EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, ---PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR ---PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF ---LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING ---NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS ---SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -@ -<<*>>= -<> - -<> -@ -\eject -\begin{thebibliography}{99} -\bibitem{1} nothing -\end{thebibliography} -\end{document} diff --git a/src/algebra/gbintern.spad.pamphlet b/src/algebra/gbintern.spad.pamphlet deleted file mode 100644 index 1ba941b..0000000 --- a/src/algebra/gbintern.spad.pamphlet +++ /dev/null @@ -1,514 +0,0 @@ -\documentclass{article} -\usepackage{axiom} -\begin{document} -\title{\$SPAD/src/algebra gbintern.spad} -\author{The Axiom Team} -\maketitle -\begin{abstract} -\end{abstract} -\eject -\tableofcontents -\eject -\section{package GBINTERN GroebnerInternalPackage} -<>= -)abbrev package GBINTERN GroebnerInternalPackage -++ Author: -++ Date Created: -++ Date Last Updated: -++ Keywords: -++ Description -++ This package provides low level tools for Groebner basis computations -GroebnerInternalPackage(Dom, Expon, VarSet, Dpol): T == C where - Dom: GcdDomain - Expon: OrderedAbelianMonoidSup - VarSet: OrderedSet - Dpol: PolynomialCategory(Dom, Expon, VarSet) - NNI ==> NonNegativeInteger - ------ Definition of Record critPair and Prinp - - critPair ==> Record( lcmfij: Expon, totdeg: NonNegativeInteger, - poli: Dpol, polj: Dpol ) - sugarPol ==> Record( totdeg: NonNegativeInteger, pol : Dpol) - Prinp ==> Record( ci:Dpol,tci:Integer,cj:Dpol,tcj:Integer,c:Dpol, - tc:Integer,rc:Dpol,trc:Integer,tF:Integer,tD:Integer) - Prinpp ==> Record( ci:Dpol,tci:Integer,cj:Dpol,tcj:Integer,c:Dpol, - tc:Integer,rc:Dpol,trc:Integer,tF:Integer,tDD:Integer, - tDF:Integer) - T== with - - credPol: (Dpol, List(Dpol)) -> Dpol - ++ credPol \undocumented - redPol: (Dpol, List(Dpol)) -> Dpol - ++ redPol \undocumented - gbasis: (List(Dpol), Integer, Integer) -> List(Dpol) - ++ gbasis \undocumented - critT: critPair -> Boolean - ++ critT \undocumented - critM: (Expon, Expon) -> Boolean - ++ critM \undocumented - critB: (Expon, Expon, Expon, Expon) -> Boolean - ++ critB \undocumented - critBonD: (Dpol, List(critPair)) -> List(critPair) - ++ critBonD \undocumented - critMTonD1: (List(critPair)) -> List(critPair) - ++ critMTonD1 \undocumented - critMonD1: (Expon, List(critPair)) -> List(critPair) - ++ critMonD1 \undocumented - redPo: (Dpol, List(Dpol) ) -> Record(poly:Dpol, mult:Dom) - ++ redPo \undocumented - hMonic: Dpol -> Dpol - ++ hMonic \undocumented - updatF: (Dpol, NNI, List(sugarPol) ) -> List(sugarPol) - ++ updatF \undocumented - sPol: critPair -> Dpol - ++ sPol \undocumented - updatD: (List(critPair), List(critPair)) -> List(critPair) - ++ updatD \undocumented - minGbasis: List(Dpol) -> List(Dpol) - ++ minGbasis \undocumented - lepol: Dpol -> Integer - ++ lepol \undocumented - prinshINFO : Dpol -> Void - ++ prinshINFO \undocumented - prindINFO: (critPair, Dpol, Dpol,Integer,Integer,Integer) -> Integer - ++ prindINFO \undocumented - fprindINFO: (critPair, Dpol, Dpol, Integer,Integer,Integer - ,Integer) -> Integer - ++ fprindINFO \undocumented - prinpolINFO: List(Dpol) -> Void - ++ prinpolINFO \undocumented - prinb: Integer-> Void - ++ prinb \undocumented - critpOrder: (critPair, critPair) -> Boolean - ++ critpOrder \undocumented - makeCrit: (sugarPol, Dpol, NonNegativeInteger) -> critPair - ++ makeCrit \undocumented - virtualDegree : Dpol -> NonNegativeInteger - ++ virtualDegree \undocumented - - C== add - Ex ==> OutputForm - import OutputForm - - ------ Definition of intermediate functions - if Dpol has totalDegree: Dpol -> NonNegativeInteger then - virtualDegree p == totalDegree p - else - virtualDegree p == 0 - - ------ ordering of critpairs - - critpOrder(cp1,cp2) == - cp1.totdeg < cp2.totdeg => true - cp2.totdeg < cp1.totdeg => false - cp1.lcmfij < cp2.lcmfij - - ------ creating a critical pair - - makeCrit(sp1, p2, totdeg2) == - p1 := sp1.pol - deg := sup(degree(p1), degree(p2)) - e1 := subtractIfCan(deg, degree(p1))::Expon - e2 := subtractIfCan(deg, degree(p2))::Expon - tdeg := max(sp1.totdeg + virtualDegree(monomial(1,e1)), - totdeg2 + virtualDegree(monomial(1,e2))) - [deg, tdeg, p1, p2]$critPair - - ------ calculate basis - - gbasis(Pol: List(Dpol), xx1: Integer, xx2: Integer ) == - D, D1: List(critPair) - --------- create D and Pol - - Pol1:= sort(degree #1 > degree #2, Pol) - basPols:= updatF(hMonic(first Pol1),virtualDegree(first Pol1),[]) - Pol1:= rest(Pol1) - D:= nil - while _^ null Pol1 repeat - h:= hMonic(first(Pol1)) - Pol1:= rest(Pol1) - toth := virtualDegree h - D1:= [makeCrit(x,h,toth) for x in basPols] - D:= updatD(critMTonD1(sort(critpOrder, D1)), - critBonD(h,D)) - basPols:= updatF(h,toth,basPols) - D:= sort(critpOrder, D) - xx:= xx2 - -------- loop - - redPols := [x.pol for x in basPols] - while _^ null D repeat - D0:= first D - s:= hMonic(sPol(D0)) - D:= rest(D) - h:= hMonic(redPol(s,redPols)) - if xx1 = 1 then - prinshINFO(h) - h = 0 => - if xx2 = 1 then - prindINFO(D0,s,h,# basPols, # D,xx) - xx:= 2 - " go to top of while " - degree(h) = 0 => - D:= nil - if xx2 = 1 then - prindINFO(D0,s,h,# basPols, # D,xx) - xx:= 2 - basPols:= updatF(h,0,[]) - leave "out of while" - D1:= [makeCrit(x,h,D0.totdeg) for x in basPols] - D:= updatD(critMTonD1(sort(critpOrder, D1)), - critBonD(h,D)) - basPols:= updatF(h,D0.totdeg,basPols) - redPols := concat(redPols,h) - if xx2 = 1 then - prindINFO(D0,s,h,# basPols, # D,xx) - xx:= 2 - Pol := [x.pol for x in basPols] - if xx2 = 1 then - prinpolINFO(Pol) - messagePrint(" THE GROEBNER BASIS POLYNOMIALS") - if xx1 = 1 and xx2 ^= 1 then - messagePrint(" THE GROEBNER BASIS POLYNOMIALS") - Pol - - -------------------------------------- - - --- erase multiple of e in D2 using crit M - - critMonD1(e: Expon, D2: List(critPair))== - null D2 => nil - x:= first(D2) - critM(e, x.lcmfij) => critMonD1(e, rest(D2)) - cons(x, critMonD1(e, rest(D2))) - - ---------------------------- - - --- reduce D1 using crit T and crit M - - critMTonD1(D1: List(critPair))== - null D1 => nil - f1:= first(D1) - s1:= #(D1) - cT1:= critT(f1) - s1= 1 and cT1 => nil - s1= 1 => D1 - e1:= f1.lcmfij - r1:= rest(D1) - e1 = (first r1).lcmfij => - cT1 => critMTonD1(cons(f1, rest(r1))) - critMTonD1(r1) - D1 := critMonD1(e1, r1) - cT1 => critMTonD1(D1) - cons(f1, critMTonD1(D1)) - - ----------------------------- - - --- erase elements in D fullfilling crit B - - critBonD(h:Dpol, D: List(critPair))== - null D => nil - x:= first(D) - critB(degree(h), x.lcmfij, degree(x.poli), degree(x.polj)) => - critBonD(h, rest(D)) - cons(x, critBonD(h, rest(D))) - - ----------------------------- - - --- concat F and h and erase multiples of h in F - - updatF(h: Dpol, deg:NNI, F: List(sugarPol)) == - null F => [[deg,h]] - f1:= first(F) - critM(degree(h), degree(f1.pol)) => updatF(h, deg, rest(F)) - cons(f1, updatF(h, deg, rest(F))) - - ----------------------------- - - --- concat ordered critical pair lists D1 and D2 - - updatD(D1: List(critPair), D2: List(critPair)) == - null D1 => D2 - null D2 => D1 - dl1:= first(D1) - dl2:= first(D2) - critpOrder(dl1,dl2) => cons(dl1, updatD(D1.rest, D2)) - cons(dl2, updatD(D1, D2.rest)) - - ----------------------------- - - --- remove gcd from pair of coefficients - - gcdCo(c1:Dom, c2:Dom):Record(co1:Dom,co2:Dom) == - d:=gcd(c1,c2) - [(c1 exquo d)::Dom, (c2 exquo d)::Dom] - - --- calculate S-polynomial of a critical pair - - sPol(p:critPair)== - Tij := p.lcmfij - fi := p.poli - fj := p.polj - cc := gcdCo(leadingCoefficient fi, leadingCoefficient fj) - reductum(fi)*monomial(cc.co2,subtractIfCan(Tij, degree fi)::Expon) - - reductum(fj)*monomial(cc.co1,subtractIfCan(Tij, degree fj)::Expon) - - ---------------------------- - - --- reduce critpair polynomial mod F - --- iterative version - - redPo(s: Dpol, F: List(Dpol)) == - m:Dom := 1 - Fh := F - while _^ ( s = 0 or null F ) repeat - f1:= first(F) - s1:= degree(s) - e: Union(Expon, "failed") - (e:= subtractIfCan(s1, degree(f1))) case Expon => - cc:=gcdCo(leadingCoefficient f1, leadingCoefficient s) - s:=cc.co1*reductum(s) - monomial(cc.co2,e)*reductum(f1) - m := m*cc.co1 - F:= Fh - F:= rest F - [s,m] - - redPol(s: Dpol, F: List(Dpol)) == credPol(redPo(s,F).poly,F) - - ---------------------------- - - --- crit T true, if e1 and e2 are disjoint - - critT(p: critPair) == p.lcmfij = (degree(p.poli) + degree(p.polj)) - - ---------------------------- - - --- crit M - true, if lcm#2 multiple of lcm#1 - - critM(e1: Expon, e2: Expon) == - en: Union(Expon, "failed") - (en:=subtractIfCan(e2, e1)) case Expon - - ---------------------------- - - --- crit B - true, if eik is a multiple of eh and eik ^equal - --- lcm(eh,ei) and eik ^equal lcm(eh,ek) - - critB(eh:Expon, eik:Expon, ei:Expon, ek:Expon) == - critM(eh, eik) and (eik ^= sup(eh, ei)) and (eik ^= sup(eh, ek)) - - ---------------------------- - - --- make polynomial monic case Domain a Field - - hMonic(p: Dpol) == - p= 0 => p - -- inv(leadingCoefficient(p))*p - primitivePart p - - ----------------------------- - - --- reduce all terms of h mod F (iterative version ) - - credPol(h: Dpol, F: List(Dpol) ) == - null F => h - h0:Dpol:= monomial(leadingCoefficient h, degree h) - while (h:=reductum h) ^= 0 repeat - hred:= redPo(h, F) - h := hred.poly - h0:=(hred.mult)*h0 + monomial(leadingCoefficient(h),degree h) - h0 - - ------------------------------- - - ---- calculate minimal basis for ordered F - - minGbasis(F: List(Dpol)) == - null F => nil - newbas := minGbasis rest F - cons(hMonic credPol( first(F), newbas),newbas) - - ------------------------------- - - ---- calculate number of terms of polynomial - - lepol(p1:Dpol)== - n: Integer - n:= 0 - while p1 ^= 0 repeat - n:= n + 1 - p1:= reductum(p1) - n - - ---- print blanc lines - - prinb(n: Integer)== - for x in 1..n repeat - messagePrint(" ") - - ---- print reduced critpair polynom - - prinshINFO(h: Dpol)== - prinb(2) - messagePrint(" reduced Critpair - Polynom :") - prinb(2) - print(h::Ex) - prinb(2) - - ------------------------------- - - ---- print info string - - prindINFO(cp: critPair, ps: Dpol, ph: Dpol, i1:Integer, - i2:Integer, n:Integer) == - ll: List Prinp - a: Dom - cpi:= cp.poli - cpj:= cp.polj - if n = 1 then - prinb(1) - messagePrint("you choose option -info- ") - messagePrint("abbrev. for the following information strings are") - messagePrint(" ci => Leading monomial for critpair calculation") - messagePrint(" tci => Number of terms of polynomial i") - messagePrint(" cj => Leading monomial for critpair calculation") - messagePrint(" tcj => Number of terms of polynomial j") - messagePrint(" c => Leading monomial of critpair polynomial") - messagePrint(" tc => Number of terms of critpair polynomial") - messagePrint(" rc => Leading monomial of redcritpair polynomial") - messagePrint(" trc => Number of terms of redcritpair polynomial") - messagePrint(" tF => Number of polynomials in reduction list F") - messagePrint(" tD => Number of critpairs still to do") - prinb(4) - n:= 2 - prinb(1) - a:= 1 - ph = 0 => - ps = 0 => - ll:= [[monomial(a,degree(cpi)),lepol(cpi), - monomial(a,degree(cpj)), - lepol(cpj),ps,0,ph,0,i1,i2]$Prinp] - print(ll::Ex) - prinb(1) - n - ll:= [[monomial(a,degree(cpi)),lepol(cpi), - monomial(a,degree(cpj)),lepol(cpj),monomial(a,degree(ps)), - lepol(ps), ph,0,i1,i2]$Prinp] - print(ll::Ex) - prinb(1) - n - ll:= [[monomial(a,degree(cpi)),lepol(cpi), - monomial(a,degree(cpj)),lepol(cpj),monomial(a,degree(ps)), - lepol(ps),monomial(a,degree(ph)),lepol(ph),i1,i2]$Prinp] - print(ll::Ex) - prinb(1) - n - - ------------------------------- - - ---- print the groebner basis polynomials - - prinpolINFO(pl: List(Dpol))== - n:Integer - n:= # pl - prinb(1) - n = 1 => - messagePrint(" There is 1 Groebner Basis Polynomial ") - prinb(2) - messagePrint(" There are ") - prinb(1) - print(n::Ex) - prinb(1) - messagePrint(" Groebner Basis Polynomials. ") - prinb(2) - - fprindINFO(cp: critPair, ps: Dpol, ph: Dpol, i1:Integer, - i2:Integer, i3:Integer, n: Integer) == - ll: List Prinpp - a: Dom - cpi:= cp.poli - cpj:= cp.polj - if n = 1 then - prinb(1) - messagePrint("you choose option -info- ") - messagePrint("abbrev. for the following information strings are") - messagePrint(" ci => Leading monomial for critpair calculation") - messagePrint(" tci => Number of terms of polynomial i") - messagePrint(" cj => Leading monomial for critpair calculation") - messagePrint(" tcj => Number of terms of polynomial j") - messagePrint(" c => Leading monomial of critpair polynomial") - messagePrint(" tc => Number of terms of critpair polynomial") - messagePrint(" rc => Leading monomial of redcritpair polynomial") - messagePrint(" trc => Number of terms of redcritpair polynomial") - messagePrint(" tF => Number of polynomials in reduction list F") - messagePrint(" tD => Number of critpairs still to do") - messagePrint(" tDF => Number of subproblems still to do") - prinb(4) - n:= 2 - prinb(1) - a:= 1 - ph = 0 => - ps = 0 => - ll:= [[monomial(a,degree(cpi)),lepol(cpi), - monomial(a,degree(cpj)), - lepol(cpj),ps,0,ph,0,i1,i2,i3]$Prinpp] - print(ll::Ex) - prinb(1) - n - ll:= [[monomial(a,degree(cpi)),lepol(cpi), - monomial(a,degree(cpj)),lepol(cpj),monomial(a,degree(ps)), - lepol(ps), ph,0,i1,i2,i3]$Prinpp] - print(ll::Ex) - prinb(1) - n - ll:= [[monomial(a,degree(cpi)),lepol(cpi), - monomial(a,degree(cpj)),lepol(cpj),monomial(a,degree(ps)), - lepol(ps),monomial(a,degree(ph)),lepol(ph),i1,i2,i3]$Prinpp] - print(ll::Ex) - prinb(1) - n - -@ -\section{License} -<>= ---Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd. ---All rights reserved. --- ---Redistribution and use in source and binary forms, with or without ---modification, are permitted provided that the following conditions are ---met: --- --- - Redistributions of source code must retain the above copyright --- notice, this list of conditions and the following disclaimer. --- --- - Redistributions in binary form must reproduce the above copyright --- notice, this list of conditions and the following disclaimer in --- the documentation and/or other materials provided with the --- distribution. --- --- - Neither the name of The Numerical ALgorithms Group Ltd. nor the --- names of its contributors may be used to endorse or promote products --- derived from this software without specific prior written permission. --- ---THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS ---IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED ---TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A ---PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER ---OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, ---EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, ---PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR ---PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF ---LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING ---NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS ---SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -@ -<<*>>= -<> - -<> -@ -\eject -\begin{thebibliography}{99} -\bibitem{1} nothing -\end{thebibliography} -\end{document} diff --git a/src/algebra/gdirprod.spad.pamphlet b/src/algebra/gdirprod.spad.pamphlet deleted file mode 100644 index 8129d50..0000000 --- a/src/algebra/gdirprod.spad.pamphlet +++ /dev/null @@ -1,127 +0,0 @@ -\documentclass{article} -\usepackage{axiom} -\begin{document} -\title{\$SPAD/src/algebra gdirprod.spad} -\author{Barry Trager} -\maketitle -\begin{abstract} -\end{abstract} -\eject -\tableofcontents -\eject -\section{package ORDFUNS OrderingFunctions} -<>= -)abbrev package ORDFUNS OrderingFunctions -++ Author: Barry Trager -++ Date Created: -++ Date Last Updated: -++ Basic Functions: -++ Related Constructors: OrderedDirectProduct -++ Also See: -++ AMS Classifications: -++ Keywords: -++ References: -++ Description: -++ This package provides ordering functions on vectors which -++ are suitable parameters for OrderedDirectProduct. - -OrderingFunctions(dim,S) : T == C where - dim : NonNegativeInteger - S : OrderedAbelianMonoid - VS == Vector S - - T == with - pureLex : (VS,VS) -> Boolean - ++ pureLex(v1,v2) return true if the vector v1 is less than the - ++ vector v2 in the lexicographic ordering. - totalLex : (VS,VS) -> Boolean - ++ totalLex(v1,v2) return true if the vector v1 is less than the - ++ vector v2 in the ordering which is total degree refined by - ++ lexicographic ordering. - reverseLex : (VS,VS) -> Boolean - ++ reverseLex(v1,v2) return true if the vector v1 is less than the - ++ vector v2 in the ordering which is total degree refined by - ++ the reverse lexicographic ordering. - - C == add - n:NonNegativeInteger:=dim - - -- pure lexicographical ordering - pureLex(v1:VS,v2:VS) : Boolean == - for i in 1..n repeat - if qelt(v1,i) < qelt(v2,i) then return true - if qelt(v2,i) < qelt(v1,i) then return false - false - - -- total ordering refined with lex - totalLex(v1:VS,v2:VS) :Boolean == - n1:S:=0 - n2:S:=0 - for i in 1..n repeat - n1:= n1+qelt(v1,i) - n2:=n2+qelt(v2,i) - n1 true - n2 false - for i in 1..n repeat - if qelt(v1,i) < qelt(v2,i) then return true - if qelt(v2,i) < qelt(v1,i) then return false - false - - -- reverse lexicographical ordering - reverseLex(v1:VS,v2:VS) :Boolean == - n1:S:=0 - n2:S:=0 - for i in 1..n repeat - n1:= n1+qelt(v1,i) - n2:=n2+qelt(v2,i) - n1 true - n2 false - for i in reverse(1..n) repeat - if qelt(v2,i) < qelt(v1,i) then return true - if qelt(v1,i) < qelt(v2,i) then return false - false - -@ -\section{License} -<>= ---Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd. ---All rights reserved. --- ---Redistribution and use in source and binary forms, with or without ---modification, are permitted provided that the following conditions are ---met: --- --- - Redistributions of source code must retain the above copyright --- notice, this list of conditions and the following disclaimer. --- --- - Redistributions in binary form must reproduce the above copyright --- notice, this list of conditions and the following disclaimer in --- the documentation and/or other materials provided with the --- distribution. --- --- - Neither the name of The Numerical ALgorithms Group Ltd. nor the --- names of its contributors may be used to endorse or promote products --- derived from this software without specific prior written permission. --- ---THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS ---IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED ---TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A ---PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER ---OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, ---EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, ---PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR ---PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF ---LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING ---NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS ---SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -@ -<<*>>= -<> - -<> -@ -\eject -\begin{thebibliography}{99} -\bibitem{1} nothing -\end{thebibliography} -\end{document} diff --git a/src/algebra/geneez.spad.pamphlet b/src/algebra/geneez.spad.pamphlet deleted file mode 100644 index 74076d6..0000000 --- a/src/algebra/geneez.spad.pamphlet +++ /dev/null @@ -1,248 +0,0 @@ -\documentclass{article} -\usepackage{axiom} -\begin{document} -\title{\$SPAD/src/algebra geneez.spad} -\author{Patrizia Gianni} -\maketitle -\begin{abstract} -\end{abstract} -\eject -\tableofcontents -\eject -\section{package GENEEZ GenExEuclid} -<>= -)abbrev package GENEEZ GenExEuclid -++ Author : P.Gianni. -++ January 1990 -++ The equation \spad{Af+Bg=h} and its generalization to n polynomials -++ is solved for solutions over the R, euclidean domain. -++ A table containing the solutions of \spad{Af+Bg=x**k} is used. -++ The operations are performed modulus a prime which are in principle big enough, -++ but the solutions are tested and, in case of failure, a hensel -++ lifting process is used to get to the right solutions. -++ It will be used in the factorization of multivariate polynomials -++ over finite field, with \spad{R=F[x]}. - -GenExEuclid(R,BP) : C == T - where - R : EuclideanDomain - PI ==> PositiveInteger - NNI ==> NonNegativeInteger - BP : UnivariatePolynomialCategory R - L ==> List - - C == with - reduction: (BP,R) -> BP - ++ reduction(p,prime) reduces the polynomial p modulo prime of R. - ++ Note: this function is exported only because it's conditional. - compBound: (BP,L BP) -> NNI - ++ compBound(p,lp) - ++ computes a bound for the coefficients of the solution - ++ polynomials. - ++ Given a polynomial right hand side p, and a list lp of left hand side polynomials. - ++ Exported because it depends on the valuation. - tablePow : (NNI,R,L BP) -> Union(Vector(L BP),"failed") - ++ tablePow(maxdeg,prime,lpol) constructs the table with the - ++ coefficients of the Extended Euclidean Algorithm for lpol. - ++ Here the right side is \spad{x**k}, for k less or equal to maxdeg. - ++ The operation returns "failed" when the elements are not coprime modulo prime. - solveid : (BP,R,Vector L BP) -> Union(L BP,"failed") - ++ solveid(h,table) computes the coefficients of the - ++ extended euclidean algorithm for a list of polynomials - ++ whose tablePow is table and with right side h. - - testModulus : (R, L BP) -> Boolean - ++ testModulus(p,lp) returns true if the the prime p - ++ is valid for the list of polynomials lp, i.e. preserves - ++ the degree and they remain relatively prime. - - T == add - if R has multiplicativeValuation then - compBound(m:BP,listpolys:L BP) : NNI == - ldeg:=[degree f for f in listpolys] - n:NNI:= (+/[df for df in ldeg]) - normlist:=[ +/[euclideanSize(u)**2 for u in coefficients f] - for f in listpolys] - nm:= +/[euclideanSize(u)**2 for u in coefficients m] - normprod := */[g**((n-df)::NNI) for g in normlist for df in ldeg] - 2*(approxSqrt(normprod * nm)$IntegerRoots(Integer))::NNI - else if R has additiveValuation then - -- a fairly crude Hadamard-style bound for the solution - -- based on regarding the problem as a system of linear equations. - compBound(m:BP,listpolys:L BP) : NNI == - "max"/[euclideanSize u for u in coefficients m] + - +/["max"/[euclideanSize u for u in coefficients p] - for p in listpolys] - else - compBound(m:BP,listpolys:L BP) : NNI == - error "attempt to use compBound without a well-understood valuation" - if R has IntegerNumberSystem then - reduction(u:BP,p:R):BP == - p = 0 => u - map(symmetricRemainder(#1,p),u) - else reduction(u:BP,p:R):BP == - p = 0 => u - map(#1 rem p,u) - - merge(p:R,q:R):Union(R,"failed") == - p = q => p - p = 0 => q - q = 0 => p - "failed" - - modInverse(c:R,p:R):R == - (extendedEuclidean(c,p,1)::Record(coef1:R,coef2:R)).coef1 - - exactquo(u:BP,v:BP,p:R):Union(BP,"failed") == - invlcv:=modInverse(leadingCoefficient v,p) - r:=monicDivide(u,reduction(invlcv*v,p)) - reduction(r.remainder,p) ^=0 => "failed" - reduction(invlcv*r.quotient,p) - - FP:=EuclideanModularRing(R,BP,R,reduction,merge,exactquo) - - --make table global variable! - table:Vector L BP - import GeneralHenselPackage(R,BP) - - --local functions - makeProducts : L BP -> L BP - liftSol: (L BP,BP,R,R,Vector L BP,BP,NNI) -> Union(L BP,"failed") - - reduceList(lp:L BP,lmod:R): L FP ==[reduce(ff,lmod) for ff in lp] - - coerceLFP(lf:L FP):L BP == [fm::BP for fm in lf] - - liftSol(oldsol:L BP,err:BP,lmod:R,lmodk:R, - table:Vector L BP,m:BP,bound:NNI):Union(L BP,"failed") == - euclideanSize(lmodk) > bound => "failed" - d:=degree err - ftab:Vector L FP := - map(reduceList(#1,lmod),table)$VectorFunctions2(List BP,List FP) - sln:L FP:=[0$FP for xx in ftab.1 ] - for i in 0 .. d |(cc:=coefficient(err,i)) ^=0 repeat - sln:=[slp+reduce(cc::BP,lmod)*pp - for pp in ftab.(i+1) for slp in sln] - nsol:=[f-lmodk*reduction(g::BP,lmod) for f in oldsol for g in sln] - lmodk1:=lmod*lmodk - nsol:=[reduction(slp,lmodk1) for slp in nsol] - lpolys:L BP:=table.(#table) - (fs:=+/[f*g for f in lpolys for g in nsol]) = m => nsol - a:BP:=((fs-m) exquo lmodk1)::BP - liftSol(nsol,a,lmod,lmodk1,table,m,bound) - - makeProducts(listPol:L BP):L BP == - #listPol < 2 => listPol - #listPol = 2 => reverse listPol - f:= first listPol - ll := rest listPol - [*/ll,:[f*g for g in makeProducts ll]] - - testModulus(pmod, listPol) == - redListPol := reduceList(listPol, pmod) - for pol in listPol for rpol in redListPol repeat - degree(pol) ^= degree(rpol::BP) => return false - while not empty? redListPol repeat - rpol := first redListPol - redListPol := rest redListPol - for rpol2 in redListPol repeat - gcd(rpol, rpol2) ^= 1 => return false - true - - if R has Field then - tablePow(mdeg:NNI,pmod:R,listPol:L BP) == - multiE:=multiEuclidean(listPol,1$BP) - multiE case "failed" => "failed" - ptable:Vector L BP :=new(mdeg+1,[]) - ptable.1:=multiE - x:BP:=monomial(1,1) - for i in 2..mdeg repeat ptable.i:= - [tpol*x rem fpol for tpol in ptable.(i-1) for fpol in listPol] - ptable.(mdeg+1):=makeProducts listPol - ptable - - solveid(m:BP,pmod:R,table:Vector L BP) : Union(L BP,"failed") == - -- Actually, there's no possibility of failure - d:=degree m - sln:L BP:=[0$BP for xx in table.1] - for i in 0 .. d | coefficient(m,i)^=0 repeat - sln:=[slp+coefficient(m,i)*pp - for pp in table.(i+1) for slp in sln] - sln - - else - - tablePow(mdeg:NNI,pmod:R,listPol:L BP) == - listP:L FP:= [reduce(pol,pmod) for pol in listPol] - multiE:=multiEuclidean(listP,1$FP) - multiE case "failed" => "failed" - ftable:Vector L FP :=new(mdeg+1,[]) - fl:L FP:= [ff::FP for ff in multiE] - ftable.1:=[fpol for fpol in fl] - x:FP:=reduce(monomial(1,1),pmod) - for i in 2..mdeg repeat ftable.i:= - [tpol*x rem fpol for tpol in ftable.(i-1) for fpol in listP] - ptable:= map(coerceLFP,ftable)$VectorFunctions2(List FP,List BP) - ptable.(mdeg+1):=makeProducts listPol - ptable - - solveid(m:BP,pmod:R,table:Vector L BP) : Union(L BP,"failed") == - d:=degree m - ftab:Vector L FP:= - map(reduceList(#1,pmod),table)$VectorFunctions2(List BP,List FP) - lpolys:L BP:=table.(#table) - sln:L FP:=[0$FP for xx in ftab.1] - for i in 0 .. d | coefficient(m,i)^=0 repeat - sln:=[slp+reduce(coefficient(m,i)::BP,pmod)*pp - for pp in ftab.(i+1) for slp in sln] - soln:=[slp::BP for slp in sln] - (fs:=+/[f*g for f in lpolys for g in soln]) = m=> soln - -- Compute bound - bound:=compBound(m,lpolys) - a:BP:=((fs-m) exquo pmod)::BP - liftSol(soln,a,pmod,pmod,table,m,bound) - -@ -\section{License} -<>= ---Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd. ---All rights reserved. --- ---Redistribution and use in source and binary forms, with or without ---modification, are permitted provided that the following conditions are ---met: --- --- - Redistributions of source code must retain the above copyright --- notice, this list of conditions and the following disclaimer. --- --- - Redistributions in binary form must reproduce the above copyright --- notice, this list of conditions and the following disclaimer in --- the documentation and/or other materials provided with the --- distribution. --- --- - Neither the name of The Numerical ALgorithms Group Ltd. nor the --- names of its contributors may be used to endorse or promote products --- derived from this software without specific prior written permission. --- ---THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS ---IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED ---TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A ---PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER ---OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, ---EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, ---PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR ---PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF ---LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING ---NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS ---SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -@ -<<*>>= -<> - -<> -@ -\eject -\begin{thebibliography}{99} -\bibitem{1} nothing -\end{thebibliography} -\end{document} diff --git a/src/algebra/generic.spad.pamphlet b/src/algebra/generic.spad.pamphlet deleted file mode 100644 index 1d017d3..0000000 --- a/src/algebra/generic.spad.pamphlet +++ /dev/null @@ -1,109 +0,0 @@ -\documentclass{article} -\usepackage{axiom} -\begin{document} -\title{\$SPAD/src/algebra generic.spad} -\author{Johannes Grabmeier, Robert Wisbauer} -\maketitle -\begin{abstract} -\end{abstract} -\eject -\tableofcontents -\eject -\section{package CVMP CoerceVectorMatrixPackage} -<>= -)abbrev package CVMP CoerceVectorMatrixPackage -++ Authors: J. Grabmeier -++ Date Created: 26 June 1991 -++ Date Last Updated: 26 June 1991 -++ Basic Operations: coerceP, coerce -++ Related Constructors: GenericNonAssociativeAlgebra -++ Also See: -++ AMS Classifications: -++ Keywords: -++ Reference: -++ Description: -++ CoerceVectorMatrixPackage: an unexposed, technical package -++ for data conversions -CoerceVectorMatrixPackage(R : CommutativeRing): public == private where - M2P ==> MatrixCategoryFunctions2(R, Vector R, Vector R, Matrix R, _ - Polynomial R, Vector Polynomial R, Vector Polynomial R, Matrix Polynomial R) - M2FP ==> MatrixCategoryFunctions2(R, Vector R, Vector R, Matrix R, _ - Fraction Polynomial R, Vector Fraction Polynomial R, _ - Vector Fraction Polynomial R, Matrix Fraction Polynomial R) - public ==> with - coerceP: Vector Matrix R -> Vector Matrix Polynomial R - ++ coerceP(v) coerces a vector v with entries in \spadtype{Matrix R} - ++ as vector over \spadtype{Matrix Polynomial R} - coerce: Vector Matrix R -> Vector Matrix Fraction Polynomial R - ++ coerce(v) coerces a vector v with entries in \spadtype{Matrix R} - ++ as vector over \spadtype{Matrix Fraction Polynomial R} - private ==> add - - imbedFP : R -> Fraction Polynomial R - imbedFP r == (r:: Polynomial R) :: Fraction Polynomial R - - imbedP : R -> Polynomial R - imbedP r == (r:: Polynomial R) - - coerceP(g:Vector Matrix R) : Vector Matrix Polynomial R == - m2 : Matrix Polynomial R - lim : List Matrix R := entries g - l: List Matrix Polynomial R := [] - for m in lim repeat - m2 := map(imbedP,m)$M2P - l := cons(m2,l) - vector reverse l - - coerce(g:Vector Matrix R) : Vector Matrix Fraction Polynomial R == - m3 : Matrix Fraction Polynomial R - lim : List Matrix R := entries g - l: List Matrix Fraction Polynomial R := [] - for m in lim repeat - m3 := map(imbedFP,m)$M2FP - l := cons(m3,l) - vector reverse l - -@ -\section{License} -<>= ---Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd. ---All rights reserved. --- ---Redistribution and use in source and binary forms, with or without ---modification, are permitted provided that the following conditions are ---met: --- --- - Redistributions of source code must retain the above copyright --- notice, this list of conditions and the following disclaimer. --- --- - Redistributions in binary form must reproduce the above copyright --- notice, this list of conditions and the following disclaimer in --- the documentation and/or other materials provided with the --- distribution. --- --- - Neither the name of The Numerical ALgorithms Group Ltd. nor the --- names of its contributors may be used to endorse or promote products --- derived from this software without specific prior written permission. --- ---THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS ---IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED ---TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A ---PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER ---OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, ---EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, ---PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR ---PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF ---LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING ---NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS ---SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -@ -<<*>>= -<> - -<> -@ -\eject -\begin{thebibliography}{99} -\bibitem{1} nothing -\end{thebibliography} -\end{document} diff --git a/src/algebra/genufact.spad.pamphlet b/src/algebra/genufact.spad.pamphlet deleted file mode 100644 index 94ae432..0000000 --- a/src/algebra/genufact.spad.pamphlet +++ /dev/null @@ -1,116 +0,0 @@ -\documentclass{article} -\usepackage{axiom} -\begin{document} -\title{\$SPAD/src/algebra genufact.spad} -\author{The Axiom Team} -\maketitle -\begin{abstract} -\end{abstract} -\eject -\tableofcontents -\eject -\section{package GENUFACT GenUFactorize} -<>= -)abbrev package GENUFACT GenUFactorize -++ Description -++ This package provides operations for the factorization of univariate polynomials with integer -++ coefficients. The factorization is done by "lifting" the -++ finite "berlekamp's" factorization -GenUFactorize(R) : public == private where - R : EuclideanDomain - PR ==> SparseUnivariatePolynomial R -- with factor - -- should be UnivariatePolynomialCategory - NNI ==> NonNegativeInteger - SUP ==> SparseUnivariatePolynomial - - - public == with - factor : PR -> Factored PR - ++ factor(p) returns the factorisation of p - - private == add - - -- Factorisation currently fails when algebraic extensions have multiple - -- generators. - factorWarning(f:OutputForm):Void == - import AnyFunctions1(String) - import AnyFunctions1(OutputForm) - outputList(["WARNING (genufact): No known algorithm to factor "::Any, _ - f::Any, _ - ", trying square-free."::Any])$OutputPackage - - factor(f:PR) : Factored PR == - R is Integer => (factor f)$GaloisGroupFactorizer(PR) - - R is Fraction Integer => - (factor f)$RationalFactorize(PR) - --- R has Field and R has Finite => - R has FiniteFieldCategory => - (factor f)$DistinctDegreeFactorize(R,PR) - - R is (Complex Integer) => (factor f)$ComplexFactorization(Integer,PR) - - R is (Complex Fraction Integer) => - (factor f)$ComplexFactorization(Fraction Integer,PR) - - R is AlgebraicNumber => (factor f)$AlgFactor(PR) - - -- following is to handle SAE - R has generator : () -> R => - var := symbol(convert(generator()::OutputForm)@InputForm) - up:=UnivariatePolynomial(var,Fraction Integer) - R has MonogenicAlgebra(Fraction Integer, up) => - factor(f)$SimpleAlgebraicExtensionAlgFactor(up, R, PR) - upp:=UnivariatePolynomial(var,Fraction Polynomial Integer) - R has MonogenicAlgebra(Fraction Polynomial Integer, upp) => - factor(f)$SAERationalFunctionAlgFactor(upp, R, PR) - factorWarning(f::OutputForm) - squareFree f - factorWarning(f::OutputForm) - squareFree f - -@ -\section{License} -<>= ---Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd. ---All rights reserved. --- ---Redistribution and use in source and binary forms, with or without ---modification, are permitted provided that the following conditions are ---met: --- --- - Redistributions of source code must retain the above copyright --- notice, this list of conditions and the following disclaimer. --- --- - Redistributions in binary form must reproduce the above copyright --- notice, this list of conditions and the following disclaimer in --- the documentation and/or other materials provided with the --- distribution. --- --- - Neither the name of The Numerical ALgorithms Group Ltd. nor the --- names of its contributors may be used to endorse or promote products --- derived from this software without specific prior written permission. --- ---THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS ---IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED ---TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A ---PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER ---OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, ---EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, ---PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR ---PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF ---LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING ---NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS ---SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -@ -<<*>>= -<> - -<> -@ -\eject -\begin{thebibliography}{99} -\bibitem{1} nothing -\end{thebibliography} -\end{document} diff --git a/src/algebra/genups.spad.pamphlet b/src/algebra/genups.spad.pamphlet deleted file mode 100644 index efc9956..0000000 --- a/src/algebra/genups.spad.pamphlet +++ /dev/null @@ -1,249 +0,0 @@ -\documentclass{article} -\usepackage{axiom} -\begin{document} -\title{\$SPAD/src/algebra genups.spad} -\author{Clifton J. Williamson} -\maketitle -\begin{abstract} -\end{abstract} -\eject -\tableofcontents -\eject -\section{package GENUPS GenerateUnivariatePowerSeries} -<>= -)abbrev package GENUPS GenerateUnivariatePowerSeries -++ Author: Clifton J. Williamson -++ Date Created: 29 April 1990 -++ Date Last Updated: 31 May 1990 -++ Basic Operations: -++ Related Domains: -++ Also See: -++ AMS Classifications: -++ Keywords: series, Taylor, Laurent, Puiseux -++ Examples: -++ References: -++ Description: -++ \spadtype{GenerateUnivariatePowerSeries} provides functions that create -++ power series from explicit formulas for their \spad{n}th coefficient. -GenerateUnivariatePowerSeries(R,FE): Exports == Implementation where - R : Join(IntegralDomain,OrderedSet,RetractableTo Integer,_ - LinearlyExplicitRingOver Integer) - FE : Join(AlgebraicallyClosedField,TranscendentalFunctionCategory,_ - FunctionSpace R) - ANY1 ==> AnyFunctions1 - EQ ==> Equation - I ==> Integer - NNI ==> NonNegativeInteger - RN ==> Fraction Integer - SEG ==> UniversalSegment - ST ==> Stream - SY ==> Symbol - UTS ==> UnivariateTaylorSeries - ULS ==> UnivariateLaurentSeries - UPXS ==> UnivariatePuiseuxSeries - - Exports ==> with - taylor: (I -> FE,EQ FE) -> Any - ++ \spad{taylor(n +-> a(n),x = a)} returns - ++ \spad{sum(n = 0..,a(n)*(x-a)**n)}. - taylor: (FE,SY,EQ FE) -> Any - ++ \spad{taylor(a(n),n,x = a)} returns \spad{sum(n = 0..,a(n)*(x-a)**n)}. - taylor: (I -> FE,EQ FE,SEG NNI) -> Any - ++ \spad{taylor(n +-> a(n),x = a,n0..)} returns - ++ \spad{sum(n=n0..,a(n)*(x-a)**n)}; - ++ \spad{taylor(n +-> a(n),x = a,n0..n1)} returns - ++ \spad{sum(n = n0..,a(n)*(x-a)**n)}. - taylor: (FE,SY,EQ FE,SEG NNI) -> Any - ++ \spad{taylor(a(n),n,x = a,n0..)} returns - ++ \spad{sum(n = n0..,a(n)*(x-a)**n)}; - ++ \spad{taylor(a(n),n,x = a,n0..n1)} returns - ++ \spad{sum(n = n0..,a(n)*(x-a)**n)}. - - laurent: (I -> FE,EQ FE,SEG I) -> Any - ++ \spad{laurent(n +-> a(n),x = a,n0..)} returns - ++ \spad{sum(n = n0..,a(n) * (x - a)**n)}; - ++ \spad{laurent(n +-> a(n),x = a,n0..n1)} returns - ++ \spad{sum(n = n0..n1,a(n) * (x - a)**n)}. - laurent: (FE,SY,EQ FE,SEG I) -> Any - ++ \spad{laurent(a(n),n,x=a,n0..)} returns - ++ \spad{sum(n = n0..,a(n) * (x - a)**n)}; - ++ \spad{laurent(a(n),n,x=a,n0..n1)} returns - ++ \spad{sum(n = n0..n1,a(n) * (x - a)**n)}. - - puiseux: (RN -> FE,EQ FE,SEG RN,RN) -> Any - ++ \spad{puiseux(n +-> a(n),x = a,r0..,r)} returns - ++ \spad{sum(n = r0,r0 + r,r0 + 2*r..., a(n) * (x - a)**n)}; - ++ \spad{puiseux(n +-> a(n),x = a,r0..r1,r)} returns - ++ \spad{sum(n = r0 + k*r while n <= r1, a(n) * (x - a)**n)}. - puiseux: (FE,SY,EQ FE,SEG RN,RN) -> Any - ++ \spad{puiseux(a(n),n,x = a,r0..,r)} returns - ++ \spad{sum(n = r0,r0 + r,r0 + 2*r..., a(n) * (x - a)**n)}; - ++ \spad{puiseux(a(n),n,x = a,r0..r1,r)} returns - ++ \spad{sum(n = r0 + k*r while n <= r1, a(n) * (x - a)**n)}. - - series: (I -> FE,EQ FE) -> Any - ++ \spad{series(n +-> a(n),x = a)} returns - ++ \spad{sum(n = 0..,a(n)*(x-a)**n)}. - series: (FE,SY,EQ FE) -> Any - ++ \spad{series(a(n),n,x = a)} returns - ++ \spad{sum(n = 0..,a(n)*(x-a)**n)}. - series: (I -> FE,EQ FE,SEG I) -> Any - ++ \spad{series(n +-> a(n),x = a,n0..)} returns - ++ \spad{sum(n = n0..,a(n) * (x - a)**n)}; - ++ \spad{series(n +-> a(n),x = a,n0..n1)} returns - ++ \spad{sum(n = n0..n1,a(n) * (x - a)**n)}. - series: (FE,SY,EQ FE,SEG I) -> Any - ++ \spad{series(a(n),n,x=a,n0..)} returns - ++ \spad{sum(n = n0..,a(n) * (x - a)**n)}; - ++ \spad{series(a(n),n,x=a,n0..n1)} returns - ++ \spad{sum(n = n0..n1,a(n) * (x - a)**n)}. - series: (RN -> FE,EQ FE,SEG RN,RN) -> Any - ++ \spad{series(n +-> a(n),x = a,r0..,r)} returns - ++ \spad{sum(n = r0,r0 + r,r0 + 2*r..., a(n) * (x - a)**n)}; - ++ \spad{series(n +-> a(n),x = a,r0..r1,r)} returns - ++ \spad{sum(n = r0 + k*r while n <= r1, a(n) * (x - a)**n)}. - series: (FE,SY,EQ FE,SEG RN,RN) -> Any - ++ \spad{series(a(n),n,x = a,r0..,r)} returns - ++ \spad{sum(n = r0,r0 + r,r0 + 2*r..., a(n) * (x - a)**n)}; - ++ \spad{series(a(n),n,x = a,r0..r1,r)} returns - ++ \spad{sum(n = r0 + k*r while n <= r1, a(n) * (x - a)**n)}. - - Implementation ==> add - - genStream: (I -> FE,I) -> ST FE - genStream(f,n) == delay concat(f(n),genStream(f,n + 1)) - - genFiniteStream: (I -> FE,I,I) -> ST FE - genFiniteStream(f,n,m) == delay - n > m => empty() - concat(f(n),genFiniteStream(f,n + 1,m)) - - taylor(f,eq) == - (xx := retractIfCan(lhs eq)@Union(SY,"failed")) case "failed" => - error "taylor: left hand side must be a variable" - x := xx :: SY; a := rhs eq - coerce(series(genStream(f,0))$UTS(FE,x,a))$ANY1(UTS(FE,x,a)) - - taylor(an:FE,n:SY,eq:EQ FE) == - taylor(eval(an,(n :: FE) = (#1 :: FE)),eq) - - taylor(f:I -> FE,eq:EQ FE,seg:SEG NNI) == - (xx := retractIfCan(lhs eq)@Union(SY,"failed")) case "failed" => - error "taylor: left hand side must be a variable" - x := xx :: SY; a := rhs eq - hasHi seg => - n0 := lo seg; n1 := hi seg - if n1 < n0 then (n0,n1) := (n1,n0) - uts := series(genFiniteStream(f,n0,n1))$UTS(FE,x,a) - uts := uts * monomial(1,n0)$UTS(FE,x,a) - coerce(uts)$ANY1(UTS(FE,x,a)) - n0 := lo seg - uts := series(genStream(f,n0))$UTS(FE,x,a) - uts := uts * monomial(1,n0)$UTS(FE,x,a) - coerce(uts)$ANY1(UTS(FE,x,a)) - - taylor(an,n,eq,seg) == - taylor(eval(an,(n :: FE) = (#1 :: FE)),eq,seg) - - laurent(f,eq,seg) == - (xx := retractIfCan(lhs eq)@Union(SY,"failed")) case "failed" => - error "taylor: left hand side must be a variable" - x := xx :: SY; a := rhs eq - hasHi seg => - n0 := lo seg; n1 := hi seg - if n1 < n0 then (n0,n1) := (n1,n0) - uts := series(genFiniteStream(f,n0,n1))$UTS(FE,x,a) - coerce(laurent(n0,uts)$ULS(FE,x,a))$ANY1(ULS(FE,x,a)) - n0 := lo seg - uts := series(genStream(f,n0))$UTS(FE,x,a) - coerce(laurent(n0,uts)$ULS(FE,x,a))$ANY1(ULS(FE,x,a)) - - laurent(an,n,eq,seg) == - laurent(eval(an,(n :: FE) = (#1 :: FE)),eq,seg) - - modifyFcn:(RN -> FE,I,I,I,I) -> FE - modifyFcn(f,n0,nn,q,m) == (zero?((m - n0) rem nn) => f(m/q); 0) - - puiseux(f,eq,seg,r) == - (xx := retractIfCan(lhs eq)@Union(SY,"failed")) case "failed" => - error "puiseux: left hand side must be a variable" - x := xx :: SY; a := rhs eq - not positive? r => error "puiseux: last argument must be positive" - hasHi seg => - r0 := lo seg; r1 := hi seg - if r1 < r0 then (r0,r1) := (r1,r0) - p0 := numer r0; q0 := denom r0 - p1 := numer r1; q1 := denom r1 - p2 := numer r; q2 := denom r - q := lcm(lcm(q0,q1),q2) - n0 := p0 * (q quo q0); n1 := p1 * (q quo q1) - nn := p2 * (q quo q2) - ulsUnion := laurent(modifyFcn(f,n0,nn,q,#1),eq,segment(n0,n1)) - uls := retract(ulsUnion)$ANY1(ULS(FE,x,a)) - coerce(puiseux(1/q,uls)$UPXS(FE,x,a))$ANY1(UPXS(FE,x,a)) - p0 := numer(r0 := lo seg); q0 := denom r0 - p2 := numer r; q2 := denom r - q := lcm(q0,q2) - n0 := p0 * (q quo q0); nn := p2 * (q quo q2) - ulsUnion := laurent(modifyFcn(f,n0,nn,q,#1),eq,segment n0) - uls := retract(ulsUnion)$ANY1(ULS(FE,x,a)) - coerce(puiseux(1/q,uls)$UPXS(FE,x,a))$ANY1(UPXS(FE,x,a)) - - puiseux(an,n,eq,r0,m) == - puiseux(eval(an,(n :: FE) = (#1 :: FE)),eq,r0,m) - - series(f:I -> FE,eq:EQ FE) == puiseux(f(numer #1),eq,segment 0,1) - series(an:FE,n:SY,eq:EQ FE) == puiseux(an,n,eq,segment 0,1) - series(f:I -> FE,eq:EQ FE,seg:SEG I) == - ratSeg : SEG RN := map(#1::RN,seg)$UniversalSegmentFunctions2(I,RN) - puiseux(f(numer #1),eq,ratSeg,1) - series(an:FE,n:SY,eq:EQ FE,seg:SEG I) == - ratSeg : SEG RN := map(#1::RN,seg)$UniversalSegmentFunctions2(I,RN) - puiseux(an,n,eq,ratSeg,1) - series(f:RN -> FE,eq:EQ FE,seg:SEG RN,r:RN) == puiseux(f,eq,seg,r) - series(an:FE,n:SY,eq:EQ FE,seg:SEG RN,r:RN) == puiseux(an,n,eq,seg,r) - -@ -\section{License} -<>= ---Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd. ---All rights reserved. --- ---Redistribution and use in source and binary forms, with or without ---modification, are permitted provided that the following conditions are ---met: --- --- - Redistributions of source code must retain the above copyright --- notice, this list of conditions and the following disclaimer. --- --- - Redistributions in binary form must reproduce the above copyright --- notice, this list of conditions and the following disclaimer in --- the documentation and/or other materials provided with the --- distribution. --- --- - Neither the name of The Numerical ALgorithms Group Ltd. nor the --- names of its contributors may be used to endorse or promote products --- derived from this software without specific prior written permission. --- ---THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS ---IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED ---TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A ---PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER ---OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, ---EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, ---PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR ---PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF ---LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING ---NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS ---SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -@ -<<*>>= -<> - -<> -@ -\eject -\begin{thebibliography}{99} -\bibitem{1} nothing -\end{thebibliography} -\end{document} diff --git a/src/algebra/ghensel.spad.pamphlet b/src/algebra/ghensel.spad.pamphlet deleted file mode 100644 index 79d49c1..0000000 --- a/src/algebra/ghensel.spad.pamphlet +++ /dev/null @@ -1,202 +0,0 @@ -\documentclass{article} -\usepackage{axiom} -\begin{document} -\title{\$SPAD/src/algebra ghensel.spad} -\author{Patrizia Gianni} -\maketitle -\begin{abstract} -\end{abstract} -\eject -\tableofcontents -\eject -\section{package GHENSEL GeneralHenselPackage} -<>= -)abbrev package GHENSEL GeneralHenselPackage -++ Author : P.Gianni -++ General Hensel Lifting -++ Used for Factorization of bivariate polynomials over a finite field. -GeneralHenselPackage(RP,TP):C == T where - RP : EuclideanDomain - TP : UnivariatePolynomialCategory RP - - PI ==> PositiveInteger - - C == with - HenselLift: (TP,List(TP),RP,PI) -> Record(plist:List(TP), modulo:RP) - ++ HenselLift(pol,lfacts,prime,bound) lifts lfacts, - ++ that are the factors of pol mod prime, - ++ to factors of pol mod prime**k > bound. No recombining is done . - - completeHensel: (TP,List(TP),RP,PI) -> List TP - ++ completeHensel(pol,lfact,prime,bound) lifts lfact, - ++ the factorization mod prime of pol, - ++ to the factorization mod prime**k>bound. - ++ Factors are recombined on the way. - - reduction : (TP,RP) -> TP - ++ reduction(u,pol) computes the symmetric reduction of u mod pol - - T == add - GenExEuclid: (List(FP),List(FP),FP) -> List(FP) - HenselLift1: (TP,List(TP),List(FP),List(FP),RP,RP,F) -> List(TP) - mQuo: (TP,RP) -> TP - - reduceCoef(c:RP,p:RP):RP == - zero? p => c - RP is Integer => symmetricRemainder(c,p) - c rem p - - reduction(u:TP,p:RP):TP == - zero? p => u - RP is Integer => map(symmetricRemainder(#1,p),u) - map(#1 rem p,u) - - merge(p:RP,q:RP):Union(RP,"failed") == - p = q => p - p = 0 => q - q = 0 => p - "failed" - - modInverse(c:RP,p:RP):RP == - (extendedEuclidean(c,p,1)::Record(coef1:RP,coef2:RP)).coef1 - - exactquo(u:TP,v:TP,p:RP):Union(TP,"failed") == - invlcv:=modInverse(leadingCoefficient v,p) - r:=monicDivide(u,reduction(invlcv*v,p)) - reduction(r.remainder,p) ^=0 => "failed" - reduction(invlcv*r.quotient,p) - - FP:=EuclideanModularRing(RP,TP,RP,reduction,merge,exactquo) - - mQuo(poly:TP,n:RP) : TP == map(#1 quo n,poly) - - GenExEuclid(fl:List FP,cl:List FP,rhs:FP) :List FP == - [clp*rhs rem flp for clp in cl for flp in fl] - - -- generate the possible factors - genFact(fln:List TP,factlist:List List TP) : List List TP == - factlist=[] => [[pol] for pol in fln] - maxd := +/[degree f for f in fln] quo 2 - auxfl:List List TP := [] - for poly in fln while factlist^=[] repeat - factlist := [term for term in factlist | ^member?(poly,term)] - dp := degree poly - for term in factlist repeat - (+/[degree f for f in term]) + dp > maxd => "next term" - auxfl := cons(cons(poly,term),auxfl) - auxfl - - HenselLift1(poly:TP,fln:List TP,fl1:List FP,cl1:List FP, - prime:RP,Modulus:RP,cinv:RP):List TP == - lcp := leadingCoefficient poly - rhs := reduce(mQuo(poly - lcp * */fln,Modulus),prime) - zero? rhs => fln - lcinv:=reduce(cinv::TP,prime) - vl := GenExEuclid(fl1,cl1,lcinv*rhs) - [flp + Modulus*(vlp::TP) for flp in fln for vlp in vl] - - HenselLift(poly:TP,tl1:List TP,prime:RP,bound:PI) == - -- convert tl1 - constp:TP:=0 - if degree first tl1 = 0 then - constp:=tl1.first - tl1 := rest tl1 - fl1:=[reduce(ttl,prime) for ttl in tl1] - cl1 := multiEuclidean(fl1,1)::List FP - Modulus:=prime - fln :List TP := [ffl1::TP for ffl1 in fl1] - lcinv:RP:=retract((inv - (reduce((leadingCoefficient poly)::TP,prime)))::TP) - while euclideanSize(Modulus) leave "finished" - fln := nfln - Modulus := prime*Modulus - if constp^=0 then fln:=cons(constp,fln) - [fln,Modulus] - - completeHensel(m:TP,tl1:List TP,prime:RP,bound:PI) == - hlift:=HenselLift(m,tl1,prime,bound) - Modulus:RP:=hlift.modulo - fln:List TP:=hlift.plist - nm := degree m - u:Union(TP,"failed") - aux,auxl,finallist:List TP - auxfl,factlist:List List TP - factlist := [] - dfn :NonNegativeInteger := nm - lcm1 := leadingCoefficient m - mm := lcm1*m - while dfn>0 and (factlist := genFact(fln,factlist))^=[] repeat - auxfl := [] - while factlist^=[] repeat - auxl := factlist.first - factlist := factlist.rest - tc := reduceCoef((lcm1 * */[coefficient(poly,0) - for poly in auxl]), Modulus) - coefficient(mm,0) exquo tc case "failed" => - auxfl := cons(auxl,auxfl) - pol := */[poly for poly in auxl] - poly :=reduction(lcm1*pol,Modulus) - u := mm exquo poly - u case "failed" => auxfl := cons(auxl,auxfl) - poly1: TP := primitivePart poly - m := mQuo((u::TP),leadingCoefficient poly1) - lcm1 := leadingCoefficient(m) - mm := lcm1*m - finallist := cons(poly1,finallist) - dfn := degree m - aux := [] - for poly in fln repeat - ^member?(poly,auxl) => aux := cons(poly,aux) - auxfl := [term for term in auxfl | ^member?(poly,term)] - factlist := [term for term in factlist |^member?(poly,term)] - fln := aux - factlist := auxfl - if dfn > 0 then finallist := cons(m,finallist) - finallist - -@ -\section{License} -<>= ---Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd. ---All rights reserved. --- ---Redistribution and use in source and binary forms, with or without ---modification, are permitted provided that the following conditions are ---met: --- --- - Redistributions of source code must retain the above copyright --- notice, this list of conditions and the following disclaimer. --- --- - Redistributions in binary form must reproduce the above copyright --- notice, this list of conditions and the following disclaimer in --- the documentation and/or other materials provided with the --- distribution. --- --- - Neither the name of The Numerical ALgorithms Group Ltd. nor the --- names of its contributors may be used to endorse or promote products --- derived from this software without specific prior written permission. --- ---THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS ---IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED ---TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A ---PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER ---OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, ---EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, ---PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR ---PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF ---LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING ---NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS ---SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -@ -<<*>>= -<> - -<> -@ -\eject -\begin{thebibliography}{99} -\bibitem{1} nothing -\end{thebibliography} -\end{document} diff --git a/src/algebra/gpgcd.spad.pamphlet b/src/algebra/gpgcd.spad.pamphlet deleted file mode 100644 index bf75891..0000000 --- a/src/algebra/gpgcd.spad.pamphlet +++ /dev/null @@ -1,691 +0,0 @@ -\documentclass{article} -\usepackage{axiom} -\begin{document} -\title{\$SPAD/src/algebra gpgcd.spad} -\author{The Axiom Team} -\maketitle -\begin{abstract} -\end{abstract} -\eject -\tableofcontents -\eject -\section{package GENPGCD GeneralPolynomialGcdPackage} -<>= -)abbrev package GENPGCD GeneralPolynomialGcdPackage -++ Description: -++ This package provides operations for GCD computations -++ on polynomials -GeneralPolynomialGcdPackage(E,OV,R,P):C == T where - R : PolynomialFactorizationExplicit - P : PolynomialCategory(R,E,OV) - OV : OrderedSet - E : OrderedAbelianMonoidSup - - SUPP ==> SparseUnivariatePolynomial P ---JHD ContPrim ==> Record(cont:P,prim:P) - - C == with - gcdPolynomial : (SUPP,SUPP) -> SUPP - ++ gcdPolynomial(p,q) returns the GCD of p and q - randomR : () ->R - ++ randomR() should be local but conditional ---JHD gcd : (P,P) -> P ---JHD gcd : List P -> P ---JHD gcdprim : (P,P) -> P ---JHD gcdprim : List P -> P - ---JHD gcdcofact : List P -> List P ---JHD gcdcofactprim : List P -> List P - ---JHD primitate : (P,OV) -> P ---JHD primitate : SUPP -> SUPP - ---JHD content : P -> P ---JHD content : List P -> List P ---JHD contprim : List P -> List ContPrim - ---JHD monomContent : (P,OV) -> P ---JHD monomContent : SUPP -> SUPP - - - T == add - - SUPR ==> SparseUnivariatePolynomial R ---JHD SUPLGcd ==> Record(locgcd:SUPP,goodint:List R) ---JHD LGcd ==> Record(locgcd:P,goodint:List R) ---JHD UTerm ==> Record(lpol:List SUPR,lint:List R,mpol:P) ---JHD--JHD pmod:R := (prevPrime(2**26)$IntegerPrimesPackage(Integer))::R - ---JHD import MultivariateLifting(E,OV,R,P,pmod) - import UnivariatePolynomialCategoryFunctions2(R,SUPR,P,SUPP) - import UnivariatePolynomialCategoryFunctions2(P,SUPP,R,SUPR) - -------- Local Functions -------- - ---JHD abs : P -> P - better : (P,P) -> Boolean ---JHD failtest : (P,P,P) -> Boolean ---JHD gcdMonom : (P,P,OV) -> P ---JHD gcdTermList : (P,P) -> P ---JHD gcdPrim : (P,P,OV) -> P ---JHD gcdSameMainvar : (P,P,OV) -> P ---JHD internal : (P,P,OV) -> P ---JHD good : (P,List OV) -> Record(upol:SUPR,inval:List R) ---JHD gcdPrs : (P,P,NNI,OV) -> Union(P,"failed") ---JHD ---JHD chooseVal : (P,P,List OV) -> UTerm ---JHD localgcd : (P,P,List OV) -> LGcd ---JHD notCoprime : (P,P, List NNI,List OV) -> P ---JHD imposelc : (List SUPR,List OV,List R,List P) -> List SUPR - ---JHD lift? :(P,P,UTerm,List NNI,List OV) -> Union("failed",P) --- lift :(P,SUPR,SUPR,P,List OV,List NNI,List R) -> P - lift : (SUPR,SUPP,SUPR,List OV,List R) -> Union(SUPP,"failed") - -- lifts first and third arguments as factors of the second - -- fourth is number of variables. ---JHD monomContent : (P,OV) -> P - monomContentSup : SUPP -> SUPP --- ---JHD gcdcofact : List P -> List P - - gcdTrivial : (SUPP,SUPP) -> SUPP - gcdSameVariables: (SUPP,SUPP,List OV) -> SUPP - recursivelyGCDCoefficients: (SUPP,List OV,SUPP,List OV) -> SUPP - flatten : (SUPP,List OV) -> SUPP - -- evaluates out all variables in the second - -- argument, leaving a polynomial of the same - -- degree --- eval : (SUPP,List OV,List R) -> SUPP - variables : SUPP -> List OV - ---- JHD's exported functions --- - gcdPolynomial(p1:SUPP,p2:SUPP) == - zero? p1 => p2 - zero? p2 => p1 - 0=degree p1 => gcdTrivial(p1,p2) - 0=degree p2 => gcdTrivial(p2,p1) - if degree p1 < degree p2 then (p1,p2):=(p2,p1) - p1 exquo p2 case SUPP => (unitNormal p2).canonical - c1:= monomContentSup(p1) - c2:= monomContentSup(p2) - p1:= (p1 exquo c1)::SUPP - p2:= (p2 exquo c2)::SUPP - (p1 exquo p2) case SUPP => (unitNormal p2).canonical * gcd(c1,c2) - vp1:=variables p1 - vp2:=variables p2 - v1:=setDifference(vp1,vp2) - v2:=setDifference(vp2,vp1) - #v1 = 0 and #v2 = 0 => gcdSameVariables(p1,p2,vp1)*gcd(c1,c2) - -- all variables are in common - v:=setDifference(vp1,v1) - pp1:=flatten(p1,v1) - pp2:=flatten(p2,v2) - g:=gcdSameVariables(pp1,pp2,v) --- one? g => gcd(c1,c2)::SUPP - (g = 1) => gcd(c1,c2)::SUPP - (#v1 = 0 or not (p1 exquo g) case "failed") and - -- if #vi = 0 then pp1 = p1, so we know g divides - (#v2 = 0 or not (p2 exquo g) case "failed") - => g*gcd(c1,c2) -- divdes them both, so is the gcd - -- OK, so it's not the gcd: try again - v:=variables g -- there can be at most these variables in answer - v1:=setDifference(vp1,v) - v2:=setDifference(vp2,v) - if (#v1 = 0) then g:= gcdSameVariables(g,flatten(p2,v2),v) - else if (#v2=0) then g:=gcdSameVariables(g,flatten(p1,v1),v) - else g:=gcdSameVariables(g,flatten(p1,v1)-flatten(p2,v2),v) --- one? g => gcd(c1,c2)::SUPP - (g = 1) => gcd(c1,c2)::SUPP - (#v1 = 0 or not (p1 exquo g) case "failed") and - (#v2 = 0 or not (p2 exquo g) case "failed") - => g*gcd(c1,c2)::SUPP -- divdes them both, so is the gcd - v:=variables g -- there can be at most these variables in answer - v1:=setDifference(vp1,v) - if #v1 ^= 0 then - g:=recursivelyGCDCoefficients(g,v,p1,v1) --- one? g => return gcd(c1,c2)::SUPP - (g = 1) => return gcd(c1,c2)::SUPP - v:=variables g -- there can be at most these variables in answer - v2:=setDifference(vp2,v) - recursivelyGCDCoefficients(g,v,p2,v2)*gcd(c1,c2) - if R has StepThrough then - randomCount:R := init() - randomR() == - (v:=nextItem(randomCount)) case R => - randomCount:=v - v - SAY("Taking next stepthrough range in GeneralPolynomialGcdPackage")$Lisp - randomCount:=init() - randomCount - else - randomR() == (random$Integer() rem 100)::R - ---- JHD's local functions --- - gcdSameVariables(p1:SUPP,p2:SUPP,lv:List OV) == - -- two non-trivial primitive (or, at least, we don't care - -- about content) - -- polynomials with precisely the same degree - #lv = 0 => map(#1::P,gcdPolynomial(map(ground,p1), - map(ground,p2))) - degree p2 = 1 => - p1 exquo p2 case SUPP => p2 - 1 - gcdLC:=gcd(leadingCoefficient p1,leadingCoefficient p2) - lr:=[randomR() for vv in lv] - count:NonNegativeInteger:=0 - while count<10 repeat - while zero? eval(gcdLC,lv,lr) and count<10 repeat - lr:=[randomR() for vv in lv] - count:=count+1 - count = 10 => error "too many evaluations in GCD code" - up1:SUPR:=map(ground eval(#1,lv,lr),p1) - up2:SUPR:=map(ground eval(#1,lv,lr),p2) - u:=gcdPolynomial(up1,up2) - degree u = 0 => return 1 - -- let's pick a second one, just to check - lrr:=[randomR() for vv in lv] - while zero? eval(gcdLC,lv,lrr) and count<10 repeat - lrr:=[randomR() for vv in lv] - count:=count+1 - count = 10 => error "too many evaluations in GCD code" - vp1:SUPR:=map(ground eval(#1,lv,lrr),p1) - vp2:SUPR:=map(ground eval(#1,lv,lrr),p2) - v:=gcdPolynomial(vp1,vp2) - degree v = 0 => return 1 - if degree v < degree u then - u:=v - up1:=vp1 - up2:=vp2 - lr:=lrr - up1:=(up1 exquo u)::SUPR - degree gcd(u,up1) = 0 => - ans:=lift(u,p1,up1,lv,lr) - ans case SUPP => return ans - "next" - up2:=(up2 exquo u)::SUPR - degree gcd(u,up2) = 0 => - ans:=lift(u,p2,up2,lv,lr) - ans case SUPP => return ans - "next" - -- so neither cofactor is relatively prime - count:=0 - while count < 10 repeat - r:=randomR() - uu:=up1+r*up2 - degree gcd(u,uu)=0 => - ans:= lift(u,p1+r::P *p2,uu,lv,lr) - ans case SUPP => return ans - "next" - error "too many evaluations in GCD code" - count >= 10 => error "too many evaluations in GCD code" - lift(gR:SUPR,p:SUPP,cfR:SUPR,lv:List OV,lr:List R) == - -- lift the coprime factorisation gR*cfR = (univariate of p) - -- where the variables lv have been evaluated at lr - lcp:=leadingCoefficient p - g:=monomial(lcp,degree gR)+map(#1::P,reductum gR) - cf:=monomial(lcp,degree cfR)+map(#1::P,reductum cfR) - p:=lcp*p -- impose leaidng coefficient of p on each factor - while lv ^= [] repeat - v:=first lv - r:=first lr - lv:=rest lv - lr:=rest lr - thisp:=map(eval(#1,lv,lr),p) - d:="max"/[degree(c,v) for c in coefficients p] - prime:=v::P - r::P - pn:=prime - origFactors:=[g,cf]::List SUPP - for n in 1..d repeat - Ecart:=(thisp- g*cf) exquo pn - Ecart case "failed" => - error "failed lifting in hensel in Complex Polynomial GCD" - zero? Ecart => leave - step:=solveLinearPolynomialEquation(origFactors, - map(eval(#1,v,r),Ecart::SUPP)) - step case "failed" => return "failed" - g:=g+pn*first step - cf:=cf+pn*second step - pn:=pn*prime - thisp ^= g*cf => return "failed" - g - recursivelyGCDCoefficients(g:SUPP,v:List OV,p:SUPP,pv:List OV) == - mv:=first pv -- take each coefficient w.r.t. mv - pv:=rest pv -- and recurse on pv as necessary - d:="max"/[degree(u,mv) for u in coefficients p] - for i in 0..d repeat - p1:=map(coefficient(#1,mv,i),p) - oldg:=g - if pv = [] then g:=gcdSameVariables(g,p1,v) - else g:=recursivelyGCDCoefficients(p,v,p1,pv) --- one? g => return 1 - (g = 1) => return 1 - g^=oldg => - oldv:=v - v:=variables g - pv:=setUnion(pv,setDifference(v,oldv)) - g - flatten(p1:SUPP,lv:List OV) == - #lv = 0 => p1 - lr:=[ randomR() for vv in lv] - dg:=degree p1 - while dg ^= degree (ans:= map(eval(#1,lv,lr),p1)) repeat - lr:=[ randomR() for vv in lv] - ans --- eval(p1:SUPP,lv:List OV,lr:List R) == map(eval(#1,lv,lr),p1) - variables(p1:SUPP) == - removeDuplicates ("concat"/[variables u for u in coefficients p1]) - gcdTrivial(p1:SUPP,p2:SUPP) == - -- p1 is non-zero, but has degree zero - -- p2 is non-zero - cp1:=leadingCoefficient p1 --- one? cp1 => 1 - (cp1 = 1) => 1 - degree p2 = 0 => gcd(cp1,leadingCoefficient p2)::SUPP - un?:=unit? cp1 - while not zero? p2 and not un? repeat - cp1:=gcd(leadingCoefficient p2,cp1) - un?:=unit? cp1 - p2:=reductum p2 - un? => 1 - cp1::SUPP - - ---- Local functions ---- ---JHD -- test if something wrong happened in the gcd ---JHD failtest(f:P,p1:P,p2:P) : Boolean == ---JHD (p1 exquo f) case "failed" or (p2 exquo f) case "failed" ---JHD ---JHD -- Choose the integers ---JHD chooseVal(p1:P,p2:P,lvar:List OV):UTerm == ---JHD x:OV:=lvar.first ---JHD lvr:=lvar.rest ---JHD d1:=degree(p1,x) ---JHD d2:=degree(p2,x) ---JHD dd:NNI:=0$NNI ---JHD nvr:NNI:=#lvr ---JHD lval:List R :=[] ---JHD range:I:=8 ---JHD for i in 1.. repeat ---JHD range:=2*range ---JHD lval:=[(random()$I rem (2*range) - range)::R for i in 1..nvr] ---JHD uf1:SUPR:=univariate eval(p1,lvr,lval) ---JHD degree uf1 ^= d1 => "new point" ---JHD uf2:SUPR:=univariate eval(p2,lvr,lval) ---JHD degree uf2 ^= d2 => "new point" ---JHD u:=gcd(uf1,uf2) ---JHD du:=degree u ---JHD --the univariate gcd is 1 ---JHD if du=0 then return [[1$SUPR],lval,0$P]$UTerm ---JHD ---JHD ugcd:List SUPR:=[u,(uf1 exquo u)::SUPR,(uf2 exquo u)::SUPR] ---JHD uterm:=[ugcd,lval,0$P]$UTerm ---JHD dd=0 => dd:=du ---JHD ---JHD --the degree is not changed ---JHD du=dd => ---JHD ---JHD --test if one of the polynomials is the gcd ---JHD dd=d1 => ---JHD if ^((f:=p2 exquo p1) case "failed") then ---JHD return [[u],lval,p1]$UTerm ---JHD if dd^=d2 then dd:=(dd-1)::NNI ---JHD ---JHD dd=d2 => ---JHD if ^((f:=p1 exquo p2) case "failed") then ---JHD return [[u],lval,p2]$UTerm ---JHD dd:=(dd-1)::NNI ---JHD return uterm ---JHD ---JHD --the new gcd has degree less ---JHD du
dd:=du ---JHD ---JHD good(f:P,lvr:List OV):Record(upol:SUPR,inval:List R) == ---JHD nvr:NNI:=#lvr ---JHD range:I:=1 ---JHD ltry:List List R:=[] ---JHD while true repeat ---JHD range:=2*range ---JHD lval:=[(random()$I rem (2*range) -range)::R for i in 1..nvr] ---JHD member?(lval,ltry) => "new point" ---JHD ltry:=cons(lval,ltry) ---JHD uf:=univariate eval(f,lvr,lval) ---JHD if degree gcd(uf,differentiate uf)=0 then return [uf,lval] ---JHD ---JHD -- impose the right lc ---JHD imposelc(lipol:List SUPR, ---JHD lvar:List OV,lval:List R,leadc:List P):List SUPR == ---JHD result:List SUPR :=[] ---JHD lvar:=lvar.rest ---JHD for pol in lipol for leadpol in leadc repeat ---JHD p1:= univariate eval(leadpol,lvar,lval) * pol ---JHD result:= cons((p1 exquo leadingCoefficient pol)::SUPR,result) ---JHD reverse result ---JHD ---JHD --Compute the gcd between not coprime polynomials ---JHD notCoprime(g:P,p2:P,ldeg:List NNI,lvar:List OV) : P == ---JHD x:OV:=lvar.first ---JHD lvar1:List OV:=lvar.rest ---JHD lg1:=gcdcofact([g,differentiate(g,x)]) ---JHD g1:=lg1.1 ---JHD lg:LGcd:=localgcd(g1,p2,lvar) ---JHD (l,lval):=(lg.locgcd,lg.goodint) ---JHD p2:=(p2 exquo l)::P ---JHD (gd1,gd2):=(l,l) ---JHD ul:=univariate(eval(l,lvar1,lval)) ---JHD dl:=degree ul ---JHD if degree gcd(ul,differentiate ul) ^=0 then ---JHD newchoice:=good(l,lvar.rest) ---JHD ul:=newchoice.upol ---JHD lval:=newchoice.inval ---JHD ug1:=univariate(eval(g1,lvar1,lval)) ---JHD ulist:=[ug1,univariate eval(p2,lvar1,lval)] ---JHD lcpol:=[leadingCoefficient univariate(g1,x), ---JHD leadingCoefficient univariate(p2,x)] ---JHD while true repeat ---JHD d:SUPR:=gcd(cons(ul,ulist)) ---JHD if degree d =0 then return gd1 ---JHD lquo:=(ul exquo d)::SUPR ---JHD if degree lquo ^=0 then ---JHD lgcd:=gcd(cons(leadingCoefficient univariate(l,x),lcpol)) ---JHD gd2:=lift(l,d,lquo,lgcd,lvar,ldeg,lval) ---JHD l:=gd2 ---JHD ul:=univariate(eval(l,lvar1,lval)) ---JHD dl:=degree ul ---JHD gd1:=gd1*gd2 ---JHD ulist:=[(uf exquo d)::SUPR for uf in ulist] ---JHD ---JHD -- we suppose that the poly have the same mainvar, deg p1#2,setUnion(variables p1,variables p2)) ---JHD d1:=degree(p1,x) ---JHD d2:=degree(p2,x) ---JHD result: P:=localgcd(p1,p2,lvar).locgcd ---JHD -- special cases ---JHD result=1 => 1$P ---JHD (dr:=degree(result,x))=d1 or dr=d2 => result ---JHD while failtest(result,p1,p2) repeat ---JHD SAY$Lisp "retrying gcd" ---JHD result:=localgcd(p1,p2,lvar).locgcd ---JHD result ---JHD ---JHD --local function for the gcd : it returns the evaluation point too ---JHD localgcd(p1:P,p2:P,lvar:List(OV)) : LGcd == ---JHD x:OV:=lvar.first ---JHD uterm:=chooseVal(p1,p2,lvar) ---JHD listpol:= uterm.lpol ---JHD ud:=listpol.first ---JHD dd:= degree ud ---JHD ---JHD --the univariate gcd is 1 ---JHD dd=0 => [1$P,uterm.lint]$LGcd ---JHD ---JHD --one of the polynomials is the gcd ---JHD dd=degree(p1,x) or dd=degree(p2,x) => ---JHD [uterm.mpol,uterm.lint]$LGcd ---JHD ldeg:List NNI:=map(min,degree(p1,lvar),degree(p2,lvar)) ---JHD ---JHD -- if there is a polynomial g s.t. g/gcd and gcd are coprime ... ---JHD -- I can lift ---JHD (h:=lift?(p1,p2,uterm,ldeg,lvar)) case "failed" => ---JHD [notCoprime(p1,p2,ldeg,lvar),uterm.lint]$LGcd ---JHD [h::P,uterm.lint]$LGcd ---JHD ---JHD ---JHD -- content, internal functions return the poly if it is a monomial ---JHD monomContent(p:P,var:OV):P == ---JHD ground? p => 1$P ---JHD md:= minimumDegree(p,var) ---JHD ((var::P)**md)*(gcd sort(better,coefficients univariate(p,var))) - - monomContentSup(u:SUPP):SUPP == - degree(u) = 0$NonNegativeInteger => 1$SUPP - md:= minimumDegree u - gcd(sort(better,coefficients u)) * monomial(1$P,md)$SUPP - ---JHD -- change the polynomials to have positive lc ---JHD abs(p:P): P == unitNormal(p).canonical - - -- Ordering for gcd purposes - better(p1:P,p2:P):Boolean == - ground? p1 => true - ground? p2 => false - degree(p1,mainVariable(p1)::OV) < degree(p2,mainVariable(p2)::OV) - - -- PRS algorithm - -- gcdPrs(p1:P,p2:P,d:NNI,var:OV):Union(P,"failed") == - -- u1:= univariate(p1,var) - -- u2:= univariate(p2,var) - -- finished:Boolean:= false - -- until finished repeat - -- dd:NNI:=(degree u1 - degree u2)::NNI - -- lc1:SUPP:=leadingCoefficient u2 * reductum u1 - -- lc2:SUPP:=leadingCoefficient u1 * reductum u2 - -- u3:SUPP:= primitate((lc1-lc2)*monomial(1$P,dd))$% - -- (d3:=degree(u3)) <= d => finished:= true - -- u1:= u2 - -- u2:= u3 - -- if d3 > degree(u1) then (u1,u2):= (u2,u1) - -- g:= (u2 exquo u3) - -- g case SUPP => abs multivariate(u3,var) - -- "failed" - - -- Gcd between polynomial p1 and p2 with - -- mainVariable p1 < x=mainVariable p2 ---JHD gcdTermList(p1:P,p2:P) : P == ---JHD termList:=sort(better, ---JHD cons(p1,coefficients univariate(p2,(mainVariable p2)::OV))) ---JHD q:P:=termList.first ---JHD for term in termList.rest until q = 1$P repeat q:= gcd(q,term) ---JHD q ---JHD ---JHD -- Gcd between polynomials with the same mainVariable ---JHD gcdSameMainvar(p1:P,p2:P,mvar:OV): P == ---JHD if degree(p1,mvar) < degree(p2,mvar) then (p1,p2):= (p2,p1) ---JHD (p1 exquo p2) case P => abs p2 ---JHD c1:= monomContent(p1,mvar)$% ---JHD c1 = p1 => gcdMonom(p1,p2,mvar) ---JHD c2:= monomContent(p2,mvar)$% ---JHD c2 = p2 => gcdMonom(p2,p1,mvar) ---JHD p1:= (p1 exquo c1)::P ---JHD p2:= (p2 exquo c2)::P ---JHD if degree(p1,mvar) < degree(p2,mvar) then (p1,p2):= (p2,p1) ---JHD (p1 exquo p2) case P => abs(p2) * gcd(c1,c2) ---JHD abs(gcdPrim(p1,p2,mvar)) * gcd(c1,c2) ---JHD ---JHD -- make the polynomial primitive with respect to var ---JHD primitate(p:P,var:OV):P == (p exquo monomContent(p,var))::P ---JHD ---JHD primitate(u:SUPP):SUPP == (u exquo monomContentSup u)::SUPP ---JHD ---JHD -- gcd between primitive polynomials with the same mainVariable ---JHD gcdPrim(p1:P,p2:P,mvar:OV):P == ---JHD vars:= removeDuplicates append(variables p1,variables p2) ---JHD #vars=1 => multivariate(gcd(univariate p1,univariate p2),mvar) ---JHD vars:=delete(vars,position(mvar,vars)) ---JHD --d:= degModGcd(p1,p2,mvar,vars) ---JHD --d case "failed" => internal(p2,p1,mvar) ---JHD --deg:= d:NNI ---JHD --deg = 0$NNI => 1$P ---JHD --deg = degree(p1,mvar) => ---JHD -- (p2 exquo p1) case P => abs(p1) -- already know that ---JHD -- ^(p1 exquo p2) ---JHD -- internal(p2,p1,mvar) ---JHD --cheapPrs?(p1,p2,deg,mvar) => ---JHD -- g:= gcdPrs(p1,p2,deg,mvar) ---JHD -- g case P => g::P ---JHD -- internal(p2,p1,mvar) ---JHD internal(p2,p1,mvar) ---JHD ---JHD -- gcd between a monomial and a polynomial ---JHD gcdMonom(m:P,p:P,var:OV):P == ---JHD ((var::P) ** min(minimumDegree(m,var),minimumDegree(p,var))) * ---JHD gcdTermList(leadingCoefficient(univariate(m,var)),p) ---JHD ---JHD --If there is a pol s.t. pol/gcd and gcd are coprime I can lift ---JHD lift?(p1:P,p2:P,uterm:UTerm,ldeg:List NNI, ---JHD lvar:List OV) : Union("failed",P) == ---JHD x:OV:=lvar.first ---JHD leadpol:Boolean:=false ---JHD (listpol,lval):=(uterm.lpol,uterm.lint) ---JHD d:=listpol.first ---JHD listpol:=listpol.rest ---JHD nolift:Boolean:=true ---JHD for uf in listpol repeat ---JHD --note uf and d not necessarily primitive ---JHD degree gcd(uf,d) =0 => nolift:=false ---JHD nolift => "failed" ---JHD f:P:=([p1,p2]$List(P)).(position(uf,listpol)) ---JHD lgcd:=gcd(leadingCoefficient univariate(p1,x), ---JHD leadingCoefficient univariate(p2,x)) ---JHD lift(f,d,uf,lgcd,lvar,ldeg,lval) ---JHD ---JHD -- interface with the general "lifting" function ---JHD lift(f:P,d:SUPR,uf:SUPR,lgcd:P,lvar:List OV, ---JHD ldeg:List NNI,lval:List R):P == ---JHD x:OV:=lvar.first ---JHD leadpol:Boolean:=false ---JHD lcf:P ---JHD lcf:=leadingCoefficient univariate(f,x) ---JHD df:=degree(f,x) ---JHD leadlist:List(P):=[] ---JHD ---JHD if lgcd^=1$P then ---JHD leadpol:=true ---JHD f:=lgcd*f ---JHD ldeg:=[n0+n1 for n0 in ldeg for n1 in degree(lgcd,lvar)] ---JHD lcd:R:=leadingCoefficient d ---JHD if ground? lgcd then d:=((retract lgcd) *d exquo lcd)::SUPR ---JHD else d:=(retract(eval(lgcd,lvar.rest,lval)) * d exquo lcd)::SUPR ---JHD uf:=lcd*uf ---JHD leadlist:=[lgcd,lcf] ---JHD lg:=imposelc([d,uf],lvar,lval,leadlist) ---JHD plist:=lifting(univariate(f,x),lvar,lg,lval,leadlist,ldeg)::List P ---JHD (p0:P,p1:P):=(plist.first,plist.2) ---JHD if univariate eval(p0,rest lvar,lval) ^= lg.first then ---JHD (p0,p1):=(p1,p0) ---JHD ^leadpol => p0 ---JHD cprim:=contprim([p0]) ---JHD cprim.first.prim ---JHD ---JHD -- Gcd for two multivariate polynomials ---JHD gcd(p1:P,p2:P) : P == ---JHD (p1:= abs(p1)) = (p2:= abs(p2)) => p1 ---JHD ground? p1 => ---JHD p1 = 1$P => p1 ---JHD p1 = 0$P => p2 ---JHD ground? p2 => gcd((retract p1)@R,(retract p2)@R)::P ---JHD gcdTermList(p1,p2) ---JHD ground? p2 => ---JHD p2 = 1$P => p2 ---JHD p2 = 0$P => p1 ---JHD gcdTermList(p2,p1) ---JHD mv1:= mainVariable(p1)::OV ---JHD mv2:= mainVariable(p2)::OV ---JHD mv1 = mv2 => gcdSameMainvar(p1,p2,mv1) ---JHD mv1 < mv2 => gcdTermList(p1,p2) ---JHD gcdTermList(p2,p1) ---JHD ---JHD -- Gcd for a list of multivariate polynomials ---JHD gcd(listp:List P) : P == ---JHD lf:=sort(better,listp) ---JHD f:=lf.first ---JHD for g in lf.rest repeat ---JHD f:=gcd(f,g) ---JHD if f=1$P then return f ---JHD f ---JHD -- Gcd and cofactors for a list of polynomials ---JHD gcdcofact(listp : List P) : List P == ---JHD h:=gcd listp ---JHD cons(h,[(f exquo h) :: P for f in listp]) ---JHD ---JHD -- Gcd for primitive polynomials ---JHD gcdprim(p1:P,p2:P):P == ---JHD (p1:= abs(p1)) = (p2:= abs(p2)) => p1 ---JHD ground? p1 => ---JHD ground? p2 => gcd((retract p1)@R,(retract p2)@R)::P ---JHD p1 = 0$P => p2 ---JHD 1$P ---JHD ground? p2 => ---JHD p2 = 0$P => p1 ---JHD 1$P ---JHD mv1:= mainVariable(p1)::OV ---JHD mv2:= mainVariable(p2)::OV ---JHD mv1 = mv2 => ---JHD md:=min(minimumDegree(p1,mv1),minimumDegree(p2,mv1)) ---JHD mp:=1$P ---JHD if md>1 then ---JHD mp:=(mv1::P)**md ---JHD p1:=(p1 exquo mp)::P ---JHD p2:=(p2 exquo mp)::P ---JHD mp*gcdPrim(p1,p2,mv1) ---JHD 1$P ---JHD ---JHD -- Gcd for a list of primitive multivariate polynomials ---JHD gcdprim(listp:List P) : P == ---JHD lf:=sort(better,listp) ---JHD f:=lf.first ---JHD for g in lf.rest repeat ---JHD f:=gcdprim(f,g) ---JHD if f=1$P then return f ---JHD f ---JHD -- Gcd and cofactors for a list of primitive polynomials ---JHD gcdcofactprim(listp : List P) : List P == ---JHD h:=gcdprim listp ---JHD cons(h,[(f exquo h) :: P for f in listp]) ---JHD ---JHD -- content of a polynomial (with respect to its main var) ---JHD content(f:P):P == ---JHD ground? f => f ---JHD x:OV:=(mainVariable f)::OV ---JHD gcd sort(better,coefficients univariate(f,x)) ---JHD ---JHD -- contents of a list of polynomials ---JHD content(listf:List P) : List P == [content f for f in listf] ---JHD ---JHD -- contents and primitive parts of a list of polynomials ---JHD contprim(listf:List P) : List ContPrim == ---JHD prelim :List P := content listf ---JHD [[q,(f exquo q)::P]$ContPrim for q in prelim for f in listf] ---JHD - -@ -\section{License} -<>= ---Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd. ---All rights reserved. --- ---Redistribution and use in source and binary forms, with or without ---modification, are permitted provided that the following conditions are ---met: --- --- - Redistributions of source code must retain the above copyright --- notice, this list of conditions and the following disclaimer. --- --- - Redistributions in binary form must reproduce the above copyright --- notice, this list of conditions and the following disclaimer in --- the documentation and/or other materials provided with the --- distribution. --- --- - Neither the name of The Numerical ALgorithms Group Ltd. nor the --- names of its contributors may be used to endorse or promote products --- derived from this software without specific prior written permission. --- ---THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS ---IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED ---TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A ---PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER ---OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, ---EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, ---PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR ---PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF ---LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING ---NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS ---SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -@ -<<*>>= -<> - -<> -@ -\eject -\begin{thebibliography}{99} -\bibitem{1} nothing -\end{thebibliography} -\end{document} diff --git a/src/algebra/grdef.spad.pamphlet b/src/algebra/grdef.spad.pamphlet deleted file mode 100644 index bfcdf37..0000000 --- a/src/algebra/grdef.spad.pamphlet +++ /dev/null @@ -1,143 +0,0 @@ -\documentclass{article} -\usepackage{axiom} -\begin{document} -\title{\$SPAD/src/algebra grdef.spad} -\author{Clifton J. Williamson} -\maketitle -\begin{abstract} -\end{abstract} -\eject -\tableofcontents -\eject -\section{package GRDEF GraphicsDefaults} -<>= -)abbrev package GRDEF GraphicsDefaults -++ Author: Clifton J. Williamson -++ Date Created: 8 January 1990 -++ Date Last Updated: 8 January 1990 -++ Basic Operations: clipPointsDefault, drawToScale, adaptive, maxPoints, -++ minPoints, screenResolution -++ Related Constructors: -++ Also See: -++ AMS Classifications: -++ Keywords: -++ References: -++ Description: TwoDimensionalPlotSettings sets global flags and constants -++ for 2-dimensional plotting. - -GraphicsDefaults(): Exports == Implementation where - B ==> Boolean - I ==> Integer - SF ==> DoubleFloat - maxWidth ==> 1000 - maxHeight ==> 1000 - - Exports ==> with - clipPointsDefault: () -> B - ++ clipPointsDefault() determines whether or not automatic clipping is - ++ to be done. - drawToScale: () -> B - ++ drawToScale() determines whether or not plots are to be drawn to scale. - - clipPointsDefault: B -> B - ++ clipPointsDefault(true) turns on automatic clipping; - ++ \spad{clipPointsDefault(false)} turns off automatic clipping. - ++ The default setting is true. - drawToScale: B -> B - ++ drawToScale(true) causes plots to be drawn to scale. - ++ \spad{drawToScale(false)} causes plots to be drawn so that they - ++ fill up the viewport window. - ++ The default setting is false. - ---% settings from the two-dimensional plot package - - adaptive: () -> B - ++ adaptive() determines whether plotting will be done adaptively. - maxPoints: () -> I - ++ maxPoints() returns the maximum number of points in a plot. - minPoints: () -> I - ++ minPoints() returns the minimum number of points in a plot. - screenResolution: () -> I - ++ screenResolution() returns the screen resolution n. - - adaptive: B -> B - ++ adaptive(true) turns adaptive plotting on; - ++ \spad{adaptive(false)} turns adaptive plotting off. - maxPoints: I -> I - ++ maxPoints() sets the maximum number of points in a plot. - minPoints: I -> I - ++ minPoints() sets the minimum number of points in a plot. - screenResolution: I -> I - ++ screenResolution(n) sets the screen resolution to n. - - Implementation ==> add - ---% global flags and constants - - CLIPPOINTSDEFAULT : B := true - TOSCALE : B := false - ---% functions - - clipPointsDefault() == CLIPPOINTSDEFAULT - drawToScale() == TOSCALE - - clipPointsDefault b == CLIPPOINTSDEFAULT := b - drawToScale b == TOSCALE := b - ---% settings from the two-dimensional plot package - - adaptive() == adaptive?()$Plot - minPoints() == minPoints()$Plot - maxPoints() == maxPoints()$Plot - screenResolution() == screenResolution()$Plot - - adaptive b == setAdaptive(b)$Plot - minPoints n == setMinPoints(n)$Plot - maxPoints n == setMaxPoints(n)$Plot - screenResolution n == setScreenResolution(n)$Plot - -@ -\section{License} -<>= ---Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd. ---All rights reserved. --- ---Redistribution and use in source and binary forms, with or without ---modification, are permitted provided that the following conditions are ---met: --- --- - Redistributions of source code must retain the above copyright --- notice, this list of conditions and the following disclaimer. --- --- - Redistributions in binary form must reproduce the above copyright --- notice, this list of conditions and the following disclaimer in --- the documentation and/or other materials provided with the --- distribution. --- --- - Neither the name of The Numerical ALgorithms Group Ltd. nor the --- names of its contributors may be used to endorse or promote products --- derived from this software without specific prior written permission. --- ---THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS ---IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED ---TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A ---PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER ---OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, ---EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, ---PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR ---PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF ---LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING ---NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS ---SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -@ -<<*>>= -<> - -<> -@ -\eject -\begin{thebibliography}{99} -\bibitem{1} nothing -\end{thebibliography} -\end{document} diff --git a/src/algebra/groebf.spad.pamphlet b/src/algebra/groebf.spad.pamphlet deleted file mode 100644 index 26feae1..0000000 --- a/src/algebra/groebf.spad.pamphlet +++ /dev/null @@ -1,583 +0,0 @@ -\documentclass{article} -\usepackage{axiom} -\begin{document} -\title{\$SPAD/src/algebra groebf.spad} -\author{H. Michael Moeller, Johannes Grabmeier} -\maketitle -\begin{abstract} -\end{abstract} -\eject -\tableofcontents -\eject -\section{package GBF GroebnerFactorizationPackage} -<>= --- groebf.spad.pamphlet GroebnerFactorizationPackage.input -)spool GroebnerFactorizationPackage.output -)set message test on -)set message auto off -)clear all ---S 1 of 3 -mfzn : SQMATRIX(6,DMP([x,y,z],Fraction INT)) := [ [0,1,1,1,1,1], [1,0,1,8/3,x,8/3], [1,1,0,1,8/3,y], [1,8/3,1,0,1,8/3], [1,x,8/3,1,0,1], [1,8/3,y,8/3,1,0] ] ---R ---R ---R +0 1 1 1 1 1+ ---R | | ---R | 8 8| ---R |1 0 1 - x -| ---R | 3 3| ---R | | ---R | 8 | ---R |1 1 0 1 - y| ---R | 3 | ---R | | ---R (1) | 8 8| ---R |1 - 1 0 1 -| ---R | 3 3| ---R | | ---R | 8 | ---R |1 x - 1 0 1| ---R | 3 | ---R | | ---R | 8 8 | ---R |1 - y - 1 0| ---R + 3 3 + ---RType: SquareMatrix(6,DistributedMultivariatePolynomial([x,y,z],Fraction Integer)) ---E 1 - ---S 2 of 3 -eq := determinant mfzn ---R ---R ---R (2) ---R 2 2 22 2 25 2 22 2 388 250 25 2 250 14575 ---R - x y + -- x y - -- x + -- x y - --- x y - --- x - -- y - --- y + ----- ---R 3 9 3 9 27 9 27 81 ---R Type: DistributedMultivariatePolynomial([x,y,z],Fraction Integer) ---E 2 - ---S 3 of 3 -groebnerFactorize [eq,eval(eq, [x,y,z],[y,z,x]), eval(eq,[x,y,z],[z,x,y])] ---R ---R ---R (3) ---R [ ---R 22 22 22 121 ---R [x y + x z - -- x + y z - -- y - -- z + ---, ---R 3 3 3 3 ---R 2 22 25 2 22 25 22 2 388 250 ---R x z - -- x z + -- x + y z - -- y z + -- y - -- z + --- z + ---, ---R 3 9 3 9 3 9 27 ---R 2 2 22 2 25 2 22 2 388 250 25 2 250 14575 ---R y z - -- y z + -- y - -- y z + --- y z + --- y + -- z + --- z - -----] ---R 3 9 3 9 27 9 27 81 ---R , ---R 21994 2 21994 4427 463 ---R [x + y - -----,y - ----- y + ----,z - ---], ---R 5625 5625 675 87 ---R 2 1 11 5 265 2 38 265 ---R [x - - x z - -- x - - z + ---,y - z,z - -- z + ---], ---R 2 2 6 18 3 9 ---R 25 11 11 11 11 11 5 5 5 ---R [x - --,y - --,z - --], [x - --,y - --,z - --], [x + -,y + -,z + -], ---R 9 3 3 3 3 3 3 3 3 ---R 19 5 5 ---R [x - --,y + -,z + -]] ---R 3 3 3 ---R Type: List List DistributedMultivariatePolynomial([x,y,z],Fraction Integer) ---E 3 -)spool -)lisp (bye) -@ -<>= -==================================================================== -GroebnerFactorizationPackage examples -==================================================================== - -Solving systems of polynomial equations with the Groebner basis -algorithm can often be very time consuming because, in general, the -algorithm has exponential run-time. These systems, which often come -from concrete applications, frequently have symmetries which are not -taken advantage of by the algorithm. However, it often happens in -this case that the polynomials which occur during the Groebner -calculations are reducible. Since Axiom has an excellent polynomial -factorization algorithm, it is very natural to combine the Groebner -and factorization algorithms. - -GroebnerFactorizationPackage exports the groebnerFactorize operation -which implements a modified Groebner basis algorithm. In this -algorithm, each polynomial that is to be put into the partial list of -the basis is first factored. The remaining calculation is split into -as many parts as there are irreducible factors. Call these factors -p1,...,pN. In the branches corresponding to p2,...,pN, the factor p1 -can be divided out, and so on. This package also contains operations -that allow you to specify the polynomials that are not zero on the -common roots of the final Groebner basis. - -Here is an example from chemistry. In a theoretical model of the -cyclohexan C6H12, the six carbon atoms each sit in the center of -gravity of a tetrahedron that has two hydrogen atoms and two carbon -atoms at its corners. We first normalize and set the length of each -edge to 1. Hence, the distances of one fixed carbon atom to each of -its immediate neighbours is 1. We will denote the distances to the -other three carbon atoms by x, y and z. - -A. Dress developed a theory to decide whether a set of points -and distances between them can be realized in an n-dimensional space. -Here, of course, we have n = 3. - - mfzn : SQMATRIX(6,DMP([x,y,z],Fraction INT)) := _ - [ [0,1,1,1,1,1], [1,0,1,8/3,x,8/3], [1,1,0,1,8/3,y], _ - [1,8/3,1,0,1,8/3], [1,x,8/3,1,0,1], [1,8/3,y,8/3,1,0] ] - +0 1 1 1 1 1+ - | | - | 8 8| - |1 0 1 - x -| - | 3 3| - | | - | 8 | - |1 1 0 1 - y| - | 3 | - | | - | 8 8| - |1 - 1 0 1 -| - | 3 3| - | | - | 8 | - |1 x - 1 0 1| - | 3 | - | | - | 8 8 | - |1 - y - 1 0| - + 3 3 + -Type: SquareMatrix(6,DistributedMultivariatePolynomial([x,y,z], - Fraction Integer)) - -For the cyclohexan, the distances have to satisfy this equation. - - eq := determinant mfzn - 2 2 22 2 25 2 22 2 388 250 25 2 250 14575 - - x y + -- x y - -- x + -- x y - --- x y - --- x - -- y - --- y + ----- - 3 9 3 9 27 9 27 81 - Type: DistributedMultivariatePolynomial([x,y,z],Fraction Integer) - -They also must satisfy the equations given by cyclic shifts of the -indeterminates. - - groebnerFactorize [eq,eval(eq, [x,y,z],[y,z,x]), eval(eq,[x,y,z],[z,x,y])] - [ - 22 22 22 121 - [x y + x z - -- x + y z - -- y - -- z + ---, - 3 3 3 3 - 2 22 25 2 22 25 22 2 388 250 - x z - -- x z + -- x + y z - -- y z + -- y - -- z + --- z + ---, - 3 9 3 9 3 9 27 - 2 2 22 2 25 2 22 2 388 250 25 2 250 14575 - y z - -- y z + -- y - -- y z + --- y z + --- y + -- z + --- z - -----] - 3 9 3 9 27 9 27 81 - , - 21994 2 21994 4427 463 - [x + y - -----,y - ----- y + ----,z - ---], - 5625 5625 675 87 - 2 1 11 5 265 2 38 265 - [x - - x z - -- x - - z + ---,y - z,z - -- z + ---], - 2 2 6 18 3 9 - 25 11 11 11 11 11 5 5 5 - [x - --,y - --,z - --], [x - --,y - --,z - --], [x + -,y + -,z + -], - 9 3 3 3 3 3 3 3 3 - 19 5 5 - [x - --,y + -,z + -]] - 3 3 3 - Type: List List DistributedMultivariatePolynomial([x,y,z],Fraction Integer) - -The union of the solutions of this list is the solution of our original -problem. If we impose positivity conditions, we get two relevant ideals. -One ideal is zero-dimensional, namely x = y = z =11/3, and this determines -the "boat" form of the cyclohexan. The other ideal is one-dimensional, -which means that we have a solution space given by one parameter. This -gives the "chair" form of the cyclohexan. The parameter describes the -angle of the "back of the chair." - -groebnerFactorize has an optional Boolean-valued second argument. -When it is true partial results are displayed, since it may happen -that the calculation does not terminate in a reasonable time. See the -source code for GroebnerFactorizationPackage in groebf.spad.pamphlet -for more details about the algorithms used. - -See Also: -o )show GroebnerFactorizationPackage -o $AXIOM/doc/src/algebra/groebf.spad.dvi - -@ -<>= -)abbrev package GBF GroebnerFactorizationPackage -++ Author: H. Michael Moeller, Johannes Grabmeier -++ Date Created: 24 August 1989 -++ Date Last Updated: 01 January 1992 -++ Basic Operations: groebnerFactorize factorGroebnerBasis -++ Related Constructors: -++ Also See: GroebnerPackage, Ideal, IdealDecompositionPackage -++ AMS Classifications: -++ Keywords: groebner basis, groebner factorization, ideal decomposition -++ References: -++ Description: -++ \spadtype{GroebnerFactorizationPackage} provides the function -++ groebnerFactor" which uses the factorization routines of \Language{} to -++ factor each polynomial under consideration while doing the groebner basis -++ algorithm. Then it writes the ideal as an intersection of ideals -++ determined by the irreducible factors. Note that the whole ring may -++ occur as well as other redundancies. We also use the fact, that from the -++ second factor on we can assume that the preceding factors are -++ not equal to 0 and we divide all polynomials under considerations -++ by the elements of this list of "nonZeroRestrictions". -++ The result is a list of groebner bases, whose union of solutions -++ of the corresponding systems of equations is the solution of -++ the system of equation corresponding to the input list. -++ The term ordering is determined by the polynomial type used. -++ Suggested types include -++ \spadtype{DistributedMultivariatePolynomial}, -++ \spadtype{HomogeneousDistributedMultivariatePolynomial}, -++ \spadtype{GeneralDistributedMultivariatePolynomial}. - -GroebnerFactorizationPackage(Dom, Expon, VarSet, Dpol): T == C where - - Dom : Join(EuclideanDomain,CharacteristicZero) - Expon : OrderedAbelianMonoidSup - VarSet : OrderedSet - Dpol: PolynomialCategory(Dom, Expon, VarSet) - MF ==> MultivariateFactorize(VarSet,Expon,Dom,Dpol) - sugarPol ==> Record(totdeg: NonNegativeInteger, pol : Dpol) - critPair ==> Record(lcmfij: Expon,totdeg: NonNegativeInteger, poli: Dpol, polj: Dpol ) - L ==> List - B ==> Boolean - NNI ==> NonNegativeInteger - OUT ==> OutputForm - - T ==> with - - factorGroebnerBasis : L Dpol -> L L Dpol - ++ factorGroebnerBasis(basis) checks whether the basis contains - ++ reducible polynomials and uses these to split the basis. - factorGroebnerBasis : (L Dpol, Boolean) -> L L Dpol - ++ factorGroebnerBasis(basis,info) checks whether the basis contains - ++ reducible polynomials and uses these to split the basis. - ++ If argument {\em info} is true, information is printed about - ++ partial results. - groebnerFactorize : (L Dpol, L Dpol) -> L L Dpol - ++ groebnerFactorize(listOfPolys, nonZeroRestrictions) returns - ++ a list of groebner basis. The union of their solutions - ++ is the solution of the system of equations given by {\em listOfPolys} - ++ under the restriction that the polynomials of {\em nonZeroRestrictions} - ++ don't vanish. - ++ At each stage the polynomial p under consideration (either from - ++ the given basis or obtained from a reduction of the next S-polynomial) - ++ is factorized. For each irreducible factors of p, a - ++ new {\em createGroebnerBasis} is started - ++ doing the usual updates with the factor - ++ in place of p. - groebnerFactorize : (L Dpol, L Dpol, Boolean) -> L L Dpol - ++ groebnerFactorize(listOfPolys, nonZeroRestrictions, info) returns - ++ a list of groebner basis. The union of their solutions - ++ is the solution of the system of equations given by {\em listOfPolys} - ++ under the restriction that the polynomials of {\em nonZeroRestrictions} - ++ don't vanish. - ++ At each stage the polynomial p under consideration (either from - ++ the given basis or obtained from a reduction of the next S-polynomial) - ++ is factorized. For each irreducible factors of p a - ++ new {\em createGroebnerBasis} is started - ++ doing the usual updates with the factor in place of p. - ++ If argument {\em info} is true, information is printed about - ++ partial results. - groebnerFactorize : L Dpol -> L L Dpol - ++ groebnerFactorize(listOfPolys) returns - ++ a list of groebner bases. The union of their solutions - ++ is the solution of the system of equations given by {\em listOfPolys}. - ++ At each stage the polynomial p under consideration (either from - ++ the given basis or obtained from a reduction of the next S-polynomial) - ++ is factorized. For each irreducible factors of p, a - ++ new {\em createGroebnerBasis} is started - ++ doing the usual updates with the factor - ++ in place of p. - groebnerFactorize : (L Dpol, Boolean) -> L L Dpol - ++ groebnerFactorize(listOfPolys, info) returns - ++ a list of groebner bases. The union of their solutions - ++ is the solution of the system of equations given by {\em listOfPolys}. - ++ At each stage the polynomial p under consideration (either from - ++ the given basis or obtained from a reduction of the next S-polynomial) - ++ is factorized. For each irreducible factors of p, a - ++ new {\em createGroebnerBasis} is started - ++ doing the usual updates with the factor - ++ in place of p. - ++ If {\em info} is true, information is printed about partial results. - - C ==> add - - import GroebnerInternalPackage(Dom,Expon,VarSet,Dpol) - -- next to help compiler to choose correct signatures: - info: Boolean - -- signatures of local functions - - newPairs : (L sugarPol, Dpol) -> L critPair - -- newPairs(lp, p) constructs list of critical pairs from the list of - -- {\em lp} of input polynomials and a given further one p. - -- It uses criteria M and T to reduce the list. - updateCritPairs : (L critPair, L critPair, Dpol) -> L critPair - -- updateCritPairs(lcP1,lcP2,p) applies criterion B to {\em lcP1} using - -- p. Then this list is merged with {\em lcP2}. - updateBasis : (L sugarPol, Dpol, NNI) -> L sugarPol - -- updateBasis(li,p,deg) every polynomial in {\em li} is dropped if - -- its leading term is a multiple of the leading term of p. - -- The result is this list enlarged by p. - createGroebnerBases : (L sugarPol, L Dpol, L Dpol, L Dpol, L critPair,_ - L L Dpol, Boolean) -> L L Dpol - -- createGroebnerBases(basis, redPols, nonZeroRestrictions, inputPolys, - -- lcP,listOfBases): This function is used to be called from - -- groebnerFactorize. - -- basis: part of a Groebner basis, computed so far - -- redPols: Polynomials from the ideal to be used for reducing, - -- we don't throw away polynomials - -- nonZeroRestrictions: polynomials not zero in the common zeros - -- of the polynomials in the final (Groebner) basis - -- inputPolys: assumed to be in descending order - -- lcP: list of critical pairs built from polynomials of the - -- actual basis - -- listOfBases: Collects the (Groebner) bases constructed by this - -- recursive algorithm at different stages. - -- we print info messages if info is true - createAllFactors: Dpol -> L Dpol - -- factor reduced critpair polynomial - - -- implementation of local functions - - - createGroebnerBases(basis, redPols, nonZeroRestrictions, inputPolys,_ - lcP, listOfBases, info) == - doSplitting? : B := false - terminateWithBasis : B := false - allReducedFactors : L Dpol := [] - nP : Dpol -- actual polynomial under consideration - p : Dpol -- next polynomial from input list - h : Dpol -- next polynomial from critical pairs - stopDividing : Boolean - -- STEP 1 do the next polynomials until a splitting is possible - -- In the first step we take the first polynomial of "inputPolys" - -- if empty, from list of critical pairs "lcP" and do the following: - -- Divide it, if possible, by the polynomials from "nonZeroRestrictions". - -- We factorize it and reduce each irreducible factor with respect to - -- "basis". If 0$Dpol occurs in the list we update the list and continue - -- with next polynomial. - -- If there are at least two (irreducible) factors - -- in the list of factors we finish STEP 1 and set a boolean variable - -- to continue with STEP 2, the splitting step. - -- If there is just one of it, we do the following: - -- If it is 1$Dpol we stop the whole calculation and put - -- [1$Dpol] into the listOfBases - -- Otherwise we update the "basis" and the other lists and continue - -- with next polynomial. - - while (not doSplitting?) and (not terminateWithBasis) repeat - terminateWithBasis := (null inputPolys and null lcP) - not terminateWithBasis => -- still polynomials left - -- determine next polynomial "nP" - nP := - not null inputPolys => - p := first inputPolys - inputPolys := rest inputPolys - -- we know that p is not equal to 0 or 1, but, although, - -- the inputPolys and the basis are ordered, we cannot assume - -- that p is reduced w.r.t. basis, as the ordering is only quasi - -- and we could have equal leading terms, and due to factorization - -- polynomials of smaller leading terms, hence reduce p first: - hMonic redPol(p,redPols) - -- now we have inputPolys empty and hence lcP is not empty: - -- create S-Polynomial from first critical pair: - h := sPol first lcP - lcP := rest lcP - hMonic redPol(h,redPols) - - nP = 1$Dpol => - basis := [[0,1$Dpol]$sugarPol] - terminateWithBasis := true - - -- if "nP" ^= 0, then we continue, otherwise we determine next "nP" - nP ^= 0$Dpol => - -- now we divide "nP", if possible, by the polynomials - -- from "nonZeroRestrictions" - for q in nonZeroRestrictions repeat - stopDividing := false - until stopDividing repeat - nPq := nP exquo q - stopDividing := (nPq case "failed") - if not stopDividing then nP := autoCoerce nPq - stopDividing := stopDividing or zero? degree nP - - zero? degree nP => - basis := [[0,1$Dpol]$sugarPol] - terminateWithBasis := true -- doSplitting? is still false - - -- a careful analysis has to be done, when and whether the - -- following reduction and case nP=1 is necessary - - nP := hMonic redPol(nP,redPols) - zero? degree nP => - basis := [[0,1$Dpol]$sugarPol] - terminateWithBasis := true -- doSplitting? is still false - - -- if "nP" ^= 0, then we continue, otherwise we determine next "nP" - nP ^= 0$Dpol => - -- now we factorize "nP", which is not constant - irreducibleFactors : L Dpol := createAllFactors(nP) - -- if there are more than 1 factors we reduce them and split - (doSplitting? := not null rest irreducibleFactors) => - -- and reduce and normalize the factors - for fnP in irreducibleFactors repeat - fnP := hMonic redPol(fnP,redPols) - -- no factor reduces to 0, as then "fP" would have been - -- reduced to zero, - -- but 1 may occur, which we will drop in a later version. - allReducedFactors := cons(fnP, allReducedFactors) - -- end of "for fnP in irreducibleFactors repeat" - - -- we want that the smaller factors are dealt with first - allReducedFactors := reverse allReducedFactors - -- now the case of exactly 1 factor, but certainly not - -- further reducible with respect to "redPols" - nP := first irreducibleFactors - -- put "nP" into "basis" and update "lcP" and "redPols": - lcP : L critPair := updateCritPairs(lcP,newPairs(basis,nP),nP) - basis := updateBasis(basis,nP,virtualDegree nP) - redPols := concat(redPols,nP) - -- end of "while not doSplitting? and not terminateWithBasis repeat" - - -- STEP 2 splitting step - - doSplitting? => - for fnP in allReducedFactors repeat - if fnP ^= 1$Dpol - then - newInputPolys : L Dpol := _ - sort( degree #1 > degree #2 ,cons(fnP,inputPolys)) - listOfBases := createGroebnerBases(basis, redPols, _ - nonZeroRestrictions,newInputPolys,lcP,listOfBases,info) - -- update "nonZeroRestrictions" - nonZeroRestrictions := cons(fnP,nonZeroRestrictions) - else - if info then - messagePrint("we terminated with [1]")$OUT - listOfBases := cons([1$Dpol],listOfBases) - - -- we finished with all the branches on one level and hence - -- finished this call of createGroebnerBasis. Therefore - -- we terminate with the actual "listOfBasis" as - -- everything is done in the recursions - listOfBases - -- end of "doSplitting? =>" - - -- STEP 3 termination step - - -- we found a groebner basis and put it into the list "listOfBases" - -- (auto)reduce each basis element modulo the others - newBasis := minGbasis(sort(degree #1 > degree #2,[p.pol for p in basis])) - -- now check whether the normalized basis again has reducible - -- polynomials, in this case continue splitting! - if info then - messagePrint("we found a groebner basis and check whether it ")$OUT - messagePrint("contains reducible polynomials")$OUT - print(newBasis::OUT)$OUT - -- here we should create an output form which is reusable by the system - -- print(convert(newBasis::OUT)$InputForm :: OUT)$OUT - removeDuplicates append(factorGroebnerBasis(newBasis, info), listOfBases) - - createAllFactors(p: Dpol) == - loF : L Dpol := [el.fctr for el in factorList factor(p)$MF] - sort(degree #1 < degree #2, loF) - newPairs(lp : L sugarPol,p : Dpol) == - totdegreeOfp : NNI := virtualDegree p - -- next list lcP contains all critPair constructed from - -- p and and the polynomials q in lp - lcP: L critPair := _ - --[[sup(degree q, degreeOfp), q, p]$critPair for q in lp] - [makeCrit(q, p, totdegreeOfp) for q in lp] - -- application of the criteria to reduce the list lcP - critMTonD1 sort(critpOrder,lcP) - updateCritPairs(oldListOfcritPairs, newListOfcritPairs, p)== - updatD (newListOfcritPairs, critBonD(p,oldListOfcritPairs)) - updateBasis(lp, p, deg) == updatF(p,deg,lp) - - -- exported functions - - factorGroebnerBasis basis == factorGroebnerBasis(basis, false) - - factorGroebnerBasis (basis, info) == - foundAReducible : Boolean := false - for p in basis while not foundAReducible repeat - -- we use fact that polynomials have content 1 - foundAReducible := 1 < #[el.fctr for el in factorList factor(p)$MF] - not foundAReducible => - if info then messagePrint("factorGroebnerBasis: no reducible polynomials in this basis")$OUT - [basis] - -- improve! Use the fact that the irreducible ones already - -- build part of the basis, use the done factorizations, etc. - if info then messagePrint("factorGroebnerBasis:_ - we found reducible polynomials and continue splitting")$OUT - createGroebnerBases([],[],[],basis,[],[],info) - - groebnerFactorize(basis, nonZeroRestrictions) == - groebnerFactorize(basis, nonZeroRestrictions, false) - - groebnerFactorize(basis, nonZeroRestrictions, info) == - basis = [] => [basis] - basis := remove(#1 = 0$Dpol,basis) - basis = [] => [[0$Dpol]] - -- normalize all input polynomial - basis := [hMonic p for p in basis] - member?(1$Dpol,basis) => [[1$Dpol]] - basis := sort(degree #1 > degree #2, basis) - createGroebnerBases([],[],nonZeroRestrictions,basis,[],[],info) - - groebnerFactorize(basis) == groebnerFactorize(basis, [], false) - groebnerFactorize(basis,info) == groebnerFactorize(basis, [], info) - -@ -\section{License} -<>= ---Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd. ---All rights reserved. --- ---Redistribution and use in source and binary forms, with or without ---modification, are permitted provided that the following conditions are ---met: --- --- - Redistributions of source code must retain the above copyright --- notice, this list of conditions and the following disclaimer. --- --- - Redistributions in binary form must reproduce the above copyright --- notice, this list of conditions and the following disclaimer in --- the documentation and/or other materials provided with the --- distribution. --- --- - Neither the name of The Numerical ALgorithms Group Ltd. nor the --- names of its contributors may be used to endorse or promote products --- derived from this software without specific prior written permission. --- ---THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS ---IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED ---TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A ---PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER ---OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, ---EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, ---PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR ---PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF ---LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING ---NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS ---SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -@ -<<*>>= -<> - -<> -@ -\eject -\begin{thebibliography}{99} -\bibitem{1} nothing -\end{thebibliography} -\end{document} diff --git a/src/algebra/groebsol.spad.pamphlet b/src/algebra/groebsol.spad.pamphlet deleted file mode 100644 index b2e4ab7..0000000 --- a/src/algebra/groebsol.spad.pamphlet +++ /dev/null @@ -1,245 +0,0 @@ -\documentclass{article} -\usepackage{axiom} -\begin{document} -\title{\$SPAD/src/algebra groebsol.spad} -\author{Patrizia Gianni} -\maketitle -\begin{abstract} -\end{abstract} -\eject -\tableofcontents -\eject -\section{package GROEBSOL GroebnerSolve} -<>= -)abbrev package GROEBSOL GroebnerSolve -++ Author : P.Gianni, Summer '88, revised November '89 -++ Solve systems of polynomial equations using Groebner bases -++ Total order Groebner bases are computed and then converted to lex ones -++ This package is mostly intended for internal use. -GroebnerSolve(lv,F,R) : C == T - - where - R : GcdDomain - F : GcdDomain - lv : List Symbol - - NNI ==> NonNegativeInteger - I ==> Integer - S ==> Symbol - - OV ==> OrderedVariableList(lv) - IES ==> IndexedExponents Symbol - - DP ==> DirectProduct(#lv,NonNegativeInteger) - DPoly ==> DistributedMultivariatePolynomial(lv,F) - - HDP ==> HomogeneousDirectProduct(#lv,NonNegativeInteger) - HDPoly ==> HomogeneousDistributedMultivariatePolynomial(lv,F) - - SUP ==> SparseUnivariatePolynomial(DPoly) - L ==> List - P ==> Polynomial - - C == with - groebSolve : (L DPoly,L OV) -> L L DPoly - ++ groebSolve(lp,lv) reduces the polynomial system lp in variables lv - ++ to triangular form. Algorithm based on groebner bases algorithm - ++ with linear algebra for change of ordering. - ++ Preprocessing for the general solver. - ++ The polynomials in input are of type \spadtype{DMP}. - - testDim : (L HDPoly,L OV) -> Union(L HDPoly,"failed") - ++ testDim(lp,lv) tests if the polynomial system lp - ++ in variables lv is zero dimensional. - - genericPosition : (L DPoly, L OV) -> Record(dpolys:L DPoly, coords: L I) - ++ genericPosition(lp,lv) puts a radical zero dimensional ideal - ++ in general position, for system lp in variables lv. - - T == add - import PolToPol(lv,F) - import GroebnerPackage(F,DP,OV,DPoly) - import GroebnerInternalPackage(F,DP,OV,DPoly) - import GroebnerPackage(F,HDP,OV,HDPoly) - import LinGroebnerPackage(lv,F) - - nv:NNI:=#lv - - ---- test if f is power of a linear mod (rad lpol) ---- - ---- f is monic ---- - testPower(uf:SUP,x:OV,lpol:L DPoly) : Union(DPoly,"failed") == - df:=degree(uf) - trailp:DPoly := coefficient(uf,(df-1)::NNI) - (testquo := trailp exquo (df::F)) case "failed" => "failed" - trailp := testquo::DPoly - gg:=gcd(lc:=leadingCoefficient(uf),trailp) - trailp := (trailp exquo gg)::DPoly - lc := (lc exquo gg)::DPoly - linp:SUP:=monomial(lc,1$NNI)$SUP + monomial(trailp,0$NNI)$SUP - g:DPoly:=multivariate(uf-linp**df,x) - redPol(g,lpol) ^= 0 => "failed" - multivariate(linp,x) - - -- is the 0-dimensional ideal I in general position ? -- - ---- internal function ---- - testGenPos(lpol:L DPoly,lvar:L OV):Union(L DPoly,"failed") == - rlpol:=reverse lpol - f:=rlpol.first - #lvar=1 => [f] - rlvar:=rest reverse lvar - newlpol:List(DPoly):=[f] - for f in rlpol.rest repeat - x:=first rlvar - fi:= univariate(f,x) - if (mainVariable leadingCoefficient fi case "failed") then - if ((g:= testPower(fi,x,newlpol)) case "failed") - then return "failed" - newlpol :=concat(redPol(g::DPoly,newlpol),newlpol) - rlvar:=rest rlvar - else if redPol(f,newlpol)^=0 then return"failed" - newlpol - - - -- change coordinates and out the ideal in general position ---- - genPos(lp:L DPoly,lvar:L OV): Record(polys:L HDPoly, lpolys:L DPoly, - coord:L I, univp:HDPoly) == - rlvar:=reverse lvar - lnp:=[dmpToHdmp(f) for f in lp] - x := first rlvar;rlvar:=rest rlvar - testfail:=true - for count in 1.. while testfail repeat - ranvals:L I:=[1+(random()$I rem (count*(# lvar))) for vv in rlvar] - val:=+/[rv*(vv::HDPoly) - for vv in rlvar for rv in ranvals] - val:=val+x::HDPoly - gb:L HDPoly:= [elt(univariate(p,x),val) for p in lnp] - gb:=groebner gb - gbt:=totolex gb - (gb1:=testGenPos(gbt,lvar)) case "failed"=>"try again" - testfail:=false - [gb,gbt,ranvals,dmpToHdmp(last (gb1::L DPoly))] - - genericPosition(lp:L DPoly,lvar:L OV) == - nans:=genPos(lp,lvar) - [nans.lpolys, nans.coord] - - ---- select the univariate factors - select(lup:L L HDPoly) : L L HDPoly == - lup=[] => list [] - [:[cons(f,lsel) for lsel in select lup.rest] for f in lup.first] - - ---- in the non generic case, we compute the prime ideals ---- - ---- associated to leq, basis is the algebra basis ---- - findCompon(leq:L HDPoly,lvar:L OV):L L DPoly == - teq:=totolex(leq) - #teq = #lvar => [teq] - -- ^((teq1:=testGenPos(teq,lvar)) case "failed") => [teq1::L DPoly] - gp:=genPos(teq,lvar) - lgp:= gp.polys - g:HDPoly:=gp.univp - fg:=(factor g)$GeneralizedMultivariateFactorize(OV,HDP,R,F,HDPoly) - lfact:=[ff.factor for ff in factors(fg::Factored(HDPoly))] - result: L L HDPoly := [] - #lfact=1 => [teq] - for tfact in lfact repeat - tlfact:=concat(tfact,lgp) - result:=concat(tlfact,result) - ranvals:L I:=gp.coord - rlvar:=reverse lvar - x:=first rlvar - rlvar:=rest rlvar - val:=+/[rv*(vv::HDPoly) for vv in rlvar for rv in ranvals] - val:=(x::HDPoly)-val - ans:=[totolex groebner [elt(univariate(p,x),val) for p in lp] - for lp in result] - [ll for ll in ans | ll^=[1]] - - zeroDim?(lp: List HDPoly,lvar:L OV) : Boolean == - empty? lp => false - n:NNI := #lvar - #lp < n => false - lvint1 := lvar - for f in lp while not empty?(lvint1) repeat - g:= f - reductum f - x:=mainVariable(g)::OV - if ground?(leadingCoefficient(univariate(g,x))) then - lvint1 := remove(x, lvint1) - empty? lvint1 - - -- general solve, gives an error if the system not 0-dimensional - groebSolve(leq: L DPoly,lvar:L OV) : L L DPoly == - lnp:=[dmpToHdmp(f) for f in leq] - leq1:=groebner lnp - #(leq1) = 1 and first(leq1) = 1 => list empty() - ^(zeroDim?(leq1,lvar)) => - error "system does not have a finite number of solutions" - -- add computation of dimension, for a more useful error - basis:=computeBasis(leq1) - lup:L HDPoly:=[] - llfact:L Factored(HDPoly):=[] - for x in lvar repeat - g:=minPol(leq1,basis,x) - fg:=(factor g)$GeneralizedMultivariateFactorize(OV,HDP,R,F,HDPoly) - llfact:=concat(fg::Factored(HDPoly),llfact) - if degree(g,x) = #basis then leave "stop factoring" - result: L L DPoly := [] - -- selecting a factor from the lists of the univariate factors - lfact:=select [[ff.factor for ff in factors llf] - for llf in llfact] - for tfact in lfact repeat - tfact:=groebner concat(tfact,leq1) - tfact=[1] => "next value" - result:=concat(result,findCompon(tfact,lvar)) - result - - -- test if the system is zero dimensional - testDim(leq : L HDPoly,lvar : L OV) : Union(L HDPoly,"failed") == - leq1:=groebner leq - #(leq1) = 1 and first(leq1) = 1 => empty() - ^(zeroDim?(leq1,lvar)) => "failed" - leq1 - -@ -\section{License} -<>= ---Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd. ---All rights reserved. --- ---Redistribution and use in source and binary forms, with or without ---modification, are permitted provided that the following conditions are ---met: --- --- - Redistributions of source code must retain the above copyright --- notice, this list of conditions and the following disclaimer. --- --- - Redistributions in binary form must reproduce the above copyright --- notice, this list of conditions and the following disclaimer in --- the documentation and/or other materials provided with the --- distribution. --- --- - Neither the name of The Numerical ALgorithms Group Ltd. nor the --- names of its contributors may be used to endorse or promote products --- derived from this software without specific prior written permission. --- ---THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS ---IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED ---TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A ---PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER ---OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, ---EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, ---PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR ---PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF ---LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING ---NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS ---SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -@ -<<*>>= -<> - -<> -@ -\eject -\begin{thebibliography}{99} -\bibitem{1} nothing -\end{thebibliography} -\end{document} diff --git a/src/axiom-website/patches.html b/src/axiom-website/patches.html index 2897cdd..9c0a93c 100644 --- a/src/axiom-website/patches.html +++ b/src/axiom-website/patches.html @@ -915,5 +915,9 @@ bookvol10.4 add packages
bookvol10.4 add packages
20090129.01.mxr.patch i-funsel.boot document mmCost
+20090130.01.tpd.patch +help documentation fixes and packages
+20090131.01.tpd.patch +help documentation fixes and packages