Changeset 584649e in git
 Timestamp:
 Jan 21, 2015, 6:27:03 PM (9 years ago)
 Branches:
 (u'fiekerDuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', '648d28f488f6ff08f5607ff229b9ad9e4a5b93c2')
 Children:
 bf7ca5bfaabc9aaa67376f601be6360dd14f9551
 Parents:
 a6d6356dcb7c186e5a91abd804ac087fb76faa4e
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

Singular/LIB/primdec.lib
ra6d6356 r584649e 1 1 //////////////////////////////////////////////////////////////////////////// 2 version="version primdec.lib 4.0.1. 1 Nov_2014"; // $Id$2 version="version primdec.lib 4.0.1.2 Jan_2015 "; // $Id$ 3 3 category="Commutative Algebra"; 4 4 info=" … … 27 27 PROCEDURES: 28 28 Ann(M); annihilator of R^n/M, R=basering, M in R^n 29 primdecGTZ(I); (deprecated)complete primary decomposition via Gianni,Trager,Zacharias29 primdecGTZ(I); complete primary decomposition via Gianni,Trager,Zacharias 30 30 primdecGTZE(I); complete primary decomposition via Gianni,Trager,Zacharias. Returns empty list for the unit ideal 31 primdecSY(I...); (deprecated)complete primary decomposition via ShimoyamaYokoyama31 primdecSY(I...); complete primary decomposition via ShimoyamaYokoyama 32 32 primdecSYE(I,..); complete primary decomposition via ShimoyamaYokoyama. Returns empty list for the unit ideal 33 minAssGTZ(I); (deprecated)the minimal associated primes via Gianni,Trager,Zacharias (with modifications by Laplagne)33 minAssGTZ(I); the minimal associated primes via Gianni,Trager,Zacharias (with modifications by Laplagne) 34 34 minAssGTZE(I); the minimal associated primes via Gianni,Trager,Zacharias. Returns empty list for unit ideal 35 minAssChar(I...); (deprecated)the minimal associated primes using characteristic sets35 minAssChar(I...); the minimal associated primes using characteristic sets 36 36 minAssCharE(I..); the minimal associated primes using characteristic sets. Returns empty list for unit ideal 37 testPrimary(L,k); (deprecated)tests the result of the primary decomposition37 testPrimary(L,k); tests the result of the primary decomposition 38 38 testPrimaryE(L,k); tests the result of the primary decomposition. Handles also empty list L. 39 39 radical(I); computes the radical of I via Krick/Logar (with modifications by Laplagne) and Kemper … … 42 42 prepareAss(I); list of radicals of the equidimensional components of I 43 43 equidim(I); weak equidimensional decomposition of I 44 equidimE(I); equidimE returns empty list for unit ideal45 44 equidimMax(I); equidimensional locus of I 46 45 equidimMaxEHV(I); equidimensional locus of I via Eisenbud,Huneke,Vasconcelos 47 46 zerodec(I); zerodimensional decomposition via Monico 48 absPrimdecGTZ(I); (deprecated)the absolute prime components of I47 absPrimdecGTZ(I); the absolute prime components of I 49 48 absPrimdecGTZE(I); the absolute prime components of I. Assumes I is not unit ideal. 50 49 sep(f,k); the separabel part of f as polynomial in Fp(t1,...,tm) 51 50 "; 52 53 54 51 55 52 LIB "general.lib"; … … 67 64 // 68 65 /////////////////////////////////////////////////////////////////////////////// 69 70 66 71 67 static proc sat1 (ideal id, poly p) … … 1039 1035 if(size(primary[2*@k])==0) 1040 1036 { 1041 ek=insepDecomp_i( int(1), primary[2*@k1] );1037 ek=insepDecomp_i( 1, primary[2*@k1] ); 1042 1038 primary=delete(primary,2*@k); 1043 1039 primary=delete(primary,2*@k1); … … 1558 1554 //computes the prime decomposition of the special ideals 1559 1555 //and transforms it back to a decomposition of i 1560 // if patchPrimaryDecomposition=1, drop unit ideal in the decomposition, 1556 // if patchPrimaryDecomposition=1, drop unit ideal in the decomposition, 1561 1557 // since the unit ideal it is not prime! 1562 1558 … … 1727 1723 } 1728 1724 1729 static proc teilt(intvec a ba, intvec bab)1725 static proc teilt(intvec a, intvec b) 1730 1726 { 1731 1727 int i; 1732 for(i=1;i<=size(a ba);i++)1733 { 1734 if(a ba[i]>bab[i]){return(0);}1728 for(i=1;i<=size(a);i++) 1729 { 1730 if(a[i]>b[i]){return(0);} 1735 1731 } 1736 1732 return(1); … … 1955 1951 " 1956 1952 { 1957 return(minAssPrimesold_i( int(1),I,#));1953 return(minAssPrimesold_i(1,I,#)); 1958 1954 } 1959 1955 example … … 1972 1968 minAssPrimesold(i,1); I ideal (to use also the factorizing Groebner) 1973 1969 RETURN: list = the minimal associated prime ideals of I. In case I is unit ideal, returns list(ideal(1)); 1974 NOTE: deprecated. Use 'minAssPrimesoldE()'1975 1970 EXAMPLE: example minAssPrimesold; shows an example 1976 1971 " 1977 1972 { 1978 return(minAssPrimesold_i( int(0),I,#));1973 return(minAssPrimesold_i(0,I,#)); 1979 1974 } 1980 1975 example … … 1992 1987 { 1993 1988 // 1994 // parameter patchPrimaryDecomposition : if = 1, patch the decomposition( drop unit ideal in the decomposition), 1989 // parameter patchPrimaryDecomposition : if = 1, patch the decomposition( drop unit ideal in the decomposition), 1995 1990 // : if = 0, taken no special action in case the unit ideal is in the decomposition 1996 1991 // for other parameters see minAssPrimesold, minAssPrimesoldE … … 2019 2014 tluser=union(@res); 2020 2015 2016 setring @P; 2021 2017 if (size(tluser)>0) 2022 2018 { 2023 setring @P;2024 2019 list @res=imap(gnir,tluser); 2025 2020 return(phi(@res)); 2026 2021 } 2027 else 2028 { 2029 setring @P; 2022 else 2023 { 2030 2024 return(tluser); 2031 2025 } … … 2156 2150 " 2157 2151 { 2158 return(minAssPrimes_i( int(1),I,#));2152 return(minAssPrimes_i(1,I,#)); 2159 2153 } 2160 2154 example … … 2177 2171 "GTZ" > the old algorithm is used 2178 2172 RETURN: list = the minimal associated prime ideals of I. If I is the unit ideal returns list(ideal(1)) ; 2179 NOTE: deprecated. Use 'minAssPrimesE()'2180 2173 EXAMPLE: example minAssPrimes; shows an example 2181 2174 " 2182 2175 { 2183 return(minAssPrimes_i( int(0),I,#));2176 return(minAssPrimes_i(0,I,#)); 2184 2177 } 2185 2178 example … … 2197 2190 static proc minAssPrimes_i(int patchPrimaryDecomposition, ideal i, list #) 2198 2191 { 2199 // parameter patchPrimaryDecomposition: 1 to patch( remove unit ideal from the decomposition) , 2192 // parameter patchPrimaryDecomposition: 1 to patch( remove unit ideal from the decomposition) , 2200 2193 // 0 for no special action on unit ideal. 2201 2194 // for other parameters see 'minAssPrimes', 'minAssPrimesE' … … 2281 2274 { 2282 2275 if ( deg(lead(i[1]))==0 ) // we have the unit ideal. 2283 { 2284 setring P0; 2276 { 2277 setring P0; 2285 2278 option( set,origOp ); 2286 2279 if (patchPrimaryDecomposition==1) 2287 2280 { 2288 2281 2289 return( list() ); 2282 return( list() ); 2290 2283 } 2291 2284 else 2292 2285 { 2293 return( list(ideal(1)) ); 2286 return( list(ideal(1)) ); 2294 2287 } 2295 2288 } … … 2430 2423 int liSize=size(li); 2431 2424 int li1Size=0; 2432 if (size(li)>0) 2425 if (size(li)>0) 2433 2426 { 2434 2427 li1Size=size(li[1]); … … 2437 2430 setring ir; 2438 2431 list l; 2439 if ( liSize > 0) 2440 { 2441 if (li1Size > 0) 2432 if ( liSize > 0) 2433 { 2434 if (li1Size > 0) 2442 2435 { 2443 2436 l = fetch(P,li); … … 2530 2523 RETURN: list of equidimensional ideals a[1],...,a[s] with: 2531 2524  a[s] the equidimensional locus of I, i.e. the intersection 2532 of the primary ideals of dimension of I, except I is unit ideal. 2525 of the primary ideals of dimension of I, except I is unit ideal. 2533 2526  a[1],...,a[s1] the lower dimensional equidimensional loci. 2534 2527 If I is the unit ideal, a list containing the unit ideal as a[1] is returned. … … 2783 2776 {//reduces primery decomposition over algebraic extensions to 2784 2777 //the other cases 2785 return( algeDeco_i( int(1), I, int w) );2778 return( algeDeco_i( 1, I, int w) ); 2786 2779 } 2787 2780 … … 2793 2786 {//reduces primery decomposition over algebraic extensions to 2794 2787 //the other cases 2795 return( algeDeco_i( int(0), I, int w));2788 return( algeDeco_i(0, I, int w)); 2796 2789 } 2797 2790 … … 2803 2796 {//reduces primery decomposition over algebraic extensions to 2804 2797 //the other cases 2805 // if patchPrimaryDecomposition=1, drop unit ideal in the decomposition, 2798 // if patchPrimaryDecomposition=1, drop unit ideal in the decomposition, 2806 2799 // since the unit ideal it is not prime, otherwise take no special action. 2807 2800 … … 2830 2823 { 2831 2824 if ( deg(lead(J[1]))==0 ) // we have the unit ideal 2832 { 2825 { 2833 2826 if (patchPrimaryDecomposition==1) 2834 2827 { 2835 return( list() ); 2828 return( list() ); 2836 2829 } 2837 2830 else 2838 2831 { 2839 return( list( ideal(1) ) ); 2832 return( list( ideal(1) ) ); 2840 2833 } 2841 2834 } … … 2927 2920 R_l[3]=list(list("dp",1:n),list("lp",1:(nvars(basering)n)),list("C",0)); 2928 2921 def RS=ring(R_l); kill R_l; setring RS; 2929 if (sizepr>0) { list pr=imap(RH,pr); ASSUME(1, sizepr == size(pr)); }2922 if (sizepr>0) { list pr=imap(RH,pr); } 2930 2923 ideal K; 2931 2924 for(j=1;j<=sizepr;j++) 2932 2925 { 2933 2926 K=groebner(pr[j]); 2934 if (size(K)>1) 2927 if (size(K)>1) 2935 2928 { 2936 2929 K = K[2..size(K)]; 2937 } 2930 } 2938 2931 pr[j]=K; 2939 2932 } … … 2991 2984 " 2992 2985 { 2993 return(decomp_i( int(1),I,#));2986 return(decomp_i(1,I,#)); 2994 2987 } 2995 2988 example … … 3013 3006 (resp. a list of the minimal associated primes) 3014 3007 if I is unit ideal, returns list(ideal(1),ideal(1)) ( resp. list(ideal(1))) 3015 NOTE: deprecated. Use 'decompE()'3016 3008 EXAMPLE: example decomp; shows an example 3017 3009 " 3018 3010 { 3019 return(decomp_i( int(0),I,#));3011 return(decomp_i(0,I,#)); 3020 3012 } 3021 3013 example … … 3032 3024 static proc decomp_i(int patchPrimaryDecomposition, ideal i,list #) 3033 3025 { 3034 // if patchPrimaryDecomposition=1, drop unit ideal in the decomposition, 3026 // if patchPrimaryDecomposition=1, drop unit ideal in the decomposition, 3035 3027 // since the unit ideal it is not prime, otherwise take no special action. 3036 3028 // for other parameters see 'decomp' or 'decompE' … … 3081 3073 } 3082 3074 else 3083 { 3075 { 3084 3076 tras=i; 3085 3077 } … … 3090 3082 { 3091 3083 if ( deg(lead(ltras[1]))==0 ) // we have the unit ideal. 3092 { 3093 option(set,initialOp); 3084 { 3085 option(set,initialOp); 3094 3086 if (patchPrimaryDecomposition==1) 3095 3087 { 3096 if (abspri) { return(prepare_absprimdec(list())); } 3097 return( list() ); 3088 if (abspri) { return(prepare_absprimdec(list())); } 3089 return( list() ); 3098 3090 } 3099 3091 else … … 3102 3094 primary[2]=ideal(1); 3103 3095 if (abspri) { return(prepare_absprimdec(primary));} 3104 return( primary ); 3096 return( primary ); 3105 3097 } 3106 3098 } … … 3113 3105 primary[1]=ltras[2]; 3114 3106 primary[2]=maxideal(1); 3115 option(set,initialOp); 3107 option(set,initialOp); 3116 3108 if(@wr>0) 3117 3109 { … … 3137 3129 if(size(i)==0) 3138 3130 { 3139 option(set,initialOp); 3131 option(set,initialOp); 3140 3132 primary=ideal(0),ideal(0); 3141 3133 if (abspri) { return(prepare_absprimdec(primary));} … … 3182 3174 { 3183 3175 if ( deg( lead(@j[1]) )==0 ) // we have the unit ideal. 3184 { 3176 { 3185 3177 setring @P; 3186 3178 option(set,initialOp); 3187 3179 if (patchPrimaryDecomposition==1) 3188 3180 { 3189 return( list() ); 3181 return( list() ); 3190 3182 } 3191 3183 else 3192 3184 { 3193 return( list(ideal(1),ideal(1)) ); 3185 return( list(ideal(1),ideal(1)) ); 3194 3186 } 3195 3187 } … … 3265 3257 list pr=decomp_i(patchPrimaryDecomposition,@j); 3266 3258 if (size(pr)==0) 3267 { 3259 { 3268 3260 setring @P; 3269 3261 option(set,initialOp); … … 3271 3263 return(list()); 3272 3264 } 3273 3265 3274 3266 setring gnir; 3275 3267 list pr=imap(@deirf,pr); … … 3321 3313 } 3322 3314 setring @P; 3323 option(set,initialOp); 3315 option(set,initialOp); 3324 3316 primary=fetch(gnir,gprimary); 3325 3317 //HIER … … 3383 3375 primary=imap(gnir,primary); 3384 3376 } 3385 option(set,initialOp); 3377 option(set,initialOp); 3386 3378 return(primary); 3387 3379 } … … 4044 4036 // 4045 4037 setring @P; 4046 option(set,initialOp); 4038 option(set,initialOp); 4047 4039 primary=imap(gnir,quprimary); 4048 4040 if(!abspri) … … 4569 4561 static proc min_ass_prim_charsets_i (int patchPrimaryDecomposition, ideal PS, int cho) 4570 4562 { 4571 // if patchPrimaryDecomposition=1, drop unit ideal in the decomposition, 4563 // if patchPrimaryDecomposition=1, drop unit ideal in the decomposition, 4572 4564 // since the unit ideal it is not prime, otherwise take no special action. 4573 4565 ASSUME(1, hasFieldCoefficient(basering) ); … … 4604 4596 static proc min_ass_prim_charsets0_i (int patchPrimaryDecomposition, ideal PS) 4605 4597 { 4606 // if patchPrimaryDecomposition=1, drop unit ideal in the decomposition, 4598 // if patchPrimaryDecomposition=1, drop unit ideal in the decomposition, 4607 4599 // since the unit ideal it is not prime, otherwise take no special action. 4608 4600 ASSUME(1, hasFieldCoefficient(basering) ); … … 4610 4602 ASSUME(1, hasGlobalOrdering(basering) ) ; 4611 4603 4604 if (size(PS)==0) { return( list(ideal(0))); } 4612 4605 intvec op; 4613 if (size(PS)==0) { return( list(ideal(0))); }4614 4606 matrix m=char_series(PS); // We compute an irreducible 4615 4607 // characteristic series … … 4702 4694 if (patchPrimaryDecomposition==1) 4703 4695 { 4704 return( list() ); 4696 return( list() ); 4705 4697 } 4706 4698 else 4707 4699 { 4708 return( list(ideal(1)) ); 4709 } 4710 } 4711 } 4700 return( list(ideal(1)) ); 4701 } 4702 } 4703 } 4712 4704 return (PSI); 4713 4705 } … … 4726 4718 static proc min_ass_prim_charsets1_i (int patchPrimaryDecomposition, ideal PS) 4727 4719 { 4728 // if patchPrimaryDecomposition=1, drop unit ideal in the decomposition, 4720 // if patchPrimaryDecomposition=1, drop unit ideal in the decomposition, 4729 4721 // since the unit ideal it is not prime, otherwise take no special action. 4730 4722 ASSUME(1, hasFieldCoefficient(basering) ); … … 4732 4724 ASSUME(1, hasGlobalOrdering(basering) ) ; 4733 4725 4726 if (size(PS)==0) { return( list(ideal(0))); } 4734 4727 intvec op; 4735 4728 def oldring=basering; 4736 if (size(PS)==0) { return( list(ideal(0))); }4737 4729 string n=system("neworder",PS); 4738 4730 execute("ring r=("+charstr(oldring)+"),("+n+"),dp;"); … … 4854 4846 if (patchPrimaryDecomposition==1) 4855 4847 { 4856 return( list() ); 4848 return( list() ); 4857 4849 } 4858 4850 else 4859 4851 { 4860 return( list(ideal(1)) ); 4861 } 4862 } 4863 } 4852 return( list(ideal(1)) ); 4853 } 4854 } 4855 } 4864 4856 4865 4857 return (PSI); … … 4889 4881 static proc prim_dec_i(int patchPrimaryDecomposition, ideal I, int choose) 4890 4882 { 4891 // if patchPrimaryDecomposition=1, drop unit ideal in the decomposition, 4883 // if patchPrimaryDecomposition=1, drop unit ideal in the decomposition, 4892 4884 // since the unit ideal it is not prime, otherwise take no special action. 4893 4885 ASSUME(1, hasFieldCoefficient(basering) ); … … 4930 4922 if (patchPrimaryDecomposition==1) 4931 4923 { 4932 return( list() ); 4924 return( list() ); 4933 4925 } 4934 4926 else 4935 4927 { 4936 return( list(list(ideal(1),ideal(1))) ); 4928 return( list(list(ideal(1),ideal(1))) ); 4937 4929 } 4938 4930 } … … 5125 5117 static proc pseudo_prim_dec_charsets_i(int patchPrimaryDecomposition, ideal I, ideal SI, int choo) 5126 5118 { 5127 // if patchPrimaryDecomposition=1, drop the unit ideal in the decomposition, 5119 // if patchPrimaryDecomposition=1, drop the unit ideal in the decomposition, 5128 5120 // since the unit ideal it is not prime, otherwise take no special action. 5129 5121 ASSUME(1, hasFieldCoefficient(basering) ); … … 5180 5172 static proc pseudo_prim_dec_special_charsets_i (int patchPrimaryDecomposition, ideal SI,list V6, int choo) 5181 5173 { 5182 // if patchPrimaryDecomposition=1, drop the unit ideal in the decomposition, 5174 // if patchPrimaryDecomposition=1, drop the unit ideal in the decomposition, 5183 5175 // since the unit ideal it is not prime, otherwise take no special action. 5184 5176 ASSUME(1, hasFieldCoefficient(basering) ); … … 5282 5274 static proc pseudo_prim_dec_i_i (int patchPrimaryDecomposition, ideal SI, list L) 5283 5275 { 5284 // if patchPrimaryDecomposition=1, drop the unit ideal in the decomposition, 5276 // if patchPrimaryDecomposition=1, drop the unit ideal in the decomposition, 5285 5277 // since the unit ideal it is not prime, otherwise take no special action. 5286 5278 ASSUME(1, hasFieldCoefficient(basering) ); … … 5703 5695 " 5704 5696 { 5705 return (primdecGTZ_i( int(1),I, #));5697 return (primdecGTZ_i(1,I, #)); 5706 5698 } 5707 5699 example … … 5720 5712 proc primdecGTZ(ideal I, list #) 5721 5713 "USAGE: primdecGTZ(I); I ideal 5722 RETURN: a list pr of primary ideals and their associated primes for a proper ideal I, otherwise pr = list( list( ideal(1), ideal(1) ) 5714 RETURN: a list pr of primary ideals and their associated primes for a proper ideal I, otherwise pr = list( list( ideal(1), ideal(1) ) 5723 5715 @format 5724 5716 pr[i][1] the ith primary component, 5725 5717 pr[i][2] the ith prime component. 5726 5718 @end format 5727 NOTE: deprecated. use 'primdecGTZE()' 5728  Algorithm of Gianni/Trager/Zacharias. 5719 NOTE:  Algorithm of Gianni/Trager/Zacharias. 5729 5720  Designed for characteristic 0, works also in char k > 0, if it 5730 5721 terminates (may result in an infinite loop in small characteristic!) … … 5737 5728 " 5738 5729 { 5739 return (primdecGTZ_i( int(0), I , #));5730 return (primdecGTZ_i(0, I , #)); 5740 5731 } 5741 5732 example … … 5751 5742 static proc primdecGTZ_i(int patchPrimaryDecomposition,ideal i, list #) 5752 5743 { 5753 // if parameter patchPrimaryDecomposition=1, drop the unit ideal in the decomposition, 5744 // if parameter patchPrimaryDecomposition=1, drop the unit ideal in the decomposition, 5754 5745 // since the unit ideal it is not prime, otherwise take no special action. 5755 5746 // For other parameters see 'primdecGTZ' or 'primdecGTZE'. … … 5772 5763 int sizeli = size(li); 5773 5764 setring r; 5774 if (sizeli==0) 5775 { 5776 return ( list() ); 5777 } 5778 defli=imap(s,li);5765 if (sizeli==0) 5766 { 5767 return ( list() ); 5768 } 5769 list li=imap(s,li); 5779 5770 // clean up 5780 5771 if(!defined(keep_comp)) … … 5829 5820 " 5830 5821 { 5831 return(absPrimdecGTZ_i( int(1),I,#));5822 return(absPrimdecGTZ_i(1,I,#)); 5832 5823 } 5833 5824 example … … 5862 5853 corresponding global ring is returned if the string 'global' 5863 5854 is specified as second argument 5864 NOTE: deprecated. Use 'absPrimdecGTZE()'. 5865 Algorithm of Gianni/Trager/Zacharias combined with the 5855 NOTE: Algorithm of Gianni/Trager/Zacharias combined with the 5866 5856 @code{absFactorize} command. 5867 5857 SEE ALSO: primdecGTZ; absFactorize … … 5869 5859 " 5870 5860 { 5871 5872 return(absPrimdecGTZ_i( int(0),I,#));5861 5862 return(absPrimdecGTZ_i(0,I,#)); 5873 5863 } 5874 5864 example … … 5887 5877 static proc absPrimdecGTZ_i(int patchPrimaryDecomposition, ideal I, list #) 5888 5878 { 5889 // if parameter patchPrimaryDecomposition=1, drop the unit ideal in the decomposition, 5879 // if parameter patchPrimaryDecomposition=1, drop the unit ideal in the decomposition, 5890 5880 // since the unit ideal it is not prime, otherwise take no special action. 5891 5881 // For other parameters see 'absPrimdecGTZ' or 'absPrimdecGTZE'. … … 5953 5943 //return(algeDeco_i(patchPrimaryDecomposition,I,0)); 5954 5944 ERROR( 5955 " //Not implemented yet for algebraic extensions.Simulate the ring extension by adding the minpoly to the ideal"5945 "Not implemented yet for algebraic extensions.Simulate the ring extension by adding the minpoly to the ideal" 5956 5946 ); 5957 5947 } … … 5959 5949 int n=nvars(R); 5960 5950 list L=decomp_i(patchPrimaryDecomposition,I,3); 5961 if (patchPrimaryDecomposition && size(L)==0 ) 5962 { 5963 ERROR("will not handle case with unit ideal");5951 if (patchPrimaryDecomposition && size(L)==0 ) 5952 { 5953 "// will not handle case with unit ideal"; 5964 5954 } 5965 5955 string newvar=L[1][3]; … … 6055 6045 " 6056 6046 { 6057 return (primdecSY_i( int(1),I,#));6047 return (primdecSY_i(1,I,#)); 6058 6048 } 6059 6049 example … … 6077 6067 pr[i][2] the ith prime component. 6078 6068 @end format 6079 NOTE: deprecated. Use 'primdecSYE()'. 6080 Algorithm of Shimoyama/Yokoyama. 6069 NOTE: Algorithm of Shimoyama/Yokoyama. 6081 6070 @format 6082 6071 if c=0, the given ordering of the variables is used, … … 6093 6082 " 6094 6083 { 6095 return (primdecSY_i( int(0),I,#));6084 return (primdecSY_i(0,I,#)); 6096 6085 } 6097 6086 example … … 6108 6097 static proc primdecSY_i(int patchPrimaryDecomposition, ideal i, list #) 6109 6098 { 6110 // if patchPrimaryDecomposition=1, drop the unit ideal in the decomposition, 6099 // if patchPrimaryDecomposition=1, drop the unit ideal in the decomposition, 6111 6100 // since the unit ideal it is not prime, otherwise take no special action. 6112 6101 // For other paremetes see 'primdecSY' or 'primdecSYE' … … 6134 6123 if(!defined(keep_comp)) 6135 6124 { 6136 6137 6138 6139 6125 for(int k=size(li);k>=1;k) 6126 { 6127 if(mindeg(std(lead(li[k][2]))[1])==0) 6128 { 6140 6129 // 1 contained in ideal, i.e. component does not meet origin in local ordering 6141 6142 6143 6130 li=delete(li,k); 6131 } 6132 } 6144 6133 } 6145 6134 return(li); … … 6147 6136 i=simplify(i,2); 6148 6137 6149 //if ((i[1]==0)(i[1]==1)) // would not work anyway, since i cannot be assumed to be in standard basis form; 6150 // // but why return list(1,1) in case i=1 ?? 6151 if ( (i[1]==0) ) 6152 6138 if ((i[1]==0)(i[1]==1)) 6153 6139 { 6154 6140 list L = list(ideal(i[1]), ideal(i[1]) ); … … 6187 6173 " 6188 6174 { 6189 list result = minAssGTZ_i( int(1),I,#);6175 list result = minAssGTZ_i(1,I,#); 6190 6176 return(result); 6191 6177 6192 6178 } 6193 6179 example … … 6215 6201 6216 6202 RETURN: a list, the minimal associated prime ideals of proper ideal I, otherwise ideal(1) 6217 NOTE: deprecated. Use 'minAssGTZE()'. 6218  Designed for characteristic 0, works also in char k > 0 based 6203 NOTE:  Designed for characteristic 0, works also in char k > 0 based 6219 6204 on an algorithm of Yokoyama 6220 6205  For local orderings, the result is considered in the localization … … 6226 6211 " 6227 6212 { 6228 list result = minAssGTZ_i( int(0),I,#);6213 list result = minAssGTZ_i(0,I,#); 6229 6214 return(result); 6230 6215 } … … 6243 6228 static proc minAssGTZ_i(int patchPrimaryDecomposition, ideal i,list #) 6244 6229 { 6245 // if patchPrimaryDecomposition=1, drop the unit ideal in the decomposition, 6230 // if patchPrimaryDecomposition=1, drop the unit ideal in the decomposition, 6246 6231 // since the unit ideal it is not prime, otherwise take no special action. 6247 6232 // For other parameters see 'minAssGTZ' or 'minAssGTZE' … … 6346 6331 " 6347 6332 { 6348 return(minAssChar_i( int(1),I,#));6333 return(minAssChar_i(1,I,#)); 6349 6334 } 6350 6335 example … … 6364 6349 "USAGE: minAssChar(I[,c]); i ideal, c int (optional). 6365 6350 RETURN: list, the minimal associated prime ideals of I. If I is the unit ideal returns list( ideal(1) ) 6366 NOTE: deprecated. Use 'minAssCharE'. 6367 If c=0, the given ordering of the variables is used. @* 6351 NOTE: If c=0, the given ordering of the variables is used. @* 6368 6352 Otherwise, the system tries to find an optimal ordering, 6369 6353 which in some cases may considerably speed up the algorithm. @* … … 6375 6359 EXAMPLE: example minAssChar; shows an example 6376 6360 " 6377 { 6378 return(minAssChar_i( int(0),I,#));6361 { 6362 return(minAssChar_i(0,I,#)); 6379 6363 } 6380 6364 example … … 6390 6374 proc minAssChar_i(int patchPrimaryDecomposition, ideal i, list #) 6391 6375 { 6392 // if patchPrimaryDecomposition=1, drop the unit ideal in the decomposition, 6376 // if patchPrimaryDecomposition=1, drop the unit ideal in the decomposition, 6393 6377 // since the unit ideal it is not prime, otherwise take no special action. 6394 6378 // For other parameters see 'minAssChar' or 'minAssCharE' … … 7336 7320 " 7337 7321 { 7338 return(testPrimary_i( int(1),pr,k));7322 return(testPrimary_i(1,pr,k)); 7339 7323 } 7340 7324 example … … 7352 7336 ASSUME: pr is the result of primdecGTZ(k) or primdecSY(k). 7353 7337 RETURN: int, 1 if the intersection of the ideals in pr is k, 0 if not 7354 NOTE: deprecated. Use 'testPrimaryE()'7355 7338 EXAMPLE: example testPrimary; shows an example 7356 7339 " 7357 7340 { 7358 return(testPrimary_i( int(0),pr,k));7341 return(testPrimary_i(0,pr,k)); 7359 7342 } 7360 7343 example … … 7386 7369 } 7387 7370 ideal j=pr[1]; 7388 7371 7389 7372 7390 7373 for (i=2;i<=size(pr) div 2;i++) … … 7518 7501 static proc newDecompStepE(ideal I, list #) 7519 7502 { 7520 return(newDecompStep_i( int(1),I,#));7503 return(newDecompStep_i(1,I,#)); 7521 7504 } 7522 7505 7523 7506 static proc newDecompStep(ideal I, list #) 7524 7507 { 7525 return(newDecompStep_i( int(0),I,#));7508 return(newDecompStep_i(0,I,#)); 7526 7509 } 7527 7510 … … 7539 7522 (resp. a list of the minimal associated primes) 7540 7523 NOTE: Algorithm of Gianni/Trager/Zacharias 7541 if patchPrimaryDecomposition=1, drop the unit ideal in the decomposition, 7524 if patchPrimaryDecomposition=1, drop the unit ideal in the decomposition, 7542 7525 since the unit ideal it is not prime, otherwise take no special action. 7543 7526 EXAMPLE: example newDecompStep; shows an example … … 8735 8718 " 8736 8719 { 8737 return(minAss_i( int(1),I,#));8720 return(minAss_i(1,I,#)); 8738 8721 } 8739 8722 example … … 8753 8736 "USAGE: minAss(I[, l]); I ideal, l list (optional) of parameters, same as minAssGTZ 8754 8737 RETURN: a list, the minimal associated prime ideals of I. If I is the unit ideal, returns list(ideal(1)); 8755 NOTE: deprecated. Use 'minAssE()'. 8756 Designed for characteristic 0, works also in char k > 0 based 8738 NOTE: Designed for characteristic 0, works also in char k > 0 based 8757 8739 on an algorithm of Yokoyama 8758 8740 EXAMPLE: example minAss; shows an example 8759 8741 " 8760 8742 { 8761 return(minAss_i( int(0),I,#));8743 return(minAss_i(0,I,#)); 8762 8744 } 8763 8745 example … … 8773 8755 static proc minAss_i(int patchPrimaryDecomposition,ideal I,list #) 8774 8756 { 8775 // if patchPrimaryDecomposition=1, drop the unit ideal in the decomposition, 8757 // if patchPrimaryDecomposition=1, drop the unit ideal in the decomposition, 8776 8758 // since the unit ideal it is not prime, otherwise take no special action. 8777 8759 // For other parameters see 'minAss' or 'minAssE' … … 8868 8850 dbprint(printlevel  voice, "// We do the reduction to the zerodimensional case, via decomp."); 8869 8851 8870 primaryDec = newDecompStep_i( int(1), J, "oneIndep", "intersect", 2);8852 primaryDec = newDecompStep_i( 1, J, "oneIndep", "intersect", 2); 8871 8853 // Debug 8872 8854 dbprint(printlevel  voice, "// Proc decomp has found", size(primaryDec) div 2, "new primary components."); … … 9018 9000 if (dim(j)>0) 9019 9001 { 9020 ERROR("dim(j)>0 . Please send the failing example to the authors");9002 "// dim(j)>0 . Please send the example to the authors"; 9021 9003 primary[1]=ideal(1); 9022 9004 primary[2]=ideal(1); … … 9074 9056 if((size(ser)>0)&&(size(reduce(ser,j,1))==0)) 9075 9057 { 9076 ERROR("dim(j)==1 unexpected. Please send the failing example to the authors");9058 "// dim(j)==1 unexpected. Please send the example to the authors"; 9077 9059 primary[1]=ideal(1); 9078 9060 primary[2]=ideal(1); … … 9081 9063 if(dim(j)==1) 9082 9064 { 9083 ERROR("dim(j)==1 unexpected. Please send the failing example to the authors");9065 "// dim(j)==1 unexpected. Please send the example to the authors"; 9084 9066 primary[1]=ideal(1); 9085 9067 primary[2]=ideal(1); … … 9100 9082 else 9101 9083 { 9102 ERROR("failure in newZero_decomp. Please send the failing example to the authors");9084 "// failure in newZero_decomp. Please send the example to the authors"; 9103 9085 primary[1]=ideal(1); 9104 9086 primary[2]=ideal(1); … … 9112 9094 if(size(#)>1) 9113 9095 { 9114 ERROR("failure in newZero_decomp. Please send the failing example to the authors");9096 "// failure in newZero_decomp. Please send the example to the authors"; 9115 9097 primary[1]=ideal(1); 9116 9098 primary[2]=ideal(1); … … 9181 9163 if(size(primary[2*@k])==0) 9182 9164 { 9183 ek=insepDecomp_i( int(1), primary[2*@k1]);9165 ek=insepDecomp_i(1, primary[2*@k1]); 9184 9166 primary=delete(primary,2*@k); 9185 9167 primary=delete(primary,2*@k1);
Note: See TracChangeset
for help on using the changeset viewer.