From ae8acb06c260831f26704a66a6b1b429f37ff4f7 Mon Sep 17 00:00:00 2001 From: Chris Wensley Date: Sat, 2 Dec 2017 09:43:33 +0000 Subject: [PATCH] adjust tests to work after LoadAllPackages(); --- CHANGES.md | 1 + PackageInfo.g | 6 +++--- lib/alg2map.gi | 10 ++++++---- tst/cat1.tst | 36 +++++++++++++++++++++++------------- tst/xmod.tst | 10 ++++++---- 5 files changed, 39 insertions(+), 24 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 13171b9..5644492 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,6 +1,7 @@ # CHANGES to the 'XModAlg' package ## 1.13 -> 1.14 + * (02/12/17) adjust test files to work correctly after LoadAllPackages(); * (30/11/17) now requires XMod 2.64 * (01/11/17) now requires Laguna 3.7.0 * (05/10/17) moved testall.g to testing.g and added new testall.g diff --git a/PackageInfo.g b/PackageInfo.g index 58a3c0b..bd94fb8 100644 --- a/PackageInfo.g +++ b/PackageInfo.g @@ -9,15 +9,15 @@ PackageName := "XModAlg", Subtitle := "Crossed Modules and Cat1-Algebras", Version := "1.14", -Date := "30/11/2017", +Date := "02/12/2017", ## duplicate these values for inclusion in the manual: ## <#GAPDoc Label="PKGVERSIONDATA"> ## ## ## -## -## +## +## ## ## <#/GAPDoc> diff --git a/lib/alg2map.gi b/lib/alg2map.gi index 4e825b8..86f7dc9 100644 --- a/lib/alg2map.gi +++ b/lib/alg2map.gi @@ -146,7 +146,7 @@ InstallMethod( Display, "display a morphism of pre-crossed modules", true, [ IsPreXModAlgebraMorphism ], 0, function( mor ) - local morsrc, morrng, gensrc, genrng, P, Q, name, ok; + local morsrc, morrng, gensrc, genrng, imsrc, imrng, P, Q, name, ok; name := Name( mor ); P := Source( mor ); Q := Range( mor ); @@ -168,11 +168,13 @@ InstallMethod( Display, "display a morphism of pre-crossed modules", true, Print( GeneratorsOfAlgebra( Source( Q ) ), "\n" ); Print( " ", GeneratorsOfAlgebra( Range( Q ) ), "\n" ); fi; + imsrc := List( gensrc, s -> Image( morsrc, s ) ); Print( ": Source Homomorphism maps source generators to:\n" ); - Print( " ", List( gensrc, s -> Image( morsrc, s ) ), "\n" ); + Print( " ", imsrc, "\n" ); + imrng := List( genrng, r -> Image( morrng, r ) ); Print( ": Range Homomorphism maps range generators to:\n" ); - Print( " ", List( genrng, r -> Image( morrng, r ) ), "\n" ); - Print( "\n" ); + Print( " ", imrng, "\n" ); + Print( "\n" ); end ); ############################################################################# diff --git a/tst/cat1.tst b/tst/cat1.tst index 5522b03..51b10bf 100644 --- a/tst/cat1.tst +++ b/tst/cat1.tst @@ -33,19 +33,29 @@ gap> A := GroupRing( GF(2), Group( (1,2,3)(4,5) ) ); gap> R := GroupRing( GF(2), Group( (1,2,3) ) ); -gap> f := AllHomsOfAlgebras( A, R ); -[ [ (Z(2)^0)*(1,3,2)(4,5) ] -> [ of ... ], [ (Z(2)^0)*(1,3,2)(4,5) ] -> [ (Z(2)^0)*() ], - [ (Z(2)^0)*(1,3,2)(4,5) ] -> [ (Z(2)^0)*()+(Z(2)^0)*(1,2,3) ], - [ (Z(2)^0)*(1,3,2)(4,5) ] -> [ (Z(2)^0)*()+(Z(2)^0)*(1,2,3)+(Z(2)^0)*(1,3,2) ], - [ (Z(2)^0)*(1,3,2)(4,5) ] -> [ (Z(2)^0)*()+(Z(2)^0)*(1,3,2) ], [ (Z(2)^0)*(1,3,2)(4,5) ] -> [ (Z(2)^0)*(1,2,3) ], - [ (Z(2)^0)*(1,3,2)(4,5) ] -> [ (Z(2)^0)*(1,2,3)+(Z(2)^0)*(1,3,2) ], [ (Z(2)^0)*(1,3,2)(4,5) ] -> [ (Z(2)^0)*(1,3,2) - ] ] -gap> g := AllHomsOfAlgebras( R, A ); -[ [ (Z(2)^0)*(1,2,3) ] -> [ of ... ], [ (Z(2)^0)*(1,2,3) ] -> [ (Z(2)^0)*() ], - [ (Z(2)^0)*(1,2,3) ] -> [ (Z(2)^0)*()+(Z(2)^0)*(1,2,3) ], - [ (Z(2)^0)*(1,2,3) ] -> [ (Z(2)^0)*()+(Z(2)^0)*(1,2,3)+(Z(2)^0)*(1,3,2) ], - [ (Z(2)^0)*(1,2,3) ] -> [ (Z(2)^0)*()+(Z(2)^0)*(1,3,2) ], [ (Z(2)^0)*(1,2,3) ] -> [ (Z(2)^0)*(1,2,3) ], - [ (Z(2)^0)*(1,2,3) ] -> [ (Z(2)^0)*(1,2,3)+(Z(2)^0)*(1,3,2) ], [ (Z(2)^0)*(1,2,3) ] -> [ (Z(2)^0)*(1,3,2) ] ] +gap> f := AllHomsOfAlgebras( A, R );; +gap> mgif := List( f, h -> MappingGeneratorsImages(h) );; +gap> Print( mgif, "\n" ); +[ [ [ (Z(2)^0)*(1,3,2)(4,5) ], [ of ... ] ], + [ [ (Z(2)^0)*(1,3,2)(4,5) ], [ (Z(2)^0)*() ] ], + [ [ (Z(2)^0)*(1,3,2)(4,5) ], [ (Z(2)^0)*()+(Z(2)^0)*(1,2,3) ] ], + [ [ (Z(2)^0)*(1,3,2)(4,5) ], + [ (Z(2)^0)*()+(Z(2)^0)*(1,2,3)+(Z(2)^0)*(1,3,2) ] ], + [ [ (Z(2)^0)*(1,3,2)(4,5) ], [ (Z(2)^0)*()+(Z(2)^0)*(1,3,2) ] ], + [ [ (Z(2)^0)*(1,3,2)(4,5) ], [ (Z(2)^0)*(1,2,3) ] ], + [ [ (Z(2)^0)*(1,3,2)(4,5) ], [ (Z(2)^0)*(1,2,3)+(Z(2)^0)*(1,3,2) ] ], + [ [ (Z(2)^0)*(1,3,2)(4,5) ], [ (Z(2)^0)*(1,3,2) ] ] ] +gap> g := AllHomsOfAlgebras( R, A );; +gap> mgig := List( g, h -> MappingGeneratorsImages(h) );; +gap> Print( mgig, "\n" ); +[ [ [ (Z(2)^0)*(1,2,3) ], [ of ... ] ], + [ [ (Z(2)^0)*(1,2,3) ], [ (Z(2)^0)*() ] ], + [ [ (Z(2)^0)*(1,2,3) ], [ (Z(2)^0)*()+(Z(2)^0)*(1,2,3) ] ], + [ [ (Z(2)^0)*(1,2,3) ], [ (Z(2)^0)*()+(Z(2)^0)*(1,2,3)+(Z(2)^0)*(1,3,2) ] ], + [ [ (Z(2)^0)*(1,2,3) ], [ (Z(2)^0)*()+(Z(2)^0)*(1,3,2) ] ], + [ [ (Z(2)^0)*(1,2,3) ], [ (Z(2)^0)*(1,2,3) ] ], + [ [ (Z(2)^0)*(1,2,3) ], [ (Z(2)^0)*(1,2,3)+(Z(2)^0)*(1,3,2) ] ], + [ [ (Z(2)^0)*(1,2,3) ], [ (Z(2)^0)*(1,3,2) ] ] ] gap> C4 := PreCat1ByTailHeadEmbedding( f[6], f[6], g[8] ); [AlgebraWithOne( GF(2), [ (Z(2)^0)*(1,2,3)(4,5) ] ) -> AlgebraWithOne( GF(2), [ (Z(2)^0)*(1,2,3) ] )] gap> IsCat1Algebra( C4 ); diff --git a/tst/xmod.tst b/tst/xmod.tst index 471d39a..25ad91d 100644 --- a/tst/xmod.tst +++ b/tst/xmod.tst @@ -163,11 +163,13 @@ gap> Size( X3 ); gap> IsSubXModAlgebra( X1, X3 ); true -## Chapter 2, Section 2.2.3 +## Chapter 2, Section 2.2.4 -gap> theta := SourceHom( mor ); -[ (Z(2)^0)* of ...+(Z(2)^0)*f2, (Z(2)^0)*f1+(Z(2)^0)*f2, (Z(2)^0)*f2+(Z(2)^0)*f1*f2 ] -> -[ of ..., of ..., of ... ] +gap> theta := SourceHom( mor );; +gap> Print( MappingGeneratorsImages( theta ), "\n" ); +[ [ (Z(2)^0)* of ...+(Z(2)^0)*f2, (Z(2)^0)*f1+(Z(2)^0)*f2, + (Z(2)^0)*f2+(Z(2)^0)*f1*f2 ], + [ of ..., of ..., of ... ] ] gap> phi := RangeHom( mor ); [ (Z(2)^0)*f1 ] -> [ (Z(2)^0)* of ... ] gap> IsInjective( mor );