  
  [1X9 [33X[0;0YExamples and Tests[133X[101X
  
  
  [1X9.1 [33X[0;0YBasic Commands[133X[101X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XQ := HomalgFieldOfRationals();;[127X[104X
    [4X[25Xgap>[125X [27XA := VectorSpaceObject( 4, Q );;[127X[104X
    [4X[25Xgap>[125X [27XB := VectorSpaceObject( 3, Q );;[127X[104X
    [4X[25Xgap>[125X [27XC := VectorSpaceObject( 2, Q );;[127X[104X
    [4X[25Xgap>[125X [27Xalpha := VectorSpaceMorphism( A, [127X[104X
    [4X[25X>[125X [27XHomalgMatrix( [ [ 1, 1, 1 ], [ 0, 1, 1 ], [127X[104X
    [4X[25X>[125X [27X[ 1, 0, 1 ], [ 1, 1, 0 ] ], 4, 3, Q ), B );;[127X[104X
    [4X[25Xgap>[125X [27Xgamma := VectorSpaceMorphism( C, [127X[104X
    [4X[25X>[125X [27XHomalgMatrix( [ [ -1, 1, -1 ], [ 1, 0, -1 ] ], 2, 3, Q ), B );;[127X[104X
    [4X[25Xgap>[125X [27Xp := ProjectionInFactorOfFiberProduct( [ alpha, gamma ], 1 );;[127X[104X
    [4X[25Xgap>[125X [27Xq := ProjectionInFactorOfFiberProduct( [ alpha, gamma ], 2 );;[127X[104X
    [4X[25Xgap>[125X [27XPreCompose( AsGeneralizedMorphism( alpha ), GeneralizedInverse( gamma ) );[127X[104X
    [4X[28X<A morphism in Generalized morphism category of Category of matrices over Q>[128X[104X
    [4X[25Xgap>[125X [27Xgen1 := PreCompose( AsGeneralizedMorphism( alpha ), [127X[104X
    [4X[25X>[125X [27X                       GeneralizedInverse( gamma ) );[127X[104X
    [4X[28X<A morphism in Generalized morphism category of Category of matrices over Q>[128X[104X
    [4X[25Xgap>[125X [27Xgen2 := PreCompose( GeneralizedInverse( p ), AsGeneralizedMorphism( q ) );[127X[104X
    [4X[28X<A morphism in Generalized morphism category of Category of matrices over Q>[128X[104X
    [4X[25Xgap>[125X [27XIsCongruentForMorphisms( gen1, gen2 );[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  
  [1X9.2 [33X[0;0YIntersection of Nodal Curve and Cusp[133X[101X
  
  [33X[0;0YWe  are going to intersect the nodal curve [23Xf = y^2 - x^2(x+1)[123X and the cusp [23Xg
  =  (x+y)^2  -  (y-x)^3[123X.  The two curves are arranged in a way such that they
  intersect  at  [23X(0,0)[123X  with  intersection  number as high as possible. We are
  going  to  compute  this  intersection  number  using  the definition of the
  intersection  number as the length of the module [23XR/(f,g)[123X localized at [23X(0,0)[123X.
  In order to model modules over the localization of [23XQ[x,y][123X at [23X(0,0)[123X, we use a
  suitable Serre quotient category. 1 2 1 1 true We are going to intersect the
  nodal  curve  [23Xf = y^2 - x^2(x+1)[123X and the cusp [23Xg = (x+y)^2 - (y-x)^3[123X. The two
  curves  are  arranged  in  a  way  such  that  they  intersect at [23X(0,0)[123X with
  intersection  number  as  high  as  possible.  We  are going to compute this
  intersection  number  using the definition of the intersection number as the
  length  of  the module [23XR/(f,g)[123X localized at [23X(0,0)[123X. In order to model modules
  over  the  localization of [23XQ[x,y][123X at [23X(0,0)[123X, we use a suitable Serre quotient
  category.  1  2 1 1 true We are going to intersect the nodal curve [23Xf = y^2 -
  x^2(x+1)[123X  and the cusp [23Xg = (x+y)^2 - (y-x)^3[123X. The two curves are arranged in
  a  way such that they intersect at [23X(0,0)[123X with intersection number as high as
  possible.  We  are  going  to  compute  this  intersection  number using the
  definition  of  the  intersection number as the length of the module [23XR/(f,g)[123X
  localized  at  [23X(0,0)[123X.  In  order  to  model modules over the localization of
  [23XQ[x,y][123X at [23X(0,0)[123X, we use a suitable Serre quotient category. 1 2 1 1 true[133X
  
  
  [1X9.3 [33X[0;0YWrapperCategory[133X[101X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XLoadPackage( "LinearAlgebraForCAP" );[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XLoadPackage( "GeneralizedMorphismsForCAP", false );[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
  
  
  [1X9.4 [33X[0;0YSweep[133X[101X
  
  [33X[0;0Y[23X\href{https://terrytao.wordpress.com/2015/10/07/sweeping-a-matrix-rotates-its-graph/}{\textrm{Geometric
  interpretation of sweeping a matrix by Terence Tao.}}[123X[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XQ := HomalgFieldOfRationals();;[127X[104X
    [4X[25Xgap>[125X [27XV := VectorSpaceObject( 3, Q );;[127X[104X
    [4X[25Xgap>[125X [27Xmat := HomalgMatrix( [ [ 9, 8, 7 ], [ 6, 5, 4 ], [ 3, 2, 1 ] ], 3, 3, Q );;[127X[104X
    [4X[25Xgap>[125X [27Xalpha := VectorSpaceMorphism( V, mat, V );;[127X[104X
    [4X[25Xgap>[125X [27Xgraph := FiberProductEmbeddingInDirectSum( [127X[104X
    [4X[25X>[125X [27X            [ alpha, IdentityMorphism( V ) ] );;[127X[104X
    [4X[25Xgap>[125X [27XDisplay( graph );[127X[104X
    [4X[28X[ [     1,    -2,     1,     0,     0,     0 ],[128X[104X
    [4X[28X  [  -4/3,   7/3,     0,     2,     1,     0 ],[128X[104X
    [4X[28X  [   5/3,  -8/3,     0,    -1,     0,     1 ] ][128X[104X
    [4X[28X[128X[104X
    [4X[28XA morphism in Category of matrices over Q[128X[104X
    [4X[25Xgap>[125X [27XD := DirectSum( V, V );;[127X[104X
    [4X[25Xgap>[125X [27Xrotmat := HomalgMatrix( [ [ 0, 0, 0, -1, 0, 0 ],[127X[104X
    [4X[25X>[125X [27X                             [ 0, 1, 0, 0, 0, 0 ],[127X[104X
    [4X[25X>[125X [27X                             [ 0, 0, 1, 0, 0, 0 ],[127X[104X
    [4X[25X>[125X [27X                             [ 1, 0, 0, 0, 0, 0 ],[127X[104X
    [4X[25X>[125X [27X                             [ 0, 0, 0, 0, 1, 0 ],[127X[104X
    [4X[25X>[125X [27X                             [ 0, 0, 0, 0, 0, 1 ] ],[127X[104X
    [4X[25X>[125X [27X                             6, 6, Q );;[127X[104X
    [4X[25Xgap>[125X [27Xrot := VectorSpaceMorphism( D, rotmat, D );;[127X[104X
    [4X[25Xgap>[125X [27Xp := PreCompose( graph, rot );;[127X[104X
    [4X[25Xgap>[125X [27XDisplay( p );[127X[104X
    [4X[28X[ [     0,    -2,     1,    -1,     0,     0 ],[128X[104X
    [4X[28X  [     2,   7/3,     0,   4/3,     1,     0 ],[128X[104X
    [4X[28X  [    -1,  -8/3,     0,  -5/3,     0,     1 ] ][128X[104X
    [4X[28X[128X[104X
    [4X[28XA morphism in Category of matrices over Q[128X[104X
    [4X[25Xgap>[125X [27Xpi1 := ProjectionInFactorOfDirectSum( [ V, V ], 1 );;[127X[104X
    [4X[25Xgap>[125X [27Xpi2 := ProjectionInFactorOfDirectSum( [ V, V ], 2 );;[127X[104X
    [4X[25Xgap>[125X [27Xreversed_arrow := PreCompose( p, pi1 );;[127X[104X
    [4X[25Xgap>[125X [27Xarrow := PreCompose( p, pi2 );;[127X[104X
    [4X[25Xgap>[125X [27Xg := GeneralizedMorphismBySpan( reversed_arrow, arrow );;[127X[104X
    [4X[25Xgap>[125X [27XIsHonest( g );[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27Xsweep_1_alpha := HonestRepresentative( g );;[127X[104X
    [4X[25Xgap>[125X [27XDisplay( sweep_1_alpha );[127X[104X
    [4X[28X[ [  -1/9,   8/9,   7/9 ],[128X[104X
    [4X[28X  [   2/3,  -1/3,  -2/3 ],[128X[104X
    [4X[28X  [   1/3,  -2/3,  -4/3 ] ][128X[104X
    [4X[28X[128X[104X
    [4X[28XA morphism in Category of matrices over Q[128X[104X
    [4X[25Xgap>[125X [27XDisplay( alpha );[127X[104X
    [4X[28X[ [  9,  8,  7 ],[128X[104X
    [4X[28X  [  6,  5,  4 ],[128X[104X
    [4X[28X  [  3,  2,  1 ] ][128X[104X
    [4X[28X[128X[104X
    [4X[28XA morphism in Category of matrices over Q[128X[104X
  [4X[32X[104X
  
  
  [1X9.5 [33X[0;0YGeneralized Morphisms Category[133X[101X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XQ := HomalgFieldOfRationals();[127X[104X
    [4X[28XQ[128X[104X
    [4X[25Xgap>[125X [27XB := VectorSpaceObject( 2, Q );[127X[104X
    [4X[28X<A vector space object over Q of dimension 2>[128X[104X
    [4X[25Xgap>[125X [27XC := VectorSpaceObject( 3, Q );[127X[104X
    [4X[28X<A vector space object over Q of dimension 3>[128X[104X
    [4X[25Xgap>[125X [27XB_1 := VectorSpaceObject( 1, Q );[127X[104X
    [4X[28X<A vector space object over Q of dimension 1>[128X[104X
    [4X[25Xgap>[125X [27XC_1 := VectorSpaceObject( 2, Q );[127X[104X
    [4X[28X<A vector space object over Q of dimension 2>[128X[104X
    [4X[25Xgap>[125X [27Xc1_source_aid := VectorSpaceMorphism( B_1, [ [ 1, 0 ] ], B );[127X[104X
    [4X[28X<A morphism in Category of matrices over Q>[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[28X<A morphism in Category of matrices over Q>[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[28X<A morphism in Category of matrices over Q>[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 Category of matrices over Q>[128X[104X
    [4X[25Xgap>[125X [27XB_2 := VectorSpaceObject( 1, Q );[127X[104X
    [4X[28X<A vector space object over Q of dimension 1>[128X[104X
    [4X[25Xgap>[125X [27XC_2 := VectorSpaceObject( 2, Q );[127X[104X
    [4X[28X<A vector space object over Q of dimension 2>[128X[104X
    [4X[25Xgap>[125X [27Xc2_source_aid := VectorSpaceMorphism( B_2, [ [ 2, 0 ] ], B );[127X[104X
    [4X[28X<A morphism in Category of matrices over Q>[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[28X<A morphism in Category of matrices over Q>[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[28X<A morphism in Category of matrices over Q>[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 Category of matrices over Q>[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[28X<A morphism in Category of matrices over Q>[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 Category of matrices over Q>[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 Category of matrices over Q>[128X[104X
    [4X[25Xgap>[125X [27XArrow( c1 + c2 );[127X[104X
    [4X[28X<A morphism in Category of matrices over Q>[128X[104X
  [4X[32X[104X
  
  [33X[0;0YFirst composition test:[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XQ := HomalgFieldOfRationals();[127X[104X
    [4X[28XQ[128X[104X
    [4X[25Xgap>[125X [27XA := VectorSpaceObject( 1, Q );[127X[104X
    [4X[28X<A vector space object over Q of dimension 1>[128X[104X
    [4X[25Xgap>[125X [27XB := VectorSpaceObject( 2, Q );[127X[104X
    [4X[28X<A vector space object over Q of dimension 2>[128X[104X
    [4X[25Xgap>[125X [27XC := VectorSpaceObject( 3, Q );[127X[104X
    [4X[28X<A vector space object over Q of dimension 3>[128X[104X
    [4X[25Xgap>[125X [27Xphi_tilde_associated := VectorSpaceMorphism( A, [ [ 1, 2, 0 ] ], C );[127X[104X
    [4X[28X<A morphism in Category of matrices over Q>[128X[104X
    [4X[25Xgap>[125X [27Xphi_tilde_source_aid := VectorSpaceMorphism( A, [ [ 1, 2 ] ], B );[127X[104X
    [4X[28X<A morphism in Category of matrices over Q>[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 Category of matrices over Q>[128X[104X
    [4X[25Xgap>[125X [27Xpsi_tilde_associated := IdentityMorphism( B );[127X[104X
    [4X[28X<An identity morphism in Category of matrices over Q>[128X[104X
    [4X[25Xgap>[125X [27Xpsi_tilde_source_aid := VectorSpaceMorphism( B, [ [ 1, 0, 0 ], [ 0, 1, 0 ] ], C );[127X[104X
    [4X[28X<A morphism in Category of matrices over Q>[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 Category of matrices over Q>[128X[104X
    [4X[25Xgap>[125X [27Xcomposition := PreCompose( phi_tilde, psi_tilde );[127X[104X
    [4X[28X<A morphism in Generalized morphism category of Category of matrices over Q>[128X[104X
    [4X[25Xgap>[125X [27XArrow( composition );[127X[104X
    [4X[28X<A morphism in Category of matrices over Q>[128X[104X
    [4X[25Xgap>[125X [27XSourceAid( composition );[127X[104X
    [4X[28X<A morphism in Category of matrices over Q>[128X[104X
    [4X[25Xgap>[125X [27XRangeAid( composition );[127X[104X
    [4X[28X<An identity morphism in Category of matrices over Q>[128X[104X
  [4X[32X[104X
  
  [33X[0;0YSecond composition test[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XQ := HomalgFieldOfRationals();[127X[104X
    [4X[28XQ[128X[104X
    [4X[25Xgap>[125X [27XA := VectorSpaceObject( 1, Q );[127X[104X
    [4X[28X<A vector space object over Q of dimension 1>[128X[104X
    [4X[25Xgap>[125X [27XB := VectorSpaceObject( 2, Q );[127X[104X
    [4X[28X<A vector space object over Q of dimension 2>[128X[104X
    [4X[25Xgap>[125X [27XC := VectorSpaceObject( 3, Q );[127X[104X
    [4X[28X<A vector space object over Q of dimension 3>[128X[104X
    [4X[25Xgap>[125X [27Xphi2_tilde_associated := VectorSpaceMorphism( A, [ [ 1, 5 ] ], B );[127X[104X
    [4X[28X<A morphism in Category of matrices over Q>[128X[104X
    [4X[25Xgap>[125X [27Xphi2_tilde_range_aid := VectorSpaceMorphism( C, [ [ 1, 0 ], [ 0, 1 ], [ 1, 1 ] ], B );[127X[104X
    [4X[28X<A morphism in Category of matrices over Q>[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 Category of matrices over Q>[128X[104X
    [4X[25Xgap>[125X [27Xpsi2_tilde_associated := VectorSpaceMorphism( C, [ [ 1 ], [ 3 ], [ 4 ] ], A );[127X[104X
    [4X[28X<A morphism in Category of matrices over Q>[128X[104X
    [4X[25Xgap>[125X [27Xpsi2_tilde_range_aid := VectorSpaceMorphism( B, [ [ 1 ], [ 1 ] ], A );[127X[104X
    [4X[28X<A morphism in Category of matrices over Q>[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 Category of matrices over Q>[128X[104X
    [4X[25Xgap>[125X [27Xcomposition2 := PreCompose( phi2_tilde, psi2_tilde );[127X[104X
    [4X[28X<A morphism in Generalized morphism category of Category of matrices over Q>[128X[104X
    [4X[25Xgap>[125X [27XArrow( composition2 );[127X[104X
    [4X[28X<A morphism in Category of matrices over Q>[128X[104X
    [4X[25Xgap>[125X [27XRangeAid( composition2 );[127X[104X
    [4X[28X<A morphism in Category of matrices over Q>[128X[104X
    [4X[25Xgap>[125X [27XSourceAid( composition2 );[127X[104X
    [4X[28X<An identity morphism in Category of matrices over Q>[128X[104X
  [4X[32X[104X
  
  [33X[0;0YThird composition test[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XQ := HomalgFieldOfRationals();[127X[104X
    [4X[28XQ[128X[104X
    [4X[25Xgap>[125X [27XA := VectorSpaceObject( 3, Q );[127X[104X
    [4X[28X<A vector space object over Q of dimension 3>[128X[104X
    [4X[25Xgap>[125X [27XAsub := VectorSpaceObject( 2, Q );[127X[104X
    [4X[28X<A vector space object over Q of dimension 2>[128X[104X
    [4X[25Xgap>[125X [27XB := VectorSpaceObject( 3, Q );[127X[104X
    [4X[28X<A vector space object over Q of dimension 3>[128X[104X
    [4X[25Xgap>[125X [27XBfac := VectorSpaceObject( 1, Q );[127X[104X
    [4X[28X<A vector space object over Q of dimension 1>[128X[104X
    [4X[25Xgap>[125X [27XBsub := VectorSpaceObject( 2, Q );[127X[104X
    [4X[28X<A vector space object over Q of dimension 2>[128X[104X
    [4X[25Xgap>[125X [27XC := VectorSpaceObject( 3, Q );[127X[104X
    [4X[28X<A vector space object over Q of dimension 3>[128X[104X
    [4X[25Xgap>[125X [27XCfac := VectorSpaceObject( 1, Q );[127X[104X
    [4X[28X<A vector space object over Q of dimension 1>[128X[104X
    [4X[25Xgap>[125X [27XAsub_into_A := VectorSpaceMorphism( Asub, [ [ 1, 0, 0 ], [ 0, 1, 0 ] ], A );[127X[104X
    [4X[28X<A morphism in Category of matrices over Q>[128X[104X
    [4X[25Xgap>[125X [27XAsub_to_Bfac := VectorSpaceMorphism( Asub, [ [ 1 ], [ 1 ] ], Bfac );[127X[104X
    [4X[28X<A morphism in Category of matrices over Q>[128X[104X
    [4X[25Xgap>[125X [27XB_onto_Bfac := VectorSpaceMorphism( B, [ [ 1 ], [ 1 ], [ 1 ] ], Bfac );[127X[104X
    [4X[28X<A morphism in Category of matrices over Q>[128X[104X
    [4X[25Xgap>[125X [27XBsub_into_B := VectorSpaceMorphism( Bsub, [ [ 2, 2, 0 ], [ 0, 2, 2 ] ], B );[127X[104X
    [4X[28X<A morphism in Category of matrices over Q>[128X[104X
    [4X[25Xgap>[125X [27XBsub_to_Cfac := VectorSpaceMorphism( Bsub, [ [ 3 ], [ 0 ] ], Cfac );[127X[104X
    [4X[28X<A morphism in Category of matrices over Q>[128X[104X
    [4X[25Xgap>[125X [27XC_onto_Cfac := VectorSpaceMorphism( C, [ [ 1 ], [ 2 ], [ 3 ] ], Cfac );[127X[104X
    [4X[28X<A morphism in Category of matrices over Q>[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 Category of matrices over Q>[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 Category of matrices over Q>[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 Category of matrices over Q>[128X[104X
    [4X[25Xgap>[125X [27XSourceAid( p );[127X[104X
    [4X[28X<A morphism in Category of matrices over Q>[128X[104X
    [4X[25Xgap>[125X [27XArrow( p );[127X[104X
    [4X[28X<A morphism in Category of matrices over Q>[128X[104X
    [4X[25Xgap>[125X [27XRangeAid( p );[127X[104X
    [4X[28X<A morphism in Category of matrices over Q>[128X[104X
    [4X[25Xgap>[125X [27XA := VectorSpaceObject( 3, Q );[127X[104X
    [4X[28X<A vector space object over Q of dimension 3>[128X[104X
    [4X[25Xgap>[125X [27XAsub := VectorSpaceObject( 2, Q );[127X[104X
    [4X[28X<A vector space object over Q of dimension 2>[128X[104X
    [4X[25Xgap>[125X [27XB := VectorSpaceObject( 3, Q );[127X[104X
    [4X[28X<A vector space object over Q of dimension 3>[128X[104X
    [4X[25Xgap>[125X [27XBfac := VectorSpaceObject( 1, Q );[127X[104X
    [4X[28X<A vector space object over Q of dimension 1>[128X[104X
    [4X[25Xgap>[125X [27XBsub := VectorSpaceObject( 2, Q );[127X[104X
    [4X[28X<A vector space object over Q of dimension 2>[128X[104X
    [4X[25Xgap>[125X [27XC := VectorSpaceObject( 3, Q );[127X[104X
    [4X[28X<A vector space object over Q of dimension 3>[128X[104X
    [4X[25Xgap>[125X [27XCfac := VectorSpaceObject( 2, Q );[127X[104X
    [4X[28X<A vector space object over Q of dimension 2>[128X[104X
    [4X[25Xgap>[125X [27XBsub_to_Cfac := VectorSpaceMorphism( Bsub, [ [ 3, 3 ], [ 0, 0 ] ], Cfac );[127X[104X
    [4X[28X<A morphism in Category of matrices over Q>[128X[104X
    [4X[25Xgap>[125X [27XC_onto_Cfac := VectorSpaceMorphism( C, [ [ 1, 0 ], [ 0, 2 ], [ 3, 3 ] ], Cfac );[127X[104X
    [4X[28X<A morphism in Category of matrices over Q>[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 Category of matrices over Q>[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 Category of matrices over Q>[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 Category of matrices over Q>[128X[104X
    [4X[25Xgap>[125X [27XSourceAid( p );[127X[104X
    [4X[28X<A morphism in Category of matrices over Q>[128X[104X
    [4X[25Xgap>[125X [27XArrow( p );[127X[104X
    [4X[28X<A morphism in Category of matrices over Q>[128X[104X
    [4X[25Xgap>[125X [27XRangeAid( p );[127X[104X
    [4X[28X<A morphism in Category of matrices over Q>[128X[104X
  [4X[32X[104X
  
  [33X[0;0YHonest representative test[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XQ := HomalgFieldOfRationals();[127X[104X
    [4X[28XQ[128X[104X
    [4X[25Xgap>[125X [27XA := VectorSpaceObject( 1, Q );[127X[104X
    [4X[28X<A vector space object over Q of dimension 1>[128X[104X
    [4X[25Xgap>[125X [27XB := VectorSpaceObject( 2, Q );[127X[104X
    [4X[28X<A vector space object over Q of dimension 2>[128X[104X
    [4X[25Xgap>[125X [27Xphi_tilde_source_aid := VectorSpaceMorphism( A, [ [ 2 ] ], A );[127X[104X
    [4X[28X<A morphism in Category of matrices over Q>[128X[104X
    [4X[25Xgap>[125X [27Xphi_tilde_associated := VectorSpaceMorphism( A, [ [ 1, 1 ] ], B );[127X[104X
    [4X[28X<A morphism in Category of matrices over Q>[128X[104X
    [4X[25Xgap>[125X [27Xphi_tilde_range_aid := VectorSpaceMorphism( B, [ [ 1, 2 ], [ 3, 4 ] ], B );[127X[104X
    [4X[28X<A morphism in Category of matrices over Q>[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 Category of matrices over Q>[128X[104X
    [4X[25Xgap>[125X [27XHonestRepresentative( phi_tilde );[127X[104X
    [4X[28X<A morphism in Category of matrices over Q>[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
  
  
  [1X9.6 [33X[0;0YIsWellDefined[133X[101X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XQ := HomalgFieldOfRationals();[127X[104X
    [4X[28XQ[128X[104X
    [4X[25Xgap>[125X [27XA := VectorSpaceObject( 1, Q );[127X[104X
    [4X[28X<A vector space object over Q of dimension 1>[128X[104X
    [4X[25Xgap>[125X [27XB := VectorSpaceObject( 2, Q );[127X[104X
    [4X[28X<A vector space object over Q of dimension 2>[128X[104X
    [4X[25Xgap>[125X [27Xalpha := VectorSpaceMorphism( A, [ [ 1, 2 ] ], B );[127X[104X
    [4X[28X<A morphism in Category of matrices over Q>[128X[104X
    [4X[25Xgap>[125X [27Xg := GeneralizedMorphism( alpha, alpha, alpha );[127X[104X
    [4X[28X<A morphism in Generalized morphism category of Category of matrices over Q>[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
  
