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 evaluate for matrix #1497

Closed
albinahlback opened this issue Nov 6, 2023 · 3 comments
Closed

Missing evaluate for matrix #1497

albinahlback opened this issue Nov 6, 2023 · 3 comments

Comments

@albinahlback
Copy link
Contributor

I think I should be able to do this:

julia> P, x = PolynomialRing(QQ, 2)
(Multivariate polynomial ring in 2 variables over QQ, QQMPolyRingElem[x1, x2])

julia> F = FractionField(P)
Fraction field
  of multivariate polynomial ring in 2 variables over QQ

julia> M = MatrixSpace(F, 2, 2)
Matrix space of 2 rows and 2 columns
  over fraction field of multivariate polynomial ring

julia> m = M()
[0   0]
[0   0]

julia> m[1, 1] = x[1]^2 + x[2]
x1^2 + x2

julia> m
[x1^2 + x2   0]
[        0   0]

julia> evaluate(m, [1; 2])

However, no method evaluate exists for this.

@thofma
Copy link
Member

thofma commented Nov 6, 2023

julia> map(p -> evaluate(p, [1, 2]), m)
[3   0]
[0   0]

I am a bit reluctant to add it, since we usually don't add extra methods, if it is just a (simple) application of map.

@fieker
Copy link
Contributor

fieker commented Nov 6, 2023

I agree with Tommy - as this is yet another example of induced actions...what about a univariate polynomial ring over your bivariate one: should evaluate then work as well and apply to the coeffs?

@albinahlback
Copy link
Contributor Author

Alright, sounds reasonable!

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

3 participants