[GAP Forum] HomalgComplex with sparse matrices

Joshua Edward Hunt joshuahunt at math.ku.dk
Mon Aug 14 13:04:48 BST 2017


Dear forum,

I'm confused by the following behaviour:

> ZZ := HomalgRingOfIntegers();
> x := 2 / ZZ;
2
> x in ZZ;
false

I'm trying to construct a sparse matrix using Gauss, then feed that into Homalg (using GaussForHomalg), e.g. as follows:

> d := SparseZeroMatrix(2, 2, ZZ);
> SetEntry(d, 1, 1, 2);
> complex := HomalgComplex( 2 * ZZ);
> Add(complex, HomalgMatrix(d, ZZ));

This causes an error on the "SetEntry" line where it complains that 2 isn't in ZZ. (Nor are "2 / ZZ" or "2 * One(ZZ)" or various other similar combinations.) I've also tried replacing HomalgRingOfIntegers with just Integers, which makes "SetEntry" happy but then fails later on when I try to add the sparse matrix to the complex.

Is there some combination of commands I can use to make both Gauss and Homalg happy?

Many thanks,
Josh




More information about the Forum mailing list