2017-05-15 10:12:46 +02:00
|
|
|
|
@testset "Automorphisms" begin
|
2018-09-21 18:08:44 +02:00
|
|
|
|
|
2020-03-25 13:48:44 +01:00
|
|
|
|
G = SymmetricGroup(Int8(4))
|
2017-05-15 10:12:46 +02:00
|
|
|
|
|
|
|
|
|
@testset "AutSymbol" begin
|
2019-01-03 03:37:37 +01:00
|
|
|
|
@test_throws MethodError Groups.AutSymbol(:a)
|
|
|
|
|
@test_throws MethodError Groups.AutSymbol(:a, 1)
|
|
|
|
|
f = Groups.AutSymbol(:a, 1, Groups.FlipAut(2))
|
2020-04-20 02:41:24 +02:00
|
|
|
|
@test f isa Groups.GSymbol
|
|
|
|
|
@test f isa Groups.AutSymbol
|
|
|
|
|
@test Groups.AutSymbol(perm"(4)") isa Groups.AutSymbol
|
|
|
|
|
@test Groups.AutSymbol(perm"(1,2,3,4)") isa Groups.AutSymbol
|
|
|
|
|
@test Groups.transvection_R(1,2) isa Groups.AutSymbol
|
|
|
|
|
@test Groups.transvection_R(3,4) isa Groups.AutSymbol
|
|
|
|
|
@test Groups.flip(3) isa Groups.AutSymbol
|
|
|
|
|
|
|
|
|
|
@test Groups.id_autsymbol() isa Groups.AutSymbol
|
|
|
|
|
@test inv(Groups.id_autsymbol()) isa Groups.AutSymbol
|
2020-04-20 03:25:25 +02:00
|
|
|
|
x = Groups.id_autsymbol()
|
|
|
|
|
@test inv(x) == Groups.id_autsymbol()
|
2017-05-15 10:12:46 +02:00
|
|
|
|
end
|
|
|
|
|
|
2018-07-30 08:30:27 +02:00
|
|
|
|
a,b,c,d = gens(FreeGroup(4))
|
2018-03-22 17:27:31 +01:00
|
|
|
|
D = NTuple{4,FreeGroupElem}([a,b,c,d])
|
2017-05-15 10:12:46 +02:00
|
|
|
|
|
2020-03-25 05:25:02 +01:00
|
|
|
|
@testset "flip correctness" begin
|
|
|
|
|
@test Groups.flip(1)(deepcopy(D)) == (a^-1, b,c,d)
|
|
|
|
|
@test Groups.flip(2)(deepcopy(D)) == (a, b^-1,c,d)
|
|
|
|
|
@test Groups.flip(3)(deepcopy(D)) == (a, b,c^-1,d)
|
|
|
|
|
@test Groups.flip(4)(deepcopy(D)) == (a, b,c,d^-1)
|
|
|
|
|
@test inv(Groups.flip(1))(deepcopy(D)) == (a^-1, b,c,d)
|
|
|
|
|
@test inv(Groups.flip(2))(deepcopy(D)) == (a, b^-1,c,d)
|
|
|
|
|
@test inv(Groups.flip(3))(deepcopy(D)) == (a, b,c^-1,d)
|
|
|
|
|
@test inv(Groups.flip(4))(deepcopy(D)) == (a, b,c,d^-1)
|
2017-05-15 10:12:46 +02:00
|
|
|
|
end
|
|
|
|
|
|
2020-03-25 05:25:02 +01:00
|
|
|
|
@testset "perm correctness" begin
|
|
|
|
|
σ = Groups.AutSymbol(perm"(4)")
|
2018-03-22 17:27:31 +01:00
|
|
|
|
@test σ(deepcopy(D)) == deepcopy(D)
|
|
|
|
|
@test inv(σ)(deepcopy(D)) == deepcopy(D)
|
2017-05-15 10:12:46 +02:00
|
|
|
|
|
2020-03-25 05:25:02 +01:00
|
|
|
|
σ = Groups.AutSymbol(perm"(1,2,3,4)")
|
2018-03-22 17:27:31 +01:00
|
|
|
|
@test σ(deepcopy(D)) == (b, c, d, a)
|
|
|
|
|
@test inv(σ)(deepcopy(D)) == (d, a, b, c)
|
2017-05-15 10:12:46 +02:00
|
|
|
|
|
2020-03-25 05:25:02 +01:00
|
|
|
|
σ = Groups.AutSymbol(perm"(1,2)(4,3)")
|
2018-03-22 17:27:31 +01:00
|
|
|
|
@test σ(deepcopy(D)) == (b, a, d, c)
|
|
|
|
|
@test inv(σ)(deepcopy(D)) == (b, a, d, c)
|
2017-05-15 10:12:46 +02:00
|
|
|
|
|
2020-03-25 05:25:02 +01:00
|
|
|
|
σ = Groups.AutSymbol(perm"(1,2,3)(4)")
|
2018-03-22 17:27:31 +01:00
|
|
|
|
@test σ(deepcopy(D)) == (b, c, a, d)
|
|
|
|
|
@test inv(σ)(deepcopy(D)) == (c, a, b, d)
|
2017-05-15 10:12:46 +02:00
|
|
|
|
end
|
|
|
|
|
|
2020-03-25 05:25:02 +01:00
|
|
|
|
@testset "rmul/transvection_R correctness" begin
|
2017-05-15 10:12:46 +02:00
|
|
|
|
i,j = 1,2
|
2020-03-25 05:25:02 +01:00
|
|
|
|
r = Groups.transvection_R(i,j)
|
|
|
|
|
l = Groups.transvection_L(i,j)
|
2018-03-22 17:27:31 +01:00
|
|
|
|
@test r(deepcopy(D)) == (a*b, b, c, d)
|
|
|
|
|
@test inv(r)(deepcopy(D)) == (a*b^-1,b, c, d)
|
|
|
|
|
@test l(deepcopy(D)) == (b*a, b, c, d)
|
|
|
|
|
@test inv(l)(deepcopy(D)) == (b^-1*a,b, c, d)
|
2017-05-15 10:12:46 +02:00
|
|
|
|
|
|
|
|
|
i,j = 3,1
|
2020-03-25 05:25:02 +01:00
|
|
|
|
r = Groups.transvection_R(i,j)
|
|
|
|
|
l = Groups.transvection_L(i,j)
|
2018-03-22 17:27:31 +01:00
|
|
|
|
@test r(deepcopy(D)) == (a, b, c*a, d)
|
|
|
|
|
@test inv(r)(deepcopy(D)) == (a, b, c*a^-1,d)
|
|
|
|
|
@test l(deepcopy(D)) == (a, b, a*c, d)
|
|
|
|
|
@test inv(l)(deepcopy(D)) == (a, b, a^-1*c,d)
|
2017-05-15 10:12:46 +02:00
|
|
|
|
|
|
|
|
|
i,j = 4,3
|
2020-03-25 05:25:02 +01:00
|
|
|
|
r = Groups.transvection_R(i,j)
|
|
|
|
|
l = Groups.transvection_L(i,j)
|
2018-03-22 17:27:31 +01:00
|
|
|
|
@test r(deepcopy(D)) == (a, b, c, d*c)
|
|
|
|
|
@test inv(r)(deepcopy(D)) == (a, b, c, d*c^-1)
|
|
|
|
|
@test l(deepcopy(D)) == (a, b, c, c*d)
|
|
|
|
|
@test inv(l)(deepcopy(D)) == (a, b, c, c^-1*d)
|
2017-05-15 10:12:46 +02:00
|
|
|
|
|
|
|
|
|
i,j = 2,4
|
2020-03-25 05:25:02 +01:00
|
|
|
|
r = Groups.transvection_R(i,j)
|
|
|
|
|
l = Groups.transvection_L(i,j)
|
2018-03-22 17:27:31 +01:00
|
|
|
|
@test r(deepcopy(D)) == (a, b*d, c, d)
|
|
|
|
|
@test inv(r)(deepcopy(D)) == (a, b*d^-1,c, d)
|
|
|
|
|
@test l(deepcopy(D)) == (a, d*b, c, d)
|
|
|
|
|
@test inv(l)(deepcopy(D)) == (a, d^-1*b,c, d)
|
2017-05-15 10:12:46 +02:00
|
|
|
|
end
|
|
|
|
|
|
2018-03-27 21:49:22 +02:00
|
|
|
|
@testset "AutGroup/Automorphism constructors" begin
|
2018-07-30 15:20:37 +02:00
|
|
|
|
|
2019-01-03 03:37:37 +01:00
|
|
|
|
f = Groups.AutSymbol(:a, 1, Groups.FlipAut(1))
|
2018-03-27 21:49:22 +02:00
|
|
|
|
@test isa(Automorphism{3}(f), Groups.GWord)
|
|
|
|
|
@test isa(Automorphism{3}(f), Automorphism)
|
2018-07-30 15:20:37 +02:00
|
|
|
|
@test isa(AutGroup(FreeGroup(3)), AbstractAlgebra.Group)
|
2017-07-06 09:13:36 +02:00
|
|
|
|
@test isa(AutGroup(FreeGroup(1)), Groups.AbstractFPGroup)
|
2020-04-20 02:41:24 +02:00
|
|
|
|
|
2017-05-15 10:12:46 +02:00
|
|
|
|
A = AutGroup(FreeGroup(1))
|
2020-04-20 02:41:24 +02:00
|
|
|
|
@test Groups.gens(A) isa Vector{Automorphism{1}}
|
2018-07-30 15:20:37 +02:00
|
|
|
|
@test length(Groups.gens(A)) == 1
|
2020-04-20 02:41:24 +02:00
|
|
|
|
@test length(Groups.gens(Aut(FreeGroup(1)))) == 1
|
|
|
|
|
@test Groups.gens(A) == [A(Groups.flip(1))]
|
|
|
|
|
|
2017-05-15 17:30:18 +02:00
|
|
|
|
A = AutGroup(FreeGroup(1), special=true)
|
2020-04-20 02:41:24 +02:00
|
|
|
|
@test isempty(Groups.gens(A))
|
|
|
|
|
@test Groups.gens(SAut(FreeGroup(1))) == Automorphism{1}[]
|
|
|
|
|
|
2017-05-15 17:30:18 +02:00
|
|
|
|
A = AutGroup(FreeGroup(2))
|
2018-07-30 15:20:37 +02:00
|
|
|
|
@test length(Groups.gens(A)) == 7
|
2020-03-25 05:25:02 +01:00
|
|
|
|
Agens = Groups.gens(A)
|
2020-04-20 02:41:24 +02:00
|
|
|
|
@test A(first(Agens)) isa Automorphism
|
2017-05-15 17:30:18 +02:00
|
|
|
|
|
2020-04-20 02:41:24 +02:00
|
|
|
|
@test A(Groups.transvection_R(1,2)) isa Automorphism
|
2020-03-25 05:25:02 +01:00
|
|
|
|
@test A(Groups.transvection_R(1,2)) in Agens
|
2017-05-15 17:30:18 +02:00
|
|
|
|
|
2020-04-20 02:41:24 +02:00
|
|
|
|
@test A(Groups.transvection_R(2,1)) isa Automorphism
|
2020-03-25 05:25:02 +01:00
|
|
|
|
@test A(Groups.transvection_R(2,1)) in Agens
|
2017-05-15 17:30:18 +02:00
|
|
|
|
|
2020-04-20 02:41:24 +02:00
|
|
|
|
@test A(Groups.transvection_R(1,2)) isa Automorphism
|
2020-03-25 05:25:02 +01:00
|
|
|
|
@test A(Groups.transvection_R(1,2)) in Agens
|
2017-05-15 17:30:18 +02:00
|
|
|
|
|
2020-04-20 02:41:24 +02:00
|
|
|
|
@test A(Groups.transvection_R(2,1)) isa Automorphism
|
2020-03-25 05:25:02 +01:00
|
|
|
|
@test A(Groups.transvection_R(2,1)) in Agens
|
2017-05-15 17:30:18 +02:00
|
|
|
|
|
2020-04-20 02:41:24 +02:00
|
|
|
|
@test A(Groups.flip(1)) isa Automorphism
|
2020-03-25 05:25:02 +01:00
|
|
|
|
@test A(Groups.flip(1)) in Agens
|
2017-05-15 17:30:18 +02:00
|
|
|
|
|
2020-04-20 02:41:24 +02:00
|
|
|
|
@test A(Groups.flip(2)) isa Automorphism
|
2020-03-25 05:25:02 +01:00
|
|
|
|
@test A(Groups.flip(2)) in Agens
|
2017-05-15 17:30:18 +02:00
|
|
|
|
|
2020-04-20 02:41:24 +02:00
|
|
|
|
@test A(Groups.AutSymbol(perm"(1,2)")) isa Automorphism
|
2020-03-25 05:25:02 +01:00
|
|
|
|
@test A(Groups.AutSymbol(perm"(1,2)")) in Agens
|
2020-04-20 02:41:24 +02:00
|
|
|
|
|
|
|
|
|
@test A(Groups.id_autsymbol()) isa Automorphism
|
2017-05-15 17:30:18 +02:00
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
A = AutGroup(FreeGroup(4))
|
|
|
|
|
|
|
|
|
|
@testset "eltary functions" begin
|
|
|
|
|
|
2020-03-25 05:25:02 +01:00
|
|
|
|
f = Groups.AutSymbol(perm"(1,2,3,4)")
|
2017-05-15 17:30:18 +02:00
|
|
|
|
@test (Groups.change_pow(f, 2)).pow == 1
|
|
|
|
|
@test (Groups.change_pow(f, -2)).pow == 1
|
|
|
|
|
@test (inv(f)).pow == 1
|
|
|
|
|
|
2020-11-10 17:03:10 +01:00
|
|
|
|
g = Groups.AutSymbol(perm"(1,2)(3,4)")
|
|
|
|
|
@test isa(inv(g), Groups.AutSymbol)
|
2017-05-15 17:30:18 +02:00
|
|
|
|
|
2020-11-10 17:03:10 +01:00
|
|
|
|
@test_throws MethodError g*f
|
2017-05-15 17:30:18 +02:00
|
|
|
|
|
2020-11-10 17:03:10 +01:00
|
|
|
|
@test A(g)^-1 == A(inv(g))
|
|
|
|
|
|
|
|
|
|
h = Groups.transvection_R(1,2)
|
|
|
|
|
|
|
|
|
|
@test collect(A(g)*A(h)) == [g, h]
|
|
|
|
|
@test collect(A(h)^2) == [h, h]
|
2017-05-15 17:30:18 +02:00
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
@testset "reductions/arithmetic" begin
|
2020-03-25 05:25:02 +01:00
|
|
|
|
f = Groups.AutSymbol(perm"(1,2,3,4)")
|
2017-05-15 17:30:18 +02:00
|
|
|
|
|
2020-04-19 23:50:13 +02:00
|
|
|
|
f² = push!(A(f), f)
|
2020-03-25 05:25:02 +01:00
|
|
|
|
@test Groups.simplifyperms!(Bool, f²) == false
|
2019-11-14 09:21:11 +01:00
|
|
|
|
@test f²^2 == one(A)
|
2020-03-25 05:25:02 +01:00
|
|
|
|
@test !isone(f²)
|
2017-05-15 17:30:18 +02:00
|
|
|
|
|
2020-04-20 02:41:24 +02:00
|
|
|
|
a = A(Groups.λ(1,2))*Groups.ε(2)
|
|
|
|
|
b = Groups.ε(2)*A(inv(Groups.λ(1,2)))
|
2017-05-15 17:30:18 +02:00
|
|
|
|
@test a*b == b*a
|
2019-11-14 09:21:11 +01:00
|
|
|
|
@test a^3 * b^3 == one(A)
|
2018-07-30 15:20:37 +02:00
|
|
|
|
g,h = Groups.gens(A)[[1,8]] # (g, h) = (ϱ₁₂, ϱ₃₂)
|
2018-03-22 17:27:31 +01:00
|
|
|
|
|
|
|
|
|
@test Groups.domain(A) == NTuple{4, FreeGroupElem}(gens(A.objectGroup))
|
|
|
|
|
|
|
|
|
|
@test (g*h)(Groups.domain(A)) == (h*g)(Groups.domain(A))
|
2018-07-30 15:20:37 +02:00
|
|
|
|
@test (g*h).savedhash == zero(UInt)
|
|
|
|
|
@test (h*g).savedhash == zero(UInt)
|
2017-10-27 16:16:43 +02:00
|
|
|
|
a = g*h
|
|
|
|
|
b = h*g
|
2018-07-30 15:20:37 +02:00
|
|
|
|
@test hash(a) != zero(UInt)
|
|
|
|
|
@test hash(b) == hash(a)
|
2017-10-27 16:16:43 +02:00
|
|
|
|
@test a.savedhash == b.savedhash
|
|
|
|
|
@test length(unique([a,b])) == 1
|
|
|
|
|
@test length(unique([g*h, h*g])) == 1
|
2018-03-22 17:28:07 +01:00
|
|
|
|
|
|
|
|
|
# Not so simple arithmetic: applying starting on the left:
|
|
|
|
|
# ϱ₁₂*ϱ₂₁⁻¹*λ₁₂*ε₂ == σ₂₁₃₄
|
|
|
|
|
|
2020-03-25 05:25:02 +01:00
|
|
|
|
g = A(Groups.transvection_R(1,2))
|
2018-03-22 17:28:07 +01:00
|
|
|
|
x1, x2, x3, x4 = Groups.domain(A)
|
|
|
|
|
@test g(Groups.domain(A)) == (x1*x2, x2, x3, x4)
|
2020-03-25 05:25:02 +01:00
|
|
|
|
g = g*inv(A(Groups.transvection_R(2,1)))
|
2018-03-22 17:28:07 +01:00
|
|
|
|
@test g(Groups.domain(A)) == (x1*x2, x1^-1, x3, x4)
|
2020-03-25 05:25:02 +01:00
|
|
|
|
g = g*A(Groups.transvection_L(1,2))
|
2018-03-22 17:28:07 +01:00
|
|
|
|
@test g(Groups.domain(A)) == (x2, x1^-1, x3, x4)
|
2020-03-25 05:25:02 +01:00
|
|
|
|
g = g*A(Groups.flip(2))
|
2018-03-22 17:28:07 +01:00
|
|
|
|
@test g(Groups.domain(A)) == (x2, x1, x3, x4)
|
|
|
|
|
|
2020-03-25 05:25:02 +01:00
|
|
|
|
@test g(Groups.domain(A)) == A(Groups.AutSymbol(perm"(1,2)(4)"))(Groups.domain(A))
|
2018-03-22 17:28:07 +01:00
|
|
|
|
|
2020-03-25 05:25:02 +01:00
|
|
|
|
@test g == A(Groups.AutSymbol(perm"(1,2)(4)"))
|
2018-03-22 17:28:07 +01:00
|
|
|
|
|
2018-03-27 20:15:28 +02:00
|
|
|
|
g_im = g(Groups.domain(A))
|
2020-03-25 05:25:02 +01:00
|
|
|
|
@test length.(g_im) == (1,1,1,1)
|
2020-03-25 16:25:21 +01:00
|
|
|
|
|
|
|
|
|
g = A(Groups.σ(perm"(1,2)(4)"))
|
|
|
|
|
h = A(Groups.σ(perm"(2,3,4)"))
|
|
|
|
|
@test g*h isa Groups.Automorphism{4}
|
|
|
|
|
f = g*h
|
|
|
|
|
Groups
|
|
|
|
|
@test Groups.syllablelength(f) == 2
|
|
|
|
|
@test Groups.reduce!(f) isa Groups.Automorphism{4}
|
|
|
|
|
@test Groups.syllablelength(f) == 1
|
2017-05-15 17:30:18 +02:00
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
@testset "specific Aut(F4) tests" begin
|
|
|
|
|
N = 4
|
|
|
|
|
G = AutGroup(FreeGroup(N))
|
|
|
|
|
S = G.gens
|
|
|
|
|
@test isa(S, Vector{Groups.AutSymbol})
|
|
|
|
|
S = [G(s) for s in unique(S)]
|
2018-03-27 21:49:22 +02:00
|
|
|
|
@test isa(S, Vector{Automorphism{N}})
|
2018-07-30 08:30:27 +02:00
|
|
|
|
@test S == gens(G)
|
2017-05-15 17:30:18 +02:00
|
|
|
|
@test length(S) == 51
|
|
|
|
|
S_inv = [S..., [inv(s) for s in S]...]
|
|
|
|
|
@test length(unique(S_inv)) == 75
|
|
|
|
|
|
2017-10-24 15:28:02 +02:00
|
|
|
|
G = AutGroup(FreeGroup(N), special=true)
|
2018-07-30 08:30:27 +02:00
|
|
|
|
S = gens(G)
|
2019-11-14 09:21:11 +01:00
|
|
|
|
S_inv = [one(G), S..., [inv(s) for s in S]...]
|
2017-05-15 17:30:18 +02:00
|
|
|
|
S_inv = unique(S_inv)
|
|
|
|
|
B_2 = [i*j for (i,j) in Base.product(S_inv, S_inv)]
|
|
|
|
|
@test length(B_2) == 2401
|
|
|
|
|
@test length(unique(B_2)) == 1777
|
2017-05-15 10:12:46 +02:00
|
|
|
|
end
|
|
|
|
|
|
2020-03-25 15:43:38 +01:00
|
|
|
|
@testset "abelianization homomorphism" begin
|
|
|
|
|
N = 4
|
2018-04-10 13:14:45 +02:00
|
|
|
|
G = AutGroup(FreeGroup(N))
|
|
|
|
|
S = unique([gens(G); inv.(gens(G))])
|
|
|
|
|
R = 3
|
|
|
|
|
|
2020-03-25 15:43:38 +01:00
|
|
|
|
@test Groups.abelianize(one(G)) isa Matrix{Int}
|
|
|
|
|
@test Groups.abelianize(one(G)) == Matrix{Int}(I, N, N)
|
2018-04-10 13:14:45 +02:00
|
|
|
|
|
2018-09-21 18:08:44 +02:00
|
|
|
|
M = Matrix{Int}(I, N, N)
|
2018-04-10 13:14:45 +02:00
|
|
|
|
M[1,2] = 1
|
2020-03-25 15:43:38 +01:00
|
|
|
|
ϱ₁₂ = G(Groups.ϱ(1,2))
|
|
|
|
|
λ₁₂ = G(Groups.λ(1,2))
|
2018-04-10 13:14:45 +02:00
|
|
|
|
|
2020-03-25 15:43:38 +01:00
|
|
|
|
@test Groups.abelianize(ϱ₁₂) == M
|
|
|
|
|
@test Groups.abelianize(λ₁₂) == M
|
2018-04-10 13:14:45 +02:00
|
|
|
|
|
|
|
|
|
M[1,2] = -1
|
|
|
|
|
|
2020-03-25 15:43:38 +01:00
|
|
|
|
@test Groups.abelianize(ϱ₁₂^-1) == M
|
|
|
|
|
@test Groups.abelianize(λ₁₂^-1) == M
|
2018-04-10 13:14:45 +02:00
|
|
|
|
|
2020-03-25 15:43:38 +01:00
|
|
|
|
@test Groups.abelianize(ϱ₁₂*λ₁₂^-1) == Matrix{Int}(I, N, N)
|
|
|
|
|
@test Groups.abelianize(λ₁₂^-1*ϱ₁₂) == Matrix{Int}(I, N, N)
|
2018-07-30 15:20:37 +02:00
|
|
|
|
|
2018-09-21 18:08:44 +02:00
|
|
|
|
M = Matrix{Int}(I, N, N)
|
2018-04-10 13:14:45 +02:00
|
|
|
|
M[2,2] = -1
|
2020-03-25 05:25:02 +01:00
|
|
|
|
ε₂ = G(Groups.flip(2))
|
2018-04-10 13:14:45 +02:00
|
|
|
|
|
2020-03-25 15:43:38 +01:00
|
|
|
|
@test Groups.abelianize(ε₂) == M
|
|
|
|
|
@test Groups.abelianize(ε₂^2) == Matrix{Int}(I, N, N)
|
2018-04-10 13:14:45 +02:00
|
|
|
|
|
2020-03-25 15:43:38 +01:00
|
|
|
|
M = [0 1 0 0; 0 0 0 1; 0 0 1 0; 1 0 0 0]
|
2018-07-30 15:20:37 +02:00
|
|
|
|
|
2020-03-25 15:43:38 +01:00
|
|
|
|
σ = G(Groups.AutSymbol(perm"(1,2,4)"))
|
|
|
|
|
@test Groups.abelianize(σ) == M
|
|
|
|
|
@test Groups.abelianize(σ^3) == Matrix{Int}(I, N, N)
|
|
|
|
|
@test Groups.abelianize(σ)^3 == Matrix{Int}(I, N, N)
|
2018-04-10 13:14:45 +02:00
|
|
|
|
|
2020-04-20 03:25:25 +02:00
|
|
|
|
@test Groups.abelianize(G(Groups.id_autsymbol())) == Matrix{Int}(I, N, N)
|
2020-04-20 02:44:28 +02:00
|
|
|
|
|
2018-04-10 13:14:45 +02:00
|
|
|
|
function test_homomorphism(S, r)
|
|
|
|
|
for elts in Iterators.product([[g for g in S] for _ in 1:r]...)
|
2020-03-25 15:43:38 +01:00
|
|
|
|
prod(Groups.abelianize.(elts)) == Groups.abelianize(prod(elts)) || error("linear representaton test failed at $elts")
|
2018-04-10 13:14:45 +02:00
|
|
|
|
end
|
|
|
|
|
return 0
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
@test test_homomorphism(S, R) == 0
|
|
|
|
|
end
|
2017-05-15 10:12:46 +02:00
|
|
|
|
end
|