gap-packages / forms

Forms -- sesquilinear and quadratic, a package for GAP
https://gap-packages.github.io/forms
2 stars 3 forks source link

`PreservedSesquilinearForms` runs into an error when no form is preserved #38

Closed fingolfin closed 1 month ago

fingolfin commented 1 year ago

Consider this error:

gap> PreservedSesquilinearForms(GL(2,5));
[ < bilinear form > ]
gap> PreservedSesquilinearForms(GL(3,5));
Error, Record Element: <rec> must be a record (not a dense plain list) in
  for y in forms!.invariantforms do
    if y[1] in [ "symplectic", "orthogonalplus", "orthogonalminus", "orthogonalcircle" ]
        then
        newform := BilinearFormByMatrix( y[2], field );
        Add( newforms, newform );
    elif y[1] = "unitary" then
        newform := HermitianFormByMatrix( y[2], field );
        Add( newforms, newform );
    elif y[1] = "linear" then
        i := NrRows( One( grp ) );
        newform := BilinearFormByMatrix( NullMat( i, i, field ), field );
        Add( newforms, newform );
    fi;
od; at GAPROOT/pkg/forms/lib/recognition.gi:1012 called from
...

Apparently it is not ready to deal with all possible outputs of PreservedFormsOp:

gap> PreservedFormsOp(GL(2,5));
rec( field := GF(5),
  invariantforms :=
    [ [ "symplectic", [ [ 0*Z(5), Z(5)^0 ], [ Z(5)^2, 0*Z(5) ] ], [ fail, Z(5)^0 ] ] ],
  maybeDual := true, maybeFrobenius := false )
gap> PreservedFormsOp(GL(3,5));
rec( field := GF(5), invariantforms := [ [ "linear" ] ], maybeDual := false,
  maybeFrobenius := false )
jdebeule commented 1 month ago

This issue has been solved in the new release of forms (1.2.21) of 31st of August 2024:

gap> PreservedSesquilinearForms(GL(2,5)); [ < bilinear form > ] gap> PreservedSesquilinearForms(GL(3,5)); [ ] gap> PreservedFormsOp(GL(2,5)); rec( field := GF(5), invariantforms := [ [ "symplectic", [ [ 0*Z(5), Z(5)^0 ], [ Z(5)^2, 0*Z(5) ] ], [ Z(5), Z(5)^0 ] ] ], maybeDual := true, maybeFrobenius := false )