AbstractAlgebra.jl
AbstractAlgebra.jl copied to clipboard
`exponent_vectors` of universal polynomials
Hi, I found some inconsistencies of exponent_vectors
:
julia> S=UniversalPolynomialRing(QQ)
Universal Polynomial Ring over Rational Field
julia> i,j=gens(S, ["i","j"])
(i, j)
julia> collect(exponent_vectors(i))
1-element Vector{Vector{Int64}}:
[1]
julia> collect(exponent_vectors(j))
1-element Vector{Vector{Int64}}:
[0, 1]
julia> ii=S(i)
i
julia> collect(exponent_vectors(ii))
1-element Vector{Vector{Int64}}:
[1, 0]
I wondered why they have sometimes different length. First I thought that they may be zero stripped from the right but this is clearly not the case as one can see with ii
. As far as I can tell this is caused by the underlying MPoly
s. By the time i
was created S
had only one variable, so i.p
is contained in a ring with just one variable. But ii
is now created from a ring that already has two variables, so the parent of ii.p
has two variables (similarly j.p
). This can be seen here:
julia> nvars(parent(i.p))
1
julia> nvars(parent(ii.p))
2
julia> nvars(parent(j.p))
2
So, is the current behavior of exponent_vectors
intended?