--Inverse systems
--let's use inverse system to compute the dimension of Veronese varieties
--consider V the veronese surface obtained as embedding of P^2 using fourth powers
Use S::=Q[x,y,z];
--let's pick a point of V, i.e. L^4
L:=x+y+z;
--the tangent space to V in the point L^4 is the degree four part of the ideal
I:=Ideal(L^3);
--compute the inverse system
J:=InverseSystem(I,4);
--compute the ideal of the double point corresponding to L
IP:=IdealOfProjectivePoints([[1,1,1]])^2;
--verify that J is contained in IP in degree 4, hence they coincide as they have the same dimension
Foreach F In J Do F IsIn IP; Endforeach;
--hence to compute the dimension of Sec_4(V) we can pick five generic points P1,..,P5 in P^2
Points:=[[Rand(-10,10),Rand(-10,10),Rand(-10,10)] | I In 1..5];
--then we compute the ideal of the union of the five double points
K:=Intersection(IdealOfProjectivePoints([Points[1]])^2,IdealOfProjectivePoints([Points[2]])^2);
K:=Intersection(K,IdealOfProjectivePoints([Points[3]])^2);
K:=Intersection(K,IdealOfProjectivePoints([Points[4]])^2);
K:=Intersection(K,IdealOfProjectivePoints([Points[5]])^2);
--the Hilbert function in degree 4 gives the VECTOR SPACE DIMENSION
--of the tangent space to the higher secant variety Sec_4(V)
Hilbert(S/K,4);
--Ex 1c use double points to compute the dimension of all the higher secant varieties to Veronese surfaces obtained as d-uple embeddings of P^2, d<=4;
--Ex 2c use double points on P^1 to determine the dimension of higher secant varieties of rational normal curves
--Ex 3c what do triple points in P^1 say about rational normal curves? Try to compute the inverse system in degree 3 for the triple point supported on [1:0] and relate it to the twisted cubic curve