Édouard Gilbert on Thu, 22 Mar 2007 18:42:07 +0100


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

Re: Newbie question: lifting polynomials coefficient


Hidden in a function, that will perfectly do.

I didn't think about looking at the member function. Sorry about that.

Thank you very much,

Édouard

Le 22 mars 07 à 17:53, Bill Allombert a écrit :

On Thu, Mar 22, 2007 at 04:14:43PM +0100, Édouard Gilbert wrote:
Hi everyone,

Here is a simple problem that can be easliy avoided in a very
unelegant way.
The simple question is : how to lift the t_INTMOD coefficients of a
t_POLMOD?

For example
P = Mod(Mod(1, 2)*X + Mod(1, 2), Mod(1, 2)*X^2 + Mod(1, 2))
% (...)
lift(P)
% Mod(1, 2)*X + Mod(1, 2)

Is there a nicer solution to this?

I am not sure if that qualify as nicer but

liftint(x) = Mod(lift(x.pol),lift(x.mod))

should do what you want.

Cheers,
Bill.