--Secant varieties of Veronese varieties
--they can be used to answer the question: how many d-th powers of linear forms are needed to write the GENERIC degree d form?
--for example let's consider degree 4 forms in three variables
Use S::=QQ[x,y,z];
--we expect Sec_4(V) to fill up all the space P^14 parameterizing degree 4 forms in three variable
--and hence we expect the generic degree 4 form in three variables to be the sum of 5 fourth powers of linear forms
--to check this we compute dim Sec_4(V) using tangent spaces
--the tangent space to V in its poin L^4 is ML^3 where M varies among all the linear forms
--to apply Terracini's Lemma to compute dim Sec_4(V) we need five generic points of V
L1:=Randomized(x+y+z);
L2:=Randomized(x+y+z);
L3:=Randomized(x+y+z);
L4:=Randomized(x+y+z);
L5:=Randomized(x+y+z);
--the tangent space to V in the point Li^4 is the degree 4 part of the ideal
T1:=Ideal(L1^3);
T2:=Ideal(L2^3);
T3:=Ideal(L3^3);
T4:=Ideal(L4^3);
T5:=Ideal(L5^3);
--the Hilbert function of the sum of the ideals gives the codimension of the span of the tangent spaces in P^14
Hilbert(S/(T1+T2+T3+T4+T5),4);
--is this what we expected?
-- Es 1b how many third powers are needed to write the generic cubic form in four variables as a sum of cubes?
-- Ex 2b how many linear forms Li are needed to write the *generic* cubic in two variables as a sum of cubes (Li)^3? What happens if we want to write *any* cubic form as a sum of cubes?
-- Es 3b use Terracini's lemma to show that the higher secant varieties of the rational normal curves of P^3 and P^4 have the expected dimension. What about rational normal curves in P^n for n>4?