--M2 exercises for Seoul school, February 2014 --equation of tangent variety to P1P1P1 --(2*2*2 hyperdeterminant) R=QQ[a_0,a_1,b_0,b_1,c_0,c_1,x_(0,0,0)..x_(1,1,1)] f=sum(2,i->sum(2,j->sum(2,k->a_i*b_j*c_k*x_(i,j,k)))) --think the tensor as a 2*2 matrix with coefficients in c_i k=diff(transpose matrix{{a_0,a_1}},diff(matrix{{b_0,b_1}},f)) --next command intersects with rank one matrices, getting two solutions eq=det(k) --next command gives the condition that the two solutions coincide, --discriminant of quadratic equation hyp=-diff(c_0^2,eq)*diff(c_1^2,eq)+(diff(c_0*c_1,eq))^2 --explicit decomposition of specific tensors, a1=sum(2,i->random(QQ)*a_i),b1=sum(2,i->random(QQ)*b_i),c1=sum(2,i->random(QQ)*c_i) a2=sum(2,i->random(QQ)*a_i),b2=sum(2,i->random(QQ)*b_i),c2=sum(2,i->random(QQ)*c_i) mr=a1*b1*c1+a2*b2*c2 k=diff(transpose matrix{{a_0,a_1}},diff(matrix{{b_0,b_1}},mr)) --next command intersects with rank one matrices, getting two solutions eq=det(k) --killing c1, one gets a2, b2 --killing c2, one gets a1, b1 factor eq --in next commands one has to edit specific values for c_0, c_1 --to get a, b --get a mingens image sub(k,{c_0=>-5,c_1=>14}) --get b mingens image transpose sub(k,{c_0=>-5,c_1=>14}) c1 a2 b2 f=2*a_1*b_1*c_0+2*a_1*b_1*c_1+a_0*b_0*c_0+a_0*b_0*c_1 f=-2*a_1*b_1*c_0-2*a_1*b_1*c_1+a_0*b_0*c_0+a_0*b_0*c_1 f=(2*a_0+2*a_1)*b_0*c_0+a_0*(3*b_0-b_1)*c_0+a_0*b_0*(-c_0+2*c_1)