0

We devised a function in class to test if the nilpotency class of a group is or not the sum of those of its p-Sylows. The original was the first one below, without the n:=NilpotencyClass(G) line. I got a strange result, as you will see below. The teacher got a different strange result: 3 1. But the group G wasn't abelian, so we would have found a non-Abelian class 1 nilpotent group, which is absurd. Then we tried isolating the function, also because a classmate of mine had the function properly working. That solved the problem. Curious about this mystery, I tried to isolate the problem, and found it came straight out of the function. I tried calculating the returned NilpotencyClass at the start of the function and it worked. If I don't, even outside the function I still get NilpotencyClass(G)=32767! So I have the following code:

TestNilpotencyClass := function(G)
    n:=NilpotencyClass(G);
    if not IsNilpotent(G) then
        return 0;
    end if;
    N := #G;
    somma := 0;
    for pn in Factorisation(N) do
        p := pn[1];
        P := SylowSubgroup(G,p);
        c := NilpotencyClass(P);
        somma +:= c;
    end for;
    return somma, n;
end function;

TestNilpotencyClassb := function(G)
    if not IsNilpotent(G) then
        return 0;
    end if;
    NilpotencyClass(G);
    N := #G;
    somma := 0;
    for pn in Factorisation(N) do
        p := pn[1];
        P := SylowSubgroup(G,p);
        c := NilpotencyClass(P);
        somma +:= c;
    end for;
    return somma, NilpotencyClass(G);
end function;

TestNilpotencyClassc := function(G)
    if (not IsNilpotent(G)) then
        return 0;
    end if;
    NilpotencyClass(G);
    N := #G;
    somma := 0;
    for pn in Factorisation(N) do
        p := pn[1];
        P := SylowSubgroup(G,p);
        c := NilpotencyClass(P);
        somma +:= c;
    end for;
    return somma, NilpotencyClass(G);
end function;

TestNilpotencyClassd := function(G)
    if (not (IsNilpotent(G))) then
        return 0;
    end if;
    NilpotencyClass(G);
    N := #G;
    somma := 0;
    for pn in Factorisation(N) do
        p := pn[1];
        P := SylowSubgroup(G,p);
        c := NilpotencyClass(P);
        somma +:= c;
    end for;
    return somma, NilpotencyClass(G);
end function;

G:=SmallGroups(40)[11];
TestNilpotencyClass(G);
TestNilpotencyClassb(G);
TestNilpotencyClassc(G);
TestNilpotencyClassd(G);

Loading this on MAGMA yields the following result:

3 2
32767
3 32767
32767
3 32767
32767
3 32767

Where is that 32767 coming from? Notice how it is 2^(15)-1. Why is this miscalculation being produced?

Update: I tried copy-pasting the code to MAGMA and the result was the same. Furthermore, after quitting and reopening, I tried copy-pasting only the first function, then computing the NilpotencyClass, then using the function, and here's the result:

host-001:~ michelegorini$ magma
Magma V2.20-4 (STUDENT)   Fri Dec 19 2014 17:29:45    [Seed = 1006321001]
Type ? for help.  Type <Ctrl>-D to quit.
TestNilpotencyClass := function(G)
    n:=NilpotencyClass(G);
    if not IsNilpotent(G) then
        return 0;
    end if;
    N := #G;
    somma := 0;
    for pn in Factorisation(N) do
        p := pn[1];
        P := SylowSubgroup(G,p);
        c := NilpotencyClass(P);
        somma +:= c;
    end for;
    return somma, n;
end function;> TestNilpotencyClass := function(G)
function>     n:=NilpotencyClass(G);
function>     if not IsNilpotent(G) then
function|if>         return 0;
function|if>     end if;
function>     N := #G;
function>     somma := 0;
function>     for pn in Factorisation(N) do
function|for>         p := pn[1];
function|for>         P := SylowSubgroup(G,p);
function|for>         c := NilpotencyClass(P);
function|for>         somma +:= c;
function|for>     end for;
function>     return somma, n;
function> end function;
> G:=SmallGroups(40)[11];
> TestNilpotencyClass(G);
3 2
> NilpotencyClass(G);
32767
> TestNilpotencyClass(G);
3 32767
> TestNilpotencyClass(SmallGroups(40)[11]);
3 2
> NilpotencyClass(SmallGroups(40)[11]);    
2
talonmies
  • 70,661
  • 34
  • 192
  • 269
MickG
  • 3,216
  • 2
  • 14
  • 22
  • Has anybody seen this? It's been up for 18 days now… – MickG Jan 03 '15 at 16:43
  • Why are my MAGMA questions constantly left unanswered? Is it a coincidence or what? Asked 28 days ago, viewed 105 times. – MickG Jan 13 '15 at 15:22
  • So, after a month waiting here, a day waiting for the dementially required preapproval by mods on [the MAGMA forum](http://icl.cs.utk.edu/magma/forum/search.php?search_id=egosearch), where I am present as mickg. Wow, will I ever get an answer to this? – MickG Jan 25 '15 at 12:16
  • Now wait. I just saw my post approved over [there](http://icl.cs.utk.edu/magma/forum/viewtopic.php?f=2&t=1153&sid=834e601b8b8091a0995dd5f84622714c) and what do I get as an answer? WRONG FORUM? Who misdirected me? – MickG Jan 27 '15 at 07:51

1 Answers1

2

This is a bug in MAGMA; once nilpotence is established for a PC group, the return value of NilpotencyClass() is garbage. The first call gives the correct value, but later calls will fail.

This has been fixed for the next patch release (some time in May). In the meantime, a workaround would be to use (for instance)

> npclass := func<G | #LowerCentralSeries(G) - 1>;
> npclass(G);
2
  • But then if I take function d and rmove the NilpotencyClass at the beginning I should get the correct result. But I don't. And why do different computers give different results? I get 2^(15)-1, my friend gets 2, the teacher gets 1… – MickG Apr 29 '15 at 06:39
  • Also, I guess it is time to create a tag [tag:magma-cas] or the likes on this site. I do not have enough rep for that. – MickG Apr 29 '15 at 07:29