1
0
mirror of https://github.com/kalmarek/Groups.jl.git synced 2024-11-19 14:35:28 +01:00

pretty printing for automorphisms

This commit is contained in:
Marek Kaluba 2021-07-05 15:05:37 +02:00
parent b191457526
commit 939d231bbe
No known key found for this signature in database
GPG Key ID: 8BF1A3855328FC15

View File

@ -84,6 +84,16 @@ Base.show(io::IO, ::Type{<:AbstractFPGroupElement{<:AutomorphismGroup{T}}}) wher
Base.show(io::IO, A::AutomorphismGroup) = print(io, "automorphism group of ", object(A)) Base.show(io::IO, A::AutomorphismGroup) = print(io, "automorphism group of ", object(A))
function Base.show(io::IO, ::MIME"text/plain", a::AbstractFPGroupElement{<:AutomorphismGroup})
println(io, "$(a):")
d = domain(a)
im = evaluate(a)
for (x, imx) in zip(d, im[1:end-1])
println(io, "$x$imx")
end
println(io, "$(last(d))$(last(im))")
end
## Automorphism Evaluation ## Automorphism Evaluation
domain(f::AbstractFPGroupElement{<:AutomorphismGroup}) = deepcopy(parent(f).domain) domain(f::AbstractFPGroupElement{<:AutomorphismGroup}) = deepcopy(parent(f).domain)