Rob Denomme on Wed, 22 Apr 2009 05:44:32 +0200

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

problem turning simple pari code into script

Hi all,

I have a list of commands that I can evaluate one at a time in the GP calculator, but I cannot get them to work in a script. In the following I have pointed out exactly what fails, but provided some more code that I am unsure will work once this problem is fixed. The script that doesn't function is given below...

 * Example of what doesn't work (not important exactly what it does, but if interested...)
 * computes Norm(1-x^q) from the cyclotomic field Q(x), (x^p=1)
 * to the field fixed by the Sylow-q subgroup of the Galois group
q=3;      /* p, q primes */
h= znprimroot(p)^((p-1)/(q^n));

/* note T=polcyclo(p) works just fine, T is now a polynomial in x */

f(x) = (1-x^q) % T;
/* this is the line that screws up in a script, 
 * but works when input to the gp calculator 

Norman = Mod(1,q^2);
for(i=1,q^n,Norman*=Mod(f(x^( lift(h^i) )),T) );
/* Once the above error is fixed will the above line work like I expect? 
 * i.e. will this think of Norman being in Z[x]/(q^2,T)

/* lift(lift(Norman)) will now print the norm of (1-x^q) 
 * where x is a primitive p-th root of unity

-Rob Denomme
 Graduate Student in Number Theory @ UCLA

p.s. This script is in regards to the proof of Catalan's conjecture put forward by Mihailescu.