On Fri, 26 Jan 2007 14:44:28 -0800, Nils Bruin <[EMAIL PROTECTED]> wrote:
>
> On Jan 26, 12:39 pm, "Joel B. Mohler" <[EMAIL PROTECTED]> wrote:
>> The integer object method "valuation" computes the p-Adic valuation, but the
>> polynomial object method "valuation" computes a different sort of valuation.
>> It seems to me that they could be more analogous, but maybe there's something
>> I'm not seeing.
>
> I agree that the valuation for polynomials is confusing. Presently,
> P.valuation() and P.degree() are the same for non-zero polynomials.
No.
> If defined at all, P.valuation() should be "the valuation at the
> infinite place", which would be -P.degree() for non-zero P. The place
> at infinity is indeed the only one that stands out for a polynomial
> ring.
P.valuation() for a polynomial in x is ord_x(P):
------------
sage: f = x^3 + x^5
sage: f.valuation()
3
sage: f.degree()
5
------------
I then that's an ok default, but valuation should be changed so its
signature is like this:
def valuation(self, g=None)
and the default for prime is then the indeterminate, but g can
also be any polynomial, in which case this function returns
the largest power of g that divides self. Also, g could
be infinity, in which case this function returns -P.degree().
Somebody, please feel free to send me a patch... Note that
polynomial code got re-arranged some in sage-1.8.1.2, so upgrade
to that before working on this.
William
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~----------~----~----~----~------~----~------~--~---