Skip to content

Commit

Permalink
added second example of Cat1AlgebraOfXModAlgebra to Ch.5
Browse files Browse the repository at this point in the history
  • Loading branch information
cdwensley committed Jun 15, 2024
1 parent 11c521b commit 11ccf0b
Show file tree
Hide file tree
Showing 9 changed files with 164 additions and 55 deletions.
39 changes: 32 additions & 7 deletions doc/convert.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!-- -->
<!-- convert.xml XModAlg documentation Z. Arvasi -->
<!-- & A. Odabas -->
<!-- Copyright (C) 2014-2021, Z. Arvasi & A. Odabas, -->
<!-- Copyright (C) 2014-2024, Z. Arvasi & A. Odabas, -->
<!-- Osmangazi University, Eskisehir, Turkey -->
<!-- -->
<!-- ------------------------------------------------------------------- -->
Expand Down Expand Up @@ -65,18 +65,16 @@ instead of the operation <Ref Oper="Cat1AlgebraSelect"/>.
These operations are used for constructing a cat<M>^{1}</M>-algebra
from a given crossed module of algebras.
As an example we use the crossed module <C>XAB</C> constructed in
<Ref Oper="XModAlgebraByIdeal"/>
(The output from <C>Display</C> needs to be improved.)
<Ref Oper="XModAlgebraByIdeal"/>.
</Description>
</ManSection>

