[BACK]Return to minimal.k CVS log [TXT][DIR] Up to [local] / OpenXM / src / k097 / lib / minimal

Diff for /OpenXM/src/k097/lib/minimal/minimal.k between version 1.28 and 1.34

version 1.28, 2000/08/21 07:45:22 version 1.34, 2001/01/05 11:14:28
Line 1 
Line 1 
 /* $OpenXM: OpenXM/src/k097/lib/minimal/minimal.k,v 1.27 2000/08/16 22:38:52 takayama Exp $ */  /* $OpenXM: OpenXM/src/k097/lib/minimal/minimal.k,v 1.33 2000/12/29 07:19:40 takayama Exp $ */
 #define DEBUG 1  #define DEBUG 1
 Sordinary = false;  Sordinary = false;
 /* If you run this program on openxm version 1.1.2 (FreeBSD),  /* If you run this program on openxm version 1.1.2 (FreeBSD),
Line 44  def Sprint2(s) {
Line 44  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 ");
   
 load("cohom.k");  
 def load_tower() {  
   if (Boundp("k0-tower.sm1.loaded")) {  
   }else{  
     sm1(" [(parse) (k0-tower.sm1) pushfile ] extension ");  
     sm1(" [(parse) (new.sm1) pushfile ] extension ");  
     sm1(" /k0-tower.sm1.loaded 1 def ");  
   }  
   sm1(" oxNoX ");  
 }  
 load_tower();  
 SonAutoReduce = true;  SonAutoReduce = true;
 def Factor(f) {  def Factor(f) {
    sm1(f, " fctr /FunctionValue set");     sm1(f, " fctr /FunctionValue set");
Line 145  def Max(v) {
Line 139  def Max(v) {
 HelpAdd(["Max",  HelpAdd(["Max",
 ["Max(v) returns the maximal element in v."]]);  ["Max(v) returns the maximal element in v."]]);
   
   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 ");
   }
   HelpAdd(["Kernel",
   ["Kernel(f) returns the syzygy of f.",
    "Return value [b, c]: b is a set of generators of the syzygies of f",
    "                   : c=[gb, backward transformation, syzygy without",
    "                                                   dehomogenization",
    "Example:  Weyl(\"x,y\",[[\"x\",-1,\"Dx\",1]]); ",
    "          s=Kernel([x*Dx+1,Dx^2+x^5]); s[0]:"]]);
   /* cf. sm1_syz in cohom.k */
   def Gb(f) {
     sm1(" [f] gb /FunctionValue set ");
   }
   HelpAdd(["Gb",
   ["Gb(f) returns the Groebner basis of f.",
    "cf. Kernel, Weyl."]]);
   
   
 /*  End of standard functions that should be moved to standard libraries. */  /*  End of standard functions that should be moved to standard libraries. */
 def test0() {  def test0() {
   local f;    local f;
Line 165  def test1() {
Line 188  def test1() {
 }  }
   
   
   
 def Sweyl(v,w) {  def Sweyl(v,w) {
   /* extern WeightOfSweyl ; */    /* extern WeightOfSweyl ; */
   local ww,i,n;    local ww,i,n;
Line 1454  HelpAdd(["IsSameIdeal_h",
Line 1476  HelpAdd(["IsSameIdeal_h",
  "cf. ReParse"   "cf. ReParse"
 ]]);  ]]);
   
 def ReParse(a) {  /*
   local c;    Output of S* functions may cause a trouble because it uses Schreyer orders.
   if (IsArray(a)) {    In this case, use ReParse().
     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) {  def ScheckIfSchreyer(s) {
   local ss;    local ss;
Line 1564  def SbettiTable(rtable) {
Line 1573  def SbettiTable(rtable) {
     ans[i] = pp;      ans[i] = pp;
   }    }
   return(ans);    return(ans);
 }  
   
   }
   
   def BfRoots1(G,V) {
      local bb,ans;
      sm1(" /BFparlist [ ] def ");
      if (IsString(V)) {
         sm1(" [ V to_records pop ] /V set ");
      }else {
        sm1(" V { toString } map /V set ");
      }
      sm1(" /BFvarlist V def ");
   
      sm1(" G flatten { toString } map  /G set ");
      sm1(" G V bfm /bb set ");
      if (IsSm1Integer(bb)) {
        return([ ]);
      }
      sm1(" bb 0 get findIntegralRoots { (universalNumber) dc } map /ans set ");
      return([ans, bb]);
   }
   
   HelpAdd(["BfRoots1",
   ["BfRoots1(g,v) returns the integral roots of g with respect to the weight",
    "vector (1,1,...,1) and the b-function itself",
    "Example:  BfRoots1([x*Dx-2, y*Dy-3],[x,y]);"
   ]]);
   
   
   

Legend:
Removed from v.1.28  
changed lines
  Added in v.1.34

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>