Group Authoring
Home

Introduction Download Documentation Gallery Groups Vision Links Acknowledgments

How to create a .gp file

This document explains how to add groups to Group Explorer's library.  At the user's command, Group Explorer loads a file with the extension .gp to prepare a group for investigation by the user.  The format of .gp files is the same as the format of generic Windows .ini files--we'll get specific about this below.  Read on to take a step-by-step tour of creating your own group.

The reader of this document is assumed to be familiar with group theory.

Begin with the mathematics

Before you type anything into a file, you'll need to do some mathematics.  As an example, let's say we wanted to describe to Group Explorer the dihedral group D4.  This is the group of symmetries of a square in three-space, < r, f  |  r2 = e, f4 = e, rfr = f-1 >.

The current version of Group Explorer only understands the language of permutations.  (It will become more flexible in the future, as stated under the "Major Enhancements" section of the Vision and Goals page )  Permutations are sufficient, because every group can be embedded in a group of permutations, but you therefore need to explicitly perform that embedding yourself (that's the math part) and then describe the resulting permutations in your .gp file.

In this case, D4 can easily be thought of as permuting the four corners of a square hovering in three-space, and so the permutations of the generators r and f are evident by the following pictures:

Rotating 90o to the right maps
0 to 1, 1 to 2, 2 to 3, and 3 to 0,
which is expressed in cycle
notation as (0 1 2 3).

 

Rotating 180o about the vertical maps
0 to 1, 1 to 0, 2 to 3, and 3 to 2,
which is expressed in cycle
notation as (0 1)(2 3).

Therefore the group we're interested in is the subgroup of S4 generated by r = (0 1)(2 3) and f = (0 1 2 3).

Whenever you wish to write a .gp file, you will need to do this sort of embedding work first.  If your group ends up needing to be embedded in a symmetric group larger than S20, then you cannot yet add it to Group Explorer.  For now, the limit is S20, but an improvement upon that is a feature we would like to implement soon.

Ken Monks has pointed out to me that Maple's group package can be very useful in this regard.  It can compute an embedding of a group in a symmetric group very quickly by simply applying the Cayley theorem, but of course this embedding is not necessarily the most efficient, as for a group of size n it will give an embedding into Sn.

Learning Group Explorer's language

The only language Group Explorer speaks is that of permutations, and the only dialect it knows is a very simple one.  Group Explorer doesn't read permutations in cycle notation; rather, it reads them as vectors.  Consider the permutation we wrote in cycle notation as (0 1 2 3) above.  It has many representations, some of which are shown in the following table.

Cycle notation Function notation Mapping notation
(0 1 2 3) f(0) = 1
f(1) = 2
f(2) = 3
f(3) = 0

(

0  1  2  3

)

1  2  3  0

The last of these is the one in which we're interested.  It is simply the functional notation version written in horizontal lines: List the elements of the domain in order from 0 to n-1 across the top, and below each one write the value of the permutation at that point in the domain.

It is not necessary in such notation to even include the top row, since it will always start with 0 and count upwards one integer at a time.  Hence the permutation written (0 1 2 3) in Cycle notation becomes

Group Explorer notation

1 2 3 0

Then the easy part

Create a new text file (using your favorite text editor--say, Windows Notepad) and name it D_4.gp, or whatever your group should be called.  Type into it the following lines of text, or modify them to suit whatever group you're creating.

[Group]
Name1 = D_4
Author = Nathan Carter
Generators1 = 1 2 3 0, 1 0 3 2
Representation1 = Cycles

Let's analyze each of these lines separately.  If they already make sense to you, feel free to skip to the next section.

Line from the .gp file Explanation
[Group] This is a section heading.  Windows .ini files are split into sections beginning with headers formatted [like this]  The group definition section in any .gp file will have this header.  Later we will see that custom Cayley diagrams and objects of symmetry get their own sections.
Name1 = D_4 There can be multiple names for each group, and you may include other lines such as Name2, etc.  Each may have any name you like to the right of its equal sign.  The only place names besides Name1 appear in Group Explorer is in the Group Info screen, which you can access from the Group menu.
Author = Nathan Carter Obviously you don't have to type Nathan Carter in groups you write!  Again, any words, phrases, numbers, etc. you would like to put to the right of the equal sign are acceptable.  This, too, only shows up in the Group Info window.
Generators1 = 1 2 3 0, 1 0 3 2 Since groups may be generated in different ways (for example D4 could be generated by 1 2 3 0 and 1 0 2 3 instead of the generators given to the left), there can be multiple generators lines.  Here we only include one, but if one could certainly add the line Generators2 = 1 2 3 0, 1 0 2 3 to the group file, below this one.

Note that although it is helpful to you as a group author (and anyone who may look at your .gp file as text) to put the lines in the same order as shown above, and to the left, the order of the items within a section is not important to Group Explorer.  That is, under the heading [Group], you can mix up the order of the lines and the group will behave no differently.

Each generator is always written in Group Explorer notation, as explained above.  There must be spaces between the numbers, but any amount of space is acceptable.  NOTE: Tabs and new lines (line breaks) are not acceptable--simply use spaces.

Lists of generators must be separated by commas.

Representation1 = Cycles As with generators, a group may have multiple such lines, Representation2 = ..., etc.

Group Explorer understands several different types of representations, one of which is cycle notation.  To the left, we have written Cycles so that Group Explorer will show the user the group elements represented as permutations in cycle notation.

This may not always be desirable; for instance, perhaps the embedding of the group into a permutation group is of little interest, and should therefore be hidden from the average Group Explorer user.  Therefore other options exist, and we describe them here.

bulletRepresentation1 = Array  Group Explorer will represent group elements as permutations the same way they appear in the .gp files--as arrays of natural numbers, separated by spaces.  Note that this should probably only be used for debugging, since you as a group author understand this format, but the average user never need encounter it.
bulletRepresentation1 = Indices  Every permutation has an index, from 0 through (n-1)!, where n is the size of the permutation.  These integer indices can be used for concise (though not very meaningful) representations of group elements.
bulletRepresentation1 = Generators(e, a=1 2 3 0, b=1 0 3 2)  Group elements should be represented by how they are reached from the generators.  Replace e with your name for the group's identity element, and a with your name for the generator 1 2 3 0, etc.  Then the composition of elements 1 2 3 0 and 1 0 3 2 will be represented by ab, and so on for all other group elements.
bulletRepresentation1 = Table(a=0 1 2 3, b=0 1 3 2, c=0 2 1 3, ...)  You can describe exactly what you want every element in your group to be named one at a time, and call it a "Table."  This is exceedingly tedious for large groups, and given the Windows .ini limitation on having values only consume one line, it can run very far off the right hand side of your text editor.  But for smaller groups, it gives maximal control over representation.  (Note that the ellipsis indicates that you should continue naming elements until all have been named, not that you should actually type an ellipsis into the file!)

Okay...now try it!

At this point, your group file is small, but adequate for a trial run.  If you load it into Group Explorer, you can use every feature of the software except for objects of symmetry, which the group author (you) needs to define.  There will only be auto-generated Cayley diagrams, because custom diagrams must also be defined by the group author.

Adding a custom Cayley diagram

This is easier than defining the group in the first place, because you already know so much about Group Explorer's picky naming conventions.  In fact, the format for a user-defined diagram is quite simple; here is the code that defines a tetrahedral Cayley diagram for the Klein 4 group.  Note that we're stepping out of the D4 example for a moment, because the file D_4.gp has no custom Cayley diagrams in it.

[Diagram2]
Name = Tetrahedron
Node1 = 0 1 2 3 : <1.059,0,0>
Node2 = 1 0 2 3 : <-0.353,-0.5,-0.866>
Node3 = 0 1 3 2 : <-0.353,-0.5,0.866>
Node4 = 1 0 3 2 : <-0.353,1,0>
Generators = 1 0 2 3, 0 1 3 2, 1 0 3 2

As before, let's analyze each of these lines separately.  (Feel free to skip ahead if you'd rather not.)

Lines from the .gp file Explanation
[Diagram2] This indicates the beginning of a new section of the file.  Put this section completely after the section that defines the group, perhaps even splitting them by a few blank lines just so you can easily see the difference.

Diagrams are numbered starting with 1, so you can have [Diagram1], [Diagram2], etc.  This happens to be the second diagram in the file from which it was extracted.

Name = Tetrahedron Each diagram should have a different name, which will appear on the Cayley diagram menu in the program when the user is choosing which diagrams he would like to view.
Node1 = 0 1 2 3 : <1.059,0,0>
Node2 = 1 0 2 3 : <-0.353,-0.5,-0.866>
Node3 = 0 1 3 2 : <-0.353,-0.5,0.866>
Node4 = 1 0 3 2 : <-0.353,1,0>
A diagram definition must always include a sequence of nodes, beginning with Node1 and counting upwards, one node for each element of your group.  Each node line contains two pieces of information: first, the group element that the node represents, and then (after a colon to separate them) the point in R3 at which the node should be drawn.  These are simple <x,y,z> coordinate vectors, as in algebra or calculus classes.  Note that Group Explorer is picky about notation for decimal numbers:  You must write 0.213, not simply .213.
Generators = 1 0 2 3, 0 1 3 2, 1 0 3 2 This indicates which generators should have their arrows drawn in this Cayley diagram.  You may include just the ordinary generators for the group, or you may include other ones, which suit the diagram better.  In this particular example, a superfluous generator is added to give symmetry to the picture.  Note that the user has the freedom, after calling up this diagram, to add and/or remove arrows from it.  This list is simply the default, what Group Explorer draws initially.

