mirror of
https://github.com/kalmarek/Groups.jl.git
synced 2024-12-24 18:05:27 +01:00
replace KB.rewrite_from_left! → KB.rewrite!
This commit is contained in:
parent
42d4c41d90
commit
1345516521
@ -42,5 +42,5 @@ Defaults to the rewriting in the free group.
|
||||
"""
|
||||
@inline function normalform!(res::AbstractWord, g::AbstractFPGroupElement)
|
||||
isone(res) && isnormalform(g) && return append!(res, word(g))
|
||||
return KnuthBendix.rewrite_from_left!(res, word(g), rewriting(parent(g)))
|
||||
return KnuthBendix.rewrite!(res, word(g), rewriting(parent(g)))
|
||||
end
|
||||
|
23
src/types.jl
23
src/types.jl
@ -3,15 +3,16 @@
|
||||
"""
|
||||
AbstractFPGroup
|
||||
|
||||
An Abstract type representing finitely presented groups. Every instance `` must implement
|
||||
An Abstract type representing finitely presented groups. Every instance must implement
|
||||
* `KnuthBendix.alphabet(G::MyFPGroup)`
|
||||
* `rewriting(G::MyFPGroup)` : return the rewriting object which must implement
|
||||
> `KnuthBendix.rewrite_from_left!(u, v, rewriting(G))`.
|
||||
> `KnuthBendix.rewrite!(u, v, rewriting(G))`.
|
||||
By default `alphabet(G)` is returned, which amounts to free rewriting in `G`.
|
||||
* `relations(G::MyFPGroup)` : return a set of defining relations.
|
||||
|
||||
AbstractFPGroup may also override `word_type(::Type{MyFPGroup}) = Word{UInt16}`,
|
||||
which controls the word type used for group elements. If a group has more than `255` generators you need to define e.g.
|
||||
AbstractFPGroup may also override `word_type(::Type{MyFPGroup}) = Word{UInt8}`,
|
||||
which controls the word type used for group elements.
|
||||
If a group has more than `255` generators you need to define e.g.
|
||||
> `word_type(::Type{MyFPGroup}) = Word{UInt16}`
|
||||
"""
|
||||
abstract type AbstractFPGroup <: GroupsCore.Group end
|
||||
@ -22,14 +23,14 @@ word_type(::Type{<:AbstractFPGroup}) = Word{UInt8}
|
||||
|
||||
"""
|
||||
rewriting(G::AbstractFPGroup)
|
||||
Return a "rewriting object" for elements of `G`. The rewriting object must must implement
|
||||
KnuthBendix.rewrite_from_left!(
|
||||
u::AbstractWord,
|
||||
v::AbstractWord,
|
||||
rewriting(G)
|
||||
)
|
||||
Return a "rewriting object" for elements of `G`.
|
||||
|
||||
For example if `G` is a `FreeGroup` then `alphabet(G)` is returned which results in free rewriting. For `FPGroup` a rewriting system is returned which may (or may not) rewrite word `v` to its normal form.
|
||||
The rewriting object must must implement
|
||||
KnuthBendix.rewrite!(u::AbstractWord, v::AbstractWord, rewriting(G))
|
||||
|
||||
For example if `G` is a `FreeGroup` then `alphabet(G)` is returned which results
|
||||
in free rewriting. For `FPGroup` a rewriting system is returned which may
|
||||
(or may not) rewrite word `v` to its normal form (depending on e.g. its confluence).
|
||||
"""
|
||||
function rewriting end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user