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[1X2 [33X[0;0YExamples and Tests[133X[101X234[1X2.1 [33X[0;0YAnnihilator[133X[101X56[4X[32X Example [32X[104X7[4X[25Xgap>[125X [27XZZ := HomalgRingOfIntegersInSingular();;[127X[104X8[4X[25Xgap>[125X [27XM1 := AsLeftPresentation( HomalgMatrix( [ [ "2" ] ], ZZ ) );;[127X[104X9[4X[25Xgap>[125X [27XM2 := AsLeftPresentation( HomalgMatrix( [ [ "3" ] ], ZZ ) );;[127X[104X10[4X[25Xgap>[125X [27XM3 := AsLeftPresentation( HomalgMatrix( [ [ "4" ] ], ZZ ) );;[127X[104X11[4X[25Xgap>[125X [27XM := DirectSum( M1, M2, M3 );;[127X[104X12[4X[25Xgap>[125X [27XDisplay( Annihilator( M ) );[127X[104X13[4X[28X12[128X[104X14[4X[28X[128X[104X15[4X[28XA monomorphism in Category of left presentations of Z[128X[104X16[4X[25Xgap>[125X [27XM1 := AsRightPresentation( HomalgMatrix( [ [ "2" ] ], ZZ ) );;[127X[104X17[4X[25Xgap>[125X [27XM2 := AsRightPresentation( HomalgMatrix( [ [ "3" ] ], ZZ ) );;[127X[104X18[4X[25Xgap>[125X [27XM3 := AsRightPresentation( HomalgMatrix( [ [ "4" ] ], ZZ ) );;[127X[104X19[4X[25Xgap>[125X [27XM := DirectSum( M1, M2, M3 );;[127X[104X20[4X[25Xgap>[125X [27XDisplay( Annihilator( M ) );[127X[104X21[4X[28X12[128X[104X22[4X[28X[128X[104X23[4X[28XA monomorphism in Category of right presentations of Z[128X[104X24[4X[32X[104X252627[1X2.2 [33X[0;0YIntersection of Submodules[133X[101X2829[4X[32X Example [32X[104X30[4X[25Xgap>[125X [27XQ := HomalgFieldOfRationalsInSingular();;[127X[104X31[4X[25Xgap>[125X [27XR := Q * "x,y";[127X[104X32[4X[28XQ[x,y][128X[104X33[4X[25Xgap>[125X [27XF := AsLeftPresentation( HomalgMatrix( [ [ 0 ] ], R ) );[127X[104X34[4X[28X<An object in Category of left presentations of Q[x,y]>[128X[104X35[4X[25Xgap>[125X [27XI1 := AsLeftPresentation( HomalgMatrix( [ [ "x" ] ], R ) );;[127X[104X36[4X[25Xgap>[125X [27XI2 := AsLeftPresentation( HomalgMatrix( [ [ "y" ] ], R ) );;[127X[104X37[4X[25Xgap>[125X [27XDisplay( I1 );[127X[104X38[4X[28Xx[128X[104X39[4X[28X[128X[104X40[4X[28XAn object in Category of left presentations of Q[x,y][128X[104X41[4X[25Xgap>[125X [27XDisplay( I2 );[127X[104X42[4X[28Xy[128X[104X43[4X[28X[128X[104X44[4X[28XAn object in Category of left presentations of Q[x,y][128X[104X45[4X[25Xgap>[125X [27Xeps1 := PresentationMorphism( F, HomalgMatrix( [ [ 1 ] ], R ), I1 );[127X[104X46[4X[28X<A morphism in Category of left presentations of Q[x,y]>[128X[104X47[4X[25Xgap>[125X [27Xeps2 := PresentationMorphism( F, HomalgMatrix( [ [ 1 ] ], R ), I2 );[127X[104X48[4X[28X<A morphism in Category of left presentations of Q[x,y]>[128X[104X49[4X[25Xgap>[125X [27Xkernelemb1 := KernelEmbedding( eps1 );[127X[104X50[4X[28X<A monomorphism in Category of left presentations of Q[x,y]>[128X[104X51[4X[25Xgap>[125X [27Xkernelemb2 := KernelEmbedding( eps2 );[127X[104X52[4X[28X<A monomorphism in Category of left presentations of Q[x,y]>[128X[104X53[4X[25Xgap>[125X [27XP := FiberProduct( kernelemb1, kernelemb2 );;[127X[104X54[4X[25Xgap>[125X [27XDisplay( P );[127X[104X55[4X[28X(an empty 0 x 1 matrix)[128X[104X56[4X[28X[128X[104X57[4X[28XAn object in Category of left presentations of Q[x,y][128X[104X58[4X[25Xgap>[125X [27Xpi1 := ProjectionInFactorOfFiberProduct( [ kernelemb1, kernelemb2 ], 1 );[127X[104X59[4X[28X<A monomorphism in Category of left presentations of Q[x,y]>[128X[104X60[4X[25Xgap>[125X [27Xcomposite := PreCompose( pi1, kernelemb1 );[127X[104X61[4X[28X<A monomorphism in Category of left presentations of Q[x,y]>[128X[104X62[4X[25Xgap>[125X [27XDisplay( composite );[127X[104X63[4X[28Xx*y[128X[104X64[4X[28X[128X[104X65[4X[28XA monomorphism in Category of left presentations of Q[x,y][128X[104X66[4X[32X[104X676869[1X2.3 [33X[0;0YKoszul Complex[133X[101X7071[4X[32X Example [32X[104X72[4X[25Xgap>[125X [27XQ := HomalgFieldOfRationalsInSingular();;[127X[104X73[4X[25Xgap>[125X [27XR := Q * "x,y,z";;[127X[104X74[4X[25Xgap>[125X [27XM := HomalgMatrix( [ [ "x" ], [ "y" ], [ "z" ] ], 3, 1, R );;[127X[104X75[4X[25Xgap>[125X [27XMl := AsLeftPresentation( M );;[127X[104X76[4X[25Xgap>[125X [27Xeps := CoverByFreeModule( Ml );;[127X[104X77[4X[25Xgap>[125X [27Xiota1 := KernelEmbedding( eps );;[127X[104X78[4X[25Xgap>[125X [27XDisplay( iota1 );[127X[104X79[4X[28Xx,[128X[104X80[4X[28Xy,[128X[104X81[4X[28Xz [128X[104X82[4X[28X[128X[104X83[4X[28XA monomorphism in Category of left presentations of Q[x,y,z][128X[104X84[4X[25Xgap>[125X [27XDisplay( Source( iota1 ) );[127X[104X85[4X[28X0, -z,y,[128X[104X86[4X[28X-y,x, 0,[128X[104X87[4X[28X-z,0, x [128X[104X88[4X[28X[128X[104X89[4X[28XAn object in Category of left presentations of Q[x,y,z][128X[104X90[4X[25Xgap>[125X [27Xpi1 := CoverByFreeModule( Source( iota1 ) );;[127X[104X91[4X[25Xgap>[125X [27Xd1 := PreCompose( pi1, iota1 );;[127X[104X92[4X[25Xgap>[125X [27XDisplay( d1 );[127X[104X93[4X[28Xx,[128X[104X94[4X[28Xy,[128X[104X95[4X[28Xz [128X[104X96[4X[28X[128X[104X97[4X[28XA morphism in Category of left presentations of Q[x,y,z][128X[104X98[4X[25Xgap>[125X [27Xiota2 := KernelEmbedding( d1 );;[127X[104X99[4X[25Xgap>[125X [27XDisplay( iota2 );[127X[104X100[4X[28X0, -z,y,[128X[104X101[4X[28X-y,x, 0,[128X[104X102[4X[28X-z,0, x [128X[104X103[4X[28X[128X[104X104[4X[28XA monomorphism in Category of left presentations of Q[x,y,z][128X[104X105[4X[25Xgap>[125X [27XDisplay( Source( iota2 ) );;[127X[104X106[4X[28Xx,z,-y[128X[104X107[4X[28X[128X[104X108[4X[28XAn object in Category of left presentations of Q[x,y,z][128X[104X109[4X[25Xgap>[125X [27Xpi2 := CoverByFreeModule( Source( iota2 ) );;[127X[104X110[4X[25Xgap>[125X [27Xd2 := PreCompose( pi2, iota2 );;[127X[104X111[4X[25Xgap>[125X [27XDisplay( d2 );[127X[104X112[4X[28X0, -z,y,[128X[104X113[4X[28X-y,x, 0,[128X[104X114[4X[28X-z,0, x [128X[104X115[4X[28X[128X[104X116[4X[28XA morphism in Category of left presentations of Q[x,y,z][128X[104X117[4X[25Xgap>[125X [27Xiota3 := KernelEmbedding( d2 );;[127X[104X118[4X[25Xgap>[125X [27XDisplay( iota3 );[127X[104X119[4X[28Xx,z,-y[128X[104X120[4X[28X[128X[104X121[4X[28XA monomorphism in Category of left presentations of Q[x,y,z][128X[104X122[4X[25Xgap>[125X [27XDisplay( Source( iota3 ) );[127X[104X123[4X[28X(an empty 0 x 1 matrix)[128X[104X124[4X[28X[128X[104X125[4X[28XAn object in Category of left presentations of Q[x,y,z][128X[104X126[4X[25Xgap>[125X [27Xpi3 := CoverByFreeModule( Source( iota3 ) );;[127X[104X127[4X[25Xgap>[125X [27Xd3 := PreCompose( pi3, iota3 );;[127X[104X128[4X[25Xgap>[125X [27XDisplay( d3 );[127X[104X129[4X[28Xx,z,-y[128X[104X130[4X[28X[128X[104X131[4X[28XA morphism in Category of left presentations of Q[x,y,z][128X[104X132[4X[25Xgap>[125X [27XN := HomalgMatrix( [ [ "x" ] ], 1, 1, R );;[127X[104X133[4X[25Xgap>[125X [27XNl := AsLeftPresentation( N );;[127X[104X134[4X[25Xgap>[125X [27Xd2Nl := TensorProductOnMorphisms( d2, IdentityMorphism( Nl ) );;[127X[104X135[4X[25Xgap>[125X [27Xd1Nl := TensorProductOnMorphisms( d1, IdentityMorphism( Nl ) );;[127X[104X136[4X[25Xgap>[125X [27XIsZero( PreCompose( d2Nl, d1Nl ) );[127X[104X137[4X[28Xtrue[128X[104X138[4X[25Xgap>[125X [27Xcycles := KernelEmbedding( d1Nl );;[127X[104X139[4X[25Xgap>[125X [27Xboundaries := ImageEmbedding( d2Nl );;[127X[104X140[4X[25Xgap>[125X [27Xboundaries_in_cyles := LiftAlongMonomorphism( cycles, boundaries );;[127X[104X141[4X[25Xgap>[125X [27Xhomology := CokernelObject( boundaries_in_cyles );;[127X[104X142[4X[25Xgap>[125X [27XLessGenFunctor := FunctorLessGeneratorsLeft( R );;[127X[104X143[4X[25Xgap>[125X [27Xhomology := ApplyFunctor( LessGenFunctor, homology );;[127X[104X144[4X[25Xgap>[125X [27XStdBasisFunctor := FunctorStandardModuleLeft( R );;[127X[104X145[4X[25Xgap>[125X [27Xhomology := ApplyFunctor( StdBasisFunctor, homology );;[127X[104X146[4X[25Xgap>[125X [27XDisplay( homology );[127X[104X147[4X[28Xz,[128X[104X148[4X[28Xy,[128X[104X149[4X[28Xx [128X[104X150[4X[28X[128X[104X151[4X[28XAn object in Category of left presentations of Q[x,y,z][128X[104X152[4X[32X[104X153154155[1X2.4 [33X[0;0YClosed Monoidal Structure[133X[101X156157[4X[32X Example [32X[104X158[4X[25Xgap>[125X [27XR := HomalgRingOfIntegers( );;[127X[104X159[4X[25Xgap>[125X [27XM := AsLeftPresentation( HomalgMatrix( [ [ 2 ] ], 1, 1, R ) );[127X[104X160[4X[28X<An object in Category of left presentations of Z>[128X[104X161[4X[25Xgap>[125X [27XN := AsLeftPresentation( HomalgMatrix( [ [ 3 ] ], 1, 1, R ) );[127X[104X162[4X[28X<An object in Category of left presentations of Z>[128X[104X163[4X[25Xgap>[125X [27XT := TensorProductOnObjects( M, N );[127X[104X164[4X[28X<An object in Category of left presentations of Z>[128X[104X165[4X[25Xgap>[125X [27XDisplay( T );[127X[104X166[4X[28X[ [ 3 ],[128X[104X167[4X[28X [ 2 ] ][128X[104X168[4X[28X[128X[104X169[4X[28XAn object in Category of left presentations of Z[128X[104X170[4X[25Xgap>[125X [27XIsZero( T );[127X[104X171[4X[28Xtrue[128X[104X172[4X[25Xgap>[125X [27XH := InternalHomOnObjects( DirectSum( M, M ), DirectSum( M, N ) );[127X[104X173[4X[28X<An object in Category of left presentations of Z>[128X[104X174[4X[25Xgap>[125X [27XDisplay( H );[127X[104X175[4X[28X[ [ -4, -2 ],[128X[104X176[4X[28X [ 2, 2 ] ][128X[104X177[4X[28X[128X[104X178[4X[28XAn object in Category of left presentations of Z[128X[104X179[4X[25Xgap>[125X [27Xalpha := StandardGeneratorMorphism( H, 1 );[127X[104X180[4X[28X<A morphism in Category of left presentations of Z>[128X[104X181[4X[25Xgap>[125X [27Xl := LambdaElimination( DirectSum( M, M ), DirectSum( M, N ), alpha );[127X[104X182[4X[28X<A morphism in Category of left presentations of Z>[128X[104X183[4X[25Xgap>[125X [27XIsZero( l );[127X[104X184[4X[28Xfalse[128X[104X185[4X[25Xgap>[125X [27XDisplay( l );[127X[104X186[4X[28X[ [ 0, 0 ],[128X[104X187[4X[28X [ 1, 0 ] ][128X[104X188[4X[28X[128X[104X189[4X[28XA morphism in Category of left presentations of Z[128X[104X190[4X[25Xgap>[125X [27Xalpha2 := StandardGeneratorMorphism( H, 2 );[127X[104X191[4X[28X<A morphism in Category of left presentations of Z>[128X[104X192[4X[25Xgap>[125X [27Xl2 := LambdaElimination( DirectSum( M, M ), DirectSum( M, N ), alpha2 );[127X[104X193[4X[28X<A morphism in Category of left presentations of Z>[128X[104X194[4X[25Xgap>[125X [27XIsZero( l2 );[127X[104X195[4X[28Xfalse[128X[104X196[4X[25Xgap>[125X [27XDisplay( l2 );[127X[104X197[4X[28X[ [ 1, 0 ],[128X[104X198[4X[28X [ 0, 0 ] ][128X[104X199[4X[28X[128X[104X200[4X[28XA morphism in Category of left presentations of Z[128X[104X201[4X[32X[104X202203204205