mirror of
https://github.com/kalmarek/Groups.jl.git
synced 2025-01-09 05:32:32 +01:00
format aut_groups
This commit is contained in:
parent
29af9659d9
commit
3cdef72977
@ -1,4 +1,4 @@
|
|||||||
function gersten_alphabet(n::Integer; commutative::Bool=true)
|
function gersten_alphabet(n::Integer; commutative::Bool = true)
|
||||||
indexing = [(i, j) for i in 1:n for j in 1:n if i ≠ j]
|
indexing = [(i, j) for i in 1:n for j in 1:n if i ≠ j]
|
||||||
S = [ϱ(i, j) for (i, j) in indexing]
|
S = [ϱ(i, j) for (i, j) in indexing]
|
||||||
|
|
||||||
@ -40,12 +40,17 @@ function _hexagonal_rule(
|
|||||||
return W(T[A[x], A[inv(y)], A[z]]) => W(T[A[z], A[w^-1], A[x]])
|
return W(T[A[x], A[inv(y)], A[z]]) => W(T[A[z], A[w^-1], A[x]])
|
||||||
end
|
end
|
||||||
|
|
||||||
gersten_relations(n::Integer; commutative) =
|
function gersten_relations(n::Integer; commutative)
|
||||||
gersten_relations(Word{UInt8}, n, commutative=commutative)
|
return gersten_relations(Word{UInt8}, n; commutative = commutative)
|
||||||
|
end
|
||||||
|
|
||||||
function gersten_relations(::Type{W}, n::Integer; commutative) where {W<:AbstractWord}
|
function gersten_relations(
|
||||||
|
::Type{W},
|
||||||
|
n::Integer;
|
||||||
|
commutative,
|
||||||
|
) where {W<:AbstractWord}
|
||||||
@assert n > 1 "Gersten relations are defined only for n>1, got n=$n"
|
@assert n > 1 "Gersten relations are defined only for n>1, got n=$n"
|
||||||
A = gersten_alphabet(n, commutative=commutative)
|
A = gersten_alphabet(n; commutative = commutative)
|
||||||
@assert length(A) <= typemax(eltype(W)) "Type $W can not represent words over alphabet with $(length(A)) letters."
|
@assert length(A) <= typemax(eltype(W)) "Type $W can not represent words over alphabet with $(length(A)) letters."
|
||||||
|
|
||||||
rels = Pair{W,W}[]
|
rels = Pair{W,W}[]
|
||||||
@ -74,7 +79,10 @@ function gersten_relations(::Type{W}, n::Integer; commutative) where {W<:Abstrac
|
|||||||
|
|
||||||
for (i, j, k) in Iterators.product(1:n, 1:n, 1:n)
|
for (i, j, k) in Iterators.product(1:n, 1:n, 1:n)
|
||||||
if (i ≠ j && k ≠ i && k ≠ j)
|
if (i ≠ j && k ≠ i && k ≠ j)
|
||||||
push!(rels, _pentagonal_rule(W, A, ϱ(i, j)^-1, ϱ(j, k)^-1, ϱ(i, k)^-1))
|
push!(
|
||||||
|
rels,
|
||||||
|
_pentagonal_rule(W, A, ϱ(i, j)^-1, ϱ(j, k)^-1, ϱ(i, k)^-1),
|
||||||
|
)
|
||||||
push!(rels, _pentagonal_rule(W, A, ϱ(i, j)^-1, ϱ(j, k), ϱ(i, k)))
|
push!(rels, _pentagonal_rule(W, A, ϱ(i, j)^-1, ϱ(j, k), ϱ(i, k)))
|
||||||
|
|
||||||
commutative && continue
|
commutative && continue
|
||||||
@ -83,7 +91,10 @@ function gersten_relations(::Type{W}, n::Integer; commutative) where {W<:Abstrac
|
|||||||
push!(rels, _pentagonal_rule(W, A, ϱ(i, j), λ(j, k)^-1, ϱ(i, k)))
|
push!(rels, _pentagonal_rule(W, A, ϱ(i, j), λ(j, k)^-1, ϱ(i, k)))
|
||||||
|
|
||||||
# the same as above, but with ϱ ↔ λ:
|
# the same as above, but with ϱ ↔ λ:
|
||||||
push!(rels, _pentagonal_rule(W, A, λ(i, j)^-1, λ(j, k)^-1, λ(i, k)^-1))
|
push!(
|
||||||
|
rels,
|
||||||
|
_pentagonal_rule(W, A, λ(i, j)^-1, λ(j, k)^-1, λ(i, k)^-1),
|
||||||
|
)
|
||||||
push!(rels, _pentagonal_rule(W, A, λ(i, j)^-1, λ(j, k), λ(i, k)))
|
push!(rels, _pentagonal_rule(W, A, λ(i, j)^-1, λ(j, k), λ(i, k)))
|
||||||
|
|
||||||
push!(rels, _pentagonal_rule(W, A, λ(i, j), ϱ(j, k), λ(i, k)^-1))
|
push!(rels, _pentagonal_rule(W, A, λ(i, j), ϱ(j, k), λ(i, k)^-1))
|
||||||
@ -94,7 +105,10 @@ function gersten_relations(::Type{W}, n::Integer; commutative) where {W<:Abstrac
|
|||||||
if !commutative
|
if !commutative
|
||||||
for (i, j) in Iterators.product(1:n, 1:n)
|
for (i, j) in Iterators.product(1:n, 1:n)
|
||||||
if i ≠ j
|
if i ≠ j
|
||||||
push!(rels, _hexagonal_rule(W, A, ϱ(i, j), ϱ(j, i), λ(i, j), λ(j, i)))
|
push!(
|
||||||
|
rels,
|
||||||
|
_hexagonal_rule(W, A, ϱ(i, j), ϱ(j, i), λ(i, j), λ(j, i)),
|
||||||
|
)
|
||||||
w = W([A[ϱ(i, j)], A[ϱ(j, i)^-1], A[λ(i, j)]])
|
w = W([A[ϱ(i, j)], A[ϱ(j, i)^-1], A[λ(i, j)]])
|
||||||
push!(rels, w^2 => inv(w, A)^2)
|
push!(rels, w^2 => inv(w, A)^2)
|
||||||
end
|
end
|
||||||
|
@ -17,7 +17,7 @@ function Base.show(io::IO, S::SurfaceGroup)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function SurfaceGroup(genus::Integer, boundaries::Integer, W=Word{Int16})
|
function SurfaceGroup(genus::Integer, boundaries::Integer, W = Word{Int16})
|
||||||
@assert genus > 1
|
@assert genus > 1
|
||||||
|
|
||||||
# The (confluent) rewriting systems comes from
|
# The (confluent) rewriting systems comes from
|
||||||
@ -31,7 +31,15 @@ function SurfaceGroup(genus::Integer, boundaries::Integer, W=Word{Int16})
|
|||||||
ltrs = String[]
|
ltrs = String[]
|
||||||
for i in 1:genus
|
for i in 1:genus
|
||||||
subscript = join('₀' + d for d in reverse(digits(i)))
|
subscript = join('₀' + d for d in reverse(digits(i)))
|
||||||
append!(ltrs, ["A" * subscript, "a" * subscript, "B" * subscript, "b" * subscript])
|
append!(
|
||||||
|
ltrs,
|
||||||
|
[
|
||||||
|
"A" * subscript,
|
||||||
|
"a" * subscript,
|
||||||
|
"B" * subscript,
|
||||||
|
"b" * subscript,
|
||||||
|
],
|
||||||
|
)
|
||||||
end
|
end
|
||||||
Al = Alphabet(reverse!(ltrs))
|
Al = Alphabet(reverse!(ltrs))
|
||||||
|
|
||||||
@ -51,9 +59,13 @@ function SurfaceGroup(genus::Integer, boundaries::Integer, W=Word{Int16})
|
|||||||
comms = W(word)
|
comms = W(word)
|
||||||
word_rels = [comms => one(comms)]
|
word_rels = [comms => one(comms)]
|
||||||
|
|
||||||
rws = let R = KnuthBendix.RewritingSystem(word_rels, KnuthBendix.Recursive(Al))
|
rws =
|
||||||
KnuthBendix.IndexAutomaton(KnuthBendix.knuthbendix(R))
|
let R = KnuthBendix.RewritingSystem(
|
||||||
end
|
word_rels,
|
||||||
|
KnuthBendix.Recursive(Al),
|
||||||
|
)
|
||||||
|
KnuthBendix.IndexAutomaton(KnuthBendix.knuthbendix(R))
|
||||||
|
end
|
||||||
elseif boundaries == 1
|
elseif boundaries == 1
|
||||||
word_rels = Pair{W,W}[]
|
word_rels = Pair{W,W}[]
|
||||||
rws = let R = RewritingSystem(word_rels, KnuthBendix.LenLex(Al))
|
rws = let R = RewritingSystem(word_rels, KnuthBendix.LenLex(Al))
|
||||||
@ -66,7 +78,13 @@ function SurfaceGroup(genus::Integer, boundaries::Integer, W=Word{Int16})
|
|||||||
F = FreeGroup(Al)
|
F = FreeGroup(Al)
|
||||||
rels = [F(lhs) => F(rhs) for (lhs, rhs) in word_rels]
|
rels = [F(lhs) => F(rhs) for (lhs, rhs) in word_rels]
|
||||||
|
|
||||||
return SurfaceGroup(genus, boundaries, [Al[i] for i in 2:2:length(Al)], rels, rws)
|
return SurfaceGroup(
|
||||||
|
genus,
|
||||||
|
boundaries,
|
||||||
|
[Al[i] for i in 2:2:length(Al)],
|
||||||
|
rels,
|
||||||
|
rws,
|
||||||
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
rewriting(S::SurfaceGroup) = S.rw
|
rewriting(S::SurfaceGroup) = S.rw
|
||||||
@ -75,17 +93,26 @@ relations(S::SurfaceGroup) = S.relations
|
|||||||
function symplectic_twists(π₁Σ::SurfaceGroup)
|
function symplectic_twists(π₁Σ::SurfaceGroup)
|
||||||
g = genus(π₁Σ)
|
g = genus(π₁Σ)
|
||||||
|
|
||||||
saut = SpecialAutomorphismGroup(FreeGroup(2g), max_rules=1000)
|
saut = SpecialAutomorphismGroup(FreeGroup(2g); max_rules = 1000)
|
||||||
|
|
||||||
Aij = [SymplecticMappingClass(saut, :A, i, j) for i in 1:g for j in 1:g if i ≠ j]
|
Aij = [
|
||||||
|
SymplecticMappingClass(saut, :A, i, j) for i in 1:g for
|
||||||
|
j in 1:g if i ≠ j
|
||||||
|
]
|
||||||
|
|
||||||
Bij = [SymplecticMappingClass(saut, :B, i, j) for i in 1:g for j in 1:g if i ≠ j]
|
Bij = [
|
||||||
|
SymplecticMappingClass(saut, :B, i, j) for i in 1:g for
|
||||||
|
j in 1:g if i ≠ j
|
||||||
|
]
|
||||||
|
|
||||||
mBij = [SymplecticMappingClass(saut, :B, i, j, minus=true) for i in 1:g for j in 1:g if i ≠ j]
|
mBij = [
|
||||||
|
SymplecticMappingClass(saut, :B, i, j; minus = true) for i in 1:g
|
||||||
|
for j in 1:g if i ≠ j
|
||||||
|
]
|
||||||
|
|
||||||
Bii = [SymplecticMappingClass(saut, :B, i, i) for i in 1:g]
|
Bii = [SymplecticMappingClass(saut, :B, i, i) for i in 1:g]
|
||||||
|
|
||||||
mBii = [SymplecticMappingClass(saut, :B, i, i, minus=true) for i in 1:g]
|
mBii = [SymplecticMappingClass(saut, :B, i, i; minus = true) for i in 1:g]
|
||||||
|
|
||||||
return [Aij; Bij; mBij; Bii; mBii]
|
return [Aij; Bij; mBij; Bii; mBii]
|
||||||
end
|
end
|
||||||
|
@ -1,10 +1,13 @@
|
|||||||
include("transvections.jl")
|
include("transvections.jl")
|
||||||
include("gersten_relations.jl")
|
include("gersten_relations.jl")
|
||||||
|
|
||||||
function SpecialAutomorphismGroup(F::FreeGroup; ordering=KnuthBendix.LenLex, kwargs...)
|
function SpecialAutomorphismGroup(
|
||||||
|
F::FreeGroup;
|
||||||
|
ordering = KnuthBendix.LenLex,
|
||||||
|
kwargs...,
|
||||||
|
)
|
||||||
n = length(alphabet(F)) ÷ 2
|
n = length(alphabet(F)) ÷ 2
|
||||||
A, rels = gersten_relations(n, commutative=false)
|
A, rels = gersten_relations(n; commutative = false)
|
||||||
S = [A[i] for i in 1:2:length(A)]
|
S = [A[i] for i in 1:2:length(A)]
|
||||||
|
|
||||||
max_rules = 1000 * n
|
max_rules = 1000 * n
|
||||||
@ -12,7 +15,10 @@ function SpecialAutomorphismGroup(F::FreeGroup; ordering=KnuthBendix.LenLex, kwa
|
|||||||
rws = Logging.with_logger(Logging.NullLogger()) do
|
rws = Logging.with_logger(Logging.NullLogger()) do
|
||||||
rws = KnuthBendix.RewritingSystem(rels, ordering(A))
|
rws = KnuthBendix.RewritingSystem(rels, ordering(A))
|
||||||
# the rws is not confluent, let's suppress warning about it
|
# the rws is not confluent, let's suppress warning about it
|
||||||
KnuthBendix.knuthbendix(rws, KnuthBendix.Settings(; max_rules=max_rules, kwargs...))
|
return KnuthBendix.knuthbendix(
|
||||||
|
rws,
|
||||||
|
KnuthBendix.Settings(; max_rules = max_rules, kwargs...),
|
||||||
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
idxA = KnuthBendix.IndexAutomaton(rws)
|
idxA = KnuthBendix.IndexAutomaton(rws)
|
||||||
@ -21,5 +27,5 @@ end
|
|||||||
|
|
||||||
function relations(G::AutomorphismGroup{<:FreeGroup})
|
function relations(G::AutomorphismGroup{<:FreeGroup})
|
||||||
n = length(alphabet(object(G))) ÷ 2
|
n = length(alphabet(object(G))) ÷ 2
|
||||||
return last(gersten_relations(n, commutative=false))
|
return last(gersten_relations(n; commutative = false))
|
||||||
end
|
end
|
||||||
|
@ -47,7 +47,15 @@ function Te_diagonal(λ::Groups.ΡΛ, ϱ::Groups.ΡΛ, i::Integer)
|
|||||||
return g
|
return g
|
||||||
end
|
end
|
||||||
|
|
||||||
function Te_lantern(A::Alphabet, b₀::T, a₁::T, a₂::T, a₃::T, a₄::T, a₅::T) where {T}
|
function Te_lantern(
|
||||||
|
A::Alphabet,
|
||||||
|
b₀::T,
|
||||||
|
a₁::T,
|
||||||
|
a₂::T,
|
||||||
|
a₃::T,
|
||||||
|
a₄::T,
|
||||||
|
a₅::T,
|
||||||
|
) where {T}
|
||||||
a₀ = (a₁ * a₂ * a₃)^4 * inv(b₀, A)
|
a₀ = (a₁ * a₂ * a₃)^4 * inv(b₀, A)
|
||||||
X = a₄ * a₅ * a₃ * a₄ # from Primer
|
X = a₄ * a₅ * a₃ * a₄ # from Primer
|
||||||
b₁ = inv(X, A) * a₀ * X # from Primer
|
b₁ = inv(X, A) * a₀ * X # from Primer
|
||||||
@ -85,7 +93,8 @@ function Te(λ::ΡΛ, ϱ::ΡΛ, i, j)
|
|||||||
if mod(j - (i + 1), genus) == 0
|
if mod(j - (i + 1), genus) == 0
|
||||||
return Te_diagonal(λ, ϱ, i)
|
return Te_diagonal(λ, ϱ, i)
|
||||||
else
|
else
|
||||||
return inv(Te_lantern(
|
return inv(
|
||||||
|
Te_lantern(
|
||||||
A,
|
A,
|
||||||
# Our notation: # Primer notation:
|
# Our notation: # Primer notation:
|
||||||
inv(Ta(λ, i + 1), A), # b₀
|
inv(Ta(λ, i + 1), A), # b₀
|
||||||
@ -94,7 +103,9 @@ function Te(λ::ΡΛ, ϱ::ΡΛ, i, j)
|
|||||||
inv(Te_diagonal(λ, ϱ, i), A), # a₃
|
inv(Te_diagonal(λ, ϱ, i), A), # a₃
|
||||||
inv(Tα(λ, i + 1), A), # a₄
|
inv(Tα(λ, i + 1), A), # a₄
|
||||||
inv(Te(λ, ϱ, i + 1, j), A), # a₅
|
inv(Te(λ, ϱ, i + 1, j), A), # a₅
|
||||||
), A)
|
),
|
||||||
|
A,
|
||||||
|
)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -105,7 +116,6 @@ Return the element of `G` which corresponds to shifting generators of the free g
|
|||||||
In the corresponding mapping class group this element acts by rotation of the surface anti-clockwise.
|
In the corresponding mapping class group this element acts by rotation of the surface anti-clockwise.
|
||||||
"""
|
"""
|
||||||
function rotation_element(G::AutomorphismGroup{<:FreeGroup})
|
function rotation_element(G::AutomorphismGroup{<:FreeGroup})
|
||||||
|
|
||||||
A = alphabet(G)
|
A = alphabet(G)
|
||||||
@assert iseven(ngens(object(G)))
|
@assert iseven(ngens(object(G)))
|
||||||
genus = ngens(object(G)) ÷ 2
|
genus = ngens(object(G)) ÷ 2
|
||||||
@ -140,7 +150,10 @@ function rotation_element(λ::ΡΛ, ϱ::ΡΛ)
|
|||||||
Ta(λ, i) *
|
Ta(λ, i) *
|
||||||
inv(Te_diagonal(λ, ϱ, i), A)
|
inv(Te_diagonal(λ, ϱ, i), A)
|
||||||
|
|
||||||
Ta(λ, i) * inv(Ta(λ, j) * Tα(λ, j), A)^6 * (Ta(λ, j) * Tα(λ, j) * z)^4 * c
|
return Ta(λ, i) *
|
||||||
|
inv(Ta(λ, j) * Tα(λ, j), A)^6 *
|
||||||
|
(Ta(λ, j) * Tα(λ, j) * z)^4 *
|
||||||
|
c
|
||||||
end
|
end
|
||||||
|
|
||||||
τ = (Ta(λ, 1) * Tα(λ, 1))^6 * prod(halftwists)
|
τ = (Ta(λ, 1) * Tα(λ, 1))^6 * prod(halftwists)
|
||||||
@ -148,7 +161,6 @@ function rotation_element(λ::ΡΛ, ϱ::ΡΛ)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function mcg_twists(G::AutomorphismGroup{<:FreeGroup})
|
function mcg_twists(G::AutomorphismGroup{<:FreeGroup})
|
||||||
|
|
||||||
@assert iseven(ngens(object(G)))
|
@assert iseven(ngens(object(G)))
|
||||||
genus = ngens(object(G)) ÷ 2
|
genus = ngens(object(G)) ÷ 2
|
||||||
|
|
||||||
@ -178,7 +190,9 @@ struct SymplecticMappingClass{T,F} <: GSymbol
|
|||||||
f::F
|
f::F
|
||||||
end
|
end
|
||||||
|
|
||||||
Base.:(==)(a::SymplecticMappingClass, b::SymplecticMappingClass) = a.autFn_word == b.autFn_word
|
function Base.:(==)(a::SymplecticMappingClass, b::SymplecticMappingClass)
|
||||||
|
return a.autFn_word == b.autFn_word
|
||||||
|
end
|
||||||
|
|
||||||
Base.hash(a::SymplecticMappingClass, h::UInt) = hash(a.autFn_word, h)
|
Base.hash(a::SymplecticMappingClass, h::UInt) = hash(a.autFn_word, h)
|
||||||
|
|
||||||
@ -187,8 +201,8 @@ function SymplecticMappingClass(
|
|||||||
id::Symbol,
|
id::Symbol,
|
||||||
i::Integer,
|
i::Integer,
|
||||||
j::Integer;
|
j::Integer;
|
||||||
minus=false,
|
minus = false,
|
||||||
inverse=false
|
inverse = false,
|
||||||
)
|
)
|
||||||
@assert i > 0 && j > 0
|
@assert i > 0 && j > 0
|
||||||
id === :A && @assert i ≠ j
|
id === :A && @assert i ≠ j
|
||||||
@ -246,7 +260,7 @@ function Base.show(io::IO, smc::SymplecticMappingClass)
|
|||||||
else
|
else
|
||||||
print(io, smc.id, subscriptify(smc.i), ".", subscriptify(smc.j))
|
print(io, smc.id, subscriptify(smc.i), ".", subscriptify(smc.j))
|
||||||
end
|
end
|
||||||
smc.inv && print(io, "^-1")
|
return smc.inv && print(io, "^-1")
|
||||||
end
|
end
|
||||||
|
|
||||||
function Base.inv(m::SymplecticMappingClass)
|
function Base.inv(m::SymplecticMappingClass)
|
||||||
@ -259,7 +273,7 @@ end
|
|||||||
function evaluate!(
|
function evaluate!(
|
||||||
t::NTuple{N,T},
|
t::NTuple{N,T},
|
||||||
smc::SymplecticMappingClass,
|
smc::SymplecticMappingClass,
|
||||||
tmp=nothing,
|
tmp = nothing,
|
||||||
) where {N,T}
|
) where {N,T}
|
||||||
t = smc.f(t)
|
t = smc.f(t)
|
||||||
for i in 1:N
|
for i in 1:N
|
||||||
|
@ -4,7 +4,7 @@ struct Transvection <: GSymbol
|
|||||||
j::UInt16
|
j::UInt16
|
||||||
inv::Bool
|
inv::Bool
|
||||||
|
|
||||||
function Transvection(id::Symbol, i::Integer, j::Integer, inv=false)
|
function Transvection(id::Symbol, i::Integer, j::Integer, inv = false)
|
||||||
@assert id in (:ϱ, :λ)
|
@assert id in (:ϱ, :λ)
|
||||||
return new(id, i, j, inv)
|
return new(id, i, j, inv)
|
||||||
end
|
end
|
||||||
@ -20,20 +20,23 @@ function Base.show(io::IO, t::Transvection)
|
|||||||
'λ'
|
'λ'
|
||||||
end
|
end
|
||||||
print(io, id, subscriptify(t.i), '.', subscriptify(t.j))
|
print(io, id, subscriptify(t.i), '.', subscriptify(t.j))
|
||||||
t.inv && print(io, "^-1")
|
return t.inv && print(io, "^-1")
|
||||||
end
|
end
|
||||||
|
|
||||||
Base.inv(t::Transvection) = Transvection(t.id, t.i, t.j, !t.inv)
|
Base.inv(t::Transvection) = Transvection(t.id, t.i, t.j, !t.inv)
|
||||||
|
|
||||||
Base.:(==)(t::Transvection, s::Transvection) =
|
function Base.:(==)(t::Transvection, s::Transvection)
|
||||||
t.id === s.id && t.i == s.i && t.j == s.j && t.inv == s.inv
|
return t.id === s.id && t.i == s.i && t.j == s.j && t.inv == s.inv
|
||||||
|
end
|
||||||
|
|
||||||
Base.hash(t::Transvection, h::UInt) = hash(hash(t.id, hash(t.i)), hash(t.j, hash(t.inv, h)))
|
function Base.hash(t::Transvection, h::UInt)
|
||||||
|
return hash(hash(t.id, hash(t.i)), hash(t.j, hash(t.inv, h)))
|
||||||
|
end
|
||||||
|
|
||||||
Base.@propagate_inbounds @inline function evaluate!(
|
Base.@propagate_inbounds @inline function evaluate!(
|
||||||
v::NTuple{T,N},
|
v::NTuple{T,N},
|
||||||
t::Transvection,
|
t::Transvection,
|
||||||
tmp=one(first(v)),
|
tmp = one(first(v)),
|
||||||
) where {T,N}
|
) where {T,N}
|
||||||
i, j = t.i, t.j
|
i, j = t.i, t.j
|
||||||
@assert 1 ≤ i ≤ length(v) && 1 ≤ j ≤ length(v)
|
@assert 1 ≤ i ≤ length(v) && 1 ≤ j ≤ length(v)
|
||||||
@ -84,7 +87,7 @@ end
|
|||||||
|
|
||||||
function Base.show(io::IO, p::PermRightAut)
|
function Base.show(io::IO, p::PermRightAut)
|
||||||
print(io, 'σ')
|
print(io, 'σ')
|
||||||
join(io, (subscriptify(Int(i)) for i in p.perm))
|
return join(io, (subscriptify(Int(i)) for i in p.perm))
|
||||||
end
|
end
|
||||||
|
|
||||||
Base.inv(p::PermRightAut) = PermRightAut(invperm(p.perm))
|
Base.inv(p::PermRightAut) = PermRightAut(invperm(p.perm))
|
||||||
@ -92,4 +95,6 @@ Base.inv(p::PermRightAut) = PermRightAut(invperm(p.perm))
|
|||||||
Base.:(==)(p::PermRightAut, q::PermRightAut) = p.perm == q.perm
|
Base.:(==)(p::PermRightAut, q::PermRightAut) = p.perm == q.perm
|
||||||
Base.hash(p::PermRightAut, h::UInt) = hash(p.perm, hash(PermRightAut, h))
|
Base.hash(p::PermRightAut, h::UInt) = hash(p.perm, hash(PermRightAut, h))
|
||||||
|
|
||||||
evaluate!(v::NTuple{T,N}, p::PermRightAut, tmp=nothing) where {T,N} = v[p.perm]
|
function evaluate!(v::NTuple{T,N}, p::PermRightAut, tmp = nothing) where {T,N}
|
||||||
|
return v[p.perm]
|
||||||
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user