@@ -20,26 +20,21 @@ function(gramMatrix)
2020 return Q;
2121end );
2222
23- # One needs to ensure that the attribute DefaultFieldOfMatrixGroup is set
24- # correctly for <group>; this can be done, for example, by making the
25- # generators used during construction of the group immutable matrices over the
26- # appropriate field.
2723InstallGlobalFunction(" ConjugateToSesquilinearForm" ,
28- function (group, type, gramMatrix )
29- local gapForm, newForm, baseChangeMatrix, field, formMatrix,
24+ function (group, type, gramMatrix, field )
25+ local gapForm, newForm, baseChangeMatrix, formMatrix,
3026 result, d, q, broadType;
3127 if not type in [ " S" , " O-B" , " O-Q" , " U" ] then
3228 ErrorNoReturn(" <type> must be one of 'S', 'U', 'O-B', 'O-Q'" );
3329 fi ;
3430 d := DimensionOfMatrixGroup(group);
35- field := DefaultFieldOfMatrixGroup(group);
3631 if type = " S" or type = " O-B" then
3732 if type = " S" then
3833 broadType := type;
3934 else
4035 broadType := " O" ;
4136 fi ;
42- formMatrix := BilinearForm(group, broadType);
37+ formMatrix := BilinearForm(group, broadType, field );
4338 if formMatrix = fail then
4439 if type = " S" then
4540 ErrorNoReturn(" No preserved symplectic form found for <group>" );
@@ -55,15 +50,15 @@ function(group, type, gramMatrix)
5550 q := Size(field);
5651 field := GF(q ^ 2 );
5752 fi ;
58- formMatrix := UnitaryForm(group);
53+ formMatrix := UnitaryForm(group, field );
5954 if formMatrix = fail then
6055 ErrorNoReturn(" No preserved unitary form found for <group>" );
6156 fi ;
6257 gapForm := HermitianFormByMatrix(formMatrix, field);
6358 newForm := HermitianFormByMatrix(gramMatrix, field);
6459 else
6560 # This is the case type = "O-Q"
66- formMatrix := QuadraticForm(group);
61+ formMatrix := QuadraticForm(group, field );
6762 if formMatrix = fail then
6863 ErrorNoReturn(" No preserved quadratic form found for <group>" );
6964 fi ;
@@ -112,42 +107,32 @@ end);
112107# If <group> preserves a sesquilinear form of type <type> (one of "S", "U", "O"
113108# (in odd dimension), "O+" or "O-" (both in even dimension), return a group
114109# conjugate to <group> preserving the standard form of that type.
115- #
116- # Also, one need to ensure that the attribute DefaultFieldOfMatrixGroup is set
117- # correctly for <group>; this can be done, for example, by making the
118- # generators used during construction of the group immutable matrices over the
119- # appropriate field.
120110InstallGlobalFunction(" ConjugateToStandardForm" ,
121- function (group, type )
122- local d, F, q, gapForm, broadType;
111+ function (group, type, field )
112+ local d, q, gapForm, broadType;
123113
124114 # determining d (dimension of matrix group), F (base field) and q (order of
125115 # F) plus some sanity checks
126116 if not type in [ " S" , " O+" , " O-" , " O" , " U" ] then
127117 ErrorNoReturn(" <type> must be one of 'S', 'U', 'O+', 'O-', 'O'" );
128118 fi ;
129- F := DefaultFieldOfMatrixGroup(group);
130119 d := DimensionOfMatrixGroup(group);
131120 if type = " O" and IsEvenInt(d) then
132121 ErrorNoReturn(" <type> cannot be 'O' if the dimension of <group> is even" );
133122 elif type in [ " O+" , " O-" ] and IsOddInt(d) then
134123 ErrorNoReturn(" <type> cannot be 'O+' or 'O-' if the dimension of" ,
135124 " <group> is odd" );
136- elif IsEvenInt(Size(F )) and IsOddInt(d) and type in [ " O+" , " O-" , " O" ] then
125+ elif IsEvenInt(Size(field )) and IsOddInt(d) and type in [ " O+" , " O-" , " O" ] then
137126 ErrorNoReturn(" If <type> is 'O+', 'O-' or 'O' and the size of <F> is" ,
138127 " even, <d> must be even" );
139128 fi ;
140129 if type in [ " S" , " O" , " O+" , " O-" ] then
141- q := Size(F );
130+ q := Size(field );
142131 else
143- if IsSquareInt(Size(F )) then
144- q := RootInt(Size(F ));
132+ if IsSquareInt(Size(field )) then
133+ q := RootInt(Size(field ));
145134 else
146- # It might be that G is to be understood as a matrix group over
147- # GF(q ^ 2), but the matrices can actually be represented over a
148- # smaller field, which causes DefaultFieldOfMatrixGroup to return GF(q)
149- # instead of GF(q ^ 2) - we have to remedy this somehow ...
150- q := Size(F);
135+ q := Size(field);
151136 fi ;
152137 fi ;
153138
@@ -159,21 +144,21 @@ function(group, type)
159144 elif type = " O" then
160145 gapForm := InvariantBilinearForm(Omega(d, q)).matrix;
161146 elif type = " O+" then
162- if Characteristic(F ) = 2 then
147+ if Characteristic(field ) = 2 then
163148 gapForm := InvariantQuadraticForm(Omega(1 , d, q)).matrix;
164149 else
165150 gapForm := InvariantBilinearForm(Omega(1 , d, q)).matrix;
166151 fi ;
167152 elif type = " O-" then
168- if Characteristic(F ) = 2 then
153+ if Characteristic(field ) = 2 then
169154 gapForm := InvariantQuadraticForm(Omega(- 1 , d, q)).matrix;
170155 else
171156 gapForm := InvariantBilinearForm(Omega(- 1 , d, q)).matrix;
172157 fi ;
173158 fi ;
174159
175160 if type in [ " O" , " O+" , " O-" ] then
176- if Characteristic(F ) = 2 then
161+ if Characteristic(field ) = 2 then
177162 broadType := " O-Q" ;
178163 else
179164 broadType := " O-B" ;
@@ -182,7 +167,7 @@ function(group, type)
182167 broadType := type;
183168 fi ;
184169
185- return ConjugateToSesquilinearForm(group, broadType, gapForm);
170+ return ConjugateToSesquilinearForm(group, broadType, gapForm, field );
186171end );
187172
188173# Let <forms> = [f1, f2, ..., ft] be a list of sesquilinear forms on the vector
@@ -287,20 +272,15 @@ end);
287272# In general, this function should only be used if one can be sure that <G>
288273# preserves a unitary form (but one does not know which one).
289274InstallGlobalFunction(" UnitaryForm" ,
290- function (G )
291- local d, F, q, M, inverseHermitianConjugateM, formMatrix, row, col, x,
275+ function (G, F )
276+ local d, q, M, inverseHermitianConjugateM, formMatrix, row, col, x,
292277 scalar, counter;
293278
294279 d := DimensionOfMatrixGroup(G);
295- F := DefaultFieldOfMatrixGroup(G);
296280 if not IsFinite(F) then
297281 ErrorNoReturn(" The base field of <G> must be finite" );
298282 fi ;
299283 if not IsEvenInt(DegreeOverPrimeField(F)) then
300- # It might be that G is to be understood as a matrix group over
301- # GF(q ^ 2), but the matrices can actually be represented over a
302- # smaller field, which causes DefaultFieldOfMatrixGroup to return GF(q)
303- # instead of GF(q ^ 2) - we have to remedy this somehow ...
304284 q := Size(F);
305285 else
306286 q := RootInt(Size(F));
@@ -388,8 +368,8 @@ end);
388368# In general, this function should only be used if one can be sure that <G>
389369# preserves a bilinear form (but one does not know which one).
390370InstallGlobalFunction(" BilinearForm" ,
391- function (G, type )
392- local F, M, inverseTransposeM, counter, formMatrix, condition;
371+ function (G, type, F )
372+ local M, inverseTransposeM, counter, formMatrix, condition;
393373
394374 if not type in [ " S" , " O" ] then
395375 ErrorNoReturn(" <type> must be one of 'S', 'O'" );
@@ -402,8 +382,6 @@ function(G, type)
402382 condition := x -> (x = TransposedMat(x));
403383 fi ;
404384
405- F := DefaultFieldOfMatrixGroup(G);
406-
407385 # Return stored bilinear form if it exists and is symplectic / symmetric
408386 if HasInvariantBilinearForm(G) then
409387 formMatrix := InvariantBilinearForm(G).matrix;
@@ -455,22 +433,21 @@ function(G, type)
455433end );
456434
457435InstallGlobalFunction(" SymplecticForm" ,
458- function (G )
459- return BilinearForm(G, " S" );
436+ function (G, F )
437+ return BilinearForm(G, " S" , F );
460438end );
461439
462440InstallGlobalFunction(" SymmetricBilinearForm" ,
463- function (G )
464- return BilinearForm(G, " O" );
441+ function (G, F )
442+ return BilinearForm(G, " O" , F );
465443end );
466444
467445InstallGlobalFunction(" QuadraticForm" ,
468- function (G )
469- local d, F, formMatrix, polarFormMatrix, i, g, RightSideForLinSys,
446+ function (G, F )
447+ local d, formMatrix, polarFormMatrix, i, g, RightSideForLinSys,
470448 MatrixForLinSys, x;
471449
472450 d := DimensionOfMatrixGroup(G);
473- F := DefaultFieldOfMatrixGroup(G);
474451 if not IsFinite(F) then
475452 ErrorNoReturn(" The base field of <G> must be finite" );
476453 fi ;
@@ -482,7 +459,7 @@ function(G)
482459
483460 # We first look for an invariant symmetric bilinear form of G, which will
484461 # be the polar form of the desired quadratic form
485- polarFormMatrix := SymmetricBilinearForm(G);
462+ polarFormMatrix := SymmetricBilinearForm(G, F );
486463 # The Gram matrix formMatrix of the quadratic form is upper triangular and
487464 # polarFormMatrix = formMatrix + formMatrix ^ T, so the entries above the
488465 # main diagonal of polarFormMatrix and formMatrix must be the same
0 commit comments