Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More references, tests, small things #387

Merged
merged 2 commits into from
Mar 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 84 additions & 0 deletions docs/oscar_references.bib
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,87 @@ @book{DP13
year={2013},
collection={AIMS Library of Mathematical Sciences}
}

@InProceedings{KL91,
author="Krick, Teresa
and Logar, Alessandro",
editor="Mattson, Harold F.
and Mora, Teo
and Rao, T. R. N.",
title="An algorithm for the computation of the radical of an ideal in the ring of polynomials",
booktitle="Applied Algebra, Algebraic Algorithms and Error-Correcting Codes",
year="1991",
publisher="Springer Berlin Heidelberg",
address="Berlin, Heidelberg",
pages="195--205",
isbn="978-3-540-38436-6"
}

@article{Kem02,
title = {The Calculation of Radical Ideals in Positive Characteristic},
journal = {Journal of Symbolic Computation},
volume = {34},
number = {3},
pages = {229-238},
year = {2002},
issn = {0747-7171},
doi = {https://doi.org/10.1006/jsco.2002.0560},
url = {https://www.sciencedirect.com/science/article/pii/S0747717102905602},
author = {Gregor Kemper},
abstract = {We propose an algorithm for computing the radical of a polynomial ideal in positive characteristic. The algorithm does not involve polynomial factorization.}
}

@article{PSS11,
author = {Gerhard Pfister and Afshan Sadiq and Stefan Steidel},
doi = {doi:10.2478/s11533-011-0037-8},
url = {https://doi.org/10.2478/s11533-011-0037-8},
title = {An algorithm for primary decomposition in polynomial rings over the integers},
journal = {Open Mathematics},
number = {4},
volume = {9},
year = {2011},
pages = {897--904}
}

@article{GTZ88,
title = {Gröbner bases and primary decomposition of polynomial ideals},
journal = {Journal of Symbolic Computation},
volume = {6},
number = {2},
pages = {149-167},
year = {1988},
issn = {0747-7171},
doi = {https://doi.org/10.1016/S0747-7171(88)80040-3},
url = {https://www.sciencedirect.com/science/article/pii/S0747717188800403},
author = {Patrizia Gianni and Barry Trager and Gail Zacharias},
abstract = {We present an algorithm to compute the primary decomposition of any ideal in a polynomialring over a factorially closed algorithmic principal ideal domain R. This means that the ring R is a constructive PID and that we are given an algorithm to factor polynomials over fields which are finitely generated over R or residue fields of R. We show how basic ideal theoretic operations can be performed using Gröbner bases and we exploit these constructions to inductively reduce the problem to zero dimensional ideals. Here we again exploit the structure of Gröbner bases to directly compute the primary decomposition using polynomial factorization. We also show how the reduction process can be applied to computing radicals and testing ideals for primality.}
}

@article{SY96,
title = {Localization and Primary Decomposition of Polynomial Ideals},
journal = {Journal of Symbolic Computation},
volume = {22},
number = {3},
pages = {247-277},
year = {1996},
issn = {0747-7171},
doi = {https://doi.org/10.1006/jsco.1996.0052},
url = {https://www.sciencedirect.com/science/article/pii/S0747717196900528},
author = {Takeshi Shimoyama and Kazuhiro Yokoyama},
abstract = {In this paper, we propose a new method for primary decomposition of a polynomial ideal, not necessarily zero-dimensional, and report on a detailed study for its practical implementation. In our method, we introduce two key techniques,effective localizationandfast elimination of redundant components, by which we can get a good performance for several examples. The performance of our method is examined by comparison with other existing methods based on practical experiments.}
}

@article{EHV92,
author = {David Eisenbud and Craig Huneke and Wolmer Vasconcelos},
title = {Direct methods for primary decomposition},
journal = {Inventiones Mathematicae},
issn = {0020-9910; 1432-1297/e},
volume = {110},
number = {2},
pages = {207--235},
year = {1992},
publisher = {Springer, Berlin/Heidelberg},
language = {English},
MSC2010 = {13P10 13A05 13A15 13F20 13A10},
Zbl = {0770.13018}
}
24 changes: 4 additions & 20 deletions docs/src/CommutativeAlgebra/ca_affine_algebras.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,16 @@ polynomial ring $R$ over $K$ modulo an ideal $I$ of $A$.
```@docs
quo(R::MPolyRing, I::MPolyIdeal)
```
###### Example

```@repl oscar
R, (x, y) = PolynomialRing(QQ, ["x", "y"])
A, _ = quo(R, ideal(R, [x^2-y^3, x-y]))
A, f = quo(R, ideal(R, [x^2-y^3, x-y]))
f
```

## Data Associated to Affine Algebras

### Basic Data

If `A = R/I` is an affine algebra, then
- base_ring(A) refers to R,
- modulus(A) to I,
- gens(A) to the generators of A, and
- ngens(A) to the number of these generators.
- `base_ring(A)` refers to `R`,
- `modulus(A)` to `I`,
- `gens(A)` to the generators of `A`, and
- `ngens(A)` to the number of these generators.

```@repl oscar
R, (x, y, z) = PolynomialRing(QQ, ["x", "y", "z"])
Expand All @@ -54,14 +46,6 @@ ngens(A)
dim(A::MPolyQuo)
```

###### Example

```@repl oscar
R, (x, y, z) = PolynomialRing(QQ, ["x", "y", "z"])
A, _ = quo(R, ideal(R, [y-x^2, x-z^3]))
dim(A)
```

## Hilbert Series and Hilbert Polynomial

Let $R=K[x_1, \dots x_n]$ be a polynomial ring in $n$ variables over a field $K$.
Expand Down
16 changes: 3 additions & 13 deletions docs/src/CommutativeAlgebra/ca_ideals.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ ideal(Rx::MPolyRing, g::Array{<:Any, 1})

## Gröbner Bases

### Monomial Orders
### Monomial Orderings

### Normal Forms

Expand Down Expand Up @@ -102,16 +102,6 @@ dim(I::MPolyIdeal)
codim(I::MPolyIdeal)
```

## Hilbert Function and Hilbert Series

min_base(I) (or so)

degree: degree(I) (type integer)
Hilbert function: hilbert_function(d,I) (type integer)
Hilbert series: hilbert_series(I) (type univariate rational function) numerator, denominator
reduced Hilbert series: reduced_Hilbert_series(I) (type univariate rational function)
Hilbert polynomial: hilbert_polynomial(I) (type univariate polynomial, direkt in Julia von hilbert_series(I))

## Operations on Ideals

### Simple ideal Operations
Expand Down Expand Up @@ -162,11 +152,11 @@ saturation(I::MPolyIdeal, J::MPolyIdeal)
### Elimination

```@docs
eliminate(I::MPolyIdeal, polys::Array{MPolyElem, 1})
eliminate(I::MPolyIdeal, lv::Array{MPolyElem, 1})
```

```@docs
eliminate(I::MPolyIdeal, polys::AbstractArray{Int, 1})
eliminate(I::MPolyIdeal, li::AbstractArray{Int, 1})
```

### Homogenization and Dehomogenization
Expand Down
19 changes: 19 additions & 0 deletions src/Rings/MPolyQuo.jl
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,25 @@ end

Creates the affine ring ``R/I`` and returns the new
ring as well as the projection map $R\rightarrow R/I$.
###### Example
```jldoctest
julia> R, (x, y) = PolynomialRing(QQ, ["x", "y"])
(Multivariate Polynomial Ring in x, y over Rational Field, fmpq_mpoly[x, y])

julia> A, _ = quo(R, ideal(R, [x^2-y^3, x-y]))
(Quotient of Multivariate Polynomial Ring in x, y over Rational Field by ideal generated by: x^2 - y^3, x - y, Map from
Multivariate Polynomial Ring in x, y over Rational Field to Quotient of Multivariate Polynomial Ring in x, y over Rational Field by ideal generated by: x^2 - y^3, x - y defined by a julia-function with inverse
)

julia> A, f = quo(R, ideal(R, [x^2-y^3, x-y]))
(Quotient of Multivariate Polynomial Ring in x, y over Rational Field by ideal generated by: x^2 - y^3, x - y, Map from
Multivariate Polynomial Ring in x, y over Rational Field to Quotient of Multivariate Polynomial Ring in x, y over Rational Field by ideal generated by: x^2 - y^3, x - y defined by a julia-function with inverse
)

julia> f
Map from
Multivariate Polynomial Ring in x, y over Rational Field to Quotient of Multivariate Polynomial Ring in x, y over Rational Field by ideal generated by: x^2 - y^3, x - y defined by a julia-function with inverse
```
"""
function quo(R::MPolyRing, I::MPolyIdeal)
q = MPolyQuo(R, I)
Expand Down
13 changes: 13 additions & 0 deletions src/Rings/mpoly-affine-algebras.jl
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,19 @@ export issurjective, isinjective, isbijective, inverse, preimage, isfinite
dim(A::MPolyQuo)

Return the dimension of `A`.
###### Example
```jldoctest
julia> R, (x, y, z) = PolynomialRing(QQ, ["x", "y", "z"])
(Multivariate Polynomial Ring in x, y, z over Rational Field, fmpq_mpoly[x, y, z])

julia> A, _ = quo(R, ideal(R, [y-x^2, x-z^3]))
(Quotient of Multivariate Polynomial Ring in x, y, z over Rational Field by ideal generated by: -x^2 + y, x - z^3, Map from
Multivariate Polynomial Ring in x, y, z over Rational Field to Quotient of Multivariate Polynomial Ring in x, y, z over Rational Field by ideal generated by: -x^2 + y, x - z^3 defined by a julia-function with inverse
)

julia> dim(A)
1
```
"""
function dim(A::MPolyQuo)
I = A.I
Expand Down
36 changes: 28 additions & 8 deletions src/Rings/mpoly-ideals.jl
Original file line number Diff line number Diff line change
Expand Up @@ -204,10 +204,27 @@ function saturation(I::MPolyIdeal, J::MPolyIdeal)
return MPolyIdeal(I.gens.Ox, Singular.saturation(I.gens.S, J.gens.S))
end
#######################################################
#=
FOR LATER USE
function saturation(I::MPolyIdeal, J::MPolyIdeal)
singular_assure(I)
singular_assure(J)
K, _ = Singular.saturation(I.gens.S, J.gens.S)
return MPolyIdeal(I.gens.Ox, K)
end
function saturation_with_index(I::MPolyIdeal, J::MPolyIdeal)
singular_assure(I)
singular_assure(J)
K, k = Singular.saturation(I.gens.S, J.gens.S)
return (MPolyIdeal(I.gens.Ox, K), k)
end
=#
#######################################################


# elimination #######################################################
@doc Markdown.doc"""
eliminate(I::MPolyIdeal, polys::Array{MPolyElem, 1})
eliminate(I::MPolyIdeal, l::Array{MPolyElem, 1})

Given a list of polynomials which are variables, these variables are eliminated from `I`.

Expand Down Expand Up @@ -237,7 +254,7 @@ function eliminate(I::MPolyIdeal, l::Array{<:MPolyElem, 1})
end

@doc Markdown.doc"""
eliminate(I::MPolyIdeal, polys::AbstractArray{Int, 1})
eliminate(I::MPolyIdeal, l::AbstractArray{Int, 1})

Given a list of indices which specify variables, these variables are eliminated from `I`.

Expand Down Expand Up @@ -282,7 +299,8 @@ If the base ring of `I` is a polynomial
ring over a field, a combination of the algorithms of Krick and Logar
(with modifications by Laplagne) and Kemper is used. For polynomial
rings over the integers, the algorithm proceeds as suggested by
Pfister, Sadiq, and Steidel.
Pfister, Sadiq, and Steidel. See [KL91](@cite),
[Kem02](@cite), and [PSS11](@cite).
###### Examples
```jldoctest
julia> R, (x, y) = PolynomialRing(QQ, ["x", "y"])
Expand Down Expand Up @@ -343,7 +361,7 @@ Return a primary decomposition of `I`. If `I` is the unit ideal, return `[ideal(
If the base ring of `I` is a polynomial ring over a field, the algorithm of Gianni, Trager and Zacharias
is used by default. Alternatively, the algorithm by Shimoyama and Yokoyama can be used by specifying
`alg=:SY`. For polynomial rings over the integers, the algorithm proceeds as suggested by
Pfister, Sadiq, and Steidel.
Pfister, Sadiq, and Steidel. See [GTZ88](@cite), [SY96](@cite), and [PSS11](@cite).
###### Examples
```jldoctest
julia> R, (x, y) = PolynomialRing(QQ, ["x", "y"])
Expand Down Expand Up @@ -422,6 +440,7 @@ If the base ring of `I` is a polynomial ring over a field, the algorithm of
Gianni-Trager-Zacharias is used by default and characteristic sets may be
used by specifying `alg=:charSets`. For polynomial rings over the integers,
the algorithm proceeds as suggested by Pfister, Sadiq, and Steidel.
See [GTZ88](@cite) and [PSS11](@cite).
###### Examples
```jldoctest
julia> R, (x, y) = PolynomialRing(QQ, ["x", "y"])
Expand Down Expand Up @@ -495,7 +514,7 @@ primes of `I` of that dimension. If `I` is the unit ideal, return `[ideal(1)]`.

# Implemented Algorithms

The implementation relies on ideas of Eisenbud, Huneke, and Vasconcelos.
The implementation relies on ideas of Eisenbud, Huneke, and Vasconcelos. See [EHV92](@cite).
###### Example
```jldoctest
julia> R, (x, y) = PolynomialRing(QQ, ["x", "y"])
Expand Down Expand Up @@ -529,7 +548,7 @@ of `I` of that dimension. If `I` is the unit ideal, return `[ideal(1)]`.

# Implemented Algorithms

The implementation combines the algorithms of Krick and Logar (with modifications by Laplagne) and Kemper.
The implementation combines the algorithms of Krick and Logar (with modifications by Laplagne) and Kemper. See [KL91](@cite) and [Kem02](@cite).
###### Example
```jldoctest
julia> R, (x, y) = PolynomialRing(QQ, ["x", "y"])
Expand Down Expand Up @@ -566,7 +585,8 @@ minimal height. If `I` is the unit ideal, return `[ideal(1)]`.

For polynomial rings over a field, the implementation relies on ideas as used by
Gianni, Trager, and Zacharias or Krick and Logar. For polynomial rings over the integers,
the algorithm proceeds as suggested by Pfister, Sadiq, and Steidel.
the algorithm proceeds as suggested by Pfister, Sadiq, and Steidel. See [GTZ88](@cite),
[KL91](@cite), and [PSS11](@cite).
###### Examples
```jldoctest
julia> R, (x, y) = PolynomialRing(QQ, ["x", "y"])
Expand Down Expand Up @@ -619,7 +639,7 @@ If `I` is the unit ideal, return `[ideal(1)]`.
# Implemented Algorithms

The implementation relies on a combination of the algorithms of Krick and Logar
(with modifications by Laplagne) and Kemper.
(with modifications by Laplagne) and Kemper. See [KL91](@cite) and [Kem02](@cite).
###### Example
```jldoctest
julia> R, (x, y) = PolynomialRing(QQ, ["x", "y"])
Expand Down