Let $\Phi:X \dashrightarrow Y$ be a rational map from a subvariety $X=V(I)\subseteq\mathbb{P}^n=Proj(K[x_0,\ldots,x_n])$ to a subvariety $Y=V(J)\subseteq\mathbb{P}^m=Proj(K[y_0,\ldots,y_m])$. Then the map $\Phi $ can be represented, although not uniquely, by a homogeneous ring map $\phi:K[y_0,\ldots,y_m]/J \to K[x_0,\ldots,x_n]/I$ of quotients of polynomial rings by homogeneous ideals. These kinds of ring maps, together with the objects of the RationalMap class, are the typical inputs for the methods in this package. The method toMap (resp. rationalMap) constructs such a ring map (resp. rational map) from a list of $m+1$ homogeneous elements of the same degree in $K[x_0,...,x_n]/I$.
Below is an example using the methods provided by this package, dealing with a birational transformation $\Phi:\mathbb{P}^6 \dashrightarrow \mathbb{G}(2,4)\subset\mathbb{P}^9$ of bidegree $(3,3)$.
i1 : ZZ/300007[t_0..t_6]; |
i2 : time phi = toMap minors(3,matrix{{t_0..t_4},{t_1..t_5},{t_2..t_6}}) -- used 0.0136178 seconds ZZ ZZ 3 2 2 2 2 2 2 2 2 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 2 2 o2 = map(------[t ..t ],------[x ..x ],{- t + 2t t t - t t - t t + t t t , - t t + t t + t t t - t t t - t t + t t t , - t t + t t + t t t - t t - t t t + t t t , - t + 2t t t - t t - t t + t t t , - t t + t t t + t t t - t t t - t t + t t t , - t t t + t t + t t - t t t - t t t + t t t , - t t + t t + t t t - t t t - t t + t t t , - t t + t t t + t t t - t t - t t t + t t t , - t t + t t + t t t - t t - t t t + t t t , - t + 2t t t - t t - t t + t t t }) 300007 0 6 300007 0 9 2 1 2 3 0 3 1 4 0 2 4 2 3 1 3 1 2 4 0 3 4 1 5 0 2 5 2 3 2 4 1 3 4 0 4 1 2 5 0 3 5 3 2 3 4 1 4 2 5 1 3 5 2 4 1 3 4 1 2 5 0 3 5 1 6 0 2 6 2 3 4 1 4 2 5 0 4 5 1 2 6 0 3 6 3 4 2 4 2 3 5 1 4 5 2 6 1 3 6 2 4 2 3 5 1 4 5 0 5 1 3 6 0 4 6 3 4 3 5 2 4 5 1 5 2 3 6 1 4 6 4 3 4 5 2 5 3 6 2 4 6 ZZ ZZ o2 : RingMap ------[t ..t ] <--- ------[x ..x ] 300007 0 6 300007 0 9 |
i3 : time J = kernel(phi,2) -- used 0.123607 seconds o3 = ideal (x x - x x + x x , x x - x x + x x , x x - x x + x x , x x 6 7 5 8 4 9 3 7 2 8 1 9 3 5 2 6 0 9 3 4 ------------------------------------------------------------------------ - x x + x x , x x - x x + x x ) 1 6 0 8 2 4 1 5 0 7 ZZ o3 : Ideal of ------[x ..x ] 300007 0 9 |
i4 : time degreeMap phi -- used 0.061852 seconds o4 = 1 |
i5 : time projectiveDegrees phi -- used 1.19459 seconds o5 = {1, 3, 9, 17, 21, 15, 5} o5 : List |
i6 : time projectiveDegrees(phi,NumDegrees=>0) -- used 0.140692 seconds o6 = {5} o6 : List |
i7 : time phi = toMap(phi,Dominant=>J) -- used 0.00463772 seconds ZZ ------[x ..x ] ZZ 300007 0 9 3 2 2 2 2 2 2 2 2 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 2 2 o7 = map(------[t ..t ],----------------------------------------------------------------------------------------------------,{- t + 2t t t - t t - t t + t t t , - t t + t t + t t t - t t t - t t + t t t , - t t + t t + t t t - t t - t t t + t t t , - t + 2t t t - t t - t t + t t t , - t t + t t t + t t t - t t t - t t + t t t , - t t t + t t + t t - t t t - t t t + t t t , - t t + t t + t t t - t t t - t t + t t t , - t t + t t t + t t t - t t - t t t + t t t , - t t + t t + t t t - t t - t t t + t t t , - t + 2t t t - t t - t t + t t t }) 300007 0 6 (x x - x x + x x , x x - x x + x x , x x - x x + x x , x x - x x + x x , x x - x x + x x ) 2 1 2 3 0 3 1 4 0 2 4 2 3 1 3 1 2 4 0 3 4 1 5 0 2 5 2 3 2 4 1 3 4 0 4 1 2 5 0 3 5 3 2 3 4 1 4 2 5 1 3 5 2 4 1 3 4 1 2 5 0 3 5 1 6 0 2 6 2 3 4 1 4 2 5 0 4 5 1 2 6 0 3 6 3 4 2 4 2 3 5 1 4 5 2 6 1 3 6 2 4 2 3 5 1 4 5 0 5 1 3 6 0 4 6 3 4 3 5 2 4 5 1 5 2 3 6 1 4 6 4 3 4 5 2 5 3 6 2 4 6 6 7 5 8 4 9 3 7 2 8 1 9 3 5 2 6 0 9 3 4 1 6 0 8 2 4 1 5 0 7 ZZ ------[x ..x ] ZZ 300007 0 9 o7 : RingMap ------[t ..t ] <--- ---------------------------------------------------------------------------------------------------- 300007 0 6 (x x - x x + x x , x x - x x + x x , x x - x x + x x , x x - x x + x x , x x - x x + x x ) 6 7 5 8 4 9 3 7 2 8 1 9 3 5 2 6 0 9 3 4 1 6 0 8 2 4 1 5 0 7 |
i8 : time psi = inverseMap phi -- used 0.742378 seconds ZZ ------[x ..x ] 300007 0 9 ZZ 3 2 2 2 2 2 2 2 2 2 2 2 3 2 2 2 2 2 2 3 2 2 2 2 2 o8 = map(----------------------------------------------------------------------------------------------------,------[t ..t ],{x - 2x x x + x x - x x x + x x + x x + x x x - x x x + x x - 2x x x - x x x - 2x x , x x - x x - x x x + x x x + x x x + x x - 2x x x - x x x + x x x , x x - x x x + x x - x x x + x x - x x x - x x x , x - x x x + x x x + x x x - 2x x x - x x x , x x - x x x + x x + x x - x x x - x x x - x x x , x x - x x - x x x + x x + x x x + x x x - 2x x x - x x x + x x x , x - 2x x x - x x x + x x + x x + x x + x x + x x x - 2x x x - x x x - x x x - 2x x }) (x x - x x + x x , x x - x x + x x , x x - x x + x x , x x - x x + x x , x x - x x + x x ) 300007 0 6 2 1 2 3 0 3 1 2 5 0 5 1 6 0 2 6 0 4 6 1 7 0 2 7 0 4 7 0 9 2 3 1 3 1 2 6 0 3 6 0 5 6 1 8 0 2 8 0 4 8 0 1 9 2 3 1 3 6 0 6 0 3 8 1 9 0 2 9 0 4 9 3 1 3 8 0 6 8 1 2 9 0 3 9 0 5 9 3 6 2 3 8 0 8 2 9 1 3 9 0 6 9 0 7 9 3 6 3 8 2 6 8 1 8 2 3 9 2 5 9 1 6 9 1 7 9 0 8 9 6 3 6 8 5 6 8 2 8 4 8 3 9 5 9 2 6 9 4 6 9 2 7 9 4 7 9 0 9 6 7 5 8 4 9 3 7 2 8 1 9 3 5 2 6 0 9 3 4 1 6 0 8 2 4 1 5 0 7 ZZ ------[x ..x ] 300007 0 9 ZZ o8 : RingMap ---------------------------------------------------------------------------------------------------- <--- ------[t ..t ] (x x - x x + x x , x x - x x + x x , x x - x x + x x , x x - x x + x x , x x - x x + x x ) 300007 0 6 6 7 5 8 4 9 3 7 2 8 1 9 3 5 2 6 0 9 3 4 1 6 0 8 2 4 1 5 0 7 |
i9 : time isInverseMap(phi,psi) -- used 0.0165961 seconds o9 = true |
i10 : time degreeMap psi -- used 0.312807 seconds o10 = 1 |
i11 : time projectiveDegrees psi -- used 9.38635 seconds o11 = {5, 15, 21, 17, 9, 3, 1} o11 : List |
We repeat the example using the type RationalMap and using deterministic methods.
i12 : time phi = rationalMap minors(3,matrix{{t_0..t_4},{t_1..t_5},{t_2..t_6}}) -- used 0.00275541 seconds o12 = -- rational map -- ZZ source: Proj(------[t , t , t , t , t , t , t ]) 300007 0 1 2 3 4 5 6 ZZ target: Proj(------[x , x , x , x , x , x , x , x , x , x ]) 300007 0 1 2 3 4 5 6 7 8 9 defining forms: { 3 2 2 - t + 2t t t - t t - t t + t t t , 2 1 2 3 0 3 1 4 0 2 4 2 2 2 - t t + t t + t t t - t t t - t t + t t t , 2 3 1 3 1 2 4 0 3 4 1 5 0 2 5 2 2 2 - t t + t t + t t t - t t - t t t + t t t , 2 3 2 4 1 3 4 0 4 1 2 5 0 3 5 3 2 2 - t + 2t t t - t t - t t + t t t , 3 2 3 4 1 4 2 5 1 3 5 2 2 - t t + t t t + t t t - t t t - t t + t t t , 2 4 1 3 4 1 2 5 0 3 5 1 6 0 2 6 2 2 - t t t + t t + t t - t t t - t t t + t t t , 2 3 4 1 4 2 5 0 4 5 1 2 6 0 3 6 2 2 2 - t t + t t + t t t - t t t - t t + t t t , 3 4 2 4 2 3 5 1 4 5 2 6 1 3 6 2 2 - t t + t t t + t t t - t t - t t t + t t t , 2 4 2 3 5 1 4 5 0 5 1 3 6 0 4 6 2 2 2 - t t + t t + t t t - t t - t t t + t t t , 3 4 3 5 2 4 5 1 5 2 3 6 1 4 6 3 2 2 - t + 2t t t - t t - t t + t t t 4 3 4 5 2 5 3 6 2 4 6 } o12 : RationalMap (cubic rational map from PP^6 to PP^9) |
i13 : time phi = rationalMap(phi,Dominant=>2) -- used 0.115102 seconds o13 = -- rational map -- ZZ source: Proj(------[t , t , t , t , t , t , t ]) 300007 0 1 2 3 4 5 6 ZZ target: subvariety of Proj(------[x , x , x , x , x , x , x , x , x , x ]) defined by 300007 0 1 2 3 4 5 6 7 8 9 { x x - x x + x x , 6 7 5 8 4 9 x x - x x + x x , 3 7 2 8 1 9 x x - x x + x x , 3 5 2 6 0 9 x x - x x + x x , 3 4 1 6 0 8 x x - x x + x x 2 4 1 5 0 7 } defining forms: { 3 2 2 - t + 2t t t - t t - t t + t t t , 2 1 2 3 0 3 1 4 0 2 4 2 2 2 - t t + t t + t t t - t t t - t t + t t t , 2 3 1 3 1 2 4 0 3 4 1 5 0 2 5 2 2 2 - t t + t t + t t t - t t - t t t + t t t , 2 3 2 4 1 3 4 0 4 1 2 5 0 3 5 3 2 2 - t + 2t t t - t t - t t + t t t , 3 2 3 4 1 4 2 5 1 3 5 2 2 - t t + t t t + t t t - t t t - t t + t t t , 2 4 1 3 4 1 2 5 0 3 5 1 6 0 2 6 2 2 - t t t + t t + t t - t t t - t t t + t t t , 2 3 4 1 4 2 5 0 4 5 1 2 6 0 3 6 2 2 2 - t t + t t + t t t - t t t - t t + t t t , 3 4 2 4 2 3 5 1 4 5 2 6 1 3 6 2 2 - t t + t t t + t t t - t t - t t t + t t t , 2 4 2 3 5 1 4 5 0 5 1 3 6 0 4 6 2 2 2 - t t + t t + t t t - t t - t t t + t t t , 3 4 3 5 2 4 5 1 5 2 3 6 1 4 6 3 2 2 - t + 2t t t - t t - t t + t t t 4 3 4 5 2 5 3 6 2 4 6 } o13 : RationalMap (cubic rational map from PP^6 to 6-dimensional subvariety of PP^9) |
i14 : time phi^(-1) -- used 0.793088 seconds o14 = -- rational map -- ZZ source: subvariety of Proj(------[x , x , x , x , x , x , x , x , x , x ]) defined by 300007 0 1 2 3 4 5 6 7 8 9 { x x - x x + x x , 6 7 5 8 4 9 x x - x x + x x , 3 7 2 8 1 9 x x - x x + x x , 3 5 2 6 0 9 x x - x x + x x , 3 4 1 6 0 8 x x - x x + x x 2 4 1 5 0 7 } ZZ target: Proj(------[t , t , t , t , t , t , t ]) 300007 0 1 2 3 4 5 6 defining forms: { 3 2 2 2 2 2 x - 2x x x + x x - x x x + x x + x x + x x x - x x x + x x - 2x x x - x x x - 2x x , 2 1 2 3 0 3 1 2 5 0 5 1 6 0 2 6 0 4 6 1 7 0 2 7 0 4 7 0 9 2 2 2 x x - x x - x x x + x x x + x x x + x x - 2x x x - x x x + x x x , 2 3 1 3 1 2 6 0 3 6 0 5 6 1 8 0 2 8 0 4 8 0 1 9 2 2 2 x x - x x x + x x - x x x + x x - x x x - x x x , 2 3 1 3 6 0 6 0 3 8 1 9 0 2 9 0 4 9 3 x - x x x + x x x + x x x - 2x x x - x x x , 3 1 3 8 0 6 8 1 2 9 0 3 9 0 5 9 2 2 2 x x - x x x + x x + x x - x x x - x x x - x x x , 3 6 2 3 8 0 8 2 9 1 3 9 0 6 9 0 7 9 2 2 2 x x - x x - x x x + x x + x x x + x x x - 2x x x - x x x + x x x , 3 6 3 8 2 6 8 1 8 2 3 9 2 5 9 1 6 9 1 7 9 0 8 9 3 2 2 2 2 2 x - 2x x x - x x x + x x + x x + x x + x x + x x x - 2x x x - x x x - x x x - 2x x 6 3 6 8 5 6 8 2 8 4 8 3 9 5 9 2 6 9 4 6 9 2 7 9 4 7 9 0 9 } o14 : RationalMap (cubic birational map from 6-dimensional subvariety of PP^9 to PP^6) |
i15 : time degrees phi^(-1) -- used 0.439217 seconds o15 = {5, 15, 21, 17, 9, 3, 1} o15 : List |
i16 : time degrees phi -- used 0.000038636 seconds o16 = {1, 3, 9, 17, 21, 15, 5} o16 : List |
i17 : time describe phi -- used 0.00360528 seconds o17 = rational map defined by forms of degree 3 source variety: PP^6 target variety: 6-dimensional variety of degree 5 in PP^9 cut out by 5 hypersurfaces of degree 2 dominance: true birationality: true (the inverse map is already calculated) projective degrees: {1, 3, 9, 17, 21, 15, 5} coefficient ring: ZZ/300007 |
i18 : time describe phi^(-1) -- used 0.0186442 seconds o18 = rational map defined by forms of degree 3 source variety: 6-dimensional variety of degree 5 in PP^9 cut out by 5 hypersurfaces of degree 2 target variety: PP^6 dominance: true birationality: true (the inverse map is already calculated) projective degrees: {5, 15, 21, 17, 9, 3, 1} number of minimal representatives: 1 dimension base locus: 4 degree base locus: 24 coefficient ring: ZZ/300007 |
i19 : time (f,g) = graph phi^-1; f; -- used 0.0417595 seconds o20 : MultihomogeneousRationalMap (birational map from 6-dimensional subvariety of PP^9 x PP^6 to 6-dimensional subvariety of PP^9) |
i21 : time degrees f -- used 2.50423 seconds o21 = {904, 508, 268, 130, 56, 20, 5} o21 : List |
i22 : time degree f -- used 0.00001793 seconds o22 = 1 |
i23 : time describe f -- used 0.00190157 seconds o23 = rational map defined by multiforms of degree {1, 0} source variety: 6-dimensional subvariety of PP^9 x PP^6 cut out by 20 hypersurfaces of degrees ({1, 1},{1, 1},{1, 1},{1, 1},{1, 1},{1, 1},{1, 1},{1, 1},{1, 1},{1, 1},{1, 1},{1, 1},{1, 1},{1, 1},{1, 1},{2, 0},{2, 0},{2, 0},{2, 0},{2, 0}) target variety: 6-dimensional variety of degree 5 in PP^9 cut out by 5 hypersurfaces of degree 2 dominance: true birationality: true projective degrees: {904, 508, 268, 130, 56, 20, 5} coefficient ring: ZZ/300007 |
A rudimentary version of Cremona has been already used in an essential way in the paper doi:10.1016/j.jsc.2015.11.004 (it was originally named bir.m2).
Version 4.2.2 of this package was accepted for publication in volume 8 of The Journal of Software for Algebra and Geometry on 11 June 2018, in the article A Macaulay2 package for computations with rational maps. That version can be obtained from the journal or from the Macaulay2 source code repository.
This documentation describes version 5.0 of Cremona.
The source code from which this documentation is derived is in the file Cremona.m2. The auxiliary files accompanying it are in the directory Cremona/.