0

This is a follow-up question to this question (calling on @Jan-Magnus Okland for help). Plugging the following into Macaulay2:

R = QQ[a,b,c,d,e,f]
S = R[l]
T = S[p,q,r,X,Y,Z,MonomialOrder=>Lex]
I=ideal(X-l*(2*a*p+b*q+d*r),Y-l*(b*p+2*q*c+e*r),Z-l*(d*p+e*q+2*f*r),X*p+Y*q+Z*r)

and then

J = groebnerBasis I

Edit: I made a mistake initially that yielded a 1 x 17 Groebner basis. I have corrected this and the correct 1 x 23 basis is shown below.

I get the following output:

o5 = | (e2-4cf)X2+(-2de+4bf)XY+(4cd-2be)XZ+(d2-4af)Y2+(-2bd+4ae)YZ+(b2-4ac)Z2
     --------------------------------------------------------------------------
     (2cd2-2bde+2ae2+2b2f-8acf)lr+(-2cd+be)X+(bd-2ae)Y+(-b2+4ac)Z
     --------------------------------------------------------------------------
     (e2-4cf)lrX+(-de+2bf)lrY+(2cd-be)lrZ-eXY+2cXZ+dY2-bYZ
     --------------------------------------------------------------------------
     (de-2bf)lrX+(-d2+4af)lrY+(bd-2ae)lrZ-eX2+dXY+bXZ-2aYZ
     --------------------------------------------------------------------------
     (2cd-be)lrX+(-bd+2ae)lrY+(b2-4ac)lrZ-2cX2+2bXY-2aY2
     --------------------------------------------------------------------------
     (2cd-be)lq+(de-2bf)lr-dY+bZ (bd-2ae)lq+(d2-4af)lr-dX+2aZ
     --------------------------------------------------------------------------
     (b2-4ac)lq+(bd-2ae)lr-bX+2aY
     --------------------------------------------------------------------------
     (2cd2-2bde+2ae2)qY2+(2b2e-8ace)qYZ+(-2b2c+8ac2)qZ2+(de2-4cdf)rXY+(-be2+
     --------------------------------------------------------------------------
     4bcf)rXZ+(-d2e+4aef)rY2+(4cd2-2ae2-8acf)rYZ+(-4bcd+b2e+4ace)rZ2
     --------------------------------------------------------------------------
     (2cd-be)qX+(-bd+2ae)qY+(b2-4ac)qZ+(de-2bf)rX+(-d2+4af)rY+(bd-2ae)rZ
     --------------------------------------------------------------------------
     elqX-dlqY+2flrX-dlrZ-XZ 2clqX-blqY+elrX-blrZ-XY blqX-2alqY+dlrX-2alrZ-X2
     --------------------------------------------------------------------------
     eqXY-2cqXZ-dqY2+bqYZ+2frXY-erXZ-drYZ+brZ2
     --------------------------------------------------------------------------
     eqX2-dqXY-bqXZ+2aqYZ+2frX2-2drXZ+2arZ2
     --------------------------------------------------------------------------
     2cqX2-2bqXY+2aqY2+erX2-drXY-brXZ+2arYZ dlp+elq+2flr-Z blp+2clq+elr-Y
     --------------------------------------------------------------------------
     2alp+blq+dlr-X 2apZ-eqX+dqY+bqZ-2frX+2drZ dpY-bpZ+eqY-2cqZ+2frY-erZ
     --------------------------------------------------------------------------
     2apY-2cqX+2bqY-erX+drY+brZ pX+qY+rZ |
         1       23

o5 : Matrix T <--- T

I am trying to calculate the dual curve, but $\lambda$ (i.e. l in the Macaulay2 equations above) still appears in the basis. I know from my question that the final result should be

$$ (-\frac14e^2+cf)x^2+(\frac12de-bf)xy+(-\frac14d^2+af)y^2+(-cd+\frac12be)x+(\frac12bd-ae)y-\frac14b^2+ac=0. $$

My question has 2 parts:

  1. How do I go from the Groebner basis to the final answer? Does this equivalent system of equations need to be solved? (i.e. if the original system was $F = 0$, do I need to solve $G = 0$ and how would I do so?)

  2. Once I have my 2 dual curves (from their respective Groebner bases), how do I solve the two simultaneously? Can I do it in Macaulay2, or do I have to do it in another tool?

1 Answers1

1

I don't see what goes wrong with the above, what version of M2 did you use?

I get with the same commands (and toString oo)

matrix {{(e^2-4*c*f)*X^2+(-2*d*e+4*b*f)*X*Y+(4*c*d-2*b*e)*X*Z+(d^2-4*a*f)*Y^2+(-2*b*d+4*a*e)*Y*Z+(b^2-4*a*c)*Z^2,
(2*c*d^2-2*b*d*e+2*a*e^2+2*b^2*f-8*a*c*f)*l*r+(-2*c*d+b*e)*X+(b*d-2*a*e)*Y+(-b^2+4*a*c)*Z,
(e^2-4*c*f)*l*r*X+(-d*e+2*b*f)*l*r*Y+(2*c*d-b*e)*l*r*Z-e*X*Y+2*c*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l*p+2*c*l*q+e*l*r-Y,
2*a*l*p+b*l*q+d*l*r-X,
2*a*p*Z-e*q*X+d*q*Y+b*q*Z-2*f*r*X+2*d*r*Z,
d*p*Y-b*p*Z+e*q*Y-2*c*q*Z+2*f*r*Y-e*r*Z,
2*a*p*Y-2*c*q*X+2*b*q*Y-e*r*X+d*r*Y+b*r*Z,
p*X+q*Y+r*Z}} 

Here you see that $p,q,r$ (and $\lambda$) are eliminated from the first element which is what you want up to a scalar.

When you have two duals (I show what I did for the original problem) you can get the groebner basis for the ideal of the intersection:

R=QQ[h,k,a,b]
S=R[x,y,MonomialOrder=>Lex]
I=ideal(k^2*y^2-b^2*y^2+2*h*k*x*y+2*k*y+h^2*x^2-a^2*x^2+2*h*x+1,(-b^2*y^2)-a^2*x^2+1)
gens gb I -- matrix {{(k^4*a^4+2*h^2*k^2*a^2*b^2+h^4*b^4)*y^4+(4*k^3*a^4+4*h^2*k*a^2*b^2)*y^3+(-2*h^2*k^2*a^2+4*k^2*a^4-2*h^4*b^2+4*h^2*a^2*b^2)*y^2-4*h^2*k*a^2*y+h^4-4*h^2*a^2,
 (2*h^3*k^2*a^2-2*h*k^2*a^4-2*h^3*a^2*b^2)*x+(-k^5*a^4-2*h^2*k^3*a^2*b^2-h^4*k*b^4)*y^3+(-3*k^4*a^4-2*h^2*k^2*a^2*b^2+h^4*b^4)*y^2+(3*h^2*k^3*a^2-2*k^3*a^4+h^4*k*b^2-2*h^2*k*a^2*b^2)*y+3*h^2*k^2*a^2-h^4*b^2,
 2*h*k*a^2*x*y+2*h*a^2*x+(k^2*a^2-h^2*b^2)*y^2+2*k*a^2*y+h^2, 2*h^3*a^2*b^2*x*y+(2*h^3*k*a^2-2*h*k*a^4)*x+(-k^4*a^4-2*h^2*k^2*a^2*b^2-h^4*b^4)*y^3+(-3*k^3*a^4-h^2*k*a^2*b^2)*y^2+(3*h^2*k^2*a^2-2*k^2*a^4+h^4*b^2)*y+3*h^2*k*a^2,
 (k^2*a^2-h^2*b^2)*x*y^2+2*k*a^2*x*y+h^2*x-2*h*k*b^2*y^3-2*h*b^2*y^2+2*h*k*y+2*h, 2*h^3*b^2*x*y^2+(-2*h^3+2*h*a^2)*x+(k^3*a^2+3*h^2*k*b^2)*y^3+(3*k^2*a^2+3*h^2*b^2)*y^2+(-3*h^2*k+2*k*a^2)*y-3*h^2, a^2*x^2+b^2*y^2-1,
 h^2*x^2+2*h*k*x*y+2*h*x+k^2*y^2+2*k*y}}

But then I switch to maxima CAS to get the intersection points:

solve([(k^4*a^4+2*h^2*k^2*a^2*b^2+h^4*b^4)*y^4+(4*k^3*a^4+4*h^2*k*a^2*b^2)*y^3+(-2*h^2*k^2*a^2+4*k^2*a^4-2*h^4*b^2+4*h^2*a^2*b^2)*y^2-4*h^2*k*a^2*y+h^4-4*h^2*a^2,(2*h^3*k^2*a^2-2*h*k^2*a^4-2*h^3*a^2*b^2)*x+(-k^5*a^4-2*h^2*k^3*a^2*b^2-h^4*k*b^4)*y^3+(-3*k^4*a^4-2*h^2*k^2*a^2*b^2+h^4*b^4)*y^2+(3*h^2*k^3*a^2-2*k^3*a^4+h^4*k*b^2-2*h^2*k*a^2*b^2)*y+3*h^2*k^2*a^2-h^4*b^2],[x,y]);
  • I am using version 1.17 on Ubuntu 18.04 LTS. So strange...restarting and re-entering the same commands I get a 1x23 matrix instead of a 1x17.

    Couple questions:

    1. Is -- a comment in M2?

    2. Part of my confusion was I was looking at the whole GB and not just the first term. Is the first term the "leading term" of the GB? Why do we only look at that term (I'm still learning GB's).

    3. How do I read the output of groebnerBasis? Where does one term end and the next begin? Some are separated by spaces, but I don't know if multiplication is continued across certain lines.

    – adam.hendry Mar 19 '21 at 15:19
  • @A.Hendry: -- is a comment, yes. – Jan-Magnus Økland Mar 19 '21 at 15:26
  • @A.Hendry: The reason why we look at the first polynomial is that it is free of the variables $p,q,r.$ You can also get this effect with an elimination order T = S[p,q,r,X,Y,Z,MonomialOrder=>Eliminate 3]. The lexicographic order is expensive to compute GB in but gives the most information when computed. – Jan-Magnus Økland Mar 19 '21 at 15:28
  • @A.Hendry: If you use toString oo the polynomials are separated by commas. (More about monomial orders from M2 help). – Jan-Magnus Økland Mar 19 '21 at 15:46
  • Thank you! I understand 1 and 3 now. For 2 though, didn't we want to eliminate lambda? (Not p,q,r)...I think I need to study solving systems of polynomial equations with Groebner bases in greater detail. Do you have any texts/videos/resources you recommend? – adam.hendry Mar 19 '21 at 17:12
  • @A.Hendry: Cox Little and O'Shea: Ideals varieties and algorithms. – Jan-Magnus Økland Mar 19 '21 at 19:12
  • Purchased! Thank you! – adam.hendry Mar 19 '21 at 19:36