\\ --------------- GP code --------------------------------------- \\ \\ Time-stamp: \\ Description: Compute long Weierstrass equation for genus 1 curve \\ given by a plane curve \\ \\ File: /home/villegas/gp/jac-general.gp \\ \\ Original Author: Fernando Rodriguez-Villegas \\ villegas@math.utexas.edu \\ University of Texas at Austin \\ \\ Created: Tue Jun 7 2005 \\ \\----------------------------------------------------------------- \\ Input: coefficients of a cubic \\ \\ t_0 y^3 + \\ s_1 y^2z + s_0 xy^2 + \\ r_2 yz^2 + r_1 xyz + r_0 x^2y \\ q_3 z^3 + q_2 xz^2 + q_1 x^2z + q_0 x^3 \\ in vector form [t0,s0,s1,r0,r1,r2,q0,q1,q2,q3]. \\ (Warning: this notation is backwards from the older version of this \\ routine.) \\ Output: Long Weierstrass equation for its Jacobian. jac_cubic(v)= { local(q0,q1,q2,q3, r0,r1,r2, s0,s1, t0); t0=v[1]; s0=v[2];s1=v[3]; r0=v[4];r1=v[5];r2=v[6]; q0=v[7];q1=v[8];q2=v[9];q3=v[10]; [r1, -(s0*q2 + s1*q1 + r0*r2), (9*t0*q0 - s0*r0)*q3 + ((-t0*q1 - s1*r0)*q2 + (-s0*r2*q1 - s1*r2*q0)), ((-3*t0*r0 + s0^2)*q1 + (-3*s1*s0*q0 + s1*r0^2))*q3 + (t0*r0*q2^2 + (s1*s0*q1 + ((-3*t0*r2 + s1^2)*q0 + s0*r0*r2))*q2 + (t0*r2*q1^2 + s1*r0*r2*q1 + s0*r2^2*q0)), (-27*t0^2*q0^2 + (9*t0*s0*r0 - s0^3)*q0 - t0*r0^3)*q3^2 + (((9*t0^2*q0 - t0*s0*r0)*q1 + ((-3*t0*s0*r1 + (3*t0*s1*r0 + 2*s1*s0^2))*q0 + (t0*r0^2*r1 - s1*s0*r0^2)))*q2 +(-t0^2*q1^3 + (t0*s0*r1 + (2*t0*s1*r0 - s1*s0^2))*q1^2 + ((3*t0*s0*r2 + (-3*t0*s1*r1 + 2*s1^2*s0))*q0 + ((2*t0*r0^2 - s0^2*r0)*r2 + (-t0*r0*r1^2 + s1*s0*r0*r1 - s1^2*r0^2)))*q1 + ((9*t0*s1*r2 - s1^3)*q0^2 + (((-3*t0*r0 + s0^2)*r1 - s1*s0*r0)*r2 + (t0*r1^3 - s1*s0*r1^2 + s1^2*r0*r1))*q0)))*q3 + (-t0^2*q0*q2^3 + (-t0*s1*r0*q1 + ((2*t0*s0*r2 + (t0*s1*r1 - s1^2*s0))*q0 - t0*r0^2*r2))*q2^2 + (-t0*s0*r2*q1^2 + (-t0*s1*r2*q0 + (t0*r0*r1 - s1*s0*r0)*r2)*q1 + ((2*t0*r0 - s0^2)*r2^2 + (-t0*r1^2 + s1*s0*r1 - s1^2*r0)*r2)*q0)*q2 + (-t0*r0*r2^2*q1^2 + (t0*r1 - s1*s0)*r2^2*q0*q1 - t0*r2^3*q0^2))] } \\ Input: coefficients of an equation \\ t0*y^2+(s0*x^2+s1*x+s2)*y+r0*x^4+r1*x^3+r2*x^2+r3*x+r4=0 \\ in vector form [t0,s0,s1,s2,r0,r1,r2,r3,r4]. \\ Output: Long Weierstrass equation for its Jacobian. jac_quart(v)= { local(t0,s0,s1,s2,r0,r1,r2,r3,r4); t0=v[1];s0=v[2];s1=v[3];s2=v[4]; r0=v[5];r1=v[6];r2=v[7];r3=v[8];r4=v[9]; [s1, -t0*r2-s0*s2, -t0*s2*r1-t0*s0*r3, -(4*t0^2*r4-t0*s2^2)*r0+t0^2*r1*r3+t0*s0*s2*r2+t0*s0^2*r4, -(-(4*t0^3*r4-t0^2*s2^2)*r2+t0^3*r3^2-t0^2*s1*s2*r3+t0^2*s1^2*r4)*r0- t0^3*r1^2*r4-(t0^2*s0*s2*r3-t0^2*s0*s1*r4)*r1-t0^2*s0^2*r2*r4] } \\ Input: coefficients of an equation \\ (t0*x^2+t1*x^+t2)*y^2+(r0*x^2+r1*x^+r2)*y+s0*x^2+s1*x+s2=0 \\ in vector form [t0,t1,t2,r0,r1,r2,s0,s1,s2]. \\ Output: Long Weierstrass equation for its Jacobian. jac_biquadr(v)= { local(t0,t1,t2,s0,s1,s2,r0,r1,r2); t0=v[1];t1=v[2];t2=v[3]; s0=v[4];s1=v[5];s2=v[6]; r0=v[7];r1=v[8];r2=v[9]; [r1, -(s2*t0 + t2*s0 + t1*s1 + r2*r0), -r2*s1*t0 + (-t1*r2*s0 + (-t2*r0*s1 - t1*r0*s2)), ((-4*t2*s2 + r2^2)*s0 + (t2*s1^2 + t1*s2*s1 + r2*r0*s2))*t0 + ((t2*t1*s1 + (t1^2*s2 + t2*r2*r0))*s0 + (t1*r2*r0*s1 + t2*r0^2*s2)), ((4*t2*s2^2 - r2^2*s2)*s0 - t2*s2*s1^2)*t0^2 + ((4*t2^2*s2 - t2*r2^2)*s0^2 + (-t2^2*s1^2 + (t2*r2*r1 - t1*r2^2)*s1 + (-t1^2*s2^2 + (-t2*r1^2 + t1*r2*r1)*s2))*s0 + (-t2*r2*r0*s1^2 + (t2*r1 - t1*r2)*r0*s2*s1 - t2*r0^2*s2^2))*t0 + (-t2*t1^2*s2*s0^2 + (-t2*t1*r2*r0*s1 + (-t2^2*r0^2 + (t2*t1*r1 - t1^2*r2)*r0)*s2)*s0 - t2*t1*r0^2*s2*s1)] }