# Ideals in PBW-algebras

## Types

The OSCAR type for ideals in PBW-algebras is of parametrized form PBWAlgIdeal{D, T, S}, where D encodes the direction left, right, or two-sided, and T is the element type of the field over which the PBW-algebra is defined (the type S is added for internal use).

## Constructors

left_idealMethod
left_ideal(g::Vector{<:PBWAlgElem})

Given a vector g of elements in a PBW-algebra A, say, return the left ideal of A generated by these elements.

left_ideal(A::PBWAlgRing, g::AbstractVector)

Given a vector g of elements of A, return the left ideal of A generated by these elements.

Examples

julia> R, (x, y, z) = QQ["x", "y", "z"];

julia> L = [x*y, x*z, y*z + 1];

julia> REL = strictly_upper_triangular_matrix(L);

julia> A, (x, y, z) = pbw_algebra(R, REL, deglex(gens(R)))
(PBW-algebra over Rational field in x, y, z with relations y*x = x*y, z*x = x*z, z*y = y*z + 1, PBWAlgElem{QQFieldElem, Singular.n_Q}[x, y, z])

julia> I = left_ideal(A, [x^2*y^2, x*z+y*z])
left_ideal(x^2*y^2, x*z + y*z)
source
right_idealMethod
right_ideal(g::Vector{<:PBWAlgElem})

Given a vector g of elements in a PBW-algebra A, say, return the right ideal of A generated by these elements.

right_ideal(A::PBWAlgRing, g::AbstractVector)

Given a vector g of elements of A, return the right ideal of A generated by these elements.

source
two_sided_idealMethod
two_sided_ideal(g::Vector{<:PBWAlgElem})

Given a vector g of elements in a PBW-algebra A, say, return the two-sided ideal of A generated by these elements.

two_sided_ideal(A::PBWAlgRing, g::AbstractVector)

Given a vector g of elements of A, return the two-sided ideal of A generated by these elements.

source

## Data Associated to Ideals

If I is an ideal of a PBW-algebra A, then

• base_ring(I) refers to A,
• gens(I) to the generators of I,
• number_of_generators(I) / ngens(I) to the number of these generators, and
• gen(I, k) as well as I[k] to the k-th such generator.
###### Examples
julia> D, (x, y, dx, dy) = weyl_algebra(QQ, ["x", "y"])
(Weyl-algebra over Rational field in variables (x, y), PBWAlgElem{QQFieldElem, Singular.n_Q}[x, y, dx, dy])

julia> I = left_ideal(D, [x, dx])
left_ideal(x, dx)

julia> base_ring(I)
Weyl-algebra over Rational field in variables (x, y)

julia> gens(I)
2-element Vector{PBWAlgElem{QQFieldElem, Singular.n_Q}}:
x
dx

julia> number_of_generators(I)
2

julia> gen(I, 2)
dx


## Operations on Ideals

### Simple Ideal Operations

#### Powers of Ideal

^Method
^(I::PBWAlgIdeal{D, T, S}, k::Int) where {D, T, S}

Given a two_sided ideal I, return the k-th power of I.

Examples

julia> D, (x, dx) = weyl_algebra(GF(3), ["x"]);

julia> I = two_sided_ideal(D, [x^3])
two_sided_ideal(x^3)

julia> I^2
two_sided_ideal(x^6)
source

#### Sum of Ideals

+Method
+(I::PBWAlgIdeal{D, T, S}, J::PBWAlgIdeal{D, T, S}) where {D, T, S}

Return the sum of I and J.

source

#### Product of Ideals

*Method
*(I::PBWAlgIdeal{DI, T, S}, J::PBWAlgIdeal{DJ, T, S}) where {DI, DJ, T, S}

Given two ideals I and J such that both I and J are two-sided ideals or I and J are a left and a right ideal, respectively, return the product of I and J.

Examples

julia> D, (x, y, dx, dy) = weyl_algebra(GF(3), ["x", "y"]);

julia> I = left_ideal(D, [x^3+y^3, x*y^2])
left_ideal(x^3 + y^3, x*y^2)

julia> J = right_ideal(D, [dx^3, dy^5])
right_ideal(dx^3, dy^5)

julia> I*J
two_sided_ideal(x^3*dx^3 + y^3*dx^3, x^3*dy^5 + y^3*dy^5, x*y^2*dx^3, x*y^2*dy^5)
source

### Intersection of Ideals

intersectMethod
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)
source
intersectMethod
intersect(a::AlgAssAbsOrdIdl, b::AlgAssAbsOrdIdl) -> AlgAssAbsOrdIdl

Returns $a \cap b$.

source
intersect(a::AlgAssRelOrdIdl, b::AlgAssRelOrdIdl) -> AlgAssRelOrdIdl

Returns $a \cap b$.

source
intersect(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 generated by
x^3*y - x*y - y^3
x^4 - x^2 - x*y^2

julia> intersect([I, J])
Ideal generated by
x^3*y - x*y - y^3
x^4 - x^2 - x*y^2
source
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 generated by
y^2

julia> b = ideal(A, [x])
Ideal generated by
x

julia> intersect(a,b)
Ideal generated by
x*y

julia> intersect([a,b])
Ideal generated by
x*y
source
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)
source
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 R

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> Rg, (x, y, z) = graded_polynomial_ring(QQ, ["x", "y", "z"]);

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)

source

### Elimination

Let

$$\[A = K\langle x_1, \dots , x_n \mid x_jx_i = c_{ij}x_ix_j+d_{ij}, \ 1\leq i

be a PBW-algebra. Fix a subset $\sigma\subset \{1,\dots, n\}$, write $x_\sigma$ for the set of variables $x_i$ with $i\in\sigma$, and let $A_\sigma$ be the $K$-linear subspace of $A$ which is generated by the standard monomials in $\langle x_\sigma \rangle$. Suppose there exists a global monomial ordering $>$ on $A$ which is both admissible for $A$ and an elimination ordering for $x\smallsetminus x_\sigma$. Then $A_\sigma$ is a subalgebra of $A$ with $d_{ij}\in A_\sigma$ for each pair of indices $1\leq i<j \leq n$ with $i,j\in\sigma$. In particular, $A_\sigma$ is a PBW-algebra with admissible ordering $>_\sigma$, where $>_\sigma$ is the restriction of $>$ to the set of standard monomials in $\langle x_\sigma\rangle$. Moreover, if $I\subset A$ is a nonzero (left, right, two-sided) ideal, and $\mathcal G$ is a (left, right, two-sided) Gröbner basis for $I$ with respect to $>$, then $\mathcal G\cap A_\sigma$ is a (left, right, two-sided) Gröbner basis for $I\cap A_\sigma$ with respect to $>_\sigma$. We refer to computing $I\cap A_\sigma$ as eliminating the variables in $x\smallsetminus x_\sigma$ from $I.$

Note

If the relevant $d_{ij}$ are all contained in $A_\sigma$, we also say that $A_\sigma$ is admissible for elimination.

Note

A monomial ordering which is both admissible for $A$ and an elimination ordering for $x\smallsetminus x_\sigma$ may not exist.

eliminateMethod
eliminate(I::PBWAlgIdeal, V::Vector{<:PBWAlgElem}; ordering = nothing)

Given a vector V of 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::PBWAlgIdeal, V::Vector{Int}; ordering = nothing)

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.

Note

The return value is an ideal of the original algebra.

Note

If provided, the ordering must be an admissible elimination ordering (this is checked by the function). If not provided, finding an admissible elimination ordering may involve solving a particular linear programming problem. Here, the function is implemented so that it searches for solutions in a certain range only. If no solution is found in that range, the function will throw an error.

Examples

julia> R, (x, y, z, a) = QQ["x", "y", "z", "a"];

julia> L = [x*y-z, x*z+2*x, x*a, y*z-2*y, y*a, z*a];

julia> REL = strictly_upper_triangular_matrix(L);

julia> A, (x, y, z, a) = pbw_algebra(R, REL, deglex(gens(R)))
(PBW-algebra over Rational field in x, y, z, a with relations y*x = x*y - z, z*x = x*z + 2*x, a*x = x*a, z*y = y*z - 2*y, a*y = y*a, a*z = z*a, PBWAlgElem{QQFieldElem, Singular.n_Q}[x, y, z, a])

julia> f = 4*x*y+z^2-2*z-a;

