From c4856e443de617348ffbac5451fbcdc544061197 Mon Sep 17 00:00:00 2001 From: cdwensley Date: Thu, 10 Sep 2026 17:33:34 +0100 Subject: [PATCH 1/4] extracting test files from the manual --- doc/algebra.xml | 9 +++++---- doc/intro.xml | 23 ++++++----------------- makedoc.g | 3 +++ 3 files changed, 14 insertions(+), 21 deletions(-) diff --git a/doc/algebra.xml b/doc/algebra.xml index dbacf73..74a5b8e 100644 --- a/doc/algebra.xml +++ b/doc/algebra.xml @@ -2,7 +2,7 @@ - + @@ -110,7 +110,7 @@ form an algebra with product \mu_b \circ \mu_{b'} = \mu_{bb'}. u1 := BA1[3]; (Z(5)^0)*(1,3,5)(2,4,6) -gap> S1 := Subalgebra( A3, [ u1 ] );; +gap> S1 := Subalgebra( A1, [ u1 ] );; gap> SetName( S1, "S1" ); gap> MS1 := MultiplierAlgebraOfIdealBySubalgebra( A1, I1, S1 ); @@ -136,8 +136,7 @@ gap> MA1 := MultiplierAlgebra( A1 ); gap> BMA1 := BasisVectors( Basis( MA1 ) );; gap> BMA1[3]; - -> > + A1> ]]> @@ -277,7 +276,9 @@ gap> theta1 := NaturalHomomorphismByIdeal( A1, I1 ); 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> AlgebraActionBySurjection( theta1 ); +!!! kernel of hom is not in the annihilator of A +!!! fail gap> ## an example which does not fail: gap> m2 := [ [0,1,2,3], [0,0,1,2], [0,0,0,1], [0,0,0,0] ];; diff --git a/doc/intro.xml b/doc/intro.xml index 4eab2d9..836c54e 100644 --- a/doc/intro.xml +++ b/doc/intro.xml @@ -56,7 +56,7 @@ We have included here functions for all homomorphisms of algebras.

The package is loaded with the command LoadPackage( "xmodalg" ); +gap> LoadPackage( "xmodalg" );; ]]>

@@ -71,22 +71,11 @@ The package also has a GitHub repository at: Once the package is loaded, the manual doc/manual.pdf can be found in the documentation folder. The html versions, with or without MathJax, -may be rebuilt as follows: +may be rebuilt by running the command + ReadPackage("xmodalg","makedoc.g"); .

- ReadPackage( "xmodalg", "makedoc.g" ); -]]> -

- -It is possible to check that the package has been installed correctly -by running the test files (this terminates the ⪆ session): -

- TestPackage( "xmodalg" ); -Architecture: . . . . . -testing: . . . . . -. . . -#I No errors detected while testing -]]> +Once the package is loaded, it is possible to check the installation +has proceeded correctly by running the test suite of the package with +the command ReadPackage("xmodalg","tst/testall.g"); . diff --git a/makedoc.g b/makedoc.g index 96e2ab9..e99c7a3 100644 --- a/makedoc.g +++ b/makedoc.g @@ -7,6 +7,9 @@ LoadPackage( "GAPDoc" ); LoadPackage( "AutoDoc" ); AutoDoc( rec( + extract_examples := rec( + subdir := "tst", + ), gapdoc := rec( LaTeXOptions := rec( EarlyExtraPreamble := """ \usepackage[all]{xy} From 6dd1d1c0d32c7052d29f11e2016a5da5387bac7f Mon Sep 17 00:00:00 2001 From: cdwensley Date: Thu, 10 Sep 2026 17:39:33 +0100 Subject: [PATCH 2/4] adding the new testfiles xmodalgo*.tst --- tst/manual.g | 8 ++ tst/xmodalg01.tst | 17 +++ tst/xmodalg02.tst | 324 ++++++++++++++++++++++++++++++++++++++++++++++ tst/xmodalg03.tst | 260 +++++++++++++++++++++++++++++++++++++ tst/xmodalg04.tst | 224 ++++++++++++++++++++++++++++++++ tst/xmodalg05.tst | 90 +++++++++++++ 6 files changed, 923 insertions(+) create mode 100755 tst/manual.g create mode 100644 tst/xmodalg01.tst create mode 100644 tst/xmodalg02.tst create mode 100644 tst/xmodalg03.tst create mode 100644 tst/xmodalg04.tst create mode 100644 tst/xmodalg05.tst diff --git a/tst/manual.g b/tst/manual.g new file mode 100755 index 0000000..4b0514b --- /dev/null +++ b/tst/manual.g @@ -0,0 +1,8 @@ +## manual.g +LoadPackage("xmodalg"); +Print( "running xmodalg02.tst\n" ); +Test( "tst/xmodalg02.tst", rec(compareFunction := "uptowhitespace") ); +Print( "running xmodalg03.tst\n" ); +Test( "tst/xmodalg03.tst", rec(compareFunction := "uptowhitespace") ); +Print( "running xmodalg04.tst\n" ); +Test( "tst/xmodalg04.tst", rec(compareFunction := "uptowhitespace") ); diff --git a/tst/xmodalg01.tst b/tst/xmodalg01.tst new file mode 100644 index 0000000..93aacf7 --- /dev/null +++ b/tst/xmodalg01.tst @@ -0,0 +1,17 @@ +# XModAlg, chapter 1 +# +# DO NOT EDIT THIS FILE - EDIT EXAMPLES IN THE SOURCE INSTEAD! +# +# This file has been generated by AutoDoc. It contains examples extracted from +# the package documentation. Each example is preceded by a comment which gives +# the name of a GAPDoc XML file and a line range from which the example were +# taken. Note that the XML file in turn may have been generated by AutoDoc +# from some other input. +# +gap> START_TEST("xmodalg01.tst"); + +# doc/intro.xml:58-60 +gap> LoadPackage( "xmodalg" );; + +# +gap> STOP_TEST("xmodalg01.tst", 1); diff --git a/tst/xmodalg02.tst b/tst/xmodalg02.tst new file mode 100644 index 0000000..5b06f61 --- /dev/null +++ b/tst/xmodalg02.tst @@ -0,0 +1,324 @@ +# XModAlg, chapter 2 +# +# DO NOT EDIT THIS FILE - EDIT EXAMPLES IN THE SOURCE INSTEAD! +# +# This file has been generated by AutoDoc. It contains examples extracted from +# the package documentation. Each example is preceded by a comment which gives +# the name of a GAPDoc XML file and a line range from which the example were +# taken. Note that the XML file in turn may have been generated by AutoDoc +# from some other input. +# +gap> START_TEST("xmodalg02.tst"); + +# doc/algebra.xml:59-74 +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> I1 := Ideal( A1, [v] );; +gap> SetName( I1, "I1" ); +gap> v1 := BA1[2]; +(Z(5)^0)*(1,2,3,4,5,6) +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) ] + +# doc/algebra.xml:85-97 +gap> IsAlgebraMultiplier( m1 ); +true +gap> id1 := One( A1 );; +gap> L1 := List( BA1, v -> id1 );; +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( h1 ); +false + +# doc/algebra.xml:110-121 +gap> u1 := BA1[3]; +(Z(5)^0)*(1,3,5)(2,4,6) +gap> S1 := Subalgebra( A1, [ u1 ] );; +gap> SetName( S1, "S1" ); +gap> MS1 := MultiplierAlgebraOfIdealBySubalgebra( A1, I1, S1 ); + +gap> SetName( MS1, "MS1" ); +gap> BMS1 := BasisVectors( Basis( MS1 ) );; +gap> BMS1[1]; + I1> + +# doc/algebra.xml:134-140 +gap> MA1 := MultiplierAlgebra( A1 ); + +gap> BMA1 := BasisVectors( Basis( MA1 ) );; +gap> BMA1[3]; + A1> + +# doc/algebra.xml:153-162 +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)*() ] + +# doc/algebra.xml:234-244 +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> 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) + +# doc/algebra.xml:272-312 +gap> theta1 := NaturalHomomorphismByIdeal( A1, I1 ); + -> > +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> AlgebraActionBySurjection( theta1 ); +!!! +kernel of hom is not in the annihilator of A +!!! +fail +gap> ## an example which does not fail: +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> m2^3; +[ [ 0, 0, 0, 1 ], [ 0, 0, 0, 0 ], [ 0, 0, 0, 0 ], [ 0, 0, 0, 0 ] ] +gap> A2 := Algebra( Rationals, [m2] );; +gap> SetName( A2, "A2" ); +gap> S2 := Subalgebra( A2, [m2^3] );; +gap> SetName( S2, "S2" ); +gap> nat2 := NaturalHomomorphismByIdeal( A2, S2 ); + > +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( Q2 ) ) +gap> act2 := AlgebraActionBySurjection( nat2 );; +gap> I2 := Image( act2 );; +gap> BI2 := BasisVectors( Basis( I2 ) );; +gap> b1 := BI2[1];; b2 := BI2[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,m2)=m2^3, b2=b1^2 ]; +[true, true ] + +# doc/../lib/module.gd:31-48 + +gap> m3 := [ [0,1,0], [0,0,1], [1,0,0,] ];; +gap> A3 := Algebra( Rationals, [m3] );; +gap> SetName( A3, "A3" );; +gap> c3 := Group( (1,2,3) );; +gap> Rc3 := GroupRing( Rationals, c3 );; +gap> SetName( Rc3, "GR(c3)" ); +gap> g3 := GeneratorsOfAlgebra( Rc3 )[2];; +gap> mg3 := RegularAlgebraMultiplier( Rc3, Rc3, g3 );; +gap> Amg3 := AlgebraByGenerators( Rationals, [ mg3 ] );; +gap> homg3 := AlgebraHomomorphismByImages( A3, Amg3, [ m3 ], [ mg3 ] );; +gap> actg3 := AlgebraActionByHomomorphism( homg3, Rc3 ); +[ [ [ 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)*() + ] ] + + +# doc/../lib/module.gd:73-90 + +gap> V3 := Rationals^3;; +gap> M3 := LeftAlgebraModule( A3, \*, V3 );; +gap> SetName( M3, "M3" ); +gap> famM3 := ElementsFamily( FamilyObj( M3 ) );; +gap> v3 := [3,4,5];; +gap> v3 := ObjByExtRep( famM3, v3 ); +[ 3, 4, 5 ] +gap> m3*v3; +[ 4, 5, 3 ] +gap> genM3 := GeneratorsOfLeftModule( M3 );; +gap> u4 := 6*genM3[1] + 7*genM3[2] + 8*genM3[3]; +[ 6, 7, 8 ] +gap> u4 := ExtRepOfObj( u4 ); +[ 6, 7, 8 ] + + +# doc/../lib/module.gd:121-134 + +gap> D3 := LeftActingDomain( M3 );; +gap> T3 := EmptySCTable( Dimension(M3), Zero(D3), "symmetric" );; +gap> B3a := AlgebraByStructureConstants( D3, T3 ); + +gap> GeneratorsOfAlgebra( B3a ); +[ v.1, v.2, v.3 ] +gap> B3 := ModuleAsAlgebra( M3 ); +A(M3) +gap> GeneratorsOfAlgebra( B3 ); +[ [[ 1, 0, 0 ]], [[ 0, 1, 0 ]], [[ 0, 0, 1 ]] ] + + +# doc/../lib/module.gd:152-159 + +gap> IsModuleAsAlgebra( B3 ); +true +gap> IsModuleAsAlgebra( A3 ); +false + + +# doc/../lib/module.gd:183-204 + +gap> KnownAttributesOfObject( B3 ); +[ "Name", "ZeroImmutable", "LeftActingDomain", "Dimension", + "GeneratorsOfLeftOperatorAdditiveGroup", "GeneratorsOfLeftOperatorRing", + "ModuleToAlgebraIsomorphism", "AlgebraToModuleIsomorphism" ] +gap> M2B3 := ModuleToAlgebraIsomorphism( B3 ); +[ [ 1, 0, 0 ], [ 0, 1, 0 ], [ 0, 0, 1 ] ] -> [ [[ 1, 0, 0 ]], [[ 0, 1, 0 ]], + [[ 0, 0, 1 ]] ] +gap> Source( M2B3 ) = M3; +false +gap> Source( M2B3 ) = V3; +true +gap> B2M3 := AlgebraToModuleIsomorphism( B3 ); +[ [[ 1, 0, 0 ]], [[ 0, 1, 0 ]], [[ 0, 0, 1 ]] ] -> +[ [ 1, 0, 0 ], [ 0, 1, 0 ], [ 0, 0, 1 ] ] +gap> Range( B2M3 ) = M3; +false +gap> Range( B2M3 ) = V3; +true + + +# doc/../lib/module.gd:224-239 + +gap> act3 := AlgebraActionByModule( A3, M3 ); +[ [ [ 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> a3 := 2*m3 + 3*m3^2; +[ [ 0, 2, 3 ], [ 3, 0, 2 ], [ 2, 3, 0 ] ] +gap> Image( act3, a3 ); +Basis( A(M3), [ [[ 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 ); + + + +# doc/../lib/algebra.gd:79-102 + +gap> A3Rc3 := DirectSumOfAlgebrasWithInfo( A3, Rc3 );; +gap> SetName( A3Rc3, Concatenation( Name(A3), "(+)", Name(Rc3) ) ); +gap> DirectSumOfAlgebrasInfo( A3Rc3 ); +rec( algebras := [ A3, GR(c3) ], + embeddings := + [ + 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 ], + CanonicalBasis( GR(c3) ) -> [ v.4, v.5, v.6 ] ], first := [ 1, 4 ], + projections := + [ CanonicalBasis( A3(+)GR(c3) ) -> + [ [ [ 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 ] ], + [ [ 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 ] ] ], + CanonicalBasis( A3(+)GR(c3) ) -> [ of ..., of ..., + of ..., (1)*(), (1)*(1,2,3), (1)*(1,3,2) ] ] ) + + +# doc/../lib/algebra.gd:126-136 + +gap> Embedding( A3Rc3, 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( A3Rc3, 2 ); +CanonicalBasis( A3(+)GR(c3) ) -> [ of ..., of ..., + of ..., (1)*(), (1)*(1,2,3), (1)*(1,3,2) ] + + +# doc/algebra.xml:383-408 +gap> P1 := SemidirectProductOfAlgebras( A1, act1, I1 ); + +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( 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( 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> P2 := SemidirectProductOfAlgebras( Q2, act2, A2 ); +Q2 |X A2 +gap> Embedding( P2, 1 ); +[ v.1, v.2 ] -> [ v.1, v.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 ] + +# doc/algebra.xml:441-483 +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 );; +gap> List( homAR, h -> MappingGeneratorsImages(h) ); +[ [ [ (Z(2)^0)*(1,6,5,4,3,2) ], [ of ... ] ], + [ [ (Z(2)^0)*(1,6,5,4,3,2) ], [ (Z(2)^0)*() ] ], + [ [ (Z(2)^0)*(1,6,5,4,3,2) ], [ (Z(2)^0)*()+(Z(2)^0)*(7,8,9) ] ], + [ [ (Z(2)^0)*(1,6,5,4,3,2) ], + [ (Z(2)^0)*()+(Z(2)^0)*(7,8,9)+(Z(2)^0)*(7,9,8) ] ], + [ [ (Z(2)^0)*(1,6,5,4,3,2) ], [ (Z(2)^0)*()+(Z(2)^0)*(7,9,8) ] ], + [ [ (Z(2)^0)*(1,6,5,4,3,2) ], [ (Z(2)^0)*(7,8,9) ] ], + [ [ (Z(2)^0)*(1,6,5,4,3,2) ], [ (Z(2)^0)*(7,8,9)+(Z(2)^0)*(7,9,8) ] ], + [ [ (Z(2)^0)*(1,6,5,4,3,2) ], [ (Z(2)^0)*(7,9,8) ] ] ] +gap> homRA := AllAlgebraHomomorphisms( R2c3, A2c6 );; +gap> List( homRA, h -> MappingGeneratorsImages(h) ); +[ [ [ (Z(2)^0)*(7,8,9) ], [ of ... ] ], + [ [ (Z(2)^0)*(7,8,9) ], [ (Z(2)^0)*() ] ], + [ [ (Z(2)^0)*(7,8,9) ], [ (Z(2)^0)*()+(Z(2)^0)*(1,3,5)(2,4,6) ] ], + [ [ (Z(2)^0)*(7,8,9) ], + [ (Z(2)^0)*()+(Z(2)^0)*(1,3,5)(2,4,6)+(Z(2)^0)*(1,5,3)(2,6,4) ] ], + [ [ (Z(2)^0)*(7,8,9) ], [ (Z(2)^0)*()+(Z(2)^0)*(1,5,3)(2,6,4) ] ], + [ [ (Z(2)^0)*(7,8,9) ], [ (Z(2)^0)*(1,3,5)(2,4,6) ] ], + [ [ (Z(2)^0)*(7,8,9) ], [ (Z(2)^0)*(1,3,5)(2,4,6)+(Z(2)^0)*(1,5,3)(2,6,4) ] + ], [ [ (Z(2)^0)*(7,8,9) ], [ (Z(2)^0)*(1,5,3)(2,6,4) ] ] ] +gap> bijAA := AllBijectiveAlgebraHomomorphisms( A2c6, A2c6 );; +gap> List( bijAA, h -> MappingGeneratorsImages(h) ); +[ [ [ (Z(2)^0)*(1,6,5,4,3,2) ], + [ (Z(2)^0)*()+(Z(2)^0)*(1,3,5)(2,4,6)+(Z(2)^0)*(1,4)(2,5)(3,6) ] ], + [ [ (Z(2)^0)*(1,6,5,4,3,2) ], + [ (Z(2)^0)*()+(Z(2)^0)*(1,4)(2,5)(3,6)+(Z(2)^0)*(1,5,3)(2,6,4) ] ], + [ [ (Z(2)^0)*(1,6,5,4,3,2) ], [ (Z(2)^0)*(1,2,3,4,5,6) ] ], + [ [ (Z(2)^0)*(1,6,5,4,3,2) ], + [ (Z(2)^0)*(1,2,3,4,5,6)+(Z(2)^0)*(1,3,5)(2,4,6)+(Z(2)^0)*(1,5,3) + (2,6,4) ] ], + [ [ (Z(2)^0)*(1,6,5,4,3,2) ], + [ (Z(2)^0)*(1,3,5)(2,4,6)+(Z(2)^0)*(1,5,3)(2,6,4)+(Z(2)^0)* + (1,6,5,4,3,2) ] ], + [ [ (Z(2)^0)*(1,6,5,4,3,2) ], [ (Z(2)^0)*(1,6,5,4,3,2) ] ] ] +gap> ideAA := AllIdempotentAlgebraHomomorphisms( A2c6, A2c6 );; +gap> Length( ideAA ); +14 + +# +gap> STOP_TEST("xmodalg02.tst", 1); diff --git a/tst/xmodalg03.tst b/tst/xmodalg03.tst new file mode 100644 index 0000000..97c973c --- /dev/null +++ b/tst/xmodalg03.tst @@ -0,0 +1,260 @@ +# XModAlg, chapter 3 +# +# DO NOT EDIT THIS FILE - EDIT EXAMPLES IN THE SOURCE INSTEAD! +# +# This file has been generated by AutoDoc. It contains examples extracted from +# the package documentation. Each example is preceded by a comment which gives +# the name of a GAPDoc XML file and a line range from which the example were +# taken. Note that the XML file in turn may have been generated by AutoDoc +# from some other input. +# +gap> START_TEST("xmodalg03.tst"); + +# doc/cat1.xml:124-159 +gap> t4 := homAR[8]; +[ (Z(2)^0)*(1,6,5,4,3,2) ] -> [ (Z(2)^0)*(7,9,8) ] +gap> e4 := homRA[8]; +[ (Z(2)^0)*(7,8,9) ] -> [ (Z(2)^0)*(1,5,3)(2,6,4) ] +gap> C4 := PreCat1AlgebraByTailHeadEmbedding( t4, t4, e4 ); +[AlgebraWithOne( GF(2), [ (Z(2)^0)*(1,2,3,4,5,6) + ] ) -> AlgebraWithOne( GF(2), [ (Z(2)^0)*(7,8,9) ] )] +gap> IsCat1Algebra( C4 ); +true +gap> Size2d( C4 ); +[ 64, 8 ] +gap> Dimension( C4 ); +[ 6, 3 ] +gap> Display( C4 ); + +Cat1-algebra [..=>..] :- +: source algebra has generators: + [ (Z(2)^0)*(), (Z(2)^0)*(1,2,3,4,5,6) ] +: range algebra has generators: + [ (Z(2)^0)*(), (Z(2)^0)*(7,8,9) ] +: tail homomorphism maps source generators to: + [ (Z(2)^0)*(), (Z(2)^0)*(7,8,9) ] +: head homomorphism maps source generators to: + [ (Z(2)^0)*(), (Z(2)^0)*(7,8,9) ] +: range embedding maps range generators to: + [ (Z(2)^0)*(), (Z(2)^0)*(1,5,3)(2,6,4) ] +: kernel has generators: + [ (Z(2)^0)*()+(Z(2)^0)*(1,4)(2,5)(3,6), (Z(2)^0)*(1,2,3,4,5,6)+(Z(2)^0)* + (1,5,3)(2,6,4), (Z(2)^0)*(1,3,5)(2,4,6)+(Z(2)^0)*(1,6,5,4,3,2) ] +: boundary homomorphism maps generators of kernel to: + [ of ..., of ..., of ... ] +: kernel embedding maps generators of kernel to: + [ (Z(2)^0)*()+(Z(2)^0)*(1,4)(2,5)(3,6), (Z(2)^0)*(1,2,3,4,5,6)+(Z(2)^0)* + (1,5,3)(2,6,4), (Z(2)^0)*(1,3,5)(2,4,6)+(Z(2)^0)*(1,6,5,4,3,2) ] + +# doc/cat1.xml:201-236 +gap> C := Cat1AlgebraSelect( 11 ); +|--------------------------------------------------------| +| 11 is invalid value for the Galois Field (GFnum) | +| Available values for GFnum in the data : | +|--------------------------------------------------------| + [ 2, 3, 4, 5, 7 ] +Usage: Cat1Algebra( GFnum, gpsize, gpnum, num ); +fail +gap> C := Cat1AlgebraSelect( 4, 12 ); +|--------------------------------------------------------| +| 12 is invalid value for size of group (gpsize) | +| Available values for gpsize with GF(4) in the data: | +|--------------------------------------------------------| +Usage: Cat1Algebra( GFnum, gpsize, gpnum, num ); +[ 1, 2, 3, 4, 5, 6, 7, 8, 9 ] +gap> C := Cat1AlgebraSelect( 2, 6, 3 ); +|--------------------------------------------------------| +| 3 is invalid value for groups of order 6 | +| Available values for gpnum for groups of size 6 : | +|--------------------------------------------------------| +Usage: Cat1Algebra( GFnum, gpsize, gpnum, num ); +[ 1, 2 ] +gap> C := Cat1AlgebraSelect( 2, 6, 2 ); +There are 4 cat1-structures for the group algebra GF(2)_c6. + Range Alg Tail Head +|--------------------------------------------------------| +| GF(2)_c6 identity map identity map | +| ----- [ 2, 10 ] [ 2, 10 ] | +| ----- [ 2, 14 ] [ 2, 14 ] | +| ----- [ 2, 50 ] [ 2, 50 ] | +|--------------------------------------------------------| +Usage: Cat1Algebra( GFnum, gpsize, gpnum, num ); +Algebra has generators [ (Z(2)^0)*(), (Z(2)^0)*(1,2,3)(4,5) ] +4 + +# doc/cat1.xml:244-277 +gap> C0 := Cat1AlgebraSelect( 4, 6, 2, 2 ); +[GF(2^2)_c6 -> Algebra( GF(2^2), +[ (Z(2)^0)*(), (Z(2)^0)*()+(Z(2)^0)*(1,3,5)(2,4,6)+(Z(2)^0)*(1,4)(2,5)(3,6)+( + Z(2)^0)*(1,5,3)(2,6,4)+(Z(2)^0)*(1,6,5,4,3,2) ] )] +gap> Size2d( C0 ); +[ 4096, 1024 ] +gap> Dimension( C0 ); +[ 6, 5 ] +gap> Display( C0 ); +Cat1-algebra [GF(2^2)_c6=>..] :- +: source algebra has generators: + [ (Z(2)^0)*(), (Z(2)^0)*(1,2,3,4,5,6) ] +: range algebra has generators: + [ (Z(2)^0)*(), (Z(2)^0)*()+(Z(2)^0)*(1,3,5)(2,4,6)+(Z(2)^0)*(1,4)(2,5) + (3,6)+(Z(2)^0)*(1,5,3)(2,6,4)+(Z(2)^0)*(1,6,5,4,3,2) ] +: tail homomorphism maps source generators to: + [ (Z(2)^0)*(), (Z(2)^0)*()+(Z(2)^0)*(1,3,5)(2,4,6)+(Z(2)^0)*(1,4)(2,5) + (3,6)+(Z(2)^0)*(1,5,3)(2,6,4)+(Z(2)^0)*(1,6,5,4,3,2) ] +: head homomorphism maps source generators to: + [ (Z(2)^0)*(), (Z(2)^0)*()+(Z(2)^0)*(1,3,5)(2,4,6)+(Z(2)^0)*(1,4)(2,5) + (3,6)+(Z(2)^0)*(1,5,3)(2,6,4)+(Z(2)^0)*(1,6,5,4,3,2) ] +: range embedding maps range generators to: + [ (Z(2)^0)*(), (Z(2)^0)*()+(Z(2)^0)*(1,3,5)(2,4,6)+(Z(2)^0)*(1,4)(2,5) + (3,6)+(Z(2)^0)*(1,5,3)(2,6,4)+(Z(2)^0)*(1,6,5,4,3,2) ] +: kernel has generators: + [ (Z(2)^0)*()+(Z(2)^0)*(1,2,3,4,5,6)+(Z(2)^0)*(1,3,5)(2,4,6)+(Z(2)^0)*(1,4) + (2,5)(3,6)+(Z(2)^0)*(1,5,3)(2,6,4)+(Z(2)^0)*(1,6,5,4,3,2) ] +: boundary homomorphism maps generators of kernel to: + [ of ... ] +: kernel embedding maps generators of kernel to: + [ (Z(2)^0)*()+(Z(2)^0)*(1,2,3,4,5,6)+(Z(2)^0)*(1,3,5)(2,4,6)+(Z(2)^0)*(1,4) + (2,5)(3,6)+(Z(2)^0)*(1,5,3)(2,6,4)+(Z(2)^0)*(1,6,5,4,3,2) ] + +# doc/cat1.xml:317-356 +gap> C6 := Cat1AlgebraSelect( 2, 6, 2, 4 );; +gap> A6 := Source( C6 ); +GF(2)_c6 +gap> B6 := Range( C6 ); + +gap> eA6 := Elements( A6 );; +gap> eB6 := Elements( B6 );; +gap> SA6 := Subalgebra( A6, [ eA6[1], eA6[2], eA6[3] ] ); + +gap> [ Size(A6), Size(SA6) ]; +[ 64, 4 ] +gap> SB6 := Subalgebra( B6, [ eB6[1], eB6[2] ] ); + +gap> [ Size(B6), Size(SB6) ]; +[ 8, 2 ] +gap> SC6 := SubCat1Algebra( C6, SA6, SB6 ); +[Algebra( GF(2), [ of ..., (Z(2)^0)*(), (Z(2)^0)*()+(Z(2)^0)*(4,5) + ] ) -> Algebra( GF(2), [ of ..., (Z(2)^0)*() ] )] +gap> Display( SC6 ); +Cat1-algebra [..=>..] :- +: source algebra has generators: + [ of ..., (Z(2)^0)*(), (Z(2)^0)*()+(Z(2)^0)*(4,5) ] +: range algebra has generators: + [ of ..., (Z(2)^0)*() ] +: tail homomorphism maps source generators to: + [ of ..., (Z(2)^0)*(), of ... ] +: head homomorphism maps source generators to: + [ of ..., (Z(2)^0)*(), of ... ] +: range embedding maps range generators to: + [ of ..., (Z(2)^0)*() ] +: kernel has generators: + [ of ..., (Z(2)^0)*()+(Z(2)^0)*(4,5) ] +: boundary homomorphism maps generators of kernel to: + [ of ..., of ... ] +: kernel embedding maps generators of kernel to: + [ of ..., (Z(2)^0)*()+(Z(2)^0)*(4,5) ] +gap> IsSubCat1Algebra( C6, SC6 ); +true + +# doc/cat1.xml:424-507 +gap> C1 := Cat1AlgebraSelect( 2, 1, 1, 1 ); +[GF(2)_triv -> GF(2)_triv] +gap> Display( C1 ); +Cat1-algebra [GF(2)_triv=>GF(2)_triv] :- +: source algebra has generators: + [ (Z(2)^0)*(), (Z(2)^0)*() ] +: range algebra has generators: + [ (Z(2)^0)*(), (Z(2)^0)*() ] +: tail homomorphism maps source generators to: + [ (Z(2)^0)*(), (Z(2)^0)*() ] +: head homomorphism maps source generators to: + [ (Z(2)^0)*(), (Z(2)^0)*() ] +: range embedding maps range generators to: + [ (Z(2)^0)*(), (Z(2)^0)*() ] +: the kernel is trivial. +gap> C2 := Cat1AlgebraSelect( 2, 2, 1, 2 ); +[GF(2)_c2 -> GF(2)_triv] +gap> Display( C2 ); +Cat1-algebra [GF(2)_c2=>GF(2)_triv] :- +: source algebra has generators: + [ (Z(2)^0)*(), (Z(2)^0)*(1,2) ] +: range algebra has generators: + [ (Z(2)^0)*(), (Z(2)^0)*() ] +: tail homomorphism maps source generators to: + [ (Z(2)^0)*(), (Z(2)^0)*() ] +: head homomorphism maps source generators to: + [ (Z(2)^0)*(), (Z(2)^0)*() ] +: range embedding maps range generators to: + [ (Z(2)^0)*(), (Z(2)^0)*() ] +: kernel has generators: + [ (Z(2)^0)*()+(Z(2)^0)*(1,2) ] +: boundary homomorphism maps generators of kernel to: + [ of ... ] +: kernel embedding maps generators of kernel to: + [ (Z(2)^0)*()+(Z(2)^0)*(1,2) ] +gap> C1 = C2; +false +gap> SC1 := Source( C1 );; +gap> SC2 := Source( C2 ); +GF(2)_c2 +gap> RC1 := Range( C1 );; +gap> RC2 := Range( C2 );; +gap> gSC1 := GeneratorsOfAlgebra( SC1 ); +[ (Z(2)^0)*(), (Z(2)^0)*() ] +gap> gSC2 := GeneratorsOfAlgebra( SC2 ); +[ (Z(2)^0)*(), (Z(2)^0)*(1,2) ] +gap> gRC1 := GeneratorsOfAlgebra( RC1 ); +[ (Z(2)^0)*(), (Z(2)^0)*() ] +gap> gRC2 := GeneratorsOfAlgebra( RC2 ); +[ (Z(2)^0)*(), (Z(2)^0)*() ] +gap> imS := [ gSC2[1], gSC2[1] ]; +[ (Z(2)^0)*(), (Z(2)^0)*() ] +gap> homS := AlgebraHomomorphismByImages( SC1, SC2, gSC1, imS ); +[ (Z(2)^0)*(), (Z(2)^0)*() ] -> [ (Z(2)^0)*(), (Z(2)^0)*() ] +gap> imR := [ gRC2[1], gRC2[1] ]; +[ (Z(2)^0)*(), (Z(2)^0)*() ] +gap> homR := AlgebraHomomorphismByImages( RC1, RC2, gRC1, imR ); +[ (Z(2)^0)*(), (Z(2)^0)*() ] -> [ (Z(2)^0)*(), (Z(2)^0)*() ] +gap> m12 := Cat1AlgebraMorphism( C1, C2, homS, homR ); +[[GF(2)_triv=>GF(2)_triv] => [GF(2)_c2=>GF(2)_triv]] +gap> Display( m12 ); + +Morphism of cat1-algebras :- +: Source = [GF(2)_triv=>GF(2)_triv] with generating sets: + [ (Z(2)^0)*(), (Z(2)^0)*() ] + [ (Z(2)^0)*(), (Z(2)^0)*() ] +: Range = [GF(2)_c2=>GF(2)_triv] with generating sets: + [ (Z(2)^0)*(), (Z(2)^0)*(1,2) ] + [ (Z(2)^0)*(), (Z(2)^0)*() ] +: Source Homomorphism maps source generators to: + [ (Z(2)^0)*(), (Z(2)^0)*() ] +: Range Homomorphism maps range generators to: + [ (Z(2)^0)*(), (Z(2)^0)*() ] + +## gap> Image2dAlgMapping( m12 ); +## [GF(3)_c2^3=>GF(3)_c2^3] +gap> IsSurjective( m12 ); +false +gap> IsInjective( m12 ); +true +gap> IsBijective( m12 ); +false + +# doc/cat1.xml:519-534 +gap> im12 := ImagesSource2DimensionalMapping( m12 );; +gap> Display( im12 ); +Cat1-algebra [..=>..] :- +: source algebra has generators: + [ (Z(2)^0)*(), (Z(2)^0)*() ] +: range algebra has generators: + [ (Z(2)^0)*() ] +: tail homomorphism maps source generators to: + [ (Z(2)^0)*(), (Z(2)^0)*() ] +: head homomorphism maps source generators to: + [ (Z(2)^0)*(), (Z(2)^0)*() ] +: range embedding maps range generators to: + [ (Z(2)^0)*() ] +: the kernel is trivial. + +# +gap> STOP_TEST("xmodalg03.tst", 1); diff --git a/tst/xmodalg04.tst b/tst/xmodalg04.tst new file mode 100644 index 0000000..98c60d2 --- /dev/null +++ b/tst/xmodalg04.tst @@ -0,0 +1,224 @@ +# XModAlg, chapter 4 +# +# DO NOT EDIT THIS FILE - EDIT EXAMPLES IN THE SOURCE INSTEAD! +# +# This file has been generated by AutoDoc. It contains examples extracted from +# the package documentation. Each example is preceded by a comment which gives +# the name of a GAPDoc XML file and a line range from which the example were +# taken. Note that the XML file in turn may have been generated by AutoDoc +# from some other input. +# +gap> START_TEST("xmodalg04.tst"); + +# doc/xmod.xml:79-97 +gap> F5 := GF(5);; +gap> id5 := One( F5 );; +gap> two := Z(5);; +gap> z5 := Zero( F5 );; +gap> n0 := [ [id5,z5,z5], [z5,id5,z5], [z5,z5,id5] ];; +gap> n1 := [ [z5,id5,two^3], [z5,z5,id5], [z5,z5,z5] ];; +gap> n2 := [ [z5,z5,id5], [z5,z5,z5], [z5,z5,z5] ];; +gap> An := Algebra( F5, [ n0, n1 ] );; +gap> SetName( An, "An" ); +gap> Bn := Subalgebra( An, [ n1 ] );; +gap> SetName( Bn, "Bn" ); +gap> IsIdeal( An, Bn ); +true +gap> actn := AlgebraActionByMultipliers( An, Bn, An );; +gap> Xn := XModAlgebraByIdeal( An, Bn ); +[ Bn -> An ] +gap> SetName( Xn, "Xn" ); + +# doc/xmod.xml:111-136 +gap> Ak4 := GroupRing( GF(5), DihedralGroup(4) ); + +gap> Size( Ak4 ); +625 +gap> SetName( Ak4, "GF5[k4]" ); +gap> IAk4 := AugmentationIdeal( Ak4 ); + +gap> Size( IAk4 ); +125 +gap> SetName( IAk4, "I(GF5[k4])" ); +gap> XIAk4 := XModAlgebraByIdeal( Ak4, IAk4 ); +[ I(GF5[k4]) -> GF5[k4] ] +gap> Display( XIAk4 ); +Crossed module [I(GF5[k4])->GF5[k4]] :- +: Source algebra I(GF5[k4]) has generators: + [ (Z(5)^2)* of ...+(Z(5)^0)*f1, (Z(5)^2)* of ...+(Z(5)^ + 0)*f2 ] +: Range algebra GF5[k4] has generators: + [ (Z(5)^0)* of ..., (Z(5)^0)*f1, (Z(5)^0)*f2 ] +: Boundary homomorphism maps source generators to: + [ (Z(5)^2)* of ...+(Z(5)^0)*f1, (Z(5)^2)* of ...+(Z(5)^ + 0)*f2 ] +gap> Size2d( XIAk4 ); +[ 125, 625 ] + +# doc/xmod.xml:196-207 +gap> RepresentationsOfObject( XIAk4 ); +[ "IsComponentObjectRep", "IsAttributeStoringRep", "IsPreXModAlgebraObj" ] +gap> KnownPropertiesOfObject( XIAk4 ); +[ "CanEasilyCompareElements", "CanEasilySortElements", "IsDuplicateFree", + "IsLeftActedOnByDivisionRing", "IsAdditivelyCommutative", "IsLDistributive", + "IsRDistributive", "IsPreXModDomain", "Is2dAlgebraObject", + "IsPreXModAlgebra", "IsXModAlgebra" ] +gap> KnownAttributesOfObject( XIAk4 ); +[ "Name", "LeftActingDomain", "Range", "Source", "Boundary", "Size2d", + "XModAlgebraAction" ] + +# doc/xmod.xml:220-225 +gap> XAn := XModAlgebraByMultiplierAlgebra( An ); +[ An -> ] +gap> XModAlgebraAction( XAn ); +IdentityMapping( ) + +# doc/xmod.xml:244-254 +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 Q2 has generators: + [ v.1, v.2 ] +: Boundary homomorphism maps source generators to: + [ v.1 ] + +# doc/../lib/alg2obj.gd:60-76 + +gap> bdy3 := AlgebraHomomorphismByImages( Rc3, A3, [ g3 ], [ m3 ] ); +[ (1)*(1,2,3) ] -> [ [ [ 0, 1, 0 ], [ 0, 0, 1 ], [ 1, 0, 0 ] ] ] +gap> X3 := XModAlgebraByBoundaryAndAction( bdy3, actg3 ); +[ GR(c3) -> A3 ] +gap> Display( X3 ); +Crossed module [GR(c3) -> A3] :- +: Source algebra GR(c3) has generators: + [ (1)*(), (1)*(1,2,3) ] +: 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 ] ] ] + + +# doc/../lib/module.gd:267-284 + +gap> Y3 := XModAlgebraByModule( A3, M3 ); +[ A(M3) -> A3 ] +gap> Image( XModAlgebraAction( Y3 ), m3 ) = Image( act3, m3 ); +true +gap> Display( Y3 ); +Crossed module [A(M3) -> A3] :- +: Source algebra A(M3) has generators: [ [[ 1, 0, 0 ]], [[ 0, 1, 0 ]], + [[ 0, 0, 1 ]] ] +: Range algebra A3 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 ] ] ] + + +# doc/xmod.xml:281-301 +gap> e4 := Elements( IAk4 )[4]; +(Z(5)^0)* of ...+(Z(5)^0)*f1+(Z(5)^2)*f2+(Z(5)^2)*f1*f2 +gap> Je4 := Ideal( IAk4, [e4] );; +gap> SetName( Je4, "" ); +gap> Ke4 := Subalgebra( Ak4, [e4] );; +gap> [ Size( Je4 ), Size( Ke4 ) ]; +[ 5, 5 ] +gap> Se4 := SubXModAlgebra( XIAk4, Je4, Ke4 ); +[ -> ] +gap> IsSubXModAlgebra( XIAk4, Se4 ); +true +gap> Display( Se4 ); +Crossed module [ -> ..] :- +: Source algebra has generators: +[ (Z(5)^0)* of ...+(Z(5)^0)*f1+(Z(5)^2)*f2+(Z(5)^2)*f1*f2 ] +: Range algebra has generators: +[ (Z(5)^0)* of ...+(Z(5)^0)*f1+(Z(5)^2)*f2+(Z(5)^2)*f1*f2 ] +: Boundary homomorphism maps source generators to: +[ (Z(5)^0)* of ...+(Z(5)^0)*f1+(Z(5)^2)*f2+(Z(5)^2)*f1*f2 ] + +# doc/xmod.xml:377-420 +gap> c4 := CyclicGroup( 4 );; +gap> Ac4 := GroupRing( GF(2), c4 ); + +gap> SetName( Ac4, "GF2[c4]" ); +gap> IAc4 := AugmentationIdeal( Ac4 ); + +gap> SetName( IAc4, "I(GF2[c4])" ); +gap> XIAc4 := XModAlgebra( Ac4, IAc4 ); +[ I(GF2[c4]) -> GF2[c4] ] +gap> Bk4 := GroupRing( GF(2), SmallGroup( 4, 2 ) ); + +gap> SetName( Bk4, "GF2[k4]" ); +gap> IBk4 := AugmentationIdeal( Bk4 ); + +gap> SetName( IBk4, "I(GF2[k4])" ); +gap> XIBk4 := XModAlgebra( Bk4, IBk4 ); +[ I(GF2[k4]) -> GF2[k4] ] +gap> IAc4 = IBk4; +false +gap> homIAIB := AllAlgebraHomomorphisms( IAc4, IBk4 );; +gap> theta := homIAIB[3];; +gap> homAB := AllAlgebraHomomorphisms( Ac4, Bk4 );; +gap> phi := homAB[7];; +gap> mor := XModAlgebraMorphism( XIAc4, XIBk4, theta, phi ); +[[I(GF2[c4])->GF2[c4]] => [I(GF2[k4])->GF2[k4]]] +gap> Display( mor ); + +Morphism of crossed modules :- +: Source = [I(GF2[c4])->GF2[c4]] +: Range = [I(GF2[k4])->GF2[k4]] +: Source Homomorphism maps source generators to: + [ of ..., (Z(2)^0)* of ...+(Z(2)^0)*f1+(Z(2)^0)*f2+(Z(2)^ + 0)*f1*f2, (Z(2)^0)* of ...+(Z(2)^0)*f1+(Z(2)^0)*f2+(Z(2)^ + 0)*f1*f2 ] +: Range Homomorphism maps range generators to: + [ (Z(2)^0)* of ..., (Z(2)^0)*f1+(Z(2)^0)*f2+(Z(2)^0)*f1*f2, + (Z(2)^0)* of ... ] + +gap> IsTotal( mor ); +true +gap> IsSingleValued( mor ); +true + +# doc/xmod.xml:441-450 +gap> Xmor := Kernel( mor ); +[ -> ] +gap> IsXModAlgebra( Xmor ); +true +gap> Size2d( Xmor ); +[ 4, 4 ] +gap> IsSubXModAlgebra( XIAc4, Xmor ); +true + +# doc/xmod.xml:501-526 +gap> ic4 := One( Ac4 );; +gap> e1 := ic4*c4.1 + ic4*c4.2; +(Z(2)^0)*f1+(Z(2)^0)*f2 +gap> ImageElm( theta, e1 ); +(Z(2)^0)* of ...+(Z(2)^0)*f1+(Z(2)^0)*f2+(Z(2)^0)*f1*f2 +gap> e2 := ic4*c4.1; +(Z(2)^0)*f1 +gap> ImageElm( phi, e2 ); +(Z(2)^0)*f1+(Z(2)^0)*f2+(Z(2)^0)*f1*f2 +gap> IsInjective( mor ); +false +gap> IsSurjective( mor ); +false +gap> immor := ImagesSource2DimensionalMapping( mor );; +gap> Display( immor ); + +Crossed module [..->..] :- +: Source algebra has generators: + [ (Z(2)^0)* of ...+(Z(2)^0)*f1+(Z(2)^0)*f2+(Z(2)^0)*f1*f2 ] +: Range algebra has generators: + [ (Z(2)^0)*f1+(Z(2)^0)*f2+(Z(2)^0)*f1*f2, (Z(2)^0)* of ... ] +: Boundary homomorphism maps source generators to: + [ (Z(2)^0)* of ...+(Z(2)^0)*f1+(Z(2)^0)*f2+(Z(2)^0)*f1*f2 ] + + +# +gap> STOP_TEST("xmodalg04.tst", 1); diff --git a/tst/xmodalg05.tst b/tst/xmodalg05.tst new file mode 100644 index 0000000..fde85f0 --- /dev/null +++ b/tst/xmodalg05.tst @@ -0,0 +1,90 @@ +# XModAlg, chapter 5 +# +# DO NOT EDIT THIS FILE - EDIT EXAMPLES IN THE SOURCE INSTEAD! +# +# This file has been generated by AutoDoc. It contains examples extracted from +# the package documentation. Each example is preceded by a comment which gives +# the name of a GAPDoc XML file and a line range from which the example were +# taken. Note that the XML file in turn may have been generated by AutoDoc +# from some other input. +# +gap> START_TEST("xmodalg05.tst"); + +# doc/convert.xml:72-109 +gap> Cn := Cat1AlgebraOfXModAlgebra( Xn ); +[An |X Bn -> An] +gap> Display( Cn ); +Cat1-algebra [An |X Bn => An] :- +: range algebra has generators: +[ + [ [ Z(5)^0, 0*Z(5), 0*Z(5) ], [ 0*Z(5), Z(5)^0, 0*Z(5) ], + [ 0*Z(5), 0*Z(5), Z(5)^0 ] ], + [ [ 0*Z(5), Z(5)^0, Z(5)^3 ], [ 0*Z(5), 0*Z(5), Z(5)^0 ], + [ 0*Z(5), 0*Z(5), 0*Z(5) ] ] ] +: tail homomorphism maps source generators to: +[ + [ [ Z(5)^0, 0*Z(5), 0*Z(5) ], [ 0*Z(5), Z(5)^0, 0*Z(5) ], + [ 0*Z(5), 0*Z(5), Z(5)^0 ] ], + [ [ 0*Z(5), Z(5)^0, Z(5)^3 ], [ 0*Z(5), 0*Z(5), Z(5)^0 ], + [ 0*Z(5), 0*Z(5), 0*Z(5) ] ], + [ [ 0*Z(5), 0*Z(5), Z(5)^0 ], [ 0*Z(5), 0*Z(5), 0*Z(5) ], + [ 0*Z(5), 0*Z(5), 0*Z(5) ] ], + [ [ 0*Z(5), 0*Z(5), 0*Z(5) ], [ 0*Z(5), 0*Z(5), 0*Z(5) ], + [ 0*Z(5), 0*Z(5), 0*Z(5) ] ], + [ [ 0*Z(5), 0*Z(5), 0*Z(5) ], [ 0*Z(5), 0*Z(5), 0*Z(5) ], + [ 0*Z(5), 0*Z(5), 0*Z(5) ] ] ] +: head homomorphism maps source generators to: +[ + [ [ Z(5)^0, 0*Z(5), 0*Z(5) ], [ 0*Z(5), Z(5)^0, 0*Z(5) ], + [ 0*Z(5), 0*Z(5), Z(5)^0 ] ], + [ [ 0*Z(5), Z(5)^0, Z(5)^3 ], [ 0*Z(5), 0*Z(5), Z(5)^0 ], + [ 0*Z(5), 0*Z(5), 0*Z(5) ] ], + [ [ 0*Z(5), 0*Z(5), Z(5)^0 ], [ 0*Z(5), 0*Z(5), 0*Z(5) ], + [ 0*Z(5), 0*Z(5), 0*Z(5) ] ], + [ [ 0*Z(5), Z(5)^0, Z(5)^3 ], [ 0*Z(5), 0*Z(5), Z(5)^0 ], + [ 0*Z(5), 0*Z(5), 0*Z(5) ] ], + [ [ 0*Z(5), 0*Z(5), Z(5)^0 ], [ 0*Z(5), 0*Z(5), 0*Z(5) ], + [ 0*Z(5), 0*Z(5), 0*Z(5) ] ] ] +: range embedding maps range generators to: [ v.1, v.2 ] +: kernel has generators: [ v.4, v.5 ] + +# doc/../lib/alg2obj.gd:160-184 + +gap> C3 := Cat1AlgebraOfXModAlgebra( X3 ); +[A3 |X GR(c3) -> A3] +gap> Display( C3 ); +Cat1-algebra [A3 |X GR(c3) => A3] :- +: range algebra has generators:[ [ [ 0, 1, 0 ], [ 0, 0, 1 ], [ 1, 0, 0 ] ] ] +: tail homomorphism maps source generators to: +[ [ [ 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 ] ], + [ [ 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 ] ] ] +: head homomorphism maps source generators to: +[ [ [ 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 ] ], + [ [ 1, 0, 0 ], [ 0, 1, 0 ], [ 0, 0, 1 ] ], + [ [ 0, 1, 0 ], [ 0, 0, 1 ], [ 1, 0, 0 ] ], + [ [ 0, 0, 1 ], [ 1, 0, 0 ], [ 0, 1, 0 ] ] ] +: range embedding maps range generators to: [ v.1 ] +: kernel has generators: [ v.4, v.5, v.6 ] + + +# doc/convert.xml:126-138 +gap> X6 := XModAlgebraOfCat1Algebra( C6 ); +[ -> ] +gap> Display( X6 ); +Crossed module [..->..] :- +: Source algebra has generators: + [ (Z(2)^0)*()+(Z(2)^0)*(4,5), (Z(2)^0)*(1,2,3)+(Z(2)^0)*(1,2,3)(4,5), + (Z(2)^0)*(1,3,2)+(Z(2)^0)*(1,3,2)(4,5) ] +: Range algebra has generators: + [ (Z(2)^0)*(), (Z(2)^0)*(1,2,3) ] +: Boundary homomorphism maps source generators to: + [ of ..., of ..., of ... ] + +# +gap> STOP_TEST("xmodalg05.tst", 1); From 966cf98a557bfa788460541e6c663c8fda1e7a12 Mon Sep 17 00:00:00 2001 From: cdwensley Date: Thu, 10 Sep 2026 19:48:55 +0100 Subject: [PATCH 3/4] remembering to do Set( lists ) --- doc/xmod.xml | 16 ++++++++-------- tst/xmodalg04.tst | 14 +++++++------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/doc/xmod.xml b/doc/xmod.xml index 39d58dd..5bf8c44 100644 --- a/doc/xmod.xml +++ b/doc/xmod.xml @@ -2,7 +2,7 @@ - + @@ -196,13 +196,13 @@ We also show usage of the attributes listed above. RepresentationsOfObject( XIAk4 ); [ "IsComponentObjectRep", "IsAttributeStoringRep", "IsPreXModAlgebraObj" ] -gap> KnownPropertiesOfObject( XIAk4 ); -[ "CanEasilyCompareElements", "CanEasilySortElements", "IsDuplicateFree", - "IsLeftActedOnByDivisionRing", "IsAdditivelyCommutative", "IsLDistributive", - "IsRDistributive", "IsPreXModDomain", "Is2dAlgebraObject", - "IsPreXModAlgebra", "IsXModAlgebra" ] -gap> KnownAttributesOfObject( XIAk4 ); -[ "Name", "LeftActingDomain", "Range", "Source", "Boundary", "Size2d", +gap> Set( KnownPropertiesOfObject( XIAk4 ) ); +[ "CanEasilyCompareElements", "CanEasilySortElements", "Is2dAlgebraObject", + "IsAdditivelyCommutative", "IsDuplicateFree", "IsLDistributive", + "IsLeftActedOnByDivisionRing", "IsPreXModAlgebra", "IsPreXModDomain", + "IsRDistributive", "IsXModAlgebra" ] +gap> Set( KnownAttributesOfObject( XIAk4 ) ); +[ "Boundary", "LeftActingDomain", "Name", "Range", "Size2d", "Source", "XModAlgebraAction" ] ]]> diff --git a/tst/xmodalg04.tst b/tst/xmodalg04.tst index 98c60d2..35e0425 100644 --- a/tst/xmodalg04.tst +++ b/tst/xmodalg04.tst @@ -58,13 +58,13 @@ gap> Size2d( XIAk4 ); # doc/xmod.xml:196-207 gap> RepresentationsOfObject( XIAk4 ); [ "IsComponentObjectRep", "IsAttributeStoringRep", "IsPreXModAlgebraObj" ] -gap> KnownPropertiesOfObject( XIAk4 ); -[ "CanEasilyCompareElements", "CanEasilySortElements", "IsDuplicateFree", - "IsLeftActedOnByDivisionRing", "IsAdditivelyCommutative", "IsLDistributive", - "IsRDistributive", "IsPreXModDomain", "Is2dAlgebraObject", - "IsPreXModAlgebra", "IsXModAlgebra" ] -gap> KnownAttributesOfObject( XIAk4 ); -[ "Name", "LeftActingDomain", "Range", "Source", "Boundary", "Size2d", +gap> Set( KnownPropertiesOfObject( XIAk4 ) ); +[ "CanEasilyCompareElements", "CanEasilySortElements", "Is2dAlgebraObject", + "IsAdditivelyCommutative", "IsDuplicateFree", "IsLDistributive", + "IsLeftActedOnByDivisionRing", "IsPreXModAlgebra", "IsPreXModDomain", + "IsRDistributive", "IsXModAlgebra" ] +gap> Set( KnownAttributesOfObject( XIAk4 ) ); +[ "Boundary", "LeftActingDomain", "Name", "Range", "Size2d", "Source", "XModAlgebraAction" ] # doc/xmod.xml:220-225 From 372ec0f613468bd547e13dcc1e6cdcb08f5ed216 Mon Sep 17 00:00:00 2001 From: cdwensley Date: Thu, 10 Sep 2026 20:05:25 +0100 Subject: [PATCH 4/4] remembering to do Set( lists ) --- lib/module.gd | 10 +++++----- tst/xmodalg02.tst | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/module.gd b/lib/module.gd index b4b9f97..95fc261 100644 --- a/lib/module.gd +++ b/lib/module.gd @@ -2,7 +2,7 @@ ## #W module.gd The XMODALG package Chris Wensley #W -#Y Copyright (C) 2014-2025, Zekeriya Arvasi & Alper Odabas, +#Y Copyright (C) 2014-2026, Zekeriya Arvasi & Alper Odabas, ## ############################ algebra actions ############################# @@ -182,10 +182,10 @@ DeclareProperty( "IsModuleAsAlgebra", IsAlgebra ); ## ## ## KnownAttributesOfObject( B3 ); -## [ "Name", "ZeroImmutable", "LeftActingDomain", "Dimension", -## "GeneratorsOfLeftOperatorAdditiveGroup", "GeneratorsOfLeftOperatorRing", -## "ModuleToAlgebraIsomorphism", "AlgebraToModuleIsomorphism" ] +## gap> Set( KnownAttributesOfObject( B3 ) ); +## [ "AlgebraToModuleIsomorphism", "Dimension", +## "GeneratorsOfLeftOperatorAdditiveGroup", "GeneratorsOfLeftOperatorRing", +## "LeftActingDomain", "ModuleToAlgebraIsomorphism", "Name", "ZeroImmutable" ] ## gap> M2B3 := ModuleToAlgebraIsomorphism( B3 ); ## [ [ 1, 0, 0 ], [ 0, 1, 0 ], [ 0, 0, 1 ] ] -> [ [[ 1, 0, 0 ]], [[ 0, 1, 0 ]], ## [[ 0, 0, 1 ]] ] diff --git a/tst/xmodalg02.tst b/tst/xmodalg02.tst index 5b06f61..6e46785 100644 --- a/tst/xmodalg02.tst +++ b/tst/xmodalg02.tst @@ -180,10 +180,10 @@ false # doc/../lib/module.gd:183-204 -gap> KnownAttributesOfObject( B3 ); -[ "Name", "ZeroImmutable", "LeftActingDomain", "Dimension", - "GeneratorsOfLeftOperatorAdditiveGroup", "GeneratorsOfLeftOperatorRing", - "ModuleToAlgebraIsomorphism", "AlgebraToModuleIsomorphism" ] +gap> Set( KnownAttributesOfObject( B3 ) ); +[ "AlgebraToModuleIsomorphism", "Dimension", + "GeneratorsOfLeftOperatorAdditiveGroup", "GeneratorsOfLeftOperatorRing", + "LeftActingDomain", "ModuleToAlgebraIsomorphism", "Name", "ZeroImmutable" ] gap> M2B3 := ModuleToAlgebraIsomorphism( B3 ); [ [ 1, 0, 0 ], [ 0, 1, 0 ], [ 0, 0, 1 ] ] -> [ [[ 1, 0, 0 ]], [[ 0, 1, 0 ]], [[ 0, 0, 1 ]] ]