Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Fix printing multivariate polynomial ring with many variables (#1476)" #1488

Merged
merged 1 commit into from
Nov 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions docs/src/mpolynomial.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,6 @@ julia> derivative(k, 1)
julia> derivative(k, 2)
0

julia> R, x = polynomial_ring(ZZ, 10); R
Multivariate polynomial ring in 10 variables x1, x2, x3, x4, ..., x10
over integers

```

## Polynomial constructors
Expand Down
2 changes: 1 addition & 1 deletion docs/src/mseries.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ julia> v = symbols(R)
:x

julia> T = parent(x + 1)
Multivariate power series ring in 1 variable x
Multivariate power series ringin 1 variable x
over integers

julia> f == deepcopy(f)
Expand Down
4 changes: 2 additions & 2 deletions src/AbsMSeries.jl
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,10 @@
max_vars = 5 # largest number of variables to print
n = nvars(p)
print(io, "Multivariate power series ring")
print(io, " in ", ItemQuantity(nvars(p), "variable"), " ")
print(io, "in ", ItemQuantity(nvars(p), "variable"), " ")
if n > max_vars
join(io, symbols(p)[1:max_vars - 1], ", ")
println(io, ", ..., ", symbols(a)[n])
println(io, "..., ", symbols(p)[n])

Check warning on line 125 in src/AbsMSeries.jl

View check run for this annotation

Codecov / codecov/patch

src/AbsMSeries.jl#L125

Added line #L125 was not covered by tests
else
join(io, symbols(p), ", ")
println(io)
Expand Down
2 changes: 1 addition & 1 deletion src/FreeAssAlgebra.jl
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
print(io, " on ", ItemQuantity(nvars(a), "indeterminate"), " ")
if n > max_vars
join(io, symbols(a)[1:max_vars - 1], ", ")
println(io, ", ..., ", symbols(a)[n])
println(io, "..., ", symbols(a)[n])

Check warning on line 73 in src/FreeAssAlgebra.jl

View check run for this annotation

Codecov / codecov/patch

src/FreeAssAlgebra.jl#L73

Added line #L73 was not covered by tests
else
join(io, symbols(a), ", ")
println(io)
Expand Down
4 changes: 2 additions & 2 deletions src/LaurentMPoly.jl
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@
max_vars = 5 # largest number of variables to print
n = nvars(p)
print(io, "Multivariate Laurent polynomial ring")
print(io, " in ", ItemQuantity(nvars(p), "variable"), " ")
print(io, "in ", ItemQuantity(nvars(p), "variable"), " ")
if n > max_vars
join(io, symbols(p)[1:max_vars - 1], ", ")
println(io, ", ..., ", symbols(a)[n])
println(io, "..., ", symbols(p)[n])

Check warning on line 42 in src/LaurentMPoly.jl

View check run for this annotation

Codecov / codecov/patch

src/LaurentMPoly.jl#L42

Added line #L42 was not covered by tests
else
join(io, symbols(p), ", ")
println(io)
Expand Down
6 changes: 3 additions & 3 deletions src/MPoly.jl
Original file line number Diff line number Diff line change
Expand Up @@ -570,12 +570,12 @@
print(io, " in ", ItemQuantity(nvars(p), "variable"), " ")
if n > max_vars
join(io, symbols(p)[1:max_vars - 1], ", ")
println(io, ", ..., ", symbols(p)[n])
println(io, "..., ", symbols(p)[n])

Check warning on line 573 in src/MPoly.jl

View check run for this annotation

Codecov / codecov/patch

src/MPoly.jl#L573

Added line #L573 was not covered by tests
else
join(io, symbols(p), ", ")
println(io)
end
io = pretty(io)
io = pretty(io) # we need this to allow indented and lowercase printing

Check warning on line 578 in src/MPoly.jl

View check run for this annotation

Codecov / codecov/patch

src/MPoly.jl#L578

Added line #L578 was not covered by tests
print(io, Indent(), "over ", Lowercase(), base_ring(p))
print(io, Dedent())
end
Expand All @@ -585,8 +585,8 @@
# no nested printing
print(io, "Multivariate polynomial ring")
else
io = pretty(io) # we need this to allow printing lowercase
# nested printing allowed, preferably supercompact
io = pretty(io)
print(io, "Multivariate polynomial ring in ", ItemQuantity(nvars(p), "variable"))
print(IOContext(io, :supercompact => true), " over ", Lowercase(), base_ring(p))
end
Expand Down
Loading