Skip to content

Commit 8451477

Browse files
authored
Introduce explicit field argument and reduce reliance on DefaultFieldOfMatrixGroup (#135)
* Add field argument to ConjugateToSesquilinearForm and ConjugateToStandardForm * Refactor DefaultFieldOfMatrixGroup usage, update tests/docs
1 parent 691d55c commit 8451477

17 files changed

+153
-157
lines changed

gap/ClassicalNormalizerMatrixGroups.gi

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ function(d, q)
1212

1313
AandB := ShallowCopy(GeneratorsOfGroup(ConjugateToSesquilinearForm(Sp(d, q),
1414
"S",
15-
standardForm)));
15+
standardForm,
16+
F)));
1617
gcd := Gcd(d, q - 1);
1718
# generates the center of SL(d, q)
1819
C := zeta ^ QuoInt(q - 1, gcd) * IdentityMat(d, F);
@@ -57,7 +58,7 @@ function(d, q)
5758
C := zeta^(QuoInt((q - 1), Gcd(q - 1, d))) * IdentityMat(d, F); # generates the center of SL(d, q)
5859
g := Gcd(q - 1, d);
5960
c := QuoInt(Gcd(q0 + 1, d) * (q - 1), Lcm(q0 + 1, QuoInt(q - 1, g)) * g);
60-
SUWithIdentityForm := ConjugateToSesquilinearForm(SU(d, q0), "U", IdentityMatrix(GF(q0), d));
61+
SUWithIdentityForm := ConjugateToSesquilinearForm(SU(d, q0), "U", IdentityMatrix(GF(q0), d), F);
6162
SUGens := GeneratorsOfGroup(SUWithIdentityForm);
6263

6364
gens := Concatenation(SUGens, [C]);
@@ -174,5 +175,5 @@ function(epsilon, d, q)
174175
ErrorNoReturn("<q> must be even");
175176
fi;
176177

177-
return ConjugateToStandardForm(SO(epsilon, d, q), "S");
178+
return ConjugateToStandardForm(SO(epsilon, d, q), "S", GF(q));
178179
end);

gap/ExtraspecialNormalizerMatrixGroups.gi

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -733,7 +733,7 @@ function(r, m, q)
733733
# We conjugate the group so that it preserves the standard GAP form
734734
# Antidiag(1, ..., 1).
735735
SetInvariantSesquilinearForm(result, rec(matrix := IdentityMat(r ^ m, F)));
736-
result := ConjugateToStandardForm(result, "U");
736+
result := ConjugateToStandardForm(result, "U", F);
737737

738738
return result;
739739
end);
@@ -763,7 +763,7 @@ function(m, q)
763763
List([1..2 ^ (m - 1)],
764764
i -> [2 * i, 2 * i - 1, -1])));
765765
SetInvariantBilinearForm(result, rec(matrix := gramMatrix));
766-
result := ConjugateToStandardForm(result, "S");
766+
result := ConjugateToStandardForm(result, "S", F);
767767

768768
return result;
769769
end);
@@ -782,7 +782,7 @@ function(m, q)
782782
# This group now preserves the bilinear form given by the identity matrix
783783
# and we conjugate it so that it preserves the standard GAP form
784784
SetInvariantBilinearForm(result, rec(matrix := IdentityMat(2 ^ m, F)));
785-
result := ConjugateToStandardForm(result, "O+");
785+
result := ConjugateToStandardForm(result, "O+", F);
786786

787787
return result;
788788
end);

gap/Forms.gi

Lines changed: 27 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -20,26 +20,21 @@ function(gramMatrix)
2020
return Q;
2121
end);
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.
2723
InstallGlobalFunction("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.
120110
InstallGlobalFunction("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);
186171
end);
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).
289274
InstallGlobalFunction("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).
390370
InstallGlobalFunction("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)
455433
end);
456434

457435
InstallGlobalFunction("SymplecticForm",
458-
function(G)
459-
return BilinearForm(G, "S");
436+
function(G, F)
437+
return BilinearForm(G, "S", F);
460438
end);
461439

462440
InstallGlobalFunction("SymmetricBilinearForm",
463-
function(G)
464-
return BilinearForm(G, "O");
441+
function(G, F)
442+
return BilinearForm(G, "O", F);
465443
end);
466444

467445
InstallGlobalFunction("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

gap/ImprimitiveMatrixGroups.gi

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ function(d, q, t)
5959
# We have to exclude m = 1 since the Forms package has a bug in this case;
6060
# however, this case is trivial.
6161
if m > 1 then
62-
SUChangedForm := ConjugateToSesquilinearForm(SU(m, q), "U", IdentityMat(m, F));
62+
SUChangedForm := ConjugateToSesquilinearForm(SU(m, q), "U", IdentityMat(m, F), F);
6363
else
6464
SUChangedForm := SU(m, q);
6565
fi;
@@ -108,7 +108,7 @@ function(d, q, t)
108108
# change back fixed form into standard GAP form Antidiag(1, ..., 1)
109109
SetInvariantSesquilinearForm(result, rec(matrix := IdentityMat(d, F)));
110110

111-
return ConjugateToStandardForm(result, "U");
111+
return ConjugateToStandardForm(result, "U", F);
112112
end);
113113

114114
# Construction as in Proposition 5.5 of [HR05]
@@ -170,7 +170,7 @@ function(d, q)
170170
result := MatrixGroupWithSize(F, generators, size);
171171
SetInvariantSesquilinearForm(result, rec(matrix := AntidiagonalMat(d, F)));
172172

173-
return ConjugateToStandardForm(result, "U");
173+
return ConjugateToStandardForm(result, "U", F);
174174
end);
175175

176176
# Construction as in Proposition 5.2 of [HR05]
@@ -268,7 +268,7 @@ function(d, q, t)
268268
result := MatrixGroupWithSize(field, gens, SizeSp(m, q) ^ t * Factorial(t));
269269
SetInvariantBilinearForm(result, rec(matrix := AntidiagonalHalfOneMat(d, field)));
270270

271-
return ConjugateToStandardForm(result, "S");
271+
return ConjugateToStandardForm(result, "S", field);
272272
end);
273273

274274
# Construction as in Proposition 5.3 of [HR05]
@@ -316,7 +316,7 @@ function(d, q)
316316
result := MatrixGroupWithSize(field, gens, SizeGL(l, q) * 2);
317317
SetInvariantBilinearForm(result, rec(matrix := AntidiagonalHalfOneMat(d, field)));
318318

319-
return ConjugateToStandardForm(result, "S");
319+
return ConjugateToStandardForm(result, "S", field);
320320
end);
321321

322322
# Construction as in Lemmata 5.2 and 5.3 of [HR10]
@@ -488,11 +488,11 @@ function(epsilon, d, q, epsilon_0, t)
488488
SetInvariantQuadraticFormFromMatrix(result, Q);
489489

490490
if epsilon = -1 then
491-
return ConjugateToStandardForm(result, "O-");
491+
return ConjugateToStandardForm(result, "O-", field);
492492
elif epsilon = 0 then
493-
return ConjugateToStandardForm(result, "O");
493+
return ConjugateToStandardForm(result, "O", field);
494494
else
495-
return ConjugateToStandardForm(result, "O+");
495+
return ConjugateToStandardForm(result, "O+", field);
496496
fi;
497497
end);
498498

@@ -530,7 +530,7 @@ function(d, q)
530530

531531
result := MatrixGroupWithSize(field, gens, size);
532532
SetInvariantQuadraticFormFromMatrix(result, StandardOrthogonalForm(1, d, q).Q);
533-
return ConjugateToStandardForm(result, "O+");
533+
return ConjugateToStandardForm(result, "O+", field);
534534
end);
535535

536536
# Construction as in Lemma 5.4 [HR10]
@@ -591,8 +591,8 @@ function(epsilon, d, q)
591591
SetInvariantQuadraticFormFromMatrix(result, Q);
592592

593593
if epsilon = 1 then
594-
return ConjugateToStandardForm(result, "O+");
594+
return ConjugateToStandardForm(result, "O+", field);
595595
else
596-
return ConjugateToStandardForm(result, "O-");
596+
return ConjugateToStandardForm(result, "O-", field);
597597
fi;
598598
end);

0 commit comments

Comments
 (0)