Goto Chapter: Top 1 2 3 4 5 6 A B C D E F Bib Ind
 [Top of Book]  [Contents]   [Previous Chapter]   [Next Chapter] 

5 Matrices
 5.1 Matrices: Category and Representations
 5.2 Matrices: Constructors
 5.3 Matrices: Properties
 5.4 Matrices: Attributes
 5.5 Matrices: Operations and Functions

  5.5-1 HomalgRing

  5.5-2 LeftInverse

  5.5-3 RightInverse

  5.5-4 LeftInverseLazy

  5.5-5 RightInverseLazy

  5.5-6 Involution

  5.5-7 TransposedMatrix

  5.5-8 CertainRows

  5.5-9 CertainColumns

  5.5-10 UnionOfRows

  5.5-11 UnionOfColumns

  5.5-12 ConvertRowToMatrix

  5.5-13 ConvertColumnToMatrix

  5.5-14 ConvertMatrixToRow

  5.5-15 ConvertMatrixToColumn

  5.5-16 DiagMat

  5.5-17 KroneckerMat

  5.5-18 DualKroneckerMat

  5.5-19 \*

  5.5-20 \+

  5.5-21 \-

  5.5-22 \*

  5.5-23 \=

  5.5-24 GetColumnIndependentUnitPositions

  5.5-25 GetRowIndependentUnitPositions

  5.5-26 GetUnitPosition

  5.5-27 Eliminate

  5.5-28 BasisOfRowModule

  5.5-29 BasisOfColumnModule

  5.5-30 DecideZeroRows

  5.5-31 DecideZeroColumns

  5.5-32 SyzygiesGeneratorsOfRows

  5.5-33 SyzygiesGeneratorsOfColumns

  5.5-34 SyzygiesGeneratorsOfRows

  5.5-35 SyzygiesGeneratorsOfColumns

  5.5-36 ReducedBasisOfRowModule

  5.5-37 ReducedBasisOfColumnModule

  5.5-38 ReducedSyzygiesGeneratorsOfRows

  5.5-39 ReducedSyzygiesGeneratorsOfColumns

  5.5-40 BasisOfRowsCoeff

  5.5-41 BasisOfColumnsCoeff

  5.5-42 DecideZeroRowsEffectively

  5.5-43 DecideZeroColumnsEffectively

  5.5-44 BasisOfRows

  5.5-45 BasisOfColumns

  5.5-46 DecideZero

  5.5-47 SyzygiesOfRows

  5.5-48 SyzygiesOfColumns

  5.5-49 ReducedSyzygiesOfRows

  5.5-50 ReducedSyzygiesOfColumns

  5.5-51 RightDivide

  5.5-52 LeftDivide

  5.5-53 RightDivide

  5.5-54 LeftDivide

  5.5-55 SafeRightDivide

  5.5-56 SafeLeftDivide

  5.5-57 UniqueRightDivide

  5.5-58 UniqueLeftDivide

  5.5-59 GenerateSameRowModule

  5.5-60 GenerateSameColumnModule

  5.5-61 SimplifyHomalgMatrixByLeftAndRightMultiplicationWithInvertibleMatrices

  5.5-62 SimplifyHomalgMatrixByLeftMultiplicationWithInvertibleMatrix

  5.5-63 SimplifyHomalgMatrixByRightMultiplicationWithInvertibleMatrix

  5.5-64 CoefficientsWithGivenMonomials

5 Matrices

5.1 Matrices: Category and Representations

5.1-1 IsHomalgMatrix
‣ IsHomalgMatrix( A )( category )

Returns: true or false

The GAP category of homalg matrices.

DeclareCategory( "IsHomalgMatrix",
        IsMatrixObj and
        IsAttributeStoringRep );

5.1-2 IsHomalgInternalMatrixRep
‣ 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).)

5.2 Matrices: Constructors

5.2-1 HomalgInitialMatrix
‣ HomalgInitialMatrix( m, n, R )( function )

Returns: a homalg matrix

A mutable unevaluated initial m × 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. The property IsInitialMatrix (5.3-26) is reset as soon as the matrix is evaluated. New computed properties or attributes of the matrix won't be cached, until the matrix is explicitly made immutable using (--> MakeImmutable (Reference 12.6-4)).

gap> zz := HomalgRingOfIntegers( );
Z
gap> z := HomalgInitialMatrix( 2, 3, zz );
<An initial 2 x 3 matrix over an internal ring>
gap> HasIsZero( z );
false
gap> IsZero( z );
true
gap> z;
<A 2 x 3 mutable matrix over an internal ring>
gap> HasIsZero( z );
false
gap> n := HomalgInitialMatrix( 2, 3, zz );
<An initial 2 x 3 matrix over an internal ring>
gap> n[ 1, 1 ] := "1";;
gap> n[ 2, 3 ] := "1";;
gap> MakeImmutable( n );
<A 2 x 3 matrix over an internal ring>
gap> Display( n );
[ [  1,  0,  0 ],
  [  0,  0,  1 ] ]
gap> IsZero( n );
false
gap> n;
<A non-zero 2 x 3 matrix over an internal ring>

5.2-2 HomalgInitialIdentityMatrix
‣ HomalgInitialIdentityMatrix( m, R )( function )

Returns: a homalg matrix

A mutable unevaluated initial m × 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. The property IsInitialIdentityMatrix (5.3-27) is reset as soon as the matrix is evaluated. New computed properties or attributes of the matrix won't be cached, until the matrix is explicitly made immutable using (--> MakeImmutable (Reference 12.6-4)).

gap> zz := HomalgRingOfIntegers( );
Z
gap> id := HomalgInitialIdentityMatrix( 3, zz );
<An initial identity 3 x 3 matrix over an internal ring>
gap> HasIsOne( id );
false
gap> IsOne( id );
true
gap> id;
<A 3 x 3 mutable matrix over an internal ring>
gap> HasIsOne( id );
false
gap> e := HomalgInitialIdentityMatrix( 3, zz );
<An initial identity 3 x 3 matrix over an internal ring>
gap> e[ 1, 2 ] := "1";;
gap> e[ 2, 1 ] := "-1";;
gap> MakeImmutable( e );
<A 3 x 3 matrix over an internal ring>
gap> Display( e );
[ [   1,   1,   0 ],
  [  -1,   1,   0 ],
  [   0,   0,   1 ] ]
gap> IsOne( e );
false
gap> e;
<A 3 x 3 matrix over an internal ring>

5.2-3 HomalgZeroMatrix
‣ HomalgZeroMatrix( m, n, R )( function )

Returns: a homalg matrix

An immutable unevaluated m × n homalg zero matrix over the homalg ring R.

gap> zz := HomalgRingOfIntegers( );
Z
gap> z := HomalgZeroMatrix( 2, 3, zz );
<An unevaluated 2 x 3 zero matrix over an internal ring>
gap> Display( z );
[ [  0,  0,  0 ],
  [  0,  0,  0 ] ]
gap> z;
<A 2 x 3 zero matrix over an internal ring>

5.2-4 HomalgIdentityMatrix
‣ HomalgIdentityMatrix( m, R )( function )

Returns: a homalg matrix

An immutable unevaluated m × m homalg identity matrix over the homalg ring R.

gap> zz := HomalgRingOfIntegers( );
Z
gap> id := HomalgIdentityMatrix( 3, zz );
<An unevaluated 3 x 3 identity matrix over an internal ring>
gap> Display( id );
[ [  1,  0,  0 ],
  [  0,  1,  0 ],
  [  0,  0,  1 ] ]
gap> id;
<A 3 x 3 identity matrix over an internal ring>

5.2-5 HomalgVoidMatrix
‣ HomalgVoidMatrix( [m, ][n, ]R )( function )

Returns: a homalg matrix

A void m × n homalg matrix.

5.2-6 HomalgMatrix
‣ HomalgMatrix( llist, R )( function )
‣ HomalgMatrix( llist, m, n, 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 × n homalg matrix over the homalg ring R.

gap> zz := HomalgRingOfIntegers( );
Z
gap> m := HomalgMatrix( [ [ 1, 2, 3 ], [ 4, 5, 6 ] ], zz );
<A 2 x 3 matrix over an internal ring>
gap> Display( m );
[ [  1,  2,  3 ],
  [  4,  5,  6 ] ]
gap> m := HomalgMatrix( [ [ 1, 2, 3 ], [ 4, 5, 6 ] ], 2, 3, zz );
<A 2 x 3 matrix over an internal ring>
gap> Display( m );
[ [  1,  2,  3 ],
  [  4,  5,  6 ] ]
gap> m := HomalgMatrix( [ 1, 2, 3,   4, 5, 6 ], 2, 3, zz );
<A 2 x 3 matrix over an internal ring>
gap> Display( m );
[ [  1,  2,  3 ],
  [  4,  5,  6 ] ]
gap> m := HomalgMatrix( "[ [ 1, 2, 3 ], [ 4, 5, 6 ] ]", zz );
<A 2 x 3 matrix over an internal ring>
gap> Display( m );
[ [  1,  2,  3 ],
  [  4,  5,  6 ] ]
gap> m := HomalgMatrix( "[ [ 1, 2, 3 ], [ 4, 5, 6 ] ]", 2, 3, zz );
<A 2 x 3 matrix over an internal ring>
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 2 x 3 matrix over an internal ring>
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 2 x 3 matrix over an internal ring>
gap> Display( m );
[ [  1,  2,  3 ],
  [  4,  5,  6 ] ]

5.2-7 HomalgMatrixListList
‣ HomalgMatrixListList( llist, m, n, R )( function )

Returns: a homalg matrix

Special case of HomalgMatrix (5.2-6).

5.2-8 HomalgRowVector
‣ HomalgRowVector( entries, nr_cols, R )( function )

Returns: a homalg matrix

Special case of HomalgMatrix (5.2-6) for matrices with a single row. entries must be a list of ring elements.

5.2-9 HomalgColumnVector
‣ HomalgColumnVector( entries, nr_rows, R )( function )

Returns: a homalg matrix

Special case of HomalgMatrix (5.2-6) for matrices with a single column. entries must be a list of ring elements.

5.2-10 HomalgDiagonalMatrix
‣ 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( );
Z
gap> d := HomalgDiagonalMatrix( [ 1, 2, 3 ], zz );
<An unevaluated diagonal 3 x 3 matrix over an internal ring>
gap> Display( d );
[ [  1,  0,  0 ],
  [  0,  2,  0 ],
  [  0,  0,  3 ] ]
gap> d;
<A diagonal 3 x 3 matrix over an internal ring>

5.2-11 \*
‣ \*( 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( );
Z
gap> Z4 := zz / 4;
Z/( 4 )
gap> Display( Z4 );
<A residue class ring>
gap> d := HomalgDiagonalMatrix( [ 2 .. 4 ], zz );
<An unevaluated diagonal 3 x 3 matrix over an internal ring>
gap> d2 := Z4 * d; ## or d2 := d * Z4;
<A 3 x 3 matrix over a residue class ring>
gap> Display( d2 );
[ [  2,  0,  0 ],
  [  0,  3,  0 ],
  [  0,  0,  4 ] ]

modulo [ 4 ]
gap> d;
<A diagonal 3 x 3 matrix over an internal ring>
gap> ZeroRows( d );
[  ]
gap> ZeroRows( d2 );
[ 3 ]
gap> d;
<A non-zero diagonal 3 x 3 matrix over an internal ring>
gap> d2;
<A non-zero 3 x 3 matrix over a residue class ring>

5.2-12 CoercedMatrix
‣ CoercedMatrix( ring_from, ring_to, mat )( operation )
‣ CoercedMatrix( ring_to, mat )( operation )

Returns: a homalg matrix

A copy of the homalg matrix mat with homalg ring ring_from in the homalg ring ring_to.

(for the installed standard method see Eval (C.4-9))

5.3 Matrices: Properties

5.3-1 IsZero
‣ 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-20))

