Skip to content

Commit

Permalink
Add some doctests
Browse files Browse the repository at this point in the history
  • Loading branch information
lgoettgens committed Jan 30, 2024
1 parent 731a14e commit 62e54bf
Showing 1 changed file with 48 additions and 17 deletions.
65 changes: 48 additions & 17 deletions experimental/LieAlgebras/src/LieAlgebraModule.jl
Original file line number Diff line number Diff line change
Expand Up @@ -995,20 +995,26 @@ together with a map that computes the wedge product of `k` elements of `V`.
# Examples
```jldoctest
julia> L = special_linear_lie_algebra(QQ, 3);
julia> L = special_linear_lie_algebra(QQ, 2);
julia> V = symmetric_power(standard_module(L), 3)[1]; # some module
julia> V = symmetric_power(standard_module(L), 2)[1]; # some module
julia> E, map = exterior_power(V, 2)
(Exterior power module of dimension 45 over sl_3, Map: parent of tuples of type Tuple{LieAlgebraModuleElem{QQFieldElem}, LieAlgebraModuleElem{QQFieldElem}} -> exterior power module)
(Exterior power module of dimension 3 over sl_2, Map: parent of tuples of type Tuple{LieAlgebraModuleElem{QQFieldElem}, LieAlgebraModuleElem{QQFieldElem}} -> exterior power module)
julia> E
Exterior power module
of dimension 45
of dimension 3
2nd exterior power of
3rd symmetric power of
2nd symmetric power of
standard module
over special linear Lie algebra of degree 3 over QQ
over special linear Lie algebra of degree 2 over QQ
julia> basis(E)
3-element Vector{LieAlgebraModuleElem{QQFieldElem}}:
(v_1^2)^(v_1*v_2)
(v_1^2)^(v_2^2)
(v_1*v_2)^(v_2^2)
```
"""
function exterior_power(
Expand Down Expand Up @@ -1118,20 +1124,33 @@ together with a map that computes the product of `k` elements of `V`.
# Examples
```jldoctest
julia> L = special_linear_lie_algebra(QQ, 3);
julia> L = special_linear_lie_algebra(QQ, 4);
julia> V = exterior_power(standard_module(L), 2)[1]; # some module
julia> V = exterior_power(standard_module(L), 3)[1]; # some module
julia> S, map = symmetric_power(V, 3)
(Symmetric power module of dimension 10 over sl_3, Map: parent of tuples of type Tuple{LieAlgebraModuleElem{QQFieldElem}, LieAlgebraModuleElem{QQFieldElem}, LieAlgebraModuleElem{QQFieldElem}} -> symmetric power module)
julia> S, map = symmetric_power(V, 2)
(Symmetric power module of dimension 10 over sl_4, Map: parent of tuples of type Tuple{LieAlgebraModuleElem{QQFieldElem}, LieAlgebraModuleElem{QQFieldElem}} -> symmetric power module)
julia> S
Symmetric power module
of dimension 10
3rd symmetric power of
2nd exterior power of
2nd symmetric power of
3rd exterior power of
standard module
over special linear Lie algebra of degree 3 over QQ
over special linear Lie algebra of degree 4 over QQ
julia> basis(S)
10-element Vector{LieAlgebraModuleElem{QQFieldElem}}:
(v_1^v_2^v_3)^2
(v_1^v_2^v_3)*(v_1^v_2^v_4)
(v_1^v_2^v_3)*(v_1^v_3^v_4)
(v_1^v_2^v_3)*(v_2^v_3^v_4)
(v_1^v_2^v_4)^2
(v_1^v_2^v_4)*(v_1^v_3^v_4)
(v_1^v_2^v_4)*(v_2^v_3^v_4)
(v_1^v_3^v_4)^2
(v_1^v_3^v_4)*(v_2^v_3^v_4)
(v_2^v_3^v_4)^2
```
"""
function symmetric_power(
Expand Down Expand Up @@ -1263,16 +1282,28 @@ julia> L = special_linear_lie_algebra(QQ, 3);
julia> V = exterior_power(standard_module(L), 2)[1]; # some module
julia> T, map = tensor_power(V, 3)
(Tensor power module of dimension 27 over sl_3, Map: parent of tuples of type Tuple{LieAlgebraModuleElem{QQFieldElem}, LieAlgebraModuleElem{QQFieldElem}, LieAlgebraModuleElem{QQFieldElem}} -> tensor power module)
julia> T, map = tensor_power(V, 2)
(Tensor power module of dimension 9 over sl_3, Map: parent of tuples of type Tuple{LieAlgebraModuleElem{QQFieldElem}, LieAlgebraModuleElem{QQFieldElem}} -> tensor power module)
julia> T
Tensor power module
of dimension 27
3rd tensor power of
of dimension 9
2nd tensor power of
2nd exterior power of
standard module
over special linear Lie algebra of degree 3 over QQ
julia> basis(T)
9-element Vector{LieAlgebraModuleElem{QQFieldElem}}:
(v_1∧v_2) ⊗ (v_1∧v_2)
(v_1∧v_2) ⊗ (v_1∧v_3)
(v_1∧v_2) ⊗ (v_2∧v_3)
(v_1∧v_3) ⊗ (v_1∧v_2)
(v_1∧v_3) ⊗ (v_1∧v_3)
(v_1∧v_3) ⊗ (v_2∧v_3)
(v_2∧v_3) ⊗ (v_1∧v_2)
(v_2∧v_3) ⊗ (v_1∧v_3)
(v_2∧v_3) ⊗ (v_2∧v_3)
```
"""
function tensor_power(
Expand Down

0 comments on commit 62e54bf

Please sign in to comment.