Édouard Gilbert on Thu, 22 Mar 2007 16:22:57 +0100

 Newbie question: lifting polynomials coefficient

• To: pari-users@list.cr.yp.to
• Subject: Newbie question: lifting polynomials coefficient
• From: Édouard Gilbert <edouard.gilbert@eleves.bretagne.ens-cachan.fr>
• Date: Thu, 22 Mar 2007 16:14:43 +0100
• Delivery-date: Thu, 22 Mar 2007 16:22:57 +0100
• Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:mime-version:content-transfer-encoding:message-id:content-type:to:from:subject:date:x-mailer:sender; b=GGG06Hu3DIVQjmcvfdiLSR9CY55lzpp3ns6IOK+ep7dwTjzhILE1Vkdlshy+V6a9l5kNWIB7+7SojkgjzDyEQKJEvBufVWF0GurPkdhOTcEj71jb5J3OZxZJKvW4kzRlOKxcZhnwqhBg1jfxWh9sq82CpazaWVlP+fv5aVd1fo0=
• Mailing-list: contact pari-users-help@list.cr.yp.to; run by ezmlm
• Sender: Édouard Gilbert <edouard.gilbert@gmail.com>

```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)

Of course, a workaround is

> lift(P, Y)
% Mod(X + 1, X^2 + 1)

```
which gives the expected results. But what if I want to lift such a polynomial in a function?
```I''ve written the following:

> foo(poly, var = very_unlikly_variable) =
{
lift(poly, var)
}
```
That way, the user can the variable he wants by switching the second argument i necessary, but this solution is very unelegant and there is the risk of seeing a var = very_unlikely_variable to appear in every function.
```
Is there a nicer solution to this?