1
0
mirror of https://github.com/kalmarek/Groups.jl.git synced 2024-11-19 06:30:29 +01:00

tweak the printing of FPGroup

This commit is contained in:
Marek Kaluba 2024-02-12 12:38:28 +01:00
parent f4d018f087
commit 6ca9497dab
No known key found for this signature in database
GPG Key ID: 8BF1A3855328FC15

View File

@ -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