ADAM David on Sun, 15 Nov 2009 01:48:51 +0100

 Difference between libpari and gp for idealprimedec

```Hi,

I consider the field Q(a) where a is a root of x^+x+1.
I try to find the composition of 11 in the ring of integers de Q(a).

With gp, I obtain two prime ideals above 11:
? field=nfinit(x^3+x+1)
```
%1 = [x^3 + x + 1, [1, 1], -31, 1, [[1, 1.465571231876768026656731225, -0.6823278038280193273694837397; 1, -0.2327856159383840133283656126 + 0.7925519925154478483258983007*I, 0.3411639019140096636847418699 + 1.161541399997251936087917687*I], [1, 1.465571231876768026656731225, -0.6823278038280193273694837397; 1, 0.5597663765770638349975326880, 1.502705301911261599772659557; 1, -1.025337608453831861654263913, -0.8203774980832422724031758174], 0, [3, 1, 0; 1, 1, -3; 0, -3, -2], [31, 20, 17; 0, 1, 0; 0, 0, 1], [11, -2, 3; -2, 6, -9; 3, -9, -2], [31, [14, -1, 10; -11, 3, 1; 1, 11, 14]]], [-0.6823278038280193273694837397, 0.3411639019140096636847418699 + 1.161541399997251936087917687*I], [1, x^2 + 1, x], [1, 0, -1; 0, 0, 1; 0, 1, 0], [1, 0, 0, 0, 0, -1, 0, -1, -1; 0, 1, 0, 1, 1, 0, 0, 0, 1; 0, 0, 1, 0, -1, 0, 1, 0, 0]]
```? idealprimedec(field, 11)
```
%2 = [[11, [-2, 0, 1]~, 1, 1, [4, 1, 2]~], [11, [4, 1, 2]~, 1, 2, [-2, 0, 1]~]]
```?

With libpari, I obtain only one prime ideal above 11:
ideal = [[11, [11, 0]~, 1, 2, [1, 0]~]]

I used the following code made by myself.
#include <pari/pari.h>

int main()
{
GEN a, pol, field;

pari_init(500000, 500000);
pol = mkpoln(3, stoi(1), stoi(0), stoi(1), stoi(1));
field = nfinit0(pol, 0, DEFAULTPREC);

a = primedec(field, stoi(11));
pariprintf("ideal = %Z\n",a);

return 0;
}

Can anyone explain the difference?