Ask Your Question
1

Error: trying to find the normal subgroups of a given group

asked 2024-06-24 14:28:04 +0200

Deep gravatar image

updated 2024-06-25 15:04:23 +0200

I am new to SageMath and am currently exploring how to find all the normal subgroups of a specific group G. Here's a brief description of G:

Consider the ring R = Z/3Z × Z/3Z, where Z/3Z denotes the field with 3 elements. We define SL(4, R) as the special linear group of 4 × 4 matrices with entries from R.

The group G is a subgroup of SL(4, R), generated by the following matrices:

| (1,1)  (1,0)  (0,0)  (0,0) |   
| (0,0)  (1,1)  (0,0)  (0,0) |   
| (0,0)  (0,0)  (1,1)  (0,1) |  
| (0,0)  (0,0)  (0,0)  (1,1) |,  


| (1,1)  (0,1)  (0,0)  (0,0) |  
| (0,0)  (1,1)  (0,0)  (0,0) |  
| (0,0)  (0,0)  (1,1)  (1,0) |  
| (0,0)  (0,0)  (0,0)  (1,1) |,  


| (1,1)  (0,0)  (0,0)  (0,0) | 
| (0,0)  (1,1)  (1,1)  (0,0) |
| (0,0)  (0,0)  (1,1)  (0,0) |
| (0,0)  (0,0)  (0,0)  (1,1) |,


| (1,1)  (0,0)  (0,0)  (0,0) |  
| (1,0)  (1,1)  (0,0)  (0,0) |  
| (0,0)  (0,0)  (1,1)  (0,0) |  
| (0,0)  (0,0)  (0,1)  (1,1) |,  


| (1,1)  (0,0)  (0,0)  (0,0) |
| (0,1)  (1,1)  (0,0)  (0,0) |
| (0,0)  (0,0)  (1,1)  (0,0) |
| (0,0)  (0,0)  (1,0)  (1,1) |,


| (1,1)  (0,0)  (0,0)  (0,0) |  
| (0,0)  (1,1)  (0,0)  (0,0) |  
| (0,0)  (1,1)  (1,1)  (0,0) |  
| (0,0)  (0,0)  (0,0)  (1,1) |

I attempted to write SageMath code to find the normal subgroups of G but encountered errors. Here's the code I used:

# Define the finite field Z/3Z
Z3 = Integers(3)    

# Define the ring R as a Cartesian product of Z/3Z and Z/3Z
R = Z3.cartesian_product(Z3)    

# Define the matrices over R
matrices = [    
    matrix(R, [  
        [(1, 1), (1, 0), (0, 0), (0, 0)],    
        [(0, 0), (1, 1), (0, 0), (0, 0)],    
        [(0, 0), (0, 0), (1, 1), (0, 1)],    
        [(0, 0), (0, 0), (0, 0), (1, 1)]    
    ]),    
    matrix(R, [    
        [(1, 1), (0, 1), (0, 0), (0, 0)],    
        [(0, 0), (1, 1), (0, 0), (0, 0)],    
        [(0, 0), (0, 0), (1, 1), (1, 0)],    
        [(0, 0), (0, 0), (0, 0), (1, 1)]    
    ]),    
    matrix(R, [  
        [(1, 1), (0, 0), (0, 0), (0, 0)],  
        [(0, 0), (1, 1), (1, 1), (0, 0)],  
        [(0, 0), (0, 0), (1, 1), (0, 0)],  
        [(0, 0), (0, 0), (0, 0), (1, 1)]  
    ])  
]  

# Include their transposes
matrices += [m.transpose() for m in matrices]

# Generate G as the group generated by these matrices
G = MatrixGroup(matrices)

# Find the normal subgroups of G
normal_subgroups = G.normal_subgroups()

# Display the normal subgroups
normal_subgroups

Expected Outcome: I expected the code to list all the normal subgroups of the group G.

Actual Outcome: I encountered the following error message:

---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
File /home/sc_serv/sage/src/sage/structure/category_object.pyx:847, in sage.structure.category_object.CategoryObject.getattr_from_category()
    846 try:
--> 847     return self._cached_methods[name]
    848 except KeyError:

KeyError: 'normal_subgroups'

During handling of the above exception, another exception occurred:

AttributeError                            Traceback (most recent call last)
Cell In [1], line 36
     33 G = MatrixGroup(matrices)
     35 # Find the normal subgroups of G
---> 36 normal_subgroups = G.normal_subgroups()
     38 # Display the normal subgroups
     39 normal_subgroups

File /home/sc_serv/sage/src/sage/structure/category_object.pyx:841, in sage.structure.category_object.CategoryObject.__getattr__()
    839         AttributeError: 'PrimeNumbers_with_category' object has no attribute 'sadfasdf'...
    840     """
--> 841     return self.getattr_from_category(name)
    842 
    843 cdef getattr_from_category(self, name) noexcept:

File /home/sc_serv/sage/src/sage/structure/category_object.pyx:856, in sage.structure.category_object.CategoryObject.getattr_from_category()
    854     cls = self._category.parent_class
    855 
--> 856 attr = getattr_from_other_class(self, cls, name)
    857 self._cached_methods[name] = attr
    858 return attr

File /home/sc_serv/sage/src/sage/cpython/getattr.pyx:357, in sage.cpython.getattr.getattr_from_other_class()
    355     dummy_error_message.cls = type(self)
    356     dummy_error_message.name = name
--> 357     raise AttributeError(dummy_error_message)
    358 cdef PyObject* attr = instance_getattr(cls, name)
    359 if attr is NULL:

AttributeError: 'FinitelyGeneratedMatrixGroup_generic_with_category' object has no attribute 'normal_subgroups'

Request: Could someone please help me understand why this error occurs and how to fix it? Specifically, I would like to know:

  1. Why the normal_subgroups method is not available for the matrix group G.

  2. How to correctly find the normal subgroups of G in SageMath.

Any assistance in debugging this code or providing a correct approach would be greatly appreciated.

edit retag flag offensive close merge delete

Comments

Homework ?

Emmanuel Charpentier gravatar imageEmmanuel Charpentier ( 2024-06-24 20:58:07 +0200 )edit

Not exactly. I'm in a situation where I need to identify a counterexample to demonstrate that the subgroup mentioned is not simple.

Deep gravatar imageDeep ( 2024-06-24 21:16:49 +0200 )edit

I have updated the question to make it clearer for the reader.

Deep gravatar imageDeep ( 2024-06-25 15:05:36 +0200 )edit

The thing is that group-theoretic functionality is implemented at large for permutation groups only (via GAP). So, you may want to convert your group to a permutation one first to have access to advanced functionality.

Max Alekseyev gravatar imageMax Alekseyev ( 2024-06-25 16:25:20 +0200 )edit

1 Answer

Sort by » oldest newest most voted
1

answered 2024-06-26 23:16:20 +0200

dan_fulea gravatar image

The following answer does not really point to an error, since there is no error (to be corrected). The given code works just fine till we construct G, including the line:

G = MatrixGroup(matrices)

We obtain an object of

sage: type(G)
<class 'sage.groups.matrix_gps.finitely_generated.FinitelyGeneratedMatrixGroup_generic_with_category'>

but the present implementation does not provide any method to find the (normal) subgroups of G.

In such cases, my way to "solve the problem" is to get the best from mathematics and sage, in this case, to construct "the same structure" but within a class that always comes with a normal subgroups method.


Note that here also the "more mathematics" approach may be of interest, we are close to apply

Goursat's Lemma

in the following manner. Let $F$ be the field $$F=\Bbb F_3=\texttt{GF(3)}\ .$$ Let $H$ be the group $$H=\operatorname{SL}(4, F)\ .$$ Let $N$ be a normal subgroup of $G=H\times H$. Consider $p,q:H\times H\to H$, the projections of $G$ on the first, respectively second $H$-factor in the direct product. Let $K=p(N)$, $L=q(N)$ be the images of $N$ by $p,q$ respectively, they are normal subgroups of $H$, and there are not so many of them. The possibilities are in this special case

  • $1$, the trivial group with one element,
  • $\pm 1$, the group with two diagonal elements with same entry on the diagonal, or
  • $H$, the full group.

We apply Goursat's lemma for $N$, seen as a subgroup of $K\times L$. The induced, factorizing projections denoted also by $p,q$, $p:K\times L\to K$, and $q:K\times L\to L$ are now surjective, this is needed in the context of Goursat's lemma, and we apply it for $N\subseteq K\times L$. In our particular case we can go further, but below this is also done with sage.


Let us see how the story can be implemented in sage. We let $n=4$ be a variable, so that similar cases can be covered. Then $G = \operatorname{SL}(n, F\times F)$, and $n$ may be some small integer (like 2,3,4). The question is related to the group $$ G = \operatorname{SL}(n, F\times F) \cong\operatorname{SL}(n, F)\times \operatorname{SL}(n, F)=H\times H\ . $$ Here, $H$ is $\operatorname{SL}(n, F)$, of course, as in the previous mathematical preamble, where $n$ was four all the time. The code below prefers to work with $H\times H$, so from now on $G=H\times H$.

Generic elements of $H$ are denoted by $h$, possibly with decorations, e.g. $h',h_1,h_2$,and so on. An element of $G$ is of the shape $(h,k)$. We realize $H$ as a permutation group $P$, and finally work only with $P$ and $P\times P$ instead.

Sage gives the generators of $P=$P (corresponding to those of $H$, if we reject to "canonicalize" them), each generator is a product of disjoint cycles using the set $S={1,2,\dots,M}$ for some suitable $M$ (the "degree" of $P$ with $H\cong P$ in the terminology of sage). It is easy to get one more copy $S'={1',2',\dots,M'}$ of $S$, copy the generators, and get the doubled permutation group $P\times P$, in code PP. Permutation groups in sage come with the method of delivering the normal subgroups, so the end of the tunnel is in sight. We compute them in the world of permutation groups. (A step is needed to come back.)


So the code would be:

n = 4
F = GF(3)    # the field with 3 elements
H = SL(n, GF(3))    # a group with (3^n-1)(3^n-3)...(3^n-3^(n-1)) / (3-1) elements
P = H.as_permutation_group(algorithm='smaller', seed=2024)

M = P.degree()
gens = P.gens()
gens1 = [ [tuple(j     for j in cy) for cy in g.cycle_tuples()] for g in gens]
gens2 = [ [tuple(j + M for j in cy) for cy in g.cycle_tuples()] for g in gens]
PP = PermutationGroup(gens1 + gens2, canonicalize=False)    # canonicalize=0 keeps the generators

p = PP.Hom(P)([P(g) for g in gens1] + [P(1) for g in gens ])
q = PP.Hom(P)([P(1) for g in gens ] + [P(g) for g in gens1])

nors = PP.normal_subgroups()
nors.sort(key=lambda N: N.order())

We can get information on the normal subgroups in the list nors:

print(f"P is:\n{P}")
print(f"P x P is isomorphic to:\n{PP}")
print(f"The normal subgroups of P x P have the following characteristics:\n\n")

for N in nors:
    pN, qN = p.pushforward(N), q.pushforward(N)
    print(f"ORDER {N.order()} :: Normal subgroup with {len(N.gens())} generators:")
    print(f"\tp(N) has order {pN.order()} and structure {pN.structure_description()}")
    print(f"\tq(N) has order {qN.order()} and structure {qN.structure_description()}\n")

Results:

P is:
Permutation Group with generators [(28,37,46)(29,38,47)(30,39,48)(31,40,49)(32,41,50)(33,42,51)(34,43,52)(35,44,53)(36,45,54)(55,73,64)(56,74,65)(57,75,66)(58,76,67)(59,77,68)(60,78,69)(61,79,70)(62,80,71)(63,81,72), (2,7,10,55,3,4,19,28)(5,25,37,56,9,13,73,30)(6,22,46,29,8,16,64,57)(11,61,12,58,21,31,20,34)(14,79,39,59,27,40,74,36)(15,76,48,32,26,43,65,63)(17,70,66,60,24,49,47,35)(18,67,75,33,23,52,38,62)(41,80,45,68,81,42,77,54)(44,71,72,69,78,51,50,53)]
P x P is isomorphic to:
Permutation Group with generators [(28,37,46)(29,38,47)(30,39,48)(31,40,49)(32,41,50)(33,42,51)(34,43,52)(35,44,53)(36,45,54)(55,73,64)(56,74,65)(57,75,66)(58,76,67)(59,77,68)(60,78,69)(61,79,70)(62,80,71)(63,81,72), (2,7,10,55,3,4,19,28)(5,25,37,56,9,13,73,30)(6,22,46,29,8,16,64,57)(11,61,12,58,21,31,20,34)(14,79,39,59,27,40,74,36)(15,76,48,32,26,43,65,63)(17,70,66,60,24,49,47,35)(18,67,75,33,23,52,38,62)(41,80,45,68,81,42,77,54)(44,71,72,69,78,51,50,53), (109,118,127)(110,119,128)(111,120,129)(112,121,130)(113,122,131)(114,123,132)(115,124,133)(116,125,134)(117,126,135)(136,154,145)(137,155,146)(138,156,147)(139,157,148)(140,158,149)(141,159,150)(142,160,151)(143,161,152)(144,162,153), (83,88,91,136,84,85,100,109)(86,106,118,137,90,94,154,111)(87,103,127,110,89,97,145,138)(92,142,93,139,102,112,101,115)(95,160,120,140,108,121,155,117)(96,157,129,113,107,124,146,144)(98,151,147,141,105,130,128,116)(99,148,156,114,104,133,119,143)(122,161,126,149,162,123,158,135)(125,152,153,150,159,132,131,134)]
The normal subgroups of P x P have the following characteristics:


ORDER 1 :: Normal subgroup with 1 generators:
    p(N) has order 1 and structure 1
    q(N) has order 1 and structure 1

ORDER 2 :: Normal subgroup with 1 generators:
    p(N) has order 2 and structure C2
    q(N) has order 2 and structure C2

ORDER 2 :: Normal subgroup with 1 generators:
    p(N) has order 2 and structure C2
    q(N) has order 1 and structure 1

ORDER 2 :: Normal subgroup with 1 generators:
    p(N) has order 1 and structure 1
    q(N) has order 2 and structure C2

ORDER 4 :: Normal subgroup with 2 generators:
    p(N) has order 2 and structure C2
    q(N) has order 2 and structure C2

ORDER 12130560 :: Normal subgroup with 8 generators:
    p(N) has order 12130560 and structure SL(4,3)
    q(N) has order 1 and structure 1

ORDER 12130560 :: Normal subgroup with 24 generators:
    p(N) has order 1 and structure 1
    q(N) has order 12130560 and structure SL(4,3)

ORDER 24261120 :: Normal subgroup with 11 generators:
    p(N) has order 12130560 and structure SL(4,3)
    q(N) has order 2 and structure C2

ORDER 24261120 :: Normal subgroup with 3 generators:
    p(N) has order 2 and structure C2
    q(N) has order 12130560 and structure SL(4,3)

ORDER 147150485913600 :: Normal subgroup with 4 generators:
    p(N) has order 12130560 and structure SL(4,3)
    q(N) has order 12130560 and structure SL(4,3)

sage:
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2024-06-24 11:03:53 +0200

Seen: 151 times

Last updated: Jun 26