`minpoly` `MethodError`
nsajko opened this issue · 2 comments
nsajko commented
julia> using AbstractAlgebra
julia> matrix_algebra = MatrixAlgebra(ZZ, 2)
Matrix algebra of degree 2
over integers
julia> matrix = one(matrix_algebra)
[1 0]
[0 1]
julia> charpoly(matrix)
x^2 - 2*x + 1
julia> minpoly(matrix)
ERROR: MethodError: no method matching minpoly(::AbstractAlgebra.Generic.MatAlgElem{BigInt})
Closest candidates are:
minpoly(::MatElem{T}) where T<:RingElement
@ AbstractAlgebra ~/.julia/packages/AbstractAlgebra/dsta0/src/Matrix.jl:4621
minpoly(::MatElem{T}, ::Bool) where T<:RingElement
@ AbstractAlgebra ~/.julia/packages/AbstractAlgebra/dsta0/src/Matrix.jl:4621
minpoly(::PolyRing{T}, ::MatElem{T}) where T<:FieldElement
@ AbstractAlgebra ~/.julia/packages/AbstractAlgebra/dsta0/src/Matrix.jl:4399
...
Stacktrace:
[1] top-level scope
@ REPL[21]:1
nsajko commented
Works fine if matrix_space
is used instead of MatrixAlgebra
:
julia> using AbstractAlgebra
julia> matrix_algebra = matrix_space(ZZ, 2, 2)
Matrix space of 2 rows and 2 columns
over integers
julia> matrix = one(matrix_algebra)
[1 0]
[0 1]
julia> charpoly(matrix)
x^2 - 2*x + 1
julia> minpoly(matrix)
x - 1