version 1.21, 2004/07/29 08:13:42 |
version 1.26, 2008/01/18 00:48:07 |
|
|
% $OpenXM: OpenXM/src/kan96xx/Doc/hol.sm1,v 1.20 2004/06/10 06:01:50 takayama Exp $ |
% $OpenXM: OpenXM/src/kan96xx/Doc/hol.sm1,v 1.25 2005/07/24 09:02:40 takayama Exp $ |
%% hol.sm1, 1998, 11/8, 11/10, 11/14, 11/25, 1999, 5/18, 6/5. 2000, 6/8 |
%% hol.sm1, 1998, 11/8, 11/10, 11/14, 11/25, 1999, 5/18, 6/5. 2000, 6/8 |
%% rank, rrank, characteristic |
%% rank, rrank, characteristic |
%% This file is error clean. |
%% This file is error clean. |
|
|
] putUsages |
] putUsages |
(rrank ) messagen-quiet |
(rrank ) messagen-quiet |
|
|
|
|
|
% Take the value of arg1 in prior. |
|
/mergeGroebnerOptions { |
|
/arg2 set |
|
/arg1 set |
|
[/loc /glo /ans] pushVariables |
|
[ |
|
/loc arg1 def |
|
/glo arg2 def |
|
/ans [ ] def |
|
{ |
|
loc tag 0 eq { /ans glo def exit } { } ifelse |
|
/ans glo loc join def |
|
exit |
|
} loop |
|
/arg1 ans def |
|
] pop |
|
popVariables |
|
arg1 |
|
} def |
|
|
/gb.v 1 def |
/gb.v 1 def |
/gb.verbose 0 def |
/gb.verbose 0 def |
/gb.options [ ] def |
/gb.options [ ] def |
|
|
/arg1 set |
/arg1 set |
[/in-gb /aa /typev /setarg /f /v |
[/in-gb /aa /typev /setarg /f /v |
/gg /wv /termorder /vec /ans /rr /mm |
/gg /wv /termorder /vec /ans /rr /mm |
/degreeShift /env2 |
/degreeShift /env2 /groebnerOptions |
] pushVariables |
] pushVariables |
[(CurrentRingp) (KanGBmessage)] pushEnv |
[(CurrentRingp) (KanGBmessage)] pushEnv |
[ |
[ |
|
|
/aa arg1 def |
/aa arg1 def |
aa isArray { } { ( << array >> gb) error } ifelse |
aa isArray { } { ( << array >> gb) error } ifelse |
|
aa getAttributeList configureGroebnerOption /groebnerOptions set |
/setarg 0 def |
/setarg 0 def |
/wv 0 def |
/wv 0 def |
/degreeShift 0 def |
/degreeShift 0 def |
|
|
}{ |
}{ |
/gb.homogenized 1 def |
/gb.homogenized 1 def |
} ifelse |
} ifelse |
gb.verbose { (gb.options = ) messagen gb.options message } { } ifelse |
groebnerOptions gb.options mergeGroebnerOptions /groebnerOptions set |
|
gb.verbose { (groebnerOptions = ) messagen groebnerOptions message } { } ifelse |
termorder { |
termorder { |
f { {,,, dehomogenize} map } map /f set |
f { {___ dehomogenize} map } map /f set |
[f gb.options] groebner_sugar 0 get /gg set |
[f groebnerOptions] groebner_sugar 0 get /gg set |
}{ |
}{ |
f { {,,, dehomogenize} map} map /f set |
f { {___ dehomogenize} map} map /f set |
gb.autoHomogenize { |
gb.autoHomogenize { |
f fromVectors { homogenize } map /f set |
f fromVectors { homogenize } map /f set |
} { } ifelse |
} { } ifelse |
[f gb.options] groebner 0 get /gg set |
[f groebnerOptions] groebner 0 get /gg set |
}ifelse |
}ifelse |
wv isInteger { |
wv isInteger { |
/ans [gg gg {init} map] def |
/ans [gg gg {init} map] def |
|
|
}{ } |
}{ } |
ifelse |
ifelse |
ans getRing (oxRingStructure) dc /gb.oxRingStructure set |
ans getRing (oxRingStructure) dc /gb.oxRingStructure set |
|
%% gg getAttributeList message |
|
ans gg getAttributeList setAttributeList /ans set |
%% |
%% |
env1 restoreOptions %% degreeShift changes "grade" |
env1 restoreOptions %% degreeShift changes "grade" |
|
|
|
|
/arg1 set |
/arg1 set |
[/in-pgb /aa /typev /setarg /f /v |
[/in-pgb /aa /typev /setarg /f /v |
/gg /wv /termorder /vec /ans /rr /mm |
/gg /wv /termorder /vec /ans /rr /mm |
|
/groebnerOptions |
] pushVariables |
] pushVariables |
[(CurrentRingp) (KanGBmessage) (UseCriterion1)] pushEnv |
[(CurrentRingp) (KanGBmessage) (UseCriterion1)] pushEnv |
[ |
[ |
|
|
/aa arg1 def |
/aa arg1 def |
aa isArray { } { (<< array >> pgb) error } ifelse |
aa isArray { } { (<< array >> pgb) error } ifelse |
|
aa getAttributeList configureGroebnerOption /groebnerOptions set |
/setarg 0 def |
/setarg 0 def |
/wv 0 def |
/wv 0 def |
aa { tag } map /typev set |
aa { tag } map /typev set |
|
|
} ifelse |
} ifelse |
%%% Enf of the preprocess |
%%% Enf of the preprocess |
|
|
gb.verbose { (gb.options = ) messagen gb.options message } { } ifelse |
groebnerOptions gb.options mergeGroebnerOptions /groebnerOptions set |
|
gb.verbose { (groebnerOptions = ) messagen groebnerOptions message } { } ifelse |
termorder { |
termorder { |
f { {. dehomogenize} map } map /f set |
f { {. dehomogenize} map } map /f set |
[(UseCriterion1) 1] system_variable |
[(UseCriterion1) 1] system_variable |
[f gb.options] groebner_sugar 0 get /gg set |
[f groebnerOptions] groebner_sugar 0 get /gg set |
[(UseCriterion1) 0] system_variable |
[(UseCriterion1) 0] system_variable |
}{ |
}{ |
f { {. dehomogenize} map} map /f set |
f { {. dehomogenize} map} map /f set |
f fromVectors { homogenize } map /f set |
f fromVectors { homogenize } map /f set |
[(UseCriterion1) 1] system_variable |
[(UseCriterion1) 1] system_variable |
[f gb.options] groebner 0 get /gg set |
[f groebnerOptions] groebner 0 get /gg set |
[(UseCriterion1) 0] system_variable |
[(UseCriterion1) 0] system_variable |
}ifelse |
}ifelse |
wv isInteger { |
wv isInteger { |
|
|
}{ } |
}{ } |
ifelse |
ifelse |
%% |
%% |
|
ans gg getAttributeList setAttributeList /ans set |
|
|
/arg1 ans def |
/arg1 ans def |
] pop |
] pop |
|
|
( ) |
( ) |
$Example 5: [[ [(x^2) (y+x)] [(x+y) (y^3)] [(2 x^2+x y) (y+x+x y^3)]] (x,y) $ |
$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 ; $ |
$ [ [ (x) -1 (y) -1] ] [[0 1] [-3 1] ] ] gb pmat ; $ |
|
( ) |
|
$Example 6: [ [( (x Dx)^2 + (y Dy)^2 - x y Dx Dy + 1) ( x y Dx Dy -1)] (x,y) $ |
|
$ [ [ (Dx) 1 ] ] ] [(reduceOnly) 1] setAttributeList gb pmat ; $ |
|
( ) |
|
$Example 7: [ [( (x Dx)^2 + (y Dy)^2 + 1) ( x y Dx Dy -1)] (x,y) $ |
|
$ [ [ (Dx) 1 ] ] ] [(gbCheck) 1] setAttributeList gb getAttributeList ::$ |
( ) |
( ) |
(cf. gb, groebner, groebner_sugar, syz. ) |
(cf. gb, groebner, groebner_sugar, syz. ) |
]] putUsages |
]] putUsages |
|
|
$Example 1: [(x,y) ring_of_polynomials 0] define_ring $ |
$Example 1: [(x,y) ring_of_polynomials 0] define_ring $ |
$ [ [(x^2+y^2-4). (x y -1).] ] pgb :: $ |
$ [ [(x^2+y^2-4). (x y -1).] ] pgb :: $ |
$Example 2: [ [(x^2+y^2) (x y)] (x,y) [ [(x) -1 (y) -1] ] ] pgb :: $ |
$Example 2: [ [(x^2+y^2) (x y)] (x,y) [ [(x) -1 (y) -1] ] ] pgb :: $ |
|
$Example 3: [ [(x^2+y^2 + x y ) (x y)] (x,y) [ [(x) -1 (y) -1] ] ] $ |
|
$ [(reduceOnly) 1] setAttributeList pgb :: $ |
(cf. gb, groebner, groebner_sugar, syz. ) |
(cf. gb, groebner, groebner_sugar, syz. ) |
]] putUsages |
]] putUsages |
|
|
|
|
(Example 5: [((x1+x2+x3)(x1 x2 + x2 x3 + x1 x3) - t x1 x2 x3 ) ) |
(Example 5: [((x1+x2+x3)(x1 x2 + x2 x3 + x1 x3) - t x1 x2 x3 ) ) |
( (t,x1,x2,x3) -1 -2] annfs :: ) |
( (t,x1,x2,x3) -1 -2] annfs :: ) |
( Note that the example 4 uses huge memory space.) |
( Note that the example 4 uses huge memory space.) |
|
( ) |
|
(Note: This implementation is stable but obsolete. ) |
|
(As to faster implementation, we refer to ann0 and ann of Risa/Asir ) |
|
(Visit http://www.math.kobe-u.ac.jp/Asir ) |
]] putUsages |
]] putUsages |
( annfs ) messagen-quiet |
( annfs ) messagen-quiet |
/annfs.verbose fs.verbose def |
/annfs.verbose fs.verbose def |
|
|
/arg1 set |
/arg1 set |
[/in-gb_h /aa /typev /setarg /f /v |
[/in-gb_h /aa /typev /setarg /f /v |
/gg /wv /termorder /vec /ans /rr /mm |
/gg /wv /termorder /vec /ans /rr /mm |
/gb_h.opt |
/gb_h.opt /groebnerOptions |
] pushVariables |
] pushVariables |
[(CurrentRingp) (KanGBmessage) (Homogenize_vec)] pushEnv |
[(CurrentRingp) (KanGBmessage) (Homogenize_vec)] pushEnv |
[ |
[ |
|
|
/aa arg1 def |
/aa arg1 def |
gb.verbose { (Getting in gb_h) message } { } ifelse |
gb.verbose { (Getting in gb_h) message } { } ifelse |
aa isArray { } { ( << array >> gb_h) error } ifelse |
aa isArray { } { ( << array >> gb_h) error } ifelse |
|
aa getAttributeList configureGroebnerOption /groebnerOptions set |
/setarg 0 def |
/setarg 0 def |
/wv 0 def |
/wv 0 def |
aa { tag } map /typev set |
aa { tag } map /typev set |
|
|
[(Homogenize_vec) 0] system_variable |
[(Homogenize_vec) 0] system_variable |
%%% End of the preprocess |
%%% End of the preprocess |
|
|
gb.verbose { (gb.options = ) messagen gb.options message } { } ifelse |
groebnerOptions gb.options mergeGroebnerOptions /groebnerOptions set |
|
gb.verbose { (groebnerOptions = ) messagen groebnerOptions message } { } ifelse |
termorder { |
termorder { |
f { {. } map } map /f set |
f { {. } map } map /f set |
[f gb.options] groebner 0 get /gg set %% Do not use sugar. |
[f groebnerOptions] groebner 0 get /gg set %% Do not use sugar. |
}{ |
}{ |
f { {. } map} map /f set |
f { {. } map} map /f set |
f fromVectors /f set |
f fromVectors /f set |
[f gb.options] groebner 0 get /gg set |
[f groebnerOptions] groebner 0 get /gg set |
}ifelse |
}ifelse |
wv isInteger { |
wv isInteger { |
/ans [gg gg {init} map] def |
/ans [gg gg {init} map] def |
|
|
/ans set |
/ans set |
}{ } |
}{ } |
ifelse |
ifelse |
|
ans gg getAttributeList setAttributeList /ans set |
gb_h.opt restoreOptions |
gb_h.opt restoreOptions |
gb.verbose { (Getting out of gb_h) message } { } ifelse |
gb.verbose { (Getting out of gb_h) message } { } ifelse |
%% |
%% |
|
|
$ [(2 x^5+x y^4) (y h^3 +x h^3 +x y^3)]] (x,y) $ |
$ [(2 x^5+x y^4) (y h^3 +x h^3 +x y^3)]] (x,y) $ |
$ [ [ (x) -1 (y) -1] ] ] gb_h pmat ; $ |
$ [ [ (x) -1 (y) -1] ] ] gb_h pmat ; $ |
$ This is fine because grade(v_1) = grade(v_2)+1 for all vectors. $ |
$ This is fine because grade(v_1) = grade(v_2)+1 for all vectors. $ |
|
$Example 5: [ [[(h+x) (x^3 + 2 h^3 + 2 x h^2)] [(x) (x)]] (x)] $ |
|
$ [(reduceOnly) 1] setAttributeList gb_h pmat $ |
( ) |
( ) |
(cf. gb, groebner, syz_h. ) |
(cf. gb, groebner, syz_h. ) |
]] putUsages |
]] putUsages |
|
|
/gbasis2 gbasis 0 get def |
/gbasis2 gbasis 0 get def |
} { |
} { |
[ [(1)] ] gbasis rest join gb 0 get getRing ring_def |
[ [(1)] ] gbasis rest join gb 0 get getRing ring_def |
/gbasis2 gbasis 0 get ,,, def |
/gbasis2 gbasis 0 get ___ def |
} ifelse |
} ifelse |
|
|
|
|
flist ,,, /flist set |
flist ___ /flist set |
flist tag 6 eq { |
flist tag 6 eq { |
flist { gbasis2 reduction } map /ans set |
flist { gbasis2 reduction } map /ans set |
}{ |
}{ |
|
|
/gbasis2 gbasis 0 get def |
/gbasis2 gbasis 0 get def |
} { |
} { |
[ [(1)] ] gbasis rest join gb 0 get getRing ring_def |
[ [(1)] ] gbasis rest join gb 0 get getRing ring_def |
/gbasis2 gbasis 0 get ,,, def |
/gbasis2 gbasis 0 get ___ def |
} ifelse |
} ifelse |
|
|
|
|
flist ,,, /flist set |
flist ___ /flist set |
[(Homogenize) 0] system_variable |
[(Homogenize) 0] system_variable |
flist tag 6 eq { |
flist tag 6 eq { |
flist { gbasis2 reduction } map /ans set |
flist { gbasis2 reduction } map /ans set |