diff --git a/CHANGES.md b/CHANGES.md index f64c6ec..0b0a72b 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,6 +1,8 @@ # CHANGES to the 'XModAlg' package -## 1.25 -> 1.25dev (26/06/24) +## 1.25 -> 1.25dev (01/07/24) + * (01/07/24) renamed the actions and algebras in the tests/examples as + act1, act, ,,, and added AlgebraActionOnDirectSum * (17/05/24) added operations for a module as an algebra, revised XModAlgebraByModule * (26/06/24) added AlgebraActionByHomomorphism, diff --git a/PackageInfo.g b/PackageInfo.g index 0bc7eb7..30a6c52 100644 --- a/PackageInfo.g +++ b/PackageInfo.g @@ -9,7 +9,7 @@ SetPackageInfo( rec( PackageName := "XModAlg", Subtitle := "Crossed Modules and Cat1-Algebras", Version := "1.25dev", -Date := "26/06/2024", # dd/mm/yyyy format +Date := "01/07/2024", # dd/mm/yyyy format License := "GPL-2.0-or-later", Persons := [ diff --git a/doc/algebra.xml b/doc/algebra.xml index eb1ecef..e218674 100644 --- a/doc/algebra.xml +++ b/doc/algebra.xml @@ -58,14 +58,16 @@ on an ideal I of A. A5c6 := GroupRing( GF(5), Group( (1,2,3,4,5,6) ) );; -gap> vecA := BasisVectors( Basis( A5c6 ) );; -gap> v := vecA[1] + vecA[3] + vecA[5]; +gap> A1 := GroupRing( GF(5), Group( (1,2,3,4,5,6) ) );; +gap> SetName( A1, "A1" ); +gap> BA1 := BasisVectors( Basis( A1 ) );; +gap> v := BA1[1] + BA1[3] + BA1[5]; (Z(5)^0)*()+(Z(5)^0)*(1,3,5)(2,4,6)+(Z(5)^0)*(1,5,3)(2,6,4) -gap> I5c6 := Ideal( A5c6, [v] );; -gap> v2 := vecA[2]; +gap> I1 := Ideal( A1, [v] );; +gap> SetName( I1, "I1" ); +gap> v1 := BA1[2]; (Z(5)^0)*(1,2,3,4,5,6) -gap> m2 := RegularAlgebraMultiplier( A5c6, I5c6, v2 ); +gap> m1 := RegularAlgebraMultiplier( A1, I1, v1 ); [ (Z(5)^0)*()+(Z(5)^0)*(1,3,5)(2,4,6)+(Z(5)^0)*(1,5,3)(2,6,4), (Z(5)^0)*(1,2,3,4,5,6)+(Z(5)^0)*(1,4)(2,5)(3,6)+(Z(5)^0)*(1,6,5,4,3,2) ] -> [ (Z(5)^0)*(1,2,3,4,5,6)+(Z(5)^0)*(1,4)(2,5)(3,6)+(Z(5)^0)*(1,6,5,4,3,2), @@ -75,7 +77,7 @@ gap> m2 := RegularAlgebraMultiplier( A5c6, I5c6, v2 ); + Arg="mu" /> This function tests the condition \mu(ab) = (\mu a)b = a(\mu b) for all a,b in the basis for A. @@ -84,16 +86,16 @@ for all a,b in the basis for A. IsAlgebraMultiplier( m2 ); +gap> IsAlgebraMultiplier( m1 ); true -gap> one := One( A5c6 );; -gap> L := List( vecA, v -> one );; -gap> m1 := LeftModuleHomomorphismByImages( A5c6, A5c6, vecA, L ); +gap> one := One( A1 );; +gap> L1 := List( BA1, v -> one );; +gap> h1 := LeftModuleHomomorphismByImages( A1, A1, BA1, L1 ); [ (Z(5)^0)*(), (Z(5)^0)*(1,2,3,4,5,6), (Z(5)^0)*(1,3,5)(2,4,6), (Z(5)^0)*(1,4)(2,5)(3,6), (Z(5)^0)*(1,5,3)(2,6,4), (Z(5)^0)*(1,6,5,4,3,2) ] -> [ (Z(5)^0)*(), (Z(5)^0)*(), (Z(5)^0)*(), (Z(5)^0)*(), (Z(5)^0)*(), (Z(5)^0)*() ] -gap> IsAlgebraMultiplier( m1 ); +gap> IsAlgebraMultiplier( h1 ); false ]]> @@ -111,17 +113,16 @@ form an algebra with product \mu_b \circ \mu_{b'} = \mu_{bb'}. v3 := vecA[3]; +gap> u1 := BA1[3]; (Z(5)^0)*(1,3,5)(2,4,6) -gap> B5c3 := Subalgebra( A5c6, [ v3 ] );; -gap> M := MultiplierAlgebraOfIdealBySubalgebra( A5c6, I5c6, B5c3 ); +gap> S1 := Subalgebra( A3, [ u1 ] );; +gap> SetName( S1, "S1" ); +gap> MS1 := MultiplierAlgebraOfIdealBySubalgebra( A1, I1, S1 ); -gap> vecM := BasisVectors( Basis( M ) );; -gap> vecM[1]; -, (dimension 2 - )> -> , - (dimension 2)>> +gap> SetName( MS1, "MS1" ); +gap> BMS1 := BasisVectors( Basis( MS1 ) );; +gap> BMS1[1]; + I1> ]]> @@ -138,10 +139,10 @@ This operation returns MultiplierAlgebraOfIdealBySubalgebra(A,A,A);. MA5c6 := RegularAlgebraMultiplier( A5c6 ); +gap> MA1 := MultiplierAlgebra( A1 ); -gap> vecM := BasisVectors( Basis( MA5c6 ) );; -gap> vecM[3]; +gap> BMA1 := BasisVectors( Basis( MA1 ) );; +gap> BMA1[3]; -> > ]]> @@ -160,15 +161,14 @@ homomorphism from B to M mapping b to \mu_b. hom := MultiplierHomomorphism( MA5c6 );; -gap> ImageElm( hom, vecA[2] ); -Basis( , - (dimension 2)>, -[ (Z(5)^0)*()+(Z(5)^0)*(1,3,5)(2,4,6)+(Z(5)^0)*(1,5,3)(2,6,4), - (Z(5)^0)*(1,2,3,4,5,6)+(Z(5)^0)*(1,4)(2,5)(3,6)+(Z(5)^0)*(1,6,5,4,3,2) - ] ) -> -[ (Z(5)^0)*(1,2,3,4,5,6)+(Z(5)^0)*(1,4)(2,5)(3,6)+(Z(5)^0)*(1,6,5,4,3,2), - (Z(5)^0)*()+(Z(5)^0)*(1,3,5)(2,4,6)+(Z(5)^0)*(1,5,3)(2,6,4) ] +gap> hom1 := MultiplierHomomorphism( MA1 );; +gap> ImageElm( hom1, BA1[2] ); +Basis( A1, [ (Z(5)^0)*(), (Z(5)^0)*(1,2,3,4,5,6), (Z(5)^0)*(1,3,5)(2\ +,4,6), + (Z(5)^0)*(1,4)(2,5)(3,6), (Z(5)^0)*(1,5,3)(2,6,4), (Z(5)^0)*(1,6,5,4,3,2) + ] ) -> [ (Z(5)^0)*(1,2,3,4,5,6), (Z(5)^0)*(1,3,5)(2,4,6), + (Z(5)^0)*(1,4)(2,5)(3,6), (Z(5)^0)*(1,5,3)(2,6,4), (Z(5)^0)*(1,6,5,4,3,2), + (Z(5)^0)*() ] ]]> @@ -214,6 +214,15 @@ the map s \mapsto r \cdot s is a vector space homomorphism, but not in general an algebra homomorphism.

+ + + +This global function calls one of the following operations, +depending on the arguments supplied. + + + @@ -228,20 +237,21 @@ over the field GF(5). The ideal is generated by v = () + (1,3,5)(2,4,6) + (1,5,3)(2,6,4). The generator r = (1,2,3,4,5,6) acts on v by multiplication to give the vector -r \cdot v = (1,2,3,4,5,6) + (1,4)(2,5)(3,6) + (1,6,5,4,3,2). +r \cdot v = (1,2,3,4,5,6) + (1,4)(2,5)(3,6) + (1,6,5,4,3,2), +as shown in A5c6 := GroupRing( GF(5), Group( (1,2,3,4,5,6) ) );; -gap> vecA := BasisVectors( Basis( A5c6 ) );; -gap> v := vecA[1] + vecA[3] + vecA[5]; +gap> A1 := GroupRing( GF(5), Group( (1,2,3,4,5,6) ) );; +gap> BA1 := BasisVectors( Basis( A1 ) );; +gap> v := BA1[1] + BA1[3] + BA1[5]; (Z(5)^0)*()+(Z(5)^0)*(1,3,5)(2,4,6)+(Z(5)^0)*(1,5,3)(2,6,4) -gap> I5c6 := Ideal( A5c6, [v] );; -gap> actm := AlgebraActionByMultipliers( A5c6, I5c6, A5c6 );; -gap> actm2 := Image( actm, vecA[2] );; -gap> Image( actm2, v ); +gap> I1 := Ideal( A1, [v] );; +gap> act1 := AlgebraActionByMultipliers( A1, I1, A1 );; +gap> act12 := Image( act1, BA1[2] );; +gap> Image( act12, v ); (Z(5)^0)*(1,2,3,4,5,6)+(Z(5)^0)*(1,4)(2,5)(3,6)+(Z(5)^0)*(1,6,5,4,3,2) ]]> @@ -256,13 +266,13 @@ Then B acts on A by b \cdot a = pa where p \in (\theta^{-1}b). Note that this action is well defined since \theta^{-1}b = \{ p+k ~|~ k \in \ker\theta \} -and (p+k)a = pa+ka = ca+0. +and (p+k)a = pa+ka = pa+0.

Continuing with the previous example, -we construct the quotient algebra Q5c6 = A5c6/I5c6, -and the natural homomorphism \theta : A5c6 \to Q5c6. +we construct the quotient algebra Q3 = A3/I3, +and the natural homomorphism \theta : A3 \to Q3. The kernel of \theta is not contained in -the annihilator of A5c6, so an attempt to form the action fails. +the annihilator of A3, so an attempt to form the action fails.

An alternative example involves a single-generator matrix algebra. @@ -270,41 +280,42 @@ An alternative example involves a single-generator matrix algebra. theta := NaturalHomomorphismByIdeal( A5c6, I5c6 ); +gap> theta1 := NaturalHomomorphismByIdeal( A1, I1 ); -> > -gap> List( vecA, v -> ImageElm( theta, v ) ); +gap> List( BA1, v -> ImageElm( theta1, v ) ); [ v.1, v.2, v.3, v.4, (Z(5)^2)*v.1+(Z(5)^2)*v.3, (Z(5)^2)*v.2+(Z(5)^2)*v.4 ] -gap> actp := AlgebraActionBySurjection( theta ); +gap> AlgebraActionBySurjection( theta1 ); kernel of hom is not in the annihilator of A fail gap> ## an example which does not fail: -gap> m := [ [0,1,2,3], [0,0,1,2], [0,0,0,1], [0,0,0,0] ];; -gap> m^2; +gap> m2 := [ [0,1,2,3], [0,0,1,2], [0,0,0,1], [0,0,0,0] ];; +gap> m2^2; [ [ 0, 0, 1, 4 ], [ 0, 0, 0, 1 ], [ 0, 0, 0, 0 ], [ 0, 0, 0, 0 ] ] -gap> m^3; +gap> m2^3; [ [ 0, 0, 0, 1 ], [ 0, 0, 0, 0 ], [ 0, 0, 0, 0 ], [ 0, 0, 0, 0 ] ] -gap> A1 := Algebra( Rationals, [m] );; -gap> SetName( A1, "A1" ); -gap> A3 := Subalgebra( A1, [m^3] );; -gap> nat3 := NaturalHomomorphismByIdeal( A1, A3 ); - A2 := Algebra( Rationals, [m2] );; +gap> SetName( A2, "A2" ); +gap> S2 := Subalgebra( A2, [m2^3] );; +gap> SetName( S2, "S2" ); +gap> nat2 := NaturalHomomorphismByIdeal( A2, S2 ); + > -gap> Q13 := Image( nat3 );; -gap> SetName( Q13, "Q13" ); -gap> Display(nat3); -LeftModuleHomomorphismByMatrix( Basis( A1, +gap> Q2 := Image( nat2 );; +gap> SetName( Q2, "Q2" ); +gap> Display( nat2 ); +LeftModuleHomomorphismByMatrix( Basis( A2, [ [ [ 0, 0, 0, 1 ], [ 0, 0, 0, 0 ], [ 0, 0, 0, 0 ], [ 0, 0, 0, 0 ] ], [ [ 0, 1, 2, 3 ], [ 0, 0, 1, 2 ], [ 0, 0, 0, 1 ], [ 0, 0, 0, 0 ] ], [ [ 0, 0, 1, 4 ], [ 0, 0, 0, 1 ], [ 0, 0, 0, 0 ], [ 0, 0, 0, 0 ] ] ] ), -[ [ 0, 0 ], [ 1, 0 ], [ 0, 1 ] ], CanonicalBasis( Q13 ) ) -gap> act3 := AlgebraActionBySurjection( nat3 );; -gap> B3 := Image( act3 );; -gap> bvB3 := BasisVectors( Basis( B3 ) );; -gap> b1 := bvB3[1];; b2 := bvB3[2];; -gap> [ Image(b1,m)=m^2, Image(b1,m^2)=m^3, Image(b1,m^3)=Zero(A1) ]; +[ [ 0, 0 ], [ 1, 0 ], [ 0, 1 ] ], CanonicalBasis( Q2 ) ) +gap> act2 := AlgebraActionBySurjection( nat2 );; +gap> C2 := Image( act2 );; +gap> BC2 := BasisVectors( Basis( C2 ) );; +gap> b1 := BC2[1];; b2 := BC2[2];; +gap> [ Image(b1,m2)=m2^2, Image(b1,m2^2)=m2^3, Image(b1,m2^3)=Zero(A2) ]; [ true, true, true ] -gap> [ Image(b2,m)=m^3, b2=b1^2 ]; +gap> [ Image(b2,m2)=m2^3, b2=b1^2 ]; [true, true ] ]]> @@ -312,6 +323,12 @@ gap> [ Image(b2,m)=m^3, b2=b1^2 ]; <#Include Label="AlgebraActionByHomomorphism"> + + +

+ +Algebra modules + <#Include Label="AlgebraModules"> <#Include Label="ModuleAsAlgebra"> @@ -322,6 +339,25 @@ gap> [ Image(b2,m)=m^3, b2=b1^2 ]; <#Include Label="AlgebraActionByModule"> +
+ +
+ +Actions on direct sums of algebras + +<#Include Label="DirectSumOfAlgebrasInfo"> + +<#Include Label="EmbeddingForDirectSumOfAlgebras"> + +<#Include Label="AlgebraActionOnDirectSum"> + +<#Include Label="DirectSumAlgebraActions"> + +
+ +
+ +Other operations on algebras P := SemidirectProductOfAlgebras( A5c6, actm, I5c6 ); +gap> P1 := SemidirectProductOfAlgebras( A1, act1, I1 ); -gap> Embedding( P, 1 ); +gap> Embedding( P1, 1 ); [ (Z(5)^0)*(), (Z(5)^0)*(1,2,3,4,5,6), (Z(5)^0)*(1,3,5)(2,4,6), (Z(5)^0)*(1,4)(2,5)(3,6), (Z(5)^0)*(1,5,3)(2,6,4), (Z(5)^0)*(1,6,5,4,3,2) ] -> [ v.1, v.2, v.3, v.4, v.5, v.6 ] -gap> Embedding( P, 2 ); +gap> Embedding( P1, 2 ); [ (Z(5)^0)*()+(Z(5)^0)*(1,3,5)(2,4,6)+(Z(5)^0)*(1,5,3)(2,6,4), (Z(5)^0)*(1,2,3,4,5,6)+(Z(5)^0)*(1,4)(2,5)(3,6)+(Z(5)^0)*(1,6,5,4,3,2) ] -> [ v.7, v.8 ] -gap> Projection( P, 1 ); +gap> Projection( P1, 1 ); [ v.1, v.2, v.3, v.4, v.5, v.6, v.7, v.8 ] -> [ (Z(5)^0)*(), (Z(5)^0)*(1,2,3,4,5,6), (Z(5)^0)*(1,3,5)(2,4,6), (Z(5)^0)*(1,4)(2,5)(3,6), (Z(5)^0)*(1,5,3)(2,6,4), (Z(5)^0)*(1,6,5,4,3,2), of ..., of ... ] -gap> P3 := SemidirectProductOfAlgebras( Q13, act3, A1 ); - -gap> Embedding( P3, 1 ); +gap> P2 := SemidirectProductOfAlgebras( Q2, act2, A2 ); +Q2 |X A2 +gap> Embedding( P2, 1 ); [ v.1, v.2 ] -> [ v.1, v.2 ] -gap> Embedding( P3, 2 ); +gap> Embedding( P2, 2 ); [ [ [ 0, 1, 2, 3 ], [ 0, 0, 1, 2 ], [ 0, 0, 0, 1 ], [ 0, 0, 0, 0 ] ], [ [ 0, 0, 1, 4 ], [ 0, 0, 0, 1 ], [ 0, 0, 0, 0 ], [ 0, 0, 0, 0 ] ], [ [ 0, 0, 0, 1 ], [ 0, 0, 0, 0 ], [ 0, 0, 0, 0 ], [ 0, 0, 0, 0 ] ] ] -> diff --git a/doc/xmod.xml b/doc/xmod.xml index 85187a9..d6adf5d 100644 --- a/doc/xmod.xml +++ b/doc/xmod.xml @@ -180,13 +180,12 @@ Continuing with the example in that section, X3 := XModAlgebraBySurjection( nat3 );; -gap> Display( X3 ); - -Crossed module [A1->Q13] :- -: Source algebra A1 has generators: +gap> X2 := XModAlgebraBySurjection( nat2 );; +gap> Display( X2 ); +Crossed module [A2->Q2] :- +: Source algebra A2 has generators: [ [ [ 0, 1, 2, 3 ], [ 0, 0, 1, 2 ], [ 0, 0, 0, 1 ], [ 0, 0, 0, 0 ] ] ] -: Range algebra Q13 has generators: +: Range algebra Q2 has generators: [ v.1, v.2 ] : Boundary homomorphism maps source generators to: [ v.1 ] diff --git a/examples/module.g b/examples/module.g new file mode 100644 index 0000000..23cc187 --- /dev/null +++ b/examples/module.g @@ -0,0 +1,107 @@ +############################################################################ +## +#W module3.g XModAlg example files Chris Wensley +## + +LoadPackage( "xmodalg" ); + +## Section 2.2.4 +m3 := [ [0,1,0], [0,0,1], [1,0,0] ]; +Print( "m3 = ", m3, "\n" ); +A3 := Algebra( Rationals, [m3] ); +SetName( A3, "A3" );; +G := Group( (1,2,3) );; +B3 := GroupRing( Rationals, G );; +SetName( B3, "GR(G)" ); +g3 := GeneratorsOfAlgebra( B3 )[2];; +mg3 := RegularAlgebraMultiplier( B3, B3, g3 );; +MB3 := AlgebraByGenerators( Rationals, [ mg3 ] );; +homB3 := AlgebraHomomorphismByImages( A3, MB3, [ m3 ], [ mg3 ] );; +actB3 := AlgebraActionByHomomorphism( homB3, B3 ); +Print ( "action actB3 of A3 on B3:\n", actB3, "\n" ); + +## Section 2.3 +m3 := [ [0,1,0], [0,0,1], [1,0,0] ];; +A4 := Algebra( Rationals, [m3] );; +SetName( A4, "A4" );; +V4 := Rationals^3;; +M4 := LeftAlgebraModule( A4, \*, V4 );; +SetName( M4, "M4" ); +famM4 := ElementsFamily( FamilyObj( M4 ) );; +v4 := [3,4,5];; +Print( "initial v4 in V4 = ", v4, "\n" ); +v4 := ObjByExtRep( famM4, v4 ); +Print( "v4 after conversion to M4 = ", v4, "\n" ); +Print( "m3*v4 = ", m3*v4, "\n" ); +genM4 := GeneratorsOfLeftModule( M4 );; +u4 := 6*genM4[1] + 7*genM4[2] + 8*genM4[3]; +Print( "u4 = 6*genM4[1] + 7*genM4[2] + 8*genM4[3] = ", u4, "\n" ); +u4 := ExtRepOfObj( u4 ); +Print( "ExtRepOfObf( u4 ) = ", u4, "\n" ); + +## Section 2.3.1 +D4 := LeftActingDomain( M4 );; +T4 := EmptySCTable( Dimension(M4), Zero(D4), "symmetric" );; +B4a := AlgebraByStructureConstants( D4, T4 ); +Print( "B4a = ", B4a, "\n" ); +Print( "B4a has generators: ", GeneratorsOfAlgebra( B4a ), "\n" ); +B4 := ModuleAsAlgebra( M4 ); +Print( "B4 has name: ", Name( B4 ), "\n" ); +Print( "B4 has generators: ", GeneratorsOfAlgebra( B4 ), "\n" ); + +## Section 2.3.2 +Print( "IsModuleAsAlgebra( B4 )? ", IsModuleAsAlgebra( B4 ), "\n" ); +Print( "IsModuleAsAlgebra( A4 )? ", IsModuleAsAlgebra( A4 ), "\n" ); + +## Section 2.3.3 +Print( "the known attributes of B4 are:\n" ); +Print( KnownAttributesOfObject( B4 ), "\n" ); +M2B4 := ModuleToAlgebraIsomorphism( B4 ); +Print( "M2B4 = ", M2B4, "\n" ); +Print( "Source( M2B4 ) = M4? ", Source( M2B4 ) = M4, "\n" ); +Print( "Source( M2B4 ) = V4? ", Source( M2B4 ) = V4, "\n" ); +B2M4 := AlgebraToModuleIsomorphism( B4 ); +Print( "B2M4 = ", B2M4, "\n" ); +Print( "Range( B2M4 ) = M4? ", Range( B2M4 ) = M4, "\n" ); +Print( "Range( B2M4 ) = V4? ", Range( B2M4 ) = V4, "\n" ); + +## Section 2.3.4 +act4 := AlgebraActionByModule( A4, M4 ); +Print( "the action act4 of A4 on B4 is:\n", act4, "\n" ); +a4 := 2*m3 + 3*m3^2; +Print( "a4 = ", a4, ":\n" ); +Print( "the image of a4 under act4 is:\n", Image( act4, a4 ), "\n" ); +Print( "the image of the action act4 is:\n", Image( act4 ), "\n" ); +Print( "\n" ); + +## Section 4.1.7 +X4 := XModAlgebraByModule( A4, M4 ); +Print( "Name( X4 ) = ", Name( X4 ), "\n" ); +Display( X4 ); + +## Section 5.1.1 +C4 := Cat1AlgebraOfXModAlgebra( X4 ); +Print( "Name( C4 ) = ", Name( C4 ), "\n" ); +Display( C4 ); + +## Section 2.4.1 +A3B3 := DirectSumOfAlgebras( A3, B3 );; +SetDirectSumOfAlgebrasInfo( A3B3, + rec( algebras := [A3,B3], first := [1,Dimension(A3)+1], + embeddings := [ ], projections := [ ] ) );; + +## Section 2.4.2 +Print( "\n first embedding into A3B3:\n", Embedding( A3B3, 1 ), "\n" ); +Print( "second embedding into A3B3:\n", Embedding( A3B3, 2 ), "\n" ); + +## Section 2.4.3 +actA3 := AlgebraActionByMultipliers( A3, A3, A3 );; +MA3 := AlgebraActedOn( actA3 );; +SetName( MA3, "MA3" ); +SetName( Image( actA3 ), "imactA3" ); +SetName( Image( actB3 ), "imactB3" ); + + +############################################################################ +## +#E module.g . . . . . . . . . . . . . . . . . . . . . . . . . . . ends here \ No newline at end of file diff --git a/examples/module3.g b/examples/module3.g deleted file mode 100644 index a252522..0000000 --- a/examples/module3.g +++ /dev/null @@ -1,73 +0,0 @@ -############################################################################ -## -#W module3.g XModAlg example files Chris Wensley -## - -LoadPackage( "xmodalg" ); - -## Chapter 2, Section 2.2.3 -m := [ [0,1,0], [0,0,1], [1,0,0] ]; -Print( "m = ", m, "\n" ); -A3 := Algebra( Rationals, [m] ); -SetName( A3, "A3" );; -V3 := Rationals^3;; -M3 := LeftAlgebraModule( A3, \*, V3 ); -SetName( M3, "M3" ); -famM3 := ElementsFamily( FamilyObj( M3 ) );; -v := [3,4,5];; -v2 := ObjByExtRep( famM3, v ); -Print( "v = ", v, ", v2 = ", v2, "\n" ); -Print( "m*v2 = ", m*v2, "\n" ); -genM3 := GeneratorsOfLeftModule( M3 );; -u2 := 6*genM3[1] + 7*genM3[2] + 8*genM3[3]; -u := ExtRepOfObj( u2 ); -Print( "u2 = ", u2, ", u = ", u, "\n" ); - -## Chapter 2, Section 2.2.4 -D3 := LeftActingDomain( M3 );; -T3 := EmptySCTable( Dimension(M3), Zero(D3), "symmetric" );; -B3a := AlgebraByStructureConstants( D3, T3 ); -Print( "B3a = ", B3a, "\n" ); -Print( "B3a has generators: ", GeneratorsOfAlgebra( B3a ), "\n" ); -B3 := ModuleAsAlgebra( M3 ); -Print( "B3 has name: ", Name( B3 ), "\n" ); -Print( "B3 has generators: ", GeneratorsOfAlgebra( B3 ), "\n" ); - -## Chapter 2, Section 2.2.5 -Print( "IsModuleAsAlgebra( B3 )? ", IsModuleAsAlgebra( B3 ), "\n" ); -Print( "IsModuleAsAlgebra( A3 )? ", IsModuleAsAlgebra( A3 ), "\n" ); - -## Chapter 2, Section 2.2.6 -Print( "the known attributes of B3 are:\n" ); -Print( KnownAttributesOfObject( B3 ), "\n" ); -M2B3 := ModuleToAlgebraIsomorphism( B3 ); -Print( "M2B3 = ", M2B3, "\n" ); -Print( "Source( M2B3 ) = M3? ", Source( M2B3 ) = M3, "\n" ); -Print( "Source( M2B3 ) = V3? ", Source( M2B3 ) = V3, "\n" ); -B2M3 := AlgebraToModuleIsomorphism( B3 ); -Print( "B2M3 = ", B2M3, "\n" ); -Print( "Range( B2M3 ) = M3? ", Range( B2M3 ) = M3, "\n" ); -Print( "Range( B2M3 ) = V3? ", Range( B2M3 ) = V3, "\n" ); - -## Chapter 2, Section 2.2.7 -act3 := AlgebraActionByModule( A3, M3 ); -Print( "the action act3 of A3 on B3 is:\n", act3, "\n" ); -a := 2*m + 3*m^2; -Print( "a = ", a, ":\n" ); -Print( "the image of a under act3 is:\n", Image( act3, a ), "\n" ); -Print( "the image of the action act3 is:\n", Image( act3 ), "\n" ); -Print( "\n" ); - -## Chapter 4, Section 4.1.7 -X3 := XModAlgebraByModule( A3, M3 ); -Print( "Name( X3 ) = ", Name( X3 ), "\n" ); -Display( X3 ); - -## Chapter 5, Section 5.1.1 -C3 := Cat1AlgebraOfXModAlgebra( X3 ); -Print( "Name( C3 ) = ", Name( C3 ), "\n" ); -Display( C3 ); - -############################################################################ -## -#E module3.g . . . . . . . . . . . . . . . . . . . . . . . . . . ends here \ No newline at end of file diff --git a/lib/algebra.gi b/lib/algebra.gi index f87e38e..d0344c7 100644 --- a/lib/algebra.gi +++ b/lib/algebra.gi @@ -546,7 +546,7 @@ function ( A, I, B ) act := MultiplierHomomorphism( M ); SetIsAlgebraAction( act, true ); SetAlgebraActionType( act, "multiplier" ); - SetAlgebraActedOn( act, M ); + SetAlgebraActedOn( act, B ); SetHasZeroModuleProduct( act, false ); return act; end ); diff --git a/lib/module.gd b/lib/module.gd index 72b55a7..f9a8046 100644 --- a/lib/module.gd +++ b/lib/module.gd @@ -21,25 +21,25 @@ ## AlgebraActionByHomomorphism( alpha, A ) ## attempts to return an action of B on A. ##

-## In the example the matrix algebra Am -## and the group algebra AG are isomorphic algebras, +## In the example the matrix algebra A3 +## and the group algebra B3 are isomorphic algebras, ## so the resulting action is equivalent to the multiplier -## action of AG on itself. +## action of B3 on itself. ## ## ## ## m := [ [0,1,0], [0,0,1], [1,0,0,] ];; -## gap> Am := Algebra( Rationals, [m] );; -## gap> SetName( Am, "Am" );; +## gap> m3 := [ [0,1,0], [0,0,1], [1,0,0,] ];; +## gap> A3 := Algebra( Rationals, [m3] );; +## gap> SetName( A3, "A3" );; ## gap> G := Group( (1,2,3) );; -## gap> AG := GroupRing( Rationals, G );; -## gap> SetName( AG, "GR(G)" ); -## gap> g := GeneratorsOfAlgebra( AG )[2];; -## gap> mug := RegularAlgebraMultiplier( AG, AG, g );; -## gap> MAG := AlgebraByGenerators( Rationals, [ mug ] );; -## gap> hom := AlgebraHomomorphismByImages( Am, MAG, [ m ], [ mug ] );; -## gap> act := AlgebraActionByHomomorphism( hom, AG ); +## gap> B3 := GroupRing( Rationals, G );; +## gap> SetName( B3, "GR(G)" ); +## gap> g3 := GeneratorsOfAlgebra( B3 )[2];; +## gap> mg3 := RegularAlgebraMultiplier( B3, B3, g3 );; +## gap> MB3 := AlgebraByGenerators( Rationals, [ mg3 ] );; +## gap> homB3 := AlgebraHomomorphismByImages( A3, MB3, [ m3 ], [ mg3 ] );; +## gap> actB3 := AlgebraActionByHomomorphism( homB3, B3 ); ## [ [ [ 0, 1, 0 ], [ 0, 0, 1 ], [ 1, 0, 0 ] ] ] -> ## [ [ (1)*(), (1)*(1,2,3), (1)*(1,3,2) ] -> [ (1)*(1,2,3), (1)*(1,3,2), (1)*() ## ] ] @@ -69,19 +69,19 @@ DeclareOperation( "AlgebraActionByHomomorphism", ## ## ## hom := AlgebraHomomorphismByImages( Am, MAG, [ m ], [ mug ] ); +## gap> bdyB3 := AlgebraHomomorphismByImages( A3, MB3, [ m3 ], [ mg3 ] ); ## [ [ [ 0, 1, 0 ], [ 0, 0, 1 ], [ 1, 0, 0 ] ] ] -> ## [ [ (1)*(), (1)*(1,2,3), (1)*(1,3,2) ] -> [ (1)*(1,2,3), (1)*(1,3,2), (1)*() ## ] ] -## gap> bdy := AlgebraHomomorphismByImages( AG, Am, [ g ], [ m ] ); +## gap> bdyB3 := AlgebraHomomorphismByImages( B3, A3, [ g3 ], [ m3 ] ); ## [ (1)*(1,2,3) ] -> [ [ [ 0, 1, 0 ], [ 0, 0, 1 ], [ 1, 0, 0 ] ] ] -## gap> Xm := XModAlgebraByBoundaryAndAction( bdy, act ); -## [ GR(G) -> Am ] -## gap> Display( Xm ); -## Crossed module [GR(G) -> Am] :- +## gap> XB3 := XModAlgebraByBoundaryAndAction( bdy5, act3 ); +## [ GR(G) -> A3 ] +## gap> Display( XB3 ); +## Crossed module [GR(G) -> A3] :- ## : Source algebra GR(G) has generators: ## [ (1)*(), (1)*(1,2,3) ] -## : Range algebra Am has generators: +## : Range algebra A3 has generators: ## [ [ [ 0, 1, 0 ], [ 0, 0, 1 ], [ 1, 0, 0 ] ] ] ## : Boundary homomorphism maps source generators to: ## [ [ [ 1, 0, 0 ], [ 0, 1, 0 ], [ 0, 0, 1 ] ], @@ -101,7 +101,6 @@ DeclareOperation( "PreXModAlgebraByBoundaryAndAction", ############################################################################ ## ## <#GAPDoc Label="AlgebraModules"> -## Algebra modules ## Recall that a module can be made into an algebra ## by defining every product to be zero. ## When we apply this construction to a (left) algebra module, @@ -117,26 +116,25 @@ DeclareOperation( "PreXModAlgebraByBoundaryAndAction", ## ## ## m := [ [0,1,0], [0,0,1], [1,0,0] ];; -## gap> A3 := Rationals^[3,3];; -## gap> SetName( A3, "A3" );; -## gap> V3 := Rationals^3;; -## gap> M3 := LeftAlgebraModule( A3, \*, V3 );; -## gap> SetName( M3, "M3" ); -## gap> famM3 := ElementsFamily( FamilyObj( M3 ) );; -## gap> v := [3,4,5];; -## gap> v2 := ObjByExtRep( famM3, v ); +## gap> m3 := [ [0,1,0], [0,0,1], [1,0,0] ];; +## gap> A4 := Rationals^[3,3];; +## gap> SetName( A4, "A4" );; +## gap> V4 := Rationals^3;; +## gap> M4 := LeftAlgebraModule( A4, \*, V4 );; +## gap> SetName( M4, "M4" ); +## gap> famM4 := ElementsFamily( FamilyObj( M4 ) );; +## gap> v4 := [3,4,5];; +## gap> v4 := ObjByExtRep( famM4, v4 ); ## [ 3, 4, 5 ] -## gap> m*v2; +## gap> m3*v4; ## [ 4, 5, 3 ] -## gap> genM3 := GeneratorsOfLeftModule( M3 );; -## gap> u2 := 6*genM3[1] + 7*genM3[2] + 8*genM3[3]; +## gap> genM4 := GeneratorsOfLeftModule( M4 );; +## gap> u4 := 6*genM4[1] + 7*genM4[2] + 8*genM4[3]; ## [ 6, 7, 8 ] -## gap> u := ExtRepOfObj( u2 ); +## gap> u4 := ExtRepOfObj( u4 ); ## [ 6, 7, 8 ] ## ]]> ## -## ## <#/GAPDoc> ## @@ -158,7 +156,7 @@ DeclareOperation( "PreXModAlgebraByBoundaryAndAction", ##

## If the module M has been given a name, then the operation ## ModuleAsAlgebra assigns a name to the resulting algebra. -## The operation AlgebraByStyructureConstants assigns names +## The operation AlgebraByStructureConstants assigns names ## v_i to the basis vectors unless a list of names is provided. ## The operation ModuleAsAlgebra converts the basis elements of ## M into strings, with additional brackets added, and uses these @@ -168,15 +166,15 @@ DeclareOperation( "PreXModAlgebraByBoundaryAndAction", ## ## ## D3 := LeftActingDomain( M3 );; -## gap> T3 := EmptySCTable( Dimension(M3), Zero(D3), "symmetric" );; -## gap> B3a := AlgebraByStructureConstants( D3, T3 ); +## gap> D4 := LeftActingDomain( M4 );; +## gap> T4 := EmptySCTable( Dimension(M4), Zero(D4), "symmetric" );; +## gap> B4a := AlgebraByStructureConstants( D4, T4 ); ## -## gap> GeneratorsOfAlgebra( B3a ); +## gap> GeneratorsOfAlgebra( B4a ); ## [ v.1, v.2, v.3 ] -## gap> B3 := ModuleAsAlgebra( M3 ); -## A(M3) -## gap> GeneratorsOfAlgebra( B3 ); +## gap> B4 := ModuleAsAlgebra( M4 ); +## A(M4) +## gap> GeneratorsOfAlgebra( B4 ); ## [ [[ 1, 0, 0 ]], [[ 0, 1, 0 ]], [[ 0, 0, 1 ]] ] ## ]]> ## @@ -199,9 +197,9 @@ DeclareAttribute( "ModuleAsAlgebra", IsLeftModule ); ## ## ## IsModuleAsAlgebra( B3 ); +## gap> IsModuleAsAlgebra( B4 ); ## true -## gap> IsModuleAsAlgebra( A3 ); +## gap> IsModuleAsAlgebra( A4 ); ## false ## ]]> ## @@ -229,24 +227,24 @@ DeclareProperty( "IsModuleAsAlgebra", IsAlgebra ); ## ## ## KnownAttributesOfObject( B3 ); +## gap> KnownAttributesOfObject( B4 ); ## [ "Name", "ZeroImmutable", "LeftActingDomain", "Dimension", ## "GeneratorsOfLeftOperatorAdditiveGroup", "GeneratorsOfLeftOperatorRing", ## "ModuleToAlgebraIsomorphism", "AlgebraToModuleIsomorphism" ] -## gap> M2B3 := ModuleToAlgebraIsomorphism( B3 ); +## gap> M2B4 := ModuleToAlgebraIsomorphism( B4 ); ## [ [ 1, 0, 0 ], [ 0, 1, 0 ], [ 0, 0, 1 ] ] -> [ [[ 1, 0, 0 ]], [[ 0, \ ## 1, 0 ]], ## [[ 0, 0, 1 ]] ] -## gap> Source( M2B3 ) = M3; +## gap> Source( M2B4 ) = M4; ## false -## gap> Source( M2B3 ) = V3; +## gap> Source( M2B4 ) = V4; ## true -## gap> B2M3 := AlgebraToModuleIsomorphism( B3 ); +## gap> B2M4 := AlgebraToModuleIsomorphism( B4 ); ## [ [[ 1, 0, 0 ]], [[ 0, 1, 0 ]], [[ 0, 0, 1 ]] ] -> ## [ [ 1, 0, 0 ], [ 0, 1, 0 ], [ 0, 0, 1 ] ] -## gap> Range( B2M3 ) = M3; +## gap> Range( B2M4 ) = M4; ## false -## gap> Range( B2M3 ) = V3; +## gap> Range( B2M4 ) = V4; ## true ## ]]> ## @@ -271,25 +269,18 @@ DeclareAttribute( "AlgebraToModuleIsomorphism", IsAlgebra ); ## ## ## act3 := AlgebraActionByModule( A3, M3 ); -## [ [ [ 1, 0, 0 ], [ 0, 1, 0 ], [ 0, 0, 1 ] ], -## [ [ 1, 0, 0 ], [ 0, 0, 0 ], [ 0, 0, 0 ] ], -## [ [ 0, 0, 1 ], [ 1, 0, 0 ], [ 0, 1, 0 ] ] ] -> +## gap> act4 := AlgebraActionByModule( A4, M4 ); +## [ [ [ 0, 1, 0 ], [ 0, 0, 1 ], [ 1, 0, 0 ] ] ] -> ## [ [ [[ 1, 0, 0 ]], [[ 0, 1, 0 ]], [[ 0, 0, 1 ]] ] -> -## [ [[ 1, 0, 0 ]], [[ 0, 1, 0 ]], [[ 0, 0, 1 ]] ], -## [ [[ 1, 0, 0 ]], [[ 0, 1, 0 ]], [[ 0, 0, 1 ]] ] -> -## [ [[ 1, 0, 0 ]], 0*[[ 1, 0, 0 ]], 0*[[ 1, 0, 0 ]] ], -## [ [[ 1, 0, 0 ]], [[ 0, 1, 0 ]], [[ 0, 0, 1 ]] ] -> -## [ [[ 0, 1, 0 ]], [[ 0, 0, 1 ]], [[ 1, 0, 0 ]] ] ] -## gap> genA3 := GeneratorsOfAlgebra( A3 );; -## gap> a := 2*m + 3*m^2; +## [ [[ 0, 0, 1 ]], [[ 1, 0, 0 ]], [[ 0, 1, 0 ]] ] ] +## gap> a4 := 2*m3 + 3*m3^2; ## [ [ 0, 2, 3 ], [ 3, 0, 2 ], [ 2, 3, 0 ] ] -## gap> Image( act3, a ); -## Basis( A(M3), [ [[ 1, 0, 0 ]], [[ 0, 1, 0 ]], [[ 0, 0, 1 ]] ] ) -> +## gap> Image( act4, a4 ); +## Basis( A(M4), [ [[ 1, 0, 0 ]], [[ 0, 1, 0 ]], [[ 0, 0, 1 ]] ] ) -> ## [ (3)*[[ 0, 1, 0 ]]+(2)*[[ 0, 0, 1 ]], (2)*[[ 1, 0, 0 ]]+(3)*[[ 0, 0, 1 ]], ## (3)*[[ 1, 0, 0 ]]+(2)*[[ 0, 1, 0 ]] ] -## gap> Image( act3 ); -## +## gap> Image( act4 ); +## ## ]]> ## ## <#/GAPDoc> @@ -321,14 +312,14 @@ DeclareOperation( "AlgebraActionByModule", [ IsAlgebra, IsLeftModule ] ); ## ## ## X3 := XModAlgebraByModule( A3, M3 ); -## [ A(M3) -> A3 ] -## gap> Display( X3 ); -## Crossed module [A(M3)->A3] :- -## : Source algebra A(M3) has generators: +## gap> X4 := XModAlgebraByModule( A4, M4 ); +## [ A(M4) -> A4 ] +## gap> Display( X4 ); +## Crossed module [A(M4)->A4] :- +## : Source algebra A(M4) has generators: ## [ [[ 1, 0, 0 ]], [[ 0, 1, 0 ]], [[ 0, 0, 1 ]] ] -## : Range algebra A3 has generators: -## [ [ [ 1, 0, 0 ], [ 0, 1, 0 ], [ 0, 0, 1 ] ], +## : Range algebra A4 has generators: +## [4[ [ 1, 0, 0 ], [ 0, 1, 0 ], [ 0, 0, 1 ] ], ## [ [ 1, 0, 0 ], [ 0, 0, 0 ], [ 0, 0, 0 ] ], ## [ [ 0, 0, 1 ], [ 1, 0, 0 ], [ 0, 1, 0 ] ] ] ## : Boundary homomorphism maps source generators to: @@ -353,10 +344,10 @@ DeclareOperation( "XModAlgebraByModule", [ IsAlgebra, IsLeftModule ] ); ## ## C3 := Cat1AlgebraOfXModAlgebra( X3 ); -## [A3 |X A(M3)=>A3] -## gap> Display( C3 ); -## Cat1-algebra [A3 |X A(M3)=>A3] :- +## gap> C6 := Cat1AlgebraOfXModAlgebra( X6 ); +## [A4 |X A(M4)=>A4] +## gap> Display( C6 ); +## Cat1-algebra [A4 |X A(M4)=>A4] :- ## : range algebra has generators: ## [ [ [ 0, 1, 0 ], [ 0, 0, 1 ], [ 1, 0, 0 ] ] ] ## : tail homomorphism = head homomorphism @@ -378,4 +369,127 @@ DeclareOperation( "XModAlgebraByModule", [ IsAlgebra, IsLeftModule ] ); ############################ direct sum operations ####################### +############################################################################# +## +#A DirectSumOfAlgebrasInfo( ) +## +## <#GAPDoc Label="DirectSumOfAlgebrasInfo"> +## +## +## +## +## This attribute for direct sums of algebras is missing from +## the main library, and is added here to be used in methods +## for Embedding and Projection. +## +## +## +## A3B3 := DirectSumOfAlgebras( A3, B3 );; +## gap> SetDirectSumOfAlgebrasInfo( A3B3, +## > rec( algebras := [A3,B3], first := [1,Dimension(A3)+1], +## > embeddings := [ ], projections := [ ] ) ); +## ]]> +## +## <#/GAPDoc> +## +DeclareAttribute( "DirectSumOfAlgebrasInfo", IsAlgebra, "mutable" ); + +############################################################################ +## +## Embedding( ) +## +## <#GAPDoc Label="EmbeddingForDirectSumOfAlgebras"> +## +## +## +## +## +## Methods for Embedding and Projection for direct sums +## of algebras are missing from the main library, and so are included here. +##

+## +## +## +## Embedding( A3B3, 1 ); +## Basis( A3, [ [ [ 0, 1, 0 ], [ 0, 0, 1 ], [ 1, 0, 0 ] ], +## [ [ 0, 0, 1 ], [ 1, 0, 0 ], [ 0, 1, 0 ] ], +## [ [ 1, 0, 0 ], [ 0, 1, 0 ], [ 0, 0, 1 ] ] ] ) -> [ v.1, v.2, v.3 ] +## gap> Projection( A3B3, 2 ); +## CanonicalBasis( ) -> +## [ 0*[[ 1, 0, 0 ]], 0*[[ 1, 0, 0 ]], 0*[[ 1, 0, 0 ]], [[ 1, 0, 0 ]], +## [[ 0, 1, 0 ]], [[ 0, 0, 1 ]] ] +## ]]> +## +## <#/GAPDoc> +## + +############################################################################ +## +## AlgebraActionOnDirectSum( ) +## +## <#GAPDoc Label="AlgebraActionOnDirectSum"> +## +## +## +## +## If \alpha_1 : A \to C_1 is an action on algebra B_1 +## and \alpha_2 : A \to C_2 is an action on algebra B_2 +## by the same algebra A, +## then A acts on the direct sum B_1 \oplus B_2 +## by a \cdot (b_1,b_2) = (a \cdot b_1, a \cdot b_2). +##

+## In Section there is created +## an action actB3 of A3 on an isomorphic B3. +## In the example here we construct actA3, with A3 acting +## on itself, formed using AlgebraActionByMultipliers. +## Then we construct the direcct sum of these actions. +## +## +## +## actA3 := AlgebraActionByMultipliers( A3, A3, A3 );; +## gap> actAB := AlgebraActionOnDirectSum( actA3, actB3 ); +## [ [ [ 0, 1, 0 ], [ 0, 0, 1 ], [ 1, 0, 0 ] ], +## [ [ 0, 0, 1 ], [ 1, 0, 0 ], [ 0, 1, 0 ] ], +## [ [ 1, 0, 0 ], [ 0, 1, 0 ], [ 0, 0, 1 ] ] ] -> +## [ [ v.1, v.2, v.3, v.4, v.5, v.6 ] -> [ v.2, v.3, v.1, v.5, v.6, v.4 ], +## [ v.1, v.2, v.3, v.4, v.5, v.6 ] -> [ v.3, v.1, v.2, v.6, v.4, v.5 ], +## [ v.1, v.2, v.3, v.4, v.5, v.6 ] -> [ v.1, v.2, v.3, v.4, v.5, v.6 ] ] +## ]]> +## +## <#/GAPDoc> +## +DeclareOperation( "AlgebraActionOnDirectSum", + [ IsAlgebraAction, IsAlgebraAction ] ); + +############################################################################ +## +## DirectSumAlgebraActions( ) +## +## <#GAPDoc Label="DirectSumAlgebraActions"> +## +## +## +## +## Let +## If \alpha_1 : A_1 \to C_1 is an action on algebra B_1 +## and \alpha_2 : A_2 \to C_2 is an action on algebra B_2, +## then A_1 \oplus A_2 acts on the direct sum B_1 \oplus B_2 +## by (a_1,a_2) \cdot (b_1,b_2) = (a_1 \cdot b_1, a_2 \cdot b_2). +##

+## +## +## +## +## ]]> +## +## <#/GAPDoc> +## +DeclareOperation( "DirectSumAlgebraActions", + [ IsAlgebraAction, IsAlgebraAction ] ); diff --git a/lib/module.gi b/lib/module.gi index 19bb377..bb0f984 100644 --- a/lib/module.gi +++ b/lib/module.gi @@ -5,13 +5,39 @@ #Y Copyright (C) 2014-2024, Zekeriya Arvasi & Alper Odabas, ## -############################ algebra operations ########################### +############################## algebra actions ############################ + +############################################################################# +## +#F AlgebraActionByHomomorphism( ) +## +InstallMethod( AlgebraActionByHomomorphism, + "for an algebra homomorphism and an algebra", true, + [ IsAlgebraHomomorphism, IsAlgebra ], 0, +function ( hom, A ) + local C, genC; + if not IsAlgebraAction( hom ) then + Info( InfoXModAlg, 1, "hom is not an algebra action" ); + return fail; + fi; + C := Range( hom ); + genC := GeneratorsOfAlgebra( C ); + if not ( A = Source( genC[1] ) ) then + Info( InfoXModAlg, 1, "Range(hom) not isomorphisms of A" ); + return fail; + fi; + SetAlgebraActionType( hom, "homomorphism" ); + SetAlgebraActedOn( hom, A ); + return hom; +end ); + +############################# module operations ########################### ############################################################################# ## #M ModuleAsAlgebra ## -InstallMethod( ModuleAsAlgebra, "generic method for a module", true, +InstallMethod( ModuleAsAlgebra, "baseric method for a module", true, [ IsLeftModule ], 0, function( M ) local D, z, genM, num, L, T, B, genB, V, genV, MtoB, BtoM; @@ -122,28 +148,109 @@ end ); ############################################################################# ## -#F AlgebraActionByHomomorphism( ) +#M Embedding ## -InstallMethod( AlgebraActionByHomomorphism, - "for an algebra homomorphism and an algebra", true, - [ IsAlgebraHomomorphism, IsAlgebra ], 0, -function ( hom, A ) - local C, genC; - if not IsAlgebraAction( hom ) then - Info( InfoXModAlg, 1, "hom is not an algebra action" ); - return fail; +InstallMethod( Embedding, "algebra direct sum and integer", + [ IsAlgebra and HasDirectSumOfAlgebrasInfo, IsPosInt ], + function( D, i ) + local info, A, imgs, hom; + # check if exists already + info := DirectSumOfAlgebrasInfo( D ); + if IsBound( info.embeddings[i] ) then + return info.embeddings[i]; fi; - C := Range( hom ); - genC := GeneratorsOfAlgebra( C ); - if not ( A = Source( genC[1] ) ) then - Info( InfoXModAlg, 1, "Range(hom) not isomorphisms of A" ); - return fail; + if not ( i in [1,2] ) then + Error( "require i in [1,2]" ); fi; - SetAlgebraActionType( hom, "homomorphism" ); - SetAlgebraActedOn( hom, A ); + # compute the embedding + A := info.algebras[i]; + imgs := Basis( D ){[info.first[i]..info.first[i]+Dimension(A)-1]}; + hom := AlgebraHomomorphismByImagesNC( A, D, Basis(A), imgs ); + SetIsInjective( hom, true ); + ## store information + info.embeddings[i] := hom; return hom; -end ); +end); -############################ direct sum operations ####################### + +############################################################################# +## +#M Projection +## +InstallMethod( Projection, "algebra direct sum and integer", + [ IsAlgebra and HasDirectSumOfAlgebrasInfo, IsPosInt ], + function( D, i ) + local info, A, bass, dimA, dimD, imgs, hom; + # check if exists already + info := DirectSumOfAlgebrasInfo( D ); + if IsBound( info.projections[i] ) then + return info.projections[i]; + fi; + if not ( i in [1,2] ) then + Error( "require i in [1,2]" ); + fi; + # compute the projection + A := info.algebras[i]; + dimA := Dimension( A ); + dimD := Dimension( D ); + bass := Basis( D ); + if ( i = 1 ) then + imgs := Concatenation( Basis( A ), + List( [1..dimD-dimA], x -> Zero(A) ) ); + else + imgs := Concatenation( List( [1..dimD-dimA], x -> Zero(A) ), + Basis( A ) ); + fi; + hom := AlgebraHomomorphismByImagesNC( D, A, bass, imgs ); + SetIsSurjective( hom, true ); + ## store information + info.projections[i] := hom; + return hom; +end); + +############################################################################# +## +#M AlgebraActionOnDirectSum +## +InstallMethod( AlgebraActionOnDirectSum, "for two algebra actions", true, + [ IsAlgebraAction, IsAlgebraAction ], 0, +function( act1, act2 ) + local A, domA, genA, B1, basB1, B2, basB2, B, firstB, basB, + eB1, eB2, genC, a, c1, c2, imc1, imc2, imB, C, act; + A := Source( act1 ); + domA := LeftActingDomain( A ); + genA := BasisVectors( Basis( A ) ); + if not ( Source( act2 ) = A ) then + Error( "act1, act2 must have the same source" ); + fi; + B1 := AlgebraActedOn( act1 ); + basB1 := BasisVectors( Basis( B1 ) ); + B2 := AlgebraActedOn( act2 ); + basB2 := BasisVectors( Basis( B2 ) ); + B := DirectSumOfAlgebras( B1, B2 ); + firstB := [ 1, 1 + Dimension( B1 ) ]; + basB := BasisVectors( Basis( B ) ); + SetDirectSumOfAlgebrasInfo( B, + rec( algebras := [ B1, B2 ], + first := firstB, + embeddings := [ ], + projections := [ ] ) ); + eB1 := Embedding( B, 1 ); + eB2 := Embedding( B, 2 ); + genC := [ ]; + for a in genA do + c1 := ImageElm( act1, a ); + c2 := ImageElm( act2, a ); + imc2 := List( basB2, b -> ImageElm( eB2, ImageElm( c2, b ) ) ); + imc1 := List( basB1, b -> ImageElm( eB1, ImageElm( c1, b ) ) ); + imB := Concatenation( imc1, imc2 ); + Add( genC, LeftModuleHomomorphismByImages( B, B, basB, imB ) ); + od; + C := AlgebraByGenerators( domA, genC ); + act := AlgebraHomomorphismByImages( A, C, genA, genC ); + SetIsAlgebraAction( act, true ); + SetAlgebraActionType( act, "direct sum" ); + return act; +end ); diff --git a/tst/algebra.tst b/tst/algebra.tst index 90f78c4..4363928 100644 --- a/tst/algebra.tst +++ b/tst/algebra.tst @@ -10,140 +10,141 @@ gap> SetInfoLevel( InfoXModAlg, 0 ); gap> SetInfoLevel( InfoXModAlg, saved_infolevel_xmodalg );; gap> STOP_TEST( "algebra.tst", 10000 ); -## Chapter 2, Section 2.1.1 -gap> A5c6 := GroupRing( GF(5), Group( (1,2,3,4,5,6) ) );; -gap> vecA := BasisVectors( Basis( A5c6 ) );; -gap> v := vecA[1] + vecA[3] + vecA[5]; +## Section 2.1.1 +gap> A1 := GroupRing( GF(5), Group( (1,2,3,4,5,6) ) );; +gap> SetName( A1, "A1" ); +gap> BA1 := BasisVectors( Basis( A1 ) );; +gap> v := BA1[1] + BA1[3] + BA1[5]; (Z(5)^0)*()+(Z(5)^0)*(1,3,5)(2,4,6)+(Z(5)^0)*(1,5,3)(2,6,4) -gap> I5c6 := Ideal( A5c6, [v] );; -gap> v2 := vecA[2]; +gap> I1 := Ideal( A1, [v] );; +gap> SetName( I1, "I1" ); +gap> v1 := BA1[2]; (Z(5)^0)*(1,2,3,4,5,6) -gap> m2 := RegularAlgebraMultiplier( A5c6, I5c6, v2 ); +gap> m1 := RegularAlgebraMultiplier( A1, I1, v1 ); [ (Z(5)^0)*()+(Z(5)^0)*(1,3,5)(2,4,6)+(Z(5)^0)*(1,5,3)(2,6,4), (Z(5)^0)*(1,2,3,4,5,6)+(Z(5)^0)*(1,4)(2,5)(3,6)+(Z(5)^0)*(1,6,5,4,3,2) ] -> [ (Z(5)^0)*(1,2,3,4,5,6)+(Z(5)^0)*(1,4)(2,5)(3,6)+(Z(5)^0)*(1,6,5,4,3,2), (Z(5)^0)*()+(Z(5)^0)*(1,3,5)(2,4,6)+(Z(5)^0)*(1,5,3)(2,6,4) ] ## Section 2.1.2 -gap> IsAlgebraMultiplier( m2 ); +gap> IsAlgebraMultiplier( m1 ); true -gap> one := One( A5c6 );; -gap> L := List( vecA, v -> one );; -gap> m1 := LeftModuleHomomorphismByImages( A5c6, A5c6, vecA, L ); +gap> one := One( A1 );; +gap> L1 := List( BA1, v -> one );; +gap> h1 := LeftModuleHomomorphismByImages( A1, A1, BA1, L1 ); [ (Z(5)^0)*(), (Z(5)^0)*(1,2,3,4,5,6), (Z(5)^0)*(1,3,5)(2,4,6), (Z(5)^0)*(1,4)(2,5)(3,6), (Z(5)^0)*(1,5,3)(2,6,4), (Z(5)^0)*(1,6,5,4,3,2) ] -> [ (Z(5)^0)*(), (Z(5)^0)*(), (Z(5)^0)*(), (Z(5)^0)*(), (Z(5)^0)*(), (Z(5)^0)*() ] -gap> IsAlgebraMultiplier( m1 ); +gap> IsAlgebraMultiplier( h1 ); false ## Section 2.1.3 -gap> v3 := vecA[3]; +gap> u1 := BA1[3]; (Z(5)^0)*(1,3,5)(2,4,6) -gap> B5c3 := Subalgebra( A5c6, [ v3 ] );; -gap> M := MultiplierAlgebraOfIdealBySubalgebra( A5c6, I5c6, B5c3 ); +gap> S1 := Subalgebra( A1, [ u1 ] );; +gap> SetName( S1, "S1" ); +gap> MS1 := MultiplierAlgebraOfIdealBySubalgebra( A1, I1, S1 ); -gap> vecM := BasisVectors( Basis( M ) );; -gap> vecM[1]; -, (dimension 2 - )> -> , - (dimension 2)>> +gap> SetName( MS1, "MS1" ); +gap> BMS1 := BasisVectors( Basis( MS1 ) );; +gap> BMS1[1]; + I1> ## Section 2.1.4 -gap> MA5c6 := MultiplierAlgebra( A5c6 ); +gap> MA1 := MultiplierAlgebra( A1 ); -gap> vecM := BasisVectors( Basis( MA5c6 ) );; -gap> vecM[3]; - -> > +gap> BMA1 := BasisVectors( Basis( MA1 ) );; +gap> BMA1[3]; + A1> ## Section 2.1.5 -gap> hom := MultiplierHomomorphism( MA5c6 );; -gap> ImageElm( hom, vecA[2] ); -Basis( , -[ (Z(5)^0)*(), (Z(5)^0)*(1,2,3,4,5,6), (Z(5)^0)*(1,3,5)(2,4,6), +gap> hom1 := MultiplierHomomorphism( MA1 );; +gap> ImageElm( hom1, BA1[2] ); +Basis( A1, [ (Z(5)^0)*(), (Z(5)^0)*(1,2,3,4,5,6), (Z(5)^0)*(1,3,5)(2\ +,4,6), (Z(5)^0)*(1,4)(2,5)(3,6), (Z(5)^0)*(1,5,3)(2,6,4), (Z(5)^0)*(1,6,5,4,3,2) ] ) -> [ (Z(5)^0)*(1,2,3,4,5,6), (Z(5)^0)*(1,3,5)(2,4,6), (Z(5)^0)*(1,4)(2,5)(3,6), (Z(5)^0)*(1,5,3)(2,6,4), (Z(5)^0)*(1,6,5,4,3,2), (Z(5)^0)*() ] -## Chapter 2, Section 2.2.1 -gap> A5c6 := GroupRing( GF(5), Group( (1,2,3,4,5,6) ) );; -gap> vecA := BasisVectors( Basis( A5c6 ) );; -gap> v := vecA[1] + vecA[3] + vecA[5]; +## Section 2.2.2 +gap> A1 := GroupRing( GF(5), Group( (1,2,3,4,5,6) ) );; +gap> BA1 := BasisVectors( Basis( A1 ) );; +gap> v := BA1[1] + BA1[3] + BA1[5]; (Z(5)^0)*()+(Z(5)^0)*(1,3,5)(2,4,6)+(Z(5)^0)*(1,5,3)(2,6,4) -gap> I5c6 := Ideal( A5c6, [v] );; -gap> actm := AlgebraActionByMultipliers( A5c6, I5c6, A5c6 );; -gap> actm2 := Image( actm, vecA[2] );; -gap> Image( actm2, v ); +gap> I1 := Ideal( A1, [v] );; +gap> act1 := AlgebraActionByMultipliers( A1, I1, A1 );; +gap> act12 := Image( act1, BA1[2] );; +gap> Image( act12, v ); (Z(5)^0)*(1,2,3,4,5,6)+(Z(5)^0)*(1,4)(2,5)(3,6)+(Z(5)^0)*(1,6,5,4,3,2) -## Section 2.2.2 -gap> theta := NaturalHomomorphismByIdeal( A5c6, I5c6 ); +## Section 2.2.3 +gap> theta1 := NaturalHomomorphismByIdeal( A1, I1 ); -> > -gap> List( vecA, v -> ImageElm( theta, v ) ); +gap> List( BA1, v -> ImageElm( theta1, v ) ); [ v.1, v.2, v.3, v.4, (Z(5)^2)*v.1+(Z(5)^2)*v.3, (Z(5)^2)*v.2+(Z(5)^2)*v.4 ] -gap> actp := AlgebraActionBySurjection( theta ); +gap> AlgebraActionBySurjection( theta1 ); kernel of hom is not in the annihilator of A fail gap> ## an example which does not fail: -gap> m := [ [0,1,2,3], [0,0,1,2], [0,0,0,1], [0,0,0,0] ];; -gap> m^2; +gap> m2 := [ [0,1,2,3], [0,0,1,2], [0,0,0,1], [0,0,0,0] ];; +gap> m2^2; [ [ 0, 0, 1, 4 ], [ 0, 0, 0, 1 ], [ 0, 0, 0, 0 ], [ 0, 0, 0, 0 ] ] -gap> m^3; +gap> m2^3; [ [ 0, 0, 0, 1 ], [ 0, 0, 0, 0 ], [ 0, 0, 0, 0 ], [ 0, 0, 0, 0 ] ] -gap> A1 := Algebra( Rationals, [m] );; -gap> SetName( A1, "A1" ); -gap> A3 := Subalgebra( A1, [m^3] );; -gap> nat3 := NaturalHomomorphismByIdeal( A1, A3 ); - A2 := Algebra( Rationals, [m2] );; +gap> SetName( A2, "A2" ); +gap> S2 := Subalgebra( A2, [m2^3] );; +gap> SetName( S2, "S2" ); +gap> nat2 := NaturalHomomorphismByIdeal( A2, S2 ); + > -gap> Q13 := Image( nat3 );; -gap> SetName( Q13, "Q13" ); -gap> Display(nat3); -LeftModuleHomomorphismByMatrix( Basis( A1, +gap> Q2 := Image( nat2 );; +gap> SetName( Q2, "Q2" ); +gap> Display( nat2 ); +LeftModuleHomomorphismByMatrix( Basis( A2, [ [ [ 0, 0, 0, 1 ], [ 0, 0, 0, 0 ], [ 0, 0, 0, 0 ], [ 0, 0, 0, 0 ] ], [ [ 0, 1, 2, 3 ], [ 0, 0, 1, 2 ], [ 0, 0, 0, 1 ], [ 0, 0, 0, 0 ] ], [ [ 0, 0, 1, 4 ], [ 0, 0, 0, 1 ], [ 0, 0, 0, 0 ], [ 0, 0, 0, 0 ] ] ] ), -[ [ 0, 0 ], [ 1, 0 ], [ 0, 1 ] ], CanonicalBasis( Q13 ) ) -gap> act3 := AlgebraActionBySurjection( nat3 );; -gap> B3 := Image( act3 );; -gap> bvB3 := BasisVectors( Basis( B3 ) );; -gap> b1 := bvB3[1];; b2 := bvB3[2];; -gap> [ Image(b1,m)=m^2, Image(b1,m^2)=m^3, Image(b1,m^3)=Zero(A1) ]; +[ [ 0, 0 ], [ 1, 0 ], [ 0, 1 ] ], CanonicalBasis( Q2 ) ) +gap> act2 := AlgebraActionBySurjection( nat2 );; +gap> C2 := Image( act2 );; +gap> BC2 := BasisVectors( Basis( C2 ) );; +gap> b1 := BC2[1];; b2 := BC2[2];; +gap> [ Image(b1,m2)=m2^2, Image(b1,m2^2)=m2^3, Image(b1,m2^3)=Zero(A2) ]; [ true, true, true ] -gap> [ Image(b2,m)=m^3, b2=b1^2 ]; +gap> [ Image(b2,m2)=m2^3, b2=b1^2 ]; [true, true ] -## Section 2.2.8 -gap> P := SemidirectProductOfAlgebras( A5c6, actm, I5c6 ); +## Section 2.5.1 +gap> P1 := SemidirectProductOfAlgebras( A1, act1, I1 ); -gap> Embedding( P, 1 ); +gap> Embedding( P1, 1 ); [ (Z(5)^0)*(), (Z(5)^0)*(1,2,3,4,5,6), (Z(5)^0)*(1,3,5)(2,4,6), (Z(5)^0)*(1,4)(2,5)(3,6), (Z(5)^0)*(1,5,3)(2,6,4), (Z(5)^0)*(1,6,5,4,3,2) ] -> [ v.1, v.2, v.3, v.4, v.5, v.6 ] -gap> Embedding( P, 2 ); +gap> Embedding( P1, 2 ); [ (Z(5)^0)*()+(Z(5)^0)*(1,3,5)(2,4,6)+(Z(5)^0)*(1,5,3)(2,6,4), (Z(5)^0)*(1,2,3,4,5,6)+(Z(5)^0)*(1,4)(2,5)(3,6)+(Z(5)^0)*(1,6,5,4,3,2) ] -> [ v.7, v.8 ] -gap> Projection( P, 1 ); +gap> Projection( P1, 1 ); [ v.1, v.2, v.3, v.4, v.5, v.6, v.7, v.8 ] -> [ (Z(5)^0)*(), (Z(5)^0)*(1,2,3,4,5,6), (Z(5)^0)*(1,3,5)(2,4,6), (Z(5)^0)*(1,4)(2,5)(3,6), (Z(5)^0)*(1,5,3)(2,6,4), (Z(5)^0)*(1,6,5,4,3,2), of ..., of ... ] -gap> P3 := SemidirectProductOfAlgebras( Q13, act3, A1 ); -Q13 |X A1 -gap> Embedding( P3, 1 ); +gap> P2 := SemidirectProductOfAlgebras( Q2, act2, A2 ); +Q2 |X A2 +gap> Embedding( P2, 1 ); [ v.1, v.2 ] -> [ v.1, v.2 ] -gap> Embedding( P3, 2 ); +gap> Embedding( P2, 2 ); [ [ [ 0, 1, 2, 3 ], [ 0, 0, 1, 2 ], [ 0, 0, 0, 1 ], [ 0, 0, 0, 0 ] ], [ [ 0, 0, 1, 4 ], [ 0, 0, 0, 1 ], [ 0, 0, 0, 0 ], [ 0, 0, 0, 0 ] ], [ [ 0, 0, 0, 1 ], [ 0, 0, 0, 0 ], [ 0, 0, 0, 0 ], [ 0, 0, 0, 0 ] ] ] -> [ v.3, v.4, v.5 ] -## Section 2.3.1 +## Section 2.6.1 gap> A2c6 := GroupRing( GF(2), Group( (1,2,3,4,5,6) ) );; gap> R2c3 := GroupRing( GF(2), Group( (7,8,9) ) );; gap> homAR := AllAlgebraHomomorphisms( A2c6, R2c3 );; diff --git a/tst/module.tst b/tst/module.tst index eeb35f1..2ddaddb 100644 --- a/tst/module.tst +++ b/tst/module.tst @@ -1,141 +1,141 @@ ############################################################################ ## -#W module3.tst XModAlg test files Chris Wensley +#W module.tst XModAlg test files Chris Wensley ## -#@local level,m,Am,G,AG,g,mug,MAG,hom,act,bdy,Xm,A3,V3,M3,famM3,v,v2,genM3,u2,u,D3,T3,B3a,B3,M2B3,B2M3,act3,a,X3,C3 +#@local level,m3,A3,G,B3,g3,mg3,MB3,homB3,actB3,bdyB3,XB3,A4,V4,M4,famM4,v4,genM4,u4,D4,T4,B4a,B4,M2B4,B2M4,act4,a4,X4,C4,A3B3,actA3,actAB -gap> START_TEST( "XModAlg package: module3.tst" ); +gap> START_TEST( "XModAlg package: module.tst" ); gap> level := InfoLevel( InfoXModAlg );; gap> SetInfoLevel( InfoXModAlg, 0 ); -## Chapter 2, Section 2.2.3 -gap> m := [ [0,1,0], [0,0,1], [1,0,0,] ];; -gap> Am := Algebra( Rationals, [m] );; -gap> SetName( Am, "Am" );; +## Section 2.2.4 +gap> m3 := [ [0,1,0], [0,0,1], [1,0,0,] ];; +gap> A3 := Algebra( Rationals, [m3] );; +gap> SetName( A3, "A3" );; gap> G := Group( (1,2,3) );; -gap> AG := GroupRing( Rationals, G );; -gap> SetName( AG, "GR(G)" ); -gap> g := GeneratorsOfAlgebra( AG )[2];; -gap> mug := RegularAlgebraMultiplier( AG, AG, g );; -gap> MAG := AlgebraByGenerators( Rationals, [ mug ] );; -gap> hom := AlgebraHomomorphismByImages( Am, MAG, [ m ], [ mug ] );; -gap> act := AlgebraActionByHomomorphism( hom, AG ); +gap> B3 := GroupRing( Rationals, G );; +gap> SetName( B3, "GR(G)" ); +gap> g3 := GeneratorsOfAlgebra( B3 )[2];; +gap> mg3 := RegularAlgebraMultiplier( B3, B3, g3 );; +gap> MB3 := AlgebraByGenerators( Rationals, [ mg3 ] );; +gap> homB3 := AlgebraHomomorphismByImages( A3, MB3, [ m3 ], [ mg3 ] );; +gap> actB3 := AlgebraActionByHomomorphism( homB3, B3 ); [ [ [ 0, 1, 0 ], [ 0, 0, 1 ], [ 1, 0, 0 ] ] ] -> [ [ (1)*(), (1)*(1,2,3), (1)*(1,3,2) ] -> [ (1)*(1,2,3), (1)*(1,3,2), (1)*() ] ] -## Chapter 4, Section 4.1.6 -gap> hom := AlgebraHomomorphismByImages( Am, MAG, [ m ], [ mug ] ); +## Section 4.1.6 +gap> homB3 := AlgebraHomomorphismByImages( A3, MB3, [ m3 ], [ mg3 ] ); [ [ [ 0, 1, 0 ], [ 0, 0, 1 ], [ 1, 0, 0 ] ] ] -> [ [ (1)*(), (1)*(1,2,3), (1)*(1,3,2) ] -> [ (1)*(1,2,3), (1)*(1,3,2), (1)*() ] ] -gap> bdy := AlgebraHomomorphismByImages( AG, Am, [ g ], [ m ] ); +gap> bdyB3 := AlgebraHomomorphismByImages( B3, A3, [ g3 ], [ m3 ] ); [ (1)*(1,2,3) ] -> [ [ [ 0, 1, 0 ], [ 0, 0, 1 ], [ 1, 0, 0 ] ] ] -gap> Xm := XModAlgebraByBoundaryAndAction( bdy, act ); -[ GR(G) -> Am ] -gap> Display( Xm ); +gap> XB3 := XModAlgebraByBoundaryAndAction( bdyB3, actB3 ); +[ GR(G) -> A3 ] +gap> Display( XB3 ); -Crossed module [GR(G) -> Am] :- +Crossed module [GR(G) -> A3] :- : Source algebra GR(G) has generators: [ (1)*(), (1)*(1,2,3) ] -: Range algebra Am has generators: +: Range algebra A3 has generators: [ [ [ 0, 1, 0 ], [ 0, 0, 1 ], [ 1, 0, 0 ] ] ] : Boundary homomorphism maps source generators to: [ [ [ 1, 0, 0 ], [ 0, 1, 0 ], [ 0, 0, 1 ] ], [ [ 0, 1, 0 ], [ 0, 0, 1 ], [ 1, 0, 0 ] ] ] -## Chapter 2, Section 2.2.4 -gap> m := [ [0,1,0], [0,0,1], [1,0,0] ];; -gap> A3 := Algebra( Rationals, [m] );; -gap> SetName( A3, "A3" );; -gap> V3 := Rationals^3;; -gap> M3 := LeftAlgebraModule( A3, \*, V3 );; -gap> SetName( M3, "M3" ); -gap> famM3 := ElementsFamily( FamilyObj( M3 ) );; -gap> v := [3,4,5];; -gap> v2 := ObjByExtRep( famM3, v ); +## Section 2.3 +gap> m3 := [ [0,1,0], [0,0,1], [1,0,0] ];; +gap> A4 := Algebra( Rationals, [m3] );; +gap> SetName( A4, "A4" );; +gap> V4 := Rationals^3;; +gap> M4 := LeftAlgebraModule( A4, \*, V4 );; +gap> SetName( M4, "M4" ); +gap> famM4 := ElementsFamily( FamilyObj( M4 ) );; +gap> v4 := [3,4,5];; +gap> v4 := ObjByExtRep( famM4, v4 ); [ 3, 4, 5 ] -gap> m*v2; +gap> m3*v4; [ 4, 5, 3 ] -gap> genM3 := GeneratorsOfLeftModule( M3 );; -gap> u2 := 6*genM3[1] + 7*genM3[2] + 8*genM3[3]; +gap> genM4 := GeneratorsOfLeftModule( M4 );; +gap> u4 := 6*genM4[1] + 7*genM4[2] + 8*genM4[3]; [ 6, 7, 8 ] -gap> u := ExtRepOfObj( u2 ); +gap> u4 := ExtRepOfObj( u4 ); [ 6, 7, 8 ] -## Chapter 2, Section 2.2.5 -gap> D3 := LeftActingDomain( M3 );; -gap> T3 := EmptySCTable( Dimension(M3), Zero(D3), "symmetric" );; -gap> B3a := AlgebraByStructureConstants( D3, T3 ); +## Section 2.3.1 +gap> D4 := LeftActingDomain( M4 );; +gap> T4 := EmptySCTable( Dimension(M4), Zero(D4), "symmetric" );; +gap> B4a := AlgebraByStructureConstants( D4, T4 ); -gap> GeneratorsOfAlgebra( B3a ); +gap> GeneratorsOfAlgebra( B4a ); [ v.1, v.2, v.3 ] -gap> B3 := ModuleAsAlgebra( M3 ); -A(M3) -gap> GeneratorsOfAlgebra( B3 ); +gap> B4 := ModuleAsAlgebra( M4 ); +A(M4) +gap> GeneratorsOfAlgebra( B4 ); [ [[ 1, 0, 0 ]], [[ 0, 1, 0 ]], [[ 0, 0, 1 ]] ] -## Chapter 2, Section 2.2.6 -gap> IsModuleAsAlgebra( B3 ); +## Section 2.3.2 +gap> IsModuleAsAlgebra( B4 ); true -gap> IsModuleAsAlgebra( A3 ); +gap> IsModuleAsAlgebra( A4 ); false -## Chapter 2, Section 2.2.7 -gap> KnownAttributesOfObject( B3 ); +## Section 2.3.3 +gap> KnownAttributesOfObject( B4 ); [ "Name", "ZeroImmutable", "LeftActingDomain", "Dimension", "GeneratorsOfLeftOperatorAdditiveGroup", "GeneratorsOfLeftOperatorRing", "ModuleToAlgebraIsomorphism", "AlgebraToModuleIsomorphism" ] -gap> M2B3 := ModuleToAlgebraIsomorphism( B3 ); +gap> M2B4 := ModuleToAlgebraIsomorphism( B4 ); [ [ 1, 0, 0 ], [ 0, 1, 0 ], [ 0, 0, 1 ] ] -> [ [[ 1, 0, 0 ]], [[ 0, \ 1, 0 ]], [[ 0, 0, 1 ]] ] -gap> Source( M2B3 ) = M3; +gap> Source( M2B4 ) = M4; false -gap> Source( M2B3 ) = V3; +gap> Source( M2B4 ) = V4; true -gap> B2M3 := AlgebraToModuleIsomorphism( B3 ); +gap> B2M4 := AlgebraToModuleIsomorphism( B4 ); [ [[ 1, 0, 0 ]], [[ 0, 1, 0 ]], [[ 0, 0, 1 ]] ] -> [ [ 1, 0, 0 ], [ 0, 1, 0 ], [ 0, 0, 1 ] ] -gap> Range( B2M3 ) = M3; +gap> Range( B2M4 ) = M4; false -gap> Range( B2M3 ) = V3; +gap> Range( B2M4 ) = V4; true -## Chapter 2, Section 2.2.8 -gap> act3 := AlgebraActionByModule( A3, M3 ); +## Section 2.3.4 +gap> act4 := AlgebraActionByModule( A4, M4 ); [ [ [ 0, 1, 0 ], [ 0, 0, 1 ], [ 1, 0, 0 ] ] ] -> [ [ [[ 1, 0, 0 ]], [[ 0, 1, 0 ]], [[ 0, 0, 1 ]] ] -> [ [[ 0, 0, 1 ]], [[ 1, 0, 0 ]], [[ 0, 1, 0 ]] ] ] -gap> a := 2*m + 3*m^2; +gap> a4 := 2*m3 + 3*m3^2; [ [ 0, 2, 3 ], [ 3, 0, 2 ], [ 2, 3, 0 ] ] -gap> Image( act3, a ); -Basis( A(M3), [ [[ 1, 0, 0 ]], [[ 0, 1, 0 ]], [[ 0, 0, 1 ]] ] ) -> +gap> Image( act4, a4 ); +Basis( A(M4), [ [[ 1, 0, 0 ]], [[ 0, 1, 0 ]], [[ 0, 0, 1 ]] ] ) -> [ (3)*[[ 0, 1, 0 ]]+(2)*[[ 0, 0, 1 ]], (2)*[[ 1, 0, 0 ]]+(3)*[[ 0, 0, 1 ]], (3)*[[ 1, 0, 0 ]]+(2)*[[ 0, 1, 0 ]] ] -gap> Image( act3 ); +gap> Image( act4 ); -## Chapter 4, Section 4.1.7 -gap> X3 := XModAlgebraByModule( A3, M3 ); -[A(M3)->A3] -gap> Display( X3 ); +## Section 4.1.7 +gap> X4 := XModAlgebraByModule( A4, M4 ); +[A(M4)->A4] +gap> Display( X4 ); -Crossed module [A(M3)->A3] :- -: Source algebra A(M3) has generators: +Crossed module [A(M4)->A4] :- +: Source algebra A(M4) has generators: [ [[ 1, 0, 0 ]], [[ 0, 1, 0 ]], [[ 0, 0, 1 ]] ] -: Range algebra A3 has generators: +: Range algebra A4 has generators: [ [ [ 0, 1, 0 ], [ 0, 0, 1 ], [ 1, 0, 0 ] ] ] : Boundary homomorphism maps source generators to: [ [ [ 0, 0, 0 ], [ 0, 0, 0 ], [ 0, 0, 0 ] ], [ [ 0, 0, 0 ], [ 0, 0, 0 ], [ 0, 0, 0 ] ], [ [ 0, 0, 0 ], [ 0, 0, 0 ], [ 0, 0, 0 ] ] ] -## Chapter 5, Section 5.1.1 -gap> C3 := Cat1AlgebraOfXModAlgebra( X3 ); -[A3 |X A(M3) -> A3] -gap> Display( C3 ); -Cat1-algebra [A3 |X A(M3)=>A3] :- +## Section 5.1.1 +gap> C4 := Cat1AlgebraOfXModAlgebra( X4 ); +[A4 |X A(M4) -> A4] +gap> Display( C4 ); +Cat1-algebra [A4 |X A(M4)=>A4] :- : range algebra has generators: [ [ [ 0, 1, 0 ], [ 0, 0, 1 ], [ 1, 0, 0 ] ] ] : tail homomorphism = head homomorphism @@ -151,9 +151,33 @@ Cat1-algebra [A3 |X A(M3)=>A3] :- : kernel has generators: [ v.4, v.5, v.6 ] +## Section 2.4.1 +gap> A3B3 := DirectSumOfAlgebras( A3, B3 );; +gap> SetDirectSumOfAlgebrasInfo( A3B3, +> rec( algebras := [A3,B3], first := [1,Dimension(A3)+1], +> embeddings := [ ], projections := [ ] ) );; + +## Section 2.4.2 +gap> Embedding( A3B3, 1 ); +Basis( A3, [ [ [ 0, 1, 0 ], [ 0, 0, 1 ], [ 1, 0, 0 ] ], + [ [ 0, 0, 1 ], [ 1, 0, 0 ], [ 0, 1, 0 ] ], + [ [ 1, 0, 0 ], [ 0, 1, 0 ], [ 0, 0, 1 ] ] ] ) -> [ v.1, v.2, v.3 ] +gap> Embedding( A3B3, 2 ); +CanonicalBasis( GR(G) ) -> [ v.4, v.5, v.6 ] + +## Section 2.4.3 +gap> actA3 := AlgebraActionByMultipliers( A3, A3, A3 );; +gap> actAB := AlgebraActionOnDirectSum( actA3, actB3 ); +[ [ [ 0, 1, 0 ], [ 0, 0, 1 ], [ 1, 0, 0 ] ], + [ [ 0, 0, 1 ], [ 1, 0, 0 ], [ 0, 1, 0 ] ], + [ [ 1, 0, 0 ], [ 0, 1, 0 ], [ 0, 0, 1 ] ] ] -> +[ [ v.1, v.2, v.3, v.4, v.5, v.6 ] -> [ v.2, v.3, v.1, v.5, v.6, v.4 ], + [ v.1, v.2, v.3, v.4, v.5, v.6 ] -> [ v.3, v.1, v.2, v.6, v.4, v.5 ], + [ v.1, v.2, v.3, v.4, v.5, v.6 ] -> [ v.1, v.2, v.3, v.4, v.5, v.6 ] ] + gap> SetInfoLevel( InfoXModAlg, level );; -gap> STOP_TEST( "module3.tst", 10000 ); +gap> STOP_TEST( "module.tst", 10000 ); ############################################################################ ## -#E module3.tst . . . . . . . . . . . . . . . . . . . . . . . . . ends here +#E module.tst . . . . . . . . . . . . . . . . . . . . . . . . . . ends here \ No newline at end of file diff --git a/tst/xmod.tst b/tst/xmod.tst index 05a1836..215e023 100644 --- a/tst/xmod.tst +++ b/tst/xmod.tst @@ -7,13 +7,13 @@ gap> saved_infolevel_xmodalg := InfoLevel( InfoXModAlg );; gap> SetInfoLevel( InfoXModAlg, 0 ); ## make this test independent of algebra.tst -gap> m := [ [0,1,2,3], [0,0,1,2], [0,0,0,1], [0,0,0,0] ];; -gap> A1 := Algebra( Rationals, [m] );; -gap> SetName( A1, "A1" ); -gap> A3 := Subalgebra( A1, [m^3] );; -gap> nat3 := NaturalHomomorphismByIdeal( A1, A3 );; -gap> Q13 := Image( nat3 );; -gap> SetName( Q13, "Q13" ); +gap> m2 := [ [0,1,2,3], [0,0,1,2], [0,0,0,1], [0,0,0,0] ];; +gap> A2 := Algebra( Rationals, [m2] );; +gap> SetName( A2, "A2" ); +gap> S2 := Subalgebra( A2, [m2^3] );; +gap> nat2 := NaturalHomomorphismByIdeal( A2, S2 );; +gap> Q2 := Image( nat2 );; +gap> SetName( Q2, "Q2" ); ## Chapter 4, Section 4.1.2 gap> F := GF(5);; @@ -72,13 +72,13 @@ IdentityMapping( ) gap> ############################ gap> ## Section 4.1.5 -gap> X3 := XModAlgebraBySurjection( nat3 );; -gap> Display( X3 ); +gap> X2 := XModAlgebraBySurjection( nat2 );; +gap> Display( X2 ); -Crossed module [A1->Q13] :- -: Source algebra A1 has generators: +Crossed module [A2->Q2] :- +: Source algebra A2 has generators: [ [ [ 0, 1, 2, 3 ], [ 0, 0, 1, 2 ], [ 0, 0, 0, 1 ], [ 0, 0, 0, 0 ] ] ] -: Range algebra Q13 has generators: +: Range algebra Q2 has generators: [ v.1, v.2 ] : Boundary homomorphism maps source generators to: [ v.1 ]