mirror of
https://github.com/kalmarek/Groups.jl.git
synced 2024-12-03 17:56:28 +01:00
don't print overly long presentations
This commit is contained in:
parent
d834935d05
commit
203e084ff3
@ -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
|
||||
|
||||
###############################################################################
|
||||
|
Loading…
Reference in New Issue
Block a user