Édouard Gilbert on Thu, 22 Mar 2007 16:22:57 +0100
|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
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
- Dkim-signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:mime-version:content-transfer-encoding:message-id:content-type:to:from:subject:date:x-mailer:sender; b=V0z8kiVidmd3fXyvgn8HX2GpjD67GN6ITcAVETuhYMWKSl2cj76zxGOD+rfBdKXsLmPY3EXS3rjkODiLEPSLJ4t2WYfKPRwcmFdc9sHFLgdKCSYV2V00rhR5t7MArZncu2owzVjWhV8LV2soVVPL2dLuVBQAdyI44gglsRLX5U8=
- 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?
Thanks for your help,
Édouard