1
0
mirror of https://github.com/kalmarek/PropertyT.jl.git synced 2024-11-13 14:00:27 +01:00
PropertyT.jl/test/actions.jl

201 lines
5.8 KiB
Julia
Raw Normal View History

2022-11-07 18:45:12 +01:00
function test_action(basis, group, act)
action = SW.action
2022-11-07 18:45:12 +01:00
return @testset "action definition" begin
@test all(basis) do b
e = one(group)
2023-03-19 23:28:36 +01:00
return action(act, e, b) == b
2022-11-07 18:45:12 +01:00
end
a = let a = rand(basis)
while isone(a)
a = rand(basis)
end
@assert !isone(a)
a
end
g, h = let g_h = rand(group, 2)
while any(isone, g_h)
g_h = rand(group, 2)
end
@assert all(!isone, g_h)
g_h
end
action = SW.action
2022-11-07 18:45:12 +01:00
@test action(act, g, a) in basis
@test action(act, h, a) in basis
@test action(act, h, action(act, g, a)) == action(act, g * h, a)
@test all([(g, h) for g in group for h in group]) do (g, h)
x = action(act, h, action(act, g, a))
y = action(act, g * h, a)
2023-03-19 23:28:36 +01:00
return x == y
2022-11-07 18:45:12 +01:00
end
if act isa SW.ByPermutations
2022-11-07 18:45:12 +01:00
@test all(basis) do b
2023-03-19 23:28:36 +01:00
return action(act, g, b) basis && action(act, h, b) basis
2022-11-07 18:45:12 +01:00
end
end
2019-07-05 18:57:39 +02:00
end
2022-11-07 18:45:12 +01:00
end
## Testing
@testset "Actions on SL(3,)" begin
n = 3
SL = MatrixGroups.SpecialLinearGroup{n}(Int8)
2023-03-19 23:28:36 +01:00
RSL, S, sizes = PropertyT.group_algebra(SL; halfradius = 2)
2019-07-05 18:57:39 +02:00
2022-11-07 18:45:12 +01:00
@testset "Permutation action" begin
Γ = PG.PermGroup(PG.perm"(1,2)", PG.Perm(circshift(1:n, -1)))
2022-11-07 18:45:12 +01:00
ΓpA = PropertyT.action_by_conjugation(SL, Γ)
2019-07-05 18:57:39 +02:00
test_action(SA.basis(RSL), Γ, ΓpA)
2019-07-05 18:57:39 +02:00
2022-11-07 18:45:12 +01:00
@testset "mps is successful" begin
charsΓ =
SW.Character{
2022-11-07 18:45:12 +01:00
Rational{Int},
}.(SW.irreducible_characters(Γ))
2019-07-05 18:57:39 +02:00
= SW._group_algebra(Γ)
2019-07-05 18:57:39 +02:00
2023-03-19 23:28:36 +01:00
@time mps, ranks =
SW.minimal_projection_system(charsΓ, )
2023-03-19 23:28:36 +01:00
@test all(isone, ranks)
2022-11-07 18:45:12 +01:00
end
@testset "Wedderburn decomposition" begin
wd = SW.WedderburnDecomposition(
2022-11-07 18:45:12 +01:00
Rational{Int},
Γ,
ΓpA,
SA.basis(RSL),
SA.Basis{UInt16}(@view SA.basis(RSL)[1:sizes[2]]),
2022-11-07 18:45:12 +01:00
)
@test length(SW.invariant_vectors(wd)) == 918
@test size.(SW.direct_summands(wd), 1) == [23, 18, 40]
@test all(SW.issimple, SW.direct_summands(wd))
2019-07-05 18:57:39 +02:00
end
end
2022-11-07 18:45:12 +01:00
@testset "Wreath action" begin
Γ = let P = PG.PermGroup(PG.perm"(1,2)", PG.Perm(circshift(1:n, -1)))
Groups.Constructions.WreathProduct(PG.PermGroup(PG.perm"(1,2)"), P)
2022-11-07 18:45:12 +01:00
end
ΓpA = PropertyT.action_by_conjugation(SL, Γ)
2019-07-05 18:57:39 +02:00
test_action(SA.basis(RSL), Γ, ΓpA)
2019-07-05 18:57:39 +02:00
2022-11-07 18:45:12 +01:00
@testset "mps is successful" begin
charsΓ =
SW.Character{
2022-11-07 18:45:12 +01:00
Rational{Int},
}.(SW.irreducible_characters(Γ))
2022-11-07 18:45:12 +01:00
= SW._group_algebra(Γ)
2022-11-07 18:45:12 +01:00
2023-03-19 23:28:36 +01:00
@time mps, ranks =
SW.minimal_projection_system(charsΓ, )
2023-03-19 23:28:36 +01:00
@test all(isone, ranks)
2022-11-07 18:45:12 +01:00
end
@testset "Wedderburn decomposition" begin
wd = SW.WedderburnDecomposition(
2022-11-07 18:45:12 +01:00
Rational{Int},
Γ,
ΓpA,
SA.basis(RSL),
SA.Basis{UInt16}(@view SA.basis(RSL)[1:sizes[2]]),
2022-11-07 18:45:12 +01:00
)
2024-02-15 22:46:52 +01:00
@test length(SW.invariant_vectors(wd)) == 247
@test size.(SW.direct_summands(wd), 1) == [9, 6, 14, 14, 12]
@test all(SW.issimple, SW.direct_summands(wd))
2019-07-05 18:57:39 +02:00
end
end
end
2022-11-07 18:45:12 +01:00
@testset "Actions on SAut(F4)" begin
n = 4
2019-07-05 18:57:39 +02:00
2022-11-07 18:45:12 +01:00
SAutFn = SpecialAutomorphismGroup(FreeGroup(n))
2023-03-19 23:28:36 +01:00
RSAutFn, S, sizes = PropertyT.group_algebra(SAutFn; halfradius = 1)
2019-07-05 18:57:39 +02:00
2022-11-07 18:45:12 +01:00
@testset "Permutation action" begin
Γ = PG.PermGroup(PG.perm"(1,2)", PG.Perm(circshift(1:n, -1)))
2022-11-07 18:45:12 +01:00
ΓpA = PropertyT.action_by_conjugation(SAutFn, Γ)
2019-07-05 18:57:39 +02:00
test_action(SA.basis(RSAutFn), Γ, ΓpA)
2019-07-05 18:57:39 +02:00
2022-11-07 18:45:12 +01:00
@testset "mps is successful" begin
charsΓ =
SW.Character{
2022-11-07 18:45:12 +01:00
Rational{Int},
}.(SW.irreducible_characters(Γ))
2019-07-05 18:57:39 +02:00
= SW._group_algebra(Γ)
2022-11-07 18:45:12 +01:00
2023-03-19 23:28:36 +01:00
@time mps, ranks =
SW.minimal_projection_system(charsΓ, )
2023-03-19 23:28:36 +01:00
@test all(isone, ranks)
2022-11-07 18:45:12 +01:00
end
@testset "Wedderburn decomposition" begin
wd = SW.WedderburnDecomposition(
2022-11-07 18:45:12 +01:00
Rational{Int},
Γ,
ΓpA,
SA.basis(RSAutFn),
SA.Basis{UInt16}(@view SA.basis(RSAutFn)[1:sizes[1]]),
2022-11-07 18:45:12 +01:00
)
2024-02-15 22:46:52 +01:00
@test length(SW.invariant_vectors(wd)) == 93
@test size.(SW.direct_summands(wd), 1) == [5, 4, 8, 4]
@test all(SW.issimple, SW.direct_summands(wd))
2019-07-05 18:57:39 +02:00
end
end
2022-11-07 18:45:12 +01:00
@testset "Wreath action" begin
Γ = let P = PG.PermGroup(PG.perm"(1,2)", PG.Perm(circshift(1:n, -1)))
Groups.Constructions.WreathProduct(PG.PermGroup(PG.perm"(1,2)"), P)
2022-11-07 18:45:12 +01:00
end
2019-07-05 18:57:39 +02:00
2022-11-07 18:45:12 +01:00
ΓpA = PropertyT.action_by_conjugation(SAutFn, Γ)
test_action(SA.basis(RSAutFn), Γ, ΓpA)
2022-11-07 18:45:12 +01:00
@testset "mps is successful" begin
charsΓ =
SW.Character{
2022-11-07 18:45:12 +01:00
Rational{Int},
}.(SW.irreducible_characters(Γ))
2022-11-07 18:45:12 +01:00
= SW._group_algebra(Γ)
2019-07-05 18:57:39 +02:00
2023-03-19 23:28:36 +01:00
@time mps, ranks =
SW.minimal_projection_system(charsΓ, )
2023-03-19 23:28:36 +01:00
@test all(isone, ranks)
2022-11-07 18:45:12 +01:00
end
@testset "Wedderburn decomposition" begin
wd = SW.WedderburnDecomposition(
2022-11-07 18:45:12 +01:00
Rational{Int},
Γ,
ΓpA,
SA.basis(RSAutFn),
SA.Basis{UInt16}(@view SA.basis(RSAutFn)[1:sizes[1]]),
2022-11-07 18:45:12 +01:00
)
2024-02-15 22:46:52 +01:00
@test length(SW.invariant_vectors(wd)) == 18
@test size.(SW.direct_summands(wd), 1) == [2, 1, 2, 1, 2, 1, 1, 2]
@test all(SW.issimple, SW.direct_summands(wd))
2022-11-07 18:45:12 +01:00
end
end
2019-07-05 18:57:39 +02:00
end