# Primary Decomposition of ideals in polynomial rings over the integers

This page describes the Magma implementation of the Pfister-Sadiq-Steidel algorithm to compute the primary decomposition of an ideal defined over the integers (see ).

A Magma implementation is available here: primdecz.tgz.

To use the algorithm, after starting magma, type

```> Attach("primdecz.magma");
```

## Basic usage

The main method is PrimaryDecompositionZ, which takes an ideal I defined over the integers, and returns two lists. The first list contains the primary ideals of I, and the second list contains the associated prime ideals. The computed primary decomposition is irredundant, so no primary ideal contains the intersection of all other primary ideals.

```> R< x,y,z,s,l,h > := PolynomialRing(Integers(), 6, "grevlex");
> I := ideal< R | h*l-l^2-4*l*s+h*y, h^2*s-6*l*s^3+h^2*z, x*h^2-l^2*s-h^3, 3*5*y >;
> time QQ, PP := PrimaryDecompositionZ(I);
Time: 4.960
>
> #QQ;
11
>
> QQ, PP;
Ideal of Polynomial ring of rank 6 over Integer Ring
Variables: x, y, z, s, l, h
Homogeneous
Basis:
[
h^2,
y,
l
]
Ideal of Polynomial ring of rank 6 over Integer Ring
Variables: x, y, z, s, l, h
Homogeneous
Basis:
[
y,
l,
h
]
>
> QQ, PP;
Ideal of Polynomial ring of rank 6 over Integer Ring
Variables: x, y, z, s, l, h
Inhomogeneous, Dimension >0
Groebner basis:
[
s^6,
y*s^2*h + z*h^2,
s^3*h,
l^3 + 4*y*l*h + 4*x*h^2 + 4*y*h^2,
l^2*h + 4*y*h^2,
s*h^2,
l*h^2,
h^3,
s*l + 4*l^2 + y*h + l*h,
5
]
Ideal of Polynomial ring of rank 6 over Integer Ring
Variables: x, y, z, s, l, h
Homogeneous, Dimension >0
Groebner basis:
[
s,
l,
h,
5
]
```

## Verbose printing

Use SetVerbose("PrimaryDecompositionZ", d) to set the verbose printing for PrimaryDecompositionZ, where d is a value between 0 and 3.

## References

  Gerhard Pfister, Afshan Sadiq, Stefan Steidel An algorithm for primary decomposition in polynomial rings over the integers Cent. Eur. J. Math., 9 (2011), no. 4, 897-904.