Code for LCM of order of element in GAP

69 Views Asked by At

Is there an easier way to write the LCM part of this code? Gap only allows two arguments for LCM_INT.

SigmaSet := function(GROUP, g1, g2)
local S, g3;
S := [ ];
g3:= g2^-1 * g1^-1;
g_elts := [g1, g2, g3];
for g in GROUP do
    for j in [0..LCM_INT( Order(g1), LCM_INT( Order(g2), Order(g3) ) ) ] do
        for i in [1..3] do
            S := UnionSet(S, [g*g_elts[i]^j*g^-1 ]);
        od; 
    od; 
od;
return S;
end;