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

Infinite recursion in LinearMatrixGroup_generic #35490

Closed
2 tasks done
videlec opened this issue Apr 12, 2023 · 0 comments · Fixed by #36881
Closed
2 tasks done

Infinite recursion in LinearMatrixGroup_generic #35490

videlec opened this issue Apr 12, 2023 · 0 comments · Fixed by #36881

Comments

@videlec
Copy link
Contributor

videlec commented Apr 12, 2023

Is there an existing issue for this?

  • I have searched the existing issues for a bug report that matches the one I want to file, without success.

Did you read the documentation and troubleshoot guide?

  • I have read the documentation and troubleshoot guide

Environment

- **OS**: ubuntu
- **Sage Version**: 9.5

Steps To Reproduce

In some situation, the special linear groups sage.groups.matrix_gps.linear.LinearMatrixGroup_generic is such that the two methods order (inherited from sage/groups/group.pyx) and cardinality (inherited from sage/categories/finite_groups.py) are calling each other

q = 7
FqT.<T> = GF(q)[]
N = T^2+1
FqTN = QuotientRing(FqT, N*FqT)
S = SL(2,FqTN)
S.is_finite()

In particular it breaks S.is_finite() which should work out of the box given that the category of S is the category of finite groups (obtained by S.category()).

Expected Behavior

True

Actual Behavior

Traceback (most recent call last):
<ipython-input-11-397d936442b9> in <module>
----> 1 S.is_finite()

.../sage/groups/group.pyx in sage.groups.group.Group.is_finite (build/cythonized/sage/groups/group.c:3068)()
    188             NotImplementedError
    189         """
--> 190         return self.order() != infinity
    191 
    192     def is_multiplicative(self):

.../sage/groups/group.pyx in sage.groups.group.Group.order (build/cythonized/sage/groups/group.c:2924)()
    171         """
    172         try:
--> 173             return self.cardinality()
    174         except AttributeError:
    175             raise NotImplementedError

.../sage/categories/finite_groups.py in cardinality(self)
    106                 return self._cardinality_from_iterator()
    107             else:
--> 108                 return o()
    109 
    110         def some_elements(self):

... last 2 frames repeated, from the frame below ...

.../sage/groups/group.pyx in sage.groups.group.Group.order (build/cythonized/sage/groups/group.c:2924)()
    171         """
    172         try:
--> 173             return self.cardinality()
    174         except AttributeError:
    175             raise NotImplementedError

RecursionError: maximum recursion depth exceeded while calling a Python object

Additional Information

No response

@videlec videlec added the t: bug label Apr 12, 2023
@mkoeppe mkoeppe changed the title <title> Infinite recursion in LinearMatrixGroup_generic Apr 12, 2023
@vbraun vbraun closed this as completed in 6ad8584 Feb 13, 2024
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.

2 participants