Skip to content

Commit

Permalink
LieAlgebras: Constructions for module homs (#2753)
Browse files Browse the repository at this point in the history
  • Loading branch information
lgoettgens authored and antonydellavecchia committed Sep 19, 2023
1 parent 59f5e38 commit b4b9f68
Show file tree
Hide file tree
Showing 9 changed files with 766 additions and 126 deletions.
1 change: 1 addition & 0 deletions experimental/LieAlgebras/docs/src/lie_algebra_homs.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ the images of the basis elements of $L_1$ or a $\dim L_1 \times \dim L_2$ matrix
hom(::LieAlgebra{C}, ::LieAlgebra{C}, ::Vector{<:LieAlgebraElem{C}}; check::Bool=true) where {C<:RingElement}
hom(::LieAlgebra{C}, ::LieAlgebra{C}, ::MatElem{C}; check::Bool=true) where {C<:RingElement}
identity_map(::LieAlgebra)
zero_map(::LieAlgebra{C}, ::LieAlgebra{C}) where {C<:RingElement}
```

## Functions
Expand Down
14 changes: 14 additions & 0 deletions experimental/LieAlgebras/docs/src/module_homs.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ or a $\dim V_1 \times \dim V_2$ matrix.
hom(::LieAlgebraModule{C}, ::LieAlgebraModule{C}, ::Vector{<:LieAlgebraModuleElem{C}}; check::Bool=true) where {C<:RingElement}
hom(::LieAlgebraModule{C}, ::LieAlgebraModule{C}, ::MatElem{C}; check::Bool=true) where {C<:RingElement}
identity_map(::LieAlgebraModule)
zero_map(::LieAlgebraModule{C}, ::LieAlgebraModule{C}) where {C<:RingElement}
```

## Functions
Expand Down Expand Up @@ -48,3 +49,16 @@ compose(::LieAlgebraModuleHom{T1,T2}, ::LieAlgebraModuleHom{T2,T3}) where {T1<:L
is_isomorphism(::LieAlgebraModuleHom)
inv(::LieAlgebraModuleHom)
```

### Hom constructions
Lie algebra module homomorphisms support `+` and `-` if they have the same domain and codomain.

```@docs
canonical_injections(::LieAlgebraModule)
canonical_injection(::LieAlgebraModule, ::Int)
canonical_projections(::LieAlgebraModule)
canonical_projection(::LieAlgebraModule, ::Int)
hom_direct_sum(::LieAlgebraModule{C}, ::LieAlgebraModule{C}, ::Matrix{<:LieAlgebraModuleHom}) where {C<:RingElement}
hom_tensor(::LieAlgebraModule{C}, ::LieAlgebraModule{C}, ::Vector{<:LieAlgebraModuleHom}) where {C<:RingElement}
hom_power(::LieAlgebraModule{C}, ::LieAlgebraModule{C}, ::LieAlgebraModuleHom) where {C<:RingElement}
```
45 changes: 42 additions & 3 deletions experimental/LieAlgebras/src/LieAlgebraHom.jl
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@
h.matrix = mat::dense_matrix_type(coefficient_ring(L2))
h.header = MapHeader(L1, L2)
if check
for x1 in basis(L1), x2 in basis(L1)
@req h(x1) * h(x2) == h(x1 * x2) "Not a homomorphism"
end
@req is_welldefined(h) "Not a homomorphism"
end
return h
end
Expand All @@ -51,6 +49,20 @@ function matrix(h::LieAlgebraHom{<:LieAlgebra,<:LieAlgebra{C2}}) where {C2<:Ring
return (h.matrix)::dense_matrix_type(C2)
end

@doc raw"""
is_welldefined(h::LieAlgebraHom) -> Bool
Return `true` if `h` is a well-defined homomorphism of Lie algebras.
This function is used internally when calling `hom` with `check=true`.
"""
function is_welldefined(h::LieAlgebraHom)
L1 = domain(h)
for x1 in basis(L1), x2 in basis(L1)
h(x1) * h(x2) == h(x1 * x2) || return false
end
return true
end

###############################################################################
#
# String I/O
Expand Down Expand Up @@ -301,3 +313,30 @@ Lie algebra morphism
function identity_map(L::LieAlgebra)
return hom(L, L, basis(L); check=false)
end

@doc raw"""
zero_map(L1::LieAlgebra, L2::LieAlgebra) -> LieAlgebraHom
zero_map(L::LieAlgebra) -> LieAlgebraHom
Construct the zero map from `L1` to `L2` or from `L` to `L`.
# Examples
```jldoctest
julia> L = special_linear_lie_algebra(QQ, 3)
Special linear Lie algebra of degree 3
of dimension 8
over rational field
julia> zero_map(L)
Lie algebra morphism
from special linear Lie algebra of degree 3 over QQ
to special linear Lie algebra of degree 3 over QQ
```
"""
function zero_map(L1::LieAlgebra{C}, L2::LieAlgebra{C}) where {C<:RingElement}
return hom(L1, L2, zero_matrix(coefficient_ring(L2), dim(L1), dim(L2)); check=false)
end

function zero_map(L::LieAlgebra)
return zero_map(L, L)
end
Loading

0 comments on commit b4b9f68

Please sign in to comment.