Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions init.g
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,7 @@

ReadPackage("forms","lib/forms.gd");
ReadPackage("forms","lib/recognition.gd");

if IsBound( ConformalSymplecticGroup ) then
ReadPackage("forms","lib/conformal.gd");
fi;
83 changes: 43 additions & 40 deletions lib/classic.gi
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ BindGlobal("Forms_OrthogonalGroup",
fi;

mat:= matinv * InvariantBilinearForm( g ).matrix * TransposedMat( matinv );
SetInvariantBilinearForm( gg, rec( matrix:= mat ) );
SetInvariantBilinearForm( gg, rec( matrix:= mat, baseDomain:= gf ) );
if Characteristic( gf ) <> 2 and
HasIsFullSubgroupGLorSLRespectingBilinearForm( g ) then
SetIsFullSubgroupGLorSLRespectingBilinearForm( gg,
Expand Down Expand Up @@ -784,17 +784,17 @@ InstallMethod( SpecialUnitaryGroupCons,
g:= SpecialUnitaryGroupCons( filt, d, q );
stored:= InvariantSesquilinearForm( g ).matrix;

# If the prescribed form fits then just return.
if stored = form!.matrix then
return g;
fi;

# Check that 'form' lives over the intended field.
F:= GF(q^2);
if not IsSubset( F, form!.basefield ) then
Error( "the defining field of <form> does not fit to <q>" );
fi;

# If the prescribed form fits then just return.
if stored = form!.matrix then
return g;
fi;

# Compute a base change matrix.
# (Check that the canonical forms are equal.)
wanted:= HermitianFormByMatrix( stored, F );
Expand Down Expand Up @@ -832,8 +832,8 @@ end );
#############################################################################
##
#O SymplecticGroupCons( <filter>, <form> )
#O SymplecticGroupCons( <filter>, <d>, <q>, <form> )
#O SymplecticGroupCons( <filter>, <d>, <R>, <form> )
#O SymplecticGroupCons( <filter>, <d>, <q>, <form> )
##
## 'SymplecticGroup' is a plain function that is defined in the GAP
## library.
Expand All @@ -845,10 +845,10 @@ Perform(
[ IsMatrixOrMatrixObj, IsBilinearForm, IsGroup and HasInvariantBilinearForm ],
function( obj )
DeclareConstructor( "SymplecticGroupCons", [ IsGroup, obj ] );
DeclareConstructor( "SymplecticGroupCons",
[ IsGroup, IsPosInt, IsPosInt, obj ] );
DeclareConstructor( "SymplecticGroupCons",
[ IsGroup, IsPosInt, IsRing, obj ] );
DeclareConstructor( "SymplecticGroupCons",
[ IsGroup, IsPosInt, IsPosInt, obj ] );
end );


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


#############################################################################
Expand All @@ -888,7 +888,7 @@ InstallMethod( SymplecticGroupCons,
IsPosInt,
IsPosInt,
IsMatrixOrMatrixObj ],
{ filt, d, q, mat } -> SymplecticGroupCons( filt, d, q,
{ filt, d, q, mat } -> SymplecticGroupCons( filt, d, GF(q),
BilinearFormByMatrix( mat, GF(q) ) ) );

InstallMethod( SymplecticGroupCons,
Expand All @@ -897,7 +897,7 @@ InstallMethod( SymplecticGroupCons,
IsPosInt,
IsPosInt,
IsGroup and HasInvariantBilinearForm ],
{ filt, d, q, G } -> SymplecticGroupCons( filt, d, q,
{ filt, d, q, G } -> SymplecticGroupCons( filt, d, GF(q),
BilinearFormByMatrix(
InvariantBilinearForm( G ).matrix, GF(q) ) ) );

Expand All @@ -907,30 +907,46 @@ InstallMethod( SymplecticGroupCons,
IsPosInt,
IsPosInt,
IsBilinearForm ],
function( filt, d, q, form )
local g, stored, F, wanted, mat1, mat2, mat, matinv, gens, gg;
{ filt, d, q, form } -> SymplecticGroupCons( filt, d, GF(q), form ) );


#############################################################################
##
#M SymplecticGroupCons( <filt>, <d>, <F>, <form> )
##
InstallMethod( SymplecticGroupCons,
"matrix group for dimension, finite field, form",
[ IsMatrixGroup and IsFinite,
IsPosInt,
IsField and IsFinite,
IsBilinearForm ],
function( filt, d, F, form )
local q, g, stored, form_matrix, wanted, mat1, mat2, mat, matinv, gens, gg;

# Create the default generators and form.
g:= SymplecticGroupCons( filt, d, q );
q:= Size( F );
g:= SymplecticGroupCons( filt, d, F );
stored:= InvariantBilinearForm( g ).matrix;

# If the prescribed form fits then just return.
if stored = form!.matrix then
return g;
fi;

# Check that 'form' lives over the intended field.
F:= GF(q);
if not IsSubset( F, form!.basefield ) then
Error( "the defining field of <form> does not fit to <q>" );
fi;

# If the prescribed form fits then just return.
form_matrix:= Matrix( form!.matrix, stored );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this do? Aren't form!.matrix and stored both matrices?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

stored is the matrix of the bilinear form in g, the default SymplecticGroup. The matrices in g have the internal representation prescribed by the user (technically: by the global option ConstructingFilter), and also stored has this representation because we want to multiply it with group elements.

form is an object in IsBilinearForm, which belongs to the Forms package, and we cannot assume that its defining matrix has the same internal representation. In fact, the functions of the Forms package do currently not support matrix objects.

The Matrix call forces form_matrix to have the same internal representation as stored; the return value is the object which we have to store in the InvariantBilinearForm record of the result: a matrix that describes the invariant form given as an argument, in the internal representation that fits to the group elements.

(Eventually the Forms package should support matrix objects. In this situation, one could argue that it is an error to accept incompatible internal representations. Moreover, in this situation one could take the internal representation of the prescribed form as the default for the internal representation of the elements in the desired group. But we are not in this situation.)

#T This 'Matrix' call should become unnecessary.
#T For that, the functions used below have to support 'IsMatrixObj' arguments.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure what "the functions used below" refers to, exactly.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BilinearFormByMatrix, BaseChangeToCanonical

if stored = form_matrix then
return g;
fi;

# Compute a base change matrix.
# (Check that the canonical forms are equal.)
wanted:= BilinearFormByMatrix( stored, F );
mat1:= BaseChangeToCanonical( form );
mat2:= BaseChangeToCanonical( wanted );
if mat1 * form!.matrix * TransposedMat( mat1 ) <>
mat1:= Matrix( BaseChangeToCanonical( form ), stored );
mat2:= Matrix( BaseChangeToCanonical( wanted ), stored );
if mat1 * form_matrix * TransposedMat( mat1 ) <>
mat2 * stored * TransposedMat( mat2 ) then
Error( "canonical forms of <form> and <wanted> differ" );
fi;
Expand All @@ -947,7 +963,7 @@ InstallMethod( SymplecticGroupCons,
SetName( gg, Name( g ) );
fi;

SetInvariantBilinearForm( gg, rec( matrix:= form!.matrix,
SetInvariantBilinearForm( gg, rec( matrix:= form_matrix,
baseDomain:= F ) );
if HasIsFullSubgroupGLorSLRespectingBilinearForm( g ) then
SetIsFullSubgroupGLorSLRespectingBilinearForm( gg,
Expand All @@ -957,18 +973,13 @@ InstallMethod( SymplecticGroupCons,
return gg;
end );


#############################################################################
##
#M SymplecticGroupCons( <filt>, <d>, <R>, <form> )
##
InstallMethod( SymplecticGroupCons,
"matrix group for dimension, finite field, matrix of form",
[ IsMatrixGroup and IsFinite,
IsPosInt,
IsField and IsFinite,
IsMatrixOrMatrixObj ],
{ filt, d, F, form } -> SymplecticGroupCons( filt, d, Size( F ),
{ filt, d, F, form } -> SymplecticGroupCons( filt, d, F,
BilinearFormByMatrix( form, F ) ) );

InstallMethod( SymplecticGroupCons,
Expand All @@ -977,14 +988,6 @@ InstallMethod( SymplecticGroupCons,
IsPosInt,
IsField and IsFinite,
IsGroup and HasInvariantBilinearForm ],
{ filt, d, F, G } -> SymplecticGroupCons( filt, d, Size( F ),
{ filt, d, F, G } -> SymplecticGroupCons( filt, d, F,
BilinearFormByMatrix(
InvariantBilinearForm( G ).matrix, F ) ) );

InstallMethod( SymplecticGroupCons,
"matrix group for dimension, finite field, form",
[ IsMatrixGroup and IsFinite,
IsPosInt,
IsField and IsFinite,
IsBilinearForm ],
{ filt, d, F, form } -> SymplecticGroupCons( filt, d, Size( F ), form ) );
28 changes: 28 additions & 0 deletions lib/conformal.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#############################################################################
##
## conformal.gd 'Forms' package
##

#############################################################################
##
#O ConformalSymplecticGroupCons( <filter>, <form> )
#O ConformalSymplecticGroupCons( <filter>, <matrix> )
#O ConformalSymplecticGroupCons( <filter>, <G> )
#O ConformalSymplecticGroupCons( <filter>, <d>, <R>, <form> )
#O ConformalSymplecticGroupCons( <filter>, <d>, <R>, <matrix> )
#O ConformalSymplecticGroupCons( <filter>, <d>, <R>, <G> )
#O ConformalSymplecticGroupCons( <filter>, <d>, <q>, <form> )
#O ConformalSymplecticGroupCons( <filter>, <d>, <q>, <matrix> )
#O ConformalSymplecticGroupCons( <filter>, <d>, <q>, <G> )
##
## Declare the variants involving a bilinear form as an argument.
##
Perform(
[ IsMatrixOrMatrixObj, IsBilinearForm, IsGroup ],
function( obj )
DeclareConstructor( "ConformalSymplecticGroupCons", [ IsGroup, obj ] );
DeclareConstructor( "ConformalSymplecticGroupCons",
[ IsGroup, IsPosInt, IsRing, obj ] );
DeclareConstructor( "ConformalSymplecticGroupCons",
[ IsGroup, IsPosInt, IsPosInt, obj ] );
end );
Loading