That's all there is to adding a custom Cayley diagram!  Keep in mind that although the Cayley diagram starts out in the same position every time it's created, the user can click and drag on it to view it from any angle he wishes.  Therefore, when testing your diagrams, you should look at them from all sides.

Adding an object of symmetry

An object of symmetry is a three-dimensional construction of nodes and lines, together with a set of manipulations that preserve its symmetry.  It is up to the group designer to determine what three dimensional objects have a group of symmetries isomorphic to the group he's designing.

In the example we were following earlier (the dihedral group on 4 vertices) we might consider adding a square, like this.

[Object1]
Name = Square
Node1 = <0,1,1> <1,0,0> 2
Node2 = <0,1,-1> <0,1,0> 2
Node3 = <0,-1,1> <0,0,1> 2
Node4 = <0,-1,-1> <1,1,0> 2
Line1 = Node1 Node2 <0,0,0> 0.0 N
Line2 = Node2 Node3 <0,0,0> 0.0 N
Line3 = Node3 Node4 <0,0,0> 0.0 N
Line4 = Node4 Node1 <0,0,0> 0.0 N
Operation1 = 1 2 3 0 : 90 <1,0,0>
Operation2 = 1 0 3 2 : 180 <0,1,0>

As before, this is to be a new section in the group file, and we will analyze each of the lines in the section separately.

Lines from the .gp file Explanation
[Object1]
Name = Square
These lines are analogous to the first two lines in the custom Cayley diagram code, above.  No new explanation is necessary.
Node1 = <0,1,1> <1,0,0> 2
Node2 = <0,1,-1> <0,1,0> 2
Node3 = <0,-1,1> <0,0,1> 2
Node4 = <0,-1,-1> <1,1,0> 2
An object of symmetry can have as many nodes as it likes, yet the definition of a node in an object of symmetry is a bit different than in a Cayley diagram.

First, no group elements are mentioned, because there need be no correlation between the nodes in the diagram and the elements of the group.

Second, in addition to specifying the location of the node in three-space (the first parameter in each line of code to the left) a color vector and a radius must be specified.

The color vector has three components: amounts of red, green, and blue respectively.  These numbers must be in the range [0,1].  The four colors to the left are therefore Red <1,0,0>, Green <0,1,0>, Blue <0,0,1>, and Yellow <1,1,0>, because Red + Green = Yellow.

It is also possible to write color vectors by indexing into the color spectrum.  The color spectrum follows the Red-Orange-Yellow-Green-Blue-Indigo-Violet order of the rainbow, and cycles back on itself to Red again after Violet.  The index of Red is both 0 and 1, and you can index into this continuum [0,1] by writing an expression like Hue0.75 or Hue0.3333 in place of a color vector.

Furthermore, you can write colors yet a third way.  Any of the following color words (capitalization irrelevant) in place of a color vector:  Red  Orange  Yellow  Green  Blue  Indigo  Violet  Black  White.

The radius should be positive.  Values about the size of 2 are sensible; the reader should experiment.

