Skip to content

Commit

Permalink
fix printing and doctest
Browse files Browse the repository at this point in the history
  • Loading branch information
simonbrandhorst committed Aug 11, 2023
1 parent 0e2a725 commit 4e6d620
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/AlgebraicGeometry/RationalPoint/AffineRationalPoint.jl
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ function Base.show(io::IO, ::MIME"text/plain", P::AbsAffineRationalPoint)
io = pretty(io)
println(io, "Rational point")
print(io, Indent())
println(io, "of ", Lowercase(), ambient_scheme(P))
println(io, "of ", Lowercase(), ambient_scheme(P), Dedent())
print(io, "with coordinates (")
join(io, coordinates(P), ", ")
print(io, ")", Dedent())
print(io, ")")
end

function Base.show(io::IO, P::AbsAffineRationalPoint)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ function Base.show(io::IO, ::MIME"text/plain", P::AbsProjectiveRationalPoint)
io = pretty(io)
println(io, "Projective rational point")
print(io, Indent())
println(io, "of ", codomain(P))
println(io, "of ", codomain(P), Dedent())
print(io, "with coordinates (")
join(io, coordinates(P), " : ")
print(io, ")", Dedent())
print(io, ")")
end

function Base.show(io::IO, P::AbsProjectiveRationalPoint)
Expand Down
8 changes: 6 additions & 2 deletions src/AlgebraicGeometry/RationalPoint/Types.jl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ julia> X = algebraic_set(x*y);
julia> X([1, 0])
Rational point
of V(x*y)
with coordinates (1, 0)
with coordinates (1, 0)
```
"""
Expand Down Expand Up @@ -52,9 +52,13 @@ Type for rational points in projective varieties.
# Examples
```jldoctest
julia> P2 = projective_space(QQ, 2)
julia> P2 = projective_space(QQ, 2);
julia> P2([4, 0 , 2//3])
Projective rational point
of Projective 2-space over QQ with coordinates [s0, s1, s2]
with coordinates (4 : 0 : 2//3)
```
"""
struct ProjectiveRationalPoint{S<:RingElem, T<:AbsRationalPointSet} <: AbsProjectiveRationalPoint{S, T}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ function Base.show(io::IO, X::AffineAlgebraicSet{<:Field,<:MPolyQuoRing})
else
I = fat_ideal(X)
end
print(io, "V(")
print(io, LowercaseOff(), "V(")
join(io, gens(I), ", ")
print(io,")")
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function Base.show(io::IO, X::AbsProjectiveAlgebraicSet{<:Field, <:MPolyQuoRing}
elseif get_attribute(X, :is_empty, false)
print(io, "Empty projective algebraic set")
else
print(io, "V(")
print(io, LowercaseOff(), "V(")
if isdefined(X, :Xred)
I = vanishing_ideal(X)
else
Expand Down

0 comments on commit 4e6d620

Please sign in to comment.