Loïc Grenié on Wed, 18 Jun 2014 10:14:33 +0200


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

Re: Creating Q(a1,a2,...,an)


2014-06-17 23:59 GMT+02:00 Zickert, Christian <zickert@math.umd.edu>:
> Hello,
>
> Is there a way in Pari to create the number field generated by elements in a
> fixed number field?
>
> More precisely, suppose p in Q[x] is irreducible, and that q_1,...,q_n are
> polynomials in Q[x].
> One can then create the elements a_i=Mod(q_i(x),p) in the number field
> defined by p.

K=nfinit(p);
a_i=-polcoeff(nffactor(K,q_i)[1,1],0)

   This is not safe as it does not check whether q_i effectively factors in
  K. It works if p has a variable of lower order than q_i. In practice it
  usually means p has variable y and the q_i's have variable x. You
  can use subst(p,'x,'y) in case p has variable x.

   To have a number field in which q_1, q_2, q_3 have (at least) a simple
  root, you can use polcompositum:

p=q_1;
p=polcompositum(p,q_2);p=p[#p]
p=polcompositum(p,q_3);p=p[#p]
p=subst(p,'x,'y);

> I would like a command that takes p, and the q_i's as input and outputs a
> polynomial q generating the number field Q(a_1,...,a_n), as well as
> expressions of the a_i's in terms of q.
>
> Surely, someone must have written a command that does that.
>
> If someone could provide a script, or some hints for how to obtain this, I
> would really appreciate it.

    Left as an exercise for the reader.

        Loïc