Skip to content

Commit

Permalink
Update doctests and some show methods, version 0.37.1 (#1552)
Browse files Browse the repository at this point in the history
  • Loading branch information
fingolfin authored Oct 8, 2023
1 parent 38fe616 commit 110d3be
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 15 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "Nemo"
uuid = "2edaba10-b0f1-5616-af89-8c11ac63239a"
version = "0.37.0"
version = "0.37.1"

[deps]
AbstractAlgebra = "c3fe647b-3220-5bb0-a1ea-a7954cac585d"
Expand Down
10 changes: 6 additions & 4 deletions docs/src/ff_embedding.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ julia> k4, x4 = finite_field(19, 4, "x4")
(Finite field of degree 4 over GF(19), x4)
julia> f = embed(k2, k4)
Morphism of finite fields from
from finite field of degree 2 over gF(19)
to finite field of degree 4 over gF(19)
Morphism of finite fields
from finite field of degree 2 over GF(19)
to finite field of degree 4 over GF(19)
julia> y = f(x2)
6*x4^3 + 5*x4^2 + 9*x4 + 17
Expand All @@ -69,7 +69,9 @@ julia> k21, x21 = finite_field(13, 21, "x21")
(Finite field of degree 21 over GF(13), x21)
julia> s = preimage_map(k7, k21)
Preimage of the morphism from Finite field of degree 7 over GF(13) to Finite field of degree 21 over GF(13)
Preimage of a morphism
from finite field of degree 7 over GF(13)
to finite field of degree 21 over GF(13)
julia> y = k21(x7);
Expand Down
16 changes: 6 additions & 10 deletions src/embedding/EmbeddingTypes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,6 @@ function (f::FinFieldMorphism)(x)
return image_fn(f)(x)::elem_type(codomain(f))
end

function show(io::IO, ::MIME"text/plain", f::FinFieldMorphism)
println(io, "Morphism of finite fields from")
io = pretty(io)
print(io, Indent(), "from ", Lowercase(), domain(f))
println(io)
print(io, "to ", Lowercase(), codomain(f))
print(io, Dedent())
end

function show(io::IO, f::FinFieldMorphism)
if get(io, :supercompact, false)
print(io, "Morphism of finite fields")
Expand Down Expand Up @@ -76,7 +67,12 @@ function (f::FinFieldPreimage)(x)
end

function Base.show(io::IO, f::FinFieldPreimage)
print(io, "Preimage of the morphism from $(domain(f)) to $(codomain(f))")
if get(io, :supercompact, false)
print(io, "Preimage of a morphism")
else
print(io, "Hom: ")
print(IOContext(io, :supercompact => true), domain(f), " -> ", codomain(f))
end
end

@doc raw"""
Expand Down

2 comments on commit 110d3be

@fingolfin
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/93038

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.37.1 -m "<description of version>" 110d3be12bea8a370ea4e2d1d1ebbc5ac806c401
git push origin v0.37.1

Please sign in to comment.