From 10bc44b9a6f57ee20adacec661c62b4c78f6ce71 Mon Sep 17 00:00:00 2001 From: cdwensley Date: Fri, 31 Jan 2025 18:41:10 +0000 Subject: [PATCH 1/3] release of version 1.28 --- CHANGES.md | 5 + PackageInfo.g | 4 +- doc/algebra.xml | 8 +- doc/bib.xml | 9 ++ doc/cat1.xml | 2 +- doc/convert.xml | 2 +- doc/intro.xml | 6 +- doc/xmod.xml | 4 +- examples/convert.g | 2 + examples/module.g | 53 ++------ examples/readall.g | 13 +- examples/xmod.g | 5 - lib/alg2map.gi | 190 +++++++++++++++------------- lib/alg2obj.gd | 104 +++++++++++++--- lib/alg2obj.gi | 50 ++++---- lib/algebra.gd | 85 ++++++++++++- lib/algebra.gi | 142 ++++++++++++++++----- lib/module.gd | 305 +-------------------------------------------- lib/module.gi | 278 +---------------------------------------- lib/vspchom.gi | 1 - tst/module.tst | 120 +++--------------- tst/xmod.tst | 7 +- 22 files changed, 483 insertions(+), 912 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 434cbad..72e141b 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,10 @@ # CHANGES to the 'XModAlg' package +## 1.27 -> 1.28 (31/01/25) + * (31/01/25) added Nizar Shammu's thesis to the list of references + removed all operations involving direct sums of crossed modules + of algebras because the theoretical basis needs checking + ## 1.26 -> 1.27 (26/10/24) * (21/10/24) removed references to "Type2" and "XModAlgebraConst" tests now use local variables and are mirrored in /examples diff --git a/PackageInfo.g b/PackageInfo.g index ccc6a84..b24a3e0 100644 --- a/PackageInfo.g +++ b/PackageInfo.g @@ -8,8 +8,8 @@ SetPackageInfo( rec( PackageName := "XModAlg", Subtitle := "Crossed Modules and Cat1-Algebras", -Version := "1.27dev", -Date := "03/01/2025", # dd/mm/yyyy format +Version := "1.28", +Date := "31/01/2025", # dd/mm/yyyy format License := "GPL-2.0-or-later", Persons := [ diff --git a/doc/algebra.xml b/doc/algebra.xml index 42fb5f1..33bf8dc 100644 --- a/doc/algebra.xml +++ b/doc/algebra.xml @@ -2,7 +2,7 @@ - + @@ -353,12 +353,6 @@ gap> [ Image(b2,m2)=m2^3, b2=b1^2 ]; <#Include Label="EmbeddingForDirectSumOfAlgebras"> -<#Include Label="DirectSumOfAlgebraHomomorphisms"> - -<#Include Label="AlgebraActionOnDirectSum"> - -<#Include Label="DirectSumOfAlgebraActions"> -
diff --git a/doc/bib.xml b/doc/bib.xml index 0bd48c0..57bc16b 100644 --- a/doc/bib.xml +++ b/doc/bib.xml @@ -185,6 +185,15 @@ Osmangazi University, Eskisehir + + + N. M.Shammu + + Algebraic and categorical structure of categories of crossed modules of algebras + 1992 + University of Wales, Bangor (U.K.) + +
T.Porter diff --git a/doc/cat1.xml b/doc/cat1.xml index 3db2970..92b213c 100644 --- a/doc/cat1.xml +++ b/doc/cat1.xml @@ -2,7 +2,7 @@ - + diff --git a/doc/convert.xml b/doc/convert.xml index 0617744..2a42410 100644 --- a/doc/convert.xml +++ b/doc/convert.xml @@ -2,7 +2,7 @@ - + diff --git a/doc/intro.xml b/doc/intro.xml index 0fea628..2b6df3a 100644 --- a/doc/intro.xml +++ b/doc/intro.xml @@ -18,12 +18,14 @@ In 1950 S. MacLane and J.H.C. Whitehead, suggested that crossed modules modeled homotopy 2-types. Later crossed modules have been considered as -2-dimensional groups, , . +2-dimensional groups, , +. The commutative algebra version of this construction has been adapted by T. Porter, , . This algebraic version is called combinatorial algebra theory, which contains potentially important new ideas -(see , , ). +(see , , , +).

