diff --git a/dev/.documenter-siteinfo.json b/dev/.documenter-siteinfo.json index a77c1c588..1060a6f83 100644 --- a/dev/.documenter-siteinfo.json +++ b/dev/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.10.4","generation_timestamp":"2024-07-02T13:40:35","documenter_version":"1.5.0"}} \ No newline at end of file +{"documenter":{"julia_version":"1.10.4","generation_timestamp":"2024-07-19T13:14:08","documenter_version":"1.5.0"}} \ No newline at end of file diff --git a/dev/GF/index.html b/dev/GF/index.html index 7471769cf..2a80a81ea 100644 --- a/dev/GF/index.html +++ b/dev/GF/index.html @@ -1,5 +1,5 @@ -Finite fields · Singular.jl

Finite fields

Finite fields are implemented via the Singular n_GF type for any characteristic and degree contained in the Singular Conway tables.

The associated finite field is represented by a parent object which can be constructed by a call to the FiniteField constructor.

The types of the parent objects and elements of the associated finite fields are given in the following table according to the library providing them.

LibraryElement typeParent type
Singularn_GFSingular.N_GField

All finite field element types belong directly to the abstract type FieldElem and all the parent object types belong to the abstract type Field.

Finite field functionality

Singular.jl finite fields implement the Field interface of AbstractAlgebra.jl.

https://nemocas.github.io/AbstractAlgebra.jl/fields.html

Below, we describe the functionality that is specific to Singular finite field and not already listed at the given link.

Constructors

The following constructors are available to create finite fields and their elements.

Singular.FiniteFieldMethod
FiniteField(p::Int, n::Int, S::VarName; cached=true)

Return a tuple K, a consisting of a finite field K of characteristic $p$ and degree $n$, and its generator a. The string used to print the generator is given by S. If the finite field is not listed in the Conway tables included in Singular, an error will be raised. By default, finite fields are cached globally, so that there is only one finite field in the system with given characteristic, degree and string. If this is not the desired behaviour, one can pass false for the optional cached parameter.

source

Given a finite field $R$, we also have the following coercions in addition to the standard ones expected.

R(n::ZZRingElem)

Coerce a Flint integer value into the field.

Basic manipulation

Examples

julia> R,w = FiniteField(7, 2, "w")
+Finite fields · Singular.jl

Finite fields

Finite fields are implemented via the Singular n_GF type for any characteristic and degree contained in the Singular Conway tables.

The associated finite field is represented by a parent object which can be constructed by a call to the FiniteField constructor.

The types of the parent objects and elements of the associated finite fields are given in the following table according to the library providing them.

LibraryElement typeParent type
Singularn_GFSingular.N_GField

All finite field element types belong directly to the abstract type FieldElem and all the parent object types belong to the abstract type Field.

Finite field functionality

Singular.jl finite fields implement the Field interface of AbstractAlgebra.jl.

https://nemocas.github.io/AbstractAlgebra.jl/fields.html

Below, we describe the functionality that is specific to Singular finite field and not already listed at the given link.

Constructors

The following constructors are available to create finite fields and their elements.

Singular.FiniteFieldMethod
FiniteField(p::Int, n::Int, S::VarName; cached=true)

Return a tuple K, a consisting of a finite field K of characteristic $p$ and degree $n$, and its generator a. The string used to print the generator is given by S. If the finite field is not listed in the Conway tables included in Singular, an error will be raised. By default, finite fields are cached globally, so that there is only one finite field in the system with given characteristic, degree and string. If this is not the desired behaviour, one can pass false for the optional cached parameter.

source

Given a finite field $R$, we also have the following coercions in addition to the standard ones expected.

R(n::ZZRingElem)

Coerce a Flint integer value into the field.

Basic manipulation

Examples

julia> R,w = FiniteField(7, 2, "w")
 (Finite field of characteristic 7 and degree 2, w)
 
 julia> w^48 == 1
@@ -15,4 +15,4 @@
 7
 
 julia> d = degree(R)
-2
+2
diff --git a/dev/alghom/index.html b/dev/alghom/index.html index a2f40ebaa..a55087c99 100644 --- a/dev/alghom/index.html +++ b/dev/alghom/index.html @@ -1,5 +1,5 @@ -Algebra Homomorphisms · Singular.jl

Algebra Homomorphisms

Singular.jl allows the creation of algebra homomorphisms of Singular polynomial rings over Nemo/Singular coefficient rings.

The default algebra homomorphism type in Singular.jl is the Singular SAlgHom type.

Additionally, a special type for the identity homomorphism has been implemented. The type in Singular.jl for the latter is SIdAlgHom.

All algebra homomorphism types belong directly to the abstract type AbstractAlgebraHomomorphism{T}.

Algebra Homomorphism functionality

Constructors

Given two Singular polynomial rings $R$ and $S$ over the same base ring, the following constructors are available for creating algebra homomorphisms.

Singular.AlgebraHomomorphismMethod
AlgebraHomomorphism(D::PolyRing, C::PolyRing, V::Vector)

Constructs an algebra homomorphism $f: D \to C$, where the $i$-th variable of $D$ is mapped to the $i$-th entry of $V$. $D$ and $C$ must be polynomial rings over the same base ring.

source
Singular.IdentityAlgebraHomomorphismMethod
IdentityAlgebraHomomorphism(R::PolyRing)

Constructs the canonical identity algebra homomorphism $id: D \to D$, where the $i$-th variable of $D$ is mapped to itself.

source

Examples

julia> L = FiniteField(3, 2, "a")
+Algebra Homomorphisms · Singular.jl

Algebra Homomorphisms

Singular.jl allows the creation of algebra homomorphisms of Singular polynomial rings over Nemo/Singular coefficient rings.

The default algebra homomorphism type in Singular.jl is the Singular SAlgHom type.

Additionally, a special type for the identity homomorphism has been implemented. The type in Singular.jl for the latter is SIdAlgHom.

All algebra homomorphism types belong directly to the abstract type AbstractAlgebraHomomorphism{T}.

Algebra Homomorphism functionality

Constructors

Given two Singular polynomial rings $R$ and $S$ over the same base ring, the following constructors are available for creating algebra homomorphisms.

Singular.AlgebraHomomorphismMethod
AlgebraHomomorphism(D::PolyRing, C::PolyRing, V::Vector)

Constructs an algebra homomorphism $f: D \to C$, where the $i$-th variable of $D$ is mapped to the $i$-th entry of $V$. $D$ and $C$ must be polynomial rings over the same base ring.

source
Singular.IdentityAlgebraHomomorphismMethod
IdentityAlgebraHomomorphism(R::PolyRing)

Constructs the canonical identity algebra homomorphism $id: D \to D$, where the $i$-th variable of $D$ is mapped to itself.

source

Examples

