Skip to content

Commit

Permalink
Katsura documentation (oscar-system#2594)
Browse files Browse the repository at this point in the history
* Fixes description of katsura example, generates katsura(n) over QQ

* adds higher level descirption of katsura-n examples in documentation
  • Loading branch information
ederc authored Jul 27, 2023
1 parent 1deabec commit 4a9b8b2
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
8 changes: 8 additions & 0 deletions docs/src/CommutativeAlgebra/ideals.md
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,14 @@ dehomogenization(F::MPolyDecRingElem, pos::Int)

## Generating Special Ideals

### 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 over the rational numbers. For a
given polynomial ring `R` with $n$ variables `katsura(R)` defines the
corresponding system with $2^{n-1}$ solutions.

```@docs
katsura(n::Int)
```
Expand Down
11 changes: 7 additions & 4 deletions src/Rings/special_ideals.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,23 @@ end
@doc raw"""
katsura(n::Int)
Given a natural number `n` return the Katsura ideal generated by
$u_m - \sum_{l=n}^n u_{l-m} u_l$, $1 - \sum_{l = -n}^n u_l$
Given a natural number `n` return the Katsura ideal over the rational numbers 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\}$.
Note that indices have been shifted to start from 1.
# Examples
```jldoctest
julia> katsura(2)
julia> I = katsura(2)
ideal(x1 + 2*x2 + 2*x3 - 1, x1^2 - x1 + 2*x2^2 + 2*x3^2, 2*x1*x2 + 2*x2*x3 - x2)
julia> base_ring(I)
Multivariate polynomial ring in 3 variables x1, x2, x3
over rational field
```
"""
function katsura(n::Int)
R, _ = polynomial_ring(ZZ, n + 1)
R, _ = polynomial_ring(QQ, n + 1)
return katsura(R)
end

Expand Down

0 comments on commit 4a9b8b2

Please sign in to comment.