Bill Allombert on Fri, 29 Apr 2016 23:50:00 +0200

 Re: Does idealval still work for strictly non-maximal orders?

```On Fri, Apr 29, 2016 at 11:28:19AM +0100, Misja Steinmetz wrote:
> I am using pari to do some calculations in number fields with really large
> discriminants. Factoring the discriminant to compute the full ring of
> integers will take a long time, so I want to avoid doing this. Since I am
> only interested in the local behaviour at some prime p, it is enough to
> consider a p-maximal order. Following on from Kevin Buzzard's e-mail from a
> week or so ago, idealfactor and nfeltreducemodpr should still work in such
> a non-maximal order.
>
> Now I am wondering the following: if we have a prime P in this non-maximal
> order, will idealval still work? In other words: is the following code
> likely to give the right results?
>
>
> pol=x^26 - 286*x^25 + 19562760*x^24 - 3668442632*x^23 +
> 241198757426192*x^22 - 36732491670362880*x^21 + 1822972204898373000704*x^20
> - 199140855761012444911616*x^19 + 10027915325893349472817213440*x^18 -
> 848894964301022470484583645184*x^17 +
> 37809710923281272417452197421121536*x^16 -
> 1723088749094452868137774500646748160*x^15 +
> 105019803939567123916267146674242505932800*x^14 +
> 989241463444182981403365066679298291662848*x^13 +
> 194263960768386482228002420822035690570028941312*x^12 +
> 22400307307868363463037041330336932265361850499072*x^11 +
> 257854885551521928660357192534017687587527194767785984*x^10 +
> 41047693277909696868034300875084342054930124742527549440*x^9 +
> 213905548423351032335397622846029654869291846737653758164992*x^8 +
> 52094281570771031427456529161067965473732709069559894823141376*x^7 +
> 126287628023285196646075411391347640426049629948084525610320265216*x^6 +
> 29664531810238892090450568528300938381137578166911281545611967463424*x^5 +
> 43774041890841831528123864870950822413530619595837207099847467398594560*x^4
> +
> 11204382287862877653546909128845317701429264823352218653278600918707732480*x^3
> +
> 9880850856368516583182318554712322248092512687904098702270573142977439334400*x^2
> +
> 1562488675698787978227863108916161176019042195854338940761327270319526781124608*x
> +
> 259748395620385919840920916962672154875984216348353473312067851326630554180255744;
> \\pol is some poly with big disc
>
> nf=nfinit([pol,[3]]);
>
> ? nfcertify(nf) \\we are using a strictly non-maximal order
> %1 =
> [337380913590845600020514269227313648210194087803015497728961389568789942414585883971529126116434361247804701100155364451891445133863970441321008195359592815369846067231075955295940473510167649962320415849536001133546844616043245921745260717590454142665172325593856347582478783]
>
> P=idealfactor(nf,3)[3,1];
>
> ? idealval(nf,x,P) \\calculating the valuation of the ideal (x) in order
> wrt to prime P
> %2 = 2
>
> I think this code should probably give the right results, but I don't know
> anything about the inner workings of pari so it's best to check.

Your code works, but in general you should do
nf=nfinit([pol,10^6]);
which will make your order maximal at all primes less than 10^6,
because this lets nfinit finds a smallest basis and speed up computation.

Cheers,
Bill.

```