[GAP Forum] ClosureGroup!
Bill Allombert
Bill.Allombert at math.u-bordeaux.fr
Sat Oct 12 13:33:20 BST 2019
On Sat, Oct 12, 2019 at 12:17:37PM +0000, lopo apelo kosho wrote:
> Dear friends,
> I am writing a GAP code to check the following property: The join of any two permutable subgroup is a PERMUTABLE subgroup. I have a code that gives all permutable subgroups in a given group (PermutableSubgroups(g)). Here is my code:
>
>
> IsPermJoinGroup:=function(g)local i,n,j,c;
>
> if IsAbelian(g)=truethen
>
> return true;
>
> fi;
>
> n:=PermutableSubgroups(g);
>
> if Size(n)=1 then return true;
>
> fi;
>
> for i in[1..Size(n)] do
>
> for j in [i+1..n]do
^^^
You should probably replace [i+1..n] by [i+1..Size(n)]
In fact you should probably rename n to N and set
N:=PermutableSubgroups(g);
n:=Size(N);
this would make your code more readable.
Cheers,
Bill
More information about the Forum
mailing list