gap> zz := HomalgRingOfIntegers( );
Z
gap> A := HomalgMatrix( "[ 2 ]", zz );
<A 1 x 1 matrix over an internal ring>
gap> Z2 := zz / 2;
Z/( 2 )
gap> A := Z2 * A;
<A 1 x 1 matrix over a residue class ring>
gap> Display( A );
[ [  2 ] ]

modulo [ 2 ]
gap> IsZero( A );
true

5.3-2 IsOne
‣ 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))

5.3-3 IsUnitFree
‣ IsUnitFree( A )( property )

Returns: true or false

A is a homalg matrix.

5.3-4 IsPermutationMatrix
‣ IsPermutationMatrix( A )( property )

Returns: true or false

A is a homalg matrix.

5.3-5 IsSpecialSubidentityMatrix
‣ IsSpecialSubidentityMatrix( A )( property )

Returns: true or false

A is a homalg matrix.

5.3-6 IsSubidentityMatrix
‣ IsSubidentityMatrix( A )( property )

Returns: true or false

A is a homalg matrix.

5.3-7 IsLeftRegular
‣ IsLeftRegular( A )( property )

Returns: true or false

A is a homalg matrix.

5.3-8 IsRightRegular
‣ IsRightRegular( A )( property )

Returns: true or false

A is a homalg matrix.

5.3-9 IsInvertibleMatrix
‣ IsInvertibleMatrix( A )( property )

Returns: true or false

A is a homalg matrix.

5.3-10 IsLeftInvertibleMatrix
‣ IsLeftInvertibleMatrix( A )( property )

Returns: true or false

A is a homalg matrix.

5.3-11 IsRightInvertibleMatrix
‣ IsRightInvertibleMatrix( A )( property )

Returns: true or false

A is a homalg matrix.

5.3-12 IsEmptyMatrix
‣ IsEmptyMatrix( A )( property )

Returns: true or false

A is a homalg matrix.

5.3-13 IsDiagonalMatrix
‣ IsDiagonalMatrix( A )( property )

Returns: true or false

Check if the homalg matrix A is a diagonal matrix, taking possible ring relations into account.

(for the installed standard method see IsDiagonalMatrix (B.2-3))

5.3-14 IsScalarMatrix
‣ IsScalarMatrix( A )( property )

Returns: true or false

A is a homalg matrix.

5.3-15 IsUpperTriangularMatrix
‣ IsUpperTriangularMatrix( A )( property )

Returns: true or false

A is a homalg matrix.

5.3-16 IsLowerTriangularMatrix
‣ IsLowerTriangularMatrix( A )( property )

Returns: true or false

A is a homalg matrix.

5.3-17 IsStrictUpperTriangularMatrix
‣ IsStrictUpperTriangularMatrix( A )( property )

Returns: true or false

A is a homalg matrix.

5.3-18 IsStrictLowerTriangularMatrix
‣ IsStrictLowerTriangularMatrix( A )( property )

Returns: true or false

A is a homalg matrix.

5.3-19 IsUpperStairCaseMatrix
‣ IsUpperStairCaseMatrix( A )( property )

Returns: true or false

A is a homalg matrix.

5.3-20 IsLowerStairCaseMatrix
‣ IsLowerStairCaseMatrix( A )( property )

Returns: true or false

A is a homalg matrix.

5.3-21 IsTriangularMatrix
‣ IsTriangularMatrix( A )( property )

Returns: true or false

A is a homalg matrix.

5.3-22 IsBasisOfRowsMatrix
‣ IsBasisOfRowsMatrix( A )( property )

Returns: true or false

A is a homalg matrix.

5.3-23 IsBasisOfColumnsMatrix
‣ IsBasisOfColumnsMatrix( A )( property )

Returns: true or false

A is a homalg matrix.

5.3-24 IsReducedBasisOfRowsMatrix
‣ IsReducedBasisOfRowsMatrix( A )( property )

Returns: true or false

A is a homalg matrix.

5.3-25 IsReducedBasisOfColumnsMatrix
‣ IsReducedBasisOfColumnsMatrix( A )( property )

Returns: true or false

A is a homalg matrix.

5.3-26 IsInitialMatrix
‣ IsInitialMatrix( A )( filter )

Returns: true or false

A is a homalg matrix.

5.3-27 IsInitialIdentityMatrix
‣ IsInitialIdentityMatrix( A )( filter )

Returns: true or false

A is a homalg matrix.

5.3-28 IsVoidMatrix
‣ IsVoidMatrix( A )( filter )

Returns: true or false

A is a homalg matrix.

5.4 Matrices: Attributes

5.4-1 NumberRows
‣ NumberRows( A )( attribute )

Returns: a nonnegative integer

The number of rows of the matrix A.

(for the installed standard method see NumberRows (B.1-21))

5.4-2 NumberColumns
‣ NumberColumns( A )( attribute )

Returns: a nonnegative integer

The number of columns of the matrix A.

(for the installed standard method see NumberColumns (B.1-22))

5.4-3 DeterminantMat
‣ 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-23))

5.4-4 ZeroRows
‣ 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))

5.4-5 ZeroColumns
‣ 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))

5.4-6 NonZeroRows
‣ NonZeroRows( A )( attribute )

Returns: a (possibly empty) list of positive integers

The list of nonzero rows of the matrix A.

5.4-7 NonZeroColumns
‣ NonZeroColumns( A )( attribute )

Returns: a (possibly empty) list of positive integers

The list of nonzero columns of the matrix A.

5.4-8 PositionOfFirstNonZeroEntryPerRow
‣ 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.

5.4-9 PositionOfFirstNonZeroEntryPerColumn
‣ 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.

5.4-10 RowRankOfMatrix
‣ RowRankOfMatrix( A )( attribute )

Returns: a nonnegative integer

The row rank of the matrix A.

5.4-11 ColumnRankOfMatrix
‣ ColumnRankOfMatrix( A )( attribute )

Returns: a nonnegative integer

The column rank of the matrix A.

5.4-12 LeftInverse
‣ LeftInverse( M )( attribute )

Returns: a homalg matrix

A left inverse C of the matrix M. If no left inverse exists then false is returned. (--> RightDivide (5.5-51))

(for the installed standard method see LeftInverse (5.5-2))

5.4-13 RightInverse
‣ RightInverse( M )( attribute )

Returns: a homalg matrix

A right inverse C of the matrix M. If no right inverse exists then false is returned. (--> LeftDivide (5.5-52))

(for the installed standard method see RightInverse (5.5-3))

5.4-14 CoefficientsOfUnreducedNumeratorOfHilbertPoincareSeries
‣ CoefficientsOfUnreducedNumeratorOfHilbertPoincareSeries( A )( attribute )

Returns: a list of integers

A is a homalg matrix (row convention).

5.4-15 CoefficientsOfNumeratorOfHilbertPoincareSeries
‣ CoefficientsOfNumeratorOfHilbertPoincareSeries( A )( attribute )

Returns: a list of integers

A is a homalg matrix (row convention).

5.4-16 UnreducedNumeratorOfHilbertPoincareSeries
‣ UnreducedNumeratorOfHilbertPoincareSeries( A )( attribute )

Returns: a univariate polynomial with rational coefficients

A is a homalg matrix (row convention).

5.4-17 NumeratorOfHilbertPoincareSeries
‣ NumeratorOfHilbertPoincareSeries( A )( attribute )

Returns: a univariate polynomial with rational coefficients

A is a homalg matrix (row convention).

5.4-18 HilbertPoincareSeries
‣ HilbertPoincareSeries( A )( attribute )

Returns: a univariate rational function with rational coefficients

A is a homalg matrix (row convention).

5.4-19 HilbertPolynomial
‣ HilbertPolynomial( A )( attribute )

Returns: a univariate polynomial with rational coefficients

A is a homalg matrix (row convention).

5.4-20 AffineDimension
‣ AffineDimension( A )( attribute )

Returns: an integer

A is a homalg matrix (row convention).

5.4-21 AffineDegree
‣ AffineDegree( A )( attribute )

Returns: a nonnegative integer

A is a homalg matrix (row convention).

5.4-22 ProjectiveDegree
‣ ProjectiveDegree( A )( attribute )

Returns: a nonnegative integer

A is a homalg matrix (row convention).

5.4-23 ConstantTermOfHilbertPolynomialn
‣ ConstantTermOfHilbertPolynomialn( A )( attribute )

Returns: an integer

A is a homalg matrix (row convention).

5.4-24 MatrixOfSymbols
‣ MatrixOfSymbols( A )( attribute )

Returns: an integer

A is a homalg matrix.

5.5 Matrices: Operations and Functions

5.5-1 HomalgRing
‣ HomalgRing( mat )( operation )

Returns: a homalg ring

The homalg ring of the homalg matrix mat.

gap> zz := HomalgRingOfIntegers( );
Z
gap> d := HomalgDiagonalMatrix( [ 2 .. 4 ], zz );
<An unevaluated diagonal 3 x 3 matrix over an internal ring>
gap> R := HomalgRing( d );
Z
gap> IsIdenticalObj( R, zz );
true

5.5-2 LeftInverse
‣ LeftInverse( RI )( method )

Returns: a homalg matrix or fail

The left inverse of the matrix RI. The lazy version of this operation is LeftInverseLazy (5.5-4). (--> RightDivide (5.5-51))

InstallMethod( LeftInverse,
        "for homalg matrices",
        [ IsHomalgMatrix ],
        
  function( RI )
    local Id, LI;
    
    Id := HomalgIdentityMatrix( NumberColumns( RI ), HomalgRing( RI ) );
    
    LI := RightDivide( Id, RI ); ## ( cf. [BR08, Subsection 3.1.3] )
    
    ## CAUTION: for the following SetXXX RightDivide is assumed
    ## NOT to be lazy evaluated!!!
    
    SetIsLeftInvertibleMatrix( RI, IsHomalgMatrix( LI ) );
    
    if IsBool( LI ) then
        return fail;
    fi;
    
    if HasIsInvertibleMatrix( RI ) and IsInvertibleMatrix( RI ) then
        SetIsInvertibleMatrix( LI, true );
    else
        SetIsRightInvertibleMatrix( LI, true );
    fi;
    
    SetRightInverse( LI, RI );
    
    SetNumberColumns( LI, NumberRows( RI ) );
    
    if NumberRows( RI ) = NumberColumns( RI ) then
        ## a left inverse of a ring element is unique
        ## and coincides with the right inverse
        SetRightInverse( RI, LI );
        SetLeftInverse( LI, RI );
    fi;
    
    return LI;
    
end );

5.5-3 RightInverse
‣ RightInverse( LI )( method )

Returns: a homalg matrix or fail

The right inverse of the matrix LI. The lazy version of this operation is RightInverseLazy (5.5-5). (--> LeftDivide (5.5-52))

InstallMethod( RightInverse,
        "for homalg matrices",
        [ IsHomalgMatrix ],
        
  function( LI )
    local Id, RI;
    
    Id := HomalgIdentityMatrix( NumberRows( LI ), HomalgRing( LI ) );
    
    RI := LeftDivide( LI, Id ); ## ( cf. [BR08, Subsection 3.1.3] )
    
    ## CAUTION: for the following SetXXX LeftDivide is assumed
    ## NOT to be lazy evaluated!!!
    
    SetIsRightInvertibleMatrix( LI, IsHomalgMatrix( RI ) );
    
    if IsBool( RI ) then
        return fail;
    fi;
    
    if HasIsInvertibleMatrix( LI ) and IsInvertibleMatrix( LI ) then
        SetIsInvertibleMatrix( RI, true );
    else
        SetIsLeftInvertibleMatrix( RI, true );
    fi;
    
    SetLeftInverse( RI, LI );
    
    SetNumberRows( RI, NumberColumns( LI ) );
    
    if NumberRows( LI ) = NumberColumns( LI ) then
        ## a right inverse of a ring element is unique
        ## and coincides with the left inverse
        SetLeftInverse( LI, RI );
        SetRightInverse( RI, LI );
    fi;
    
    return RI;
    
end );

5.5-4 LeftInverseLazy
‣ LeftInverseLazy( M )( operation )

Returns: a homalg matrix

A lazy evaluated left inverse C of the matrix M. If no left inverse exists then Eval( C ) will issue an error.

(for the installed standard method see Eval (C.4-5))

5.5-5 RightInverseLazy
‣ RightInverseLazy( M )( operation )

Returns: a homalg matrix

A lazy evaluated right inverse C of the matrix M. If no right inverse exists then Eval( C ) will issue an error.

(for the installed standard method see Eval (C.4-6))

5.5-6 Involution
‣ Involution( M )( method )

Returns: a homalg matrix

The twisted transpose of the homalg matrix M. If the underlying ring is commutative, the twist is the identity.

(for the installed standard method see Eval (C.4-7))

5.5-7 TransposedMatrix
‣ TransposedMatrix( M )( method )

Returns: a homalg matrix

The transpose of the homalg matrix M.

(for the installed standard method see Eval (C.4-8))

5.5-8 CertainRows
‣ 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].

(for the installed standard method see Eval (C.4-10))

5.5-9 CertainColumns
‣ 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[j].

(for the installed standard method see Eval (C.4-11))

5.5-10 UnionOfRows
‣ UnionOfRows( [R, nr_cols, ]L )( function )

Returns: a homalg matrix

Stack the homalg matrices in the list L. The entries of L must be matrices over the homalg ring R with nr_cols columns. If L is non-empty, R and nr_cols can be omitted.

(for the installed standard method see Eval (C.4-12))

5.5-11 UnionOfColumns
‣ UnionOfColumns( [R, nr_rows, ]L )( function )

Returns: a homalg matrix

Augment the homalg matrices in the list L. The entries of L must be matrices over the homalg ring R with nr_rows rows. If L is non-empty, R and nr_rows can be omitted.

(for the installed standard method see Eval (C.4-13))

5.5-12 ConvertRowToMatrix
‣ ConvertRowToMatrix( M, r, c )( method )

Returns: a homalg matrix

Fold the row M to an rxc-matrix.

5.5-13 ConvertColumnToMatrix
‣ ConvertColumnToMatrix( M, r, c )( method )

Returns: a homalg matrix

Fold the column M to an rxc-matrix.

5.5-14 ConvertMatrixToRow
‣ ConvertMatrixToRow( M )( method )

Returns: a homalg matrix

Unfold the matrix M row-wise into a row.

5.5-15 ConvertMatrixToColumn
‣ ConvertMatrixToColumn( M )( method )

Returns: a homalg matrix

Unfold the matrix M column-wise into a column.

5.5-16 DiagMat
‣ DiagMat( [R, ]list )( method )

Returns: a homalg matrix

Build the block diagonal matrix out of the homalg matrices listed in list. If list is non-empty, R can be omitted.

(for the installed standard method see Eval (C.4-14))

5.5-17 KroneckerMat
‣ 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-15))

5.5-18 DualKroneckerMat
‣ DualKroneckerMat( A, B )( method )

Returns: a homalg matrix

The dual Kronecker product of the two homalg matrices A and B.

(for the installed standard method see Eval (C.4-16))

5.5-19 \*
‣ \*( 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-17))

5.5-20 \+
‣ \+( 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-18))

5.5-21 \-
‣ \-( 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-19))

5.5-22 \*
‣ \*( 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-20))

5.5-23 \=
‣ \=( 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( );
Z
gap> A := HomalgMatrix( "[ 1 ]", zz );
<A 1 x 1 matrix over an internal ring>
gap> B := HomalgMatrix( "[ 3 ]", zz );
<A 1 x 1 matrix over an internal ring>
gap> Z2 := zz / 2;
Z/( 2 )
gap> A := Z2 * A;
<A 1 x 1 matrix over a residue class ring>
gap> B := Z2 * B;
<A 1 x 1 matrix over a residue class ring>
gap> Display( A );
[ [  1 ] ]

modulo [ 2 ]
gap> Display( B );
[ [  3 ] ]

modulo [ 2 ]
gap> A = B;
true

5.5-24 GetColumnIndependentUnitPositions
‣ 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))

5.5-25 GetRowIndependentUnitPositions
‣ 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))

5.5-26 GetUnitPosition
‣ 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))

5.5-27 Eliminate
‣ Eliminate( rel, indets )( operation )

Returns: a homalg matrix

Eliminate the independents indets from the matrix (or list of ring elements) rel, i.e. compute a generating set of the ideal defined as the intersection of the ideal generated by the entries of the list rel with the subring generated by all indeterminates except those in indets. by the list of indeterminates indets.

5.5-28 BasisOfRowModule
‣ 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 left module R^(1 × NumberColumns( 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 × NumberColumns( 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)

5.5-29 BasisOfColumnModule
‣ 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 right module R^(NumberRows( M ) × 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^(NumberRows( M ) × 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)

5.5-30 DecideZeroRows
‣ 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 left module R^(1 × NumberColumns( 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)

5.5-31 DecideZeroColumns
‣ 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 right module R^(NumberRows( B ) × 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)

5.5-32 SyzygiesGeneratorsOfRows
‣ 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 left module R^(1 × NumberRows( M )) consisting of all rows X satisfying XM=0. (--> Appendix A)

5.5-33 SyzygiesGeneratorsOfColumns
‣ 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 right module R^(NumberColumns( M ) × 1) consisting of all columns X satisfying MX=0. (--> Appendix A)

5.5-34 SyzygiesGeneratorsOfRows
‣ 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 left module R^(1 × NumberRows( M )) consisting of all rows X satisfying XM+YM2=0 for some row Y ∈ R^(1 × NumberRows( M2 )). (--> Appendix A)

5.5-35 SyzygiesGeneratorsOfColumns
‣ 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 right module R^(NumberColumns( M ) × 1) consisting of all columns X satisfying MX+M2Y=0 for some column Y ∈ R^(NumberColumns( M2 ) × 1). (--> Appendix A)

5.5-36 ReducedBasisOfRowModule
‣ 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-24) applied to the matrix of row syzygies of B, etc). (--> Appendix A)

5.5-37 ReducedBasisOfColumnModule
‣ 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-25) applied to the matrix of column syzygies of B, etc.). (--> Appendix A)

5.5-38 ReducedSyzygiesGeneratorsOfRows
‣ 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-24) applied to the matrix of row syzygies of C, etc.). (--> Appendix A)

5.5-39 ReducedSyzygiesGeneratorsOfColumns
‣ 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-25) applied to the matrix of column syzygies of C, etc.). (--> Appendix A)

5.5-40 BasisOfRowsCoeff
‣ 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)

5.5-41 BasisOfColumnsCoeff
‣ 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)

5.5-42 DecideZeroRowsEffectively
‣ 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)

5.5-43 DecideZeroColumnsEffectively
‣ 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)

5.5-44 BasisOfRows
‣ BasisOfRows( M )( operation )
‣ BasisOfRows( M, T )( operation )

Returns: a homalg matrix

With one argument it is a synonym of BasisOfRowModule (5.5-28). with two arguments it is a synonym of BasisOfRowsCoeff (5.5-40).

5.5-45 BasisOfColumns
‣ BasisOfColumns( M )( operation )
‣ BasisOfColumns( M, T )( operation )

Returns: a homalg matrix

With one argument it is a synonym of BasisOfColumnModule (5.5-29). with two arguments it is a synonym of BasisOfColumnsCoeff (5.5-41).

5.5-46 DecideZero
‣ DecideZero( mat, rel )( operation )

Returns: a homalg matrix

InstallMethod( DecideZero,
        "for sets of ring relations",
        [ IsHomalgMatrix, IsHomalgRingRelations ],
        
  function( mat, rel )
    
    return DecideZero( mat,  MatrixOfRelations( rel ) );
    
end );

5.5-47 SyzygiesOfRows
‣ SyzygiesOfRows( M )( operation )
‣ SyzygiesOfRows( M, M2 )( operation )

Returns: a homalg matrix

With one argument it is a synonym of SyzygiesGeneratorsOfRows (5.5-32). with two arguments it is a synonym of SyzygiesGeneratorsOfRows (5.5-34).

5.5-48 SyzygiesOfColumns
‣ SyzygiesOfColumns( M )( operation )
‣ SyzygiesOfColumns( M, M2 )( operation )

Returns: a homalg matrix

With one argument it is a synonym of SyzygiesGeneratorsOfColumns (5.5-33). with two arguments it is a synonym of SyzygiesGeneratorsOfColumns (5.5-35).

5.5-49 ReducedSyzygiesOfRows
‣ ReducedSyzygiesOfRows( M )( operation )
‣ ReducedSyzygiesOfRows( M, M2 )( operation )

Returns: a homalg matrix

With one argument it is a synonym of ReducedSyzygiesGeneratorsOfRows (5.5-38). With two arguments it calls ReducedBasisOfRowModule( SyzygiesGeneratorsOfRows( M, M2 ) ). (--> ReducedBasisOfRowModule (5.5-36) and SyzygiesGeneratorsOfRows (5.5-34))

5.5-50 ReducedSyzygiesOfColumns
‣ ReducedSyzygiesOfColumns( M )( operation )
‣ ReducedSyzygiesOfColumns( M, M2 )( operation )

Returns: a homalg matrix

With one argument it is a synonym of ReducedSyzygiesGeneratorsOfColumns (5.5-39). With two arguments it calls ReducedBasisOfColumnModule( SyzygiesGeneratorsOfColumns( M, M2 ) ). (--> ReducedBasisOfColumnModule (5.5-37) and SyzygiesGeneratorsOfColumns (5.5-35))

5.5-51 RightDivide
‣ RightDivide( B, A )( operation )

Returns: a homalg matrix or fail

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 fail is returned. The name RightDivide suggests X=BA^-1. This generalizes LeftInverse (5.5-2) for which B becomes the identity matrix. (--> SyzygiesGeneratorsOfRows (5.5-32))

5.5-52 LeftDivide
‣ LeftDivide( A, B )( operation )

Returns: a homalg matrix or fail

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 fail is returned. The name LeftDivide suggests X=A^-1B. This generalizes RightInverse (5.5-3) for which B becomes the identity matrix. (--> SyzygiesGeneratorsOfColumns (5.5-33))

5.5-53 RightDivide
‣ RightDivide( B, A, L )( operation )

Returns: a homalg matrix or fail

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 fail 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, ZB, T, B_;
    
    R := HomalgRing( B );
    
    BL := BasisOfRows( L );
    
    ## first reduce A modulo L
    ZA := DecideZeroRows( A, BL );
    
    AL := UnionOfRows( ZA, BL );
    
    ## also reduce B modulo L
    ZB := DecideZeroRows( B, BL );
    
    ## B_ = ZB + T * AL
    T := HomalgVoidMatrix( R );
    B_ := DecideZeroRowsEffectively( ZB, AL, T );
    
    ## if B_ does not vanish
    if not IsZero( B_ ) then
        return fail;
    fi;
    
    T := CertainColumns( T, [ 1 .. NumberRows( A ) ] );
    
    ## check assertion
    Assert( 5, IsZero( DecideZeroRows( B + T * A, BL ) ) );
    
    return -T;
    
end );

5.5-54 LeftDivide
‣ LeftDivide( A, B, L )( operation )

Returns: a homalg matrix or fail

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 fail 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, ZB, T, B_;
    
    R := HomalgRing( B );
    
    BL := BasisOfColumns( L );
    
    ## first reduce A modulo L
    ZA := DecideZeroColumns( A, BL );
    
    AL := UnionOfColumns( ZA, BL );
    
    ## also reduce B modulo L
    ZB := DecideZeroColumns( B, BL );
    
    ## B_ = ZB + AL * T
    T := HomalgVoidMatrix( R );
    B_ := DecideZeroColumnsEffectively( ZB, AL, T );
    
    ## if B_ does not vanish
    if not IsZero( B_ ) then
        return fail;
    fi;
    
    T := CertainRows( T, [ 1 .. NumberColumns( A ) ] );
    
    ## check assertion
    Assert( 5, IsZero( DecideZeroColumns( B + A * T, BL ) ) );
    
    return -T;
    
end );

5.5-55 SafeRightDivide
‣ SafeRightDivide( B, A )( operation )

Returns: a homalg matrix

Same as RightDivide (5.5-51), but asserts that the result is not fail.

5.5-56 SafeLeftDivide
‣ SafeLeftDivide( A, B )( operation )

Returns: a homalg matrix

Same as LeftDivide (5.5-52), but asserts that the result is not fail.

5.5-57 UniqueRightDivide
‣ UniqueRightDivide( B, A )( operation )

Returns: a homalg matrix

Same as SafeRightDivide (5.5-55), but asserts at assertion level 5 that the solution is unique.

5.5-58 UniqueLeftDivide
‣ UniqueLeftDivide( A, B )( operation )

Returns: a homalg matrix

Same as SafeLeftDivide (5.5-56), but asserts at assertion level 5 that the solution is unique.

5.5-59 GenerateSameRowModule
‣ 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-51)).

5.5-60 GenerateSameColumnModule
‣ 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-52)).

5.5-61 SimplifyHomalgMatrixByLeftAndRightMultiplicationWithInvertibleMatrices
‣ SimplifyHomalgMatrixByLeftAndRightMultiplicationWithInvertibleMatrices( M )( operation )

Returns: a list of 5 homalg matrices

The input is a homalg matrix M. The output is a 5-tuple of homalg matrices S, U, V, UI, VI, such that U M V = S. Moreover, U and V are invertible with inverses UI, VI, respectively. The idea is that the matrix S should look "simpler" than M.

5.5-62 SimplifyHomalgMatrixByLeftMultiplicationWithInvertibleMatrix
‣ SimplifyHomalgMatrixByLeftMultiplicationWithInvertibleMatrix( M )( operation )

Returns: a list of 3 homalg matrices

The input is a homalg matrix M. The output is a 3-tuple of homalg matrices S, T, TI such that T M = S. Moreover, T is invertible with inverse TI. The idea is that the matrix S should look "simpler" than M.

5.5-63 SimplifyHomalgMatrixByRightMultiplicationWithInvertibleMatrix
‣ SimplifyHomalgMatrixByRightMultiplicationWithInvertibleMatrix( M )( operation )

Returns: a list of 3 homalg matrices

The input is a homalg matrix M. The output is a 3-tuple of homalg matrices S, T, TI such that M T = S. Moreover, T is invertible with inverse TI. The idea is that the matrix S should look "simpler" than M.

5.5-64 CoefficientsWithGivenMonomials
‣ CoefficientsWithGivenMonomials( M, monomials )( method )

Returns: a homalg matrix

Let R := HomalgRing(M). monomials must be a homalg matrix with the same number of columns as M consisting of monomials of R. This method computes a homalg matrix coeffs (with entries in the coefficients ring of R, yet still considered as elements of R) such that M = coeffs * monomials. If no such matrix exists, the behavior is undefined. If the first argument is a homalg ring element, it is viewed as a homalg matrix with a single entry. If the second argument is a list of monomials, it is viewed as a column matrix with the list elements as entries.

 [Top of Book]  [Contents]   [Previous Chapter]   [Next Chapter] 
Goto Chapter: Top 1 2 3 4 5 6 A B C D E F Bib Ind

generated by GAPDoc2HTML