Skip to content

Commit

Permalink
Add tests for 0-dim modules
Browse files Browse the repository at this point in the history
  • Loading branch information
lgoettgens committed Sep 19, 2023
1 parent d0daf59 commit 4158bf4
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion experimental/LieAlgebras/test/LieAlgebraModule-test.jl
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ function lie_algebra_module_conformance_test(

@test coefficients(v) == [coeff(v, i) for i in 1:dim(V)]
@test all(i -> coeff(v, i) == v[i], 1:dim(V))
@test sum(v[i] * basis(V, i) for i in 1:dim(V)) == v
@test sum(v[i] * basis(V, i) for i in 1:dim(V); init=zero(V)) == v

@test v == v
@test deepcopy(v) == v
Expand Down Expand Up @@ -115,6 +115,18 @@ end
sc[3, 2] = sparse_row(QQ, [1, 2], [0, -1])

@testset "conformance tests" begin
@testset "0-dim module of sl_2(QQ)" begin
L = special_linear_lie_algebra(QQ, 2)
V = trivial_module(L, 0)
lie_algebra_module_conformance_test(L, V)
end

@testset "3-dim trivial module of so_3(QQ)" begin
L = special_orthogonal_lie_algebra(QQ, 2)
V = trivial_module(L, 3)
lie_algebra_module_conformance_test(L, V)
end

@testset "V of sl_2(QQ) using structure constants" begin
L = special_linear_lie_algebra(QQ, 2)
V = abstract_module(L, 2, sc)
Expand Down

0 comments on commit 4158bf4

Please sign in to comment.