Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
| Download
GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it
Project: cocalc-sagemath-dev-slelievre
Views: 4183461[1X12 [33X[0;0YExamples and Tests[133X[101X234[1X12.1 [33X[0;0YSpectral Sequences[133X[101X56[4X[32X Example [32X[104X7[4X[25Xgap>[125X [27XZZ := HomalgRingOfIntegersInSingular( );[127X[104X8[4X[28XZ[128X[104X9[4X[25Xgap>[125X [27XC1 := FreeLeftPresentation( 1, ZZ );[127X[104X10[4X[28X<An object in Category of left presentations of Z>[128X[104X11[4X[25Xgap>[125X [27XC2 := FreeLeftPresentation( 2, ZZ );[127X[104X12[4X[28X<An object in Category of left presentations of Z>[128X[104X13[4X[25Xgap>[125X [27Xh1 := PresentationMorphism( C2, HomalgMatrix( [ [ 0 ], [ 4 ] ], ZZ ), C1 );[127X[104X14[4X[28X<A morphism in Category of left presentations of Z>[128X[104X15[4X[25Xgap>[125X [27Xh2 := PresentationMorphism( C2, HomalgMatrix( [ [ 0 ], [ 2 ] ], ZZ ), C1 );[127X[104X16[4X[28X<A morphism in Category of left presentations of Z>[128X[104X17[4X[25Xgap>[125X [27Xv1 := PresentationMorphism( C2, HomalgMatrix( [ [ 2, 0 ], [ 1, 2 ] ], ZZ ), C2 );[127X[104X18[4X[28X<A morphism in Category of left presentations of Z>[128X[104X19[4X[25Xgap>[125X [27Xv2 := PresentationMorphism( C1, HomalgMatrix( [ [ 4 ] ], ZZ ), C1 );[127X[104X20[4X[28X<A morphism in Category of left presentations of Z>[128X[104X21[4X[25Xgap>[125X [27Xcocomplex_h1 := CocomplexFromMorphismList( [ h1 ] );[127X[104X22[4X[28X<An object in Cocomplex category of Category of left presentations of Z>[128X[104X23[4X[25Xgap>[125X [27Xcocomplex_h2 := CocomplexFromMorphismList( [ h2 ] );[127X[104X24[4X[28X<An object in Cocomplex category of Category of left presentations of Z>[128X[104X25[4X[25Xgap>[125X [27Xcocomplex_mor := CochainMap( cocomplex_h2, [ v1, v2 ], cocomplex_h1 );[127X[104X26[4X[28X<A morphism in Cocomplex category of Category of left presentations of Z>[128X[104X27[4X[25Xgap>[125X [27XZmod := CapCategory( C1 );[127X[104X28[4X[28XCategory of left presentations of Z[128X[104X29[4X[25Xgap>[125X [27XCH0 := CohomologyFunctor( Zmod, 0 );[127X[104X30[4X[28X0-th cohomology functor of Category of left presentations of Z[128X[104X31[4X[25Xgap>[125X [27Xcmor0 := ApplyFunctor( CH0, cocomplex_mor );[127X[104X32[4X[28X<A morphism in Category of left presentations of Z>[128X[104X33[4X[25Xgap>[125X [27XDisplay( UnderlyingMatrix( cmor0 ) );[127X[104X34[4X[28X2[128X[104X35[4X[25Xgap>[125X [27XCH1 := CohomologyFunctor( Zmod, 1 );[127X[104X36[4X[28X1-th cohomology functor of Category of left presentations of Z[128X[104X37[4X[25Xgap>[125X [27Xcmor1 := ApplyFunctor( CH1, cocomplex_mor );[127X[104X38[4X[28X<A morphism in Category of left presentations of Z>[128X[104X39[4X[25Xgap>[125X [27XDisplay( UnderlyingMatrix( cmor1 ) );[127X[104X40[4X[28X4[128X[104X41[4X[25Xgap>[125X [27XToComplex := CocomplexToComplexFunctor( Zmod );[127X[104X42[4X[28XCocomplex to complex functor of Category of left presentations of Z[128X[104X43[4X[25Xgap>[125X [27Xcomplex_mor := ApplyFunctor( ToComplex, cocomplex_mor );[127X[104X44[4X[28X<A morphism in Complex category of Category of left presentations of Z>[128X[104X45[4X[25Xgap>[125X [27XH0 := HomologyFunctor( Zmod, 0 );[127X[104X46[4X[28X0-th homology functor of Category of left presentations of Z[128X[104X47[4X[25Xgap>[125X [27Xmor0 := ApplyFunctor( H0, complex_mor );[127X[104X48[4X[28X<A morphism in Category of left presentations of Z>[128X[104X49[4X[25Xgap>[125X [27XDisplay( UnderlyingMatrix( mor0 ) );[127X[104X50[4X[28X2[128X[104X51[4X[25Xgap>[125X [27XHm1 := HomologyFunctor( Zmod, -1 );[127X[104X52[4X[28X-1-th homology functor of Category of left presentations of Z[128X[104X53[4X[25Xgap>[125X [27Xmor1 := ApplyFunctor( Hm1, complex_mor );[127X[104X54[4X[28X<A morphism in Category of left presentations of Z>[128X[104X55[4X[25Xgap>[125X [27XDisplay( UnderlyingMatrix( mor1 ) );[127X[104X56[4X[28X4[128X[104X57[4X[32X[104X5859[4X[32X Example [32X[104X60[4X[25Xgap>[125X [27XQQ := HomalgFieldOfRationalsInSingular( );;[127X[104X61[4X[25Xgap>[125X [27XR := QQ * "x,y";[127X[104X62[4X[28XQ[x,y][128X[104X63[4X[25Xgap>[125X [27XSetRecursionTrapInterval( 10000 );[127X[104X64[4X[25Xgap>[125X [27Xcategory := LeftPresentations( R );[127X[104X65[4X[28XCategory of left presentations of Q[x,y][128X[104X66[4X[25Xgap>[125X [27XS := FreeLeftPresentation( 1, R );[127X[104X67[4X[28X<An object in Category of left presentations of Q[x,y]>[128X[104X68[4X[25Xgap>[125X [27Xobject_func := function( i ) return S; end;[127X[104X69[4X[28Xfunction( i ) ... end[128X[104X70[4X[25Xgap>[125X [27Xmorphism_func := function( i ) return IdentityMorphism( S ); end;[127X[104X71[4X[28Xfunction( i ) ... end[128X[104X72[4X[25Xgap>[125X [27XC0 := ZFunctorObjectExtendedByInitialAndIdentity( object_func, morphism_func, category, 0, 4 );[127X[104X73[4X[28X<An object in Functors from integers into Category of left presentations of Q[x,y]>[128X[104X74[4X[25Xgap>[125X [27XS2 := FreeLeftPresentation( 2, R );[127X[104X75[4X[28X<An object in Category of left presentations of Q[x,y]>[128X[104X76[4X[25Xgap>[125X [27XC1 := ZFunctorObjectFromMorphismList( [ InjectionOfCofactorOfDirectSum( [ S2, S ], 1 ) ], 2 );[127X[104X77[4X[28X<An object in Functors from integers into Category of left presentations of Q[x,y]>[128X[104X78[4X[25Xgap>[125X [27XC1 := ZFunctorObjectExtendedByInitialAndIdentity( C1, 2, 3 );[127X[104X79[4X[28X<An object in Functors from integers into Category of left presentations of Q[x,y]>[128X[104X80[4X[25Xgap>[125X [27XC2 := ZFunctorObjectFromMorphismList( [ InjectionOfCofactorOfDirectSum( [ S, S ], 1 ) ], 3 );[127X[104X81[4X[28X<An object in Functors from integers into Category of left presentations of Q[x,y]>[128X[104X82[4X[25Xgap>[125X [27XC2 := ZFunctorObjectExtendedByInitialAndIdentity( C2, 3, 4 );[127X[104X83[4X[28X<An object in Functors from integers into Category of left presentations of Q[x,y]>[128X[104X84[4X[25Xgap>[125X [27Xdelta_1_3 := PresentationMorphism( C1[3], HomalgMatrix( [ [ "x^2" ], [ "xy" ], [ "y^3"] ], 3, 1, R ), C0[3] );[127X[104X85[4X[28X<A morphism in Category of left presentations of Q[x,y]>[128X[104X86[4X[25Xgap>[125X [27Xdelta_1_2 := PresentationMorphism( C1[2], HomalgMatrix( [ [ "x^2" ], [ "xy" ] ], 2, 1, R ), C0[2] );[127X[104X87[4X[28X<A morphism in Category of left presentations of Q[x,y]>[128X[104X88[4X[25Xgap>[125X [27Xdelta1 := ZFunctorMorphism( C1, [ UniversalMorphismFromInitialObject( C0[1] ), UniversalMorphismFromInitialObject( C0[1] ), delta_1_2, delta_1_3 ], 0, C0 );[127X[104X89[4X[28X<A morphism in Functors from integers into Category of left presentations of Q[x,y]>[128X[104X90[4X[25Xgap>[125X [27Xdelta1 := ZFunctorMorphismExtendedByInitialAndIdentity( delta1, 0, 3 );[127X[104X91[4X[28X<A morphism in Functors from integers into Category of left presentations of Q[x,y]>[128X[104X92[4X[25Xgap>[125X [27Xdelta1 := AsAscendingFilteredMorphism( delta1 );[127X[104X93[4X[28X<A morphism in Ascending filtered object category of Category of left presentations of Q[x,y]>[128X[104X94[4X[25Xgap>[125X [27Xdelta_2_3 := PresentationMorphism( C2[3], HomalgMatrix( [ [ "y", "-x", "0" ] ], 1, 3, R ), C1[3] );[127X[104X95[4X[28X<A morphism in Category of left presentations of Q[x,y]>[128X[104X96[4X[25Xgap>[125X [27Xdelta_2_4 := PresentationMorphism( C2[4], HomalgMatrix( [ [ "y", "-x", "0" ], [ "0", "y^2", "-x" ] ], 2, 3, R ), C1[4] );[127X[104X97[4X[28X<A morphism in Category of left presentations of Q[x,y]>[128X[104X98[4X[25Xgap>[125X [27Xdelta2 := ZFunctorMorphism( C2, [ UniversalMorphismFromInitialObject( C1[2] ), delta_2_3, delta_2_4 ], 2, C1 );[127X[104X99[4X[28X<A morphism in Functors from integers into Category of left presentations of Q[x,y]>[128X[104X100[4X[25Xgap>[125X [27Xdelta2 := ZFunctorMorphismExtendedByInitialAndIdentity( delta2, 2, 4 );[127X[104X101[4X[28X<A morphism in Functors from integers into Category of left presentations of Q[x,y]>[128X[104X102[4X[25Xgap>[125X [27Xdelta2 := AsAscendingFilteredMorphism( delta2 );[127X[104X103[4X[28X<A morphism in Ascending filtered object category of Category of left presentations of Q[x,y]>[128X[104X104[4X[25Xgap>[125X [27XSetIsAdditiveCategory( CategoryOfAscendingFilteredObjects( category ), true );[127X[104X105[4X[25Xgap>[125X [27Xcomplex := ZFunctorObjectFromMorphismList( [ delta2, delta1 ], -2 );[127X[104X106[4X[28X<An object in Functors from integers into Ascending filtered object category of Category of left presentations of Q[x,y]>[128X[104X107[4X[25Xgap>[125X [27Xcomplex := AsComplex( complex );[127X[104X108[4X[28X<An object in Complex category of Ascending filtered object category of Category of left presentations of Q[x,y]>[128X[104X109[4X[25Xgap>[125X [27XLessGenFunctor := FunctorLessGeneratorsLeft( R );[127X[104X110[4X[28XLess generators for Category of left presentations of Q[x,y][128X[104X111[4X[25Xgap>[125X [27Xs := SpectralSequenceEntryOfAscendingFilteredComplex( complex, 0, 0, 0 );[127X[104X112[4X[28X<A morphism in Generalized morphism category of Category of left presentations of Q[x,y]>[128X[104X113[4X[25Xgap>[125X [27XDisplay( UnderlyingMatrix( ApplyFunctor( LessGenFunctor, UnderlyingHonestObject( Source( s ) ) ) ) );[127X[104X114[4X[28X(an empty 0 x 1 matrix)[128X[104X115[4X[25Xgap>[125X [27Xs := SpectralSequenceEntryOfAscendingFilteredComplex( complex, 1, 0, 0 );[127X[104X116[4X[28X<A morphism in Generalized morphism category of Category of left presentations of Q[x,y]>[128X[104X117[4X[25Xgap>[125X [27XDisplay( UnderlyingMatrix( ApplyFunctor( LessGenFunctor, UnderlyingHonestObject( Source( s ) ) ) ) );[127X[104X118[4X[28X(an empty 0 x 1 matrix)[128X[104X119[4X[25Xgap>[125X [27Xs := SpectralSequenceEntryOfAscendingFilteredComplex( complex, 2, 0, 0 );[127X[104X120[4X[28X<A morphism in Generalized morphism category of Category of left presentations of Q[x,y]>[128X[104X121[4X[25Xgap>[125X [27XDisplay( UnderlyingMatrix( ApplyFunctor( LessGenFunctor, UnderlyingHonestObject( Source( s ) ) ) ) );[127X[104X122[4X[28X(an empty 0 x 1 matrix)[128X[104X123[4X[25Xgap>[125X [27Xs := SpectralSequenceEntryOfAscendingFilteredComplex( complex, 3, 0, 0 );[127X[104X124[4X[28X<A morphism in Generalized morphism category of Category of left presentations of Q[x,y]>[128X[104X125[4X[25Xgap>[125X [27XDisplay( UnderlyingMatrix( ApplyFunctor( LessGenFunctor, UnderlyingHonestObject( Source( s ) ) ) ) );[127X[104X126[4X[28Xx*y,[128X[104X127[4X[28Xx^2[128X[104X128[4X[25Xgap>[125X [27Xs := SpectralSequenceEntryOfAscendingFilteredComplex( complex, 4, 0, 0 );[127X[104X129[4X[28X<A morphism in Generalized morphism category of Category of left presentations of Q[x,y]>[128X[104X130[4X[25Xgap>[125X [27XDisplay( UnderlyingMatrix( ApplyFunctor( LessGenFunctor, UnderlyingHonestObject( Source( s ) ) ) ) );[127X[104X131[4X[28Xx*y,[128X[104X132[4X[28Xx^2,[128X[104X133[4X[28Xy^3[128X[104X134[4X[25Xgap>[125X [27Xs := SpectralSequenceEntryOfAscendingFilteredComplex( complex, 5, 0, 0 );[127X[104X135[4X[28X<A morphism in Generalized morphism category of Category of left presentations of Q[x,y]>[128X[104X136[4X[25Xgap>[125X [27XDisplay( UnderlyingMatrix( ApplyFunctor( LessGenFunctor, UnderlyingHonestObject( Source( s ) ) ) ) );[127X[104X137[4X[28Xx*y,[128X[104X138[4X[28Xx^2,[128X[104X139[4X[28Xy^3[128X[104X140[4X[25Xgap>[125X [27Xs := SpectralSequenceDifferentialOfAscendingFilteredComplex( complex, 3, 3, -2 );[127X[104X141[4X[28X<A morphism in Category of left presentations of Q[x,y]>[128X[104X142[4X[25Xgap>[125X [27XDisplay( UnderlyingMatrix( ApplyFunctor( LessGenFunctor, s ) ) );[127X[104X143[4X[28Xy^3[128X[104X144[4X[25Xgap>[125X [27XAscToDescFunctor := AscendingToDescendingFilteredObjectFunctor( category );[127X[104X145[4X[28XAscending to descending filtered object functor of Category of left presentations of Q[x,y][128X[104X146[4X[25Xgap>[125X [27Xcocomplex := ZFunctorObjectFromMorphismList( [ ApplyFunctor( AscToDescFunctor, delta2 ), ApplyFunctor( AscToDescFunctor, delta1 ) ], -2 );[127X[104X147[4X[28X<An object in Functors from integers into Descending filtered object category of Category of left presentations of Q[x,y]>[128X[104X148[4X[25Xgap>[125X [27XSetIsAdditiveCategory( CategoryOfDescendingFilteredObjects( category ), true );[127X[104X149[4X[25Xgap>[125X [27Xcocomplex := AsCocomplex( cocomplex );[127X[104X150[4X[28X<An object in Cocomplex category of Descending filtered object category of Category of left presentations of Q[x,y]>[128X[104X151[4X[25Xgap>[125X [27Xs := SpectralSequenceEntryOfDescendingFilteredCocomplex( cocomplex, 0, -2, 1 );[127X[104X152[4X[28X<A morphism in Generalized morphism category of Category of left presentations of Q[x,y]>[128X[104X153[4X[25Xgap>[125X [27XDisplay( UnderlyingMatrix( ApplyFunctor( LessGenFunctor, UnderlyingHonestObject( Source( s ) ) ) ) );[127X[104X154[4X[28X(an empty 0 x 2 matrix)[128X[104X155[4X[25Xgap>[125X [27Xs := SpectralSequenceEntryOfDescendingFilteredCocomplex( cocomplex, 1, -2, 1 );[127X[104X156[4X[28X<A morphism in Generalized morphism category of Category of left presentations of Q[x,y]>[128X[104X157[4X[25Xgap>[125X [27XDisplay( UnderlyingMatrix( ApplyFunctor( LessGenFunctor, UnderlyingHonestObject( Source( s ) ) ) ) );[127X[104X158[4X[28X(an empty 0 x 2 matrix)[128X[104X159[4X[25Xgap>[125X [27Xs := SpectralSequenceEntryOfDescendingFilteredCocomplex( cocomplex, 2, -2, 1 );[127X[104X160[4X[28X<A morphism in Generalized morphism category of Category of left presentations of Q[x,y]>[128X[104X161[4X[25Xgap>[125X [27XDisplay( UnderlyingMatrix( ApplyFunctor( LessGenFunctor, UnderlyingHonestObject( Source( s ) ) ) ) );[127X[104X162[4X[28X-y,x[128X[104X163[4X[25Xgap>[125X [27Xs := SpectralSequenceEntryOfDescendingFilteredCocomplex( cocomplex, 3, -2, 1 );[127X[104X164[4X[28X<A morphism in Generalized morphism category of Category of left presentations of Q[x,y]>[128X[104X165[4X[25Xgap>[125X [27XDisplay( UnderlyingMatrix( ApplyFunctor( LessGenFunctor, UnderlyingHonestObject( Source( s ) ) ) ) );[127X[104X166[4X[28X(an empty 0 x 0 matrix)[128X[104X167[4X[25Xgap>[125X [27Xs := SpectralSequenceDifferentialOfDescendingFilteredCocomplex( cocomplex, 2, -2, 1 );[127X[104X168[4X[28X<A morphism in Category of left presentations of Q[x,y]>[128X[104X169[4X[25Xgap>[125X [27XDisplay( UnderlyingMatrix( ApplyFunctor( LessGenFunctor, s ) ) );[127X[104X170[4X[28Xx^2,[128X[104X171[4X[28Xx*y[128X[104X172[4X[32X[104X173174175[1X12.2 [33X[0;0YMonoidal Categories[133X[101X176177[4X[32X Example [32X[104X178[4X[25Xgap>[125X [27XZZ := HomalgRingOfIntegers();;[127X[104X179[4X[25Xgap>[125X [27XMl := AsLeftPresentation( HomalgMatrix( [ [ 2 ] ], 1, 1, ZZ ) );[127X[104X180[4X[28X<An object in Category of left presentations of Z>[128X[104X181[4X[25Xgap>[125X [27XNl := AsLeftPresentation( HomalgMatrix( [ [ 3 ] ], 1, 1, ZZ ) );[127X[104X182[4X[28X<An object in Category of left presentations of Z>[128X[104X183[4X[25Xgap>[125X [27XTl := TensorProductOnObjects( Ml, Nl );[127X[104X184[4X[28X<An object in Category of left presentations of Z>[128X[104X185[4X[25Xgap>[125X [27XDisplay( UnderlyingMatrix( Tl ) );[127X[104X186[4X[28X[ [ 3 ],[128X[104X187[4X[28X [ 2 ] ][128X[104X188[4X[25Xgap>[125X [27XIsZeroForObjects( Tl );[127X[104X189[4X[28Xtrue[128X[104X190[4X[25Xgap>[125X [27XBl := Braiding( DirectSum( Ml, Nl ), DirectSum( Ml, Ml ) );[127X[104X191[4X[28X<A morphism in Category of left presentations of Z>[128X[104X192[4X[25Xgap>[125X [27XDisplay( UnderlyingMatrix( Bl ) );[127X[104X193[4X[28X[ [ 1, 0, 0, 0 ],[128X[104X194[4X[28X [ 0, 0, 1, 0 ],[128X[104X195[4X[28X [ 0, 1, 0, 0 ],[128X[104X196[4X[28X [ 0, 0, 0, 1 ] ][128X[104X197[4X[25Xgap>[125X [27XIsWellDefined( Bl );[127X[104X198[4X[28Xtrue[128X[104X199[4X[25Xgap>[125X [27XUl := TensorUnit( CapCategory( Ml ) );[127X[104X200[4X[28X<An object in Category of left presentations of Z>[128X[104X201[4X[25Xgap>[125X [27XIntHoml := InternalHomOnObjects( DirectSum( Ml, Ul ), Nl );[127X[104X202[4X[28X<An object in Category of left presentations of Z>[128X[104X203[4X[25Xgap>[125X [27XDisplay( UnderlyingMatrix( IntHoml ) );[127X[104X204[4X[28X[ [ -2, -1 ],[128X[104X205[4X[28X [ 1, -1 ] ][128X[104X206[4X[25Xgap>[125X [27Xgenerator_l1 := StandardGeneratorMorphism( IntHoml, 1 );[127X[104X207[4X[28X<A morphism in Category of left presentations of Z>[128X[104X208[4X[25Xgap>[125X [27Xmorphism_l1 := LambdaElimination( DirectSum( Ml, Ul ), Nl, generator_l1 );[127X[104X209[4X[28X<A morphism in Category of left presentations of Z>[128X[104X210[4X[25Xgap>[125X [27XDisplay( UnderlyingMatrix( morphism_l1 ) );[127X[104X211[4X[28X[ [ 0 ],[128X[104X212[4X[28X [ 2 ] ][128X[104X213[4X[25Xgap>[125X [27Xgenerator_l2 := StandardGeneratorMorphism( IntHoml, 2 );[127X[104X214[4X[28X<A morphism in Category of left presentations of Z>[128X[104X215[4X[25Xgap>[125X [27Xmorphism_l2 := LambdaElimination( DirectSum( Ml, Ul ), Nl, generator_l2 );[127X[104X216[4X[28X<A morphism in Category of left presentations of Z>[128X[104X217[4X[25Xgap>[125X [27XDisplay( UnderlyingMatrix( morphism_l2 ) );[127X[104X218[4X[28X[ [ 0 ],[128X[104X219[4X[28X [ 2 ] ][128X[104X220[4X[25Xgap>[125X [27XIsEqualForMorphisms( LambdaIntroduction( morphism_l1 ), generator_l1 );[127X[104X221[4X[28Xfalse[128X[104X222[4X[25Xgap>[125X [27XIsCongruentForMorphisms( LambdaIntroduction( morphism_l1 ), generator_l1 );[127X[104X223[4X[28Xtrue[128X[104X224[4X[25Xgap>[125X [27XIsEqualForMorphisms( LambdaIntroduction( morphism_l2 ), generator_l2 );[127X[104X225[4X[28Xfalse[128X[104X226[4X[25Xgap>[125X [27XIsCongruentForMorphisms( LambdaIntroduction( morphism_l2 ), generator_l2 );[127X[104X227[4X[28Xtrue[128X[104X228[4X[25Xgap>[125X [27XMr := AsRightPresentation( HomalgMatrix( [ [ 2 ] ], 1, 1, ZZ ) );[127X[104X229[4X[28X<An object in Category of right presentations of Z>[128X[104X230[4X[25Xgap>[125X [27XNr := AsRightPresentation( HomalgMatrix( [ [ 3 ] ], 1, 1, ZZ ) );[127X[104X231[4X[28X<An object in Category of right presentations of Z>[128X[104X232[4X[25Xgap>[125X [27XTr := TensorProductOnObjects( Mr, Nr );[127X[104X233[4X[28X<An object in Category of right presentations of Z>[128X[104X234[4X[25Xgap>[125X [27XDisplay( UnderlyingMatrix( Tr ) );[127X[104X235[4X[28X[ [ 3, 2 ] ][128X[104X236[4X[25Xgap>[125X [27XIsZeroForObjects( Tr );[127X[104X237[4X[28Xtrue[128X[104X238[4X[25Xgap>[125X [27XBr := Braiding( DirectSum( Mr, Nr ), DirectSum( Mr, Mr ) );[127X[104X239[4X[28X<A morphism in Category of right presentations of Z>[128X[104X240[4X[25Xgap>[125X [27XDisplay( UnderlyingMatrix( Br ) );[127X[104X241[4X[28X[ [ 1, 0, 0, 0 ],[128X[104X242[4X[28X [ 0, 0, 1, 0 ],[128X[104X243[4X[28X [ 0, 1, 0, 0 ],[128X[104X244[4X[28X [ 0, 0, 0, 1 ] ][128X[104X245[4X[25Xgap>[125X [27XIsWellDefined( Br );[127X[104X246[4X[28Xtrue[128X[104X247[4X[25Xgap>[125X [27XUr := TensorUnit( CapCategory( Mr ) );[127X[104X248[4X[28X<An object in Category of right presentations of Z>[128X[104X249[4X[25Xgap>[125X [27XIntHomr := InternalHomOnObjects( DirectSum( Mr, Ur ), Nr );[127X[104X250[4X[28X<An object in Category of right presentations of Z>[128X[104X251[4X[25Xgap>[125X [27XDisplay( UnderlyingMatrix( IntHomr ) );[127X[104X252[4X[28X[ [ -2, 1 ],[128X[104X253[4X[28X [ -1, -1 ] ][128X[104X254[4X[25Xgap>[125X [27Xgenerator_r1 := StandardGeneratorMorphism( IntHomr, 1 );[127X[104X255[4X[28X<A morphism in Category of right presentations of Z>[128X[104X256[4X[25Xgap>[125X [27Xmorphism_r1 := LambdaElimination( DirectSum( Mr, Ur ), Nr, generator_r1 );[127X[104X257[4X[28X<A morphism in Category of right presentations of Z>[128X[104X258[4X[25Xgap>[125X [27XDisplay( UnderlyingMatrix( morphism_r1 ) );[127X[104X259[4X[28X[ [ 0, 2 ] ][128X[104X260[4X[25Xgap>[125X [27Xgenerator_r2 := StandardGeneratorMorphism( IntHoml, 2 );[127X[104X261[4X[28X<A morphism in Category of left presentations of Z>[128X[104X262[4X[25Xgap>[125X [27Xmorphism_r2 := LambdaElimination( DirectSum( Ml, Ul ), Nl, generator_r2 );[127X[104X263[4X[28X<A morphism in Category of left presentations of Z>[128X[104X264[4X[25Xgap>[125X [27XDisplay( UnderlyingMatrix( morphism_r2 ) );[127X[104X265[4X[28X[ [ 0 ],[128X[104X266[4X[28X [ 2 ] ][128X[104X267[4X[25Xgap>[125X [27XIsEqualForMorphisms( LambdaIntroduction( morphism_r1 ), generator_r1 );[127X[104X268[4X[28Xfalse[128X[104X269[4X[25Xgap>[125X [27XIsCongruentForMorphisms( LambdaIntroduction( morphism_r1 ), generator_r1 );[127X[104X270[4X[28Xtrue[128X[104X271[4X[25Xgap>[125X [27XIsEqualForMorphisms( LambdaIntroduction( morphism_r2 ), generator_r2 );[127X[104X272[4X[28Xfalse[128X[104X273[4X[25Xgap>[125X [27XIsCongruentForMorphisms( LambdaIntroduction( morphism_r2 ), generator_r2 );[127X[104X274[4X[28Xtrue[128X[104X275[4X[32X[104X276277278[1X12.3 [33X[0;0YGeneralized Morphisms Category[133X[101X279280[4X[32X Example [32X[104X281[4X[25Xgap>[125X [27Xvecspaces := CreateCapCategory( "VectorSpacesForGeneralizedMorphismsTest" );[127X[104X282[4X[28XVectorSpacesForGeneralizedMorphismsTest[128X[104X283[4X[25Xgap>[125X [27XReadPackage( "CAP", "examples/testfiles/VectorSpacesAllMethods.gi" );[127X[104X284[4X[28Xtrue[128X[104X285[4X[25Xgap>[125X [27XLoadPackage( "GeneralizedMorphismsForCAP" );[127X[104X286[4X[28Xtrue[128X[104X287[4X[25Xgap>[125X [27XB := QVectorSpace( 2 );[127X[104X288[4X[28X<A rational vector space of dimension 2>[128X[104X289[4X[25Xgap>[125X [27XC := QVectorSpace( 3 );[127X[104X290[4X[28X<A rational vector space of dimension 3>[128X[104X291[4X[25Xgap>[125X [27XB_1 := QVectorSpace( 1 );[127X[104X292[4X[28X<A rational vector space of dimension 1>[128X[104X293[4X[25Xgap>[125X [27XC_1 := QVectorSpace( 2 );[127X[104X294[4X[28X<A rational vector space of dimension 2>[128X[104X295[4X[25Xgap>[125X [27Xc1_source_aid := VectorSpaceMorphism( B_1, [ [ 1, 0 ] ], B );[127X[104X296[4X[28XA rational vector space homomorphism with matrix: [128X[104X297[4X[28X[ [ 1, 0 ] ][128X[104X298[4X[28X[128X[104X299[4X[25Xgap>[125X [27XSetIsSubobject( c1_source_aid, true );[127X[104X300[4X[25Xgap>[125X [27Xc1_range_aid := VectorSpaceMorphism( C, [ [ 1, 0 ], [ 0, 1 ], [ 0, 0 ] ], C_1 );[127X[104X301[4X[28XA rational vector space homomorphism with matrix: [128X[104X302[4X[28X[ [ 1, 0 ],[128X[104X303[4X[28X [ 0, 1 ],[128X[104X304[4X[28X [ 0, 0 ] ][128X[104X305[4X[28X[128X[104X306[4X[25Xgap>[125X [27XSetIsFactorobject( c1_range_aid, true );[127X[104X307[4X[25Xgap>[125X [27Xc1_associated := VectorSpaceMorphism( B_1, [ [ 1, 1 ] ], C_1 );[127X[104X308[4X[28XA rational vector space homomorphism with matrix: [128X[104X309[4X[28X[ [ 1, 1 ] ][128X[104X310[4X[28X[128X[104X311[4X[25Xgap>[125X [27Xc1 := GeneralizedMorphism( c1_source_aid, c1_associated, c1_range_aid );[127X[104X312[4X[28X<A morphism in Generalized morphism category of VectorSpacesForGeneralizedMorphismsTest>[128X[104X313[4X[25Xgap>[125X [27XB_2 := QVectorSpace( 1 );[127X[104X314[4X[28X<A rational vector space of dimension 1>[128X[104X315[4X[25Xgap>[125X [27XC_2 := QVectorSpace( 2 );[127X[104X316[4X[28X<A rational vector space of dimension 2>[128X[104X317[4X[25Xgap>[125X [27Xc2_source_aid := VectorSpaceMorphism( B_2, [ [ 2, 0 ] ], B );[127X[104X318[4X[28XA rational vector space homomorphism with matrix: [128X[104X319[4X[28X[ [ 2, 0 ] ][128X[104X320[4X[28X[128X[104X321[4X[25Xgap>[125X [27XSetIsSubobject( c2_source_aid, true );[127X[104X322[4X[25Xgap>[125X [27Xc2_range_aid := VectorSpaceMorphism( C, [ [ 3, 0 ], [ 0, 3 ], [ 0, 0 ] ], C_2 );[127X[104X323[4X[28XA rational vector space homomorphism with matrix: [128X[104X324[4X[28X[ [ 3, 0 ],[128X[104X325[4X[28X [ 0, 3 ],[128X[104X326[4X[28X [ 0, 0 ] ][128X[104X327[4X[28X[128X[104X328[4X[25Xgap>[125X [27XSetIsFactorobject( c2_range_aid, true );[127X[104X329[4X[25Xgap>[125X [27Xc2_associated := VectorSpaceMorphism( B_2, [ [ 6, 6 ] ], C_2 );[127X[104X330[4X[28XA rational vector space homomorphism with matrix: [128X[104X331[4X[28X[ [ 6, 6 ] ][128X[104X332[4X[28X[128X[104X333[4X[25Xgap>[125X [27Xc2 := GeneralizedMorphism( c2_source_aid, c2_associated, c2_range_aid );[127X[104X334[4X[28X<A morphism in Generalized morphism category of VectorSpacesForGeneralizedMorphismsTest>[128X[104X335[4X[25Xgap>[125X [27XIsCongruentForMorphisms( c1, c2 );[127X[104X336[4X[28Xtrue[128X[104X337[4X[25Xgap>[125X [27XIsCongruentForMorphisms( c1, c1 );[127X[104X338[4X[28Xtrue[128X[104X339[4X[25Xgap>[125X [27Xc3_associated := VectorSpaceMorphism( B_1, [ [ 2, 2 ] ], C_1 );[127X[104X340[4X[28XA rational vector space homomorphism with matrix: [128X[104X341[4X[28X[ [ 2, 2 ] ][128X[104X342[4X[28X[128X[104X343[4X[25Xgap>[125X [27Xc3 := GeneralizedMorphism( c1_source_aid, c3_associated, c1_range_aid );[127X[104X344[4X[28X<A morphism in Generalized morphism category of VectorSpacesForGeneralizedMorphismsTest>[128X[104X345[4X[25Xgap>[125X [27XIsCongruentForMorphisms( c1, c3 );[127X[104X346[4X[28Xfalse[128X[104X347[4X[25Xgap>[125X [27XIsCongruentForMorphisms( c2, c3 );[127X[104X348[4X[28Xfalse[128X[104X349[4X[25Xgap>[125X [27Xc1 + c2;[127X[104X350[4X[28X<A morphism in Generalized morphism category of VectorSpacesForGeneralizedMorphismsTest>[128X[104X351[4X[25Xgap>[125X [27XArrow( c1 + c2 );[127X[104X352[4X[28XA rational vector space homomorphism with matrix: [128X[104X353[4X[28X[ [ 12, 12 ] ][128X[104X354[4X[28X[128X[104X355[4X[32X[104X356357[33X[0;0YFirst composition test:[133X358359[4X[32X Example [32X[104X360[4X[25Xgap>[125X [27Xvecspaces := CreateCapCategory( "VectorSpacesForGeneralizedMorphismsTest" );[127X[104X361[4X[28XVectorSpacesForGeneralizedMorphismsTest[128X[104X362[4X[25Xgap>[125X [27XReadPackage( "CAP", "examples/testfiles/VectorSpacesAllMethods.gi" );[127X[104X363[4X[28Xtrue[128X[104X364[4X[25Xgap>[125X [27XA := QVectorSpace( 1 );[127X[104X365[4X[28X<A rational vector space of dimension 1>[128X[104X366[4X[25Xgap>[125X [27XB := QVectorSpace( 2 );[127X[104X367[4X[28X<A rational vector space of dimension 2>[128X[104X368[4X[25Xgap>[125X [27XC := QVectorSpace( 3 );[127X[104X369[4X[28X<A rational vector space of dimension 3>[128X[104X370[4X[25Xgap>[125X [27Xphi_tilde_associated := VectorSpaceMorphism( A, [ [ 1, 2, 0 ] ], C );[127X[104X371[4X[28XA rational vector space homomorphism with matrix: [128X[104X372[4X[28X[ [ 1, 2, 0 ] ][128X[104X373[4X[28X[128X[104X374[4X[25Xgap>[125X [27Xphi_tilde_source_aid := VectorSpaceMorphism( A, [ [ 1, 2 ] ], B );[127X[104X375[4X[28XA rational vector space homomorphism with matrix: [128X[104X376[4X[28X[ [ 1, 2 ] ][128X[104X377[4X[28X[128X[104X378[4X[25Xgap>[125X [27Xphi_tilde := GeneralizedMorphismWithSourceAid( phi_tilde_source_aid, phi_tilde_associated );[127X[104X379[4X[28X<A morphism in Generalized morphism category of VectorSpacesForGeneralizedMorphismsTest>[128X[104X380[4X[25Xgap>[125X [27Xpsi_tilde_associated := IdentityMorphism( B );[127X[104X381[4X[28XA rational vector space homomorphism with matrix: [128X[104X382[4X[28X[ [ 1, 0 ],[128X[104X383[4X[28X [ 0, 1 ] ][128X[104X384[4X[28X[128X[104X385[4X[25Xgap>[125X [27Xpsi_tilde_source_aid := VectorSpaceMorphism( B, [ [ 1, 0, 0 ], [ 0, 1, 0 ] ], C );[127X[104X386[4X[28XA rational vector space homomorphism with matrix: [128X[104X387[4X[28X[ [ 1, 0, 0 ],[128X[104X388[4X[28X [ 0, 1, 0 ] ][128X[104X389[4X[28X[128X[104X390[4X[25Xgap>[125X [27Xpsi_tilde := GeneralizedMorphismWithSourceAid( psi_tilde_source_aid, psi_tilde_associated );[127X[104X391[4X[28X<A morphism in Generalized morphism category of VectorSpacesForGeneralizedMorphismsTest>[128X[104X392[4X[25Xgap>[125X [27Xcomposition := PreCompose( phi_tilde, psi_tilde );[127X[104X393[4X[28X<A morphism in Generalized morphism category of VectorSpacesForGeneralizedMorphismsTest>[128X[104X394[4X[25Xgap>[125X [27XArrow( composition );[127X[104X395[4X[28XA rational vector space homomorphism with matrix: [128X[104X396[4X[28X[ [ 1/2, 1 ] ][128X[104X397[4X[28X[128X[104X398[4X[25Xgap>[125X [27XSourceAid( composition );[127X[104X399[4X[28XA rational vector space homomorphism with matrix: [128X[104X400[4X[28X[ [ 1/2, 1 ] ][128X[104X401[4X[28X[128X[104X402[4X[25Xgap>[125X [27XRangeAid( composition );[127X[104X403[4X[28XA rational vector space homomorphism with matrix: [128X[104X404[4X[28X[ [ 1, 0 ],[128X[104X405[4X[28X [ 0, 1 ] ][128X[104X406[4X[32X[104X407408[33X[0;0YSecond composition test[133X409410[4X[32X Example [32X[104X411[4X[25Xgap>[125X [27Xvecspaces := CreateCapCategory( "VectorSpacesForGeneralizedMorphismsTest" );[127X[104X412[4X[28XVectorSpacesForGeneralizedMorphismsTest[128X[104X413[4X[25Xgap>[125X [27XReadPackage( "CAP", "examples/testfiles/VectorSpacesAllMethods.gi" );[127X[104X414[4X[28Xtrue[128X[104X415[4X[25Xgap>[125X [27XA := QVectorSpace( 1 );[127X[104X416[4X[28X<A rational vector space of dimension 1>[128X[104X417[4X[25Xgap>[125X [27XB := QVectorSpace( 2 );[127X[104X418[4X[28X<A rational vector space of dimension 2>[128X[104X419[4X[25Xgap>[125X [27XC := QVectorSpace( 3 );[127X[104X420[4X[28X<A rational vector space of dimension 3>[128X[104X421[4X[25Xgap>[125X [27Xphi2_tilde_associated := VectorSpaceMorphism( A, [ [ 1, 5 ] ], B );[127X[104X422[4X[28XA rational vector space homomorphism with matrix: [128X[104X423[4X[28X[ [ 1, 5 ] ][128X[104X424[4X[28X[128X[104X425[4X[25Xgap>[125X [27Xphi2_tilde_range_aid := VectorSpaceMorphism( C, [ [ 1, 0 ], [ 0, 1 ], [ 1, 1 ] ], B );[127X[104X426[4X[28XA rational vector space homomorphism with matrix: [128X[104X427[4X[28X[ [ 1, 0 ],[128X[104X428[4X[28X [ 0, 1 ],[128X[104X429[4X[28X [ 1, 1 ] ][128X[104X430[4X[28X[128X[104X431[4X[25Xgap>[125X [27Xphi2_tilde := GeneralizedMorphismWithRangeAid( phi2_tilde_associated, phi2_tilde_range_aid );[127X[104X432[4X[28X<A morphism in Generalized morphism category of VectorSpacesForGeneralizedMorphismsTest>[128X[104X433[4X[25Xgap>[125X [27Xpsi2_tilde_associated := VectorSpaceMorphism( C, [ [ 1 ], [ 3 ], [ 4 ] ], A );[127X[104X434[4X[28XA rational vector space homomorphism with matrix: [128X[104X435[4X[28X[ [ 1 ],[128X[104X436[4X[28X [ 3 ],[128X[104X437[4X[28X [ 4 ] ][128X[104X438[4X[28X[128X[104X439[4X[25Xgap>[125X [27Xpsi2_tilde_range_aid := VectorSpaceMorphism( B, [ [ 1 ], [ 1 ] ], A );[127X[104X440[4X[28XA rational vector space homomorphism with matrix: [128X[104X441[4X[28X[ [ 1 ],[128X[104X442[4X[28X [ 1 ] ][128X[104X443[4X[28X[128X[104X444[4X[25Xgap>[125X [27Xpsi2_tilde := GeneralizedMorphismWithRangeAid( psi2_tilde_associated, psi2_tilde_range_aid );[127X[104X445[4X[28X<A morphism in Generalized morphism category of VectorSpacesForGeneralizedMorphismsTest>[128X[104X446[4X[25Xgap>[125X [27Xcomposition2 := PreCompose( phi2_tilde, psi2_tilde );[127X[104X447[4X[28X<A morphism in Generalized morphism category of VectorSpacesForGeneralizedMorphismsTest>[128X[104X448[4X[25Xgap>[125X [27XArrow( composition2 );[127X[104X449[4X[28XA rational vector space homomorphism with matrix: [128X[104X450[4X[28X[ [ 16 ] ][128X[104X451[4X[28X[128X[104X452[4X[25Xgap>[125X [27XRangeAid( composition2 );[127X[104X453[4X[28XA rational vector space homomorphism with matrix: [128X[104X454[4X[28X[ [ 1 ],[128X[104X455[4X[28X [ 1 ] ][128X[104X456[4X[28X[128X[104X457[4X[25Xgap>[125X [27XSourceAid( composition2 );[127X[104X458[4X[28XA rational vector space homomorphism with matrix: [128X[104X459[4X[28X[ [ 1 ] ][128X[104X460[4X[32X[104X461462[33X[0;0YThird composition test[133X463464[4X[32X Example [32X[104X465[4X[25Xgap>[125X [27Xvecspaces := CreateCapCategory( "VectorSpacesForGeneralizedMorphismsTest" );[127X[104X466[4X[28XVectorSpacesForGeneralizedMorphismsTest[128X[104X467[4X[25Xgap>[125X [27XReadPackage( "CAP", "examples/testfiles/VectorSpacesAllMethods.gi" );[127X[104X468[4X[28Xtrue[128X[104X469[4X[25Xgap>[125X [27XA := QVectorSpace( 3 );[127X[104X470[4X[28X<A rational vector space of dimension 3>[128X[104X471[4X[25Xgap>[125X [27XAsub := QVectorSpace( 2 );[127X[104X472[4X[28X<A rational vector space of dimension 2>[128X[104X473[4X[25Xgap>[125X [27XB := QVectorSpace( 3 );[127X[104X474[4X[28X<A rational vector space of dimension 3>[128X[104X475[4X[25Xgap>[125X [27XBfac := QVectorSpace( 1 );[127X[104X476[4X[28X<A rational vector space of dimension 1>[128X[104X477[4X[25Xgap>[125X [27XBsub := QVectorSpace( 2 );[127X[104X478[4X[28X<A rational vector space of dimension 2>[128X[104X479[4X[25Xgap>[125X [27XC := QVectorSpace( 3 );[127X[104X480[4X[28X<A rational vector space of dimension 3>[128X[104X481[4X[25Xgap>[125X [27XCfac := QVectorSpace( 1 );[127X[104X482[4X[28X<A rational vector space of dimension 1>[128X[104X483[4X[25Xgap>[125X [27XAsub_into_A := VectorSpaceMorphism( Asub, [ [ 1, 0, 0 ], [ 0, 1, 0 ] ], A );[127X[104X484[4X[28XA rational vector space homomorphism with matrix: [128X[104X485[4X[28X[ [ 1, 0, 0 ],[128X[104X486[4X[28X [ 0, 1, 0 ] ][128X[104X487[4X[28X[128X[104X488[4X[25Xgap>[125X [27XAsub_to_Bfac := VectorSpaceMorphism( Asub, [ [ 1 ], [ 1 ] ], Bfac );[127X[104X489[4X[28XA rational vector space homomorphism with matrix: [128X[104X490[4X[28X[ [ 1 ],[128X[104X491[4X[28X [ 1 ] ][128X[104X492[4X[28X[128X[104X493[4X[25Xgap>[125X [27XB_onto_Bfac := VectorSpaceMorphism( B, [ [ 1 ], [ 1 ], [ 1 ] ], Bfac );[127X[104X494[4X[28XA rational vector space homomorphism with matrix: [128X[104X495[4X[28X[ [ 1 ],[128X[104X496[4X[28X [ 1 ],[128X[104X497[4X[28X [ 1 ] ][128X[104X498[4X[28X[128X[104X499[4X[25Xgap>[125X [27XBsub_into_B := VectorSpaceMorphism( Bsub, [ [ 2, 2, 0 ], [ 0, 2, 2 ] ], B );[127X[104X500[4X[28XA rational vector space homomorphism with matrix: [128X[104X501[4X[28X[ [ 2, 2, 0 ],[128X[104X502[4X[28X [ 0, 2, 2 ] ][128X[104X503[4X[28X[128X[104X504[4X[25Xgap>[125X [27XBsub_to_Cfac := VectorSpaceMorphism( Bsub, [ [ 3 ], [ 0 ] ], Cfac );[127X[104X505[4X[28XA rational vector space homomorphism with matrix: [128X[104X506[4X[28X[ [ 3 ],[128X[104X507[4X[28X [ 0 ] ][128X[104X508[4X[28X[128X[104X509[4X[25Xgap>[125X [27XC_onto_Cfac := VectorSpaceMorphism( C, [ [ 1 ], [ 2 ], [ 3 ] ], Cfac );[127X[104X510[4X[28XA rational vector space homomorphism with matrix: [128X[104X511[4X[28X[ [ 1 ],[128X[104X512[4X[28X [ 2 ],[128X[104X513[4X[28X [ 3 ] ][128X[104X514[4X[28X[128X[104X515[4X[25Xgap>[125X [27Xgeneralized_morphism1 := GeneralizedMorphism( Asub_into_A, Asub_to_Bfac, B_onto_Bfac );[127X[104X516[4X[28X<A morphism in Generalized morphism category of VectorSpacesForGeneralizedMorphismsTest>[128X[104X517[4X[25Xgap>[125X [27Xgeneralized_morphism2 := GeneralizedMorphism( Bsub_into_B, Bsub_to_Cfac, C_onto_Cfac );[127X[104X518[4X[28X<A morphism in Generalized morphism category of VectorSpacesForGeneralizedMorphismsTest>[128X[104X519[4X[25Xgap>[125X [27XIsWellDefined( generalized_morphism1 );[127X[104X520[4X[28Xtrue[128X[104X521[4X[25Xgap>[125X [27XIsWellDefined( generalized_morphism2 );[127X[104X522[4X[28Xtrue[128X[104X523[4X[25Xgap>[125X [27Xp := PreCompose( generalized_morphism1, generalized_morphism2 );[127X[104X524[4X[28X<A morphism in Generalized morphism category of VectorSpacesForGeneralizedMorphismsTest>[128X[104X525[4X[25Xgap>[125X [27XSourceAid( p );[127X[104X526[4X[28XA rational vector space homomorphism with matrix: [128X[104X527[4X[28X[ [ -1, 1, 0 ],[128X[104X528[4X[28X [ 1, 0, 0 ] ][128X[104X529[4X[28X[128X[104X530[4X[25Xgap>[125X [27XArrow( p );[127X[104X531[4X[28XA rational vector space homomorphism with matrix: [128X[104X532[4X[28X(an empty 2 x 0 matrix)[128X[104X533[4X[28X[128X[104X534[4X[25Xgap>[125X [27XRangeAid( p );[127X[104X535[4X[28XA rational vector space homomorphism with matrix: [128X[104X536[4X[28X(an empty 3 x 0 matrix)[128X[104X537[4X[25Xgap>[125X [27XA := QVectorSpace( 3 );[127X[104X538[4X[28X<A rational vector space of dimension 3>[128X[104X539[4X[25Xgap>[125X [27XAsub := QVectorSpace( 2 );[127X[104X540[4X[28X<A rational vector space of dimension 2>[128X[104X541[4X[25Xgap>[125X [27XB := QVectorSpace( 3 );[127X[104X542[4X[28X<A rational vector space of dimension 3>[128X[104X543[4X[25Xgap>[125X [27XBfac := QVectorSpace( 1 );[127X[104X544[4X[28X<A rational vector space of dimension 1>[128X[104X545[4X[25Xgap>[125X [27XBsub := QVectorSpace( 2 );[127X[104X546[4X[28X<A rational vector space of dimension 2>[128X[104X547[4X[25Xgap>[125X [27XC := QVectorSpace( 3 );[127X[104X548[4X[28X<A rational vector space of dimension 3>[128X[104X549[4X[25Xgap>[125X [27XCfac := QVectorSpace( 2 );[127X[104X550[4X[28X<A rational vector space of dimension 2>[128X[104X551[4X[25Xgap>[125X [27XAsub_into_A := VectorSpaceMorphism( Asub, [ [ 1, 0, 0 ], [ 0, 1, 0 ] ], A );[127X[104X552[4X[28XA rational vector space homomorphism with matrix: [128X[104X553[4X[28X[ [ 1, 0, 0 ],[128X[104X554[4X[28X [ 0, 1, 0 ] ][128X[104X555[4X[28X[128X[104X556[4X[25Xgap>[125X [27XAsub_to_Bfac := VectorSpaceMorphism( Asub, [ [ 1 ], [ 1 ] ], Bfac );[127X[104X557[4X[28XA rational vector space homomorphism with matrix: [128X[104X558[4X[28X[ [ 1 ],[128X[104X559[4X[28X [ 1 ] ][128X[104X560[4X[28X[128X[104X561[4X[25Xgap>[125X [27XB_onto_Bfac := VectorSpaceMorphism( B, [ [ 1 ], [ 1 ], [ 1 ] ], Bfac );[127X[104X562[4X[28XA rational vector space homomorphism with matrix: [128X[104X563[4X[28X[ [ 1 ],[128X[104X564[4X[28X [ 1 ],[128X[104X565[4X[28X [ 1 ] ][128X[104X566[4X[28X[128X[104X567[4X[25Xgap>[125X [27XBsub_into_B := VectorSpaceMorphism( Bsub, [ [ 2, 2, 0 ], [ 0, 2, 2 ] ], B );[127X[104X568[4X[28XA rational vector space homomorphism with matrix: [128X[104X569[4X[28X[ [ 2, 2, 0 ],[128X[104X570[4X[28X [ 0, 2, 2 ] ][128X[104X571[4X[28X[128X[104X572[4X[25Xgap>[125X [27XBsub_to_Cfac := VectorSpaceMorphism( Bsub, [ [ 3, 3 ], [ 0, 0 ] ], Cfac );[127X[104X573[4X[28XA rational vector space homomorphism with matrix: [128X[104X574[4X[28X[ [ 3, 3 ],[128X[104X575[4X[28X [ 0, 0 ] ][128X[104X576[4X[28X[128X[104X577[4X[25Xgap>[125X [27XC_onto_Cfac := VectorSpaceMorphism( C, [ [ 1, 0 ], [ 0, 2 ], [ 3, 3 ] ], Cfac );[127X[104X578[4X[28XA rational vector space homomorphism with matrix: [128X[104X579[4X[28X[ [ 1, 0 ],[128X[104X580[4X[28X [ 0, 2 ],[128X[104X581[4X[28X [ 3, 3 ] ][128X[104X582[4X[28X[128X[104X583[4X[25Xgap>[125X [27Xgeneralized_morphism1 := GeneralizedMorphism( Asub_into_A, Asub_to_Bfac, B_onto_Bfac );[127X[104X584[4X[28X<A morphism in Generalized morphism category of VectorSpacesForGeneralizedMorphismsTest>[128X[104X585[4X[25Xgap>[125X [27Xgeneralized_morphism2 := GeneralizedMorphism( Bsub_into_B, Bsub_to_Cfac, C_onto_Cfac );[127X[104X586[4X[28X<A morphism in Generalized morphism category of VectorSpacesForGeneralizedMorphismsTest>[128X[104X587[4X[25Xgap>[125X [27XIsWellDefined( generalized_morphism1 );[127X[104X588[4X[28Xtrue[128X[104X589[4X[25Xgap>[125X [27XIsWellDefined( generalized_morphism2 );[127X[104X590[4X[28Xtrue[128X[104X591[4X[25Xgap>[125X [27Xp := PreCompose( generalized_morphism1, generalized_morphism2 );[127X[104X592[4X[28X<A morphism in Generalized morphism category of VectorSpacesForGeneralizedMorphismsTest>[128X[104X593[4X[25Xgap>[125X [27XSourceAid( p );[127X[104X594[4X[28XA rational vector space homomorphism with matrix: [128X[104X595[4X[28X[ [ -1, 1, 0 ],[128X[104X596[4X[28X [ 1, 0, 0 ] ][128X[104X597[4X[28X[128X[104X598[4X[25Xgap>[125X [27XArrow( p );[127X[104X599[4X[28XA rational vector space homomorphism with matrix: [128X[104X600[4X[28X[ [ 0 ],[128X[104X601[4X[28X [ 0 ] ][128X[104X602[4X[28X[128X[104X603[4X[25Xgap>[125X [27XRangeAid( p );[127X[104X604[4X[28XA rational vector space homomorphism with matrix: [128X[104X605[4X[28X[ [ -1 ],[128X[104X606[4X[28X [ 2 ],[128X[104X607[4X[28X [ 0 ] ][128X[104X608[4X[32X[104X609610[33X[0;0YHonest representative test[133X611612[4X[32X Example [32X[104X613[4X[25Xgap>[125X [27Xvecspaces := CreateCapCategory( "VectorSpacesForGeneralizedMorphismsTest" );[127X[104X614[4X[28XVectorSpacesForGeneralizedMorphismsTest[128X[104X615[4X[25Xgap>[125X [27XReadPackage( "CAP", "examples/testfiles/VectorSpacesAllMethods.gi" );[127X[104X616[4X[28Xtrue[128X[104X617[4X[25Xgap>[125X [27XA := QVectorSpace( 1 );[127X[104X618[4X[28X<A rational vector space of dimension 1>[128X[104X619[4X[25Xgap>[125X [27XB := QVectorSpace( 2 );[127X[104X620[4X[28X<A rational vector space of dimension 2>[128X[104X621[4X[25Xgap>[125X [27Xphi_tilde_source_aid := VectorSpaceMorphism( A, [ [ 2 ] ], A );[127X[104X622[4X[28XA rational vector space homomorphism with matrix: [128X[104X623[4X[28X[ [ 2 ] ][128X[104X624[4X[28X[128X[104X625[4X[25Xgap>[125X [27Xphi_tilde_associated := VectorSpaceMorphism( A, [ [ 1, 1 ] ], B );[127X[104X626[4X[28XA rational vector space homomorphism with matrix: [128X[104X627[4X[28X[ [ 1, 1 ] ][128X[104X628[4X[28X[128X[104X629[4X[25Xgap>[125X [27Xphi_tilde_range_aid := VectorSpaceMorphism( B, [ [ 1, 2 ], [ 3, 4 ] ], B );[127X[104X630[4X[28XA rational vector space homomorphism with matrix: [128X[104X631[4X[28X[ [ 1, 2 ],[128X[104X632[4X[28X [ 3, 4 ] ][128X[104X633[4X[28X[128X[104X634[4X[25Xgap>[125X [27Xphi_tilde := GeneralizedMorphism( phi_tilde_source_aid, phi_tilde_associated, phi_tilde_range_aid );[127X[104X635[4X[28X<A morphism in Generalized morphism category of VectorSpacesForGeneralizedMorphismsTest>[128X[104X636[4X[25Xgap>[125X [27XHonestRepresentative( phi_tilde );[127X[104X637[4X[28XA rational vector space homomorphism with matrix: [128X[104X638[4X[28X[ [ -1/4, 1/4 ] ][128X[104X639[4X[28X[128X[104X640[4X[25Xgap>[125X [27XIsWellDefined( phi_tilde );[127X[104X641[4X[28Xtrue[128X[104X642[4X[25Xgap>[125X [27XIsWellDefined( psi_tilde );[127X[104X643[4X[28Xtrue[128X[104X644[4X[32X[104X645646647[1X12.4 [33X[0;0YIsWellDefined[133X[101X648649[4X[32X Example [32X[104X650[4X[25Xgap>[125X [27Xvecspaces := CreateCapCategory( "VectorSpacesForIsWellDefinedTest" );[127X[104X651[4X[28XVectorSpacesForIsWellDefinedTest [128X[104X652[4X[25Xgap>[125X [27XReadPackage( "CAP", "examples/testfiles/VectorSpacesAllMethods.gi" );[127X[104X653[4X[28Xtrue[128X[104X654[4X[25Xgap>[125X [27XLoadPackage( "GeneralizedMorphismsForCAP" );[127X[104X655[4X[28Xtrue[128X[104X656[4X[25Xgap>[125X [27XA := QVectorSpace( 1 );[127X[104X657[4X[28X<A rational vector space of dimension 1>[128X[104X658[4X[25Xgap>[125X [27XB := QVectorSpace( 2 );[127X[104X659[4X[28X<A rational vector space of dimension 2>[128X[104X660[4X[25Xgap>[125X [27Xalpha := VectorSpaceMorphism( A, [ [ 1, 2 ] ], B );[127X[104X661[4X[28XA rational vector space homomorphism with matrix: [128X[104X662[4X[28X[ [ 1, 2 ] ][128X[104X663[4X[28X[128X[104X664[4X[25Xgap>[125X [27Xg := GeneralizedMorphism( alpha, alpha, alpha );[127X[104X665[4X[28X<A morphism in Generalized morphism category of VectorSpacesForIsWellDefinedTest>[128X[104X666[4X[25Xgap>[125X [27XIsWellDefined( alpha );[127X[104X667[4X[28Xtrue[128X[104X668[4X[25Xgap>[125X [27XIsWellDefined( g );[127X[104X669[4X[28Xtrue[128X[104X670[4X[32X[104X671672673[1X12.5 [33X[0;0YKernel[133X[101X674675[4X[32X Example [32X[104X676[4X[25Xgap>[125X [27Xvecspaces := CreateCapCategory( "VectorSpaces01" );[127X[104X677[4X[28XVectorSpaces01[128X[104X678[4X[25Xgap>[125X [27XReadPackage( "CAP", "examples/testfiles/VectorSpacesAddKernel01.gi" );[127X[104X679[4X[28Xtrue[128X[104X680[4X[25Xgap>[125X [27XV := QVectorSpace( 2 );[127X[104X681[4X[28X<A rational vector space of dimension 2>[128X[104X682[4X[25Xgap>[125X [27XW := QVectorSpace( 3 );[127X[104X683[4X[28X<A rational vector space of dimension 3>[128X[104X684[4X[25Xgap>[125X [27Xalpha := VectorSpaceMorphism( V, [ [ 1, 1, 1 ], [ -1, -1, -1 ] ], W );[127X[104X685[4X[28XA rational vector space homomorphism with matrix: [128X[104X686[4X[28X[ [ 1, 1, 1 ],[128X[104X687[4X[28X [ -1, -1, -1 ] ][128X[104X688[4X[28X[128X[104X689[4X[25Xgap>[125X [27Xk := KernelObject( alpha );[127X[104X690[4X[28X<A rational vector space of dimension 1>[128X[104X691[4X[25Xgap>[125X [27XT := QVectorSpace( 2 );[127X[104X692[4X[28X<A rational vector space of dimension 2>[128X[104X693[4X[25Xgap>[125X [27Xtau := VectorSpaceMorphism( T, [ [ 2, 2 ], [ 2, 2 ] ], V );[127X[104X694[4X[28XA rational vector space homomorphism with matrix: [128X[104X695[4X[28X[ [ 2, 2 ],[128X[104X696[4X[28X [ 2, 2 ] ][128X[104X697[4X[28X[128X[104X698[4X[25Xgap>[125X [27Xk_lift := KernelLift( alpha, tau );[127X[104X699[4X[28XA rational vector space homomorphism with matrix: [128X[104X700[4X[28X[ [ 2 ],[128X[104X701[4X[28X [ 2 ] ][128X[104X702[4X[28X[128X[104X703[4X[25Xgap>[125X [27XHasKernelEmbedding( alpha );[127X[104X704[4X[28Xfalse[128X[104X705[4X[25Xgap>[125X [27XKernelEmbedding( alpha );[127X[104X706[4X[28XA rational vector space homomorphism with matrix: [128X[104X707[4X[28X[ [ 1, 1 ] ][128X[104X708[4X[28X[128X[104X709[4X[32X[104X710711[4X[32X Example [32X[104X712[4X[25Xgap>[125X [27Xvecspaces := CreateCapCategory( "VectorSpaces02" );[127X[104X713[4X[28XVectorSpaces02[128X[104X714[4X[25Xgap>[125X [27XReadPackage( "CAP", "examples/testfiles/VectorSpacesAddKernel02.gi" );[127X[104X715[4X[28Xtrue[128X[104X716[4X[25Xgap>[125X [27XV := QVectorSpace( 2 );[127X[104X717[4X[28X<A rational vector space of dimension 2>[128X[104X718[4X[25Xgap>[125X [27XW := QVectorSpace( 3 );[127X[104X719[4X[28X<A rational vector space of dimension 3>[128X[104X720[4X[25Xgap>[125X [27Xalpha := VectorSpaceMorphism( V, [ [ 1, 1, 1 ], [ -1, -1, -1 ] ], W );[127X[104X721[4X[28XA rational vector space homomorphism with matrix: [128X[104X722[4X[28X[ [ 1, 1, 1 ],[128X[104X723[4X[28X [ -1, -1, -1 ] ][128X[104X724[4X[28X[128X[104X725[4X[25Xgap>[125X [27Xk := KernelObject( alpha );[127X[104X726[4X[28X<A rational vector space of dimension 1>[128X[104X727[4X[25Xgap>[125X [27XT := QVectorSpace( 2 );[127X[104X728[4X[28X<A rational vector space of dimension 2>[128X[104X729[4X[25Xgap>[125X [27Xtau := VectorSpaceMorphism( T, [ [ 2, 2 ], [ 2, 2 ] ], V );[127X[104X730[4X[28XA rational vector space homomorphism with matrix: [128X[104X731[4X[28X[ [ 2, 2 ],[128X[104X732[4X[28X [ 2, 2 ] ][128X[104X733[4X[28X[128X[104X734[4X[25Xgap>[125X [27Xk_lift := KernelLift( alpha, tau );[127X[104X735[4X[28XA rational vector space homomorphism with matrix: [128X[104X736[4X[28X[ [ 2 ],[128X[104X737[4X[28X [ 2 ] ][128X[104X738[4X[28X[128X[104X739[4X[25Xgap>[125X [27XHasKernelEmbedding( alpha );[127X[104X740[4X[28Xfalse[128X[104X741[4X[32X[104X742743[4X[32X Example [32X[104X744[4X[25Xgap>[125X [27Xvecspaces := CreateCapCategory( "VectorSpaces03" );[127X[104X745[4X[28XVectorSpaces03[128X[104X746[4X[25Xgap>[125X [27XReadPackage( "CAP", "examples/testfiles/VectorSpacesAddKernel03.gi" );[127X[104X747[4X[28Xtrue[128X[104X748[4X[25Xgap>[125X [27XV := QVectorSpace( 2 );[127X[104X749[4X[28X<A rational vector space of dimension 2>[128X[104X750[4X[25Xgap>[125X [27XW := QVectorSpace( 3 );[127X[104X751[4X[28X<A rational vector space of dimension 3>[128X[104X752[4X[25Xgap>[125X [27Xalpha := VectorSpaceMorphism( V, [ [ 1, 1, 1 ], [ -1, -1, -1 ] ], W );[127X[104X753[4X[28XA rational vector space homomorphism with matrix: [128X[104X754[4X[28X[ [ 1, 1, 1 ],[128X[104X755[4X[28X [ -1, -1, -1 ] ][128X[104X756[4X[28X[128X[104X757[4X[25Xgap>[125X [27Xk := KernelObject( alpha );[127X[104X758[4X[28X<A rational vector space of dimension 1>[128X[104X759[4X[25Xgap>[125X [27Xk_emb := KernelEmbedding( alpha );[127X[104X760[4X[28XA rational vector space homomorphism with matrix: [128X[104X761[4X[28X[ [ 1, 1 ] ][128X[104X762[4X[28X[128X[104X763[4X[25Xgap>[125X [27XIsIdenticalObj( Source( k_emb ), k );[127X[104X764[4X[28Xtrue[128X[104X765[4X[25Xgap>[125X [27XV := QVectorSpace( 2 );[127X[104X766[4X[28X<A rational vector space of dimension 2>[128X[104X767[4X[25Xgap>[125X [27XW := QVectorSpace( 3 );[127X[104X768[4X[28X<A rational vector space of dimension 3>[128X[104X769[4X[25Xgap>[125X [27Xbeta := VectorSpaceMorphism( V, [ [ 1, 1, 1 ], [ -1, -1, -1 ] ], W );[127X[104X770[4X[28XA rational vector space homomorphism with matrix: [128X[104X771[4X[28X[ [ 1, 1, 1 ],[128X[104X772[4X[28X [ -1, -1, -1 ] ][128X[104X773[4X[28X[128X[104X774[4X[25Xgap>[125X [27Xk_emb := KernelEmbedding( beta );[127X[104X775[4X[28XA rational vector space homomorphism with matrix: [128X[104X776[4X[28X[ [ 1, 1 ] ][128X[104X777[4X[28X[128X[104X778[4X[25Xgap>[125X [27XIsIdenticalObj( Source( k_emb ), KernelObject( beta ) );[127X[104X779[4X[28Xtrue[128X[104X780[4X[32X[104X781782783[1X12.6 [33X[0;0YFiberProduct[133X[101X784785[4X[32X Example [32X[104X786[4X[25Xgap>[125X [27Xvecspaces := CreateCapCategory( "VectorSpacesForFiberProductTest" );[127X[104X787[4X[28XVectorSpacesForFiberProductTest[128X[104X788[4X[25Xgap>[125X [27XReadPackage( "CAP", "examples/testfiles/VectorSpacesAllMethods.gi" );[127X[104X789[4X[28Xtrue[128X[104X790[4X[25Xgap>[125X [27XA := QVectorSpace( 1 );[127X[104X791[4X[28X<A rational vector space of dimension 1>[128X[104X792[4X[25Xgap>[125X [27XB := QVectorSpace( 2 );[127X[104X793[4X[28X<A rational vector space of dimension 2>[128X[104X794[4X[25Xgap>[125X [27XC := QVectorSpace( 3 );[127X[104X795[4X[28X<A rational vector space of dimension 3>[128X[104X796[4X[25Xgap>[125X [27XAtoC := VectorSpaceMorphism( A, [ [ 1, 2, 0 ] ], C );[127X[104X797[4X[28XA rational vector space homomorphism with matrix: [128X[104X798[4X[28X[ [ 1, 2, 0 ] ][128X[104X799[4X[28X[128X[104X800[4X[25Xgap>[125X [27XBtoC := VectorSpaceMorphism( B, [ [ 1, 0, 0 ], [ 0, 1, 0 ] ], C );[127X[104X801[4X[28XA rational vector space homomorphism with matrix: [128X[104X802[4X[28X[ [ 1, 0, 0 ],[128X[104X803[4X[28X [ 0, 1, 0 ] ][128X[104X804[4X[28X[128X[104X805[4X[25Xgap>[125X [27XP := FiberProduct( AtoC, BtoC );[127X[104X806[4X[28X<A rational vector space of dimension 1>[128X[104X807[4X[25Xgap>[125X [27Xp1 := ProjectionInFactorOfFiberProduct( [ AtoC, BtoC ], 1 );[127X[104X808[4X[28XA rational vector space homomorphism with matrix: [128X[104X809[4X[28X[ [ 1/2 ] ][128X[104X810[4X[28X[128X[104X811[4X[25Xgap>[125X [27Xp2 := ProjectionInFactorOfFiberProduct( [ AtoC, BtoC ], 2 );[127X[104X812[4X[28XA rational vector space homomorphism with matrix: [128X[104X813[4X[28X[ [ 1/2, 1 ] ][128X[104X814[4X[28X[128X[104X815[4X[32X[104X816817818819