use KB.IndexAutomaton as rewriting for FPGroups
This commit is contained in:
parent
c75ff00aa9
commit
827969ae84
|
@ -51,12 +51,14 @@ function SurfaceGroup(genus::Integer, boundaries::Integer)
|
|||
comms = Word(word)
|
||||
word_rels = [ comms => one(comms) ]
|
||||
|
||||
rws = KnuthBendix.RewritingSystem(word_rels, KnuthBendix.RecursivePathOrder(Al))
|
||||
KnuthBendix.knuthbendix!(rws)
|
||||
rws = let R = KnuthBendix.RewritingSystem(word_rels, KnuthBendix.Recursive(Al))
|
||||
KnuthBendix.IndexAutomaton(KnuthBendix.knuthbendix(R))
|
||||
end
|
||||
elseif boundaries == 1
|
||||
S = typeof(one(Word(Int[])))
|
||||
word_rels = Pair{S, S}[]
|
||||
rws = RewritingSystem(word_rels, KnuthBendix.LenLex(Al))
|
||||
word_rels = Pair{W,W}[]
|
||||
rws = let R = RewritingSystem(word_rels, KnuthBendix.LenLex(Al))
|
||||
KnuthBendix.IndexAutomaton(KnuthBendix.knuthbendix(R))
|
||||
end
|
||||
else
|
||||
throw("Not Implemented")
|
||||
end
|
||||
|
|
|
@ -14,7 +14,9 @@ function SpecialAutomorphismGroup(F::FreeGroup; ordering = KnuthBendix.LenLex, k
|
|||
# the rws is not confluent, let's suppress warning about it
|
||||
KnuthBendix.knuthbendix(rws, KnuthBendix.Settings(; max_rules=max_rules, kwargs...))
|
||||
end
|
||||
return AutomorphismGroup(F, S, rws, ntuple(i -> gens(F, i), n))
|
||||
|
||||
idxA = KnuthBendix.IndexAutomaton(rws)
|
||||
return AutomorphismGroup(F, S, idxA, ntuple(i -> gens(F, i), n))
|
||||
end
|
||||
|
||||
KnuthBendix.alphabet(G::AutomorphismGroup{<:FreeGroup}) = alphabet(rewriting(G))
|
||||
|
|
|
@ -231,7 +231,7 @@ function FPGroup(
|
|||
|
||||
rws = KnuthBendix.knuthbendix(rws, KnuthBendix.Settings(; kwargs...))
|
||||
|
||||
return FPGroup(G.gens, rels, rws)
|
||||
return FPGroup(G.gens, rels, KnuthBendix.IndexAutomaton(rws))
|
||||
end
|
||||
|
||||
function Base.show(io::IO, ::MIME"text/plain", G::FPGroup)
|
||||
|
|
Loading…
Reference in New Issue