99
1010# #
1111InstallMethod( TestCartesianBraidingCompatability,
12- [ IsCapCategoryObject, IsCapCategoryObject, IsCapCategoryObject ] ,
12+ [ IsCapCategory, IsCapCategoryObject, IsCapCategoryObject, IsCapCategoryObject ] ,
1313
14- function ( object_a, object_b, object_c )
15- local morphism_1, morphism_2 ;
14+ function ( cat, object_1, object_2, object_3 )
15+ local morphism_left, morphism_right ;
1616
17- morphism_1 := CartesianBraiding( DirectProduct( object_a, object_b ), object_c );
17+ Assert ( 0 , HasIsCartesianCategory( cat ) and IsCartesianCategory( cat ) );
18+ Assert ( 0 , IsIdenticalObj( cat, CapCategory( object_1 ) ) );
19+ Assert ( 0 , IsIdenticalObj( cat, CapCategory( object_2 ) ) );
20+ Assert ( 0 , IsIdenticalObj( cat, CapCategory( object_3 ) ) );
1821
19- morphism_1 := PreCompose( morphism_1, CartesianAssociatorRightToLeft( object_c, object_a, object_b ) );
22+ morphism_left := CartesianBraiding( BinaryDirectProduct( cat, object_1, object_2 ), object_3 );
2023
21- morphism_1 := PreCompose( morphism_1,
22- DirectProductOnMorphisms( CartesianBraiding( object_c, object_a ), IdentityMorphism( object_b ) ) );
24+ morphism_left := PreCompose( morphism_left, CartesianAssociatorRightToLeft( object_3, object_1, object_2 ) );
2325
24- morphism_2 := CartesianAssociatorLeftToRight( object_a, object_b, object_c );
26+ morphism_left := PreCompose( morphism_left,
27+ DirectProductOnMorphisms( CartesianBraiding( object_3, object_1 ), IdentityMorphism( object_2 ) ) );
2528
26- morphism_2 := PreCompose( morphism_2,
27- DirectProductOnMorphisms( IdentityMorphism( object_a ), CartesianBraiding( object_b, object_c ) ) );
29+ morphism_right := CartesianAssociatorLeftToRight( object_1, object_2, object_3 );
2830
29- morphism_2 := PreCompose( morphism_2, CartesianAssociatorRightToLeft( object_a, object_c, object_b ) );
31+ morphism_right := PreCompose( morphism_right,
32+ DirectProductOnMorphisms( IdentityMorphism( object_1 ), CartesianBraiding( object_2, object_3 ) ) );
3033
31- if not ( morphism_1 = morphism_2 ) then
34+ morphism_right := PreCompose( morphism_right, CartesianAssociatorRightToLeft( object_1, object_3, object_2 ) );
35+
36+ if not ( morphism_left = morphism_right ) then
3237
3338 return false ;
3439
3540 fi ;
3641
37- morphism_1 := CartesianBraiding( object_a, DirectProduct( object_b, object_c ) );
42+ morphism_left := CartesianBraiding( object_1, BinaryDirectProduct( cat, object_2, object_3 ) );
3843
39- morphism_1 := PreCompose( morphism_1 , CartesianAssociatorLeftToRight( object_b, object_c, object_a ) );
44+ morphism_left := PreCompose( morphism_left , CartesianAssociatorLeftToRight( object_2, object_3, object_1 ) );
4045
41- morphism_1 := PreCompose( morphism_1 ,
42- DirectProductOnMorphisms( IdentityMorphism( object_b ), CartesianBraiding( object_c, object_a ) ) );
46+ morphism_left := PreCompose( morphism_left ,
47+ DirectProductOnMorphisms( IdentityMorphism( object_2 ), CartesianBraiding( object_3, object_1 ) ) );
4348
44- morphism_2 := CartesianAssociatorRightToLeft( object_a, object_b, object_c );
49+ morphism_right := CartesianAssociatorRightToLeft( object_1, object_2, object_3 );
4550
46- morphism_2 := PreCompose( morphism_2 ,
47- DirectProductOnMorphisms( CartesianBraiding( object_a, object_b ), IdentityMorphism( object_c ) ) );
51+ morphism_right := PreCompose( morphism_right ,
52+ DirectProductOnMorphisms( CartesianBraiding( object_1, object_2 ), IdentityMorphism( object_3 ) ) );
4853
49- morphism_2 := PreCompose( morphism_2 , CartesianAssociatorLeftToRight( object_b, object_a, object_c ) );
54+ morphism_right := PreCompose( morphism_right , CartesianAssociatorLeftToRight( object_2, object_1, object_3 ) );
5055
51- return morphism_1 = morphism_2 ;
56+ return morphism_left = morphism_right ;
5257
5358end );
5459
5560# #
5661InstallMethod( TestCartesianBraidingCompatabilityForAllTriplesInList,
57- [ IsList ] ,
62+ [ IsCapCategory, IsList ] ,
5863
59- function ( object_list )
64+ function ( cat, object_list )
6065 local a, b, c, size, list, test;
6166
62- size := Size ( object_list );
67+ size := Length ( object_list );
6368
6469 list := [ 1 .. size ] ;
6570
@@ -69,7 +74,7 @@ InstallMethod( TestCartesianBraidingCompatabilityForAllTriplesInList,
6974
7075 for c in list do
7176
72- test := TestCartesianBraidingCompatability( object_list[ a] , object_list[ b] , object_list[ c] );
77+ test := TestCartesianBraidingCompatability( cat, object_list[ a] , object_list[ b] , object_list[ c] );
7378
7479 if not test then
7580
8994
9095# #
9196InstallGlobalFunction( " BraidedCartesianCategoriesTest" ,
92-
9397 function ( cat, opposite, a, b )
94-
9598 local verbose,
9699
97100 a_op, braiding_a_b, braiding_a_b_op, braiding_inverse_a_b, braiding_inverse_a_b_op,
@@ -102,6 +105,18 @@ InstallGlobalFunction( "BraidedCartesianCategoriesTest",
102105
103106 verbose := ValueOption( " verbose" ) = true ;
104107
108+ if IsEmpty( MissingOperationsForConstructivenessOfCategory( cat, " IsCartesianCategory" ) ) then
109+
110+ Assert ( 0 , TestCartesianBraidingCompatability( cat, a, b, a ) );
111+
112+ fi ;
113+
114+ if IsEmpty( MissingOperationsForConstructivenessOfCategory( opposite, " IsCartesianCategory" ) ) then
115+
116+ Assert ( 0 , TestCartesianBraidingCompatability( opposite, a_op, b_op, a_op ) );
117+
118+ fi ;
119+
105120 if CanCompute( cat, " CartesianBraiding" ) then
106121
107122 if verbose then
0 commit comments