Macaulay2 » Documentation
Packages » GroebnerStrata :: randomPointOnRationalVariety(Ideal)
next | previous | forward | backward | up | index | toc

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 = | 2 -18 6 4 20 -11 44 -13 0 19 11 -47 -29 -8 -19 -22 19 -20 -29 -38 -24
      -----------------------------------------------------------------------
      -16 -10 -29 |

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

              2     2                             2                   2  
o14 = ideal (a  + 4c  + 19a*d + 20b*d - 18c*d + 2d , a*b - 19b*c + 11c  -
      -----------------------------------------------------------------------
                                2                   2                        
      22a*d - 47b*d - 11c*d + 6d , a*c - 24b*c + 19c  - 16a*d - 20b*d - 29c*d
      -----------------------------------------------------------------------
           2   2              2                             2
      + 44d , b  - 10b*c - 29c  - 29a*d - 38b*d - 8c*d - 13d )

o14 : Ideal of S
i15 : decompose F1

                                    2              2                      2
o15 = {ideal (a - 24b + 19c - 28d, b  - 10b*c - 29c  - 27b*d + 38c*d - 17d ),
      -----------------------------------------------------------------------
      ideal (c - 16d, b - 33d, a - 32d)}

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 = | -8 28 25 30 -12 -42 -20 -35 -7 -37 -5 45 19 20 -24 34 39 21 -47 -39
      -----------------------------------------------------------------------
      -13 -18 34 0 |

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

              2             2                             2               
o17 = ideal (a  - 7b*c + 30c  - 37a*d - 12b*d + 28c*d - 8d , a*b - 24b*c -
      -----------------------------------------------------------------------
        2                              2                   2                
      5c  + 34a*d + 45b*d - 42c*d + 25d , a*c - 13b*c + 39c  - 18a*d + 21b*d
      -----------------------------------------------------------------------
                   2   2              2                      2
      + 19c*d - 20d , b  + 34b*c - 47c  - 39b*d + 20c*d - 35d )

o17 : Ideal of S
i18 : decompose F2

o18 = {ideal (b - 12c + 48d, a - 16c + d), ideal (b + 46c + 14d, a + 31c -
      -----------------------------------------------------------------------
      5d)}

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: