GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it
1[1XD [33X[0;0YThe subpackage [5XResidueClassRingForHomalg[105X[101X[1X as a sample ring package[133X[101X234[1XD.1 [33X[0;0YThe Mandatory Basic Operations[133X[101X56[1XD.1-1 BasisOfRowModule[101X78[29X[2XBasisOfRowModule[102X( [3XM[103X ) [32X function9[6XReturns:[106X [33X[0;10Ya [5Xhomalg[105X matrix over the ambient ring[133X1011[4X[32X Code [32X[104X12[4XBasisOfRowModule :=[104X13[4X function( M )[104X14[4X local Mrel;[104X15[4X [104X16[4X Mrel := UnionOfRows( M );[104X17[4X [104X18[4X Mrel := HomalgResidueClassMatrix([104X19[4X BasisOfRowModule( Mrel ), HomalgRing( M ) );[104X20[4X [104X21[4X return GetRidOfObsoleteRows( Mrel );[104X22[4X [104X23[4X end,[104X24[4X[32X[104X2526[1XD.1-2 BasisOfColumnModule[101X2728[29X[2XBasisOfColumnModule[102X( [3XM[103X ) [32X function29[6XReturns:[106X [33X[0;10Ya [5Xhomalg[105X matrix over the ambient ring[133X3031[4X[32X Code [32X[104X32[4XBasisOfColumnModule :=[104X33[4X function( M )[104X34[4X local Mrel;[104X35[4X [104X36[4X Mrel := UnionOfColumns( M );[104X37[4X [104X38[4X Mrel := HomalgResidueClassMatrix([104X39[4X BasisOfColumnModule( Mrel ), HomalgRing( M ) );[104X40[4X [104X41[4X return GetRidOfObsoleteColumns( Mrel );[104X42[4X [104X43[4X end,[104X44[4X[32X[104X4546[1XD.1-3 DecideZeroRows[101X4748[29X[2XDecideZeroRows[102X( [3XA[103X, [3XB[103X ) [32X function49[6XReturns:[106X [33X[0;10Ya [5Xhomalg[105X matrix over the ambient ring[133X5051[4X[32X Code [32X[104X52[4XDecideZeroRows :=[104X53[4X function( A, B )[104X54[4X local Brel;[104X55[4X [104X56[4X Brel := UnionOfRows( B );[104X57[4X [104X58[4X Brel := BasisOfRowModule( Brel );[104X59[4X [104X60[4X return HomalgResidueClassMatrix([104X61[4X DecideZeroRows( Eval( A ), Brel ), HomalgRing( A ) );[104X62[4X [104X63[4X end,[104X64[4X[32X[104X6566[1XD.1-4 DecideZeroColumns[101X6768[29X[2XDecideZeroColumns[102X( [3XA[103X, [3XB[103X ) [32X function69[6XReturns:[106X [33X[0;10Ya [5Xhomalg[105X matrix over the ambient ring[133X7071[4X[32X Code [32X[104X72[4XDecideZeroColumns :=[104X73[4X function( A, B )[104X74[4X local Brel;[104X75[4X [104X76[4X Brel := UnionOfColumns( B );[104X77[4X [104X78[4X Brel := BasisOfColumnModule( Brel );[104X79[4X [104X80[4X return HomalgResidueClassMatrix([104X81[4X DecideZeroColumns( Eval( A ), Brel ), HomalgRing( A ) );[104X82[4X [104X83[4X end,[104X84[4X[32X[104X8586[1XD.1-5 SyzygiesGeneratorsOfRows[101X8788[29X[2XSyzygiesGeneratorsOfRows[102X( [3XM[103X ) [32X function89[6XReturns:[106X [33X[0;10Ya [5Xhomalg[105X matrix over the ambient ring[133X9091[4X[32X Code [32X[104X92[4XSyzygiesGeneratorsOfRows :=[104X93[4X function( M )[104X94[4X local R, ring_rel, rel, S;[104X95[4X [104X96[4X R := HomalgRing( M );[104X97[4X [104X98[4X ring_rel := RingRelations( R );[104X99[4X [104X100[4X rel := MatrixOfRelations( ring_rel );[104X101[4X [104X102[4X if IsHomalgRingRelationsAsGeneratorsOfRightIdeal( ring_rel ) then[104X103[4X rel := Involution( rel );[104X104[4X fi;[104X105[4X [104X106[4X rel := DiagMat( ListWithIdenticalEntries( NrColumns( M ), rel ) );[104X107[4X [104X108[4X S := SyzygiesGeneratorsOfRows( Eval( M ), rel );[104X109[4X [104X110[4X S := HomalgResidueClassMatrix( S, R );[104X111[4X [104X112[4X S := GetRidOfObsoleteRows( S );[104X113[4X [104X114[4X if IsZero( S ) then[104X115[4X [104X116[4X SetIsLeftRegular( M, true );[104X117[4X [104X118[4X fi;[104X119[4X [104X120[4X return S;[104X121[4X [104X122[4X end,[104X123[4X[32X[104X124125[1XD.1-6 SyzygiesGeneratorsOfColumns[101X126127[29X[2XSyzygiesGeneratorsOfColumns[102X( [3XM[103X ) [32X function128[6XReturns:[106X [33X[0;10Ya [5Xhomalg[105X matrix over the ambient ring[133X129130[4X[32X Code [32X[104X131[4XSyzygiesGeneratorsOfColumns :=[104X132[4X function( M )[104X133[4X local R, ring_rel, rel, S;[104X134[4X [104X135[4X R := HomalgRing( M );[104X136[4X [104X137[4X ring_rel := RingRelations( R );[104X138[4X [104X139[4X rel := MatrixOfRelations( ring_rel );[104X140[4X [104X141[4X if IsHomalgRingRelationsAsGeneratorsOfLeftIdeal( ring_rel ) then[104X142[4X rel := Involution( rel );[104X143[4X fi;[104X144[4X [104X145[4X rel := DiagMat( ListWithIdenticalEntries( NrRows( M ), rel ) );[104X146[4X [104X147[4X S := SyzygiesGeneratorsOfColumns( Eval( M ), rel );[104X148[4X [104X149[4X S := HomalgResidueClassMatrix( S, R );[104X150[4X [104X151[4X S := GetRidOfObsoleteColumns( S );[104X152[4X [104X153[4X if IsZero( S ) then[104X154[4X [104X155[4X SetIsRightRegular( M, true );[104X156[4X [104X157[4X fi;[104X158[4X [104X159[4X return S;[104X160[4X [104X161[4X end,[104X162[4X[32X[104X163164[1XD.1-7 BasisOfRowsCoeff[101X165166[29X[2XBasisOfRowsCoeff[102X( [3XM[103X, [3XT[103X ) [32X function167[6XReturns:[106X [33X[0;10Ya [5Xhomalg[105X matrix over the ambient ring[133X168169[4X[32X Code [32X[104X170[4XBasisOfRowsCoeff :=[104X171[4X function( M, T )[104X172[4X local Mrel, TT, bas, nz;[104X173[4X [104X174[4X Mrel := UnionOfRows( M );[104X175[4X [104X176[4X TT := HomalgVoidMatrix( HomalgRing( Mrel ) );[104X177[4X [104X178[4X bas := BasisOfRowsCoeff( Mrel, TT );[104X179[4X [104X180[4X bas := HomalgResidueClassMatrix( bas, HomalgRing( M ) );[104X181[4X [104X182[4X nz := NonZeroRows( bas );[104X183[4X [104X184[4X SetEval( T, CertainRows( CertainColumns( TT, [ 1 .. NrRows( M ) ] ), nz ) );[104X185[4X [104X186[4X ResetFilterObj( T, IsVoidMatrix );[104X187[4X [104X188[4X ## the generic BasisOfRowsCoeff will assume that[104X189[4X ## ( NrRows( B ) = 0 ) = IsZero( B )[104X190[4X return CertainRows( bas, nz );[104X191[4X [104X192[4X end,[104X193[4X[32X[104X194195[1XD.1-8 BasisOfColumnsCoeff[101X196197[29X[2XBasisOfColumnsCoeff[102X( [3XM[103X, [3XT[103X ) [32X function198[6XReturns:[106X [33X[0;10Ya [5Xhomalg[105X matrix over the ambient ring[133X199200[4X[32X Code [32X[104X201[4XBasisOfColumnsCoeff :=[104X202[4X function( M, T )[104X203[4X local Mrel, TT, bas, nz;[104X204[4X [104X205[4X Mrel := UnionOfColumns( M );[104X206[4X [104X207[4X TT := HomalgVoidMatrix( HomalgRing( Mrel ) );[104X208[4X [104X209[4X bas := BasisOfColumnsCoeff( Mrel, TT );[104X210[4X [104X211[4X bas := HomalgResidueClassMatrix( bas, HomalgRing( M ) );[104X212[4X [104X213[4X nz := NonZeroColumns( bas );[104X214[4X [104X215[4X SetEval( T, CertainColumns( CertainRows( TT, [ 1 .. NrColumns( M ) ] ), nz ) );[104X216[4X [104X217[4X ResetFilterObj( T, IsVoidMatrix );[104X218[4X [104X219[4X ## the generic BasisOfColumnsCoeff will assume that[104X220[4X ## ( NrColumns( B ) = 0 ) = IsZero( B )[104X221[4X return CertainColumns( bas, nz );[104X222[4X [104X223[4X end,[104X224[4X[32X[104X225226[1XD.1-9 DecideZeroRowsEffectively[101X227228[29X[2XDecideZeroRowsEffectively[102X( [3XA[103X, [3XB[103X, [3XT[103X ) [32X function229[6XReturns:[106X [33X[0;10Ya [5Xhomalg[105X matrix over the ambient ring[133X230231[4X[32X Code [32X[104X232[4XDecideZeroRowsEffectively :=[104X233[4X function( A, B, T )[104X234[4X local Brel, TT, red;[104X235[4X [104X236[4X Brel := UnionOfRows( B );[104X237[4X [104X238[4X TT := HomalgVoidMatrix( HomalgRing( Brel ) );[104X239[4X [104X240[4X red := DecideZeroRowsEffectively( Eval( A ), Brel, TT );[104X241[4X [104X242[4X SetEval( T, CertainColumns( TT, [ 1 .. NrRows( B ) ] ) );[104X243[4X [104X244[4X ResetFilterObj( T, IsVoidMatrix );[104X245[4X [104X246[4X return HomalgResidueClassMatrix( red, HomalgRing( A ) );[104X247[4X [104X248[4X end,[104X249[4X[32X[104X250251[1XD.1-10 DecideZeroColumnsEffectively[101X252253[29X[2XDecideZeroColumnsEffectively[102X( [3XA[103X, [3XB[103X, [3XT[103X ) [32X function254[6XReturns:[106X [33X[0;10Ya [5Xhomalg[105X matrix over the ambient ring[133X255256[4X[32X Code [32X[104X257[4XDecideZeroColumnsEffectively :=[104X258[4X function( A, B, T )[104X259[4X local Brel, TT, red;[104X260[4X [104X261[4X Brel := UnionOfColumns( B );[104X262[4X [104X263[4X TT := HomalgVoidMatrix( HomalgRing( Brel ) );[104X264[4X [104X265[4X red := DecideZeroColumnsEffectively( Eval( A ), Brel, TT );[104X266[4X [104X267[4X SetEval( T, CertainRows( TT, [ 1 .. NrColumns( B ) ] ) );[104X268[4X [104X269[4X ResetFilterObj( T, IsVoidMatrix );[104X270[4X [104X271[4X return HomalgResidueClassMatrix( red, HomalgRing( A ) );[104X272[4X [104X273[4X end,[104X274[4X[32X[104X275276[1XD.1-11 RelativeSyzygiesGeneratorsOfRows[101X277278[29X[2XRelativeSyzygiesGeneratorsOfRows[102X( [3XM[103X, [3XM2[103X ) [32X function279[6XReturns:[106X [33X[0;10Ya [5Xhomalg[105X matrix over the ambient ring[133X280281[4X[32X Code [32X[104X282[4XRelativeSyzygiesGeneratorsOfRows :=[104X283[4X function( M, M2 )[104X284[4X local M2rel, S;[104X285[4X [104X286[4X M2rel := UnionOfRows( M2 );[104X287[4X [104X288[4X S := SyzygiesGeneratorsOfRows( Eval( M ), M2rel );[104X289[4X [104X290[4X S := HomalgResidueClassMatrix( S, HomalgRing( M ) );[104X291[4X [104X292[4X S := GetRidOfObsoleteRows( S );[104X293[4X [104X294[4X if IsZero( S ) then[104X295[4X [104X296[4X SetIsLeftRegular( M, true );[104X297[4X [104X298[4X fi;[104X299[4X [104X300[4X return S;[104X301[4X [104X302[4X end,[104X303[4X[32X[104X304305[1XD.1-12 RelativeSyzygiesGeneratorsOfColumns[101X306307[29X[2XRelativeSyzygiesGeneratorsOfColumns[102X( [3XM[103X, [3XM2[103X ) [32X function308[6XReturns:[106X [33X[0;10Ya [5Xhomalg[105X matrix over the ambient ring[133X309310[4X[32X Code [32X[104X311[4XRelativeSyzygiesGeneratorsOfColumns :=[104X312[4X function( M, M2 )[104X313[4X local M2rel, S;[104X314[4X [104X315[4X M2rel := UnionOfColumns( M2 );[104X316[4X [104X317[4X S := SyzygiesGeneratorsOfColumns( Eval( M ), M2rel );[104X318[4X [104X319[4X S := HomalgResidueClassMatrix( S, HomalgRing( M ) );[104X320[4X [104X321[4X S := GetRidOfObsoleteColumns( S );[104X322[4X [104X323[4X if IsZero( S ) then[104X324[4X [104X325[4X SetIsRightRegular( M, true );[104X326[4X [104X327[4X fi;[104X328[4X [104X329[4X return S;[104X330[4X [104X331[4X end,[104X332[4X[32X[104X333334335[1XD.2 [33X[0;0YThe Mandatory Tool Operations[133X[101X336337[33X[0;0YHere we list those matrix operations for which [5Xhomalg[105X provides no fallback338method.[133X339340[1XD.2-1 InitialMatrix[101X341342[29X[2XInitialMatrix[102X( ) [32X function343[6XReturns:[106X [33X[0;10Ya [5Xhomalg[105X matrix over the ambient ring[133X344345[33X[0;0Y(--> [2XInitialMatrix[102X ([14XB.1-1[114X))[133X346347[4X[32X Code [32X[104X348[4XInitialMatrix := C -> HomalgInitialMatrix([104X349[4X NrRows( C ), NrColumns( C ), AmbientRing( HomalgRing( C ) ) ),[104X350[4X[32X[104X351352[1XD.2-2 InitialIdentityMatrix[101X353354[29X[2XInitialIdentityMatrix[102X( ) [32X function355[6XReturns:[106X [33X[0;10Ya [5Xhomalg[105X matrix over the ambient ring[133X356357[33X[0;0Y(--> [2XInitialIdentityMatrix[102X ([14XB.1-2[114X))[133X358359[4X[32X Code [32X[104X360[4XInitialIdentityMatrix := C -> HomalgInitialIdentityMatrix([104X361[4X NrRows( C ), AmbientRing( HomalgRing( C ) ) ),[104X362[4X[32X[104X363364[1XD.2-3 ZeroMatrix[101X365366[29X[2XZeroMatrix[102X( ) [32X function367[6XReturns:[106X [33X[0;10Ya [5Xhomalg[105X matrix over the ambient ring[133X368369[33X[0;0Y(--> [2XZeroMatrix[102X ([14XB.1-3[114X))[133X370371[4X[32X Code [32X[104X372[4XZeroMatrix := C -> HomalgZeroMatrix([104X373[4X NrRows( C ), NrColumns( C ), AmbientRing( HomalgRing( C ) ) ),[104X374[4X[32X[104X375376[1XD.2-4 IdentityMatrix[101X377378[29X[2XIdentityMatrix[102X( ) [32X function379[6XReturns:[106X [33X[0;10Ya [5Xhomalg[105X matrix over the ambient ring[133X380381[33X[0;0Y(--> [2XIdentityMatrix[102X ([14XB.1-4[114X))[133X382383[4X[32X Code [32X[104X384[4XIdentityMatrix := C -> HomalgIdentityMatrix([104X385[4X NrRows( C ), AmbientRing( HomalgRing( C ) ) ),[104X386[4X[32X[104X387388[1XD.2-5 Involution[101X389390[29X[2XInvolution[102X( ) [32X function391[6XReturns:[106X [33X[0;10Ya [5Xhomalg[105X matrix over the ambient ring[133X392393[33X[0;0Y(--> [2XInvolution[102X ([14XB.1-5[114X))[133X394395[4X[32X Code [32X[104X396[4XInvolution :=[104X397[4X function( M )[104X398[4X local N, R;[104X399[4X [104X400[4X N := Involution( Eval( M ) );[104X401[4X [104X402[4X R := HomalgRing( N );[104X403[4X [104X404[4X if not ( HasIsCommutative( R ) and IsCommutative( R ) and[104X405[4X HasIsReducedModuloRingRelations( M ) and[104X406[4X IsReducedModuloRingRelations( M ) ) then[104X407[4X [104X408[4X ## reduce the matrix N w.r.t. the ring relations[104X409[4X N := DecideZero( N, HomalgRing( M ) );[104X410[4X fi;[104X411[4X [104X412[4X return N;[104X413[4X [104X414[4X end,[104X415[4X[32X[104X416417[1XD.2-6 CertainRows[101X418419[29X[2XCertainRows[102X( ) [32X function420[6XReturns:[106X [33X[0;10Ya [5Xhomalg[105X matrix over the ambient ring[133X421422[33X[0;0Y(--> [2XCertainRows[102X ([14XB.1-6[114X))[133X423424[4X[32X Code [32X[104X425[4XCertainRows :=[104X426[4X function( M, plist )[104X427[4X local N;[104X428[4X [104X429[4X N := CertainRows( Eval( M ), plist );[104X430[4X [104X431[4X if not ( HasIsReducedModuloRingRelations( M ) and[104X432[4X IsReducedModuloRingRelations( M ) ) then[104X433[4X [104X434[4X ## reduce the matrix N w.r.t. the ring relations[104X435[4X N := DecideZero( N, HomalgRing( M ) );[104X436[4X fi;[104X437[4X [104X438[4X return N;[104X439[4X [104X440[4X end,[104X441[4X[32X[104X442443[1XD.2-7 CertainColumns[101X444445[29X[2XCertainColumns[102X( ) [32X function446[6XReturns:[106X [33X[0;10Ya [5Xhomalg[105X matrix over the ambient ring[133X447448[33X[0;0Y(--> [2XCertainColumns[102X ([14XB.1-7[114X))[133X449450[4X[32X Code [32X[104X451[4XCertainColumns :=[104X452[4X function( M, plist )[104X453[4X local N;[104X454[4X [104X455[4X N := CertainColumns( Eval( M ), plist );[104X456[4X [104X457[4X if not ( HasIsReducedModuloRingRelations( M ) and[104X458[4X IsReducedModuloRingRelations( M ) ) then[104X459[4X [104X460[4X ## reduce the matrix N w.r.t. the ring relations[104X461[4X N := DecideZero( N, HomalgRing( M ) );[104X462[4X fi;[104X463[4X [104X464[4X return N;[104X465[4X [104X466[4X end,[104X467[4X[32X[104X468469[1XD.2-8 UnionOfRows[101X470471[29X[2XUnionOfRows[102X( ) [32X function472[6XReturns:[106X [33X[0;10Ya [5Xhomalg[105X matrix over the ambient ring[133X473474[33X[0;0Y(--> [2XUnionOfRows[102X ([14XB.1-8[114X))[133X475476[4X[32X Code [32X[104X477[4XUnionOfRows :=[104X478[4X function( A, B )[104X479[4X local N;[104X480[4X [104X481[4X N := UnionOfRows( Eval( A ), Eval( B ) );[104X482[4X [104X483[4X if not ForAll( [ A, B ], HasIsReducedModuloRingRelations and[104X484[4X IsReducedModuloRingRelations ) then[104X485[4X [104X486[4X ## reduce the matrix N w.r.t. the ring relations[104X487[4X N := DecideZero( N, HomalgRing( A ) );[104X488[4X fi;[104X489[4X [104X490[4X return N;[104X491[4X [104X492[4X end,[104X493[4X[32X[104X494495[1XD.2-9 UnionOfColumns[101X496497[29X[2XUnionOfColumns[102X( ) [32X function498[6XReturns:[106X [33X[0;10Ya [5Xhomalg[105X matrix over the ambient ring[133X499500[33X[0;0Y(--> [2XUnionOfColumns[102X ([14XB.1-9[114X))[133X501502[4X[32X Code [32X[104X503[4XUnionOfColumns :=[104X504[4X function( A, B )[104X505[4X local N;[104X506[4X [104X507[4X N := UnionOfColumns( Eval( A ), Eval( B ) );[104X508[4X [104X509[4X if not ForAll( [ A, B ], HasIsReducedModuloRingRelations and[104X510[4X IsReducedModuloRingRelations ) then[104X511[4X [104X512[4X ## reduce the matrix N w.r.t. the ring relations[104X513[4X N := DecideZero( N, HomalgRing( A ) );[104X514[4X fi;[104X515[4X [104X516[4X return N;[104X517[4X [104X518[4X end,[104X519[4X[32X[104X520521[1XD.2-10 DiagMat[101X522523[29X[2XDiagMat[102X( ) [32X function524[6XReturns:[106X [33X[0;10Ya [5Xhomalg[105X matrix over the ambient ring[133X525526[33X[0;0Y(--> [2XDiagMat[102X ([14XB.1-10[114X))[133X527528[4X[32X Code [32X[104X529[4XDiagMat :=[104X530[4X function( e )[104X531[4X local N;[104X532[4X [104X533[4X N := DiagMat( List( e, Eval ) );[104X534[4X [104X535[4X if not ForAll( e, HasIsReducedModuloRingRelations and[104X536[4X IsReducedModuloRingRelations ) then[104X537[4X [104X538[4X ## reduce the matrix N w.r.t. the ring relations[104X539[4X N := DecideZero( N, HomalgRing( e[1] ) );[104X540[4X fi;[104X541[4X [104X542[4X return N;[104X543[4X [104X544[4X end,[104X545[4X[32X[104X546547[1XD.2-11 KroneckerMat[101X548549[29X[2XKroneckerMat[102X( ) [32X function550[6XReturns:[106X [33X[0;10Ya [5Xhomalg[105X matrix over the ambient ring[133X551552[33X[0;0Y(--> [2XKroneckerMat[102X ([14XB.1-11[114X))[133X553554[4X[32X Code [32X[104X555[4XKroneckerMat :=[104X556[4X function( A, B )[104X557[4X local N;[104X558[4X [104X559[4X N := KroneckerMat( Eval( A ), Eval( B ) );[104X560[4X [104X561[4X if not ForAll( [ A, B ], HasIsReducedModuloRingRelations and[104X562[4X IsReducedModuloRingRelations ) then[104X563[4X [104X564[4X ## reduce the matrix N w.r.t. the ring relations[104X565[4X N := DecideZero( N, HomalgRing( A ) );[104X566[4X fi;[104X567[4X [104X568[4X return N;[104X569[4X [104X570[4X end,[104X571[4X[32X[104X572573[1XD.2-12 MulMat[101X574575[29X[2XMulMat[102X( ) [32X function576[6XReturns:[106X [33X[0;10Ya [5Xhomalg[105X matrix over the ambient ring[133X577578[33X[0;0Y(--> [2XMulMat[102X ([14XB.1-12[114X))[133X579580[4X[32X Code [32X[104X581[4XMulMat :=[104X582[4X function( a, A )[104X583[4X [104X584[4X return DecideZero( EvalRingElement( a ) * Eval( A ), HomalgRing( A ) );[104X585[4X [104X586[4X end,[104X587[4XMulMatRight :=[104X588[4X function( A, a )[104X589[4X [104X590[4X return DecideZero( Eval( A ) * EvalRingElement( a ), HomalgRing( A ) );[104X591[4X [104X592[4X end,[104X593[4X[32X[104X594595[1XD.2-13 AddMat[101X596597[29X[2XAddMat[102X( ) [32X function598[6XReturns:[106X [33X[0;10Ya [5Xhomalg[105X matrix over the ambient ring[133X599600[33X[0;0Y(--> [2XAddMat[102X ([14XB.1-13[114X))[133X601602[4X[32X Code [32X[104X603[4XAddMat :=[104X604[4X function( A, B )[104X605[4X [104X606[4X return DecideZero( Eval( A ) + Eval( B ), HomalgRing( A ) );[104X607[4X [104X608[4X end,[104X609[4X[32X[104X610611[1XD.2-14 SubMat[101X612613[29X[2XSubMat[102X( ) [32X function614[6XReturns:[106X [33X[0;10Ya [5Xhomalg[105X matrix over the ambient ring[133X615616[33X[0;0Y(--> [2XSubMat[102X ([14XB.1-14[114X))[133X617618[4X[32X Code [32X[104X619[4XSubMat :=[104X620[4X function( A, B )[104X621[4X [104X622[4X return DecideZero( Eval( A ) - Eval( B ), HomalgRing( A ) );[104X623[4X [104X624[4X end,[104X625[4X[32X[104X626627[1XD.2-15 Compose[101X628629[29X[2XCompose[102X( ) [32X function630[6XReturns:[106X [33X[0;10Ya [5Xhomalg[105X matrix over the ambient ring[133X631632[33X[0;0Y(--> [2XCompose[102X ([14XB.1-15[114X))[133X633634[4X[32X Code [32X[104X635[4XCompose :=[104X636[4X function( A, B )[104X637[4X [104X638[4X return DecideZero( Eval( A ) * Eval( B ), HomalgRing( A ) );[104X639[4X [104X640[4X end,[104X641[4X[32X[104X642643[1XD.2-16 IsZeroMatrix[101X644645[29X[2XIsZeroMatrix[102X( [3XM[103X ) [32X function646[6XReturns:[106X [33X[0;10Y[10Xtrue[110X or [10Xfalse[110X[133X647648[33X[0;0Y(--> [2XIsZeroMatrix[102X ([14XB.1-16[114X))[133X649650[4X[32X Code [32X[104X651[4XIsZeroMatrix := M -> IsZero( DecideZero( Eval( M ), HomalgRing( M ) ) ),[104X652[4X[32X[104X653654[1XD.2-17 NrRows[101X655656[29X[2XNrRows[102X( [3XC[103X ) [32X function657[6XReturns:[106X [33X[0;10Ya nonnegative integer[133X658659[33X[0;0Y(--> [2XNrRows[102X ([14XB.1-17[114X))[133X660661[4X[32X Code [32X[104X662[4XNrRows := C -> NrRows( Eval( C ) ),[104X663[4X[32X[104X664665[1XD.2-18 NrColumns[101X666667[29X[2XNrColumns[102X( [3XC[103X ) [32X function668[6XReturns:[106X [33X[0;10Ya nonnegative integer[133X669670[33X[0;0Y(--> [2XNrColumns[102X ([14XB.1-18[114X))[133X671672[4X[32X Code [32X[104X673[4XNrColumns := C -> NrColumns( Eval( C ) ),[104X674[4X[32X[104X675676[1XD.2-19 Determinant[101X677678[29X[2XDeterminant[102X( [3XC[103X ) [32X function679[6XReturns:[106X [33X[0;10Yan element of ambient [5Xhomalg[105X ring[133X680681[33X[0;0Y(--> [2XDeterminant[102X ([14XB.1-19[114X))[133X682683[4X[32X Code [32X[104X684[4XDeterminant := C -> DecideZero( Determinant( Eval( C ) ), HomalgRing( C ) ),[104X685[4X[32X[104X686687688[1XD.3 [33X[0;0YSome of the Recommended Tool Operations[133X[101X689690[33X[0;0YHere we list those matrix operations for which [5Xhomalg[105X does provide a691fallback method. But specifying the below [10XhomalgTable[110X functions increases692the performance by replacing the fallback method.[133X693694[1XD.3-1 AreEqualMatrices[101X695696[29X[2XAreEqualMatrices[102X( [3XA[103X, [3XB[103X ) [32X function697[6XReturns:[106X [33X[0;10Y[10Xtrue[110X or [10Xfalse[110X[133X698699[33X[0;0Y(--> [2XAreEqualMatrices[102X ([14XB.2-1[114X))[133X700701[4X[32X Code [32X[104X702[4XAreEqualMatrices :=[104X703[4X function( A, B )[104X704[4X [104X705[4X return IsZero( DecideZero( Eval( A ) - Eval( B ), HomalgRing( A ) ) );[104X706[4X [104X707[4X end,[104X708[4X[32X[104X709710[1XD.3-2 IsOne[101X711712[29X[2XIsOne[102X( [3XM[103X ) [32X function713[6XReturns:[106X [33X[0;10Y[10Xtrue[110X or [10Xfalse[110X[133X714715[33X[0;0Y(--> [2XIsIdentityMatrix[102X ([14XB.2-2[114X))[133X716717[4X[32X Code [32X[104X718[4XIsIdentityMatrix := M ->[104X719[4X IsOne( DecideZero( Eval( M ), HomalgRing( M ) ) ),[104X720[4X[32X[104X721722[1XD.3-3 IsDiagonalMatrix[101X723724[29X[2XIsDiagonalMatrix[102X( [3XM[103X ) [32X function725[6XReturns:[106X [33X[0;10Y[10Xtrue[110X or [10Xfalse[110X[133X726727[33X[0;0Y(--> [2XIsDiagonalMatrix[102X ([14XB.2-3[114X))[133X728729[4X[32X Code [32X[104X730[4XIsDiagonalMatrix := M ->[104X731[4X IsDiagonalMatrix( DecideZero( Eval( M ), HomalgRing( M ) ) ),[104X732[4X[32X[104X733734[1XD.3-4 ZeroRows[101X735736[29X[2XZeroRows[102X( [3XC[103X ) [32X function737[6XReturns:[106X [33X[0;10Ya [5Xhomalg[105X matrix over the ambient ring[133X738739[33X[0;0Y(--> [2XZeroRows[102X ([14XB.2-4[114X))[133X740741[4X[32X Code [32X[104X742[4XZeroRows := C -> ZeroRows( DecideZero( Eval( C ), HomalgRing( C ) ) ),[104X743[4X[32X[104X744745[1XD.3-5 ZeroColumns[101X746747[29X[2XZeroColumns[102X( [3XC[103X ) [32X function748[6XReturns:[106X [33X[0;10Ya [5Xhomalg[105X matrix over the ambient ring[133X749750[33X[0;0Y(--> [2XZeroColumns[102X ([14XB.2-5[114X))[133X751752[4X[32X Code [32X[104X753[4XZeroColumns := C -> ZeroColumns( DecideZero( Eval( C ), HomalgRing( C ) ) ),[104X754[4X[32X[104X755756757758