Karim Belabas on Fri, 07 Apr 2017 23:49:29 +0200

 Re: Annoying typing problem

• Subject: Re: Annoying typing problem
• From: Karim Belabas <Karim.Belabas@math.u-bordeaux.fr>
• Date: Fri, 7 Apr 2017 23:49:19 +0200
• Cc: pari-users@pari.math.u-bordeaux.fr
• Delivery-date: Fri, 07 Apr 2017 23:49:29 +0200
• Dkim-signature: v=1; a=rsa-sha256; c=simple/simple; d=math.u-bordeaux.fr; s=mail; t=1491601761; bh=xb5APr3nd5zHOADqC8Te5THs1g9RAuX1Ir5Rvlctj94=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=UhmucxhHxV5gUk7+wYZ1rQWsay6+N4qBfmCzsIdhTNxSdvi0CQFjtn5GZGV5CkvrG WXKqfxXP1ja8p5rulLRy+VzydqNFB4ro6zr1XWfaM7pRtG6Go9L6j0UUimOS6jdBKk /J1codC5pxCAeYFuYKIBKiW5y2lIBd2Bv3m1pkyM=
• References: <CACsn0ck6rYC2_YpeWP7-KTWeS1hvozaiWF=3WPv0x6zj_xAQ5A@mail.gmail.com>
• User-agent: Mutt/1.6.0 (2016-04-01)

```* Watson Ladd [2017-04-07 23:34]:
> Dear all,
>
> I want to convert the output of rnfdisc(K, pol)[2] into an element of K.

What do you call "convert into an element of K", it already is an
element of K (various forms are possible, as you mention)

> If it was always a vector, this would be easy, the same as if it
> was always a polmod or integer. But sadly it is sometimes one and
> sometimes the other. I have searched the manual and found nothing that
> works.

Wild guess: would

nfbasistoalg(K, rnfdisc(K, pol)[2])

> This would be an easy function to write if I could tell what
> type rnfdisc(K, pol)[2] has, but there is no function for that either.

Maybe type() ?

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]
`

```