8000 [Gauss] incorrect internal representation of sparse matrices over an explicitly specified ring · Issue #606 · homalg-project/homalg_project · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
[Gauss] incorrect internal representation of sparse matrices over an explicitly specified ring #606
Open
@jdobben

Description

@jdobben

The package gauss doesn't seem to always properly store matrices that are constructed over an explicitly specified ring. For example, I thought that the following would be a valid way of constructing a matrix over GF(3):

LoadPackage("gauss");
SN := SparseMatrix( 2, 3, [ [ 2 ], [ 1, 3 ] ], [ [ 1 ], [ 3, 2 ] ], GF(3) );

The documentation doesn't specify that this is incorrect, so I assumed that this call would automatically convert the integer entries to elements of GF(3). However, when recovering the matrix from gauss, it becomes clear that no conversion has taken place:

gap> N := ConvertSparseMatrixToMatrix(SN);
[ [ 0*Z(3), 1, 0*Z(3) ], [ 3, 0*Z(3), 2 ] ]

On rare occasions, this could lead to problems when doing further computations with these sparse matrices. For instance, I have had a case where computing the rank (using the Rank function from gauss) failed because the algorithm ended up trying to compute -1/3 mod 3, presumably because earlier steps in the Gaussian elimination algorithm had set that pivot to some rational number (like 3 or -1/3) instead of an element of GF(3). However, I have not been able to produce a small example that exhibits this behaviour, and I am currently not at liberty to share the code that led to a failed rank computation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0