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
_______________________________________________
Forum mailing list
[email protected]
https://mail.gap-system.org/mailman/listinfo/forum