1
0
mirror of https://github.com/kalmarek/Groups.jl.git synced 2024-11-19 06:30:29 +01:00

make smc acting on the right

This commit is contained in:
Marek Kaluba 2021-07-12 11:11:39 +02:00
parent a742bf32ec
commit a258c563d1
No known key found for this signature in database
GPG Key ID: 8BF1A3855328FC15
2 changed files with 20 additions and 45 deletions

View File

@ -97,17 +97,21 @@ function mcg_twists(G::AutomorphismGroup{<:FreeGroup})
return Tas, Tαs, Tes return Tas, Tαs, Tes
end end
struct SymplecticMappingClass{N,T} <: GSymbol struct SymplecticMappingClass{T, F} <: GSymbol
id::Symbol # :A, :B id::Symbol # :A, :B
i::UInt i::UInt
j::UInt j::UInt
minus::Bool minus::Bool
inv::Bool inv::Bool
images::NTuple{N,T} autFn_word::T
invimages::NTuple{N,T} perm::Vector{Int}
gens_idcs::Dict{Int, Int} f::F
end end
Base.:(==)(a::SymplecticMappingClass, b::SymplecticMappingClass) = a.autFn_word == b.autFn_word
Base.hash(a::SymplecticMappingClass, h::UInt) = hash(a.autFn_word, h)
function SymplecticMappingClass( function SymplecticMappingClass(
Σ::SurfaceGroup, Σ::SurfaceGroup,
sautFn, sautFn,
@ -153,23 +157,13 @@ function SymplecticMappingClass(
throw("Type not recognized: $id") throw("Type not recognized: $id")
end end
g = sautFn(w) a = sautFn(w)
g = genus(Σ)
perm = [2g:-2:1; (2g-1):-2:1]
perm = let g = genus(Σ) f(t) = evaluate!(t, a)
[reverse(1+1:2:2g); reverse(1:2:2g)]
end
d = ntuple(i->gens(Σ, i), ngens(Σ))[perm] res = SymplecticMappingClass(id, UInt(i), UInt(j), minus, inverse, a, perm, f)
img = evaluate!(deepcopy(d), g)[invperm(perm)]
invim = evaluate!(d, inv(g))[invperm(perm)]
img, invim = inverse ? (invim, img) : (img, invim)
gens_idcs = Dict(alphabet(Σ)[Σ.gens[i]] => i for i in 1:ngens(Σ))
res = SymplecticMappingClass(id, UInt(i), UInt(j), minus, inverse, img, invim, gens_idcs)
return res return res
end end
@ -185,7 +179,9 @@ function Base.show(io::IO, smc::SymplecticMappingClass)
end end
function Base.inv(m::SymplecticMappingClass) function Base.inv(m::SymplecticMappingClass)
return SymplecticMappingClass(m.id, m.i, m.j, m.minus, !m.inv, m.invimages, m.images, m.gens_idcs) inv_w = inv(m.autFn_word)
f(t) = evaluate!(t, inv_w)
return SymplecticMappingClass(m.id, m.i, m.j, m.minus, !m.inv, inv_w, m.perm, f)
end end
function evaluate!( function evaluate!(
@ -194,27 +190,10 @@ function evaluate!(
A::Alphabet, A::Alphabet,
tmp = one(first(t)), tmp = one(first(t)),
) where {N,T} ) where {N,T}
img = smc.images
for elt in t
copyto!(tmp, elt)
resize!(word(elt), 0)
for idx in word(tmp)
# @show idx
k = if haskey(smc.gens_idcs, idx)
img[smc.gens_idcs[idx]]
else
inv(img[smc.gens_idcs[inv(A, idx)]])
end
append!(word(elt), word(k))
end
_setnormalform!(elt, false)
_setvalidhash!(elt, false)
normalform!(tmp, elt)
copyto!(elt, tmp)
end
t = smc.f(t[smc.perm])[invperm(smc.perm)]
# t = evaluate!(t[smc.perm], smc.autFn_word, tmp)
# t = t[invperm(smc.perm)]
return t return t
end end

View File

@ -7,8 +7,7 @@ using Groups.KnuthBendix
G = SpecialAutomorphismGroup(FreeGroup(2genus)) G = SpecialAutomorphismGroup(FreeGroup(2genus))
# symplectic pairing goes like this: # symplectic pairing in the free Group goes like this:
# in the free Group:
# f1 ↔ f5 # f1 ↔ f5
# f2 ↔ f6 # f2 ↔ f6
# f3 ↔ f7 # f3 ↔ f7
@ -268,9 +267,6 @@ using Groups.KnuthBendix
# τ^genus is trivial but only in autπ₁Σ₄ # τ^genus is trivial but only in autπ₁Σ₄
# here we check its centrality # here we check its centrality
τᵍ = τ^genus τᵍ = τ^genus
@test_broken all(a * τᵍ == τᵍ * a for a in Groups.gens(G)) @test_broken all(a * τᵍ == τᵍ * a for a in Groups.gens(G))
end end