=================================================================== RCS file: /home/cvs/OpenXM/src/k097/lib/minimal/minimal.k,v retrieving revision 1.31 retrieving revision 1.36 diff -u -p -r1.31 -r1.36 --- OpenXM/src/k097/lib/minimal/minimal.k 2000/12/10 03:12:20 1.31 +++ OpenXM/src/k097/lib/minimal/minimal.k 2007/07/03 22:28:11 1.36 @@ -1,4 +1,4 @@ -/* $OpenXM: OpenXM/src/k097/lib/minimal/minimal.k,v 1.30 2000/11/19 05:50:30 takayama Exp $ */ +/* $OpenXM: OpenXM/src/k097/lib/minimal/minimal.k,v 1.35 2007/07/03 22:05:46 takayama Exp $ */ #define DEBUG 1 Sordinary = false; /* If you run this program on openxm version 1.1.2 (FreeBSD), @@ -46,28 +46,10 @@ def Sprint2(s) { /* We cannot use load command in the if statement. */ load("lib/minimal/cohom.k"); +Load_sm1(["k0-tower.sm1","lib/minimal/k0-tower.sm1"],"k0-tower.sm1.loaded"); +Load_sm1(["new.sm1","lib/minimal/new.sm1"],"new.sm1.loaded"); +sm1(" oxNoX "); -def load_tower() { - local ppp; - if (Boundp("k0-tower.sm1.loaded")) { - }else{ - if (Tag(GetPathName("k0-tower.sm1")) == 0) { - ppp = GetPathName("lib/minimal/k0-tower.sm1"); - sm1(" [(parse) ppp pushfile ] extension "); - }else{ - sm1(" [(parse) (k0-tower.sm1) pushfile ] extension "); - } - if (Tag(GetPathName("new.sm1")) == 0) { - ppp = GetPathName("lib/minimal/new.sm1"); - sm1(" [(parse) ppp pushfile ] extension "); - }else{ - sm1(" [(parse) (new.sm1) pushfile ] extension "); - } - sm1(" /k0-tower.sm1.loaded 1 def "); - } - sm1(" oxNoX "); -} -load_tower(); SonAutoReduce = true; def Factor(f) { sm1(f, " fctr /FunctionValue set"); @@ -157,8 +139,15 @@ def Max(v) { HelpAdd(["Max", ["Max(v) returns the maximal element in v."]]); -def Kernel(f) { - sm1(" [f] syz /FunctionValue set "); +def Kernel(f,v) { + local ans; + /* v : string or ring */ + if (Length(Arglist) < 2) { + sm1(" [f] syz /ans set "); + }else{ + sm1(" [f v] syz /ans set "); + } + return(ans); } def Syz(f) { sm1(" [f] syz /FunctionValue set "); @@ -257,9 +246,9 @@ def StoTower() { } def SsetTower(tower) { -sm1(" [(AvoidTheSameRing)] pushEnv - [ [(AvoidTheSameRing) 0] system_variable - [(gbListTower) tower (list) dc] system_variable +sm1(" [(AvoidTheSameRing)] pushEnv \ + [ [(AvoidTheSameRing) 0] system_variable \ + [(gbListTower) tower (list) dc] system_variable \ ] pop popEnv "); /* sm1("(hoge) message show_ring "); */ } @@ -369,13 +358,13 @@ def NewPolynomialVector(size) { } def SturnOffHomogenization() { - sm1(" - [(Homogenize)] system_variable 1 eq - { Sverbose { - (Warning: Homogenization and ReduceLowerTerms options are automatically turned off.) message } { } ifelse - [(Homogenize) 0] system_variable - [(ReduceLowerTerms) 0] system_variable - } { } ifelse + sm1(" \ + [(Homogenize)] system_variable 1 eq \ + { Sverbose { \ + (Warning: Homogenization and ReduceLowerTerms options are automatically turned off.) message } { } ifelse \ + [(Homogenize) 0] system_variable \ + [(ReduceLowerTerms) 0] system_variable \ + } { } ifelse \ "); } /* NOTE!!! Be careful these changes of global environmental variables. @@ -383,13 +372,13 @@ def SturnOffHomogenization() { after computation and interruption. August 15, 2000. */ def SturnOnHomogenization() { - sm1(" - [(Homogenize)] system_variable 0 eq - { Sverbose { - (Warning: Homogenization and ReduceLowerTerms options are automatically turned ON.) message } { } ifelse - [(Homogenize) 1] system_variable - [(ReduceLowerTerms) 1] system_variable - } { } ifelse + sm1(" \ + [(Homogenize)] system_variable 0 eq \ + { Sverbose { \ + (Warning: Homogenization and ReduceLowerTerms options are automatically turned ON.) message } { } ifelse \ + [(Homogenize) 1] system_variable \ + [(ReduceLowerTerms) 1] system_variable \ + } { } ifelse \ "); } @@ -1020,7 +1009,10 @@ HelpAdd(["Sminimal", " Sweyl(\"x,y\",[[\"x\",-1,\"y\",-1,\"Dx\",1,\"Dy\",1]]);", " b = ReParse(a[0]); sm1_pmat(b); ", " IsExact_h(b,[x,y]):", - "Note: a[0] is the V-minimal resolution. a[3] is the Schreyer resolution."]]); + "Note: a[0] is the V-minimal resolution. a[3] is the Schreyer resolution.", + " ---> D^{m_3} --b[2]--> D^{m_2} --b[1]--> D^{m_1} --b[0]--> D^{m_0} ", + " Here D^{m_i} are the set of row vectors. " + ]]); def Sminimal(g,opt) { local r, freeRes, redundantTable, reducer, maxLevel, @@ -1487,23 +1479,10 @@ HelpAdd(["IsSameIdeal_h", "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" -]]); +/* + Output of S* functions may cause a trouble because it uses Schreyer orders. + In this case, use ReParse(). +*/ def ScheckIfSchreyer(s) { local ss;