=================================================================== RCS file: /home/cvs/OpenXM/src/k097/lib/minimal/minimal.k,v retrieving revision 1.11 retrieving revision 1.17 diff -u -p -r1.11 -r1.17 --- OpenXM/src/k097/lib/minimal/minimal.k 2000/05/19 11:16:51 1.11 +++ OpenXM/src/k097/lib/minimal/minimal.k 2000/07/26 12:56:36 1.17 @@ -1,4 +1,4 @@ -/* $OpenXM: OpenXM/src/k097/lib/minimal/minimal.k,v 1.10 2000/05/07 02:10:44 takayama Exp $ */ +/* $OpenXM: OpenXM/src/k097/lib/minimal/minimal.k,v 1.16 2000/06/15 07:38:36 takayama Exp $ */ #define DEBUG 1 /* #define ORDINARY 1 */ /* If you run this program on openxm version 1.1.2 (FreeBSD), @@ -6,7 +6,7 @@ ln -s /usr/bin/cpp /lib/cpp */ #define OFFSET 0 -/* #define TOTAL_STRATEGY */ +#define TOTAL_STRATEGY 1 /* #define OFFSET 20*/ /* Test sequences. Use load["minimal.k"];; @@ -132,13 +132,25 @@ sm1(" [(AvoidTheSameRing)] pushEnv [ [(AvoidTheSameRing) 0] system_variable [(gbListTower) tower (list) dc] system_variable ] pop popEnv "); + /* sm1("(hoge) message show_ring "); */ } def SresolutionFrameWithTower(g,opt) { local gbTower, ans, ff, count, startingGB, opts, skelton,withSkel, autof, - gbasis; + gbasis, nohomog; + nohomog = false; + count = -1; if (Length(Arglist) >= 2) { - if (IsInteger(opt)) count = opt; + if (IsInteger(opt)) { + count = opt; + }else if (IsString(opt)) { + if (opt == "homogenized") { + nohomog = true; + }else{ + Println("Warning: unknown option"); + Println(opt); + } + } }else{ count = -1; } @@ -152,7 +164,12 @@ def SresolutionFrameWithTower(g,opt) { */ sm1(" (mmLarger) (matrix) switch_function "); - g = Map(g,"Shomogenize"); + if (! nohomog) { + Println("Automatic homogenization."); + g = Map(g,"Shomogenize"); + }else{ + Println("No automatic homogenization."); + } if (SonAutoReduce) { sm1("[ (AutoReduce) ] system_variable /autof set "); sm1("[ (AutoReduce) 1 ] system_variable "); @@ -192,12 +209,13 @@ def SresolutionFrameWithTower(g,opt) { } HelpAdd(["SresolutionFrameWithTower", ["It returs [resolution of the initial, gbTower, skelton, gbasis]", + "option: \"homogenized\" (no automatic homogenization) ", "Example: Sweyl(\"x,y\");", " a=SresolutionFrameWithTower([x^3,x*y,y^3-1]);"]]); def SresolutionFrame(f,opt) { local ans; - ans = SresolutionFrameWithTower(f); + ans = SresolutionFrameWithTower(f,opt); return(ans[0]); } /* ---------------------------- */ @@ -291,7 +309,10 @@ def Sres0FrameWithSkelton(g) { def StotalDegree(f) { - sm1(" [(grade) f] gbext (universalNumber) dc /FunctionValue set "); + local d0; + sm1(" [(grade) f] gbext (universalNumber) dc /d0 set "); + /* Print("degree of "); Print(f); Print(" is "); Println(d0); */ + return(d0); } /* Sord_w(x^2*Dx*Dy,[x,-1,Dx,1]); */ @@ -359,6 +380,10 @@ def Sdegree(f,tower,level) { def SgenerateTable(tower) { local height, n,i,j, ans, ans_at_each_floor; + + /* + Print("SgenerateTable: tower=");Println(tower); + sm1(" print_switch_status "); */ height = Length(tower); ans = NewArray(height); for (i=0; i (homogenized Weyl algebra)", + "cf. ReParse" +]]); + +def ReParse(a) { + local c; + if (IsArray(a)) { + c = Map(a,"ReParse"); + }else{ + sm1(a," toString . /c set"); + } + return(c); +} +HelpAdd(["ReParse", +["Reparse(obj): obj", + "It parses the given object in the current ring.", + "Outputs from SlaScala, Sschreyer may cause a trouble in other functions,", + "because it uses the Schreyer order.", + "In this case, ReParse the outputs from these functions.", + "cf. IsExaxt_h" +]]); + +def ScheckIfSchreyer(s) { + local ss; + sm1(" (report) (grade) switch_function /ss set "); + if (ss != "module1v") { + Print("ScheckIfSchreyer: from "); Println(s); + Error("grade is not module1v"); + } + /* + sm1(" (report) (mmLarger) switch_function /ss set "); + if (ss != "tower") { + Print("ScheckIfSchreyer: from "); Println(s); + Error("mmLarger is not tower"); + } + */ + sm1(" [(Schreyer)] system_variable (universalNumber) dc /ss set "); + if (ss != 1) { + Print("ScheckIfSchreyer: from "); Println(s); + Error("Schreyer order is not set."); + } + /* More check will be necessary. */ + return(true); +} \ No newline at end of file