Bill Allombert on Wed, 21 Jan 2004 15:23:26 +0100

 Re: subst

```On Wed, Jan 21, 2004 at 02:59:48PM +0100, Markus Endres wrote:
> hallo at all,
>
> I have the following situation:
>
> I want to substitute the variable x in a polmod through y like this:
>
> ? subst(Mod(1,z^2+19)*x, x, y)
> %53 = Mod(y, z^2 + 19)
> ?
>
> I expect Mod(1,z^2+19)*y (this I need!) but get something strange (for
> me) like Mod(y, z^2+19).
>
> Now, why do I get this "wrong" result and how do I get the right one?

In a new session:

parisize = 4000000, primelimit = 500000
? x;y;z;
? subst(Mod(1,z^2+19)*x, x, y)
%2 = Mod(1, z^2 + 19)*y

parisize = 4000000, primelimit = 500000
? x;z;y;
? subst(Mod(1,z^2+19)*x, x, y)
%2 = Mod(y, z^2 + 19)

Whether Mod(1,z^2+19) by y give Mod(1,z^2+19)*y or Mod(y,z^2+19)
depend of the relative priority of y and z.

if z << y you work in Q[Z]/(Z^2+19)[Y] and if z >> y you work in
Q(Y)[Z]/(Z^2+19).

Cheers,
Bill.

```

• Follow-Ups:
• Re: subst
• From: Markus Endres <me@mendres.org>
• References:
• subst
• From: Markus Endres <me@mendres.org>