Goto Chapter: Top 1 2 3 4 5 6 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 ClosedMonoidalCategoriesTestWithGiven
‣ ClosedMonoidalCategoriesTestWithGiven( cat, a, b, c, d, alpha, beta )( function )

The arguments are

This function checks for some *WithGiven operations declared in ClosedMonoidalCategories.gd if they are 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 CoclosedMonoidalCategoriesTest
‣ CoclosedMonoidalCategoriesTest( cat, a, b, c, d, alpha, beta, gamma, delta, epsilon, zeta )( function )

The arguments are

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-6 CoclosedMonoidalCategoriesTestWithGiven
‣ CoclosedMonoidalCategoriesTestWithGiven( cat, a, b, c, d, alpha, beta, gamma, delta, epsilon, zeta )( function )

The arguments are

This function checks for some *WithGiven operations declared in CoclosedMonoidalCategories.gd if they are 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 LeftClosedMonoidalCategoriesTest
‣ LeftClosedMonoidalCategoriesTest( cat, a, b, c, d, alpha, beta, gamma, delta, epsilon, zeta )( function )

The arguments are

This function checks for every operation declared in LeftClosedMonoidalCategories.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 LeftClosedMonoidalCategoriesTestWithGiven
‣ LeftClosedMonoidalCategoriesTestWithGiven( cat, a, b, c, d, alpha, beta, gamma, delta, epsilon, zeta )( function )

The arguments are

This function checks for some *WithGiven operationS declared in LeftClosedMonoidalCategories.gd if they are 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-9 LeftCoclosedMonoidalCategoriesTest
‣ LeftCoclosedMonoidalCategoriesTest( cat, a, b, c, d, alpha, beta, gamma, delta, epsilon, zeta )( function )

The arguments are

This function checks for every operation declared in LeftCoclosedMonoidalCategories.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-10 LeftCoclosedMonoidalCategoriesTestWithGiven
‣ LeftCoclosedMonoidalCategoriesTestWithGiven( cat, a, b, c, d, alpha, beta, gamma, delta, epsilon, zeta )( function )

The arguments are

This function checks for some *WithGiven operations declared in LeftCoclosedMonoidalCategories.gd if they are 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-11 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-12 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-13 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-14 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", false );
true
gap> LoadPackage( "LinearAlgebraForCAP", false );
true
gap> Q := HomalgFieldOfRationals();
Q
gap> a := VectorSpaceObject( 1, Q );
<A vector space object over Q of dimension 1>
gap> b := VectorSpaceObject( 2, Q );
<A vector space object over Q of dimension 2>
gap> c := VectorSpaceObject( 3, Q );
<A vector space object over Q of dimension 3>
gap> z := ZeroObject( CapCategory( a ) );
<A vector space object over Q of dimension 0>
gap> alpha := VectorSpaceMorphism( a, [ [ 1, 0 ] ], b );
<A morphism in Category of matrices over Q>
gap> beta := VectorSpaceMorphism( b,
>                 [ [ 1, 0, 0 ], [ 0, 1, 0 ] ], c );
<A morphism in Category of matrices over Q>
gap> gamma := VectorSpaceMorphism( c,
>                  [ [ 0, 1, 1 ], [ 1, 0, 1 ], [ 1, 1, 0 ] ], c );
<A morphism in Category of matrices over Q>
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 6 Ind

generated by GAPDoc2HTML