Skip to content

Commit

Permalink
Fix printing for EllipticSurface (#2585)
Browse files Browse the repository at this point in the history
* fix printing
---------

Co-authored-by: Benjamin Lorenz <benlorenz@users.noreply.github.com>
  • Loading branch information
StevellM and benlorenz authored Jul 25, 2023
1 parent 3fbfcd2 commit ff00abb
Showing 1 changed file with 21 additions and 37 deletions.
58 changes: 21 additions & 37 deletions experimental/Schemes/elliptic_surface.jl
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,30 @@ For now functionality is restricted to $C = \mathbb{P}^1$.

end

base_ring(X::EllipticSurface) = coefficient_ring(base_ring(base_field(generic_fiber(X))))

@doc raw"""
elliptic_surface(generic_fiber::EllCrv, euler_characteristic::Int, mwl_basis::Vector{<:EllCrvPt}=EllCrvPt[]) -> EllipticSurface
Return the relatively minimal elliptic surface with generic fiber ``E/k(t)``.
# Examples
```jldoctest
julia> Qt, t = polynomial_ring(QQ, :t);
julia> Qtf = fraction_field(Qt);
julia> E = EllipticCurve(Qtf, [0,0,0,0,t^5*(t-1)^2]);
julia> X3 = elliptic_surface(E, 2)
Elliptic surface
over rational field
with generic fiber
-x^3 + y^2 - t^7 + 2*t^6 - t^5
julia> Base.show(stdout, X3)
Elliptic surface with generic fiber -x^3 + y^2 - t^7 + 2*t^6 - t^5
```
"""
function elliptic_surface(generic_fiber::EllCrv{BaseField}, euler_characteristic::Int,
mwl_basis::Vector{<:EllCrvPt}=EllCrvPt[]) where {
Expand Down Expand Up @@ -208,23 +228,6 @@ Return the torsion part of the Mordell-Weil group of the generic fiber of ``S``.
return tors
end

@doc raw"""
#Examples
```jldoctest
julia> Qt, t = polynomial_ring(QQ, :t);
julia> Qtf = fraction_field(Qt);
julia> E = EllipticCurve(Qtf, [0,0,0,0,t^5*(t-1)^2]);
julia> X3 = elliptic_surface(E, 2);
julia> Base.show(stdout, X3)
Elliptic surface with generic fiber -x^3 + y^2 - t^7 + 2*t^6 - t^5
```
"""
function Base.show(io::IO, S::EllipticSurface)
io = pretty(io)
if get(io, :supercompact, false)
Expand All @@ -235,25 +238,6 @@ function Base.show(io::IO, S::EllipticSurface)
end
end

@doc raw"""
#Examples
```jldoctest
julia> Qt, t = polynomial_ring(QQ, :t);
julia> Qtf = fraction_field(Qt);
julia> E = EllipticCurve(Qtf, [0,0,0,0,t^5*(t-1)^2]);
julia> X3 = elliptic_surface(E, 2)
Elliptic surface
over rational field
with generic fiber
-x^3 + y^2 - t^7 + 2*t^6 - t^5
and relatively minimal model
scheme over QQ covered with 45 patches
```
"""
function Base.show(io::IO, ::MIME"text/plain", S::EllipticSurface)
io = pretty(io)
println(io, "Elliptic surface")
Expand All @@ -263,7 +247,7 @@ function Base.show(io::IO, ::MIME"text/plain", S::EllipticSurface)
if isdefined(S, :Y)
println(io)
println(io, "and relatively minimal model")
print(io, Indent(), Lowercase(), relatively_minimal_model(S)[1], Dedent())
print(io, Indent(), Lowercase(), S.Y, Dedent())
end
print(io, Dedent())
end
Expand Down

0 comments on commit ff00abb

Please sign in to comment.