Clear(); Print ("Beginning demo program: test_2_5.txt\n"); Print ("This demonstrates the use of the following procedures:\n"); Print (" PartitionRep( partition )\n"); Print (" IndexToRep( partition )\n"); Print (" QuotientGroupConvolution( CL, partition )\n"); Print (" MapRefinement( partition, refinement )\n\n"); Sleep(5); # Let's create a set [1 .. 10], with partition being # equivalence under modulus by 5. (note partition 3 # and partition 4 are switched) partition := [ [1,6], [2,7], [4,9], [3,8], [5,10] ]; rep := PartitionRep( partition ); Print (" Okay, let's think about the set [1 .. 10] with a partition\n"); Print ("being equivalence under modulus by 5. However, for future\n"); Print ("demonstration, we will switch partition 3 and 4.\n\n"); Print (" partition := [ [1,6], [2,7], [4,9], [3,8], [5,10] ];\n\n\n"); Sleep(5); Print (" rep := PartitionRep( partition );\n"); Print (rep ,"\n\n"); Print (" Here we see that in the sixth location we have a 1. This\n"); Print ("is because 1 is the first element of the partition containing\n"); Print ("6. Thus PartitionRep gives us a representative for each\n"); Print ("element of the group with respect to the partition.\n\n\n"); Sleep(8); # Now let's see what IndexToRep does rep := IndexToRep( partition ); Print (" rep := IndexToRep( partition );\n"); Print (rep, "\n\n"); Print (" We can see that IndexToRep returns a set with the same size\n"); Print ("as partition. In the i-th location is a representative of the\n"); Print ("i-th subset of the partition.\n\n\n"); Sleep(8); # Let's consider C8, from test_2_1 we can generate a Cayley table group := SmallGroup(8,1); elements := Elements(group); func := x->x; CL := ConvolutionTable_f(group, elements, func); Print (" Let's consider C8, with a replacement of x^i -> i+1\n"); Print ("So e = 1, x = 2, x^2 = 3, ... \n"); Print ("The Cayley table is:\n"); Print (" group := SmallGroup(8,1);;\n"); Print (" elements := Elements(group);;\n"); Print (" func := x->x;;\n"); Print (" CL := ConvolutionTable_f(group, elements, func);\n\n"); PrintArray (CL); Print ("\n\n"); Sleep(5); # And a partition of this structure is: partition := [ [1,3,5,7], [2,4,6,8] ]; Print ("A partition of this structure (generated by x^2) is:\n"); Print (" partition := [ [1,3,5,7], [2,4,6,8] ];;\n\n\n"); Sleep(3); # thus the convolution table on the quotient group # C8/ is: qCL := QuotientGroupConvolution( CL, partition ); Print (" The Cayley table on the quotient group C8/ is:\n"); Print (" qCL := QuotientGroupConvolution( CL, partition );\n\n"); PrintArray (qCL); Print ("\n\n"); Sleep(8); # Let's try again with another... refinement := [ [1,5], [2,6], [3,7], [4,8] ]; qCL := QuotientGroupConvolution( CL, refinement ); Print (" Let's try with a different partition.\n"); Print (" refinement := [ [1,5], [2,6], [3,7], [4,8] ];;\n"); Print (" qCL := QuotientGroupConvolution( CL, refinement );\n\n"); PrintArray (qCL); Print ("\n"); Sleep(8); Print (" Hmmm.... looks an awful lot like C4.\n\n\n"); Sleep(3); # now let's work on refining partitions list := MapRefinement( partition, refinement ); Print (" Now we can refine the partitions.\n"); Print (" list := MapRefinement( partition, refinement );\n\n"); Print (list, "\n\n");