# randomCurveP1P2 -- creates the ideal of a random curve in P^1xP^2

## Synopsis

• Usage:
randomCurveP1P2(d,g,F)
randomCurveP1P2(d,g)
• Inputs:
• d, an integer, degree of the curve.
• g, an integer, genus of the curve.
• F, a ring, base ring.
• Outputs:
• an ideal, defining random curve 1×ℙ2 from a curve of degree d and genus g in 3 over F.

## Description

Given a positive integer d, a non-negative integer g, and a ring F randomCurveP1P2 produces a random curve of bi-degree (d,d) and genus g in 1×ℙ2. This is done by using the curve function from the SpaceCurves package to first generate a random curve of degree d and genus g in 1×ℙ2, and then applying curveFromP3toP1P2 to produce a curve in 1×ℙ2.

Since curveFromP3toP1P2 relies on projecting from the point [0:0:0:1] and the line [0:0:s:t], randomCurveP1P2 attempts to find a curve in 3, which does not intersect the base locus of these projections. If the curve did intersect the base locus the resulting curve in 1×ℙ2 would not have degree (d,d). The number of attempts used to try to find such curves is controlled by the Attempt option, which by default is set to 1000.

 ```i1 : randomCurveP1P2(3,0); ZZ o1 : Ideal of ---[x , x , x , x , x ] 101 0,0 0,1 1,0 1,1 1,2``` ```i2 : randomCurveP1P2(3,0,QQ); o2 : Ideal of QQ[x , x , x , x , x ] 0,0 0,1 1,0 1,1 1,2```

## Caveat

This creates a ring F[x0,0,x0,1,x1,0,x1,1,x1,2] in which the resulting ideal is defined.

## Ways to use randomCurveP1P2 :

• randomCurveP1P2(ZZ,ZZ)
• randomCurveP1P2(ZZ,ZZ,Ring)