-
-
Notifications
You must be signed in to change notification settings - Fork 528
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
Valuation on power series and Laurent series #39517
base: develop
Are you sure you want to change the base?
Conversation
I still have a problem with categories that I do not understand. Please tell me if you have some insight. |
src/sage/rings/series_valuation.py
Outdated
|
||
from sage.rings.valuation.valuation import DiscreteValuation | ||
|
||
class SeriesValuation(DiscreteValuation): |
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.
Have you considered making this a UniqueRepresentation? Then you can throw out _eq_
and __reduce__
from your implementation.
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.
Yes, I tried it (not so hard). But got an error that I did not really understand (something with metaclasses).
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.
Ah, that's annoying. Then you need to add a silly little factory.
Let me know if you need any support here (I can add it if you want me to.)
could you add this simultaneously to the lazy power / Laurent series? or should this be actually a method in a category? |
valuation_space = DiscretePseudoValuationSpace(self) | ||
return SeriesValuation(valuation_space) |
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.
You want to do valuation_space.__make_element_class__(SeriesValuation)(valuation_space)
to get the category right.
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.
Thanks!
Sure, I will do it. |
src/sage/rings/series_valuation.py
Outdated
sage: v # indirect doctest | ||
t-adic valuation | ||
""" | ||
return "%s-adic valuation" % self.domain().uniformizer() |
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.
return "%s-adic valuation" % self.domain().uniformizer() | |
return "%s-adic valuation" % self.uniformizer() |
I think it would be good to implement uniformizer()
on the level of valuation.
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.
Actually, once the "category" test above passes, more tests coming from the category of discrete valuations are going to fail, namely that you are missing a bunch of methods: uniformizer
, reduce
, lift
, residue_field
.
Documentation preview for this PR (built with commit 92a950d; changes) is ready! 🎉 |
Thanks for your help. I think that everything is working correctly now. |
src/sage/rings/series_valuation.py
Outdated
|
||
def create_object(self, version, key, **extra_args): | ||
r""" | ||
Create a unique key identifying the valuation of ``R``. |
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.
Actually this creates the object. That's the docstring for the other method I guess.
src/sage/rings/series_valuation.py
Outdated
SeriesValuation = SeriesValuationFactory("sage.rings.series_valuation.SeriesValuation") | ||
|
||
|
||
class SeriesValuation_base(DiscreteValuation): |
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.
Maybe _generic
since there's nobody inheriting from this. Base sounds like abstract base to me (just a suggestion. Keep it if you want.)
doctests fail with:
|
We implement the method
valuation
on the rings of power series and Laurent series.📝 Checklist