> IsHomalgMatrix ( A ) | ( category ) |
Returns: true
or false
The GAP category of homalg matrices.
if CompareVersionNumbers( "4.4.99", VERSION ) then ## GAP 4.4 style: DeclareCategory( "IsHomalgMatrix", IsAdditiveElementWithInverse and IsMultiplicativeElementWithInverse and IsAttributeStoringRep ); else ## GAP 4.5 style: Max's matrix category DeclareCategory( "IsHomalgMatrix", IsMatrixObj and IsAttributeStoringRep ); fi; |
> IsHomalgInternalMatrixRep ( A ) | ( representation ) |
Returns: true
or false
The internal representation of homalg matrices.
(It is a representation of the GAP category IsHomalgMatrix
(5.1-1).)
> HomalgInitialMatrix ( m, n, R ) | ( function ) |
Returns: a homalg matrix
A mutable unevaluated initial m x n homalg matrix filled with zeros over the homalg ring R. This construction is useful in case one wants to define a matrix by assigning its nonzero entries. Avoid asking about properties or attributes of the matrix until you finish filling it, since already computed values of properties and attributes will be cached and not recomputed unless the values are explicitly reset (--> ResetFilterObj
(Prg Tutorial 3.4)).
gap> ZZ := HomalgRingOfIntegers( ); <A homalg internal ring> gap> z := HomalgInitialMatrix( 2, 3, ZZ ); <An initial homalg internal 2 by 3 matrix> gap> HasIsZero( z ); false gap> IsZero( z ); true gap> z; <A homalg internal 2 by 3 zero matrix> |
gap> n := HomalgInitialMatrix( 2, 3, ZZ ); <An initial homalg internal 2 by 3 matrix> gap> SetEntryOfHomalgMatrix( n, 1, 1, "1" ); gap> SetEntryOfHomalgMatrix( n, 2, 3, "1" ); gap> ResetFilterObj( n, IsMutableMatrix ); gap> Display( n ); [ [ 1, 0, 0 ], [ 0, 0, 1 ] ] gap> IsZero( n ); false gap> n; <A non-zero homalg internal 2 by 3 matrix> |
> HomalgInitialIdentityMatrix ( m, R ) | ( function ) |
Returns: a homalg matrix
A mutable unevaluated initial m x m homalg quadratic matrix with ones on the diagonal over the homalg ring R. This construction is useful in case one wants to define an elementary matrix by assigning its off-diagonal nonzero entries. Avoid asking about properties or attributes of the matrix until you finish filling it, since already computed values of properties and attributes will be cached and not recomputed unless the values are explicitly reset (--> ResetFilterObj
(Prg Tutorial 3.4)).
gap> ZZ := HomalgRingOfIntegers( ); <A homalg internal ring> gap> id := HomalgInitialIdentityMatrix( 3, ZZ ); <An initial identity homalg internal 3 by 3 matrix> gap> HasIsOne( id ); false gap> IsOne( id ); true gap> id; <A homalg internal 3 by 3 identity matrix> |
gap> e := HomalgInitialIdentityMatrix( 3, ZZ ); <An initial identity homalg internal 3 by 3 matrix> gap> SetEntryOfHomalgMatrix( e, 1, 2, "1" ); gap> SetEntryOfHomalgMatrix( e, 2, 1, "-1" ); gap> ResetFilterObj( e, IsMutableMatrix ); gap> Display( e ); [ [ 1, 1, 0 ], [ -1, 1, 0 ], [ 0, 0, 1 ] ] gap> IsOne( e ); false gap> e; <A homalg internal 3 by 3 matrix> |
> HomalgZeroMatrix ( m, n, R ) | ( function ) |
Returns: a homalg matrix
An immutable unevaluated m x n homalg zero matrix over the homalg ring R.
gap> ZZ := HomalgRingOfIntegers( ); <A homalg internal ring> gap> z := HomalgZeroMatrix( 2, 3, ZZ ); <An unevaluated homalg internal 2 by 3 zero matrix> gap> Display( z ); [ [ 0, 0, 0 ], [ 0, 0, 0 ] ] gap> z; <A homalg internal 2 by 3 zero matrix> |
> HomalgIdentityMatrix ( m, R ) | ( function ) |
Returns: a homalg matrix
An immutable unevaluated m x m homalg identity matrix over the homalg ring R.
gap> ZZ := HomalgRingOfIntegers( ); <A homalg internal ring> gap> id := HomalgIdentityMatrix( 3, ZZ ); <An unevaluated homalg internal 3 by 3 identity matrix> gap> Display( id ); [ [ 1, 0, 0 ], [ 0, 1, 0 ], [ 0, 0, 1 ] ] gap> id; <A homalg internal 3 by 3 identity matrix> |
> HomalgVoidMatrix ( [m, ][n, ]R ) | ( function ) |
Returns: a homalg matrix
A void m x n homalg matrix.
> HomalgMatrix ( llist, R ) | ( function ) |
> HomalgMatrix ( list, m, n, R ) | ( function ) |
> HomalgMatrix ( str_llist, R ) | ( function ) |
> HomalgMatrix ( str_list, m, n, R ) | ( function ) |
Returns: a homalg matrix
An immutable evaluated m x n homalg matrix over the homalg ring R.
gap> ZZ := HomalgRingOfIntegers( ); <A homalg internal ring> gap> m := HomalgMatrix( [ [ 1, 2, 3 ], [ 4, 5, 6 ] ], ZZ ); <A homalg internal 2 by 3 matrix> gap> Display( m ); [ [ 1, 2, 3 ], [ 4, 5, 6 ] ] |
gap> m := HomalgMatrix( [ [ 1, 2, 3 ], [ 4, 5, 6 ] ], 2, 3, ZZ ); <A homalg internal 2 by 3 matrix> gap> Display( m ); [ [ 1, 2, 3 ], [ 4, 5, 6 ] ] |
gap> m := HomalgMatrix( [ 1, 2, 3, 4, 5, 6 ], 2, 3, ZZ ); <A homalg internal 2 by 3 matrix> gap> Display( m ); [ [ 1, 2, 3 ], [ 4, 5, 6 ] ] |
gap> m := HomalgMatrix( "[ [ 1, 2, 3 ], [ 4, 5, 6 ] ]", ZZ ); <A homalg internal 2 by 3 matrix> gap> Display( m ); [ [ 1, 2, 3 ], [ 4, 5, 6 ] ] |
gap> m := HomalgMatrix( "[ [ 1, 2, 3 ], [ 4, 5, 6 ] ]", 2, 3, ZZ ); <A homalg internal 2 by 3 matrix> gap> Display( m ); [ [ 1, 2, 3 ], [ 4, 5, 6 ] ] |
It is nevertheless recommended to use the following form to create homalg matrices. This form can also be used to define external matrices. Since whitespaces (--> Reference: Whitespaces) are ignored, they can be used as optical delimiters:
gap> m := HomalgMatrix( "[ 1, 2, 3, 4, 5, 6 ]", 2, 3, ZZ ); <A homalg internal 2 by 3 matrix> gap> Display( m ); [ [ 1, 2, 3 ], [ 4, 5, 6 ] ] |
One can split the input string over several lines using the backslash character '\' to end each line
gap> m := HomalgMatrix( "[ \ > 1, 2, 3, \ > 4, 5, 6 \ > ]", 2, 3, ZZ ); <A homalg internal 2 by 3 matrix> gap> Display( m ); [ [ 1, 2, 3 ], [ 4, 5, 6 ] ] |
> HomalgDiagonalMatrix ( diag, R ) | ( function ) |
Returns: a homalg matrix
An immutable unevaluated diagonal homalg matrix over the homalg ring R. The diagonal consists of the entries of the list diag.
gap> ZZ := HomalgRingOfIntegers( ); <A homalg internal ring> gap> d := HomalgDiagonalMatrix( [ 1, 2, 3 ], ZZ ); <An unevaluated diagonal homalg internal 3 by 3 matrix> gap> Display( d ); [ [ 1, 0, 0 ], [ 0, 2, 0 ], [ 0, 0, 3 ] ] gap> d; <A diagonal homalg internal 3 by 3 matrix> |
> \* ( R, mat ) | ( operation ) |
> \* ( mat, R ) | ( operation ) |
Returns: a homalg matrix
An immutable evaluated homalg matrix over the homalg ring R having the same entries as the matrix mat. Syntax: R *
mat or mat *
R
gap> ZZ := HomalgRingOfIntegers( ); <A homalg internal ring> gap> Z4 := ZZ / 4; <A homalg residue class ring> gap> Display( Z4 ); Z/( 4 ) gap> d := HomalgDiagonalMatrix( [ 2 .. 4 ], ZZ ); <An unevaluated diagonal homalg internal 3 by 3 matrix> gap> d2 := Z4 * d; ## or d2 := d * Z4; <A homalg residue class 3 by 3 matrix> gap> Display( d2 ); [ [ 2, 0, 0 ], [ 0, 3, 0 ], [ 0, 0, 4 ] ] modulo [ 4 ] gap> d; <A diagonal homalg internal 3 by 3 matrix> gap> ZeroRows( d ); [ ] gap> ZeroRows( d2 ); [ 3 ] gap> d; <A non-zero diagonal homalg internal 3 by 3 matrix> gap> d2; <A non-zero homalg residue class 3 by 3 matrix> |
> IsZero ( A ) | ( property ) |
Returns: true
or false
Check if the homalg matrix A is a zero matrix, taking possible ring relations into account.
(for the installed standard method see IsZeroMatrix
(B.1-16))
gap> ZZ := HomalgRingOfIntegers( ); <A homalg internal ring> gap> A := HomalgMatrix( "[ 2 ]", ZZ ); <A homalg internal 1 by 1 matrix> gap> Z2 := ZZ / 2; <A homalg residue class ring> gap> A := Z2 * A; <A homalg residue class 1 by 1 matrix> gap> Display( A ); [ [ 2 ] ] modulo [ 2 ] gap> IsZero( A ); true |
> IsOne ( A ) | ( property ) |
Returns: true
or false
Check if the homalg matrix A is an identity matrix, taking possible ring relations into account.
(for the installed standard method see IsIdentityMatrix
(B.2-2))
> IsPermutationMatrix ( A ) | ( property ) |
Returns: true
or false
A is a homalg matrix.
> IsSpecialSubidentityMatrix ( A ) | ( property ) |
Returns: true
or false
A is a homalg matrix.
> IsSubidentityMatrix ( A ) | ( property ) |
Returns: true
or false
A is a homalg matrix.
> IsLeftRegularMatrix ( A ) | ( property ) |
Returns: true
or false
A is a homalg matrix.
> IsRightRegularMatrix ( A ) | ( property ) |
Returns: true
or false
A is a homalg matrix.
> IsInvertibleMatrix ( A ) | ( property ) |
Returns: true
or false
A is a homalg matrix.
> IsLeftInvertibleMatrix ( A ) | ( property ) |
Returns: true
or false
A is a homalg matrix.
> IsRightInvertibleMatrix ( A ) | ( property ) |
Returns: true
or false
A is a homalg matrix.
> IsEmptyMatrix ( A ) | ( property ) |
Returns: true
or false
A is a homalg matrix.
> IsDiagonalMatrix ( A ) | ( property ) |
Returns: true
or false
Check if the homalg matrix A is an identity matrix, taking possible ring relations into account.
(for the installed standard method see IsDiagonalMatrix
(B.2-3))
> IsScalarlMatrix ( A ) | ( property ) |
Returns: true
or false
A is a homalg matrix.
> IsUpperTriangularMatrix ( A ) | ( property ) |
Returns: true
or false
A is a homalg matrix.
> IsLowerTriangularMatrix ( A ) | ( property ) |
Returns: true
or false
A is a homalg matrix.
> IsStrictUpperTriangularMatrix ( A ) | ( property ) |
Returns: true
or false
A is a homalg matrix.
> IsStrictLowerTriangularMatrix ( A ) | ( property ) |
Returns: true
or false
A is a homalg matrix.
> IsUpperStairCaseMatrix ( A ) | ( property ) |
Returns: true
or false
A is a homalg matrix.
> IsLowerStairCaseMatrix ( A ) | ( property ) |
Returns: true
or false
A is a homalg matrix.
> IsTriangularMatrix ( A ) | ( property ) |
Returns: true
or false
A is a homalg matrix.
> IsBasisOfRowsMatrix ( A ) | ( property ) |
Returns: true
or false
A is a homalg matrix.
> IsBasisOfColumnsMatrix ( A ) | ( property ) |
Returns: true
or false
A is a homalg matrix.
> IsReducedBasisOfRowsMatrix ( A ) | ( property ) |
Returns: true
or false
A is a homalg matrix.
> IsReducedBasisOfColumnsMatrix ( A ) | ( property ) |
Returns: true
or false
A is a homalg matrix.
> IsMutableMatrix ( A ) | ( filter ) |
Returns: true
or false
A is a homalg matrix.
> IsInitialMatrix ( A ) | ( property ) |
Returns: true
or false
A is a homalg matrix.
> IsInitialIdentityMatrix ( A ) | ( property ) |
Returns: true
or false
A is a homalg matrix.
> IsVoidMatrix ( A ) | ( property ) |
Returns: true
or false
A is a homalg matrix.
> NrRows ( A ) | ( attribute ) |
Returns: a nonnegative integer
The number of rows of the matrix A.
(for the installed standard method see NrRows
(B.1-17))
> NrColumns ( A ) | ( attribute ) |
Returns: a nonnegative integer
The number of columns of the matrix A.
(for the installed standard method see NrColumns
(B.1-18))
> DeterminantMat ( A ) | ( attribute ) |
Returns: a ring element
The determinant of the quadratic matrix A.
You can invoke it with Determinant
( A ).
(for the installed standard method see Determinant
(B.1-19))
> ZeroRows ( A ) | ( attribute ) |
Returns: a (possibly empty) list of positive integers
The list of zero rows of the matrix A.
(for the installed standard method see ZeroRows
(B.2-4))
> ZeroColumns ( A ) | ( attribute ) |
Returns: a (possibly empty) list of positive integers
The list of zero columns of the matrix A.
(for the installed standard method see ZeroColumns
(B.2-5))
> NonZeroRows ( A ) | ( attribute ) |
Returns: a (possibly empty) list of positive integers
The list of nonzero rows of the matrix A.
> NonZeroColumns ( A ) | ( attribute ) |
Returns: a (possibly empty) list of positive integers
The list of nonzero columns of the matrix A.
> PositionOfFirstNonZeroEntryPerRow ( A ) | ( attribute ) |
Returns: a list of nonnegative integers
The list of positions of the first nonzero entry per row of the matrix A, else zero.
> PositionOfFirstNonZeroEntryPerColumn ( A ) | ( attribute ) |
Returns: a list of nonnegative integers
The list of positions of the first nonzero entry per column of the matrix A, else zero.
> DegreesOfEntries ( A ) | ( attribute ) |
Returns: a listlist of degrees/multi-degrees
The matrix of degrees of the matrix A.
(for the installed standard method see DegreesOfEntries
(B.2-9))
> RowRankOfMatrix ( A ) | ( attribute ) |
Returns: a nonnegative integer
The row rank of the matrix A.
> ColumnRankOfMatrix ( A ) | ( attribute ) |
Returns: a nonnegative integer
The column rank of the matrix A.
> LeftInverse ( M ) | ( method ) |
Returns: a homalg matrix
A (lazy evaluated) left inverse C of the matrix M. If no left inverse exists then Eval
( C ) = false
. (--> RightDivide
(5.5-40))
(for the installed standard method see Eval
(C.4-16))
> RightInverse ( M ) | ( attribute ) |
Returns: a homalg matrix
A (lazy evaluated) right inverse C of the matrix M. If no right inverse exists then Eval
( C ) = false
. (--> LeftDivide
(5.5-41))
(for the installed standard method see Eval
(C.4-17))
> HomalgRing ( mat ) | ( operation ) |
Returns: a homalg ring
The homalg ring of the homalg matrix mat.
gap> ZZ := HomalgRingOfIntegers( ); <A homalg internal ring> gap> d := HomalgDiagonalMatrix( [ 2 .. 4 ], ZZ ); <An unevaluated diagonal homalg internal 3 by 3 matrix> gap> R := HomalgRing( d ); <A homalg internal ring> gap> IsIdenticalObj( R, ZZ ); true |
> Involution ( M ) | ( method ) |
Returns: a homalg matrix
The twisted transpose of the homalg matrix M.
(for the installed standard method see Eval
(C.4-5))
> CertainRows ( M, plist ) | ( method ) |
Returns: a homalg matrix
The matrix of which the i-th row is the k-th row of the homalg matrix M, where k=plist[i].
(--> Eval
(C.4-6))
> CertainColumns ( M, plist ) | ( method ) |
Returns: a homalg matrix
The matrix of which the j-th column is the l-th column of the homalg matrix M, where l=plist[i].
(for the installed standard method see Eval
(C.4-7))
> UnionOfRows ( A, B ) | ( method ) |
Returns: a homalg matrix
Stack the two homalg matrices A and B.
(for the installed standard method see Eval
(C.4-8))
> UnionOfColumns ( A, B ) | ( method ) |
Returns: a homalg matrix
Augment the two homalg matrices A and B.
(for the installed standard method see Eval
(C.4-9))
> DiagMat ( list ) | ( method ) |
Returns: a homalg matrix
Build the block diagonal matrix out of the homalg matrices listed in list. An error is issued if list is empty or if one of the arguments is not a homalg matrix.
(for the installed standard method see Eval
(C.4-10))
> KroneckerMat ( A, B ) | ( method ) |
Returns: a homalg matrix
The Kronecker (or tensor) product of the two homalg matrices A and B.
(for the installed standard method see Eval
(C.4-11))
> \* ( a, A ) | ( method ) |
Returns: a homalg matrix
The product of the ring element a with the homalg matrix A (enter: a *
A;).
(for the installed standard method see Eval
(C.4-12))
> \+ ( A, B ) | ( method ) |
Returns: a homalg matrix
The sum of the two homalg matrices A and B (enter: A +
B;).
(for the installed standard method see Eval
(C.4-13))
> \- ( A, B ) | ( method ) |
Returns: a homalg matrix
The difference of the two homalg matrices A and B (enter: A -
B;).
(for the installed standard method see Eval
(C.4-14))
> \* ( A, B ) | ( method ) |
Returns: a homalg matrix
The matrix product of the two homalg matrices A and B (enter: A *
B;).
(for the installed standard method see Eval
(C.4-15))
> \= ( A, B ) | ( operation ) |
Returns: true
or false
Check if the homalg matrices A and B are equal (enter: A =
B;), taking possible ring relations into account.
(for the installed standard method see AreEqualMatrices
(B.2-1))
gap> ZZ := HomalgRingOfIntegers( ); <A homalg internal ring> gap> A := HomalgMatrix( "[ 1 ]", ZZ ); <A homalg internal 1 by 1 matrix> gap> B := HomalgMatrix( "[ 3 ]", ZZ ); <A homalg internal 1 by 1 matrix> gap> Z2 := ZZ / 2; <A homalg residue class ring> gap> A := Z2 * A; <A homalg residue class 1 by 1 matrix> gap> B := Z2 * B; <A homalg residue class 1 by 1 matrix> gap> Display( A ); [ [ 1 ] ] modulo [ 2 ] gap> Display( B ); [ [ 3 ] ] modulo [ 2 ] gap> A = B; true |
> GetColumnIndependentUnitPositions ( A, poslist ) | ( operation ) |
Returns: a (possibly empty) list of pairs of positive integers
The list of column independet unit position of the matrix A. We say that a unit A[i,k] is column independet from the unit A[l,j] if i>l and A[l,k]=0. The rows are scanned from top to bottom and within each row the columns are scanned from right to left searching for new units, column independent from the preceding ones. If A[i,k] is a new column independent unit then [i,k] is added to the output list. If A has no units the empty list is returned.
(for the installed standard method see GetColumnIndependentUnitPositions
(B.2-6))
> GetRowIndependentUnitPositions ( A, poslist ) | ( operation ) |
Returns: a (possibly empty) list of pairs of positive integers
The list of row independet unit position of the matrix A. We say that a unit A[k,j] is row independet from the unit A[i,l] if j>l and A[k,l]=0. The columns are scanned from left to right and within each column the rows are scanned from bottom to top searching for new units, row independent from the preceding ones. If A[k,j] is a new row independent unit then [j,k] (yes [j,k]) is added to the output list. If A has no units the empty list is returned.
(for the installed standard method see GetRowIndependentUnitPositions
(B.2-7))
> GetUnitPosition ( A, poslist ) | ( operation ) |
Returns: a (possibly empty) list of pairs of positive integers
The position [i,j] of the first unit A[i,j] in the matrix A, where the rows are scanned from top to bottom and within each row the columns are scanned from left to right. If A[i,j] is the first occurrence of a unit then the position pair [i,j] is returned. Otherwise fail
is returned.
(for the installed standard method see GetUnitPosition
(B.2-8))
> BasisOfRowModule ( M ) | ( operation ) |
Returns: a homalg matrix
Let R be the ring over which M is defined (R:=HomalgRing
( M )) and S be the row span of M, i.e. the R-submodule of the free module R^(1 x NrColumns( M )) spanned by the rows of M. A solution to the "submodule membership problem" is an algorithm which can decide if an element m in R^(1 x NrColumns( M )) is contained in S or not. And exactly like the Gaussian (resp. Hermite) normal form when R is a field (resp. principal ideal ring), the row span of the resulting matrix B coincides with the row span S of M, and computing B is typically the first step of such an algorithm. (--> Appendix A)
> BasisOfColumnModule ( M ) | ( operation ) |
Returns: a homalg matrix
Let R be the ring over which M is defined (R:=HomalgRing
( M )) and S be the column span of M, i.e. the R-submodule of the free module R^(NrRows( M ) x 1) spanned by the columns of M. A solution to the "submodule membership problem" is an algorithm which can decide if an element m in R^(NrRows( M ) x 1) is contained in S or not. And exactly like the Gaussian (resp. Hermite) normal form when R is a field (resp. principal ideal ring), the column span of the resulting matrix B coincides with the column span S of M, and computing B is typically the first step of such an algorithm. (--> Appendix A)
> DecideZeroRows ( A, B ) | ( operation ) |
Returns: a homalg matrix
Let A and B be matrices having the same number of columns and defined over the same ring R (:=HomalgRing
( A )) and S be the row span of B, i.e. the R-submodule of the free module R^(1 x NrColumns( B )) spanned by the rows of B. The result is a matrix C having the same shape as A, for which the i-th row C^i is equivalent to the i-th row A^i of A modulo S, i.e. C^i-A^i is an element of the row span S of B. Moreover, the row C^i is zero, if and only if the row A^i is an element of S. So DecideZeroRows
decides which rows of A are zero modulo the rows of B. (--> Appendix A)
> DecideZeroColumns ( A, B ) | ( operation ) |
Returns: a homalg matrix
Let A and B be matrices having the same number of rows and defined over the same ring R (:=HomalgRing
( A )) and S be the column span of B, i.e. the R-submodule of the free module R^(NrRows( B ) x 1) spanned by the columns of B. The result is a matrix C having the same shape as A, for which the i-th column C_i is equivalent to the i-th column A_i of A modulo S, i.e. C_i-A_i is an element of the column span S of B. Moreover, the column C_i is zero, if and only if the column A_i is an element of S. So DecideZeroColumns
decides which columns of A are zero modulo the columns of B. (--> Appendix A)
> SyzygiesGeneratorsOfRows ( M ) | ( operation ) |
Returns: a homalg matrix
Let R be the ring over which M is defined (R:=HomalgRing
( M )). The matrix of row syzygies SyzygiesGeneratorsOfRows
( M ) is a matrix whose rows span the left kernel of M, i.e. the R-submodule of the free module R^(1 x NrRows( M )) consisting of all rows X satisfying XM=0. (--> Appendix A)
> SyzygiesGeneratorsOfColumns ( M ) | ( operation ) |
Returns: a homalg matrix
Let R be the ring over which M is defined (R:=HomalgRing
( M )). The matrix of column syzygies SyzygiesGeneratorsOfColumns
( M ) is a matrix whose columns span the right kernel of M, i.e. the R-submodule of the free module R^(NrColumns( M ) x 1) consisting of all columns X satisfying MX=0. (--> Appendix A)
> SyzygiesGeneratorsOfRows ( M, M2 ) | ( operation ) |
Returns: a homalg matrix
Let R be the ring over which M is defined (R:=HomalgRing
( M )). The matrix of relative row syzygies SyzygiesGeneratorsOfRows
( M, M2 ) is a matrix whose rows span the left kernel of M modulo M2, i.e. the R-submodule of the free module R^(1 x NrRows( M )) consisting of all rows X satisfying XM+YM2=0 for some row Y in R^(1 x NrRows( M2 )). (--> Appendix A)
> SyzygiesGeneratorsOfColumns ( M, M2 ) | ( operation ) |
Returns: a homalg matrix
Let R be the ring over which M is defined (R:=HomalgRing
( M )). The matrix of relative column syzygies SyzygiesGeneratorsOfColumns
( M, M2 ) is a matrix whose columns span the right kernel of M modulo M2, i.e. the R-submodule of the free module R^(NrColumns( M ) x 1) consisting of all columns X satisfying MX+M2Y=0 for some column Y in R^(NrColumns( M2 ) x 1). (--> Appendix A)
> ReducedBasisOfRowModule ( M ) | ( operation ) |
Returns: a homalg matrix
Like BasisOfRowModule
( M ) but where the matrix SyzygiesGeneratorsOfRows
( ReducedBasisOfRowModule
( M ) ) contains no units. This can easily be achieved starting from B:=BasisOfRowModule
( M ) (and using GetColumnIndependentUnitPositions
(5.5-14) applied to the matrix of row syzygies of B, etc). (--> Appendix A)
> ReducedBasisOfColumnModule ( M ) | ( operation ) |
Returns: a homalg matrix
Like BasisOfColumnModule
( M ) but where the matrix SyzygiesGeneratorsOfColumns
( ReducedBasisOfColumnModule
( M ) ) contains no units. This can easily be achieved starting from B:=BasisOfColumnModule
( M ) (and using GetRowIndependentUnitPositions
(5.5-15) applied to the matrix of column syzygies of B, etc.). (--> Appendix A)
> ReducedSyzygiesGeneratorsOfRows ( M ) | ( operation ) |
Returns: a homalg matrix
Like SyzygiesGeneratorsOfRows
( M ) but where the matrix SyzygiesGeneratorsOfRows
( ReducedSyzygiesGeneratorsOfRows
( M ) ) contains no units. This can easily be achieved starting from C:=SyzygiesGeneratorsOfRows
( M ) (and using GetColumnIndependentUnitPositions
(5.5-14) applied to the matrix of row syzygies of C, etc.). (--> Appendix A)
> ReducedSyzygiesGeneratorsOfColumns ( M ) | ( operation ) |
Returns: a homalg matrix
Like SyzygiesGeneratorsOfColumns
( M ) but where the matrix SyzygiesGeneratorsOfColumns
( ReducedSyzygiesGeneratorsOfColumns
( M ) ) contains no units. This can easily be achieved starting from C:=SyzygiesGeneratorsOfColumns
( M ) (and using GetRowIndependentUnitPositions
(5.5-15) applied to the matrix of column syzygies of C, etc.). (--> Appendix A)
> BasisOfRowsCoeff ( M, T ) | ( operation ) |
Returns: a homalg matrix
Returns B:=BasisOfRowModule
( M ) and assigns the void matrix T (--> HomalgVoidMatrix
(5.2-5)) such that B = T M. (--> Appendix A)
> BasisOfColumnsCoeff ( M, T ) | ( operation ) |
Returns: a homalg matrix
Returns B:=BasisOfRowModule
( M ) and assigns the void matrix T (--> HomalgVoidMatrix
(5.2-5)) such that B = M T. (--> Appendix A)
> DecideZeroRowsEffectively ( A, B, T ) | ( operation ) |
Returns: a homalg matrix
Returns M:=DecideZeroRows
( A, B ) and assigns the void matrix T (--> HomalgVoidMatrix
(5.2-5)) such that M = A + TB. (--> Appendix A)
> DecideZeroColumnsEffectively ( A, B, T ) | ( operation ) |
Returns: a homalg matrix
Returns M:=DecideZeroColumns
( A, B ) and assigns the void matrix T (--> HomalgVoidMatrix
(5.2-5)) such that M = A + BT. (--> Appendix A)
> BasisOfRows ( M ) | ( operation ) |
> BasisOfRows ( M, T ) | ( operation ) |
Returns: a homalg matrix
With one argument it is a synonym of BasisOfRowModule
(5.5-17). with two arguments it is a synonym of BasisOfRowsCoeff
(5.5-29).
> BasisOfColumns ( M ) | ( operation ) |
> BasisOfColumns ( M, T ) | ( operation ) |
Returns: a homalg matrix
With one argument it is a synonym of BasisOfColumnModule
(5.5-18). with two arguments it is a synonym of BasisOfColumnsCoeff
(5.5-30).
> DecideZero ( mat, rel ) | ( operation ) |
Returns: a homalg matrix
InstallMethod( DecideZero, "for sets of ring relations", [ IsHomalgMatrix, IsHomalgRingRelations ], function( mat, rel ) local rel_mat; rel_mat := MatrixOfRelations( BasisOfModule( rel ) ); if IsHomalgRingRelationsAsGeneratorsOfLeftIdeal( rel ) then return DecideZeroRows( mat, rel_mat ); else return DecideZeroColumns( mat, rel_mat ); fi; end ); |
> SyzygiesOfRows ( M ) | ( operation ) |
> SyzygiesOfRows ( M, M2 ) | ( operation ) |
Returns: a homalg matrix
With one argument it is a synonym of SyzygiesGeneratorsOfRows
(5.5-21). with two arguments it is a synonym of SyzygiesGeneratorsOfRows
(5.5-23).
> SyzygiesOfColumns ( M ) | ( operation ) |
> SyzygiesOfColumns ( M, M2 ) | ( operation ) |
Returns: a homalg matrix
With one argument it is a synonym of SyzygiesGeneratorsOfColumns
(5.5-22). with two arguments it is a synonym of SyzygiesGeneratorsOfColumns
(5.5-24).
> ReducedSyzygiesOfRows ( M ) | ( operation ) |
> ReducedSyzygiesOfRows ( M, M2 ) | ( operation ) |
Returns: a homalg matrix
With one argument it is a synonym of ReducedSyzygiesGeneratorsOfRows
(5.5-27). With two arguments it calls ReducedBasisOfRowModule
( SyzygiesGeneratorsOfRows
( M, M2 ) ). (--> ReducedBasisOfRowModule
(5.5-25) and SyzygiesGeneratorsOfRows
(5.5-23))
> ReducedSyzygiesOfColumns ( M ) | ( operation ) |
> ReducedSyzygiesOfColumns ( M, M2 ) | ( operation ) |
Returns: a homalg matrix
With one argument it is a synonym of ReducedSyzygiesGeneratorsOfColumns
(5.5-28). With two arguments it calls ReducedBasisOfColumnModule
( SyzygiesGeneratorsOfColumns
( M, M2 ) ). (--> ReducedBasisOfColumnModule
(5.5-26) and SyzygiesGeneratorsOfColumns
(5.5-24))
> RightDivide ( B, A ) | ( operation ) |
Returns: a homalg matrix or false
Let B and A be matrices having the same number of columns and defined over the same ring. The matrix RightDivide
( B, A ) is a particular solution of the inhomogeneous (one sided) linear system of equations XA=B in case it is solvable. Otherwise false
is returned. The name RightDivide
suggests "X=BA^-1". This generalizes LeftInverse
(5.4-13) for which B becomes the identity matrix. (--> SyzygiesGeneratorsOfRows
(5.5-21))
> LeftDivide ( A, B ) | ( operation ) |
Returns: a homalg matrix or false
Let A and B be matrices having the same number of rows and defined over the same ring. The matrix LeftDivide
( A, B ) is a particular solution of the inhomogeneous (one sided) linear system of equations AX=B in case it is solvable. Otherwise false
is returned. The name LeftDivide
suggests "X=A^-1B". This generalizes RightInverse
(5.4-14) for which B becomes the identity matrix. (--> SyzygiesGeneratorsOfColumns
(5.5-22))
> RightDivide ( B, A, L ) | ( operation ) |
Returns: a homalg matrix or false
Let B, A and L be matrices having the same number of columns and defined over the same ring. The matrix RightDivide
( B, A, L ) is a particular solution of the inhomogeneous (one sided) linear system of equations XA+YL=B in case it is solvable (for some Y which is forgotten). Otherwise false
is returned. The name RightDivide
suggests "X=BA^-1 modulo L". (Cf. [BR08, Subsection 3.1.1])
InstallMethod( RightDivide, "for homalg matrices", [ IsHomalgMatrix, IsHomalgMatrix, IsHomalgMatrix ], function( B, A, L ) ## CAUTION: Do not use lazy evaluation here!!! local R, BL, ZA, AL, CA, IAL, ZB, CB, NF, X; R := HomalgRing( B ); BL := BasisOfRows( L ); ## first reduce A modulo L ZA := DecideZeroRows( A, BL ); AL := UnionOfRows( ZA, BL ); ## CA * AL = IAL CA := HomalgVoidMatrix( R ); IAL := BasisOfRows( AL, CA ); ## also reduce B modulo L ZB := DecideZeroRows( B, BL ); ## knowing this will avoid computations IsOne( IAL ); ## IsSpecialSubidentityMatrix( IAL ); ## does not increase performance ## NF = ZB + CB * IAL CB := HomalgVoidMatrix( R ); NF := DecideZeroRowsEffectively( ZB, IAL, CB ); ## NF <> 0 if not IsZero( NF ) then return false; fi; ## CD = -CB * CA => CD * A = B X := -CB * CertainColumns( CA, [ 1 .. NrRows( A ) ] ); ## check assertion Assert( 3, IsZero( DecideZeroRows( X * A - B, L ) ) ); return X; ## technical: -CB * CA := (-CB) * CA and COLEM should take over ## since CB := -matrix end ); |
> LeftDivide ( A, B, L ) | ( operation ) |
Returns: a homalg matrix or false
Let A, B and L be matrices having the same number of columns and defined over the same ring. The matrix LeftDivide
( A, B, L ) is a particular solution of the inhomogeneous (one sided) linear system of equations AX+LY=B in case it is solvable (for some Y which is forgotten). Otherwise false
is returned. The name LeftDivide
suggests "X=A^-1B modulo L". (Cf. [BR08, Subsection 3.1.1])
InstallMethod( LeftDivide, "for homalg matrices", [ IsHomalgMatrix, IsHomalgMatrix, IsHomalgMatrix ], function( A, B, L ) ## CAUTION: Do not use lazy evaluation here!!! local R, BL, ZA, AL, CA, IAL, ZB, CB, NF, X; R := HomalgRing( B ); BL := BasisOfColumns( L ); ## first reduce A modulo L ZA := DecideZeroColumns( A, BL ); AL := UnionOfColumns( ZA, BL ); ## AL * CA = IAL CA := HomalgVoidMatrix( R ); IAL := BasisOfColumns( AL, CA ); ## also reduce B modulo L ZB := DecideZeroColumns( B, BL ); ## knowing this will avoid computations IsOne( IAL ); ## IsSpecialSubidentityMatrix( IAL ); ## does not increase performance ## NF = ZB + IAL * CB CB := HomalgVoidMatrix( R ); NF := DecideZeroColumnsEffectively( ZB, IAL, CB ); ## NF <> 0 if not IsZero( NF ) then return false; fi; ## CD = CA * -CB => A * CD = B X := CertainRows( CA, [ 1 .. NrColumns( A ) ] ) * -CB; ## check assertion Assert( 3, IsZero( DecideZeroColumns( A * X - B, L ) ) ); return X; ## technical: CA * -CB := CA * (-CB) and COLEM should take over since ## CB := -matrix end ); |
> GenerateSameRowModule ( M, N ) | ( operation ) |
Returns: true
or false
Check if the row span of M and of N are identical or not (--> RightDivide
(5.5-40)).
> GenerateSameColumnModule ( M, N ) | ( operation ) |
Returns: true
or false
Check if the column span of M and of N are identical or not (--> LeftDivide
(5.5-41)).
generated by GAPDoc2HTML