A share package XMod, , , was prepared by diff --git a/doc/xmod.xml b/doc/xmod.xml index a773baf..8b05081 100644 --- a/doc/xmod.xml +++ b/doc/xmod.xml @@ -2,7 +2,7 @@ - + @@ -262,8 +262,6 @@ Crossed module [A2->Q2] :- <#Include Label="XModAlgebraByModule"> -<#Include Label="DirectSumOfXModAlgebras"> - vecPrng[j]*b); - maps[j] := LeftModuleHomomorphismByImages(Psrc,Psrc,basPsrc,im); - od; - - basQrng := Basis(Qrng); - vecQrng := BasisVectors(basQrng); - dimQrng := Dimension(Qrng); - basQsrc := Basis(Qsrc); - maps2 := ListWithIdenticalEntries(dimQrng,0); - for j in [1..dimQrng] do - im2 := List(basQsrc, b -> vecQrng[j]*b); - maps2[j] := LeftModuleHomomorphismByImages(Qsrc,Qsrc,basQsrc,im2); - od; - - for x2 in gensrc do - for x1 in genrng do - cx1 := Coefficients(basPrng,x1); - actx1 := Sum(List([1..dimPrng], i -> cx1[i]*maps[i])); - gx1 := x1 ^ morrng; - gcx1 := Coefficients(basQrng,gx1); - actgx1 := Sum(List([1..dimQrng], i -> gcx1[i]*maps2[i])); - y2 := (x2^actx1)^morsrc; - z2 := (x2^morsrc)^actgx1; - if not ( y2 = z2 ) then - Info( InfoXModAlg, 2, "Actions do not commute! \n", - "When x2 = ", x2, " and x1 = ", x1, "\n", - " morsrc(x2^x1) = ", y2, "\n", - "and morsrc(x2)^(morrng(x1) = ", z2 ); - return false; - fi; + if ( IsLeftModuleGeneralMapping(Pact) = true ) then + basPrng := Basis(Prng); + vecPrng := BasisVectors(basPrng); + dimPrng := Dimension(Prng); + basPsrc := Basis(Psrc); + maps := ListWithIdenticalEntries(dimPrng,0); + for j in [1..dimPrng] do + im := List(basPsrc, b -> vecPrng[j]*b); + maps[j] := LeftModuleHomomorphismByImages(Psrc,Psrc,basPsrc,im); od; - od; - else - for x2 in gensrc do - for x1 in genrng do - y2 := ( [ x1 , x2 ] ^ Pact) ^ morsrc; - z2 := [ x1 ^ morrng , x2 ^ morsrc ] ^ Qact ; - if not ( y2 = z2 ) then - Info( InfoXModAlg, 2, "Actions do not commute! \n", - "When x2 = ", x2, " and x1 = ", x1, "\n", - " morsrc(x2^x1) = ", y2, "\n", - "and morsrc(x2)^(morrng(x1) = ", z2 ); - return false; - fi; + basQrng := Basis(Qrng); + vecQrng := BasisVectors(basQrng); + dimQrng := Dimension(Qrng); + basQsrc := Basis(Qsrc); + maps2 := ListWithIdenticalEntries(dimQrng,0); + for j in [1..dimQrng] do + im2 := List(basQsrc, b -> vecQrng[j]*b); + maps2[j] := LeftModuleHomomorphismByImages(Qsrc,Qsrc,basQsrc,im2); od; - od; - fi; + for x2 in gensrc do + for x1 in genrng do + cx1 := Coefficients(basPrng,x1); + actx1 := Sum(List([1..dimPrng], i -> cx1[i]*maps[i])); + gx1 := x1 ^ morrng; + gcx1 := Coefficients(basQrng,gx1); + actgx1 := Sum(List([1..dimQrng], i -> gcx1[i]*maps2[i])); + y2 := (x2^actx1)^morsrc; + z2 := (x2^morsrc)^actgx1; + if not ( y2 = z2 ) then + Info( InfoXModAlg, 2, "Actions do not commute! \n", + "When x2 = ", x2, " and x1 = ", x1, "\n", + " morsrc(x2^x1) = ", y2, "\n", + "and morsrc(x2)^(morrng(x1) = ", z2 ); + return false; + fi; + od; + od; + else + for x2 in gensrc do + for x1 in genrng do + y2 := ( [ x1 , x2 ] ^ Pact) ^ morsrc; + z2 := [ x1 ^ morrng , x2 ^ morsrc ] ^ Qact ; + if not ( y2 = z2 ) then + Info( InfoXModAlg, 2, "Actions do not commute! \n", + "When x2 = ", x2, " and x1 = ", x1, "\n", + " morsrc(x2^x1) = ", y2, "\n", + "and morsrc(x2)^(morrng(x1) = ", z2 ); + return false; + fi; + od; + od; + fi; return true; end ); @@ -148,7 +146,7 @@ InstallMethod( Display, "display a morphism of pre-crossed modules", true, [ IsPreXModAlgebraMorphism ], 0, function( mor ) - local morsrc, morrng, gensrc, genrng, imsrc, imrng, P, Q, name, ok; + local morsrc, morrng, gensrc, genrng, imsrc, imrng, P, Q, name, ok; name := Name( mor ); P := Source( mor ); Q := Range( mor ); @@ -195,7 +193,8 @@ InstallMethod( IsXModAlgebraMorphism, "generic method for pre-crossed module morphisms", true, [ IsPreXModAlgebraMorphism ], 0, function( mor ) - return ( IsXModAlgebra( Source( mor ) ) and IsXModAlgebra( Range( mor ) ) ); + return ( IsXModAlgebra( Source( mor ) ) + and IsXModAlgebra( Range( mor ) ) ); end ); InstallMethod( IsXModAlgebraMorphism, "generic method for 2d-mappings", true, @@ -223,9 +222,9 @@ function( obj ) shom := IdentityMapping( Source( obj ) ); rhom := IdentityMapping( Range( obj ) ); if IsPreXModAlgebraObj( obj ) then -###xmodu ekleyince tekrar duzenle######## +#### xmodu ekleyince tekrar duzenle######## return PreXModAlgebraMorphismByHoms( obj, obj, shom, rhom ); -## return fail; +#### return fail; elif IsPreCat1AlgebraObj( obj ) then return PreCat1AlgebraMorphismByHoms( obj, obj, shom, rhom ); else @@ -235,7 +234,7 @@ end ); ############################################################################ ## -#F PreXModAlgebraMorphism( ,,, ) pre-crossed mod morphism +#F PreXModAlgebraMorphism( ,,, ) ## ## (need to extend to other sets of parameters) ## @@ -245,19 +244,21 @@ InstallGlobalFunction( PreXModAlgebraMorphism, function( arg ) nargs := Length( arg ); # two pre-xmods and two homomorphisms - if ( ( nargs = 4 ) and IsPreXModAlgebra( arg[1] ) and IsPreXModAlgebra( arg[2]) + if ( ( nargs = 4 ) and IsPreXModAlgebra( arg[1] ) + and IsPreXModAlgebra( arg[2]) and IsAlgebraHomomorphism( arg[3] ) and IsAlgebraHomomorphism( arg[4] ) ) then - return PreXModAlgebraMorphismByHoms( arg[1], arg[2], arg[3], arg[4] ); + return PreXModAlgebraMorphismByHoms(arg[1],arg[2],arg[3],arg[4]); fi; # alternatives not allowed - Info( InfoXModAlg, 2, "usage: PreXModAlgebraMorphism( src, rng, srchom, rnghom );" ); + Info( InfoXModAlg, 2, + "usage: PreXModAlgebraMorphism( src, rng, srchom, rnghom );" ); return fail; end ); ############################################################################## ## -#F XModAlgebraMorphism( , , , ) crossed module morphism +#F XModAlgebraMorphism( , , , ) ## ## (need to extend to other sets of parameters) ## @@ -267,13 +268,15 @@ InstallGlobalFunction( XModAlgebraMorphism, function( arg ) nargs := Length( arg ); # two xmods and two homomorphisms - if ( ( nargs = 4 ) and IsXModAlgebra( arg[1] ) and IsXModAlgebra( arg[2]) + if ( ( nargs = 4 ) and IsXModAlgebra( arg[1] ) + and IsXModAlgebra( arg[2]) and IsAlgebraHomomorphism( arg[3] ) and IsAlgebraHomomorphism( arg[4] ) ) then - return XModAlgebraMorphismByHoms( arg[1], arg[2], arg[3], arg[4] ); + return XModAlgebraMorphismByHoms(arg[1],arg[2],arg[3],arg[4]); fi; # alternatives not allowed - Info( InfoXModAlg, 2, "usage: XModAlgebraMorphism( src, rng, srchom, rnghom );" ); + Info( InfoXModAlg, 2, + "usage: XModAlgebraMorphism( src, rng, srchom, rnghom );" ); return fail; end ); @@ -281,8 +284,9 @@ end ); ## #M XModMorphismByHoms( , , , ) . . make xmod morphism ## -InstallMethod( XModAlgebraMorphismByHoms, "for 2 xmods and 2 homomorphisms", true, - [ IsXModAlgebra, IsXModAlgebra, IsAlgebraHomomorphism, IsAlgebraHomomorphism ], 0, +InstallMethod( XModAlgebraMorphismByHoms, "for 2 xmods and 2 homomorphisms", + true, [ IsXModAlgebra, IsXModAlgebra, + IsAlgebraHomomorphism, IsAlgebraHomomorphism ], 0, function( src, rng, srchom, rnghom ) local mor, ok; @@ -309,8 +313,9 @@ function( src, rng, srchom, rnghom ) local filter, fam, mor, ok, nsrc, nrng, name; - if not ( IsAlgebraHomomorphism(srchom) and IsAlgebraHomomorphism(rnghom) ) then - Info( InfoXModAlg, 2, "source and range mappings must be algebra homs" ); + if not ( IsAlgebraHomomorphism(srchom) + and IsAlgebraHomomorphism(rnghom) ) then + Info( InfoXModAlg,2, "source, range mappings must be algebra homs" ); return fail; fi; mor := Make2dAlgebraMorphism( src, rng, srchom, rnghom ); @@ -331,13 +336,13 @@ function( src, rng, srchom, rnghom ) name := Concatenation( "[", nsrc, " => ", nrng, "]" ); SetName( mor, name ); ok := IsXModAlgebraMorphism( mor ); - # ok := IsSourceMorphism( mor ); + #### ok := IsSourceMorphism( mor ); return mor; end ); ############################################################################ ## -#F PreCat1AlgebraMorphism( ,,, ) pre-cat1-algebra morphism +#F PreCat1AlgebraMorphism( ,,, ) ## ## (need to extend to other sets of parameters) ## @@ -347,19 +352,21 @@ InstallGlobalFunction( PreCat1AlgebraMorphism, function( arg ) nargs := Length( arg ); # two pre-cat1s and two homomorphisms - if ( ( nargs = 4 ) and IsPreCat1Algebra( arg[1] ) and IsPreCat1Algebra( arg[2]) + if ( ( nargs = 4 ) and IsPreCat1Algebra( arg[1] ) + and IsPreCat1Algebra( arg[2]) and IsAlgebraHomomorphism( arg[3] ) and IsAlgebraHomomorphism( arg[4] ) ) then - return PreCat1AlgebraMorphismByHoms( arg[1], arg[2], arg[3], arg[4] ); + return PreCat1AlgebraMorphismByHoms(arg[1],arg[2],arg[3],arg[4]); fi; # alternatives not allowed - Info( InfoXModAlg, 2, "usage: PreCat1AlgebraMorphism( src, rng, srchom, rnghom );" ); + Info( InfoXModAlg, 2, + "usage: PreCat1AlgebraMorphism( src, rng, srchom, rnghom );" ); return fail; end ); ############################################################################ ## -#F Cat1AlgebraMorphism( , , , ) cat1-algebra morphism +#F Cat1AlgebraMorphism( , , , ) ## ## (need to extend to other sets of parameters) ## @@ -369,13 +376,15 @@ InstallGlobalFunction( Cat1AlgebraMorphism, function( arg ) nargs := Length( arg ); # two cat1s and two homomorphisms - if ( ( nargs = 4 ) and IsCat1Algebra( arg[1] ) and IsCat1Algebra( arg[2]) + if ( ( nargs = 4 ) and IsCat1Algebra( arg[1] ) + and IsCat1Algebra( arg[2]) and IsAlgebraHomomorphism( arg[3] ) and IsAlgebraHomomorphism( arg[4] ) ) then - return Cat1AlgebraMorphismByHoms( arg[1], arg[2], arg[3], arg[4] ); + return Cat1AlgebraMorphismByHoms(arg[1],arg[2],arg[3],arg[4]); fi; # alternatives not allowed - Info( InfoXModAlg, 2, "usage: Cat1AlgebraMorphism( src, rng, srchom, rnghom );" ); + Info( InfoXModAlg, 2, + "usage: Cat1AlgebraMorphism( src, rng, srchom, rnghom );" ); return fail; end ); @@ -443,7 +452,7 @@ end ); ############################################################################ ## -#F Display( ) . . . . . . print details of a (pre-)cat1-algebra morphism +#F Display( ) . . . . print details of a (pre-)cat1-algebra morphism ## InstallMethod( Display, "display a morphism of pre-cat1 algebras", true, [ IsPreCat1AlgebraMorphism ], 0, @@ -480,7 +489,7 @@ function( mor ) Print( " ", List( gensrc, s -> Image( morsrc, s ) ), "\n" ); Print( ": Range Homomorphism maps range generators to:\n" ); Print( " ", List( genrng, r -> Image( morrng, r ) ), "\n" ); - Print( "\n" ); + Print( "\n" ); end ); ############################################################################ @@ -525,7 +534,8 @@ function( mor ) if not ispre then return false; else - return ( IsCat1Algebra( Source( mor ) ) and IsCat1Algebra( Range( mor ) ) ); + return ( IsCat1Algebra( Source( mor ) ) + and IsCat1Algebra( Range( mor ) ) ); fi; end ); @@ -535,14 +545,16 @@ end ); ## InstallMethod( PreCat1AlgebraMorphismByHoms, "for pre-cat1-algebra, pre-cat1-algebra, homomorphism, homomorphism,", - true, - [ IsPreCat1Algebra, IsPreCat1Algebra, IsAlgebraHomomorphism, IsAlgebraHomomorphism ], 0, + true, [ IsPreCat1Algebra, IsPreCat1Algebra, + IsAlgebraHomomorphism, IsAlgebraHomomorphism ], 0, function( src, rng, srchom, rnghom ) local filter, fam, mor, ok, nsrc, nrng, name; - if not ( IsAlgebraHomomorphism(srchom) and IsAlgebraHomomorphism(rnghom) ) then - Info( InfoXModAlg, 2, "source and range mappings must be algebra homs" ); + if not ( IsAlgebraHomomorphism(srchom) + and IsAlgebraHomomorphism(rnghom) ) then + Info( InfoXModAlg, 2, + "source and range mappings must be algebra homs" ); return fail; fi; mor := Make2dAlgebraMorphism( src, rng, srchom, rnghom ); @@ -568,7 +580,7 @@ end ); ############################################################################ ## -#M Cat1AlgebraMorphismByHoms( , , , ) . . . make xmod morphism +#M Cat1AlgebraMorphismByHoms( , , , ) ## InstallMethod( Cat1AlgebraMorphismByHoms, "for 2 cat1s and 2 homomorphisms", true, [ IsCat1Algebra, IsCat1Algebra, IsAlgebraHomomorphism, IsAlgebraHomomorphism ], 0, @@ -585,7 +597,7 @@ end ); ############################################################################ ## -#M ViewObj( ) . . . . . . . . . . view a (pre-)crossed module morphism +#M ViewObj( ) . . . . . . . . . view a (pre-)crossed module morphism ## InstallMethod( ViewObj, "method for a morphism of pre-crossed modules", true, [ IsPreXModAlgebraMorphism ], 0, @@ -601,8 +613,8 @@ end ); ## #M PrintObj( ) . . . . . . . . . print a (pre-)crossed module morphism ## -InstallMethod( PrintObj, "method for a morphism of pre-crossed modules", true, - [ IsPreXModAlgebraMorphism ], 0, +InstallMethod( PrintObj, "method for a morphism of pre-crossed modules", + true, [ IsPreXModAlgebraMorphism ], 0, function( mor ) if HasName( mor ) then Print( Name( mor ), "\n" ); diff --git a/lib/alg2obj.gd b/lib/alg2obj.gd index 7624158..f8e7e68 100644 --- a/lib/alg2obj.gd +++ b/lib/alg2obj.gd @@ -2,7 +2,7 @@ ## #W alg2obj.gd The XMODALG package Zekeriya Arvasi #W & Alper Odabas -#Y Copyright (C) 2014-2024, Zekeriya Arvasi & Alper Odabas, +#Y Copyright (C) 2014-2025, Zekeriya Arvasi & Alper Odabas, ## ############################## 2d-algebras ########################### @@ -22,9 +22,6 @@ DeclareOperation( "Sub2dAlgebra", [ Is2dAlgebra, IsAlgebra, IsAlgebra ] ); DeclareRepresentation( "IsPreXModAlgebraObj", Is2dAlgebra and IsAttributeStoringRep, [ "boundary", "action" ] ); -DeclareRepresentation( "IsPreCat1AlgebraObj", - Is2dAlgebra and IsAttributeStoringRep, - [ "tailMap", "headMap", "rangeEmbedding" ] ); DeclareProperty( "IsPreXModAlgebra", Is2dAlgebra ); DeclareProperty( "IsXModAlgebra", Is2dAlgebra ); @@ -32,8 +29,6 @@ InstallTrueMethod( IsPreXModAlgebra, IsXModAlgebra ); BindGlobal( "PreXModAlgebraObjType", NewType( Family2dAlgebra, IsPreXModAlgebraObj ) ); -BindGlobal( "PreCat1AlgebraObjType", - NewType( Family2dAlgebra, IsPreCat1AlgebraObj ) ); DeclareAttribute( "XModAlgebraAction", IsPreXModAlgebra ); @@ -42,13 +37,50 @@ DeclareOperation( "XModAlgebraObj", DeclareOperation( "XModAlgebraObjNC", [ IsAlgebraHomomorphism, IsAlgebraAction ] ); +DeclareGlobalFunction( "XModAlgebra" ); + +## section 4.1.7 +############################################################################ +## +## XModAlgebraByBoundaryAndAction( ) +## +## <#GAPDoc Label="XModAlgebraByBoundaryAndAction"> +## +## +## +## +## When a suitable pair of algebra homomorphisms are available, +## these operations may be used. +## The example uses the algebra action created in section +## . +## +## +## +## 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 ] ] ] +## ]]> +## +## <#/GAPDoc> +## DeclareOperation( "PreXModAlgebraByBoundaryAndAction", [ IsAlgebraHomomorphism, IsAlgebraAction ] ); DeclareOperation( "PreXModAlgebraByBoundaryAndActionNC", [ IsAlgebraHomomorphism, IsAlgebraAction ] ); - -DeclareGlobalFunction( "XModAlgebra" ); -DeclareOperation( "XModAlgebraByBoundaryAndAction", + DeclareOperation( "XModAlgebraByBoundaryAndAction", [ IsAlgebraHomomorphism, IsAlgebraAction ] ); DeclareOperation( "XModAlgebraByBoundaryAndActionNC", [ IsAlgebraHomomorphism, IsAlgebraAction ] ); @@ -69,6 +101,12 @@ DeclareOperation( "IsSubXModAlgebra", [ Is2dAlgebraObject, Is2dAlgebraObject ] ) ############################# cat1-algebras ########################## +DeclareRepresentation( "IsPreCat1AlgebraObj", + Is2dAlgebra and IsAttributeStoringRep, + [ "tailMap", "headMap", "rangeEmbedding" ] ); +BindGlobal( "PreCat1AlgebraObjType", + NewType( Family2dAlgebra, IsPreCat1AlgebraObj ) ); + DeclareProperty( "IsPreCat1Algebra", Is2dAlgebra ); DeclareProperty( "IsCat1Algebra", Is2dAlgebra ); @@ -76,9 +114,9 @@ DeclareGlobalFunction( "PreCat1Algebra" ); DeclareGlobalFunction( "Cat1Algebra" ); DeclareOperation( "PreCat1AlgebraObj", - [ IsAlgebraHomomorphism, IsAlgebraHomomorphism, IsAlgebraHomomorphism ] ); + [ IsAlgebraHomomorphism, IsAlgebraHomomorphism, IsAlgebraHomomorphism ] ); DeclareOperation( "PreCat1AlgebraByTailHeadEmbedding", - [ IsAlgebraHomomorphism, IsAlgebraHomomorphism, IsAlgebraHomomorphism ] ); + [ IsAlgebraHomomorphism, IsAlgebraHomomorphism, IsAlgebraHomomorphism ] ); DeclareAttribute( "HeadMap", IsPreCat1Algebra ); DeclareAttribute( "TailMap", IsPreCat1Algebra ); DeclareAttribute( "RangeEmbedding", IsPreCat1Algebra ); @@ -86,10 +124,13 @@ DeclareAttribute( "KernelEmbedding", IsPreCat1Algebra ); DeclareOperation( "SubPreCat1Algebra", [ IsPreCat1Algebra, IsAlgebra, IsAlgebra ] ); -DeclareOperation( "SubCat1Algebra", [ IsCat1Algebra, IsAlgebra, IsAlgebra ] ); +DeclareOperation( "SubCat1Algebra", + [ IsCat1Algebra, IsAlgebra, IsAlgebra ] ); -DeclareOperation( "IsSubPreCat1Algebra", [ Is2dAlgebraObject, Is2dAlgebraObject ] ); -DeclareOperation( "IsSubCat1Algebra", [ Is2dAlgebraObject, Is2dAlgebraObject ] ); +DeclareOperation( "IsSubPreCat1Algebra", + [ Is2dAlgebraObject, Is2dAlgebraObject ] ); +DeclareOperation( "IsSubCat1Algebra", + [ Is2dAlgebraObject, Is2dAlgebraObject ] ); DeclareOperation( "PreCat1AlgebraByEndomorphisms", [ IsAlgebraHomomorphism, IsAlgebraHomomorphism ] ); @@ -108,4 +149,39 @@ DeclareAttribute( "PreXModAlgebraOfPreCat1Algebra", IsPreCat1Algebra ); DeclareAttribute( "PreCat1AlgebraOfPreXModAlgebra", IsPreXModAlgebra ); DeclareAttribute( "XModAlgebraOfCat1Algebra", IsCat1Algebra ); DeclareAttribute( "Cat1AlgebraOfXModAlgebra", IsXModAlgebra ); +## addition to Cat1AlgebraOfXModAlgebra, section 5.1.1 +############################################################################ +## +## <#GAPDoc Label="Cat1AlgebraOfXModAlgebra"> +##

