1# RepnDecomp, chapter 2 2# 3# DO NOT EDIT THIS FILE - EDIT EXAMPLES IN THE SOURCE INSTEAD! 4# 5# This file has been generated by AutoDoc. It contains examples extracted from 6# the package documentation. Each example is preceded by a comment which gives 7# the name of a GAPDoc XML file and a line range from which the example were 8# taken. Note that the XML file in turn may have been generated by AutoDoc 9# from some other input. 10# 11gap> START_TEST( "repndecomp02.tst"); 12 13# doc/_Chunks.xml:2-29 14gap> G := SymmetricGroup(4);; 15gap> irreps := IrreducibleRepresentations(G);; 16gap> # rho and tau are isomorphic - they just have a different block order 17> rho := DirectSumOfRepresentations([irreps[1], irreps[3], irreps[3]]);; 18gap> tau := DirectSumOfRepresentations([irreps[3], irreps[1], irreps[3]]);; 19gap> # tau2 is just tau with a basis change - still isomorphic 20> B := RandomInvertibleMat(5);; 21gap> tau2 := ComposeHomFunction(tau, x -> B^-1 * x * B);; 22gap> # using the default implementation 23> M := LinearRepresentationIsomorphism(rho, tau);; 24gap> IsLinearRepresentationIsomorphism(M, rho, tau); 25true 26gap> M := LinearRepresentationIsomorphism(tau, tau2);; 27gap> IsLinearRepresentationIsomorphism(M, tau, tau2); 28true 29gap> # using the kronecker sum implementation 30> M := LinearRepresentationIsomorphism(tau, tau2 : use_kronecker);; 31gap> IsLinearRepresentationIsomorphism(M, tau, tau2); 32true 33gap> # using the orbit sum implementation 34> M := LinearRepresentationIsomorphism(tau, tau2 : use_orbit_sum);; 35gap> IsLinearRepresentationIsomorphism(M, tau, tau2); 36true 37gap> # two distinct irreps are not isomorphic 38> M := LinearRepresentationIsomorphism(irreps[1], irreps[2]); 39fail 40 41# doc/_Chunks.xml:35-40 42gap> # Following on from the previous example 43> M := LinearRepresentationIsomorphismSlow(rho, tau);; 44gap> IsLinearRepresentationIsomorphism(M, rho, tau); 45true 46 47# doc/_Chunks.xml:46-56 48gap> # Following on from the previous examples 49> # Some isomorphic representations 50> AreRepsIsomorphic(rho, tau); 51true 52gap> AreRepsIsomorphic(rho, tau2); 53true 54gap> # rho isn't iso to irreps[1] since rho is irreps[1] plus some other stuff 55> AreRepsIsomorphic(rho, irreps[1]); 56false 57 58# doc/_Chunks.xml:62-70 59gap> # We have already seen this function used heavily in previous examples. 60> # If two representations are isomorphic, the following is always true: 61> IsLinearRepresentationIsomorphism(LinearRepresentationIsomorphism(rho, tau), rho, tau); 62true 63gap> # Note: this test is sensitive to ordering: 64> IsLinearRepresentationIsomorphism(LinearRepresentationIsomorphism(rho, tau), tau, rho); 65false 66 67# 68gap> STOP_TEST("repndecomp02.tst", 1 ); 69