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}} o3 = {(x*y) + z^2, (z^2) + x*y} o3 : MarkedPolynomialList |
i4 : gfanSubstitute(L, R) o4 = {(z*a) + b^2, (b^2) + z*a} o4 : MarkedPolynomialList |
Caution should be used as this method invokes use R which changes the global symbol table. It would be preferrable 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 o6 = {(z*a) + b^2, (b^2) + 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:
The object gfanSubstitute is a method function with options.