# Computing symbolic powers of an ideal

Given an ideal, symbolicPower computes a given symbolic power.

 i1 : B = QQ[x,y,z]; i2 : I = ideal(x*(y^3-z^3),y*(z^3-y^3),z*(x^3-y^3)); o2 : Ideal of B i3 : J = symbolicPower(I,3) 3 6 9 3 3 4 6 4 3 7 3 7 6 3 2 9 2 6 5 o3 = ideal (x y z - y z - 2x y z + 2y z + x z - y z , x y z - y z - x z ------------------------------------------------------------------------ 3 3 5 6 5 3 8 3 8 9 3 9 3 6 6 6 6 3 9 - 2x y z + 3y z + 2x z - 2y z , x z - y z - 3x z + 3y z + 3x z - ------------------------------------------------------------------------ 3 9 12 9 3 6 6 3 9 11 8 3 5 6 2 9 3y z , y - 3y z + 3y z - y z , x*y - 3x*y z + 3x*y z - x*y z , ------------------------------------------------------------------------ 2 10 2 7 3 2 4 6 2 9 3 9 9 3 3 3 6 6 6 x y - 3x y z + 3x y z - x y*z , x y - 3y z - 3x y z + 6y z + ------------------------------------------------------------------------ 3 9 3 9 2x z - 3y z ) o3 : Ideal of B

Various algorithms are used, in the following order:

1. If $I$ is squarefree monomial ideal, intersects the powers of the associated primes of $I$;

2. If $I$ is monomial ideal, but not squarefree, takes an irredundant primary decomposition of $I$ and intersects the powers of those ideals;

3. If $I$ is a saturated homogeneous ideal in a polynomial ring whose height is one less than the dimension of the ring, returns the saturation of $I^n$;

4. If all the associated primes of $I$ have the same height, computes a primary decomposition of $I^n$ and intersects the components with radical $I$;

5. If all else fails, compares the radicals of a primary decomposition of $I^n$ with the associated primes of $I$, and intersects the components corresponding to minimal primes.