Clear(); Print ("Beginning demo program: test_1_1.txt\n"); Print ("This demonstrates the use of the following procedures:\n"); Print (" RightTranslates( group, subset )\n"); Print (" ConjugateTranslates( group, subset )\n"); Print (" GroupMatrixRt( rep, group, elements )\n\n"); Sleep(5); # This first bit tests out the RightTranslates function # on the dihedral group of 8 elements. group := Group( (1,2,3,4), (1,3) ); elements := Elements(group); Print ("Let's look at the symmetric group generated by (1,2,3,4)\n"); Print ("and (1,3). This subgroup of S4 is isomorphic to D4, or the\n"); Print ("dihedral group of eight elements.\n\n"); Print (" group := Group( (1,2,3,4), (1,3) );\n"); Print (group, "\n\n"); Print (" elements := Elements(group);\n"); Print (elements, "\n\n"); Sleep(8); subset := []; subset[1] := elements[1]; subset[2] := elements[4]; subset[3] := elements[5]; Print ("Now we need to create a subset of the group.\nsubset := "); Print (subset, "\n\n"); Sleep(5); rTrans := RightTranslates(group, subset); Print ("Now here are the right translates.\n"); Print (" rTrans := RightTranslates( group, subset );\n"); Print (rTrans, "\n\n"); Sleep(8); # If we use ConjugateTranslates, but let the elements form a # normal subroup... . normal := []; normal[1] := elements[1]; normal[2] := elements[6]; Print ("Let's try creating a normal subgroup.\nnormal := "); Print (normal, "\n\n"); Sleep(5); cTrans := ConjugateTranslates(group, normal); Print ("And then look at all of the conjugates.\n"); Print (" cTrans := ConjugateTranslates( group, normal );\n"); Print (cTrans, "\n\n"); Sleep(5); # Now let's look at the GroupMatrixRt of D8 with representatives: # e D H R90 D' R180 R270 V rep := [ " e ", " D ", " H ", "R90 ", " D' ", "R180", "R270", " V " ]; mat := GroupMatrixRt( rep, group, elements ); Print ("Now let's look at the GroupMatrixRt of D8 with representatives:\n"); Print (" rep := [ \" e \", \" D \", \" H \", \"R90 \", \" D' \", \"R180\", \"R270\", \" V \" ];\n"); Print (" mat := GroupMatrixRt( rep, group, elements );\n"); PrintArray(mat); Print ("\n"); Sleep(8); # And let's try an improper call of the previous function... rep := [ " e ", " D ", " H " ]; Print ("This is what happens if you do no have enough representatives\n"); Print ("for your group.\n\n"); Print (" rep := [ \" e \", \" D \", \" H \" ];\n"); mat := GroupMatrixRt( rep, group, elements ); Print ("\n\n");