next | previous | forward | backward | up | top | index | toc | Macaulay2 website
GroebnerStrata :: randomPointOnRationalVariety(Ideal)

randomPointOnRationalVariety(Ideal) -- find a random point on a variety that can be detected to be rational

Synopsis

Description

As a first example, we find a random point on the Veronese surface in $\PP^5$.

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 : pt = randomPointOnRationalVariety I

o4 = | 1 49 24 -23 -36 -30 |

              1        6
o4 : Matrix kk  <--- kk
i5 : sub(I, pt) == 0

o5 = true
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 (- t  + t   - t  t  , - t  - t  t  , - t   + t   + t t   - t  t  
               7    14    13 19     8    20 13     10    17    9 13    22 13
     ------------------------------------------------------------------------
                         2                                                  
     - t t   - t  t   + t  t  , - t  t   + t  t  t  , - t   + t t   - t  t  
        7 15    16 19    13 21     16 21    13 15 21     11    9 14    16 20
     ------------------------------------------------------------------------
                                                                             
     - t  t   - t t   + t  t  t  , t   + t t   - t  t   - t  t   + t  t  t  ,
        23 13    8 15    14 13 21   18    9 16    16 22    10 15    16 13 21 
     ------------------------------------------------------------------------
                                                                           
     - t   + t  t  - t  t   - t  t   - t  t   + t  t  t  , t  t  - t  t   -
        12    17 9    23 16    24 13    11 15    17 13 21   18 9    24 16  
     ------------------------------------------------------------------------
                                           2              2        2         
     t  t   + t  t  t  , - t  - 2t  t   + t  t  , - t  - t   + t  t  , - t  -
      12 15    18 13 21     1     14 13    13 19     2    14    20 13     4  
     ------------------------------------------------------------------------
                                            2                                
     t t   - t  t   + t t   - 2t  t   + t  t   - t t   + t t  t   + t  t  t  
      7 16    14 16    3 13     17 13    22 13    1 15    7 13 15    14 13 15
     ------------------------------------------------------------------------
                    3                                            2   
     + t  t  t   - t  t  , t   - t t   - t  t   + t t  t   + t  t   +
        16 13 19    13 21   18    9 16    17 15    9 13 15    14 15  
     ------------------------------------------------------------------------
                  2                                                     
     t  t  t   - t  t  t  , - t  + t t   - 2t  t   - t t   + t  t  t   +
      16 13 21    13 15 21     5    3 14     17 14    8 16    16 20 13  
     ------------------------------------------------------------------------
         2             2                      2                             
     t  t   - t t   + t  t   + t t  t   - t  t  t  , t t   - t  t   - t  t  
      23 13    2 15    14 15    8 13 15    14 13 21   3 16    10 16    17 16
     ------------------------------------------------------------------------
                                                                2            
     - t  t   + t  t  t   - t t   + t  t  t   + t  t  t   - t  t  t  , - t  +
        18 13    16 22 13    4 15    14 16 15    10 13 15    16 13 21     6  
     ------------------------------------------------------------------------
              2                                      2                       
     t t   - t   - t  t   - t  t   + t  t  t   + t  t   - t t   + t  t  t   +
      3 17    17    18 14    11 16    23 16 13    24 13    5 15    17 14 15  
     ------------------------------------------------------------------------
                     2                                                   
     t  t  t   - t  t  t  , t  t  - t  t   - t  t   + t  t  t   - t t   +
      11 13 15    17 13 21   18 3    18 17    12 16    24 16 13    6 15  
     ------------------------------------------------------------------------
                                 2                                      
     t  t  t   + t  t  t   - t  t  t  , - t  - t  t   + t t   - t  t   +
      18 14 15    12 13 15    18 13 21     8    20 13    7 19    14 19  
     ------------------------------------------------------------------------
         2                                                               
     t  t  , t t   - t  t   + t  t  t  , - t   + t t  - t  t   - t  t   +
      13 19   7 20    14 20    20 13 19     11    7 9    16 20    23 13  
     ------------------------------------------------------------------------
                                                              2           
     t  t  t   + t  t   - t  t   + t  t  t   + t t  t   + t  t   - t t   -
      20 13 15    10 19    17 19    22 13 19    7 15 19    16 19    1 21  
     ------------------------------------------------------------------------
                 2                2                        2              
     t t  t   - t  t  t  , t   + t  - t t   - t  t   + t  t   + t t  t   -
      7 13 21    13 19 21   24    9    9 22    23 15    20 15    9 15 19  
     ------------------------------------------------------------------------
                                                                         
     t t   + t  t   - t t  t   + t  t  t   - t  t  t  t  , t  t  + t t  -
      3 21    10 21    7 15 21    16 19 21    13 15 19 21   23 7    8 9  
     ------------------------------------------------------------------------
                                                                           
     t  t   + t  t   - t  t   - t t   + t  t  t   + t  t  t   + t  t  t   +
      23 14    10 20    17 20    8 22    14 20 15    16 20 19    23 13 19  
     ------------------------------------------------------------------------
                                                                         
     t t  t   - t t   - t t  t   - t  t  t  t  , - t   + t  t  - t  t   +
      8 15 19    2 21    7 14 21    14 13 19 21     12    10 9    23 16  
     ------------------------------------------------------------------------
                                                                    
     t  t  t   - t  t   + t  t  t   + t  t  t   - t t   - t t  t   -
      16 20 15    18 19    16 22 19    10 15 19    4 21    7 16 21  
     ------------------------------------------------------------------------
                                                                      
     t  t  t  t  , t  t   - t  t   + t  t  + t  t  - t  t   - t  t   +
      16 13 19 21   10 23    17 23    24 7    11 9    18 20    11 22  
     ------------------------------------------------------------------------
                                                                       
     t  t  t   + t  t  t   + t  t  t   + t  t  t   - t t   - t  t t   -
      17 20 15    23 16 19    24 13 19    11 15 19    5 21    17 7 21  
     ------------------------------------------------------------------------
                                                                             
     t  t  t  t  , t  t   - t  t   + t  t  - t  t   + t  t  t   + t  t  t   +
      17 13 19 21   24 10    18 23    12 9    12 22    18 20 15    24 16 19  
     ------------------------------------------------------------------------
                                                                        
     t  t  t   - t t   - t  t t   - t  t  t  t  , - t  - t t   - t t   +
      12 15 19    6 21    18 7 21    18 13 19 21     2    7 14    8 13  
     ------------------------------------------------------------------------
                                                                        
     t t   + t t  t  , - t t   + t t   + t t  t  , - t  + t t  - t  t  -
      1 19    7 13 19     8 14    1 20    7 20 13     5    3 7    10 7  
     ------------------------------------------------------------------------
                                                         2                
     t  t  - t t  - t t   + t t   - t  t   + t t  t   + t t   + t t  t   +
      17 7    1 9    8 16    1 22    11 13    7 22 13    7 15    8 13 15  
     ------------------------------------------------------------------------
                                      2                                      
     t t   + t t  t   - t t  t   - t t  t  , t   - t  t  - t  t   + t t t   +
      4 19    7 16 19    1 13 21    7 13 21   12    10 9    11 15    7 9 15  
     ------------------------------------------------------------------------
        2                                                                   
     t t   + t t   + t t  t   - t t  t   - t t  t  t  , t t  - t t   - t t  
      8 15    4 21    7 16 21    1 15 21    7 13 15 21   3 8    8 10    8 17
     ------------------------------------------------------------------------
                                                                      
     + t t   - t t  - t  t   + t t   + t t  t   + t  t t   + t t t   +
        1 23    2 9    11 14    4 20    7 16 20    23 7 13    8 7 15  
     ------------------------------------------------------------------------
                                                        2
     t t  t   - t t  t   - t t  t  t  , - t  + t t   - t   - t  t  - t t  -
      8 14 15    1 14 21    7 14 13 21     6    3 10    10    18 7    4 9  
     ------------------------------------------------------------------------
     t  t   + t t   + t t  t   + t  t t   + t t  t   - t t  t   -
      11 16    4 22    7 16 22    10 7 15    8 16 15    1 16 21  
     ------------------------------------------------------------------------
     t t  t  t  , t  t  + t  t  - t  t  - t  t   - t  t   + t t   - t t  +
      7 16 13 21   24 1    11 3    18 8    11 10    11 17    4 23    5 9  
     ------------------------------------------------------------------------
     t  t t   + t  t t   + t t  t   + t  t t   - t t  t   - t  t t  t  , -
      23 7 16    24 7 13    8 17 15    11 7 15    1 17 21    17 7 13 21   
     ------------------------------------------------------------------------
     t  t   + t t   + t  t  - t  t   - t t  + t  t t   + t  t t   + t  t t  
      11 18    4 24    12 3    12 10    6 9    24 7 16    18 8 15    12 7 15
     ------------------------------------------------------------------------
     - t  t t   - t  t t  t  )
        18 1 21    18 7 13 21

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 a point on the first component

