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

Action of MatrixGroup on a MPolynomialRing (first attempt, changes likely necessary!) #35171

Closed

Conversation

Bruno-TT
Copy link
Contributor

Attempting to revive dead ticket #4513

Not too familiar with the surrounding code so this is probably very imperfect - please let me know what to change!

@dimpase dimpase force-pushed the u/gh-Bruno-TT/ticket_4513 branch from 751dde6 to d5fe6fd Compare March 8, 2023 14:27
@github-actions
Copy link

github-actions bot commented Mar 8, 2023

Documentation preview for this PR is ready! 🎉
Built with commit: d5fe6fd

@tscrim
Copy link
Collaborator

tscrim commented Mar 28, 2023

It would be good to have this, but I have a number of issues with the current proposal:

  • I don't think __call__ of a group element of a matrix is the right place to implement this. I think we should use some other symbol for this different (but natural) action. For example, @ (matmul) or ^ (either xor or pow). This would be more natural IMO. It would also allow us to fit it into the coercion framework.
  • Does this action extend to all matrices? I thought it did.
  • I don't think mRingPoly.variables() is returning what you expect (all variables of its parent):
sage: R.<x,y,z> = QQ[]
sage: x + y
x + y
sage: _.variables()
(x, y)

If you do want to use the polynomial rather than the parent, then you aren't really implementing an action.

  • PEP8: in particular, Python uses lowercase_underscore variables.
  • Rather than using the variables as a matrix, you should use them as a vector.
  • You are using both other and mRingPoly`. I see no reason to assign another variable.
  • Use isinstance(x, Foo) instead of type(x) == Foo to allow for subclasses.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants