According to Devon Roy Stoddart:
> I have been trying to install Gap3, but I keep getting the remark " cannot
> find lib/init.g" even though it is there.
The most likely causes are:
1) You are starting GAP 3 by executing the binary directly, and not
using the gap.sh script which sets paths to the lib and doc directories
(among other things). I really think this is your problem.
In .../gap3r4p4/bin you should have:
>gap # The binary
>gap.bat # DOS script
>gap.sh # UNIX shell script
I'm assuming you run on a UNIX system so that
GAP 3 should be run by executing the gap.sh script
(on a DOS/Windows system you should do the equivalent with gap.bat)
i.e. if you have a symbolic link to gap from /usr/local/bin (or
wherever), make sure it points to gap.sh and *not* the gap binary.
e.g. on one system I have GAP 3 installed in directory:
Since I now prefer to use GAP 4, my symbolic link in /usr/local/bin is
gap3 i.e. I did:
>ln -s /usr/local/lib/gap/gap3r4p4/bin/gap.sh gap3
... and since /usr/local/bin is in my path on that system, I run GAP 3
there by typing:
Of course, you need to look at the gap.sh script and check that the
path GAP_DIR, in particular, is correct. Usually, the install process
2) If 1) is not the problem, the permissions of lib/init.g may be wrong
i.e. it isn't readable by you.
The subdirectories of .../gap3r4p4 should normally be executable and
readable by everyone e.g. an `ls -l' of .../gap3r4p4 should give
something like:drwxr-xr-x 18 root root 1024 May 21 11:59 ./ drwxr-xr-x 8 root root 1024 May 6 20:58 ../ drwxr-xr-x 2 root root 1024 May 21 12:14 bin/ . .
If this isn't the case do a `chmod 755' of all directories with
Also the files in the subdirectories should normally be readable
by everyone e.g. an `ls -l' of .../gap3r4p4/lib/init.g should give
something like:-rw-r--r-- 1 root root 50456 Apr 15 1997 init.g
I basically want to get the generators of the group formed byF3 := FreeGroup("a","b","c"); S3 := F3 / [F3.2^-1*F3.3*F3.2^-1*F3.3*F3.1*F3.2^-1*F3.1, F3.3^-1*F3.1*F3.3^-1*F3.1*F3.2*F3.3^-1*F3.2, F3.1^-1*F3.2*F3.1^-1*F3.2*F3.3*F3.1^-1*F3.3]; a := S3.1;; b := S3.2;; c := S3.3;; presentationDerivedSubgroupFpGroup := function(S3) local comms, gens,h,i,j,ngens,pres; gens := S3.generators; ngens := Length(gens); comms := ; for i in [1..ngens-1] do for j in [i + 1 .. ngens] do Add(comms, Comm(gens[i],gens[j])); od; od; h := Subgroup(S3, comms); pres := PresentationNormalClosureRrs(S3,h); TzGoGo(pres); return(pres); end;
I think you simply use TzPrintGenerators(pres);
or you assign the function to a variable
m := presentationDerivedSubgroupFpGroup(S3);
I ran the above with GAP 3, with the following result:
gap> F3 := FreeGroup("a","b","c"); Group( a, b, c ) gap> S3 := F3 / [F3.2^-1*F3.3*F3.2^-1*F3.3*F3.1*F3.2^-1*F3.1, > F3.3^-1*F3.1*F3.3^-1*F3.1*F3.2*F3.3^-1*F3.2, > F3.1^-1*F3.2*F3.1^-1*F3.2*F3.3*F3.1^-1*F3.3]; Group( a, b, c ) gap> gap> a := S3.1;; b := S3.2;; c := S3.3;; gap> presentationDerivedSubgroupFpGroup := function(S3) > local comms, gens,h,i,j,ngens,pres; > gens := S3.generators; > ngens := Length(gens); > comms := ; > for i in [1..ngens-1] do > for j in [i + 1 .. ngens] do > Add(comms, Comm(gens[i],gens[j])); > od; > od; > h := Subgroup(S3, comms); > pres := PresentationNormalClosureRrs(S3,h); > TzGoGo(pres); > return(pres); > end; function ( S3 ) ... end gap> m := presentationDerivedSubgroupFpGroup(S3); #I there are 5 generators and 6 relators of total length 119 << presentation with 5 gens and 6 rels of total length 119 >> gap> TzPrintGenerators(m); #I 1. _x4 23 occurrences #I 2. _x6 29 occurrences #I 3. _x11 21 occurrences #I 4. _x23 18 occurrences #I 5. _x24 28 occurrences gap>
If there is anyone who know the know how the correct the problem with the
init.g, I would appreciate getting the solution. However, if there is no
immediate solution and there is someone with gap3 already install and can
simply run a copy of the above function, I would truly appreciate it.
Additionally, I understand ElementaryDivisorsMat is still the same in Gap4
as is in gap3.
The above runs identically on GAP 4, provided you make the following change:
Replace the line:
gens := S3.generators;
gens := GeneratorsOfGroup(S3);