0

If I have a polynomial $x_1+x_2+x_2x_3+x_2x_4$ and I want to rewrite it as $x_1+x_2+z_{2,3}+z_{2,4}$. Is there a function in MAGMA to substitute $x_2x_3$ as $z_{2,3}$? I know Maple has a subs function to do this but can't find the equivalent in MAGMA. Thanks in advance!

tkw4063
  • 21

1 Answers1

0

In Magma we have to put in the variables in our polynomial ring (since Magma doesn't deal with "unknowns" the way Maple does for example)

K<x1,x2,x3,x3,z23,z24> := PolynomialRing(Rationals(), 6);
f := x1 + x2 + z23 + z24;

then the function we are looking for is

Evaluate(f, [x1,x2,1,1,x2*x3, x2*x4]);

where I've put ones, but it could really be anything in that position ($x_3$ and $x_4$ do not appear in the original expression).