Skip to content

Commit 1f7669b

Browse files
sebastianposmohamed-barakat
authored andcommitted
moved monoidal test functions from GroupRepresentationsForCAP to MonoidalCategories
1 parent e7a26b3 commit 1f7669b

20 files changed

Lines changed: 648 additions & 293 deletions

CartesianCategories/PackageInfo.g

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ SetPackageInfo( rec(
1010

1111
PackageName := "CartesianCategories",
1212
Subtitle := "Cartesian and cocartesian categories and various subdoctrines",
13-
Version := "2025.06-01",
13+
Version := "2025.07-01",
1414
Date := ~.Version{[ 1 .. 10 ]},
1515
Date := (function ( ) if IsBound( GAPInfo.SystemEnvironment.GAP_PKG_RELEASE_DATE ) then return GAPInfo.SystemEnvironment.GAP_PKG_RELEASE_DATE; else return Concatenation( ~.Version{[ 1 .. 4 ]}, "-", ~.Version{[ 6, 7 ]}, "-01" ); fi; end)( ),
1616
License := "GPL-2.0-or-later",
@@ -99,7 +99,7 @@ Dependencies := rec(
9999
GAP := ">= 4.13.0",
100100
NeededOtherPackages := [
101101
[ "CAP", ">= 2025.03-04" ],
102-
[ "MonoidalCategories", ">= 2025.03-02" ],
102+
[ "MonoidalCategories", ">= 2025.07-01" ],
103103
],
104104
SuggestedOtherPackages := [ ],
105105
ExternalConditions := [ ],
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
The files of this package which include the line `THIS FILE WAS AUTOMATICALLY GENERATED` in their header have been autogenerated
22

3-
* from MonoidalCategories v2025.03-02
3+
* from MonoidalCategories v2025.07-01

CartesianCategories/gap/BraidedCartesianCategoriesTest.gd

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,30 @@
1111

1212
#! @Section Test functions
1313

14+
#! @Description
15+
#! This is a debug operation.
16+
#! The arguments are 3
17+
#! objects $v_1, v_2, v_3$
18+
#! in a braided cartesian category.
19+
#! The output is true if the braiding compatabilities with the associator hold,
20+
#! false otherwise.
21+
#! @Returns a boolean
22+
#! @Arguments v_1, v_2, v_3
23+
DeclareOperation( "TestCartesianBraidingCompatability",
24+
[ IsCapCategoryObject, IsCapCategoryObject, IsCapCategoryObject ] );
25+
26+
#! @Description
27+
#! This is a debug operation.
28+
#! The argument is a list $L$
29+
#! consisting of triples of objects
30+
#! in a braided cartesian category.
31+
#! The output is true if the braiding compatabilities with the associator hold
32+
#! for all those triples
33+
#! false otherwise.
34+
#! @Returns a boolean
35+
#! @Arguments L
36+
DeclareOperation( "TestCartesianBraidingCompatabilityForAllTriplesInList", [ IsList ] );
37+
1438
#! @Description
1539
#! The arguments are
1640
#! * a CAP category $cat$

CartesianCategories/gap/BraidedCartesianCategoriesTest.gi

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,87 @@
77

88

99

10+
##
11+
InstallMethod( TestCartesianBraidingCompatability,
12+
[ IsCapCategoryObject, IsCapCategoryObject, IsCapCategoryObject ],
13+
14+
function( object_a, object_b, object_c )
15+
local morphism_1, morphism_2;
16+
17+
morphism_1 := CartesianBraiding( DirectProduct( object_a, object_b ), object_c );
18+
19+
morphism_1 := PreCompose( morphism_1, CartesianAssociatorRightToLeft( object_c, object_a, object_b ) );
20+
21+
morphism_1 := PreCompose( morphism_1,
22+
DirectProductOnMorphisms( CartesianBraiding( object_c, object_a ), IdentityMorphism( object_b ) ) );
23+
24+
morphism_2 := CartesianAssociatorLeftToRight( object_a, object_b, object_c );
25+
26+
morphism_2 := PreCompose( morphism_2,
27+
DirectProductOnMorphisms( IdentityMorphism( object_a ), CartesianBraiding( object_b, object_c ) ) );
28+
29+
morphism_2 := PreCompose( morphism_2, CartesianAssociatorRightToLeft( object_a, object_c, object_b ) );
30+
31+
if not ( morphism_1 = morphism_2 ) then
32+
33+
return false;
34+
35+
fi;
36+
37+
morphism_1 := CartesianBraiding( object_a, DirectProduct( object_b, object_c ) );
38+
39+
morphism_1 := PreCompose( morphism_1, CartesianAssociatorLeftToRight( object_b, object_c, object_a ) );
40+
41+
morphism_1 := PreCompose( morphism_1,
42+
DirectProductOnMorphisms( IdentityMorphism( object_b ), CartesianBraiding( object_c, object_a ) ) );
43+
44+
morphism_2 := CartesianAssociatorRightToLeft( object_a, object_b, object_c );
45+
46+
morphism_2 := PreCompose( morphism_2,
47+
DirectProductOnMorphisms( CartesianBraiding( object_a, object_b ), IdentityMorphism( object_c ) ) );
48+
49+
morphism_2 := PreCompose( morphism_2, CartesianAssociatorLeftToRight( object_b, object_a, object_c ) );
50+
51+
return morphism_1 = morphism_2;
52+
53+
end );
54+
55+
##
56+
InstallMethod( TestCartesianBraidingCompatabilityForAllTriplesInList,
57+
[ IsList ],
58+
59+
function( object_list )
60+
local a, b, c, size, list, test;
61+
62+
size := Size( object_list );
63+
64+
list := [ 1 .. size ];
65+
66+
for a in list do
67+
68+
for b in list do
69+
70+
for c in list do
71+
72+
test := TestCartesianBraidingCompatability( object_list[a], object_list[b], object_list[c] );
73+
74+
if not test then
75+
76+
Print( "indices of failing triple: ", [ a, b, c ], "\n" );
77+
78+
return false;
79+
80+
fi;
81+
82+
od;
83+
84+
od;
85+
86+
od;
87+
88+
end );
89+
90+
##
1091
InstallGlobalFunction( "BraidedCartesianCategoriesTest",
1192

1293
function( cat, opposite, a, b )

CartesianCategories/gap/BraidedCocartesianCategoriesTest.gd

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,30 @@
1111

1212
#! @Section Test functions
1313

14+
#! @Description
15+
#! This is a debug operation.
16+
#! The arguments are 3
17+
#! objects $v_1, v_2, v_3$
18+
#! in a braided cocartesian category.
19+
#! The output is true if the braiding compatabilities with the associator hold,
20+
#! false otherwise.
21+
#! @Returns a boolean
22+
#! @Arguments v_1, v_2, v_3
23+
DeclareOperation( "TestCocartesianBraidingCompatability",
24+
[ IsCapCategoryObject, IsCapCategoryObject, IsCapCategoryObject ] );
25+
26+
#! @Description
27+
#! This is a debug operation.
28+
#! The argument is a list $L$
29+
#! consisting of triples of objects
30+
#! in a braided cocartesian category.
31+
#! The output is true if the braiding compatabilities with the associator hold
32+
#! for all those triples
33+
#! false otherwise.
34+
#! @Returns a boolean
35+
#! @Arguments L
36+
DeclareOperation( "TestCocartesianBraidingCompatabilityForAllTriplesInList", [ IsList ] );
37+
1438
#! @Description
1539
#! The arguments are
1640
#! * a CAP category $cat$

CartesianCategories/gap/BraidedCocartesianCategoriesTest.gi

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,87 @@
77

88

99

10+
##
11+
InstallMethod( TestCocartesianBraidingCompatability,
12+
[ IsCapCategoryObject, IsCapCategoryObject, IsCapCategoryObject ],
13+
14+
function( object_a, object_b, object_c )
15+
local morphism_1, morphism_2;
16+
17+
morphism_1 := CocartesianBraiding( Coproduct( object_a, object_b ), object_c );
18+
19+
morphism_1 := PreCompose( morphism_1, CocartesianAssociatorRightToLeft( object_c, object_a, object_b ) );
20+
21+
morphism_1 := PreCompose( morphism_1,
22+
CoproductOnMorphisms( CocartesianBraiding( object_c, object_a ), IdentityMorphism( object_b ) ) );
23+
24+
morphism_2 := CocartesianAssociatorLeftToRight( object_a, object_b, object_c );
25+
26+
morphism_2 := PreCompose( morphism_2,
27+
CoproductOnMorphisms( IdentityMorphism( object_a ), CocartesianBraiding( object_b, object_c ) ) );
28+
29+
morphism_2 := PreCompose( morphism_2, CocartesianAssociatorRightToLeft( object_a, object_c, object_b ) );
30+
31+
if not ( morphism_1 = morphism_2 ) then
32+
33+
return false;
34+
35+
fi;
36+
37+
morphism_1 := CocartesianBraiding( object_a, Coproduct( object_b, object_c ) );
38+
39+
morphism_1 := PreCompose( morphism_1, CocartesianAssociatorLeftToRight( object_b, object_c, object_a ) );
40+
41+
morphism_1 := PreCompose( morphism_1,
42+
CoproductOnMorphisms( IdentityMorphism( object_b ), CocartesianBraiding( object_c, object_a ) ) );
43+
44+
morphism_2 := CocartesianAssociatorRightToLeft( object_a, object_b, object_c );
45+
46+
morphism_2 := PreCompose( morphism_2,
47+
CoproductOnMorphisms( CocartesianBraiding( object_a, object_b ), IdentityMorphism( object_c ) ) );
48+
49+
morphism_2 := PreCompose( morphism_2, CocartesianAssociatorLeftToRight( object_b, object_a, object_c ) );
50+
51+
return morphism_1 = morphism_2;
52+
53+
end );
54+
55+
##
56+
InstallMethod( TestCocartesianBraidingCompatabilityForAllTriplesInList,
57+
[ IsList ],
58+
59+
function( object_list )
60+
local a, b, c, size, list, test;
61+
62+
size := Size( object_list );
63+
64+
list := [ 1 .. size ];
65+
66+
for a in list do
67+
68+
for b in list do
69+
70+
for c in list do
71+
72+
test := TestCocartesianBraidingCompatability( object_list[a], object_list[b], object_list[c] );
73+
74+
if not test then
75+
76+
Print( "indices of failing triple: ", [ a, b, c ], "\n" );
77+
78+
return false;
79+
80+
fi;
81+
82+
od;
83+
84+
od;
85+
86+
od;
87+
88+
end );
89+
90+
##
1091
InstallGlobalFunction( "BraidedCocartesianCategoriesTest",
1192

1293
function( cat, opposite, a, b )

CartesianCategories/gap/CartesianCategoriesTest.gd

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,29 @@
1111

1212
#! @Section Test functions
1313

14+
#! @Description
15+
#! This is a debug operation.
16+
#! The arguments are 4
17+
#! objects $v_1, v_2, v_3, v_4$
18+
#! in a category.
19+
#! The output is true if the pentagon identity holds
20+
#! for those 4 objects, false otherwise.
21+
#! @Returns a boolean
22+
#! @Arguments v_1, v_2, v_3, v_4
23+
DeclareOperation( "TestCartesianPentagonIdentity",
24+
[ IsCapCategoryObject, IsCapCategoryObject, IsCapCategoryObject, IsCapCategoryObject ] );
25+
26+
#! @Description
27+
#! This is a debug operation.
28+
#! The argument is a list $L$
29+
#! consisting of quadruples of objects
30+
#! in a cartesian category.
31+
#! The output is true if the pentagon identity holds
32+
#! for all those quadruples, false otherwise.
33+
#! @Returns a boolean
34+
#! @Arguments L
35+
DeclareOperation( "TestCartesianPentagonIdentityForAllQuadruplesInList", [ IsList ] );
36+
1437
#! @Description
1538
#! The arguments are
1639
#! * a CAP category $cat$

CartesianCategories/gap/CartesianCategoriesTest.gi

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,76 @@
77

88

99

10+
##
11+
InstallMethod( TestCartesianPentagonIdentity,
12+
[ IsCapCategoryObject, IsCapCategoryObject, IsCapCategoryObject, IsCapCategoryObject ],
13+
14+
function( object_a, object_b, object_c, object_d )
15+
local morphism_1, morphism_2;
16+
17+
morphism_1 :=
18+
DirectProductOnMorphisms( CartesianAssociatorLeftToRight( object_a, object_b, object_c ), IdentityMorphism( object_d ) );
19+
20+
morphism_1 := PreCompose( morphism_1,
21+
CartesianAssociatorLeftToRight( object_a, DirectProduct( object_b, object_c ), object_d ) );
22+
23+
morphism_1 := PreCompose( morphism_1,
24+
DirectProductOnMorphisms( IdentityMorphism( object_a ), CartesianAssociatorLeftToRight( object_b, object_c, object_d ) ) );
25+
26+
morphism_2 := CartesianAssociatorLeftToRight( DirectProduct( object_a, object_b ), object_c, object_d );
27+
28+
morphism_2 := PreCompose( morphism_2,
29+
CartesianAssociatorLeftToRight( object_a, object_b, DirectProduct( object_c, object_d ) ) );
30+
31+
return IsCongruentForMorphisms( morphism_1, morphism_2 );
32+
33+
end );
34+
35+
##
36+
InstallMethod( TestCartesianPentagonIdentityForAllQuadruplesInList,
37+
[ IsList ],
38+
39+
function( object_list )
40+
local a, b, c, d, size, list, test, all_okay;
41+
42+
size := Size( object_list );
43+
44+
list := [ 1 .. size ];
45+
46+
all_okay := true;
47+
48+
for a in list do
49+
50+
for b in list do
51+
52+
for c in list do
53+
54+
for d in list do
55+
56+
test := TestCartesianPentagonIdentity( object_list[a], object_list[b], object_list[c], object_list[d] );
57+
58+
if not test then
59+
60+
Print( "indices of failing quadruple: ", [ a, b, c, d ], "\n" );
61+
62+
return false;
63+
64+
fi;
65+
66+
od;
67+
68+
od;
69+
70+
71+
od;
72+
73+
od;
74+
75+
return all_okay;
76+
77+
end );
78+
79+
##
1080
InstallGlobalFunction( "CartesianCategoriesTest",
1181

1282
function( cat, opposite, a, b, c, alpha, beta )

CartesianCategories/gap/CocartesianCategoriesTest.gd

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,29 @@
1111

1212
#! @Section Test functions
1313

14+
#! @Description
15+
#! This is a debug operation.
16+
#! The arguments are 4
17+
#! objects $v_1, v_2, v_3, v_4$
18+
#! in a category.
19+
#! The output is true if the pentagon identity holds
20+
#! for those 4 objects, false otherwise.
21+
#! @Returns a boolean
22+
#! @Arguments v_1, v_2, v_3, v_4
23+
DeclareOperation( "TestCocartesianPentagonIdentity",
24+
[ IsCapCategoryObject, IsCapCategoryObject, IsCapCategoryObject, IsCapCategoryObject ] );
25+
26+
#! @Description
27+
#! This is a debug operation.
28+
#! The argument is a list $L$
29+
#! consisting of quadruples of objects
30+
#! in a cocartesian category.
31+
#! The output is true if the pentagon identity holds
32+
#! for all those quadruples, false otherwise.
33+
#! @Returns a boolean
34+
#! @Arguments L
35+
DeclareOperation( "TestCocartesianPentagonIdentityForAllQuadruplesInList", [ IsList ] );
36+
1437
#! @Description
1538
#! The arguments are
1639
#! * a CAP category $cat$

0 commit comments

Comments
 (0)