1
0
mirror of https://github.com/kalmarek/Groups.jl.git synced 2024-12-25 02:05:30 +01: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)
FreeGroup(a::Vector{String}) = FPGroup(a)
function add_rel!{T<:FPSymbol}(G::FPGroup, w::GWord{T})
if !(w in G.rels)
push!(G.rels, w)