don't print overly long presentations

This commit is contained in:
kalmarek 2018-03-22 10:49:52 +01:00
parent d834935d05
commit 203e084ff3
1 changed files with 7 additions and 2 deletions

View File

@ -104,8 +104,13 @@ length(s::FPSymbol) = abs(s.pow)
###############################################################################
function show(io::IO, G::FPGroup)
print(io, "FPgroup on $(length(G.gens)) generators: ")
print(io, "", join(G.gens, ", "), " | ", join(G.rels, ", "), " ⟩.")
print(io, "FPgroup on $(length(G.gens)) generators ")
strrels = join(G.rels, ", ")
if length(strrels) > 300
print(io, "", join(G.gens, ", "), " | $(length(G.rels)) relation(s) ⟩.")
else
print(io, "", join(G.gens, ", "), " | ", join(G.rels, ", "), " ⟩.")
end
end
###############################################################################