@@ -784,17 +784,17 @@ InstallMethod( SpecialUnitaryGroupCons,
784784 g:= SpecialUnitaryGroupCons( filt, d, q );
785785 stored:= InvariantSesquilinearForm( g ).matrix;
786786
787- # If the prescribed form fits then just return.
788- if stored = form!. matrix then
789- return g;
790- fi ;
791-
792787 # Check that 'form' lives over the intended field.
793788 F:= GF(q^ 2 );
794789 if not IsSubset( F, form!. basefield ) then
795790 Error( " the defining field of <form> does not fit to <q>" );
796791 fi ;
797792
793+ # If the prescribed form fits then just return.
794+ if stored = form!. matrix then
795+ return g;
796+ fi ;
797+
798798 # Compute a base change matrix.
799799 # (Check that the canonical forms are equal.)
800800 wanted:= HermitianFormByMatrix( stored, F );
@@ -928,6 +928,11 @@ InstallMethod( SymplecticGroupCons,
928928 g:= SymplecticGroupCons( filt, d, F );
929929 stored:= InvariantBilinearForm( g ).matrix;
930930
931+ # Check that 'form' lives over the intended field.
932+ if not IsSubset( F, form!. basefield ) then
933+ Error( " the defining field of <form> does not fit to <q>" );
934+ fi ;
935+
931936 # If the prescribed form fits then just return.
932937 form_matrix:= Matrix( form!. matrix, stored );
933938# T This 'Matrix' call should become unnecessary.
@@ -936,12 +941,6 @@ InstallMethod( SymplecticGroupCons,
936941 return g;
937942 fi ;
938943
939- # Check that 'form' lives over the intended field.
940- F:= GF(q);
941- if not IsSubset( F, form!. basefield ) then
942- Error( " the defining field of <form> does not fit to <q>" );
943- fi ;
944-
945944 # Compute a base change matrix.
946945 # (Check that the canonical forms are equal.)
947946 wanted:= BilinearFormByMatrix( stored, F );
@@ -964,7 +963,7 @@ InstallMethod( SymplecticGroupCons,
964963 SetName( gg, Name( g ) );
965964 fi ;
966965
967- SetInvariantBilinearForm( gg, rec ( matrix:= form !. matrix ,
966+ SetInvariantBilinearForm( gg, rec ( matrix:= form_matrix ,
968967 baseDomain:= F ) );
969968 if HasIsFullSubgroupGLorSLRespectingBilinearForm( g ) then
970969 SetIsFullSubgroupGLorSLRespectingBilinearForm( gg,
0 commit comments