Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add some more functionality, docs and tests for root systems #3191

Merged
merged 11 commits into from
Jan 23, 2024
6 changes: 2 additions & 4 deletions experimental/LieAlgebras/src/CartanMatrix.jl
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ end
@doc raw"""
cartan_bilinear_form(gcm::ZZMatrix; check::Bool=true) -> ZZMatrix
Returns the matrix of the symmetric bilinear form associated to the Cartan matrix from `cartan_matrix_symmetrizer`.
Returns the matrix of the symmetric bilinear form associated to the Cartan matrix from `cartan_symmetrizer`.
The keyword argument `check` can be set to `false` to skip verification whether `gcm` is indeed a generalized Cartan matrix.
# Example
Expand All @@ -233,10 +233,8 @@ julia> cartan_bilinear_form(cartan_matrix(:B, 2))
```
"""
function cartan_bilinear_form(gcm::ZZMatrix; check::Bool=true)
@req !check || is_cartan_matrix(gcm) "Requires a generalized Cartan matrix"

sym = cartan_symmetrizer(gcm; check)
bil = deepcopy(gcm)
sym = cartan_symmetrizer(gcm; check=false)
for i in 1:length(sym)
mul!(view(bil, i, :), sym[i])
end
Expand Down
20 changes: 19 additions & 1 deletion experimental/LieAlgebras/src/LieAlgebras.jl
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,14 @@ import ..Oscar:
derived_series,
dim,
direct_sum,
dot,
dual,
elem_type,
expressify,
exterior_power,
gen,
gens,
height,
hom,
hom_tensor,
ideal,
Expand Down Expand Up @@ -73,7 +75,7 @@ import ..Oscar:
⊕,

import Base: getindex, deepcopy_internal, hash, issubset, iszero, parent, zero
import Base: getindex, deepcopy_internal, hash, issubset, iszero, length, parent, zero
lgoettgens marked this conversation as resolved.
Show resolved Hide resolved

export AbstractLieAlgebra, AbstractLieAlgebraElem
export LieAlgebra, LieAlgebraElem
Expand Down Expand Up @@ -104,6 +106,8 @@ export coefficient_vector
export coerce_to_lie_algebra_elem
export combinations
export conjugate_dominant_weight
export coroot
export coroots
export coxeter_matrix
export derived_algebra
export dim_of_simple_module
Expand Down Expand Up @@ -132,13 +136,17 @@ export longest_element
export lower_central_series
export matrix_repr_basis
export multicombinations
export negative_coroot
export negative_coroots
export negative_root
export negative_roots
export num_positive_roots
export num_roots, nroots
export num_simple_roots
export permutations
export permutations_with_sign
export positive_coroot
export positive_coroots
export positive_root
export positive_roots
export reduced_expressions
Expand All @@ -147,6 +155,8 @@ export root_system_type, has_root_system_type
export root_system, has_root_system
export show_dynkin_diagram
export simple_module
export simple_coroot
export simple_coroots
export simple_root
export simple_roots
export special_linear_lie_algebra
Expand Down Expand Up @@ -211,6 +221,8 @@ export cartan_type_with_ordering
export chevalley_basis
export coerce_to_lie_algebra_elem
export conjugate_dominant_weight
export coroot
export coroots
export coxeter_matrix
export derived_algebra
export dim_of_simple_module
Expand Down Expand Up @@ -240,11 +252,15 @@ export longest_element
export lower_central_series
export matrix_repr_basis
export matrix_repr_basis
export negative_coroot
export negative_coroots
export negative_root
export negative_roots
export num_positive_roots
export num_roots, nroots
export num_simple_roots
export positive_coroot
export positive_coroots
export positive_root
export positive_roots
export reduced_expressions
Expand All @@ -255,6 +271,8 @@ export root_system, has_root_system
export roots
export show_dynkin_diagram
export simple_module
export simple_coroot
export simple_coroots
export simple_root
export simple_roots
export special_linear_lie_algebra
Expand Down
Loading
Loading