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

Wrong order of finite matrix groups #37934

Open
2 tasks done
alexander-betts opened this issue May 4, 2024 · 2 comments · May be fixed by #37980
Open
2 tasks done

Wrong order of finite matrix groups #37934

alexander-betts opened this issue May 4, 2024 · 2 comments · May be fixed by #37980

Comments

@alexander-betts
Copy link

Steps To Reproduce

On Sage 10.3 running in CoCalc, run

sage: GL(2,Integers(4)).order()
180
sage: GL(2,Integers(1)).order()
0

Expected Behavior

sage: GL(2,Integers(4)).order()
96
sage: GL(2,Integers(1)).order()
1

First one works in sage version 10.2, second one returns recursion error.

Actual Behavior

See above. Seems to be computing GL(2,Integers(q)).order() as (q-1)^2q(q+1).

Additional Information

Explanation of correct computation: here.

Environment

- **OS**: CoCalc
- **Sage Version**: 10.3

Checklist

  • I have searched the existing issues for a bug report that matches the one I want to file, without success.
  • I have read the documentation and troubleshoot guide
@S17A05
Copy link
Contributor

S17A05 commented May 10, 2024

This seems to have been introduced by #36881, since the formula given there only works if the finite base ring is a field; previously (for your example) the method called GAP to compute the order instead.

@S17A05
Copy link
Contributor

S17A05 commented May 10, 2024

There is also some other funny stuff introduced by this change, such as

sage: GL(1, ZZ).order()
+Infinity

vbraun pushed a commit to vbraun/sage that referenced this issue May 18, 2024
…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
vbraun pushed a commit to vbraun/sage that referenced this issue May 18, 2024
…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
vbraun pushed a commit to vbraun/sage that referenced this issue May 24, 2024
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants