show for FPSymbol

This commit is contained in:
kalmar 2017-05-11 18:22:04 +02:00
parent 48a80760fd
commit 6d8f244ee8
1 changed files with 8 additions and 0 deletions

View File

@ -70,6 +70,14 @@ function show(io::IO, G::FPGroup)
print(io, "rels:\t", join([rel for rel in G.rels], ","),"\n")
end
function show(io::IO, s::FPSymbol)
if isone(s)
print(io, "(id)")
elseif s.pow == 1
print(io, s.str)
else
print(io, (s.str)*"^$(s.pow)")
end
end
function add_rel!{T<:FPSymbol}(G::FPGroup, w::GWord{T})