-
-
Notifications
You must be signed in to change notification settings - Fork 503
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 #4513
Comments
comment:1
Sorry, in the above code I forgot to copy/paste the line
Moreover, for the reasons above, the ticket should belong to commutative algebra, not just algebra (I was clicking on the wrong button). |
comment:2
The patch For example, Martin mentioned the possibility (off list) to create a pyx file with a Cython function, and then the call method would use that function. It might pay off here, since there are tight loops and since the method has to deal with tuples or lists. So Cdefining might speed things up. Opinions? At least, the following now works:
|
call method for MatrixGroupelement (this time with doc test) and left_matrix_action for MPolynomial |
comment:4
Attachment: matrixgroupCall.patch.gz Some changes: Nicolas Thiéry suggested to implement the action of matrix groups by a method for polynomials (I call the method This has several advantages:
I have two Cython concerns left:
where
But would this be faster? |
Attachment: matrixgroupCallNew.patch.gz Another version of left_matrix_action |
comment:5
In Nevertheless, I made two separate patches, so that the reviewer (if there is any...) can compare by him- or herself. Cheers |
comment:6
One observation:
It results in a further improvement of computation time. Is this coincidence? Or is it since summation of polynomials should better start with the smallest summands? Anyway, I didn't change the patch yet. |
Slight improvement; extended functionality |
comment:7
Attachment: matrixgroupCallNew2.patch.gz Replying to @simon-king-jena:
I made a couple of tests, and there was a small but consistent improvement. So, in the third patch (to be applied after the other two) I did it in that way. The
|
comment:8
I did confirm that the patches apply cleanly,
works, and that the code seems well-documented. However, I can't do testing on this machine
could probably be rewritten as a one-line sum, which might Maybe Martin Albrecht could comment on the Cython code? If Martin (for example) passes the Cython code, and the |
comment:9
shouldn't Im = M take care of the type checking anyway, so that a try-except block is sufficient? Also, I think maybe the type of p should be checked in the |
comment:10
Cython code looks good (just read it). |
comment:11
REFEREE REPORT: Check this out:
Oops, your left action -- which it better be if you use that notation -- ain't a left action! Oops -- William |
comment:12
Really Oops. Sorry. I implemented it analogous to what is done in Singular. Perhaps I am mistaken in the sense that it is supposed to be a right action (which then would deserve another notation).
However, I think it doesn't matter what Singular does. I will look up the literature whether one really wants a right or left action, and how the left action is supposed to be. |
comment:13
Replying to @simon-king-jena:
I mean, something like "one has a left action on a variety, which gives rise to a right action on the coordinate ring". I have to sort it out. If this is the case, then it should be better implemented in the
|
comment:14
Left actions should use Substitution is a right action. Substitution of the inverse is a left action. |
Author: Simon King |
comment:18
I made Cc to malb and wdj, since it both concerns polynomials and groups. |
comment:19
Sorry to be a nag, but matrix_group_element.py doesn't pass the doctests:
This is the same doctest score that the old unpatched file gets too. |
comment:20
Replying to @sagetrac-nharris:
Which one fails?
Of course there is no change. I added code to one already existing method, extending its functionality, and added tests for the new functionality. But this patch is not about inversion of matrix group elements, and I think the patch is not supposed to add documentation to methods that are not in its scope. So, unless a doc test fails because of my patch, the criticism about not raising the doc test coverage is invalid. |
comment:21
I'm sorry if I did something that I shouldn't have. I was just following this guideline for reviewing patches (found here http://www.sagemath.org/doc/developer/trac.html#section-review-patches): Is it documented sufficiently, including both explanation and doctests? This is very important: all code in Sage must have doctests, so even if the patch is for code which did not have a doctest before, the new version must include one. In particular, all new code must be 100% doctested. Use the command sage -coverage to see the coverage percentage of . |
comment:22
Replying to @sagetrac-nharris:
If you would read the patch, you would find:
In particular, it is impossible to detect the doc test change without reading the patch, by just using |
comment:23
Apply (for patchbot -- it's trying to apply all the patches at once) |
comment:24
(maybe it will work this time?) |
comment:25
(For some reason patchbot's not picking this up -- I apologise to all human beings reading this for the spam!) |
comment:26
I've had a look at the patch, and I don't think you've addressed William's comment #14 from two years back. The following makes me extremely uneasy:
It looks like there's some pre-existing coercion mechanism which returns elements of the matrix space over R, and you're overriding it in one case with an alternative coercion that returns completely different answers; this violates a Sage coercion axiom (where there are multiple paths in the coercion diagram, all must give the same answer up to numerical precision issues). Moreover, if you look at the patchbot logs it seems to have found an example where the preexisting coercion gets picked up instead of the new one. Sorry, that's a thumbs down from me. David |
Reviewer: David Loeffler, William Stein |
A group of n by n matrices over a field K acts on a polynomial ring with n variables over K. However, this is not implemented yet.
The following should work:
On the other hand, we still want to have the usual action on vectors or matrices:
CC: @wdjoyner @malb
Component: commutative algebra
Keywords: matrix group, action, polynomial ring
Author: Simon King
Reviewer: David Loeffler, William Stein
Issue created by migration from https://trac.sagemath.org/ticket/4513
The text was updated successfully, but these errors were encountered: