# projective space -- information about various constructions of projective space

There are several different methods for creating projective $n$-space in Macaulay2.

To generate projective space as a ProjectiveVariety, we use the Proj-construction.

 i1 : X0 = Proj (QQ[x_0..x_3]) o1 = X0 o1 : ProjectiveVariety i2 : assert (3 === dim X0) i3 : ring X0 o3 = QQ[x ..x ] 0 3 o3 : PolynomialRing i4 : hilbertPolynomial(X0, Projective => false) 1 3 2 11 o4 = -i + i + --i + 1 6 6 o4 : QQ[i] i5 : for d to 10 list rank HH^0 (OO_X0(d)) o5 = {1, 4, 10, 20, 35, 56, 84, 120, 165, 220, 286} o5 : List

To work with projective space as a NormalToricVariety, we simply use the method toricProjectiveSpace.

 i6 : X1 = toricProjectiveSpace 3 o6 = X1 o6 : NormalToricVariety i7 : assert (3 === dim X1) i8 : rays X1 o8 = {{-1, -1, -1}, {1, 0, 0}, {0, 1, 0}, {0, 0, 1}} o8 : List i9 : max X1 o9 = {{0, 1, 2}, {0, 1, 3}, {0, 2, 3}, {1, 2, 3}} o9 : List i10 : ring X1 o10 = QQ[x ..x ] 0 3 o10 : PolynomialRing i11 : intersectionRing X1 QQ[][t ..t ] 0 3 o11 = ------------------------------------------- (t t t t , - t + t , - t + t , - t + t ) 0 1 2 3 0 1 0 2 0 3 o11 : QuotientRing i12 : hilbertPolynomial (X1) 1 3 2 11 o12 = -i + i + --i + 1 6 0 0 6 0 o12 : QQ[i ] 0 i13 : for d to 10 list rank HH^0 (X1, OO_X1(d)) o13 = {1, 4, 10, 20, 35, 56, 84, 120, 165, 220, 286} o13 : List i14 : assert (X0 =!= X1)

To manipulate projective space as an AbstractVariety, we employ the method abstractProjectiveSpace.

 i15 : X2 = abstractProjectiveSpace (3, base(symbol i)) o15 = X2 o15 : a flag bundle with subquotient ranks {1, 3} i16 : assert (3 === dim X2) i17 : intersectionRing X2 QQ[i][h, H ..H ] 2,1 2,3 o17 = ------------------------------------------------------- (- h - H , - h*H - H , - h*H - H , -h*H ) 2,1 2,1 2,2 2,2 2,3 2,3 o17 : QuotientRing i18 : chi (OO_X2(i)) 1 3 2 11 o18 = -i + i + --i + 1 6 6 o18 : QQ[i] i19 : assert (X2 =!= X0) i20 : assert (X2 =!= X1)

If you prefer a shorter name for your favourite method of constructing projective space, then make one.

 i21 : projectiveSpace = n -> Proj (QQ[x_0..x_n]); i22 : projectiveSpace 2 o22 = Proj(QQ[x ..x ]) 0 2 o22 : ProjectiveVariety
 i23 : PP = toricProjectiveSpace; i24 : PP 2 o24 = normalToricVariety ({{-1, -1}, {1, 0}, {0, 1}}, {{0, 1}, {0, 2}, {1, 2}}) o24 : NormalToricVariety