Changeset 67803e in git for Singular


Ignore:
Timestamp:
May 4, 2011, 7:27:32 PM (13 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
62c2b035a539149974daf79c638bf771a66e7ada
Parents:
ed7a55cee630718a52f781951594ce050f910d0b
Message:
normaliz 2.7

git-svn-id: file:///usr/local/Singular/svn/trunk@14195 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/LIB/normaliz.lib

    red7a55c r67803e  
    44category="Commutative algebra"
    55info="
    6 LIBRARY: normaliz.lib  Provides an interface for the use of Normaliz 2.2
     6LIBRARY: normaliz.lib  Provides an interface for the use of Normaliz 2.7
    77         within SINGULAR.
    88AUTHORS:  Winfried Bruns, Winfried.Bruns@Uni-Osnabrueck.de
     
    1010
    1111OVERVIEW:
    12 @texinfo
    13 The library normaliz.lib provides an interface for the use of Normaliz 2.2
    14 within SINGULAR. The exchange of data is via files, the only possibility
    15 offered by Normaliz in its present version. In addition to the top level
     12The library normaliz.lib provides an interface for the use of Normaliz 2.7
     13within SINGULAR. The exchange of data is via files.
     14In addition to the top level
    1615functions that aim at objects of type ideal or ring, several other auxiliary
    1716functions allow the user to apply Normaliz to data of type intmat. Therefore
    1817SINGULAR can be used as a comfortable environment for the work with Normaliz.
    19 @* Please see the @code{Normaliz2.2Documentation.pdf} and @code{nmz_sing.pdf}
    20 (both are included in the Normaliz distribution) for a more extensive
    21 documentation of Normaliz.
    22 @*
     18@* Please see the @code{Normaliz2.7Documentation.pdf} (included in the Normaliz
     19distribution) for a more extensive documentation of Normaliz.
     20@code{nmz_sing.pdf} describes this library version 2.2, but most points are
     21still valid.
     22
    2323@*Singular and Normaliz exchange data via files. These files are automatically
    2424created and erased behind the scenes. As long as one wants to use only the
    2525ring-theoretic functions there is no need for file management.
    26 @*
     26
    2727@*Note that the numerical invariants computed by Normaliz can be
    2828accessed in this \"automatic file mode\".
    29 @*
     29
    3030@*However, if Singular is used as a frontend for Normaliz or the user
    3131wants to inspect data not automatically returned to Singular, then
     
    3333data. Moreover, the library provides functions for access to these files.
    3434Deletion of the files is left to the user.
    35 @*
     35
    3636@* Use of this library requires the program Normaliz to be installed.
    3737You can download it from
     
    3939that the executables are in the search path or use setNmzExecPath
    4040(@ref{setNmzExecPath}).
    41 @end texinfo
    42 NOTE:    These library functions use @code{sed} to transfer the Normaliz
    43 output into a SINGULAR compliant format.
    44 
    4541
    4642KEYWORDS: integral closure; normalization
     
    5349                              generated by the leading monomials of the
    5450                              elements of I
     51 normalToricRingFromBinomials(ideal I)  computes the normalization of the
     52                              polynomial ring modulo the unique minimal prime
     53                              ideal of the binomial ideal I
    5554 ehrhartRing(ideal I)         computes the monomials representing the lattice
    5655                              points of the polytop generated leading monomials
     
    6160
    6261 torusInvariants(intmat T)    computes the ring of invariants of a torus action
    63  valRing(intmat V)            computes the intersection of the polynomial ring
    64                               with the valuation rings of monomial valuations
    65  valRingIdeal(intmat V)       computes ideals of monomial valuations
     62 finiteDiagInvariants(intmat C)  computes the ring of invariants of a finite
     63                                 abelian group acting diagonally on a polynomial
     64                                 ring
     65 diagInvariants(intmat C)     computes the ring of invariants of a
     66                              diagonalizable group
     67 intersectionValRings(intmat V)   computes the intersection of the polynomial
     68                                  ring with the valuation rings of monomial
     69                                  valuations
     70 intersectionValRingIdeals(intmat V)       computes ideals of monomial valuations
    6671
    6772 showNuminvs()                prints the numerical invariants
     
    7277
    7378 normaliz(intmat sgr,int nmz_mode) applies Normaliz
    74  setNmzVersion(string nmz_version_name) sets the version of the Normaliz
    75                                         executable
    7679 setNmzExecPath(string nmz_exec_path_name) sets the path to the Normaliz
    7780                                           executable
     
    9497                               which have the rows of expo_vecs as
    9598                               exponent vector
     99 binomials2intmat(ideal I)    returns the intmat whose rows represent the
     100                              exponents of the elements of the binomial ideal I
    96101";
    97102
     
    174179NOTE:     It is not necessary to use this function if the Normaliz executable
    175180          is in the search path of the system.
    176 SEE ALSO: setNmzVersion
     181SEE ALSO: setNmzOption
    177182EXAMPLE:  example setNmzExecPath; shows an example"
    178183{
     
    184189  setNmzExecPath("../Normaliz/");
    185190}
    186 
    187 proc setNmzVersion(string nmz_version_name)
    188 "USAGE:   setNmzVersion(string s);  @code{s} version of the Normaliz executable
    189 CREATE:   @code{Normaliz::nmz_version} to save the given version @code{s}
    190 NOTE:     The version coincides with the filename of the Normaliz executable.
    191           Possible arguments are:
    192           @* @code{norm32} for 32bit integer precision
    193           @* @code{norm64} for 64bit integer precision (default)
    194           @* @code{normbig} for arbitrary precision
    195 SEE ALSO: setNmzExecPath
    196 EXAMPLE:  example setNmzVersion; shows an example
    197 "
    198 {
    199     desString("nmz_version",nmz_version_name);
    200 }
    201 example
    202 { "EXAMPLE:";echo = 2;
    203   setNmzVersion("normbig");
    204 }
    205 
    206191
    207192proc setNmzFilename(string nmz_filename_name)
     
    385370static proc setNmzExec()
    386371{
    387     if(queryString("nmz_exec")=="")
    388     {
    389         return(queryString("nmz_exec_path")+"norm64");
    390     }
    391     return(queryString("nmz_exec_path")+queryString("nmz_exec"));
     372    return(queryString("nmz_exec_path")+"normaliz");
    392373}
    393374
     
    406387    }
    407388
    408     list suffixes="in","gen","out","sup","typ","egn","esp","inv","tri","ht1",
     389    list suffixes="in","gen","out","cst","typ","egn","esp","inv","tri","ht1",
    409390                  "ext";
    410391    int i,dummy;
     
    414395    {
    415396        f=getNmzFile()+"."+suffixes[i];
    416         dummy=system("sh","rm "+f+ "&> /dev/null");
     397        if (fileExists(f)) { dummy=system("sh","rm "+f+ "&> /dev/null"); }
    417398    }
    418399}
     
    474455static proc getInt(string s, int p)
    475456{
    476 
    477457    string nst;
    478458    int i,j,en,sn;
     
    507487}
    508488
     489
    509490static proc getRational(string s, int p)
    510491{
    511 
    512492    string nst;
    513493    int i,j,en,sn;
     
    556536}
    557537
     538
    558539static proc findWord(string s, string t, int p)
    559540{
     
    571552}
    572553
     554
    573555static proc skipEqualsign(string s,int p)
    574556{
     
    586568// input and output to/from normaliz
    587569
    588 static proc doWriteNmzData(intmat sgr, int num_cols, n_mode)
     570//list must have pairs of intmat, nmz_mode
     571static proc doWriteNmzData(list #)
    589572{
    590573    string s;
    591     int j;
     574    int i,j;
    592575    link outf=":w "+ getNmzFile() +".in";  // also sets the filename
    593     write(outf,nrows(sgr));
    594     write(outf,num_cols);
    595 
    596     for(int i=1;i<=nrows(sgr);i++)
    597     {
     576
     577    intmat sgr;
     578    int num_rows, num_cols, n_mode;
     579
     580    for (int k=1; k+1<=size(#); k=k+2) {
     581    //get data from the parameter list
     582      sgr   = #[k];
     583      num_rows = nrows(sgr);
     584      num_cols = ncols(sgr);
     585                n_mode   = #[k+1];
     586
     587      write(outf,num_rows);
     588      write(outf,num_cols);
     589
     590      for(i=1;i<=nrows(sgr);i++)
     591      {
    598592        s="";
    599593        for(j=1;j<=num_cols;j++)
    600594        {
    601              s=s+string(sgr[i,j])+" ";
     595           s=s+string(sgr[i,j])+" ";
    602596        }
    603597        write(outf,s);
    604     }
    605     write(outf,n_mode);
     598      }
     599      write(outf,n_mode);
     600      write(outf,"");
     601    }
    606602    close(outf);
    607603}
    608604
    609 proc writeNmzData(intmat sgr, int n_mode)
     605
     606proc writeNmzData(intmat sgr, int n_mode, list #)
    610607"USAGE:   writeNmzData(intmat M, int mode);
     608          writeNmzData(intmat M, int mode, intmat M2, int mode2, ...);
    611609CREATE:   Creates an input file for Normaliz from the matrix M. The second
    612610          parameter sets the mode. How the matrix is interpreted depends on the
    613611          mode. See the Normaliz documentation for more information.
     612
     613                         It is also possible to give more than one pair of matrix and mode. In
     614                         this case all matrices and modes are written. This can be used to
     615                         combine modes 4,5,6.
    614616NOTE:     Needs an explicit filename set. The filename is created from the
    615           current filename and the suffix given to the function.
     617          current filename.
    616618   @*     Note that all functions in normaliz.lib write and read their data
    617619          automatically to and from the hard disk so that writeNmzData will
     
    624626        ERROR("writeNmzData: no filename specified");
    625627    }
    626     doWriteNmzData(sgr, ncols(sgr), n_mode);
     628    doWriteNmzData(list(sgr, n_mode) + #);
    627629}
    628630example
     
    632634  writeNmzData(sgr,1);
    633635  int dummy=system("sh","cat VeryInteresting.in");
     636
     637  intmat Hyperplanes[2][3] = 2,-1,0, // 2x-y >= 0
     638                             1, 1,0; //  x+y >= 0
     639  intmat Equation[1][3] = 0,1,-1;    // y = z
     640  intmat Congruence[1][4] = 1,0,0,3;  // x = 0 (3)
     641  writeNmzData(Hyperplanes,4,Equation,5,Congruence,6);
     642  dummy=system("sh","cat VeryInteresting.in");
    634643}
    635644
     
    644653   @*    Note that all functions in normaliz.lib write and read their data
    645654         automatically so that readNmzData will usually not be used explicitly.
    646    @*    This function uses the command @code{sed} to transfer the normaliz
    647          output into a singular conform format.
     655   @*    This function reads only the first matrix in a file!
    648656SEE ALSO: writeNmzData, rmNmzFiles, setNmzFilename, setNmzDataPath
    649657EXAMPLE:  example readNmzData; shows an example"
     
    656664    string s;
    657665    int n_rows,n_cols;            //number of rows/columns
    658     int p, q;                     //positions
     666    int p;                     //position
     667    int i,j;
    659668    int returnvalue;
    660669
    661670    string filename = getNmzFile() + "."+ nmz_suffix;
    662     string tmpfilename = filename+".tmp";
    663 //"// ** readNmzData: initialisiert";    //TODO debugoutput wieder rausnehmen
    664     returnvalue = system("sh","sed 's/ /,/g' < "+filename+" > "+tmpfilename);
    665 //"// ** readNmzData: sed ausgefuehrt";
    666     link in_f=":r "+ tmpfilename;
    667 
     671    link in_f=":r "+ filename;
    668672    s=read(in_f);
    669673    close(in_f);
    670     returnvalue = system("sh","rm "+tmpfilename);
    671 //"// ** readNmzData: datei eingelesen";
    672     p=1; q=size(s);
     674
     675    p=1;
    673676    (n_rows,p)=getInt(s,p);
    674677    (n_cols,p)=getInt(s,p);
    675     //intmat nmz_gen[n_rows][n_cols];
    676     while(s[q]!=",")
    677     {
    678       q--;
    679     }
    680     //string c = "nmz_gen=" + s[p,q-p] + ";";
    681     string c = "intmat nmz_gen["+ string(n_rows) +"]["+ string(n_cols) +"]="
    682              + s[p,q-p] + ";";
    683 //"// ** readNmzData: string gebastelt";
    684     execute(c);
    685 //"// ** readNmzData: string ausgefuehrt";
     678    if (n_rows <= 0 || n_cols <= 0) {
     679             intmat empty;
     680             return(empty);
     681    }
     682         intmat nmz_gen[n_rows][n_cols];
     683    for(i=1;i<=n_rows;i++)
     684    {
     685        for(j=1;j<=n_cols;j++)
     686        {
     687            (nmz_gen[i,j],p) = getInt(s,p);
     688        }
     689    }
    686690    return(nmz_gen);
    687691}
     
    691695  intmat sgr[3][3]=1,2,3,4,5,6,7,8,10;
    692696  intmat sgrnormal=normaliz(sgr,0);
    693   readNmzData("sup");
     697  readNmzData("cst");
    694698  readNmzData("typ");
    695699}
     
    709713    {
    710714        list nmz_options=
     715        list("supp",0,"-s",0),
     716        list("triang",0,"-v",0),
     717        list("volume",0,"-V",0),
    711718        list("hvect",0,"-p",0),
    712         list("triang",0,"-v",0),
    713         list("supp",0,"-s",0),
     719        list("hvect_l",0,"-P",0),
     720        list("height1",0,"-1",0),
    714721        list("normal",0,"-n",1),
     722        list("normal_l",0,"-N",1),
    715723        list("hilb",0,"-h",1),
     724        list("hilb_l",0,"-H",1),
    716725        list("dual",0,"-d",1),
    717726        list("control",0,"-c",2),
    718727        list("allf",0,"-a",2),
    719         list("ignore",1,"-i",2),
    720         list("errorcheck",0,"-e",2);
     728        list("errorcheck",0,"-e",2),
     729        list("bigint",0,"-B",2),
     730        list("threads",0,"-x=",2);
    721731        export(nmz_options);
    722732    }
     
    730740@* @code{-s:  supp}
    731741@* @code{-v:  triang}
     742@* @code{-V:  volume}
    732743@* @code{-p:  hvect}
     744@* @code{-P:  hvect_l}
     745@* @code{-1:  height1}
    733746@* @code{-n:  normal}
     747@* @code{-N:  normal_l}
    734748@* @code{-h:  hilb}
     749@* @code{-H:  hilb_l}
    735750@* @code{-d:  dual}
    736751@* @code{-a:  allf}
    737752@* @code{-c:  control}
    738 @* @code{-i:  ignore}
    739753@* @code{-e:  errorcheck}
     754@* @code{-B:  bigint} Use GMP for arbitrary precision integers
     755@* @code{-x=N:  threads} In this case the int parameter is used to set the
     756                         number of threads N, 0 means no explicit limiting.
     757
    740758SEE ALSO: showNmzOptions
    741759EXAMPLE:  example setNmzOption; shows an example
     
    769787        if(nmz_options[i][2])
    770788        {
    771             run_options=run_options+nmz_options[i][3]+" ";
     789            run_options=run_options+nmz_options[i][3];
     790                                if (nmz_options[i][1]=="threads") {
     791                                        run_options=run_options+string(nmz_options[i][2]);
     792                                }
     793                                run_options=run_options+" ";
    772794            if(nmz_options[i][4]!=2)
    773795            {
     
    796818
    797819
    798 static proc runNormaliz(intmat sgr,int num_cols, nmz_mode)
     820static proc runNormaliz(intmat sgr,nmz_mode, list #)
    799821{
    800822    if(!queryInt("nmz_files_keep_switch"))
     
    803825    }
    804826
    805     doWriteNmzData(sgr,num_cols,nmz_mode);
     827    doWriteNmzData(list(sgr, nmz_mode) + #);
    806828
    807829    if(queryInt("nmz_files_keep_switch"))
     
    846868}
    847869
    848 proc normaliz(intmat sgr,int nmz_mode)
     870proc normaliz(intmat sgr,int nmz_mode, list #)
    849871"USAGE:   normaliz(intmat sgr,int nmz_mode);
     872          normaliz(intmat sgr, int nmz_mode, intmat sgr2, int nmz_mode2, ...);
    850873RETURN:   The function applies Normaliz to the parameter sgr in the mode set
    851874          by nmz_mode. The function returns the intmat defined by the file
    852875          with suffix gen.
     876
     877          It is also possible to give more than one pair of matrix and mode. In
     878                         this case all matrices and modes are used. This can be used to
     879                         combine modes 4,5,6.
    853880NOTE:     You will find procedures for many applications of Normaliz in this
    854881          library, so the explicit call of this procedure may not be necessary.
    855882SEE ALSO: intclToricRing, normalToricRing, ehrhartRing, intclMonIdeal,
    856           torusInvariants, valRing, valRingIdeal
     883          torusInvariants, diagInvariants, finiteDiagInvariants, intersectionValRings,
     884                         intersectionValRingIdeals
    857885EXAMPLE:  example normaliz; shows an example
    858886"
    859887{
    860     return(runNormaliz(sgr,ncols(sgr),nmz_mode));
     888    return(runNormaliz(sgr,nmz_mode,#));
    861889}
    862890example
     
    867895                 1,3;
    868896  normaliz(M,1);
     897
     898  intmat Hyperplanes[2][3] = 2,-1,0, // 2x-y >= 0
     899                             1, 1,0; //  x+y >= 0
     900  intmat Equation[1][3] = 0,1,-1;    // y = z
     901  intmat Congruence[1][4] = 1,0,0,3;  // x = 0 (3)
     902  normaliz(Hyperplanes,4,Equation,5,Congruence,6);
    869903}
    870904
     
    10231057    intvec expo_v;
    10241058
    1025     int last_comp;
    10261059    k=0;
    10271060    for(i=1;i<=ncols(I);i++)
     
    11181151
    11191152
     1153proc binomials2intmat(ideal I)
     1154"USAGE:   binomials2intmat(ideal I);
     1155RETURN:   Returns the intmat whose rows represent the exponents of the
     1156          (non-zero) elements of I which have to be binomials.
     1157                         The length of each row is nvars(basering).
     1158SEE ALSO: mons2intmat, intmat2mons
     1159EXAMPLE:  example binomials2intmat; shows an example"
     1160{
     1161  int i,j,k;
     1162  intmat expo_vecs[size(I)][nvars(basering)];
     1163  intvec expo_v;
     1164
     1165  k=0;
     1166  poly f;
     1167
     1168  for(i=1; i<=ncols(I); i++)
     1169  {
     1170    if( I[i] != 0 )
     1171    {
     1172      k++;
     1173      f = I[i];
     1174      if (leadcoef(f) != 1) {f = -f};  //works in all characteristics
     1175      if (size(f)!=2 || leadcoef(f)!=1 || leadcoef(f[2])!=-1)
     1176      {
     1177        ERROR(string("normalToricRing: binomial ideal expected: generator ",i,": ",I[i]));
     1178      }
     1179      expo_v = leadexp(f)-leadexp(f[2]);
     1180      for(j=1;j<=nvars(basering);j++)
     1181      {
     1182        expo_vecs[k,j]=expo_v[j];
     1183      }
     1184    }
     1185  }
     1186  return(expo_vecs);
     1187}
     1188example
     1189{ "EXAMPLE:"; echo=2;
     1190  ring S = 37,(u,v,w,x,y,z),dp;
     1191  ideal I = u2v-xyz, ux2-vyz, uvw-y2z;
     1192  binomials2intmat(I);
     1193}
     1194
    11201195
    11211196// integral closure of rings and ideals
     
    11271202    string dummy=collectNmzOptions(); // only to set GenGen
    11281203
    1129 /*    if(!GenGen) // return I
    1130     {
    1131         runNormaliz(expo_vecs,ncols(expo_vecs),nmz_mode);
    1132         return(I);
    1133     }
    1134 */    return( intmat2mons( runNormaliz(expo_vecs,ncols(expo_vecs),nmz_mode) ) );
     1204    return( intmat2mons( runNormaliz(expo_vecs,nmz_mode) ) );
    11351205}
    11361206
     
    11741244NOTE:     A mathematical remark: the toric ring depends on the list of
    11751245          monomials given, and not only on the ideal they generate!
    1176 SEE ALSO: intclToricRing, ehrhartRing, intclMonIdeal
     1246SEE ALSO: intclToricRing, ehrhartRing, intclMonIdeal, normalToricRingFromBinomials
    11771247EXAMPLE:  example normalToricRing; shows an example
    11781248"
     
    11821252example
    11831253{ "EXAMPLE:"; echo=2;
    1184   ring R=37,(x,y,t),dp;
    1185   ideal I=x3,x2y,y3;
     1254  ring  R = 37,(x,y,t),dp;
     1255  ideal I = x3,x2y,y3;
    11861256  normalToricRing(I);
     1257}
     1258
     1259
     1260proc normalToricRingFromBinomials(ideal I)
     1261"USAGE:   normalToricRingFromBinomials(ideal I);
     1262RETURN:
     1263@tex
     1264The ideal $I$ is generated by binomials of type $X^a-X^b$ (multiindex notation)
     1265in the surrounding polynomial ring $K[X]=K[X_1,...,X_n]$. The binomials
     1266represent a congruence on the monoid ${Z}^n$ with residue monoid $M$.
     1267Let $N$ be the image of $M$ in gp($M$)/torsion. Then $N$ is universal in the
     1268sense that every homomorphism from $M$ to an affine monoid factors through $N$.
     1269If $I$ is a prime ideal, then $K[N]= K[X]/I$. In general, $K[N]=K[X]/P$ where
     1270$P$ is the unique minimal prime ideal of $I$ generated by binomials of type
     1271$X^a-X^b$.
     1272
     1273The function computes the normalization of $K[N]$ and returns a newly created
     1274polynomial ring of the same Krull dimension, whose variables are
     1275$x(1),...,x(n-r)$, where $r$ is the rank of the matrix with rows $a-b$.
     1276(In general there is no canonical choice for such an embedding.)
     1277Inside this polynomial ring there is an ideal $I$ which lists the algebra
     1278generators of the normalization of $K[N]$.
     1279@end tex
     1280@*        The function returns the input ideal I if one of the options
     1281          @code{supp}, @code{triang}, or @code{hvect} has been activated.
     1282          However, in this case some numerical invariants are computed, and
     1283          some other data may be contained in files that you can read into
     1284          Singular.
     1285SEE ALSO: intclToricRing, normalToricRing, ehrhartRing, intclMonIdeal
     1286EXAMPLE:  example normalToricRing; shows an example
     1287"
     1288{
     1289        intmat expo_vecs = binomials2intmat(I);
     1290        string dummy=collectNmzOptions(); // only to set GenGen
     1291        intmat result = runNormaliz(expo_vecs,10);
     1292
     1293        list baseringlist = ringlist(basering);
     1294        ring S = (baseringlist[1]),(x(1..ncols(result))),dp;
     1295        ideal I = intmat2mons(result);
     1296        export(I);
     1297        return (S);
     1298}
     1299example
     1300{ "EXAMPLE:"; echo=2;
     1301  ring R = 37,(u,v,w,x,y,z),dp;
     1302  ideal I = u2v-xyz, ux2-wyz, uvw-y2z;
     1303  def S = normalToricRingFromBinomials(I);
     1304  setring S;
     1305  I;
    11871306}
    11881307
     
    12041323    string dummy=collectNmzOptions(); // only to set GenGen
    12051324
    1206 /*    if(!GenGen) // return I
    1207     {
    1208         runNormaliz(expo_vecs,ncols(expo_vecs),nmz_mode);
    1209         return(list(I));
    1210     }
    1211 */
    1212     intmat nmz_data=runNormaliz(expo_vecs,ncols(expo_vecs)-1+last_comp,
    1213                                                                   nmz_mode);
     1325    //adjust size of input matrix
     1326         if (!last_comp) { // remove last component
     1327             intmat tmp[nrows(expo_vecs)][ncols(expo_vecs)-1] = expo_vecs[1..nrows(expo_vecs),1..(ncols(expo_vecs)-1)];
     1328                  expo_vecs = tmp;
     1329         }
     1330    intmat nmz_data=runNormaliz(expo_vecs,nmz_mode);
    12141331
    12151332    if(last_comp)
     
    12471364@*        The function returns the a list containing the input ideal I if one
    12481365          of the options @code{supp}, @code{triang}, or @code{hvect} has been
    1249           activated.
     1366                         activated.
    12501367          However, in this case some numerical invariants are computed, and
    12511368          some other data may be contained in files that you can read into
    1252           Singular (see @ref{showNuminvs}, @ref{exportNuminvs}).
     1369          Singular.
    12531370NOTE:      A mathematical remark: the Ehrhart ring depends on the list of
    12541371           monomials given, and not only on the ideal they generate!
     
    12841401@*        The function returns the a list containing the input ideal I if one
    12851402          of the options @code{supp}, @code{triang}, or @code{hvect} has been
    1286           activated.
     1403                         activated.
    12871404          However, in this case some numerical invariants are computed, and
    12881405          some other data may be contained in files that you can read into
    12891406          Singular (see @ref{showNuminvs}, @ref{exportNuminvs}).
    1290 NOTE:     A mathematical remark: the Rees algebra depends on the list of
    1291           monomials given, and not only on the ideal they generate!
    12921407SEE ALSO: intclToricRing, normalToricRing, ehrhartRing
    12931408EXAMPLE:  example intclMonIdeal; shows an example
     
    13071422// torus invariants and valuation rings and ideals
    13081423
    1309 proc torusInvariants(intmat T)
     1424proc torusInvariants(intmat E)
    13101425"USAGE:   torusInvariants(intmat A);
    1311 RETURN:   @texinfo
     1426RETURN:
    13121427Returns an ideal representing the list of monomials generating the ring of
    13131428invariants as an algebra over the coefficient field.
     
    13151430$R^T$.
    13161431@end tex
    1317 @*        The function returns the ideal given by the input matrix T if one of
    1318           the options @code{supp}, @code{triang}, or @code{hvect} has been
    1319           activated.
    1320           However, in this case some numerical invariants are computed, and
    1321           some other data may be contained in files that you can read into
    1322           Singular (see @ref{showNuminvs}, @ref{exportNuminvs}).
    1323 @end texinfo
    1324 BACKGROUND: @texinfo
     1432@*The function returns the ideal given by the input matrix A if one of
     1433the options @code{supp}, @code{triang}, or @code{hvect} has been
     1434activated.
     1435However, in this case some numerical invariants are computed, and
     1436some other data may be contained in files that you can read into
     1437Singular.
     1438BACKGROUND:
    13251439@tex
    13261440 Let $T = (K^*)^r$ be the $r$-dimensional torus acting on the polynomial ring
     
    13331447$A=(a_{i,j})$.
    13341448@end tex
    1335 @end texinfo
    1336 NOTE:@texinfo
    1337 @tex
    1338 It is of course possible that $R^T=K$. At present, Normaliz cannot deal with
    1339 the zero cone and will issue the (wrong) error message that the cone is not
    1340 pointed. The function also gives an error message if the matrix $T$ has the
    1341 wrong number of columns.
    1342 @end tex
    1343 @end texinfo
    1344 SEE ALSO: valRing, valRingIdeal
     1449SEE ALSO: diagInvariants, finiteDiagInvariants, intersectionValRings,
     1450          intersectionValRingIdeals
    13451451EXAMPLE:  example torusInvariants; shows an example
    13461452"
    13471453{
    1348     if(nvars(basering)!=ncols(T))
     1454    if(nvars(basering)!=ncols(E))
    13491455    {
    13501456        ERROR("torusInvariants: wrong number of columns in matrix");
     
    13531459    string dummy=collectNmzOptions();  // only to set GenGen
    13541460
    1355 /*    if(!GenGen) // return T
    1356     {
    1357         runNormaliz(T,ncols(T),5);
    1358         return(T);
    1359     }
    1360 */    return( intmat2mons( runNormaliz(T,ncols(T),5) ) );
     1461    return( intmat2mons( runNormaliz(E,5) ) );
    13611462}
    13621463example
    13631464{ "EXAMPLE:"; echo=2;
    13641465  ring R=0,(x,y,z,w),dp;
    1365   intmat V0[2][4]=0,1,2,3, -1,1,2,1;
    1366   valRing(V0);
    1367 }
    1368 
    1369 proc valRing(intmat V)
    1370 "USAGE:   valRing(intmat V);
     1466  intmat E[2][4] = -1,-1,2,0, 1,1,-2,-1;
     1467  torusInvariants(E);
     1468}
     1469
     1470proc finiteDiagInvariants(intmat C)
     1471"USAGE:   finiteDiagInvariants(intmat U);
     1472RETURN:
     1473@tex
     1474This function computes the ring of invariants of a finite abelian group $G$
     1475acting diagonally on the surrounding polynomial ring $K[X_1,...,X_n]$. The
     1476group is the direct product of cyclic groups generated by finitely many
     1477elements $g_1,...,g_w$. The element $g_i$ acts on the indeterminate $X_j$ by
     1478$g_i(X_j)=\lambda_i^{u_{ij}}X_j$ where $\lambda_i$ is a primitive root of
     1479unity of order equal to $ord(g_i)$. The ring of invariants is generated by all
     1480monomials satisfying the system
     1481$u_{i1}a_1+\ldots+u_{in} a_n \equiv 0$ mod ord$(g_i)$, $i=1,\ldots,w$.
     1482The input to the function is the $w\times(n+1)$ matrix $U$ with rows
     1483$u_{i1}\ldots u_{in}$ ord$(gi)$, $i=1,\ldots,w$. The output is a monomial ideal
     1484listing the algebra generators of the subalgebra of invariants
     1485{$R^G=\{f\in R : g_i f = f$ for all $i=1,\ldots,w\}$}.
     1486@end tex
     1487@*The function returns the ideal given by the input matrix C if one of
     1488the options @code{supp}, @code{triang}, or @code{hvect} has been
     1489activated.
     1490However, in this case some numerical invariants are computed, and
     1491some other data may be contained in files that you can read into
     1492Singular.
     1493NOTE:
     1494SEE ALSO: torusInvariants, diagInvariants, intersectionValRings,
     1495          intersectionValRingIdeals,showNuminvs,exportNuminvs
     1496EXAMPLE:  example finiteDiagInvariants; shows an example
     1497"
     1498{
     1499    if(nvars(basering)!=ncols(C)-1)
     1500    {
     1501        ERROR("finiteDiagInvariants: wrong number of columns in matrix");
     1502    }
     1503
     1504    string dummy=collectNmzOptions();  // only to set GenGen
     1505
     1506    return( intmat2mons( runNormaliz(C,6) ) );
     1507}
     1508example
     1509{ "EXAMPLE:"; echo=2;
     1510  ring R = 0,(x,y,z,w),dp;
     1511  intmat C[2][5] = 1,1,1,1,5, 1,0,2,0,7;
     1512  finiteDiagInvariants(C);
     1513}
     1514
     1515proc diagInvariants(intmat E, intmat C)
     1516"USAGE:   diagInvariants(intmat A, intmat U);
     1517RETURN:
     1518@tex
     1519This function computes the ring of invariants of a diagonalizable group
     1520$D = T\times G$ where $T$ is a torus and $G$ is a finite abelian group, both
     1521acting diagonally on the polynomial ring $K[X_1,\ldots,X_n]$. The group
     1522actions are specified by the input matrices A and U. The first matrix specifies
     1523the torus action, the second the action of the finite group. See
     1524torusInvariants and finiteDiagInvariants for more detail. The output is a
     1525monomial ideal listing the algebra generators of the subalgebra of invariants.
     1526@end tex
     1527@*The function returns the ideal given by the input matrix A if one of
     1528the options @code{supp}, @code{triang}, or @code{hvect} has been
     1529activated.
     1530However, in this case some numerical invariants are computed, and
     1531some other data may be contained in files that you can read into
     1532Singular.
     1533SEE ALSO: torusInvariants, finiteDiagInvariants, intersectionValRings, intersectionValRingIdeals,showNuminvs,exportNuminvs
     1534EXAMPLE:  example diagInvariants; shows an example
     1535"
     1536{
     1537    if(nvars(basering)!=ncols(E) || nvars(basering)!=ncols(C)-1)
     1538    {
     1539        ERROR("diagInvariants: wrong number of columns in matrix");
     1540    }
     1541
     1542    string dummy=collectNmzOptions();  // only to set GenGen
     1543
     1544    return( intmat2mons( runNormaliz(E,5,C,6) ) );
     1545}
     1546example
     1547{ "EXAMPLE:"; echo=2;
     1548  ring R=0,(x,y,z,w),dp;
     1549  intmat E[2][4] = -1,-1,2,0, 1,1,-2,-1;
     1550  intmat C[2][5] = 1,1,1,1,5, 1,0,2,0,7;
     1551  diagInvariants(E,C);
     1552}
     1553
     1554proc intersectionValRings(intmat V)
     1555"USAGE:   intersectionValRings(intmat V);
    13711556RETURN:   The function returns a monomial ideal, to be considered as the list
    13721557          of monomials generating @math{S} as an algebra over the coefficient
    13731558          field.
    1374 BACKGROUND: @texinfo
     1559BACKGROUND:
    13751560@tex
    13761561A discrete monomial valuation $v$ on $R = K[X_1 ,\ldots,X_n]$ is determined by
     
    13801565its input.
    13811566@end tex
    1382 @end texinfo
    1383 @*        The function returns the ideal given by the input matrix V if one of
    1384           the options @code{supp}, @code{triang}, or @code{hvect} has been
    1385           activated.
    1386           However, in this case some numerical invariants are computed, and
    1387           some other data may be contained in files that you can read into
    1388           Singular (see @ref{showNuminvs}, @ref{exportNuminvs}).
    1389 NOTE:@texinfo
    1390 @tex
    1391 It is of course possible that $S=K$. At present, Normaliz cannot deal with the
    1392 zero cone and will issue the (wrong) error message that the cone is not
    1393 pointed. The function also gives an error message if the matrix $V$ has the
    1394 wrong number of columns.
    1395 @end tex
    1396 @end texinfo
    1397 SEE ALSO: torusInvariants, valRingIdeal
    1398 EXAMPLE:  example valRing; shows an example
     1567@*The function returns the ideal given by the input matrix V if one of
     1568the options @code{supp}, @code{triang}, or @code{hvect} has been
     1569activated.
     1570However, in this case some numerical invariants are computed, and
     1571some other data may be contained in files that you can read into
     1572Singular.
     1573SEE ALSO: torusInvariants, diagInvariants, finiteDiagInvariants, intersectionValRingIdeals,showNuminvs,exportNuminvs
     1574EXAMPLE:  example intersectionValRings; shows an example
    13991575"
    14001576{
     
    14021578    if(nvars(basering)!=ncols(V))
    14031579    {
    1404         ERROR("valRing: wrong number of columns in matrix");
     1580        ERROR("intersectionValRings: wrong number of columns in matrix");
    14051581    }
    14061582
     
    14251601/*    if(!GenGen) // return V
    14261602    {
    1427         runNormaliz(V1,ncols(V),4);
     1603        runNormaliz(V1,4);
    14281604        return(V);
    14291605    }
    14301606*/
    1431     return(intmat2mons(runNormaliz(V1,ncols(V),4)));
     1607    return(intmat2mons(runNormaliz(V1,4)));
    14321608}
    14331609example
     
    14351611  ring R=0,(x,y,z,w),dp;
    14361612  intmat V0[2][4]=0,1,2,3, -1,1,2,1;
    1437   valRing(V0);
    1438 }
    1439 
    1440 proc valRingIdeal(intmat V)
    1441 "USAGE:   valRingIdeal(intmat V);
     1613  intersectionValRings(V0);
     1614}
     1615
     1616proc intersectionValRingIdeals(intmat V)
     1617"USAGE:   intersectionValRingIdeals(intmat V);
    14421618RETURN:   The function returns two ideals, both to be considered as lists of
    14431619          monomials which generate an algebra over the coefficient field. The
     
    14501626          some other data may be contained in files that you can read into
    14511627          Singular (see @ref{showNuminvs}, @ref{exportNuminvs}).
    1452 BACKGROUND: @texinfo
     1628BACKGROUND:
    14531629@tex
    14541630A discrete monomial valuation $v$ on $R = K[X_1 ,\ldots,X_n]$ is determined by
     
    14631639The numbers $w_i$ form the $(n+1)$th column of the input matrix.
    14641640@end tex
    1465 @end texinfo
    1466 NOTE:@texinfo
    1467 @tex
    1468 It is of course possible that $S=K$. At present, Normaliz cannot deal with the
    1469 zero cone and will issue the (wrong) error message that the cone is not
    1470 pointed. The function also gives an error message if the matrix $T$ has the
    1471 wrong number of columns.
    1472 @end tex
    1473 @end texinfo
    1474 SEE ALSO: torusInvariants, valRing
    1475 EXAMPLE:  example valRingIdeal; shows an example
     1641NOTE:   The function also gives an error message if the matrix V has the
     1642        wrong number of columns.
     1643SEE ALSO: torusInvariants, diagInvariants, finiteDiagInvariants, intersectionValRings
     1644EXAMPLE:  example intersectionValRingIdeals; shows an example
    14761645"
    14771646{
    14781647    if(nvars(basering)!=ncols(V)-1)
    14791648    {
    1480         ERROR("valRingIdeal: wrong number of columns in matrix");
     1649        ERROR("intersectionValRingIdeals: wrong number of columns in matrix");
    14811650    }
    14821651
     
    15021671    string dummy=collectNmzOptions();  // only to set GenGen
    15031672
    1504 /*    if(!GenGen) // return V
    1505     {
    1506         runNormaliz(V1,ncols(V),4);
    1507         return(V);
    1508     }
    1509 */
    1510     intmat nmz_data=runNormaliz(V1,ncols(V),4);
     1673    intmat nmz_data=runNormaliz(V1,4);
    15111674
    15121675    ideal I1=intmat2monsSel(nmz_data,0);
     
    15181681 ring R=0,(x,y,z,w),dp;
    15191682 intmat V[2][5]=0,1,2,3,4, -1,1,2,1,3;
    1520  valRingIdeal(V);
    1521 }
    1522 //---------------------------------------------------------------------------
    1523 // a library file is a bad place for examples (it has to be parsed
    1524 // every time and one has to be carefull to make it ALL to a comment),
    1525 // but some authors prefer it that way.....
    1526 // and, the information is in the same file.
    1527 //
    1528 /*
    1529 // This example is taken from Bruns and Gubeladze, Polytopal linear groups,
    1530 // J. Algebra 218 (1999), 715--737.
    1531 // The generators of the monoid are the facet-vertex incidence vectors of
    1532 // the minimal triangulation of the real projective plane.
    1533 // It is our goal to show that the normalization of
    1534 // the corresponding algebra and the algebra itself differ
    1535 // only by a vector space of dimension 1.
    1536 //
    1537 // Computing times extremely small (< 1 sec) on every system.
    1538 //
    1539 LIB "normaliz.lib";
    1540 ring A=2,(a(1..6)),dp;
    1541 intmat M[10][6]=
    1542 1, 1, 1, 0, 0, 0,
    1543 1, 1, 0, 1, 0, 0,
    1544 1, 0, 1, 0, 1, 0,
    1545 1, 0, 0, 1, 0, 1,
    1546 1, 0, 0, 0, 1, 1,
    1547 0, 1, 1, 0, 0, 1,
    1548 0, 1, 0, 1, 1, 0,
    1549 0, 1, 0, 0, 1, 1,
    1550 0, 0, 1, 1, 1, 0,
    1551 0, 0, 1, 1, 0, 1;
    1552 ideal R=intmat2mons(M);
    1553 print(R);
    1554 setNmzOption("hilb",1);
    1555 ideal S=normalToricRing(R); // S is the normalization
    1556 print(S);
    1557 showNuminvs();
    1558 ideal Z=0;
    1559 ring P=2,(x(1..10)),dp;
    1560 ring Q=2,(y(1..10),z),dp;
    1561 setring A;
    1562 map f=P,R;
    1563 map g=Q,S;
    1564 setring P;
    1565 ideal I=preimage(A,f,Z);
    1566 hilb(std(I));
    1567 ring T=0,t,dp;
    1568 poly H1=1+4t+11t2+4t3+t4; // numerator polynomial of Hilbert series of S
    1569 poly H2=1+4t+10t2+10t3-14t4+20t5-15t6+6t7-1t^8; // the same for R itself
    1570 factorize(H1-H2); // this shows the claim about S/R
    1571 setring Q; // now we verify it additionally by the defining ideal of S
    1572 ideal J=preimage(A,g,Z);
    1573 print(J);
    1574 // Computing times extremely small (< 1 sec) on every system.
    1575 
    1576 ===========================================================================
    1577 
    1578 // The following example is the first one not covered by the classification
    1579 // of Ohsugi and Hibi of normality of monoids derived from contingency
    1580 // tables. (See H.Ohsugi and T. Hibi, Toric ideals arising from
    1581 // contingency tables. In: Commutative Algebra and Combinatorics.
    1582 // In: Ramanujan Mathematical Society Lecture Note Series 4
    1583 // (2006), 87--111.)
    1584 // The gaps in the classification have meanwhile been closed computationall=
    1585 y.
    1586 // See Bruns, R. Hemmecke, B. Ichim, M. K=F6ppe, and C.
    1587 // S=F6ger, Challenging computations of Hilbert bases of cones
    1588 // associated with algebraic statistics. Experimental Math., to appear.
    1589 //
    1590 // For the currently public version of Normaliz this is a very large exampl=
    1591 e
    1592 // On a SUN Fire X4450 it takes about an hour in version 2.2 and needs
    1593 about 20 GB
    1594 // of RAM. In the next version (already realized experimentally, expected u=
    1595 pload
    1596 // July 2010) it will be a matter of seconds due to algorithmic improvement=
    1597 s for
    1598 // this type of example and parallelization. Also memory usage will be redu=
    1599 ced
    1600 // significantly.
    1601 //
    1602 LIB "normaliz.lib";
    1603 intmat M[48][40]=
    1604 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
    1605 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    1606 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
    1607 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    1608 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0,
    1609 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    1610 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
    1611 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    1612 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
    1613 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    1614 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
    1615 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    1616 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0,
    1617 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    1618 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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, 0, 0, 0, 0, 0,
    1699 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1;
    1700 setNmzOption("control",1);
    1701 intmat N=normaliz(M,1);
    1702 showNuminvs(); // shows that the monoid generated by the rows of M is norma=
    1703 l
    1704 
    1705 
    1706 */
    1707 
     1683 intersectionValRingIdeals(V);
     1684}
Note: See TracChangeset for help on using the changeset viewer.