Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
lgoettgens committed Jun 11, 2024
1 parent 920497b commit 84d4095
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 36 deletions.
3 changes: 3 additions & 0 deletions src/DeformationBases/ArcDiagDeformBasis.jl
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ struct ArcDiagDeformBasis{C <: RingElem} <: DeformBasis{C}
) where {C <: RingElem}
T = get_attribute(base_lie_algebra(sp), :type, nothing)
@req T in [:special_orthogonal, :general_linear] "Only works for so_n and gl_n."
if T == :special_orthogonal && has_attribute(base_lie_algebra(sp), :form)
@req isone(get_attribute(base_lie_algebra(sp), :form)) "Only works for so_n represented as skew-symmetric matrices."
end
return ArcDiagDeformBasis{C}(Val(T), sp, degs; no_normalize)
end

Expand Down
3 changes: 3 additions & 0 deletions src/DeformationBases/PseudographDeformBasis.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ struct PseudographDeformBasis{C <: RingElem} <: DeformBasis{C}
) where {C <: RingElem}
T = get_attribute(base_lie_algebra(sp), :type, nothing)
@req T == :special_orthogonal "Only works for so_n."
if T == :special_orthogonal && has_attribute(base_lie_algebra(sp), :form)
@req isone(get_attribute(base_lie_algebra(sp), :form)) "Only works for so_n represented as skew-symmetric matrices."
end
return PseudographDeformBasis{C}(Val(T), sp, degs; no_normalize)
end

Expand Down
38 changes: 19 additions & 19 deletions test/DeformationBases-test.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@testset "DeformationBases/*.jl tests" begin
@testset "ArcDiagDeformBasis.jl" begin
@testset "arcdiag_to_deformationmap(:special_orthogonal, :exterior)" begin
L = special_orthogonal_lie_algebra(QQ, 4)
L = special_orthogonal_lie_algebra(QQ, 4, identity_matrix(QQ, 4))
T = Val(:special_orthogonal)
V = exterior_power_obj(standard_module(L), 2)
sp = smash_product(L, V)
Expand All @@ -23,7 +23,7 @@

@testset "correctness regression" begin
@testset "SO_4, ⋀²V" begin
L = special_orthogonal_lie_algebra(QQ, 4)
L = special_orthogonal_lie_algebra(QQ, 4, identity_matrix(QQ, 4))
V = exterior_power_obj(standard_module(L), 2)
sp = smash_product(L, V)

Expand All @@ -36,10 +36,10 @@
@test length(collect(b)) == 1
if VERSION <= v"1.7-"
@test_broken repr("text/plain", collect(b)) ==
"1-element Vector{MatElem{<:FreeAssAlgElem{QQFieldElem}}}:\n [0 x_2_3 x_2_4 -x_1_3 -x_1_4 0; -x_2_3 0 x_3_4 x_1_2 0 -x_1_4; -x_2_4 -x_3_4 0 0 x_1_2 x_1_3; x_1_3 -x_1_2 0 0 x_3_4 -x_2_4; x_1_4 0 -x_1_2 -x_3_4 0 x_2_3; 0 x_1_4 -x_1_3 x_2_4 -x_2_3 0]"
"1-element Vector{MatElem{<:FreeAssAlgElem{QQFieldElem}}}:\n [0 x_4 x_5 -x_2 -x_3 0; -x_4 0 x_6 x_1 0 -x_3; -x_5 -x_6 0 0 x_1 x_2; x_2 -x_1 0 0 x_6 -x_5; x_3 0 -x_1 -x_6 0 x_4; 0 x_3 -x_2 x_5 -x_4 0]"
else
@test repr("text/plain", collect(b)) ==
"1-element Vector{MatElem{<:FreeAssAlgElem{QQFieldElem}}}:\n [0 x_2_3 x_2_4 -x_1_3 -x_1_4 0; -x_2_3 0 x_3_4 x_1_2 0 -x_1_4; -x_2_4 -x_3_4 0 0 x_1_2 x_1_3; x_1_3 -x_1_2 0 0 x_3_4 -x_2_4; x_1_4 0 -x_1_2 -x_3_4 0 x_2_3; 0 x_1_4 -x_1_3 x_2_4 -x_2_3 0]"
"1-element Vector{MatElem{<:FreeAssAlgElem{QQFieldElem}}}:\n [0 x_4 x_5 -x_2 -x_3 0; -x_4 0 x_6 x_1 0 -x_3; -x_5 -x_6 0 0 x_1 x_2; x_2 -x_1 0 0 x_6 -x_5; x_3 0 -x_1 -x_6 0 x_4; 0 x_3 -x_2 x_5 -x_4 0]"
end
@test all_pbwdeformations(sp, b; special_return=SMat)[1] == matrix(QQ, 1, 1, [1])
@test all_pbwdeformations(sp, b) == collect(b)
Expand All @@ -54,7 +54,7 @@
end

@testset "SO_5, ⋀²V" begin
L = special_orthogonal_lie_algebra(QQ, 5)
L = special_orthogonal_lie_algebra(QQ, 5, identity_matrix(QQ, 5))
V = exterior_power_obj(standard_module(L), 2)
sp = smash_product(L, V)

Expand All @@ -67,17 +67,17 @@
@test length(collect(b)) == 1
if VERSION <= v"1.7-"
@test_broken repr("text/plain", collect(b)) ==
"1-element Vector{MatElem{<:FreeAssAlgElem{QQFieldElem}}}:\n [0 x_2_3 x_2_4 x_2_5 -x_1_3 -x_1_4 -x_1_5 0 0 0; -x_2_3 0 x_3_4 x_3_5 x_1_2 0 0 -x_1_4 -x_1_5 0; -x_2_4 -x_3_4 0 x_4_5 0 x_1_2 0 x_1_3 0 -x_1_5; -x_2_5 -x_3_5 -x_4_5 0 0 0 x_1_2 0 x_1_3 x_1_4; x_1_3 -x_1_2 0 0 0 x_3_4 x_3_5 -x_2_4 -x_2_5 0; x_1_4 0 -x_1_2 0 -x_3_4 0 x_4_5 x_2_3 0 -x_2_5; x_1_5 0 0 -x_1_2 -x_3_5 -x_4_5 0 0 x_2_3 x_2_4; 0 x_1_4 -x_1_3 0 x_2_4 -x_2_3 0 0 x_4_5 -x_3_5; 0 x_1_5 0 -x_1_3 x_2_5 0 -x_2_3 -x_4_5 0 x_3_4; 0 0 x_1_5 -x_1_4 0 x_2_5 -x_2_4 x_3_5 -x_3_4 0]"
"1-element Vector{MatElem{<:FreeAssAlgElem{QQFieldElem}}}:\n [0 x_5 x_6 x_7 -x_2 -x_3 -x_4 0 0 0; -x_5 0 x_8 x_9 x_1 0 0 -x_3 -x_4 0; -x_6 -x_8 0 x_10 0 x_1 0 x_2 0 -x_4; -x_7 -x_9 -x_10 0 0 0 x_1 0 x_2 x_3; x_2 -x_1 0 0 0 x_8 x_9 -x_6 -x_7 0; x_3 0 -x_1 0 -x_8 0 x_10 x_5 0 -x_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-x_5 -x_10 0 x_8; 0 0 x_4 -x_3 0 x_7 -x_6 x_9 -x_8 0]"
end
@test all_pbwdeformations(sp, b; special_return=SMat)[1] == matrix(QQ, 1, 1, [1])
@test all_pbwdeformations(sp, b) == collect(b)
end

@testset "SO_4, S²V" begin
L = special_orthogonal_lie_algebra(QQ, 4)
L = special_orthogonal_lie_algebra(QQ, 4, identity_matrix(QQ, 4))
V = symmetric_power_obj(standard_module(L), 2)
sp = smash_product(L, V)

Expand All @@ -93,7 +93,7 @@
end

@testset "SO_5, S²V" begin
L = special_orthogonal_lie_algebra(QQ, 5)
L = special_orthogonal_lie_algebra(QQ, 5, identity_matrix(QQ, 5))
V = symmetric_power_obj(standard_module(L), 2)
sp = smash_product(L, V)

Expand All @@ -109,7 +109,7 @@
end

@testset "SO_2, T²V" begin
L = special_orthogonal_lie_algebra(QQ, 2)
L = special_orthogonal_lie_algebra(QQ, 2, identity_matrix(QQ, 2))
V = tensor_power_obj(standard_module(L), 2)
sp = smash_product(L, V)

Expand All @@ -120,7 +120,7 @@
end

@testset "SO_3, T²V" begin
L = special_orthogonal_lie_algebra(QQ, 3)
L = special_orthogonal_lie_algebra(QQ, 3, identity_matrix(QQ, 3))
V = tensor_power_obj(standard_module(L), 2)
sp = smash_product(L, V)

Expand All @@ -135,7 +135,7 @@
PBWDeformations.arcdiag_to_deformationmap(PBWDeformations.SO(), arc_diagram(Undirected, diag), sp),
)

L = special_orthogonal_lie_algebra(QQ, 2)
L = special_orthogonal_lie_algebra(QQ, 2, identity_matrix(QQ, 2))
V = tensor_power_obj(standard_module(L), 3)
sp = smash_product(L, V)

Expand All @@ -156,7 +156,7 @@
PBWDeformations.arcdiag_to_deformationmap(PBWDeformations.SO(), arc_diagram(Undirected, diag), sp),
)

L = special_orthogonal_lie_algebra(QQ, 3)
L = special_orthogonal_lie_algebra(QQ, 3, identity_matrix(QQ, 3))
V = tensor_power_obj(standard_module(L), 3)
sp = smash_product(L, V)

Expand All @@ -181,7 +181,7 @@
@testset "PseudographDeformBasis.jl" begin
@testset "correctness regression" begin
@testset "SO_4, ⋀²V" begin
L = special_orthogonal_lie_algebra(QQ, 4)
L = special_orthogonal_lie_algebra(QQ, 4, identity_matrix(QQ, 4))
V = exterior_power_obj(standard_module(L), 2)
sp = smash_product(L, V)

Expand All @@ -194,10 +194,10 @@
@test length(collect(b)) == 1
if VERSION <= v"1.7-"
@test_broken repr("text/plain", collect(b)) ==
"1-element Vector{MatElem{<:FreeAssAlgElem{QQFieldElem}}}:\n [0 x_2_3 x_2_4 -x_1_3 -x_1_4 0; -x_2_3 0 x_3_4 x_1_2 0 -x_1_4; -x_2_4 -x_3_4 0 0 x_1_2 x_1_3; x_1_3 -x_1_2 0 0 x_3_4 -x_2_4; x_1_4 0 -x_1_2 -x_3_4 0 x_2_3; 0 x_1_4 -x_1_3 x_2_4 -x_2_3 0]"
"1-element Vector{MatElem{<:FreeAssAlgElem{QQFieldElem}}}:\n [0 x_4 x_5 -x_2 -x_3 0; -x_4 0 x_6 x_1 0 -x_3; -x_5 -x_6 0 0 x_1 x_2; x_2 -x_1 0 0 x_6 -x_5; x_3 0 -x_1 -x_6 0 x_4; 0 x_3 -x_2 x_5 -x_4 0]"
else
@test repr("text/plain", collect(b)) ==
"1-element Vector{MatElem{<:FreeAssAlgElem{QQFieldElem}}}:\n [0 x_2_3 x_2_4 -x_1_3 -x_1_4 0; -x_2_3 0 x_3_4 x_1_2 0 -x_1_4; -x_2_4 -x_3_4 0 0 x_1_2 x_1_3; x_1_3 -x_1_2 0 0 x_3_4 -x_2_4; x_1_4 0 -x_1_2 -x_3_4 0 x_2_3; 0 x_1_4 -x_1_3 x_2_4 -x_2_3 0]"
"1-element Vector{MatElem{<:FreeAssAlgElem{QQFieldElem}}}:\n [0 x_4 x_5 -x_2 -x_3 0; -x_4 0 x_6 x_1 0 -x_3; -x_5 -x_6 0 0 x_1 x_2; x_2 -x_1 0 0 x_6 -x_5; x_3 0 -x_1 -x_6 0 x_4; 0 x_3 -x_2 x_5 -x_4 0]"
end
@test all_pbwdeformations(sp, b; special_return=SMat)[1] == matrix(QQ, 1, 1, [1])
@test all_pbwdeformations(sp, b) == collect(b)
Expand All @@ -212,7 +212,7 @@
end

@testset "SO_5, ⋀²V" begin
L = special_orthogonal_lie_algebra(QQ, 5)
L = special_orthogonal_lie_algebra(QQ, 5, identity_matrix(QQ, 5))
V = exterior_power_obj(standard_module(L), 2)
sp = smash_product(L, V)

Expand All @@ -225,10 +225,10 @@
@test length(collect(b)) == 1
if VERSION <= v"1.7-"
@test_broken repr("text/plain", collect(b)) ==
"1-element Vector{MatElem{<:FreeAssAlgElem{QQFieldElem}}}:\n [0 x_2_3 x_2_4 x_2_5 -x_1_3 -x_1_4 -x_1_5 0 0 0; -x_2_3 0 x_3_4 x_3_5 x_1_2 0 0 -x_1_4 -x_1_5 0; -x_2_4 -x_3_4 0 x_4_5 0 x_1_2 0 x_1_3 0 -x_1_5; -x_2_5 -x_3_5 -x_4_5 0 0 0 x_1_2 0 x_1_3 x_1_4; x_1_3 -x_1_2 0 0 0 x_3_4 x_3_5 -x_2_4 -x_2_5 0; x_1_4 0 -x_1_2 0 -x_3_4 0 x_4_5 x_2_3 0 -x_2_5; x_1_5 0 0 -x_1_2 -x_3_5 -x_4_5 0 0 x_2_3 x_2_4; 0 x_1_4 -x_1_3 0 x_2_4 -x_2_3 0 0 x_4_5 -x_3_5; 0 x_1_5 0 -x_1_3 x_2_5 0 -x_2_3 -x_4_5 0 x_3_4; 0 0 x_1_5 -x_1_4 0 x_2_5 -x_2_4 x_3_5 -x_3_4 0]"
"1-element Vector{MatElem{<:FreeAssAlgElem{QQFieldElem}}}:\n [0 x_5 x_6 x_7 -x_2 -x_3 -x_4 0 0 0; -x_5 0 x_8 x_9 x_1 0 0 -x_3 -x_4 0; -x_6 -x_8 0 x_10 0 x_1 0 x_2 0 -x_4; -x_7 -x_9 -x_10 0 0 0 x_1 0 x_2 x_3; x_2 -x_1 0 0 0 x_8 x_9 -x_6 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6 -x_5 0 0 x_10 -x_9; 0 x_4 0 -x_2 x_7 0 -x_5 -x_10 0 x_8; 0 0 x_4 -x_3 0 x_7 -x_6 x_9 -x_8 0]"
end
@test all_pbwdeformations(sp, b; special_return=SMat)[1] == matrix(QQ, 1, 1, [1])
@test all_pbwdeformations(sp, b) == collect(b)
Expand Down
2 changes: 1 addition & 1 deletion test/ModuleSimpleStructure-test.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@testset "ModuleSimpleStructure.jl tests" begin
@testset for L in [general_linear_lie_algebra(QQ, 3), special_orthogonal_lie_algebra(QQ, 3)]
@testset for L in [general_linear_lie_algebra(QQ, 3), special_orthogonal_lie_algebra(QQ, 3, identity_matrix(QQ, 3))]
stdV = standard_module(L)

@testset "Duality, standard" begin
Expand Down
2 changes: 1 addition & 1 deletion test/SmashProductLie-test.jl
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
end

@testset "so_4(QQ) ⋉ ⋀^2 V" begin
L = special_orthogonal_lie_algebra(QQ, 4)
L = special_orthogonal_lie_algebra(QQ, 4, identity_matrix(QQ, 4))
V = exterior_power_obj(standard_module(L), 2)

sp = smash_product(R, L, V)
Expand Down
29 changes: 16 additions & 13 deletions test/SmashProductLieDeform-test.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

@testset "SmashProductLieDeform constructor" begin
@testset "R = $R" for R in [QQ, cyclotomic_field(4)[1]]
L = special_orthogonal_lie_algebra(R, 4)
L = special_orthogonal_lie_algebra(R, 4, identity_matrix(R, 4))
V = exterior_power_obj(standard_module(L), 2)
sp = smash_product(L, V)

Expand Down Expand Up @@ -57,17 +57,20 @@
@testset "symmetric_deformation constructor" begin
@testset "R = $R" for R in [QQ, cyclotomic_field(4)[1]]

for (sp, dimL, dimV) in [begin
L = special_orthogonal_lie_algebra(R, 4)
V = exterior_power_obj(standard_module(L), 2)
sp = smash_product(L, V)
return (sp, 6, 6)
end, begin
L = general_linear_lie_algebra(R, 4)
V = symmetric_power_obj(standard_module(L), 2)
sp = smash_product(L, V)
return (sp, 16, 10)
end]
for (sp, dimL, dimV) in [
begin
L = special_orthogonal_lie_algebra(R, 4, identity_matrix(R, 4))
V = exterior_power_obj(standard_module(L), 2)
sp = smash_product(L, V)
return (sp, 6, 6)
end,
begin
L = general_linear_lie_algebra(R, 4)
V = symmetric_power_obj(standard_module(L), 2)
sp = smash_product(L, V)
return (sp, 16, 10)
end,
]

d = symmetric_deformation(sp)

Expand Down Expand Up @@ -100,7 +103,7 @@
@testset "SmashProductLieDeform sanitize checks" begin
@testset "R = $R" for R in [QQ, cyclotomic_field(4)[1]]

L = special_orthogonal_lie_algebra(R, 4)
L = special_orthogonal_lie_algebra(R, 4, identity_matrix(R, 4))
V = exterior_power_obj(standard_module(L), 2)
sp = smash_product(L, V)

Expand Down
4 changes: 2 additions & 2 deletions test/SmashProductPBWDeformLie-test.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@testset "SmashProductPBWDeformLie.jl tests" begin
@testset "is_pbwdeformation" begin
@testset "symmetric deformation of so_4(QQ) ⋉ ⋀^2 V" begin
L = special_orthogonal_lie_algebra(QQ, 4)
L = special_orthogonal_lie_algebra(QQ, 4, identity_matrix(QQ, 4))
V = exterior_power_obj(standard_module(L), 2)
sp = smash_product(L, V)

Expand All @@ -10,7 +10,7 @@
end

@testset "non-PBW deformations" begin
L = special_orthogonal_lie_algebra(QQ, 4)
L = special_orthogonal_lie_algebra(QQ, 4, identity_matrix(QQ, 4))
V = exterior_power_obj(standard_module(L), 2)
sp = smash_product(L, V)

Expand Down

0 comments on commit 84d4095

Please sign in to comment.