From e9d361c2d9b45d132f4da1e3ebc18beaa97e89d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20G=C3=B6ttgens?= Date: Wed, 25 Sep 2024 16:08:04 +0200 Subject: [PATCH] Adapt to new LieAlgebraModule type param --- src/SmashProductLie.jl | 2 +- src/SmashProductLieDeform.jl | 2 +- src/Types.jl | 2 +- test/ModuleSimpleStructure-test.jl | 48 +++++++++++++++--------------- 4 files changed, 27 insertions(+), 27 deletions(-) diff --git a/src/SmashProductLie.jl b/src/SmashProductLie.jl index 6de5b49..3ef08ce 100644 --- a/src/SmashProductLie.jl +++ b/src/SmashProductLie.jl @@ -25,7 +25,7 @@ base_lie_algebra( ) where {C <: RingElem, LieC <: FieldElem, LieT <: LieAlgebraElem{LieC}} = Sp.L::parent_type(LieT) base_module(Sp::SmashProductLie{C, LieC, LieT}) where {C <: RingElem, LieC <: FieldElem, LieT <: LieAlgebraElem{LieC}} = - Sp.V::LieAlgebraModule{LieC} + Sp.V underlying_algebra( Sp::SmashProductLie{C, LieC, LieT}, diff --git a/src/SmashProductLieDeform.jl b/src/SmashProductLieDeform.jl index 5e58b3e..0a01616 100644 --- a/src/SmashProductLieDeform.jl +++ b/src/SmashProductLieDeform.jl @@ -26,7 +26,7 @@ base_lie_algebra( base_module( D::SmashProductLieDeform{C, LieC, LieT}, -) where {C <: RingElem, LieC <: FieldElem, LieT <: LieAlgebraElem{LieC}} = base_module(D.sp)::LieAlgebraModule{LieC} +) where {C <: RingElem, LieC <: FieldElem, LieT <: LieAlgebraElem{LieC}} = base_module(D.sp) underlying_algebra( D::SmashProductLieDeform{C, LieC, LieT}, diff --git a/src/Types.jl b/src/Types.jl index 530b5eb..7b5b82e 100644 --- a/src/Types.jl +++ b/src/Types.jl @@ -225,7 +225,7 @@ It gets created by calling [`smash_product`](@ref). @attributes mutable struct SmashProductLie{C <: RingElem, LieC <: FieldElem, LieT <: LieAlgebraElem{LieC}} <: NCRing coeff_ring::Ring L::LieAlgebra{LieC} - V::LieAlgebraModule{LieC} + V::LieAlgebraModule{LieC, LieT} alg::FreeAssociativeAlgebra{C} rels::Matrix{Union{Nothing, F}} where {F <: FreeAssociativeAlgebraElem{C}} diff --git a/test/ModuleSimpleStructure-test.jl b/test/ModuleSimpleStructure-test.jl index 81c64dc..3b083c2 100644 --- a/test/ModuleSimpleStructure-test.jl +++ b/test/ModuleSimpleStructure-test.jl @@ -8,8 +8,8 @@ @test is_welldefined(h) @test is_isomorphism(h) @test W == V - @test sprint(show, basis(V)) == "LieAlgebraModuleElem{QQFieldElem}[v_1*, v_2*, v_3*]" - @test sprint(show, h.(basis(V))) == "LieAlgebraModuleElem{QQFieldElem}[v_1*, v_2*, v_3*]" + @test sprint(show, basis(V)) == "LieAlgebraModuleElem{QQFieldElem, LinearLieAlgebraElem{QQFieldElem}}[v_1*, v_2*, v_3*]" + @test sprint(show, h.(basis(V))) == "LieAlgebraModuleElem{QQFieldElem, LinearLieAlgebraElem{QQFieldElem}}[v_1*, v_2*, v_3*]" end @testset "Duality, duality" begin @@ -18,8 +18,8 @@ @test is_welldefined(h) @test is_isomorphism(h) @test W == stdV - @test sprint(show, basis(V)) == "LieAlgebraModuleElem{QQFieldElem}[(v_1*)*, (v_2*)*, (v_3*)*]" - @test sprint(show, h.(basis(V))) == "LieAlgebraModuleElem{QQFieldElem}[v_1, v_2, v_3]" + @test sprint(show, basis(V)) == "LieAlgebraModuleElem{QQFieldElem, LinearLieAlgebraElem{QQFieldElem}}[(v_1*)*, (v_2*)*, (v_3*)*]" + @test sprint(show, h.(basis(V))) == "LieAlgebraModuleElem{QQFieldElem, LinearLieAlgebraElem{QQFieldElem}}[v_1, v_2, v_3]" end @testset "Duality, direct sum" begin @@ -29,9 +29,9 @@ @test is_isomorphism(h) @test W == direct_sum(dual(stdV), dual(stdV), stdV) @test sprint(show, basis(V)) == - "LieAlgebraModuleElem{QQFieldElem}[(v_1^(1))*, (v_2^(1))*, (v_3^(1))*, (v_1^(2))*, (v_2^(2))*, (v_3^(2))*, ((v_1*)^(3))*, ((v_2*)^(3))*, ((v_3*)^(3))*]" + "LieAlgebraModuleElem{QQFieldElem, LinearLieAlgebraElem{QQFieldElem}}[(v_1^(1))*, (v_2^(1))*, (v_3^(1))*, (v_1^(2))*, (v_2^(2))*, (v_3^(2))*, ((v_1*)^(3))*, ((v_2*)^(3))*, ((v_3*)^(3))*]" @test sprint(show, h.(basis(V))) == - "LieAlgebraModuleElem{QQFieldElem}[(v_1*)^(1), (v_2*)^(1), (v_3*)^(1), (v_1*)^(2), (v_2*)^(2), (v_3*)^(2), v_1^(3), v_2^(3), v_3^(3)]" + "LieAlgebraModuleElem{QQFieldElem, LinearLieAlgebraElem{QQFieldElem}}[(v_1*)^(1), (v_2*)^(1), (v_3*)^(1), (v_1*)^(2), (v_2*)^(2), (v_3*)^(2), v_1^(3), v_2^(3), v_3^(3)]" end @testset "Duality, tensor product" begin @@ -41,9 +41,9 @@ @test is_isomorphism(h) @test W == tensor_product(dual(stdV), stdV) @test sprint(show, basis(V)) == - "LieAlgebraModuleElem{QQFieldElem}[(v_1⊗(v_1*))*, (v_1⊗(v_2*))*, (v_1⊗(v_3*))*, (v_2⊗(v_1*))*, (v_2⊗(v_2*))*, (v_2⊗(v_3*))*, (v_3⊗(v_1*))*, (v_3⊗(v_2*))*, (v_3⊗(v_3*))*]" + "LieAlgebraModuleElem{QQFieldElem, LinearLieAlgebraElem{QQFieldElem}}[(v_1⊗(v_1*))*, (v_1⊗(v_2*))*, (v_1⊗(v_3*))*, (v_2⊗(v_1*))*, (v_2⊗(v_2*))*, (v_2⊗(v_3*))*, (v_3⊗(v_1*))*, (v_3⊗(v_2*))*, (v_3⊗(v_3*))*]" @test sprint(show, h.(basis(V))) == - "LieAlgebraModuleElem{QQFieldElem}[(v_1*)⊗v_1, (v_1*)⊗v_2, (v_1*)⊗v_3, (v_2*)⊗v_1, (v_2*)⊗v_2, (v_2*)⊗v_3, (v_3*)⊗v_1, (v_3*)⊗v_2, (v_3*)⊗v_3]" + "LieAlgebraModuleElem{QQFieldElem, LinearLieAlgebraElem{QQFieldElem}}[(v_1*)⊗v_1, (v_1*)⊗v_2, (v_1*)⊗v_3, (v_2*)⊗v_1, (v_2*)⊗v_2, (v_2*)⊗v_3, (v_3*)⊗v_1, (v_3*)⊗v_2, (v_3*)⊗v_3]" end @testset "Duality, exterior power, k = $k" for k in 2:3 @@ -53,9 +53,9 @@ @test is_isomorphism(h) @test W == exterior_power_obj(dual(stdV), k) if k == 2 - @test sprint(show, basis(V)) == "LieAlgebraModuleElem{QQFieldElem}[(v_1∧v_2)*, (v_1∧v_3)*, (v_2∧v_3)*]" + @test sprint(show, basis(V)) == "LieAlgebraModuleElem{QQFieldElem, LinearLieAlgebraElem{QQFieldElem}}[(v_1∧v_2)*, (v_1∧v_3)*, (v_2∧v_3)*]" @test sprint(show, h.(basis(V))) == - "LieAlgebraModuleElem{QQFieldElem}[(v_1*)∧(v_2*), (v_1*)∧(v_3*), (v_2*)∧(v_3*)]" + "LieAlgebraModuleElem{QQFieldElem, LinearLieAlgebraElem{QQFieldElem}}[(v_1*)∧(v_2*), (v_1*)∧(v_3*), (v_2*)∧(v_3*)]" end end @@ -67,9 +67,9 @@ @test W == symmetric_power_obj(dual(stdV), k) if k == 2 @test sprint(show, basis(V)) == - "LieAlgebraModuleElem{QQFieldElem}[(v_1^2)*, (v_1*v_2)*, (v_1*v_3)*, (v_2^2)*, (v_2*v_3)*, (v_3^2)*]" + "LieAlgebraModuleElem{QQFieldElem, LinearLieAlgebraElem{QQFieldElem}}[(v_1^2)*, (v_1*v_2)*, (v_1*v_3)*, (v_2^2)*, (v_2*v_3)*, (v_3^2)*]" @test sprint(show, h.(basis(V))) == - "LieAlgebraModuleElem{QQFieldElem}[(v_1*)^2, 2*(v_1*)*(v_2*), 2*(v_1*)*(v_3*), (v_2*)^2, 2*(v_2*)*(v_3*), (v_3*)^2]" + "LieAlgebraModuleElem{QQFieldElem, LinearLieAlgebraElem{QQFieldElem}}[(v_1*)^2, 2*(v_1*)*(v_2*), 2*(v_1*)*(v_3*), (v_2*)^2, 2*(v_2*)*(v_3*), (v_3*)^2]" end end @@ -81,9 +81,9 @@ @test W == tensor_power_obj(dual(stdV), k) if k == 2 @test sprint(show, basis(V)) == - "LieAlgebraModuleElem{QQFieldElem}[(v_1⊗v_1)*, (v_1⊗v_2)*, (v_1⊗v_3)*, (v_2⊗v_1)*, (v_2⊗v_2)*, (v_2⊗v_3)*, (v_3⊗v_1)*, (v_3⊗v_2)*, (v_3⊗v_3)*]" + "LieAlgebraModuleElem{QQFieldElem, LinearLieAlgebraElem{QQFieldElem}}[(v_1⊗v_1)*, (v_1⊗v_2)*, (v_1⊗v_3)*, (v_2⊗v_1)*, (v_2⊗v_2)*, (v_2⊗v_3)*, (v_3⊗v_1)*, (v_3⊗v_2)*, (v_3⊗v_3)*]" @test sprint(show, h.(basis(V))) == - "LieAlgebraModuleElem{QQFieldElem}[(v_1*)⊗(v_1*), (v_1*)⊗(v_2*), (v_1*)⊗(v_3*), (v_2*)⊗(v_1*), (v_2*)⊗(v_2*), (v_2*)⊗(v_3*), (v_3*)⊗(v_1*), (v_3*)⊗(v_2*), (v_3*)⊗(v_3*)]" + "LieAlgebraModuleElem{QQFieldElem, LinearLieAlgebraElem{QQFieldElem}}[(v_1*)⊗(v_1*), (v_1*)⊗(v_2*), (v_1*)⊗(v_3*), (v_2*)⊗(v_1*), (v_2*)⊗(v_2*), (v_2*)⊗(v_3*), (v_3*)⊗(v_1*), (v_3*)⊗(v_2*), (v_3*)⊗(v_3*)]" end end @@ -93,8 +93,8 @@ @test is_welldefined(h) @test is_isomorphism(h) @test W == exterior_power_obj(stdV, 2) - @test sprint(show, basis(V)) == "LieAlgebraModuleElem{QQFieldElem}[v_1∧v_2, v_1∧v_3, v_2∧v_3]" - @test sprint(show, h.(basis(V))) == "LieAlgebraModuleElem{QQFieldElem}[v_1∧v_2, v_1∧v_3, v_2∧v_3]" + @test sprint(show, basis(V)) == "LieAlgebraModuleElem{QQFieldElem, LinearLieAlgebraElem{QQFieldElem}}[v_1∧v_2, v_1∧v_3, v_2∧v_3]" + @test sprint(show, h.(basis(V))) == "LieAlgebraModuleElem{QQFieldElem, LinearLieAlgebraElem{QQFieldElem}}[v_1∧v_2, v_1∧v_3, v_2∧v_3]" end @testset "Direct sum: 0-dim summand" begin @@ -107,9 +107,9 @@ @test is_isomorphism(h) @test W == direct_sum(V1, V3) @test sprint(show, basis(V)) == - "LieAlgebraModuleElem{QQFieldElem}[(v_1*)^(1), (v_2*)^(1), (v_3*)^(1), (v_1∧v_2)^(3), (v_1∧v_3)^(3), (v_2∧v_3)^(3)]" + "LieAlgebraModuleElem{QQFieldElem, LinearLieAlgebraElem{QQFieldElem}}[(v_1*)^(1), (v_2*)^(1), (v_3*)^(1), (v_1∧v_2)^(3), (v_1∧v_3)^(3), (v_2∧v_3)^(3)]" @test sprint(show, h.(basis(V))) == - "LieAlgebraModuleElem{QQFieldElem}[(v_1*)^(1), (v_2*)^(1), (v_3*)^(1), (v_1∧v_2)^(2), (v_1∧v_3)^(2), (v_2∧v_3)^(2)]" + "LieAlgebraModuleElem{QQFieldElem, LinearLieAlgebraElem{QQFieldElem}}[(v_1*)^(1), (v_2*)^(1), (v_3*)^(1), (v_1∧v_2)^(2), (v_1∧v_3)^(2), (v_2∧v_3)^(2)]" end end @@ -120,9 +120,9 @@ @test is_isomorphism(h) @test W == direct_sum(stdV, exterior_power_obj(stdV, 2), dual(stdV)) @test sprint(show, basis(V)) == - "LieAlgebraModuleElem{QQFieldElem}[(v_1^(1))^(1), (v_2^(1))^(1), (v_3^(1))^(1), ((v_1∧v_2)^(2))^(1), ((v_1∧v_3)^(2))^(1), ((v_2∧v_3)^(2))^(1), (v_1*)^(2), (v_2*)^(2), (v_3*)^(2)]" + "LieAlgebraModuleElem{QQFieldElem, LinearLieAlgebraElem{QQFieldElem}}[(v_1^(1))^(1), (v_2^(1))^(1), (v_3^(1))^(1), ((v_1∧v_2)^(2))^(1), ((v_1∧v_3)^(2))^(1), ((v_2∧v_3)^(2))^(1), (v_1*)^(2), (v_2*)^(2), (v_3*)^(2)]" @test sprint(show, h.(basis(V))) == - "LieAlgebraModuleElem{QQFieldElem}[v_1^(1), v_2^(1), v_3^(1), (v_1∧v_2)^(2), (v_1∧v_3)^(2), (v_2∧v_3)^(2), (v_1*)^(3), (v_2*)^(3), (v_3*)^(3)]" + "LieAlgebraModuleElem{QQFieldElem, LinearLieAlgebraElem{QQFieldElem}}[v_1^(1), v_2^(1), v_3^(1), (v_1∧v_2)^(2), (v_1∧v_3)^(2), (v_2∧v_3)^(2), (v_1*)^(3), (v_2*)^(3), (v_3*)^(3)]" end @testset "Tensor product: one factor" begin @@ -131,8 +131,8 @@ @test is_welldefined(h) @test is_isomorphism(h) @test W == exterior_power_obj(stdV, 2) - @test sprint(show, basis(V)) == "LieAlgebraModuleElem{QQFieldElem}[v_1∧v_2, v_1∧v_3, v_2∧v_3]" - @test sprint(show, h.(basis(V))) == "LieAlgebraModuleElem{QQFieldElem}[v_1∧v_2, v_1∧v_3, v_2∧v_3]" + @test sprint(show, basis(V)) == "LieAlgebraModuleElem{QQFieldElem, LinearLieAlgebraElem{QQFieldElem}}[v_1∧v_2, v_1∧v_3, v_2∧v_3]" + @test sprint(show, h.(basis(V))) == "LieAlgebraModuleElem{QQFieldElem, LinearLieAlgebraElem{QQFieldElem}}[v_1∧v_2, v_1∧v_3, v_2∧v_3]" end @testset "Tensor product: trivial 1-dim factor" begin @@ -154,9 +154,9 @@ @test is_isomorphism(h) @test W == tensor_product(stdV, exterior_power_obj(stdV, 2), dual(stdV)) @test sprint(show, basis(V)) == - "LieAlgebraModuleElem{QQFieldElem}[(v_1⊗(v_1∧v_2))⊗(v_1*), (v_1⊗(v_1∧v_2))⊗(v_2*), (v_1⊗(v_1∧v_2))⊗(v_3*), (v_1⊗(v_1∧v_3))⊗(v_1*), (v_1⊗(v_1∧v_3))⊗(v_2*), (v_1⊗(v_1∧v_3))⊗(v_3*), (v_1⊗(v_2∧v_3))⊗(v_1*), (v_1⊗(v_2∧v_3))⊗(v_2*), (v_1⊗(v_2∧v_3))⊗(v_3*), (v_2⊗(v_1∧v_2))⊗(v_1*), (v_2⊗(v_1∧v_2))⊗(v_2*), (v_2⊗(v_1∧v_2))⊗(v_3*), (v_2⊗(v_1∧v_3))⊗(v_1*), (v_2⊗(v_1∧v_3))⊗(v_2*), (v_2⊗(v_1∧v_3))⊗(v_3*), (v_2⊗(v_2∧v_3))⊗(v_1*), (v_2⊗(v_2∧v_3))⊗(v_2*), (v_2⊗(v_2∧v_3))⊗(v_3*), (v_3⊗(v_1∧v_2))⊗(v_1*), (v_3⊗(v_1∧v_2))⊗(v_2*), (v_3⊗(v_1∧v_2))⊗(v_3*), (v_3⊗(v_1∧v_3))⊗(v_1*), (v_3⊗(v_1∧v_3))⊗(v_2*), (v_3⊗(v_1∧v_3))⊗(v_3*), (v_3⊗(v_2∧v_3))⊗(v_1*), (v_3⊗(v_2∧v_3))⊗(v_2*), (v_3⊗(v_2∧v_3))⊗(v_3*)]" + "LieAlgebraModuleElem{QQFieldElem, LinearLieAlgebraElem{QQFieldElem}}[(v_1⊗(v_1∧v_2))⊗(v_1*), (v_1⊗(v_1∧v_2))⊗(v_2*), (v_1⊗(v_1∧v_2))⊗(v_3*), (v_1⊗(v_1∧v_3))⊗(v_1*), (v_1⊗(v_1∧v_3))⊗(v_2*), (v_1⊗(v_1∧v_3))⊗(v_3*), (v_1⊗(v_2∧v_3))⊗(v_1*), (v_1⊗(v_2∧v_3))⊗(v_2*), (v_1⊗(v_2∧v_3))⊗(v_3*), (v_2⊗(v_1∧v_2))⊗(v_1*), (v_2⊗(v_1∧v_2))⊗(v_2*), (v_2⊗(v_1∧v_2))⊗(v_3*), (v_2⊗(v_1∧v_3))⊗(v_1*), (v_2⊗(v_1∧v_3))⊗(v_2*), (v_2⊗(v_1∧v_3))⊗(v_3*), (v_2⊗(v_2∧v_3))⊗(v_1*), (v_2⊗(v_2∧v_3))⊗(v_2*), (v_2⊗(v_2∧v_3))⊗(v_3*), (v_3⊗(v_1∧v_2))⊗(v_1*), (v_3⊗(v_1∧v_2))⊗(v_2*), (v_3⊗(v_1∧v_2))⊗(v_3*), (v_3⊗(v_1∧v_3))⊗(v_1*), (v_3⊗(v_1∧v_3))⊗(v_2*), (v_3⊗(v_1∧v_3))⊗(v_3*), (v_3⊗(v_2∧v_3))⊗(v_1*), (v_3⊗(v_2∧v_3))⊗(v_2*), (v_3⊗(v_2∧v_3))⊗(v_3*)]" @test sprint(show, h.(basis(V))) == - "LieAlgebraModuleElem{QQFieldElem}[v_1⊗(v_1∧v_2)⊗(v_1*), v_1⊗(v_1∧v_2)⊗(v_2*), v_1⊗(v_1∧v_2)⊗(v_3*), v_1⊗(v_1∧v_3)⊗(v_1*), v_1⊗(v_1∧v_3)⊗(v_2*), v_1⊗(v_1∧v_3)⊗(v_3*), v_1⊗(v_2∧v_3)⊗(v_1*), v_1⊗(v_2∧v_3)⊗(v_2*), v_1⊗(v_2∧v_3)⊗(v_3*), v_2⊗(v_1∧v_2)⊗(v_1*), v_2⊗(v_1∧v_2)⊗(v_2*), v_2⊗(v_1∧v_2)⊗(v_3*), v_2⊗(v_1∧v_3)⊗(v_1*), v_2⊗(v_1∧v_3)⊗(v_2*), v_2⊗(v_1∧v_3)⊗(v_3*), v_2⊗(v_2∧v_3)⊗(v_1*), v_2⊗(v_2∧v_3)⊗(v_2*), v_2⊗(v_2∧v_3)⊗(v_3*), v_3⊗(v_1∧v_2)⊗(v_1*), v_3⊗(v_1∧v_2)⊗(v_2*), v_3⊗(v_1∧v_2)⊗(v_3*), v_3⊗(v_1∧v_3)⊗(v_1*), v_3⊗(v_1∧v_3)⊗(v_2*), v_3⊗(v_1∧v_3)⊗(v_3*), v_3⊗(v_2∧v_3)⊗(v_1*), v_3⊗(v_2∧v_3)⊗(v_2*), v_3⊗(v_2∧v_3)⊗(v_3*)]" + "LieAlgebraModuleElem{QQFieldElem, LinearLieAlgebraElem{QQFieldElem}}[v_1⊗(v_1∧v_2)⊗(v_1*), v_1⊗(v_1∧v_2)⊗(v_2*), v_1⊗(v_1∧v_2)⊗(v_3*), v_1⊗(v_1∧v_3)⊗(v_1*), v_1⊗(v_1∧v_3)⊗(v_2*), v_1⊗(v_1∧v_3)⊗(v_3*), v_1⊗(v_2∧v_3)⊗(v_1*), v_1⊗(v_2∧v_3)⊗(v_2*), v_1⊗(v_2∧v_3)⊗(v_3*), v_2⊗(v_1∧v_2)⊗(v_1*), v_2⊗(v_1∧v_2)⊗(v_2*), v_2⊗(v_1∧v_2)⊗(v_3*), v_2⊗(v_1∧v_3)⊗(v_1*), v_2⊗(v_1∧v_3)⊗(v_2*), v_2⊗(v_1∧v_3)⊗(v_3*), v_2⊗(v_2∧v_3)⊗(v_1*), v_2⊗(v_2∧v_3)⊗(v_2*), v_2⊗(v_2∧v_3)⊗(v_3*), v_3⊗(v_1∧v_2)⊗(v_1*), v_3⊗(v_1∧v_2)⊗(v_2*), v_3⊗(v_1∧v_2)⊗(v_3*), v_3⊗(v_1∧v_3)⊗(v_1*), v_3⊗(v_1∧v_3)⊗(v_2*), v_3⊗(v_1∧v_3)⊗(v_3*), v_3⊗(v_2∧v_3)⊗(v_1*), v_3⊗(v_2∧v_3)⊗(v_2*), v_3⊗(v_2∧v_3)⊗(v_3*)]" end @testset "Tensor product, direct sum" begin