Ideals

Ideals

Singular.jl allows the creation of ideals over a Singular polynomial ring. These are internally stored as a list of (polynomial) generators. This list of generators can also have the property of being a Groebner basis.

The default ideal type in Singular.jl is the Singular sideal type.

Ideals objects have a parent object which represents the set of ideals they belong to, the data for which is given by the polynomial ring their generators belong to.

The types of ideals and associated parent objects are given in the following table according to the library provding them.

LibraryElement typeParent type
Singularsideal{T}Singular.IdealSet{T}

These types are parameterised by the type of elements of the polynomial ring over which the ideals are defined.

All ideal types belong directly to the abstract type Module{T} and all the ideal set parent object types belong to the abstract type Set.

Ideal functionality

Singular.jl ideals implement standard operations one would expect on modules. These include:

Also implements is the following operations one expects for ideals:

Below, we describe all of the functionality for Singular.jl ideals that is not included in this list of basic operations.

Constructors

Given a Singular polynomial ring $R$, the following constructors are available for creating ideals.

Ideal(R::PolyRing{T}, ids::spoly{T}...) where T <: Nemo.RingElem
Ideal(R::PolyRing{T}, ids::Array{spoly{T}, 1}) where T <: Nemo.RingElem

Construct the ideal over the polynomial ring $R$ whose (polynomial) generators are given by the given parameter list or array of polynomials, respectively. The list may be empty, resulting in the zero ideal.

Examples

R, (x, y) = PolynomialRing(ZZ, ["x", "y"])

I1 = Ideal(R, x*y + 1, x^2)
I2 = Ideal(R, [x*y + 1, x^2])

Basic manipulation

Singular.ngensMethod.
ngens(I::sideal)

Return the number of generators in the internal representation of the ideal $I$.

source

Singular.jl overloads the setindex! and getindex functions so that one can access the generators of an ideal using array notation.

I[n::Int]
Base.iszeroMethod.
iszero(I::sideal)

Return true if the given ideal is algebraically the zero ideal.

source
Singular.iszerodimMethod.
iszerodim(I::sideal)

Return true if the given ideal is zero dimensional, i.e. the Krull dimension of $R/I$ is zero, where $R$ is the polynomial ring over which $I$ is an ideal..

source
isconstant(I::sideal)

Return true if the given ideal is a constant ideal, i.e. generated by constants in the polynomial ring over which it is an ideal.

source
isvar_generated(I::sideal)

Return true if each generator in the representation of the ideal $I$ is a generator of the polynomial ring, i.e. a variable.

source
normalize!(I::sideal)

Normalize the polynomial generators of the ideal $I$ in-place. This means to reduce their coefficients to lowest terms. In most cases this does nothing, but if the coefficient ring were the rational numbers for example, the coefficients of the polynomials would be reduced to lowest terms.

source

Examples

R, (x, y) = PolynomialRing(ZZ, ["x", "y"])

I = Ideal(R, x^2 + 1, x*y)

n = ngens(I)
p = I[1]
I[1] = 2x + y^2
isconstant(I) == false
isvar_generated(I) == false
iszerodim(I) == false

Containment

Base.containsMethod.
contains{T <: AbstractAlgebra.RingElem}(I::sideal{T}, J::sideal{T})

Returns true if the ideal $I$ contains the ideal $J$. This will be expensive if $I$ is not a Groebner ideal, since its standard basis must be computed.

source

Examples

R, (x , y) = PolynomialRing(QQ, ["x", "y"])

I = Ideal(R, x^2 + 1, x*y)
J = Ideal(R, x^2 + 1)

contains(I, J) == true

Comparison

Checking whether two ideals are algebraically equal is very expensive, as it usually requires computing Groebner bases. Therefore we do not overload the == operator for ideals. Instead we have the following two functions.

Base.isequalMethod.
isequal{T <: AbstractAlgebra.RingElem}(I1::sideal{T}, I2::sideal{T})

Return true if the given ideals have the same generators in the same order. Note that two algebraically equal ideals with different generators will return false.

source
Singular.equalMethod.
equal(I1::sideal{T}, I2::sideal{T}) where T <: AbstractAlgebra.RingElem

Return true if the two ideals are contained in each other, i.e. are the same ideal mathematically. This function should be called only as a last resort; it is exceptionally expensive to test equality of ideals! Do not define == as an alias for this function!

source

Examples

R, (x , y) = PolynomialRing(QQ, ["x", "y"])

I = Ideal(R, x^2 + 1, x*y)
J = Ideal(R, x^2 + x*y + 1, x^2 - x*y + 1)

isequal(I, J) == false
equal(I, J) == true

Intersection

intersection{T <: Nemo.RingElem}(I::sideal{T}, J::sideal{T})

Returns the intersection of the two given ideals.

source

Examples

R, (x , y) = PolynomialRing(QQ, ["x", "y"])

I = Ideal(R, x^2 + 1, x*y)
J = Ideal(R, x^2 + x*y + 1, x^2 - x*y + 1)

V = intersection(I, J)

Quotient

Singular.quotientMethod.
quotient{T <: Nemo.RingElem}(I::sideal{T}, J::sideal{T})

Returns the quotient of the two given ideals. Recall that the ideal quotient $(I:J)$ over a polynomial ring $R$ is defined by $\{r \in R \;|\; rJ \subseteq I\}$.

source

Examples

R, (x , y) = PolynomialRing(QQ, ["x", "y"])

I = Ideal(R, x^2 + 1, x*y)
J = Ideal(R, x + y)

V = quotient(I, J)

Leading terms

lead(I::sideal)

Return the ideal generated by the leading terms of the polynomials generating $I$.

source

Examples

R, (x , y) = PolynomialRing(QQ, ["x", "y"])

I = Ideal(R, x^2 + 1, x*y)

V = lead(I)

Saturation

saturation{T <: Nemo.RingElem}(I::sideal{T}, J::sideal{T})

Returns the saturation of the ideal $I$ with respect to $J$, i.e. returns the quotient ideal $(I:J^\infty)$.

source

Examples

R, (x, y) = PolynomialRing(QQ, ["x", "y"])

I = Ideal(R, (x^2 + x*y + 1)*(2y^2+1)^3, (2y^2 + 3)*(2y^2+1)^2)
J = Ideal(R, 2y^2 + 1)

S = saturation(I, J)

Standard basis

Base.stdMethod.
std(I::sideal; complete_reduction::Bool=false)

Compute a Groebner basis for the ideal $I$. Note that without complete_reduction set to true, the generators of the Groebner basis only have unique leading terms (up to permutation and multiplication by constants). If complete_reduction is set to true (and the ordering is a global ordering) then the Groebner basis is unique.

source
Singular.satstdMethod.

satstd{T <: AbstractAlgebra.RingElem}(I::sideal{T}, J::sideal{T})

Given an ideal $J$ generated by variables, computes a standard basis of saturation(I, J). This is accomplished by dividing polynomials that occur throughout the std computation by variables occuring in $J$, where possible. Thus the result can be obtained faster than by first computing the saturation and then the standard basis.

source

Examples

R, (x, y) = PolynomialRing(QQ, ["x", "y"])

I = Ideal(R, x^2 + x*y + 1, 2y^2 + 3)
J = Ideal(R, 2*y^2 + 3, x^2 + x*y + 1)

A = std(I)

R, (x, y) = PolynomialRing(QQ, ["x", "y"])

I = Ideal(R, (x*y + 1)*(2x^2*y^2 + x*y - 2) + 2x*y^2 + x, 2x*y + 1)
J = Ideal(R, x)

B = satstd(I, J)

Reduction

Base.reduceMethod.

reduce(I::sideal, G::sideal)

Return an ideal whose generators are the generators of $I$ reduced by the ideal $G$. The ideal $G$ is required to be a Groebner basis. The returned ideal will have the same number of generators as $I$, even if they are zero.

source
Base.reduceMethod.
reduce(p::spoly, G::sideal)

Return the polynomial which is $p$ reduced by the polynomials generating $G$. It is assumed that $G$ is a Groebner basis.

source

Examples

R, (x, y) = PolynomialRing(QQ, ["x", "y"])

f = x^2*y + 2y + 1
g = y^2 + 1

I = Ideal(R, (x^2 + 1)*f + (x + y)*g + x + 1, (2y^2 + x)*f + y)
J = std(Ideal(R, f, g))

V = reduce(I, J)

h1 = (x^2 + 1)*f + (x + y)*g + x + 1

h2 = reduce(h1, J)

Elimination

Singular.eliminateMethod.
eliminate(I::sideal, polys::spoly...)

Given a list of polynomials which are variables, construct the ideal corresponding geometrically to the projection of the variety given by the ideal $I$ where those variables have been eliminated.

source

Examples

R, (x, y, t) = PolynomialRing(QQ, ["x", "y", "t"])

I = Ideal(R, x - t^2, y - t^3)

J = eliminate(I, t)

Syzygies

Singular.syzMethod.
syz(I::sideal)

Compute the module of syzygies of the ideal.

source

Examples

R, (x, y) = PolynomialRing(QQ, ["x", "y"])

I = Ideal(R, x^2*y + 2y + 1, y^2 + 1)

F = syz(I)

M = Singular.Matrix(I)
N = Singular.Matrix(F)

# check they are actually syzygies
iszero(M*N)

Free resolutions

Singular.fresMethod.
 fres{T <: Nemo.RingElem}(id::sideal{T}, max_length::Int,
  method::String="complete")

Compute a free resolution of the given ideal up to the maximum given length. The ideal must be over a polynomial ring over a field, and a Groebner basis. The possible methods are "complete", "frame", "extended frame" and "single module". The result is given as a resolution, whose i-th entry is the syzygy module of the previous module, starting with the given ideal. The max_length can be set to $0$ if the full free resolution is required.

source
Singular.sresMethod.
 sres{T <: Nemo.RingElem}(id::sideal{T}, max_length::Int)

Compute a (free) Schreyer resolution of the given ideal up to the maximum given length. The ideal must be over a polynomial ring over a field, and a Groebner basis. The result is given as a resolution, whose i-th entry is the syzygy module of the previous module, starting with the given ideal. The max_length can be set to $0$ if the full free resolution is required.

source

Examples

R, (x, y) = PolynomialRing(QQ, ["x", "y"])

I = Ideal(R, x^2*y + 2y + 1, y^2 + 1)

F1 = fres(std(I), 0)
F2 = sres(std(I), 2)