Macaulay2, version 1.14 --loading configuration for package "FourTiTwo" from file /home/midipasq/.Macaulay2/init-FourTiTwo.m2 --loading configuration for package "Topcom" from file /home/midipasq/.Macaulay2/init-Topcom.m2 with packages: ConwayPolynomials, Elimination, IntegralClosure, InverseSystems, LLLBases, PrimaryDecomposition, ReesAlgebra, TangentCone, Truncations i1 : --In this file we explore the twisted cubic, which is the image of the --map from R^1 to R^3 defined by the parametric equations --x=t,y=t^2,z=t^3 --Remark: every line that starts with "--" is considered a comment by Macaulay2 --and is not evaluated. If you are trying to reproduce this code, only enter --lines which do not start with "--". --First, define the coordinate ring of affine three space (we'll work --over the rational numbers since Macaulay2 doesn't work well yet --over the real or complex numbers) R=QQ[x,y,z] o1 = R o1 : PolynomialRing i2 : --Next, define the coordinate ring of affine one dimensional space T=QQ[t] o2 = T o2 : PolynomialRing i3 : --The parametrization x=t,y=t^2,z=t^3 is realized by the map of coordinate rings --phi from S to T defined by phi(x)=t, phi(y)=t^2, and phi(z)=t^3. --We define this map as follows. phi=map(T,R,{t,t^2,t^3}) 2 3 o3 = map(T,R,{t, t , t }) o3 : RingMap T <--- R i4 : --The image of the parametrization is an affine variety in three-dimensional space. --This means that there are equations that define the image of this map. --The following command computes the kernel of the ring homorphism phi; this is an --ideal whose generators cut out the image of the parametrization. I=ker phi 2 2 o4 = ideal (y - x*z, x*y - z, x - y) o4 : Ideal of R i5 : --Take a moment to check that if you set x=t, y=t^2, and z=t^3, the polynomials --generating the ideal will all vanish! --Intuitively, the twisted cubic is a curve, so it should have dimension one. --We can recover this with the 'dim' command. dim I o5 = 1 i6 : --Now we explore the tangent variety of the twisted cubic. This is a surface in --affine three-space defined by the parametrization x=t+s, y=t^2+2*t*s, z=t^3+3*t^2*s. --First, define the coordinate ring of affine two-space, which is the 'parameter space.' S=QQ[s,t] o6 = S o6 : PolynomialRing i7 : --Next, define the map and compute its kernel to get the equation defining the tangent surface. psi=map(S,R,{t+s,t^2+2*t*s,t^3+3*t^2*s}) 2 2 3 o7 = map(S,R,{s + t, 2s*t + t , 3s*t + t }) o7 : RingMap S <--- R i8 : J=ker psi 2 2 3 3 2 o8 = ideal(3x y - 4x z - 4y + 6x*y*z - z ) o8 : Ideal of R i9 : --Notice that J is principal; the unique generator is exactly the equation defining the tangent surface! --As a reality check, find the dimension of J (it should be 2): dim J o9 = 2 i10 : --We have not learned yet how to compute the kernel of a map between rings. --Computing kernels of maps like this uses 'elimination theory,' which we will --encounter in chapter 3.