+## As a second example, we convert the crossed module X4 +## constructed in section +## +## +## 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 ] +## ]]> +## +## <#/GAPDoc> +## DeclareOperation( "SDproduct", [ Is2dAlgebraObject ] ); diff --git a/lib/alg2obj.gi b/lib/alg2obj.gi index 9c499a5..3f2f39b 100644 --- a/lib/alg2obj.gi +++ b/lib/alg2obj.gi @@ -2,7 +2,7 @@ ## #W alg2obj.gi The XMODALG package Zekeriya Arvasi #W & Alper Odabas -#Y Copyright (C) 2014-2024, Zekeriya Arvasi & Alper Odabas, +#Y Copyright (C) 2014-2025, Zekeriya Arvasi & Alper Odabas, ## CAT1ALG_LIST_MAX_SIZE := 7; @@ -60,7 +60,7 @@ InstallMethod( IsPreXModAlgebra, "generic method for pre-crossed modules", true, [ Is2dAlgebra ], 0, function( P ) - local R, S, bdy, act, genR, genS, r, m, s, ims, acts, z1, z2; + local R, S, bdy, act, basR, basS, i, j, r, m, s, ims, acts, z1, z2; if not IsPreXModAlgebraObj( P ) then return false; @@ -83,19 +83,21 @@ function( P ) Info( InfoXModAlg, 1, "Source( act ) <> R" ); return false; fi; - genR := GeneratorsOfAlgebra( R ); - genS := GeneratorsOfAlgebra( S ); - for r in genR do + basR := CanonicalBasis( R ); + basS := CanonicalBasis( S ); + for i in [1..Length(basR)] do + r := basR[i]; m := ImageElm( act, r ); - for s in genS do + for j in [1..Length(basS)] do + s := basS[j]; ims := Image( bdy, s ); acts := Image( m, s ); z1 := ImageElm( bdy, acts ); z2 := r * ims; if not ( z1 = z2 ) then - Info( InfoXModAlg, 1, "XModAlg 1: ", z1, " <> ", z2 ); + Info( InfoXModAlg, 1, "XModAlg1: ", z1, " <> ", z2 ); return false; - fi; + fi; od; od; return true; @@ -350,7 +352,7 @@ InstallMethod( IsXModAlgebra, "generic method for pre-crossed modules", bdy := Boundary( P ); act := XModAlgebraAction( P ); S := Source( bdy ); - genS := GeneratorsOfAlgebra( S ); + genS := CanonicalBasis( S ); for s1 in genS do r1 := ImageElm( bdy, s1 ); m1 := ImageElm( act, r1 ); @@ -358,7 +360,7 @@ InstallMethod( IsXModAlgebra, "generic method for pre-crossed modules", z1 := ImageElm( m1, s2 ); z2 := s1 * s2; if ( z1 <> z2 ) then - Info( InfoXModAlg, 1, z1, " <> ", z2 ); + Info( InfoXModAlg, 1, "XModAlg2: ", z1, " <> ", z2 ); return false; fi; od; @@ -432,7 +434,7 @@ function( A ) SetAlgebraActionType( act, "multiplier" ); PM := PreXModAlgebraByBoundaryAndAction( bdy, act ); if not IsXModAlgebra( PM ) then - Error( "this boundary and action only defines a pre-crossed module" ); + Error( "this boundary & action only define a pre-crossed module" ); fi; return PM; end ); @@ -451,7 +453,7 @@ function( hom ) act := AlgebraActionBySurjection( hom ); PM := PreXModAlgebraByBoundaryAndAction( hom, act ); if not IsXModAlgebra( PM ) then - Error( "this boundary and action only defines a pre-crossed module" ); + Error( "this boundary & action only define a pre-crossed module" ); fi; return PM; end ); @@ -475,7 +477,7 @@ function( A, I ) IsAlgebraHomomorphism( bdy ); PM := PreXModAlgebraByBoundaryAndAction( bdy, act ); # if not IsXModAlgebra( PM ) then - # Error( "this boundary and action only defines a pre-crossed module" ); + # Error( "this boundary & action only define a pre-crossed module" ); # fi; return PM; end ); @@ -584,7 +586,8 @@ function( PM, SM ) maps_P := ListWithIdenticalEntries(dimPrng,0); for j in [1..dimPrng] do im_P := List(basPsrc, b -> vecPrng[j]*b); - maps_P[j] := LeftModuleHomomorphismByImages(Psrc,Psrc,basPsrc,im_P); + maps_P[j] := + LeftModuleHomomorphismByImages(Psrc,Psrc,basPsrc,im_P); od; basSrng := Basis(Srng); vecSrng := BasisVectors(basSrng); @@ -594,7 +597,8 @@ function( PM, SM ) maps_S := ListWithIdenticalEntries(dimSrng,0); for j in [1..dimSrng] do im_S := List(basSsrc, b -> vecSrng[j]*b); - maps_S[j] := LeftModuleHomomorphismByImages(Ssrc,Ssrc,basSsrc,im_S); + maps_S[j] := + LeftModuleHomomorphismByImages(Ssrc,Ssrc,basSsrc,im_S); od; for r in genrng do cp := Coefficients(basPrng,r); @@ -719,8 +723,6 @@ function( XM, Ssrc, Srng ) return SM; end ); - - ############################# cat1-algebras ############################## ############################################################################ @@ -1448,8 +1450,10 @@ function( et, eh ) fi; R := Image( et ); gG := GeneratorsOfAlgebra( G ); - t := AlgebraHomomorphismByImages( G, R, gG, List( gG, g->Image( et, g ) ) ); - h := AlgebraHomomorphismByImages( G, R, gG, List( gG, g->Image( eh, g ) ) ); + t := AlgebraHomomorphismByImages( G, R, gG, + List( gG, g->Image( et, g ) ) ); + h := AlgebraHomomorphismByImages( G, R, gG, + List( gG, g->Image( eh, g ) ) ); e := InclusionMappingAlgebra( G, R ); A := PreCat1AlgebraByTailHeadEmbedding( t, h, e ); if ( A = fail ) then @@ -1522,9 +1526,10 @@ function( F, G ) PreCat1_ler := []; for i in [1..Length(Iler)] do for j in [1..Length(Iler)] do - if PreCat1AlgebraByEndomorphisms(Iler[i],Iler[j]) <> fail then - Add(PreCat1_ler,PreCat1AlgebraByEndomorphisms(Iler[i],Iler[j])); - Print(PreCat1AlgebraByEndomorphisms(Iler[i],Iler[j])); + if PreCat1AlgebraByEndomorphisms(Iler[i],Iler[j]) <> fail then + Add(PreCat1_ler, + PreCat1AlgebraByEndomorphisms( Iler[i], Iler[j] ) ); + Print(PreCat1AlgebraByEndomorphisms( Iler[i], Iler[j] ) ); else continue; fi; @@ -1641,7 +1646,6 @@ function( Cat1ler ) return liste2; end ); - ########################## conversion functions ########################## ############################################################################ diff --git a/lib/algebra.gd b/lib/algebra.gd index 10248f3..41f4bdf 100644 --- a/lib/algebra.gd +++ b/lib/algebra.gd @@ -2,7 +2,7 @@ ## #W algebra.gd The XMODALG package Zekeriya Arvasi #W & Alper Odabas -#Y Copyright (C) 2014-2024, Zekeriya Arvasi & Alper Odabas, +#Y Copyright (C) 2014-2025, Zekeriya Arvasi & Alper Odabas, ## DeclareInfoClass( "InfoXModAlg" ); @@ -53,3 +53,86 @@ DeclareOperation ( "SemidirectProductOfAlgebras", DeclareAttribute( "SemidirectProductOfAlgebrasInfo", IsAlgebra, "mutable" ); ##################################################################### + +################ direct sum of algebras with info ################# + +## section 2.4.1 +############################################################################# +## +#O DirectSumOfAlgebrasWithInfo( ) +#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. +## In order to construct a direct sum with this information attribute +## the operation DirectSumOfAlgebrasWithInfo may be used. +## This just calls DirectSumOfAlgebras and sets up the attribute. +## +## +## +## 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) ] ] ) +## ]]> +## +## <#/GAPDoc> +## +DeclareAttribute( "DirectSumOfAlgebrasInfo", IsAlgebra, "mutable" ); +DeclareOperation( "DirectSumOfAlgebrasWithInfo", [ IsAlgebra, IsAlgebra ] ); + +## section 2.4.2 +############################################################################ +## +## 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( 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) ] +## ]]> +## +## <#/GAPDoc> +## diff --git a/lib/algebra.gi b/lib/algebra.gi index d0344c7..88fa408 100644 --- a/lib/algebra.gi +++ b/lib/algebra.gi @@ -2,7 +2,7 @@ ## #W algebra.gi The XMODALG package Zekeriya Arvasi #W & Alper Odabas -#Y Copyright (C) 2014-2024, Zekeriya Arvasi & Alper Odabas, +#Y Copyright (C) 2014-2025, Zekeriya Arvasi & Alper Odabas, ## ############################ algebra operations ########################### @@ -372,7 +372,7 @@ function( G, H ) for l in [1..Size(H)] do f := AlgebraHomomorphismByImages( G, H, genG, [eH[i],eH[j],eH[k],eH[l]]); - if ((f <> fail) and (not f in mler) and (f*f=f)) then + if ((f <> fail) and (not f in mler) and (f*f=f)) then Add(mler,f); else continue; @@ -446,29 +446,27 @@ end ); InstallMethod(RestrictedMapping, "create new GHBI", CollFamSourceEqFamElms, [ IsAlgebraHomomorphism, IsAlgebra ], 0, function( hom, U ) - local rest,gens,imgs,imgp; - - if ForAll(GeneratorsOfAlgebra(Source(hom)),i->i in U) then - return hom; - fi; - - gens:=GeneratorsOfAlgebra(U); - imgs:=List( gens, i->ImageElm(hom,i) ); - - if HasImagesSource(hom) then - imgp:=ImagesSource(hom); - else - imgp:=Subalgebra(Range(hom),imgs); - fi; - rest:=AlgebraHomomorphismByImagesNC(U,imgp,gens,imgs); - if HasIsInjective(hom) and IsInjective(hom) then - SetIsInjective(rest,true); - fi; - if HasIsTotal(hom) and IsTotal(hom) then - SetIsTotal(rest,true); - fi; - - return rest; + local rest,gens,imgs,imgp; + + if ForAll(GeneratorsOfAlgebra(Source(hom)),i->i in U) then + return hom; + fi; + gens:=GeneratorsOfAlgebra(U); + imgs:=List( gens, i->ImageElm(hom,i) ); + + if HasImagesSource(hom) then + imgp:=ImagesSource(hom); + else + imgp:=Subalgebra(Range(hom),imgs); + fi; + rest:=AlgebraHomomorphismByImagesNC(U,imgp,gens,imgs); + if HasIsInjective(hom) and IsInjective(hom) then + SetIsInjective(rest,true); + fi; + if HasIsTotal(hom) and IsTotal(hom) then + SetIsTotal(rest,true); + fi; + return rest; end); ############################## algebra actions ############################ @@ -482,7 +480,7 @@ InstallMethod( IsAlgebraAction, "for an algebra homomorphism", true, function ( hom ) local A, C, genC, g1, g; C := Range( hom ); - ## check that C is an algebra of isomorphism of A + ## check that C is an algebra of isomorphisms of A genC := GeneratorsOfAlgebra( C ); g1 := genC[1]; if not IsLeftModuleHomomorphism( g1 ) then @@ -718,10 +716,9 @@ InstallMethod( SemidirectProductOfAlgebras, return P; end ); - ############################################################################# ## -#A Embedding +#A Embedding ## InstallMethod( Embedding, "semidirect product of algebras and integer", [ IsAlgebra and HasSemidirectProductOfAlgebrasInfo, IsPosInt ], @@ -788,3 +785,92 @@ function( P, i ) info.projections[1] := hom; return hom; end ); + +############################ direct sum operations ####################### + +############################################################################# +## +#M DirectSumOfAlgebrasWithInfo +## +InstallMethod( DirectSumOfAlgebrasWithInfo, "for two algebra", + [ IsAlgebra, IsAlgebra ], + function( A, B ) + local D, eA, eB, pA, pB, info; + D := DirectSumOfAlgebras( A, B ); + if ( D <> fail ) then + if HasName( A ) and HasName( B ) then + SetName( D, Concatenation( Name(A), "(+)", Name(B) ) ); + fi; + info := rec( algebras := [ A, B ], + first := [ 1, 1 + Dimension( A ) ], + embeddings := [ ], + projections := [ ] ); + SetDirectSumOfAlgebrasInfo( D, info ); + eA := Embedding( D, 1 ); + eB := Embedding( D, 2 ); + pA := Projection( D, 1 ); + pB := Projection( D, 2 ); + fi; + return D; +end); + +############################################################################# +## +#M Embedding +## +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; + if not ( i in [1,2] ) then + Error( "require i in [1,2]" ); + fi; + # 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); + +############################################################################# +## +#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); diff --git a/lib/module.gd b/lib/module.gd index 2a24e72..b4b9f97 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-2024, Zekeriya Arvasi & Alper Odabas, +#Y Copyright (C) 2014-2025, Zekeriya Arvasi & Alper Odabas, ## ############################ algebra actions ############################# @@ -48,52 +48,9 @@ ## ## <#/GAPDoc> ## -DeclareOperation( "AlgebraActionByHomomorphism", +DeclareOperation( "AlgebraActionByHomomorphism", [ IsAlgebraHomomorphism, IsAlgebra ] ); -## section 4.1.7 -############################################################################ -## -## XModAlgebraByBoundaryAndAction( ) -## -## <#GAPDoc Label="XModAlgebraByBoundaryAndAction"> -## -## -## -## -## When a suitable pair of algebra homomorphisms are available, -## these operations may be used. -## The example uses the algebra action created in section -## . -## -## -## -## 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 ] ] ] -## ]]> -## -## <#/GAPDoc> -## -DeclareOperation( "XModAlgebraByBoundaryAndAction", - [ IsAlgebraHomomorphism, IsAlgebra ] ); -DeclareOperation( "PreXModAlgebraByBoundaryAndAction", - [ IsAlgebraHomomorphism, IsAlgebra ] ); - - ############################ module operations ########################### ## section 2.3 @@ -329,261 +286,3 @@ DeclareOperation( "AlgebraActionByModule", [ IsAlgebra, IsLeftModule ] ); ## DeclareOperation( "XModAlgebraByModule", [ IsAlgebra, IsLeftModule ] ); -## addition to Cat1AlgebraOfXModAlgebra, section 5.1.1 -############################################################################ -## -## <#GAPDoc Label="Cat1AlgebraOfXModAlgebra"> -##

