Skip to content

Commit

Permalink
Merge pull request #75 from cdwensley/actions
Browse files Browse the repository at this point in the history
added operations for a module as an algebra
  • Loading branch information
cdwensley authored Jun 17, 2024
2 parents e4cf5d1 + c751e2e commit b721bd1
Show file tree
Hide file tree
Showing 22 changed files with 1,051 additions and 476 deletions.
8 changes: 4 additions & 4 deletions PackageInfo.g
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ SetPackageInfo( rec(

PackageName := "XModAlg",
Subtitle := "Crossed Modules and Cat1-Algebras",
Version := "1.25",
Date := "17/05/2024", # dd/mm/yyyy format
Version := "1.25dev",
Date := "17/06/2024", # dd/mm/yyyy format
License := "GPL-2.0-or-later",

Persons := [
Expand Down Expand Up @@ -81,7 +81,7 @@ PackageDoc := rec(
),

Dependencies := rec(
GAP := ">=4.11.0",
GAP := ">=4.12.0",
NeededOtherPackages := [ ["XMod", ">=2.87"],
["LAGUNA", ">=3.9.3"] ],
SuggestedOtherPackages := [ ],
Expand All @@ -107,7 +107,7 @@ Keywords := ["crossed module of algebras", "cat1-algebra"],
AutoDoc := rec(
TitlePage := rec(
Copyright := Concatenation(
"&copyright; 2014-2022, Zekeriya Arvasi and Alper Odabas. <P/>\n",
"&copyright; 2014-2024, Zekeriya Arvasi and Alper Odabas. <P/>\n",
"The &XModAlg; package is free software; you can redistribute it ",
"and/or modify it under the terms of the GNU General ",
"Public License as published by the Free Software Foundation; ",
Expand Down
12 changes: 10 additions & 2 deletions doc/algebra.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!-- -->
<!-- algebra.xml XModAlg documentation Z. Arvasi -->
<!-- & A. Odabas -->
<!-- Copyright (C) 2014-2024, Z. Arvasi & A. Odabas, -->
<!-- Copyright (C) 2014-2024, Z. Arvasi & A. Odabas, -->
<!-- Osmangazi University, Eskisehir, Turkey -->
<!-- -->
<!-- ------------------------------------------------------------------- -->
Expand Down Expand Up @@ -305,7 +305,15 @@ gap> [ Image(b2,m)=m^3, b2=b1^2 ];
</Example>


<!-- Add other actions here? -->
<#Include Label="AlgebraModules">

<#Include Label="ModuleAsAlgebra">

<#Include Label="IsModuleAsAlgebra">

<#Include Label="ModuleToAlgebraIsomorphism">

<#Include Label="AlgebraActionByModule">


<ManSection>
Expand Down
8 changes: 6 additions & 2 deletions doc/cat1.xml
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,12 @@ are used with particular choices of algebra homomorphisms.
Arg="C" />
<Attr Name="Boundary" Label="for cat1-algebras"
Arg="C" />
<Attr Name="Size2d" Label="for cat1-algebras"
<Attr Name="Size2d" Label="for 2d-algebras"
Arg="C" />
<Attr Name="Dimension" Label="for 2d-algebras"
Arg="C" />
<Description>
These are the eight main attributes of a pre-cat<M>^{1}</M>-algebra.
These are the nine main attributes of a pre-cat<M>^{1}</M>-algebra.
<P/>
In the example we use homomorphisms between <C>A2c6</C> and <C>I2c6</C>
constructed in section <Ref Sect="algebra-homomorphism-lists"/>.
Expand All @@ -131,6 +133,8 @@ gap> IsCat1Algebra( C4 );
true
gap> Size2d( C4 );
[ 64, 8 ]
gap> Dimension( C4 );
[ 6, 3 ]
gap> Display( C4 );
Cat1-algebra [..=>..] :-
Expand Down
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
41 changes: 16 additions & 25 deletions doc/xmod.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!-- -->
<!-- xmod.xml XModAlg documentation Z. Arvasi -->
<!-- & A. Odabas -->
<!-- Copyright (C) 2014-2022, Z. Arvasi & A. Odabas, -->
<!-- Copyright (C) 2014-2024, Z. Arvasi & A. Odabas, -->
<!-- Osmangazi University, Eskisehir, Turkey -->
<!-- -->
<!-- ------------------------------------------------------------------- -->
Expand Down Expand Up @@ -215,8 +215,9 @@ gap> SetName( S, "<e5>" );
gap> RS := Cartesian( R, S );;
gap> SetName( RS, "GF(2^2)[k4] x <e5>" );
gap> act := AlgebraAction( R, RS, S );;
gap> bdy := AlgebraHomomorphismByFunction( S, R, r->r );
MappingByFunction( <e5>, GF(2^2)[k4], function( r ) ... end )
gap> bdy := AlgebraHomomorphismByImages( S, R, [e5], [e5] );
[ (Z(2)^0)*<identity> of ...+(Z(2)^0)*f1+(Z(2)^0)*f2+(Z(2)^0)*f1*f2 ] ->
[ (Z(2)^0)*<identity> of ...+(Z(2)^0)*f1+(Z(2)^0)*f2+(Z(2)^0)*f1*f2 ]
gap> IsAlgebraAction( act );
true
gap> IsAlgebraHomomorphism( bdy );
Expand All @@ -238,24 +239,7 @@ Crossed module [<e5>->GF(2^2)[k4]] :-
]]>
</Example>

<ManSection>
<Oper Name="XModAlgebraByModule"
Arg="M R" />
<Description>
Let <M>M</M> be a <M>R</M>-module.
Then <M>\mathcal{X} = (0:M\rightarrow R)</M> is a crossed module.
Conversely, given a crossed module
<M>\mathcal{X} = (\partial :M\rightarrow R)</M>,
one can get that <M>\ker\partial</M> is a <M>(R/\partial M)</M>-module.
<P/>
</Description>
</ManSection>

<Example>
<![CDATA[
gap> ## example needed
]]>
</Example>
<#Include Label="XModAlgebraByModule">

<ManSection>
<Attr Name="Source" Label="for crossed modules of commutative algebras"
Expand Down Expand Up @@ -290,9 +274,13 @@ The following standard &GAP; operations have special &XModAlg; implementations:
<C>Display(X)</C> is used to list the components of <M>\mathcal{X}</M>;
</Item>
<Item>
<C>Size2d(X)</C> is used for calculating the order of the
crossed module <M>\mathcal{X}</M>;
</Item>
<C>Size2d(X)</C> for a crossed module <M>\mathcal{X}</M>
returns a <M>2</M>-element list, the sizes of the source and range,
</Item>
<Item>
<C>Dimension(X)</C> for a crossed module <M>\mathcal{X}</M>
returns a <M>2</M>-element list, the dimensions of the source and range,
</Item>
<Item>
<C>Name(X)</C> is used for giving a name to the crossed module
<M>\mathcal{X}</M> by associating the names of source and range algebras.
Expand All @@ -309,7 +297,10 @@ We also show usage of the attributes listed above.
<Example>
<![CDATA[
gap> f := Boundary( XIAk4 );
MappingByFunction( I(GF5[k4]), GF5[k4], function( i ) ... end )
[ (Z(5)^2)*<identity> of ...+(Z(5)^0)*f1, (Z(5)^2)*<identity> of ...\
+(Z(5)^
0)*f2 ] -> [ (Z(5)^2)*<identity> of ...+(Z(5)^0)*f1,
(Z(5)^2)*<identity> of ...+(Z(5)^0)*f2 ]
gap> Print( RepresentationsOfObject(XIAk4), "\n" );
[ "IsComponentObjectRep", "IsAttributeStoringRep", "IsPreXModAlgebraObj" ]
gap> props := [ "CanEasilyCompareElements", "CanEasilySortElements",
Expand Down
58 changes: 33 additions & 25 deletions examples/cat1.g
Original file line number Diff line number Diff line change
@@ -1,24 +1,30 @@
#############################################################################
############################################################################
##
#W cat1.g XMODALG example files Zekeriya Arvasi
#W & Alper Odabas
#Y Copyright (C) 2014-2018, Zekeriya Arvasi & Alper Odabas,
#W cat1.g XMODALG example files Zekeriya Arvasi
#W & Alper Odabas
#Y Copyright (C) 2014-2024, Zekeriya Arvasi & Alper Odabas,
##

Print("\nXModAlg test file cat1.g (version 10/11/15) :-");
Print("\nXModAlg test file cat1.g :-");
Print("\ntesting constructions of cat1-algebras\n\n");

A := GroupRing(GF(2),Group((1,2,3)(4,5)));
R := GroupRing(GF(2),Group((1,2,3)));
f := AllHomsOfAlgebras(A,R);
g := AllHomsOfAlgebras(R,A);
C4 := PreCat1Obj(f[6],f[6],g[8]);
IsCat1Algebra(C4);
Size(C4);
Display(C4);
LoadPackage( "xmodalg" );

A := GroupRing( GF(2), Group((1,2,3)(4,5)) );
SetName( A, "GF(2)[c6]" );
R := GroupRing( GF(2), Group( (1,2,3) ) );
SetName( R, "GF(2)[c3]" );
f := AllAlgebraHomomorphisms( A, R );
g := AllAlgebraHomomorphisms( R, A );
C4 := PreCat1AlgebraObj( f[6], f[6], g[8] );
IsCat1Algebra( C4 );
Size2d( C4 );
Dimension( C4 );
Display( C4 );

C2 := Cat1AlgebraSelect( 4, 6, 2, 2 );
Size( C2 );
Size2d( C2 );
Dimension(C2);
Display( C2 );
C := Cat1AlgebraSelect(11);
C := Cat1AlgebraSelect(4,12);
Expand Down Expand Up @@ -47,17 +53,19 @@ SetName( R, "GF(2^2)[k4]" );
e5 := Elements(R)[5];
S := Subalgebra( R, [e5] );
SetName( S, "<e5>" );
RS := Cartesian( R, S );;
SetName( RS, "GF(2^2)[k4] x <e5>" );
act := AlgebraAction( R, RS, S );;
bdy := AlgebraHomomorphismByFunction( S, R, r->r );
IsAlgebraAction( act );
IsAlgebraHomomorphism( bdy );
XM := PreXModAlgebraByBoundaryAndAction( bdy, act );
CXM := Cat1AlgebraByXModAlgebra( XM );
Display(CXM);
X3 := XModAlgebraByCat1Algebra( C3 );
Display( X3 );

## the following may be included once AlgebraAction2 has been fixed
## RS := Cartesian( R, S );;
## SetName( RS, "GF(2^2)[k4] x <e5>" );
## act := AlgebraAction( R, RS, S );;
## bdy := AlgebraHomomorphismByImages( S, R, [e5], [e5] );
## IsAlgebraAction( act );
## IsAlgebraHomomorphism( bdy );
## XM := PreXModAlgebraByBoundaryAndAction( bdy, act );
## CXM := Cat1AlgebraByXModAlgebra( XM );
## Display(CXM);
## X3 := XModAlgebraByCat1Algebra( C3 );
## Display( X3 );

#############################################################################
##
Expand Down
73 changes: 73 additions & 0 deletions examples/module3.g
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
############################################################################
##
#W module3.g XModAlg example files Chris Wensley
##

LoadPackage( "xmodalg" );

## Chapter 2, Section 2.2.3
m := [ [0,1,0], [0,0,1], [1,0,0] ];
Print( "m = ", m, "\n" );
A3 := Algebra( Rationals, [m] );
SetName( A3, "A3" );;
V3 := Rationals^3;;
M3 := LeftAlgebraModule( A3, \*, V3 );
SetName( M3, "M3" );
famM3 := ElementsFamily( FamilyObj( M3 ) );;
v := [3,4,5];;
v2 := ObjByExtRep( famM3, v );
Print( "v = ", v, ", v2 = ", v2, "\n" );
Print( "m*v2 = ", m*v2, "\n" );
genM3 := GeneratorsOfLeftModule( M3 );;
u2 := 6*genM3[1] + 7*genM3[2] + 8*genM3[3];
u := ExtRepOfObj( u2 );
Print( "u2 = ", u2, ", u = ", u, "\n" );

## Chapter 2, Section 2.2.4
D3 := LeftActingDomain( M3 );;
T3 := EmptySCTable( Dimension(M3), Zero(D3), "symmetric" );;
B3a := AlgebraByStructureConstants( D3, T3 );
Print( "B3a = ", B3a, "\n" );
Print( "B3a has generators: ", GeneratorsOfAlgebra( B3a ), "\n" );
B3 := ModuleAsAlgebra( M3 );
Print( "B3 has name: ", Name( B3 ), "\n" );
Print( "B3 has generators: ", GeneratorsOfAlgebra( B3 ), "\n" );

## Chapter 2, Section 2.2.5
Print( "IsModuleAsAlgebra( B3 )? ", IsModuleAsAlgebra( B3 ), "\n" );
Print( "IsModuleAsAlgebra( A3 )? ", IsModuleAsAlgebra( A3 ), "\n" );

## Chapter 2, Section 2.2.6
Print( "the known attributes of B3 are:\n" );
Print( KnownAttributesOfObject( B3 ), "\n" );
M2B3 := ModuleToAlgebraIsomorphism( B3 );
Print( "M2B3 = ", M2B3, "\n" );
Print( "Source( M2B3 ) = M3? ", Source( M2B3 ) = M3, "\n" );
Print( "Source( M2B3 ) = V3? ", Source( M2B3 ) = V3, "\n" );
B2M3 := AlgebraToModuleIsomorphism( B3 );
Print( "B2M3 = ", B2M3, "\n" );
Print( "Range( B2M3 ) = M3? ", Range( B2M3 ) = M3, "\n" );
Print( "Range( B2M3 ) = V3? ", Range( B2M3 ) = V3, "\n" );

## Chapter 2, Section 2.2.7
act3 := AlgebraActionByModule( A3, M3 );
Print( "the action act3 of A3 on B3 is:\n", act3, "\n" );
a := 2*m + 3*m^2;
Print( "a = ", a, ":\n" );
Print( "the image of a under act3 is:\n", Image( act3, a ), "\n" );
Print( "the image of the action act3 is:\n", Image( act3 ), "\n" );
Print( "\n" );

## Chapter 4, Section 4.1.7
X3 := XModAlgebraByModule( A3, M3 );
Print( "Name( X3 ) = ", Name( X3 ), "\n" );
Display( X3 );

## Chapter 5, Section 5.1.1
C3 := Cat1AlgebraOfXModAlgebra( X3 );
Print( "Name( C3 ) = ", Name( C3 ), "\n" );
Display( C3 );

############################################################################
##
#E module3.g . . . . . . . . . . . . . . . . . . . . . . . . . . ends here
Loading

0 comments on commit b721bd1

Please sign in to comment.