[GAP Forum] some questions

R. Keith Dennis dennis at rkd.math.cornell.edu
Fri Jun 15 18:52:10 BST 2007


Dear Colleagues:

I have several questions and would appreciate any suggestions.  I've
only recently attempted to do any real programming in GAP, so probably
the solutions are obvious:

1.  How does one generate file names (by program) so that a given
session may have multiple output files?  E.g., run a program without
for each group order - test.16, test.32, test.64,...  or append a time
stamp, or even better, "if file xxx.001 exists then newfile name =
xxx.002".

LogTo didn't seem to accept the names I attempted to give in (in
quotes, it used the variable name & without gave an error).

2.  How does one trap errors?  E.g., something like

if defined NumberSmallgroups(n) then
   Print(.....);
 else	
   Print("NumberSmallGroups(",n,") is not defined\n");
fi;

3.  How does one convert a matrix with integer entries to a matrix
with entries mod q for some prime q?

4.  Is there any reason SubdirectProduct is called that instead of
PullBack?  It seems to me the name is wrong or at least misleading.  I
would have thought a SubdirectProduct would, for example, take
information such as an nxm matrix of group elements where the list in
the i-th row are elements from the group G_i, and the subdirect
product is the subgroup of the direct product generated by the m
(columns) (g11,g21,...,gn1), ... , (g1m,g2m,...,gnm) in the direct
product G1 x ... Gn.  To ensure it's a subdirect product one would
need that elements in the i-th row generate Gi (but there would be no
reason to ask unless one really needed surjection on the factors).

I have more, but will stop here.

Thanks for your help!

Keith



More information about the Forum mailing list