-- M2-Script used to compute the fundamental syzygy between
-- the invariants of the binary cubic.
-- author: Holger Cröni <croeni@epost.de>
-- October 2001


  R = QQ [a..d,x];
  F = a*x^3;
  H = (a*c - b^2)*x^2;
  J = (a^2 *d - 3*a*b*c + 2* b^3)*x^3;
  D =  a^2* d^2  -6*a*b*c*d +4*a*c^3 +4*b^3*d - 3*b^2 * c^2;

  -- The syzygy is  F^2 *D - J^2 -4*H^3
  i = ideal (F,H,J,D);
  S = QQ [u,v,w,z,Degrees => {{4},{4},{6},{4}}];
  phi = map (R, S, {F, H, J, D});
  timing j = kernel phi