diff --git a/src/types.jl b/src/types.jl index 3909df4..3b7c150 100644 --- a/src/types.jl +++ b/src/types.jl @@ -264,10 +264,18 @@ function FPGroup( end function Base.show(io::IO, ::MIME"text/plain", G::FPGroup) - print(io, "Finitely presented group generated by:\n\t{") - Base.print_array(io, permutedims(gens(G))) - println(io, " },") - println(io, "subject to relations:") + println( + io, + "Finitely presented group generated by $(ngens(G)) element", + ngens(G) > 1 ? 's' : "", + ": ", + ) + join(io, gens(G), ", ", ", and ") + println( + io, + "\n subject to relation", + length(relations(G)) > 1 ? 's' : "", + ) return Base.print_array(io, relations(G)) end