  
  [1X14 [33X[0;0YExamples and Tests[133X[101X
  
  
  [1X14.1 [33X[0;0YDummy category[133X[101X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XLoadPackage( "CAP", false );[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27Xdummy := DummyCategory( rec([127X[104X
    [4X[25X>[125X [27X    list_of_operations_to_install := [ "PreCompose", "IdentityMorphism", "DirectSum" ],[127X[104X
    [4X[25X>[125X [27X    properties := [ "IsAdditiveCategory" ],[127X[104X
    [4X[25X>[125X [27X) );;[127X[104X
    [4X[25Xgap>[125X [27XCanCompute( dummy, "DirectSum" );[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsAdditiveCategory( dummy );[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  
  [1X14.2 [33X[0;0YFunctors[133X[101X
  
  [33X[0;0YWe  create  a  binary  functor  [23XF[123X  with  one covariant and one contravariant
  component in two ways. Here is the first way to model a binary functor:[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xfield := HomalgFieldOfRationals( );;[127X[104X
    [4X[25Xgap>[125X [27Xvec := LeftPresentations( field );;[127X[104X
    [4X[25Xgap>[125X [27XF := CapFunctor( "CohomForVec", [ vec, [ vec, true ] ], vec );;[127X[104X
    [4X[25Xgap>[125X [27Xobj_func := function( A, B ) return TensorProductOnObjects( A, DualOnObjects( B ) ); end;;[127X[104X
    [4X[25Xgap>[125X [27Xmor_func := function( source, alpha, beta, range ) return TensorProductOnMorphismsWithGivenTensorProducts( source, alpha, DualOnMorphisms( beta ), range ); end;;[127X[104X
    [4X[25Xgap>[125X [27XAddObjectFunction( F, obj_func );;[127X[104X
    [4X[25Xgap>[125X [27XAddMorphismFunction( F, mor_func );;[127X[104X
  [4X[32X[104X
  
  [33X[0;0YCAP  regards  [23XF[123X  as  a binary functor on a technical level, as we can see by
  looking at its input signature:[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XInputSignature( F );[127X[104X
    [4X[28X[ [ Category of left presentations of Q, false ], [ Category of left presentations of Q, true ] ][128X[104X
  [4X[32X[104X
  
  [33X[0;0YWe can see that [10XApplyFunctor[110X works both on two arguments and on one argument
  (in the product category).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XV1 := TensorUnit( vec );;[127X[104X
    [4X[25Xgap>[125X [27XV3 := DirectSum( V1, V1, V1 );;[127X[104X
    [4X[25Xgap>[125X [27Xpi1 := ProjectionInFactorOfDirectSum( [ V1, V1 ], 1 );;[127X[104X
    [4X[25Xgap>[125X [27Xpi2 := ProjectionInFactorOfDirectSum( [ V3, V1 ], 1 );;[127X[104X
    [4X[25Xgap>[125X [27Xvalue1 := ApplyFunctor( F, pi1, pi2 );;[127X[104X
    [4X[25Xgap>[125X [27Xinput := Product( pi1, Opposite( pi2 ) );;[127X[104X
    [4X[25Xgap>[125X [27Xvalue2 := ApplyFunctor( F, input );;[127X[104X
    [4X[25Xgap>[125X [27XIsCongruentForMorphisms( value1, value2 );[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  [33X[0;0YHere is the second way to model a binary functor:[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XF2 := CapFunctor( "CohomForVec2", Product( vec, Opposite( vec ) ), vec );;[127X[104X
    [4X[25Xgap>[125X [27XAddObjectFunction( F2, a -> obj_func( a[1], Opposite( a[2] ) ) );;[127X[104X
    [4X[25Xgap>[125X [27XAddMorphismFunction( F2, function( source, datum, range ) return mor_func( source, datum[1], Opposite( datum[2] ), range ); end );;[127X[104X
    [4X[25Xgap>[125X [27Xvalue3 := ApplyFunctor( F2,input );;[127X[104X
    [4X[25Xgap>[125X [27XIsCongruentForMorphisms( value1, value3 );[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  [33X[0;0YCAP  regards  [23XF2[123X  as  a unary functor on a technical level, as we can see by
  looking at its input signature:[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XInputSignature( F2 );[127X[104X
    [4X[28X[ [ Product of: Category of left presentations of Q, Opposite of Category of left presentations of Q, false ] ][128X[104X
  [4X[32X[104X
  
  [33X[0;0YInstallation  of  the first functor as a GAP-operation. It will be installed
  both as a unary and binary version.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XInstallFunctor( F, "F_installation" );;[127X[104X
    [4X[25Xgap>[125X [27XF_installation( pi1, pi2 );;[127X[104X
    [4X[25Xgap>[125X [27XF_installation( input );;[127X[104X
    [4X[25Xgap>[125X [27XF_installationOnObjects( V1, V1 );;[127X[104X
    [4X[25Xgap>[125X [27XF_installationOnObjects( Product( V1, Opposite( V1 ) ) );;[127X[104X
    [4X[25Xgap>[125X [27XF_installationOnMorphisms( pi1, pi2 );;[127X[104X
    [4X[25Xgap>[125X [27XF_installationOnMorphisms( input );;[127X[104X
  [4X[32X[104X
  
  [33X[0;0YInstallation  of the second functor as a GAP-operation. It will be installed
  only as a unary version.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XInstallFunctor( F2, "F_installation2" );;[127X[104X
    [4X[25Xgap>[125X [27XF_installation2( input );;[127X[104X
    [4X[25Xgap>[125X [27XF_installation2OnObjects( Product( V1, Opposite( V1 ) ) );;[127X[104X
    [4X[25Xgap>[125X [27XF_installation2OnMorphisms( input );;[127X[104X
  [4X[32X[104X
  
  
  [1X14.3 [33X[0;0YHandlePrecompiledTowers[133X[101X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XLoadPackage( "CAP", false );[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27Xdummy1 := CreateCapCategory( );;[127X[104X
    [4X[25Xgap>[125X [27Xdummy2 := CreateCapCategory( );;[127X[104X
    [4X[25Xgap>[125X [27Xdummy3 := CreateCapCategory( );;[127X[104X
    [4X[25Xgap>[125X [27XDisplayAndReturn := function ( string )[127X[104X
    [4X[25X>[125X [27X    Display( string ); return string; end;;[127X[104X
    [4X[25Xgap>[125X [27Xdummy1!.compiler_hints := rec( );;[127X[104X
    [4X[25Xgap>[125X [27Xdummy1!.compiler_hints.precompiled_towers := [[127X[104X
    [4X[25X>[125X [27X  rec([127X[104X
    [4X[25X>[125X [27X    remaining_constructors_in_tower := [ "Constructor1" ],[127X[104X
    [4X[25X>[125X [27X    precompiled_functions_adder := cat ->[127X[104X
    [4X[25X>[125X [27X      DisplayAndReturn( "Adding precompiled operations for Constructor1" ),[127X[104X
    [4X[25X>[125X [27X  ),[127X[104X
    [4X[25X>[125X [27X  rec([127X[104X
    [4X[25X>[125X [27X    remaining_constructors_in_tower := [ "Constructor1", "Constructor2" ],[127X[104X
    [4X[25X>[125X [27X    precompiled_functions_adder := cat ->[127X[104X
    [4X[25X>[125X [27X      DisplayAndReturn( "Adding precompiled operations for Constructor2" ),[127X[104X
    [4X[25X>[125X [27X  ),[127X[104X
    [4X[25X>[125X [27X];;[127X[104X
    [4X[25Xgap>[125X [27XHandlePrecompiledTowers( dummy2, dummy1, "Constructor1" );[127X[104X
    [4X[28XAdding precompiled operations for Constructor1[128X[104X
    [4X[25Xgap>[125X [27XHandlePrecompiledTowers( dummy3, dummy2, "Constructor2" );[127X[104X
    [4X[28XAdding precompiled operations for Constructor2[128X[104X
  [4X[32X[104X
  
  
  [1X14.4 [33X[0;0YHomomorphism structure[133X[101X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XReadPackage( "CAP", "examples/FieldAsCategory.g" );;[127X[104X
    [4X[25Xgap>[125X [27XQ := HomalgFieldOfRationals();;[127X[104X
    [4X[25Xgap>[125X [27XQoid := FieldAsCategory( Q );;[127X[104X
    [4X[25Xgap>[125X [27Xa := FieldAsCategoryMorphism( 1/2, Qoid );;[127X[104X
    [4X[25Xgap>[125X [27Xb := FieldAsCategoryMorphism( -2/3, Qoid );;[127X[104X
    [4X[25Xgap>[125X [27Xu := FieldAsCategoryUniqueObject( Qoid );;[127X[104X
    [4X[25Xgap>[125X [27XIsCongruentForMorphisms( a,[127X[104X
    [4X[25X>[125X [27X    InterpretMorphismFromDistinguishedObjectToHomomorphismStructureAsMorphism([127X[104X
    [4X[25X>[125X [27X        u,u,[127X[104X
    [4X[25X>[125X [27X        InterpretMorphismAsMorphismFromDistinguishedObjectToHomomorphismStructure([127X[104X
    [4X[25X>[125X [27X            a[127X[104X
    [4X[25X>[125X [27X        )[127X[104X
    [4X[25X>[125X [27X    )[127X[104X
    [4X[25X>[125X [27X);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27Xa = HomStructure( u, u, HomStructure( a ) );[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsEqualForObjects( HomStructure( Qoid ), DistinguishedObjectOfHomomorphismStructure( Qoid ) );[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27Xc := FieldAsCategoryMorphism( 3, Qoid );;[127X[104X
    [4X[25Xgap>[125X [27Xd := FieldAsCategoryMorphism( 0, Qoid );;[127X[104X
    [4X[25Xgap>[125X [27Xleft_coeffs := [ [ a, b ], [ c, d ] ];;[127X[104X
    [4X[25Xgap>[125X [27Xright_coeffs := [ [ PreCompose( a, b ), PreCompose( b, c ) ], [ c, PreCompose( a, a ) ] ];;[127X[104X
    [4X[25Xgap>[125X [27Xright_side := [ a, b ];;[127X[104X
    [4X[25Xgap>[125X [27XMereExistenceOfSolutionOfLinearSystemInAbCategory( left_coeffs, right_coeffs, right_side );[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27Xsolution := [127X[104X
    [4X[25X>[125X [27X    SolveLinearSystemInAbCategory([127X[104X
    [4X[25X>[125X [27X    left_coeffs,[127X[104X
    [4X[25X>[125X [27X    right_coeffs,[127X[104X
    [4X[25X>[125X [27X    right_side[127X[104X
    [4X[25X>[125X [27X);;[127X[104X
    [4X[25Xgap>[125X [27XForAll( [ 1, 2 ], i ->[127X[104X
    [4X[25X>[125X [27X    IsCongruentForMorphisms([127X[104X
    [4X[25X>[125X [27X        Sum( List( [ 1, 2 ], j -> PreCompose( [ left_coeffs[i][j], solution[j], right_coeffs[i][j] ] ) ) ),[127X[104X
    [4X[25X>[125X [27X        right_side[i][127X[104X
    [4X[25X>[125X [27X    )[127X[104X
    [4X[25X>[125X [27X);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsLiftable( c, d );[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27XLiftOrFail( c, d );[127X[104X
    [4X[28Xfail[128X[104X
    [4X[25Xgap>[125X [27XIsLiftable( d, c );[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XLiftOrFail( d, c );[127X[104X
    [4X[28X0[128X[104X
    [4X[25Xgap>[125X [27XLift( d, c );[127X[104X
    [4X[28X0[128X[104X
    [4X[25Xgap>[125X [27XIsColiftable( c, d );[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XColiftOrFail( c, d );[127X[104X
    [4X[28X0[128X[104X
    [4X[25Xgap>[125X [27XColift( c, d );[127X[104X
    [4X[28X0[128X[104X
    [4X[25Xgap>[125X [27XIsColiftable( d, c );[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27XColiftOrFail( d, c );[127X[104X
    [4X[28Xfail[128X[104X
  [4X[32X[104X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XReadPackage( "CAP", "examples/StringsAsCategory.g" );;[127X[104X
    [4X[25Xgap>[125X [27XC := StringsAsCategory();;[127X[104X
    [4X[25Xgap>[125X [27Xobj1 := StringsAsCategoryObject( "qaeiou", C );;[127X[104X
    [4X[25Xgap>[125X [27Xobj2 := StringsAsCategoryObject( "qxayeziouT", C );;[127X[104X
    [4X[25Xgap>[125X [27Xmor := StringsAsCategoryMorphism( obj1, "xyzaTe", obj2 );;[127X[104X
    [4X[25Xgap>[125X [27XIsWellDefined( mor );[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27X## Test SimplifyObject[127X[104X
    [4X[25X>[125X [27XIsEqualForObjects( SimplifyObject( obj1, 0 ), obj1 );[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsEqualForObjects( SimplifyObject( obj1, 1 ), obj1 );[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27XForAny( [0,1,2,3,4], i -> IsEqualForObjects( SimplifyObject( obj1, i ), SimplifyObject( obj1, i + 1 ) ) );[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27XForAll( [5,6,7,8], i -> IsEqualForObjects( SimplifyObject( obj1, i ), SimplifyObject( obj1, i + 1 ) ) );[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27X## Test SimplifyMorphism[127X[104X
    [4X[25X>[125X [27XIsEqualForMorphisms( SimplifyMorphism( mor, 0 ), mor );[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsEqualForMorphisms( SimplifyMorphism( mor, 1 ), mor );[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27XForAny( [0,1], i -> IsEqualForMorphisms( SimplifyMorphism( mor, i ), SimplifyMorphism( mor, i + 1 ) ) );[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27XForAll( [2,3,4,5], i -> IsEqualForMorphisms( SimplifyMorphism( mor, i ), SimplifyMorphism( mor, i + 1 ) ) );[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27X## Test SimplifySource[127X[104X
    [4X[25X>[125X [27XIsEqualForMorphismsOnMor( SimplifySource( mor, 0 ), mor );[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsEqualForMorphismsOnMor( SimplifySource( mor, 1 ), mor );[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27XForAny( [0,1,2,3,4], i -> IsEqualForMorphismsOnMor( SimplifySource( mor, i ), SimplifySource( mor, i + 1 ) ) );[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27XForAll( [5,6,7,8,9], i -> IsEqualForMorphismsOnMor( SimplifySource( mor, i ), SimplifySource( mor, i + 1 ) ) );[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsCongruentForMorphisms([127X[104X
    [4X[25X>[125X [27X    PreCompose( SimplifySource_IsoFromInputObject( mor, infinity ), SimplifySource( mor, infinity ) ), mor[127X[104X
    [4X[25X>[125X [27X);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsCongruentForMorphisms([127X[104X
    [4X[25X>[125X [27X    PreCompose( SimplifySource_IsoToInputObject( mor, infinity ), mor ) , SimplifySource( mor, infinity )[127X[104X
    [4X[25X>[125X [27X);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27X## Test SimplifyRange[127X[104X
    [4X[25X>[125X [27XIsEqualForMorphismsOnMor( SimplifyRange( mor, 0 ), mor );[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsEqualForMorphismsOnMor( SimplifyRange( mor, 1 ), mor );[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27XForAny( [0,1,2,3,4], i -> IsEqualForMorphismsOnMor( SimplifyRange( mor, i ), SimplifyRange( mor, i + 1 ) ) );[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27XForAll( [5,6,7,8,9], i -> IsEqualForMorphismsOnMor( SimplifyRange( mor, i ), SimplifyRange( mor, i + 1 ) ) );[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsCongruentForMorphisms([127X[104X
    [4X[25X>[125X [27X    PreCompose( SimplifyRange( mor, infinity ), SimplifyRange_IsoToInputObject( mor, infinity ) ), mor[127X[104X
    [4X[25X>[125X [27X);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsCongruentForMorphisms([127X[104X
    [4X[25X>[125X [27X    PreCompose( mor, SimplifyRange_IsoFromInputObject( mor, infinity ) ), SimplifyRange( mor, infinity )[127X[104X
    [4X[25X>[125X [27X);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27X## Test SimplifySourceAndRange[127X[104X
    [4X[25X>[125X [27XIsEqualForMorphismsOnMor( SimplifySourceAndRange( mor, 0 ), mor );[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsEqualForMorphismsOnMor( SimplifySourceAndRange( mor, 1 ), mor );[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27XForAny( [0,1,2,3,4], i -> IsEqualForMorphismsOnMor( SimplifySourceAndRange( mor, i ), SimplifySourceAndRange( mor, i + 1 ) ) );[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27XForAll( [5,6,7,8,9], i -> IsEqualForMorphismsOnMor( SimplifySourceAndRange( mor, i ), SimplifySourceAndRange( mor, i + 1 ) ) );[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsCongruentForMorphisms([127X[104X
    [4X[25X>[125X [27X    mor,[127X[104X
    [4X[25X>[125X [27X    PreCompose( [ SimplifySourceAndRange_IsoFromInputSource( mor, infinity ),[127X[104X
    [4X[25X>[125X [27X                  SimplifySourceAndRange( mor, infinity ),[127X[104X
    [4X[25X>[125X [27X                  SimplifySourceAndRange_IsoToInputRange( mor, infinity ) ] )[127X[104X
    [4X[25X>[125X [27X);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsCongruentForMorphisms([127X[104X
    [4X[25X>[125X [27X    SimplifySourceAndRange( mor, infinity ),[127X[104X
    [4X[25X>[125X [27X    PreCompose( [ SimplifySourceAndRange_IsoToInputSource( mor, infinity ),[127X[104X
    [4X[25X>[125X [27X                  mor,[127X[104X
    [4X[25X>[125X [27X                  SimplifySourceAndRange_IsoFromInputRange( mor, infinity ) ] )[127X[104X
    [4X[25X>[125X [27X);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27X## Test SimplifyEndo[127X[104X
    [4X[25X>[125X [27Xendo := StringsAsCategoryMorphism( obj1, "uoiea", obj1 );;[127X[104X
    [4X[25Xgap>[125X [27XIsWellDefined( endo );[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsEqualForMorphismsOnMor( SimplifyEndo( endo, 0 ), endo );[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsEqualForMorphismsOnMor( SimplifyEndo( endo, 1 ), endo );[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27XForAny( [0,1,2,3,4], i -> IsEqualForMorphismsOnMor( SimplifySourceAndRange( endo, i ), SimplifySourceAndRange( endo, i + 1 ) ) );[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27XForAll( [5,6,7,8,9], i -> IsEqualForMorphismsOnMor( SimplifySourceAndRange( endo, i ), SimplifySourceAndRange( endo, i + 1 ) ) );[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27Xiota := SimplifyEndo_IsoToInputObject( endo, infinity );;[127X[104X
    [4X[25Xgap>[125X [27Xiota_inv := SimplifyEndo_IsoFromInputObject( endo, infinity );;[127X[104X
    [4X[25Xgap>[125X [27XIsCongruentForMorphisms( PreCompose( [ iota_inv, SimplifyEndo( endo, infinity ), iota ] ), endo );[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  
  [1X14.5 [33X[0;0YHomology object[133X[101X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xfield := HomalgFieldOfRationals( );;[127X[104X
    [4X[25Xgap>[125X [27XA := VectorSpaceObject( 1, field );;[127X[104X
    [4X[25Xgap>[125X [27XB := VectorSpaceObject( 2, field );;[127X[104X
    [4X[25Xgap>[125X [27XC := VectorSpaceObject( 3, field );;[127X[104X
    [4X[25Xgap>[125X [27Xalpha := VectorSpaceMorphism( A, HomalgMatrix( [ [ 1, 0, 0 ] ], 1, 3, field ), C );;[127X[104X
    [4X[25Xgap>[125X [27Xbeta := VectorSpaceMorphism( C, HomalgMatrix( [ [ 1, 0 ], [ 1, 1 ], [ 1, 2 ] ], 3, 2, field ), B );;[127X[104X
    [4X[25Xgap>[125X [27XIsZero( PreCompose( alpha, beta ) );[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27XIsCongruentForMorphisms([127X[104X
    [4X[25X>[125X [27X    IdentityMorphism( HomologyObject( alpha, beta ) ),[127X[104X
    [4X[25X>[125X [27X    HomologyObjectFunctorial( alpha, beta, IdentityMorphism( C ), alpha, beta )[127X[104X
    [4X[25X>[125X [27X);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27Xkernel_beta := KernelEmbedding( beta );;[127X[104X
    [4X[25Xgap>[125X [27XK := Source( kernel_beta );;[127X[104X
    [4X[25Xgap>[125X [27XIsIsomorphism([127X[104X
    [4X[25X>[125X [27X    HomologyObjectFunctorial( [127X[104X
    [4X[25X>[125X [27X        MorphismFromZeroObject( K ), [127X[104X
    [4X[25X>[125X [27X        MorphismIntoZeroObject( K ),[127X[104X
    [4X[25X>[125X [27X        kernel_beta,[127X[104X
    [4X[25X>[125X [27X        MorphismFromZeroObject( Source( beta ) ),[127X[104X
    [4X[25X>[125X [27X        beta[127X[104X
    [4X[25X>[125X [27X    )[127X[104X
    [4X[25X>[125X [27X);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27Xcokernel_alpha := CokernelProjection( alpha );;[127X[104X
    [4X[25Xgap>[125X [27XCo := Range( cokernel_alpha );;[127X[104X
    [4X[25Xgap>[125X [27XIsIsomorphism([127X[104X
    [4X[25X>[125X [27X    HomologyObjectFunctorial( [127X[104X
    [4X[25X>[125X [27X        alpha,[127X[104X
    [4X[25X>[125X [27X        MorphismIntoZeroObject( Range( alpha ) ),[127X[104X
    [4X[25X>[125X [27X        cokernel_alpha,[127X[104X
    [4X[25X>[125X [27X        MorphismFromZeroObject( Co ),[127X[104X
    [4X[25X>[125X [27X        MorphismIntoZeroObject( Co )[127X[104X
    [4X[25X>[125X [27X    )[127X[104X
    [4X[25X>[125X [27X);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27Xalpha_op := Opposite( alpha );;[127X[104X
    [4X[25Xgap>[125X [27Xbeta_op := Opposite( beta );;[127X[104X
    [4X[25Xgap>[125X [27XIsCongruentForMorphisms([127X[104X
    [4X[25X>[125X [27X    IdentityMorphism( HomologyObject( beta_op, alpha_op ) ),[127X[104X
    [4X[25X>[125X [27X    HomologyObjectFunctorial( beta_op, alpha_op, IdentityMorphism( Opposite( C ) ), beta_op, alpha_op )[127X[104X
    [4X[25X>[125X [27X);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27Xkernel_beta := KernelEmbedding( beta_op );;[127X[104X
    [4X[25Xgap>[125X [27XK := Source( kernel_beta );;[127X[104X
    [4X[25Xgap>[125X [27XIsIsomorphism([127X[104X
    [4X[25X>[125X [27X    HomologyObjectFunctorial( [127X[104X
    [4X[25X>[125X [27X        MorphismFromZeroObject( K ), [127X[104X
    [4X[25X>[125X [27X        MorphismIntoZeroObject( K ),[127X[104X
    [4X[25X>[125X [27X        kernel_beta,[127X[104X
    [4X[25X>[125X [27X        MorphismFromZeroObject( Source( beta_op ) ),[127X[104X
    [4X[25X>[125X [27X        beta_op[127X[104X
    [4X[25X>[125X [27X    )[127X[104X
    [4X[25X>[125X [27X);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27Xcokernel_alpha := CokernelProjection( alpha_op );;[127X[104X
    [4X[25Xgap>[125X [27XCo := Range( cokernel_alpha );;[127X[104X
    [4X[25Xgap>[125X [27XIsIsomorphism([127X[104X
    [4X[25X>[125X [27X    HomologyObjectFunctorial( [127X[104X
    [4X[25X>[125X [27X        alpha_op,[127X[104X
    [4X[25X>[125X [27X        MorphismIntoZeroObject( Range( alpha_op ) ),[127X[104X
    [4X[25X>[125X [27X        cokernel_alpha,[127X[104X
    [4X[25X>[125X [27X        MorphismFromZeroObject( Co ),[127X[104X
    [4X[25X>[125X [27X        MorphismIntoZeroObject( Co )[127X[104X
    [4X[25X>[125X [27X    )[127X[104X
    [4X[25X>[125X [27X);[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  
  [1X14.6 [33X[0;0YLiftable[133X[101X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xfield := HomalgFieldOfRationals( );;[127X[104X
    [4X[25Xgap>[125X [27XV := VectorSpaceObject( 1, field );;[127X[104X
    [4X[25Xgap>[125X [27XW := VectorSpaceObject( 2, field );;[127X[104X
    [4X[25Xgap>[125X [27Xalpha := VectorSpaceMorphism( V, HomalgMatrix( [ [ 1, -1 ] ], 1, 2, field ), W );;[127X[104X
    [4X[25Xgap>[125X [27Xbeta := VectorSpaceMorphism( W, HomalgMatrix( [ [ 1, 2 ], [ 3, 4 ] ], 2, 2, field ), W );;[127X[104X
    [4X[25Xgap>[125X [27XIsLiftable( alpha, beta );[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsLiftable( beta, alpha );[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27XIsLiftableAlongMonomorphism( beta, alpha );[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27Xgamma := VectorSpaceMorphism( W, HomalgMatrix( [ [ 1 ], [ 1 ] ], 2, 1, field ), V );;[127X[104X
    [4X[25Xgap>[125X [27XIsColiftable( beta, gamma );[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsColiftable( gamma, beta );[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27XIsColiftableAlongEpimorphism( beta, gamma );[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  
  [1X14.7 [33X[0;0YWrapperCategory[133X[101X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XLoadPackage( "LinearAlgebraForCAP", false );[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XQ := HomalgFieldOfRationals( );[127X[104X
    [4X[28XQ[128X[104X
    [4X[25Xgap>[125X [27XQmat := MATRIX_CATEGORY( Q );[127X[104X
    [4X[28XCategory of matrices over Q[128X[104X
    [4X[25Xgap>[125X [27XWrapper := WrapperCategory( Qmat, rec( ) );[127X[104X
    [4X[28XWrapperCategory( Category of matrices over Q )[128X[104X
    [4X[25Xgap>[125X [27Xmor := ZeroMorphism( ZeroObject( Wrapper ), ZeroObject( Wrapper ) );;[127X[104X
    [4X[25Xgap>[125X [27X2 * mor;;[127X[104X
    [4X[25Xgap>[125X [27XBasisOfExternalHom( Source( mor ), Range( mor ) );;[127X[104X
    [4X[25Xgap>[125X [27XCoefficientsOfMorphism( mor );;[127X[104X
    [4X[25Xgap>[125X [27Xdistinguished_object := DistinguishedObjectOfHomomorphismStructure( Wrapper );;[127X[104X
    [4X[25Xgap>[125X [27Xobject := HomomorphismStructureOnObjects( Source( mor ), Source( mor ) );;[127X[104X
    [4X[25Xgap>[125X [27XHomomorphismStructureOnMorphisms( mor, mor );;[127X[104X
    [4X[25Xgap>[125X [27XHomomorphismStructureOnMorphismsWithGivenObjects( object, mor, mor, object );;[127X[104X
    [4X[25Xgap>[125X [27Xiota := InterpretMorphismAsMorphismFromDistinguishedObjectToHomomorphismStructure( mor );;[127X[104X
    [4X[25Xgap>[125X [27XInterpretMorphismAsMorphismFromDistinguishedObjectToHomomorphismStructureWithGivenObjects( distinguished_object, mor, object );;[127X[104X
    [4X[25Xgap>[125X [27Xbeta := InterpretMorphismFromDistinguishedObjectToHomomorphismStructureAsMorphism( Source( mor ), Range( mor ), iota );;[127X[104X
    [4X[25Xgap>[125X [27XIsCongruentForMorphisms( mor, beta );[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XQmat2 := MATRIX_CATEGORY( Q );[127X[104X
    [4X[28XCategory of matrices over Q[128X[104X
    [4X[25Xgap>[125X [27XWrapper2 := WrapperCategory( Qmat2, rec( wrap_range_of_hom_structure := true ) );[127X[104X
    [4X[28XWrapperCategory( Category of matrices over Q )[128X[104X
    [4X[25Xgap>[125X [27Xmor := ZeroMorphism( ZeroObject( Wrapper2 ), ZeroObject( Wrapper2 ) );;[127X[104X
    [4X[25Xgap>[125X [27Xdistinguished_object := DistinguishedObjectOfHomomorphismStructure( Wrapper2 );;[127X[104X
    [4X[25Xgap>[125X [27Xobject := HomomorphismStructureOnObjects( Source( mor ), Source( mor ) );;[127X[104X
    [4X[25Xgap>[125X [27XHomomorphismStructureOnMorphisms( mor, mor );;[127X[104X
    [4X[25Xgap>[125X [27XHomomorphismStructureOnMorphismsWithGivenObjects( object, mor, mor, object );;[127X[104X
    [4X[25Xgap>[125X [27Xiota := InterpretMorphismAsMorphismFromDistinguishedObjectToHomomorphismStructure( mor );;[127X[104X
    [4X[25Xgap>[125X [27XInterpretMorphismAsMorphismFromDistinguishedObjectToHomomorphismStructureWithGivenObjects( distinguished_object, mor, object );;[127X[104X
    [4X[25Xgap>[125X [27Xbeta := InterpretMorphismFromDistinguishedObjectToHomomorphismStructureAsMorphism( Source( mor ), Range( mor ), iota );;[127X[104X
    [4X[25Xgap>[125X [27XIsCongruentForMorphisms( mor, beta );[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XLoadPackage( "LinearAlgebraForCAP" );[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XLoadPackage( "GeneralizedMorphismsForCAP" );[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27Xold_generalized_morphism_standard := CAP_INTERNAL!.generalized_morphism_standard;;[127X[104X
    [4X[25Xgap>[125X [27XSwitchGeneralizedMorphismStandard( "cospan" );[127X[104X
    [4X[25Xgap>[125X [27XQ := HomalgFieldOfRationals( );[127X[104X
    [4X[28XQ[128X[104X
    [4X[25Xgap>[125X [27Xid := HomalgIdentityMatrix( 8, Q );[127X[104X
    [4X[28X<An unevaluated 8 x 8 identity matrix over an internal ring>[128X[104X
    [4X[25Xgap>[125X [27Xa := CertainColumns( CertainRows( id, [ 1, 2, 3 ] ), [ 2, 3, 4, 5 ] );[127X[104X
    [4X[28X<An unevaluated non-zero 3 x 4 matrix over an internal ring>[128X[104X
    [4X[25Xgap>[125X [27Xb := CertainColumns( CertainRows( id, [ 1, 2, 3, 4 ] ), [ 2, 3, 4, 5, 6 ] );[127X[104X
    [4X[28X<An unevaluated non-zero 4 x 5 matrix over an internal ring>[128X[104X
    [4X[25Xgap>[125X [27Xc := CertainColumns( CertainRows( id, [ 1, 2, 3, 4, 5 ] ), [ 3, 4, 5, 6, 7, 8 ] );[127X[104X
    [4X[28X<An unevaluated non-zero 5 x 6 matrix over an internal ring>[128X[104X
    [4X[25Xgap>[125X [27XIsZero( a * b );[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27XIsZero( b * c );[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27XIsZero( a * b * c );[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XQmat := MatrixCategory( Q );[127X[104X
    [4X[28XCategory of matrices over Q[128X[104X
    [4X[25Xgap>[125X [27XWrapper := WrapperCategory( Qmat, rec( ) );[127X[104X
    [4X[28XWrapperCategory( Category of matrices over Q )[128X[104X
    [4X[25Xgap>[125X [27Xa := a / Wrapper;[127X[104X
    [4X[28X<A morphism in WrapperCategory( Category of matrices over Q )>[128X[104X
    [4X[25Xgap>[125X [27Xb := b / Wrapper;[127X[104X
    [4X[28X<A morphism in WrapperCategory( Category of matrices over Q )>[128X[104X
    [4X[25Xgap>[125X [27Xc := c / Wrapper;[127X[104X
    [4X[28X<A morphism in WrapperCategory( Category of matrices over Q )>[128X[104X
    [4X[25Xgap>[125X [27Xd := CokernelProjection( a );[127X[104X
    [4X[28X<An epimorphism in WrapperCategory( Category of matrices over Q )>[128X[104X
    [4X[25Xgap>[125X [27Xe := CokernelColift( a, PreCompose( b, c ) );[127X[104X
    [4X[28X<A morphism in WrapperCategory( Category of matrices over Q )>[128X[104X
    [4X[25Xgap>[125X [27Xf := KernelEmbedding( e );[127X[104X
    [4X[28X<A monomorphism in WrapperCategory( Category of matrices over Q )>[128X[104X
    [4X[25Xgap>[125X [27Xg := KernelEmbedding( c );[127X[104X
    [4X[28X<A monomorphism in WrapperCategory( Category of matrices over Q )>[128X[104X
    [4X[25Xgap>[125X [27Xh := KernelLift( c, PreCompose( a, b ) );[127X[104X
    [4X[28X<A morphism in WrapperCategory( Category of matrices over Q )>[128X[104X
    [4X[25Xgap>[125X [27Xi := CokernelProjection( h );[127X[104X
    [4X[28X<An epi morphism in WrapperCategory( Category of matrices over Q )>[128X[104X
    [4X[25Xgap>[125X [27Xff := AsGeneralizedMorphism( f );[127X[104X
    [4X[28X<A morphism in Generalized morphism category of[128X[104X
    [4X[28X WrapperCategory( Category of matrices over Q ) by cospan>[128X[104X
    [4X[25Xgap>[125X [27Xdd := AsGeneralizedMorphism( d );[127X[104X
    [4X[28X<A morphism in Generalized morphism category of[128X[104X
    [4X[28X WrapperCategory( Category of matrices over Q ) by cospan>[128X[104X
    [4X[25Xgap>[125X [27Xbb := AsGeneralizedMorphism( b );[127X[104X
    [4X[28X<A morphism in Generalized morphism category of[128X[104X
    [4X[28X WrapperCategory( Category of matrices over Q ) by cospan>[128X[104X
    [4X[25Xgap>[125X [27Xgg := AsGeneralizedMorphism( g );[127X[104X
    [4X[28X<A morphism in Generalized morphism category of[128X[104X
    [4X[28X WrapperCategory( Category of matrices over Q ) by cospan>[128X[104X
    [4X[25Xgap>[125X [27Xii := AsGeneralizedMorphism( i );[127X[104X
    [4X[28X<A morphism in Generalized morphism category of[128X[104X
    [4X[28X WrapperCategory( Category of matrices over Q ) by cospan>[128X[104X
    [4X[25Xgap>[125X [27Xss := PreCompose( [ ff, PseudoInverse( dd ), bb, PseudoInverse( gg ), ii ] );[127X[104X
    [4X[28X<A morphism in Generalized morphism category of[128X[104X
    [4X[28X WrapperCategory( Category of matrices over Q ) by cospan>[128X[104X
    [4X[25Xgap>[125X [27Xs := HonestRepresentative( ss );[127X[104X
    [4X[28X<A morphism in WrapperCategory( Category of matrices over Q )>[128X[104X
    [4X[25Xgap>[125X [27Xj := KernelObjectFunctorial( b, d, e );[127X[104X
    [4X[28X<A morphism in WrapperCategory( Category of matrices over Q )>[128X[104X
    [4X[25Xgap>[125X [27Xk := CokernelObjectFunctorial( h, g, b );[127X[104X
    [4X[28X<A morphism in WrapperCategory( Category of matrices over Q )>[128X[104X
    [4X[25Xgap>[125X [27XHK := HomologyObject( j, s );[127X[104X
    [4X[28X<An object in WrapperCategory( Category of matrices over Q )>[128X[104X
    [4X[25Xgap>[125X [27XHC := HomologyObject( s, k );[127X[104X
    [4X[28X<An object in WrapperCategory( Category of matrices over Q )>[128X[104X
    [4X[25Xgap>[125X [27XSwitchGeneralizedMorphismStandard( old_generalized_morphism_standard );[127X[104X
  [4X[32X[104X
  
  
  [1X14.8 [33X[0;0YMonoidal Categories[133X[101X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XZZ := HomalgRingOfIntegers();;[127X[104X
    [4X[25Xgap>[125X [27XMl := AsLeftPresentation( HomalgMatrix( [ [ 2 ] ], 1, 1, ZZ ) );[127X[104X
    [4X[28X<An object in Category of left presentations of Z>[128X[104X
    [4X[25Xgap>[125X [27XNl := AsLeftPresentation( HomalgMatrix( [ [ 3 ] ], 1, 1, ZZ ) );[127X[104X
    [4X[28X<An object in Category of left presentations of Z>[128X[104X
    [4X[25Xgap>[125X [27XTl := TensorProductOnObjects( Ml, Nl );[127X[104X
    [4X[28X<An object in Category of left presentations of Z>[128X[104X
    [4X[25Xgap>[125X [27XDisplay( UnderlyingMatrix( Tl ) );[127X[104X
    [4X[28X[ [  3 ],[128X[104X
    [4X[28X  [  2 ] ][128X[104X
    [4X[25Xgap>[125X [27XIsZeroForObjects( Tl );[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XBl := Braiding( DirectSum( Ml, Nl ), DirectSum( Ml, Ml ) );[127X[104X
    [4X[28X<A morphism in Category of left presentations of Z>[128X[104X
    [4X[25Xgap>[125X [27XDisplay( UnderlyingMatrix( Bl ) );[127X[104X
    [4X[28X[ [  1,  0,  0,  0 ],[128X[104X
    [4X[28X  [  0,  0,  1,  0 ],[128X[104X
    [4X[28X  [  0,  1,  0,  0 ],[128X[104X
    [4X[28X  [  0,  0,  0,  1 ] ][128X[104X
    [4X[25Xgap>[125X [27XIsWellDefined( Bl );[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XUl := TensorUnit( CapCategory( Ml ) );[127X[104X
    [4X[28X<An object in Category of left presentations of Z>[128X[104X
    [4X[25Xgap>[125X [27XIntHoml := InternalHomOnObjects( DirectSum( Ml, Ul ), Nl );[127X[104X
    [4X[28X<An object in Category of left presentations of Z>[128X[104X
    [4X[25Xgap>[125X [27XDisplay( UnderlyingMatrix( IntHoml ) );[127X[104X
    [4X[28X[ [  1,  2 ],[128X[104X
    [4X[28X  [  0,  3 ] ][128X[104X
    [4X[25Xgap>[125X [27Xgenerator_l1 := StandardGeneratorMorphism( IntHoml, 1 );[127X[104X
    [4X[28X<A morphism in Category of left presentations of Z>[128X[104X
    [4X[25Xgap>[125X [27Xmorphism_l1 := LambdaElimination( DirectSum( Ml, Ul ), Nl, generator_l1 );[127X[104X
    [4X[28X<A morphism in Category of left presentations of Z>[128X[104X
    [4X[25Xgap>[125X [27XDisplay( UnderlyingMatrix( morphism_l1 ) );[127X[104X
    [4X[28X[ [  -3 ],[128X[104X
    [4X[28X  [   2 ] ][128X[104X
    [4X[25Xgap>[125X [27Xgenerator_l2 := StandardGeneratorMorphism( IntHoml, 2 );[127X[104X
    [4X[28X<A morphism in Category of left presentations of Z>[128X[104X
    [4X[25Xgap>[125X [27Xmorphism_l2 := LambdaElimination( DirectSum( Ml, Ul ), Nl, generator_l2 );[127X[104X
    [4X[28X<A morphism in Category of left presentations of Z>[128X[104X
    [4X[25Xgap>[125X [27XDisplay( UnderlyingMatrix( morphism_l2 ) );[127X[104X
    [4X[28X[ [   0 ],[128X[104X
    [4X[28X  [  -1 ] ][128X[104X
    [4X[25Xgap>[125X [27XIsEqualForMorphisms( LambdaIntroduction( morphism_l1 ), generator_l1 );[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27XIsCongruentForMorphisms( LambdaIntroduction( morphism_l1 ), generator_l1 );[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsEqualForMorphisms( LambdaIntroduction( morphism_l2 ), generator_l2 );[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27XIsCongruentForMorphisms( LambdaIntroduction( morphism_l2 ), generator_l2 );[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XMr := AsRightPresentation( HomalgMatrix( [ [ 2 ] ], 1, 1, ZZ ) );[127X[104X
    [4X[28X<An object in Category of right presentations of Z>[128X[104X
    [4X[25Xgap>[125X [27XNr := AsRightPresentation( HomalgMatrix( [ [ 3 ] ], 1, 1, ZZ ) );[127X[104X
    [4X[28X<An object in Category of right presentations of Z>[128X[104X
    [4X[25Xgap>[125X [27XTr := TensorProductOnObjects( Mr, Nr );[127X[104X
    [4X[28X<An object in Category of right presentations of Z>[128X[104X
    [4X[25Xgap>[125X [27XDisplay( UnderlyingMatrix( Tr ) );[127X[104X
    [4X[28X[ [  3,  2 ] ][128X[104X
    [4X[25Xgap>[125X [27XIsZeroForObjects( Tr );[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XBr := Braiding( DirectSum( Mr, Nr ), DirectSum( Mr, Mr ) );[127X[104X
    [4X[28X<A morphism in Category of right presentations of Z>[128X[104X
    [4X[25Xgap>[125X [27XDisplay( UnderlyingMatrix( Br ) );[127X[104X
    [4X[28X[ [  1,  0,  0,  0 ],[128X[104X
    [4X[28X  [  0,  0,  1,  0 ],[128X[104X
    [4X[28X  [  0,  1,  0,  0 ],[128X[104X
    [4X[28X  [  0,  0,  0,  1 ] ][128X[104X
    [4X[25Xgap>[125X [27XIsWellDefined( Br );[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XUr := TensorUnit( CapCategory( Mr ) );[127X[104X
    [4X[28X<An object in Category of right presentations of Z>[128X[104X
    [4X[25Xgap>[125X [27XIntHomr := InternalHomOnObjects( DirectSum( Mr, Ur ), Nr );[127X[104X
    [4X[28X<An object in Category of right presentations of Z>[128X[104X
    [4X[25Xgap>[125X [27XDisplay( UnderlyingMatrix( IntHomr ) );[127X[104X
    [4X[28X[ [  1,  0 ],[128X[104X
    [4X[28X  [  2,  3 ] ][128X[104X
    [4X[25Xgap>[125X [27Xgenerator_r1 := StandardGeneratorMorphism( IntHomr, 1 );[127X[104X
    [4X[28X<A morphism in Category of right presentations of Z>[128X[104X
    [4X[25Xgap>[125X [27Xmorphism_r1 := LambdaElimination( DirectSum( Mr, Ur ), Nr, generator_r1 );[127X[104X
    [4X[28X<A morphism in Category of right presentations of Z>[128X[104X
    [4X[25Xgap>[125X [27XDisplay( UnderlyingMatrix( morphism_r1 ) );[127X[104X
    [4X[28X[ [  -3,   2 ] ][128X[104X
    [4X[25Xgap>[125X [27Xgenerator_r2 := StandardGeneratorMorphism( IntHoml, 2 );[127X[104X
    [4X[28X<A morphism in Category of left presentations of Z>[128X[104X
    [4X[25Xgap>[125X [27Xmorphism_r2 := LambdaElimination( DirectSum( Ml, Ul ), Nl, generator_r2 );[127X[104X
    [4X[28X<A morphism in Category of left presentations of Z>[128X[104X
    [4X[25Xgap>[125X [27XDisplay( UnderlyingMatrix( morphism_r2 ) );[127X[104X
    [4X[28X[ [   0 ],[128X[104X
    [4X[28X  [  -1 ] ][128X[104X
    [4X[25Xgap>[125X [27XIsEqualForMorphisms( LambdaIntroduction( morphism_r1 ), generator_r1 );[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27XIsCongruentForMorphisms( LambdaIntroduction( morphism_r1 ), generator_r1 );[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsEqualForMorphisms( LambdaIntroduction( morphism_r2 ), generator_r2 );[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27XIsCongruentForMorphisms( LambdaIntroduction( morphism_r2 ), generator_r2 );[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  
  [1X14.9 [33X[0;0YMorphismFromSourceToPushout and MorphismFromFiberProductToSink[133X[101X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xfield := HomalgFieldOfRationals( );;[127X[104X
    [4X[25Xgap>[125X [27XA := VectorSpaceObject( 3, field );;[127X[104X
    [4X[25Xgap>[125X [27XB := VectorSpaceObject( 2, field );;[127X[104X
    [4X[25Xgap>[125X [27Xalpha := VectorSpaceMorphism( B, HomalgMatrix( [ [ 1, -1, 1 ], [ 1, 1, 1 ] ], 2, 3, field ), A );;[127X[104X
    [4X[25Xgap>[125X [27Xbeta := VectorSpaceMorphism( B, HomalgMatrix( [ [ 1, 2, 1 ], [ 2, 1, 1 ] ], 2, 3, field ), A );;[127X[104X
    [4X[25Xgap>[125X [27Xm := MorphismFromFiberProductToSink( [ alpha, beta ] );;[127X[104X
    [4X[25Xgap>[125X [27XIsCongruentForMorphisms([127X[104X
    [4X[25X>[125X [27X    m,[127X[104X
    [4X[25X>[125X [27X    PreCompose( ProjectionInFactorOfFiberProduct( [ alpha, beta ], 1 ), alpha )[127X[104X
    [4X[25X>[125X [27X);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsCongruentForMorphisms([127X[104X
    [4X[25X>[125X [27X    m,[127X[104X
    [4X[25X>[125X [27X    PreCompose( ProjectionInFactorOfFiberProduct( [ alpha, beta ], 2 ), beta )[127X[104X
    [4X[25X>[125X [27X);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsCongruentForMorphisms([127X[104X
    [4X[25X>[125X [27XMorphismFromKernelObjectToSink( alpha ),[127X[104X
    [4X[25X>[125X [27X    PreCompose( KernelEmbedding( alpha ), alpha )[127X[104X
    [4X[25X>[125X [27X);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27Xalpha_p := DualOnMorphisms( alpha );;[127X[104X
    [4X[25Xgap>[125X [27Xbeta_p := DualOnMorphisms( beta );;[127X[104X
    [4X[25Xgap>[125X [27Xm_p := MorphismFromSourceToPushout( [ alpha_p, beta_p ] );;[127X[104X
    [4X[25Xgap>[125X [27XIsCongruentForMorphisms([127X[104X
    [4X[25X>[125X [27X    m_p,[127X[104X
    [4X[25X>[125X [27X    PreCompose( alpha_p, InjectionOfCofactorOfPushout( [ alpha_p, beta_p ], 1 ) )[127X[104X
    [4X[25X>[125X [27X);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsCongruentForMorphisms([127X[104X
    [4X[25X>[125X [27X    m_p,[127X[104X
    [4X[25X>[125X [27X    PreCompose( beta_p, InjectionOfCofactorOfPushout( [ alpha_p, beta_p ], 2 ) )[127X[104X
    [4X[25X>[125X [27X);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsCongruentForMorphisms([127X[104X
    [4X[25X>[125X [27X    MorphismFromSourceToCokernelObject( alpha_p ),[127X[104X
    [4X[25X>[125X [27X    PreCompose( alpha_p, CokernelProjection( alpha_p ) )[127X[104X
    [4X[25X>[125X [27X);[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  
  [1X14.10 [33X[0;0YOpposite category[133X[101X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XQQ := HomalgFieldOfRationals();;[127X[104X
    [4X[25Xgap>[125X [27Xvec := MatrixCategory( QQ );;[127X[104X
    [4X[25Xgap>[125X [27Xop := Opposite( vec );;[127X[104X
    [4X[25Xgap>[125X [27XListKnownCategoricalProperties( op );[127X[104X
    [4X[28X[ "IsAbCategory", "IsAbelianCategory", "IsAbelianCategoryWithEnoughInjectives",[128X[104X
    [4X[28X  "IsAbelianCategoryWithEnoughProjectives", "IsAdditiveCategory",[128X[104X
    [4X[28X  "IsBraidedMonoidalCategory", "IsClosedMonoidalCategory",[128X[104X
    [4X[28X  "IsCoclosedMonoidalCategory", "IsEnrichedOverCommutativeRegularSemigroup",[128X[104X
    [4X[28X  "IsLinearCategoryOverCommutativeRing", "IsMonoidalCategory",[128X[104X
    [4X[28X  "IsPreAbelianCategory", "IsRigidSymmetricClosedMonoidalCategory",[128X[104X
    [4X[28X  "IsRigidSymmetricCoclosedMonoidalCategory", "IsSkeletalCategory",[128X[104X
    [4X[28X  "IsStrictMonoidalCategory", "IsSymmetricClosedMonoidalCategory",[128X[104X
    [4X[28X  "IsSymmetricCoclosedMonoidalCategory", "IsSymmetricMonoidalCategory" ][128X[104X
    [4X[25Xgap>[125X [27XV1 := Opposite( TensorUnit( vec ) );;[127X[104X
    [4X[25Xgap>[125X [27XV2 := DirectSum( V1, V1 );;[127X[104X
    [4X[25Xgap>[125X [27XV3 := DirectSum( V1, V2 );;[127X[104X
    [4X[25Xgap>[125X [27XV4 := DirectSum( V1, V3 );;[127X[104X
    [4X[25Xgap>[125X [27XV5 := DirectSum( V1, V4 );;[127X[104X
    [4X[25Xgap>[125X [27Xalpha13 := InjectionOfCofactorOfDirectSum( [ V1, V2 ], 1 );;[127X[104X
    [4X[25Xgap>[125X [27Xalpha14 := InjectionOfCofactorOfDirectSum( [ V1, V2, V1 ], 3 );;[127X[104X
    [4X[25Xgap>[125X [27Xalpha15 := InjectionOfCofactorOfDirectSum( [ V2, V1, V2 ], 2 );;[127X[104X
    [4X[25Xgap>[125X [27Xalpha23 := InjectionOfCofactorOfDirectSum( [ V2, V1 ], 1 );;[127X[104X
    [4X[25Xgap>[125X [27Xalpha24 := InjectionOfCofactorOfDirectSum( [ V1, V2, V1 ], 2 );;[127X[104X
    [4X[25Xgap>[125X [27Xalpha25 := InjectionOfCofactorOfDirectSum( [ V2, V2, V1 ], 1 );;[127X[104X
    [4X[25Xgap>[125X [27Xmat := [[127X[104X
    [4X[25X>[125X [27X    [ alpha13, alpha14, alpha15 ],[127X[104X
    [4X[25X>[125X [27X    [ alpha23, alpha24, alpha25 ][127X[104X
    [4X[25X>[125X [27X];;[127X[104X
    [4X[25Xgap>[125X [27Xmor := MorphismBetweenDirectSums( mat );;[127X[104X
    [4X[25Xgap>[125X [27XIsWellDefined( mor );[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsWellDefined( Opposite( mor ) );[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsOne( UniversalMorphismFromImage( mor, [ CoastrictionToImage( mor ), ImageEmbedding( mor ) ] ) );[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  
  [1X14.11 [33X[0;0YGeneralized Morphisms Category[133X[101X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xvecspaces := CreateCapCategory( "VectorSpacesForGeneralizedMorphismsTest" );[127X[104X
    [4X[28XVectorSpacesForGeneralizedMorphismsTest[128X[104X
    [4X[25Xgap>[125X [27XReadPackage( "CAP", "examples/VectorSpacesAllMethods.g" );[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XLoadPackage( "GeneralizedMorphismsForCAP" );[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XB := QVectorSpace( 2 );[127X[104X
    [4X[28X<A rational vector space of dimension 2>[128X[104X
    [4X[25Xgap>[125X [27XC := QVectorSpace( 3 );[127X[104X
    [4X[28X<A rational vector space of dimension 3>[128X[104X
    [4X[25Xgap>[125X [27XB_1 := QVectorSpace( 1 );[127X[104X
    [4X[28X<A rational vector space of dimension 1>[128X[104X
    [4X[25Xgap>[125X [27XC_1 := QVectorSpace( 2 );[127X[104X
    [4X[28X<A rational vector space of dimension 2>[128X[104X
    [4X[25Xgap>[125X [27Xc1_source_aid := VectorSpaceMorphism( B_1, [ [ 1, 0 ] ], B );[127X[104X
    [4X[28XA rational vector space homomorphism with matrix: [128X[104X
    [4X[28X[ [  1,  0 ] ][128X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XSetIsSubobject( c1_source_aid, true );[127X[104X
    [4X[25Xgap>[125X [27Xc1_range_aid := VectorSpaceMorphism( C, [ [ 1, 0 ], [ 0, 1 ], [ 0, 0 ] ], C_1 );[127X[104X
    [4X[28XA rational vector space homomorphism with matrix: [128X[104X
    [4X[28X[ [  1,  0 ],[128X[104X
    [4X[28X  [  0,  1 ],[128X[104X
    [4X[28X  [  0,  0 ] ][128X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XSetIsFactorobject( c1_range_aid, true );[127X[104X
    [4X[25Xgap>[125X [27Xc1_associated := VectorSpaceMorphism( B_1, [ [ 1, 1 ] ], C_1 );[127X[104X
    [4X[28XA rational vector space homomorphism with matrix: [128X[104X
    [4X[28X[ [  1,  1 ] ][128X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xc1 := GeneralizedMorphism( c1_source_aid, c1_associated, c1_range_aid );[127X[104X
    [4X[28X<A morphism in Generalized morphism category of VectorSpacesForGeneralizedMorphismsTest>[128X[104X
    [4X[25Xgap>[125X [27XB_2 := QVectorSpace( 1 );[127X[104X
    [4X[28X<A rational vector space of dimension 1>[128X[104X
    [4X[25Xgap>[125X [27XC_2 := QVectorSpace( 2 );[127X[104X
    [4X[28X<A rational vector space of dimension 2>[128X[104X
    [4X[25Xgap>[125X [27Xc2_source_aid := VectorSpaceMorphism( B_2, [ [ 2, 0 ] ], B );[127X[104X
    [4X[28XA rational vector space homomorphism with matrix: [128X[104X
    [4X[28X[ [  2,  0 ] ][128X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XSetIsSubobject( c2_source_aid, true );[127X[104X
    [4X[25Xgap>[125X [27Xc2_range_aid := VectorSpaceMorphism( C, [ [ 3, 0 ], [ 0, 3 ], [ 0, 0 ] ], C_2 );[127X[104X
    [4X[28XA rational vector space homomorphism with matrix: [128X[104X
    [4X[28X[ [  3,  0 ],[128X[104X
    [4X[28X  [  0,  3 ],[128X[104X
    [4X[28X  [  0,  0 ] ][128X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XSetIsFactorobject( c2_range_aid, true );[127X[104X
    [4X[25Xgap>[125X [27Xc2_associated := VectorSpaceMorphism( B_2, [ [ 6, 6 ] ], C_2 );[127X[104X
    [4X[28XA rational vector space homomorphism with matrix: [128X[104X
    [4X[28X[ [  6,  6 ] ][128X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xc2 := GeneralizedMorphism( c2_source_aid, c2_associated, c2_range_aid );[127X[104X
    [4X[28X<A morphism in Generalized morphism category of VectorSpacesForGeneralizedMorphismsTest>[128X[104X
    [4X[25Xgap>[125X [27XIsCongruentForMorphisms( c1, c2 );[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsCongruentForMorphisms( c1, c1 );[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27Xc3_associated := VectorSpaceMorphism( B_1, [ [ 2, 2 ] ], C_1 );[127X[104X
    [4X[28XA rational vector space homomorphism with matrix: [128X[104X
    [4X[28X[ [  2,  2 ] ][128X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xc3 := GeneralizedMorphism( c1_source_aid, c3_associated, c1_range_aid );[127X[104X
    [4X[28X<A morphism in Generalized morphism category of VectorSpacesForGeneralizedMorphismsTest>[128X[104X
    [4X[25Xgap>[125X [27XIsCongruentForMorphisms( c1, c3 );[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27XIsCongruentForMorphisms( c2, c3 );[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27Xc1 + c2;[127X[104X
    [4X[28X<A morphism in Generalized morphism category of VectorSpacesForGeneralizedMorphismsTest>[128X[104X
    [4X[25Xgap>[125X [27XArrow( c1 + c2 );[127X[104X
    [4X[28XA rational vector space homomorphism with matrix: [128X[104X
    [4X[28X[ [  12,  12 ] ][128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YFirst composition test:[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xvecspaces := CreateCapCategory( "VectorSpacesForGeneralizedMorphismsTest" );[127X[104X
    [4X[28XVectorSpacesForGeneralizedMorphismsTest[128X[104X
    [4X[25Xgap>[125X [27XReadPackage( "CAP", "examples/VectorSpacesAllMethods.g" );[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XA := QVectorSpace( 1 );[127X[104X
    [4X[28X<A rational vector space of dimension 1>[128X[104X
    [4X[25Xgap>[125X [27XB := QVectorSpace( 2 );[127X[104X
    [4X[28X<A rational vector space of dimension 2>[128X[104X
    [4X[25Xgap>[125X [27XC := QVectorSpace( 3 );[127X[104X
    [4X[28X<A rational vector space of dimension 3>[128X[104X
    [4X[25Xgap>[125X [27Xphi_tilde_associated := VectorSpaceMorphism( A, [ [ 1, 2, 0 ] ], C );[127X[104X
    [4X[28XA rational vector space homomorphism with matrix: [128X[104X
    [4X[28X[ [  1,  2,  0 ] ][128X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xphi_tilde_source_aid := VectorSpaceMorphism( A, [ [ 1, 2 ] ], B );[127X[104X
    [4X[28XA rational vector space homomorphism with matrix: [128X[104X
    [4X[28X[ [  1,  2 ] ][128X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xphi_tilde := GeneralizedMorphismWithSourceAid( phi_tilde_source_aid, phi_tilde_associated );[127X[104X
    [4X[28X<A morphism in Generalized morphism category of VectorSpacesForGeneralizedMorphismsTest>[128X[104X
    [4X[25Xgap>[125X [27Xpsi_tilde_associated := IdentityMorphism( B );[127X[104X
    [4X[28XA rational vector space homomorphism with matrix: [128X[104X
    [4X[28X[ [  1,  0 ],[128X[104X
    [4X[28X  [  0,  1 ] ][128X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xpsi_tilde_source_aid := VectorSpaceMorphism( B, [ [ 1, 0, 0 ], [ 0, 1, 0 ] ], C );[127X[104X
    [4X[28XA rational vector space homomorphism with matrix: [128X[104X
    [4X[28X[ [  1,  0,  0 ],[128X[104X
    [4X[28X  [  0,  1,  0 ] ][128X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xpsi_tilde := GeneralizedMorphismWithSourceAid( psi_tilde_source_aid, psi_tilde_associated );[127X[104X
    [4X[28X<A morphism in Generalized morphism category of VectorSpacesForGeneralizedMorphismsTest>[128X[104X
    [4X[25Xgap>[125X [27Xcomposition := PreCompose( phi_tilde, psi_tilde );[127X[104X
    [4X[28X<A morphism in Generalized morphism category of VectorSpacesForGeneralizedMorphismsTest>[128X[104X
    [4X[25Xgap>[125X [27XArrow( composition );[127X[104X
    [4X[28XA rational vector space homomorphism with matrix: [128X[104X
    [4X[28X[ [  1/2,    1 ] ][128X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XSourceAid( composition );[127X[104X
    [4X[28XA rational vector space homomorphism with matrix: [128X[104X
    [4X[28X[ [  1/2,    1 ] ][128X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XRangeAid( composition );[127X[104X
    [4X[28XA rational vector space homomorphism with matrix: [128X[104X
    [4X[28X[ [  1,  0 ],[128X[104X
    [4X[28X  [  0,  1 ] ][128X[104X
  [4X[32X[104X
  
  [33X[0;0YSecond composition test[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xvecspaces := CreateCapCategory( "VectorSpacesForGeneralizedMorphismsTest" );[127X[104X
    [4X[28XVectorSpacesForGeneralizedMorphismsTest[128X[104X
    [4X[25Xgap>[125X [27XReadPackage( "CAP", "examples/VectorSpacesAllMethods.g" );[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XA := QVectorSpace( 1 );[127X[104X
    [4X[28X<A rational vector space of dimension 1>[128X[104X
    [4X[25Xgap>[125X [27XB := QVectorSpace( 2 );[127X[104X
    [4X[28X<A rational vector space of dimension 2>[128X[104X
    [4X[25Xgap>[125X [27XC := QVectorSpace( 3 );[127X[104X
    [4X[28X<A rational vector space of dimension 3>[128X[104X
    [4X[25Xgap>[125X [27Xphi2_tilde_associated := VectorSpaceMorphism( A, [ [ 1, 5 ] ], B );[127X[104X
    [4X[28XA rational vector space homomorphism with matrix: [128X[104X
    [4X[28X[ [  1,  5 ] ][128X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xphi2_tilde_range_aid := VectorSpaceMorphism( C, [ [ 1, 0 ], [ 0, 1 ], [ 1, 1 ] ], B );[127X[104X
    [4X[28XA rational vector space homomorphism with matrix: [128X[104X
    [4X[28X[ [  1,  0 ],[128X[104X
    [4X[28X  [  0,  1 ],[128X[104X
    [4X[28X  [  1,  1 ] ][128X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xphi2_tilde := GeneralizedMorphismWithRangeAid( phi2_tilde_associated, phi2_tilde_range_aid );[127X[104X
    [4X[28X<A morphism in Generalized morphism category of VectorSpacesForGeneralizedMorphismsTest>[128X[104X
    [4X[25Xgap>[125X [27Xpsi2_tilde_associated := VectorSpaceMorphism( C, [ [ 1 ], [ 3 ], [ 4 ] ], A );[127X[104X
    [4X[28XA rational vector space homomorphism with matrix: [128X[104X
    [4X[28X[ [  1 ],[128X[104X
    [4X[28X  [  3 ],[128X[104X
    [4X[28X  [  4 ] ][128X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xpsi2_tilde_range_aid := VectorSpaceMorphism( B, [ [ 1 ], [ 1 ] ], A );[127X[104X
    [4X[28XA rational vector space homomorphism with matrix: [128X[104X
    [4X[28X[ [  1 ],[128X[104X
    [4X[28X  [  1 ] ][128X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xpsi2_tilde := GeneralizedMorphismWithRangeAid( psi2_tilde_associated, psi2_tilde_range_aid );[127X[104X
    [4X[28X<A morphism in Generalized morphism category of VectorSpacesForGeneralizedMorphismsTest>[128X[104X
    [4X[25Xgap>[125X [27Xcomposition2 := PreCompose( phi2_tilde, psi2_tilde );[127X[104X
    [4X[28X<A morphism in Generalized morphism category of VectorSpacesForGeneralizedMorphismsTest>[128X[104X
    [4X[25Xgap>[125X [27XArrow( composition2 );[127X[104X
    [4X[28XA rational vector space homomorphism with matrix: [128X[104X
    [4X[28X[ [  16 ] ][128X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XRangeAid( composition2 );[127X[104X
    [4X[28XA rational vector space homomorphism with matrix: [128X[104X
    [4X[28X[ [  1 ],[128X[104X
    [4X[28X  [  1 ] ][128X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XSourceAid( composition2 );[127X[104X
    [4X[28XA rational vector space homomorphism with matrix: [128X[104X
    [4X[28X[ [  1 ] ][128X[104X
  [4X[32X[104X
  
  [33X[0;0YThird composition test[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xvecspaces := CreateCapCategory( "VectorSpacesForGeneralizedMorphismsTest" );[127X[104X
    [4X[28XVectorSpacesForGeneralizedMorphismsTest[128X[104X
    [4X[25Xgap>[125X [27XReadPackage( "CAP", "examples/VectorSpacesAllMethods.g" );[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XA := QVectorSpace( 3 );[127X[104X
    [4X[28X<A rational vector space of dimension 3>[128X[104X
    [4X[25Xgap>[125X [27XAsub := QVectorSpace( 2 );[127X[104X
    [4X[28X<A rational vector space of dimension 2>[128X[104X
    [4X[25Xgap>[125X [27XB := QVectorSpace( 3 );[127X[104X
    [4X[28X<A rational vector space of dimension 3>[128X[104X
    [4X[25Xgap>[125X [27XBfac := QVectorSpace( 1 );[127X[104X
    [4X[28X<A rational vector space of dimension 1>[128X[104X
    [4X[25Xgap>[125X [27XBsub := QVectorSpace( 2 );[127X[104X
    [4X[28X<A rational vector space of dimension 2>[128X[104X
    [4X[25Xgap>[125X [27XC := QVectorSpace( 3 );[127X[104X
    [4X[28X<A rational vector space of dimension 3>[128X[104X
    [4X[25Xgap>[125X [27XCfac := QVectorSpace( 1 );[127X[104X
    [4X[28X<A rational vector space of dimension 1>[128X[104X
    [4X[25Xgap>[125X [27XAsub_into_A := VectorSpaceMorphism( Asub, [ [ 1, 0, 0 ], [ 0, 1, 0 ] ], A );[127X[104X
    [4X[28XA rational vector space homomorphism with matrix: [128X[104X
    [4X[28X[ [  1,  0,  0 ],[128X[104X
    [4X[28X  [  0,  1,  0 ] ][128X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XAsub_to_Bfac := VectorSpaceMorphism( Asub, [ [ 1 ], [ 1 ] ], Bfac );[127X[104X
    [4X[28XA rational vector space homomorphism with matrix: [128X[104X
    [4X[28X[ [  1 ],[128X[104X
    [4X[28X  [  1 ] ][128X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XB_onto_Bfac := VectorSpaceMorphism( B, [ [ 1 ], [ 1 ], [ 1 ] ], Bfac );[127X[104X
    [4X[28XA rational vector space homomorphism with matrix: [128X[104X
    [4X[28X[ [  1 ],[128X[104X
    [4X[28X  [  1 ],[128X[104X
    [4X[28X  [  1 ] ][128X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XBsub_into_B := VectorSpaceMorphism( Bsub, [ [ 2, 2, 0 ], [ 0, 2, 2 ] ], B );[127X[104X
    [4X[28XA rational vector space homomorphism with matrix: [128X[104X
    [4X[28X[ [  2,  2,  0 ],[128X[104X
    [4X[28X  [  0,  2,  2 ] ][128X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XBsub_to_Cfac := VectorSpaceMorphism( Bsub, [ [ 3 ], [ 0 ] ], Cfac );[127X[104X
    [4X[28XA rational vector space homomorphism with matrix: [128X[104X
    [4X[28X[ [  3 ],[128X[104X
    [4X[28X  [  0 ] ][128X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XC_onto_Cfac := VectorSpaceMorphism( C, [ [ 1 ], [ 2 ], [ 3 ] ], Cfac );[127X[104X
    [4X[28XA rational vector space homomorphism with matrix: [128X[104X
    [4X[28X[ [  1 ],[128X[104X
    [4X[28X  [  2 ],[128X[104X
    [4X[28X  [  3 ] ][128X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xgeneralized_morphism1 := GeneralizedMorphism( Asub_into_A, Asub_to_Bfac, B_onto_Bfac );[127X[104X
    [4X[28X<A morphism in Generalized morphism category of VectorSpacesForGeneralizedMorphismsTest>[128X[104X
    [4X[25Xgap>[125X [27Xgeneralized_morphism2 := GeneralizedMorphism( Bsub_into_B, Bsub_to_Cfac, C_onto_Cfac );[127X[104X
    [4X[28X<A morphism in Generalized morphism category of VectorSpacesForGeneralizedMorphismsTest>[128X[104X
    [4X[25Xgap>[125X [27XIsWellDefined( generalized_morphism1 );[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsWellDefined( generalized_morphism2 );[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27Xp := PreCompose( generalized_morphism1, generalized_morphism2 );[127X[104X
    [4X[28X<A morphism in Generalized morphism category of VectorSpacesForGeneralizedMorphismsTest>[128X[104X
    [4X[25Xgap>[125X [27XSourceAid( p );[127X[104X
    [4X[28XA rational vector space homomorphism with matrix: [128X[104X
    [4X[28X[ [  -1,   1,   0 ],[128X[104X
    [4X[28X  [   1,   0,   0 ] ][128X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XArrow( p );[127X[104X
    [4X[28XA rational vector space homomorphism with matrix: [128X[104X
    [4X[28X(an empty 2 x 0 matrix)[128X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XRangeAid( p );[127X[104X
    [4X[28XA rational vector space homomorphism with matrix: [128X[104X
    [4X[28X(an empty 3 x 0 matrix)[128X[104X
    [4X[25Xgap>[125X [27XA := QVectorSpace( 3 );[127X[104X
    [4X[28X<A rational vector space of dimension 3>[128X[104X
    [4X[25Xgap>[125X [27XAsub := QVectorSpace( 2 );[127X[104X
    [4X[28X<A rational vector space of dimension 2>[128X[104X
    [4X[25Xgap>[125X [27XB := QVectorSpace( 3 );[127X[104X
    [4X[28X<A rational vector space of dimension 3>[128X[104X
    [4X[25Xgap>[125X [27XBfac := QVectorSpace( 1 );[127X[104X
    [4X[28X<A rational vector space of dimension 1>[128X[104X
    [4X[25Xgap>[125X [27XBsub := QVectorSpace( 2 );[127X[104X
    [4X[28X<A rational vector space of dimension 2>[128X[104X
    [4X[25Xgap>[125X [27XC := QVectorSpace( 3 );[127X[104X
    [4X[28X<A rational vector space of dimension 3>[128X[104X
    [4X[25Xgap>[125X [27XCfac := QVectorSpace( 2 );[127X[104X
    [4X[28X<A rational vector space of dimension 2>[128X[104X
    [4X[25Xgap>[125X [27XAsub_into_A := VectorSpaceMorphism( Asub, [ [ 1, 0, 0 ], [ 0, 1, 0 ] ], A );[127X[104X
    [4X[28XA rational vector space homomorphism with matrix: [128X[104X
    [4X[28X[ [  1,  0,  0 ],[128X[104X
    [4X[28X  [  0,  1,  0 ] ][128X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XAsub_to_Bfac := VectorSpaceMorphism( Asub, [ [ 1 ], [ 1 ] ], Bfac );[127X[104X
    [4X[28XA rational vector space homomorphism with matrix: [128X[104X
    [4X[28X[ [  1 ],[128X[104X
    [4X[28X  [  1 ] ][128X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XB_onto_Bfac := VectorSpaceMorphism( B, [ [ 1 ], [ 1 ], [ 1 ] ], Bfac );[127X[104X
    [4X[28XA rational vector space homomorphism with matrix: [128X[104X
    [4X[28X[ [  1 ],[128X[104X
    [4X[28X  [  1 ],[128X[104X
    [4X[28X  [  1 ] ][128X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XBsub_into_B := VectorSpaceMorphism( Bsub, [ [ 2, 2, 0 ], [ 0, 2, 2 ] ], B );[127X[104X
    [4X[28XA rational vector space homomorphism with matrix: [128X[104X
    [4X[28X[ [  2,  2,  0 ],[128X[104X
    [4X[28X  [  0,  2,  2 ] ][128X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XBsub_to_Cfac := VectorSpaceMorphism( Bsub, [ [ 3, 3 ], [ 0, 0 ] ], Cfac );[127X[104X
    [4X[28XA rational vector space homomorphism with matrix: [128X[104X
    [4X[28X[ [  3,  3 ],[128X[104X
    [4X[28X  [  0,  0 ] ][128X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XC_onto_Cfac := VectorSpaceMorphism( C, [ [ 1, 0 ], [ 0, 2 ], [ 3, 3 ] ], Cfac );[127X[104X
    [4X[28XA rational vector space homomorphism with matrix: [128X[104X
    [4X[28X[ [  1,  0 ],[128X[104X
    [4X[28X  [  0,  2 ],[128X[104X
    [4X[28X  [  3,  3 ] ][128X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xgeneralized_morphism1 := GeneralizedMorphism( Asub_into_A, Asub_to_Bfac, B_onto_Bfac );[127X[104X
    [4X[28X<A morphism in Generalized morphism category of VectorSpacesForGeneralizedMorphismsTest>[128X[104X
    [4X[25Xgap>[125X [27Xgeneralized_morphism2 := GeneralizedMorphism( Bsub_into_B, Bsub_to_Cfac, C_onto_Cfac );[127X[104X
    [4X[28X<A morphism in Generalized morphism category of VectorSpacesForGeneralizedMorphismsTest>[128X[104X
    [4X[25Xgap>[125X [27XIsWellDefined( generalized_morphism1 );[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsWellDefined( generalized_morphism2 );[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27Xp := PreCompose( generalized_morphism1, generalized_morphism2 );[127X[104X
    [4X[28X<A morphism in Generalized morphism category of VectorSpacesForGeneralizedMorphismsTest>[128X[104X
    [4X[25Xgap>[125X [27XSourceAid( p );[127X[104X
    [4X[28XA rational vector space homomorphism with matrix: [128X[104X
    [4X[28X[ [  -1,   1,   0 ],[128X[104X
    [4X[28X  [   1,   0,   0 ] ][128X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XArrow( p );[127X[104X
    [4X[28XA rational vector space homomorphism with matrix: [128X[104X
    [4X[28X[ [  0 ],[128X[104X
    [4X[28X  [  0 ] ][128X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XRangeAid( p );[127X[104X
    [4X[28XA rational vector space homomorphism with matrix: [128X[104X
    [4X[28X[ [  -1 ],[128X[104X
    [4X[28X  [   2 ],[128X[104X
    [4X[28X  [   0 ] ][128X[104X
  [4X[32X[104X
  
  [33X[0;0YHonest representative test[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xvecspaces := CreateCapCategory( "VectorSpacesForGeneralizedMorphismsTest" );[127X[104X
    [4X[28XVectorSpacesForGeneralizedMorphismsTest[128X[104X
    [4X[25Xgap>[125X [27XReadPackage( "CAP", "examples/VectorSpacesAllMethods.g" );[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XA := QVectorSpace( 1 );[127X[104X
    [4X[28X<A rational vector space of dimension 1>[128X[104X
    [4X[25Xgap>[125X [27XB := QVectorSpace( 2 );[127X[104X
    [4X[28X<A rational vector space of dimension 2>[128X[104X
    [4X[25Xgap>[125X [27Xphi_tilde_source_aid := VectorSpaceMorphism( A, [ [ 2 ] ], A );[127X[104X
    [4X[28XA rational vector space homomorphism with matrix: [128X[104X
    [4X[28X[ [  2 ] ][128X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xphi_tilde_associated := VectorSpaceMorphism( A, [ [ 1, 1 ] ], B );[127X[104X
    [4X[28XA rational vector space homomorphism with matrix: [128X[104X
    [4X[28X[ [  1,  1 ] ][128X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xphi_tilde_range_aid := VectorSpaceMorphism( B, [ [ 1, 2 ], [ 3, 4 ] ], B );[127X[104X
    [4X[28XA rational vector space homomorphism with matrix: [128X[104X
    [4X[28X[ [  1,  2 ],[128X[104X
    [4X[28X  [  3,  4 ] ][128X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xphi_tilde := GeneralizedMorphism( phi_tilde_source_aid, phi_tilde_associated, phi_tilde_range_aid );[127X[104X
    [4X[28X<A morphism in Generalized morphism category of VectorSpacesForGeneralizedMorphismsTest>[128X[104X
    [4X[25Xgap>[125X [27XHonestRepresentative( phi_tilde );[127X[104X
    [4X[28XA rational vector space homomorphism with matrix: [128X[104X
    [4X[28X[ [  -1/4,   1/4 ] ][128X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XIsWellDefined( phi_tilde );[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsWellDefined( psi_tilde );[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  
  [1X14.12 [33X[0;0YIsWellDefined[133X[101X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xvecspaces := CreateCapCategory( "VectorSpacesForIsWellDefinedTest" );[127X[104X
    [4X[28XVectorSpacesForIsWellDefinedTest [128X[104X
    [4X[25Xgap>[125X [27XReadPackage( "CAP", "examples/VectorSpacesAllMethods.g" );[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XLoadPackage( "GeneralizedMorphismsForCAP" );[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XA := QVectorSpace( 1 );[127X[104X
    [4X[28X<A rational vector space of dimension 1>[128X[104X
    [4X[25Xgap>[125X [27XB := QVectorSpace( 2 );[127X[104X
    [4X[28X<A rational vector space of dimension 2>[128X[104X
    [4X[25Xgap>[125X [27Xalpha := VectorSpaceMorphism( A, [ [ 1, 2 ] ], B );[127X[104X
    [4X[28XA rational vector space homomorphism with matrix: [128X[104X
    [4X[28X[ [  1,  2 ] ][128X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xg := GeneralizedMorphism( alpha, alpha, alpha );[127X[104X
    [4X[28X<A morphism in Generalized morphism category of VectorSpacesForIsWellDefinedTest>[128X[104X
    [4X[25Xgap>[125X [27XIsWellDefined( alpha );[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsWellDefined( g );[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsEqualForObjects( A, B );[127X[104X
    [4X[28Xfalse[128X[104X
  [4X[32X[104X
  
  
  [1X14.13 [33X[0;0YKernel[133X[101X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xvecspaces := CreateCapCategory( "VectorSpaces01" );[127X[104X
    [4X[28XVectorSpaces01[128X[104X
    [4X[25Xgap>[125X [27XReadPackage( "CAP", "examples/VectorSpacesAddKernel01.g" );[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XV := QVectorSpace( 2 );[127X[104X
    [4X[28X<A rational vector space of dimension 2>[128X[104X
    [4X[25Xgap>[125X [27XW := QVectorSpace( 3 );[127X[104X
    [4X[28X<A rational vector space of dimension 3>[128X[104X
    [4X[25Xgap>[125X [27Xalpha := VectorSpaceMorphism( V, [ [ 1, 1, 1 ], [ -1, -1, -1 ] ], W );[127X[104X
    [4X[28XA rational vector space homomorphism with matrix: [128X[104X
    [4X[28X[ [   1,   1,   1 ],[128X[104X
    [4X[28X  [  -1,  -1,  -1 ] ][128X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xk := KernelObject( alpha );[127X[104X
    [4X[28X<A rational vector space of dimension 1>[128X[104X
    [4X[25Xgap>[125X [27XT := QVectorSpace( 2 );[127X[104X
    [4X[28X<A rational vector space of dimension 2>[128X[104X
    [4X[25Xgap>[125X [27Xtau := VectorSpaceMorphism( T, [ [ 2, 2 ], [ 2, 2 ] ], V );[127X[104X
    [4X[28XA rational vector space homomorphism with matrix: [128X[104X
    [4X[28X[ [  2,  2 ],[128X[104X
    [4X[28X  [  2,  2 ] ][128X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xk_lift := KernelLift( alpha, tau );[127X[104X
    [4X[28XA rational vector space homomorphism with matrix: [128X[104X
    [4X[28X[ [  2 ],[128X[104X
    [4X[28X  [  2 ] ][128X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XHasKernelEmbedding( alpha );[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27XKernelEmbedding( alpha );[127X[104X
    [4X[28XA rational vector space homomorphism with matrix: [128X[104X
    [4X[28X[ [  1,  1 ] ][128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xvecspaces := CreateCapCategory( "VectorSpaces02" );[127X[104X
    [4X[28XVectorSpaces02[128X[104X
    [4X[25Xgap>[125X [27XReadPackage( "CAP", "examples/VectorSpacesAddKernel02.g" );[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XV := QVectorSpace( 2 );[127X[104X
    [4X[28X<A rational vector space of dimension 2>[128X[104X
    [4X[25Xgap>[125X [27XW := QVectorSpace( 3 );[127X[104X
    [4X[28X<A rational vector space of dimension 3>[128X[104X
    [4X[25Xgap>[125X [27Xalpha := VectorSpaceMorphism( V, [ [ 1, 1, 1 ], [ -1, -1, -1 ] ], W );[127X[104X
    [4X[28XA rational vector space homomorphism with matrix: [128X[104X
    [4X[28X[ [   1,   1,   1 ],[128X[104X
    [4X[28X  [  -1,  -1,  -1 ] ][128X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xk := KernelObject( alpha );[127X[104X
    [4X[28X<A rational vector space of dimension 1>[128X[104X
    [4X[25Xgap>[125X [27XT := QVectorSpace( 2 );[127X[104X
    [4X[28X<A rational vector space of dimension 2>[128X[104X
    [4X[25Xgap>[125X [27Xtau := VectorSpaceMorphism( T, [ [ 2, 2 ], [ 2, 2 ] ], V );[127X[104X
    [4X[28XA rational vector space homomorphism with matrix: [128X[104X
    [4X[28X[ [  2,  2 ],[128X[104X
    [4X[28X  [  2,  2 ] ][128X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xk_lift := KernelLift( alpha, tau );[127X[104X
    [4X[28XA rational vector space homomorphism with matrix: [128X[104X
    [4X[28X[ [  2 ],[128X[104X
    [4X[28X  [  2 ] ][128X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XHasKernelEmbedding( alpha );[127X[104X
    [4X[28Xfalse[128X[104X
  [4X[32X[104X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xvecspaces := CreateCapCategory( "VectorSpaces03" );[127X[104X
    [4X[28XVectorSpaces03[128X[104X
    [4X[25Xgap>[125X [27XReadPackage( "CAP", "examples/VectorSpacesAddKernel03.g" );[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XV := QVectorSpace( 2 );[127X[104X
    [4X[28X<A rational vector space of dimension 2>[128X[104X
    [4X[25Xgap>[125X [27XW := QVectorSpace( 3 );[127X[104X
    [4X[28X<A rational vector space of dimension 3>[128X[104X
    [4X[25Xgap>[125X [27Xalpha := VectorSpaceMorphism( V, [ [ 1, 1, 1 ], [ -1, -1, -1 ] ], W );[127X[104X
    [4X[28XA rational vector space homomorphism with matrix: [128X[104X
    [4X[28X[ [   1,   1,   1 ],[128X[104X
    [4X[28X  [  -1,  -1,  -1 ] ][128X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xk := KernelObject( alpha );[127X[104X
    [4X[28X<A rational vector space of dimension 1>[128X[104X
    [4X[25Xgap>[125X [27Xk_emb := KernelEmbedding( alpha );[127X[104X
    [4X[28XA rational vector space homomorphism with matrix: [128X[104X
    [4X[28X[ [  1,  1 ] ][128X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XIsIdenticalObj( Source( k_emb ), k );[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XV := QVectorSpace( 2 );[127X[104X
    [4X[28X<A rational vector space of dimension 2>[128X[104X
    [4X[25Xgap>[125X [27XW := QVectorSpace( 3 );[127X[104X
    [4X[28X<A rational vector space of dimension 3>[128X[104X
    [4X[25Xgap>[125X [27Xbeta := VectorSpaceMorphism( V, [ [ 1, 1, 1 ], [ -1, -1, -1 ] ], W );[127X[104X
    [4X[28XA rational vector space homomorphism with matrix: [128X[104X
    [4X[28X[ [   1,   1,   1 ],[128X[104X
    [4X[28X  [  -1,  -1,  -1 ] ][128X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xk_emb := KernelEmbedding( beta );[127X[104X
    [4X[28XA rational vector space homomorphism with matrix: [128X[104X
    [4X[28X[ [  1,  1 ] ][128X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XIsIdenticalObj( Source( k_emb ), KernelObject( beta ) );[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  
  [1X14.14 [33X[0;0YFiberProduct[133X[101X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xvecspaces := CreateCapCategory( "VectorSpacesForFiberProductTest" );[127X[104X
    [4X[28XVectorSpacesForFiberProductTest[128X[104X
    [4X[25Xgap>[125X [27XReadPackage( "CAP", "examples/VectorSpacesAllMethods.g" );[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XA := QVectorSpace( 1 );[127X[104X
    [4X[28X<A rational vector space of dimension 1>[128X[104X
    [4X[25Xgap>[125X [27XB := QVectorSpace( 2 );[127X[104X
    [4X[28X<A rational vector space of dimension 2>[128X[104X
    [4X[25Xgap>[125X [27XC := QVectorSpace( 3 );[127X[104X
    [4X[28X<A rational vector space of dimension 3>[128X[104X
    [4X[25Xgap>[125X [27XAtoC := VectorSpaceMorphism( A, [ [ 1, 2, 0 ] ], C );[127X[104X
    [4X[28XA rational vector space homomorphism with matrix: [128X[104X
    [4X[28X[ [  1,  2,  0 ] ][128X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XBtoC := VectorSpaceMorphism( B, [ [ 1, 0, 0 ], [ 0, 1, 0 ] ], C );[127X[104X
    [4X[28XA rational vector space homomorphism with matrix: [128X[104X
    [4X[28X[ [  1,  0,  0 ],[128X[104X
    [4X[28X  [  0,  1,  0 ] ][128X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XP := FiberProduct( AtoC, BtoC );[127X[104X
    [4X[28X<A rational vector space of dimension 1>[128X[104X
    [4X[25Xgap>[125X [27Xp1 := ProjectionInFactorOfFiberProduct( [ AtoC, BtoC ], 1 );[127X[104X
    [4X[28XA rational vector space homomorphism with matrix: [128X[104X
    [4X[28X[ [  1/2 ] ][128X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xp2 := ProjectionInFactorOfFiberProduct( [ AtoC, BtoC ], 2 );[127X[104X
    [4X[28XA rational vector space homomorphism with matrix: [128X[104X
    [4X[28X[ [  1/2,    1 ] ][128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
