Skip to content
Draft
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
48 changes: 48 additions & 0 deletions gap/matrix/wordsInNiceGens/BruhatDecomposition.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#############################################################################
# BruhatDecomposition.gd
#############################################################################
#############################################################################
##
## BruhatDecomposition package
##
## Daniel Rademacher, RWTH Aachen University
## Alice Niemeyer, RWTH Aachen University
##
## Licensed under the GPL 3 or later.
##
#############################################################################
#
#! @Chapter Foreword
#!
#! Let <M>G</M> be one of the classical groups SL, Sp, SU or SO over a finite field of size <M>q</M> and dimension <M>d</M>. Let g be an element in G.
#! We want to write <M>g = u_1 \cdot w \cdot u_2</M> with <M>u_1</M> and <M>u_2</M> lower unitriangular matrices and <M>w</M> a monomial matrix. <P/>
#! This is already implemented for:
#! <List>
#! <Item>
#! Special linear group (SL) (see Chapter <Ref Sect="Chapter_SpecialLinearGroup"/>)
#! </Item>
#! <Item>
#! Symplectic group (Sp) (see Chapter <Ref Sect="Chapter_SymplecticGroup"/>)
#! </Item>
#! <Item>
#! Special unitary group (SU) (see Chapter <Ref Sect="Chapter_SpecialUnitaryGroup"/>)
#! </Item>
#! <Item>
#! Special orthogonal group (SO) (see Chapter <Ref Sect="Chapter_SpecialOrthogonalGroup"/>)
#! </Item>
#! </List>



#! @Section Main Function
#! @SectionLabel MainFunction

#####
# BruhatDecomposition()
#####

#! @Arguments g
#! @Returns pgr (A SLP to compute <M>u_1,u_2,p_{sign}</M> and <M>diag</M> and the matrices <M>u_1, u_2, p_{sign}</M> and <M>diag</M> itself.)
#! @Description
#! Checks whether <M>g</M> is an element of one of the classical groups in their natural representation. If yes, the corresponding Bruhat decomposition of the group and the element <M>g</M> is calculated. Otherwise the function prints a warning.
DeclareGlobalFunction( "BruhatDecomposition" );
36 changes: 36 additions & 0 deletions gap/matrix/wordsInNiceGens/BruhatDecomposition.gi
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
######################################
# BruhatDecomposition.gi
######################################

#####
# BruhatDecomposition()
#####

InstallGlobalFunction( BruhatDecomposition,
function(g)

local d, fld, q;

d := Length( g );
fld := FieldOfMatrixList( [g] );
q := Size(fld);

if g in Sp(d,q) then
return BruhatDecompositionSp(LGOStandardGensSp(d,q),g);
elif g in SU(d,q) then
return BruhatDecompositionSU(LGOStandardGensSU(d,q),g);
elif g in SO(1,d,q) then
return BruhatDecompositionSO(LGOStandardGensSO(1,d,q),g);
elif g in SO(0,d,q) then
return BruhatDecompositionSO(LGOStandardGensSO(0,d,q),g);
elif g in SO(-1,d,q) then
return BruhatDecompositionSO(LGOStandardGensSO(-1,d,q),g);
elif g in SL(d,q) then
return BruhatDecompositionSL(LGOStandardGensSL(d,q),g);
else
Print("The element g is not an element of one of the classical groups in their natural representation. \n");
Print("Abort.");
Comment on lines +31 to +32
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hmm, why not an error?

Suggested change
Print("The element g is not an element of one of the classical groups in their natural representation. \n");
Print("Abort.");
Error("The element g is not an element of one of the classical groups in their natural representation");

fi;

end
);
Loading