misc‎ > ‎

c5g

// Theorem 10 ... simultaneously solve alpha=0,beta=0 and f_14(A5)=0
// eliminating A3,A4,A5 to leave a single equation in the sides.
  S  := PolynomialAlgebra(Integers(),9);
  P := -2*(c^2+d^2);
  Q := 16*A3^2 + (c^2-d^2)^2;
  Q := 16*(A5-A4)^2 + (c^2-d^2)^2;
  R := -2*(a^2+b^2+e^2);
  S := -8*a*b*e;
  T := 16*A4^2 + (a^4+b^4+e^4-2*a^2*b^2-2*b^2*e^2-2*e^2*a^2);
  alpha := P*(P-R)^2-2*(P-R)*(Q-T)+S^2;
  beta  := T*(P-R)^3-(Q-T)*(R*(P-R)^2-(Q-T)*(P-R)+S^2);

  r1 := Resultant(alpha,beta,A4);
  r1 := r1 div (a^2 + b^2 - c^2 - d^2 + e^2);
  r1 := r1 div 2048;

  u := 16*A5^2;
  a2,b2,c2,d2,e2 := Explode([a^2,b^2,c^2,d^2,e^2]);
  s1 := a2+b2+c2+d2+e2;
  s2 := a2*b2+a2*c2+a2*d2+a2*e2+b2*c2+b2*d2+b2*e2+c2*d2+c2*e2+d2*e2;
  s3 := a2*b2*c2+a2*b2*d2+a2*b2*e2+a2*c2*d2+a2*c2*e2+
        a2*d2*e2+b2*c2*d2+b2*c2*e2+b2*d2*e2+c2*d2*e2;
  s4 := a2*b2*c2*d2+a2*b2*c2*e2+a2*b2*d2*e2+a2*c2*d2*e2+b2*c2*d2*e2;
  s5 := a2*b2*c2*d2*e2;
  t2 := u-4*s2+s1^2;
  t3 := 8*s3+s1*t2;
  t4 := -64*s4+t2^2;
  t5 := 128*s5;
  f  := u*t4^3+t3^2*t4^2-16*t3^3*t5-18*u*t3*t4*t5-27*u^2*t5^2;

  reduce_degree_by_one := function(E1,E2,var)
    d1 := Degree(E1,var);
    d2 := Degree(E2,var);
    e1,e2 := Explode([E1,E2]);
    if (d1 lt d2) then
      e1,e2 := Explode([E2,E1]);
    end if;
    d  := Min(d1,d2);
    D  := Max(d1,d2);
    c1 := Coefficient(e1,var,D);
    c2 := Coefficient(e2,var,d);
    l1 := LCM(c1,c2);
    e3 := (l1 div c2)*e2*var^(D-d) - (l1 div c1)*e1;
    return e3,e2;
  end function;

  e4,e5 := reduce_degree_by_one(f,r1,A5);  // 10,4
  e4,e5 := reduce_degree_by_one(e4,e5,A5); //  8,4
  e4,e5 := reduce_degree_by_one(e4,e5,A5); //  6,4
  e4,e5 := reduce_degree_by_one(e4,e5,A5); //  4,4
  e4,e5 := reduce_degree_by_one(e4,e5,A5); //  2,4
  e4,e5 := reduce_degree_by_one(e4,e5,A5); //  2,2
  g := Gcd(e4,e5);
  e4 := e4 div g;
  e5 := e5 div g;
//[
//    <2, 8>,
//    
//]
  e4,e5 := reduce_degree_by_one(e4,e5,A5); //  2,0
Comments