{* The example works as follows. We want to determine if the generators of H*_G map to a regular sequence in H*_S, but it is easier to do this in the ring H*_{T^5}. To determine the deficiency (which is 0 if the space is formal) it is enough to pick an element, here named Q, in the image of H^2_{T/S}, so that H*_T/(Q) = H*_S, and determine whether this Q and the generators of H*_G, viewed as Weyl-invariant elements of H*_T, generate a regular sequence. The ring H*_S // H*_G is gotten by modding out from H*_T the ideal generated by Q and a set of algebra generators of H*_G . *} {* In turn, to determine Q, write H_1 S --> H_1 T in coordinates, and transpose to get H^2_T --> H^2_S. Then Q is an element of the kernel. *} {* Install Macaulay2 and type "M2" without quotation marks in the command line *} loadPackage "Depth"; A = QQ[w,x,y,z,q]; c1 = x + y + z + w; c2 = x*y + x*z + y*z + x*w + y*w + z*w; c3 = x*y*z + x*y*w + x*z*w + y*z*w; c4 = x*y*z*w; d1 = c1 + q; d2 = c2 + q*c1; d3 = c3 + q*c2; d4 = c4 + q*c3; d5 = q*c4; Q = 3*x + 4*y + 6*z - 12*w; L0 = {Q}; L1 = append(L0,d1); L2 = append(L1,d2); L3 = append(L2,d3); L4 = append(L3,d4); L5 = append(L4,d5); I0 = ideal(L0); I1 = ideal(L1); I2 = ideal(L2); I3 = ideal(L3); I4 = ideal(L4); I5 = ideal(L5); B = A/I5; I0 == I1 or I1 == I2 or I2 == I3 or I3 == I4 or I4 == I5 isRegularSequence(L5) basis B