Changeset 59e9c8 in git
- Timestamp:
- Oct 31, 2018, 5:49:42 PM (5 years ago)
- Branches:
- (u'spielwiese', '17f1d200f27c5bd38f5dfc6e8a0879242279d1d8')
- Children:
- 76491be567cebb99af1378835107ecaa47a8d2c8
- Parents:
- 95dbdf7e046656f2ff7cfa85037f2c7dc486743d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/LIB/ncHilb.lib
r95dbdf r59e9c8 1 1 ////////////////////////////////////////////////////////////////////////////// 2 2 version="version nc_hilb.lib 4.1.1.0 Dec_2017 "; // $Id$ 3 category="Noncommutative ";3 category="Noncommutative algebra"; 4 4 info=" 5 LIBRARY: fpahilb.lib: Computation of graded and multi-graded Hilbert series of non-commutative algebras (Letterplace). 5 LIBRARY: ncHilb.lib: A library for computing graded and multi-graded Hilbert 6 series of non-commutative algebras. It also computes 7 the truncated Hilbert series of the algebras whose Hilbert 8 series are possibly not rational or unknown. 6 9 7 10 AUTHOR: Sharwan K. Tiwari shrawant@gmail.com 8 11 Roberto La Scala 9 Viktor Levandovskyy (adaptation to the new Letterplace release) 10 12 11 13 REFERENCES: 12 La Scala R.: Monomial right ideals and the Hilbert series of non-commutative modules, 13 Journal of Symbolic Computation (2016). 14 15 La Scala R., Tiwari Sharwan K.: Multigraded Hilbert Series of noncommutative modules, https://arxiv.org/abs/1705.01083. 16 17 KEYWORDS: finitely presented algebra; infinitely presented algebra; graded Hilbert series; multi-graded Hilbert series 18 14 La Scala R.: Monomial right ideals and the Hilbert series of 15 non-commutative modules, J. of Symb. Comp. (2016). 16 17 La Scala R., Tiwari Sharwan K.: Multigraded Hilbert Series of 18 noncommutative modules, https://arxiv.org/abs/1705.01083. 19 19 20 PROCEDURES: 20 fpahilb(L,d,#); Hilbert series of a non-commutative algebra 21 rcolon(I, w, d); Right colon ideal of a two-sided monomial ideal with respect to a monomial w 21 nchilb(L,d,#); Hilbert series of a non-commutative algebra 22 rcolon(L, w, d); Right colon ideal of a two-sided monomial ideal 23 with respect to a monomial w 24 22 25 "; 23 26 24 27 LIB "freegb.lib"; 25 28 26 // under construction by VL; need kernel adjustments by Tiwari27 28 proc fpahilb(ideal I, list #)29 "USAGE: fpahilb(I[, L]), ideal I, optional list L30 PURPOSE: compute Hilbert series of a non-commutative algebra, presented by I31 RETURN: nothing (prints data out)32 ASSUME: basering is a Letterplace ring, I is given via its Groebner basis33 NOTE: the appearance of following values among the optional arguments triggers the following:34 @* 1: computation for non-finitely generated regular ideals,35 @* 2: computation of multi-graded Hilbert series,36 @* N>2: computation of truncated Hilbert series up to degree N-1, and37 @* nonempty string: the details about the orbit and system of equations will be printed.38 Let the orbit be @code{O_I = {T_{w_1}(I),...,T_{w_r}(I)} ($w_i\in W$)}, where we assume that if @code{T_{w_i}(I)=T_{w_i'}(I)}39 for some @code{w'_i\in W}, then @code{deg(w_i)\leq deg(w'_i)} follows.40 Then the description of orbit in the form @code{w_1,...,w_r} will be printed.41 It also prints the maximal degree and the cardinality of @code{\sum_j R(w_i, b_j)} corresponding to each @code{w_i},42 where @code{{b_j}} is a basis of I.43 Moreover, it also prints the linear system (for the information about adjacency matrix).44 EXAMPLE: example fpahilb; shows an example "45 {46 if (attrib(basering, "isLetterplaceRing")==0)47 {48 ERROR("Basering should be Letterplace ring");49 }50 def save = basering;51 int sz=size(#);52 int lV=attrib(save,"uptodeg");53 int ig=0;54 int mgrad=0;55 int tdeg=0;56 string odp="";57 int i;58 for(i=sz; i >= 1; i--)59 {60 if(typeof(#[i])=="string")61 {62 if(#[i]!="")63 {64 odp = "p";65 }66 # = delete(#,i);67 sz = sz-1;68 break;69 }70 }71 i=1;72 // VL: changing the old "only one optional parameter (for printing the details) is allowed as a string."73 while( (typeof(#[i])=="int") && (i<=sz) )74 {75 if( (#[i] == 1) && (ig==0) )76 {77 ig = 1;78 }79 else80 {81 if ( (#[i] == 2) && (mgrad==0) )82 {83 mgrad = 2;84 }85 else86 {87 if ( (#[i] > 2) && (tdeg==0) )88 {89 tdeg = #[i];90 }91 else92 {93 ERROR("error: only int 1,2 and >2 are allowed as optional parameters");94 }95 }96 }97 i = i + 1;98 }99 if( i <= sz)100 {101 ERROR("error:only int 1,2, >2, and a string are allowed as optional parameters");102 }103 // new: truncation should be < than degbound/2104 if (tdeg > (lV-1) div 2)105 {106 ERROR("Degree bound on the basering Should be at least 2*N+1");107 }108 def save2 = basering;109 setring save2;110 ideal J_lm = imap(save,I);111 for(i=1;i<=size(J_lm);i++)112 {113 J_lm[i]=leadmonom(J_lm[i]);114 }115 //compute the Hilbert series116 // system call : HilbertSeries_OrbitData: sharwan need to change it as well...117 //(ideal S, int lV, bool IG_CASE, bool mgrad, bool odp, int trunDegHs)118 119 if(odp == "")120 {121 system("nc_hilb", J_lm, lV, ig, mgrad,tdeg);122 }123 else124 {125 system("nc_hilb", J_lm, lV, ig, mgrad,tdeg, odp);126 }127 setring save;128 kill save2;129 }130 131 example132 {133 "EXAMPLE:"; echo = 2;134 ring r=0,(X,Y,Z),dp;135 def R = makeLetterplaceRing(12); setring R;136 ideal I = Y*Z, Y*Z*X, Y*Z*Z*X, Y*Z*Z*Z*X;137 fpahilb(I,3,"p");138 }139 140 static proc conversion_problems()141 {142 // problems:143 // a) words description of the Orbit:144 //1 x z // ** invalid letterplace monomial: --> Karim?145 // caused by pWrite0 --> writemon146 // b) HilbertSeries_OrbitData changes currRing [doesn't help while doing copies]147 // second call of same procedure changes the input148 149 // (10,3) ok; (10,4) segfault150 // (12,3) (12,4) (12,5) ok (12,6) bound violated151 LIB "./ncHilb.lib";152 ring r2=0,(x,y,z),dp;153 def R2 = makeLetterplaceRing(12); setring R2;154 ideal I = y*z-z*y, x*z*x-z*x*z, x*z^2*x*z-z*x*z^2*x, x*z^3*x*z-z*x*z^2*x^2;155 ideal J = std(I); // compute a Groebner basis up to degree bound, which is 12156 fpahilb(J,6,1,"p");157 // inspecting J we see that this is a homogeneous Groebner basis158 // which is potentially infinite, i.e. J is not finitely generated159 fpahilb(J,5,1,2,"p"); // '1' i for non-finitely generated case, string to print details160 //'5' here is to compute the truncated HS up to degree 5.161 //'2' is to compute multi-graded Hilbert series162 fpahilb(J,7,1,"p");163 }164 165 166 // overhauled by VL167 proc rcolon(ideal I, poly W)168 "USAGE: rcolon(I,w); ideal I, poly w169 RETURNS: ideal170 ASSUME: - basering is a Letterplace ring171 - W is a monomial172 - I is a monomial ideal173 PURPOSE: compute a right colon ideal of I by a monomial w174 NOTE: Output is the set of generators, which should be added to I175 EXAMPLE: example rcolon; shows an example"176 {177 int lV = attrib(R,"isLetterplaceRing"); //nvars(save);178 if (lV == 0)179 {180 ERROR("Basering must be a Letterplace ring");181 }182 poly wc = leadmonom(W);183 ideal II = lead(I);184 ideal J = system("rcolon", II, wc, lV);185 // VL: printlevel here? before only printing was there, no output186 return(J);187 }188 example189 {190 "EXAMPLE:"; echo = 2;191 ring r=0,(X,Y,Z),dp;192 def R = makeLetterplaceRing(10); setring R;193 ideal I = Y*Z, Y*Z*X, Y*Z*Z*X, Y*Z*Z*Z*X, Y*Z*Z*Z*Z*X, Y*Z*Z*Z*Z*Z*X, Y*Z*Z*Z*Z*Z*Z*X, Y*Z*Z*Z*Z*Z*Z*Z*X;194 poly w = Y;195 ideal J = rcolon(I,w);196 J; // new generators, which need to be added to I197 }198 199 /*200 29 proc nchilb(list L_wp, int d, list #) 201 "USAGE: fpahilb(I, d[, L]), ideal I, int d, optional list L 202 PURPOSE: compute Hilbert series of a non-commutative algebra 203 ASSUME: 204 NOTE: d is an integer for the degree bound (maximal total degree of 30 "USAGE: nchilb(list of relations, an integer, optional); 31 L is a list of modules (each module represents a free-polynomial), 32 d is an integer for the degree bound (maximal total degree of 205 33 polynomials of the generating set of the input ideal), 206 #[]=1, computation for non-finitely generated regular ideals, 207 #[]=2, computation of multi-graded Hilbert series, 208 #[]=tdeg, for obtaining the truncated Hilbert series up to the total degree tdeg-1 (tdeg should be > 2), and 209 #[]=string(p), to print the details about the orbit and system of equations. 210 Let the orbit is O_I = {T_{w_1}(I),...,T_{w_r}(I)} ($w_i\in W$), where we assume that if T_{w_i}(I)=T_{w_i'}(I)$ 211 for some $w'_i\in W$, then $deg(w_i)\leq deg(w'_i)$. 212 Then, it prints words description of orbit: w_1,...,w_r. 213 It also prints the maximal degree and the cardinality of \sum_j R(w_i, b_j) corresponding to each w_i, 214 where {b_j} is a basis of I. 215 Moreover, it also prints the linear system (for the information about adjacency matrix) and its solving time. 34 #[]=1, computation for non-finitely generated regular ideals, 35 #[]=2, computation of multi-graded Hilbert series, 36 #[]=tdeg, for obtaining the truncated Hilbert series up to the 37 total degree tdeg-1 (tdeg should be > 2), and 38 39 #[]=string(p), to print the details about the orbit and system of 40 equations. Let the orbit is O_I = {T_{w_1}(I),...,T_{w_r}(I)} 41 ($w_i\in W$), where we assume that if T_{w_i}(I)=T_{w_i'}(I)$ 42 for some $w'_i\in W$, then $deg(w_i)\leq deg(w'_i)$. 43 Then, it prints words description of orbit: w_1,...,w_r. 44 It also prints the maximal degree and the cardinality of 45 \sum_j R(w_i, b_j) corresponding to each w_i, where {b_j} is a 46 basis of I. Moreover, it also prints the linear system (for the 47 information about adjacency matrix) and its solving time. 216 48 217 49 NOTE : A Groebner basis of two-sided ideal of the input should be given in a … … 419 251 //'11' is to compute the truncated HS up to degree 10. 420 252 } 421 */ 422 423 /* 424 // orig version of the procedure 253 425 254 proc rcolon(list L_wp, module W, int d) 426 255 "USAGE: rcolon(list of relations, a monomial, an integer); … … 522 351 rcolon(l1,w,10); 523 352 } 524 */ 353
Note: See TracChangeset
for help on using the changeset viewer.