diff --git a/src/sage/groups/matrix_gps/linear.py b/src/sage/groups/matrix_gps/linear.py index 23e2d154e9e..70caaf80e26 100644 --- a/src/sage/groups/matrix_gps/linear.py +++ b/src/sage/groups/matrix_gps/linear.py @@ -66,6 +66,8 @@ from sage.groups.matrix_gps.named_group import ( normalize_args_vectorspace, NamedMatrixGroup_generic) from sage.misc.latex import latex +from sage.misc.misc_c import prod +from sage.rings.infinity import Infinity ############################################################################### @@ -321,12 +323,14 @@ def order(self): TESTS: Check if :trac:`36876` is fixed:: + sage: SL(1, QQ).order() 1 sage: SL(2, ZZ).cardinality() +Infinity Check if :trac:`35490` is fixed:: + sage: q = 7 sage: FqT. = GF(q)[] sage: N = T^2+1 @@ -337,9 +341,6 @@ def order(self): sage: S.order() 117600 """ - from sage.rings.infinity import Infinity - from sage.all import prod - n = self.degree() if self.base_ring().is_finite():