Skip to content

[Gauss] Error when computing the transpose of a small sparse matrix over GF(2) #604

@jdobben

Description

@jdobben

There appears to be a bug in the gauss package when computing the transpose of a small sparse matrix over GF(2). The issue occurs in recent distributions of GAP, such as GAP 4.12.2 (2022-12-18) / Gauss 2022.11-01 and GAP 4.13.0 (2024-03-15) / Gauss 2023.02-04. The issue can be reproduced by running the following code in GAP:

LoadPackage("gauss");
sm := SparseMatrix(2, 5, [[1,3],[2,4]], [[1,1],[1,1]], GF(2));
TransposedSparseMat(sm);

I'm getting the following output:

 ┌───────┐   GAP 4.13.0 of 2024-03-15
 │  GAP  │   https://www.gap-system.org
 └───────┘   Architecture: x86_64-pc-linux-gnu-default64-kv9
 Configuration:  gmp 6.2.1, GASMAN, readline
 Loading the library and packages ...
 Packages:   AClib 1.3.2, Alnuth 3.2.1, AtlasRep 2.1.8, AutPGrp 1.11, 
             Browse 1.8.21, CaratInterface 2.3.6, CRISP 1.4.6, Cryst 4.1.27, 
             CrystCat 1.1.10, CTblLib 1.3.9, FactInt 1.6.3, FGA 1.5.0, 
             Forms 1.2.9, GAPDoc 1.6.7, genss 1.6.8, IO 4.8.2, IRREDSOL 1.4.4, 
             LAGUNA 3.9.6, orb 4.9.0, Polenta 1.3.10, Polycyclic 2.16, 
             PrimGrp 3.4.4, RadiRoot 2.9, recog 1.4.2, ResClasses 4.7.3, 
             SmallGrp 1.5.3, Sophus 1.27, SpinSym 1.5.2, StandardFF 1.0, 
             TomLib 1.2.11, TransGrp 3.6.5, utils 0.85
 Try '??help' for help. See also '?copyright', '?cite' and '?authors'
gap> LoadPackage("gauss");
─────────────────────────────────────────────────────────────────────────────
Loading Gauss 2023.02-04 (Extended Gauss functionality for GAP)
by Simon Görtzen (https://www.linkedin.com/in/simongoertzen/).
maintained by:
   Mohamed Barakat (https://mohamed-barakat.github.io) and
   Sebastian Gutsche (https://sebasguts.github.io).
Homepage: https://homalg-project.github.io/pkg/Gauss
Report issues at https://github.com/homalg-project/homalg_project/issues
─────────────────────────────────────────────────────────────────────────────
true
gap> sm := SparseMatrix(2, 5, [[1,3],[2,4]], [[1,1],[1,1]], GF(2));
<a 2 x 5 sparse matrix over GF(2)>
gap> TransposedSparseMat(sm);
Error, Record Element: '<rec>.entries' must have an assigned value in
  Add( T!.entries[M!.indices[i][j]], M!.entries[i][j] 
 ); at $(GAPPATH)/pkg/gauss/gap/SparseMatrix.gi:506 called from 
<function "TransposedSparseMat method">( <arguments> )
 called from read-eval loop at *stdin*:3
type 'quit;' to quit to outer loop
brk> 

Am I doing something wrong, or is there a bug here?

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