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

Missing operations on Vector{QQFieldElem} and Vector{ZZRingElem} #1555

Closed
YueRen opened this issue Oct 17, 2023 · 4 comments
Closed

Missing operations on Vector{QQFieldElem} and Vector{ZZRingElem} #1555

YueRen opened this issue Oct 17, 2023 · 4 comments

Comments

@YueRen
Copy link
Contributor

YueRen commented Oct 17, 2023

Would it be fine to add the following operations (probably to flint/fmpq.jl)? This is just for the sake of a beginner OSCAR user, the initiated know that .* and .*= exist.

Division

  • /(::Vector{QQFieldElem}, ::QQFieldElem)
  • /(::Vector{QQFieldElem}, ::ZZRingElem)

Multiplication

  • *(::Vector{QQFieldElem}, ::ZZRingElem)
  • *(::ZZRingElem, ::Vector{QQFieldElem})

The operations above work if the scalar is Int or Rational thanks to generic implementations in Base/arraymath.jl:

julia> @which QQ.([0,0,0])*1//1
*(A::AbstractArray, B::Number)
     @ Base arraymath.jl:24
@thofma
Copy link
Member

thofma commented Oct 17, 2023

I guess we can have this for consistency.

@fingolfin
Copy link
Member

@YueRen sounds good to me. If someone provides a PR, I'd be happy to merge it.

@YueRen
Copy link
Contributor Author

YueRen commented Oct 19, 2023

I've opened a PR for it:
#1559

@lgoettgens
Copy link
Collaborator

Closed by #1559

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

4 participants