Karim Belabas on Tue, 11 Feb 2014 17:20:35 +0100


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

Re: Component [5] of prime ideal structure


* Jeroen Demeyer [2014-02-11 14:53]:
> On 2014-02-11 14:07, Bill Allombert wrote:
> >Try idealprimedec(nfinit(x^2+1), 5)[1][5][,1]
> 
> This doesn't work for
> 
> gp> idealprimedec(nfinit(x^2+1), 3)[1][5]
> %1 = 1
> 
> One could of course easily wrap this in a (member) function.

Here's a possible implementation that caters for all versions

  pr.b = my(b=pr[5]);if(type(b)=="t_MAT",b[,1],b);

Cheers,

    K.B.
--
Karim Belabas, IMB (UMR 5251)  Tel: (+33) (0)5 40 00 26 17
Universite Bordeaux 1          Fax: (+33) (0)5 40 00 69 50
351, cours de la Liberation    http://www.math.u-bordeaux1.fr/~kbelabas/
F-33405 Talence (France)       http://pari.math.u-bordeaux1.fr/  [PARI/GP]
`