julia> L = FiniteField(3, 2, "a")
 (Finite field of characteristic 3 and degree 2, a)
 
 julia> R, (x, y, z, w) = polynomial_ring(L[1], ["x", "y", "z", "w"];
@@ -41,7 +41,7 @@
 K = f(J)
 
 q = f(p)

Composition

AbstractAlgebra.composeMethod
compose(f::AbstractAlgebra.Map(Singular.SAlgHom),
-                     g::AbstractAlgebra.Map(Singular.SAlgHom))

Return an algebra homomorphism $h: domain(f) \to codomain(g)$, where $h = g(f)$.

source

A short command for the composition of $f$ and $g$ is f*g, which is the same as compose(f, g).

Examples

julia> R, (x, y, z, w) = polynomial_ring(QQ, ["x", "y", "z", "w"];
+                     g::AbstractAlgebra.Map(Singular.SAlgHom))

Return an algebra homomorphism $h: domain(f) \to codomain(g)$, where $h = g(f)$.

source

A short command for the composition of $f$ and $g$ is f*g, which is the same as compose(f, g).

Examples

julia> R, (x, y, z, w) = polynomial_ring(QQ, ["x", "y", "z", "w"];
                                     ordering=:negdegrevlex)
 (Singular polynomial ring (QQ),(x,y,z,w),(ds(4),C), spoly{n_Q}[x, y, z, w])
 
@@ -102,7 +102,7 @@
 Identity algebra homomorphism
   from Singular polynomial ring (QQ),(x,y,z,w),(ds(4),C)
   to Singular polynomial ring (QQ),(x,y,z,w),(ds(4),C)
-Defining equations: spoly{n_Q}[x, y, z, w]

Preimages

AbstractAlgebra.preimageMethod
preimage(f::AbstractAlgebra.Map(SAlgHom), I::sideal)

Return the preimage of the ideal $I$ under the algebra homomorphism $f$.

source
AbstractAlgebra.preimageMethod
preimage(f::AbstractAlgebra.Map(SIdAlgHom), I::sideal)

Return the preimage of the ideal $I$ under the identity algebra homomorphism.

source

Examples

julia> R, (x, y, z, w) = polynomial_ring(QQ, ["x", "y", "z", "w"];
+Defining equations: spoly{n_Q}[x, y, z, w]

Preimages

AbstractAlgebra.preimageMethod
preimage(f::AbstractAlgebra.Map(SAlgHom), I::sideal)

Return the preimage of the ideal $I$ under the algebra homomorphism $f$.

source
AbstractAlgebra.preimageMethod
preimage(f::AbstractAlgebra.Map(SIdAlgHom), I::sideal)

Return the preimage of the ideal $I$ under the identity algebra homomorphism.

source

Examples

julia> R, (x, y, z, w) = polynomial_ring(QQ, ["x", "y", "z", "w"];
                                     ordering=:negdegrevlex)
 (Singular polynomial ring (QQ),(x,y,z,w),(ds(4),C), spoly{n_Q}[x, y, z, w])
 
@@ -135,4 +135,4 @@
 Singular ideal over Singular polynomial ring (QQ),(x,y,z,w),(ds(4),C) with generators (4*x - 4*y + z^2 + 2*z*w + w^2)
 
 julia> K2 = kernel(idS)
-Singular ideal over Singular polynomial ring (QQ),(a,b,c),(dp(3),C) with generators (0)
+Singular ideal over Singular polynomial ring (QQ),(a,b,c),(dp(3),C) with generators (0) diff --git a/dev/caller/index.html b/dev/caller/index.html index 3a3c1d4cf..40b170263 100644 --- a/dev/caller/index.html +++ b/dev/caller/index.html @@ -29,7 +29,7 @@ julia> Singular.lookup_library_symbol("Top", "r") 2-element Vector{Any}: Singular polynomial ring (QQ),(x,y,z),(dp(3),C) - Dict{Symbol, spoly{n_Q}}(:f => x^2 + 2*x*y + y^2)source

Global Kernel Variables

The global variables degBound and multBound can be used in a local fashion. As with any global variable, their usage should be accompanied with caution.

Singular.with_degBoundMethod
with_degBound(f, degb::Integer)

Evaluate and return f() with the Singular global setting degBound = degb. The value of degBound is automatically restored upon return; the effect is only a local one on f(). The value degBound = 0 corresponds to no degree bound in Singular and this is the starting value.

source
Singular.with_multBoundMethod
with_multBound(f, mu::Integer)

Evaluate and return f() with the Singular global setting multBound = mu. The value of multBound is automatically restored upon return; the effect is only a local one on f(). The value multBound = 0 corresponds to no multiplicity bound in Singular and this is the starting value.

source

The following options are available. The usage of, say, the option infRefTail would be as with_infRefTail(f, flag::Bool) where the same do-block syntax can be used as with the degree bounds.

fastHC, infRedTail, lazy, length, notBuckets, prot, qringNF, redTail, redThrough

Examples

julia> r, (x,y,z) = polynomial_ring(QQ, ["x", "y", "z"], ordering=ordering_ds());
+ Dict{Symbol, spoly{n_Q}}(:f => x^2 + 2*x*y + y^2)
source

Global Kernel Variables

The global variables degBound and multBound can be used in a local fashion. As with any global variable, their usage should be accompanied with caution.

Singular.with_degBoundMethod
with_degBound(f, degb::Integer)

Evaluate and return f() with the Singular global setting degBound = degb. The value of degBound is automatically restored upon return; the effect is only a local one on f(). The value degBound = 0 corresponds to no degree bound in Singular and this is the starting value.

source
Singular.with_multBoundMethod
with_multBound(f, mu::Integer)

Evaluate and return f() with the Singular global setting multBound = mu. The value of multBound is automatically restored upon return; the effect is only a local one on f(). The value multBound = 0 corresponds to no multiplicity bound in Singular and this is the starting value.

source

The following options are available. The usage of, say, the option infRefTail would be as with_infRefTail(f, flag::Bool) where the same do-block syntax can be used as with the degree bounds.

fastHC, infRedTail, lazy, length, notBuckets, prot, qringNF, redTail, redThrough

Examples

julia> r, (x,y,z) = polynomial_ring(QQ, ["x", "y", "z"], ordering=ordering_ds());
 
 julia> i = Ideal(r, [x^7+y^7+z^6,x^6+y^8+z^7,x^7+y^5+z^8,x^2*y^3+y^2*z^3+x^3*z^2,x^3*y^2+y^3*z^2+x^2*z^3]);
 
@@ -73,4 +73,4 @@
 julia> with_prot(true) do; return std(Ideal(R, x^5 - y*x + 1, y^6*x + x^2 + y^3)); end
 [4294967295:2]5s7s11s1214-s15
 product criterion:1 chain criterion:1
-Singular ideal over Singular polynomial ring (QQ),(x,y),(dp(2),C) with generators (x^5 - x*y + 1, x*y^6 + y^3 + x^2, x^4*y^3 - y^6 - y^4 - x, y^9 + y^7 + x^3*y^3 + x*y^3 + x*y - 1)
+Singular ideal over Singular polynomial ring (QQ),(x,y),(dp(2),C) with generators (x^5 - x*y + 1, x*y^6 + y^3 + x^2, x^4*y^3 - y^6 - y^4 - x, y^9 + y^7 + x^3*y^3 + x*y^3 + x*y - 1) diff --git a/dev/ideal/index.html b/dev/ideal/index.html index 41ef56a37..e3729921a 100644 --- a/dev/ideal/index.html +++ b/dev/ideal/index.html @@ -7,7 +7,7 @@ Singular ideal over Singular polynomial ring (ZZ),(x,y),(dp(2),C) with generators (x*y + 1, x^2) julia> I2 = Ideal(R, [x*y + 1, x^2]) -Singular ideal over Singular polynomial ring (ZZ),(x,y),(dp(2),C) with generators (x*y + 1, x^2)

Basic manipulation

AbstractAlgebra.number_of_generatorsMethod
number_of_generators(I::sideal)

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

source
AbstractAlgebra.gensMethod
gens(I::sideal)

Return the generators in the internal representation of the ideal $I$ as an array.

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.is_zerodimMethod
is_zerodim(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
Singular.dimensionMethod
dimension(I::sideal{spoly{T}}) where T <: Nemo.RingElem

Given an ideal $I$ this function computes the Krull dimension of the ring $R/I$, where $R$ is the polynomial ring over which $I$ is an ideal. The ideal must be over a polynomial ring and a Groebner basis.

source
AbstractAlgebra.is_constantMethod
is_constant(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
Singular.is_var_generatedMethod
is_var_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
LinearAlgebra.normalize!Method
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
Singular.interreduceMethod
interreduce(I::sideal{S}) where {T <: Nemo.RingElem, S <: Union{spoly{T}, spluralg{T}}}

Interreduce the elements of I such that no leading term is divisible by another leading term. This returns a new ideal and does not modify the input ideal.

source

Examples

julia> R, (x, y) = polynomial_ring(ZZ, ["x", "y"])
+Singular ideal over Singular polynomial ring (ZZ),(x,y),(dp(2),C) with generators (x*y + 1, x^2)

Basic manipulation

AbstractAlgebra.number_of_generatorsMethod
number_of_generators(I::sideal)

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

source
AbstractAlgebra.gensMethod
gens(I::sideal)

Return the generators in the internal representation of the ideal $I$ as an array.

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.is_zerodimMethod
is_zerodim(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
Singular.dimensionMethod
dimension(I::sideal{spoly{T}}) where T <: Nemo.RingElem

Given an ideal $I$ this function computes the Krull dimension of the ring $R/I$, where $R$ is the polynomial ring over which $I$ is an ideal. The ideal must be over a polynomial ring and a Groebner basis.

source
AbstractAlgebra.is_constantMethod
is_constant(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
Singular.is_var_generatedMethod
is_var_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
LinearAlgebra.normalize!Method
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
Singular.interreduceMethod
interreduce(I::sideal{S}) where {T <: Nemo.RingElem, S <: Union{spoly{T}, spluralg{T}}}

Interreduce the elements of I such that no leading term is divisible by another leading term. This returns a new ideal and does not modify the input ideal.

source

Examples

julia> R, (x, y) = polynomial_ring(ZZ, ["x", "y"])
 (Singular polynomial ring (ZZ),(x,y),(dp(2),C), spoly{n_Z}[x, y])
 
 julia> I = Ideal(R, x^2 + 1, x*y)
@@ -48,7 +48,7 @@
 Singular ideal over Singular polynomial ring (QQ),(x,y),(dp(2),C) with generators (x^2 + 1)
 
 julia> contains(I, J) == true
-true
source

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(I1::sideal{S}, I2::sideal{S}) where S <: SPolyUnion

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{S}, I2::sideal{S}) where S <: SPolyUnion

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

julia> R, (x , y) = polynomial_ring(QQ, ["x", "y"])
+true
source

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(I1::sideal{S}, I2::sideal{S}) where S <: SPolyUnion

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{S}, I2::sideal{S}) where S <: SPolyUnion

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

julia> R, (x , y) = polynomial_ring(QQ, ["x", "y"])
 (Singular polynomial ring (QQ),(x,y),(dp(2),C), spoly{n_Q}[x, y])
 
 julia> I = Ideal(R, x^2 + 1, x*y)
@@ -71,7 +71,7 @@
 Singular ideal over Singular polynomial ring (QQ),(x,y),(dp(2),C) with generators (x^2 + x*y + 1, x^2 - x*y + 1)
 
 julia> V = intersection(I, J)
-Singular ideal over Singular polynomial ring (QQ),(x,y),(dp(2),C) with generators (y, x^2 - x*y + 1)
source

Quotient

Singular.quotientMethod
quotient(I::sideal{S}, J::sideal{S}) where S <: spoly

Return 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\}$.

Examples

julia> R, (x , y) = polynomial_ring(QQ, ["x", "y"])
+Singular ideal over Singular polynomial ring (QQ),(x,y),(dp(2),C) with generators (y, x^2 - x*y + 1)
source

Quotient

Singular.quotientMethod
quotient(I::sideal{S}, J::sideal{S}) where S <: spoly

Return 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\}$.

Examples

julia> R, (x , y) = polynomial_ring(QQ, ["x", "y"])
 (Singular polynomial ring (QQ),(x,y),(dp(2),C), spoly{n_Q}[x, y])
 
 julia> I = Ideal(R, x^2 + 1, x*y)
@@ -81,14 +81,14 @@
 Singular ideal over Singular polynomial ring (QQ),(x,y),(dp(2),C) with generators (x + y)
 
 julia> V = quotient(I, J)
-Singular ideal over Singular polynomial ring (QQ),(x,y),(dp(2),C) with generators (y, x^2 + 1)
source
Singular.quotientMethod
quotient(I::sideal{S}, J::sideal{S}) where S <: spluralg

Return the quotient of the two given ideals, where $J$ must be two-sided.

source

Leading terms

Singular.leadMethod
lead(I::sideal{S}) where S <: SPolyUnion

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

Examples

julia> R, (x , y) = polynomial_ring(QQ, ["x", "y"])
+Singular ideal over Singular polynomial ring (QQ),(x,y),(dp(2),C) with generators (y, x^2 + 1)
source
Singular.quotientMethod
quotient(I::sideal{S}, J::sideal{S}) where S <: spluralg

Return the quotient of the two given ideals, where $J$ must be two-sided.

source

Leading terms

Singular.leadMethod
lead(I::sideal{S}) where S <: SPolyUnion

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

Examples

julia> R, (x , y) = polynomial_ring(QQ, ["x", "y"])
 (Singular polynomial ring (QQ),(x,y),(dp(2),C), spoly{n_Q}[x, y])
 
 julia> I = Ideal(R, x^2 + 1, x*y)
 Singular ideal over Singular polynomial ring (QQ),(x,y),(dp(2),C) with generators (x^2 + 1, x*y)
 
 julia> V = lead(I)
-Singular ideal over Singular polynomial ring (QQ),(x,y),(dp(2),C) with generators (x^2, x*y)
source

Homogeneous ideals

Singular.is_homogeneousMethod
is_homogeneous(I::sideal)

Return true if each stored generator of I is homogeneous, otherwise false. If base_ring(I) has a weighted monomial ordering, the test is conducted with respect to the corresponding weights.

source
Singular.homogenizeMethod
homogenize(I::sideal{S}, v::S) where S <: spoly

Multiply each monomial in the generators of I by a suitable power of the variable v and return the corresponding homogeneous ideal. The variable v must have weight 1.

source

Saturation

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

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

Examples

julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"])
+Singular ideal over Singular polynomial ring (QQ),(x,y),(dp(2),C) with generators (x^2, x*y)
source

Homogeneous ideals

Singular.is_homogeneousMethod
is_homogeneous(I::sideal)

Return true if each stored generator of I is homogeneous, otherwise false. If base_ring(I) has a weighted monomial ordering, the test is conducted with respect to the corresponding weights.

source
Singular.homogenizeMethod
homogenize(I::sideal{S}, v::S) where S <: spoly

Multiply each monomial in the generators of I by a suitable power of the variable v and return the corresponding homogeneous ideal. The variable v must have weight 1.

source

Saturation

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

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

Examples

julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"])
 (Singular polynomial ring (QQ),(x,y),(dp(2),C), spoly{n_Q}[x, y])
 
 julia> I = Ideal(R, (x^2 + x*y + 1)*(2y^2+1)^3, (2y^2 + 3)*(2y^2+1)^2)
@@ -98,7 +98,7 @@
 Singular ideal over Singular polynomial ring (QQ),(x,y),(dp(2),C) with generators (2*y^2 + 1)
 
 julia> S = saturation(I, J)
-(Singular ideal over Singular polynomial ring (QQ),(x,y),(dp(2),C) with generators (2*y^2 + 3, x^2 + x*y + 1), 2)
source

Standard basis

Statistics.stdMethod
std(I::sideal{S}; complete_reduction::Bool=false) where S <: SPolyUnion

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.fglmMethod
fglm(I::sideal{spoly{T}}, ordering::Symbol) where T <: Nemo.RingElem

Compute a Groebner basis for the zero - dimensional ideal $I$ in the ring $R$ using the FGLM algorithm. All involved orderings have to be global.

source
Singular.satstdMethod
satstd(I::sideal{spoly{T}}, J::sideal{spoly{T}} = Ideal(base_ring(I), gens(base_ring(I)))) where T <: Nemo.RingElem

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 occurring in $J$, where possible. Thus the result can be obtained faster than by first computing the saturation and then the standard basis.

source
Singular.lift_stdMethod
lift_std(M::sideal{S}; complete_reduction::Bool = false) where S <: spoly

Computes the Groebner base G of M and the transformation matrix T such that (Matrix(G) = Matrix(M) * T)

source
Singular.lift_std_syzMethod
lift_std_syz(M::sideal{S}; complete_reduction::Bool = false) where S <: spoly

Computes the Groebner base G of I, the transformation matrix T and the syzygies of M. Returns G,T,S (Matrix(G) = Matrix(I) * T, 0=Matrix(M)*Matrix(S))

source

Examples

julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"])
+(Singular ideal over Singular polynomial ring (QQ),(x,y),(dp(2),C) with generators (2*y^2 + 3, x^2 + x*y + 1), 2)
source

Standard basis

Statistics.stdMethod
std(I::sideal{S}; complete_reduction::Bool=false) where S <: SPolyUnion

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.fglmMethod
fglm(I::sideal{spoly{T}}, ordering::Symbol) where T <: Nemo.RingElem

Compute a Groebner basis for the zero - dimensional ideal $I$ in the ring $R$ using the FGLM algorithm. All involved orderings have to be global.

source
Singular.satstdMethod
satstd(I::sideal{spoly{T}}, J::sideal{spoly{T}} = Ideal(base_ring(I), gens(base_ring(I)))) where T <: Nemo.RingElem

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 occurring in $J$, where possible. Thus the result can be obtained faster than by first computing the saturation and then the standard basis.

source
Singular.lift_stdMethod
lift_std(M::sideal{S}; complete_reduction::Bool = false) where S <: spoly

Computes the Groebner base G of M and the transformation matrix T such that (Matrix(G) = Matrix(M) * T)

source
Singular.lift_std_syzMethod
lift_std_syz(M::sideal{S}; complete_reduction::Bool = false) where S <: spoly

Computes the Groebner base G of I, the transformation matrix T and the syzygies of M. Returns G,T,S (Matrix(G) = Matrix(I) * T, 0=Matrix(M)*Matrix(S))

source

Examples

julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"])
 (Singular polynomial ring (QQ),(x,y),(dp(2),C), spoly{n_Q}[x, y])
 
 julia> I = Ideal(R, x^2 + x*y + 1, 2y^2 + 3)
@@ -129,7 +129,7 @@
 Singular ideal over Singular polynomial ring (QQ),(x,y,z),(lp(3),C) with generators (x^2 + y^3, x^2*y + x^2, x^3 - x^2, -x^2 - y + z^4)
 
 julia> J = fglm(I, :degrevlex)
-Singular ideal over Singular polynomial ring (QQ),(x,y,z),(lp(3),C) with generators (z^12, y*z^4 - z^8, y^2 + y - z^8 - z^4, x*y - x*z^4 - y + z^4, x^2 + y - z^4)

Reduction

Base.reduceMethod
reduce(I::sideal{S}, G::sideal{S}) where S <: SPolyUnion

Return an ideal whose generators are the generators of $I$ reduced by the ideal $G$. The ideal $G$ need not be a Groebner basis. The returned ideal will have the same number of generators as $I$, even if they are zero. For PLURAL rings (S <: spluralg, GAlgebra, WeylAlgebra), the reduction is only a left reduction, and hence cannot be used to test containment in a two-sided ideal. For LETTERPLACE rings (S <: slpalg, FreeAlgebra), the reduction is two-sided as only two-sided ideals can be constructed here.

source
Base.reduceMethod
reduce(p::S, G::sideal{S}) where S <: SPolyUnion

Return the polynomial which is $p$ reduced by the polynomials generating $G$. The ideal $G$ need not be a Groebner basis. For PLURAL rings (S <: spluralg, GAlgebra, WeylAlgebra), the reduction is only a left reduction, and hence cannot be used to test membership in a two-sided ideal. For LETTERPLACE rings (S <: slpalg, FreeAlgebra), the reduction is the full two-sided reduction as only two-sided ideals can be constructed here.

source

Examples

julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"])
+Singular ideal over Singular polynomial ring (QQ),(x,y,z),(lp(3),C) with generators (z^12, y*z^4 - z^8, y^2 + y - z^8 - z^4, x*y - x*z^4 - y + z^4, x^2 + y - z^4)

Reduction

Base.reduceMethod
reduce(I::sideal{S}, G::sideal{S}) where S <: SPolyUnion

Return an ideal whose generators are the generators of $I$ reduced by the ideal $G$. The ideal $G$ need not be a Groebner basis. The returned ideal will have the same number of generators as $I$, even if they are zero. For PLURAL rings (S <: spluralg, GAlgebra, WeylAlgebra), the reduction is only a left reduction, and hence cannot be used to test containment in a two-sided ideal. For LETTERPLACE rings (S <: slpalg, FreeAlgebra), the reduction is two-sided as only two-sided ideals can be constructed here.

source
Base.reduceMethod
reduce(p::S, G::sideal{S}) where S <: SPolyUnion

Return the polynomial which is $p$ reduced by the polynomials generating $G$. The ideal $G$ need not be a Groebner basis. For PLURAL rings (S <: spluralg, GAlgebra, WeylAlgebra), the reduction is only a left reduction, and hence cannot be used to test membership in a two-sided ideal. For LETTERPLACE rings (S <: slpalg, FreeAlgebra), the reduction is the full two-sided reduction as only two-sided ideals can be constructed here.

source

Examples

julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"])
 (Singular polynomial ring (QQ),(x,y),(dp(2),C), spoly{n_Q}[x, y])
 
 julia> f = x^2*y + 2y + 1
@@ -158,7 +158,7 @@
 Singular ideal over Singular polynomial ring (QQ),(x,y,t),(dp(3),C) with generators (-t^2 + x, -t^3 + y)
 
 julia> J = eliminate(I, t)
-Singular ideal over Singular polynomial ring (QQ),(x,y,t),(dp(3),C) with generators (x^3 - y^2)
source

Syzygies

Singular.syzMethod
syz(I::sideal)

Compute the module of syzygies of the ideal.

Examples

julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"])
+Singular ideal over Singular polynomial ring (QQ),(x,y,t),(dp(3),C) with generators (x^3 - y^2)
source

Syzygies

Singular.syzMethod
syz(I::sideal)

Compute the module of syzygies of the ideal.

Examples

julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"])
 (Singular polynomial ring (QQ),(x,y),(dp(2),C), spoly{n_Q}[x, y])
 
 julia> I = Ideal(R, x^2*y + 2y + 1, y^2 + 1)
@@ -176,7 +176,7 @@
 x^2*y + 2*y + 1]
 
 julia> iszero(M*N)  # check they are actually syzygies
-true
source

Free resolutions

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

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/module. The max_length can be set to $0$ if the full free resolution is required.

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

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

julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"])
+true
source

Free resolutions

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

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/module. The max_length can be set to $0$ if the full free resolution is required.

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

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

julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"])
 (Singular polynomial ring (QQ),(x,y),(dp(2),C), spoly{n_Q}[x, y])
 
 julia> I = Ideal(R, x^2*y + 2y + 1, y^2 + 1)
@@ -193,7 +193,7 @@
 Singular ideal over Singular polynomial ring (QQ),(x,y,z),(dp(3),C) with generators (x^5 - y^2, -x^6 + y^3 + z^3)
 
 julia> J1 = jet(I, 3)
-Singular ideal over Singular polynomial ring (QQ),(x,y,z),(dp(3),C) with generators (-y^2, y^3 + z^3)
source

Operations on zero-dimensional ideals

Singular.vdimMethod
vdim(I::sideal{S}) where {T <: Nemo.FieldElem, S <: Union{spoly{T}, spluralg{T}}}

Given a zero-dimensional ideal $I$ this function computes the dimension of the vector space base_ring(I)/I, where base_ring(I) must be a polynomial ring over a field, and $I$ must be a Groebner basis. The return is $-1$ if !is_zerodim(I).

source
Singular.kbaseMethod
kbase(I::sideal{S}) where {T <: Nemo.FieldElem, S <: Union{spoly{T}, spluralg{T}}}

Given a zero-dimensional ideal $I$ this function computes a vector space basis of the vector space base_ring(I)/I, where base_ring(I) must be a polynomial ring over a field, and $I$ must be a Groebner basis. The array of vector space basis elements is returned as a Singular ideal, and this array consists of one zero polynomial if !is_zerodim(I).

source
Singular.highcornerMethod
highcorner(I::sideal{S}) where {T <: Nemo.FieldElem, S <: Union{spoly{T}, spluralg{T}}}

Given a zero-dimensional ideal $I$ this function computes its highest corner, which is a polynomial. The ideal must be over a polynomial ring over a field, and a Groebner basis. The return is the zero polynomial if !is_zerodim(I).

source

Examples

julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"]; ordering=:negdegrevlex)
+Singular ideal over Singular polynomial ring (QQ),(x,y,z),(dp(3),C) with generators (-y^2, y^3 + z^3)
source

Operations on zero-dimensional ideals

Singular.vdimMethod
vdim(I::sideal{S}) where {T <: Nemo.FieldElem, S <: Union{spoly{T}, spluralg{T}}}

Given a zero-dimensional ideal $I$ this function computes the dimension of the vector space base_ring(I)/I, where base_ring(I) must be a polynomial ring over a field, and $I$ must be a Groebner basis. The return is $-1$ if !is_zerodim(I).

source
Singular.kbaseMethod
kbase(I::sideal{S}) where {T <: Nemo.FieldElem, S <: Union{spoly{T}, spluralg{T}}}

Given a zero-dimensional ideal $I$ this function computes a vector space basis of the vector space base_ring(I)/I, where base_ring(I) must be a polynomial ring over a field, and $I$ must be a Groebner basis. The array of vector space basis elements is returned as a Singular ideal, and this array consists of one zero polynomial if !is_zerodim(I).

source
Singular.highcornerMethod
highcorner(I::sideal{S}) where {T <: Nemo.FieldElem, S <: Union{spoly{T}, spluralg{T}}}

Given a zero-dimensional ideal $I$ this function computes its highest corner, which is a polynomial. The ideal must be over a polynomial ring over a field, and a Groebner basis. The return is the zero polynomial if !is_zerodim(I).

source

Examples

julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"]; ordering=:negdegrevlex)
 (Singular polynomial ring (QQ),(x,y),(ds(2),C), spoly{n_Q}[x, y])
 
 julia> I = Ideal(R, 3*x^2 + y^3, x*y^2)
@@ -209,7 +209,7 @@
 Singular ideal over Singular polynomial ring (QQ),(x,y),(ds(2),C) with generators (y^4, y^3, y^2, x*y, y, x, 1)
 
 julia> f = highcorner(I)
-y^4

Operations over local rings

If the base ring R is a local ring, a minimal generating set can be computed using the following function

Singular.minimal_generating_setMethod
minimal_generating_set(I::sideal{S}) where S <: spoly

Given an ideal $I$ in ring $R$ with local ordering, this returns an array containing the minimal generators of $I$.

source

Examples

julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"]; ordering=:negdegrevlex)
+y^4

Operations over local rings

If the base ring R is a local ring, a minimal generating set can be computed using the following function

Singular.minimal_generating_setMethod
minimal_generating_set(I::sideal{S}) where S <: spoly

Given an ideal $I$ in ring $R$ with local ordering, this returns an array containing the minimal generators of $I$.

source

Examples

julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"]; ordering=:negdegrevlex)
 (Singular polynomial ring (QQ),(x,y),(ds(2),C), spoly{n_Q}[x, y])
 
 julia> has_local_ordering(R) == true
@@ -221,7 +221,7 @@
 julia> min = minimal_generating_set(I)
 2-element Vector{spoly{n_Q}}:
  x^2
- y

Independent sets of monomial ideals

Let $I$ be an ideal of $K[x_1, ..., x_n].$ An independent set is a subset $u \subseteq \{x_1, ..., x_n\},$ such that $I \cap K[u]= 0.$ In case $u$ cannot be enlarged, it is called non-extendable independent set. If in addition $|u| = dim(K[x_1, ..., x_n]/I),$ $u$ is called maximal independent set. Using Singular.jl one can compute non-extendable, resp. maximal independent sets for monomial ideals. If an arbitrary ideal $I$ is passed to the function, the computation is performed on the leading ideal of $I$.

Singular.independent_setsMethod
independent_sets(I::sideal{spoly{T}}) where T <: Nemo.FieldElem

Return all non-extendable independent sets of $lead(I)$. $I$ has to be given by a Groebner basis.

source
Singular.maximal_independent_setMethod
maximal_independent_set(I::sideal{spoly{T}}; all::Bool = false) where T <: Nemo.FieldElem

Returns, by default, an array containing a maximal independent set of $lead(I)$. $I$ has to be given by a Groebner basis. If the additional parameter "all" is set to true, an array containing all maximal independent sets of $lead(I)$ is returned.

source
julia> R, (x, y, u, v, w) = polynomial_ring(QQ, ["x", "y", "u", "v", "w"])
+ y

Independent sets of monomial ideals

Let $I$ be an ideal of $K[x_1, ..., x_n].$ An independent set is a subset $u \subseteq \{x_1, ..., x_n\},$ such that $I \cap K[u]= 0.$ In case $u$ cannot be enlarged, it is called non-extendable independent set. If in addition $|u| = dim(K[x_1, ..., x_n]/I),$ $u$ is called maximal independent set. Using Singular.jl one can compute non-extendable, resp. maximal independent sets for monomial ideals. If an arbitrary ideal $I$ is passed to the function, the computation is performed on the leading ideal of $I$.

Singular.independent_setsMethod
independent_sets(I::sideal{spoly{T}}) where T <: Nemo.FieldElem

Return all non-extendable independent sets of $lead(I)$. $I$ has to be given by a Groebner basis.

source
Singular.maximal_independent_setMethod
maximal_independent_set(I::sideal{spoly{T}}; all::Bool = false) where T <: Nemo.FieldElem

Returns, by default, an array containing a maximal independent set of $lead(I)$. $I$ has to be given by a Groebner basis. If the additional parameter "all" is set to true, an array containing all maximal independent sets of $lead(I)$ is returned.

source
julia> R, (x, y, u, v, w) = polynomial_ring(QQ, ["x", "y", "u", "v", "w"])
 (Singular polynomial ring (QQ),(x,y,u,v,w),(dp(5),C), spoly{n_Q}[x, y, u, v, w])
 
 julia> has_local_ordering(R) == true
@@ -252,4 +252,4 @@
  [x, y, u]
  [y, u, v]
  [x, u, w]
- [u, v, w]
+ [u, v, w] diff --git a/dev/index.html b/dev/index.html index 01ac28063..298310950 100644 --- a/dev/index.html +++ b/dev/index.html @@ -16,4 +16,4 @@ Singular resolution: R^1 <- R^2 <- R^1 julia> F[1] -Singular ideal over Singular polynomial ring (QQ),(x,y),(dp(2),C) with generators (x - y, y^2 + 1) +Singular ideal over Singular polynomial ring (QQ),(x,y),(dp(2),C) with generators (x - y, y^2 + 1) diff --git a/dev/integer/index.html b/dev/integer/index.html index 273399fab..15e94c972 100644 --- a/dev/integer/index.html +++ b/dev/integer/index.html @@ -1,5 +1,5 @@ -Integers · Singular.jl

Integers

The default integer type in Singular.jl is the Singular n_Z integer type.

The associated ring of integers is represented by the constant parent object which can be constructed by a call to Singular.Integers().

For convenience we define

ZZ = Singular.Integers()

so that integers can be constructed using ZZ. Note that this is the name of a specific parent object, not the name of its type.

The types of the integer ring parent objects and elements of the associated rings of integers are given in the following table according to the library providing them.

LibraryElement typeParent type
Singularn_ZSingular.Integers

All integer element types belong directly to the abstract type RingElem and all the integer ring parent object types belong to the abstract type Ring.

Integer functionality

Singular.jl provides all the ring and possibly some parts of the Euclidean ring functionality of AbstractAlgebra.jl.

https://nemocas.github.io/AbstractAlgebra.jl/latest/ring

https://nemocas.github.io/AbstractAlgebra.jl/latest/euclidean_interface

Below, we describe the functionality that is specific to the Singular integer ring.

Constructors

ZZ(n::Integer)

Coerce a Julia integer value into the integer ring.

Basic manipulation

Examples

julia> a = ZZ(-12)
+Integers · Singular.jl

Integers

The default integer type in Singular.jl is the Singular n_Z integer type.

The associated ring of integers is represented by the constant parent object which can be constructed by a call to Singular.Integers().

For convenience we define

ZZ = Singular.Integers()

so that integers can be constructed using ZZ. Note that this is the name of a specific parent object, not the name of its type.

The types of the integer ring parent objects and elements of the associated rings of integers are given in the following table according to the library providing them.

LibraryElement typeParent type
Singularn_ZSingular.Integers

All integer element types belong directly to the abstract type RingElem and all the integer ring parent object types belong to the abstract type Ring.

Integer functionality

Singular.jl provides all the ring and possibly some parts of the Euclidean ring functionality of AbstractAlgebra.jl.

https://nemocas.github.io/AbstractAlgebra.jl/latest/ring

https://nemocas.github.io/AbstractAlgebra.jl/latest/euclidean_interface

Below, we describe the functionality that is specific to the Singular integer ring.

Constructors

ZZ(n::Integer)

Coerce a Julia integer value into the integer ring.

Basic manipulation

Examples

julia> a = ZZ(-12)
 -12
 
 julia> is_unit(a)
@@ -41,4 +41,4 @@
 true
 
 julia> 5 <= b
-false
+false
diff --git a/dev/matrix/index.html b/dev/matrix/index.html index e9618d480..0726d7503 100644 --- a/dev/matrix/index.html +++ b/dev/matrix/index.html @@ -38,4 +38,4 @@ 0, 0, x*y + 5*u*w, 1] julia> N[4, 3] -x*y + 5*u*w +x*y + 5*u*w diff --git a/dev/modn/index.html b/dev/modn/index.html index d25986477..9f1f429f9 100644 --- a/dev/modn/index.html +++ b/dev/modn/index.html @@ -9,4 +9,4 @@ true julia> c = characteristic(R) -26 +26 diff --git a/dev/modp/index.html b/dev/modp/index.html index 8a4775623..22d221c32 100644 --- a/dev/modp/index.html +++ b/dev/modp/index.html @@ -17,4 +17,4 @@ 5 julia> b = Int(a) -5 +5 diff --git a/dev/module/index.html b/dev/module/index.html index 77060b137..8500aba8f 100644 --- a/dev/module/index.html +++ b/dev/module/index.html @@ -11,7 +11,7 @@ julia> M = Singular.Module(R, v1, v2) Singular module over Singular polynomial ring (QQ),(x,y),(dp(2),C), with generators: x*y*gen(2)+x*gen(1)+y*gen(3)+gen(2)+gen(1) -x^2*gen(1)+x*gen(3)+2*x*gen(2)+3*y*gen(2)+gen(1)

Basic manipulation

AbstractAlgebra.number_of_generatorsMethod
number_of_generators(I::smodule)

Return the number of generators in the current representation of the module (as a list of vectors).

source
LinearAlgebra.rankMethod
rank(I::smodule)

Return the rank $n$ of the ambient space $R^n$ of which this module is a submodule.

source

Singular.jl overloads the setindex! and getindex functions so that one can access the generators of a module using array notation. Each entry is a vector in $R^n$.

M[n::Int]
Base.iszeroMethod
iszero(p::smodule)

Return true if this is algebraically the zero module.

source

Examples

julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"])
+x^2*gen(1)+x*gen(3)+2*x*gen(2)+3*y*gen(2)+gen(1)

Basic manipulation

AbstractAlgebra.number_of_generatorsMethod
number_of_generators(I::smodule)

Return the number of generators in the current representation of the module (as a list of vectors).

source
LinearAlgebra.rankMethod
rank(I::smodule)

Return the rank $n$ of the ambient space $R^n$ of which this module is a submodule.

source

Singular.jl overloads the setindex! and getindex functions so that one can access the generators of a module using array notation. Each entry is a vector in $R^n$.

M[n::Int]
Base.iszeroMethod
iszero(p::smodule)

Return true if this is algebraically the zero module.

source

Examples

julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"])
 (Singular polynomial ring (QQ),(x,y),(dp(2),C), spoly{n_Q}[x, y])
 
 julia> v1 = vector(R, x + 1, x*y + 1, y)
@@ -35,7 +35,7 @@
 3
 
 julia> d = number_of_generators(M)
-2

Standard basis

Statistics.stdMethod
std(I::smodule; complete_reduction::Bool=false)

Compute the Groebner basis of the module $I$. If complete_reduction is set to true, the result is unique, up to permutation of the generators and multiplication by constants. If not, only the leading terms are unique (up to permutation of the generators and multiplication by constants, of course). Presently the polynomial ring used must be over a field or over the Singular integers.

source
Singular.lift_stdMethod
lift_std(M::smodule)

Computes the Groebner base G of M and the transformation matrix T such that (Matrix(G) = Matrix(M) * T).

source
Singular.lift_std_syzMethod
lift_std_syz(M::smodule)

Computes the Groebner base G of M, the transformation matrix T and the syzygies of M. Returns a tuple (G,T,S) satisfying (Matrix(G) = Matrix(M) * T, 0=Matrix(M)*Matrix(S)).

source

Examples

julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"])
+2

Standard basis

Statistics.stdMethod
std(I::smodule; complete_reduction::Bool=false)

Compute the Groebner basis of the module $I$. If complete_reduction is set to true, the result is unique, up to permutation of the generators and multiplication by constants. If not, only the leading terms are unique (up to permutation of the generators and multiplication by constants, of course). Presently the polynomial ring used must be over a field or over the Singular integers.

source
Singular.lift_stdMethod
lift_std(M::smodule)

Computes the Groebner base G of M and the transformation matrix T such that (Matrix(G) = Matrix(M) * T).

source
Singular.lift_std_syzMethod
lift_std_syz(M::smodule)

Computes the Groebner base G of M, the transformation matrix T and the syzygies of M. Returns a tuple (G,T,S) satisfying (Matrix(G) = Matrix(M) * T, 0=Matrix(M)*Matrix(S)).

source

Examples

julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"])
 (Singular polynomial ring (QQ),(x,y),(dp(2),C), spoly{n_Q}[x, y])
 
 julia> v1 = vector(R, x + 1, x*y + 1, y)
@@ -57,7 +57,7 @@
 Singular module over Singular polynomial ring (QQ),(x,y),(dp(2),C), with generators:
 y^2*gen(3)+x*gen(1)+y*gen(2)+gen(2)
 x*y*gen(2)+x*gen(1)+y*gen(3)+gen(2)+gen(1)
-x^2*gen(1)+x*gen(3)+2*x*gen(2)+3*y*gen(2)+gen(1)

Reduction

Base.reduceMethod
reduce(M::smodule, G::smodule; complete_reduction::Bool = true)

Return a submodule whose generators are the generators of $M$ reduced by the submodule $G$. The submodule $G$ need not be a Groebner basis. The returned submodule will have the same number of generators as $M$, even if they are zero.

source

Examples

julia> R, (x, y, z) = polynomial_ring(QQ, ["x", "y", "z"])
+x^2*gen(1)+x*gen(3)+2*x*gen(2)+3*y*gen(2)+gen(1)

Reduction

Base.reduceMethod
reduce(M::smodule, G::smodule; complete_reduction::Bool = true)

