Skip to content

Commit

Permalink
fixed some minor details
Browse files Browse the repository at this point in the history
  • Loading branch information
cdwensley committed Jun 15, 2024
1 parent 11ccf0b commit c3e5734
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 30 deletions.
5 changes: 4 additions & 1 deletion examples/module3.g
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ 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" );
genA3 := GeneratorsOfAlgebra( A3 );;
a := 2*m + 3*m^2;
Print( "a = ", a, ":\n" );
Print( "the image of a under act3 is:\n", Image( act3, a ), "\n" );
Expand All @@ -64,6 +63,10 @@ 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 );

############################################################################
##
Expand Down
16 changes: 8 additions & 8 deletions lib/alg2obj.gi
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ InstallMethod( ViewObj, "method for a pre-crossed module of algebras", true,
Pact := XModAlgebraAction( PM );
if IsLeftModuleGeneralMapping( Pact ) then
## temporary fix (20/03/18)
## Print( "[", Source( PM ), "->", Range( PM ), "]" );
## Print( "[", Source( PM ), " -> ", Range( PM ), "]" );
Print( "[ " );
ViewObj( Source( PM ) );
Print( " -> " );
Expand All @@ -213,20 +213,20 @@ InstallMethod( ViewObj, "method for a pre-crossed module of algebras", true,
type := AlgebraActionType( Pact );
# Type 1
if (type = "multiplier") then
Print( "[", Source( PM ), "->", Range( PM ), "]" );
Print( "[", Source( PM ), " -> ", Range( PM ), "]" );

Check warning on line 216 in lib/alg2obj.gi

View check run for this annotation

Codecov / codecov/patch

lib/alg2obj.gi#L216

Added line #L216 was not covered by tests
fi;
# Type 2
if (type = "Type2") then
Print( "[", Source( PM ),
"-> MultiplierAlgebra(", Source( PM ), ")]" );
" -> MultiplierAlgebra(", Source( PM ), ")]" );

Check warning on line 221 in lib/alg2obj.gi

View check run for this annotation

Codecov / codecov/patch

lib/alg2obj.gi#L221

Added line #L221 was not covered by tests
fi;
# Type 3
if (type = "surjection") then
Print( "[", Source( PM ), "->", Range( PM ), "]" );
Print( "[", Source( PM ), " -> ", Range( PM ), "]" );

Check warning on line 225 in lib/alg2obj.gi

View check run for this annotation

Codecov / codecov/patch

lib/alg2obj.gi#L225

Added line #L225 was not covered by tests
fi;
# Type 4
if (type = "module") then
Print( "[", Source( PM ), "->", Range( PM ), "]" );
Print( "[", Source( PM ), " -> ", Range( PM ), "]" );

Check warning on line 229 in lib/alg2obj.gi

View check run for this annotation

Codecov / codecov/patch

lib/alg2obj.gi#L229

Added line #L229 was not covered by tests
fi;
fi;
fi;
Expand Down Expand Up @@ -324,7 +324,7 @@ function( PM )
else
nrng := "..";
fi;
name := Concatenation( "[", nsrc, "->", nrng, "]" );
name := Concatenation( "[", nsrc, " -> ", nrng, "]" );
SetName( PM, name );
return name;
end );
Expand Down Expand Up @@ -993,7 +993,7 @@ function( C1A )
if HasName( C1A ) then
Print( Name( C1A ), "\n" );
else
Print( "[", Source( C1A ), "=>", Range( C1A ), "]" );
Print( "[", Source( C1A ), " => ", Range( C1A ), "]" );

Check warning on line 996 in lib/alg2obj.gi

View check run for this annotation

Codecov / codecov/patch

lib/alg2obj.gi#L996

Added line #L996 was not covered by tests
fi;
end );

Expand Down Expand Up @@ -1106,7 +1106,7 @@ function( C1A )
else
nrng := "..";
fi;
name := Concatenation( "[", nsrc, "=>", nrng, "]" );
name := Concatenation( "[", nsrc, " => ", nrng, "]" );
SetName( C1A, name );
return name;
end );
Expand Down
33 changes: 12 additions & 21 deletions tst/module3.tst
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
############################################################################
##
#W module3.tst XModAlg test files Chris Wensley
##
#W module3.tst XModAlg test files Chris Wensley
##
#@local level,m,A3,V3,M3,famM3,v,v2,genM3,u2,u,D3,T3,B3a,B3,M2B3,B2M3,act3,genA3,a
gap> START_TEST( "XModAlg package: module.tst" );
#@local level,m,A3,V3,M3,famM3,v,v2,genM3,u2,u,D3,T3,B3a,B3,M2B3,B2M3,act3,a,X3,C3

gap> START_TEST( "XModAlg package: module3.tst" );
gap> level := InfoLevel( InfoXModAlg );;
gap> SetInfoLevel( InfoXModAlg, 0 );

## Chapter 2, Section 2.2.3
gap> m := [ [0,1,0], [0,0,1], [1,0,0] ];;
gap> A3 := Rationals^[3,3];;
gap> A3 := Algebra( Rationals, [m] );;
gap> SetName( A3, "A3" );;
gap> V3 := Rationals^3;;
gap> M3 := LeftAlgebraModule( A3, \*, V3 );;
Expand Down Expand Up @@ -68,24 +68,17 @@ true

## Chapter 2, Section 2.2.7
gap> act3 := AlgebraActionByModule( A3, M3 );
[ [ [ 1, 0, 0 ], [ 0, 1, 0 ], [ 0, 0, 1 ] ],
[ [ 1, 0, 0 ], [ 0, 0, 0 ], [ 0, 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 ]] ],
[ [[ 1, 0, 0 ]], [[ 0, 1, 0 ]], [[ 0, 0, 1 ]] ] ->
[ [[ 1, 0, 0 ]], 0*[[ 1, 0, 0 ]], 0*[[ 1, 0, 0 ]] ],
[ [[ 1, 0, 0 ]], [[ 0, 1, 0 ]], [[ 0, 0, 1 ]] ] ->
[ [[ 0, 1, 0 ]], [[ 0, 0, 1 ]], [[ 1, 0, 0 ]] ] ]
gap> genA3 := GeneratorsOfAlgebra( A3 );;
[ [ [ 0, 1, 0 ], [ 0, 0, 1 ], [ 1, 0, 0 ] ] ] ->
[ [ [[ 1, 0, 0 ]], [[ 0, 1, 0 ]], [[ 0, 0, 1 ]] ] ->
[ [[ 0, 0, 1 ]], [[ 1, 0, 0 ]], [[ 0, 1, 0 ]] ] ]
gap> a := 2*m + 3*m^2;
[ [ 0, 2, 3 ], [ 3, 0, 2 ], [ 2, 3, 0 ] ]
gap> Image( act3, a );
Basis( A(M3), [ [[ 1, 0, 0 ]], [[ 0, 1, 0 ]], [[ 0, 0, 1 ]] ] ) ->
[ (3)*[[ 0, 1, 0 ]]+(2)*[[ 0, 0, 1 ]], (2)*[[ 1, 0, 0 ]]+(3)*[[ 0, 0, 1 ]],
(3)*[[ 1, 0, 0 ]]+(2)*[[ 0, 1, 0 ]] ]
gap> Image( act3 );
<algebra over Rationals, with 3 generators>
<algebra over Rationals, with 1 generator>

## Chapter 4, Section 4.1.7
gap> X3 := XModAlgebraByModule( A3, M3 );
Expand All @@ -96,17 +89,15 @@ 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:
[ [ [ 1, 0, 0 ], [ 0, 1, 0 ], [ 0, 0, 1 ] ],
[ [ 1, 0, 0 ], [ 0, 0, 0 ], [ 0, 0, 0 ] ],
[ [ 0, 0, 1 ], [ 1, 0, 0 ], [ 0, 1, 0 ] ] ]
[ [ [ 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 ] ] ]

## Chapter 5, Section 5.1.1
gap> C3 := Cat1AlgebraOfXModAlgebra( X3 );
[A3 |X A(M3)=>A3]
[A3 |X A(M3) -> A3]
gap> Display( C3 );
Cat1-algebra [A3 |X A(M3)=>A3] :-
: range algebra has generators:
Expand All @@ -125,7 +116,7 @@ Cat1-algebra [A3 |X A(M3)=>A3] :-
[ v.4, v.5, v.6 ]

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

############################################################################
##
Expand Down

0 comments on commit c3e5734

Please sign in to comment.