Skip to content

Matrix objects do not belong to IsAssociativeElement and there're no filters to identify collections of matrix objects #4815

@james-d-mitchell

Description

@james-d-mitchell

In the current master branch

Observed behaviour

gap> coll := [Matrix(Integers, [[0, 2, 1], [1, 0, 1], [0, 2, 1]]),
>     Matrix(Integers, [[5, 1, 1], [0, 0, 1], [2, 4, 3]])];
[ <3x3-matrix over Integers>, <3x3-matrix over Integers> ]
gap> IsAssociativeElement(coll[1]);
false
gap> IsMultiplicativeElementCollection(coll);
false

Expected behaviour

Multiplication of square matrices is associative, so ideally, IsAssociativeElement(coll[1]); would return true, and equally IsMultiplicativeElementCollection(coll); would return true too. It'd be useful if there was a category IsMatrixObjCollection too, not sure if that should be a separate issue.

I encountered this issue when trying to resolve the issues in the Semigroups package caused by 3e9fb2a. After this change it is not longer even possible to create semigroups consisting of integer matrices. Prior to this change it was possible with the Semigroups package loaded (since 2015).

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