Ideals in Multivariate Rings
Types
The OSCAR type for ideals in multivariate polynomial rings is of parametrized form MPolyIdeal{T}
, where T
is the element type of the polynomial ring.
Constructors
ideal
— Methodideal(R::MPolyRing, V::Vector)
Given a vector V
of polynomials in R
, return the ideal of R
generated by these polynomials.
In the graded case, the entries of V
must be homogeneous.
Examples
julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"])
(Multivariate polynomial ring in 2 variables over QQ, QQMPolyRingElem[x, y])
julia> I = ideal(R, [x*y-3*x,y^3-2*x^2*y])
ideal(x*y - 3*x, -2*x^2*y + y^3)
julia> typeof(I)
MPolyIdeal{QQMPolyRingElem}
julia> S, (x, y) = graded_polynomial_ring(QQ, ["x", "y"], [1, 2])
(Graded multivariate polynomial ring in 2 variables over QQ, MPolyDecRingElem{QQFieldElem, QQMPolyRingElem}[x, y])
julia> J = ideal(S, [(x^2+y)^2])
ideal(x^4 + 2*x^2*y + y^2)
julia> typeof(J)
MPolyIdeal{MPolyDecRingElem{QQFieldElem, QQMPolyRingElem}}
Data Associated to Ideals
Basic Data
If I
is an ideal of a multivariate polynomial ring R
, then
base_ring(I)
refers toR
,gens(I)
to the generators ofI
,ngens(I)
to the number of these generators, andgen(I, k)
as well asI[k]
to thek
-th such generator.
Examples
julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"])
(Multivariate polynomial ring in 2 variables over QQ, QQMPolyRingElem[x, y])
julia> I = ideal(R, [x, y])^2
ideal(x^2, x*y, y^2)
julia> base_ring(I)
Multivariate polynomial ring in 2 variables x, y
over rational field
julia> gens(I)
3-element Vector{QQMPolyRingElem}:
x^2
x*y
y^2
julia> ngens(I)
3
julia> gen(I, 2)
x*y
Dimension
dim
— Methoddim(I::MPolyIdeal)
Return the Krull dimension of I
.
Examples
julia> R, (x, y, z) = polynomial_ring(QQ, ["x", "y", "z"])
(Multivariate polynomial ring in 3 variables over QQ, QQMPolyRingElem[x, y, z])
julia> I = ideal(R, [y-x^2, x-z^3])
ideal(-x^2 + y, x - z^3)
julia> dim(I)
1
Codimension
codim
— Methodcodim(I::MPolyIdeal)
Return the codimension of I
.
Examples
julia> R, (x, y, z) = polynomial_ring(QQ, ["x", "y", "z"])
(Multivariate polynomial ring in 3 variables over QQ, QQMPolyRingElem[x, y, z])
julia> I = ideal(R, [y-x^2, x-z^3])
ideal(-x^2 + y, x - z^3)
julia> codim(I)
2
Minimal Sets of Generators
In the graded case, we have:
minimal_generating_set
— Methodminimal_generating_set(I::MPolyIdeal{<:MPolyDecRingElem})
Given a homogeneous ideal I
in a graded multivariate polynomial ring over a field, return an array containing a minimal set of generators of I
. If I
is the zero ideal an empty list is returned.
Examples
julia> R, (x, y, z) = graded_polynomial_ring(QQ, ["x", "y", "z"]);
julia> V = [x, z^2, x^3+y^3, y^4, y*z^5];
julia> I = ideal(R, V)
ideal(x, z^2, x^3 + y^3, y^4, y*z^5)
julia> minimal_generating_set(I)
3-element Vector{MPolyDecRingElem{QQFieldElem, QQMPolyRingElem}}:
x
z^2
y^3
julia> I = ideal(R, zero(R))
ideal(0)
julia> minimal_generating_set(I)
MPolyDecRingElem{QQFieldElem, QQMPolyRingElem}[]
Operations on Ideals
Simple Ideal Operations
Powers of Ideal
^
— Method^(I::MPolyIdeal, m::Int)
Return the m
-th power of I
.
Examples
julia> R, (x, y, z) = polynomial_ring(QQ, ["x", "y", "z"])
(Multivariate polynomial ring in 3 variables over QQ, QQMPolyRingElem[x, y, z])
julia> I = ideal(R, [x, y])
ideal(x, y)
julia> I^3
ideal(x^3, x^2*y, x*y^2, y^3)
Sum of Ideals
+
— Method+(I::MPolyIdeal{T}, J::MPolyIdeal{T}) where T
Return the sum of I
and J
.
Examples
julia> R, (x, y, z) = polynomial_ring(QQ, ["x", "y", "z"])
(Multivariate polynomial ring in 3 variables over QQ, QQMPolyRingElem[x, y, z])
julia> I = ideal(R, [x, y])
ideal(x, y)
julia> J = ideal(R, [z^2])
ideal(z^2)
julia> I+J
ideal(x, y, z^2)
Product of Ideals
*
— Method*(I::MPolyIdeal{T}, J::MPolyIdeal{T}) where T
Return the product of I
and J
.
Examples
julia> R, (x, y, z) = polynomial_ring(QQ, ["x", "y", "z"])
(Multivariate polynomial ring in 3 variables over QQ, QQMPolyRingElem[x, y, z])
julia> I = ideal(R, [x, y])
ideal(x, y)
julia> J = ideal(R, [z^2])
ideal(z^2)
julia> I*J
ideal(x*z^2, y*z^2)
Intersection of Ideals
intersect
— Methodintersect(I::MPolyIdeal{T}, Js::MPolyIdeal{T}...) where T
intersect(V::Vector{MPolyIdeal{T}}) where T
Return the intersection of two or more ideals.
Examples
julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"])
(Multivariate polynomial ring in 2 variables over QQ, QQMPolyRingElem[x, y])
julia> I = ideal(R, [x, y])^2;
julia> J = ideal(R, [y^2-x^3+x]);
julia> intersect(I, J)
ideal(x^3*y - x*y - y^3, x^4 - x^2 - x*y^2)
julia> intersect([I, J])
ideal(x^3*y - x*y - y^3, x^4 - x^2 - x*y^2)
intersect
— Methodintersect(I::MPolyIdeal{T}, Js::MPolyIdeal{T}...) where T
intersect(V::Vector{MPolyIdeal{T}}) where T
Return the intersection of two or more ideals.
Examples
julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"])
(Multivariate polynomial ring in 2 variables over QQ, QQMPolyRingElem[x, y])
julia> I = ideal(R, [x, y])^2;
julia> J = ideal(R, [y^2-x^3+x]);
julia> intersect(I, J)
ideal(x^3*y - x*y - y^3, x^4 - x^2 - x*y^2)
julia> intersect([I, J])
ideal(x^3*y - x*y - y^3, x^4 - x^2 - x*y^2)
intersect(a::MPolyQuoIdeal{T}, bs::MPolyQuoIdeal{T}...) where T
intersect(V::Vector{MPolyQuoIdeal{T}}) where T
Return the intersection of two or more ideals.
Examples
julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"]);
julia> A, _ = quo(R, ideal(R, [x^2-y^3, x-y]));
julia> a = ideal(A, [y^2])
ideal(y^2)
julia> b = ideal(A, [x])
ideal(x)
julia> intersect(a,b)
ideal(x*y)
julia> intersect([a,b])
ideal(x*y)
intersect(I::PBWAlgIdeal{D, T, S}, Js::PBWAlgIdeal{D, T, S}...) where {D, T, S}
intersect(V::Vector{PBWAlgIdeal{D, T, S}}) where {D, T, S}
Return the intersection of two or more ideals.
Examples
julia> D, (x, y, dx, dy) = weyl_algebra(QQ, ["x", "y"]);
julia> I = intersect(left_ideal(D, [x^2, x*dy, dy^2])+left_ideal(D, [dx]), left_ideal(D, [dy^2-x^3+x]))
left_ideal(-x^3 + dy^2 + x)
intersect(M::SubquoModule{T}, N::SubquoModule{T}) where T
Given subquotients M
and N
such that ambient_module(M) == ambient_module(N)
, return the intersection of M
and N
regarded as submodules of the common ambient module.
Additionally, return the inclusion maps M
$\cap$ N
$\to$ M
and M
$\cap$ N
$\to$ N
.
Examples
julia> R, (x, y, z) = polynomial_ring(QQ, ["x", "y", "z"])
(Multivariate polynomial ring in 3 variables over QQ, QQMPolyRingElem[x, y, z])
julia> F = free_module(R, 1)
Free module of rank 1 over Multivariate polynomial ring in 3 variables over QQ
julia> AM = R[x;]
[x]
julia> BM = R[x^2; y^3; z^4]
[x^2]
[y^3]
[z^4]
julia> M = SubquoModule(F, AM, BM)
Subquotient of Submodule with 1 generator
1 -> x*e[1]
by Submodule with 3 generators
1 -> x^2*e[1]
2 -> y^3*e[1]
3 -> z^4*e[1]
julia> AN = R[y;]
[y]
julia> BN = R[x^2; y^3; z^4]
[x^2]
[y^3]
[z^4]
julia> N = SubquoModule(F, AN, BN)
Subquotient of Submodule with 1 generator
1 -> y*e[1]
by Submodule with 3 generators
1 -> x^2*e[1]
2 -> y^3*e[1]
3 -> z^4*e[1]
julia> intersect(M, N)
(Subquotient of Submodule with 2 generators
1 -> -x*y*e[1]
2 -> x*z^4*e[1]
by Submodule with 3 generators
1 -> x^2*e[1]
2 -> y^3*e[1]
3 -> z^4*e[1], Map with following data
Domain:
=======
Subquotient of Submodule with 2 generators
1 -> -x*y*e[1]
2 -> x*z^4*e[1]
by Submodule with 3 generators
1 -> x^2*e[1]
2 -> y^3*e[1]
3 -> z^4*e[1]
Codomain:
=========
Subquotient of Submodule with 1 generator
1 -> x*e[1]
by Submodule with 3 generators
1 -> x^2*e[1]
2 -> y^3*e[1]
3 -> z^4*e[1]
, Map with following data
Domain:
=======
Subquotient of Submodule with 2 generators
1 -> -x*y*e[1]
2 -> x*z^4*e[1]
by Submodule with 3 generators
1 -> x^2*e[1]
2 -> y^3*e[1]
3 -> z^4*e[1]
Codomain:
=========
Subquotient of Submodule with 1 generator
1 -> y*e[1]
by Submodule with 3 generators
1 -> x^2*e[1]
2 -> y^3*e[1]
3 -> z^4*e[1]
)
julia> R, _ = polynomial_ring(QQ, ["x", "y", "z"]);
julia> Z = abelian_group(0);
julia> Rg, (x, y, z) = grade(R, [Z[1],Z[1],Z[1]]);
julia> F = graded_free_module(Rg, 1);
julia> AM = Rg[x;];
julia> BM = Rg[x^2; y^3; z^4];
julia> M = SubquoModule(F, AM, BM)
Graded subquotient of submodule of F generated by
1 -> x*e[1]
by submodule of F generated by
1 -> x^2*e[1]
2 -> y^3*e[1]
3 -> z^4*e[1]
julia> AN = Rg[y;];
julia> BN = Rg[x^2; y^3; z^4];
julia> N = SubquoModule(F, AN, BN)
Graded subquotient of submodule of F generated by
1 -> y*e[1]
by submodule of F generated by
1 -> x^2*e[1]
2 -> y^3*e[1]
3 -> z^4*e[1]
julia> intersect(M, N)
(Graded subquotient of submodule of F generated by
1 -> -x*y*e[1]
2 -> x*z^4*e[1]
by submodule of F generated by
1 -> x^2*e[1]
2 -> y^3*e[1]
3 -> z^4*e[1], Graded subquotient of submodule of F generated by
1 -> -x*y*e[1]
2 -> x*z^4*e[1]
by submodule of F generated by
1 -> x^2*e[1]
2 -> y^3*e[1]
3 -> z^4*e[1] -> M
-x*y*e[1] -> -x*y*e[1]
x*z^4*e[1] -> x*z^4*e[1]
Homogeneous module homomorphism, Graded subquotient of submodule of F generated by
1 -> -x*y*e[1]
2 -> x*z^4*e[1]
by submodule of F generated by
1 -> x^2*e[1]
2 -> y^3*e[1]
3 -> z^4*e[1] -> N
-x*y*e[1] -> x*y*e[1]
x*z^4*e[1] -> 0
Homogeneous module homomorphism)
intersect(T1, T2)
Intersect two tropical varieties.
Examples
julia> RR = TropicalSemiring(min)
Tropical semiring (min)
julia> S,(x,y) = RR["x","y"]
(Multivariate polynomial ring in 2 variables over tropical semiring (min), AbstractAlgebra.Generic.MPoly{Oscar.TropicalSemiringElem{typeof(min)}}[x, y])
julia> f1 = x+y+1
x + y + (1)
julia> f2 = x^2+y^2+RR(-6)
x^2 + y^2 + (-6)
julia> hyp1 = TropicalHypersurface(f1)
min tropical hypersurface embedded in 2-dimensional Euclidean space
julia> hyp2 = TropicalHypersurface(f2)
min tropical hypersurface embedded in 2-dimensional Euclidean space
julia> tv12 = intersect(hyp1, hyp2)
min tropical variety of dimension 1 embedded in 2-dimensional Euclidean space
intersect(a::AlgAssAbsOrdIdl, b::AlgAssAbsOrdIdl) -> AlgAssAbsOrdIdl
Returns $a \cap b$.
intersect(a::AlgAssRelOrdIdl, b::AlgAssRelOrdIdl) -> AlgAssRelOrdIdl
Returns $a \cap b$.
Ideal Quotients
Given two ideals $I, J$ of a ring $R$, the ideal quotient of $I$ by $J$ is the ideal
\[I:J= \bigl\{f \in R\:\big|\: f J \subset I\bigr\}\subset R.\]
quotient
— Methodquotient(I::MPolyIdeal{T}, J::MPolyIdeal{T}) where T
Return the ideal quotient of I
by J
. Alternatively, use I:J
.
quotient(I::MPolyIdeal{T}, f::MPolyRingElem{T}) where T
Return the ideal quotient of I
by the ideal generated by f
. Alternatively, use I:f
.
Examples
julia> R, (x, y, z) = polynomial_ring(QQ, ["x", "y", "z"])
(Multivariate polynomial ring in 3 variables over QQ, QQMPolyRingElem[x, y, z])
julia> I = ideal(R, [x^4+x^2*y*z+y^3*z, y^4+x^3*z+x*y^2*z, x^3*y+x*y^3])
ideal(x^4 + x^2*y*z + y^3*z, x^3*z + x*y^2*z + y^4, x^3*y + x*y^3)
julia> J = ideal(R, [x, y, z])^2
ideal(x^2, x*y, x*z, y^2, y*z, z^2)
julia> L = quotient(I, J)
ideal(x^3*z + x*y^2*z + y^4, x^3*y + x*y^3, x^4 + x^2*y*z + y^3*z, x^3*z^2 - x^2*y*z^2 + x*y^2*z^2 - y^3*z^2, x^2*y^2*z - x^2*y*z^2 - y^3*z^2, x^3*z^2 + x^2*y^3 - x^2*y^2*z + x*y^2*z^2)
julia> I:J
ideal(x^3*z + x*y^2*z + y^4, x^3*y + x*y^3, x^4 + x^2*y*z + y^3*z, x^3*z^2 - x^2*y*z^2 + x*y^2*z^2 - y^3*z^2, x^2*y^2*z - x^2*y*z^2 - y^3*z^2, x^3*z^2 + x^2*y^3 - x^2*y^2*z + x*y^2*z^2)
julia> I:x
ideal(x^2*y + y^3, x^3*z + x*y^2*z + y^4, x^2*z^2 + x*y^3 - x*y^2*z + y^2*z^2, x^4, x^3*z^2 - x^2*z^3 + 2*x*y^2*z^2 - y^2*z^3, -x^2*z^4 + x*y^2*z^3 - y^2*z^4)
Saturation
Given two ideals $I, J$ of a ring $R$, the saturation of $I$ with respect to $J$ is the ideal
\[I:J^{\infty} = \bigl\{ f \in R \:\big|\: f J^k \!\subset I {\text{ for some }}k\geq 1 \bigr\} = \textstyle{\bigcup\limits_{k=1}^{\infty} (I:J^k)}.\]
saturation
— Methodsaturation(I::MPolyIdeal{T}, J::MPolyIdeal{T}) where T
Return the saturation of I
with respect to J
.
Examples
julia> R, (x, y, z) = polynomial_ring(QQ, ["x", "y", "z"])
(Multivariate polynomial ring in 3 variables over QQ, QQMPolyRingElem[x, y, z])
julia> I = ideal(R, [z^3, y*z^2, x*z^2, y^2*z, x*y*z, x^2*z, x*y^2, x^2*y])
ideal(z^3, y*z^2, x*z^2, y^2*z, x*y*z, x^2*z, x*y^2, x^2*y)
julia> J = ideal(R, [x, y, z])
ideal(x, y, z)
julia> K = saturation(I, J)
ideal(z, x*y)
saturation_with_index
— Methodsaturation_with_index(I::MPolyIdeal{T}, J::MPolyIdeal{T}) where T
Return $I:J^{\infty}$ together with the smallest integer $m$ such that $I:J^m = I:J^{\infty}$.
Examples
julia> R, (x, y, z) = polynomial_ring(QQ, ["x", "y", "z"])
(Multivariate polynomial ring in 3 variables over QQ, QQMPolyRingElem[x, y, z])
julia> I = ideal(R, [z^3, y*z^2, x*z^2, y^2*z, x*y*z, x^2*z, x*y^2, x^2*y])
ideal(z^3, y*z^2, x*z^2, y^2*z, x*y*z, x^2*z, x*y^2, x^2*y)
julia> J = ideal(R, [x, y, z])
ideal(x, y, z)
julia> K, m = saturation_with_index(I, J)
(ideal(z, x*y), 2)
Elimination
eliminate
— Methodeliminate(I::MPolyIdeal{T}, V::Vector{T}) where T <: MPolyRingElem
Given a vector V
of polynomials which are variables, these variables are eliminated from I
. That is, return the ideal generated by all polynomials in I
which only involve the remaining variables.
eliminate(I::MPolyIdeal, V::AbstractVector{Int})
Given a vector V
of indices which specify variables, these variables are eliminated from I
. That is, return the ideal generated by all polynomials in I
which only involve the remaining variables.
The return value is an ideal of the original ring.
Examples
julia> R, (t, x, y, z) = polynomial_ring(QQ, ["t", "x", "y", "z"])
(Multivariate polynomial ring in 4 variables over QQ, QQMPolyRingElem[t, x, y, z])
julia> I = ideal(R, [t-x, t^2-y, t^3-z])
ideal(t - x, t^2 - y, t^3 - z)
julia> A = [t]
1-element Vector{QQMPolyRingElem}:
t
julia> TC = eliminate(I, A)
ideal(-x*z + y^2, x*y - z, x^2 - y)
julia> A = [1]
1-element Vector{Int64}:
1
julia> TC = eliminate(I, A)
ideal(-x*z + y^2, x*y - z, x^2 - y)
julia> base_ring(TC)
Multivariate polynomial ring in 4 variables t, x, y, z
over rational field
Tests on Ideals
Basic Tests
is_zero
— Methodis_zero(I::MPolyIdeal)
Return true
if I
is the zero ideal, false
otherwise.
Examples
julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"])
(Multivariate polynomial ring in 2 variables over QQ, QQMPolyRingElem[x, y])
julia> I = ideal(R, y-x^2)
ideal(-x^2 + y)
julia> is_zero(I)
false
is_one
— Methodis_one(I::MPolyIdeal)
Return true
if I
is generated by 1
, false
otherwise.
Examples
julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"])
(Multivariate polynomial ring in 2 variables over QQ, QQMPolyRingElem[x, y])
julia> I = ideal(R, [x, x + y, y - 1])
ideal(x, x + y, y - 1)
julia> is_one(I)
true
is_monomial
— Methodis_monomial(f::MPolyRingElem)
Return true
if f
is a monomial, false
otherwise.
is_monomial(I::MPolyIdeal)
Return true
if I
can be generated by monomials, false
otherwise.
Examples
julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"])
(Multivariate polynomial ring in 2 variables over QQ, QQMPolyRingElem[x, y])
julia> f = 2*x+y
2*x + y
julia> g = y
y
julia> is_monomial(f)
false
julia> is_monomial(g)
true
julia> is_monomial(ideal(R, [f, g]))
true
Containment of Ideals
is_subset
— Methodis_subset(I::MPolyIdeal{T}, J::MPolyIdeal{T}) where T
Return true
if I
is contained in J
, false
otherwise.
Examples
julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"])
(Multivariate polynomial ring in 2 variables over QQ, QQMPolyRingElem[x, y])
julia> I = ideal(R, [x^2])
ideal(x^2)
julia> J = ideal(R, [x, y])^2
ideal(x^2, x*y, y^2)
julia> is_subset(I, J)
true
Equality of Ideals
==
— Method==(I::MPolyIdeal{T}, J::MPolyIdeal{T}) where T
Return true
if I
is equal to J
, false
otherwise.
Examples
julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"])
(Multivariate polynomial ring in 2 variables over QQ, QQMPolyRingElem[x, y])
julia> I = ideal(R, [x^2])
ideal(x^2)
julia> J = ideal(R, [x, y])^2
ideal(x^2, x*y, y^2)
julia> I == J
false
Ideal Membership
ideal_membership
— Methodideal_membership(f::T, I::MPolyIdeal{T}) where T
Return true
if f
is contained in I
, false
otherwise. Alternatively, use f in I
.
Examples
julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"])
(Multivariate polynomial ring in 2 variables over QQ, QQMPolyRingElem[x, y])
julia> f = x^2
x^2
julia> I = ideal(R, [x, y])^2
ideal(x^2, x*y, y^2)
julia> ideal_membership(f, I)
true
julia> g = x
x
julia> g in I
false
Radical Membership
radical_membership
— Methodradical_membership(f::T, I::MPolyIdeal{T}) where T
Return true
if f
is contained in the radical of I
, false
otherwise. Alternatively, use inradical(f, I)
.
Examples
julia> R, (x,) = polynomial_ring(QQ, ["x"])
(Multivariate polynomial ring in 1 variable over QQ, QQMPolyRingElem[x])
julia> f = x
x
julia> I = ideal(R, [x^2])
ideal(x^2)
julia> radical_membership(f, I)
true
julia> g = x+1
x + 1
julia> inradical(g, I)
false
Primality Test
is_prime
— Methodis_prime(I::MPolyIdeal)
Return true
if I
is prime, false
otherwise.
The function computes the minimal associated primes of I
. This may take some time.
Examples
julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"])
(Multivariate polynomial ring in 2 variables over QQ, QQMPolyRingElem[x, y])
julia> I = ideal(R, [x, y])^2
ideal(x^2, x*y, y^2)
julia> is_prime(I)
false
Primary Test
is_primary
— Methodis_primary(I::MPolyIdeal)
Return true
if I
is primary, false
otherwise.
The function computes a primary decomposition of I
. This may take some time.
Examples
julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"])
(Multivariate polynomial ring in 2 variables over QQ, QQMPolyRingElem[x, y])
julia> I = ideal(R, [x, y])^2
ideal(x^2, x*y, y^2)
julia> is_primary(I)
true
Decomposition of Ideals
We discuss various decomposition techniques. They are implemented for polynomial rings over fields and, if explicitly mentioned, also for polynomial rings over the integers. See Wolfram Decker, Gert-Martin Greuel, Gerhard Pfister (1999) for a survey.
Radical
radical
— Methodradical(I::MPolyIdeal)
Return the radical of I
.
Implemented Algorithms
If the base ring of I
is a polynomial ring over a field, a combination of the algorithms of Krick and Logar (with modifications by Laplagne) and Kemper is used. For polynomial rings over the integers, the algorithm proceeds as suggested by Pfister, Sadiq, and Steidel. See Teresa Krick, Alessandro Logar (1991), Gregor Kemper (2002), and Gerhard Pfister, Afshan Sadiq, Stefan Steidel (2011).
Examples
julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"])
(Multivariate polynomial ring in 2 variables over QQ, QQMPolyRingElem[x, y])
julia> I = intersect(ideal(R, [x, y])^2, ideal(R, [y^2-x^3+x]))
ideal(x^3*y - x*y - y^3, x^4 - x^2 - x*y^2)
julia> I = intersect(I, ideal(R, [x-y-1])^2)
ideal(x^5*y - 2*x^4*y^2 - 2*x^4*y + x^3*y^3 + 2*x^3*y^2 - x^2*y^3 + 2*x^2*y^2 + 2*x^2*y + 2*x*y^4 + x*y^3 - 2*x*y^2 - x*y - y^5 - 2*y^4 - y^3, x^6 - 2*x^5 - 3*x^4*y^2 - 2*x^4*y + 2*x^3*y^3 + 3*x^3*y^2 + 2*x^3*y + 2*x^3 + 5*x^2*y^2 + 2*x^2*y - x^2 + 3*x*y^4 - 5*x*y^2 - 2*x*y - 2*y^5 - 4*y^4 - 2*y^3)
julia> RI = radical(I)
ideal(x^4 - x^3*y - x^3 - x^2 - x*y^2 + x*y + x + y^3 + y^2)
julia> R, (a, b, c, d) = polynomial_ring(ZZ, ["a", "b", "c", "d"])
(Multivariate polynomial ring in 4 variables over ZZ, ZZMPolyRingElem[a, b, c, d])
julia> I = intersect(ideal(R, [9,a,b]), ideal(R, [3,c]))
ideal(9, 3*b, 3*a, b*c, a*c)
julia> I = intersect(I, ideal(R, [11,2a,7b]))
ideal(99, 3*b, 3*a, b*c, a*c)
julia> I = intersect(I, ideal(R, [13a^2,17b^4]))
ideal(39*a^2, 13*a^2*c, 51*b^4, 17*b^4*c, 3*a^2*b^4, a^2*b^4*c)
julia> I = intersect(I, ideal(R, [9c^5,6d^5]))
ideal(78*a^2*d^5, 117*a^2*c^5, 102*b^4*d^5, 153*b^4*c^5, 6*a^2*b^4*d^5, 9*a^2*b^4*c^5, 39*a^2*c^5*d^5, 51*b^4*c^5*d^5, 3*a^2*b^4*c^5*d^5)
julia> I = intersect(I, ideal(R, [17,a^15,b^15,c^15,d^15]))
ideal(1326*a^2*d^5, 1989*a^2*c^5, 102*b^4*d^5, 153*b^4*c^5, 663*a^2*c^5*d^5, 51*b^4*c^5*d^5, 78*a^2*d^15, 117*a^2*c^15, 78*a^15*d^5, 117*a^15*c^5, 6*a^2*b^4*d^15, 9*a^2*b^4*c^15, 39*a^2*c^5*d^15, 39*a^2*c^15*d^5, 6*a^2*b^15*d^5, 9*a^2*b^15*c^5, 6*a^15*b^4*d^5, 9*a^15*b^4*c^5, 39*a^15*c^5*d^5, 3*a^2*b^4*c^5*d^15, 3*a^2*b^4*c^15*d^5, 3*a^2*b^15*c^5*d^5, 3*a^15*b^4*c^5*d^5)
julia> RI = radical(I)
ideal(102*b*d, 78*a*d, 51*b*c, 39*a*c, 6*a*b*d, 3*a*b*c)
Primary Decomposition
primary_decomposition
— Methodprimary_decomposition(I::MPolyIdeal; algorithm = :GTZ, cache=true)
Return a minimal primary decomposition of I
. If I
is the unit ideal, return [ideal(1)]
.
The decomposition is returned as a vector of tuples $(Q_1, P_1), \dots, (Q_t, P_t)$, say, where each $Q_i$ is a primary ideal with associated prime $P_i$, and where the intersection of the $Q_i$ is I
.
Implemented Algorithms
If the base ring of I
is a polynomial ring over a field, the algorithm of Gianni, Trager, and Zacharias is used by default (algorithm = :GTZ
). Alternatively, the algorithm by Shimoyama and Yokoyama can be used by specifying algorithm = :SY
. For polynomial rings over the integers, the algorithm proceeds as suggested by Pfister, Sadiq, and Steidel. See Patrizia Gianni, Barry Trager, Gail Zacharias (1988), Takeshi Shimoyama, Kazuhiro Yokoyama (1996), and Gerhard Pfister, Afshan Sadiq, Stefan Steidel (2011).
The algorithm of Gianni, Trager, and Zacharias may not terminate over a small finite field. If it terminates, the result is correct.
If cache=false
is set, the primary decomposition is recomputed and not cached.
Examples
julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"])
(Multivariate polynomial ring in 2 variables over QQ, QQMPolyRingElem[x, y])
julia> I = intersect(ideal(R, [x, y])^2, ideal(R, [y^2-x^3+x]))
ideal(x^3*y - x*y - y^3, x^4 - x^2 - x*y^2)
julia> I = intersect(I, ideal(R, [x-y-1])^2)
ideal(x^5*y - 2*x^4*y^2 - 2*x^4*y + x^3*y^3 + 2*x^3*y^2 - x^2*y^3 + 2*x^2*y^2 + 2*x^2*y + 2*x*y^4 + x*y^3 - 2*x*y^2 - x*y - y^5 - 2*y^4 - y^3, x^6 - 2*x^5 - 3*x^4*y^2 - 2*x^4*y + 2*x^3*y^3 + 3*x^3*y^2 + 2*x^3*y + 2*x^3 + 5*x^2*y^2 + 2*x^2*y - x^2 + 3*x*y^4 - 5*x*y^2 - 2*x*y - 2*y^5 - 4*y^4 - 2*y^3)
julia> L = primary_decomposition(I)
3-element Vector{Tuple{MPolyIdeal{QQMPolyRingElem}, MPolyIdeal{QQMPolyRingElem}}}:
(ideal(x^3 - x - y^2), ideal(x^3 - x - y^2))
(ideal(x^2 - 2*x*y - 2*x + y^2 + 2*y + 1), ideal(x - y - 1))
(ideal(y, x^2), ideal(x, y))
julia> L = primary_decomposition(I, algorithm = :SY, cache=false)
3-element Vector{Tuple{MPolyIdeal{QQMPolyRingElem}, MPolyIdeal{QQMPolyRingElem}}}:
(ideal(x^3 - x - y^2), ideal(x^3 - x - y^2))
(ideal(x^2 - 2*x*y - 2*x + y^2 + 2*y + 1), ideal(x - y - 1))
(ideal(y, x^2), ideal(y, x))
julia> R, (a, b, c, d) = polynomial_ring(ZZ, ["a", "b", "c", "d"])
(Multivariate polynomial ring in 4 variables over ZZ, ZZMPolyRingElem[a, b, c, d])
julia> I = ideal(R, [1326*a^2*d^5, 1989*a^2*c^5, 102*b^4*d^5, 153*b^4*c^5,
663*a^2*c^5*d^5, 51*b^4*c^5*d^5, 78*a^2*d^15, 117*a^2*c^15,
78*a^15*d^5, 117*a^15*c^5, 6*a^2*b^4*d^15, 9*a^2*b^4*c^15,
39*a^2*c^5*d^15, 39*a^2*c^15*d^5, 6*a^2*b^15*d^5, 9*a^2*b^15*c^5,
6*a^15*b^4*d^5, 9*a^15*b^4*c^5, 39*a^15*c^5*d^5, 3*a^2*b^4*c^5*d^15,
3*a^2*b^4*c^15*d^5, 3*a^2*b^15*c^5*d^5, 3*a^15*b^4*c^5*d^5])
ideal(1326*a^2*d^5, 1989*a^2*c^5, 102*b^4*d^5, 153*b^4*c^5, 663*a^2*c^5*d^5, 51*b^4*c^5*d^5, 78*a^2*d^15, 117*a^2*c^15, 78*a^15*d^5, 117*a^15*c^5, 6*a^2*b^4*d^15, 9*a^2*b^4*c^15, 39*a^2*c^5*d^15, 39*a^2*c^15*d^5, 6*a^2*b^15*d^5, 9*a^2*b^15*c^5, 6*a^15*b^4*d^5, 9*a^15*b^4*c^5, 39*a^15*c^5*d^5, 3*a^2*b^4*c^5*d^15, 3*a^2*b^4*c^15*d^5, 3*a^2*b^15*c^5*d^5, 3*a^15*b^4*c^5*d^5)
julia> L = primary_decomposition(I)
8-element Vector{Tuple{MPolyIdeal{ZZMPolyRingElem}, MPolyIdeal{ZZMPolyRingElem}}}:
(ideal(d^5, c^5), ideal(d, c))
(ideal(a^2, b^4), ideal(b, a))
(ideal(2, c^5), ideal(2, c))
(ideal(3), ideal(3))
(ideal(13, b^4), ideal(13, b))
(ideal(17, a^2), ideal(17, a))
(ideal(17, d^15, c^15, b^15, a^15), ideal(17, d, c, b, a))
(ideal(9, 3*d^5, d^10), ideal(3, d))
Absolute Primary Decomposition
absolute_primary_decomposition
— Methodabsolute_primary_decomposition(I::MPolyIdeal{<:MPolyRingElem{QQFieldElem}})
If I
is an ideal in a multivariate polynomial ring over the rationals, return an absolute minimal primary decomposition of I
.
Return the decomposition as a vector of tuples $(Q_i, P_i, P_{ij}, d_{ij})$, say, where $(Q_i, P_i)$ is a (primary, prime) tuple as returned by primary_decomposition(I)
, and $P_{ij}$ represents a corresponding class of conjugated absolute associated primes defined over a number field of degree $d_{ij}$ whose generator prints as _a
.
Implemented Algorithms
The implementation combines the algorithm of Gianni, Trager, and Zacharias for primary decomposition with absolute polynomial factorization.
Examples
julia> R, (y, z) = polynomial_ring(QQ, ["y", "z"])
(Multivariate polynomial ring in 2 variables over QQ, QQMPolyRingElem[y, z])
julia> p = z^2+1
z^2 + 1
julia> q = z^3+2
z^3 + 2
julia> I = ideal(R, [p*q^2, y-z^2])
ideal(z^8 + z^6 + 4*z^5 + 4*z^3 + 4*z^2 + 4, y - z^2)
julia> L = primary_decomposition(I)
2-element Vector{Tuple{MPolyIdeal{QQMPolyRingElem}, MPolyIdeal{QQMPolyRingElem}}}:
(ideal(z^2 + 1, y - z^2), ideal(z^2 + 1, y - z^2))
(ideal(z^6 + 4*z^3 + 4, y - z^2), ideal(z^3 + 2, y - z^2))
julia> AL = absolute_primary_decomposition(I)
2-element Vector{Tuple{MPolyIdeal{QQMPolyRingElem}, MPolyIdeal{QQMPolyRingElem}, MPolyIdeal{AbstractAlgebra.Generic.MPoly{nf_elem}}, Int64}}:
(ideal(z^2 + 1, y + 1), ideal(z^2 + 1, y + 1), ideal(z - _a, y + 1), 2)
(ideal(z^6 + 4*z^3 + 4, y - z^2), ideal(z^3 + 2, y - z^2), ideal(z - _a, y - _a*z), 3)
julia> AP = AL[1][3]
ideal(z - _a, y + 1)
julia> RAP = base_ring(AP)
Multivariate polynomial ring in 2 variables y, z
over number field of degree 2 over QQ
julia> NF = coefficient_ring(RAP)
Number field with defining polynomial x^2 + 1
over rational field
julia> a = gen(NF)
_a
julia> minpoly(a)
x^2 + 1
julia> R, (x, y) = graded_polynomial_ring(QQ, ["x", "y"])
(Graded multivariate polynomial ring in 2 variables over QQ, MPolyDecRingElem{QQFieldElem, QQMPolyRingElem}[x, y])
julia> I = ideal(R, [x^2+y^2])
ideal(x^2 + y^2)
julia> AL = absolute_primary_decomposition(I)
1-element Vector{Tuple{MPolyIdeal{MPolyDecRingElem{QQFieldElem, QQMPolyRingElem}}, MPolyIdeal{MPolyDecRingElem{QQFieldElem, QQMPolyRingElem}}, MPolyIdeal{MPolyDecRingElem{nf_elem, AbstractAlgebra.Generic.MPoly{nf_elem}}}, Int64}}:
(ideal(x^2 + y^2), ideal(x^2 + y^2), ideal(x + _a*y), 2)
julia> AP = AL[1][3]
ideal(x + _a*y)
julia> RAP = base_ring(AP)
Multivariate polynomial ring in 2 variables over number field graded by
x -> [1]
y -> [1]
Minimal Associated Primes
minimal_primes
— Methodminimal_primes(I::MPolyIdeal; algorithm::Symbol = :GTZ)
Return a vector containing the minimal associated prime ideals of I
. If I
is the unit ideal, return [ideal(1)]
.
Implemented Algorithms
If the base ring of I
is a polynomial ring over a field, the algorithm of Gianni, Trager, and Zacharias is used by default (algorithm = :GTZ
). Alternatively, characteristic sets can be used by specifying algorithm = :charSets
. For polynomial rings over the integers, the algorithm proceeds as suggested by Pfister, Sadiq, and Steidel. See Patrizia Gianni, Barry Trager, Gail Zacharias (1988) and Gerhard Pfister, Afshan Sadiq, Stefan Steidel (2011).
Examples
julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"])
(Multivariate polynomial ring in 2 variables over QQ, QQMPolyRingElem[x, y])
julia> I = intersect(ideal(R, [x, y])^2, ideal(R, [y^2-x^3+x]))
ideal(x^3*y - x*y - y^3, x^4 - x^2 - x*y^2)
julia> I = intersect(I, ideal(R, [x-y-1])^2)
ideal(x^5*y - 2*x^4*y^2 - 2*x^4*y + x^3*y^3 + 2*x^3*y^2 - x^2*y^3 + 2*x^2*y^2 + 2*x^2*y + 2*x*y^4 + x*y^3 - 2*x*y^2 - x*y - y^5 - 2*y^4 - y^3, x^6 - 2*x^5 - 3*x^4*y^2 - 2*x^4*y + 2*x^3*y^3 + 3*x^3*y^2 + 2*x^3*y + 2*x^3 + 5*x^2*y^2 + 2*x^2*y - x^2 + 3*x*y^4 - 5*x*y^2 - 2*x*y - 2*y^5 - 4*y^4 - 2*y^3)
julia> L = minimal_primes(I)
2-element Vector{MPolyIdeal{QQMPolyRingElem}}:
ideal(x - y - 1)
ideal(x^3 - x - y^2)
julia> L = minimal_primes(I, algorithm = :charSets)
2-element Vector{MPolyIdeal{QQMPolyRingElem}}:
ideal(x - y - 1)
ideal(x^3 - x - y^2)
julia> R, (a, b, c, d) = polynomial_ring(ZZ, ["a", "b", "c", "d"])
(Multivariate polynomial ring in 4 variables over ZZ, ZZMPolyRingElem[a, b, c, d])
julia> I = ideal(R, [1326*a^2*d^5, 1989*a^2*c^5, 102*b^4*d^5, 153*b^4*c^5,
663*a^2*c^5*d^5, 51*b^4*c^5*d^5, 78*a^2*d^15, 117*a^2*c^15,
78*a^15*d^5, 117*a^15*c^5, 6*a^2*b^4*d^15, 9*a^2*b^4*c^15,
39*a^2*c^5*d^15, 39*a^2*c^15*d^5, 6*a^2*b^15*d^5, 9*a^2*b^15*c^5,
6*a^15*b^4*d^5, 9*a^15*b^4*c^5, 39*a^15*c^5*d^5, 3*a^2*b^4*c^5*d^15,
3*a^2*b^4*c^15*d^5, 3*a^2*b^15*c^5*d^5, 3*a^15*b^4*c^5*d^5])
ideal(1326*a^2*d^5, 1989*a^2*c^5, 102*b^4*d^5, 153*b^4*c^5, 663*a^2*c^5*d^5, 51*b^4*c^5*d^5, 78*a^2*d^15, 117*a^2*c^15, 78*a^15*d^5, 117*a^15*c^5, 6*a^2*b^4*d^15, 9*a^2*b^4*c^15, 39*a^2*c^5*d^15, 39*a^2*c^15*d^5, 6*a^2*b^15*d^5, 9*a^2*b^15*c^5, 6*a^15*b^4*d^5, 9*a^15*b^4*c^5, 39*a^15*c^5*d^5, 3*a^2*b^4*c^5*d^15, 3*a^2*b^4*c^15*d^5, 3*a^2*b^15*c^5*d^5, 3*a^15*b^4*c^5*d^5)
julia> L = minimal_primes(I)
6-element Vector{MPolyIdeal{ZZMPolyRingElem}}:
ideal(d, c)
ideal(b, a)
ideal(2, c)
ideal(3)
ideal(13, b)
ideal(17, a)
Weak Equidimensional Decomposition
equidimensional_decomposition_weak
— Methodequidimensional_decomposition_weak(I::MPolyIdeal)
Return a vector of equidimensional ideals where the last entry is the equidimensional hull of I
, that is, the intersection of the primary components of I
of maximal dimension. Each of the previous entries is an ideal of lower dimension whose associated primes are exactly the associated primes of I
of that dimension. If I
is the unit ideal, return [ideal(1)]
.
Implemented Algorithms
The implementation relies on ideas of Eisenbud, Huneke, and Vasconcelos. See David Eisenbud, Craig Huneke, Wolmer Vasconcelos (1992).
Examples
julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"])
(Multivariate polynomial ring in 2 variables over QQ, QQMPolyRingElem[x, y])
julia> I = intersect(ideal(R, [x, y])^2, ideal(R, [y^2-x^3+x]))
ideal(x^3*y - x*y - y^3, x^4 - x^2 - x*y^2)
julia> I = intersect(I, ideal(R, [x-y-1])^2)
ideal(x^5*y - 2*x^4*y^2 - 2*x^4*y + x^3*y^3 + 2*x^3*y^2 - x^2*y^3 + 2*x^2*y^2 + 2*x^2*y + 2*x*y^4 + x*y^3 - 2*x*y^2 - x*y - y^5 - 2*y^4 - y^3, x^6 - 2*x^5 - 3*x^4*y^2 - 2*x^4*y + 2*x^3*y^3 + 3*x^3*y^2 + 2*x^3*y + 2*x^3 + 5*x^2*y^2 + 2*x^2*y - x^2 + 3*x*y^4 - 5*x*y^2 - 2*x*y - 2*y^5 - 4*y^4 - 2*y^3)
julia> L = equidimensional_decomposition_weak(I)
2-element Vector{MPolyIdeal{QQMPolyRingElem}}:
ideal(y, x)
ideal(x^5 - 2*x^4*y - 2*x^4 + x^3*y^2 + 2*x^3*y - x^2*y^2 + 2*x^2*y + 2*x^2 + 2*x*y^3 + x*y^2 - 2*x*y - x - y^4 - 2*y^3 - y^2)
Equidimensional Decomposition of radical
equidimensional_decomposition_radical
— Methodequidimensional_decomposition_radical(I::MPolyIdeal)
Return a vector of equidimensional radical ideals increasingly ordered by dimension. For each dimension, the returned radical ideal is the intersection of the associated primes of I
of that dimension. If I
is the unit ideal, return [ideal(1)]
.
Implemented Algorithms
The implementation combines the algorithms of Krick and Logar (with modifications by Laplagne) and Kemper. See Teresa Krick, Alessandro Logar (1991) and Gregor Kemper (2002).
Examples
julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"])
(Multivariate polynomial ring in 2 variables over QQ, QQMPolyRingElem[x, y])
julia> I = intersect(ideal(R, [x, y])^2, ideal(R, [y^2-x^3+x]))
ideal(x^3*y - x*y - y^3, x^4 - x^2 - x*y^2)
julia> I = intersect(I, ideal(R, [x-y-1])^2)
ideal(x^5*y - 2*x^4*y^2 - 2*x^4*y + x^3*y^3 + 2*x^3*y^2 - x^2*y^3 + 2*x^2*y^2 + 2*x^2*y + 2*x*y^4 + x*y^3 - 2*x*y^2 - x*y - y^5 - 2*y^4 - y^3, x^6 - 2*x^5 - 3*x^4*y^2 - 2*x^4*y + 2*x^3*y^3 + 3*x^3*y^2 + 2*x^3*y + 2*x^3 + 5*x^2*y^2 + 2*x^2*y - x^2 + 3*x*y^4 - 5*x*y^2 - 2*x*y - 2*y^5 - 4*y^4 - 2*y^3)
julia> L = equidimensional_decomposition_radical(I)
2-element Vector{MPolyIdeal{QQMPolyRingElem}}:
ideal(y, x)
ideal(x^4 - x^3*y - x^3 - x^2 - x*y^2 + x*y + x + y^3 + y^2)
Equidimensional Hull
equidimensional_hull
— Methodequidimensional_hull(I::MPolyIdeal)
If the base ring of I
is a polynomial ring over a field, return the intersection of the primary components of I
of maximal dimension. In the case of polynomials over the integers, return the intersection of the primary components of I of minimal height. If I
is the unit ideal, return [ideal(1)]
.
Implemented Algorithms
For polynomial rings over a field, the implementation relies on ideas as used by Gianni, Trager, and Zacharias or Krick and Logar. For polynomial rings over the integers, the algorithm proceeds as suggested by Pfister, Sadiq, and Steidel. See Patrizia Gianni, Barry Trager, Gail Zacharias (1988), Teresa Krick, Alessandro Logar (1991), and Gerhard Pfister, Afshan Sadiq, Stefan Steidel (2011).
Examples
julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"])
(Multivariate polynomial ring in 2 variables over QQ, QQMPolyRingElem[x, y])
julia> I = intersect(ideal(R, [x, y])^2, ideal(R, [y^2-x^3+x]))
ideal(x^3*y - x*y - y^3, x^4 - x^2 - x*y^2)
julia> I = intersect(I, ideal(R, [x-y-1])^2)
ideal(x^5*y - 2*x^4*y^2 - 2*x^4*y + x^3*y^3 + 2*x^3*y^2 - x^2*y^3 + 2*x^2*y^2 + 2*x^2*y + 2*x*y^4 + x*y^3 - 2*x*y^2 - x*y - y^5 - 2*y^4 - y^3, x^6 - 2*x^5 - 3*x^4*y^2 - 2*x^4*y + 2*x^3*y^3 + 3*x^3*y^2 + 2*x^3*y + 2*x^3 + 5*x^2*y^2 + 2*x^2*y - x^2 + 3*x*y^4 - 5*x*y^2 - 2*x*y - 2*y^5 - 4*y^4 - 2*y^3)
julia> L = equidimensional_hull(I)
ideal(x^5 - 2*x^4*y - 2*x^4 + x^3*y^2 + 2*x^3*y - x^2*y^2 + 2*x^2*y + 2*x^2 + 2*x*y^3 + x*y^2 - 2*x*y - x - y^4 - 2*y^3 - y^2)
julia> R, (a, b, c, d) = polynomial_ring(ZZ, ["a", "b", "c", "d"])
(Multivariate polynomial ring in 4 variables over ZZ, ZZMPolyRingElem[a, b, c, d])
julia> I = ideal(R, [1326*a^2*d^5, 1989*a^2*c^5, 102*b^4*d^5, 153*b^4*c^5,
663*a^2*c^5*d^5, 51*b^4*c^5*d^5, 78*a^2*d^15, 117*a^2*c^15,
78*a^15*d^5, 117*a^15*c^5, 6*a^2*b^4*d^15, 9*a^2*b^4*c^15,
39*a^2*c^5*d^15, 39*a^2*c^15*d^5, 6*a^2*b^15*d^5, 9*a^2*b^15*c^5,
6*a^15*b^4*d^5, 9*a^15*b^4*c^5, 39*a^15*c^5*d^5, 3*a^2*b^4*c^5*d^15,
3*a^2*b^4*c^15*d^5, 3*a^2*b^15*c^5*d^5, 3*a^15*b^4*c^5*d^5])
ideal(1326*a^2*d^5, 1989*a^2*c^5, 102*b^4*d^5, 153*b^4*c^5, 663*a^2*c^5*d^5, 51*b^4*c^5*d^5, 78*a^2*d^15, 117*a^2*c^15, 78*a^15*d^5, 117*a^15*c^5, 6*a^2*b^4*d^15, 9*a^2*b^4*c^15, 39*a^2*c^5*d^15, 39*a^2*c^15*d^5, 6*a^2*b^15*d^5, 9*a^2*b^15*c^5, 6*a^15*b^4*d^5, 9*a^15*b^4*c^5, 39*a^15*c^5*d^5, 3*a^2*b^4*c^5*d^15, 3*a^2*b^4*c^15*d^5, 3*a^2*b^15*c^5*d^5, 3*a^15*b^4*c^5*d^5)
julia> L = equidimensional_hull(I)
ideal(3)
Radical of the Equidimensional Hull
equidimensional_hull_radical
— Methodequidimensional_hull_radical(I::MPolyIdeal)
Return the intersection of the associated primes of I
of maximal dimension. If I
is the unit ideal, return [ideal(1)]
.
Implemented Algorithms
The implementation relies on a combination of the algorithms of Krick and Logar (with modifications by Laplagne) and Kemper. See Teresa Krick, Alessandro Logar (1991) and Gregor Kemper (2002).
Examples
julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"])
(Multivariate polynomial ring in 2 variables over QQ, QQMPolyRingElem[x, y])
julia> I = intersect(ideal(R, [x, y])^2, ideal(R, [y^2-x^3+x]))
ideal(x^3*y - x*y - y^3, x^4 - x^2 - x*y^2)
julia> I = intersect(I, ideal(R, [x-y-1])^2)
ideal(x^5*y - 2*x^4*y^2 - 2*x^4*y + x^3*y^3 + 2*x^3*y^2 - x^2*y^3 + 2*x^2*y^2 + 2*x^2*y + 2*x*y^4 + x*y^3 - 2*x*y^2 - x*y - y^5 - 2*y^4 - y^3, x^6 - 2*x^5 - 3*x^4*y^2 - 2*x^4*y + 2*x^3*y^3 + 3*x^3*y^2 + 2*x^3*y + 2*x^3 + 5*x^2*y^2 + 2*x^2*y - x^2 + 3*x*y^4 - 5*x*y^2 - 2*x*y - 2*y^5 - 4*y^4 - 2*y^3)
julia> L = equidimensional_hull_radical(I)
ideal(x^4 - x^3*y - x^3 - x^2 - x*y^2 + x*y + x + y^3 + y^2)
Homogenization and Dehomogenization
Referring to Martin Kreuzer, Lorenzo Robbiano (2005) for definitions and technical details, we discuss homogenization and dehomogenization in the context of $\mathbb Z^m$-gradings.
homogenization
— Functionhomogenization(f::MPolyRingElem, W::Union{ZZMatrix, Matrix{<:IntegerUnion}}, var::VarName, pos::Int = 1)
If $m$ is the number of rows of W
, extend the parent polynomial ring of f
by inserting $m$ extra variables, starting at position pos
. Correspondingly, extend the integer matrix W
by inserting the standard unit vectors of size $m$ as new columns, starting at column pos
. Grade the extended ring by converting the columns of the extended matrix to elements of the group $\mathbb Z^m$ and assigning these as weights to the variables. Homogenize f
with respect to the induced $\mathbb Z^m$-grading on the original ring, using the extra variables as homogenizing variables. Return the result as an element of the extended ring with its $\mathbb Z^m$-grading. If $m=1$, the extra variable prints as var
. Otherwise, the extra variables print as var[
$i$]
, for $i = 1 \dots m$.
homogenization(V::Vector{T}, W::Union{ZZMatrix, Matrix{<:IntegerUnion}}, var::VarName, pos::Int = 1) where {T <: MPolyRingElem}
Given a vector V
of elements in a common polynomial ring, create an extended ring with $\mathbb Z^m$-grading as above. Homogenize the elements of V
correspondingly, and return the vector of homogenized elements.
homogenization(I::MPolyIdeal{T}, W::Union{ZZMatrix, Matrix{<:IntegerUnion}}, var::VarName, pos::Int = 1) where {T <: MPolyRingElem}
Return the homogenization of I
in an extended ring with $\mathbb Z^m$-grading as above.
Applied to an ideal I
, the function first homogenizes the generators of I
in the extended ring. It then creates the ideal generated by these homogenizations, and saturates this ideal with respect to the ideal which is generated by the homogenizing variables.
Examples
julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"])
(Multivariate polynomial ring in 2 variables over QQ, QQMPolyRingElem[x, y])
julia> f = x^3+x^2*y+x*y^2+y^3
x^3 + x^2*y + x*y^2 + y^3
julia> W = [1 2; 3 4]
2×2 Matrix{Int64}:
1 2
3 4
julia> F = homogenization(f, W, "z", 3)
x^3*z[1]^3*z[2]^3 + x^2*y*z[1]^2*z[2]^2 + x*y^2*z[1]*z[2] + y^3
julia> parent(F)
Multivariate polynomial ring in 4 variables over QQ graded by
x -> [1 3]
y -> [2 4]
z[1] -> [1 0]
z[2] -> [0 1]
homogenization
— Functionhomogenization(f::MPolyRingElem, var::VarName, pos::Int = 1)
homogenization(V::Vector{T}, var::VarName, pos::Int = 1) where {T <: MPolyRingElem}
homogenization(I::MPolyIdeal{T}, var::VarName, pos::Int = 1; ordering::Symbol = :degrevlex) where {T <: MPolyRingElem}
Homogenize f
, V
, or I
with respect to the standard $\mathbb Z$-grading using a homogenizing variable printing as var
. Return the result as an element of a graded polynomial ring with the homogenizing variable at position pos
.
Applied to an ideal I
, the function proceeds by homogenizing the elements of a Gröbner basis of I
with respect to a degree compatible monomial ordering such as degrevlex
(default). If a Gröbner basis with respect to the specified ordering has not yet been computed and, thus, not yet been cached, executing the homogenization
function with argument I
may take some time. The degree compatibility of the specified ordering is not checked by the function.
Examples
julia> R, (x, y, z) = polynomial_ring(QQ, ["x", "y", "z"])
(Multivariate polynomial ring in 3 variables over QQ, QQMPolyRingElem[x, y, z])
julia> f = x^3-y^2-z
x^3 - y^2 - z
julia> F = homogenization(f, "w", 4)
x^3 - y^2*w - z*w^2
julia> parent(F)
Multivariate polynomial ring in 4 variables over QQ graded by
x -> [1]
y -> [1]
z -> [1]
w -> [1]
julia> V = [y-x^2, z-x^3]
2-element Vector{QQMPolyRingElem}:
-x^2 + y
-x^3 + z
julia> homogenization(V, "w")
2-element Vector{MPolyDecRingElem{QQFieldElem, QQMPolyRingElem}}:
w*y - x^2
w^2*z - x^3
julia> I = ideal(R, V)
ideal(-x^2 + y, -x^3 + z)
julia> PTC = homogenization(I, "w")
ideal(-x*z + y^2, -w*z + x*y, -w*y + x^2)
julia> parent(PTC[1])
Multivariate polynomial ring in 4 variables over QQ graded by
w -> [1]
x -> [1]
y -> [1]
z -> [1]
julia> homogenization(I, "w", ordering = deglex(gens(base_ring(I))))
ideal(x*z - y^2, -w*z + x*y, -w*y + x^2, -w*z^2 + y^3)
dehomogenization
— Methoddehomogenization(F::MPolyDecRingElem, pos::Int)
Given an element F
of a $\mathbb Z^m$-graded ring, where the generators of $\mathbb Z^m$ are the assigned weights to the variables at positions pos
, $\dots$, pos
$-1+m$, dehomogenize F
using the variables at these positions. Return the result as an element of a polynomial ring not depending on the variables at these positions.
dehomogenization(V::Vector{T}, pos::Int) where {T <: MPolyDecRingElem}
Given a vector V
of elements in a common graded polynomial ring, create a polynomial ring not depending on the variables at positions pos
, $\dots$, pos
$-1+m$. Dehomogenize the elements of V
correspondingly, and return the vector of dehomogenized elements.
dehomogenization(I::MPolyIdeal{T}, pos::Int) where {T <: MPolyDecRingElem}
Return the dehomogenization of I
in a polynomial ring as above.
Examples
julia> S, (x, y, z) = graded_polynomial_ring(QQ, ["x", "y", "z"])
(Graded multivariate polynomial ring in 3 variables over QQ, MPolyDecRingElem{QQFieldElem, QQMPolyRingElem}[x, y, z])
julia> F = x^3-x^2*y-x*z^2
x^3 - x^2*y - x*z^2
julia> f = dehomogenization(F, 1)
-y - z^2 + 1
julia> parent(f)
Multivariate polynomial ring in 2 variables y, z
over rational field
julia> V = [x*y-z^2, x^2*z-x^3]
2-element Vector{MPolyDecRingElem{QQFieldElem, QQMPolyRingElem}}:
x*y - z^2
-x^3 + x^2*z
julia> dehomogenization(V, 3)
2-element Vector{QQMPolyRingElem}:
x*y - 1
-x^3 + x^2
julia> I = ideal(S, V)
ideal(x*y - z^2, -x^3 + x^2*z)
julia> dehomogenization(I, 3)
ideal(x*y - 1, -x^3 + x^2)
julia> W = [1 2 1 0; 3 4 0 1]
2×4 Matrix{Int64}:
1 2 1 0
3 4 0 1
julia> S, (w, x, y, z) = graded_polynomial_ring(QQ, ["w", "x", "y", "z"], W)
(Graded multivariate polynomial ring in 4 variables over QQ, MPolyDecRingElem{QQFieldElem, QQMPolyRingElem}[w, x, y, z])
julia> F = w^3*y^3*z^3 + w^2*x*y^2*z^2 + w*x^2*y*z + x^3
w^3*y^3*z^3 + w^2*x*y^2*z^2 + w*x^2*y*z + x^3
julia> dehomogenization(F, 3)
w^3 + w^2*x + w*x^2 + x^3
Generating Special Ideals
katsura
— Methodkatsura(n::Int)
Given a natural number n
return the Katsura ideal generated by $u_m - \sum_{l=n}^n u_{l-m} u_l$, $1 - \sum_{l = -n}^n u_l$ where $u_{-i} = u_i$, and $u_i = 0$ for $i > n$ and $m \in \{-n, \ldots, n\}$.
Note that indices have been shifted to start from 1.
Examples
julia> katsura(2)
ideal(x1 + 2*x2 + 2*x3 - 1, x1^2 - x1 + 2*x2^2 + 2*x3^2, 2*x1*x2 + 2*x2*x3 - x2)
katsura
— Methodkatsura(R::MPolyRing)
Return the Katsura ideal in the given polynomial ring R
.
Examples
julia> R, _ = QQ["x", "y", "z"]
(Multivariate polynomial ring in 3 variables over QQ, QQMPolyRingElem[x, y, z])
julia> katsura(R)
ideal(x + 2*y + 2*z - 1, x^2 - x + 2*y^2 + 2*z^2, 2*x*y + 2*y*z - y)