next | previous | forward | backward | up | top | index | toc | Macaulay2 web site
PrimaryDecomposition > primaryDecomposition

primaryDecomposition -- irredundant primary decomposition of an ideal

Synopsis

Description

This routine returns an irredundant primary decomposition for the ideal I. The specific algorithm used varies depending on the characteristics of the ideal, and can also be specified using the optional argument Strategy. In all cases, the radical of each entry of the output is equal to the corresponding entry of the output of associatedPrimes.

Primary decompositions algorithms are very sensitive to their input. Some algorithms work very well on certain classes of ideals, but poorly on other classes. If this function seems to be taking too long, try another algorithm (using primaryDecomposition(..., Strategy => ...)).

i1 : R = QQ[a..i];
i2 : I = permanents(2,genericMatrix(R,a,3,3))

o2 = ideal (b*d + a*e, c*d + a*f, c*e + b*f, b*g + a*h, c*g + a*i, c*h + b*i,
     ------------------------------------------------------------------------
     e*g + d*h, f*g + d*i, f*h + e*i)

o2 : Ideal of R
i3 : C = primaryDecomposition I;
i4 : I == intersect C

o4 = true
i5 : #C

o5 = 16

Recall that List / Function (missing documentation) applies a function to each element of a list, returning the results as a list. This is often useful with lists of ideals, such as the list C of primary components.

i6 : C/toString/print;
ideal(i,h,g,f,c,b*d+a*e)
ideal(i,h,g,c,b,a)
ideal(i,h,g,e,b,c*d+a*f)
ideal(h,e,c,b,a,f*g+d*i)
ideal(h,g,e,d,b,a)
ideal(f,e,d,c,b,a)
ideal(i,h,f,e,c,b)
ideal(h,f,e,d,b,c*g+a*i)
ideal(g,d,c,b,a,f*h+e*i)
ideal(i,f,c,b,a,e*g+d*h)
ideal(i,h,g,f,e,d)
ideal(g,f,e,d,a,c*h+b*i)
ideal(i,f,e,d,c,b*g+a*h)
ideal(i,h,g,d,a,c*e+b*f)
ideal(i,g,f,d,c,a)
ideal(i^2,f*h+e*i,c*h+b*i,f*g+d*i,e*g+d*h,c*g+a*i,b*g+a*h,c*e+b*f,c*d+a*f,b*d+a*e,h^2*i,g*h*i,g^2*i,f^2*i,c*f*i,e^2*i,d^2*i,c^2*i,b^2*i,a^2*i,h^3,g*h^2,e^2*h,d*e*h,b*e*h,b^2*h,a*b*h,g^3,d^2*g,a*d*g,a^2*g,f^3,e^2*f,d*e*f,d^2*f,c^2*f,b^2*f,a^2*f,e^3,d*e^2,a*e^2,d^3,c^3,b^2*c,a*b*c,a^2*c,b^3,a*b^2,a^3,b^2*e^2,a^2*d^2)
i7 : C/codim

o7 = {6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 9}

o7 : List
i8 : C/degree

o8 = {2, 1, 2, 2, 1, 1, 1, 2, 2, 2, 1, 2, 2, 2, 1, 86}

o8 : List

The corresponding list of associated prime ideals is cached in I.cache#"AssociatedPrimes", and can be obtained by using associatedPrimes(Ideal).

i9 : associatedPrimes I / print;
ideal (i, h, g, f, c, b*d + a*e)
ideal (i, h, g, c, b, a)
ideal (i, h, g, e, b, c*d + a*f)
ideal (h, e, c, b, a, f*g + d*i)
ideal (h, g, e, d, b, a)
ideal (f, e, d, c, b, a)
ideal (i, h, f, e, c, b)
ideal (h, f, e, d, b, c*g + a*i)
ideal (g, d, c, b, a, f*h + e*i)
ideal (i, f, c, b, a, e*g + d*h)
ideal (i, h, g, f, e, d)
ideal (g, f, e, d, a, c*h + b*i)
ideal (i, f, e, d, c, b*g + a*h)
ideal (i, h, g, d, a, c*e + b*f)
ideal (i, g, f, d, c, a)
ideal (i, h, g, f, e, d, c, b, a)

Caveat

The ground ring must be a prime field.

See also

Ways to use primaryDecomposition :