Dirk Laurie on Sat, 15 Jul 2017 14:42:24 +0200


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: Laurent polynomials instead of fractions


Ah. Thanks!

2017-07-15 14:28 GMT+02:00 Karim Belabas <Karim.Belabas@math.u-bordeaux.fr>:
> * Dirk Laurie [2017-07-15 13:55]:
>> 2017-07-15 9:12 GMT+02:00 Karim Belabas <Karim.Belabas@math.u-bordeaux.fr>:
>>
>> > ? [v = valuation(f,xi), Vec(f) / xi^v]
>> > %4 = [-2, [xi^3 - 2*xi^2 + xi, -2*xi^4 + 8*xi^3 - 12*xi^2 + 8*xi - 2]]
>> >
>> > (I'm displaying both the valuation and the renormalized coeffs here). With
>> > this technique, there is no real need to convert to a vector, you can stick
>> > to the power series
>> >
>> > ? f / xi^v
>> > %5 = (xi^3 - 2*xi^2 + xi) + (-2*xi^4 + 8*xi^3 - 12*xi^2 + 8*xi - 2)*q + O(q^2)
>>
>> I didn't know 'valuation', was it been in Pari-GP in about 2005 when I
>> learnt it?
>
> Sure.
>
>> The help is no more informative than the name:
>>
>> ?valuation
>> valuation(x,p): valuation of x with respect to p.
>
> The *short* help (which, by design, is as terse as possible).
>
> The *long* help is probably what you're looking for:
>
> (14:25) gp > ??valuation
> valuation(x,p):
>
>    Computes the highest exponent of p dividing x.   If p is of type integer,  x
> must be an integer,  an intmod whose modulus is divisible by p,  a fraction,  a
> q-adic  number  with  q = p,  or a polynomial or power series in which case the
> valuation is the minimum of the valuation of the coefficients.
>
>    If  p  is  of  type  polynomial,   x  must be of type polynomial or rational
> function, and also a power series if x is a monomial. Finally, the valuation of
> a vector, complex or quadratic number is the minimum of the component
> valuations.
>
>    If  x  =  0,   the result is +oo if x is an exact object.   If x is a p-adic
> numbers or power series, the result is the exponent of the zero. Any other type
> combinations gives an error.
>
>
>
> Cheers,
>
>     K.B.
> --
> Karim Belabas, IMB (UMR 5251)  Tel: (+33) (0)5 40 00 26 17
> Universite de Bordeaux         Fax: (+33) (0)5 40 00 21 23
> 351, cours de la Liberation    http://www.math.u-bordeaux.fr/~kbelabas/
> F-33405 Talence (France)       http://pari.math.u-bordeaux.fr/  [PARI/GP]
> `