Line1 = Node1 Node2 <0,0,0> 0.0 N
Line2 = Node2 Node3 <0,0,0> 0.0 N
Line3 = Node3 Node4 <0,0,0> 0.0 N
Line4 = Node4 Node1 <0,0,0> 0.0 N
Lines take three vector parameters: a starting point, an ending point, and a color vector, which works just like for nodes (above).  The first two vector parameters for lines can either be ordinary <x,y,z> coordinate triples, or they can be replaced by node names, for convenience.  Thus when we write Line1 = Node1 Node2 <0,0,0> 0.0 N, we're saying that Line 1 begins at Node 1 (which is at x,y,z coordinate <0,1,1>) and goes to Node 2 (which is at <0,1,-1>).

Following these three parameters is a real number indicating how much curvature the line should have, and then a yes or no value (capital Y or N) indicating whether the line should terminate in an arrowhead.  In all four lines to the left, we wish them to have no curvature, and to have no arrowheads.

Operation1 = 1 2 3 0 : 90 <1,0,0>
Operation2 = 1 0 3 2 : 180 <0,1,0>
The heart of an object of symmetry is what the user can do with it, which the designer encodes in Operation lines.  There may be many operations for each object of symmetry, and each describes what one particular group element does to the object of symmetry.

As in the code to the left, an operation must specify to what group element it is bound, and then, after a colon, the three-dimensional manipulation that is the physical operation.

Since all our groups are finite, these operations must be finite as well.  This mathematically limits us to rotation about an axis and reflection through a plane.  Right now Group Explorer only handles rotation about an axis.  If there is a great need, it may one day be extended to handle reflections through a plane.

Since each operation is a rotation, the first parameter is a number of degrees, and the second parameter is the axis about which to rotate.  In this example, operation 1 is a 90o rotation about the x-axis, and operation 2 is a 180o rotation about the y-axis.

That's all there is to adding an object of symmetry!

A very helpful contribution:

Ken Monks has written a Maple worksheet that helps create objects of symmetry.  You can download what Ken has written on the software page of his web site.  It is definitely the tool of choice for making elegant objects of symmetry!  Several of the groups in the current Group Explorer distribution had their objects of symmetry made using this tool.

About product groups

To create a product group, you have two choices;

bullet

you can treat it like an ordinary group, embedding it into a permutation group in the first step above, "Begin with the mathematics,"

bullet

or you can have Group Explorer form the product automatically.  To do this:

bullet

Include in the [Group] section of the .gp file only the names and author lines, and then create sections for each factor in the product: [Factor1], [Factor2], etc.

bullet

In each factor section, include the generator and representation information for that factor, and Group Explorer (when it loads the group) will automatically form all possible combinations of these across factors.  Group Explorer will represent group elements using vector notation: e.g., <a,b,c>, with a from the first factor, b from the second, and c from the third.

bullet

Note that forming the product involves embedding in larger symmetric groups.  When writing Cayley diagrams and objects of symmetry, in which you need to mention elements of the product by name, know that the product of H (in Sn) and K (in Sm) will be H x K in Sn+m the natural way.  I.e. if a = 2 1 0 in S3 and b = 0 2 1 3 in S4 then <a,b> = 2 1 0 3 5 4 6 in S7.

The second choice is almost certainly advantageous, except perhaps in situations where the author wishes to include a representation that does not write elements in vector notation.  For examples of how this is done, consider some of the product groups that come with Group Explorer (see the Download page).  Here is a simple one.

[Group]
Name1 = Z_2 x Z_4
Name2 = Direct product of Z_2 with Z_4
Author = Nathan Carter

[Factor1]
Generators1 = 1 0
Representation1 = Generators(e, a=1 0)
Representation2 = Indices
Representation3 = Cycles

[Factor2]
Generators1 = 1 2 3 0
Representation1 = Generators(e, b=1 2 3 0)
Representation2 = Cycles

In conclusion

You now should know everything you need to create your own groups.  When you do make them, please submit them to me so they can be shared on this web site!  Email group files or questions about creating them to Nathan Carter (nccarter@indiana.edu).

bullet

The list of contributors to the Group Explorer project can be found on the Acknowledgements page.

bullet

For more information about Group Explorer, or to give feedback, contact Nathan Carter at: nccarter@indiana.edu.