def ParabolicRoots(P):
Proots=copy(positiveroots)
for g in P:
for sr in S:
if g*vector(sr) not in Proots:
Proots.append(g*vector(sr))
return Proots
def WconjugateRoots(w,roots):
wroots=copy([])
for r in roots:
wroots.append(w*vector(r))
return wroots
def StabilizerRoots(P,Q,w):
Sroots=copy([])
Proots=ParabolicRoots(P)
wQroots=WconjugateRoots(w,ParabolicRoots(Q))
for r in Proots:
if r in wQroots:
Sroots.append(r)
return Sroots
def StabilizerDimension(P,Q,w):
dim=len(StabilizerRoots(P,Q,w))+rank
return dim
def OrbitRoots(P,Q,w):
remainingroots=copy([])
Proots=(ParabolicRoots(P))
for r in Proots:
if (w.inverse())*vector(r) not in ParabolicRoots(Q):
remainingroots.append(r)
return remainingroots
def OrbitStabilizerRoots(P,Q,R,w,v):
remainingroots=copy([])
discardedroots=copy([])
orbitroots=OrbitRoots(P,R,v)
stabilizerroots=StabilizerRoots(P,Q,w)
for r in orbitroots:
if r not in stabilizerroots:
remainingroots.append(r)
else:
discardedroots.append(r)
return [remainingroots,discardedroots]
def MNroots(P,Q,w,gamma):
mroots=copy([])
nroots=copy([])
for r in StabilizerRoots(P,Q,w):
if gamma*r==0:
mroots.append(r)
else:
nroots.append(r)
return[mroots,nroots]
def Level0Roots(Mroots):
pmroots=copy([])
for r in Mroots:
if ((-1)*r in Mroots):
pmroots.append(r)
return(pmroots)
def xMwMvroots(P,Q,R,w,v,x):
Mwroots=WconjugateRoots(x.inverse(),Level0Roots(StabilizerRoots(P,Q,w)))
Mvroots=Level0Roots(StabilizerRoots(P,R,v))
roots=copy([])
for r in Mwroots:
if r in Mvroots:
roots.append(r)
return roots
def SplitRoots(Mroots):
pmroots=copy([])
otherroots=copy([])
for r in Mroots:
if ((-1)*r in Mroots) and (r in positiveroots):
pmroots.append(r)
else:
if (r not in otherroots) and ((-1)*r not in pmroots):
otherroots.append(r)
return([pmroots,otherroots])
def FindLevels(gamma,roots):
levels=copy([])
for r in roots:
if r*gamma not in levels:
levels.append(r*gamma)
return levels
def RootsWithLevels(gamma,roots):
rootswithlevels=copy([])
for r in roots:
rootswithlevels.append([r,r*gamma])
return rootswithlevels
def PrintRootsWithLevels(gamma,roots):
levels=FindLevels(gamma,roots)
roots=RootsWithLevels(gamma,roots)
levels.sort()
for l in levels:
print "\n","level ",l,"\n"
for r in roots:
if r[1]==l:
print r[0]
def NilpotentAction(coords,nilroots):
rcoords=copy([])
usednilroots=copy([])
rnilroots=copy([])
for r in coords:
if r not in nilroots:
rcoords.append(r)
else:
usednilroots.append(r)
for r in nilroots:
if r not in usednilroots:
rnilroots.append(r)
return (rcoords,rnilroots)
def FindSums(coords,redroots):
sums=copy([])
for alpha in coords:
for beta in redroots:
if alpha+beta not in sums:
sums.append(alpha+beta)
return sums
def LowestLevel(roots):
levels=FindLevels(gamma,roots)
roots=RootsWithLevels(gamma,roots)
levels.sort()
lowest=copy([])
for r in roots:
if r[1]==levels[0]:
lowest.append(r[0])
return lowest
def StepOne(roots,nilroots):
levels=FindLevels(gamma,roots)
levels.sort()
coords=LowestLevel(roots)
result=NilpotentAction(coords,nilroots)
return ([levels[0],result[0],result[1]])
def StepTwo(coords,redroots):
lowestcoords=copy([])
sums=FindSums(coords,redroots)
for r in coords:
if r not in sums:
lowestcoords.append(r)
return lowestcoordsw in W
def Nvperp(gamma,P,Q,v):
remainingroots=copy([])
Proots=(ParabolicRoots(P))
for r in Proots:
if (r not in WconjugateRoots(v,ParabolicRoots(Q)) and (gamma*vector(r)!=0)):
remainingroots.append(r)
return remainingroots
def SetDifference(A,B):
remainingroots=copy([])
discardedroots=copy([])
for r in A:
if r not in B:
remainingroots.append(r)
else:
discardedroots.append(r)
return [remainingroots,discardedroots]
type='F'
rank=4
S=RootSystem([type,rank]).ambient_space().simple_roots()
R=RootSystem([type,rank]).ambient_space().roots()
identitysize=RootSystem([type,rank]).ambient_space().dimension()
e=identity_matrix(identitysize)
temp=RootSystem([type,rank]).ambient_space().positive_roots()
positiveroots=copy([])
for proot in temp:
positiveroots.append(vector(proot))
W=RootSystem([type,rank]).ambient_space().weyl_group()
s=copy([[]])
for i in [1..rank]:
s.append(W.simple_reflections()[i])
print "Simple roots:\n",list(RootSystem([type,rank]).ambient_space().simple_roots()),"\n"
print "Fundamental weights:\n",list(RootSystem([type,rank]).ambient_space().fundamental_weights()),"\n"
rho=0
for pr in list(RootSystem([type,rank]).ambient_space().fundamental_weights()):
rho=rho+pr
print "Rho=",rho
W=WeylGroup(['F',4],prefix="s")
minlengthcosetreps=copy([])
for w in W:
m=w.coset_representative([1,2,3], side='left').coset_representative([1,2,3], side='right')
if m not in minlengthcosetreps:
minlengthcosetreps.append(m)
minlengthcosetreps.sort()
for r in minlengthcosetreps:
print r,"\n\n",r.matrix(),"\n"
WP=WeylGroup(['F',4],prefix="s")
Pminlengthcosetreps=copy([])
for w in WP:
m=w.coset_representative([1,2,3], side='left').coset_representative([1,2,4], side='right')
if m not in Pminlengthcosetreps:
Pminlengthcosetreps.append(m)
Pminlengthcosetreps.sort()
for r in Pminlengthcosetreps:
print r,"\n\n",r.matrix(),"\n"
gens_1=[s[1],s[2],s[3]]
gens_2=[s[1],s[2],s[3]]
gens_3=[s[1],s[2],s[4]]
P_1=MatrixGroup(gens_1)
P_2=MatrixGroup(gens_2)
P_3=MatrixGroup(gens_3)
w=minlengthcosetreps[0]
v=Pminlengthcosetreps[0]
print "\n Roots of M_w:\n"
for i in SetDifference(StabilizerRoots(P_1,P_2,w),Level0Roots(ParabolicRoots(P_1)))[1]:
print i
print "\n Roots of M_v:\n"
for i in SetDifference(StabilizerRoots(P_1,P_3,v),Level0Roots(ParabolicRoots(P_1)))[1]:
print i
print "\nSimple roots, for reference:\n",list(RootSystem([type,rank]).ambient_space().simple_roots()),"\n"
Wx=WeylGroup(['B',3],prefix="s")
xminlengthcosetreps=copy([])
for wx in Wx:
m=wx.coset_representative([1,2], side='left').coset_representative([1,2,3], side='right')
if m not in xminlengthcosetreps:
xminlengthcosetreps.append(m)
xminlengthcosetreps.sort()
print "List of x's:\n"
for r in xminlengthcosetreps:
print r,"\n\n",r.matrix(),"\n"
x=e
print "\n roots in ( x^-1 M_w x ) intersect M_v: \n"
for i in SetDifference(WconjugateRoots(x.inverse(),SetDifference(StabilizerRoots(P_1,P_2,w),Level0Roots(ParabolicRoots(P_1)))[1]),SetDifference(StabilizerRoots(P_1,P_3,v),Level0Roots(ParabolicRoots(P_1)))[1])[1]:
print i
print "\nSimple roots, for reference:\n",list(RootSystem([type,rank]).ambient_space().simple_roots()),"\n"
print "Fundamental weights:\n",list(RootSystem([type,rank]).ambient_space().fundamental_weights()),"\n"
gamma=vector([1,0,0,0])
print "\n Roots in (N_v^perp) not in ( x^-1 N_w x ):"
PrintRootsWithLevels(gamma,SetDifference(SetDifference(SetDifference(ParabolicRoots(P_1),Level0Roots(ParabolicRoots(P_1)))[0],SetDifference(StabilizerRoots(P_1,P_3,v),SetDifference(ParabolicRoots(P_1),Level0Roots(ParabolicRoots(P_1)))[0])[1])[0],WconjugateRoots(x.inverse(),SetDifference(StabilizerRoots(P_1,P_2,w),SetDifference(ParabolicRoots(P_1),Level0Roots(ParabolicRoots(P_1)))[0])[1]))[0])
Simple roots:
[(0, 1, -1, 0), (0, 0, 1, -1), (0, 0, 0, 1), (1/2, -1/2, -1/2, -1/2)]
Fundamental weights:
[(1, 1, 0, 0), (2, 1, 1, 0), (3/2, 1/2, 1/2, 1/2), (1, 0, 0, 0)]
Rho= (11/2, 5/2, 3/2, 1/2)
s4*s3*s2*s3*s1*s2*s3*s4*s3*s2*s3*s1*s2*s3*s4
[-1 0 0 0]
[ 0 1 0 0]
[ 0 0 1 0]
[ 0 0 0 1]
s4*s3*s2*s3*s1*s2*s3*s4
[-1/2 1/2 1/2 1/2]
[ 1/2 1/2 1/2 -1/2]
[ 1/2 1/2 -1/2 1/2]
[ 1/2 -1/2 1/2 1/2]
s4*s3*s2*s3*s4
[0 1 0 0]
[1 0 0 0]
[0 0 1 0]
[0 0 0 1]
s4
[ 1/2 1/2 1/2 1/2]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, 1, 0, 0)
(0, 0, 1, 0)
(0, 0, 0, 1)
(0, 1, 1, 0)
(0, 1, 0, 1)
(0, 0, 1, 1)
(0, 1, -1, 0)
(0, 1, 0, -1)
(0, 0, 1, -1)
(0, 0, -1, 1)
(0, -1, 0, 1)
(0, -1, 1, 0)
Simple roots, for reference:
[(0, 1, -1, 0), (0, 0, 1, -1), (0, 0, 0, 1), (1/2, -1/2, -1/2, -1/2)]
List of x's:
1
[1 0 0]
[0 1 0]
[0 0 1]
roots in ( x^-1 M_w x ) intersect M_v:
(0, 1, 0, 0)
(0, 0, 1, 0)
(0, 0, 0, 1)
(0, 1, 1, 0)
(0, 1, 0, 1)
(0, 0, 1, 1)
(0, 1, -1, 0)
(0, 1, 0, -1)
(0, 0, 1, -1)
(0, 0, -1, 1)
(0, -1, 0, 1)
(0, -1, 1, 0)
Simple roots, for reference:
[(0, 1, -1, 0), (0, 0, 1, -1), (0, 0, 0, 1), (1/2, -1/2, -1/2, -1/2)]
Fundamental weights:
[(1, 1, 0, 0), (2, 1, 1, 0), (3/2, 1/2, 1/2, 1/2), (1, 0, 0, 0)]
Roots in (N_v^perp) not in ( x^-1 N_w x ):
level 1/2
(1/2, 1/2, 1/2, -1/2)
(1/2, 1/2, -1/2, 1/2)
(1/2, 1/2, -1/2, -1/2)
(1/2, -1/2, 1/2, 1/2)
(1/2, -1/2, 1/2, -1/2)
(1/2, -1/2, -1/2, 1/2)
(1/2, -1/2, -1/2, -1/2)
level 1
(1, 0, 0, 0)
(1, 1, 0, 0)
(1, 0, 1, 0)
(1, 0, 0, 1)
(1, -1, 0, 0)
(1, 0, -1, 0)
(1, 0, 0, -1)