Skip to content

Base.promote(::NCRingElem, ::MatrixElem) does not promote to a common type #2425

Description

@JohnAAbbott

In PR #2420 @lgoettgens has proposed a replacement for Base.promote(::MatrixElem, ::MatrixElem) where the idea to replace MatrixElem with MatElem and/or MatRingElem (so there are 4 cases to consider here).

What should happen in the following scenario?

julia> R = matrix_ring(ZZ, 3);

julia> S = matrix_space(ZZ, 3, 3);

julia> Base.promote(one(R), one(S))
[[[what happens here?]]]

Current code gives an error. The proposed new code wants to promote to matrix_space(matrix_ring(ZZ,3), 3,3), but then returns an "asymmetrical" result -- see the second part of the first comment in PR #2420

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions