From 6ca5c8ee8be3a255c4b225197c7a79aa3b5e1d1b Mon Sep 17 00:00:00 2001 From: Tibor Gruen Date: Tue, 31 Mar 2020 14:48:53 +0200 Subject: [PATCH 1/5] example for pentagram diagram and triangle diagram --- .../ConcreteCategoryWithEndomorphismGroups.g | 118 ++++++++++++++++++ 1 file changed, 118 insertions(+) diff --git a/examples/ConcreteCategoryWithEndomorphismGroups.g b/examples/ConcreteCategoryWithEndomorphismGroups.g index 8b2bda1..fa580b5 100644 --- a/examples/ConcreteCategoryWithEndomorphismGroups.g +++ b/examples/ConcreteCategoryWithEndomorphismGroups.g @@ -587,3 +587,121 @@ Display( iso ); #! #! An isomorphism in Category of matrices over GF(3) #! @EndExample + +#! Now we check the associator if the pentagonal diagram commutes: + +#! @Example +A := six;; +B := nine;; +C := thirtyfive;; +D := fortyone; +#! 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 ); +#! 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 ); +#! 1,b:1->2,c:2->2] -> Category of matrices over GF(3)> +TensorProductOnMorphisms( IdentityMorphism( A ), +AssociatorRightToLeftWithGivenTensorProducts( sBCD, B, C, D, rBCD ) ); +#! 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 ); +#! 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 ) ); +#! 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 ) + ) +); +#! 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 ); +#! 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 ) +); +#! 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 +#! @EndExample + +#! Now we check the left unitor and right unitor if the triangle diagram commutes: + +#! @Example +sAUC := TensorProductOnObjects( A, TensorProductOnObjects( unit, C ) ); +#! 1,b:1->2,c:2->2] -> Category of matrices over GF(3)> +rAUC := TensorProductOnObjects( TensorProductOnObjects( A, unit), C ); +#! 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 +#! @EndExample From c357eb2366d67b3da6306783f4af9a3fd17da340 Mon Sep 17 00:00:00 2001 From: Tibor Gruen Date: Fri, 3 Apr 2020 14:28:02 +0200 Subject: [PATCH 2/5] moved associator example in own file --- examples/AssociatorUnitor.g | 152 ++++++++++++++++++++++++++++++++++++ 1 file changed, 152 insertions(+) create mode 100644 examples/AssociatorUnitor.g diff --git a/examples/AssociatorUnitor.g b/examples/AssociatorUnitor.g new file mode 100644 index 0000000..16e7f88 --- /dev/null +++ b/examples/AssociatorUnitor.g @@ -0,0 +1,152 @@ +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]" ); +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 ); +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: + +#! @Example +A := six;; +B := nine;; +C := thirtyfive;; +D := fortyone; +#! 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 ); +#! 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 ); +#! 1,b:1->2,c:2->2] -> Category of matrices over GF(3)> +TensorProductOnMorphisms( IdentityMorphism( A ), +AssociatorRightToLeftWithGivenTensorProducts( sBCD, B, C, D, rBCD ) ); +#! 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 ); +#! 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 ) ); +#! 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 ) + ) +); +#! 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 ); +#! 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 ) +); +#! 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 +#! @EndExample + +#! Now we check the left unitor and right unitor if the triangle diagram commutes: + +#! @Example +sAUC := TensorProductOnObjects( A, TensorProductOnObjects( unit, C ) ); +#! 1,b:1->2,c:2->2] -> Category of matrices over GF(3)> +rAUC := TensorProductOnObjects( TensorProductOnObjects( A, unit), C ); +#! 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 +#! @EndExample \ No newline at end of file From f85c10cb98223c4b088bf2d9b2e0bf13ec139e16 Mon Sep 17 00:00:00 2001 From: Tibor Gruen Date: Fri, 3 Apr 2020 15:11:21 +0200 Subject: [PATCH 3/5] some changes --- .gitignore | 3 + examples/AssociatorUnitor.g | 4 +- .../ConcreteCategoryWithEndomorphismGroups.g | 118 ------------------ 3 files changed, 6 insertions(+), 119 deletions(-) diff --git a/.gitignore b/.gitignore index e9758e0..4e153ea 100644 --- a/.gitignore +++ b/.gitignore @@ -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/ diff --git a/examples/AssociatorUnitor.g b/examples/AssociatorUnitor.g index 16e7f88..351b740 100644 --- a/examples/AssociatorUnitor.g +++ b/examples/AssociatorUnitor.g @@ -5,6 +5,7 @@ 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 ), @@ -33,6 +34,7 @@ etas := WeakDirectSumDecomposition( fortyone );; eta := etas[3];; six := Source( eta );; thirtyfive := CokernelObject( eta );; + #! Now we check the associator if the pentagonal diagram commutes: #! @Example @@ -149,4 +151,4 @@ IsEqualForMorphisms( IdentityMorphism( sAUC ) ); #! true -#! @EndExample \ No newline at end of file +#! @EndExample diff --git a/examples/ConcreteCategoryWithEndomorphismGroups.g b/examples/ConcreteCategoryWithEndomorphismGroups.g index fa580b5..8b2bda1 100644 --- a/examples/ConcreteCategoryWithEndomorphismGroups.g +++ b/examples/ConcreteCategoryWithEndomorphismGroups.g @@ -587,121 +587,3 @@ Display( iso ); #! #! An isomorphism in Category of matrices over GF(3) #! @EndExample - -#! Now we check the associator if the pentagonal diagram commutes: - -#! @Example -A := six;; -B := nine;; -C := thirtyfive;; -D := fortyone; -#! 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 ); -#! 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 ); -#! 1,b:1->2,c:2->2] -> Category of matrices over GF(3)> -TensorProductOnMorphisms( IdentityMorphism( A ), -AssociatorRightToLeftWithGivenTensorProducts( sBCD, B, C, D, rBCD ) ); -#! 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 ); -#! 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 ) ); -#! 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 ) - ) -); -#! 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 ); -#! 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 ) -); -#! 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 -#! @EndExample - -#! Now we check the left unitor and right unitor if the triangle diagram commutes: - -#! @Example -sAUC := TensorProductOnObjects( A, TensorProductOnObjects( unit, C ) ); -#! 1,b:1->2,c:2->2] -> Category of matrices over GF(3)> -rAUC := TensorProductOnObjects( TensorProductOnObjects( A, unit), C ); -#! 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 -#! @EndExample From 8c69241ef3094c8cfa50070ac39fcd3913147cdd Mon Sep 17 00:00:00 2001 From: Tibor Gruen Date: Fri, 3 Apr 2020 15:20:32 +0200 Subject: [PATCH 4/5] HOMALG_MATRICES.PreferDenseMatrices := true; fixed a bug --- examples/AssociatorUnitor.g | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/AssociatorUnitor.g b/examples/AssociatorUnitor.g index 351b740..7f3dfcd 100644 --- a/examples/AssociatorUnitor.g +++ b/examples/AssociatorUnitor.g @@ -1,6 +1,7 @@ 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];; From a8d4eb5d5667b0adcd15ec0207519733033f17d7 Mon Sep 17 00:00:00 2001 From: Mohamed Barakat Date: Sat, 29 Aug 2020 18:22:18 +0200 Subject: [PATCH 5/5] applied dos2unix to AssociatorUnitor.g and removed @Example/@EndExample for `gap makedoc.g` to work again --- examples/AssociatorUnitor.g | 306 ++++++++++++++++++------------------ 1 file changed, 151 insertions(+), 155 deletions(-) diff --git a/examples/AssociatorUnitor.g b/examples/AssociatorUnitor.g index 7f3dfcd..eac5985 100644 --- a/examples/AssociatorUnitor.g +++ b/examples/AssociatorUnitor.g @@ -1,155 +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: - -#! @Example -A := six;; -B := nine;; -C := thirtyfive;; -D := fortyone; -#! 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 ); -#! 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 ); -#! 1,b:1->2,c:2->2] -> Category of matrices over GF(3)> -TensorProductOnMorphisms( IdentityMorphism( A ), -AssociatorRightToLeftWithGivenTensorProducts( sBCD, B, C, D, rBCD ) ); -#! 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 ); -#! 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 ) ); -#! 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 ) - ) -); -#! 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 ); -#! 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 ) -); -#! 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 -#! @EndExample - -#! Now we check the left unitor and right unitor if the triangle diagram commutes: - -#! @Example -sAUC := TensorProductOnObjects( A, TensorProductOnObjects( unit, C ) ); -#! 1,b:1->2,c:2->2] -> Category of matrices over GF(3)> -rAUC := TensorProductOnObjects( TensorProductOnObjects( A, unit), C ); -#! 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 -#! @EndExample +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; +#! 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 ); +#! 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 ); +#! 1,b:1->2,c:2->2] -> Category of matrices over GF(3)> +TensorProductOnMorphisms( IdentityMorphism( A ), +AssociatorRightToLeftWithGivenTensorProducts( sBCD, B, C, D, rBCD ) ); +#! 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 ); +#! 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 ) ); +#! 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 ) + ) +); +#! 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 ); +#! 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 ) +); +#! 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 ) ); +#! 1,b:1->2,c:2->2] -> Category of matrices over GF(3)> +rAUC := TensorProductOnObjects( TensorProductOnObjects( A, unit), C ); +#! 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