Skip to content

Commit

Permalink
Root system documentation (#4297)
Browse files Browse the repository at this point in the history
Co-authored-by: Felix Röhrich <[email protected]>
  • Loading branch information
lgoettgens and felix-roehrich authored Nov 22, 2024
1 parent 308aeee commit 3e670f7
Show file tree
Hide file tree
Showing 19 changed files with 1,440 additions and 468 deletions.
18 changes: 1 addition & 17 deletions experimental/BasisLieHighestWeight/src/MainAlgorithm.jl
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ function compute_monomials(
# if highest_weight is not a fundamental weight, partition into smaller summands is possible. This is the basecase of
# the recursion.
dim = dim_of_simple_module(L, highest_weight)
if is_zero(highest_weight) || is_fundamental(highest_weight)
if is_zero(highest_weight) || is_fundamental_weight(highest_weight)
push!(no_minkowski, highest_weight)
monomials = add_by_hand(
L, birational_seq, ZZx, highest_weight, monomial_ordering, Set{ZZMPolyRingElem}()
Expand Down Expand Up @@ -473,22 +473,6 @@ function operators_lusztig(L::LieAlgebra, reduced_expression::Vector{Int})
return operators
end

# TODO: upstream to LieAlgebras/RootSystem.jl
function is_fundamental(highest_weight::WeightLatticeElem)
hasone = false
for i in coefficients(highest_weight)
if iszero(i)
continue
elseif isone(i)
hasone && return false
hasone = true
else
return false
end
end
return hasone
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"
Expand Down
6 changes: 0 additions & 6 deletions experimental/BasisLieHighestWeight/test/MainAlgorithm-test.jl
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,6 @@ function check_dimension(
@test gap_dim == dim(basis) == length(monomials(basis)) # check if dimension is correct
end

@testset "is_fundamental" begin
R = root_system(:B, 3)
@test BasisLieHighestWeight.is_fundamental(WeightLatticeElem(R, [ZZ(0), ZZ(1), ZZ(0)]))
@test !BasisLieHighestWeight.is_fundamental(WeightLatticeElem(R, [ZZ(0), ZZ(1), ZZ(1)]))
end

@testset "sub_weights(_proper)" begin
sub_weights = BasisLieHighestWeight.sub_weights
sub_weights_proper = BasisLieHighestWeight.sub_weights_proper
Expand Down
2 changes: 2 additions & 0 deletions experimental/LieAlgebras/docs/doc.main
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,7 @@
"modules.md",
"module_homs.md",
"cartan_matrix.md",
"root_systems.md",
"weyl_groups.md",
],
]
46 changes: 40 additions & 6 deletions experimental/LieAlgebras/docs/src/cartan_matrix.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,46 @@ DocTestSetup = Oscar.doctestsetup()

# Cartan Matrices

Cartan matrices can be constructed from a Cartan type, and are represented as a square `ZZMatrix`.

Many functions taking a Cartan matrix as input (like [`root_system`](@ref) and [`weyl_group`](@ref)) will also accept a Cartan type as input. Both cases are semantically equivalent, but the latter may be more efficient.

!!! note
The convention for Cartan matrices in OSCAR is $(a_{ij}) = (\langle \alpha_i^\vee, \alpha_j \rangle)$ for simple roots $\alpha_i$.

## Table of contents

```@contents
Pages = ["cartan_matrix.md"]
Depth = 2:5
```

## Constructors

```@docs
cartan_matrix(::Symbol, ::Int)
cartan_matrix(::Tuple{Symbol,Int}...)
is_cartan_matrix(::ZZMatrix; generalized::Bool)
cartan_symmetrizer(::ZZMatrix; check::Bool)
cartan_bilinear_form(::ZZMatrix; check::Bool)
cartan_type(::ZZMatrix; check::Bool)
cartan_type_with_ordering(::ZZMatrix; check::Bool)
cartan_matrix(::Vector{Tuple{Symbol,Int}})
```


## Properties

```@docs
is_cartan_matrix(::ZZMatrix)
cartan_symmetrizer(::ZZMatrix)
cartan_bilinear_form(::ZZMatrix)
```


## Cartan types

The following function is used to verify the validity of a Cartan type, and is thus used in input sanitization.
```@docs
is_cartan_type(::Symbol, ::Int)
```

Given a Cartan matrix, the following functions can be used to determine its Cartan type.
```@docs
cartan_type(::ZZMatrix)
cartan_type_with_ordering(::ZZMatrix)
```
2 changes: 1 addition & 1 deletion experimental/LieAlgebras/docs/src/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ This part of OSCAR is in an experimental state; please see [Adding new projects

Please direct questions about this part of OSCAR to the following people:
* [Lars Göttgens](https://lgoe.li/)
* [Laura Voggesberger](https://www.ruhr-uni-bochum.de/ffm/Lehrstuehle/Lehrstuhl-VI/voggesberger.html)
* [Felix Röhrich](https://www.art.rwth-aachen.de/cms/~xlgua)

You can ask questions in the [OSCAR Slack](https://www.oscar-system.org/community/#slack).

Expand Down
223 changes: 223 additions & 0 deletions experimental/LieAlgebras/docs/src/root_systems.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,223 @@
```@meta
CurrentModule = Oscar
DocTestSetup = Oscar.doctestsetup()
```

# Root systems

Root systems in this module are meant to be abstract root systems, i.e. they are represented by a set of roots (vectors in an euclidean space).

The relevant types around root systems are:
- `RootSystem` for the root system itself,
- `RootSpaceElem` for elements in the root space, i.e. roots and linear combinations thereof,
- `DualRootSpaceElem` for elements in the dual root space, i.e. coroots and linear combinations thereof,
- `WeightLatticeElem` for elements in the weight lattice, i.e. weights and linear combinations thereof.

!!! warning
Most functionality around root systems is currently only intended to be used with root systems of finite type.
For root systems of affine type, some documentation may be ill-phrased or incorrect, and some functions may not work as intended.

## Table of contents

```@contents
Pages = ["root_systems.md"]
Depth = 2:5
```

## Constructing root systems

```@docs
root_system(::ZZMatrix)
root_system(::Symbol, ::Int64)
root_system(::Vector{Tuple{Symbol, Int64}})
```


## Properties of root systems

```@docs
is_simple(::RootSystem)
rank(::RootSystem)
```


### Cartan matrix and Weyl group
```@docs
cartan_matrix(::RootSystem)
```
```@docs; canonical=false
weyl_group(::RootSystem)
```


### Root system type
```@docs
has_root_system_type(::RootSystem)
root_system_type(::RootSystem)
root_system_type_with_ordering(::RootSystem)
```


### Root getters
```@docs
number_of_roots(::RootSystem)
number_of_positive_roots(::RootSystem)
number_of_simple_roots(::RootSystem)
```

The following functions return roots, see [Root space elements](@ref) for more information.
```@docs
root(::RootSystem, ::Int64)
roots(::RootSystem)
simple_root(::RootSystem, ::Int64)
simple_roots(::RootSystem)
positive_root(::RootSystem, ::Int64)
positive_roots(::RootSystem)
negative_root(::RootSystem, ::Int64)
negative_roots(::RootSystem)
```


### Coroot getters
The following functions return coroots, see [Dual root space elements](@ref) for more information.
```@docs
coroot(::RootSystem, ::Int64)
coroots(::RootSystem)
simple_coroot(::RootSystem, ::Int64)
simple_coroots(::RootSystem)
positive_coroot(::RootSystem, ::Int64)
positive_coroots(::RootSystem)
negative_coroot(::RootSystem, ::Int64)
negative_coroots(::RootSystem)
```


### Weight getters
The following functions return weights, see [Weight lattice elements](@ref) for more information.
```@docs
fundamental_weight(::RootSystem, ::Int64)
fundamental_weights(::RootSystem)
weyl_vector(::RootSystem)
```


## Root space elements

```@docs
RootSpaceElem(::RootSystem, ::Vector{<:RationalUnion})
RootSpaceElem(::RootSystem, ::QQMatrix)
RootSpaceElem(::WeightLatticeElem)
zero(::Type{RootSpaceElem}, ::RootSystem)
```

```@docs
root_system(::RootSpaceElem)
```

Basic arithmetic operations like `zero`, `+`, `-`, `*` (with rational scalars), and `==` are supported.

```@docs
coeff(::RootSpaceElem, ::Int)
coefficients(::RootSpaceElem)
```

```@docs
height(::RootSpaceElem)
iszero(::RootSpaceElem)
```

### Root testing
```@docs
is_root(::RootSpaceElem)
is_root_with_index(::RootSpaceElem)
is_simple_root(::RootSpaceElem)
is_simple_root_with_index(::RootSpaceElem)
is_positive_root(::RootSpaceElem)
is_positive_root_with_index(::RootSpaceElem)
is_negative_root(::RootSpaceElem)
is_negative_root_with_index(::RootSpaceElem)
```

### Reflections
```@docs
reflect(::RootSpaceElem, ::Int)
reflect!(::RootSpaceElem, ::Int)
```


## Dual root space elements

```@docs
DualRootSpaceElem(::RootSystem, ::Vector{<:RationalUnion})
DualRootSpaceElem(::RootSystem, ::QQMatrix)
zero(::Type{DualRootSpaceElem}, ::RootSystem)
```

```@docs
root_system(::DualRootSpaceElem)
```

Basic arithmetic operations like `zero`, `+`, `-`, `*` (with rational scalars), and `==` are supported.

```@docs
coeff(::DualRootSpaceElem, ::Int)
coefficients(::DualRootSpaceElem)
```

```@docs
height(::DualRootSpaceElem)
iszero(::DualRootSpaceElem)
```

### Coroot testing
```@docs
is_coroot(::DualRootSpaceElem)
is_coroot_with_index(::DualRootSpaceElem)
is_simple_coroot(::DualRootSpaceElem)
is_simple_coroot_with_index(::DualRootSpaceElem)
is_positive_coroot(::DualRootSpaceElem)
is_positive_coroot_with_index(::DualRootSpaceElem)
is_negative_coroot(::DualRootSpaceElem)
is_negative_coroot_with_index(::DualRootSpaceElem)
```


## Weight lattice elements

```@docs
WeightLatticeElem(::RootSystem, ::Vector{<:IntegerUnion})
WeightLatticeElem(::RootSystem, ::ZZMatrix)
WeightLatticeElem(::RootSpaceElem)
zero(::Type{WeightLatticeElem}, ::RootSystem)
```

```@docs
root_system(::WeightLatticeElem)
```

Basic arithmetic operations like `zero`, `+`, `-`, `*` (with integer scalars), and `==` are supported.

```@docs
coeff(::WeightLatticeElem, ::Int)
coefficients(::WeightLatticeElem)
```

```@docs
iszero(::WeightLatticeElem)
is_dominant(::WeightLatticeElem)
is_fundamental_weight(::WeightLatticeElem)
is_fundamental_weight_with_index(::WeightLatticeElem)
```

### Reflections
```@docs
reflect(::WeightLatticeElem, ::Int)
reflect!(::WeightLatticeElem, ::Int)
```

### Conjugate dominant weight
```@docs
conjugate_dominant_weight(::WeightLatticeElem)
conjugate_dominant_weight_with_left_elem(::WeightLatticeElem)
conjugate_dominant_weight_with_right_elem(::WeightLatticeElem)
```
Loading

0 comments on commit 3e670f7

Please sign in to comment.