<Example>
<![CDATA[
gap> CAB := Cat1AlgebraOfXModAlgebra( XAB );
[Algebra( GF(5), [ v.1, v.2, v.3, v.4, v.5 ] ) -> A(l,m)]
[A(l,m) |X A(m)=>A(l,m)]
gap> Display( CAB );
Cat1-algebra [..=>A(l,m)] :-
Cat1-algebra [A(l,m) |X A(m)=>A(l,m)] :-
: range algebra has generators:
[
Expand All @@ -85,13 +83,40 @@ Cat1-algebra [..=>A(l,m)] :-
[ [ 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:
Algebra( GF(5), [ v.4, v.5 ] )
[ v.4, v.5 ]
]]>
</Example>

<#Include Label="Cat1AlgebraOfXModAlgebra">

<ManSection>
<Oper Name="XModAlgebraOfCat1Algebra"
Arg="C" />
Expand Down
7 changes: 3 additions & 4 deletions init.g
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#############################################################################
############################################################################
##
#W init.g The XMODALG package Zekeriya Arvasi
#W & Alper Odabas
#Y Copyright (C) 2014-2022, Zekeriya Arvasi & Alper Odabas,
#W & Alper Odabas
#Y Copyright (C) 2014-2024, Zekeriya Arvasi & Alper Odabas,
##

if not IsBound( PreImagesRepresentativeNC ) then
Expand All @@ -14,4 +14,3 @@ ReadPackage( "xmodalg", "lib/algebra.gd" );
ReadPackage( "xmodalg", "lib/module.gd" );
ReadPackage( "xmodalg", "lib/alg2obj.gd" );
ReadPackage( "xmodalg", "lib/alg2map.gd" );

56 changes: 31 additions & 25 deletions lib/alg2obj.gi
Original file line number Diff line number Diff line change
Expand Up @@ -505,10 +505,6 @@ InstallGlobalFunction( XModAlgebra, function( arg )
if ( ( nargs = 2 ) and IsAlgebraHomomorphism( arg[1] )
and IsAlgebraAction( arg[2] ) ) then
return XModAlgebraByBoundaryAndAction( arg[1], arg[2] );
# module
elif ( ( nargs = 2 ) and IsAlgebra( arg[1] )
and IsLeftModule( arg[2] ) ) then
return XModAlgebraByModule( arg[1], arg[2] );
# ideal
elif ( ( nargs = 2 ) and IsAlgebra( arg[1] )
and IsAlgebra( arg[2] ) and IsIdeal(arg[1],arg[2]) ) then
Expand All @@ -523,9 +519,14 @@ InstallGlobalFunction( XModAlgebra, function( arg )
# Multiplier algebra
elif ( ( nargs = 1 ) and IsAlgebra( arg[1] )) then
return XModAlgebraByMultiplierAlgebra( arg[1] );
# module
elif ( ( nargs = 2 ) and IsAlgebra( arg[1] )
and IsLeftModule( arg[2] ) ) then
return XModAlgebraByModule( arg[1], arg[2] );
else
# alternatives not allowed
Error( "usage: XModAlgebra( bdy, act ); " );
fi;
# alternatives not allowed
Error( "usage: XModAlgebra( bdy, act ); " );
end );

############################################################################
Expand Down Expand Up @@ -1005,29 +1006,40 @@ InstallOtherMethod( Display, "display a pre-cat1-algebra",
function( C1A )

local Csrc, Crng, Cker, gensrc, genrng, genker, name,
t, h, e, b, k, imt, imh, ime, imb, imk;
t, h, e, b, k, imt, imh, ime, imb, imk, eqth;

name := Name( C1A );
Csrc := Source( C1A );
gensrc := GeneratorsOfAlgebra( Csrc );
Crng := Range( C1A );
Cker := Kernel( C1A );
genrng := GeneratorsOfAlgebra( Crng );
Cker := Kernel( C1A );
genker := GeneratorsOfAlgebra( Cker );
t := TailMap( C1A );
h := HeadMap( C1A );
e := RangeEmbedding( C1A );
e := RangeEmbedding( C1A );
imt := List( gensrc, x -> Image( t, x ) );
imh := List( gensrc, x -> Image( h, x ) );
eqth := imt = imh;
ime := List( genrng, x -> Image( e, x ) );
if HasXModAlgebraOfCat1Algebra(C1A) then
gensrc := Csrc;
genker := Cker;
if IsCat1Algebra( C1A ) then
Print( "\nCat1-algebra ", name, " :- \n" );
Print( "Cat1-algebra ", name, " :- \n" );
else
Print( "\nPre-cat1-algebra ", name, " :- \n" );
Print( "Pre-cat1-algebra ", name, " :- \n" );
fi;
ime := List( genrng, x -> Image( e, x ) );

Print( ": range algebra has generators:\n" );
Print( " ", genrng, "\n" );
Print( ": tail homomorphism maps source generators to:\n" );
if eqth then
Print( ": tail homomorphism = head homomorphism\n" );
Print( " they map the source generators to:\n" );
Print( " ", imt, "\n" );
else
Print( ": tail homomorphism maps source generators to:\n" );
Print( " ", imt, "\n" );
Print( ": head homomorphism maps source generators to:\n" );
Print( " ", imh, "\n" );
fi;
Print( ": range embedding maps range generators to:\n" );
Print( " ", ime, "\n" );
if ( Size( Cker ) = 1 ) then
Expand All @@ -1038,19 +1050,14 @@ function( C1A )
fi;
else
b := Boundary( C1A );
gensrc := GeneratorsOfAlgebra( Csrc );
genker := GeneratorsOfAlgebra( Cker );
k := KernelEmbedding( C1A );
imt := List( gensrc, x -> Image( t, x ) );
imh := List( gensrc, x -> Image( h, x ) );
ime := List( genrng, x -> Image( e, x ) );
imb := List( genker, x -> Image( b, x ) );
imk := List( genker, x -> Image( k, x ) );

if IsCat1Algebra( C1A ) then
Print( "\nCat1-algebra ", name, " :- \n" );
Print( "Cat1-algebra ", name, " :- \n" );
else
Print( "\nPre-cat1-algebra ", name, " :- \n" );
Print( "Pre-cat1-algebra ", name, " :- \n" );
fi;
Print( ": source algebra has generators:\n" );
Print( " ", gensrc, "\n" );
Expand All @@ -1077,7 +1084,6 @@ function( C1A )
# Print( ": associated crossed module is ",
# XModAlgebraOfCat1Algebra( C1A ), "\n" );
# fi;
Print( "\n" );
end );

############################################################################
Expand Down Expand Up @@ -1757,7 +1763,7 @@ function( XM )
h := AlgebraHomomorphismByImages( P, R, vecP, imgs );
t := Projection( P, 1 );
e := Embedding( P, 1 );
C := PreCat1AlgebraObj( t, h, e );
C := PreCat1AlgebraObj( t, h, e );
return C;
end );

Expand Down
5 changes: 4 additions & 1 deletion lib/algebra.gi
Original file line number Diff line number Diff line change
Expand Up @@ -780,7 +780,10 @@ InstallMethod( SemidirectProductOfAlgebras,
SetEntrySCTable( T, i+n1, j+n1, L );
od;
od;
P := AlgebraByStructureConstants( F, T );
P := AlgebraByStructureConstants( F, T );
if HasName( A1 ) and HasName( A2 ) then
SetName( P, Concatenation( Name( A1 ), " |X ", Name( A2 ) ) );
fi;
SetSemidirectProductOfAlgebrasInfo( P, rec( algebras := [ A1, A2 ],
action := act,
embeddings := [ ],
Expand Down
49 changes: 42 additions & 7 deletions lib/module.gd
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@
## [ 3, 4, 5 ]
## gap> m*v2;
## [ 4, 5, 3 ]
gap> genM3 := GeneratorsOfLeftModule( M3 );;
gap> u2 := 6*genM3[1] + 7*genM3[2] + 8*genM3[3];
[ 6, 7, 8 ]
gap> u := ExtRepOfObj( u2 );
[ 6, 7, 8 ]
## gap> genM3 := GeneratorsOfLeftModule( M3 );;
## gap> u2 := 6*genM3[1] + 7*genM3[2] + 8*genM3[3];
## [ 6, 7, 8 ]
## gap> u := ExtRepOfObj( u2 );
## [ 6, 7, 8 ]
## ]]>
## </Example>
## </Subsection>
Expand Down Expand Up @@ -230,8 +230,8 @@ DeclareOperation( "AlgebraActionByModule", [ IsAlgebra, IsLeftModule ] );
## </ManSection>
## <Example>
## <![CDATA[
## gap> X0 := XModAlgebraByModule( A, M );
## [ A(M) -> Q[3,3] ]
## gap> X3 := XModAlgebraByModule( A3, M3 );
## [ A(M3) -> A3 ]
## gap> Display( X3 );
## Crossed module [A(M3)->A3] :-
## : Source algebra A(M3) has generators:
Expand All @@ -249,3 +249,38 @@ DeclareOperation( "AlgebraActionByModule", [ IsAlgebra, IsLeftModule ] );
## <#/GAPDoc>
##
DeclareOperation( "XModAlgebraByModule", [ IsAlgebra, IsLeftModule ] );

############################################################################
##
## addition to Cat1AlgebraOfXModAlgebra
##
## <#GAPDoc Label="Cat1AlgebraOfXModAlgebra">
## <P/>
## As a second example, we convert the crossed module <M>X3</M>
## constructed in <Ref Sect="XModAlgebraByModule"/>


## <Example>
## <![CDATA[
## gap> C3 := Cat1AlgebraOfXModAlgebra( X3 );
## [A3 |X A(M3)=>A3]
## gap> Display( C3 );
## 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 ]
## ]]>
## </Example>
## <#/GAPDoc>
##
8 changes: 3 additions & 5 deletions read.g
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
#############################################################################
############################################################################
##
#W read.g The XMODALG package Zekeriya Arvasi
#W & Alper Odabas
## version 1.19, 16/05/2021
##
#Y Copyright (C) 2014-2021, Zekeriya Arvasi & Alper Odabas,
#W & Alper Odabas
#Y Copyright (C) 2014-2024, Zekeriya Arvasi & Alper Odabas,
##

## read the actual code
Expand Down
2 changes: 1 addition & 1 deletion tst/algebra.tst
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ gap> Projection( P, 1 );
(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),
<zero> of ..., <zero> of ... ]
gap> P3 := SemidirectProductOfAlgebras( Q13, act3, A1 );
<algebra of dimension 5 over Rationals>
Q13 |X A1
gap> Embedding( P3, 1 );
[ v.1, v.2 ] -> [ v.1, v.2 ]
gap> Embedding( P3, 2 );
Expand Down
33 changes: 28 additions & 5 deletions tst/convert.tst
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,9 @@ gap> C3 := Cat1AlgebraSelect( 2, 6, 2, 4 );;
gap> ############################
gap> ## Chapter 5, Section 5.1.1
gap> CAB := Cat1AlgebraOfXModAlgebra( XAB );
[Algebra( GF(5), [ v.1, v.2, v.3, v.4, v.5 ] ) -> A(l,m)]
[A(l,m) |X A(m) -> A(l,m)]
gap> Display( CAB );

Cat1-algebra [..=>A(l,m)] :-
Cat1-algebra [A(l,m) |X A(m)=>A(l,m)] :-
: range algebra has generators:

[
Expand All @@ -60,11 +59,35 @@ Cat1-algebra [..=>A(l,m)] :-
[ [ 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:
Algebra( GF(5), [ v.4, v.5 ] )

[ v.4, v.5 ]
gap> X3 := XModAlgebraOfCat1Algebra( C3 );
[ <algebra of dimension 3 over GF(2)> -> <algebra of dimension 3 over GF(2)> ]
gap> Display( X3 );
Expand Down
20 changes: 20 additions & 0 deletions tst/module3.tst
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,26 @@ Crossed module [A(M3)->A3] :-
[ [ 0, 0, 0 ], [ 0, 0, 0 ], [ 0, 0, 0 ] ],
[ [ 0, 0, 0 ], [ 0, 0, 0 ], [ 0, 0, 0 ] ] ]

## Chapter 5, Section 5.1.1
gap> C3 := Cat1AlgebraOfXModAlgebra( X3 );
[A3 |X A(M3)=>A3]
gap> Display( C3 );
Cat1-algebra [A3 |X A(M3)=>A3] :-
: 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 ]

gap> SetInfoLevel( InfoXModAlg, level );;
gap> STOP_TEST( "module.tst", 10000 );

Expand Down

0 comments on commit 11ccf0b

Please sign in to comment.