Skip to content

Commit

Permalink
Use Lowercase in some show methods
Browse files Browse the repository at this point in the history
  • Loading branch information
fingolfin committed Jan 29, 2025
1 parent 41aea2f commit fa3cca3
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 11 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ julia> K, a = number_field(f, "a");
julia> O = maximal_order(K);
julia> O
Maximal order of Number field of degree 3 over QQ
Maximal order of number field of degree 3 over QQ
with basis AbsSimpleNumFieldElem[1, a, a^2]
```

Expand Down
8 changes: 4 additions & 4 deletions src/AlgAss/AlgGrp.jl
Original file line number Diff line number Diff line change
Expand Up @@ -167,24 +167,24 @@ function show(io::IO, ::MIME"text/plain", A::GroupAlgebra)
end

function show(io::IO, A::GroupAlgebra)
io = pretty(io)
if is_terse(io)
print(io, "Group algebra of ")
if is_finite(group(A))
print(io, "dimension ", order(group(A)))
print(io, "dimension ", order(group(A)), " ")

Check warning on line 174 in src/AlgAss/AlgGrp.jl

View check run for this annotation

Codecov / codecov/patch

src/AlgAss/AlgGrp.jl#L174

Added line #L174 was not covered by tests
else
print(io, "infinite dimension ")
end
print(io, " over ", base_ring(A))
else
print(io, "Group algebra of group ")
if is_finite(group(A))
print(io, "of order ", order(group(A)), " ")
else
print(io, "of infinite order ")
end
print(io, "over ")
print(terse(io), base_ring(A))
io = terse(io)
end
print(io, "over ", Lowercase(), base_ring(A))
end

################################################################################
Expand Down
2 changes: 1 addition & 1 deletion src/GenOrd/GenOrd.jl
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,7 @@ julia> k, a = quadratic_field(12);
julia> integral_closure(ZZ, k)
Maximal order of Real quadratic field defined by x^2 - 12
Maximal order of real quadratic field defined by x^2 - 12
with basis AbsSimpleNumFieldElem[1, 1//2*sqrt(12)]
```
"""
Expand Down
14 changes: 10 additions & 4 deletions src/NumFieldOrd/NfOrd/NfOrd.jl
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,9 @@ end
################################################################################

function show(io::IO, S::AbsNumFieldOrderSet)
io = pretty(io)

Check warning on line 197 in src/NumFieldOrd/NfOrd/NfOrd.jl

View check run for this annotation

Codecov / codecov/patch

src/NumFieldOrd/NfOrd/NfOrd.jl#L197

Added line #L197 was not covered by tests
print(io, "Set of orders of the number field ")
print(io, S.nf)
print(io, Lowercase(), S.nf)

Check warning on line 199 in src/NumFieldOrd/NfOrd/NfOrd.jl

View check run for this annotation

Codecov / codecov/patch

src/NumFieldOrd/NfOrd/NfOrd.jl#L199

Added line #L199 was not covered by tests
end

function extra_name(O::AbsNumFieldOrder)
Expand All @@ -217,14 +218,19 @@ function show(io::IO, O::AbsNumFieldOrder)
end

function show_gen(io::IO, O::AbsNumFieldOrder)
io = pretty(io)

Check warning on line 221 in src/NumFieldOrd/NfOrd/NfOrd.jl

View check run for this annotation

Codecov / codecov/patch

src/NumFieldOrd/NfOrd/NfOrd.jl#L221

Added line #L221 was not covered by tests
print(io, "Order of ")
println(io, nf(O))
println(io, Lowercase(), nf(O))

Check warning on line 223 in src/NumFieldOrd/NfOrd/NfOrd.jl

View check run for this annotation

Codecov / codecov/patch

src/NumFieldOrd/NfOrd/NfOrd.jl#L223

Added line #L223 was not covered by tests
print(io, "with Z-basis ")
print(io, basis(O, copy = false))
print(terse(io), basis(O, copy = false))

Check warning on line 225 in src/NumFieldOrd/NfOrd/NfOrd.jl

View check run for this annotation

Codecov / codecov/patch

src/NumFieldOrd/NfOrd/NfOrd.jl#L225

Added line #L225 was not covered by tests
end

function show_maximal(io::IO, O::AbsNumFieldOrder)
print(io, "Maximal order of $(nf(O)) \nwith basis $(O.basis_nf)")
io = pretty(io)
print(io, "Maximal order of ")
println(io, Lowercase(), nf(O))
print(io, "with basis ")
print(terse(io), O.basis_nf)
end

################################################################################
Expand Down
3 changes: 2 additions & 1 deletion src/NumFieldOrd/NfOrd/ResidueRing.jl
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ Base.deepcopy_internal(x::AbsOrdQuoRingElem, dict::IdDict) =
################################################################################

function show(io::IO, Q::AbsOrdQuoRing)
print(io, "Quotient of $(Q.base_ring)")
io = pretty(io)
print(io, "Quotient of ", Lowercase(), Q.base_ring)

Check warning on line 81 in src/NumFieldOrd/NfOrd/ResidueRing.jl

View check run for this annotation

Codecov / codecov/patch

src/NumFieldOrd/NfOrd/ResidueRing.jl#L80-L81

Added lines #L80 - L81 were not covered by tests
end

function AbstractAlgebra.expressify(x::AbsOrdQuoRingElem; context = nothing)
Expand Down

0 comments on commit fa3cca3

Please sign in to comment.