Changeset 4a09df4 in git


Ignore:
Timestamp:
Feb 10, 2010, 4:45:53 PM (14 years ago)
Author:
Frank Seelisch <seelisch@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
a1aae2a301ed1473a509df72da49cb3b55f4670a
Parents:
de25e52ca6f5189dc77bde21076997619d6dc8ba
Message:
new version emailed by Winfried Bruns on Feb 10, 2010

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

Legend:

Unmodified
Added
Removed
  • Singular/LIB/normaliz.lib

    rde25e5 r4a09df4  
    44category="Commutative algebra"
    55info="
    6 LIBRARY: normaliz.lib  Provides an interface for the use of Normaliz 2.2 within SINGULAR.
     6LIBRARY: normaliz.lib  Provides an interface for the use of Normaliz 2.2
     7         within SINGULAR.
    78AUTHORS:  Winfried Bruns, Winfried.Bruns@Uni-Osnabrueck.de
    89          Christof Soeger, Christof.Soeger@Uni-Osnabrueck.de
    910
    1011OVERVIEW:
    11 @texinfo
    12 The library normaliz.lib provides an interface for the use of Normaliz 2.2 within SINGULAR. The exchange of data is via files, the only possibility offered by Normaliz in its present version. In addition to the top level functions that aim at objects of type ideal or ring, several other auxiliary functions allow the user to apply Normaliz to data of type intmat. Therefore SINGULAR can be used as a comfortable environment for the work with Normaliz.
    13 @* Please see the @code{Normaliz2.2Documentation.pdf} and @code{nmz_sing.pdf} (both are included in the Normaliz distribution) for a more extensive documentation of Normaliz.
     12The library normaliz.lib provides an interface for the use of Normaliz 2.2
     13within SINGULAR. The exchange of data is via files, the only possibility
     14offered by Normaliz in its present version. In addition to the top level
     15functions that aim at objects of type ideal or ring, several other auxiliary
     16functions allow the user to apply Normaliz to data of type intmat. Therefore
     17SINGULAR can be used as a comfortable environment for the work with Normaliz.
     18@* Please see the @code{Normaliz2.2Documentation.pdf} and @code{nmz_sing.pdf}
     19(both are included in the Normaliz distribution) for a more extensive
     20documentation of Normaliz.
    1421@*
    15 @*Singular and Normaliz exchange data via files. These files are
    16 automatically created and erased behind the scenes. As long as one
    17 wants to use only the ring-theoretic functions there is no need for
    18 file management.
     22@*Singular and Normaliz exchange data via files. These files are automatically
     23created and erased behind the scenes. As long as one wants to use only the
     24ring-theoretic functions there is no need for file management.
    1925@*
    2026@*Note that the numerical invariants computed by Normaliz can be
     
    2733Deletion of the files is left to the user.
    2834@*
    29 @*
    30 Use of this library requires the program Normaliz to be installed.
     35@* Use of this library requires the program Normaliz to be installed.
    3136You can download it from
    32 @uref{http://www.mathematik.uni-osnabrueck.de/normaliz/}.
    33 Please make sure that the executables are in the search path or use setNmzExecPath (@ref{setNmzExecPath}).
    34 @end texinfo
    35 
    36 NOTE:    These library functions use @code{sed} to transfer the Normaliz output into a SINGULAR compliant format.
     37@uref{http://www.mathematik.uni-osnabrueck.de/normaliz/}. Please make sure
     38that the executables are in the search path or use setNmzExecPath
     39(@ref{setNmzExecPath}).
     40
     41NOTE:    These library functions use @code{sed} to transfer the Normaliz
     42output into a SINGULAR compliant format.
    3743
    3844
     
    4046
    4147PROCEDURES:
    42   intclToricRing(ideal I)        computes the integral closure of the toric ring generated by the leading monomials of the elements of I in the basering
    43   normalToricRing(ideal I)       computes the normalization of the toric ring generated by the leading monomials of the elements of I
    44   ehrhartRing(ideal I)           computes the monomials representing the lattice points of the polytop generated leading monomials of the elements of I
    45   intclMonIdeal(ideal I)         the exponent vectors of the leading monomials of the elements of I are considered as generators of a monomial ideal whose Rees algebra is computed
    46 
    47   torusInvariants(intmat T)      computes the ring of invariants of a torus action
    48   valRing(intmat V)              computes the intersection of the polynomial ring with the valuation rings of monomial valuations
    49   valRingIdeal(intmat V)         computes ideals of monomial valuations
    50 
    51   showNuminvs()                  prints the numerical invariants
    52   exportNuminvs()                exports the numerical invariants
    53 
    54   setNmzOption(string s, int onoff) sets the option s to onoff
    55   showNmzOptions()               prints the enabled options to the standard output
    56 
    57   normaliz(intmat sgr,int nmz_mode) applies Normaliz
    58   setNmzVersion(string nmz_version_name) sets the version of the Normaliz executable
    59   setNmzExecPath(string nmz_exec_path_name) sets the path to the Normaliz executable
    60 
    61   writeNmzData(intmat sgr, int n_mode) creates an input file for Normaliz
    62   readNmzData(string nmz_suffix) reads the Normaliz output file with the specified suffix
    63 
    64   setNmzFilename(string nmz_filename_name) sets the filename for the exchange of data
    65   setNmzDataPath(string nmz_data_path_name) sets the directory for the exchange of data
    66   writeNmzPaths()                writes the path names into two files
    67   startNmz()                     retrieves the path names written by writeNmzPaths
    68   rmNmzFiles()                   removes the files created for and by Normaliz
    69 
    70   mons2intmat(ideal I)           returns the intmat whose rows represent the leading exponents of the elements of I.
    71   intmat2mons(intmat expo_vecs)  returns the ideal generated by the monomials which have the rows of expo_vecs as exponent vector
     48 intclToricRing(ideal I)      computes the integral closure of the toric ring
     49                              generated by the leading monomials of the
     50                              elements of I in the basering
     51 normalToricRing(ideal I)     computes the normalization of the toric ring
     52                              generated by the leading monomials of the
     53                              elements of I
     54 ehrhartRing(ideal I)         computes the monomials representing the lattice
     55                              points of the polytop generated leading monomials
     56                              of the elements of I
     57 intclMonIdeal(ideal I)       the exponent vectors of the leading monomials of
     58                              the elements of I are considered as generators of
     59                              a monomial ideal whose Rees algebra is computed
     60
     61 torusInvariants(intmat T)    computes the ring of invariants of a torus action
     62 valRing(intmat V)            computes the intersection of the polynomial ring
     63                              with the valuation rings of monomial valuations
     64 valRingIdeal(intmat V)       computes ideals of monomial valuations
     65
     66 showNuminvs()                prints the numerical invariants
     67 exportNuminvs()              exports the numerical invariants
     68
     69 setNmzOption(string s, int onoff) sets the option s to onoff
     70 showNmzOptions()             prints the enabled options to the standard output
     71
     72 normaliz(intmat sgr,int nmz_mode) applies Normaliz
     73 setNmzVersion(string nmz_version_name) sets the version of the Normaliz
     74                                        executable
     75 setNmzExecPath(string nmz_exec_path_name) sets the path to the Normaliz
     76                                           executable
     77
     78 writeNmzData(intmat sgr, int n_mode) creates an input file for Normaliz
     79 readNmzData(string nmz_suffix) reads the Normaliz output file with the
     80                                specified suffix
     81
     82 setNmzFilename(string nmz_filename_name) sets the filename for the exchange
     83                                          of data
     84 setNmzDataPath(string nmz_data_path_name) sets the directory for the exchange
     85                                           of data
     86 writeNmzPaths()              writes the path names into two files
     87 startNmz()                   retrieves the path names written by writeNmzPaths
     88 rmNmzFiles()                 removes the files created for and by Normaliz
     89
     90 mons2intmat(ideal I)         returns the intmat whose rows represent the
     91                              leading exponents of the elements of I
     92 intmat2mons(intmat expo_vecs) returns the ideal generated by the monomials
     93                               which have the rows of expo_vecs as
     94                               exponent vector
    7295";
    7396
     
    148171"USAGE:   setNmzExecPath(string s);   @code{s} path to the Normaliz executable
    149172CREATE:   @code{Normaliz::nmz_exec_path} to save the given path @code{s}
    150 NOTE:     It is not necessary to use this function if the Normaliz executable is in the search path of the system.
     173NOTE:     It is not necessary to use this function if the Normaliz executable
     174          is in the search path of the system.
    151175SEE ALSO: setNmzVersion
    152176EXAMPLE:  example setNmzExecPath; shows an example"
     
    161185
    162186proc setNmzVersion(string nmz_version_name)
    163 "USAGE:   setNmzVersion(string s);   @code{s} version of the Normaliz executable
     187"USAGE:   setNmzVersion(string s);  @code{s} version of the Normaliz executable
    164188CREATE:   @code{Normaliz::nmz_version} to save the given version @code{s}
    165 NOTE:     The version coincides with the filename of the Normaliz executable. Possible arguments are:
     189NOTE:     The version coincides with the filename of the Normaliz executable.
     190          Possible arguments are:
    166191          @* @code{norm32} for 32bit integer precision
    167192          @* @code{norm64} for 64bit integer precision (default)
     
    182207"USAGE:   setNmzFilename(string s);
    183208CREATE:   @code{Normaliz::nmz_filename} to save the given filename @code{s}
    184 NOTE:     The function sets the filename for the exchange of data. Unless a path is set by setNmzDataPath,
    185           files will be created in the current directory.
    186           @* If a non-empty filename is set, the files created for and by Normaliz are kept. This is mandatory for the data access functions (see @ref{writeNmzData} and @ref{readNmzData}).
    187           @* Resetting the filename by setNmzFilename(\"\") forces the library to return to deletion of temporary files, but the files created while the filename had been set will not be erased.
     209NOTE:     The function sets the filename for the exchange of data. Unless a
     210          path is set by setNmzDataPath, files will be created in the current
     211          directory.
     212          @* If a non-empty filename is set, the files created for and by
     213             Normaliz are kept. This is mandatory for the data access functions
     214             (see @ref{writeNmzData} and @ref{readNmzData}).
     215          @* Resetting the filename by setNmzFilename(\"\") forces the library
     216             to return to deletion of temporary files, but the files created
     217             while the filename had been set will not be erased.
    188218SEE ALSO: writeNmzData, readNmzData, setNmzDataPath, rmNmzFiles
    189219EXAMPLE:  example setNmzFilename; shows an example"
     
    203233  setNmzDataPath("examples/");
    204234  setNmzFilename("example1");
    205   //now the files for the exchange with Normalize are examples/example1.SUFFIX
     235  //now the files for the exchange with Normaliz are examples/example1.SUFFIX
    206236}
    207237
     
    209239"USAGE:   setNmzDataPath(string s);
    210240CREATE:   @code{Normaliz::nmz_data_path} to save the given path @code{s}
    211 NOTE:     The function sets the path for the exchange of data. By default the files will be created in the current directory.
    212           @* It seems that Singular cannot use filenames starting with @code{~} or @code{$HOME} in its input/output functions.
    213           @* You must also avoid path names starting with @code{/} if you work under Cygwin, since Singular and Normaliz interpret them in different ways.
     241NOTE:     The function sets the path for the exchange of data. By default the
     242          files will be created in the current directory.
     243          @* It seems that Singular cannot use filenames starting with @code{~}
     244             or @code{$HOME} in its input/output functions.
     245          @* You must also avoid path names starting with @code{/} if you work
     246             under Cygwin, since Singular and Normaliz interpret them in
     247             different ways.
    214248SEE ALSO: writeNmzData, readNmzData, rmNmzFiles, setNmzFilename
    215249EXAMPLE:  example setNmzDataPath; shows an example"
     
    226260proc writeNmzPaths();
    227261"USAGE:   writeNmzPaths();
    228 CREATE:   the file nmz_sing_exec.path where the path to the Normaliz executable is saved
    229           @* the file nmz_sing_data.path where the directory for the exchange of data is saved
    230 NOTE:     Both files are saved in the current directory. If one of the names has not been defined, the corresponding file is created, but contains nothing.
     262CREATE:   the file nmz_sing_exec.path where the path to the Normaliz executable
     263          is saved
     264          @* the file nmz_sing_data.path where the directory for the exchange
     265          of data is saved
     266NOTE:     Both files are saved in the current directory. If one of the names
     267          has not been defined, the corresponding file is created, but
     268          contains nothing.
    231269SEE ALSO: setNmzDataPath, setNmzExecPath, startNmz
    232270EXAMPLE:  example writeNmzPaths; shows an example
     
    250288proc startNmz()
    251289"USAGE:   startNmz();
    252 PURPOSE:  This function reads the files written by @code{writeNmzPaths()}, retrieves the path names, and
    253 types them on the standard output (as far as they have been set). Thus, once the path names
    254 have been stored, a Normaliz session can simply be opened by this function.
     290PURPOSE:  This function reads the files written by @code{writeNmzPaths()},
     291          retrieves the path names, and types them on the standard output
     292          (as far as they have been set). Thus, once the path names have been
     293          stored, a Normaliz session can simply be opened by this function.
    255294SEE ALSO: setNmzDataPath, setNmzExecPath, writeNmzPaths
    256295EXAMPLE:  example startNmz; shows an example
     
    330369    }
    331370    dummy=system("sh","mkdir "+ testdir);
    332     desString("nmz_filename",testdir+"/nmz"); // files are nmz+suffix in testdir
     371    desString("nmz_filename",testdir+"/nmz"); //files are nmz+suffix in testdir
    333372}
    334373
     
    353392
    354393proc rmNmzFiles()
    355 "USAGE:   rmNmzFiles();
    356 PURPOSE: This function removes the files created for and by Normaliz, using the last filename specified.
    357 It needs an explicit filename set (see @ref{setNmzFilename}).
     394"USAGE:  rmNmzFiles();
     395PURPOSE: This function removes the files created for and by Normaliz, using
     396         the last filename specified.
     397         It needs an explicit filename set (see @ref{setNmzFilename}).
    358398SEE ALSO: writeNmzData, readNmzData, setNmzFilename, setNmzDataPath
    359399EXAMPLE:  example rmNmzFiles; shows an example
     
    365405    }
    366406
    367     list suffixes="in","gen","out","sup","typ","egn","esp","inv","tri","ht1","ext";
     407    list suffixes="in","gen","out","sup","typ","egn","esp","inv","tri","ht1",
     408                  "ext";
    368409    int i,dummy;
    369410    string f;
     
    567608proc writeNmzData(intmat sgr, int n_mode)
    568609"USAGE:   writeNmzData(intmat M, int mode);
    569 CREATE:   Creates an input file for Normaliz from the matrix M. The second parameter sets the mode. How the matrix is interpreted depends on the mode. See the Normaliz documentation for more information.
    570 NOTE:     Needs an explicit filename set. The filename is created from the current  filename and the suffix given to the function.
    571    @*     Note that all functions in normaliz.lib write and read their data automatically to and from the hard disk so that writeNmzData will hardly ever be used explicitly.
     610CREATE:   Creates an input file for Normaliz from the matrix M. The second
     611          parameter sets the mode. How the matrix is interpreted depends on the
     612          mode. See the Normaliz documentation for more information.
     613NOTE:     Needs an explicit filename set. The filename is created from the
     614          current filename and the suffix given to the function.
     615   @*     Note that all functions in normaliz.lib write and read their data
     616          automatically to and from the hard disk so that writeNmzData will
     617          hardly ever be used explicitly.
    572618SEE ALSO: readNmzData, rmNmzFiles, setNmzFilename, setNmzDataPath
    573619EXAMPLE:  example writeNmzData; shows an example"
     
    589635
    590636proc readNmzData(string nmz_suffix)
    591 "USAGE:   readNmzData(string suffix);
    592 RETURN:   Reads an output file of Normaliz containing an integer matrix and returns it as an intmat. For example, this function is useful if one wants to inspect the support hyperplanes. The filename is created from the current  filename and the suffix given to the function.
    593 NOTE:     Needs an explicit filename set by setNmzFilename.
    594    @*     Note that all functions in normaliz.lib write and read their data automatically so that readNmzData will usually not be used explicitly.
    595    @*     This function uses the command @code{sed} to transfer the normaliz output into a singular conform format.
     637"USAGE:  readNmzData(string suffix);
     638RETURN:  Reads an output file of Normaliz containing an integer matrix and
     639         returns it as an intmat. For example, this function is useful if one
     640         wants to inspect the support hyperplanes. The filename is created
     641         from the current  filename and the suffix given to the function.
     642NOTE:    Needs an explicit filename set by setNmzFilename.
     643   @*    Note that all functions in normaliz.lib write and read their data
     644         automatically so that readNmzData will usually not be used explicitly.
     645   @*    This function uses the command @code{sed} to transfer the normaliz
     646         output into a singular conform format.
    596647SEE ALSO: writeNmzData, rmNmzFiles, setNmzFilename, setNmzDataPath
    597648EXAMPLE:  example readNmzData; shows an example"
     
    627678    }
    628679    //string c = "nmz_gen=" + s[p,q-p] + ";";
    629     string c = "intmat nmz_gen["+ string(n_rows) +"]["+ string(n_cols) +"]=" + s[p,q-p] + ";";
     680    string c = "intmat nmz_gen["+ string(n_rows) +"]["+ string(n_cols) +"]="
     681             + s[p,q-p] + ";";
    630682//"// ** readNmzData: string gebastelt";
    631683    execute(c);
     
    672724proc setNmzOption(string s, int onoff)
    673725"USAGE:   setNmzOption(string s, int onoff);
    674 PURPOSE:  If @code{onoff=1} the option @code{s} is activated, and if @code{onoff=0} it is deactivated.
     726PURPOSE:  If @code{onoff=1} the option @code{s} is activated, and
     727          if @code{onoff=0} it is deactivated.
    675728The Normaliz options are accessible via the following names:
    676729@* @code{-s:  supp}
     
    753806    if(queryInt("nmz_files_keep_switch"))
    754807    {
    755         int dummy=system("sh",setNmzExec()+ collectNmzOptions() + getNmzFile());
     808       int dummy=system("sh",setNmzExec()+ collectNmzOptions() + getNmzFile());
    756809    }
    757810    else
     
    790843proc normaliz(intmat sgr,int nmz_mode)
    791844"USAGE:   normaliz(intmat sgr,int nmz_mode);
    792 RETURN:   The function applies Normaliz to the parameter sgr in the mode set by nmz_mode. The
    793 function returns the intmat defined by the file with suffix gen.
    794 NOTE:     You will find procedures for many applications of Normaliz in this library, so the explicit call of this procedure may not be necessary.
    795 SEE ALSO: intclToricRing, normalToricRing, ehrhartRing, intclMonIdeal, torusInvariants, valRing, valRingIdeal
     845RETURN:   The function applies Normaliz to the parameter sgr in the mode set
     846          by nmz_mode. The function returns the intmat defined by the file
     847          with suffix gen.
     848NOTE:     You will find procedures for many applications of Normaliz in this
     849          library, so the explicit call of this procedure may not be necessary.
     850SEE ALSO: intclToricRing, normalToricRing, ehrhartRing, intclMonIdeal,
     851          torusInvariants, valRing, valRingIdeal
    796852EXAMPLE:  example normaliz; shows an example
    797853"
     
    913969proc exportNuminvs()
    914970"USAGE:   exportNuminvs();
    915 CREATE:   Creates top-level variables which contain the numerical invariants. Depending on the options of normaliz different invariants are calculated. Use showNuminvs (@ref{showNuminvs}) to see which invariants are available.
     971CREATE:   Creates top-level variables which contain the numerical invariants.
     972          Depending on the options of normaliz different invariants are
     973          calculated. Use showNuminvs (@ref{showNuminvs}) to see which
     974          invariants are available.
    916975SEE ALSO: showNuminvs
    917976EXAMPLE:  example exportNuminvs; shows an example
     
    9501009proc mons2intmat(ideal I)
    9511010"USAGE:   mons2intmat(ideal I);
    952 RETURN:   Returns the intmat whose rows represent the leading exponents of the (non-zero) elements of I. The
    953 length of each row is nvars(basering).
     1011RETURN:   Returns the intmat whose rows represent the leading exponents of the
     1012          (non-zero) elements of I. The length of each row is nvars(basering).
    9541013SEE ALSO: intmat2mons
    9551014EXAMPLE:  example mons2intmat; shows an example"
     
    9841043proc intmat2mons(intmat expo_vecs)
    9851044"USAGE:   intmat2mons(intmat M);
    986 RETURN:   an ideal generated by the monomials which correspond to the exponent vectors given by the rows of @code{M}
    987 NOTE:     The number of variables in the basering @code{nvars(basering)} has to be at least the number of columns @code{ncols(M)}, otherwise an error is omitted (see  @ref{ERROR}).
     1045RETURN:   an ideal generated by the monomials which correspond to the exponent
     1046          vectors given by the rows of @code{M}
     1047NOTE:     The number of variables in the basering @code{nvars(basering)} has to
     1048          be at least the number of columns @code{ncols(M)}, otherwise the
     1049          function exits with an error.
     1050          is thrown (see @ref{ERROR}).
    9881051SEE ALSO: mons2intmat
    9891052EXAMPLE:  example intmat2mons; shows an example
     
    10081071        mons=mons,m;
    10091072    }
    1010     return(mons[2..ncols(mons)]);
     1073     mons=simplify(mons,2);    // get rid of starting 0
     1074     return(mons);
    10111075}
    10121076example
     
    10441108        }
    10451109    }
    1046     return(mons[2..ncols(mons)]); // get rid of starting 0
     1110     mons=simplify(mons,2);    // get rid of starting 0
     1111     return(mons);
    10471112}
    10481113
     
    10571122    string dummy=collectNmzOptions(); // only to set GenGen
    10581123
    1059     if(!GenGen) // return nothing
     1124    if(!GenGen) // return I
    10601125    {
    10611126        runNormaliz(expo_vecs,ncols(expo_vecs),nmz_mode);
    1062         return();
     1127        return(I);
    10631128    }
    10641129    return( intmat2mons( runNormaliz(expo_vecs,ncols(expo_vecs),nmz_mode) ) );
     
    10661131
    10671132proc intclToricRing(ideal I)
    1068 "USAGE:    intclToricRing(ideal I);
    1069 RETURN:    Let S be the toric ring generated by the leading monomials of the elements of I. The function computes the integral closure of S in the basering and returns an ideal listing the generators.
    1070 @*         The function returns nothing if one of the options @code{supp}, @code{triang}, or @code{hvect} has been activated. However, in this case some numerical invariants are computed, and some other data may be contained in files that you can read into Singular (see @ref{showNuminvs}, @ref{exportNuminvs}).
    1071 NOTE:     A mathematical remark: the toric ring depends on the list of monomials given, and not only on the ideal they generate!
     1133"USAGE:   intclToricRing(ideal I);
     1134RETURN:   The toric ring S is the subalgebra of the basering generated by the
     1135          leading monomials of the elements of I. The function computes the
     1136          integral closure T of S in the basering and returns an ideal listing
     1137          the algebra generators of T over the coefficient field.
     1138@*        The function returns the input ideal I if one of the options
     1139          @code{supp}, @code{triang}, or @code{hvect} has been activated.
     1140          However, in this case some numerical invariants are computed, and
     1141          some other data may be contained in files that you can read into
     1142          Singular (see @ref{showNuminvs}, @ref{exportNuminvs}).
     1143NOTE:     A mathematical remark: the toric ring depends on the list of
     1144          monomials given, and not only on the ideal they generate!
    10721145SEE ALSO:  normalToricRing, ehrhartRing, intclMonIdeal
    10731146EXAMPLE:   example intclToricRing; shows an example
     
    10841157
    10851158proc normalToricRing(ideal I)
    1086 "USAGE:    normalToricRing(ideal I);
    1087 RETURN:    Computes the normalization of the toric ring generated by the leading monomials of the elements of I. The function returns an ideal listing the generators of the normalization.
    1088 @*         The function returns nothing if one of the options @code{supp}, @code{triang}, or @code{hvect} has been activated. However, in this case some numerical invariants are computed, and some other data may be contained in files that you can read into Singular (see @ref{showNuminvs}, @ref{exportNuminvs}).
    1089 NOTE:     A mathematical remark: the toric ring depends on the list of monomials given, and not only on the ideal they generate!
     1159"USAGE:   normalToricRing(ideal I);
     1160RETURN:   The toric ring S is the subalgebra of the basering generated by the
     1161          leading monomials of the elements of I. The function computes the
     1162          normalisation T of S and returns an ideal listing the algebra
     1163          generators of T over the coefficient field.
     1164@*        The function returns the input ideal I if one of the options
     1165          @code{supp}, @code{triang}, or @code{hvect} has been activated.
     1166          However, in this case some numerical invariants are computed, and
     1167          some other data may be contained in files that you can read into
     1168          Singular (see @ref{showNuminvs}, @ref{exportNuminvs}).
     1169NOTE:     A mathematical remark: the toric ring depends on the list of
     1170          monomials given, and not only on the ideal they generate!
    10901171SEE ALSO: intclToricRing, ehrhartRing, intclMonIdeal
    10911172EXAMPLE:  example normalToricRing; shows an example
     
    11181199    string dummy=collectNmzOptions(); // only to set GenGen
    11191200
    1120     if(!GenGen) // return nothing
     1201    if(!GenGen) // return I
    11211202    {
    11221203        runNormaliz(expo_vecs,ncols(expo_vecs),nmz_mode);
    1123         return();
    1124     }
    1125 
    1126     intmat nmz_data=runNormaliz(expo_vecs,ncols(expo_vecs)-1+last_comp,nmz_mode);
     1204        return(I);
     1205    }
     1206
     1207    intmat nmz_data=runNormaliz(expo_vecs,ncols(expo_vecs)-1+last_comp,
     1208                                                                  nmz_mode);
    11271209
    11281210    if(last_comp)
     
    11411223proc ehrhartRing(ideal I)
    11421224"USAGE:    ehrhartRing(ideal I);
    1143 RETURN:    The exponent vectors of the leading monomials of the elements of I are considered as verices of a lattice polytope. The function returns a list of ideals:
    1144 @*         (i) If the last ring variable is not used by the monomials, it is treated as the auxiliary variable
    1145 of the Ehrhart ring. The function returns two ideals, the first containing the monomials representing the lattice points of the polytope, the second containing the generators of the Ehrhart ring.
    1146 @*         (ii) If the last ring variable is used by the monomials, the list returned contains only one ideal,
    1147 namely the monomials representing the lattice points of the polytope.
     1225RETURN:    The exponent vectors of the leading monomials of the elements of I
     1226           are considered as vertices of a lattice polytope P.
     1227           The Ehrhart ring of a (lattice) polytope P is the monoid algebra
     1228           defined by the monoid of lattice points in the cone over the
     1229           polytope P; see Bruns and Gubeladze, Polytopes, Rings, and K-theory,
     1230           Springer 2009, pp. 228, 229.
     1231           The function returns a list of ideals:
     1232@*         (i) If the last ring variable is not used by the monomials, it is
     1233               treated as the auxiliary variable of the Ehrhart ring. The
     1234               function returns two ideals, the first containing the monomials
     1235               representing the lattice points of the polytope, the second
     1236               containing the algebra generators of the Ehrhart ring over the
     1237                    coefficient field.
     1238@*         (ii) If the last ring variable is used by the monomials, the list
     1239                returned contains only one ideal, namely the monomials
     1240                representing the lattice points of the polytope.
    11481241@*
    1149 @*         The function returns nothing if one of the options @code{supp}, @code{triang}, or @code{hvect} has been activated. However, in this case some numerical invariants are computed, and some other data may be contained in files that you can read into Singular (see @ref{showNuminvs}, @ref{exportNuminvs}).
    1150 NOTE:      A mathematical remark: the Ehrhart ring depends on the list of monomials given, and not only on the ideal they generate!
     1242@*        The function returns the input ideal I if one of the options
     1243          @code{supp}, @code{triang}, or @code{hvect} has been activated.
     1244          However, in this case some numerical invariants are computed, and
     1245          some other data may be contained in files that you can read into
     1246          Singular (see @ref{showNuminvs}, @ref{exportNuminvs}).
     1247NOTE:      A mathematical remark: the Ehrhart ring depends on the list of
     1248           monomials given, and not only on the ideal they generate!
    11511249SEE ALSO: intclToricRing, normalToricRing, intclMonIdeal
    11521250EXAMPLE:  example ehrhartRing; shows an example
     
    11641262proc intclMonIdeal(ideal I)
    11651263"USAGE:   intclMonIdeal(ideal I);
    1166 RETURN:   The exponent vectors of the leading monomials of the elements of I are considered as generators of a monomial ideal for which the normalization of its Rees algebra is computed. The function returns a list of
    1167 ideals:
    1168 @* (i) If the last ring variable is not used by the monomials, it is treated as the auxiliary variable of the Rees algebra. The function returns two ideals, the first containing the monomials generating the integral closure of the monomial ideal, the second containing the generators of the normalization Rees algebra.
    1169 @* (ii) If the last ring variable is used by the monomials, the list returned contains only one ideal, namely the monomials generating the integral closure of the ideal.
    1170 @*         The function returns nothing if one of the options @code{supp}, @code{triang}, or @code{hvect} has been activated. However, in this case some numerical invariants are computed, and some other data may be contained in files that you can read into Singular (see @ref{showNuminvs}, @ref{exportNuminvs}).
    1171 NOTE:     A mathematical remark: the Rees algebra depends on the list of monomials given, and not only on the ideal they generate!
     1264RETURN:   The exponent vectors of the leading monomials of the elements of I
     1265          are considered as generators of a monomial ideal for which the
     1266          normalization of its Rees algebra is computed. For a Definiton of the
     1267          Rees algebra (or Rees ring) see Bruns and Herzog, Cohen-Macaulay
     1268          rings, Cambridge University Press 1998, p. 182.
     1269          The function returns a list of ideals:
     1270@* (i) If the last ring variable is not used by the monomials, it is treated
     1271       as the auxiliary variable of the Rees algebra. The function returns two
     1272       ideals, the first containing the monomials generating the integral
     1273       closure of the monomial ideal, the second containing the algebra
     1274         generators of the normalization of the Rees algebra.
     1275@* (ii) If the last ring variable is used by the monomials, the list returned
     1276        contains only one ideal, namely the monomials generating the integral
     1277        closure of the ideal.
     1278@*        The function returns the input ideal I if one of the options
     1279          @code{supp}, @code{triang}, or @code{hvect} has been activated.
     1280          However, in this case some numerical invariants are computed, and
     1281          some other data may be contained in files that you can read into
     1282          Singular (see @ref{showNuminvs}, @ref{exportNuminvs}).
     1283NOTE:     A mathematical remark: the Rees algebra depends on the list of
     1284          monomials given, and not only on the ideal they generate!
    11721285SEE ALSO: intclToricRing, normalToricRing, ehrhartRing
    11731286EXAMPLE:  example intclMonIdeal; shows an example
     
    11901303"USAGE:   torusInvariants(intmat A);
    11911304RETURN:   @texinfo
    1192 Returns an ideal representing the list of monomials generating the ring of invariants
     1305Returns an ideal representing the list of monomials generating the ring of
     1306invariants as an algebra over the coefficient field.
    11931307@tex
    11941308$R^T$.
    11951309@end tex
     1310@*        The function returns the input matrix T if one of the options
     1311          @code{supp}, @code{triang}, or @code{hvect} has been activated.
     1312          However, in this case some numerical invariants are computed, and
     1313          some other data may be contained in files that you can read into
     1314          Singular (see @ref{showNuminvs}, @ref{exportNuminvs}).
    11961315@end texinfo
    11971316BACKGROUND: @texinfo
    11981317@tex
    1199  Let $T = (K^*)^r$ be the $r$-dimensional torus acting on the polynomial ring $R = K[X_1 ,\ldots,X_n]$ diagonally. Such an action can be described as follows: there are integers $a_{i,j}$, $i=1,\ldots,r$, $j=1,\ldots,n$, such that $(\lambda_1,\ldots,\lambda_r)\in T$ acts by the substitution
    1200 $$ X_j \mapsto \lambda_1^{a_{1,j}} \cdots \lambda_r^{a_{r,j}}X_j,  \quad j=1,\ldots,n.$$
    1201 In order to compute the ring of invariants $R^T$ one must specify the matrix $A=(a_{i,j})$.
     1318 Let $T = (K^*)^r$ be the $r$-dimensional torus acting on the polynomial ring
     1319 $R = K[X_1 ,\ldots,X_n]$ diagonally. Such an action can be described as
     1320 follows: there are integers $a_{i,j}$, $i=1,\ldots,r$, $j=1,\ldots,n$, such
     1321 that $(\lambda_1,\ldots,\lambda_r)\in T$ acts by the substitution
     1322$$ X_j \mapsto \lambda_1^{a_{1,j}} \cdots \lambda_r^{a_{r,j}}X_j,
     1323   \quad j=1,\ldots,n.$$
     1324In order to compute the ring of invariants $R^T$ one must specify the matrix
     1325$A=(a_{i,j})$.
    12021326@end tex
    12031327@end texinfo
    12041328NOTE:@texinfo
    12051329@tex
    1206 It is of course possible that $R^T=K$. At present, Normaliz cannot deal with the zero cone and
    1207 will issue the (wrong) error message that the cone is not pointed. The function also gives an error
    1208 message if the matrix $T$ has the wrong number of columns.
     1330It is of course possible that $R^T=K$. At present, Normaliz cannot deal with
     1331the zero cone and will issue the (wrong) error message that the cone is not
     1332pointed. The function also gives an error message if the matrix $T$ has the
     1333wrong number of columns.
    12091334@end tex
    12101335@end texinfo
     
    12201345    string dummy=collectNmzOptions();  // only to set GenGen
    12211346
    1222     if(!GenGen) // return nothing
     1347    if(!GenGen) // return T
    12231348    {
    12241349        runNormaliz(T,ncols(T),5);
    1225         return();
     1350        return(Z);
    12261351    }
    12271352    return( intmat2mons( runNormaliz(T,ncols(T),5) ) );
     
    12361361proc valRing(intmat V)
    12371362"USAGE:   valRing(intmat V);
    1238 RETURN:   The function returns a monomial ideal, to be considered as the list of monomials generating @math{S}.
     1363RETURN:   The function returns a monomial ideal, to be considered as the list
     1364          of monomials generating @math{S} as an algebra over the coefficient
     1365             field.
    12391366BACKGROUND: @texinfo
    12401367@tex
    1241 A discrete monomial valuation $v$ on $R = K[X_1 ,\ldots,X_n]$ is determined by the values $v(X_j)$ of the indeterminates. This function computes the subalgebra $S = \{ f \in R : v_i ( f ) \geq 0,\ i = 1,\ldots,r\}$ for
    1242 several such valuations $v_i$, $i=1,\ldots,r$. It needs the matrix $V = (v_i(X_j))$ as its input.
     1368A discrete monomial valuation $v$ on $R = K[X_1 ,\ldots,X_n]$ is determined by
     1369the values $v(X_j)$ of the indeterminates. This function computes the
     1370subalgebra $S = \{ f \in R : v_i ( f ) \geq 0,\ i = 1,\ldots,r\}$ for several
     1371such valuations $v_i$, $i=1,\ldots,r$. It needs the matrix $V = (v_i(X_j))$ as
     1372its input.
    12431373@end tex
    12441374@end texinfo
     1375@*        The function returns the input matrix V if one of the options
     1376          @code{supp}, @code{triang}, or @code{hvect} has been activated.
     1377          However, in this case some numerical invariants are computed, and
     1378          some other data may be contained in files that you can read into
     1379          Singular (see @ref{showNuminvs}, @ref{exportNuminvs}).
    12451380NOTE:@texinfo
    12461381@tex
    1247 It is of course possible that $S=K$. At present, Normaliz cannot deal with the zero cone and
    1248 will issue the (wrong) error message that the cone is not pointed. The function also gives an error
    1249 message if the matrix $T$ has the wrong number of columns.
     1382It is of course possible that $S=K$. At present, Normaliz cannot deal with the
     1383zero cone and will issue the (wrong) error message that the cone is not
     1384pointed. The function also gives an error message if the matrix $V$ has the
     1385wrong number of columns.
    12501386@end tex
    12511387@end texinfo
     
    12781414    string dummy=collectNmzOptions();  // only to set GenGen
    12791415
    1280     if(!GenGen) // return nothing
     1416    if(!GenGen) // return V
    12811417    {
    12821418        runNormaliz(V1,ncols(V),4);
    1283         return();
     1419        return(V);
    12841420    }
    12851421
     
    12951431proc valRingIdeal(intmat V)
    12961432"USAGE:   valRingIdeal(intmat V);
    1297 RETURN:   The function returns two ideals, both to be considered as lists of monomials. The first is the
    1298 system of monomial generators of @math{S}, the second the system of generators of @math{M}.
     1433RETURN:   The function returns two ideals, both to be considered as lists of
     1434          monomials which generate an algebra over the coefficient field. The
     1435          first is the system of monomial generators of @math{S}, the second
     1436             the system of generators of @math{M}.
     1437@*        The function returns the input matrix V if one of the options
     1438          @code{supp}, @code{triang}, or @code{hvect} has been activated.
     1439          However, in this case some numerical invariants are computed, and
     1440          some other data may be contained in files that you can read into
     1441          Singular (see @ref{showNuminvs}, @ref{exportNuminvs}).
    12991442BACKGROUND: @texinfo
    13001443@tex
    1301 A discrete monomial valuation $v$ on $R = K[X_1 ,\ldots,X_n]$ is determined by the values $v(X_j)$ of the indeterminates. This function computes the subalgebra $S = \{ f \in R : v_i ( f ) \geq 0,\ i = 1,\ldots,r\}$ for
    1302 several such valuations $v_i$, $i=1,\ldots,r$. It needs the matrix $V = (v_i(X_j))$ as its input.
    1303 
    1304 This function simultaneously determines the $S$-submodule $M = \{ f \in R : v_i(f) \geq w_i ,\ i = 1,\ldots,r\}$ for integers $w_1,\ldots\,w_r$. (If $w_i \geq 0$ for all $i$, $M$ is an ideal of $S$.) The numbers $w_i$ form the $(n+1)$th column of the input matrix.
     1444A discrete monomial valuation $v$ on $R = K[X_1 ,\ldots,X_n]$ is determined by
     1445the values $v(X_j)$ of the indeterminates. This function computes the
     1446subalgebra $S = \{ f \in R : v_i ( f ) \geq 0,\ i = 1,\ldots,r\}$ for several
     1447such valuations $v_i$, $i=1,\ldots,r$. It needs the matrix $V = (v_i(X_j))$ as
     1448its input.
     1449
     1450This function simultaneously determines the $S$-submodule
     1451$M = \{ f \in R : v_i(f) \geq w_i ,\ i = 1,\ldots,r\}$ for integers
     1452$w_1,\ldots\,w_r$. (If $w_i \geq 0$ for all $i$, $M$ is an ideal of $S$.)
     1453The numbers $w_i$ form the $(n+1)$th column of the input matrix.
    13051454@end tex
    13061455@end texinfo
    13071456NOTE:@texinfo
    13081457@tex
    1309 It is of course possible that $S=K$. At present, Normaliz cannot deal with the zero cone and
    1310 will issue the (wrong) error message that the cone is not pointed. The function also gives an error
    1311 message if the matrix $T$ has the wrong number of columns.
     1458It is of course possible that $S=K$. At present, Normaliz cannot deal with the
     1459zero cone and will issue the (wrong) error message that the cone is not
     1460pointed. The function also gives an error message if the matrix $T$ has the
     1461wrong number of columns.
    13121462@end tex
    13131463@end texinfo
     
    13421492    string dummy=collectNmzOptions();  // only to set GenGen
    13431493
    1344     if(!GenGen) // return nothing
     1494    if(!GenGen) // return V
    13451495    {
    13461496        runNormaliz(V1,ncols(V),4);
    1347         return();
     1497        return(V);
    13481498    }
    13491499
     
    13601510 valRingIdeal(V);
    13611511}
    1362 
    1363 
Note: See TracChangeset for help on using the changeset viewer.