> HK:=[];
> for h in H do
>   for k in K do
>      if h*k not in HK then
>         Add(HK,h*k);
>      fi;
>   od;
> od;

To avoid checking for duplicates, you could use

HK := [];
for h in H do
        for k in RightTransversal (K, Intersection (H, K)) do
                Add (HK, h*k);
        od;
od;

But do you really want HK as a list? You might be better off representing it as 
a list of riight cosets of H (or left cosets of K).

Cheers

Burkhard.


_______________________________________________
Forum mailing list
Forum@mail.gap-system.org
http://mail.gap-system.org/mailman/listinfo/forum

Reply via email to