# randomPointsOnRationalVariety(Ideal,ZZ) -- find random points on a variety that can be detected to be rational

## Synopsis

• Function: randomPointsOnRationalVariety
• Usage:
randomPointsOnRationalVariety(I, n)
randomPointOnRationalVariety
• Inputs:
• I, an ideal, An ideal in a polynomial ring $S$ over a field, which defines a prime ideal
• n, an integer, The number of points to generate
• Outputs:
• a list, A list of $n$ one row matrices over the base field of $S$, that are randomly chosen points on $I$. null is returned in the case when the routine cannot determine if the variety is rational and irreducible.

## Description

 i1 : kk = ZZ/101; i2 : S = kk[a..f]; i3 : I = minors(2, genericSymmetricMatrix(S, 3)) 2 2 o3 = ideal (- b + a*d, - b*c + a*e, - c*d + b*e, - b*c + a*e, - c + a*f, - ------------------------------------------------------------------------ 2 c*e + b*f, - c*d + b*e, - c*e + b*f, - e + d*f) o3 : Ideal of S i4 : pts = randomPointsOnRationalVariety(I, 4) o4 = {| 1 49 24 -23 -36 -30 |, | 23 -29 -29 19 19 19 |, | 38 -11 -10 -42 -29 ------------------------------------------------------------------------ -8 |, | -37 -35 -22 -14 -29 -24 |} o4 : List i5 : for p in pts list sub(I, p) == 0 o5 = {true, true, true, true} o5 : List
 i6 : S = kk[a..d]; i7 : F = groebnerFamily ideal"a2,ab,ac,b2" 2 2 2 o7 = ideal (a + t b*c + t a*d + t c + t b*d + t c*d + t d , a*b + t b*c + 1 3 2 4 5 6 7 ------------------------------------------------------------------------ 2 2 2 t a*d + t c + t b*d + t c*d + t d , a*c + t b*c + t a*d + t c + 9 8 10 11 12 13 15 14 ------------------------------------------------------------------------ 2 2 2 t b*d + t c*d + t d , b + t b*c + t a*d + t c + t b*d + t c*d 16 17 18 19 21 20 22 23 ------------------------------------------------------------------------ 2 + t d ) 24 o7 : Ideal of kk[t , t , t , t , t , t , t , t , t , t , t , t , t , t , t , t , t , t , t , t , t , t , t , t ][a..d] 6 5 12 2 4 11 18 24 1 3 8 10 17 23 7 9 14 16 20 22 13 15 19 21 i8 : J = groebnerStratum F; o8 : Ideal of kk[t , t , t , t , t , t , t , t , t , t , t , t , t , t , t , t , t , t , t , t , t , t , t , t ] 6 5 12 2 4 11 18 24 1 3 8 10 17 23 7 9 14 16 20 22 13 15 19 21 i9 : compsJ = decompose J; i10 : compsJ = compsJ/trim; i11 : #compsJ == 2 o11 = true i12 : compsJ/dim o12 = {11, 8} o12 : List

There are 2 components. We attempt to find points on each of these two components. We are successful. This indicates that the corresponding varieties are both rational. Also, if we can find one point, we can find as many as we want.

 i13 : netList randomPointsOnRationalVariety(compsJ_0, 10) +---------------------------------------------------------------------------------------+ o13 = || -31 -46 41 35 -19 0 -23 -24 -30 -43 13 -5 -16 39 20 21 -13 15 34 19 -39 -47 -38 -18 || +---------------------------------------------------------------------------------------+ || -1 33 -40 29 -45 1 -8 46 3 -47 11 30 -28 -47 21 38 -48 -20 2 16 45 22 -15 -34 | | +---------------------------------------------------------------------------------------+ || -24 5 12 41 28 -34 -1 34 -21 48 -39 -1 19 -16 -12 7 -11 -40 15 -23 43 39 47 -17 | | +---------------------------------------------------------------------------------------+ || 11 -44 20 36 3 -14 -39 -16 31 -3 -3 10 35 11 -39 -38 1 1 33 40 46 11 36 -28 | | +---------------------------------------------------------------------------------------+ || 20 13 42 -22 -5 -25 20 13 -13 -10 -30 -29 -47 -23 -40 -7 -13 2 2 29 15 -47 22 -37 | | +---------------------------------------------------------------------------------------+ || 20 -29 3 25 -31 -15 36 -27 37 -30 3 -23 -18 39 -26 27 24 -15 -22 32 -32 -9 30 -20 | | +---------------------------------------------------------------------------------------+ || 11 -40 -9 -1 11 30 -46 -4 -9 44 21 -14 -15 39 -23 0 -20 21 33 -49 -19 -33 -48 17 | | +---------------------------------------------------------------------------------------+ || -48 -39 24 -3 33 -31 36 12 -10 -8 13 39 36 9 39 -39 -11 34 4 13 22 -26 -39 -49 | | +---------------------------------------------------------------------------------------+ || 25 -38 46 -12 -38 9 -39 5 -11 35 49 -34 -8 36 13 -3 -6 50 -22 -30 16 41 43 -28 | | +---------------------------------------------------------------------------------------+ || 28 -37 41 35 -9 -7 -45 -1 -30 -13 6 -25 -35 6 34 40 -49 -50 3 -31 -2 25 -9 -41 | | +---------------------------------------------------------------------------------------+ i14 : netList randomPointsOnRationalVariety(compsJ_1, 10) +-------------------------------------------------------------------------------------+ o14 = || -38 23 -11 16 37 24 -35 14 -42 27 -31 -19 37 -7 -42 -33 -35 -31 -40 -47 27 30 4 0 || +-------------------------------------------------------------------------------------+ || 42 -19 17 -24 -26 -22 -36 22 1 26 22 13 30 -35 44 28 -37 47 -48 -48 -29 -31 -39 0 || +-------------------------------------------------------------------------------------+ || -27 23 -7 16 19 18 47 20 47 50 -46 1 40 11 10 -30 -22 10 1 -18 46 28 -49 0 | | +-------------------------------------------------------------------------------------+ || 3 41 33 16 7 32 6 17 23 -29 -19 -43 3 -5 -23 -48 -41 8 -13 13 -17 30 7 0 | | +-------------------------------------------------------------------------------------+ || 50 -40 28 11 7 44 4 1 -14 5 32 -28 -18 24 6 30 42 23 49 30 -46 -29 8 0 | | +-------------------------------------------------------------------------------------+ || 27 47 -5 20 39 -45 -18 -31 33 34 -29 -3 12 -38 39 17 -18 27 -46 18 -16 15 -28 0 | | +-------------------------------------------------------------------------------------+ || -44 38 26 50 34 -9 31 40 12 -49 2 -21 -39 -33 42 21 20 19 44 -37 -23 23 -21 0 | | +-------------------------------------------------------------------------------------+ || -18 8 -43 -20 12 -30 43 -46 38 40 3 39 6 6 -9 -14 -9 -33 -28 -28 47 -47 0 0 | | +-------------------------------------------------------------------------------------+ || -32 47 -49 8 -50 32 40 -46 -30 -14 -17 25 -33 41 34 15 -28 42 -37 26 5 -29 28 0 | | +-------------------------------------------------------------------------------------+ || -13 -40 -37 29 -41 -17 -37 -28 -49 -14 -9 -38 -20 32 29 49 -13 -29 5 4 22 30 44 0 || +-------------------------------------------------------------------------------------+

## Caveat

This routine expects the input to represent an irreducible variety