3

I'm putting together a collection of tables of orders of certain groups and there's a theorem that specifies that some of those groups are infinite. It is Theorem 3(5) of M. I. Prischepov, "Asphericity, atoricity, and symmetrically presented groups":

Prischepov Theorem 3

I've written a programme in GAP to capture $(a)-(c)$ and, luckily, I included $n=2$ by mistake (and it was a mistake because, as you can see, $n$ divides $4r, 4s$, and $2s$, so it does not satisfy any of $(a)-(c)$); however, values of $n=2$ appeared in the output.

Why? What do I do to correct this mistake?

Here is my code:

for n in [2..10] do
    for r in [2..10] do
        for s in [1..10] do
            if
            r>2*s and
            (not (3*r=0 mod n or
            4*r=0 mod n or
            2*s=0 mod n or
            s+r=0 mod n or
            s-r=0 mod n or
            s+2*r=0 mod n or
            s-2*r=0 mod n or
            s+3*r=0 mod n or
            2*s+r=0 mod n) or
            not (3*s=0 mod n or
            4*s=0 mod n or
            5*s=0 mod n or
            2*r=0 mod n or
            r+s=0 mod n or
            r-s=0 mod n or
            r+2*s=0 mod n or
            r-2*s=0 mod n or
            r+3*s=0 mod n or
            2*r+s=0 mod n) or
            not (2*r=0 mod n or
            3*r=0 mod n or
            2*s=0 mod n or
            3*s=0 mod n or
            r+s=0 mod n or
            r-s=0 mod n or
            r+2*s=0 mod n or
            s+2*r=0 mod n))
            then
                H:=[r, n, s];
                Print(H, "\n");
            fi;
        od;
    od;
od;

Print("Done.\n");

Please help :)

Shaun
  • 44,997

1 Answers1

3

You can't do modular equations like this in GAP. 0 mod n is 0, 2*r is whatever, they're unequal integers! You need to use ((4*r) mod n) = 0 and so on. The problem is that GAP, like lots of computer scientists, treats mod n as a unary suffix operator that returns the canonical representative mod $n$ of its argument.

For example,

gap> 2 = 0 mod 2; #GAP thinks you are testing 2 = 0
false


gap> (2 mod 2) = 0;
true

Also, you missed out the $5r$ condition from (a).

Shaun
  • 44,997
  • The output of my code with your edition alone didn't work entirely as it contradicted known results; I included some extra brackets (e.g., ((4*r) mod n)=0 instead of (4*r mod n)=0) that seem to have done the trick. I've edited your answer to include these. (I hope it's right and that you don't mind.) – Shaun Oct 26 '17 at 10:24
  • That's odd. Can you give an example of values of r and n for which ((4*r) mod n) =0 is different to (4*r mod n) = 0? – Matthew Towers Oct 26 '17 at 10:46
  • I don't know about (4*r mod n)=0 but ((r-s) mod n)=0 & (r-s mod n)=0 are different. Adding such brackets gives different results. – Shaun Oct 26 '17 at 11:20
  • 1
    Good catch. I looked it up in the GAP manual: mod has the same precedence as multiplication/division/... which is higher than + and - – Matthew Towers Oct 26 '17 at 11:30