--8/16/05 --author: Greg Smith --This code, written by Greg Smith, computes the ideal of the secant variety --of the variety defined by I. --7/05/09 --author: Jessica Sidman --Greg Smith wrote secantIdeal in an old version of M2 which gives error messages now. --This is a slight revision of his code. --input ideal I, output secant ideal of I secantIdeal = I -> ( R := ring I; n := numgens R; S := (coefficientRing R)[y_0..y_(n-1),x_0..x_(n-1), MonomialOrder => Eliminate n]; iota := map(S,R, apply(n, i-> S_i)); delta := map(S,R, apply(n, i -> S_i - S_(i+n))); L:={}; for i from 0 to n-1 do( L = append(L, 0_R); ); f := map(R,S, join(L,flatten entries vars R)); f(ideal selectInSubring(1, gens gb (iota(I) + delta(I)))) )