# intersection of subgroups

I have a group and I'd like to compute the intersection of 2 certain subgroups. How can I compute the intersection in Sage?

intersection of subgroups

add a comment

0

I don't think there is an automatic way to do this. If your groups are finite, something like the following might be enough:

```
sage: G = SymmetricGroup(4)
sage: H = G.subgroup([G([(1,2),(3,4)]),G((1,2))])
sage: K = G.subgroup([G((1,3,2,4))])
sage: for k in K:
if k in H:
print k
()
(1,2)(3,4)
```

Using a list comprehension does the same thing as the for loop above; you can feed this directly to the subgroup function to get the corresponding subgroup:

```
sage: G.subgroup([k for k in K if k in H])
Subgroup of SymmetricGroup(4) generated by [(), (1,2)(3,4)]
```

If your subgroups are countably infinite and the intersection is finite, then maybe some modified version of this will work. Otherwise you may have to be more clever.

Asked: **
2010-12-12 04:11:21 -0500
**

Seen: **321 times**

Last updated: **Dec 15 '10**

Orbits on group actions acting on sets

question about galoisgroup of show(G[1](a)) of Q(x^6)

Sage 7.4 : sage -i database_gap hangs

Direct product of $S_n$ and $\mathbb Z_m$

Check whether a modular subgroup is congruence from its generators

Iterator for conjugacy classes of Sn

Cosets Generated by Product of Generators

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.