# associatedPrimes -- find associated primes

## Synopsis

• Usage:
associatedPrimes I
ass I
• Inputs:
• I, a ring, an ideal, or , a quotient ring, ideal, or module over a (quotient of a) polynomial ring R
• Optional inputs:
• CodimensionLimit => an integer, default value infinity, stop after finding primes of codimension less than or equal to this value
• MinimalGenerators => , default value true, if false, the associated primes will not be minimalized
• Strategy => ..., default value null
• Outputs:
• a list, a list of the prime ideals in R that are associated to I

## Description

ass is an abbreviation for associatedPrimes.

This function computes the list of associated primes for a module M using Ext modules: the codimension i associated primes of M and $\mathrm{Ext}^i(M,R)$ are identical, as shown in Eisenbud-Huneke-Vasconcelos, Invent. Math. 110 (1992) 207-235.

In some cases, primaryDecomposition also computes the associated primes, in which case calling associatedPrimes requires no new computation and the list of associated primes is in the same order as the list of primary components returned by primaryDecomposition. Conversely, calling associatedPrimes beforehand will speed up the process of primaryDecomposition(Module).

 i1 : R = QQ[a..d] o1 = R o1 : PolynomialRing i2 : M = coker(transpose matrix{{1_R,1,1,1}} | diagonalMatrix vars R) o2 = cokernel | 1 a 0 0 0 | | 1 0 b 0 0 | | 1 0 0 c 0 | | 1 0 0 0 d | 4 o2 : R-module, quotient of R i3 : associatedPrimes M o3 = {ideal (b, a), ideal (c, a), ideal (c, b), ideal (d, a), ideal (d, b), ------------------------------------------------------------------------ ideal (d, c)} o3 : List

For an ideal I, associatedPrimes I is mathematically equivalent to associatedPrimes comodule I.

 i4 : I = intersect(ideal(a^2,b), ideal(a,b,c^5), ideal(b^4,c^4)) 4 4 2 4 o4 = ideal (b , b*c , a c ) o4 : Ideal of R i5 : associatedPrimes I o5 = {ideal (b, a), ideal (c, b)} o5 : List i6 : associatedPrimes comodule I o6 = {ideal (b, a), ideal (c, b)} o6 : List

For a quotient ring R, associatedPrimes R is equivalent to associatedPrimes ideal R, the associated primes of the defining ideal of R.

 i7 : R = QQ[x,y,z]/(x^2,x*y) o7 = R o7 : QuotientRing i8 : associatedPrimes R o8 = {ideal x, ideal (y, x)} o8 : List

If the ideal is , then a more efficient strategy written by Greg Smith and Serkan Hosten is used. The above comments about primary decomposition hold in this case too.

 i9 : R = QQ[a..f]; i10 : I = monomialIdeal ideal"abc,bcd,af3,a2cd,bd3d,adf,f5" 2 4 3 5 o10 = monomialIdeal (a*b*c, a c*d, b*c*d, b*d , a*d*f, a*f , f ) o10 : MonomialIdeal of R i11 : ass I o11 = {monomialIdeal (a, b, f), monomialIdeal (a, d, f), monomialIdeal (b, c, ----------------------------------------------------------------------- f), monomialIdeal (b, d, f), monomialIdeal (c, d, f), monomialIdeal (a, ----------------------------------------------------------------------- c, d, f)} o11 : List i12 : primaryDecomposition I 2 5 5 o12 = {monomialIdeal (a , b, a*f, f ), monomialIdeal (a, d, f ), ----------------------------------------------------------------------- 3 monomialIdeal (b, c, f), monomialIdeal (b, d, f ), monomialIdeal (c, ----------------------------------------------------------------------- 4 3 4 5 d , d*f, f ), monomialIdeal (a, c, d , f )} o12 : List

The list of associated primes corresponds to the list of primary components of I: the i-th associated prime is the radical of the i-th primary component.

If a value to the option CodimensionLimit is provided, then only associated primes of codimension at most this value are returned. This can save time if the big height (that is, the maximal codimension of an associated prime) is less than the projective dimension. This method stores the primes already found in a cache, and calling it with a different value of CodimensionLimit will only perform further computation if it is necessary.

There are three methods for computing associated primes in Macaulay2: If the ideal is a monomial ideal, use code that Greg Smith and Serkan Hosten wrote. If a primary decomposition has already been found, use the stashed associated primes found. If neither of these is the case, then use Ext modules to find the associated primes (this is Strategy => 1).

 i13 : S = QQ[a,b,c,d,e]; i14 : I1 = ideal(a,b,c); o14 : Ideal of S i15 : I2 = ideal(a,b,d); o15 : Ideal of S i16 : I3 = ideal(a,e); o16 : Ideal of S i17 : P = I1*I2*I3 3 2 2 2 2 2 2 o17 = ideal (a , a e, a b, a*b*e, a d, a*d*e, a b, a*b*e, a*b , b e, a*b*d, ----------------------------------------------------------------------- 2 b*d*e, a c, a*c*e, a*b*c, b*c*e, a*c*d, c*d*e) o17 : Ideal of S i18 : L1 = associatedPrimes P o18 = {ideal (e, a), ideal (c, b, a), ideal (d, b, a), ideal (d, c, b, a), ----------------------------------------------------------------------- ideal (e, c, b, a), ideal (e, d, b, a), ideal (e, d, c, b, a)} o18 : List i19 : L2 = apply(associatedPrimes monomialIdeal P, J -> ideal J) o19 = {ideal (a, e), ideal (a, b, c), ideal (a, b, d), ideal (a, b, c, d), ----------------------------------------------------------------------- ideal (a, b, c, e), ideal (a, b, d, e), ideal (a, b, c, d, e)} o19 : List i20 : M1 = set apply(L1, I -> sort flatten entries gens I) o20 = set {{c, b, a}, {d, b, a}, {d, c, b, a}, {e, a}, {e, c, b, a}, {e, d, ----------------------------------------------------------------------- b, a}, {e, d, c, b, a}} o20 : Set i21 : M2 = set apply(L2, I -> sort flatten entries gens I) o21 = set {{c, b, a}, {d, b, a}, {d, c, b, a}, {e, a}, {e, c, b, a}, {e, d, ----------------------------------------------------------------------- b, a}, {e, d, c, b, a}} o21 : Set i22 : assert(M1 === M2)

The method using Ext modules comes from Eisenbud-Huneke-Vasconcelos, Invent. Math 110 (1992) 207-235.

Original author (for ideals): C. Yackel. Updated for modules by J. Chen.