I think it would be a good idea to use the promote system to also support the following:
julia> using AbstractAlgebra
julia> Qx, x = QQ["x"]
(Univariate Polynomial Ring in x over Rationals, x)
julia> A = zero_matrix(Qx, 2, 2)
[0 0]
[0 0]
julia> B = zero_matrix(QQ, 2, 2)
[0//1 0//1]
[0//1 0//1]
julia> A * B
ERROR: MethodError: [...]
A minor problem is that we cannot use the generic * fallback for ring elements since
these are not ring elements and
we don't want to create parents.
I guess the best idea is to use the promote system and use it to write a fallback * for matrices using change_base_ring.
I will take a stab at this if y'all think this is not a terrible idea.
I think it would be a good idea to use the promote system to also support the following:
A minor problem is that we cannot use the generic
*
fallback for ring elements sinceI guess the best idea is to use the promote system and use it to write a fallback
*
for matrices usingchange_base_ring
.I will take a stab at this if y'all think this is not a terrible idea.