Let S = ring I, and that I is an ideal of codimension c. Let F be the S-free resolution of S/I. Assuming that S is a polynomial ring and S/I is Cohen-Macaulay, the canonical module of S/I is omega = coker transpose F.dd_c. The script returns the ideal J that is the kernel of the first element of Hom(I, omega). In case I is the ideal of a scroll there is a unique element of minimal degree, and it represents a surjection, so S/J is Gorenstein.
The object gorensteinDouble is a method function.