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

Require non-zero coefficient ring in universal polynomial ring #1858

Merged
merged 1 commit into from
Oct 11, 2024
Merged
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
1 change: 1 addition & 0 deletions src/generic/UnivPoly.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1170,6 +1170,7 @@ x*y - z
```
"""
function universal_polynomial_ring(R::Ring; cached::Bool=true, internal_ordering::Symbol=:lex)
@req !is_trivial(R) "Zero rings are currently not supported as coefficient ring."
Copy link
Member

Choose a reason for hiding this comment

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

Having a period at the end is somewhat rare in our error messages. A quick experiment in Oscar.jl:

$ git grep -E 'error\(.*\."' | wc -l
     101
$ git grep -E 'error\(' | wc -l
    1526

and

$ git grep -E '@req.*\."' | wc -l
     137
$ git grep -E '@req.*"' | wc -l
    1599

So less than 10% of our @req calls use a trailing period. The numbers for error` are a bit less reliably because they miss the case were the string spans over more than one line but I don't think there will be a fundamentally different outcome.

Anyway I am merging this and the other PRs now as this is a very minor point and also a matter of taste.

T = elem_type(R)
U = mpoly_type(R)

Expand Down
Loading