From 379de8bf868c531d5b385d9743eb4468f11eebb4 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Mon, 22 Mar 2021 00:17:39 +0100 Subject: [PATCH] Fix InvariantQuadraticForm for Omega(-1, 2*d, 2^n) Also add proper tests to check that the quadratic forms are indeed correct (the existing tests were too weak). --- grp/classic.gi | 6 ++---- tst/testinstall/grp/classic-forms.tst | 8 ++++++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/grp/classic.gi b/grp/classic.gi index 92cb49f0e7..1cc9972daf 100644 --- a/grp/classic.gi +++ b/grp/classic.gi @@ -1789,10 +1789,8 @@ BindGlobal( "OmegaMinus", function( d, q ) x[i,d-i+1] := o; od; x[m,d-m+1] := -nu - nubar; - if q mod 2 = 1 then - x[m,d-m] := -o; - x[m+1,d-m+1] := xi^( (q+1)/2 ); - fi; + x[m,d-m] := -o; + x[m+1,d-m+1] := -xi; x:= ImmutableMatrix( f, x, true ); SetInvariantQuadraticFormFromMatrix( g, x ); diff --git a/tst/testinstall/grp/classic-forms.tst b/tst/testinstall/grp/classic-forms.tst index 2db908f12d..8bfcd6e060 100644 --- a/tst/testinstall/grp/classic-forms.tst +++ b/tst/testinstall/grp/classic-forms.tst @@ -21,10 +21,14 @@ gap> CheckBilinearForm := function(G) > g -> g*M*TransposedMat(g) = M); > end;; gap> CheckQuadraticForm := function(G) -> local M, Q; +> local M, Q, V, vecs; > M := InvariantBilinearForm(G).matrix; > Q := InvariantQuadraticForm(G).matrix; -> return Q+TransposedMat(Q) = M; +> V := FieldOfMatrixGroup(G)^DegreeOfMatrixGroup(G); +> vecs:=List([1..100], i->Random(V)); +> return (Q+TransposedMat(Q) = M) and ForAll(vecs, +> v->ForAll(GeneratorsOfGroup(G), +> g -> v*Q*v = (v*g)*Q*(v*g))); > end;; gap> frob := function(g,aut) > return List(g,row->List(row,x->x^aut));