# Calculate Right Cosets

How do I get sage to list the right cosets for the group G = GL2(F3) and the subgroup H consisting of the upper triangular matrices with 1 on the main diagonal?

Calculate Right Cosets

asked
**
2011-03-25 11:58:22 -0600
**

This post is a wiki. Anyone with karma >750 is welcome to improve it.

How do I get sage to list the right cosets for the group G = GL2(F3) and the subgroup H consisting of the upper triangular matrices with 1 on the main diagonal?

add a comment

1

answered
**
2011-03-26 07:07:48 -0600
**

This post is a wiki. Anyone with karma >750 is welcome to improve it.

You can construct `GL(2, F3)`

in Sage using:

```
G=GL(2,GF(3))
```

See the reference manual for more about what you can do with a general linear group in Sage:

http://www.sagemath.org/doc/reference/sage/groups/matrix_gps/general_linear.html

As for cosets in Sage, some groups have this implemented, like the permutation groups:

```
H = PermutationGroup([(1,2),(1,2,3)])
P = H.subgroup([(2,3)])
H.cosets(P, side='right')
[[(), (2,3)], [(1,2), (1,2,3)], [(1,3,2), (1,3)]
```

But this isn't implemented directly in Sage for groups like the general linear group over a finite field. You could input `GL(2, F3)`

into Sage as a permutation group (this is a good exercise perhaps) and use the `cosets`

method.

```
%gap
# define general linear group
G := GL(2,3);;
P := NiceObject(G);
Print(P,"\n");
# define upper triangular subgroup
g1 := [[Z(3),0*Z(3)],[0*Z(3),Z(3)]];;
g2 := [[Z(3),Z(3)],[0*Z(3),Z(3)]];;
M := Group(g1,g2);;
MP := NiceObject(M);
Print(MP);
Group( [ (4,7)(5,8)(6,9), (2,7,6)(3,4,8) ] )
Group( [ (2,3)(4,7)(5,9)(6,8), (2,3)(4,9,6,7,5,8) ] )
```

Then in Sage:

```
G = PermutationGroup([ [(4,7),(5,8),(6,9)], [(2,7,6),(3,4,8)] ])
H = G.subgroup( [[(2,3),(4,7),(5,9),(6,8)], [(2,3),(4,9,6,7,5,8)]] )
G.cosets(H, side='right')
```

Of course you could do all of that directly in GAP (through Sage or not) if you want and it will be much faster for larger groups.

Asked: **
2011-03-25 11:58:22 -0600
**

Seen: **1,145 times**

Last updated: **Mar 26 '11**

Check if a finitely generated matrix group is finite (works with QQ and not with CC)

Order of elements in group multiplication?

Cosets Generated by Product of Generators

Permutation Representations and the Modular Group

PermutationGroupMorphism_im_gens

Check whether a modular subgroup is congruence from its generators

How to define finite difference approximation for first order derivative

Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.