mirror of
https://github.com/kalmarek/Groups.jl.git
synced 2025-01-04 04:20: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
|
end
|
||||||
|
|
||||||
function Base.show(io::IO, ::MIME"text/plain", G::FPGroup)
|
function Base.show(io::IO, ::MIME"text/plain", G::FPGroup)
|
||||||
print(io, "Finitely presented group generated by:\n\t{")
|
println(
|
||||||
Base.print_array(io, permutedims(gens(G)))
|
io,
|
||||||
println(io, " },")
|
"Finitely presented group generated by $(ngens(G)) element",
|
||||||
println(io, "subject to relations:")
|
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))
|
return Base.print_array(io, relations(G))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user