This function returns the genus of a curve embedded in P1*P1*P1 by computing the genus of its image under the Segre embedding in P7.
i1 : p=101; |
i2 : S=ZZ/p[x_0,x_1,y_0,y_1,z_0,z_1,Degrees=>{2:{1,0,0},2:{0,1,0},2:{0,0,1}}]; |
i3 : C1=ideal random(S^1,S^{{-1,-1,-1},{-3,-1,-2}}); o3 : Ideal of S |
i4 : genusP1P1P1 C1 o4 = 6 |
i5 : C2=ideal random(S^1,S^{{-1,-1,-1},{0,-1,-2}}); o5 : Ideal of S |
i6 : genusP1P1P1 C2 o6 = 0 |