Skip to content

Commit 5c3aefd

Browse files
committed
reworked the proposal
Now the declaration of `CSp` and those methods for it that do not involve forms will be added to the GAP library. Also, the implementation of `Sp` in GAP admits already an optional filter that defines the representation of the matrices, and the delegation between its methods has been changed as for `CSp` (the methods with argument `q` delegate to those with argument `GF(q)`, not the other way round). For this pull request, this means that - the files involving code and tests involving `CSp` are read only if GAP provides the variable `CSp`, - the delegation between methods for `Sp` that are provided by the Forms package has been changed as well, - the methods in the Forms package now support a `baseDomain` component in the attributes describing invariant forms, - calls of `FieldOfMatrixGroup` are replaced by access to the new `baseDomain` component of form records where applicable (for backwards compatibility with older GAP versions, the helper function `Forms_FieldOfDefinition` calls `FieldOfMatrixGroup` if no `baseDomain` component is available).
1 parent 26ea175 commit 5c3aefd

File tree

8 files changed

+132
-439
lines changed

8 files changed

+132
-439
lines changed

init.g

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,7 @@
1414

1515
ReadPackage("forms","lib/forms.gd");
1616
ReadPackage("forms","lib/recognition.gd");
17-
ReadPackage("forms","lib/conformal.gd");
17+
18+
if IsBound( ConformalSymplecticGroup ) then
19+
ReadPackage("forms","lib/conformal.gd");
20+
fi;

lib/classic.gi

Lines changed: 33 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ BindGlobal("Forms_OrthogonalGroup",
109109
fi;
110110

111111
mat:= matinv * InvariantBilinearForm( g ).matrix * TransposedMat( matinv );
112-
SetInvariantBilinearForm( gg, rec( matrix:= mat ) );
112+
SetInvariantBilinearForm( gg, rec( matrix:= mat, baseDomain:= gf ) );
113113
if Characteristic( gf ) <> 2 and
114114
HasIsFullSubgroupGLorSLRespectingBilinearForm( g ) then
115115
SetIsFullSubgroupGLorSLRespectingBilinearForm( gg,
@@ -832,8 +832,8 @@ end );
832832
#############################################################################
833833
##
834834
#O SymplecticGroupCons( <filter>, <form> )
835-
#O SymplecticGroupCons( <filter>, <d>, <q>, <form> )
836835
#O SymplecticGroupCons( <filter>, <d>, <R>, <form> )
836+
#O SymplecticGroupCons( <filter>, <d>, <q>, <form> )
837837
##
838838
## 'SymplecticGroup' is a plain function that is defined in the GAP
839839
## library.
@@ -845,10 +845,10 @@ Perform(
845845
[ IsMatrixOrMatrixObj, IsBilinearForm, IsGroup and HasInvariantBilinearForm ],
846846
function( obj )
847847
DeclareConstructor( "SymplecticGroupCons", [ IsGroup, obj ] );
848-
DeclareConstructor( "SymplecticGroupCons",
849-
[ IsGroup, IsPosInt, IsPosInt, obj ] );
850848
DeclareConstructor( "SymplecticGroupCons",
851849
[ IsGroup, IsPosInt, IsRing, obj ] );
850+
DeclareConstructor( "SymplecticGroupCons",
851+
[ IsGroup, IsPosInt, IsPosInt, obj ] );
852852
end );
853853

854854

@@ -875,7 +875,7 @@ InstallMethod( SymplecticGroupCons,
875875
[ IsMatrixGroup and IsFinite, IsBilinearForm ],
876876
{ filt, form } -> SymplecticGroupCons( filt,
877877
NumberRows( form!.matrix ),
878-
Size( form!.basefield ), form ) );
878+
form!.basefield, form ) );
879879

880880

881881
#############################################################################
@@ -888,7 +888,7 @@ InstallMethod( SymplecticGroupCons,
888888
IsPosInt,
889889
IsPosInt,
890890
IsMatrixOrMatrixObj ],
891-
{ filt, d, q, mat } -> SymplecticGroupCons( filt, d, q,
891+
{ filt, d, q, mat } -> SymplecticGroupCons( filt, d, GF(q),
892892
BilinearFormByMatrix( mat, GF(q) ) ) );
893893

894894
InstallMethod( SymplecticGroupCons,
@@ -897,7 +897,7 @@ InstallMethod( SymplecticGroupCons,
897897
IsPosInt,
898898
IsPosInt,
899899
IsGroup and HasInvariantBilinearForm ],
900-
{ filt, d, q, G } -> SymplecticGroupCons( filt, d, q,
900+
{ filt, d, q, G } -> SymplecticGroupCons( filt, d, GF(q),
901901
BilinearFormByMatrix(
902902
InvariantBilinearForm( G ).matrix, GF(q) ) ) );
903903

@@ -907,15 +907,32 @@ InstallMethod( SymplecticGroupCons,
907907
IsPosInt,
908908
IsPosInt,
909909
IsBilinearForm ],
910-
function( filt, d, q, form )
911-
local g, stored, F, wanted, mat1, mat2, mat, matinv, gens, gg;
910+
{ filt, d, q, form } -> SymplecticGroupCons( filt, d, GF(q), form ) );
911+
912+
913+
#############################################################################
914+
##
915+
#M SymplecticGroupCons( <filt>, <d>, <F>, <form> )
916+
##
917+
InstallMethod( SymplecticGroupCons,
918+
"matrix group for dimension, finite field, form",
919+
[ IsMatrixGroup and IsFinite,
920+
IsPosInt,
921+
IsField and IsFinite,
922+
IsBilinearForm ],
923+
function( filt, d, F, form )
924+
local q, g, stored, form_matrix, wanted, mat1, mat2, mat, matinv, gens, gg;
912925

913926
# Create the default generators and form.
914-
g:= SymplecticGroupCons( filt, d, q );
927+
q:= Size( F );
928+
g:= SymplecticGroupCons( filt, d, F );
915929
stored:= InvariantBilinearForm( g ).matrix;
916930

917931
# If the prescribed form fits then just return.
918-
if stored = form!.matrix then
932+
form_matrix:= Matrix( form!.matrix, stored );
933+
#T This 'Matrix' call should become unnecessary.
934+
#T For that, the functions used below have to support 'IsMatrixObj' arguments.
935+
if stored = form_matrix then
919936
return g;
920937
fi;
921938

@@ -928,9 +945,9 @@ InstallMethod( SymplecticGroupCons,
928945
# Compute a base change matrix.
929946
# (Check that the canonical forms are equal.)
930947
wanted:= BilinearFormByMatrix( stored, F );
931-
mat1:= BaseChangeToCanonical( form );
932-
mat2:= BaseChangeToCanonical( wanted );
933-
if mat1 * form!.matrix * TransposedMat( mat1 ) <>
948+
mat1:= Matrix( BaseChangeToCanonical( form ), stored );
949+
mat2:= Matrix( BaseChangeToCanonical( wanted ), stored );
950+
if mat1 * form_matrix * TransposedMat( mat1 ) <>
934951
mat2 * stored * TransposedMat( mat2 ) then
935952
Error( "canonical forms of <form> and <wanted> differ" );
936953
fi;
@@ -957,18 +974,13 @@ InstallMethod( SymplecticGroupCons,
957974
return gg;
958975
end );
959976

960-
961-
#############################################################################
962-
##
963-
#M SymplecticGroupCons( <filt>, <d>, <R>, <form> )
964-
##
965977
InstallMethod( SymplecticGroupCons,
966978
"matrix group for dimension, finite field, matrix of form",
967979
[ IsMatrixGroup and IsFinite,
968980
IsPosInt,
969981
IsField and IsFinite,
970982
IsMatrixOrMatrixObj ],
971-
{ filt, d, F, form } -> SymplecticGroupCons( filt, d, Size( F ),
983+
{ filt, d, F, form } -> SymplecticGroupCons( filt, d, F,
972984
BilinearFormByMatrix( form, F ) ) );
973985

974986
InstallMethod( SymplecticGroupCons,
@@ -977,14 +989,6 @@ InstallMethod( SymplecticGroupCons,
977989
IsPosInt,
978990
IsField and IsFinite,
979991
IsGroup and HasInvariantBilinearForm ],
980-
{ filt, d, F, G } -> SymplecticGroupCons( filt, d, Size( F ),
992+
{ filt, d, F, G } -> SymplecticGroupCons( filt, d, F,
981993
BilinearFormByMatrix(
982994
InvariantBilinearForm( G ).matrix, F ) ) );
983-
984-
InstallMethod( SymplecticGroupCons,
985-
"matrix group for dimension, finite field, form",
986-
[ IsMatrixGroup and IsFinite,
987-
IsPosInt,
988-
IsField and IsFinite,
989-
IsBilinearForm ],
990-
{ filt, d, F, form } -> SymplecticGroupCons( filt, d, Size( F ), form ) );

lib/conformal.gd

Lines changed: 12 additions & 136 deletions
Original file line numberDiff line numberDiff line change
@@ -1,152 +1,28 @@
11
#############################################################################
22
##
3-
#A InvariantBilinearFormUpToScalars( <matgrp> )
3+
## conformal.gd 'Forms' package
44
##
5-
## <#GAPDoc Label="InvariantBilinearFormUpToScalars">
6-
## <ManSection>
7-
## <Attr Name="InvariantBilinearFormUpToScalars" Arg='matgrp'/>
8-
##
9-
## <Description>
10-
## This attribute describes a bilinear form that is invariant up to scalars
11-
## under the matrix group <A>matgrp</A>.
12-
## The form is given by a record with the component <C>matrix</C>
13-
## which is a matrix <M>J</M> such that for every generator <M>g</M> of
14-
## <A>matgrp</A> the equation <M>g \cdot J \cdot g^{tr} = \lambda(g) J</M>
15-
## holds, for <M>\lambda(g)</M> in the
16-
## <Ref Attr="FieldOfMatrixGroup" BookName="ref"/> value of <A>matgrp</A>.
17-
## </Description>
18-
## </ManSection>
19-
## <#/GAPDoc>
20-
##
21-
DeclareAttribute( "InvariantBilinearFormUpToScalars", IsMatrixGroup );
22-
23-
24-
#############################################################################
25-
##
26-
#P IsFullSubgroupGLRespectingBilinearFormUpToScalars( <matgrp> )
27-
##
28-
## <#GAPDoc Label="IsFullSubgroupGLRespectingBilinearFormUpToScalars">
29-
## <ManSection>
30-
## <Prop Name="IsFullSubgroupGLRespectingBilinearFormUpToScalars"
31-
## Arg='matgrp'/>
32-
##
33-
## <Description>
34-
## This property tests whether the matrix group <A>matgrp</A> is the full
35-
## subgroup of GL respecting, up to scalars, the form stored as the value of
36-
## <Ref Attr="InvariantBilinearFormUpToScalars"/> for <A>matgrp</A>.
37-
## </Description>
38-
## </ManSection>
39-
## <#/GAPDoc>
40-
##
41-
DeclareProperty( "IsFullSubgroupGLRespectingBilinearFormUpToScalars",
42-
IsMatrixGroup );
43-
44-
InstallTrueMethod( IsGroup,
45-
IsFullSubgroupGLRespectingBilinearFormUpToScalars );
46-
475

486
#############################################################################
497
##
508
#O ConformalSymplecticGroupCons( <filter>, <form> )
519
#O ConformalSymplecticGroupCons( <filter>, <matrix> )
5210
#O ConformalSymplecticGroupCons( <filter>, <G> )
53-
#O ConformalSymplecticGroupCons( <filter>, <d>, <R> )
5411
#O ConformalSymplecticGroupCons( <filter>, <d>, <R>, <form> )
5512
#O ConformalSymplecticGroupCons( <filter>, <d>, <R>, <matrix> )
5613
#O ConformalSymplecticGroupCons( <filter>, <d>, <R>, <G> )
57-
#O ConformalSymplecticGroupCons( <filter>, <d>, <q> )
5814
#O ConformalSymplecticGroupCons( <filter>, <d>, <q>, <form> )
5915
#O ConformalSymplecticGroupCons( <filter>, <d>, <q>, <matrix> )
6016
#O ConformalSymplecticGroupCons( <filter>, <d>, <q>, <G> )
6117
##
62-
DeclareConstructor( "ConformalSymplecticGroupCons", [ IsGroup, IsBilinearForm ] );
63-
DeclareConstructor( "ConformalSymplecticGroupCons", [ IsGroup, IsMatrixOrMatrixObj ] );
64-
DeclareConstructor( "ConformalSymplecticGroupCons", [ IsGroup, IsGroup ] );
65-
DeclareConstructor( "ConformalSymplecticGroupCons", [ IsGroup, IsPosInt, IsRing ] );
66-
DeclareConstructor( "ConformalSymplecticGroupCons", [ IsGroup, IsPosInt, IsRing, IsBilinearForm ] );
67-
DeclareConstructor( "ConformalSymplecticGroupCons", [ IsGroup, IsPosInt, IsRing, IsMatrixOrMatrixObj ] );
68-
DeclareConstructor( "ConformalSymplecticGroupCons", [ IsGroup, IsPosInt, IsRing, IsGroup ] );
69-
DeclareConstructor( "ConformalSymplecticGroupCons", [ IsGroup, IsPosInt, IsPosInt ] );
70-
DeclareConstructor( "ConformalSymplecticGroupCons", [ IsGroup, IsPosInt, IsPosInt, IsBilinearForm ] );
71-
DeclareConstructor( "ConformalSymplecticGroupCons", [ IsGroup, IsPosInt, IsPosInt, IsMatrixOrMatrixObj ] );
72-
DeclareConstructor( "ConformalSymplecticGroupCons", [ IsGroup, IsPosInt, IsPosInt, IsGroup ] );
73-
74-
75-
#############################################################################
76-
##
77-
#F ConformalSymplecticGroup( [<filt>, ]<d>, <q>[, <form>] ) conf. sympl. gp.
78-
#F ConformalSymplecticGroup( [<filt>, ]<d>, <R>[, <form>] ) conf. sympl. gp.
79-
#F ConformalSymplecticGroup( [<filt>, ]<form> ) conformal symplectic group
80-
#F CSp( [<filt>, ]<d>, <q>[, <form>] ) conformal symplectic group
81-
#F CSp( [<filt>, ]<d>, <R>[, <form>] ) conformal symplectic group
82-
#F CSp( [<filt>, ]<form> ) conformal symplectic group
83-
##
84-
## <#GAPDoc Label="ConformalSymplecticGroup">
85-
## <ManSection>
86-
## <Heading>ConformalSymplecticGroup</Heading>
87-
## <Func Name="ConformalSymplecticGroup" Arg='[filt, ]d, R[, form]'
88-
## Label="for dimension and a ring"/>
89-
## <Func Name="ConformalSymplecticGroup" Arg='[filt, ]d, q[, form]'
90-
## Label="for dimension and field size"/>
91-
## <Func Name="ConformalSymplecticGroup" Arg='[filt, ]form'
92-
## Label="for form"/>
93-
## <Func Name="CSp" Arg='[filt, ]d, R[, form]'
94-
## Label="for dimension and a ring"/>
95-
## <Func Name="CSp" Arg='[filt, ]d, q[, form]'
96-
## Label="for dimension and field size"/>
97-
## <Func Name="CSp" Arg='[filt, ]form'
98-
## Label="for form"/>
99-
##
100-
## <Description>
101-
## constructs a group isomorphic to the conformal symplectic group
102-
## CSp( <A>d</A>, <A>R</A> ) of those <M><A>d</A> \times <A>d</A></M>
103-
## matrices over the ring <A>R</A> or the field with <A>q</A> elements,
104-
## respectively,
105-
## that respect a fixed nondegenerate symplectic form up to scalars,
106-
## in the category given by the filter <A>filt</A>.
107-
## <P/>
108-
## Currently only finite fields <A>R</A> are supported.
109-
## <P/>
110-
## If <A>filt</A> is not given it defaults to
111-
## <Ref Filt="IsMatrixGroup" BookName="ref"/>,
112-
## and the returned group is the conformal symplectic group itself.
113-
## Another supported value for <A>filt</A> is
114-
## <Ref Filt="IsPermGroup" BookName="ref"/>;
115-
## in this case, the argument <A>form</A> is not supported.
116-
## <P/>
117-
## If the arguments describe a matrix group over a finite field then
118-
## the desired bilinear form can be specified via <A>form</A>,
119-
## which can be either a matrix
120-
## or a form object in <Ref Filt="IsBilinearForm"/>
121-
## or a group with stored
122-
## <Ref Attr="InvariantBilinearForm" BookName="ref"/> or
123-
## <Ref Attr="InvariantBilinearFormUpToScalars"/> value
124-
## (and then this form is taken).
125-
## <P/>
126-
## A given <A>form</A> determines and <A>d</A>, and also <A>R</A>
127-
## except if <A>form</A> is a matrix that does not store its
128-
## <Ref Attr="BaseDomain" Label="for a matrix object" BookName="ref"/> value.
129-
## These parameters can be entered, and an error is signalled if they do
130-
## not fit to the given <A>form</A>.
131-
## <P/>
132-
## If <A>form</A> is not given then a default is chosen as described in the
133-
## introduction to Section <Ref Sect="Classical Groups" BookName="ref"/>.
134-
## <P/>
135-
## <Example><![CDATA[
136-
## gap> g:= ConformalSymplecticGroup( 4, 2 );
137-
## CSp(4,2)
138-
## gap> Size( g );
139-
## 720
140-
## gap> StructureDescription( g );
141-
## "S6"
142-
## gap> ConformalSymplecticGroup( IsPermGroup, 4, 2 );
143-
## Perm_CSp(4,2)
144-
## ]]></Example>
145-
## </Description>
146-
## </ManSection>
147-
## <#/GAPDoc>
148-
##
149-
DeclareGlobalFunction( "ConformalSymplecticGroup" );
150-
151-
DeclareSynonym( "CSp", ConformalSymplecticGroup );
152-
18+
## Declare the variants involving a bilinear form as an argument.
19+
##
20+
Perform(
21+
[ IsMatrixOrMatrixObj, IsBilinearForm, IsGroup ],
22+
function( obj )
23+
DeclareConstructor( "ConformalSymplecticGroupCons", [ IsGroup, obj ] );
24+
DeclareConstructor( "ConformalSymplecticGroupCons",
25+
[ IsGroup, IsPosInt, IsRing, obj ] );
26+
DeclareConstructor( "ConformalSymplecticGroupCons",
27+
[ IsGroup, IsPosInt, IsPosInt, obj ] );
28+
end );

0 commit comments

Comments
 (0)