| Ilya Zakharevich on Fri, 26 Oct 2001 12:45:31 -0400 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
| Re: pari-2.2.1.alpha released |
On Fri, Oct 26, 2001 at 12:34:04PM +0200, Karim BELABAS wrote:
> Of course your solution uses the second model, and is much more general.
> It is also slower.
This is irrelevant as far as it is used only when other solutions do
not work. ;-)
> > Why I cannot lift(...,'t)? ]
>
> Not sure I understand this.
Maybe I do not understand the documentation of lift()...
If I use
{ subst_poly(pol, from, to) =
local(t='subst_poly_t);
subst(lift(Mod(pol,from-t),t),t,to)
}
subst_poly(x^3+1, x^2+1,y)
I get
Mod((y - 1)*x + 1, x^2 + (-y + 1))
instead of (y - 1)*x + 1 which I want. Probably I misunderstand the
intent of the second argument to lift.
I want to hint it to lift that it should get rid of Mod(*,from-t), and
not of "something else". How to do it?
Ilya
P.S. BTW, would the subroutine above work OK if given polynomials
including t?