Clear(); Print ("Beginning demo program: test_2_1.txt\n\n"); Print ("This demonstrates the use of the following procedures:\n"); Print (" ConvolutionTable_f( group, elements, func )\n"); Print (" Convolution_AsList( CL, list1, list2 )\n"); Print (" Convolution_AsMultiset( CL, multset1, multset2 )\n\n"); Sleep(5); # This demo file tests out the convolution capabilities of # DifSets.txt. Let's again look at the dihedral group. group := SmallGroup(8,3); elements := Elements(group); func := x->x^-1; CL := ConvolutionTable_f(group, elements, func); Print (" Let's construct the dihedral group of order 8 and look\n"); Print ("at the convolution table generated by the inverse function:\n"); Print (" group := SmallGroup(8,3);;\n"); Print (" elements := Elements(group);;\n"); Print (" func := x->x^-1;;\n"); Print (" CL := ConvolutionTable_f(group, elements, func);\n\n"); PrintArray (CL); Print ("\n\n"); Sleep(8); # So if we look at < R90 >, # and convolve it with a subgroup of order 2 : sub_R90 := NormalSubgroups(group)[3]; sub_O2 := NormalSubgroups(group)[2]; list1 := CharacteristicFunction(group, Elements(sub_R90) ); list2 := CharacteristicFunction(group, Elements(sub_O2) ); prod := Convolution_AsList( CL, list1, list2 ); Print (" Let's construct < R90 > and convolve it with a subgroup\n"); Print ("of order 2.\n"); Print (" sub_R90 := NormalSubgroups(group)[3];;\n"); Print (" sub_O2 := NormalSubgroups(group)[2];;\n"); Print (" list1 := CharacteristicFunction(group, Elements(sub_R90) );;\n"); Print (" list2 := CharacteristicFunction(group, Elements(sub_O2) );;\n"); Print (" prod := Convolution_AsList( CL, list1, list2 );\n\n"); PrintArray (prod); Print ("\n\n"); Sleep(8); # And now the same thing, but with multisets... mult1 := ListToMultiset(list1); mult2 := ListToMultiset(list2); prod := Convolution_AsMultiset( CL, mult1, mult2 ); Print (" And now let's do the same thing with multisets.\n"); Print (" mult1 := ListToMultiset(list1);;\n"); Print (" mult2 := ListToMultiset(list2);;\n"); Print (" prod := Convolution_AsMultiset( CL, mult1, mult2 );\n\n"); PrintArray (prod); Print ("\n\n");