Bill Allombert on Mon, 14 Oct 2002 23:17:12 +0200


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

Re: bug in polredabs?


On Mon, Oct 14, 2002 at 10:32:25AM -0700, Carl R. Witty wrote:
> Version: Debian packages version 2.1.4-1 (x86 linux).
> 
> I'm trying to do exactly the same thing, except with different
> polynomials.  Here's my example:
> 
 
> I was hoping, based on the polcompositum example, that the last line
> would return 0; this would have worked if the second element returned
> by polredabs were 7/6*x instead of 7*x.

You are right this is a bug, and it is fixed in the development release.
This come from the fact that your polynomial is not monic and so
polredabs need to convert it to a monic one (definining the same field)
internaly but forget to fix the output.

> Should this work?  And if not, is there a way to do what I want?


> ? z = polcompositum(x^2-3, 12*x^2-1, 1)[1];

What is it meant for ?
x^2-3 and 12*x^2-1 define the same field (Q(sqrt(3)))

> ? pol = z[1]
> %2 = 12*x^2 - 49
You get a third definition of the same field...

> ? a = z[2]; a^2-3
> %3 = 0
> ? z = polredabs(pol, 1);
> ? pol = z[1]
> %5 = x^2 - 3
You get the definition you had at the start!
> ? a = subst(a.pol, x, z[2])

OK polredabs(,1) is buggy so a is wrong here.

Maybe what you want to do is 
? z = factornf(12*x^2-1,y^2-3)
%1 =
[Mod(1, y^2 - 3)*x + Mod(-1/6*y, y^2 - 3) 1]

[Mod(1, y^2 - 3)*x + Mod(1/6*y, y^2 - 3) 1]
? a=lift(-subst(z[1,1],x,0))
%2 = 1/6*y

Cheers,
Bill