-
Notifications
You must be signed in to change notification settings - Fork 133
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
first commit of basisLieHighestWeight
- Loading branch information
Showing
12 changed files
with
1,400 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# ? | ||
|
||
using Oscar | ||
using SparseArrays | ||
|
||
G = Oscar.GAP.Globals | ||
forGap = Oscar.GAP.julia_to_gap | ||
fromGap = Oscar.GAP.gap_to_julia | ||
|
||
|
||
function lieAlgebra(t::String, n::Int) | ||
""" | ||
Creates the Lie-algebra as a GAP object that gets used for a lot other computations with GAP | ||
""" | ||
L = G.SimpleLieAlgebra(forGap(t), n, G.Rationals) | ||
return L, G.ChevalleyBasis(L) | ||
end | ||
|
||
|
||
gapReshape(A) = sparse(hcat(A...)) | ||
|
||
|
||
function matricesForOperators(L, hw, ops) | ||
""" | ||
used to create tensorMatricesForOperators | ||
""" | ||
M = G.HighestWeightModule(L, forGap(hw)) | ||
mats = G.List(ops, o -> G.MatrixOfAction(G.Basis(M), o)) | ||
mats = gapReshape.(fromGap(mats)) | ||
d = lcm(denominator.(union(mats...))) | ||
mats = (A->ZZ.(A*d)).(mats) | ||
return mats | ||
end | ||
|
||
|
||
function weightsForOperators(L, cartan, ops) | ||
""" | ||
Calculates the weight wts[i] for each operator ops[i] | ||
""" | ||
cartan = fromGap(cartan, recursive=false) | ||
ops = fromGap(ops, recursive=false) | ||
asVec(v) = fromGap(G.ExtRepOfObj(v)) | ||
if any(iszero.(asVec.(ops))) | ||
error("ops should be non-zero") | ||
end | ||
nzi(v) = findfirst(asVec(v) .!= 0) | ||
return [ | ||
[asVec(h*v)[nzi(v)] / asVec(v)[nzi(v)] for h in cartan] for v in ops | ||
] | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
#using Gapjm | ||
|
||
G = Oscar.GAP.Globals | ||
forGap = Oscar.GAP.julia_to_gap | ||
fromGap = Oscar.GAP.gap_to_julia | ||
|
||
#function longest_weyl_word(t, n) | ||
# """ | ||
# generates a reduced expression of the longest weylword of type (t,n) by choosing uniformly a random reflection that is not leftdescending | ||
# the resulting longest words are not uniformly distributed | ||
# """ | ||
# W = Gapjm.coxgroup(Symbol(t),n) # Weyl-group | ||
# S = Gapjm.gens(W) # generators of W (simple reflections) | ||
# m = length(S) | ||
# p = W() # id | ||
# word = [] # generated word | ||
# | ||
# # extend p with reflection that are not leftdescending until not possible (i.e. reached longest word) | ||
# while true | ||
# not_desc = [i for i=1:m if !(i in Gapjm.leftdescents(W,p))] # set of i s.t. length(S[i]*p) > length(p) | ||
# if length(not_desc) >= 1 | ||
# i = rand(not_desc) | ||
# push!(word, i) | ||
# p = S[i]*p | ||
# else | ||
# break | ||
# end | ||
# end | ||
# return word | ||
#end | ||
|
||
#function is_longest_weyl_word(t,n,word) | ||
# """ | ||
# returns if word is a reduced expression of the longest weyl word of type (t,n) | ||
# is_longest_weyl_word(t,n,longest_weyl_word(t, n)) is always true | ||
# """ | ||
# W = Gapjm.coxgroup(Symbol(t),n) # Weyl-group | ||
# p = W(word ...) # group element of word | ||
# return p == longest(W) # is word longest word? | ||
#end | ||
|
||
function sub_simple_refl(word, L, n) | ||
""" | ||
substitute simple reflections (i,i+1), saved in dec by i, with E_{i,i+1} | ||
""" | ||
R = G.RootSystem(L) | ||
CG = fromGap(G.CanonicalGenerators(R)[1], recursive = false) | ||
ops = forGap([CG[i] for i in word], recursive = false) | ||
return ops | ||
end |
Oops, something went wrong.