Equivalently, one can give as input the coordinate ring of the projective variety, that is, the quotient of $R$ by (the multisaturation of) $I$.
In the example, we take a complete intersection $X\subset\mathbb{P}^{2}\times\mathbb{P}^{3}\times\mathbb{P}^{1}$ of two hypersurfaces of multidegrees $(2,1,0)$ and $(1,0,1)$.
i1 : K = ZZ/333331; |
i2 : R = K[x_0..x_2,y_0..y_3,z_0,z_1,Degrees=>{3:{1,0,0},4:{0,1,0},2:{0,0,1}}]; |
i3 : I = ideal(random({2,1,0},R),random({1,0,1},R)) 2 2 2 2 2 o3 = ideal (- 34043x y + 74106x x y + 52821x y - 47435x x y + 123091x x y - 66080x y + 91969x y - 54528x x y + 106535x y 0 0 0 1 0 1 0 0 2 0 1 2 0 2 0 0 1 0 1 1 1 1 ---------------------------------------------------------------------------------------------------------------------------- 2 2 2 2 - 35766x x y + 120182x x y + 159079x y + 69319x y - 62743x x y + 136098x y - 66116x x y - 96699x x y + 9398x y + 0 2 1 1 2 1 2 1 0 2 0 1 2 1 2 0 2 2 1 2 2 2 2 ---------------------------------------------------------------------------------------------------------------------------- 2 2 2 92232x y + 54291x x y + 155574x y + 45133x x y - 77273x x y - 25242x y , 86018x z - 125857x z + 130921x z - 0 3 0 1 3 1 3 0 2 3 1 2 3 2 3 0 0 1 0 2 0 ---------------------------------------------------------------------------------------------------------------------------- 106029x z + 5398x z - 35792x z ) 0 1 1 1 2 1 o3 : Ideal of R |
i4 : X = projectiveVariety I o4 = X o4 : ProjectiveVariety, 4-dimensional subvariety of PP^2 x PP^3 x PP^1 |
i5 : describe X o5 = ambient:.............. PP^2 x PP^3 x PP^1 dim:.................. 4 codim:................ 2 degree:............... 34 multidegree:.......... 2*T_0^2+T_0*T_1+2*T_0*T_2+T_1*T_2 generators:........... (1,0,1)^1 (2,1,0)^1 purity:............... true dim sing. l.:......... -1 Segre embedding:...... map to PP^19 ⊂ PP^23 |
Below, we calculate the image of $X$ via the Segre embedding of $\mathbb{P}^{2}\times\mathbb{P}^{3}\times\mathbb{P}^{1}$ in $\mathbb{P}^{23}$; thus we get a projective variety isomorphic to $X$ and embedded in a single projective space $\mathbb{P}^{19}=<X>\subset\mathbb{P}^{23}$.
i6 : s = segre X; o6 : MultihomogeneousRationalMap (rational map from 4-dimensional subvariety of PP^2 x PP^3 x PP^1 to PP^19) |
i7 : X' = projectiveVariety image s o7 = X' o7 : ProjectiveVariety, 4-dimensional subvariety of PP^19 |
i8 : (dim X', codim X', degree X') o8 = (4, 15, 34) o8 : Sequence |
i9 : degrees X' o9 = {({2}, 102)} o9 : List |
The object projectiveVariety is a method function with options.