I'm trying to take a rational map on P^1 (i.e. f(x,y) = [deg 2 poly,
deg 2 poly] and conjugate, but I can't seem to get sage to cooperate.

I would like to take a generic degree 2 map on P^1, and conjugate by
an element of PGL_2.  For example, I can do

R.<X,Y> = PolynomialRing(QQ,2)
def f(A,B):
       return A[0]*B[0]^2 + A[1]*B[1]^2 + A[2]*B[0]*B[1],A[3]*B[0]^2 +
A[4]*B[1]^2 + A[5]*B[0]*B[1]

x1,x2,x3,y1,y2,y3=var('x1,x2,x3,y1,y2,y3')
Avar=[x1,x2,x3,y1,y2,y3]

M= matrix([[0, -1],[1, -1]])
Z=f(Avar,M*vector([R.0,R.1]))
ZZ=M.inverse()*vector(Z)

Where ZZ is now a 2-tuple where I have conjugated f by M.  Now, I
would like to extract the coefficients of the monomials (X^2,XY,Y^2)
from each entry of ZZ, but I can't seem to get that done using
the .coefficients() functions.  I think I'm not doing a good job with
difference between symbolic expressions, functions, and polynomials.


In pari/gp, I can do the following to get what I want:
M=[0, -1; 1, -1];
X=M*[x;y];
A=[x1,x2,x3,y1,y2,y3];
Z=f(A,[X[1,1],X[2,1]]);
Y=1/M*[Z[1];Z[2]];
R1=polcoeff(Y[1,1],2,x);
R2=polcoeff(Y[1,1],2,y);
R3=polcoeff(polcoeff(Y[1,1],1,x),1,y);
R4=polcoeff(Y[2,1],2,x);
R5=polcoeff(Y[2,1],2,y);
R6=polcoeff(polcoeff(Y[2,1],1,x),1,y);
{
T=[polcoeff(R1,1,x1),polcoeff(R1,1,x2),polcoeff(R1,1,x3),polcoeff(R1,1,y1),polcoeff(R1,1,y2),polcoeff(R1,1,y3);
polcoeff(R2,1,x1),polcoeff(R2,1,x2),polcoeff(R2,1,x3),polcoeff(R2,1,y1),polcoeff(R2,1,y2),polcoeff(R2,1,y3);
polcoeff(R3,1,x1),polcoeff(R3,1,x2),polcoeff(R3,1,x3),polcoeff(R3,1,y1),polcoeff(R3,1,y2),polcoeff(R3,1,y3);
polcoeff(R4,1,x1),polcoeff(R4,1,x2),polcoeff(R4,1,x3),polcoeff(R4,1,y1),polcoeff(R4,1,y2),polcoeff(R4,1,y3);
polcoeff(R5,1,x1),polcoeff(R5,1,x2),polcoeff(R5,1,x3),polcoeff(R5,1,y1),polcoeff(R5,1,y2),polcoeff(R5,1,y3);
polcoeff(R6,1,x1),polcoeff(R6,1,x2),polcoeff(R6,1,x3),polcoeff(R6,1,y1),polcoeff(R6,1,y2),polcoeff(R6,1,y3)
];
}


Some help as to the correct way to do this in sage would be
appreciated.

Thanks,
  Ben

-- 
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to