From b5e62c27e0145e4db6b64b6f007613090de0567f Mon Sep 17 00:00:00 2001 From: Marek Kaluba Date: Fri, 13 Aug 2021 16:20:31 +0200 Subject: [PATCH] =?UTF-8?q?add=20tests=20for=20AutSigma=E2=82=83.=E2=82=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/AutSigma3.jl | 75 +++++++++++++++++++++++++++++++++++++++++++++ test/AutSigma_41.jl | 52 ++++++++----------------------- test/runtests.jl | 1 + 3 files changed, 88 insertions(+), 40 deletions(-) create mode 100644 test/AutSigma3.jl diff --git a/test/AutSigma3.jl b/test/AutSigma3.jl new file mode 100644 index 0000000..475fb57 --- /dev/null +++ b/test/AutSigma3.jl @@ -0,0 +1,75 @@ +@testset "Aut(Σ₃.₀)" begin + genus = 3 + + π₁Σ = Groups.SurfaceGroup(genus, 0) + + Groups.PermRightAut(p::Perm) = Groups.PermRightAut(p.d) + # Groups.PermLeftAut(p::Perm) = Groups.PermLeftAut(p.d) + autπ₁Σ = let autπ₁Σ = AutomorphismGroup(π₁Σ) + pauts = let p = perm"(1,3,5)(2,4,6)" + [Groups.PermRightAut(p^i) for i in 0:2] + end + T = eltype(KnuthBendix.letters(alphabet(autπ₁Σ))) + S = eltype(pauts) + + A = Alphabet(Union{T,S}[KnuthBendix.letters(alphabet(autπ₁Σ)); pauts]) + + autG = AutomorphismGroup( + π₁Σ, + autπ₁Σ.gens, + A, + ntuple(i->inv(gens(π₁Σ, i)), 2Groups.genus(π₁Σ)) + ) + + autG + end + + Al = alphabet(autπ₁Σ) + S = [gens(autπ₁Σ); inv.(gens(autπ₁Σ))] + + sautFn = let ltrs = KnuthBendix.letters(Al) + parent(first(ltrs).autFn_word) + end + + τ = Groups.rotation_element(sautFn) + + @testset "Twists" begin + A = KnuthBendix.alphabet(sautFn) + λ = Groups.ΡΛ(:λ, A, 2genus) + ϱ = Groups.ΡΛ(:ϱ, A, 2genus) + @test sautFn(Groups.Te_diagonal(λ, ϱ, 1)) == + conj(sautFn(Groups.Te_diagonal(λ, ϱ, 2)), τ) + + @test sautFn(Groups.Te_diagonal(λ, ϱ, 3)) == sautFn(Groups.Te(λ, ϱ, 3, 1)) + end + + z = let d = Groups.domain(τ) + Groups.evaluate(τ^genus) + end + + @test π₁Σ.(word.(z)) == Groups.domain(first(S)) + d = Groups.domain(first(S)) + p = perm"(1,3,5)(2,4,6)" + @test Groups.evaluate!(deepcopy(d), τ) == d^inv(p) + @test Groups.evaluate!(deepcopy(d), τ^2) == d^p + + E, sizes = Groups.wlmetric_ball(S, radius=3) + @test sizes == [49, 1813, 62971] + B2 = @view E[1:sizes[2]] + + σ = autπ₁Σ(Word([Al[Groups.PermRightAut(p)]])) + + @test conj(S[7], σ) == S[10] + @test conj(S[7], σ^2) == S[11] + @test conj(S[9], σ) == S[12] + @test conj(S[9], σ^2) == S[8] + + @test conj(S[1], σ) == S[4] + @test conj(S[1], σ^2) == S[5] + @test conj(S[3], σ) == S[6] + @test conj(S[3], σ^2) == S[2] + + B2ᶜ = [conj(b, σ) for b in B2] + @test B2ᶜ != B2 + @test Set(B2ᶜ) == Set(B2) +end diff --git a/test/AutSigma_41.jl b/test/AutSigma_41.jl index 16e3a2f..7a9e0d1 100644 --- a/test/AutSigma_41.jl +++ b/test/AutSigma_41.jl @@ -5,9 +5,10 @@ using Groups.KnuthBendix genus = 4 - G = SpecialAutomorphismGroup(FreeGroup(2genus)) + Fn = FreeGroup(2genus) + G = SpecialAutomorphismGroup(Fn) - T = Groups.mcg_twists(autF) + T = Groups.mcg_twists(G) # symplectic pairing in the free Group goes like this: # f1 ↔ f5 @@ -41,7 +42,6 @@ using Groups.KnuthBendix As = T[[1, 5, 9, 6, 12, 7, 14, 8]] # the inverses of the elements a - @testset "preserving relator" begin F = Groups.object(G) @@ -123,7 +123,12 @@ using Groups.KnuthBendix # x = (a4^-1*a3^-1*a2^-1*a1^-1*u*a2*a3*a4*a5*a6) @time evaluate(x) b3 = x * a0 * x^-1 - @time evaluate(b3) + b3im = @time evaluate(b3) + b3cim = @time let g = b3 + f = Groups.compiled(g) + f(Groups.domain(g)) + end + @test b3im == b3cim @test a0 * b2 * b1 == a1 * a3 * a5 * b3 end end @@ -170,46 +175,13 @@ using Groups.KnuthBendix @testset "hyperelliptic τ is central" begin - A = alphabet(G) - λ = Groups.ΡΛ(:λ, A, 2genus) - ϱ = Groups.ΡΛ(:ϱ, A, 2genus) - - import Groups: Ta, Tα, Te - - halftwists = map(1:genus-1) do i - j = i + 1 - x = Ta(λ, j) * inv(A, Ta(λ, i)) * Tα(λ, j) * Te(λ, ϱ, i, j) - δ = x * Tα(λ, i) * inv(A, x) - c = - inv(A, Ta(λ, j)) * - Te(λ, ϱ, i, j) * - Tα(λ, i)^2 * - inv(A, δ) * - inv(A, Ta(λ, j)) * - Ta(λ, i) * - δ - z = - Te(λ, ϱ, j, i) * - inv(A, Ta(λ, i)) * - Tα(λ, i) * - Ta(λ, i) * - inv(A, Te(λ, ϱ, j, i)) - - G(Ta(λ, i) * inv(A, Ta(λ, j) * Tα(λ, j))^6 * (Ta(λ, j) * Tα(λ, j) * z)^4 * c) - end - - τ = (G(Ta(λ, 1) * Tα(λ, 1))^6) * prod(halftwists) - - # τ^genus is trivial but only in autπ₁Σ₄ - # here we check its centrality - + τ = Groups.rotation_element(G) τᵍ = τ^genus symplectic_gens = let genus = genus, G = G π₁Σ = Groups.SurfaceGroup(genus, 0) - autπ₁Σ = AutomorphismGroup(π₁Σ) - letters = alphabet(autπ₁Σ).letters - G.(word(l.autFn_word) for l in letters) + s_twists = Groups.symplectic_twists(π₁Σ) + G.(word(t.autFn_word) for t in s_twists) end @test all(sg * τᵍ == τᵍ * sg for sg in symplectic_gens) diff --git a/test/runtests.jl b/test/runtests.jl index 2e41ab8..c0334c4 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -27,6 +27,7 @@ include(joinpath(pathof(GroupsCore), "..", "..", "test", "conformance_test.jl")) include("AutFn.jl") include("AutSigma_41.jl") + include("AutSigma3.jl") # if !haskey(ENV, "CI") # include("benchmarks.jl")