Changeset 2d2cad9 in git
- Timestamp:
- May 15, 2000, 4:29:22 PM (24 years ago)
- Branches:
- (u'spielwiese', '4a9821a93ffdc22a6696668bd4f6b8c9de3e6c5f')
- Children:
- d69ec8265202f0a4690014e88e13260e0d500c34
- Parents:
- 7acd5fa67b922a64485b5ee3fc5db731000e9539
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/LIB/primdec.lib
r7acd5f r2d2cad9 1 // $Id: primdec.lib,v 1.6 4 2000-05-15 11:05:39 pfister Exp $1 // $Id: primdec.lib,v 1.65 2000-05-15 14:29:22 Singular Exp $ 2 2 /////////////////////////////////////////////////////////////////////////////// 3 3 // primdec.lib // … … 11 11 /////////////////////////////////////////////////////////////////////////////// 12 12 13 version="$Id: primdec.lib,v 1.6 4 2000-05-15 11:05:39 pfister Exp $";13 version="$Id: primdec.lib,v 1.65 2000-05-15 14:29:22 Singular Exp $"; 14 14 info=" 15 15 LIBRARY: primdec.lib PROCEDURES FOR PRIMARY DECOMPOSITION … … 85 85 if(ordstr(basering)[1,2]!="dp") 86 86 { 87 execute "ring @Phelp=("+charstr(@P)+"),("+varstr(@P)+"),(C,dp);";87 execute("ring @Phelp=("+charstr(@P)+"),("+varstr(@P)+"),(C,dp);"); 88 88 ideal inew=std(imap(@P,id)); 89 89 ideal @h=imap(@P,h); … … 466 466 { 467 467 if ( voice >=15 ) 468 { 468 { 469 469 "// WARNING: The characteristic is perhaps too small to use"; 470 470 "// the algorithm of Gianni/Trager/Zacharias."; … … 475 475 { 476 476 f=f*char(basering); 477 e=e/char(basering); 477 e=e/char(basering); 478 478 } 479 479 480 480 } 481 481 t=leadcoef(i[m])*e*var(n)^f+(i[m]-lead(i[m]))/var(n)^((e-1)*f); … … 486 486 } 487 487 if(f>1) 488 { 488 { 489 489 act=factorize(t); 490 490 if(size(act[1])>2) 491 491 { 492 return(ideal(0)); 492 return(ideal(0)); 493 493 } 494 494 if(deg(act[1][2])>1) 495 495 { 496 return(ideal(0)); 496 return(ideal(0)); 497 497 } 498 498 t=act[1][2]; … … 1182 1182 def bsr= basering; 1183 1183 string @id=string(h); 1184 execute "ring @r=0,("+@pa+","+varstr(bsr)+"),(C,dp);";1185 execute "ideal @i="+@id+";";1184 execute("ring @r=0,("+@pa+","+varstr(bsr)+"),(C,dp);"); 1185 execute("ideal @i="+@id+";"); 1186 1186 poly @p=lcmP(@i); 1187 1187 string @ps=string(@p); 1188 1188 setring bsr; 1189 execute "poly @p="+@ps+";";1189 execute("poly @p="+@ps+";"); 1190 1190 return(@p); 1191 1191 } … … 1507 1507 list l= prepareQuotientring(3); 1508 1508 l; 1509 execute l[1];1510 execute l[2];1509 execute(l[1]); 1510 execute(l[2]); 1511 1511 basering; 1512 1512 phi; … … 1562 1562 i=qr[1]; 1563 1563 1564 execute 1565 +ordstr(basering)+");" ;1564 execute("ring gnir = ("+charstr(basering)+"),("+varstr(basering)+"),(" 1565 +ordstr(basering)+");"); 1566 1566 1567 1567 … … 1597 1597 setring @P; 1598 1598 // kill gnir; 1599 execute 1600 ("+varstr(basering)+"),(C,lp);" ;1599 execute("ring gnir1 = ("+charstr(basering)+"), 1600 ("+varstr(basering)+"),(C,lp);"); 1601 1601 ideal i=fetch(@P,i); 1602 1602 list @pr=facstd(i); … … 1684 1684 def P=basering; 1685 1685 1686 execute "ring ir = ("+charstr(basering)+"),("+varstr(basering)+"),(C,lp);";1686 execute("ring ir = ("+charstr(basering)+"),("+varstr(basering)+"),(C,lp);"); 1687 1687 list l=fetch(P,li); 1688 1688 list @erg; … … 1765 1765 /////////////////////////////////////////////////////////////////////////////// 1766 1766 proc equidim(ideal i,list #) 1767 "USAGE: equidim(i) or equidim(i,1) ; i ideal 1768 equidim(i,1) uses the algorithm of Eisenbud, Hunecke and Vasconcelos 1767 "USAGE: equidim(i) or equidim(i,1) ; i ideal 1768 equidim(i,1) uses the algorithm of Eisenbud, Hunecke and Vasconcelos 1769 1769 RETURN: list = list of equidimensional ideals a1,...,as such that 1770 1770 i is the intersection of a1,...,as. as is the equidimensional … … 1791 1791 &&(find(ordstr(basering),"s")==0)) 1792 1792 { 1793 execute 1794 +ordstr(basering)+");" ;1793 execute("ring gnir = ("+charstr(basering)+"),("+varstr(basering)+"),(" 1794 +ordstr(basering)+");"); 1795 1795 ideal i=imap(P,i); 1796 1796 ideal j=i; 1797 1797 if(a==1) 1798 1798 { 1799 attrib(j,"isSB",1); 1799 attrib(j,"isSB",1); 1800 1800 } 1801 1801 else … … 1806 1806 else 1807 1807 { 1808 execute "ring gnir = ("+charstr(basering)+"),("+varstr(basering)+"),dp;";1808 execute("ring gnir = ("+charstr(basering)+"),("+varstr(basering)+"),dp;"); 1809 1809 ideal i=imap(P,i); 1810 1810 ideal j=groebner(i); 1811 } 1811 } 1812 1812 if(homo==1) 1813 1813 { … … 1829 1829 if(m==0) 1830 1830 { 1831 ideal k=equidimMax(j); 1831 ideal k=equidimMax(j); 1832 1832 } 1833 1833 else 1834 1834 { 1835 ideal k=equidimMaxEHV(j); 1835 ideal k=equidimMaxEHV(j); 1836 1836 } 1837 1837 if(size(reduce(k,j,1))==0) … … 1843 1843 } 1844 1844 1845 option(returnSB); 1845 option(returnSB); 1846 1846 j=quotient(i,k); 1847 1847 option(noreturnSB); 1848 1848 1849 list equi=equidim(j); 1849 list equi=equidim(j); 1850 1850 if(deg(equi[size(equi)][1])<=0) 1851 1851 { … … 1870 1870 /////////////////////////////////////////////////////////////////////////////// 1871 1871 proc equidimMax(ideal i) 1872 "USAGE: equidimMax(i); i ideal 1872 "USAGE: equidimMax(i); i ideal 1873 1873 RETURN: ideal = ideal of equidimensional locus 1874 1874 EXAMPLE: example equidimMax; shows an example … … 1882 1882 int a=attrib(i,"isSB"); 1883 1883 int homo=homog(i); 1884 1884 1885 1885 if(((homo==1)||(a==1))&&(find(ordstr(basering),"l")==0) 1886 1886 &&(find(ordstr(basering),"s")==0)) 1887 1887 { 1888 execute 1889 +ordstr(basering)+");" ;1888 execute("ring gnir = ("+charstr(basering)+"),("+varstr(basering)+"),(" 1889 +ordstr(basering)+");"); 1890 1890 ideal i=imap(P,i); 1891 1891 ideal j=i; 1892 1892 if(a==1) 1893 1893 { 1894 attrib(j,"isSB",1); 1894 attrib(j,"isSB",1); 1895 1895 } 1896 1896 else … … 1901 1901 else 1902 1902 { 1903 execute "ring gnir = ("+charstr(basering)+"),("+varstr(basering)+"),dp;";1903 execute("ring gnir = ("+charstr(basering)+"),("+varstr(basering)+"),dp;"); 1904 1904 ideal i=imap(P,i); 1905 1905 ideal j=groebner(i); … … 1924 1924 indep=maxIndependSet(j); 1925 1925 1926 execute 1927 +indep[1][2]+");" ;1926 execute("ring gnir1 = ("+charstr(basering)+"),("+indep[1][1]+"),(" 1927 +indep[1][2]+");"); 1928 1928 if(homo==1) 1929 1929 { … … 1935 1935 } 1936 1936 string quotring=prepareQuotientring(nvars(basering)-indep[1][3]); 1937 execute quotring;1937 execute(quotring); 1938 1938 ideal j=imap(gnir1,j); 1939 1939 kill gnir1; … … 2057 2057 //---------------------------------------------------------------- 2058 2058 2059 execute "ring gnir = ("+charstr(basering)+"),("+varstr(basering)+"),(C,lp);";2059 execute("ring gnir = ("+charstr(basering)+"),("+varstr(basering)+"),(C,lp);"); 2060 2060 option(redSB); 2061 2061 … … 2209 2209 if(ordstr(@P)[1]=="w") 2210 2210 { 2211 execute "ring @Phelp=("+charstr(gnir)+"),("+varstr(gnir)+"),("+ordstr(@P)+");";2211 execute("ring @Phelp=("+charstr(gnir)+"),("+varstr(gnir)+"),("+ordstr(@P)+");"); 2212 2212 } 2213 2213 else 2214 2214 { 2215 execute "ring @Phelp=("+charstr(gnir)+"),("+varstr(gnir)+"),(C,dp);";2215 execute("ring @Phelp=("+charstr(gnir)+"),("+varstr(gnir)+"),(C,dp);"); 2216 2216 } 2217 2217 … … 2250 2250 //change the ring 2251 2251 { 2252 execute 2253 +ordstr(basering)+");" ;2252 execute("ring gnir1 = ("+charstr(basering)+"),("+varstr(basering)+"),(" 2253 +ordstr(basering)+");"); 2254 2254 ideal @j=fetch(gnir,@j); 2255 2255 attrib(@j,"isSB",1); … … 2260 2260 { 2261 2261 @va=string(maxideal(1)); 2262 execute 2263 +indep[@m][2]+");" ;2264 execute "map phi=gnir,"+@va+";";2262 execute("ring gnir1 = ("+charstr(basering)+"),("+indep[@m][1]+"),(" 2263 +indep[@m][2]+");"); 2264 execute("map phi=gnir,"+@va+";"); 2265 2265 if(homo==1) 2266 2266 { … … 2307 2307 //--------------------------------------------------------------------- 2308 2308 2309 execute quotring;2309 execute(quotring); 2310 2310 2311 2311 // @j considered in the quotientring … … 2518 2518 //change the ring 2519 2519 { 2520 execute 2521 varstr(basering)+"),("+ordstr(basering)+");" ;2520 execute("ring gnir1 = ("+charstr(basering)+"),("+ 2521 varstr(basering)+"),("+ordstr(basering)+");"); 2522 2522 ideal @j=fetch(gnir,jkeep); 2523 2523 attrib(@j,"isSB",1); … … 2526 2526 { 2527 2527 @va=string(maxideal(1)); 2528 execute 2529 restindep[@m][1]+"),(" +restindep[@m][2]+");" ;2530 execute "map phi=gnir,"+@va+";";2528 execute("ring gnir1 = ("+charstr(basering)+"),("+ 2529 restindep[@m][1]+"),(" +restindep[@m][2]+");"); 2530 execute("map phi=gnir,"+@va+";"); 2531 2531 if(homo==1) 2532 2532 { … … 2552 2552 //K[var(nnp+1),..,var(nva)]) are collected in the list h, 2553 2553 //we need their ggt, gh, because of the following: 2554 //let (j:gh^n)=(j:gh^infinity) then 2554 //let (j:gh^n)=(j:gh^infinity) then 2555 2555 //j*K(var(nnp+1),..,var(nva))[..the rest..] 2556 2556 //intersected with K[var(1),...,var(nva)] is (j:gh^n) … … 2571 2571 //------------------------------------------------------------------ 2572 2572 2573 execute quotring;2573 execute(quotring); 2574 2574 2575 2575 // @j considered in the quotientring … … 2598 2598 2599 2599 2600 //we need the intersection of the ideals in the list quprimary with 2600 //we need the intersection of the ideals in the list quprimary with 2601 2601 //the polynomialring, i.e. let q=(f1,...,fr) in the quotientring 2602 2602 //such an ideal but fi polynomials, then the intersection of q with 2603 //the polynomialring is the saturation of the ideal generated by 2603 //the polynomialring is the saturation of the ideal generated by 2604 2604 //f1,...,fr with respect toh which is the lcm of the leading 2605 2605 //coefficients of the fi considered in the quotientring: … … 2856 2856 //change the ring 2857 2857 { 2858 execute 2859 +ordstr(basering)+");" ;2858 execute("ring gnir1 = ("+charstr(basering)+"),("+varstr(basering)+"),(" 2859 +ordstr(basering)+");"); 2860 2860 ideal @j=fetch(@P,@j); 2861 2861 attrib(@j,"isSB",1); … … 2864 2864 { 2865 2865 @va=string(maxideal(1)); 2866 execute 2867 +indep[@m][2]+");" ;2868 execute "map phi=@P,"+@va+";";2866 execute("ring gnir1 = ("+charstr(basering)+"),("+indep[@m][1]+"),(" 2867 +indep[@m][2]+");"); 2868 execute("map phi=@P,"+@va+";"); 2869 2869 if(homo==1) 2870 2870 { … … 2908 2908 //------------------------------------------------------------------------ 2909 2909 2910 execute quotring;2910 execute(quotring); 2911 2911 2912 2912 // @j considered in the quotientring … … 3377 3377 def oldring=basering; 3378 3378 string n=system("neworder",PS); 3379 execute "ring r=("+charstr(oldring)+"),("+n+"),dp;";3379 execute("ring r=("+charstr(oldring)+"),("+n+"),dp;"); 3380 3380 ideal PS=imap(oldring,PS); 3381 3381 matrix m=char_series(PS); // We compute an irreducible … … 3974 3974 3975 3975 U[size(U)]=")"; // we compute the extractor of I (w.r.t. U) 3976 execute "ring RAU="+charstr(basering)+",("+A+U+",(dp("+string(a)+"),dp);";3976 execute("ring RAU="+charstr(basering)+",("+A+U+",(dp("+string(a)+"),dp);"); 3977 3977 ideal I=imap(R,SI); 3978 3978 //I=std(I,hv); // the standard basis in (R[U])[A] 3979 3979 I=std(I); // the standard basis in (R[U])[A] 3980 3980 A[size(A)]=")"; 3981 execute "ring Rloc=("+charstr(basering)+","+U+",("+A+",dp;";3981 execute("ring Rloc=("+charstr(basering)+","+U+",("+A+",dp;"); 3982 3982 ideal I=imap(RAU,I); 3983 3983 //"std in lokalisierung:"+newline,I; … … 4254 4254 "USAGE: primdecGTZ(i); i ideal 4255 4255 RETURN: a list, say pr, of primary ideals and their associated primes 4256 pr[i][1], resp. pr[i][2] is the i-th primary resp. prime component 4257 NOTE: Algorithm of Gianni, Traeger, Zacharias 4258 designed for characteristic 0, works also in char k > 0, if it 4256 pr[i][1], resp. pr[i][2] is the i-th primary resp. prime component 4257 NOTE: Algorithm of Gianni, Traeger, Zacharias 4258 designed for characteristic 0, works also in char k > 0, if it 4259 4259 terminates (may result in an infinite loop in small characteristic!) 4260 4260 EXAMPLE: example primdecGTZ; shows an example … … 4281 4281 if c=3, minAssGTZ and facstd is used 4282 4282 RETURN: a list, say pr, of primary ideals and their associated primes 4283 pr[i][1], resp. pr[i][2] is the i-th primary resp. prime component 4283 pr[i][1], resp. pr[i][2] is the i-th primary resp. prime component 4284 4284 NOTE: Algorithm of Shimoyama-Yokoyama 4285 4285 implemented for characteristic 0, works also in char k > 0, … … 4352 4352 proc equiRadical(ideal i) 4353 4353 "USAGE: equiRadical(i); i ideal 4354 RETURN: ideal, intersection of associated primes of i of maximal dimension 4355 NOTE: designed for characteristic 0, works also in char k > 0 if it 4354 RETURN: ideal, intersection of associated primes of i of maximal dimension 4355 NOTE: designed for characteristic 0, works also in char k > 0 if it 4356 4356 terminates, may result in an infinite loop in small characteristic 4357 4357 EXAMPLE: example equiRadical; shows an example … … 4373 4373 "USAGE: radical(i); i ideal 4374 4374 RETURN: ideal = the radical of i 4375 NOTE: a combination of the algorithms of Krick/Logar and 4375 NOTE: a combination of the algorithms of Krick/Logar and 4376 4376 Eisenbud/Huneke/Vasconcelos 4377 designed for characteristic 0, works also in char k > 0 if it 4377 designed for characteristic 0, works also in char k > 0 if it 4378 4378 terminates, may result in an infinite loop in small characteristic 4379 4379 EXAMPLE: example radical; shows an example … … 4404 4404 if(dim(pr[1])>1) 4405 4405 { 4406 execute 4407 ("+varstr(basering)+"),(C,lp);" ;4406 execute("ring gnir = ("+charstr(basering)+"), 4407 ("+varstr(basering)+"),(C,lp);"); 4408 4408 ideal i=fetch(@P,i); 4409 4409 list @pr=facstd(i);
Note: See TracChangeset
for help on using the changeset viewer.