You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Using the Matrix/Vector Constructor does not work as expected with Polynomial Rings #6643
This issue might be more of a design decision than a bug report, however in my opinion it should work to be able to create a Matrix/Vector with a Polynomial Ring as the Ring from a list/Matrix/Vector. This is the issue I ran into and discussed with @ThomasBreuer
gap> r := PolynomialRing(GF(4), 1);
GF(2^2)[x_1]
gap> Matrix(IsPlistMatrixRep, r, [[Z(4)]]);
Error, the elements in<list> must lie in<basedomain>
Stack trace:*[1] Error( "the elements in <list> must lie in <basedomain>" );
@ /home/peter/gap/gap/lib/matobjplist.gi:78[2] MakeIsPlistVectorRep( basedomain, PlainListCopy( list ), true )
@ /home/peter/gap/gap/lib/matobjplist.gi:166[3] method( req1, req2, req3 )
@ /home/peter/gap/gap/lib/methsel.g:231[4] NewVector( filterVectors, basedomain, list[i] )
@ /home/peter/gap/gap/lib/matobjplist.gi:201[5] method( req1, req2, req3, req4 )
@ /home/peter/gap/gap/lib/methsel.g:254... at *stdin*:29
you can enter 'quit;' to quit to outer loop, or
you can enter 'return;' to continue
and
gap> Vector(r, [Z(4)]);
Error, the elements in<list> must lie in<basedomain>
Stack trace:*[1] Error( "the elements in <list> must lie in <basedomain>" );
@ /home/peter/gap/gap/lib/matobjplist.gi:78[2] MakeIsPlistVectorRep( basedomain, PlainListCopy( list ), true )
@ /home/peter/gap/gap/lib/matobjplist.gi:166[3] method( req1, req2, req3 )
@ /home/peter/gap/gap/lib/methsel.g:231[4] NewVector( DefaultVectorRepForBaseDomain( R ), R, l )
@ /home/peter/gap/gap/lib/matobj.gi:209<function "Vector method">( <arguments> )
called from read-eval loop at *stdin*:36
you can enter 'quit;' to quit to outer loop, or
you can enter 'return;' to continue
This issue is probably caused by the following.
gap> Z(4) in r;
false
I would argue that using the constructors Matrix/Vector as above should be allowed, as the following also works:
Activity