diff --git a/experimental/BasisLieHighestWeight/src/BasisLieHighestWeight.jl b/experimental/BasisLieHighestWeight/src/BasisLieHighestWeight.jl index e021782ed997..5a747b1e9f9e 100644 --- a/experimental/BasisLieHighestWeight/src/BasisLieHighestWeight.jl +++ b/experimental/BasisLieHighestWeight/src/BasisLieHighestWeight.jl @@ -9,9 +9,12 @@ using Oscar.LieAlgebras: lie_algebra_simple_module_struct_consts_gap using AbstractAlgebra.PrettyPrinting +import Oscar: base_lie_algebra +import Oscar: character import Oscar: dim import Oscar: monomial_ordering import Oscar: monomials +import Oscar: root_system import Base: length @@ -26,6 +29,7 @@ import Base: length # - the list of Minkowski gens contains too many elements, only include those that give us something new include("LieAlgebras.jl") +include("ModuleData.jl") include("BirationalSequence.jl") include("MonomialBasis.jl") include("NewMonomial.jl") @@ -46,6 +50,7 @@ export basis_lie_highest_weight_ffl export basis_lie_highest_weight_lusztig export basis_lie_highest_weight_nz export basis_lie_highest_weight_string +export basis_lie_highest_weight_demazure end @@ -64,3 +69,4 @@ export basis_lie_highest_weight_ffl export basis_lie_highest_weight_lusztig export basis_lie_highest_weight_nz export basis_lie_highest_weight_string +export basis_lie_highest_weight_demazure diff --git a/experimental/BasisLieHighestWeight/src/BirationalSequence.jl b/experimental/BasisLieHighestWeight/src/BirationalSequence.jl index 3a99f411d140..d5fab96186ab 100644 --- a/experimental/BasisLieHighestWeight/src/BirationalSequence.jl +++ b/experimental/BasisLieHighestWeight/src/BirationalSequence.jl @@ -1,27 +1,30 @@ struct BirationalSequence operator_roots::Vector{RootSpaceElem} operator_weights::Vector{WeightLatticeElem} + root_system::RootSystem function BirationalSequence( - operator_roots::Vector{RootSpaceElem}, operator_weights::Vector{WeightLatticeElem} + operator_roots::Vector{RootSpaceElem}, operator_weights::Vector{WeightLatticeElem}, root_sys::RootSystem ) @req length(operator_roots) == length(operator_weights) "Different lengths" - return new(operator_roots, operator_weights) + @req all(rootspace_elem -> root_system(rootspace_elem) == root_sys, operator_roots) "Different root systems" + @req all(weight_elem -> root_system(weight_elem) == root_sys, operator_weights) "Different root systems" + return new(operator_roots, operator_weights, root_sys) end end function birational_sequence( - operator_roots::Vector{RootSpaceElem}, operator_weights::Vector{WeightLatticeElem} + operator_roots::Vector{RootSpaceElem}, operator_weights::Vector{WeightLatticeElem}, root_system::RootSystem ) - return BirationalSequence(operator_roots, operator_weights) + return BirationalSequence(operator_roots, operator_weights, root_system) end -function birational_sequence(operator_roots::Vector{RootSpaceElem}) - return birational_sequence(operator_roots, WeightLatticeElem.(operator_roots)) +function birational_sequence(operator_roots::Vector{RootSpaceElem}, root_system::RootSystem) + return birational_sequence(operator_roots, WeightLatticeElem.(operator_roots), root_system) end -function birational_sequence(operator_weights::Vector{WeightLatticeElem}) - return birational_sequence(RootSpaceElem.(operator_weights), operator_weights) +function birational_sequence(operator_weights::Vector{WeightLatticeElem}, root_system::RootSystem) + return birational_sequence(RootSpaceElem.(operator_weights), operator_weights, root_system) end function Base.show(io::IO, birational_seq::BirationalSequence) @@ -49,3 +52,7 @@ end function operator_as_weight(birational_seq::BirationalSequence, i::Int) return birational_seq.operator_weights[i] end + +function root_system(birational_seq::BirationalSequence) + return birational_seq.root_system +end diff --git a/experimental/BasisLieHighestWeight/src/MainAlgorithm.jl b/experimental/BasisLieHighestWeight/src/MainAlgorithm.jl index 6ebd65084ea3..16bfa6dcd0db 100644 --- a/experimental/BasisLieHighestWeight/src/MainAlgorithm.jl +++ b/experimental/BasisLieHighestWeight/src/MainAlgorithm.jl @@ -1,6 +1,5 @@ function basis_lie_highest_weight_compute( - L::LieAlgebra, - highest_weight::Vector{Int}, + V::ModuleData, operators::Vector{RootSpaceElem}, # monomial x_i is corresponds to f_operators[i] monomial_ordering_symb::Symbol, ) @@ -17,7 +16,7 @@ function basis_lie_highest_weight_compute( # else # set_mon = {} # go through all partitions lambda_1 + lambda_2 = highest_weight - # add compute_monomials(lambda_1) (+) compute_monomials(lambda_1) to set_mon + # add compute_monomials(lambda_1) (+) compute_monomials(lambda_2) to set_mon # if set_mon too small # add_by_hand(highest_weight, set_mon) # return set_mon @@ -33,10 +32,9 @@ function basis_lie_highest_weight_compute( # go through them one by one in monomial_ordering until basis is full # return set_mon - R = root_system(L) - highest_weight = WeightLatticeElem(R, highest_weight) - - birational_seq = birational_sequence(operators) + R = root_system(base_lie_algebra(V)) + + birational_seq = birational_sequence(operators, root_system(base_lie_algebra(V))) ZZx, _ = polynomial_ring(ZZ, length(operators)) # for our monomials monomial_ordering = get_monomial_ordering(monomial_ordering_symb, ZZx, operators) @@ -50,10 +48,9 @@ function basis_lie_highest_weight_compute( # start recursion over highest_weight monomials = compute_monomials( - L, + V, birational_seq, ZZx, - highest_weight, monomial_ordering, calc_highest_weight, no_minkowski, @@ -64,7 +61,7 @@ function basis_lie_highest_weight_compute( by=(gen -> (sum(coefficients(gen)), reverse(Oscar._vec(coefficients(gen))))), ) # output - mb = MonomialBasis(L, highest_weight, birational_seq, monomial_ordering, monomials) + mb = MonomialBasis(V, birational_seq, monomial_ordering, monomials) set_attribute!( mb, :algorithm => basis_lie_highest_weight_compute, :minkowski_gens => minkowski_gens ) @@ -173,10 +170,9 @@ function basis_coordinate_ring_kodaira_compute( end function compute_monomials( - L::LieAlgebra, + V::ModuleData, birational_seq::BirationalSequence, ZZx::ZZMPolyRing, - highest_weight::WeightLatticeElem, monomial_ordering::MonomialOrdering, calc_highest_weight::Dict{WeightLatticeElem,Set{ZZMPolyRingElem}}, no_minkowski::Set{WeightLatticeElem}, @@ -184,7 +180,7 @@ function compute_monomials( # This function calculates the monomial basis M_{highest_weight} recursively. The recursion saves all computed # results in calc_highest_weight and we first check, if we already encountered this highest weight in a prior step. # If this is not the case, we need to perform computations. The recursion works by using the Minkowski-sum. - # If M_{highest_weight} is the desired set of monomials (identified by the exponents as lattice points), it is know + # If M_{highest_weight} is the desired set of monomials (identified by the exponents as lattice points), it is known # that for lambda_1 + lambda_2 = highest_weight we have M_{lambda_1} + M_{lambda_2} subseteq M_{highest_weight}. # The complexity grows exponentially in the size of highest_weight. Therefore, it is very helpful to obtain a part of # M_{highest_weight} by going through all partitions of highest_weight and using the Minkowski-property. The base @@ -193,51 +189,58 @@ function compute_monomials( # simple cases # we already computed the highest_weight result in a prior recursion step - if haskey(calc_highest_weight, highest_weight) - return calc_highest_weight[highest_weight] - elseif is_zero(highest_weight) # we mathematically know the solution + if haskey(calc_highest_weight, highest_weight(V)) + return calc_highest_weight[highest_weight(V)] + elseif is_zero(highest_weight(V)) # we mathematically know the solution return Set(ZZx(1)) end # calculation required # dim is number of monomials that we need to find, i.e. |M_{highest_weight}|. # if highest_weight is not a fundamental weight, partition into smaller summands is possible. This is the base case of # the recursion. - dim = dim_of_simple_module(L, highest_weight) - if is_zero(highest_weight) || is_fundamental_weight(highest_weight) - push!(no_minkowski, highest_weight) + if is_zero(highest_weight(V)) || is_fundamental_weight(highest_weight(V)) + push!(no_minkowski, highest_weight(V)) monomials = add_by_hand( - L, birational_seq, ZZx, highest_weight, monomial_ordering, Set{ZZMPolyRingElem}() + V, birational_seq, ZZx, monomial_ordering, Set{ZZMPolyRingElem}() ) - push!(calc_highest_weight, highest_weight => monomials) + push!(calc_highest_weight, highest_weight(V) => monomials) return monomials else # use Minkowski-Sum for recursion monomials = Set{ZZMPolyRingElem}() - sub_weights = sub_weights_proper(highest_weight) + sub_weights = sub_weights_proper(highest_weight(V)) sort!(sub_weights; by=x -> sum(coefficients(x) .^ 2)) # go through all partitions lambda_1 + lambda_2 = highest_weight until we have enough monomials or used all partitions for (ind_lambda_1, lambda_1) in enumerate(sub_weights) - length(monomials) >= dim && break + length(monomials) >= dim(V) && break - lambda_2 = highest_weight - lambda_1 + lambda_2 = highest_weight(V) - lambda_1 ind_lambda_2 = findfirst(==(lambda_2), sub_weights)::Int ind_lambda_1 > ind_lambda_2 && continue + if isa(V, SimpleModuleData) + M_lambda_1 = SimpleModuleData(base_lie_algebra(V), lambda_1) + M_lambda_2 = SimpleModuleData(base_lie_algebra(V), lambda_2) + elseif isa(V, DemazureModuleData) + M_lambda_1 = DemazureModuleData(base_lie_algebra(V), lambda_1, weyl_group_elem(V)) + M_lambda_2 = DemazureModuleData(base_lie_algebra(V), lambda_2, weyl_group_elem(V)) + else + error("unreachable") + end + mon_lambda_1 = compute_monomials( - L, + M_lambda_1, birational_seq, ZZx, - lambda_1, monomial_ordering, calc_highest_weight, no_minkowski, ) mon_lambda_2 = compute_monomials( - L, + M_lambda_2, birational_seq, ZZx, - lambda_2, monomial_ordering, calc_highest_weight, no_minkowski, @@ -248,28 +251,28 @@ function compute_monomials( end # check if we found enough monomials - if length(monomials) < dim - push!(no_minkowski, highest_weight) + if length(monomials) < dim(V) + push!(no_minkowski, highest_weight(V)) monomials = add_by_hand( - L, birational_seq, ZZx, highest_weight, monomial_ordering, monomials + V, birational_seq, ZZx, monomial_ordering, monomials ) end - push!(calc_highest_weight, highest_weight => monomials) + push!(calc_highest_weight, highest_weight(V) => monomials) return monomials end + end function add_new_monomials!( - L::LieAlgebra, + V::ModuleData, birational_seq::BirationalSequence, ZZx::ZZMPolyRing, matrices_of_operators::Vector{<:SMat{ZZRingElem}}, monomial_ordering::MonomialOrdering, - weightspaces::Dict{WeightLatticeElem,Int}, - dim_weightspace::Int, + weightspaces::Dict{WeightLatticeElem,ZZRingElem}, + dim_weightspace::ZZRingElem, weight_w::WeightLatticeElem, - highest_weight::WeightLatticeElem, monomials_in_weightspace::Dict{WeightLatticeElem,Set{ZZMPolyRingElem}}, space::Dict{WeightLatticeElem,<:SMat{QQFieldElem}}, v0::SRow{ZZRingElem}, @@ -286,7 +289,7 @@ function add_new_monomials!( poss_mon_in_weightspace = convert_lattice_points_to_monomials( ZZx, get_lattice_points_of_weightspace( - operators_as_roots(birational_seq), RootSpaceElem(highest_weight - weight_w), + operators_as_roots(birational_seq), RootSpaceElem(highest_weight(V) - weight_w), zero_coordinates, ), ) @@ -297,7 +300,7 @@ function add_new_monomials!( # check which monomials should get added to the basis i = 0 - if highest_weight == weight_w # check if [0 0 ... 0] already in basis + if highest_weight(V) == weight_w # check if [0 0 ... 0] already in basis i += 1 end number_mon_in_weightspace = length(monomials_in_weightspace[weight_w]) @@ -309,12 +312,12 @@ function add_new_monomials!( continue end - # check if the weight ob each suffix is a weight of the module + # check if the weight of each suffix is a weight of the module cancel = false for i in 1:(nvars(ZZx) - 1) if !haskey( weightspaces, - highest_weight - sum( + highest_weight(V) - sum( exp * weight for (exp, weight) in Iterators.drop(zip(degrees(mon), operators_as_weights(birational_seq)), i) ), @@ -346,10 +349,9 @@ function add_new_monomials!( end function add_by_hand( - L::LieAlgebra, + V::ModuleData, birational_seq::BirationalSequence, ZZx::ZZMPolyRing, - highest_weight::WeightLatticeElem, monomial_ordering::MonomialOrdering, basis::Set{ZZMPolyRingElem}, ) @@ -358,23 +360,23 @@ function add_by_hand( # initialization # matrices g_i for (g_1^a_1 * ... * g_k^a_k)*v - R = root_system(L) + R = root_system(base_lie_algebra(V)) matrices_of_operators = tensor_matrices_of_operators( - L, highest_weight, operators_as_roots(birational_seq) + base_lie_algebra(V), highest_weight(V), operators_as_roots(birational_seq) ) space = Dict(zero(weight_lattice(R)) => sparse_matrix(QQ)) # span of basis vectors to keep track of the basis v0 = sparse_row(ZZ, [(1, 1)]) # starting vector v push!(basis, ZZx(1)) # required monomials of each weightspace - weightspaces = character(R, highest_weight) + weightspaces = character(V) # sort the monomials from the minkowski-sum by their weightspaces monomials_in_weightspace = Dict{WeightLatticeElem,Set{ZZMPolyRingElem}}() for (weight_w, _) in weightspaces monomials_in_weightspace[weight_w] = Set{ZZMPolyRingElem}() end for mon in basis - push!(monomials_in_weightspace[highest_weight - weight(mon, birational_seq)], mon) + push!(monomials_in_weightspace[highest_weight(V) - weight(mon, birational_seq)], mon) end # only inspect weightspaces with missing monomials @@ -400,13 +402,13 @@ function add_by_hand( end # identify coordinates that are trivially zero because of the action on the generator - zero_coordinates = compute_zero_coordinates(birational_seq, highest_weight) + zero_coordinates = compute_zero_coordinates(birational_seq, highest_weight(V)) # calculate new monomials for weight_w in weights_with_non_full_weightspace dim_weightspace = weightspaces[weight_w] add_new_monomials!( - L, + V, birational_seq, ZZx, matrices_of_operators, @@ -414,7 +416,6 @@ function add_by_hand( weightspaces, dim_weightspace, weight_w, - highest_weight, monomials_in_weightspace, space, v0, @@ -473,6 +474,17 @@ function operators_lusztig(L::LieAlgebra, reduced_expression::Vector{Int}) return operators end +function operators_demazure(V::DemazureModuleData) + # Computes the operators for the Demazure module V. + op = RootSpaceElem[] + for negroot in negative_roots(root_system(base_lie_algebra(V))) + if is_positive_root(negroot * V.weyl_group_elem) + push!(op, -negroot) + end + end + return op +end + function sub_weights(w::WeightLatticeElem) # returns list of weights v != 0, highest_weight with 0 <= v <= w elementwise @req is_dominant(w) "The input must be a dominant weight" diff --git a/experimental/BasisLieHighestWeight/src/ModuleData.jl b/experimental/BasisLieHighestWeight/src/ModuleData.jl new file mode 100644 index 000000000000..d85fed97255b --- /dev/null +++ b/experimental/BasisLieHighestWeight/src/ModuleData.jl @@ -0,0 +1,92 @@ +abstract type ModuleData end + +# To be implemented by subtypes: +# Mandatory: +# base_lie_algebra(V::MyModuleData) -> LieAlgebra +# highest_weight(V::MyModuleData) -> WeightLatticeElem +# dim(V::MyModuleData) -> ZZRingElem +# character(V::MyModuleData) -> Dict{WeightLatticeElem,ZZRingElem} + + +mutable struct SimpleModuleData <: ModuleData + L::LieAlgebra + highest_weight::WeightLatticeElem + + # The following fields are not set by default, just for caching + dim::ZZRingElem + character::Dict{WeightLatticeElem, ZZRingElem} + + function SimpleModuleData(L::LieAlgebra, highest_weight::WeightLatticeElem) + return new(L, highest_weight) + end +end + +function SimpleModuleData(L::LieAlgebra, highest_weight::Vector{Int}) + return SimpleModuleData(L, WeightLatticeElem(root_system(L), highest_weight)) +end + +function base_lie_algebra(V::SimpleModuleData) + return V.L +end + +function highest_weight(V::SimpleModuleData) + return V.highest_weight +end + +function dim(V::SimpleModuleData) + if !isdefined(V, :dim) + V.dim = dim_of_simple_module(ZZRingElem, base_lie_algebra(V), highest_weight(V)) + end + return V.dim +end + +function character(V::SimpleModuleData) + if !isdefined(V, :character) + V.character = character(ZZRingElem, base_lie_algebra(V), highest_weight(V)) + end + return V.character +end + +mutable struct DemazureModuleData <: ModuleData + L::LieAlgebra + highest_weight::WeightLatticeElem + weyl_group_elem::WeylGroupElem + + # The following fields are not set by default, just for caching + dim::ZZRingElem + character::Dict{WeightLatticeElem, ZZRingElem} + + function DemazureModuleData(L::LieAlgebra, highest_weight::WeightLatticeElem, weyl_group_elem::WeylGroupElem) + return new(L, highest_weight, weyl_group_elem) + end +end + +function DemazureModuleData(L::LieAlgebra, highest_weight::Vector{Int}, weyl_group_elem::Vector{Int}) + return DemazureModuleData(L, WeightLatticeElem(root_system(L), highest_weight), WeylGroupElem(weyl_group(root_system(L)), weyl_group_elem)) +end + +function base_lie_algebra(V::DemazureModuleData) + return V.L +end + +function highest_weight(V::DemazureModuleData) + return V.highest_weight +end + +function character(V::DemazureModuleData) + if !isdefined(V, :character) + V.character = demazure_character(ZZRingElem, base_lie_algebra(V), highest_weight(V), V.weyl_group_elem) + end + return V.character +end + +function dim(V::DemazureModuleData) + if !isdefined(V, :dim) + V.dim = sum(values(character(V)); init=zero(ZZ)) + end + return V.dim +end + +function weyl_group_elem(V::DemazureModuleData) + return V.weyl_group_elem +end diff --git a/experimental/BasisLieHighestWeight/src/MonomialBasis.jl b/experimental/BasisLieHighestWeight/src/MonomialBasis.jl index 57d0b0d8047e..7e2b6036cf22 100644 --- a/experimental/BasisLieHighestWeight/src/MonomialBasis.jl +++ b/experimental/BasisLieHighestWeight/src/MonomialBasis.jl @@ -1,36 +1,32 @@ @attributes mutable struct MonomialBasis - lie_algebra::AbstractLieAlgebra{QQFieldElem} - highest_weight::WeightLatticeElem + V::ModuleData birational_seq::BirationalSequence monomial_ordering::MonomialOrdering - dimension::Int monomials::Set{ZZMPolyRingElem} monomials_parent::ZZMPolyRing function MonomialBasis( - lie_algebra::AbstractLieAlgebra{QQFieldElem}, - highest_weight::WeightLatticeElem, + V::ModuleData, birational_seq::BirationalSequence, monomial_ordering::MonomialOrdering, monomials::Set{ZZMPolyRingElem}, ) + @req dim(V) == length(monomials) "dimesion mismatch" return new( - lie_algebra, - highest_weight, + V, birational_seq, monomial_ordering, - length(monomials), monomials, parent(first(monomials)), ) end end -base_lie_algebra(basis::MonomialBasis) = basis.lie_algebra +base_lie_algebra(basis::MonomialBasis) = base_lie_algebra(basis.V) -highest_weight(basis::MonomialBasis) = basis.highest_weight +highest_weight(basis::MonomialBasis) = highest_weight(basis.V) -dim(basis::MonomialBasis) = basis.dimension +dim(basis::MonomialBasis) = dim(basis.V) length(basis::MonomialBasis) = dim(basis) monomials(basis::MonomialBasis) = basis.monomials diff --git a/experimental/BasisLieHighestWeight/src/NewMonomial.jl b/experimental/BasisLieHighestWeight/src/NewMonomial.jl index 3f28c032e5b0..47093fe6bcfa 100644 --- a/experimental/BasisLieHighestWeight/src/NewMonomial.jl +++ b/experimental/BasisLieHighestWeight/src/NewMonomial.jl @@ -2,7 +2,7 @@ function weight(mon::ZZMPolyRingElem, birational_seq::BirationalSequence) @assert length(birational_seq) == nvars(parent(mon)) return sum( exp * weight for - (exp, weight) in zip(degrees(mon), operators_as_weights(birational_seq)) + (exp, weight) in zip(degrees(mon), operators_as_weights(birational_seq)); init = zero(weight_lattice(root_system(birational_seq))) ) end diff --git a/experimental/BasisLieHighestWeight/src/UserFunctions.jl b/experimental/BasisLieHighestWeight/src/UserFunctions.jl index f589ab8f3709..7b3b676eda84 100644 --- a/experimental/BasisLieHighestWeight/src/UserFunctions.jl +++ b/experimental/BasisLieHighestWeight/src/UserFunctions.jl @@ -125,8 +125,9 @@ function basis_lie_highest_weight( type::Symbol, rank::Int, highest_weight::Vector{Int}; monomial_ordering::Symbol=:degrevlex ) L = lie_algebra(QQ, type, rank) + V = SimpleModuleData(L, highest_weight) operators = operators_asc_height(L) - return basis_lie_highest_weight_compute(L, highest_weight, operators, monomial_ordering) + return basis_lie_highest_weight_compute(V, operators, monomial_ordering) end function basis_lie_highest_weight( @@ -137,8 +138,9 @@ function basis_lie_highest_weight( monomial_ordering::Symbol=:degrevlex, ) L = lie_algebra(QQ, type, rank) + V = SimpleModuleData(L, highest_weight) operators = operators_by_index(L, birational_sequence) - return basis_lie_highest_weight_compute(L, highest_weight, operators, monomial_ordering) + return basis_lie_highest_weight_compute(V, operators, monomial_ordering) end function basis_lie_highest_weight( @@ -149,8 +151,9 @@ function basis_lie_highest_weight( monomial_ordering::Symbol=:degrevlex, ) L = lie_algebra(QQ, type, rank) + V = SimpleModuleData(L, highest_weight) operators = operators_by_simple_roots(L, birational_sequence) - return basis_lie_highest_weight_compute(L, highest_weight, operators, monomial_ordering) + return basis_lie_highest_weight_compute(V, operators, monomial_ordering) end @doc raw""" @@ -200,8 +203,9 @@ function basis_lie_highest_weight_lusztig( ) monomial_ordering = :wdegrevlex L = lie_algebra(QQ, type, rank) + V = SimpleModuleData(L, highest_weight) operators = operators_lusztig(L, reduced_expression) - return basis_lie_highest_weight_compute(L, highest_weight, operators, monomial_ordering) + return basis_lie_highest_weight_compute(V, operators, monomial_ordering) end @doc raw""" @@ -270,8 +274,9 @@ function basis_lie_highest_weight_string( ) monomial_ordering = :neglex L = lie_algebra(QQ, type, rank) + V = SimpleModuleData(L, highest_weight) operators = operators_by_index(L, reduced_expression) - return basis_lie_highest_weight_compute(L, highest_weight, operators, monomial_ordering) + return basis_lie_highest_weight_compute(V, operators, monomial_ordering) end @doc raw""" @@ -309,10 +314,11 @@ over Lie algebra of type A3 function basis_lie_highest_weight_ffl(type::Symbol, rank::Int, highest_weight::Vector{Int}) monomial_ordering = :degrevlex L = lie_algebra(QQ, type, rank) + V = SimpleModuleData(L, highest_weight) operators = reverse(operators_asc_height(L)) # we reverse the order here to have simple roots at the right end, this is then a good ordering. # simple roots at the right end speed up the program very much - return basis_lie_highest_weight_compute(L, highest_weight, operators, monomial_ordering) + return basis_lie_highest_weight_compute(V, operators, monomial_ordering) end @doc raw""" @@ -381,8 +387,9 @@ function basis_lie_highest_weight_nz( ) monomial_ordering = :degrevlex L = lie_algebra(QQ, type, rank) + V = SimpleModuleData(L, WeightLatticeElem(root_system(L), highest_weight)) operators = operators_by_index(L, reduced_expression) - return basis_lie_highest_weight_compute(L, highest_weight, operators, monomial_ordering) + return basis_lie_highest_weight_compute(V, operators, monomial_ordering) end @doc raw""" @@ -559,3 +566,12 @@ function basis_coordinate_ring_kodaira_ffl( L, highest_weight, degree, operators, monomial_ordering ) end + +function basis_lie_highest_weight_demazure( + type::Symbol, rank::Int, highest_weight::Vector{Int}, weyl_group_elem::Vector{Int}; monomial_ordering::Symbol=:degrevlex +) + L = lie_algebra(QQ, type, rank) + V = DemazureModuleData(L, highest_weight, weyl_group_elem) + operators = operators_demazure(V) + return basis_lie_highest_weight_compute(V, operators, monomial_ordering) +end