julia> I = left_ideal(A, [x^2, y^2, z^2-1, f])
left_ideal(x^2, y^2, z^2 - 1, 4*x*y + z^2 - 2*z - a)

julia> eliminate(I, [x, y, z])
left_ideal(a - 3)

julia> eliminate(I, [1, 2 ,3])
left_ideal(a - 3)

julia> try eliminate(I, [z, a]); catch e; e; end
ErrorException("no elimination is possible: subalgebra is not admissible")
julia> R, (p, q) = QQ["p", "q"];

julia> L = [p*q+q^2];

julia> REL = strictly_upper_triangular_matrix(L);

julia> A, (p, q) = pbw_algebra(R, REL, lex(gens(R)))
(PBW-algebra over Rational field in p, q with relations q*p = p*q + q^2, PBWAlgElem{QQFieldElem, Singular.n_Q}[p, q])

julia> I = left_ideal(A, [p, q])
left_ideal(p, q)

julia> try eliminate(I, [q]); catch e; e; end   # in fact, no elimination ordering exists
ErrorException("could not find elimination ordering")
source

## Tests on Ideals

is_zeroMethod
is_zero(I::PBWAlgIdeal)

Return true if I is the zero ideal, false otherwise.

Examples

julia> D, (x, y, dx, dy) = weyl_algebra(QQ, ["x", "y"])
(Weyl-algebra over Rational field in variables (x, y), PBWAlgElem{QQFieldElem, Singular.n_Q}[x, y, dx, dy])

julia> I = left_ideal(D, [x, dx])
left_ideal(x, dx)

julia> is_zero(I)
false
source
is_oneMethod
is_one(I::PBWAlgIdeal{D}) where D

Return true if I is generated by 1, false otherwise.

Examples

julia> D, (x, y, dx, dy) = weyl_algebra(QQ, ["x", "y"])
(Weyl-algebra over Rational field in variables (x, y), PBWAlgElem{QQFieldElem, Singular.n_Q}[x, y, dx, dy])

julia> I = left_ideal(D, [x, dx])
left_ideal(x, dx)

julia> is_one(I)
true

julia> J = left_ideal(D, [y*x])
left_ideal(x*y)

julia> is_one(J)
false

julia> K = two_sided_ideal(D, [y*x])
two_sided_ideal(x*y)

julia> is_one(K)
true
julia> D, (x, y, dx, dy) = weyl_algebra(GF(3), ["x", "y"]);

julia> I = two_sided_ideal(D, [x^3])
two_sided_ideal(x^3)

julia> is_one(I)
false
source
is_subsetMethod
is_subset(I::PBWAlgIdeal{D, T, S}, J::PBWAlgIdeal{D, T, S}) where {D, T, S}

Return true if I is contained in J, false otherwise.

Examples

julia> D, (x, dx) = weyl_algebra(QQ, ["x"]);

julia> I = left_ideal(D, [dx^2])
left_ideal(dx^2)

julia> J = left_ideal(D, [x*dx^4, x^3*dx^2])
left_ideal(x*dx^4, x^3*dx^2)

julia> is_subset(I, J)
true
source
==Method
==(I::PBWAlgIdeal{D, T, S}, J::PBWAlgIdeal{D, T, S}) where {D, T, S}

Return true if I is equal to J, false otherwise.

Examples

julia> D, (x, dx) = weyl_algebra(QQ, ["x"]);

julia> I = left_ideal(D, [dx^2])
left_ideal(dx^2)

julia> J = left_ideal(D, [x*dx^4, x^3*dx^2])
left_ideal(x*dx^4, x^3*dx^2)

julia> I == J
true
source
ideal_membershipMethod
ideal_membership(f::PBWAlgElem{T, S}, I::PBWAlgIdeal{D, T, S}) where {D, T, S}

Return true if f is contained in I, false otherwise. Alternatively, use f in I.

Examples

julia> D, (x, dx) = weyl_algebra(QQ, ["x"]);

julia> I = left_ideal(D, [x*dx^4, x^3*dx^2])
left_ideal(x*dx^4, x^3*dx^2)

julia> dx^2 in I
true
julia> D, (x, y, dx, dy) = weyl_algebra(QQ, ["x", "y"]);

julia> I = two_sided_ideal(D, [x, dx])
two_sided_ideal(x, dx)

julia> one(D) in I
true
source