Return a submodule whose generators are the generators of $M$ reduced by the submodule $G$. The submodule $G$ need not be a Groebner basis. The returned submodule will have the same number of generators as $M$, even if they are zero.

source

Examples

julia> R, (x, y, z) = polynomial_ring(QQ, ["x", "y", "z"])
 (Singular polynomial ring (QQ),(x,y,z),(dp(3),C), spoly{n_Q}[x, y, z])
 
 julia> v1 = vector(R, R(0), z, -y)
@@ -92,7 +92,7 @@
 julia> reduce(V,B)
 Singular module over Singular polynomial ring (QQ),(x,y,z),(dp(3),C), with generators:
 0
-

Syzygies

Singular.syzMethod
syz(M::smodule)

Compute the module of syzygies of the given module. This will be given as a set of generators in an ambient space $R^n$, where $n$ is the number of generators in $M$.

source

Examples

julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"])
+

Syzygies

Singular.syzMethod
syz(M::smodule)

Compute the module of syzygies of the given module. This will be given as a set of generators in an ambient space $R^n$, where $n$ is the number of generators in $M$.

source

Examples

julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"])
 (Singular polynomial ring (QQ),(x,y),(dp(2),C), spoly{n_Q}[x, y])
 
 julia> v1 = vector(R, (x + 1)*y, (x*y + 1)*y, y)
@@ -108,7 +108,7 @@
 
 julia> Z = syz(M)
 Singular module over Singular polynomial ring (QQ),(x,y),(dp(2),C), with generators:
-x*gen(1)-y*gen(2)

Free resolutions

Singular.sresMethod
sres(I::smodule{spoly{T}}, max_length::Int) where T <: Singular.FieldElem

Compute a free resolution of the given module $I$ of length up to the given maximum length. If max_length is set to zero, a full length free resolution is computed. Each element of the resolution is itself a module.

source

Examples

julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"])
+x*gen(1)-y*gen(2)

Free resolutions

Singular.sresMethod
sres(I::smodule{spoly{T}}, max_length::Int) where T <: Singular.FieldElem

Compute a free resolution of the given module $I$ of length up to the given maximum length. If max_length is set to zero, a full length free resolution is computed. Each element of the resolution is itself a module.

source

Examples

julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"])
 (Singular polynomial ring (QQ),(x,y),(dp(2),C), spoly{n_Q}[x, y])
 
 julia> v1 = vector(R, x + 1, x*y + 1, y)
@@ -135,7 +135,7 @@
 0]
 
 julia> iszero(M1*M2) # test we have a complex
-true

Jet of module

Singular.jetMethod
jet(M::smodule, n::Int)

Given a module $M$ this function truncates the generators of $M$ up to degree $n$.

source

Examples

julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"])
+true

Jet of module

Singular.jetMethod
jet(M::smodule, n::Int)

Given a module $M$ this function truncates the generators of $M$ up to degree $n$.

source

Examples

julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"])
 (Singular polynomial ring (QQ),(x,y),(dp(2),C), spoly{n_Q}[x, y])
 
 julia> v1 = vector(R, x + 1, x*y + 1, y)
@@ -152,7 +152,7 @@
 julia> N = jet(M,3)
 Singular module over Singular polynomial ring (QQ),(x,y),(dp(2),C), with generators:
 x*y*gen(2)+x*gen(1)+y*gen(3)+gen(2)+gen(1)
-2*x^3*gen(2)+x^2*gen(3)+3*y^2*gen(2)+gen(1)

Operations over local rings

If the base ring R is a local ring, a minimal generating set can be computed using the following function

Singular.minimal_generating_setMethod
minimal_generating_set(M::smodule)

Return a vector containing the minimal generators of $M$.

source

Examples

julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"]; ordering=:negdegrevlex)
+2*x^3*gen(2)+x^2*gen(3)+3*y^2*gen(2)+gen(1)

Operations over local rings

If the base ring R is a local ring, a minimal generating set can be computed using the following function

Singular.minimal_generating_setMethod
minimal_generating_set(M::smodule)

Return a vector containing the minimal generators of $M$.

source

Examples

julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"]; ordering=:negdegrevlex)
 (Singular polynomial ring (QQ),(x,y),(ds(2),C), spoly{n_Q}[x, y])
 
 julia> has_local_ordering(R) == true
@@ -176,4 +176,4 @@
 julia> min = minimal_generating_set(M)
 2-element Vector{svector{spoly{n_Q}}}:
  y*gen(2)+y*gen(1)
- x*gen(1)-y*gen(2)-y*gen(1)+y^2*gen(2)
+ x*gen(1)-y*gen(2)-y*gen(1)+y^2*gen(2) diff --git a/dev/nemo/index.html b/dev/nemo/index.html index 2aaf2d4ef..df2f7b433 100644 --- a/dev/nemo/index.html +++ b/dev/nemo/index.html @@ -2,4 +2,4 @@ Nemo rings and fields · Singular.jl

Nemo rings and fields

Any type that satisfies AbstractAlgebra.jl Ring or Field interface, such as all Nemo ring and field types, can be used as coefficient rings in Singular.jl. These are implemented via the Singular n_RingElem{T} and n_FieldElem{T} types, parameterised by the given Nemo/AbstractAlgebra element type.

The associated parent object of type N_Ring{T} or N_Field{T} can be constructed by a call to the CoefficientRing constructor. In practice, however, this constructor is only used internally, and Nemo rings and fields work directly as Singular coefficient rings, and all the coercions and ad hoc functions that one would expect to be present are implemented.

The Singular.jl n_RingElem (resp. n_FieldElem) types belong directly to the abstract type RingElem (resp. FieldElem) and their parent object types belong to the abstract type Ring (resp. Field). We also have the following type definitions for compatibility with previous version of Singular.jl.

const N_unknown{T} = Union{N_Ring{T}, N_Field{T}}
 const n_unknown{T} = Union{n_RingElem{T}, n_FieldElem{T}}

All of the Singular polynomial arithmetic should work for any Nemo ring and everything, including ideals, modules, standard basis, syzygies, resolutions, etc., should work with any Nemo field.

Specialised efficient wrappers exist for certain Nemo coefficient ring types.

Nemo ring functionality

Singular.jl foreign ring types provide all of the AbstractAlgebra defined ring and some field functionality.

https://nemocas.github.io/AbstractAlgebra.jl/latest/ring

https://nemocas.github.io/AbstractAlgebra.jl/latest/field

Parts of the Euclidean Ring interface may also be implemented, though Singular will report an error if division is meaningless (even after cancelling zero divisors).

https://nemocas.github.io/AbstractAlgebra.jl/latest/euclidean_interface

Below, we describe the functionality that is specific to the Singular foreign ring interface that is not already listed at the given links.

Constructors

Given an AbstractAlgebra compatible ring $R$, e.g. a Nemo ring, we have the following constructor, which returns the associated Singular.jl coefficient ring.

CoefficientRing(R::Ring)

If there are generators to be coerced from Nemo/AbstractAlgebra into corresponding elements, the Singular.jl coefficient ring can be used to coerce them to a Singular n_RingElem or n_FieldElem element.

Examples

R, x = Nemo.polynomial_ring(ZZ, "x")
 S = CoefficientRing(R)
-t = S(x)

Note that it is unlikely that a user directly needs to construct the Singular coefficient ring from a Nemo ring, since the Singular.jl constructors are designed to accept Nemo coefficient rings directly. Singular.jl automatically constructs the required Singular coefficient ring and makes use of it.

+t = S(x)

Note that it is unlikely that a user directly needs to construct the Singular coefficient ring from a Nemo ring, since the Singular.jl constructors are designed to accept Nemo coefficient rings directly. Singular.jl automatically constructs the required Singular coefficient ring and makes use of it.

diff --git a/dev/noncommutative/index.html b/dev/noncommutative/index.html index 34d4d59ea..c6289e9e3 100644 --- a/dev/noncommutative/index.html +++ b/dev/noncommutative/index.html @@ -88,4 +88,4 @@ julia> push_term!(B, QQ(-1), Int[]); julia> finish(B) -2*z*y*x*z - 1 +2*z*y*x*z - 1 diff --git a/dev/polynomial/index.html b/dev/polynomial/index.html index eaccf139e..568241538 100644 --- a/dev/polynomial/index.html +++ b/dev/polynomial/index.html @@ -25,13 +25,13 @@ x*y^2 + 3*x*y - y julia> f = finish(C) -x*y^2 + 3*x*y - y

Term orderings

A general term ordering can be constructed as a product of one or more of the following block orderings.

Singular.ordering_lpFunction
ordering_lp(nvars::Int = 1)

Represents a block of at least nvars variables with the lexicographical ordering (:lex) (the Singular ordering lp).

source
Singular.ordering_ipFunction
ordering_ip(nvars::Int = 1)

Represents a block of at least nvars variables with the Singular ordering ip. This stands for what the Singular manual refers to as "reverse lexicographical ordering" (and is elsewhere sometimes called "inverse lexicographical ordering), i.e. a lexicographical ordering from the right with 1 < x_1 < ... <x_n.

Note that this reverses the "natural" order x_1 > ... > x_n.

source
Singular.ordering_rpFunction
ordering_rp(nvars::Int = 1)

Represents a block of at least nvars variables with the inverse lexicographical ordering (:invlex) (the Singular ordering ip).

Note that this reverses the "natural" order x_1 > ... > x_n.

source
Singular.ordering_dpFunction
ordering_dp(nvars::Int = 1)

Represents a block of at least nvars variables with the degree reverse lexicographical ordering (:degrevlex) (the Singular ordering dp).

source
Singular.ordering_DpFunction
ordering_Dp(nvars::Int = 1)

Represents a block of at least nvars variables with the degree lexicographical ordering (:deglex) (the Singular ordering Dp).

source
Singular.ordering_wpMethod
ordering_wp(w::Vector{Int})

Represents a block of variables with the weighted reverse lexicographical ordering. The weight vector w is expected to consist of positive integers only. (the Singular ordering wp).

source
Singular.ordering_WpMethod
ordering_Wp(w::Vector{Int})

Represents a block of variables with the weighted lexicographical ordering. The weight vector is expected to consist of positive integers only. (the Singular ordering Wp).

source
Singular.ordering_IpFunction
ordering_Ip(nvars::Int = 1)

Represents a block of at least nvars variables with the degree inverse lexicographical ordering (:deginvlex) (the Singular ordering Ip).

Note that this reverses the "natural" order x_1 > ... > x_n.

source
Singular.ordering_lsFunction
ordering_ls(nvars::Int = 1)

Represents a block of at least nvars variables with the negative lexicographical ordering (:neglex) (the Singular ordering ls).

source
Singular.ordering_isFunction
ordering_is(nvars::Int = 1)

Represents a block of at least nvars variables with the negative inverse lexicographical ordering (:neginvlex) (the Singular ordering is)

Note that this reverses the "natural" order x_1 > ... > x_n.

source
Singular.ordering_rsFunction
ordering_rs(nvars::Int = 1)

Represents a block of at least nvars variables with the negative inverse lexicographical ordering (:neginvlex) (the Singular ordering is)

Note that this reverses the "natural" order x_1 > ... > x_n.

source
Singular.ordering_dsFunction
ordering_ds(nvars::Int = 1)

Represents a block of at least nvars variables with the negative degree reverse lexicographical ordering (:negdegrevlex) (the Singular ordering ds).

source
Singular.ordering_DsFunction
ordering_Ds(nvars::Int = 1)

Represents a block of at least nvars variables with the negative degree reverse lexicographical ordering (:negdeglex). (the Singular ordering Ds).

source
Singular.ordering_wsMethod
ordering_ws(w::Vector{Int})

Represents a block of variables with the general weighted reverse lexicographical ordering. The weight vector w is expected to have a nonzero first entry. (the Singular ordering ws).

source
Singular.ordering_WsMethod
ordering_Ws(w::Vector{Int})

Represents a block of variables with the general weighted lexicographical ordering. The weight vector w is expected to have a nonzero first entry. (the Singular ordering Ws).

source
Singular.ordering_aMethod
ordering_a(w::Vector{Int})

Represents an extra weight vector that may precede any monomial ordering. An extra weight vector does not define a monomial ordering by itself: it can only be used in combination with other orderings to insert an extra line of weights into the ordering matrix. (the Singular ordering a).

source
Singular.ordering_MMethod
ordering_M(m::Matrix{Int}; checked::Bool = true)

Represents a block of variables with a general matrix ordering. The matrix m is expected to be invertible, and this is checked by default. (the Singular ordering M).

source
Singular.ordering_CMethod
ordering_C()

Represents an ascending ordering on vector components gen(1) < gen(2) < .... All monomial block orderings preceding the component ordering have higher precedence, and all succeeding monomial block orderings have lower precedence. It is not necessary to specify this ordering explicitly since it appended automatically to an ordering lacking a component specification. (the Singular ordering C).

source
Singular.ordering_cMethod
ordering_c()

Represents a descending ordering on vector components gen(1) > gen(2) > .... All monomial block orderings preceding the component ordering have higher precedence, and all succeeding monomial block orderings have lower precedence. (the Singular ordering c).

source

Examples

polynomial_ring(QQ, "x".*string.(1:8), ordering = ordering_M([1 2; 3 5])*ordering_lp(3)*ordering_wp([1, 2, 3]))
+x*y^2 + 3*x*y - y

Term orderings

A general term ordering can be constructed as a product of one or more of the following block orderings.

Singular.ordering_lpFunction
ordering_lp(nvars::Int = 1)

Represents a block of at least nvars variables with the lexicographical ordering (:lex) (the Singular ordering lp).

source
Singular.ordering_ipFunction
ordering_ip(nvars::Int = 1)

Represents a block of at least nvars variables with the Singular ordering ip. This stands for what the Singular manual refers to as "reverse lexicographical ordering" (and is elsewhere sometimes called "inverse lexicographical ordering), i.e. a lexicographical ordering from the right with 1 < x_1 < ... <x_n.

Note that this reverses the "natural" order x_1 > ... > x_n.

source
Singular.ordering_rpFunction
ordering_rp(nvars::Int = 1)

Represents a block of at least nvars variables with the inverse lexicographical ordering (:invlex) (the Singular ordering ip).

Note that this reverses the "natural" order x_1 > ... > x_n.

source
Singular.ordering_dpFunction
ordering_dp(nvars::Int = 1)

Represents a block of at least nvars variables with the degree reverse lexicographical ordering (:degrevlex) (the Singular ordering dp).

source
Singular.ordering_DpFunction
ordering_Dp(nvars::Int = 1)

Represents a block of at least nvars variables with the degree lexicographical ordering (:deglex) (the Singular ordering Dp).

source
Singular.ordering_wpMethod
ordering_wp(w::Vector{Int})

Represents a block of variables with the weighted reverse lexicographical ordering. The weight vector w is expected to consist of positive integers only. (the Singular ordering wp).

source
Singular.ordering_WpMethod
ordering_Wp(w::Vector{Int})

Represents a block of variables with the weighted lexicographical ordering. The weight vector is expected to consist of positive integers only. (the Singular ordering Wp).

source
Singular.ordering_IpFunction
ordering_Ip(nvars::Int = 1)

Represents a block of at least nvars variables with the degree inverse lexicographical ordering (:deginvlex) (the Singular ordering Ip).

Note that this reverses the "natural" order x_1 > ... > x_n.

source
Singular.ordering_lsFunction
ordering_ls(nvars::Int = 1)

Represents a block of at least nvars variables with the negative lexicographical ordering (:neglex) (the Singular ordering ls).

source
Singular.ordering_isFunction
ordering_is(nvars::Int = 1)

Represents a block of at least nvars variables with the negative inverse lexicographical ordering (:neginvlex) (the Singular ordering is)

Note that this reverses the "natural" order x_1 > ... > x_n.

source
Singular.ordering_rsFunction
ordering_rs(nvars::Int = 1)

Represents a block of at least nvars variables with the negative inverse lexicographical ordering (:neginvlex) (the Singular ordering is)

Note that this reverses the "natural" order x_1 > ... > x_n.

source
Singular.ordering_dsFunction
ordering_ds(nvars::Int = 1)

Represents a block of at least nvars variables with the negative degree reverse lexicographical ordering (:negdegrevlex) (the Singular ordering ds).

source
Singular.ordering_DsFunction
ordering_Ds(nvars::Int = 1)

Represents a block of at least nvars variables with the negative degree reverse lexicographical ordering (:negdeglex). (the Singular ordering Ds).

source
Singular.ordering_wsMethod
ordering_ws(w::Vector{Int})

Represents a block of variables with the general weighted reverse lexicographical ordering. The weight vector w is expected to have a nonzero first entry. (the Singular ordering ws).

source
Singular.ordering_WsMethod
ordering_Ws(w::Vector{Int})

Represents a block of variables with the general weighted lexicographical ordering. The weight vector w is expected to have a nonzero first entry. (the Singular ordering Ws).

source
Singular.ordering_aMethod
ordering_a(w::Vector{Int})

Represents an extra weight vector that may precede any monomial ordering. An extra weight vector does not define a monomial ordering by itself: it can only be used in combination with other orderings to insert an extra line of weights into the ordering matrix. (the Singular ordering a).

source
Singular.ordering_MMethod
ordering_M(m::Matrix{Int}; checked::Bool = true)

Represents a block of variables with a general matrix ordering. The matrix m is expected to be invertible, and this is checked by default. (the Singular ordering M).

source
Singular.ordering_CMethod
ordering_C()

Represents an ascending ordering on vector components gen(1) < gen(2) < .... All monomial block orderings preceding the component ordering have higher precedence, and all succeeding monomial block orderings have lower precedence. It is not necessary to specify this ordering explicitly since it appended automatically to an ordering lacking a component specification. (the Singular ordering C).

source
Singular.ordering_cMethod
ordering_c()

Represents a descending ordering on vector components gen(1) > gen(2) > .... All monomial block orderings preceding the component ordering have higher precedence, and all succeeding monomial block orderings have lower precedence. (the Singular ordering c).

source

Examples

polynomial_ring(QQ, "x".*string.(1:8), ordering = ordering_M([1 2; 3 5])*ordering_lp(3)*ordering_wp([1, 2, 3]))
 
 polynomial_ring(QQ, "x".*string.(1:5), ordering = ordering_dp(3)*ordering_dp())

Polynomial ring macros

For convenience, we provide some macros for constructing polynomial rings and injecting the variables into scope. These are easier to use, but have some limitations. In particular, they can only be used at the top level by the user, and cannot be used programmatically or in library code (it is not possible to inject an arbitrary number of variables into scope inside a function).

The macros are designed for simple use cases, and do not offer the full power of the most general constructor above.

@polynomial_ring(R, s, n, o)

Given a coefficient ring $R$, a root variable name, e.g. "x", a number of variable $n$ and a polynomial term ordering o, create the variables x1, x2, ..., xn and inject them into scope, and return the corresponding polynomial ring S.

@polynomial_ring(R, s, n)

As per the previous macro, with a default of :degrevlex for the polynomial term ordering.

Examples

julia> S = @polynomial_ring(ZZ, "x", 5, :deglex)
 Singular polynomial ring (ZZ),(x1,x2,x3,x4,x5),(Dp(5),C)
 
 julia> T = @polynomial_ring(QQ, "y", 10)
-Singular polynomial ring (QQ),(y1,y2,y3,y4,y5,y6,y7,y8,y9,y10),(dp(10),C)

Basic manipulation

Singular.has_global_orderingMethod
has_global_ordering(R::PolyRingUnion)

Return true if the given ring has a global ordering, i.e. if $1 < x$ for each variable $x$ in the ring. This include :lex, :deglex and :degrevlex orderings.

source
Singular.has_mixed_orderingMethod
has_mixed_ordering(R::PolyRingUnion)

Return true if the given ring has a mixed ordering, i.e. if $1 < x_i$ for a variable $x_i$ and $1>x_j$ for another variable $x_j$.

source
Singular.has_local_orderingMethod
has_local_ordering(R::PolyRingUnion)

Return true if the given ring has a local ordering, i.e. if $1 > x$ for all variables $x$.

source
Singular.degree_boundMethod
degree_bound(R::PolyRing)

Return the internal degree bound in each variable, enforced by Singular. This is the largest positive value any degree can have before an overflow will occur. This internal bound may be higher than the bound requested by the user via the degree_bound parameter of the polynomial_ring constructor.

source
AbstractAlgebra.Generic.total_degreeMethod
total_degree(p::spoly)

Return the total degree (largest sum of exponents of any monomial) of $p$.

source
AbstractAlgebra.orderMethod
order(p::spoly)

Return the order of $p$.

source

Examples

julia> R = @polynomial_ring(ZZ, "x", 3)
+Singular polynomial ring (QQ),(y1,y2,y3,y4,y5,y6,y7,y8,y9,y10),(dp(10),C)

Basic manipulation

Singular.has_global_orderingMethod
has_global_ordering(R::PolyRingUnion)

Return true if the given ring has a global ordering, i.e. if $1 < x$ for each variable $x$ in the ring. This include :lex, :deglex and :degrevlex orderings.

source
Singular.has_mixed_orderingMethod
has_mixed_ordering(R::PolyRingUnion)

Return true if the given ring has a mixed ordering, i.e. if $1 < x_i$ for a variable $x_i$ and $1>x_j$ for another variable $x_j$.

source
Singular.has_local_orderingMethod
has_local_ordering(R::PolyRingUnion)

Return true if the given ring has a local ordering, i.e. if $1 > x$ for all variables $x$.

source
Singular.degree_boundMethod
degree_bound(R::PolyRing)

Return the internal degree bound in each variable, enforced by Singular. This is the largest positive value any degree can have before an overflow will occur. This internal bound may be higher than the bound requested by the user via the degree_bound parameter of the polynomial_ring constructor.

source
AbstractAlgebra.Generic.total_degreeMethod
total_degree(p::spoly)

Return the total degree (largest sum of exponents of any monomial) of $p$.

source
AbstractAlgebra.orderMethod
order(p::spoly)

Return the order of $p$.

source

Examples

julia> R = @polynomial_ring(ZZ, "x", 3)
 Singular polynomial ring (ZZ),(x1,x2,x3),(dp(3),C)
 
 julia> n = nvars(R)
@@ -56,7 +56,7 @@
 3
 
 julia> ord = order(x1*x2 + 3x1*x2^2 + x3 + 2)
-0

Differential functions

Working over any coefficient ring, basic functionality involving differential operations is available.

Singular.jetMethod
jet(x::spoly{T}, n::Int) where T <: Nemo.RingElem

Return the truncation of $x$ up to degree $n$.

source
AbstractAlgebra.derivativeMethod
derivative(x::spoly{T}, n::Int) where T <: Nemo.RingElem

Return the derivative of $x$ with respect to the variable of index $n$.

source
AbstractAlgebra.derivativeMethod
derivative(x::spoly{T}, v::spoly{T}) where T <: Nemo.RingElem

Return the derivative of $x$ with respect to the variable $v$.

source
Singular.jacobian_idealMethod
jacobian_ideal(p::spoly{T}) where T <: Nemo.RingElem

Return the ideal generated by all partial derivatives of $x$.

source
Singular.jacobian_matrixMethod
jacobian_matrix(p::spoly{T}) where T <: Nemo.RingElem

Return the column matrix $\{\frac{\partial p}{\partial x_i}\}_i$ of partial derivatives.

source
Singular.jacobian_matrixMethod
jacobian_matrix(a::Vector{spoly{T}}) where T <: Nemo.RingElem

Return the matrix $\{\frac{\partial a_i}{\partial x_j}\}_{ij}$ of partial derivatives.

source

Examples

julia> R, (x, y, z) = polynomial_ring(QQ, ["x", "y", "z"])
+0

Differential functions

Working over any coefficient ring, basic functionality involving differential operations is available.

Singular.jetMethod
jet(x::spoly{T}, n::Int) where T <: Nemo.RingElem

Return the truncation of $x$ up to degree $n$.

source
AbstractAlgebra.derivativeMethod
derivative(x::spoly{T}, n::Int) where T <: Nemo.RingElem

Return the derivative of $x$ with respect to the variable of index $n$.

source
AbstractAlgebra.derivativeMethod
derivative(x::spoly{T}, v::spoly{T}) where T <: Nemo.RingElem

Return the derivative of $x$ with respect to the variable $v$.

source
Singular.jacobian_idealMethod
jacobian_ideal(p::spoly{T}) where T <: Nemo.RingElem

Return the ideal generated by all partial derivatives of $x$.

source
Singular.jacobian_matrixMethod
jacobian_matrix(p::spoly{T}) where T <: Nemo.RingElem

Return the column matrix $\{\frac{\partial p}{\partial x_i}\}_i$ of partial derivatives.

source
Singular.jacobian_matrixMethod
jacobian_matrix(a::Vector{spoly{T}}) where T <: Nemo.RingElem

Return the matrix $\{\frac{\partial a_i}{\partial x_j}\}_{ij}$ of partial derivatives.

source

Examples

julia> R, (x, y, z) = polynomial_ring(QQ, ["x", "y", "z"])
 (Singular polynomial ring (QQ),(x,y,z),(dp(3),C), spoly{n_Q}[x, y, z])
 
 julia> f = x^2*y*z + z^2*x + x*y*z
@@ -81,7 +81,7 @@
 
 julia> Jf2 = jacobian_matrix([f, g])
 [2*x*y*z + y*z + z^2, x^2*z + x*z, x^2*y + x*y + 2*x*z
-y*z + z^2, x*z, x*y + 2*x*z]

Content and primitive part

When coefficient rings have a meaningful GCD function, the following functions are available.

AbstractAlgebra.primpartMethod
primpart(x::SPolyUnion)

Return the primitive part of the polynomial, i.e. the polynomial divided by the GCD of its coefficients.

source
AbstractAlgebra.contentMethod
content(x::SPolyUnion)

Return the content of the polynomial, i.e. the GCD of its coefficients.

source

Examples

julia> R = @polynomial_ring(ZZ, "x", 2)
+y*z + z^2, x*z, x*y + 2*x*z]

Content and primitive part

When coefficient rings have a meaningful GCD function, the following functions are available.

AbstractAlgebra.primpartMethod
primpart(x::SPolyUnion)

Return the primitive part of the polynomial, i.e. the polynomial divided by the GCD of its coefficients.

source
AbstractAlgebra.contentMethod
content(x::SPolyUnion)

Return the content of the polynomial, i.e. the GCD of its coefficients.

source

Examples

julia> R = @polynomial_ring(ZZ, "x", 2)
 Singular polynomial ring (ZZ),(x1,x2),(dp(2),C)
 
 julia> f = 3x1^2 + 3x1*x2 + 6x2^2
@@ -91,7 +91,7 @@
 x1^2 + x1*x2 + 2*x2^2
 
 julia> c = content(f)
-3

Homogeneous polynomials

Singular.homogenizeMethod
homogenize(p::spoly{T}, v::spoly{T}) where T <: Nemo.RingElem

Multiply each monomial in p by a suitable power of the variable v and return the corresponding homogeneous polynomial. The variable v must have weight 1.

source

Multivariate Factorisation

For the Singular base fields QQ and Fp a function to compute a squarefree factorization is available.

Examples

julia> R = @polynomial_ring(QQ, "x", 4)
+3

Homogeneous polynomials

Singular.homogenizeMethod
homogenize(p::spoly{T}, v::spoly{T}) where T <: Nemo.RingElem

Multiply each monomial in p by a suitable power of the variable v and return the corresponding homogeneous polynomial. The variable v must have weight 1.

source

Multivariate Factorisation

For the Singular base fields QQ and Fp a function to compute a squarefree factorization is available.

Examples

julia> R = @polynomial_ring(QQ, "x", 4)
 Singular Polynomial Ring (QQ),(x1,x2,x3,x4),(dp(4),C)
 
 julia> f = 123*(57*x2^3 + x4^5)^3*(x1^2 + x1+1)^2*(x1 + x2*x3)^2;
@@ -117,4 +117,4 @@
 
 p = x^5 + y^3+1
 
-p2 change_base_ring(CoefficientRing(Nemo.QQ), p)
+p2 change_base_ring(CoefficientRing(Nemo.QQ), p) diff --git a/dev/qring/index.html b/dev/qring/index.html index f59f80487..3165134fb 100644 --- a/dev/qring/index.html +++ b/dev/qring/index.html @@ -1,5 +1,5 @@ -Quotient Rings · Singular.jl

Quotient Rings

Quotient rings $Q = R/I$ in Singular.jl are constructed with the constructor QuotientRing(R, I). The input ideal $I$ to the constructor must be a Groebner basis. The $R$-ideal $I$ may be recovered as quotient_ideal(Q).

Singular.is_quotient_ringMethod
is_quotient_ring(R::PolyRingUnion)

Return true if the given ring is the quotient of a polynomial ring with a non - zero ideal.

source

Examples

julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"]);
+Quotient Rings · Singular.jl

Quotient Rings

Quotient rings $Q = R/I$ in Singular.jl are constructed with the constructor QuotientRing(R, I). The input ideal $I$ to the constructor must be a Groebner basis. The $R$-ideal $I$ may be recovered as quotient_ideal(Q).

Singular.is_quotient_ringMethod
is_quotient_ring(R::PolyRingUnion)

Return true if the given ring is the quotient of a polynomial ring with a non - zero ideal.

source

Examples

julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"]);
 
 julia> is_quotient_ring(R)
 false
@@ -18,4 +18,4 @@
 Singular ideal over Singular polynomial ring (QQ),(x,y),(dp(2),C) with generators (x*y, y^3, x^2 + y^2)
 
 julia> base_ring(quotient_ideal(Q1)) == base_ring(quotient_ideal(Q2))
-true
+true
diff --git a/dev/rational/index.html b/dev/rational/index.html index b82ca9120..dd9ddc931 100644 --- a/dev/rational/index.html +++ b/dev/rational/index.html @@ -28,9 +28,9 @@ true julia> 5 >= b -true

Rational reconstruction

Nemo.reconstructMethod
reconstruct(x::n_Z, y::n_Z)

Given $x$ modulo $y$, find $r/s$ such that $x \equiv r/s \pmod{y}$ for values $r$ and $s$ satisfying the bound $y > 2(|r| + 1)(s + 1)$.

source

The following ad hoc versions of the same function also exist.

reconstruct(::n_Z, ::Integer)
+true

Rational reconstruction

Nemo.reconstructMethod
reconstruct(x::n_Z, y::n_Z)

Given $x$ modulo $y$, find $r/s$ such that $x \equiv r/s \pmod{y}$ for values $r$ and $s$ satisfying the bound $y > 2(|r| + 1)(s + 1)$.

source

The following ad hoc versions of the same function also exist.

reconstruct(::n_Z, ::Integer)
 reconstruct(::Integer, ::n_Z)

Examples

julia> q1 = reconstruct(ZZ(7), ZZ(3))
 1
 
 julia> q2 = reconstruct(ZZ(7), 5)
--1//2
+-1//2 diff --git a/dev/resolution/index.html b/dev/resolution/index.html index 7f048ba11..680f4dece 100644 --- a/dev/resolution/index.html +++ b/dev/resolution/index.html @@ -1,5 +1,5 @@ -Resolutions · Singular.jl

Resolutions

Functions for creating free resolutions of modules and ideals in Singular.jl return a special Singular object of type sresolution{T}. The support in Singular.jl for this type primarily exists to allow interaction with such resolutions. Free resolutions can have the property of being minimal, which is specified by the minimal field of the sresolution{T} type.

Resolution objects have a parent object which represents the set of resolutions they belong to, the data for which is given by the polynomial ring $R$ over which the modules in the resolution are defined.

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

LibraryElement typeParent type
Singularsresolution{T}Singular.ResolutionSet{T}

These types are parameterised by the type of elements in the polynomial ring $R$ over which the modules belonging to the resolution are defined.

All resolution types belong directly to the abstract type SetElem and all the resolution set parent object types belong to the abstract type Set.

Resolution functionality

Singular.jl resolutions implement standard operations one would expect on all AbstractAlgebra compatible objects. These include:

  • Operations common to all AbstractAlgebra objects, such as parent, base_ring, elem_type, parent_type, parent, deepcopy, etc.

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

Constructors

There are currently two ways to create resolutions in Singular.jl: They can either be created by taking the free resolution of an ideal or module over a polynomial ring, as described in the relevant sections of the documentation, or they can be created by the following constructor:

Singular.ResolutionMethod
Resolution(C::Vector{smodule{T}}) where T <: AbstractAlgebra.RingElem

Create a new resolution whose maps are given by the elements of an array C of modules. Note that it is not checked that the maps are actually composable and that their pairwise composition is the zero map, that is, that the created resolution is a complex.

source

Example

julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"])
+Resolutions · Singular.jl

Resolutions

Functions for creating free resolutions of modules and ideals in Singular.jl return a special Singular object of type sresolution{T}. The support in Singular.jl for this type primarily exists to allow interaction with such resolutions. Free resolutions can have the property of being minimal, which is specified by the minimal field of the sresolution{T} type.

Resolution objects have a parent object which represents the set of resolutions they belong to, the data for which is given by the polynomial ring $R$ over which the modules in the resolution are defined.

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

LibraryElement typeParent type
Singularsresolution{T}Singular.ResolutionSet{T}

These types are parameterised by the type of elements in the polynomial ring $R$ over which the modules belonging to the resolution are defined.

All resolution types belong directly to the abstract type SetElem and all the resolution set parent object types belong to the abstract type Set.

Resolution functionality

Singular.jl resolutions implement standard operations one would expect on all AbstractAlgebra compatible objects. These include:

  • Operations common to all AbstractAlgebra objects, such as parent, base_ring, elem_type, parent_type, parent, deepcopy, etc.

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

Constructors

There are currently two ways to create resolutions in Singular.jl: They can either be created by taking the free resolution of an ideal or module over a polynomial ring, as described in the relevant sections of the documentation, or they can be created by the following constructor:

Singular.ResolutionMethod
Resolution(C::Vector{smodule{T}}) where T <: AbstractAlgebra.RingElem

Create a new resolution whose maps are given by the elements of an array C of modules. Note that it is not checked that the maps are actually composable and that their pairwise composition is the zero map, that is, that the created resolution is a complex.

source

Example

julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"])
 (Singular Polynomial Ring (QQ),(x,y),(dp(2),C), spoly{n_Q}[x, y])
 
 julia> M1 = Singular.Module(R, vector(R, x), vector(R, y))
@@ -20,7 +20,7 @@
 
 julia> F[2]
 Singular Module over Singular Polynomial Ring (QQ),(x,y),(dp(2),C), with Generators:
--x*gen(2)+y*gen(1)

Alternatively, resolutions can be refined to minimal resolutions, as described below.

Other than this, there are currently no additional ways to create resolutions in Singular.jl.

Basic manipulation

Base.lengthMethod
length(r::sresolution)

Return the length of the resolution. This is what is mathematically meant by the length of a resolution. Over a field, this should be at most the number of variables in the polynomial ring.

source

Singular.jl overloads the getindex function so that one can access the modules in a resolution $F$.

F[n::Int]

Examples

julia> R, (w, x, y, z) = polynomial_ring(QQ, ["w", "x", "y", "z"])
+-x*gen(2)+y*gen(1)

Alternatively, resolutions can be refined to minimal resolutions, as described below.

Other than this, there are currently no additional ways to create resolutions in Singular.jl.

Basic manipulation

Base.lengthMethod
length(r::sresolution)

Return the length of the resolution. This is what is mathematically meant by the length of a resolution. Over a field, this should be at most the number of variables in the polynomial ring.

source

Singular.jl overloads the getindex function so that one can access the modules in a resolution $F$.

F[n::Int]

Examples

julia> R, (w, x, y, z) = polynomial_ring(QQ, ["w", "x", "y", "z"])
 (Singular polynomial ring (QQ),(w,x,y,z),(dp(4),C), spoly{n_Q}[w, x, y, z])
 
 julia> I = Ideal(R, w^2 - x*z, w*x - y*z, x^2 - w*y, x*y - z^2, y^2 - w*z)
@@ -33,7 +33,7 @@
 3
 
 julia> M1 = F[1]
-Singular ideal over Singular polynomial ring (QQ),(w,x,y,z),(dp(4),C) with generators (y^2 - w*z, x*y - z^2, x^2 - w*y, w*x - y*z, w^2 - x*z)

Betti numbers

Singular.bettiMethod
betti(r::sresolution)

Return the Betti numbers, i.e. the ranks of the free modules in the given free resolution. These are returned as a Julia array of Ints. Note that the output of this command is useful only in the graded case.

source

Examples

julia> R, (w, x, y, z) = polynomial_ring(QQ, ["w", "x", "y", "z"])
+Singular ideal over Singular polynomial ring (QQ),(w,x,y,z),(dp(4),C) with generators (y^2 - w*z, x*y - z^2, x^2 - w*y, w*x - y*z, w^2 - x*z)

Betti numbers

Singular.bettiMethod
betti(r::sresolution)

Return the Betti numbers, i.e. the ranks of the free modules in the given free resolution. These are returned as a Julia array of Ints. Note that the output of this command is useful only in the graded case.

source

Examples

julia> R, (w, x, y, z) = polynomial_ring(QQ, ["w", "x", "y", "z"])
 (Singular polynomial ring (QQ),(w,x,y,z),(dp(4),C), spoly{n_Q}[w, x, y, z])
 
 julia> I = Ideal(R, w^2 - x*z, w*x - y*z, x^2 - w*y, x*y - z^2, y^2 - w*z)
@@ -49,7 +49,7 @@
 3×4 Matrix{Int32}:
  1  0  0  0
  0  5  5  0
- 0  0  0  1

Minimal resolutions

Singular.minresMethod
minres{T <: Nemo.FieldElem}(r::sresolution{spoly{T}})

Return a minimal free resolution, given any free resolution. In the graded case, there exists a uniquely determined minimal resolution. If the supplied resolution is already minimal, it may be returned without making a copy.

source

Examples

julia> R, (w, x, y, z) = polynomial_ring(QQ, ["w", "x", "y", "z"])
+ 0  0  0  1

Minimal resolutions

Singular.minresMethod
minres{T <: Nemo.FieldElem}(r::sresolution{spoly{T}})

Return a minimal free resolution, given any free resolution. In the graded case, there exists a uniquely determined minimal resolution. If the supplied resolution is already minimal, it may be returned without making a copy.

source

Examples

julia> R, (w, x, y, z) = polynomial_ring(QQ, ["w", "x", "y", "z"])
 (Singular polynomial ring (QQ),(w,x,y,z),(dp(4),C), spoly{n_Q}[w, x, y, z])
 
 julia> I = Ideal(R, w^2 - x*z, w*x - y*z, x^2 - w*y, x*y - z^2, y^2 - w*z)
@@ -59,4 +59,4 @@
 Singular resolution: R^1 <- R^5 <- R^6 <- R^2
 
 julia> M = minres(F)
-Singular resolution: R^1 <- R^5 <- R^5 <- R^1
+Singular resolution: R^1 <- R^5 <- R^5 <- R^1
diff --git a/dev/transExt/index.html b/dev/transExt/index.html index 12f3c49d7..bd41d5f74 100644 --- a/dev/transExt/index.html +++ b/dev/transExt/index.html @@ -1,5 +1,5 @@ -Function fields · Singular.jl

Function fields

Function fields are implemented via the Singular n_transExt type for prime fields of any characteristic.

The associated function field is represented by a parent object which can be constructed by a call to the FunctionField constructor.

The types of the parent objects and elements of the associated function fields are given in the following table according to the library providing them.

LibraryElement typeParent type
Singularn_transExtSingular.N_FField

All function field element types belong directly to the abstract type FieldElem and all the parent object types belong to the abstract type Field.

Function field functionality

Singular.jl function fields provide all the functionality for fields described by AbstractAlgebra.jl.

https://nemocas.github.io/AbstractAlgebra.jl/latest/field

Below, we describe the functionality that is specific to Singular function field and not already listed at the given link.

Constructors

The following constructors are available to create function fields and their elements.

Singular.FunctionFieldMethod
FunctionField(F::Singular.Field, S::AbstractVector{<:VarName})

Return a tuple $K, a$ consisting of a function field $K$ over the field $F$ with transcendence basis stored in the array $S$.

source

In case the user does not want to specify a transcendence basis the following constructor can be used.

Singular.FunctionFieldMethod
FunctionField(F::Singular.Field, n::Int)

Return a tuple $K, a$ consisting of a function field $K$ over the field $F$ with transcendence degree $n$ and transcendence basis $a1, ..., an$.

source

Given a function field $F$, we also have the following coercions in addition to the standard ones expected.

F(n::ZZRingElem)

Coerce a Flint integer value into the field.

Examples

julia> F1, (a, b, c) = FunctionField(QQ, ["a", "b", "c"])
+Function fields · Singular.jl

Function fields

Function fields are implemented via the Singular n_transExt type for prime fields of any characteristic.

The associated function field is represented by a parent object which can be constructed by a call to the FunctionField constructor.

The types of the parent objects and elements of the associated function fields are given in the following table according to the library providing them.

LibraryElement typeParent type
Singularn_transExtSingular.N_FField

All function field element types belong directly to the abstract type FieldElem and all the parent object types belong to the abstract type Field.

Function field functionality

Singular.jl function fields provide all the functionality for fields described by AbstractAlgebra.jl.

https://nemocas.github.io/AbstractAlgebra.jl/latest/field

Below, we describe the functionality that is specific to Singular function field and not already listed at the given link.

Constructors

The following constructors are available to create function fields and their elements.

Singular.FunctionFieldMethod
FunctionField(F::Singular.Field, S::AbstractVector{<:VarName})

Return a tuple $K, a$ consisting of a function field $K$ over the field $F$ with transcendence basis stored in the array $S$.

source

In case the user does not want to specify a transcendence basis the following constructor can be used.

Singular.FunctionFieldMethod
FunctionField(F::Singular.Field, n::Int)

Return a tuple $K, a$ consisting of a function field $K$ over the field $F$ with transcendence degree $n$ and transcendence basis $a1, ..., an$.

source

Given a function field $F$, we also have the following coercions in addition to the standard ones expected.

F(n::ZZRingElem)

Coerce a Flint integer value into the field.

Examples

julia> F1, (a, b, c) = FunctionField(QQ, ["a", "b", "c"])
 (Function field over Rational field with transcendence basis n_transExt[a, b, c], n_transExt[a, b, c])
 
 julia> x1 = a*b + c
@@ -9,7 +9,7 @@
 (Function field over Finite field of characteristic 5 with transcendence basis n_transExt[a1, a2, a3], n_transExt[a1, a2, a3])
 
 julia> x2 = a1^5 + a2*a3^4
-a1^5 + a2*a3^4

Basic manipulation

Singular.n_transExt_to_spolyMethod
n_transExt_to_spoly(x::n_transExt; parent::PolyRing)

Return the numerator of x as a polynomial in a polynomial ring with at least as many variables as the transcendence degree of parent(x). If a ring parent is given to the function, it will be the parent ring of the output.

source

Examples

julia> F1, (a, b, c) = FunctionField(QQ, ["a", "b", "c"])
+a1^5 + a2*a3^4

Basic manipulation

Singular.n_transExt_to_spolyMethod
n_transExt_to_spoly(x::n_transExt; parent::PolyRing)

Return the numerator of x as a polynomial in a polynomial ring with at least as many variables as the transcendence degree of parent(x). If a ring parent is given to the function, it will be the parent ring of the output.

source

Examples

julia> F1, (a, b, c) = FunctionField(QQ, ["a", "b", "c"])
 (Function field over Rational field with transcendence basis n_transExt[a, b, c], n_transExt[a, b, c])
 
 julia> x = F1(5)*a
@@ -41,4 +41,4 @@
  a1
  a2
  a3
- a4
+ a4
diff --git a/dev/vector/index.html b/dev/vector/index.html index 7691f0946..be9940d78 100644 --- a/dev/vector/index.html +++ b/dev/vector/index.html @@ -9,7 +9,7 @@ x*y*gen(2)+x*gen(1)+y*gen(3)+gen(2)+gen(1) julia> v1 = vector(R, x + 1, x*y + 1, y) -x*y*gen(2)+x*gen(1)+y*gen(3)+gen(2)+gen(1)

Basic manipulation

LinearAlgebra.rankMethod
rank(M::FreeMod)

Return the rank of the given free module.

source
AbstractAlgebra.gensMethod
gens{T <: AbstractAlgebra.RingElem}(M::FreeMod{T})

Return a Julia array whose entries are the generators of the given free module.

source

Examples

julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"])
+x*y*gen(2)+x*gen(1)+y*gen(3)+gen(2)+gen(1)

Basic manipulation

LinearAlgebra.rankMethod
rank(M::FreeMod)

Return the rank of the given free module.

source
AbstractAlgebra.gensMethod
gens{T <: AbstractAlgebra.RingElem}(M::FreeMod{T})

Return a Julia array whose entries are the generators of the given free module.

source

Examples

julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"])
 (Singular polynomial ring (QQ),(x,y),(dp(2),C), spoly{n_Q}[x, y])
 
 julia> M = FreeModule(R, 5)
@@ -34,11 +34,11 @@
 3-element Vector{spoly{n_Q}}:
  x + 1
  x*y + 1
- y

Jet of vectors

Singular.jetMethod
jet(x::svector{spoly{T}}, n::Int)

Given a vector $x$ this function truncates each entry of $x$ up to degree $n$.

source

Examples

julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"])
+ y

Jet of vectors

Singular.jetMethod
jet(x::svector{spoly{T}}, n::Int)

Given a vector $x$ this function truncates each entry of $x$ up to degree $n$.

source

Examples

julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"])
 (Singular polynomial ring (QQ),(x,y),(dp(2),C), spoly{n_Q}[x, y])
 
 julia> v = vector(R, x^5 + 1, 2x^3 + 3y^2, x^2)
 x^5*gen(1)+2*x^3*gen(2)+x^2*gen(3)+3*y^2*gen(2)+gen(1)
 
 julia> w = jet(v, 3)
-2*x^3*gen(2)+x^2*gen(3)+3*y^2*gen(2)+gen(1)
+2*x^3*gen(2)+x^2*gen(3)+3*y^2*gen(2)+gen(1)