-
-
Notifications
You must be signed in to change notification settings - Fork 543
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
Refactor O() and fix O() for lazy power series ring #39436
base: develop
Are you sure you want to change the base?
Conversation
Documentation preview for this PR (built with commit 2bb908b; changes) is ready! 🎉 |
Looks like genuine bug in doctest.
The problem is the extension is ramified (Eisenstein), so But then,
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM except I don't know the math enough to verify the padic change. @xcaruso Can you comment on that doctest?
A (more conservative) alternative is to implement a check in implementation of But I really can't think of any case where |
I'll take a look, though probably won't have time for a couple days. |
Fixes
O(x)
forLazyPowerSeriesRing
. (previously it doesn't work)Also refactor it to check less special cases.
Use
.perfect_power()
instead offactor()
to avoid wasting time if a large composite is passed.Note:
.O()
and.add_bigoh()
is the same for many rings, but notAsymptoticRing
.In particular
x.O(5)
meansx.add_bigoh(5)
orx+O(x^5)
x.O()
meansO(x)
Personally I think the latter makes more sense, but this is part of public API so we will have to live with this inconsistency. (The former does not make sense for
AsymptoticRing
even)Thus the explicit check is needed. (
add_bigoh
is not implemented forAsymptoticRing
)I don't know why it's desirable to block
O(2*x^2)
for polynomial ring, but I'll leave the behavior unchanged just in case.📝 Checklist
⌛ Dependencies