-
-
Notifications
You must be signed in to change notification settings - Fork 487
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
Integer-valued polynomial ring #34988
Conversation
This comment was marked as off-topic.
This comment was marked as off-topic.
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.
The same comments apply for the PositiveBasis
. It seems like there would be a benefit to avoid some duplication through an ABC.
A = self.parent() | ||
return A.sum(c * A.monomial(i + 1) for i, c in self) | ||
|
||
def polynomial(self): |
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.
Should we cache this?
#34814 (comment) is unresolved |
207a954
to
79fbe52
Compare
Now in better state, working with realizations and only importing one thing into the global namespace |
@fchapoton Would you like me to go through what's there and leave some comments or are you still going to do some work on it? |
Yes, please have a look if you can. I will not do anything else here for the next 7 days. Maybe moving some documentation to the top could be a good idea. |
S = self.S() | ||
B = self.B() | ||
B.module_morphism(S._from_binomial_basis, codomain=S).register_as_coercion() | ||
S.module_morphism(B._from_shifted_basis, codomain=B).register_as_coercion() |
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.
This can lead to problems if B
and S
are garbage collected IIRC. This might be okay though as the realizations are stored and tied to the IVPR
.
bb38198
to
46a9c24
Compare
I wonder if I should try to factorise the "polynomial" and "from polynomial" methods ? I could create a |
I think that would be good. It took me a bit to actually see what the difference between those methods actually ways. |
Ok, I have now done both the factorisation of |
I think you have taken care of everything. The only comment I have on the recent commits is that I think you can simply return the |
oh, I see, thanks. I did not know that one could return a morphism and not a boolean in |
It can also take an arbitrary Python callable object as well as I recall, which then gets wrapped into a coercion morphism. Anyways, that's all my comments for now. Let me know when you are ready for a full review (which will probably be quite quick at this point). |
ok, this should be almost ready. |
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.
Just a few more little things.
Documentation preview for this PR is ready! 🎉 |
Thanks, Travis. I think I have handled all your points in the latest commit. |
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.
Thank you. LGTM.
Thanks for contributing to Sage! Detailed instructions to be added shortly.
Please make sure to also have a look at our
Code Style Conventions.
Fixes #34814