=================================================================== RCS file: /home/cvs/OpenXM/src/kan96xx/Doc/hol.sm1,v retrieving revision 1.9 retrieving revision 1.14 diff -u -p -r1.9 -r1.14 --- OpenXM/src/kan96xx/Doc/hol.sm1 2000/12/29 07:19:37 1.9 +++ OpenXM/src/kan96xx/Doc/hol.sm1 2004/05/04 07:48:47 1.14 @@ -1,4 +1,4 @@ -% $OpenXM: OpenXM/src/kan96xx/Doc/hol.sm1,v 1.8 2000/08/01 05:53:18 takayama Exp $ +% $OpenXM: OpenXM/src/kan96xx/Doc/hol.sm1,v 1.13 2003/07/29 08:36:39 takayama Exp $ %% hol.sm1, 1998, 11/8, 11/10, 11/14, 11/25, 1999, 5/18, 6/5. 2000, 6/8 %% rank, rrank, characteristic %% This file is error clean. @@ -272,10 +272,14 @@ message-quiet /gb.v 1 def /gb.verbose 0 def /gb.options [ ] def +/gb.characteristic 0 def +/gb.homogenized 0 def +/gb.autoHomogenize 1 def /gb { /arg1 set [/in-gb /aa /typev /setarg /f /v /gg /wv /termorder /vec /ans /rr /mm + /degreeShift /env2 ] pushVariables [(CurrentRingp) (KanGBmessage)] pushEnv [ @@ -284,6 +288,7 @@ message-quiet aa isArray { } { ( << array >> gb) error } ifelse /setarg 0 def /wv 0 def + /degreeShift 0 def aa { tag } map /typev set typev [ ArrayP ] eq { /f aa 0 get def @@ -295,6 +300,11 @@ message-quiet /v aa 1 get def /setarg 1 def } { } ifelse + typev [ArrayP RingP] eq + { /f aa 0 get def + /v aa 1 get def + /setarg 1 def + } { } ifelse typev [ArrayP ArrayP] eq { /f aa 0 get def /v aa 1 get from_records def @@ -312,52 +322,85 @@ message-quiet /wv aa 2 get def /setarg 1 def } { } ifelse + typev [ArrayP StringP ArrayP ArrayP] eq + { /f aa 0 get def + /v aa 1 get def + /wv aa 2 get def + /degreeShift aa 3 get def + /setarg 1 def + } { } ifelse + typev [ArrayP ArrayP ArrayP ArrayP] eq + { /f aa 0 get def + /v aa 1 get from_records def + /wv aa 2 get def + /degreeShift aa 3 get def + /setarg 1 def + } { } ifelse + /env1 getOptions def + setarg { } { (gb : Argument mismatch) error } ifelse [(KanGBmessage) gb.verbose ] system_variable %%% Start of the preprocess - f getRing /rr set + v tag RingP eq { + /rr v def + }{ + f getRing /rr set + } ifelse %% To the normal form : matrix expression. f gb.toMatrixOfString /f set /mm gb.itWasMatrix def - rr tag 0 eq { + rr tag 0 eq + v isInteger not + or { %% Define our own ring v isInteger { (Error in gb: Specify variables) error } { } ifelse wv isInteger { [v ring_of_differential_operators - 0] define_ring + gb.characteristic] define_ring /termorder 1 def }{ - [v ring_of_differential_operators - wv weight_vector - 0] define_ring - wv gb.isTermOrder /termorder set + degreeShift isInteger { + [v ring_of_differential_operators + wv weight_vector + gb.characteristic] define_ring + wv gb.isTermOrder /termorder set + }{ + [v ring_of_differential_operators + wv weight_vector + gb.characteristic + [(degreeShift) degreeShift] + ] define_ring + wv gb.isTermOrder /termorder set + } ifelse } ifelse } { %% Use the ring structre given by the input. - v isInteger not { - gb.warning { - (Warning : the given ring definition is not used.) message - } { } ifelse - } { } ifelse rr ring_def /wv rr gb.getWeight def wv gb.isTermOrder /termorder set } ifelse %%% Enf of the preprocess + termorder { + /gb.homogenized 0 def + }{ + /gb.homogenized 1 def + } ifelse gb.verbose { (gb.options = ) messagen gb.options message } { } ifelse termorder { - f { {. dehomogenize} map } map /f set + f { {,,, dehomogenize} map } map /f set [f gb.options] groebner_sugar 0 get /gg set }{ - f { {. dehomogenize} map} map /f set - f fromVectors { homogenize } map /f set + f { {,,, dehomogenize} map} map /f set + gb.autoHomogenize { + f fromVectors { homogenize } map /f set + } { } ifelse [f gb.options] groebner 0 get /gg set }ifelse wv isInteger { @@ -373,6 +416,7 @@ message-quiet }{ } ifelse %% + env1 restoreOptions %% degreeShift changes "grade" /arg1 ans def ] pop @@ -440,12 +484,12 @@ message-quiet } { } ifelse wv isInteger { [v ring_of_polynomials - 0] define_ring + gb.characteristic] define_ring /termorder 1 def }{ [v ring_of_polynomials wv weight_vector - 0] define_ring + gb.characteristic] define_ring wv gb.isTermOrder /termorder set } ifelse } { @@ -714,7 +758,11 @@ message-quiet (a : [f ]; array f; f is a set of generators of an ideal in a ring.) (a : [f v]; array f; string v; v is the variables. ) (a : [f v w]; array f; string v; array of array w; w is the weight matirx.) + (a : [f v w ds]; array f; string v; array of array w; w is the weight matirx.) + ( array ds; ds is the degree shift ) ( ) + (gb.authoHomogenize 1 [default]) + ( ) $Example 1: [ [( (x Dx)^2 + (y Dy)^2 -1) ( x y Dx Dy -1)] (x,y) $ $ [ [ (Dx) 1 ] ] ] gb pmat ; $ (Example 2: ) @@ -728,6 +776,9 @@ message-quiet $Example 4: [[ [(x^2) (y+x)] [(x+y) (y^3)] [(2 x^2+x y) (y+x+x y^3)]] (x,y) $ $ [ [ (x) -1 (y) -1] ] ] gb pmat ; $ ( ) + $Example 5: [[ [(x^2) (y+x)] [(x+y) (y^3)] [(2 x^2+x y) (y+x+x y^3)]] (x,y) $ + $ [ [ (x) -1 (y) -1] ] [[0 1] [-3 1] ] ] gb pmat ; $ + ( ) (cf. gb, groebner, groebner_sugar, syz. ) ]] putUsages @@ -1339,6 +1390,11 @@ message-quiet /v aa 1 get def /setarg 1 def } { } ifelse + typev [ArrayP RingP] eq + { /f aa 0 get def + /v aa 1 get def + /setarg 1 def + } { } ifelse typev [ArrayP ArrayP] eq { /f aa 0 get def /v aa 1 get from_records def @@ -1362,7 +1418,11 @@ message-quiet [(KanGBmessage) gb.verbose ] system_variable %%% Start of the preprocess - f getRing /rr set + v tag RingP eq { + /rr v def + }{ + f getRing /rr set + } ifelse %% To the normal form : matrix expression. f gb.toMatrixOfString /f set /mm gb.itWasMatrix def @@ -1445,6 +1505,7 @@ message-quiet $ [(Homogenize_vec) 0] system_variable (grade) (module1v) switch_function$ (a : [f ]; array f; f is a set of generators of an ideal in a ring.) (a : [f v]; array f; string v; v is the variables. ) + (a : [f r]; array f; ring r ) (a : [f v w]; array f; string v; array of array w; w is the weight matirx.) ( ) $Example 1: [ [( (x Dx)^2 + (y Dy)^2 -h^4) ( x y Dx Dy -h^4)] (x,y) $ @@ -1487,6 +1548,11 @@ message-quiet /v aa 1 get def /setarg 1 def } { } ifelse + typev [ArrayP RingP] eq + { /f aa 0 get def + /v aa 1 get def + /setarg 1 def + } { } ifelse typev [ArrayP ArrayP] eq { /f aa 0 get def /v aa 1 get from_records def @@ -1512,7 +1578,11 @@ message-quiet %%% Start of the preprocess - f getRing /rr set + v tag RingP eq { + /rr v def + }{ + f getRing /rr set + } ifelse %% To the normal form : matrix expression. f gb.toMatrixOfString /f set /mm gb.itWasMatrix def @@ -1596,6 +1666,7 @@ message-quiet $ [(Homogenize_vec) 0] system_variable (grade) (module1v) switch_function$ (a : [f ]; array f; f is a set of generators of an ideal in a ring.) (a : [f v]; array f; string v; v is the variables.) + (a : [f r]; array f; ring r ) (a : [f v w]; array f; string v; array of array w; w is the weight matirx.) $Example 1: [ [( (x Dx)^2 + (y Dy)^2 -h^4) ( x y Dx Dy -h^4)] (x,y) $ $ [ [ (Dx) 1 ] ] ] syz_h pmat ; $