Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Checking if the given matrices will generate a finite Group

Hello,

I am a newcomer to the SageMath. Basically, I have 100 matrices which have 44 dimensions in python. I want to check if this 100 matrices can generate an infinite group or not. P.S These matrices produced as SU(2) matrices and then were converted 44 matrices.

According to the document of sagemath, I tried to write a code but I am constantly having error:

rom sage.all import *
for i in su4_np:
      sage_matrix = np.matrix((i),complex)
      sage_matrix = matrix(sage_matrix)
      matrix_su4_np.append(sage_matrix)
#F = GL(4, 5) 
F = SL(4,5) #CC ,CyclotomicField(10)

gens = matrix_su4_np #this is the matrix which contains all 100 matrices
G = MatrixGroup(F,4,gens)   
#G.order
MatrixGroup(F,4,gens).is_finite()

This is the error:

--------------------------------------------------------------------------- MemoryError
Traceback (most recent call last) <ipython-input-218-8f1964d06d6d> in <module> 4 5 gens = matrix_su4_np ----> 6 G = MatrixGroup(F,4,gens) 7 MatrixGroup(F,4,gens).is_finite()

/usr/lib/python3/dist-packages/sage/misc/lazy_import.pyx in sage.misc.lazy_import.LazyImport.__call__ (build/cythonized/sage/misc/lazy_import.c:3686)() 351 True 352 """ --> 353 return self.get_object()(args, *kwds) 354 355 def __repr__(self):

/usr/lib/python3/dist-packages/sage/groups/matrix_gps/finitely_generated.py in MatrixGroup(gens, *kwds) 290 if len(gens) == 0: 291 raise ValueError('need at least one generator') --> 292 gens = normalize_square_matrices(gens)

293 if check and any(not g.is_invertible() for g in gens): 294 raise ValueError('each generator must be an invertible matrix')

/usr/lib/python3/dist-packages/sage/groups/matrix_gps/finitely_generated.py in normalize_square_matrices(matrices) 120 continue 121 try: --> 122 m = list(m) 123 except TypeError: 124 gens.append(m)

MemoryError:

Blockquote

I am guessing the error comes because of the F = SL(4,5) line. However, I do not know what to put instead of that line. Do we have a function which can check if we have finite group or not just from matrices? How to solve this error? I tried quite a lot combination to solve this problem but I always got an error

click to hide/show revision 2
None

Checking if the given matrices will generate a finite Group

Hello,

I am a newcomer to the SageMath. Basically, I have 100 matrices which have 44 dimensions in python. I want to check if this 100 matrices can generate an infinite group or not. P.S These matrices produced as SU(2) matrices and then were converted 44 matrices.

According to the document of sagemath, I tried to write a code but I am constantly having error:

rom from sage.all import *
for i in su4_np:
      sage_matrix = np.matrix((i),complex)
      sage_matrix = matrix(sage_matrix)
      matrix_su4_np.append(sage_matrix)
#F = GL(4, 5) 
F = SL(4,5) #CC ,CyclotomicField(10)

gens = matrix_su4_np #this is the matrix which contains all 100 matrices
G = MatrixGroup(F,4,gens)   
#G.order
MatrixGroup(F,4,gens).is_finite()

This is the error:

> --------------------------------------------------------------------------- MemoryError 
> Traceback (most recent call last) > <ipython-input-218-8f1964d06d6d> in > <module> > 4 > 5 gens = matrix_su4_np > ----> 6 G = MatrixGroup(F,4,gens) > 7 MatrixGroup(F,4,gens).is_finite()

MatrixGroup(F,4,gens).is_finite() > > /usr/lib/python3/dist-packages/sage/misc/lazy_import.pyx > in > sage.misc.lazy_import.LazyImport.__call__ > (build/cythonized/sage/misc/lazy_import.c:3686)() > 351 True > 352 """ > --> 353 return self.get_object()(args, *kwds) self.get_object()(*args, **kwds) > 354 > 355 def __repr__(self):

__repr__(self): > > /usr/lib/python3/dist-packages/sage/groups/matrix_gps/finitely_generated.py > in MatrixGroup(gens, *kwds) MatrixGroup(*gens, **kwds) > 290 if len(gens) == 0: > 291 raise ValueError('need at least one generator') > --> 292 gens = normalize_square_matrices(gens)

normalize_square_matrices(gens) > > 293 if check and any(not > g.is_invertible() for g in gens): > 294 raise ValueError('each generator must be an invertible matrix')

> matrix') > > /usr/lib/python3/dist-packages/sage/groups/matrix_gps/finitely_generated.py > in normalize_square_matrices(matrices) > 120 continue > 121 try: > --> 122 m = list(m) > 123 except TypeError: > 124 gens.append(m)

gens.append(m) MemoryError:

Blockquote

> Blockquote

I am guessing the error comes because of the F = SL(4,5) line. However, I do not know what to put instead of that line. Do we have a function which can check if we have finite group or not just from matrices? How to solve this error? I tried quite a lot combination to solve this problem but I always got an error

Checking if the given matrices will generate a finite Group

Hello,

I am a newcomer to the SageMath. Basically, I have 100 matrices which have 44 4x4 dimensions in python. I want to check if this 100 matrices can generate an infinite group or not. P.S These matrices produced as SU(2) matrices and then were converted 44 4x4 matrices.

According to the document of sagemath, I tried to write a code but I am constantly having error:

from sage.all import *
for i in su4_np:
      sage_matrix = np.matrix((i),complex)
      sage_matrix = matrix(sage_matrix)
      matrix_su4_np.append(sage_matrix)
#F = GL(4, 5) 
F = SL(4,5) #CC ,CyclotomicField(10)

gens = matrix_su4_np #this is the matrix which contains all 100 matrices
G = MatrixGroup(F,4,gens)   
#G.order
MatrixGroup(F,4,gens).is_finite()

This is the error:

> --------------------------------------------------------------------------- MemoryError                           
> Traceback (most recent call last)
> <ipython-input-218-8f1964d06d6d> in
> <module>
>       4 
>       5 gens = matrix_su4_np
> ----> 6 G = MatrixGroup(F,4,gens)
>       7 MatrixGroup(F,4,gens).is_finite()
> 
> /usr/lib/python3/dist-packages/sage/misc/lazy_import.pyx
> in
> sage.misc.lazy_import.LazyImport.__call__
> (build/cythonized/sage/misc/lazy_import.c:3686)()
>     351             True
>     352         """
> --> 353         return self.get_object()(*args, **kwds)
>     354 
>     355     def __repr__(self):
> 
> /usr/lib/python3/dist-packages/sage/groups/matrix_gps/finitely_generated.py
> in MatrixGroup(*gens, **kwds)
>     290     if len(gens) == 0:
>     291         raise ValueError('need at least one generator')
> --> 292     gens = normalize_square_matrices(gens)
> 
> 293     if check and any(not
> g.is_invertible() for g in gens):
>     294         raise ValueError('each generator must be an invertible
> matrix')
> 
> /usr/lib/python3/dist-packages/sage/groups/matrix_gps/finitely_generated.py
> in normalize_square_matrices(matrices)
>     120             continue
>     121         try:
> --> 122             m = list(m)
>     123         except TypeError:
>     124             gens.append(m)

MemoryError: 
> Blockquote

I am guessing the error comes because of the F = SL(4,5) line. However, I do not know what to put instead of that line. Do we have a function which can check if we have finite group or not just from matrices? How to solve this error? I tried quite a lot combination to solve this problem but I always got an error

click to hide/show revision 4
retagged

Checking if the given matrices will generate a finite Group

Hello,

I am a newcomer to the SageMath. Basically, I have 100 matrices which have 4x4 dimensions in python. I want to check if this 100 matrices can generate an infinite group or not. P.S These matrices produced as SU(2) matrices and then were converted 4x4 matrices.

According to the document of sagemath, I tried to write a code but I am constantly having error:

from sage.all import *
for i in su4_np:
      sage_matrix = np.matrix((i),complex)
      sage_matrix = matrix(sage_matrix)
      matrix_su4_np.append(sage_matrix)
#F = GL(4, 5) 
F = SL(4,5) #CC ,CyclotomicField(10)

gens = matrix_su4_np #this is the matrix which contains all 100 matrices
G = MatrixGroup(F,4,gens)   
#G.order
MatrixGroup(F,4,gens).is_finite()

This is the error:

> --------------------------------------------------------------------------- MemoryError                           
> Traceback (most recent call last)
> <ipython-input-218-8f1964d06d6d> in
> <module>
>       4 
>       5 gens = matrix_su4_np
> ----> 6 G = MatrixGroup(F,4,gens)
>       7 MatrixGroup(F,4,gens).is_finite()
> 
> /usr/lib/python3/dist-packages/sage/misc/lazy_import.pyx
> in
> sage.misc.lazy_import.LazyImport.__call__
> (build/cythonized/sage/misc/lazy_import.c:3686)()
>     351             True
>     352         """
> --> 353         return self.get_object()(*args, **kwds)
>     354 
>     355     def __repr__(self):
> 
> /usr/lib/python3/dist-packages/sage/groups/matrix_gps/finitely_generated.py
> in MatrixGroup(*gens, **kwds)
>     290     if len(gens) == 0:
>     291         raise ValueError('need at least one generator')
> --> 292     gens = normalize_square_matrices(gens)
> 
> 293     if check and any(not
> g.is_invertible() for g in gens):
>     294         raise ValueError('each generator must be an invertible
> matrix')
> 
> /usr/lib/python3/dist-packages/sage/groups/matrix_gps/finitely_generated.py
> in normalize_square_matrices(matrices)
>     120             continue
>     121         try:
> --> 122             m = list(m)
>     123         except TypeError:
>     124             gens.append(m)

MemoryError: 
> Blockquote

I am guessing the error comes because of the F = SL(4,5) line. However, I do not know what to put instead of that line. Do we have a function which can check if we have finite group or not just from matrices? How to solve this error? I tried quite a lot combination to solve this problem but I always got an error