Skip to content

Commit 4de362a

Browse files
committed
Avoid BaseChangeHomomorphism
It induces unnecessary overhead
1 parent 1375b8b commit 4de362a

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

gap/Forms.gi

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ end);
2626
# appropriate field.
2727
InstallGlobalFunction("ConjugateToSesquilinearForm",
2828
function(group, type, gramMatrix)
29-
local gapForm, newForm, gapToCanonical, canonicalToNew, field, formMatrix,
29+
local gapForm, newForm, baseChangeMatrix, field, formMatrix,
3030
result, d, q, broadType;
3131
if not type in ["S", "O-B", "O-Q", "U"] then
3232
ErrorNoReturn("<type> must be one of 'S', 'U', 'O-B', 'O-Q'");
@@ -82,12 +82,9 @@ function(group, type, gramMatrix)
8282
ErrorNoReturn("The form preserved by <group> must be similar to the form ",
8383
"described by the Gram matrix <gramMatrix>.");
8484
fi;
85-
gapToCanonical := BaseChangeHomomorphism(BaseChangeToCanonical(gapForm),
86-
field);
87-
canonicalToNew := BaseChangeHomomorphism(BaseChangeToCanonical(newForm) ^ (-1),
88-
field);
89-
result := MatrixGroup(field, canonicalToNew(gapToCanonical(GeneratorsOfGroup(group))));
90-
85+
baseChangeMatrix := BaseChangeToCanonical(gapForm)^-1 * BaseChangeToCanonical(newForm);
86+
result := MatrixGroup(field, List(GeneratorsOfGroup(group), g -> g ^ baseChangeMatrix));
87+
9188
# Set useful attributes
9289
UseIsomorphismRelation(group, result);
9390
else

tst/standard/ExtraspecialNormalizerMatrixGroups.tst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,9 @@ gap> TestExtraspecialNormalizerInOmega := function(m, q)
134134
> CheckIsSubsetOmega(1, 2 ^ m, q, G);
135135
> CheckSize(G);
136136
> end;;
137-
gap> TestExtraspecialNormalizerInOmega(3, 3);
137+
#@if IsBound(CLASSICAL_MAXIMALS_RUN_BROKEN_TESTS)
138+
gap> TestExtraspecialNormalizerInOmega(3, 3); # FIXME: 'Error, the recognition described by this recognition node has failed!' or 'Error, This should never have happened (346), tell Max.'
139+
#@fi
138140
gap> TestExtraspecialNormalizerInOmega(3, 5);
139141
gap> TestExtraspecialNormalizerInOmega(3, 7);
140142
#@if IsBound(CLASSICAL_MAXIMALS_RUN_BROKEN_TESTS)

0 commit comments

Comments
 (0)