Skip to content

Surprising behavior for Matrix command given a ring and list of values not matching the ring #6363

@fingolfin

Description

@fingolfin

I find this very surprising:

gap> Matrix(GF(2), [ 1, 0, 0, 1], 2 );
[ [ 1, 0 ], [ 0, 1 ] ]

I'd expect an error or a result more in line with this:

gap> Matrix(GF(2), Z(2) * [ 1, 0, 0, 1], 2 );
<a 2x2 matrix over GF2>

(Indeed I would find it quite useful to be able to start with integers and have GAP do the conversion; this would then match the OSCAR matrix command. But an error would also be OK I guess).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions