Skip to content

Commit 08008d1

Browse files
authored
Remove hacks that allowed passing GF(q) instead of GF(q^2) (#137)
These hacks were needed back when we did not pass around the fields explicitly. But they always were a crutch: they help us to deal with the case where e.g. q = p or q = p^3 ("so the user already took the square root") Some tests relied on the removed workaround, so adjust those as well.
1 parent 4ebd310 commit 08008d1

File tree

2 files changed

+5
-15
lines changed

2 files changed

+5
-15
lines changed

gap/Forms.gi

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ function(gramMatrix)
2020
return Q;
2121
end);
2222

23+
# Note that if type = "U" then `field` must be GF(q^2) for a subgroup of GU(d,q)
2324
InstallGlobalFunction("ConjugateToSesquilinearForm",
2425
function(group, type, gramMatrix, field)
2526
local gapForm, newForm, baseChangeMatrix, formMatrix,
@@ -46,10 +47,6 @@ function(group, type, gramMatrix, field)
4647
gapForm := BilinearFormByMatrix(formMatrix, field);
4748
newForm := BilinearFormByMatrix(gramMatrix, field);
4849
elif type = "U" then
49-
if IsOddInt(DegreeOverPrimeField(field)) then
50-
q := Size(field);
51-
field := GF(q ^ 2);
52-
fi;
5350
formMatrix := UnitaryForm(group, field);
5451
if formMatrix = fail then
5552
ErrorNoReturn("No preserved unitary form found for <group>");
@@ -129,11 +126,7 @@ function(group, type, field)
129126
if type in ["S", "O", "O+", "O-"] then
130127
q := Size(field);
131128
else
132-
if IsSquareInt(Size(field)) then
133-
q := RootInt(Size(field));
134-
else
135-
q := Size(field);
136-
fi;
129+
q := Characteristic(field) ^ (DegreeOverPrimeField(field)/2);
137130
fi;
138131

139132
# get standard GAP form
@@ -280,11 +273,7 @@ function(G, F)
280273
if not IsFinite(F) then
281274
ErrorNoReturn("The base field of <G> must be finite");
282275
fi;
283-
if not IsEvenInt(DegreeOverPrimeField(F)) then
284-
q := Size(F);
285-
else
286-
q := RootInt(Size(F));
287-
fi;
276+
q := Characteristic(F) ^ (DegreeOverPrimeField(F)/2);
288277

289278
# Return stored sesquilinear form if it exists and is hermitian
290279
if HasInvariantSesquilinearForm(G) then

tst/quick/Forms.tst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ gap> TestFormChangingFunctions := function(args)
1919
> type := args[3];
2020
> gramMatrix := args[4];
2121
> if type = "U" then
22-
> standardGroup := SU(n, q);
22+
> standardGroup := SU(n, q); q:=q^2;
2323
> elif type = "S" then
2424
> standardGroup := Sp(n, q);
2525
> elif type = "O" then
@@ -55,6 +55,7 @@ gap> TestFormChangingFunctions := function(args)
5555
> fi;
5656
> twiceConjugatedGroup := ConjugateToStandardForm(conjugatedGroup, type, GF(q));
5757
> if type = "U" then
58+
> q := RootInt(q);
5859
> Assert(0, ForAll(GeneratorsOfGroup(conjugatedGroup),
5960
> g -> g * gramMatrix * HermitianConjugate(g, q) = gramMatrix));
6061
> Assert(0, ForAll(GeneratorsOfGroup(twiceConjugatedGroup),

0 commit comments

Comments
 (0)