Examples and Tests
Basics
gap> vecspaces := CreateCapCategory( "VectorSpaces" );; gap> ReadPackage( "MonoidalCategories", "examples/VectorSpacesMonoidalCategory.gi" );; gap> z := ZeroObject( vecspaces );; gap> a := QVectorSpace( 1 );; gap> b := QVectorSpace( 2 );; gap> c := QVectorSpace( 3 );; gap> alpha := VectorSpaceMorphism( a, [ [ 1, 0 ] ], b );; gap> beta := VectorSpaceMorphism( b, [ [ 1, 0, 0 ], [ 0, 1, 0 ] ], c );; gap> gamma := VectorSpaceMorphism( c, [ [ 0, 1, 1 ], [ 1, 0, 1 ], [ 1, 1, 0 ] ], c );; 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