Skip to content

Conversation

JohnAAbbott
Copy link
Collaborator

Added a comment about how to coerce a polynomial from one ring to another; and stating that the constructors will not do this. See https://github.com/oscar-system/Oscar.jl/issues/5396

Copy link

codecov bot commented Oct 1, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.93%. Comparing base (9679054) to head (19800b4).
⚠️ Report is 4 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2179   +/-   ##
=======================================
  Coverage   87.92%   87.93%           
=======================================
  Files         127      127           
  Lines       31782    31802   +20     
=======================================
+ Hits        27945    27964   +19     
- Misses       3837     3838    +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

(R::PolyRing{T})(a::T) where T <: RingElement
```
The third constructor above cannot be used to coerce a polynomial from one ring
to another; instead use evaluation, for instance: `f(y)` where `y` is the
Copy link
Member

Choose a reason for hiding this comment

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

But evaluation is not the best way. We can mention it, but really should be recommending map_coefficient here, ideally with a jldoctest usage example.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I confirm that evaluation is impressively slow (and requires impressively much RAM): for the record, I tried mapping (x+1)^99999 from ZZ[x] to ZZ[y], and gave up after 600s CPU -- map_coefficients took less than 1s.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants