# Examples

Here we include some well-known example multivariate polynomial systems.

## Katsura-n

These systems appeared in a problem of magnetism in physics. For a given $n$ `katsura(n)`

has $2^n$ solutions and is defined in a polynomial ring with $n+1$ variables. For a given polynomial ring `R`

with $n$ variables `katsura(R)`

defines the corresponding system with $2^{n-1}$ solutions.

### Functionality

`AlgebraicSolving.katsura`

— Method`katsura(n::Int)`

Given a natural number `n`

returns the Katsura ideal generated by $u_m - \sum_{l=n}^n u_{l-m} u_l$, $1 - \sum_{l = -n}^n u_l$ where $u_{-i} = u_i$, and $u_i = 0$ for $i > n$ and $m \in \{-n, \ldots, n\}$. Also note that indices have been shifted to start from 1.

**Example**

```
julia> using AlgebraicSolving
julia> katsura(2)
QQMPolyRingElem[x1 + 2*x2 + 2*x3 - 1, x1^2 + 2*x2^2 + 2*x3^2 - x1, 2*x1*x2 + 2*x2*x3 - x2]
```

`AlgebraicSolving.katsura`

— Method`katsura(R::MPolyRing)`

Returns the Katsura ideal in the given polynomial ring `R`

.

**Example**

```
julia> using AlgebraicSolving
julia> R, _ = QQ["x", "y", "z"]
(Multivariate polynomial ring in 3 variables over QQ, QQMPolyRingElem[x, y, z])
julia> katsura(R)
QQMPolyRingElem[x + 2*y + 2*z - 1, x^2 - x + 2*y^2 + 2*z^2, 2*x*y + 2*y*z - y]
```