Skip to content

Commit

Permalink
Merge branch 'pr-3' into devel
Browse files Browse the repository at this point in the history
* pr-3:
  applied dos2unix to AssociatorUnitor.g
  HOMALG_MATRICES.PreferDenseMatrices := true; fixed a bug
  some changes
  moved associator example in own file
  example for pentagram diagram and triangle diagram
  • Loading branch information
mohamed-barakat committed Aug 29, 2020
2 parents 8c9f767 + a8d4eb5 commit c1fa9eb
Show file tree
Hide file tree
Showing 2 changed files with 154 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,14 @@
/doc/*.tex
/doc/*.toc
/doc/manual.pdf
/doc/CatReps.synctex.gz

.deps/
.dirstamp
.libs/

texput.log

/aclocal.m4
/autom4te.cache/
/bin/
Expand Down
151 changes: 151 additions & 0 deletions examples/AssociatorUnitor.g
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
LoadPackage( "CatReps" );
c3c3 := ConcreteCategoryWithEndomorphismGroups( [ [2,3,1], [4,5,6], [,,,5,6,4] ] );
qc3c3 := RightQuiver( "q(2)[a:1->1,b:1->2,c:2->2]" );
HOMALG_MATRICES.PreferDenseMatrices := true;
GF3 := HomalgRingOfIntegers( 3 );
GF3q := PathAlgebra( GF3, qc3c3 );
rel := [GF3q.a^3-GF3q.1, GF3q.c^3-GF3q.2, GF3q.a*GF3q.b-GF3q.b*GF3q.c];;
kq := Algebroid( GF3q, rel );
kq2 := kq^2;
counit := rec( a := 1, b := 1, c := 1 );
comult := rec( a := PreCompose( kq2.ax1, kq2.1xa ),
b := PreCompose( kq2.1xb, kq2.bx2 ),
c := PreCompose( kq2.cx2, kq2.2xc ) );
AddBialgebroidStructure( kq, counit, comult );
counit := Counit( kq );
comult := Comultiplication( kq );
kmat := MatrixCategory( GF3 );
CatReps := CategoryOfRepresentations( kq, kmat );
zero := ZeroObject( CatReps );
unit := TensorUnit( CatReps );
V1 := VectorSpaceObject( 5, GF3 );
V2 := VectorSpaceObject( 4, GF3 );
d := One(GF3) * [[1,1,0,0,0],[0,1,1,0,0],[0,0,1,0,0],[0,0,0,1,1],[0,0,0,0,1]];;
d := HomalgMatrix( d, 5, 5, GF3 );;
d := VectorSpaceMorphism( V1, d, V1 );;
e := One(GF3) * [[0,1,0,0],[0,0,1,0],[0,0,0,0],[0,1,0,1],[0,0,1,0]];;
e := HomalgMatrix( e, 5, 4, GF3 );;
e := VectorSpaceMorphism( V1, e, V2 );;
f := One(GF3) * [[1,1,0,0],[0,1,1,0],[0,0,1,0],[0,0,0,1]];;
f := HomalgMatrix( f, 4, 4, GF3 );;
f := VectorSpaceMorphism( V2, f, V2 );;
nine := AsObjectInHomCategory( kq, [ V1, V2 ], [ d, e, f ] );;
fortyone := TensorProductOnObjects( nine, nine );;
etas := WeakDirectSumDecomposition( fortyone );;
eta := etas[3];;
six := Source( eta );;
thirtyfive := CokernelObject( eta );;

#! Now we check the associator if the pentagonal diagram commutes:

A := six;;
B := nine;;
C := thirtyfive;;
D := fortyone;
#! <An object in The category of functors: Bialgebroid generated by the
#! right quiver q(2)[a:1->1,b:1->2,c:2->2] -> Category of matrices over GF(3)>
ApB := TensorProductOnObjects( A, B );;
BpC := TensorProductOnObjects( B, C );;
CpD := TensorProductOnObjects( C, D );
#! <An object in The category of functors: Bialgebroid generated by the
#! right quiver q(2)[a:1->1,b:1->2,c:2->2] -> Category of matrices over GF(3)>
sBCD := TensorProductOnObjects( B, CpD );;
rBCD := TensorProductOnObjects( BpC, D );;
AssociatorRightToLeftWithGivenTensorProducts( sBCD, B, C, D, rBCD );
#! <A morphism in The category of functors: Bialgebroid generated by the
#! right quiver q(2)[a:1->1,b:1->2,c:2->2] -> Category of matrices over GF(3)>
TensorProductOnMorphisms( IdentityMorphism( A ),
AssociatorRightToLeftWithGivenTensorProducts( sBCD, B, C, D, rBCD ) );
#! <A morphism in The category of functors: Bialgebroid generated by the
#! right quiver q(2)[a:1->1,b:1->2,c:2->2] -> Category of matrices over GF(3)>
sABpCD := TensorProductOnObjects( A, TensorProductOnObjects( BpC, D ) );;
rABpCD := TensorProductOnObjects( TensorProductOnObjects( A, BpC ), D );;
AssociatorRightToLeftWithGivenTensorProducts( sABpCD, A, BpC, D, rABpCD );
#! <A morphism in The category of functors: Bialgebroid generated by the
#! right quiver q(2)[a:1->1,b:1->2,c:2->2] -> Category of matrices over GF(3)>
sABC := TensorProductOnObjects( A, BpC );;
rABC := TensorProductOnObjects( ApB, C );;
AssociatorRightToLeftWithGivenTensorProducts( sABC, A, B, C, rABC );;
TensorProductOnMorphisms( AssociatorRightToLeftWithGivenTensorProducts(
sABC, A, B, C, rABC ), IdentityMorphism( D ) );
#! <An isomorphism in The category of functors: Bialgebroid generated by the
#! right quiver q(2)[a:1->1,b:1->2,c:2->2] -> Category of matrices over GF(3)>
PreCompose(
PreCompose(
TensorProductOnMorphisms(
IdentityMorphism( A ),
AssociatorRightToLeftWithGivenTensorProducts( sBCD, B, C, D, rBCD )
),
AssociatorRightToLeftWithGivenTensorProducts( sABpCD, A, BpC, D, rABpCD )),
TensorProductOnMorphisms(
AssociatorRightToLeftWithGivenTensorProducts( sABC, A, B, C, rABC ),
IdentityMorphism( D )
)
);
#! <An isomorphism in The category of functors: Bialgebroid generated by the
#! right quiver q(2)[a:1->1,b:1->2,c:2->2] -> Category of matrices over GF(3)>
sABCpD := TensorProductOnObjects( A, TensorProductOnObjects( B, CpD ) );;
rABCpD := TensorProductOnObjects( ApB, CpD );;
AssociatorRightToLeftWithGivenTensorProducts( sABCpD, A, B, CpD, rABCpD );;
sApBCD := TensorProductOnObjects( ApB, CpD );;
rApBCD := TensorProductOnObjects( TensorProductOnObjects( ApB, C ), D );;
AssociatorRightToLeftWithGivenTensorProducts( sApBCD, ApB, C, D, rApBCD );
#! <A morphism in The category of functors: Bialgebroid generated by the
#! right quiver q(2)[a:1->1,b:1->2,c:2->2] -> Category of matrices over GF(3)>
PreCompose(
AssociatorRightToLeftWithGivenTensorProducts( sApBCD, ApB, C, D, rApBCD ),
AssociatorRightToLeftWithGivenTensorProducts( sApBCD, ApB, C, D, rApBCD )
);
#! <An isomorphism in The category of functors: Bialgebroid generated by the
#! right quiver q(2)[a:1->1,b:1->2,c:2->2] -> Category of matrices over GF(3)>
IsEqualForMorphisms(
PreCompose(
PreCompose(
TensorProductOnMorphisms(
IdentityMorphism( A ),
AssociatorRightToLeftWithGivenTensorProducts( sBCD, B, C, D, rBCD )
),
AssociatorRightToLeftWithGivenTensorProducts( sABpCD, A, BpC, D, rABpCD )
),
TensorProductOnMorphisms(
AssociatorRightToLeftWithGivenTensorProducts( sABC, A, B, C, rABC ),
IdentityMorphism( D )
)
),
PreCompose(
AssociatorRightToLeftWithGivenTensorProducts( sABCpD, A, B, CpD, rABCpD ),
AssociatorRightToLeftWithGivenTensorProducts( sApBCD, ApB, C, D, rApBCD )
)
);
#! true

#! Now we check the left unitor and right unitor if the triangle diagram commutes:

sAUC := TensorProductOnObjects( A, TensorProductOnObjects( unit, C ) );
#! <An object in The category of functors: Bialgebroid generated by the
#! right quiver q(2)[a:1->1,b:1->2,c:2->2] -> Category of matrices over GF(3)>
rAUC := TensorProductOnObjects( TensorProductOnObjects( A, unit), C );
#! <An object in The category of functors: Bialgebroid generated by the
#! right quiver q(2)[a:1->1,b:1->2,c:2->2] -> Category of matrices over GF(3)>
IsEqualForMorphisms(
PreCompose(
AssociatorRightToLeftWithGivenTensorProducts( sAUC, A,unit,C, rAUC ),
TensorProductOnMorphisms(
RightUnitor( A ),
IdentityMorphism( C )
)
),
TensorProductOnMorphisms(
IdentityMorphism( A ),
LeftUnitor( C )
)
);
#! true
IsEqualForMorphisms(
TensorProductOnMorphisms(
IdentityMorphism( A ),
LeftUnitor( C )
),
IdentityMorphism( sAUC )
);
#! true

0 comments on commit c1fa9eb

Please sign in to comment.