-
-
Notifications
You must be signed in to change notification settings - Fork 482
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
Fix order computation for linear groups GL(n, R) and SL(n, R) #37980
Conversation
Amend: Fix trailing whitespace
Documentation preview for this PR (built with commit 0be9db8; changes) is ready! 🎉 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly a bunch of little things. We do not want to return Python int
s. We can take advantage of the closure in Python. It would be good to add a test verifying the result:
sage: G = GL(2, Integers(6))
sage: G.order() == len(list(G))
True
sage: G = SL(2, Integers(6))
sage: G.order() == len(list(G))
True
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you. LGTM.
Not sure why the tests failed, but the error makes it seem like a CI issue. |
Indeed, something seems borked with it. |
…d SL(n, R) sagemath#36881 introduced some wrong results for orders of linear groups since it did not check whether the base ring is a field. We add the necessary checks as well as formulas for some further cases, namely $\mathbb{Z}$ and $\mathbb{Z}/q\mathbb{Z}.$ Finally, we add a `NotImplementedError` for the cases that are not supported. The formula for the general linear group over $\mathbb{Z}/q\mathbb{Z}$ is taken from https://math.stackexchange.com/a/2044571, and for the order of the special linear group we use the group isomorphism induced by the determinant. Fixes sagemath#37934. URL: sagemath#37980 Reported by: Sebastian A. Spindler Reviewer(s): Travis Scrimshaw
…d SL(n, R) sagemath#36881 introduced some wrong results for orders of linear groups since it did not check whether the base ring is a field. We add the necessary checks as well as formulas for some further cases, namely $\mathbb{Z}$ and $\mathbb{Z}/q\mathbb{Z}.$ Finally, we add a `NotImplementedError` for the cases that are not supported. The formula for the general linear group over $\mathbb{Z}/q\mathbb{Z}$ is taken from https://math.stackexchange.com/a/2044571, and for the order of the special linear group we use the group isomorphism induced by the determinant. Fixes sagemath#37934. URL: sagemath#37980 Reported by: Sebastian A. Spindler Reviewer(s): Travis Scrimshaw
#36881 introduced some wrong results for orders of linear groups since it did not check whether the base ring is a field. We add the necessary checks as well as formulas for some further cases, namely$\mathbb{Z}$ and $\mathbb{Z}/q\mathbb{Z}.$ Finally, we add a
NotImplementedError
for the cases that are not supported.The formula for the general linear group over$\mathbb{Z}/q\mathbb{Z}$ is taken from https://math.stackexchange.com/a/2044571, and for the order of the special linear group we use the group isomorphism induced by the determinant.
Fixes #37934.