-## As a second example, we convert the crossed module X4 -## constructed in section -## -## -## 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 ] -## ]]> -## -## <#/GAPDoc> -## - -############################ direct sum operations ####################### - -## section 2.4.1 -############################################################################# -## -#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. -## -## -## -## A3Rc3 := DirectSumOfAlgebras( A3, Rc3 );; -## gap> SetName( A3Rc3, Concatenation( Name(A3), "(+)", Name(Rc3) ) ); -## gap> SetDirectSumOfAlgebrasInfo( A3Rc3, -## > rec( algebras := [A3,Rc3], first := [1,Dimension(A3)+1], -## > embeddings := [ ], projections := [ ] ) );; -## ]]> -## -## <#/GAPDoc> -## -DeclareAttribute( "DirectSumOfAlgebrasInfo", IsAlgebra, "mutable" ); - -## section 2.4.2 -############################################################################ -## -## 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( 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) ] -## ]]> -## -## <#/GAPDoc> -## - -## section 2.4.3 -############################################################################ -## -## DirectSumOfAlgebraHomomorphisms( ) -## -## <#GAPDoc Label="DirectSumOfAlgebraHomomorphisms"> -## -## -## -## -## Let \theta_1 : B_1 \to A_1 and \theta_2 : B_2 \to A_2 -## be algebra homomorphisms. -## The embeddings into A = A_1 \oplus A_2 -## and B = B_1 \oplus B_2 may be used to construct -## \theta = \theta_1 \oplus \theta_2 : B \to A -## where \theta(b_1,b_2) = (\theta_1b_1,\theta_2b_2). -## The example uses the homomorphism homg3 used in -## Section -##

-## -## -## -## hom33 := DirectSumOfAlgebraHomomorphisms( homg3, homg3 );; -## gap> Print( hom33, "\n" ); -## AlgebraHomomorphismByImages( A3(+)A3, Algebra( Rationals, -## [ v.1, v.2, v.3, v.4, v.5, v.6 ] ), -## [ [ [ 0, 1, 0, 0, 0, 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, 0, 0 ], [ 0, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0 ], -## [ 0, 0, 0, 0, 1, 0 ], [ 0, 0, 0, 0, 0, 1 ], [ 0, 0, 0, 1, 0, 0 ] ] ], -## [ v.1, v.4 ] ) -## ]]> -## -## <#/GAPDoc> -## -DeclareOperation( "DirectSumOfAlgebraHomomorphisms", - [ IsAlgebraHomomorphism, IsAlgebraHomomorphism ] ); - -## section 2.4.4 -############################################################################ -## -## 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. -## -## -## -## actMA3 := AlgebraActionByMultipliers( A3, A3, A3 );; -## gap> act4 := AlgebraActionOnDirectSum( actMA3, actg3 ); -## [ [ [ 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 ] ); - -## section 2.4.5 -############################################################################ -## -## DirectSumOfAlgebraActions( ) -## -## <#GAPDoc Label="DirectSumOfAlgebraActions"> -## -## -## -## -## 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). -## The example forms the direct sum of the actions constructed in -## sections -## and -##

-## -## -## -## act5 := DirectSumOfAlgebraActions( actg3, act3 );; -## gap> A5 := Source( act5 ); -## A3(+)A3 -## gap> B5 := AlgebraActedOn( act5 ); -## GR(c3)(+)A(M3) -## gap> em3 := ImageElm( Embedding( A5, 1 ), m3 ); -## [ [ 0, 1, 0, 0, 0, 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 ] ] -## gap> ImageElm( act5, em3 ); -## Basis( GR(c3)(+)A(M3), [ v.1, v.2, v.3, v.4, v.5, v.6 ] ) -> -## [ v.2, v.3, v.1, 0*v.1, 0*v.1, 0*v.1 ] -## gap> ea3 := ImageElm( Embedding( A5, 2 ), a3 ); -## [ [ 0, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0 ], -## [ 0, 0, 0, 0, 2, 3 ], [ 0, 0, 0, 3, 0, 2 ], [ 0, 0, 0, 2, 3, 0 ] ] -### gap> ImageElm( act5, ea3 ); -## Basis( GR(c3)(+)A(M3), [ v.1, v.2, v.3, v.4, v.5, v.6 ] ) -> -## [ 0*v.1, 0*v.1, 0*v.1, (3)*v.5+(2)*v.6, (2)*v.4+(3)*v.6, (3)*v.4+(2)*v.5 ] -## ]]> -## -## <#/GAPDoc> -## -DeclareOperation( "DirectSumOfAlgebraActions", - [ IsAlgebraAction, IsAlgebraAction ] ); - -## section 4.1.9 -############################################################################ -## -## DirectSumOfXModAlgebras( ) -## -## <#GAPDoc Label="DirectSumOfXModAlgebras"> -## -## -## -## -## In Sections -## and -## we constructed direct sums of algebra homomorphisms and algebra actions. -## So, given two crossed modules of algebras X_1, X_2, -## we can form the direct sums of their boundaries and actions -## to form a direct sum X_1 \oplus X_2 of crossed modules. -##

-## In the example we combine crossed modules X3 from section -## and X4 -## from section . -##

-## -## -## -## XY3 := DirectSumOfXModAlgebras( X3, Y3 ); -## [ GR(c3)(+)A(M3) -> A3(+)A3 ] -## ]]> -## -## <#/GAPDoc> -## -DeclareOperation( "DirectSumOfXModAlgebras", - [ IsXModAlgebra, IsXModAlgebra ] ); - diff --git a/lib/module.gi b/lib/module.gi index f0e02f1..b03820b 100644 --- a/lib/module.gi +++ b/lib/module.gi @@ -2,7 +2,7 @@ ## #W module.gi The XMODALG package Chris Wensley #W -#Y Copyright (C) 2014-2024, Zekeriya Arvasi & Alper Odabas, +#Y Copyright (C) 2014-2025, Zekeriya Arvasi & Alper Odabas, ## ############################## algebra actions ############################ @@ -143,279 +143,3 @@ function( A, M ) fi; return PM; end ); - - -############################ direct sum operations ####################### - -############################################################################# -## -#M Embedding -## -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; - if not ( i in [1,2] ) then - Error( "require i in [1,2]" ); - fi; - # 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); - -############################################################################# -## -#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 DirectSumOfAlgebraHomomorphisms -## -InstallMethod( DirectSumOfAlgebraHomomorphisms, - "for two algebra homomorphisms", - [ IsAlgebraHomomorphism, IsAlgebraHomomorphism ], - function( hom1, hom2 ) - local B1, A1, gen1, im1, B2, A2, gen2, im2, - dom, B, eB1, eB2, genB, A, eA1, eA2, imhom, hom; - B1 := Source( hom1 ); - A1 := Range( hom1 ); - gen1 := GeneratorsOfAlgebra( B1 ); - im1 := List( gen1, g -> ImageElm( hom1, g ) ); - B2 := Source( hom2 ); - A2 := Range( hom2 ); - gen2 := GeneratorsOfAlgebra( B2 ); - im2 := List( gen2, g -> ImageElm( hom2, g ) ); - dom := LeftActingDomain( B1 ); - if not ( dom = LeftActingDomain( B2 ) ) then - Error( "homomorphisms are over different domains" ); - fi; - B := DirectSumOfAlgebras( B1, B2 ); - if HasName( B1 ) and HasName( B2 ) then - SetName( B, Concatenation( Name(B1), "(+)", Name(B2) ) ); - fi; - SetDirectSumOfAlgebrasInfo( B, - rec( algebras := [ B1, B2 ], - first := [ 1, 1 + Dimension( B1 ) ], - embeddings := [ ], - projections := [ ] ) ); - eB1 := Embedding( B, 1 ); - eB2 := Embedding( B, 2 ); - A := DirectSumOfAlgebras( A1, A2 ); - if HasName( A1 ) and HasName( A2 ) then - SetName( A, Concatenation( Name(A1), "(+)", Name(A2) ) ); - fi; - SetDirectSumOfAlgebrasInfo( A, - rec( algebras := [ A1, A2 ], - first := [ 1, 1 + Dimension( A1 ) ], - embeddings := [ ], - projections := [ ] ) ); - eA1 := Embedding( A, 1 ); - eA2 := Embedding( A, 2 ); - genB := Concatenation( List( gen1, b -> ImageElm( eB1, b ) ), - List( gen2, b -> ImageElm( eB2, b ) ) ); - imhom := Concatenation( List( im1, a -> ImageElm( eA1, a ) ), - List( im2, a -> ImageElm( eA2, a ) ) ); - hom := AlgebraHomomorphismByImages( B, A, genB, imhom ); - 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 ); - SetAlgebraActedOn( act, B ); - SetAlgebraActionType( act, "on direct sum 1" ); - return act; -end ); - -############################################################################# -## -#M DirectSumOfAlgebraActions -## -InstallMethod( DirectSumOfAlgebraActions, "for two algebra actions", true, - [ IsAlgebraAction, IsAlgebraAction ], 0, -function( act1, act2 ) - local domA, A1, basA1, nA1, A2, basA2, nA2, A, basA, firstA, - B1, basB1, nB1, B2, basB2, nB2, B, basB, firstB, zB, zB1, zB2, - C1, basC1, nC1, C2, basC2, nC2, C, basC, c, imc, hom, - eA1, imA1, eA2, imA2, eB1, imB1, eB2, imB2, i, act; - A1 := Source( act1 ); - domA := LeftActingDomain( A1 ); - basA1 := BasisVectors( Basis( A1 ) ); - nA1 := Length( basA1 ); - B1 := AlgebraActedOn( act1 ); - basB1 := BasisVectors( Basis( B1 ) ); - nB1 := Length( basB1 ); - C1 := Range( act1 ); - basC1 := BasisVectors( Basis( C1 ) ); - nC1 := Length( basC1 ); - A2 := Source( act2 ); - if not ( domA = LeftActingDomain( A2 ) ) then - Error( "act1 and act2 have different left acting domains" ); - fi; - basA2 := BasisVectors( Basis( A2 ) ); - nA2 := Length( basA2 ); - B2 := AlgebraActedOn( act2 ); - basB2 := BasisVectors( Basis( B2 ) ); - nB2 := Length( basB2 ); - C2 := Range( act2 ); - basC2 := BasisVectors( Basis( C2 ) ); - nC2 := Length( basC2 ); - A := DirectSumOfAlgebras( A1, A2 ); - if HasName( A1 ) and HasName( A2 ) then - SetName( A, Concatenation( Name(A1), "(+)", Name(A2) ) ); - fi; - firstA := [ 1, 1 + Dimension( A1 ) ]; - SetDirectSumOfAlgebrasInfo( A, - rec( algebras := [ A1, A2 ], - first := firstA, - embeddings := [ ], - projections := [ ] ) ); - eA1 := Embedding( A, 1 ); - imA1 := List( [1..nA1], i -> ImageElm( eA1, basA1[i] ) ); - eA2 := Embedding( A, 2 ); - imA2 := List( [1..nA2], j -> ImageElm( eA2, basA2[j] ) ); - basA := Concatenation( imA1, imA2 ); - B := DirectSumOfAlgebras( B1, B2 ); - if HasName( B1 ) and HasName( B2 ) then - SetName( B, Concatenation( Name(B1), "(+)", Name(B2) ) ); - fi; - firstB := [ 1, 1 + Dimension( B1 ) ]; - SetDirectSumOfAlgebrasInfo( B, - rec( algebras := [ B1, B2 ], - first := firstB, - embeddings := [ ], - projections := [ ] ) ); - eB1 := Embedding( B, 1 ); - imB1 := List( [1..nB1], i -> ImageElm( eB1, basB1[i] ) ); - eB2 := Embedding( B, 2 ); - imB2 := List( [1..nB2], j -> ImageElm( eB2, basB2[j] ) ); - basB := Concatenation( imB1, imB2 ); - basC := ListWithIdenticalEntries( nC1+nC2, 0 ); - zB := Zero( B ); - zB1 := List( [1..nB1], i -> zB ); - zB2 := List( [1..nB2], i -> zB ); - for i in [1..nC1] do - ## c := ImageElm( act1, basA1[i] ); - c := basC1[i]; - imc := List( basB1, b -> ImageElm( eB1, ImageElm( c, b ) ) ); - imc := Concatenation( imc, zB2 ); - hom := LeftModuleHomomorphismByImages( B, B, basB, imc ); - if ( hom = fail ) then - Print( "!!! hom = fail !!!\n" ); - fi; - basC[i] := hom; - od; - for i in [1..nC2] do - ## c := ImageElm( act2, basA2[i] ); - c := basC2[i]; - imc := List( basB2, b -> ImageElm( eB2, ImageElm( c, b ) ) ); - imc := Concatenation( zB1, imc ); - hom := LeftModuleHomomorphismByImages( B, B, basB, imc ); - basC[nC1+i] := hom; - od; - - C := AlgebraByGenerators( domA, basC ); - act := AlgebraGeneralMappingByImages( A, C, basA, basC ); - SetIsAlgebraAction( act, true ); - SetAlgebraActedOn( act, B ); - SetAlgebraActionType( act, "direct sum" ); - return act; -end ); - -############################################################################# -## -#M DirectSumOfXModAlgebras -## -InstallMethod( DirectSumOfXModAlgebras, "for two crossed modules", true, - [ IsXModAlgebra, IsXModAlgebra ], 0, -function( X1, X2 ) - local bdy1, act1, bdy2, act2, bdy, act, X12; - bdy1 := Boundary( X1 ); - act1 := XModAlgebraAction( X1 ); - bdy2 := Boundary( X2 ); - act2 := XModAlgebraAction( X2 ); - bdy := DirectSumOfAlgebraHomomorphisms( bdy1, bdy2 ); - act := DirectSumOfAlgebraActions( act1, act2 ); - X12 := PreXModAlgebraByBoundaryAndActionNC( bdy, act ); - SetIsXModAlgebra( X12, true ); - return X12; -end ); diff --git a/lib/vspchom.gi b/lib/vspchom.gi index 97b1379..8a4aa81 100644 --- a/lib/vspchom.gi +++ b/lib/vspchom.gi @@ -59,4 +59,3 @@ BindGlobal( "MakeImagesInfoLinearGeneralMappingByImages", function( map ) fi; end ); - diff --git a/tst/module.tst b/tst/module.tst index aa56c66..5c5f7e5 100644 --- a/tst/module.tst +++ b/tst/module.tst @@ -2,7 +2,7 @@ ## #W module.tst XModAlg test files Chris Wensley ## -#@local level,m3,A3,c3,Rc3,g3,mg3,Amg3,homg3,actg3,bdy3,X3,V3,M3,famM3,v3,genM3,u4,D3,T3,B3a,B3,M2B3,B2M3,act3,a3,X4,C4,A3Rc3,hom33,actMA3,act4,act5,A5,B5,em3,ea3 +#@local level,m3,A3,c3,Rc3,g3,mg3,Amg3,homg3,actg3,bdy3,X3,V3,M3,famM3,v3,genM3,u4,D3,T3,B3a,B3,M2B3,B2M3,act3,a3,X4,C4,A3Rc3,hom33a,hom33b,actMA3,act4,act5,A5,B5,em3,ea3 gap> START_TEST( "XModAlg package: module.tst" ); gap> level := InfoLevel( InfoXModAlg );; @@ -24,25 +24,6 @@ gap> actg3 := AlgebraActionByHomomorphism( homg3, Rc3 ); [ [ (1)*(), (1)*(1,2,3), (1)*(1,3,2) ] -> [ (1)*(1,2,3), (1)*(1,3,2), (1)*() ] ] -## Section 4.1.7 -gap> homg3 := AlgebraHomomorphismByImages( A3, Amg3, [ 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> 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 ] ] ] - ## Section 2.3 gap> V3 := Rationals^3;; gap> M3 := LeftAlgebraModule( A3, \*, V3 );; @@ -112,48 +93,27 @@ Basis( A(M3), [ [[ 1, 0, 0 ]], [[ 0, 1, 0 ]], [[ 0, 0, 1 ]] ] ) -> gap> Image( act3 ); -## Section 4.1.8 -gap> X4 := XModAlgebraByModule( A3, M3 ); -[A(M3)->A3] -gap> XModAlgebraAction( X4 ) = act3; -true -gap> Display( X4 ); -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 ] ] ] - -## Section 5.1.1 -gap> C4 := Cat1AlgebraOfXModAlgebra( X4 ); -[A3 |X A(M3) -> A3] -gap> Display( C4 ); -Cat1-algebra [A3 |X A(M3)=>A3] :- -: range algebra has generators: - [ [ [ 0, 1, 0 ], [ 0, 0, 1 ], [ 1, 0, 0 ] ] ] -: tail homomorphism = head homomorphism - they map the 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 ] ] ] -: range embedding maps range generators to: - [ v.1 ] -: kernel has generators: - [ v.4, v.5, v.6 ] - ## Section 2.4.1 -gap> A3Rc3 := DirectSumOfAlgebras( A3, Rc3 );; +gap> A3Rc3 := DirectSumOfAlgebrasWithInfo( A3, Rc3 );; gap> SetName( A3Rc3, Concatenation( Name(A3), "(+)", Name(Rc3) ) ); -gap> SetDirectSumOfAlgebrasInfo( A3Rc3, -> rec( algebras := [A3,Rc3], first := [1,Dimension(A3)+1], -> embeddings := [ ], projections := [ ] ) );; +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) ] ] ) ## Section 2.4.2 gap> Embedding( A3Rc3, 1 ); @@ -164,46 +124,6 @@ gap> Projection( A3Rc3, 2 ); CanonicalBasis( A3(+)GR(c3) ) -> [ of ..., of ..., of ..., (1)*(), (1)*(1,2,3), (1)*(1,3,2) ] -## Section 2.4.3 -gap> hom33 := DirectSumOfAlgebraHomomorphisms( homg3, homg3 );; -gap> Print( hom33, "\n" ); -AlgebraHomomorphismByImages( A3(+)A3, Algebra( Rationals, -[ v.1, v.2, v.3, v.4, v.5, v.6 ] ), -[ [ [ 0, 1, 0, 0, 0, 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, 0, 0 ], [ 0, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0 ], - [ 0, 0, 0, 0, 1, 0 ], [ 0, 0, 0, 0, 0, 1 ], [ 0, 0, 0, 1, 0, 0 ] ] ], -[ v.1, v.4 ] ) - -## Section 2.4.4 -gap> actMA3 := AlgebraActionByMultipliers( A3, A3, A3 );; -gap> act4 := AlgebraActionOnDirectSum( actMA3, actg3 ); -[ [ [ 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 ] ] - -## Section 2.4.5 -gap> act5 := DirectSumOfAlgebraActions( actg3, act3 );; -gap> A5 := Source( act5 ); -A3(+)A3 -gap> B5 := AlgebraActedOn( act5 ); -GR(c3)(+)A(M3) -gap> em3 := ImageElm( Embedding( A5, 1 ), m3 ); -[ [ 0, 1, 0, 0, 0, 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 ] ] -gap> ImageElm( act5, em3 ); -Basis( GR(c3)(+)A(M3), [ v.1, v.2, v.3, v.4, v.5, v.6 ] ) -> -[ v.2, v.3, v.1, 0*v.1, 0*v.1, 0*v.1 ] -gap> ea3 := ImageElm( Embedding( A5, 2 ), a3 ); -[ [ 0, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0 ], - [ 0, 0, 0, 0, 2, 3 ], [ 0, 0, 0, 3, 0, 2 ], [ 0, 0, 0, 2, 3, 0 ] ] -gap> ImageElm( act5, ea3 ); -Basis( GR(c3)(+)A(M3), [ v.1, v.2, v.3, v.4, v.5, v.6 ] ) -> -[ 0*v.1, 0*v.1, 0*v.1, (3)*v.5+(2)*v.6, (2)*v.4+(3)*v.6, (3)*v.4+(2)*v.5 ] - gap> SetInfoLevel( InfoXModAlg, level );; gap> STOP_TEST( "module.tst", 10000 ); diff --git a/tst/xmod.tst b/tst/xmod.tst index 01b41e1..3701deb 100644 --- a/tst/xmod.tst +++ b/tst/xmod.tst @@ -2,7 +2,7 @@ ## #W xmod.tst XModAlg test files Z. Arvasi - A. Odabas ## -#@local level,m2,A2,S2,nat2,Q2,m3,A3,c3,Rc3,g3,mg3,Amg3,homg3,actg3,V3,M3,act3,F5,id5,two,z5,n0,n1,n2,An,Bn,actn,Xn,Ak4,IAk4,XIAk4,XAn,X2,bdy3,X3,Y3,XY3,e4,Je4,Ke4,Se4,c4,Ac4,IAc4,XIAc4,Bk4,IBk4,XIBk4,homIAIB,theta,homAB,phi,mor,Xmor,ic4,e1,e2,immor +#@local level,m2,A2,S2,nat2,Q2,m3,A3,c3,Rc3,g3,mg3,Amg3,homg3,actg3,V3,M3,act3,F5,id5,two,z5,n0,n1,n2,An,Bn,actn,Xn,Ak4,IAk4,XIAk4,XAn,X2,bdy3,X3,Y3,e4,Je4,Ke4,Se4,c4,Ac4,IAc4,XIAc4,Bk4,IBk4,XIBk4,homIAIB,theta,homAB,phi,mor,Xmor,ic4,e1,e2,immor gap> START_TEST( "XModAlg package: xmod.tst" ); gap> level := InfoLevel( InfoXModAlg );; @@ -146,11 +146,6 @@ Crossed module [A(M3) -> A3] :- [ [ 0, 0, 0 ], [ 0, 0, 0 ], [ 0, 0, 0 ] ], [ [ 0, 0, 0 ], [ 0, 0, 0 ], [ 0, 0, 0 ] ] ] -############################ -## Section 4.1.9 -gap> XY3 := DirectSumOfXModAlgebras( X3, Y3 ); -[ GR(c3)(+)A(M3) -> A3(+)A3 ] - ############################ ## Section 4.1.10 gap> e4 := Elements( IAk4 )[4]; From 99d3f17ce348ee93324b2fb245dfb61cb3cd4e19 Mon Sep 17 00:00:00 2001 From: cdwensley Date: Fri, 31 Jan 2025 18:50:32 +0000 Subject: [PATCH 2/3] release of version 1.28 --- CHANGES.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 72e141b..de86926 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,9 +1,9 @@ # CHANGES to the 'XModAlg' package ## 1.27 -> 1.28 (31/01/25) - * (31/01/25) added Nizar Shammu's thesis to the list of references - removed all operations involving direct sums of crossed modules - of algebras because the theoretical basis needs checking + * (31/01/25) removed all operations involving direct sums of crossed modules + of algebras because the theoretical basis needs checking; + added Nizar Shammu's thesis to the list of references ## 1.26 -> 1.27 (26/10/24) * (21/10/24) removed references to "Type2" and "XModAlgebraConst" From ff07378f720204a15261643dbf39d9a24a6673c8 Mon Sep 17 00:00:00 2001 From: cdwensley Date: Fri, 31 Jan 2025 18:57:30 +0000 Subject: [PATCH 3/3] release of version 1.28 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7cd914a..44c1fec 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ This package allows for computation with crossed modules of commutative algebras ## Copyright -The 'XModAlg' package is Copyright © Zekeriya Arvasi and Alper Odabas et al, 2014--2022. +The 'XModAlg' package is Copyright © Zekeriya Arvasi and Alper Odabas et al, 2014--2025. 'XModAlg' is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by