Skip to content

Matrix(Integer,[[1]]) returns a IsIntegerMatrix but does not implement the MatrixObj protocol #807

@fingolfin

Description

@fingolfin

The following happens with both Semigroups 3.4.2 and 4.0.0:

Without it:

gap> Matrix(Integers, [[1,2],[3,4]]);
<2x2-matrix over Integers>
gap> BaseDomain(last);
Integers

With semigroups loaded:

gap> Matrix(Integers, [[1,2],[3,4]]);
Matrix(IsIntegerMatrix, [[1, 2], [3, 4]])
gap> BaseDomain(last);
Error, no method found!

There are two options to resolve this:

  1. implement BaseDomain and possibly other methods needed to make IsIntegerMatrix compliant with the MatrixObj interface (to the best of your ability -- we definitely need to improve the docs, and add conformance tests)
  2. don't do this, but then also don't change the behaviour of the Matrix(Integers, M) constructor

Observed in gap-system/gap#4805

Metadata

Metadata

Labels

bugLabel for issues or PR which report or fix bugsresolved-pending-releaseA label for issues that are resolved pending a release.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions