separate SAut(F_n) from AutomorphismGroups

This commit is contained in:
Marek Kaluba 2021-05-28 14:20:17 +02:00
parent 190fe1f201
commit f74b48b890
6 changed files with 42 additions and 35 deletions

View File

@ -28,11 +28,10 @@ import OrderedCollections: OrderedSet
include("new_types.jl")
include("new_hashing.jl")
include("normalform.jl")
include("new_transvections.jl")
include("gersten_relations.jl")
include("new_autgroups.jl")
include("groups/sautFn.jl")
end # module New
###############################################################################

34
src/groups/sautFn.jl Normal file
View File

@ -0,0 +1,34 @@
include("transvections.jl")
include("gersten_relations.jl")
function SpecialAutomorphismGroup(F::FreeGroup; ordering = KnuthBendix.LenLex, kwargs...)
n = length(KnuthBendix.alphabet(F)) ÷ 2
A, rels = gersten_relations(n, commutative = false)
S = KnuthBendix.letters(A)[1:2(n^2-n)]
rws = KnuthBendix.RewritingSystem(rels, ordering(A))
KnuthBendix.knuthbendix!(rws; kwargs...)
return AutomorphismGroup(F, S, rws, ntuple(i -> gens(F, i), n))
end
KnuthBendix.alphabet(G::AutomorphismGroup{<:FreeGroup}) = alphabet(rewriting(G))
function relations(G::AutomorphismGroup{<:FreeGroup})
n = length(KnuthBendix.alphabet(object(G))) ÷ 2
return last(gersten_relations(n, commutative = false))
end
evaluate(f::FPGroupElement{<:AutomorphismGroup{<:FreeGroup}}) = evaluate!(domain(f), f)
function evaluate!(
t::NTuple{N,T},
f::FPGroupElement{<:AutomorphismGroup{<:FreeGroup}},
tmp = one(first(t)),
) where {T<:FPGroupElement,N}
A = alphabet(f)
for idx in word(f)
t = @inbounds evaluate!(t, A[idx], alphabet(object(parent(f))), tmp)::NTuple{N,T}
end
return t
end

View File

@ -1,6 +1,3 @@
abstract type GSymbol end
Base.literal_pow(::typeof(^), t::GSymbol, ::Val{-1}) = inv(t)
struct Transvection <: GSymbol
id::Symbol
ij::UInt8

View File

@ -12,26 +12,8 @@ struct AutomorphismGroup{G<:Group,T,R,S} <: AbstractFPGroup
end
object(G::AutomorphismGroup) = G.group
function SpecialAutomorphismGroup(F::FreeGroup; ordering = KnuthBendix.LenLex, kwargs...)
n = length(KnuthBendix.alphabet(F)) ÷ 2
A, rels = gersten_relations(n, commutative = false)
S = KnuthBendix.letters(A)[1:2(n^2-n)]
rws = KnuthBendix.RewritingSystem(rels, ordering(A))
KnuthBendix.knuthbendix!(rws; kwargs...)
return AutomorphismGroup(F, S, rws, ntuple(i -> gens(F, i), n))
end
KnuthBendix.alphabet(G::AutomorphismGroup{<:FreeGroup}) = alphabet(rewriting(G))
rewriting(G::AutomorphismGroup) = G.rws
function relations(G::AutomorphismGroup)
n = length(KnuthBendix.alphabet(object(G))) ÷ 2
return last(gersten_relations(n, commutative = false))
end
function equality_data(f::FPGroupElement{<:AutomorphismGroup})
imf = evaluate(f)
# return normalform!.(imf)
@ -107,16 +89,6 @@ Base.show(io::IO, A::AutomorphismGroup) = print(io, "automorphism group of ", ob
domain(f::FPGroupElement{<:AutomorphismGroup}) = deepcopy(parent(f).domain)
# tuple(gens(object(parent(f)))...)
evaluate(f::FPGroupElement{<:AutomorphismGroup{<:FreeGroup}}) = evaluate!(domain(f), f)
evaluate(f::FPGroupElement{<:AutomorphismGroup}) = throw("you need to implement `evaluate(::typeof(f))`")
function evaluate!(
t::NTuple{N,T},
f::FPGroupElement{<:AutomorphismGroup{<:FreeGroup}},
tmp = one(first(t)),
) where {T<:FPGroupElement,N}
A = alphabet(f)
for idx in word(f)
t = @inbounds evaluate!(t, A[idx], alphabet(object(parent(f))), tmp)::NTuple{N,T}
end
return t
end

View File

@ -197,3 +197,8 @@ function Base.show(io::IO, G::FPGroup)
join(io, relations(G), ", ")
print(io, "")
end
## GSymbol aka letter of alphabet
abstract type GSymbol end
Base.literal_pow(::typeof(^), t::GSymbol, ::Val{-1}) = inv(t)