Karim Belabas on Fri, 04 Jan 2008 18:53:05 +0100


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

Re: Relative number fields question


* William Hart [2008-01-04 17:40]:
> I'm using the latest pari/gp development snapshot due to a known bug
> elsewhere in the stable release which kills other code I am using.

I ran my experiments on

          GP/PARI CALCULATOR Version 2.4.3 (development CHANGES-1.1980)
          i686 running linux (ix86 kernel) 32-bit version -- debugging
       compiled: Jan  4 2008, gcc-4.1.1 20060724 (prerelease) (4.1.1-3mdk)
                 (readline v5.1 enabled, extended help enabled)

which should be functionnally equivalent to 2.4.2 which you are using.

> Given a degree three abelian extension L/K of a
> quadratic field K, I am trying to find an ideal QL in
> L above a given prime ideal Q in K.
> 
> I set up my base field K, and the relative extension
> L/K, find an absolute equation for L/Q and define the
> number field "Labs" to be the corresponding absolute
> number field:
> 
> K=nfinit(y^2 + 939636383790*y +
> 226927609420691962278648);
> 
> g=x^3 + Mod(11067, y^2 + 939636383790*y +
> 226927609420691962278648)*x^2 + Mod(23329236, y^2 +
> 939636383790*y + 226927609420691962278648)*x +
> Mod(-1/3*y - 193638491109, y^2 + 939636383790*y +
> 226927609420691962278648);
> 
> L=rnfinit(K,g);
> 
> Leqn=rnfequation(K,g,1)[1];
> 
> Labs=nfinit(Leqn);
> 
> I find the prime ideal factors of a certain principal
> ideal in K and choose one of them, calling it Q. This
> is a prime ideal of K:
> 
> Afac=idealfactor(K,[2,-2]~);
> 
> Q=Afac[1,1];
> 
> Now I want an ideal in L that is above Q, i.e. I want
> to factor Q in L. There are a number of strategies.
> One is to find the norm Qn of Q, which should be a
> power of a prime p, factor p into prime ideals Qn_i in
> Labs then drop each down into K until I find the one
> that is above Q.
> 
> Qn=idealnorm(KQ);

Qn=idealnorm(K, Q);


> Qn=factor(Qn)[1,1];
> 
> Qnfac=idealprimedec(Labs,Qn);
> 
> fac=idealhnf(Labs,Qnfac[1]);
> 
> Qndown=rnfidealdown(L,fac);

\begin{aside}
The main reason why relative computations are so painful in PARI is that one
must keep track explicitly about who belongs where, and data from different
structures / representations are generally incompatible. In marked contrast
with nf* or ideal* routine which are quite permissive with their inputs.
\end{aside}

This won't work, 'fac' is an ideal with respect to the Labs structure, which
a priori has nothing to do with L. We must first translate 'fac' to a Z-basis
(vector) of elements of Labs, in relative representation (with respect to L).

  facrel = rnfidealabstorel(L, Labs.zk * fac)

[ this can be deduced from a look at ?? rnfidealdown, then ?? rnfidealabstorel ]

> But Pari responds:
> 
> *** rnfidealdown: incorrect type in rnfidealabstorel.

In fact, I got

  *** rnfidealdown: incorrect type in rnfidealhermite.

Using facrel instead:

? Qndown = rnfidealdown(L,facrel);
%20 =
[2 1]

[0 1]

a prime ideal above 2.

> My original code attempted to go up from the ideal Q
> into L and then factor that:
> 
> QL=rnfidealup(L,Q);

This is a vector of Z-generators for your ideal (as polynomials).

> But if I now do:
> 
> nfisideal(Labs,QL)
> it returns false.

Indeed, a t_VEC of generators is not recognized as an ideal. (See ??ideal)

 QL = mathnf( Mat( nfalgtobasis(Labs, QL) ) )

transforms it into a matrix whose columns give the same generators in terms of
your fixed integral basis Labs.zk (in HNF form)

Now, nfisideal(Labs, QL) returns true.

> The following code does something (though doubtlessly
> not the right thing):
> 
> QL=mathnf(Mat(nfalgtobasis(Labs,QL)));

Oh, good. So you had already found out about this !

> Ql=idealfactor(Labs,QL)[1,1];
> 
> Qmodpr=nfmodprinit(Labs,Ql);
> 
> nfeltreducemodpr(Labs,Mod(1,Labs.pol),Qmodpr);
> 
> But it responds:
> 
> ***   significant pointers lost in gerepile! (please report).

This is a genuine bug. I'll look into it.

> Can anybody tell me what I am doing wrong!? Is this
> last error a bug, and should I report it?

You should always report unexpected behaviour. We may then either explain why
it is correct (sometimes), or fix it (often).

See

   http://pari.math.u-bordeaux.fr/Bugs/Reporting.html

for how to report bugs.

Hope this helps,

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