i13 : pt1 = randomPointOnRationalVariety compsJ_0

o13 = | 50 15 46 -33 2 -43 -46 8 33 19 -2 -18 -8 -22 43 -29 19 3 -16 -29 -38
      -----------------------------------------------------------------------
      -24 -10 -29 |

               1        24
o13 : Matrix kk  <--- kk
i14 : F1 = sub(F, (vars S)|pt1)

              2              2                             2               
o14 = ideal (a  + 33b*c - 33c  + 19a*d + 2b*d + 15c*d + 50d , a*b + 43b*c -
      -----------------------------------------------------------------------
        2                              2                   2                 
      2c  - 29a*d - 18b*d - 43c*d + 46d , a*c - 38b*c + 19c  - 24a*d + 3b*d -
      -----------------------------------------------------------------------
                2   2              2                             2
      8c*d - 46d , b  - 10b*c - 16c  - 29a*d - 29b*d - 22c*d + 8d )

o14 : Ideal of S
i15 : decompose F1

                                    2              2                      2
o15 = {ideal (a - 38b + 19c + 44d, b  - 10b*c - 16c  - 20b*d + 24c*d - 29d ),
      -----------------------------------------------------------------------
      ideal (c - 24d, b - 38d, a + 15d)}

o15 : List

We attempt to find a point on the second component in parameter space, and its corresponding ideal.

i16 : pt2 = randomPointOnRationalVariety compsJ_1

o16 = | -14 40 -5 26 -48 -26 -35 41 -8 -15 -38 31 -13 29 21 16 39 21 -18 19
      -----------------------------------------------------------------------
      -47 -39 34 0 |

               1        24
o16 : Matrix kk  <--- kk
i17 : F2 = sub(F, (vars S)|pt2)

              2             2                              2               
o17 = ideal (a  - 8b*c + 26c  - 15a*d - 48b*d + 40c*d - 14d , a*b + 21b*c -
      -----------------------------------------------------------------------
         2                             2                   2                
      38c  + 16a*d + 31b*d - 26c*d - 5d , a*c - 47b*c + 39c  - 39a*d + 21b*d
      -----------------------------------------------------------------------
                   2   2              2                      2
      - 13c*d - 35d , b  + 34b*c - 18c  + 19b*d + 29c*d + 41d )

o17 : Ideal of S
i18 : decompose F2

o18 = {ideal (b + 19c - 18d, a + 23c + 43d), ideal (b + 15c + 37d, a + 37c +
      -----------------------------------------------------------------------
      26d)}

o18 : List

It turns out that this is the ideal of 2 skew lines, just not defined over this field.

Caveat

This routine expects the input to represent an irreducible variety

See also

Ways to use this method: