Macaulay2 » Documentation
Packages » CoincidentRootLoci :: switch(RingElement)
next | previous | forward | backward | up | index | toc

switch(RingElement)

Description

A binary form $F(t_0,t_1) = a_0\,t_0^n+n\,a_1\,t_0^{n-1}\,t_1+1/2\,n\,(n-1)\,a_2\,t_0^{n-2}\,t_1^2+\,\cdots\,+n\,a_{n-1}\,t_0\,t_1^{n-1}+a_n\,t_1^n$ can be identified with the list $\{a_0,a_1,\ldots,a_n\}$ of its coefficients, and also with the ideal of the corresponding point of $\mathbb{P}^n$. The method switch when applied to a binary form returns the list of its coefficients; when applied to a list of coefficients returns the ideal of the corresponding point; when applied to the ideal of a point returns the corresponding binary form.

i1 : F = randomBinaryForm 9

          9        8         7 2        6 3       5 4       4 5       3 6  
o1 = 5670t  + 2835t t  + 945t t  + 2205t t  + 980t t  + 882t t  + 882t t  +
          0        0 1       0 1        0 1       0 1       0 1       0 1  
     ------------------------------------------------------------------------
          2 7          8       9
     2940t t  + 8820t t  + 540t
          0 1        0 1       1

o1 : QQ[t ..t ]
         0   1
i2 : L = switch F

                 105  105  70     21  245
o2 = {5670, 315, ---, ---, --, 7, --, ---, 980, 540}
                  4    4    9      2   3

o2 : List
i3 : I = switch L

o3 = ideal (27t  - 49t , 324t  - 49t , 360t  - 7t , 540t  - 7t , 486t  - 7t ,
               8      9      7      9      6     9      5     9      4     9 
     ------------------------------------------------------------------------
     144t  - 7t , 144t  - 7t , 12t  - 7t , 2t  - 21t )
         3     9      2     9     1     9    0      9

o3 : Ideal of QQ[t ..t ]
                  0   9
i4 : switch I

          9        8         7 2        6 3       5 4       4 5       3 6  
o4 = 5670t  + 2835t t  + 945t t  + 2205t t  + 980t t  + 882t t  + 882t t  +
          0        0 1       0 1        0 1       0 1       0 1       0 1  
     ------------------------------------------------------------------------
          2 7          8       9
     2940t t  + 8820t t  + 540t
          0 1        0 1       1

o4 : QQ[t ..t ]
         0   1
i5 : oo == F

o5 = true

Ways to use this method:


The source of this document is in CoincidentRootLoci/documentation.m2:223:0.