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:
parent
f4d018f087
commit
6ca9497dab
16
src/types.jl
16
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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user