Skip to content

Subtle problems with IsZmodnZVectorRep, IsZmodnZMatrixRep #6301

@ThomasBreuer

Description

@ThomasBreuer

Currently the basic functions that create these objects assign types which depend on the arguments and hence may be too specific.
For example, currently the following happens.

gap> R:= Integers mod 6;;
gap> z:= NewZeroVector( IsZmodnZVectorRep, R, 3 );;
gap> MakeImmutable( z );
<immutable vector mod 6: [ 0, 0, 0 ]>
gap> IsZero(z);
true
gap> HasIsZero(z);
true
gap> v:= Vector( [ 1, 2, 3 ], z );
<vector mod 6: [ 1, 2, 3 ]>
gap> IsZero( v );
true

The straightforward solution is to use the same approach as for IsPlistVectorRep and IsPlistMatrixRep.
I can provide a pull request for that.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind: bugIssues describing general bugs, and PRs fixing themkind: bug: wrong resultIssues describing bugs that result in mathematically or otherwise wrong results, and PRs fixing them

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions