Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ambiguous promote rule for AbsAlgAssElem #419

Closed
joschmitt opened this issue Oct 4, 2021 · 5 comments
Closed

Ambiguous promote rule for AbsAlgAssElem #419

joschmitt opened this issue Oct 4, 2021 · 5 comments

Comments

@joschmitt
Copy link
Collaborator

Unfortunately, I don't know enough about Oscar promote rules to fix this myself:

julia> A = Hecke.quaternion_algebra2(QQ, -1, -1);

julia> R, x = A["x"];

julia> x*A[2]
ERROR: MethodError: *(::AbstractAlgebra.Generic.Poly{AlgAssElem{fmpq, AlgAss{fmpq}}}, ::AlgAssElem{fmpq, AlgAss{fmpq}}) is ambiguous. Candidates:
  *(b::T, a::Hecke.AbsAlgAssElem{S}) where {T<:RingElem, S<:RingElem} in Hecke at /home/schmitt/.julia/dev/Hecke/src/AlgAss/Elem.jl:434
  *(a::PolyElem{T}, b::T) where T<:RingElem in AbstractAlgebra at /home/schmitt/.julia/packages/AbstractAlgebra/p2ZfQ/src/Poly.jl:743
Possible fix, define
  *(::T, ::T) where {T<:(PolyElem{T} where T<:RingElem), T<:(Hecke.AbsAlgAssElem{S} where S<:RingElem)}
Stacktrace:
 [1] top-level scope
   @ REPL[4]:1
@thofma
Copy link
Owner

thofma commented Oct 5, 2021

I will have a look tomorrow.

@thofma
Copy link
Owner

thofma commented Oct 6, 2021

What do you want to do with the polynomials?

@thofma
Copy link
Owner

thofma commented Oct 6, 2021

(P.S.: This is not a promote rule problem. It is a problem of too wide signatures and missing promote rules.)

@joschmitt
Copy link
Collaborator Author

What do you want to do with the polynomials?

Nothing, to be honest. I was just playing around until I noticed that polynomials over skew fields are even weirder than I anticipated...
I only wanted to let you know about this.

@thofma
Copy link
Owner

thofma commented Oct 7, 2021

I see, thanks! Good that you raised this issue. I found some problems. Because we did AbsAlgAss <: Ring instead of <: NCRing, we actually got the "wrong" polynomials (Poly instead of NCPoly). We did <: Ring because otherwise we don't have matrices (see also Nemocas/AbstractAlgebra.jl#1035).

I will keep it <: Ring, but will make the polynomial ring constructor create something in the NC world.

thofma added a commit that referenced this issue Nov 7, 2021
(Fixes #419)

- AA does not have matrices for noncommutative rings (yet)
- We make our algberas/orders subtypes of Ring (to make matrices work)
- But we want NCPolynomialRing for polynomials over this ring
thofma added a commit that referenced this issue Nov 7, 2021
(Fixes #419)

- AA does not have matrices for noncommutative rings (yet)
- We make our algberas/orders subtypes of Ring (to make matrices work)
- But we want NCPolynomialRing for polynomials over this ring
thofma added a commit that referenced this issue Nov 7, 2021
(Fixes #419)

- AA does not have matrices for noncommutative rings (yet)
- We make our algberas/orders subtypes of Ring (to make matrices work)
- But we want NCPolynomialRing for polynomials over this ring
@thofma thofma closed this as completed in 16b8115 Nov 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants