The following examples show how to compute associated primes of cellular ideals, cellular decompositions of binomial ideals and primary decompositions of binomial ideals.

For further imformation see

- David Eisenbud and Bernd Sturmfels, Binomial ideals, Duke Math. J., 84 (1996), No. 1, 1-45.
- Thomas Kahle, Decompositions of binomial ideals, Ann. Inst. Statist. Math. 62 (2010), No. 4, 727-745.
- Clara Petroll, Primary decompositions of binomial ideals, Bachelor Thesis, TU Kaiserslautern (2017).

At current state, running this notebook requires an experimental version of OSCAR.

In [1]:

```
using Oscar
```

In [2]:

```
Oscar.example("BinomIdeal2.jl")
```

In [3]:

```
Qab = QabField()
```

Out[3]:

For cellular ideals we can compute the associated primes and the minimal associated primes.

In [4]:

```
R, x = PolynomialRing(Qab, :x => 1:6)
```

Out[4]:

In [5]:

```
I = ideal([x[5]*(x[1]-x[2]),x[6]*(x[3]-x[4]),x[5]^2,x[6]^2,x[5]*x[6]])
```

Out[5]:

The ideal is {$1,2,3,4$}-cellular.

In [6]:

```
iscellular(I)
```

Out[6]:

The witness monomials of embedded associated lattices to the ideal are the following.

In [7]:

```
Cellular.witness_monomials(I)
```

Out[7]:

Now we compute the minimal associated primes, as well as the associated primes.

In [8]:

```
Cellular.minimal_associated_primes(I)
```

Out[8]:

In [9]:

```
Cellular.associated_primes(I)
```

Out[9]:

We consider a noncellular ideal in a polynomial ring with three variables.

In [10]:

```
R, (x, y, z) = PolynomialRing(Qab, ["x", "y", "z"])
```

Out[10]:

In [11]:

```
I = ideal([x-y,x^3-1,z*y^2-z])
```

Out[11]:

In fact, the ideal is noncellular, which can be verified as follows:

In [12]:

```
iscellular(I)
```

Out[12]:

The output means that the variable $z$ is a zerodivisor modulo $I$ but not nilpotent modulo $I$. Hence the ideal cannot be cellular.

We now compute the decomposition of $I$ into cellular binomial ideals.

In [13]:

```
bcd = Cellular.decomposition(I)
```

Out[13]:

The intersection is equal to the original ideal.

In [14]:

```
bcd[1] ∩ bcd[2] == I
```

Out[14]:

To compute the primary decomposition of a binomial ideal $I$, the algorithm first decomposes $I$ into cellular ideals as above and then computes for each of the cellular binomial ideals a binomial primary decomposition.

In [15]:

```
Binomial.primary_decomposition(I)[1]
```

Out[15]:

In [ ]:

```
```