Changeset 4a09df4 in git
- Timestamp:
- Feb 10, 2010, 4:45:53 PM (14 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- a1aae2a301ed1473a509df72da49cb3b55f4670a
- Parents:
- de25e52ca6f5189dc77bde21076997619d6dc8ba
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/LIB/normaliz.lib
rde25e5 r4a09df4 4 4 category="Commutative algebra" 5 5 info=" 6 LIBRARY: normaliz.lib Provides an interface for the use of Normaliz 2.2 within SINGULAR. 6 LIBRARY: normaliz.lib Provides an interface for the use of Normaliz 2.2 7 within SINGULAR. 7 8 AUTHORS: Winfried Bruns, Winfried.Bruns@Uni-Osnabrueck.de 8 9 Christof Soeger, Christof.Soeger@Uni-Osnabrueck.de 9 10 10 11 OVERVIEW: 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. 12 The library normaliz.lib provides an interface for the use of Normaliz 2.2 13 within SINGULAR. The exchange of data is via files, the only possibility 14 offered by Normaliz in its present version. In addition to the top level 15 functions that aim at objects of type ideal or ring, several other auxiliary 16 functions allow the user to apply Normaliz to data of type intmat. Therefore 17 SINGULAR 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 20 documentation of Normaliz. 14 21 @* 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 23 created and erased behind the scenes. As long as one wants to use only the 24 ring-theoretic functions there is no need for file management. 19 25 @* 20 26 @*Note that the numerical invariants computed by Normaliz can be … … 27 33 Deletion of the files is left to the user. 28 34 @* 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. 31 36 You 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 38 that the executables are in the search path or use setNmzExecPath 39 (@ref{setNmzExecPath}). 40 41 NOTE: These library functions use @code{sed} to transfer the Normaliz 42 output into a SINGULAR compliant format. 37 43 38 44 … … 40 46 41 47 PROCEDURES: 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 72 95 "; 73 96 … … 148 171 "USAGE: setNmzExecPath(string s); @code{s} path to the Normaliz executable 149 172 CREATE: @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. 173 NOTE: It is not necessary to use this function if the Normaliz executable 174 is in the search path of the system. 151 175 SEE ALSO: setNmzVersion 152 176 EXAMPLE: example setNmzExecPath; shows an example" … … 161 185 162 186 proc setNmzVersion(string nmz_version_name) 163 "USAGE: setNmzVersion(string s); 187 "USAGE: setNmzVersion(string s); @code{s} version of the Normaliz executable 164 188 CREATE: @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: 189 NOTE: The version coincides with the filename of the Normaliz executable. 190 Possible arguments are: 166 191 @* @code{norm32} for 32bit integer precision 167 192 @* @code{norm64} for 64bit integer precision (default) … … 182 207 "USAGE: setNmzFilename(string s); 183 208 CREATE: @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. 209 NOTE: 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. 188 218 SEE ALSO: writeNmzData, readNmzData, setNmzDataPath, rmNmzFiles 189 219 EXAMPLE: example setNmzFilename; shows an example" … … 203 233 setNmzDataPath("examples/"); 204 234 setNmzFilename("example1"); 205 //now the files for the exchange with Normaliz eare examples/example1.SUFFIX235 //now the files for the exchange with Normaliz are examples/example1.SUFFIX 206 236 } 207 237 … … 209 239 "USAGE: setNmzDataPath(string s); 210 240 CREATE: @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. 241 NOTE: 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. 214 248 SEE ALSO: writeNmzData, readNmzData, rmNmzFiles, setNmzFilename 215 249 EXAMPLE: example setNmzDataPath; shows an example" … … 226 260 proc writeNmzPaths(); 227 261 "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. 262 CREATE: 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 266 NOTE: 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. 231 269 SEE ALSO: setNmzDataPath, setNmzExecPath, startNmz 232 270 EXAMPLE: example writeNmzPaths; shows an example … … 250 288 proc startNmz() 251 289 "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. 290 PURPOSE: 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. 255 294 SEE ALSO: setNmzDataPath, setNmzExecPath, writeNmzPaths 256 295 EXAMPLE: example startNmz; shows an example … … 330 369 } 331 370 dummy=system("sh","mkdir "+ testdir); 332 desString("nmz_filename",testdir+"/nmz"); // 371 desString("nmz_filename",testdir+"/nmz"); //files are nmz+suffix in testdir 333 372 } 334 373 … … 353 392 354 393 proc 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(); 395 PURPOSE: 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}). 358 398 SEE ALSO: writeNmzData, readNmzData, setNmzFilename, setNmzDataPath 359 399 EXAMPLE: example rmNmzFiles; shows an example … … 365 405 } 366 406 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"; 368 409 int i,dummy; 369 410 string f; … … 567 608 proc writeNmzData(intmat sgr, int n_mode) 568 609 "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. 610 CREATE: 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. 613 NOTE: 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. 572 618 SEE ALSO: readNmzData, rmNmzFiles, setNmzFilename, setNmzDataPath 573 619 EXAMPLE: example writeNmzData; shows an example" … … 589 635 590 636 proc 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); 638 RETURN: 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. 642 NOTE: 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. 596 647 SEE ALSO: writeNmzData, rmNmzFiles, setNmzFilename, setNmzDataPath 597 648 EXAMPLE: example readNmzData; shows an example" … … 627 678 } 628 679 //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] + ";"; 630 682 //"// ** readNmzData: string gebastelt"; 631 683 execute(c); … … 672 724 proc setNmzOption(string s, int onoff) 673 725 "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. 726 PURPOSE: If @code{onoff=1} the option @code{s} is activated, and 727 if @code{onoff=0} it is deactivated. 675 728 The Normaliz options are accessible via the following names: 676 729 @* @code{-s: supp} … … 753 806 if(queryInt("nmz_files_keep_switch")) 754 807 { 755 808 int dummy=system("sh",setNmzExec()+ collectNmzOptions() + getNmzFile()); 756 809 } 757 810 else … … 790 843 proc normaliz(intmat sgr,int nmz_mode) 791 844 "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 845 RETURN: 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. 848 NOTE: You will find procedures for many applications of Normaliz in this 849 library, so the explicit call of this procedure may not be necessary. 850 SEE ALSO: intclToricRing, normalToricRing, ehrhartRing, intclMonIdeal, 851 torusInvariants, valRing, valRingIdeal 796 852 EXAMPLE: example normaliz; shows an example 797 853 " … … 913 969 proc exportNuminvs() 914 970 "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. 971 CREATE: 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. 916 975 SEE ALSO: showNuminvs 917 976 EXAMPLE: example exportNuminvs; shows an example … … 950 1009 proc mons2intmat(ideal I) 951 1010 "USAGE: mons2intmat(ideal I); 952 RETURN: Returns the intmat whose rows represent the leading exponents of the (non-zero) elements of I. The953 length of each row is nvars(basering).1011 RETURN: 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). 954 1013 SEE ALSO: intmat2mons 955 1014 EXAMPLE: example mons2intmat; shows an example" … … 984 1043 proc intmat2mons(intmat expo_vecs) 985 1044 "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}). 1045 RETURN: an ideal generated by the monomials which correspond to the exponent 1046 vectors given by the rows of @code{M} 1047 NOTE: 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}). 988 1051 SEE ALSO: mons2intmat 989 1052 EXAMPLE: example intmat2mons; shows an example … … 1008 1071 mons=mons,m; 1009 1072 } 1010 return(mons[2..ncols(mons)]); 1073 mons=simplify(mons,2); // get rid of starting 0 1074 return(mons); 1011 1075 } 1012 1076 example … … 1044 1108 } 1045 1109 } 1046 return(mons[2..ncols(mons)]); // get rid of starting 0 1110 mons=simplify(mons,2); // get rid of starting 0 1111 return(mons); 1047 1112 } 1048 1113 … … 1057 1122 string dummy=collectNmzOptions(); // only to set GenGen 1058 1123 1059 if(!GenGen) // return nothing1124 if(!GenGen) // return I 1060 1125 { 1061 1126 runNormaliz(expo_vecs,ncols(expo_vecs),nmz_mode); 1062 return( );1127 return(I); 1063 1128 } 1064 1129 return( intmat2mons( runNormaliz(expo_vecs,ncols(expo_vecs),nmz_mode) ) ); … … 1066 1131 1067 1132 proc 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); 1134 RETURN: 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}). 1143 NOTE: A mathematical remark: the toric ring depends on the list of 1144 monomials given, and not only on the ideal they generate! 1072 1145 SEE ALSO: normalToricRing, ehrhartRing, intclMonIdeal 1073 1146 EXAMPLE: example intclToricRing; shows an example … … 1084 1157 1085 1158 proc 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); 1160 RETURN: 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}). 1169 NOTE: A mathematical remark: the toric ring depends on the list of 1170 monomials given, and not only on the ideal they generate! 1090 1171 SEE ALSO: intclToricRing, ehrhartRing, intclMonIdeal 1091 1172 EXAMPLE: example normalToricRing; shows an example … … 1118 1199 string dummy=collectNmzOptions(); // only to set GenGen 1119 1200 1120 if(!GenGen) // return nothing1201 if(!GenGen) // return I 1121 1202 { 1122 1203 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); 1127 1209 1128 1210 if(last_comp) … … 1141 1223 proc ehrhartRing(ideal I) 1142 1224 "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. 1225 RETURN: 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. 1148 1241 @* 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}). 1247 NOTE: A mathematical remark: the Ehrhart ring depends on the list of 1248 monomials given, and not only on the ideal they generate! 1151 1249 SEE ALSO: intclToricRing, normalToricRing, intclMonIdeal 1152 1250 EXAMPLE: example ehrhartRing; shows an example … … 1164 1262 proc intclMonIdeal(ideal I) 1165 1263 "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! 1264 RETURN: 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}). 1283 NOTE: A mathematical remark: the Rees algebra depends on the list of 1284 monomials given, and not only on the ideal they generate! 1172 1285 SEE ALSO: intclToricRing, normalToricRing, ehrhartRing 1173 1286 EXAMPLE: example intclMonIdeal; shows an example … … 1190 1303 "USAGE: torusInvariants(intmat A); 1191 1304 RETURN: @texinfo 1192 Returns an ideal representing the list of monomials generating the ring of invariants 1305 Returns an ideal representing the list of monomials generating the ring of 1306 invariants as an algebra over the coefficient field. 1193 1307 @tex 1194 1308 $R^T$. 1195 1309 @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}). 1196 1315 @end texinfo 1197 1316 BACKGROUND: @texinfo 1198 1317 @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.$$ 1324 In order to compute the ring of invariants $R^T$ one must specify the matrix 1325 $A=(a_{i,j})$. 1202 1326 @end tex 1203 1327 @end texinfo 1204 1328 NOTE:@texinfo 1205 1329 @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. 1330 It is of course possible that $R^T=K$. At present, Normaliz cannot deal with 1331 the zero cone and will issue the (wrong) error message that the cone is not 1332 pointed. The function also gives an error message if the matrix $T$ has the 1333 wrong number of columns. 1209 1334 @end tex 1210 1335 @end texinfo … … 1220 1345 string dummy=collectNmzOptions(); // only to set GenGen 1221 1346 1222 if(!GenGen) // return nothing1347 if(!GenGen) // return T 1223 1348 { 1224 1349 runNormaliz(T,ncols(T),5); 1225 return( );1350 return(Z); 1226 1351 } 1227 1352 return( intmat2mons( runNormaliz(T,ncols(T),5) ) ); … … 1236 1361 proc valRing(intmat V) 1237 1362 "USAGE: valRing(intmat V); 1238 RETURN: The function returns a monomial ideal, to be considered as the list of monomials generating @math{S}. 1363 RETURN: 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. 1239 1366 BACKGROUND: @texinfo 1240 1367 @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. 1368 A discrete monomial valuation $v$ on $R = K[X_1 ,\ldots,X_n]$ is determined by 1369 the values $v(X_j)$ of the indeterminates. This function computes the 1370 subalgebra $S = \{ f \in R : v_i ( f ) \geq 0,\ i = 1,\ldots,r\}$ for several 1371 such valuations $v_i$, $i=1,\ldots,r$. It needs the matrix $V = (v_i(X_j))$ as 1372 its input. 1243 1373 @end tex 1244 1374 @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}). 1245 1380 NOTE:@texinfo 1246 1381 @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. 1382 It is of course possible that $S=K$. At present, Normaliz cannot deal with the 1383 zero cone and will issue the (wrong) error message that the cone is not 1384 pointed. The function also gives an error message if the matrix $V$ has the 1385 wrong number of columns. 1250 1386 @end tex 1251 1387 @end texinfo … … 1278 1414 string dummy=collectNmzOptions(); // only to set GenGen 1279 1415 1280 if(!GenGen) // return nothing1416 if(!GenGen) // return V 1281 1417 { 1282 1418 runNormaliz(V1,ncols(V),4); 1283 return( );1419 return(V); 1284 1420 } 1285 1421 … … 1295 1431 proc valRingIdeal(intmat V) 1296 1432 "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}. 1433 RETURN: 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}). 1299 1442 BACKGROUND: @texinfo 1300 1443 @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. 1444 A discrete monomial valuation $v$ on $R = K[X_1 ,\ldots,X_n]$ is determined by 1445 the values $v(X_j)$ of the indeterminates. This function computes the 1446 subalgebra $S = \{ f \in R : v_i ( f ) \geq 0,\ i = 1,\ldots,r\}$ for several 1447 such valuations $v_i$, $i=1,\ldots,r$. It needs the matrix $V = (v_i(X_j))$ as 1448 its input. 1449 1450 This 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$.) 1453 The numbers $w_i$ form the $(n+1)$th column of the input matrix. 1305 1454 @end tex 1306 1455 @end texinfo 1307 1456 NOTE:@texinfo 1308 1457 @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. 1458 It is of course possible that $S=K$. At present, Normaliz cannot deal with the 1459 zero cone and will issue the (wrong) error message that the cone is not 1460 pointed. The function also gives an error message if the matrix $T$ has the 1461 wrong number of columns. 1312 1462 @end tex 1313 1463 @end texinfo … … 1342 1492 string dummy=collectNmzOptions(); // only to set GenGen 1343 1493 1344 if(!GenGen) // return nothing1494 if(!GenGen) // return V 1345 1495 { 1346 1496 runNormaliz(V1,ncols(V),4); 1347 return( );1497 return(V); 1348 1498 } 1349 1499 … … 1360 1510 valRingIdeal(V); 1361 1511 } 1362 1363
Note: See TracChangeset
for help on using the changeset viewer.