Goto Chapter: Top 1 2 3 4 5 Ind
 [Top of Book]  [Contents]   [Previous Chapter]   [Next Chapter] 

2 Examples and Tests
 2.1 Test functions
 2.2 Basics

2 Examples and Tests

2.1 Test functions

2.1-1 AdditiveMonoidalCategoriesTest
‣ AdditiveMonoidalCategoriesTest( cat, a, L )( function )

The arguments are

This function checks for every operation declared in AdditiveMonoidalCategories.gd if it is computable in the CAP category cat. If yes, then the operation is executed with the parameters given above and compared to the equivalent computation in the opposite category of cat. Pass the options

2.1-2 BraidedMonoidalCategoriesTest
‣ BraidedMonoidalCategoriesTest( cat, a, b )( function )

The arguments are

This function checks for every operation declared in BraidedMonoidalCategories.gd if it is computable in the CAP category cat. If yes, then the operation is executed with the parameters given above and compared to the equivalent computation in the opposite category of cat. Pass the options

2.1-3 ClosedMonoidalCategoriesTest
‣ ClosedMonoidalCategoriesTest( cat, a, b, c, d, alpha, beta, gamma, delta, epsilon, zeta )( function )

The arguments are

This function checks for every operation declared in ClosedMonoidalCategories.gd if it is computable in the CAP category cat. If yes, then the operation is executed with the parameters given above and compared to the equivalent computation in the opposite category of cat. Pass the options

2.1-4 CoclosedMonoidalCategoriesTest
‣ CoclosedMonoidalCategoriesTest( cat, a, b, c, d, alpha, beta, gamma, delta, epsilon, zeta )( function )

The arguments are a CAP category cat objects a, b, c, d

This function checks for every operation declared in CoclosedMonoidalCategories.gd if it is computable in the CAP category cat. If yes, then the operation is executed with the parameters given above and compared to the equivalent computation in the opposite category of cat. Pass the options

2.1-5 MonoidalCategoriesTensorProductAndUnitTest
‣ MonoidalCategoriesTensorProductAndUnitTest( cat, a, b )( function )

The arguments are

This function checks for every operation declared in MonoidalCategoriesTensorProductAndUnit.gd if it is computable in the CAP category cat. If yes, then the operation is executed with the parameters given above and compared to the equivalent computation in the opposite category of cat. Pass the options

2.1-6 MonoidalCategoriesTest
‣ MonoidalCategoriesTest( cat, a, b, c, alpha, beta )( function )

The arguments are

This function checks for every operation declared in MonoidalCategories.gd if it is computable in the CAP category cat. If yes, then the operation is executed with the parameters given above and compared to the equivalent computation in the opposite category of cat. Pass the options

2.1-7 RigidSymmetricClosedMonoidalCategoriesTest
‣ RigidSymmetricClosedMonoidalCategoriesTest( cat, a, b, c, d, alpha )( function )

The arguments are

This function checks for every object and morphism declared in RigidSymmetricClosedMonoidalCategories.gd if it is computable in the CAP category cat. If yes, then the operation is executed with the parameters given above and compared to the equivalent computation in the opposite category of cat. Pass the options

2.1-8 RigidSymmetricCoclosedMonoidalCategoriesTest
‣ RigidSymmetricCoclosedMonoidalCategoriesTest( cat, a, b, c, d, alpha )( function )

The arguments are

This function checks for every object and morphism declared in RigidSymmetricCoclosedMonoidalCategories.gd if it is computable in the CAP category cat. If yes, then the operation is executed with the parameters given above and compared to the equivalent computation in the opposite category of cat. Pass the options

2.2 Basics

gap> LoadPackage( "MonoidalCategories" );
true
gap> vecspaces := CreateCapCategory( "VectorSpaces" );
VectorSpaces
gap> ReadPackage( "MonoidalCategories",
>         "examples/VectorSpacesMonoidalCategory.gi" );
true
gap> z := ZeroObject( vecspaces );
<A rational vector space of dimension 0>
gap> a := QVectorSpace( 1 );
<A rational vector space of dimension 1>
gap> b := QVectorSpace( 2 );
<A rational vector space of dimension 2>
gap> c := QVectorSpace( 3 );
<A rational vector space of dimension 3>
gap> alpha := VectorSpaceMorphism( a, [ [ 1, 0 ] ], b );
A rational vector space homomorphism with matrix:
[ [  1,  0 ] ]
gap> beta := VectorSpaceMorphism( b,
>                 [ [ 1, 0, 0 ], [ 0, 1, 0 ] ], c );
A rational vector space homomorphism with matrix:
[ [  1,  0,  0 ],
  [  0,  1,  0 ] ]
gap> gamma := VectorSpaceMorphism( c,
>                  [ [ 0, 1, 1 ], [ 1, 0, 1 ], [ 1, 1, 0 ] ], c );
A rational vector space homomorphism with matrix:
[ [  0,  1,  1 ],
  [  1,  0,  1 ],
  [  1,  1,  0 ] ]
gap> IsCongruentForMorphisms(
>         TensorProductOnMorphisms( alpha, beta ),
>         TensorProductOnMorphisms( beta, alpha ) );
false
gap> IsOne( AssociatorRightToLeft( a, b, c ) );
true
gap> IsCongruentForMorphisms(
>         gamma, LambdaElimination( c, c, LambdaIntroduction( gamma ) ) );
true
gap> IsZero( TraceMap( gamma ) );
true
gap> IsCongruentForMorphisms(
>         RankMorphism( DirectSum( a, b ) ), RankMorphism( c ) );
true
gap> IsOne( Braiding( b, c ) );
false
gap> IsOne( PreCompose( Braiding( b, c ), Braiding( c, b ) ) );
true
 [Top of Book]  [Contents]   [Previous Chapter]   [Next Chapter] 
Goto Chapter: Top 1 2 3 4 5 Ind

generated by GAPDoc2HTML