Changeset f75297 in git for Singular/LIB/fpadim.lib
- Timestamp:
- Mar 4, 2011, 1:01:27 AM (13 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- 8eea069dd83d32f7e8b90cd5e5ec75124c7d7903
- Parents:
- a8f29f505ce6c0d6ff17e0e4d9637d320299deee
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/LIB/fpadim.lib
ra8f29f rf75297 38 38 @* on. The monomial x_1*x_3*x_2 for example will be stored as (1,3,2). 39 39 @* Multiplication is concatenation. Note that there is no algorithm for 40 @* computing the normal form yet, but for our case it is not needed.40 @* computing the normal form needed for our case. 41 41 @* 42 42 … … 64 64 ivHilbert(L,n[,d]); computes the Hilbert series of A/<L> in intvec format 65 65 ivKDim(L,n[,d]); computes the K-dimension of A/<L> in intvec format 66 ivMis2Base(M); computes a K-basis of the factor algebra 66 67 ivMis2Dim(M); computes the K-dimension of the factor algebra 67 68 ivOrdMisLex(M); orders a list of intvecs lexicographically … … 74 75 lpDimCheck(G); checks if the K-dimension of A/<G> is infinite 75 76 lpKDim(G[,d,n]); computes the K-dimension of A/<G> in lp format 77 lpMis2Base(M); computes a K-basis of the factor algebra 76 78 lpMis2Dim(M); computes the K-dimension of the factor algebra 77 79 lpOrdMisLex(M); orders an ideal of lp-monomials lexicographically … … 164 166 "PURPOSE:checks, if all entries in M are variable-related 165 167 " 166 {int i,j; 168 {if ((nrows(M) == 1) && (ncols(M) == 1)) {if (M[1,1] == 0){return(0);}} 169 int i,j; 167 170 for (i = 1; i <= nrows(M); i++) 168 171 {for (j = 1; j <= ncols(M); j++) … … 1229 1232 } 1230 1233 1234 proc ivMis2Base(list M) 1235 "USAGE: ivMis2Base(M); M a list of intvecs 1236 RETURN: ideal, a K-base of the given algebra 1237 PURPOSE:Computing the K-base out of given mistletoes 1238 ASSUME: - The mistletoes have to be ordered lexicographically -> OrdMisLex. 1239 @* Otherwise there might some elements missing. 1240 @* - basering is a Letterplace ring. 1241 EXAMPLE: example ivMis2Base; shows examples 1242 " 1243 { 1244 //checkAssumptions(0,M); 1245 intvec L,A; 1246 if (size(M) == 0){ERROR("There are no mistletoes, so it appears your dimension is infinite!");} 1247 if (isInList(L,M) > 0) {print("1 is a mistletoe, therefore 1 is the only basis element"); return(list(intvec(0)));} 1248 int i,j,d,s; 1249 list Rt; 1250 Rt[1] = intvec(0); 1251 L = M[1]; 1252 for (i = size(L); 1 <= i; i--) {Rt = insert(Rt,intvec(L[1..i]));} 1253 for (i = 2; i <= size(M); i++) 1254 {A = M[i]; L = M[i-1]; 1255 s = size(A); 1256 if (s > size(L)) 1257 {d = size(L); 1258 for (j = s; j > d; j--) {Rt = insert(Rt,intvec(A[1..j]));} 1259 A = A[1..d]; 1260 } 1261 if (size(L) > s){L = L[1..s];} 1262 while (A <> L) 1263 {Rt = insert(Rt, intvec(A)); 1264 if (size(A) > 1) 1265 {A = A[1..(size(A)-1)]; 1266 L = L[1..(size(L)-1)]; 1267 } 1268 else {break;} 1269 } 1270 } 1271 return(Rt); 1272 } 1273 example 1274 { 1275 "EXAMPLE:"; echo = 2; 1276 ring r = 0,(x,y),dp; 1277 def R = makeLetterplaceRing(5); // constructs a Letterplace ring 1278 R; 1279 setring R; // sets basering to Letterplace ring 1280 intvec i1 = 1,2; intvec i2 = 2,1,2; 1281 // the mistletoes are xy and yxy, which are already ordered lexicographically 1282 list L = i1,i2; 1283 ivMis2Base(L); // returns the basis of the factor algebra 1284 } 1285 1286 1231 1287 proc ivMis2Dim(list M) 1232 1288 "USAGE: ivMis2Dim(M); M a list of intvecs … … 1595 1651 @* degbound <= attrib(basering,uptodeg) holds. 1596 1652 NOTE: - If L is the list returned, then L[1] is an integer, the K-dimension, 1597 @* L[2] is an intvec, the Hilbert series and L[3] is an ideal, 1653 @* L[2] is an intvec, the Hilbert series and L[3] is an ideal, 1598 1654 @* the mistletoes 1599 1655 @* - If degbound is set, there will be a degree bound added. 0 means no … … 1729 1785 // ring is not necessary 1730 1786 lpKDim(G,0); // procedure without any degree bound 1787 } 1788 1789 proc lpMis2Base(ideal M) 1790 "USAGE: lpMis2Base(M); M an ideal 1791 RETURN: ideal, a K-basis of the factor algebra 1792 PURPOSE:Computing a K-basis out of given mistletoes 1793 ASSUME: - basering is a Letterplace ring. 1794 @* - M contains only monomials 1795 NOTE: - The mistletoes have to be ordered lexicographically -> OrdMisLex. 1796 EXAMPLE: example lpMis2Base; shows examples 1797 " 1798 {list L; 1799 L = lpId2ivLi(M); 1800 return(ivL2lpI(ivMis2Base(L))); 1801 } 1802 example 1803 { 1804 "EXAMPLE:"; echo = 2; 1805 ring r = 0,(x,y),dp; 1806 def R = makeLetterplaceRing(5); // constructs a Letterplace ring 1807 setring R; // sets basering to Letterplace ring 1808 ideal L = x(1)*y(2),y(1)*x(2)*y(3); 1809 // ideal containing the mistletoes 1810 lpMis2Base(L); // returns the K-basis of the factor algebra 1731 1811 } 1732 1812 … … 1968 2048 example ivHilbert; 1969 2049 example ivKDim; 2050 example ivMis2Base; 1970 2051 example ivMis2Dim; 1971 2052 example ivOrdMisLex; … … 1978 2059 example lpDimCheck; 1979 2060 example lpKDim; 2061 example lpMis2Base; 1980 2062 example lpMis2Dim; 1981 2063 example lpOrdMisLex;
Note: See TracChangeset
for help on using the changeset viewer.