1
0
mirror of https://github.com/kalmarek/Groups.jl.git synced 2024-07-17 10:55:33 +02:00

FreeGroup utility function

This commit is contained in:
kalmar 2017-05-11 18:26:37 +02:00
parent 8dd4d96b6f
commit 0c699894fa

View File

@ -90,8 +90,10 @@ end
FreeGroup(n::Int, f::String=f) = FPGroup(["$f$i" for i in 1:n])
inv(s::FPSymbol) = change_pow(s, -s.pow) inv(s::FPSymbol) = change_pow(s, -s.pow)
FreeGroup(a::Vector{String}) = FPGroup(a)
function add_rel!{T<:FPSymbol}(G::FPGroup, w::GWord{T}) function add_rel!{T<:FPSymbol}(G::FPGroup, w::GWord{T})
if !(w in G.rels) if !(w in G.rels)
push!(G.rels, w) push!(G.rels, w)