Changeset 47cb36e in git
- Timestamp:
- Sep 30, 2010, 10:29:40 AM (13 years ago)
- Branches:
- (u'spielwiese', '0d6b7fcd9813a1ca1ed4220cfa2b104b97a0a003')
- Children:
- 57c64fff6c32591cb762f2f499785bea07c93048
- Parents:
- 4708af17f762c99d15cb939acfd22139c9de5550
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/LIB/monomialideal.lib
r4708af r47cb36e 3 3 category = "Commutative algebra"; 4 4 info = " 5 LIBRARY: monomialideal.lib Primary and irreducible decompositions of monomial6 ideals7 AUTHORS: I.Bermejo, 8 @* E.Garcia-Llorente, 9 @* Ph.Gimenez, 5 LIBRARY: monomialideal.lib Primary and irreducible decompositions of 6 monomial ideals 7 AUTHORS: I.Bermejo, ibermejo@ull.es 8 @* E.Garcia-Llorente, evgarcia@ull.es 9 @* Ph.Gimenez, pgimenez@agt.uva.es 10 10 11 11 OVERVIEW: 12 12 A library for computing a primary and the irreducible decompositions of a 13 13 monomial ideal using several methods. 14 In this library we also take advantage of the fact that the ideal is15 monomial to make some computations that are Grobner free in this case14 In this library we specifically take advantage of the fact that the ideal 15 is monomial to make some computations that are Grobner free in this case 16 16 (radical, intersection, quotient...). 17 17 18 LITERATURE: Miller, Ezra and Sturmfels, Bernd: Combinatorial Commutative Algebra,19 Springer 200418 LITERATURE: Miller, Ezra and Sturmfels, Bernd: Combinatorial Commutative 19 Algebra, Springer 2004 20 20 21 21 PROCEDURES: 22 isMonomial(id); checks whether an ideal id is monomial23 minbaseMon(id); computes the minimal monomial generating set of a24 monomial ideal id25 gcdMon(f,g); computes the gcd of two monomials f, g26 lcmMon(f,g); computes the lcm of two monomials f, g27 membershipMon(f,id); checks whether a polynomial f belongs to a monomial28 ideal id29 intersectMon(id1,id2); intersection of monomial ideals id1 and id230 quotientMon(id1,id2); quotient ideal id1:id231 radicalMon(id); computes the radical of a monomial ideal id32 isprimeMon(id); checks whether a monomial ideal id is prime33 isprimaryMon(id); checks whether a monomial ideal id is primary34 isirreducibleMon(id); checks whether a monomial ideal id is irreducible35 isartinianMon(id); checks whether a monomial ideal id is artininan36 isgenericMon(id); checks whether a monomial ideal id is generic, i.e.,37 no twominimal generators of it agree in the exponent38 of any variable that actually appears in both of them.39 dimMon(id); dimension of a monomial ideal id40 irreddecMon(id,..); computes the irreducible decomposition of a monomial41 ideal id42 primdecMon(id,..); computes a minimal primary decomposition of a monomial43 ideal id22 isMonomial(id); checks whether an ideal id is monomial 23 minbaseMon(id); computes the minimal monomial generating set of a 24 monomial ideal id 25 gcdMon(f,g); computes the gcd of two monomials f, g 26 lcmMon(f,g); computes the lcm of two monomials f, g 27 membershipMon(f,id); checks whether a polynomial f belongs to a monomial 28 ideal id 29 intersectMon(id1,id2); intersection of monomial ideals id1 and id2 30 quotientMon(id1,id2); quotient ideal id1:id2 31 radicalMon(id); computes the radical of a monomial ideal id 32 isprimeMon(id); checks whether a monomial ideal id is prime 33 isprimaryMon(id); checks whether a monomial ideal id is primary 34 isirreducibleMon(id); checks whether a monomial ideal id is irreducible 35 isartinianMon(id); checks whether a monomial ideal id is artininan 36 isgenericMon(id); checks whether a monomial ideal id is generic, i.e., 37 no two minimal generators of it agree in the exponent 38 of any variable that actually appears in both of them 39 dimMon(id); dimension of a monomial ideal id 40 irreddecMon(id,..); computes the irreducible decomposition of a monomial 41 ideal id 42 primdecMon(id,..); computes a minimal primary decomposition of a monomial 43 ideal id 44 44 "; 45 45 46 LIB "poly.lib"; // Para "maxdeg1" en "isprimeMon" 47 46 48 //--------------------------------------------------------------------------- 47 49 //----------------------- INTERNOS ------------------------------------- 48 50 //--------------------------------------------------------------------------- 49 ///////////////////////////////////////////////////////////////////////////// 50 // 51 52 ///////////////////////////////////////////////////////////////////////////// 51 53 static proc checkIdeal (ideal I) 52 54 " … … 67 69 return (1); 68 70 } 69 ///////////////////////////////////////////////////////////////////////////// 70 // 71 static proc quotientIdealMon (ideal I, poly f)71 72 ///////////////////////////////////////////////////////////////////////////// 73 static proc quotientIdealMon (ideal I, poly f) 72 74 " 73 75 USAGE: quotientIdealMon(I,f); I ideal, f polynomial. … … 100 102 return ( minbase(J) ); 101 103 } 102 ///////////////////////////////////////////////////////////////////////////// 103 // 104 105 ///////////////////////////////////////////////////////////////////////////// 104 106 static proc soporte (poly f) 105 107 " … … 134 136 return(sop); 135 137 } 136 ///////////////////////////////////////////////////////////////////////////// 137 // 138 139 ///////////////////////////////////////////////////////////////////////////// 138 140 static proc irredAux (ideal I) 139 141 " 140 142 USAGE: irredAux (I); I ideal. 141 RETURN: 1, if I is irreducible; otherwise, an intvec whose fi st entry is143 RETURN: 1, if I is irreducible; otherwise, an intvec whose first entry is 142 144 the position of a generator which is the product of more than one 143 variable, the next entries are the ind exes of those variables.145 variable, the next entries are the indices of those variables. 144 146 ASSUME: I is a monomial ideal of the basering K[x(1)..x(n)] and it is 145 147 generated by its minimal monomial generators. 146 148 NOTE: This procedure is a modification of isirreducibleMon to give 147 more information when ideal is not irreducible.149 more information when the ideal is not irreducible. 148 150 " 149 151 { … … 176 178 return(1); 177 179 } 178 ////////////////////////////////////////////////////////////////////// 179 // 180 static proc contents (ideal I, ideal J)180 181 ///////////////////////////////////////////////////////////////////////////// 182 static proc contents (ideal I, ideal J) 181 183 " 182 184 USAGE: contents (I,J); I,J ideals. 183 185 RETURN: 1, if I is contained in J; 0, otherwise. 184 ASSUME: I, J are monomial ideals of the basering.186 ASSUME: I, J are monomial ideals of the basering. 185 187 " 186 188 { … … 201 203 return(1); 202 204 } 203 ///////////////////////////////////////////////////////////////////////////// 204 // 205 static proc equal (ideal I, ideal J)205 206 ///////////////////////////////////////////////////////////////////////////// 207 static proc equal (ideal I, ideal J) 206 208 " 207 209 USAGE: equal (I,J); I,J ideals. 208 210 RETURN: 1, if I and J are the same ideal; 0, otherwise. 209 ASSUME: I, J are monomial ideals of the basering and are defined by their211 ASSUME: I, J are monomial ideals of the basering and are defined by their 210 212 minimal monomial generators. 211 213 " … … 237 239 //return(1); 238 240 } 239 ///////////////////////////////////////////////////////////////////////////// 240 // 241 242 ///////////////////////////////////////////////////////////////////////////// 241 243 static proc radicalAux (ideal I) 242 244 " … … 273 275 return (rad); 274 276 } 275 ///////////////////////////////////////////////////////////////////////////// 276 // 277 278 ///////////////////////////////////////////////////////////////////////////// 277 279 static proc primAux (ideal I) 278 280 " … … 281 283 0, the second is the index of one variable such that a power of it 282 284 does not appear as a generator of I, the rest of the elements are 283 the situation in the ideal of that elements of I which284 are productof more than one variable.285 the position in the ideal of those elements of I which are product 286 of more than one variable. 285 287 ASSUME: I is a monomial ideal of the basering K[x(1)..x(n)]. 286 NOTE: This procedure detects if the ideal is primary , when the288 NOTE: This procedure detects if the ideal is primary. When the 287 289 ideal is not primary, it gives some additional information. 288 290 " … … 340 342 return (1); 341 343 } 342 ///////////////////////////////////////////////////////////////////////////// 343 // 344 static proc maxExp (ideal I, intvec v)344 345 ///////////////////////////////////////////////////////////////////////////// 346 static proc maxExp (ideal I, intvec v) 345 347 " 346 348 USAGE: maxExp (I,v); I ideal, v integer vector. … … 350 352 variable considered is v[2]. 351 353 If the ideal I is primary, it returns 0. 352 NOTE: The elements of the vector s hows what variable and what354 NOTE: The elements of the vector suggest what variable and which 353 355 generators we must consider to look for the greatest power 354 356 of this variable. … … 375 377 return (max); 376 378 } 377 ///////////////////////////////////////////////////////////////////////////// 378 // 379 380 ///////////////////////////////////////////////////////////////////////////// 379 381 static proc irredundant (list l) 380 382 " … … 382 384 RETURN: a list such that the intersection of the elements in that list has 383 385 no redundant component. 384 ASSUME: elements of l are monomial ideals of the basering.386 ASSUME: The elements of l are monomial ideals of the basering. 385 387 " 386 388 { … … 413 415 return (l); 414 416 } 415 ///////////////////////////////////////////////////////////////////////////// 416 // 417 static proc alexDif (intvec v, ideal I)417 418 ///////////////////////////////////////////////////////////////////////////// 419 static proc alexDif (intvec v, ideal I) 418 420 " 419 421 USAGE: alexDif (v,I); v, intvec; I, ideal. … … 422 424 ASSUME: I is a monomial ideal of the basering K[x(1),...,x(n)] given by 423 425 its minimal monomial generators and v is an integer vector with 424 n entries s.t. monomial(v) is a multiple of all minimal monomial426 n entries s.t. monomial(v) is a multiple of all minimal monomial 425 427 generators of I. 426 428 " … … 455 457 return (l); 456 458 } 457 ///////////////////////////////////////////////////////////////////////////// 458 // 459 460 ///////////////////////////////////////////////////////////////////////////// 459 461 static proc irredPrimary (list l1) 460 462 " … … 507 509 return (l3); 508 510 } 509 ///////////////////////////////////////////////////////////////////////////// 510 // 511 512 ///////////////////////////////////////////////////////////////////////////// 511 513 static proc isMinimal (ideal I) 512 514 " … … 566 568 } 567 569 } 568 ///////////////////////////////////////////////////////////////////////////// 569 // 570 571 ///////////////////////////////////////////////////////////////////////////// 570 572 static proc isMonomialGB (ideal I) 571 573 " … … 575 577 ASSUME: I is an ideal of the basering whose given generators are not 576 578 monomials. 577 NOTE: this procedure is NOT Grobner free and should be used only if the578 given generators are not monomials. ( use first checkIdeal)579 NOTE: This procedure is NOT Groebner free and should be used only if the 580 given generators are not monomials. (Use the proc checkIdeal first.) 579 581 " 580 582 { … … 604 606 } 605 607 } 608 606 609 ///////////////////////////////////////////////////////////////////////////// 607 610 // … … 609 612 // WARNING: this is not a test, when the answer is 1 and the decompositions 610 613 // may not coincide but it is fast and easy and when the answer is 611 // 0 the decomposition do not coincide.614 // 0 the decompositions do not coincide. 612 615 // 613 proc areEqual(list l1, list l2)616 proc areEqual(list l1, list l2) 614 617 { 615 618 int i,j,sizIdeal; … … 640 643 return (equal(l1Ideal,l2Ideal)); 641 644 } 645 642 646 ///////////////////////////////////////////////////////////////////////////// 643 647 //-------------------------------------------------------------------------// … … 645 649 //-------------------------------------------------------------------------// 646 650 ///////////////////////////////////////////////////////////////////////////// 647 // 651 652 ///////////////////////////////////////////////////////////////////////////// 648 653 proc isMonomial (ideal I) 649 "USAGE: isMonomial (I); I ideal.650 RETURN: 1, if I is monomial ideal; 0, otherwise.654 "USAGE: isMonomial (I); I ideal 655 RETURN: 1, if I is a monomial ideal; 0, otherwise. 651 656 ASSUME: I is an ideal of the basering. 652 657 EXAMPLE: example isMonomial; shows some examples. … … 685 690 isMonomial(J); 686 691 } 687 ///////////////////////////////////////////////////////////////////////////// 688 // 692 693 ///////////////////////////////////////////////////////////////////////////// 689 694 proc minbaseMon (ideal I) 690 "USAGE: 695 "USAGE: minbaseMon (I); I ideal. 691 696 RETURN: an ideal, the minimal monomial generators of I. 692 (-1 if the given generators of I are not monomials)697 -1 if the given generators of I are not monomials 693 698 ASSUME: I is an ideal generated by a list of monomials of the basering. 694 699 EXAMPLE: example minbaseMon; shows an example. … … 749 754 minbaseMon(I); 750 755 } 751 ///////////////////////////////////////////////////////////////////////////// 752 // 753 proc gcdMon (poly f, poly g)754 "USAGE: 756 757 ///////////////////////////////////////////////////////////////////////////// 758 proc gcdMon (poly f, poly g) 759 "USAGE: gcdMon (f,g); f,g polynomials. 755 760 RETURN: a monomial, the greatest common divisor of f and g. 756 761 ASSUME: f and g are monomials of the basering. … … 795 800 gcdMon(f,g); 796 801 } 797 ///////////////////////////////////////////////////////////////////////////// 798 // 799 proc lcmMon (poly f, poly g)800 "USAGE: lcmMon (f,g); f,g polynomials.802 803 ///////////////////////////////////////////////////////////////////////////// 804 proc lcmMon (poly f, poly g) 805 "USAGE: lcmMon (f,g); f, g polynomials. 801 806 RETURN: a monomial,the least common multiple of f and g. 802 807 ASSUME: f,g are monomials of the basering. … … 840 845 lcmMon(f,g); 841 846 } 842 ////////////////////////////////////////////////////////////////////// 843 // 844 proc membershipMon(poly f, ideal I)845 "USAGE: membershipMon(f,I); f polynomial, I ideal.847 848 ///////////////////////////////////////////////////////////////////////////// 849 proc membershipMon(poly f, ideal I) 850 "USAGE: membershipMon(f, I); f polynomial, I ideal. 846 851 RETURN: 1, if f lies in I; 0 otherwise. 847 (-1 if I and f are nonzero and I is not a monomial ideal)852 -1 if I and f are nonzero and I is not a monomial ideal 848 853 ASSUME: I is a monomial ideal of the basering. 849 854 EXAMPLE: example membershipMon; shows some examples … … 942 947 membershipMon(g,I); 943 948 } 944 ////////////////////////////////////////////////////////////////////// 945 // 946 proc intersectMon (ideal I, ideal J)947 "USAGE: intersectMon (I,J); I,J ideals.949 950 ///////////////////////////////////////////////////////////////////////////// 951 proc intersectMon (ideal I, ideal J) 952 "USAGE: intersectMon (I, J); I, J ideals. 948 953 RETURN: an ideal, the intersection of I and J. 949 954 (it returns -1 if I or J are not monomial ideals) … … 1028 1033 intersectMon (I,J); 1029 1034 } 1030 ////////////////////////////////////////////////////////////////////// 1031 // 1032 proc quotientMon (ideal I, ideal J)1033 "USAGE: quotientMon (I,J); I,J ideals.1035 1036 ///////////////////////////////////////////////////////////////////////////// 1037 proc quotientMon (ideal I, ideal J) 1038 "USAGE: quotientMon (I, J); I, J ideals. 1034 1039 RETURN: an ideal, the quotient I:J. 1035 1040 (returns -1 if I or J is not monomial) 1036 ASSUME: I, J are monomial ideals of the basering.1041 ASSUME: I, J are monomial ideals of the basering. 1037 1042 NOTE: the minimal monomial generating set is returned. 1038 1043 EXAMPLE: example quotientMon; shows an example. … … 1110 1115 quotientMon (I,J); 1111 1116 } 1112 ////////////////////////////////////////////////////////////////////// 1113 // 1117 1118 ///////////////////////////////////////////////////////////////////////////// 1114 1119 proc radicalMon(ideal I) 1115 "USAGE: 1120 "USAGE: radicalMon(I); I ideal 1116 1121 RETURN: an ideal, the radical ideal of the ideal I. 1117 1122 (returns -1 if I is not a monomial ideal) 1118 1123 ASSUME: I is a monomial ideal of the basering. 1119 NOTE: the minimal monomial generating set is returned.1124 NOTE: The minimal monomial generating set is returned. 1120 1125 EXAMPLE: example radicalMon; shows an example. 1121 1126 " … … 1177 1182 radicalMon(I); 1178 1183 } 1179 ////////////////////////////////////////////////////////////////////// 1180 // 1184 1185 ///////////////////////////////////////////////////////////////////////////// 1181 1186 proc isprimeMon (ideal I) 1182 "USAGE: 1187 "USAGE: isprimeMon (I); I ideal 1183 1188 RETURN: 1, if I is prime; 0, otherwise. 1184 1189 (returns -1 if I is not a monomial ideal) … … 1227 1232 isprimeMon (J); 1228 1233 } 1229 ////////////////////////////////////////////////////////////////////// 1230 // 1234 1235 ///////////////////////////////////////////////////////////////////////////// 1231 1236 proc isprimaryMon (ideal I) 1232 "USAGE: 1237 "USAGE: isprimaryMon (I); I ideal 1233 1238 RETURN: 1, if I is primary; 0, otherwise. 1234 1239 (returns -1 if I is not a monomial ideal) … … 1329 1334 isprimaryMon (J); 1330 1335 } 1331 ////////////////////////////////////////////////////////////////////// 1332 // 1336 1337 ///////////////////////////////////////////////////////////////////////////// 1333 1338 proc isirreducibleMon (ideal I) 1334 "USAGE: 1339 "USAGE: isirreducibleMon(I); I ideal 1335 1340 RETURN: 1, if I is irreducible; 0, otherwise. 1336 (return -1 if I is not a monomial ideal)1341 returns -1 if I is not a monomial ideal 1337 1342 ASSUME: I is a monomial ideal of the basering. 1338 1343 EXAMPLE: example isirreducibleMon; shows some examples … … 1385 1390 isirreducibleMon (J); 1386 1391 } 1387 ////////////////////////////////////////////////////////////////////// 1388 // 1392 1393 ///////////////////////////////////////////////////////////////////////////// 1389 1394 proc isartinianMon (ideal I) 1390 "USAGE: 1395 "USAGE: isartinianMon(I); I ideal. 1391 1396 RETURN: 1, if ideal is artinian; 0, otherwise. 1392 (return -1 if ideal I is not a monmomial ideal).1397 returns -1 if ideal I is not a monmomial ideal 1393 1398 ASSUME: I is a monomial ideal of the basering. 1394 1399 EXAMPLE: example isartinianMon; shows some examples … … 1453 1458 isartinianMon (J); 1454 1459 } 1455 ////////////////////////////////////////////////////////////////////// 1456 // 1460 1461 ///////////////////////////////////////////////////////////////////////////// 1457 1462 proc isgenericMon (ideal I) 1458 "USAGE: 1463 "USAGE: isgenericMon(I); I ideal. 1459 1464 RETURN: 1, if ideal is generic; 0, otherwise. 1460 (return -1 if ideal I is not a monomial ideal)1465 returns -1 if ideal I is not a monomial ideal 1461 1466 ASSUME: I is a monomial ideal of the basering. 1462 1467 EXAMPLE: example isgenericMon; shows some examples. … … 1524 1529 isgenericMon (J); 1525 1530 } 1526 ////////////////////////////////////////////////////////////////////// 1527 // 1531 1532 ///////////////////////////////////////////////////////////////////////////// 1528 1533 proc dimMon (ideal I) 1529 "USAGE: 1534 "USAGE: dimMon (I); I ideal 1530 1535 RETURN: an integer, the dimension of the affine variety defined by 1531 1536 the ideal I. 1532 (returns -1 if I is not a monomial ideal)1537 returns -1 if I is not a monomial ideal 1533 1538 ASSUME: I is a monomial ideal of the basering. 1534 1539 EXAMPLE: example dimMon; shows some examples. … … 1631 1636 dimMon (J); 1632 1637 } 1638 1633 1639 ///////////////////////////////////////////////////////////////////////////// 1634 1640 //-------------------------------------------------------------------------// … … 1636 1642 //-------------------------------------------------------------------------// 1637 1643 ///////////////////////////////////////////////////////////////////////////// 1638 // 1644 1645 ////////////////////////////////////////////////////////////////////// 1639 1646 // METODO 1: Metodo directo para descomp. irreducible (ver Vasconcelos) 1640 1647 // … … 1645 1652 // (Vasconcelos) // 1646 1653 ////////////////////////////////////////////////////////////////////// 1647 //1648 1654 static proc irredDec1 (ideal I) 1649 1655 { … … 1711 1717 return (l2); 1712 1718 } 1719 1713 1720 ////////////////////////////////////////////////////////////////////// 1714 1721 // La siguiente funcion va a obtener una descomposicion primaria // 1715 1722 // minimal a partir de la irreducible anterior. // 1716 1723 ////////////////////////////////////////////////////////////////////// 1717 //1718 1724 static proc primDec1 (ideal I) 1719 1725 { … … 1726 1732 return (l2); 1727 1733 } 1728 // 1734 1735 ////////////////////////////////////////////////////////////////////// 1729 1736 // METODO 2: Metodo directo para descomp. primaria (ver Vasconcelos) 1730 1737 // … … 1735 1742 // hace uso de esta (Vasconcelos). // 1736 1743 ////////////////////////////////////////////////////////////////////// 1737 //1738 1744 static proc primDec2 (ideal I) 1739 1745 { … … 1787 1793 return (l2); 1788 1794 } 1789 // 1795 ////////////////////////////////////////////////////////////////////// 1790 1796 // METODO 3: via dual de Alexander y doble dual (Miller) 1791 1797 // … … 1795 1801 // ideal de partida (Miller) // 1796 1802 ////////////////////////////////////////////////////////////////////// 1797 //1798 1803 static proc irredDec3 (ideal I) 1799 1804 { … … 1826 1831 return (l); 1827 1832 } 1833 1828 1834 ////////////////////////////////////////////////////////////////////// 1829 1835 // En este caso hallamos una descomposicion primaria minimal usando // 1830 1836 // la irreducible irredundante del procedimiento anterior. // 1831 1837 ////////////////////////////////////////////////////////////////////// 1832 //1833 1838 static proc primDec3 (ideal I) 1834 1839 { … … 1841 1846 return (l2); 1842 1847 } 1843 // 1848 1849 ////////////////////////////////////////////////////////////////////// 1844 1850 // METODO 4: via dual de Alexander y cociente (Miller) 1845 1851 // … … 1849 1855 // Alexander (con el cociente) (Miller) // 1850 1856 ////////////////////////////////////////////////////////////////////// 1851 //1852 1857 static proc irredDec4 (ideal I) 1853 1858 { … … 1898 1903 return (L); 1899 1904 } 1905 1900 1906 ////////////////////////////////////////////////////////////////////// 1901 1907 // Ahora hallamos una descomposicion primaria irredundante usando // … … 1903 1909 // ideal monomial dado por sus generadores minimales. // 1904 1910 ////////////////////////////////////////////////////////////////////// 1905 //1906 1911 static proc primDec4 (ideal I) 1907 1912 { … … 1914 1919 return (l2); 1915 1920 } 1916 // 1921 1922 ////////////////////////////////////////////////////////////////////// 1917 1923 // METODO 5: un misterio!! 1918 1924 // … … 1922 1928 // irreducibles del ideal 1-1. // 1923 1929 ////////////////////////////////////////////////////////////////////// 1924 //1925 1930 static proc irredDec5 (ideal I) 1926 1931 { … … 2006 2011 return (facets); 2007 2012 } 2013 2008 2014 ////////////////////////////////////////////////////////////////////// 2009 2015 // Ahora hallamos una descomposicion primaria irredundante usando // … … 2011 2017 // ideal monomial dado por sus generadores minimales. // 2012 2018 ////////////////////////////////////////////////////////////////////// 2013 //2014 2019 static proc primDec5 (ideal I) 2015 2020 { … … 2022 2027 return (l2); 2023 2028 } 2024 // 2029 2030 ////////////////////////////////////////////////////////////////////// 2025 2031 // METODO 6: via complejo de Scarf (Milovsky) 2026 2032 // … … 2033 2039 // generadores del ideal. // 2034 2040 ////////////////////////////////////////////////////////////////////// 2035 //2036 2041 static proc maximoExp(ideal I,int i) 2037 2042 { … … 2051 2056 return(max); 2052 2057 } 2058 2053 2059 ////////////////////////////////////////////////////////////////////// 2054 2060 // Esta funcion estudia si un ideal monomial dado por su sistema // … … 2057 2063 // que han sido introducidos. // 2058 2064 ////////////////////////////////////////////////////////////////////// 2059 //2060 2065 static proc artinian (ideal I) 2061 2066 { … … 2141 2146 } 2142 2147 } 2148 2143 2149 ////////////////////////////////////////////////////////////////////// 2144 2150 // En este caso vamos primero a chequear si el ideal es o no // … … 2146 2152 // pues estos son una aplicacion biyectiva. // 2147 2153 ////////////////////////////////////////////////////////////////////// 2148 //2149 2154 static proc generic (ideal I) 2150 2155 { … … 2210 2215 } 2211 2216 } 2217 2212 2218 ////////////////////////////////////////////////////////////////////// 2213 2219 // Esta funci?n obtiene una descomposicion irreducible del ideal // … … 2215 2221 // generico que le asociamos. // 2216 2222 ////////////////////////////////////////////////////////////////////// 2217 //2218 2223 static proc nonGeneric (EXP,NEWEXP,Faces,sizI) 2219 2224 { … … 2250 2255 return (newFaces); 2251 2256 } 2257 2252 2258 ////////////////////////////////////////////////////////////////////// 2253 2259 // Este procedimiento va a dar una faceta inicial para el complejo // … … 2255 2261 // y generico (evidentemente I dado por la bse minimal) // 2256 2262 ////////////////////////////////////////////////////////////////////// 2257 //2258 2263 static proc initialFacet (ideal I) 2259 2264 { … … 2342 2347 return (face); 2343 2348 } 2349 2344 2350 ////////////////////////////////////////////////////////////////////// 2345 2351 // La funcion que sigue devuelve las facetas adyacentes a una dada // 2346 2352 // en el complejo de Scarf asociado a I. // 2347 2353 ////////////////////////////////////////////////////////////////////// 2348 //2349 2354 static proc adyacency (list l1, ideal I) 2350 2355 { … … 2506 2511 return(l2); 2507 2512 } 2513 2508 2514 ////////////////////////////////////////////////////////////////////// 2509 2515 // Metodo que calcula la descomposicion irreducible de un ideal // 2510 2516 // monomial usando el complejo de Scarf (Milowski) // 2511 2517 ////////////////////////////////////////////////////////////////////// 2512 //2513 2518 static proc ScarfMethod (ideal I) 2514 2519 { … … 2685 2690 return(Faces); 2686 2691 } 2692 2687 2693 ////////////////////////////////////////////////////////////////////// 2688 2694 // Devuelve una descomposicion primaria minimal de un ideal // 2689 2695 // monomial via el complejo de Scarf. // 2690 2696 ////////////////////////////////////////////////////////////////////// 2691 //2692 2697 static proc scarfMethodPrim (ideal I) 2693 2698 { … … 2701 2706 return (l2); 2702 2707 } 2703 // 2708 2709 ////////////////////////////////////////////////////////////////////// 2704 2710 // METODO 7: algoritmo de etiquetas (Roune) 2705 2711 // … … 2709 2715 // algoritmo de etiquetas de B. Roune. // 2710 2716 ////////////////////////////////////////////////////////////////////// 2711 //2712 2717 static proc phi (list F) 2713 2718 { … … 2740 2745 return (listphi); 2741 2746 } 2742 ////////////////////////////////////////////////////////////////////// 2743 // 2747 2748 ///////////////////////////////////////////////////////////////////////////// 2744 2749 static proc pi(poly f) 2745 2750 { … … 2759 2764 return (f); 2760 2765 } 2761 ////////////////////////////////////////////////////////////////////// 2762 // 2766 2767 ///////////////////////////////////////////////////////////////////////////// 2763 2768 static proc conditionComplex (intvec posActual,ideal I,ideal S) 2764 2769 { … … 2817 2822 return (0); 2818 2823 } 2819 ////////////////////////////////////////////////////////////////////// 2820 // 2824 2825 ///////////////////////////////////////////////////////////////////////////// 2821 2826 static proc findFaces (ideal I) 2822 2827 { … … 2870 2875 return (F); 2871 2876 } 2877 2872 2878 ////////////////////////////////////////////////////////////////////// 2873 2879 // La siguiente funcion calcula la descomposicion en irreducibles de// … … 2875 2881 // metodo de Bjarke Roune. // 2876 2882 ////////////////////////////////////////////////////////////////////// 2877 //2878 2883 static proc labelAlgorithm(ideal I) 2879 2884 { … … 2946 2951 return (facets); 2947 2952 } 2953 2948 2954 ////////////////////////////////////////////////////////////////////// 2949 2955 // Devuelve una descomposicion primaria minimal de un ideal monomial// 2950 2956 // dado. // 2951 2957 ////////////////////////////////////////////////////////////////////// 2952 // 2953 static proc labelAlgPrim (ideal I) 2958 static proc labelAlgPrim (ideal I) 2954 2959 { 2955 2960 // VARIABLES … … 2962 2967 return (l2); 2963 2968 } 2964 // 2969 2970 ////////////////////////////////////////////////////////////////////// 2965 2971 // METODO 8: Gao-Zhu 2966 2972 // 2967 2973 ////////////////////////////////////////////////////////////////////// 2968 //2969 2974 static proc divide (intvec v, intvec w, int k) 2970 2975 { … … 2991 2996 return (1); 2992 2997 } 2993 ////////////////////////////////////////////////////////////////////// 2994 // // 2995 ////////////////////////////////////////////////////////////////////// 2996 // 2998 2999 ///////////////////////////////////////////////////////////////////////////// 2997 3000 static proc incrementalAlg (ideal I) 2998 3001 { … … 3203 3206 return (facets); 3204 3207 } 3205 ////////////////////////////////////////////////////////////////////// 3206 // 3208 3209 ///////////////////////////////////////////////////////////////////////////// 3207 3210 static proc incrementalAlgPrim (ideal I) 3208 3211 { … … 3216 3219 return (l2); 3217 3220 } 3218 // 3221 3222 ////////////////////////////////////////////////////////////////////// 3219 3223 // METODO 9: slice algorithm (Roune) 3220 3224 // … … 3222 3226 // SLICE ALGORITHM (B.Roune) // 3223 3227 ////////////////////////////////////////////////////////////////////// 3224 //3225 3228 static proc divideMon (poly f , poly g) 3226 3229 { … … 3238 3241 //return (1); 3239 3242 } 3240 ////////////////////////////////////////////////////////////////////// 3241 // 3243 3244 ///////////////////////////////////////////////////////////////////////////// 3242 3245 static proc pivot (ideal I , poly lcmMin, ideal S) 3243 3246 { … … 3302 3305 } 3303 3306 } 3304 ////////////////////////////////////////////////////////////////////// 3305 // 3307 3308 ///////////////////////////////////////////////////////////////////////////// 3306 3309 static proc simplification (I) 3307 3310 { … … 3424 3427 return (lcmMi,I); 3425 3428 } 3426 ////////////////////////////////////////////////////////////////////// 3427 // 3429 3430 ///////////////////////////////////////////////////////////////////////////// 3428 3431 static proc con (ideal I , ideal S , poly q) 3429 3432 { … … 3536 3539 return (con(I1,S1,p*q),con(I,S2,q)); 3537 3540 } 3538 ////////////////////////////////////////////////////////////////////// 3539 // 3541 3542 ///////////////////////////////////////////////////////////////////////////// 3540 3543 static proc irredDecMonSlice (ideal I) 3541 3544 { … … 3614 3617 return (components); 3615 3618 } 3616 ////////////////////////////////////////////////////////////////////// 3617 // 3619 3620 ///////////////////////////////////////////////////////////////////////////// 3618 3621 static proc primDecMonSlice (ideal I) 3619 3622 { … … 3627 3630 return (l2); 3628 3631 } 3632 3629 3633 ////////////////////////////////////////////////////////////////////// 3630 3634 // // … … 3633 3637 ////////////////////////////////////////////////////////////////////// 3634 3638 ////////////////////////////////////////////////////////////////////// 3635 // 3639 3640 ///////////////////////////////////////////////////////////////////////////// 3636 3641 proc irreddecMon 3637 "USAGE: 3642 "USAGE: irreddecMon (I[,alg]); I ideal, alg string. 3638 3643 RETURN: list, the irreducible components of the monomial ideal I. 3639 3644 (returns -1 if I is not a monomial ideal). … … 3739 3744 irreddecMon(I,"sr"); 3740 3745 } 3741 ////////////////////////////////////////////////////////////////////// 3742 // 3746 3747 ///////////////////////////////////////////////////////////////////////////// 3743 3748 proc primdecMon 3744 "USAGE: 3749 "USAGE: primdecMon (I[,alg]); I ideal, alg string 3745 3750 RETURN: list, the components in a minimal primary decomposition of I. 3746 3751 (returns -1 if I is not a monomial ideal).
Note: See TracChangeset
for help on using the changeset viewer.