Macaulay2 » Documentation
Packages » gfanInterface :: gfanSubstitute
next | previous | forward | backward | up | index | toc

gfanSubstitute -- rename the variables of a list of polynomials



This method replaces each variable in a marked polynomial list with variables from a different ring.

i1 : R = QQ[z,a,b];
i2 : S = QQ[x,y,z];
i3 : L = markedPolynomialList{{x*y, z^2} , {x*y+ z^2, x*y + z^2}}

               2    2
o3 = {(x*y) + z , (z ) + x*y}

o3 : MarkedPolynomialList
i4 : gfanSubstitute(L, R)

               2    2
o4 = {(z*a) + b , (b ) + z*a}

o4 : MarkedPolynomialList

Caution should be used as this method invokes use R which changes the global symbol table. It would be preferable to use the map command which is built into Macaulay 2. A ring map can be applied directly to a marked polynomial list.

i5 : f = map(R,S, {z,a,b})

o5 = map (R, S, {z, a, b})

o5 : RingMap R <--- S
i6 : f L

               2    2
o6 = {(z*a) + b , (b ) + z*a}

o6 : MarkedPolynomialList

gfan Documentation This program changes the variable names of a polynomial ring. The input is a polynomial ring, a polynomial set in the ring and a new polynomial ring with the same coefficient field but different variable names. The output is the polynomial set written with the variable names of the second polynomial ring.Example:Input:Q[a,b,c,d]{2a-3b,c+d}Q[b,a,c,x]Output:Q[b,a,c,x]{2*b-3*a,c+x}Options:

Ways to use gfanSubstitute :

For the programmer

The object gfanSubstitute is a method function with options.