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 2 7
o1 = 162t + 18t t + 81t t + 18t t + 36t t + 27t t + 54t t + 27t t +
0 0 1 0 1 0 1 0 1 0 1 0 1 0 1
------------------------------------------------------------------------
8 9
63t t + 28t
0 1 1
o1 : QQ[t ..t ]
0 1
|
i2 : L = switch F
9 3 2 3 9 3
o2 = {162, 2, -, --, -, --, --, -, 7, 28}
4 14 7 14 14 4
o2 : List
|
i3 : I = switch L
o3 = ideal (4t - t , 112t - 3t , 392t - 9t , 392t - 3t , 98t - t , 392t
8 9 7 9 6 9 5 9 4 9 3
------------------------------------------------------------------------
- 3t , 112t - 9t , 14t - t , 14t - 81t )
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 2 7
o4 = 162t + 18t t + 81t t + 18t t + 36t t + 27t t + 54t t + 27t t +
0 0 1 0 1 0 1 0 1 0 1 0 1 0 1
------------------------------------------------------------------------
8 9
63t t + 28t
0 1 1
o4 : QQ[t ..t ]
0 1
|
i5 : oo == F
o5 = true
|