Bill Allombert on Thu, 22 Mar 2007 18:09:11 +0100


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

Re: Newbie question: lifting polynomials coefficient


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.