This is Cremona.info, produced by Macaulay2, version 1.20

Cremona -- package for some computations on rational maps between projective varieties
**************************************************************************************

Description
===========

Cremona is a package to perform some basic computations on rational and
birational maps between absolutely irreducible projective varieties over a
field $K$. For instance, it provides general methods to compute degrees and
projective degrees of rational maps (see degreeMap, and
projectiveDegrees) and a general method to compute the
push-forward to projective space of Segre classes (see SegreClass).
Moreover, all the main methods are available both in version
probabilistic and in version deterministic, and one can switch from one to the
other with the boolean option MathMode.

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. see
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.00601557 seconds                                              |
|                                                                             |
|            ZZ              ZZ                3                2    2        |
|o2 = map (------[t ..t ], ------[x ..x ], {- t  + 2t t t  - t t  - t t  +    |
|          300007  0   6   300007  0   9       2     1 2 3    0 3    1 4      |
|                                                                             |
|               ZZ                  ZZ                                        |
|o2 : RingMap ------[t ..t ] <--- ------[x ..x ]                              |
|             300007  0   6       300007  0   9                               |
|-----------------------------------------------------------------------------|
|           2        2                      2                  2    2         |
|t t t , - t t  + t t  + t t t  - t t t  - t t  + t t t , - t t  + t t  +     |
| 0 2 4     2 3    1 3    1 2 4    0 3 4    1 5    0 2 5     2 3    2 4       |
|-----------------------------------------------------------------------------|
|            2                       3                2    2                  |
|t t t  - t t  - t t t  + t t t , - t  + 2t t t  - t t  - t t  + t t t , -    |
| 1 3 4    0 4    1 2 5    0 3 5     3     2 3 4    1 4    2 5    1 3 5       |
|-----------------------------------------------------------------------------|
| 2                                 2                           2    2        |
|t t  + t t t  + t t 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 3 4    1 4    2 5      |
|-----------------------------------------------------------------------------|
|                             2        2                      2               |
|t t t  - t t t  + t t t , - t t  + t t  + t t t  - t t t  - t t  + t t t , - |
| 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                        2                         2    2                 |
|t t  + t t t  + t t 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     3 4    3 5    2 4 5      |
|-----------------------------------------------------------------------------|
|   2                       3                2    2                           |
|t t  - t t t  + t t t , - t  + 2t t t  - t t  - t t  + t t t })              |
| 1 5    2 3 6    1 4 6     4     3 4 5    2 5    3 6    2 4 6                |
+-----------------------------------------------------------------------------+
|i3 : time J = kernel(phi,2)                                                  |
|     -- used 0.266725 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.0578154 seconds                                               |
|                                                                             |
|o4 = 1                                                                       |
+-----------------------------------------------------------------------------+
|i5 : time projectiveDegrees phi                                              |
|     -- used 1.53394 seconds                                                 |
|                                                                             |
|o5 = {1, 3, 9, 17, 21, 15, 5}                                                |
|                                                                             |
|o5 : List                                                                    |
+-----------------------------------------------------------------------------+
|i6 : time projectiveDegrees(phi,NumDegrees=>0)                               |
|     -- used 0.197468 seconds                                                |
|                                                                             |
|o6 = {5}                                                                     |
|                                                                             |
|o6 : List                                                                    |
+-----------------------------------------------------------------------------+
|i7 : time phi = toMap(phi,Dominant=>J)                                       |
|     -- used 0.00615161 seconds                                              |
|                                                                             |
|                                                                       ZZ    |
|                                                                     ------[x|
|            ZZ                                                       300007  |
|o7 = map (------[t ..t ], ---------------------------------------------------|
|          300007  0   6   (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 |
|                                                                             |
|                                                                             |
|                                                                            -|
|               ZZ                                                           3|
|o7 : RingMap ------[t ..t ] <--- --------------------------------------------|
|             300007  0   6       (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 |
|-----------------------------------------------------------------------------|
| ..x ]                                                                       |
|0   9                                                  3                2    |
|-------------------------------------------------, {- t  + 2t t t  - t t  -  |
|  + x x , x x  - x x  + x x , x x  - x x  + x x )      2     1 2 3    0 3    |
|6    0 9   3 4    1 6    0 8   2 4    1 5    0 7                             |
|                                                                             |
| ZZ                                                                          |
|-----[x ..x ]                                                                |
|00007  0   9                                                                 |
|--------------------------------------------------------                     |
|  - x x  + x x , x x  - x x  + x x , x x  - x x  + x x )                     |
|5    2 6    0 9   3 4    1 6    0 8   2 4    1 5    0 7                      |
|-----------------------------------------------------------------------------|
| 2                2        2                      2                  2    2  |
|t t  + t t t , - t t  + t t  + t t t  - t t t  - t t  + t t t , - t t  + t t |
| 1 4    0 2 4     2 3    1 3    1 2 4    0 3 4    1 5    0 2 5     2 3    2 4|
|-----------------------------------------------------------------------------|
|              2                       3                2    2                |
|+ t t t  - t t  - t t t  + t t t , - t  + 2t t t  - t t  - t t  + t t t , -  |
|   1 3 4    0 4    1 2 5    0 3 5     3     2 3 4    1 4    2 5    1 3 5     |
|-----------------------------------------------------------------------------|
| 2                                 2                           2    2        |
|t t  + t t t  + t t 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 3 4    1 4    2 5      |
|-----------------------------------------------------------------------------|
|                             2        2                      2               |
|t t t  - t t t  + t t t , - t t  + t t  + t t t  - t t t  - t t  + t t t , - |
| 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                        2                         2    2                 |
|t t  + t t t  + t t 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     3 4    3 5    2 4 5      |
|-----------------------------------------------------------------------------|
|   2                       3                2    2                           |
|t t  - t t t  + t t t , - t  + 2t t t  - t t  - t t  + t t t })              |
| 1 5    2 3 6    1 4 6     4     3 4 5    2 5    3 6    2 4 6                |
+-----------------------------------------------------------------------------+
|i8 : time psi = inverseMap phi                                               |
|     -- used 1.07143 seconds                                                 |
|                                                                             |
|                                                       ZZ                    |
|                                                     ------[x ..x ]          |
|                                                     300007  0   9           |
|o8 = map (-------------------------------------------------------------------|
|          (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  |
|                                                                             |
|                                                          ZZ                 |
|                                                        ------[x ..x ]       |
|                                                        300007  0   9        |
|o8 : RingMap ----------------------------------------------------------------|
|             (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 |
|-----------------------------------------------------------------------------|
|                                     ZZ              3                2      |
|---------------------------------, ------[t ..t ], {x  - 2x x x  + x x  -    |
| x x  + x x , x x  - x x  + x x )  300007  0   6     2     1 2 3    0 3      |
|  1 6    0 8   2 4    1 5    0 7                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                            ZZ                               |
|------------------------------------ <--- ------[t ..t ]                     |
|  - x x  + x x , x x  - x x  + x x )      300007  0   6                      |
|4    1 6    0 8   2 4    1 5    0 7                                          |
|-----------------------------------------------------------------------------|
|            2    2                        2                          2       |
|x x x  + x x  + x x  + x x x  - x x x  + x x  - 2x x x  - x x x  - 2x x ,    |
| 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                       3                   |
|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 3    1 3 6    0 6    0 3 8    1 9    0 2 9    0 4 9   3    1 3 8    0 6 8 |
|-----------------------------------------------------------------------------|
|                              2                 2    2                       |
|+ x x x  - 2x x x  - x x x , x x  - x x x  + x x  + x x  - x x x  - x x x  - |
|   1 2 9     0 3 9    0 5 9   3 6    2 3 8    0 8    2 9    1 3 9    0 6 9   |
|-----------------------------------------------------------------------------|
|           2    2                 2                                          |
|x x x , x x  - x x  - x x x  + x x  + x x x  + x x x  - 2x x x  - x x x  +   |
| 0 7 9   3 6    3 8    2 6 8    1 8    2 3 9    2 5 9     1 6 9    1 7 9     |
|-----------------------------------------------------------------------------|
|         3                         2      2    2      2                      |
|x x x , x  - 2x x x  - x x x  + x x  + x x  + x x  + x x  + x x x  - 2x x x  |
| 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                                                    |
|- x x x  - x x x  - 2x x })                                                  |
|   2 7 9    4 7 9     0 9                                                    |
+-----------------------------------------------------------------------------+
|i9 : time isInverseMap(phi,psi)                                              |
|     -- used 0.0190784 seconds                                               |
|                                                                             |
|o9 = true                                                                    |
+-----------------------------------------------------------------------------+
|i10 : time degreeMap psi                                                     |
|     -- used 0.532486 seconds                                                |
|                                                                             |
|o10 = 1                                                                      |
+-----------------------------------------------------------------------------+
|i11 : time projectiveDegrees psi                                             |
|     -- used 17.0933 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.00404806 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.222736 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 ,  |
|                                 300007  0   1   2   3   4   5   6   7   8   |
|              {                                                              |
|               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  |
|-----------------------------------------------------------------------------|
|x ]) defined by                                                              |
| 9                                                                           |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|of PP^9)                                                                     |
+-----------------------------------------------------------------------------+
|i14 : time phi^(-1)                                                          |
|     -- used 1.23184 seconds                                                 |
|                                                                             |
|o14 = -- rational map --                                                     |
|                                   ZZ                                        |
|      source: subvariety of Proj(------[x , x , x , x , x , x , x , x , x , x|
|                                 300007  0   1   2   3   4   5   6   7   8   |
|              {                                                              |
|               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              |
|                       x  - 2x x x  + x x  - x x x  + x x  + x x  + x x x  - |
|                        2     1 2 3    0 3    1 2 5    0 5    1 6    0 2 6   |
|                                                                             |
|                        2        2                               2           |
|                       x x  - x x  - x x x  + x x x  + x x x  + x x  - 2x x x|
|                        2 3    1 3    1 2 6    0 3 6    0 5 6    1 8     0 2 |
|                                                                             |
|                          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|
|                        3 6    3 8    2 6 8    1 8    2 3 9    2 5 9     1 6 |
|                                                                             |
|                        3                         2      2    2      2       |
|                       x  - 2x x x  - x x x  + x x  + x x  + x x  + x x  + x |
|                        6     3 6 8    5 6 8    2 8    4 8    3 9    5 9    2|
|                      }                                                      |
|                                                                             |
|o14 : RationalMap (cubic birational map from 6-dimensional subvariety of PP^9|
|-----------------------------------------------------------------------------|
| ]) defined by                                                               |
|9                                                                            |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|          2                          2                                       |
|x x x  + x x  - 2x x x  - x x x  - 2x x ,                                    |
| 0 4 6    1 7     0 2 7    0 4 7     0 9                                     |
|                                                                             |
|                                                                             |
|  - x x x  + x x x ,                                                         |
|8    0 4 8    0 1 9                                                          |
|                                                                             |
|                                                                             |
|,                                                                            |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|,                                                                            |
|                                                                             |
|                                                                             |
|                                                                             |
|  - x x x  + x x x ,                                                         |
|9    1 7 9    0 8 9                                                          |
|                                                                             |
|                                       2                                     |
|x x  - 2x x x  - x x x  - x x x  - 2x x                                      |
| 6 9     4 6 9    2 7 9    4 7 9     0 9                                     |
|                                                                             |
|                                                                             |
| to PP^6)                                                                    |
+-----------------------------------------------------------------------------+
|i15 : time degrees phi^(-1)                                                  |
|     -- used 0.639533 seconds                                                |
|                                                                             |
|o15 = {5, 15, 21, 17, 9, 3, 1}                                               |
|                                                                             |
|o15 : List                                                                   |
+-----------------------------------------------------------------------------+
|i16 : time degrees phi                                                       |
|     -- used 0.000112106 seconds                                             |
|                                                                             |
|o16 = {1, 3, 9, 17, 21, 15, 5}                                               |
|                                                                             |
|o16 : List                                                                   |
+-----------------------------------------------------------------------------+
|i17 : time describe phi                                                      |
|     -- used 0.0073788 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 |
|      dominance: true                                                        |
|      birationality: true (the inverse map is already calculated)            |
|      projective degrees: {1, 3, 9, 17, 21, 15, 5}                           |
|      coefficient ring: ZZ/300007                                            |
|-----------------------------------------------------------------------------|
|hypersurfaces of degree 2                                                    |
+-----------------------------------------------------------------------------+
|i18 : time describe phi^(-1)                                                 |
|     -- used 0.0269727 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 |
|      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                                            |
|-----------------------------------------------------------------------------|
|hypersurfaces of degree 2                                                    |
+-----------------------------------------------------------------------------+
|i19 : time (f,g) = graph phi^-1; f;                                          |
|     -- used 0.0288381 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.37538 seconds                                                 |
|                                                                             |
|o21 = {904, 508, 268, 130, 56, 20, 5}                                        |
|                                                                             |
|o21 : List                                                                   |
+-----------------------------------------------------------------------------+
|i22 : time degree f                                                          |
|     -- used 0.000011374 seconds                                             |
|                                                                             |
|o22 = 1                                                                      |
+-----------------------------------------------------------------------------+
|i23 : time describe f                                                        |
|     -- used 0.000529224 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  |
|      target variety: 6-dimensional variety of degree 5 in PP^9 cut out by 5 |
|      dominance: true                                                        |
|      birationality: true                                                    |
|      projective degrees: {904, 508, 268, 130, 56, 20, 5}                    |
|      coefficient ring: ZZ/300007                                            |
|-----------------------------------------------------------------------------|
|hypersurfaces of degrees ({1, 1},{1, 1},{1, 1},{1, 1},{1, 1},{1, 1},{1,      |
| hypersurfaces of degree 2                                                   |
|-----------------------------------------------------------------------------|
|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})                                                            |
+-----------------------------------------------------------------------------+

A rudimentary version of Cremona has been already used in an essential way in
the paper doi:10.1016/j.jsc.2015.11.004 (see
http://dx.doi.org/10.1016/j.jsc.2015.11.004 ) (it was originally named bir.m2
(see http://goo.gl/eT4rCR )).

Author
======

  * Giovanni Staglianò <giovannistagliano@gmail.com>

Certification a gold star
=========================

Version 4.2.2 of this package was accepted for publication in volume 8 (see
https://msp.org/jsag/2018/8-1/ ) of The Journal of Software for Algebra and
Geometry (see http://j-sag.org/ ) on 11 June 2018, in the article A Macaulay2
package for computations with rational maps (see
https://msp.org/jsag/2018/8-1/p06.xhtml ). That version can be obtained from
the journal (see https://msp.org/jsag/2018/8-1/jsag-v8-n1-x06-Cremona.zip ) or
from the Macaulay2 source code repository (see
http://github.com/Macaulay2/M2/blob/2e87a29e4b5b68af1bd8917a9c76d4008ff9fc5b/M2
/Macaulay2/packages/Cremona.m2 ).

Version
=======

This documentation describes version 5.1 of Cremona.

Source code
===========

The source code from which this documentation is derived is in the file
Cremona.m2 (see common/share/Macaulay2/Cremona.m2 ). The auxiliary files
accompanying it are in the directory Cremona/ (see
common/share/Macaulay2/Cremona/ ).

Exports
=======

  * Types
      * RationalMap -- the class of all rational maps
        between absolutely irreducible projective varieties over a field
  * Functions and commands
      * abstractRationalMap -- make an abstract
        rational map
      * approximateInverseMap -- random map
        related to the inverse of a birational map
      * ChernSchwartzMacPherson, --
        Chern-Schwartz-MacPherson class of a projective scheme
      * degreeMap -- degree of a rational map between
        projective varieties
      * EulerCharacteristic -- topological Euler
        characteristic of a (smooth) projective variety
      * exceptionalLocus -- exceptional locus of a
        birational map
      * forceImage -- declare which is the image of a
        rational map
      * forceInverseMap -- declare that two rational
        maps are one the inverse of the other
      * graph -- closure of the graph of a rational map
      * inverseMap -- inverse of a birational map
      * isBirational -- whether a rational map is
        birational
      * isDominant -- whether a rational map is dominant
      * isInverseMap -- checks whether a rational map is
        the inverse of another
      * isMorphism -- whether a rational map is a morphism
      * parametrize -- parametrization of linear varieties
        and hyperquadrics
      * point -- pick a random rational point on a projective
        variety
      * projectiveDegrees -- projective degrees of a
        rational map between projective varieties
      * quadroQuadricCremonaTransformation
        -- quadro-quadric Cremona
        transformations
      * rationalMap -- makes a rational map
      * segre -- Segre embedding
      * SegreClass -- Segre class of a closed subscheme of a
        projective variety
      * specialCremonaTransformation, --
        special Cremona transformations whose base locus has dimension at most
        three
      * specialCubicTransformation, --
        special cubic transformations whose base locus has dimension at most
        three
      * specialQuadraticTransformation,
        -- special quadratic transformations whose base locus has dimension
        three
      * toMap -- rational map defined by a linear system
  * Methods
      * "abstractRationalMap(PolynomialRing,PolynomialRing,FunctionClosure)" --
        see abstractRationalMap, -- make an abstract
        rational map
      * "abstractRationalMap(PolynomialRing,PolynomialRing,FunctionClosure,ZZ)"
        -- see abstractRationalMap, -- make an
        abstract rational map
      * "abstractRationalMap(RationalMap)" -- see abstractRationalMap,
        -- make an abstract rational map
      * "approximateInverseMap(RationalMap)" -- see
        approximateInverseMap, -- random map related to
        the inverse of a birational map
      * "approximateInverseMap(RationalMap,ZZ)" -- see
        approximateInverseMap, -- random map related to
        the inverse of a birational map
      * "approximateInverseMap(RingMap)" -- see approximateInverseMap,
        -- random map related to the inverse of a
        birational map
      * "approximateInverseMap(RingMap,ZZ)" -- see approximateInverseMap,
        -- random map related to the inverse of a
        birational map
      * "ChernSchwartzMacPherson(Ideal)" -- see ChernSchwartzMacPherson,
        -- Chern-Schwartz-MacPherson class of a
        projective scheme
      * coefficientRing(RationalMap),
        -- coefficient ring of a rational map
      * coefficients(RationalMap), --
        coefficient matrix of a rational map
      * degree(RationalMap) -- degree of a
        rational map
      * "degreeMap(RingMap)" -- see degreeMap, -- degree of a
        rational map between projective varieties
      * degreeMap(RationalMap) -- degree of
        a rational map
      * degrees(RationalMap) -- projective
        degrees of a rational map
      * "multidegree(RationalMap)" -- see degrees(RationalMap),
        -- projective degrees of a rational map
      * "? Ideal" -- see describe(RationalMap),
        -- describe a rational map
      * describe(RationalMap) -- describe a
        rational map
      * entries(RationalMap) -- the entries of
        the matrix associated to a rational map
      * "EulerCharacteristic(Ideal)" -- see EulerCharacteristic,
        -- topological Euler characteristic of a (smooth)
        projective variety
      * "exceptionalLocus(RationalMap)" -- see exceptionalLocus,
        -- exceptional locus of a birational map
      * flatten(RationalMap) -- write source
        and target as nondegenerate varieties
      * "forceImage(RationalMap,Ideal)" -- see forceImage, --
        declare which is the image of a rational map
      * "forceInverseMap(RationalMap,RationalMap)" -- see
        forceInverseMap, -- declare that two rational maps are
        one the inverse of the other
      * "graph(RationalMap)" -- see graph, -- closure of the graph
        of a rational map
      * graph(RingMap) -- closure of the graph of a
        rational map
      * ideal(RationalMap) -- base locus of a
        rational map
      * image(RationalMap,String), --
        closure of the image of a rational map using the F4 algorithm
        (experimental)
      * "image(RationalMap)" -- see image(RationalMap,ZZ),
        -- closure of the image of a rational map
      * image(RationalMap,ZZ) -- closure of
        the image of a rational map
      * inverse(RationalMap) -- inverse of a
        birational map
      * "inverse(RationalMap,Option)" -- see inverse(RationalMap),
        -- inverse of a birational map
      * "inverseMap(RationalMap)" -- see inverseMap, --
        inverse of a birational map
      * "inverseMap(RingMap)" -- see inverseMap, -- inverse
        of a birational map
      * "isBirational(RationalMap)" -- see isBirational, --
        whether a rational map is birational
      * "isBirational(RingMap)" -- see isBirational, --
        whether a rational map is birational
      * "isDominant(RationalMap)" -- see isDominant, --
        whether a rational map is dominant
      * "isDominant(RingMap)" -- see isDominant, -- whether a
        rational map is dominant
      * "isInverseMap(RingMap,RingMap)" -- see isInverseMap,
        -- checks whether a rational map is the inverse of
        another
      * isInverseMap(RationalMap,RationalMap)
        -- checks whether two
        rational maps are one the inverse of the other
      * isIsomorphism(RationalMap), --
        whether a birational map is an isomorphism
      * "isMorphism(RationalMap)" -- see isMorphism, --
        whether a rational map is a morphism
      * kernel(RingMap,ZZ) -- homogeneous
        components of the kernel of a homogeneous ring map
      * map(RationalMap) -- get the ring map
        defining a rational map
      * "map(ZZ,RationalMap)" -- see map(RationalMap),
        -- get the ring map defining a rational map
      * matrix(RationalMap) -- the matrix
        associated to a rational map
      * "matrix(ZZ,RationalMap)" -- see matrix(RationalMap),
        -- the matrix associated to a rational map
      * "parametrize(Ideal)" -- see parametrize, --
        parametrization of linear varieties and hyperquadrics
      * "parametrize(PolynomialRing)" -- see parametrize, --
        parametrization of linear varieties and hyperquadrics
      * "parametrize(QuotientRing)" -- see parametrize, --
        parametrization of linear varieties and hyperquadrics
      * "point(PolynomialRing)" -- see point, -- pick a random
        rational point on a projective variety
      * "point(QuotientRing)" -- see point, -- pick a random
        rational point on a projective variety
      * "projectiveDegrees(RingMap)" -- see projectiveDegrees,
        -- projective degrees of a rational map between
        projective varieties
      * projectiveDegrees(RationalMap)
        -- projective degrees of a rational
        map
      * "quadroQuadricCremonaTransformation(Ring,ZZ,ZZ)" -- see
        quadroQuadricCremonaTransformation,
        -- quadro-quadric Cremona transformations
      * "quadroQuadricCremonaTransformation(ZZ,ZZ)" -- see
        quadroQuadricCremonaTransformation,
        -- quadro-quadric Cremona transformations
      * "quadroQuadricCremonaTransformation(ZZ,ZZ,Ring)" -- see
        quadroQuadricCremonaTransformation,
        -- quadro-quadric Cremona transformations
      * "rationalMap(List)" -- see rationalMap, -- makes a
        rational map
      * "rationalMap(Matrix)" -- see rationalMap, -- makes a
        rational map
      * "rationalMap(Ring)" -- see rationalMap, -- makes a
        rational map
      * "rationalMap(Ring,Ring)" -- see rationalMap, --
        makes a rational map
      * "rationalMap(Ring,Ring,List)" -- see rationalMap, --
        makes a rational map
      * "rationalMap(Ring,Ring,Matrix)" -- see rationalMap,
        -- makes a rational map
      * "rationalMap(RingMap)" -- see rationalMap, -- makes
        a rational map
      * RationalMap ! -- calculates every possible thing
      * "compose(RationalMap,RationalMap)" -- see RationalMap * RationalMap,
        -- composition of rational
        maps
      * "compose(RingMap,RingMap)" -- see RationalMap * RationalMap,
        -- composition of rational maps
      * RationalMap * RationalMap, --
        composition of rational maps
      * RationalMap ** Ring -- change the
        coefficient ring of a rational map
      * RationalMap == RationalMap, --
        equality of rational maps
      * "RationalMap == ZZ" -- see RationalMap == RationalMap,
        -- equality of rational maps
      * "ZZ == RationalMap" -- see RationalMap == RationalMap,
        -- equality of rational maps
      * RationalMap ^ ZZ -- power
      * "RationalMap ^*" -- see RationalMap ^** Ideal,
        -- inverse image via a rational map
      * RationalMap ^** Ideal -- inverse
        image via a rational map
      * RationalMap _* -- direct image via a
        rational map
      * "RationalMap Ideal" -- see RationalMap _*, --
        direct image via a rational map
      * RationalMap | Ideal -- restriction of a
        rational map
      * "RationalMap | Ring" -- see RationalMap | Ideal,
        -- restriction of a rational map
      * "RationalMap | RingElement" -- see RationalMap | Ideal,
        -- restriction of a rational map
      * RationalMap || Ideal -- restriction of a
        rational map
      * "RationalMap || Ring" -- see RationalMap || Ideal,
        -- restriction of a rational map
      * "RationalMap || RingElement" -- see RationalMap || Ideal,
        -- restriction of a rational map
      * "rationalMap(Ideal)" -- see rationalMap(Ideal,ZZ,ZZ),
        -- makes a rational map from an ideal
      * "rationalMap(Ideal,List)" -- see rationalMap(Ideal,ZZ,ZZ),
        -- makes a rational map from an ideal
      * "rationalMap(Ideal,ZZ)" -- see rationalMap(Ideal,ZZ,ZZ),
        -- makes a rational map from an ideal
      * rationalMap(Ideal,ZZ,ZZ), --
        makes a rational map from an ideal
      * rationalMap(PolynomialRing,List)
        -- rational map defined by the
        linear system of hypersurfaces passing through random points with
        multiplicity
      * rationalMap(Ring,Tally), --
        rational map defined by an effective divisor
      * "rationalMap(Tally)" -- see rationalMap(Ring,Tally),
        -- rational map defined by an effective
        divisor
      * "segre(PolynomialRing)" -- see segre, -- Segre embedding
      * "segre(QuotientRing)" -- see segre, -- Segre embedding
      * "segre(RationalMap)" -- see segre, -- Segre embedding
      * "SegreClass(Ideal)" -- see SegreClass, -- Segre class
        of a closed subscheme of a projective variety
      * "SegreClass(RationalMap)" -- see SegreClass, -- Segre
        class of a closed subscheme of a projective variety
      * "SegreClass(RingMap)" -- see SegreClass, -- Segre
        class of a closed subscheme of a projective variety
      * source(RationalMap) -- coordinate ring
        of the source for a rational map
      * "specialCremonaTransformation(Ring,ZZ)" -- see
        specialCremonaTransformation, -- special
        Cremona transformations whose base locus has dimension at most three
      * "specialCremonaTransformation(ZZ)" -- see
        specialCremonaTransformation, -- special
        Cremona transformations whose base locus has dimension at most three
      * "specialCremonaTransformation(ZZ,Ring)" -- see
        specialCremonaTransformation, -- special
        Cremona transformations whose base locus has dimension at most three
      * "specialCubicTransformation(Ring,ZZ)" -- see
        specialCubicTransformation, -- special
        cubic transformations whose base locus has dimension at most three
      * "specialCubicTransformation(ZZ)" -- see
        specialCubicTransformation, -- special
        cubic transformations whose base locus has dimension at most three
      * "specialCubicTransformation(ZZ,Ring)" -- see
        specialCubicTransformation, -- special
        cubic transformations whose base locus has dimension at most three
      * "specialQuadraticTransformation(Ring,ZZ)" -- see
        specialQuadraticTransformation, --
        special quadratic transformations whose base locus has dimension three
      * "specialQuadraticTransformation(ZZ)" -- see
        specialQuadraticTransformation, --
        special quadratic transformations whose base locus has dimension three
      * "specialQuadraticTransformation(ZZ,Ring)" -- see
        specialQuadraticTransformation, --
        special quadratic transformations whose base locus has dimension three
      * substitute(RationalMap,PolynomialRing,PolynomialRing),
        --
        substitute the ambient projective spaces of source and target
      * "rationalMap(RationalMap)" -- see super(RationalMap),
        -- get the rational map whose target is a
        projective space
      * super(RationalMap) -- get the rational
        map whose target is a projective space
      * target(RationalMap) -- coordinate ring
        of the target for a rational map
      * toExternalString(RationalMap),
        -- convert to a readable string
      * "toMap(Ideal)" -- see toMap, -- rational map defined by a
        linear system
      * "toMap(Ideal,List)" -- see toMap, -- rational map defined
        by a linear system
      * "toMap(Ideal,ZZ)" -- see toMap, -- rational map defined by
        a linear system
      * "toMap(Ideal,ZZ,ZZ)" -- see toMap, -- rational map defined
        by a linear system
      * "toMap(List)" -- see toMap, -- rational map defined by a
        linear system
      * "toMap(Matrix)" -- see toMap, -- rational map defined by a
        linear system
      * "toMap(RingMap)" -- see toMap, -- rational map defined by
        a linear system
  * Symbols
      * BlowUpStrategy
      * CodimBsInv
      * Dominant
      * MathMode -- whether to ensure correctness of output
      * NumDegrees

For the programmer
==================

The object Cremona, is a package (Macaulay2Doc).

abstractRationalMap -- make an abstract rational map
****************************************************

Synopsis
========

  * Usage:
        abstractRationalMap(R,S,f,d)
        abstractRationalMap(R,S,f)
  * Inputs:
      * R, a polynomial ring (Macaulay2Doc), the
        coordinate ring of the source of the map
      * S, a polynomial ring (Macaulay2Doc), the
        coordinate ring of the target of the map
      * f, a function closure (Macaulay2Doc), the
        abstract definition of the map
      * d, an integer (Macaulay2Doc), (optional) an integer close to
        the degree of the forms defining the map
  * Outputs:
      * a rational map, the abstract rational map from
        Proj(R) to Proj(S) defined by f

Description
===========

The main ingredient behind this method is the interpolation of multivariate
polynomials. We illustrate this feature with some examples.

+-----------------------------------------------------------------------------+
|i1 : f = a -> {-a_1^3*max(sin(a_2),1)+a_0*a_1*a_2*ceiling((log(1 + abs       |
|                                                                             |
|o1 = f                                                                       |
|                                                                             |
|o1 : FunctionClosure                                                         |
|-----------------------------------------------------------------------------|
|a_0))^0),-a_1^2*a_2+a_0*a_1*a_3,-a_1*a_2^2+a_1^2*a_3,-a_1^2*a_3+a_0*a_1*a_4,-|
|-----------------------------------------------------------------------------|
|a_1*a_2*a_3+a_1^2*a_4,-a_1*a_3^2+a_1*a_2*a_4}                                |
+-----------------------------------------------------------------------------+
|i2 : P4 := QQ[t_0..t_4]                                                      |
|                                                                             |
|o2 = QQ[t ..t ]                                                              |
|         0   4                                                               |
|                                                                             |
|o2 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i3 : P5 := QQ[u_0..u_5]                                                      |
|                                                                             |
|o3 = QQ[u ..u ]                                                              |
|         0   5                                                               |
|                                                                             |
|o3 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i4 : time psi = abstractRationalMap(P4,P5,f)                                 |
|     -- used 0.000331038 seconds                                             |
|                                                                             |
|o4 = -- rational map --                                                      |
|     source: Proj(QQ[t , t , t , t , t ])                                    |
|                      0   1   2   3   4                                      |
|     target: Proj(QQ[u , u , u , u , u , u ])                                |
|                      0   1   2   3   4   5                                  |
|     defining forms: given by a function                                     |
|                                                                             |
|o4 : AbstractRationalMap (rational map from PP^4 to PP^5)                    |
+-----------------------------------------------------------------------------+

Now we compute first the degree of the forms defining the abstract map psi and
then the corresponding concrete rational map.

+-----------------------------------------------------------+
|i5 : time projectiveDegrees(psi,3)                         |
|     -- used 0.379584 seconds                              |
|                                                           |
|o5 = 2                                                     |
+-----------------------------------------------------------+
|i6 : time rationalMap psi                                  |
|     -- used 1.71306 seconds                               |
|                                                           |
|o6 = -- rational map --                                    |
|     source: Proj(QQ[t , t , t , t , t ])                  |
|                      0   1   2   3   4                    |
|     target: Proj(QQ[u , u , u , u , u , u ])              |
|                      0   1   2   3   4   5                |
|     defining forms: {                                     |
|                       2                                   |
|                      t  - t t ,                           |
|                       1    0 2                            |
|                                                           |
|                      t t  - t t ,                         |
|                       1 2    0 3                          |
|                                                           |
|                       2                                   |
|                      t  - t t ,                           |
|                       2    1 3                            |
|                                                           |
|                      t t  - t t ,                         |
|                       1 3    0 4                          |
|                                                           |
|                      t t  - t t ,                         |
|                       2 3    1 4                          |
|                                                           |
|                       2                                   |
|                      t  - t t                             |
|                       3    2 4                            |
|                     }                                     |
|                                                           |
|o6 : RationalMap (quadratic rational map from PP^4 to PP^5)|
+-----------------------------------------------------------+

As a second example, we apply the method to compute the inverse of a Cremona
transformation.

+-----------------------------------------------------------------------+
|i7 : phi = rationalMap map specialCremonaTransformation(3,ZZ/10000019);|
|                                                                       |
|o7 : RationalMap (cubic rational map from PP^4 to PP^4)                |
+-----------------------------------------------------------------------+
|i8 : phi' = abstractRationalMap phi                                    |
|                                                                       |
|o8 = -- rational map --                                                |
|                     ZZ                                                |
|     source: Proj(--------[x , x , x , x , x ])                        |
|                  10000019  0   1   2   3   4                          |
|                     ZZ                                                |
|     target: Proj(--------[x , x , x , x , x ])                        |
|                  10000019  0   1   2   3   4                          |
|     defining forms: given by a function (degree = 3)                  |
|                                                                       |
|o8 : AbstractRationalMap (rational map from PP^4 to PP^4)              |
+-----------------------------------------------------------------------+
|i9 : psi' = inverseMap phi'                                            |
|                                                                       |
|o9 = -- rational map --                                                |
|                     ZZ                                                |
|     source: Proj(--------[x , x , x , x , x ])                        |
|                  10000019  0   1   2   3   4                          |
|                     ZZ                                                |
|     target: Proj(--------[x , x , x , x , x ])                        |
|                  10000019  0   1   2   3   4                          |
|     defining forms: given by a function                               |
|                                                                       |
|o9 : AbstractRationalMap (rational map from PP^4 to PP^4)              |
+-----------------------------------------------------------------------+
|i10 : psi = rationalMap psi';                                          |
|                                                                       |
|o10 : RationalMap (quadratic rational map from PP^4 to PP^4)           |
+-----------------------------------------------------------------------+
|i11 : assert(isInverseMap(phi,psi))                                    |
+-----------------------------------------------------------------------+

We now consider a more interesting application. Recall that a closed subvariety
$X\subset\mathbb{P}^n$ is called a subvariety with one apparent double point if
a general point in $\mathbb{P}^n$ lies on a unique secant of $X$. A subvariety
$X\subset\mathbb{P}^n$ with an apparent double point defines a Cremona
involution of $\mathbb{P}^n$: for a general point $x\in\mathbb{P}^n$ we find a
unique secant of $X$ intersecting $X$ at two points $(a,b)$, and then define
the unique $T(x)$ such that the pair $\{x,T(x)\}$ is harmonically conjugate to
$\{a,b\}$. For more details, see Lecture 4 in Lectures on Cremona
transformations, by I. Dolgachev (see
http://www.math.lsa.umich.edu/~idolga/cremonalect.pdf ). This abstract
construction is implemented in the package: if I is the ideal of one apparent
double point variety $X\subset\mathbb{P}^n$, then the command
abstractRationalMap(I,"OADP") returns the abstract rational map above defined.
For instance, we can take $X$ to be the twisted cubic curve in $\mathbb{P}^3$.

+---------------------------------------------------------------------------+
|i12 : ZZ/65521[x_0..x_3]; I = minors(2,matrix{{x_0,x_1,x_2},{x_1,x_2,x_3}})|
|                                                                           |
|                2                           2                              |
|o13 = ideal (- x  + x x , - x x  + x x , - x  + x x )                      |
|                1    0 2     1 2    0 3     2    1 3                       |
|                                                                           |
|                 ZZ                                                        |
|o13 : Ideal of -----[x ..x ]                                               |
|               65521  0   3                                                |
+---------------------------------------------------------------------------+
|i14 : time T = abstractRationalMap(I,"OADP")                               |
|     -- used 0.0817702 seconds                                             |
|                                                                           |
|o14 = -- rational map --                                                   |
|                     ZZ                                                    |
|      source: Proj(-----[x , x , x , x ])                                  |
|                   65521  0   1   2   3                                    |
|                     ZZ                                                    |
|      target: Proj(-----[x , x , x , x ])                                  |
|                   65521  0   1   2   3                                    |
|      defining forms: given by a function                                  |
|                                                                           |
|o14 : AbstractRationalMap (rational map from PP^3 to PP^3)                 |
+---------------------------------------------------------------------------+

The degree of the forms defining the abstract map T can be obtained by the
following command:

+---------------------------------+
|i15 : time projectiveDegrees(T,2)|
|     -- used 3.22836 seconds     |
|                                 |
|o15 = 3                          |
+---------------------------------+

We verify that the composition of T with itself is defined by linear forms:

+----------------------------------------------------------+
|i16 : time T2 = T * T                                     |
|     -- used 0.000034033 seconds                          |
|                                                          |
|o16 = -- rational map --                                  |
|                     ZZ                                   |
|      source: Proj(-----[x , x , x , x ])                 |
|                   65521  0   1   2   3                   |
|                     ZZ                                   |
|      target: Proj(-----[x , x , x , x ])                 |
|                   65521  0   1   2   3                   |
|      defining forms: given by a function                 |
|                                                          |
|o16 : AbstractRationalMap (rational map from PP^3 to PP^3)|
+----------------------------------------------------------+
|i17 : time projectiveDegrees(T2,2)                        |
|     -- used 5.30085 seconds                              |
|                                                          |
|o17 = 1                                                   |
+----------------------------------------------------------+

We verify that the composition of T with itself leaves a random point fixed:

+------------------------------------------+
|i18 : p = apply(3,i->random(ZZ/65521))|{1}|
|                                          |
|o18 = {-22864, 24353, -19331, 1}          |
|                                          |
|o18 : List                                |
+------------------------------------------+
|i19 : q = T p                             |
|                                          |
|o19 = {9593, 20475, 5910, 1}              |
|                                          |
|o19 : List                                |
+------------------------------------------+
|i20 : T q                                 |
|                                          |
|o20 = {-22864, 24353, -19331, 1}          |
|                                          |
|o20 : List                                |
+------------------------------------------+

We now compute the concrete rational map corresponding to T:

+-----------------------------------------------------------------+
|i21 : time f = rationalMap T                                     |
|     -- used 3.68487 seconds                                     |
|                                                                 |
|o21 = -- rational map --                                         |
|                     ZZ                                          |
|      source: Proj(-----[x , x , x , x ])                        |
|                   65521  0   1   2   3                          |
|                     ZZ                                          |
|      target: Proj(-----[x , x , x , x ])                        |
|                   65521  0   1   2   3                          |
|      defining forms: {                                          |
|                          3                       2              |
|                       - x  - 32759x x x  + 32760x x ,           |
|                          1         0 1 2         0 3            |
|                                                                 |
|                             2        2                          |
|                       32760x x  + x x  + 32760x x x ,           |
|                             1 2    0 2         0 1 3            |
|                                                                 |
|                                 2    2                          |
|                       - 32760x x  - x x  - 32760x x x ,         |
|                               1 2    1 3         0 2 3          |
|                                                                 |
|                        3                         2              |
|                       x  + 32759x x x  - 32760x x               |
|                        2         1 2 3         0 3              |
|                      }                                          |
|                                                                 |
|o21 : RationalMap (cubic rational map from PP^3 to PP^3)         |
+-----------------------------------------------------------------+
|i22 : describe f!                                                |
|                                                                 |
|o22 = rational map defined by forms of degree 3                  |
|      source variety: PP^3                                       |
|      target variety: PP^3                                       |
|      dominance: true                                            |
|      birationality: true (the inverse map is already calculated)|
|      projective degrees: {1, 3, 3, 1}                           |
|      number of minimal representatives: 1                       |
|      dimension base locus: 1                                    |
|      degree base locus: 6                                       |
|      coefficient ring: ZZ/65521                                 |
+-----------------------------------------------------------------+

Caveat
======

This is under development yet.

Ways to use abstractRationalMap :
=================================

  * "abstractRationalMap(PolynomialRing,PolynomialRing,FunctionClosure)"
  * "abstractRationalMap(PolynomialRing,PolynomialRing,FunctionClosure,ZZ)"
  * "abstractRationalMap(RationalMap)"

For the programmer
==================

The object abstractRationalMap, is a method function (Macaulay2Doc).

approximateInverseMap -- random map related to the inverse of a birational map
******************************************************************************

Synopsis
========

  * Usage:
        approximateInverseMap phi
        approximateInverseMap(phi,d)
  * Inputs:
      * phi, a rational map, a birational map
      * d, an integer (Macaulay2Doc), optional, but it should be the
        degree of the forms defining the inverse of phi
  * Optional inputs (Macaulay2Doc),:
      * CodimBsInv, => ..., default value null, null
      * MathMode, => ..., default value false, whether to
        ensure correctness of output
      * Verbose, => ...,
        default value true, null
  * Outputs:
      * a rational map, a random rational map which in some
        sense is related to the inverse of phi (e.g., they should have the same
        base locus)

Description
===========

The algorithm is to try to construct the ideal of the base locus of the inverse
by looking for the images via phi of random linear sections of the source
variety. Generally, one can speed up the process by passing through the option
CodimBsInv, a good lower bound for the codimension of this
base locus.

+-----------------------------------------------------------------------------+
|i1 : P8 = ZZ/97[t_0..t_8];                                                   |
+-----------------------------------------------------------------------------+
|i2 : phi = inverseMap rationalMap(trim(minors(2,genericMatrix(P8,3           |
|                                                                             |
|o2 = -- rational map --                                                      |
|                                ZZ                                           |
|     source: subvariety of Proj(--[x , x , x , x , x , x , x , x ,           |
|                                97  0   1   2   3   4   5   6   7            |
|             {                                                               |
|               2 2      2          2 2                                       |
|              x x  + 14x x x  + 26x x  - 2x x x x  - 14x x x x  +            |
|               1 2      1 2 3      1 3     0 1 2 4      0 1 3 4              |
|             }                                                               |
|                  ZZ                                                         |
|     target: Proj(--[t , t , t , t , t , t , t , t , t ])                    |
|                  97  0   1   2   3   4   5   6   7   8                      |
|     defining forms: {                                                       |
|                      x x  - x x ,                                           |
|                       5 7    4 8                                            |
|                                                                             |
|                      x x  - x x ,                                           |
|                       5 6    1 8                                            |
|                                                                             |
|                      x x  - x x ,                                           |
|                       4 6    1 7                                            |
|                                                                             |
|                      x x  - x x ,                                           |
|                       3 7    2 8                                            |
|                                                                             |
|                      x x  - x x ,                                           |
|                       3 6    0 8                                            |
|                                                                             |
|                      x x  - x x ,                                           |
|                       2 6    0 7                                            |
|                                                                             |
|                      x x  - x x ,                                           |
|                       3 4    2 5                                            |
|                                                                             |
|                      x x  - x x ,                                           |
|                       1 3    0 5                                            |
|                                                                             |
|                      x x  - x x                                             |
|                       1 2    0 4                                            |
|                     }                                                       |
|                                                                             |
|o2 : RationalMap (quadratic rational map from hypersurface in PP^9           |
|-----------------------------------------------------------------------------|
|,3))+random(2,P8)),Dominant=>true)                                           |
|                                                                             |
|                                                                             |
|                                                                             |
| x , x ]) defined by                                                         |
|  8   9                                                                      |
|                                                                             |
|                  2      2 2          2      2 2                     2       |
|11x x x x  + 19x x x  + x x  - 11x x x  + 38x x  - 14x x x x  - 11x x x  +   |
|   1 2 3 4      1 3 4    0 4      0 3 4      3 4      0 1 2 5      1 2 5     |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
| to PP^8)                                                                    |
|-----------------------------------------------------------------------------|
|                             2                                               |
|45x x x x  - 19x x x x  + 14x x x  + 11x x x x  - 19x x x x  + 21x x x x  +  |
|   0 1 3 5      1 2 3 5      0 4 5      0 2 4 5      0 3 4 5      2 3 4 5    |
|-----------------------------------------------------------------------------|
|   2 2          2      2 2        2                       2                  |
|26x x  + 19x x x  + 38x x  - 30x x x  - 11x x x x  - 11x x x  + 30x x x x  + |
|   0 5      0 2 5      2 5      1 2 6      1 2 3 6      1 3 6      0 2 4 6   |
|-----------------------------------------------------------------------------|
|                               2                                             |
|22x x x x  + 11x x x x  - 22x x x  + 10x x x x  + 11x x x x  - 42x x x x  -  |
|   1 2 4 6      0 3 4 6      0 4 6      1 2 5 6      0 3 5 6      1 3 5 6    |
|-----------------------------------------------------------------------------|
|                  2        2 2          2     2 2          2      2 2        |
|10x x x x  + 42x x x  - 38x x  - 37x x x  + 7x x  + 28x x x  - 38x x  -      |
|   0 4 5 6      0 5 6      2 6      2 3 6     3 6      2 4 6      4 6        |
|-----------------------------------------------------------------------------|
|      2          2          2      2 2                   2                   |
|3x x x  - 29x x x  - 47x x x  + 36x x  + 30x x x x  - 22x x x  - 20x x x x  -|
|  2 5 6      3 5 6      4 5 6      5 6      0 1 2 7      1 2 7      1 2 3 7  |
|-----------------------------------------------------------------------------|
|     2        2                                   2                          |
|41x x x  - 30x x x  + 22x x x x  + 20x x x x  - 4x x x  + 26x x x x  +       |
|   1 3 7      0 4 7      0 1 4 7      0 3 4 7     3 4 7      1 2 5 7         |
|-----------------------------------------------------------------------------|
|                                                                     2       |
|41x x x x  - 28x x x x  + 4x x x x  - 26x x x x  + 12x x x x  + 28x x x  -   |
|   0 3 5 7      1 3 5 7     2 3 5 7      0 4 5 7      3 4 5 7      0 5 7     |
|-----------------------------------------------------------------------------|
|     2                                                            2          |
|12x x x  - 21x x x x  - 28x x x x  + 37x x x x  + 21x x x x  - 11x x x  -    |
|   2 5 7      0 2 6 7      1 2 6 7      0 3 6 7      2 3 6 7      3 6 7      |
|-----------------------------------------------------------------------------|
|                                                                             |
|28x x x x  - 21x x x x  + 3x x x x  + 47x x x x  + 48x x x x  + 2x x x x  -  |
|   0 4 6 7      1 4 6 7     0 5 6 7      1 5 6 7      2 5 6 7     3 5 6 7    |
|-----------------------------------------------------------------------------|
|                2          2 2          2      2 2          2      2 2       |
|45x x x x  - 33x x x  - 38x x  + 28x x x  - 38x x  - 21x x x  + 48x x  -     |
|   4 5 6 7      5 6 7      0 7      0 1 7      1 7      0 3 7      3 7       |
|-----------------------------------------------------------------------------|
|       2          2          2      2 2                   2            2     |
|48x x x  + 45x x x  - 47x x x  - 48x x  + 11x x x x  - 10x x x  + 20x x x  + |
|   0 5 7      1 5 7      3 5 7      5 7      0 1 2 8      1 2 8      1 2 8   |
|-----------------------------------------------------------------------------|
|                2                       2                                    |
|11x x x x  + 42x x x  + 41x x x x  - 11x x x  + 10x x x x  - 20x x x x  -    |
|   0 1 3 8      1 3 8      1 2 3 8      0 4 8      0 1 4 8      0 2 4 8      |
|-----------------------------------------------------------------------------|
|                                           2          2        2             |
|26x x x x  + 28x x x x  + 4x x x x  + 26x x x  - 12x x x  - 11x x x  -       |
|   1 2 4 8      1 3 4 8     2 3 4 8      0 4 8      3 4 8      0 5 8         |
|-----------------------------------------------------------------------------|
|                            2                                                |
|42x x x x  - 41x x x x  - 4x x x  - 28x x x x  + 12x x x x  + 37x x x x  +   |
|   0 1 5 8      0 2 5 8     2 5 8      0 4 5 8      2 4 5 8      0 2 6 8     |
|-----------------------------------------------------------------------------|
|               2                                                             |
|3x x x x  - 21x x x  - 14x x x x  + 29x x x x  + 11x x x x  + 47x x x x  -   |
|  1 2 6 8      2 6 8      0 3 6 8      1 3 6 8      2 3 6 8      1 4 6 8     |
|-----------------------------------------------------------------------------|
|                            2                                                |
|48x x x x  - 2x x x x  + 45x x x  + 29x x x x  + 25x x x x  + 33x x x x  -   |
|   2 4 6 8     3 4 6 8      4 6 8      0 5 6 8      1 5 6 8      4 5 6 8     |
|-----------------------------------------------------------------------------|
|   2                      2                                                  |
|37x x x  - 3x x x x  - 47x x x  + 21x x x x  + 11x x x x  + x x x x  +       |
|   0 7 8     0 1 7 8      1 7 8      0 2 7 8      0 3 7 8    2 3 7 8         |
|-----------------------------------------------------------------------------|
|                                                                             |
|48x x x x  - 45x x x x  + 47x x x x  - 2x x x x  + 33x x x x  + 47x x x x  - |
|   0 4 7 8      1 4 7 8      3 4 7 8     0 5 7 8      1 5 7 8      2 5 7 8   |
|-----------------------------------------------------------------------------|
|             2 2          2      2 2          2      2 2         2          2|
|x x x x  + 7x x  - 29x x x  + 36x x  - 11x x x  + 48x x  + 2x x x  - 33x x x |
| 4 5 7 8     0 8      0 1 8      1 8      0 2 8      2 8     0 4 8      1 4 8|
|-----------------------------------------------------------------------------|
|         2      2 2                                                          |
|- 47x x x  - 48x x  + 48x x x x  - 48x x x x  - 48x x x x  + 48x x x x  +    |
|     2 4 8      4 8      3 4 6 9      2 5 6 9      1 3 7 9      0 5 7 9      |
|-----------------------------------------------------------------------------|
|48x x x x  - 48x x x x                                                       |
|   1 2 8 9      0 4 8 9                                                      |
+-----------------------------------------------------------------------------+
|i3 : time psi = approximateInverseMap phi                                    |
|-- approximateInverseMap: step 1 of 10                                       |
|-- approximateInverseMap: step 2 of 10                                       |
|-- approximateInverseMap: step 3 of 10                                       |
|-- approximateInverseMap: step 4 of 10                                       |
|-- approximateInverseMap: step 5 of 10                                       |
|-- approximateInverseMap: step 6 of 10                                       |
|-- approximateInverseMap: step 7 of 10                                       |
|-- approximateInverseMap: step 8 of 10                                       |
|-- approximateInverseMap: step 9 of 10                                       |
|-- approximateInverseMap: step 10 of 10                                      |
|     -- used 2.11589 seconds                                                 |
|                                                                             |
|o3 = -- rational map --                                                      |
|                  ZZ                                                         |
|     source: Proj(--[t , t , t , t , t , t , t , t , t ])                    |
|                  97  0   1   2   3   4   5   6   7   8                      |
|                                ZZ                                           |
|     target: subvariety of Proj(--[x , x , x , x , x , x , x , x , x , x ])  |
|                                97  0   1   2   3   4   5   6   7   8   9    |
|             {                                                               |
|               2 2      2          2 2                                       |
|              x x  + 14x x x  + 26x x  - 2x x x x  - 14x x x x  + 11x x x x  |
|               1 2      1 2 3      1 3     0 1 2 4      0 1 3 4      1 2 3 4 |
|             }                                                               |
|     defining forms: {                                                       |
|                      t t  - t t ,                                           |
|                       5 7    4 8                                            |
|                                                                             |
|                      t t  - t t ,                                           |
|                       2 7    1 8                                            |
|                                                                             |
|                      t t  - t t ,                                           |
|                       5 6    3 8                                            |
|                                                                             |
|                      t t  - t t ,                                           |
|                       4 6    3 7                                            |
|                                                                             |
|                      t t  - t t ,                                           |
|                       2 6    0 8                                            |
|                                                                             |
|                      t t  - t t ,                                           |
|                       1 6    0 7                                            |
|                                                                             |
|                      t t  - t t ,                                           |
|                       2 4    1 5                                            |
|                                                                             |
|                      t t  - t t ,                                           |
|                       2 3    0 5                                            |
|                                                                             |
|                      t t  - t t ,                                           |
|                       1 3    0 4                                            |
|                                                                             |
|                       2               2                      2            2 |
|                      t  + 31t t  - 25t  + 7t t  + 3t t  + 21t  + 3t t  - t  |
|                       0      0 1      1     0 2     1 2      2     0 3    3 |
|                     }                                                       |
|                                                                             |
|o3 : RationalMap (quadratic rational map from PP^8 to hypersurface in PP^9)  |
|-----------------------------------------------------------------------------|
|defined by                                                                   |
|                                                                             |
|                                                                             |
|        2      2 2          2      2 2                     2                 |
| + 19x x x  + x x  - 11x x x  + 38x x  - 14x x x x  - 11x x x  + 45x x x x  -|
|      1 3 4    0 4      0 3 4      3 4      0 1 2 5      1 2 5      0 1 3 5  |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                2                                            |
| + 4t t  + 39t t  - 22t t  + 14t  - t t  - 6t t  - 41t t  + 42t t  + 23t t  +|
|     0 4      1 4      3 4      4    0 5     1 5      2 5      3 5      4 5  |
|-----------------------------------------------------------------------------|
|                2                                                 2 2        |
|19x x x x  + 14x x x  + 11x x x x  - 19x x x x  + 21x x x x  + 26x x  + 19x  |
|   1 2 3 5      0 4 5      0 2 4 5      0 3 4 5      2 3 4 5      0 5      0 |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|   2                       2                                                 |
|21t  + 24t t  - 8t t  - 21t  + 41t t  + 13t t  + 15t t  - 22t t  + 38t t  -  |
|   5      0 6     3 6      6      0 7      1 7      3 7      4 7      6 7    |
|-----------------------------------------------------------------------------|
|   2      2 2        2                       2                               |
|x x  + 38x x  - 30x x x  - 11x x x x  - 11x x x  + 30x x x x  + 22x x x x  + |
| 2 5      2 5      1 2 6      1 2 3 6      1 3 6      0 2 4 6      1 2 4 6   |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|   2                                                                         |
|45t  - 45t t  + 20t t  + 44t t  - 40t t  - 22t t  + 37t t  + 22t t  + 28t t  |
|   7      0 8      1 8      2 8      3 8      4 8      5 8      6 8      7 8 |
|-----------------------------------------------------------------------------|
|                  2                                                          |
|11x x x x  - 22x x x  + 10x x x x  + 11x x x x  - 42x x x x  - 10x x x x  +  |
|   0 3 4 6      0 4 6      1 2 5 6      0 3 5 6      1 3 5 6      0 4 5 6    |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|    2                                                                        |
|+ 2t                                                                         |
|    8                                                                        |
|-----------------------------------------------------------------------------|
|     2        2 2          2     2 2          2      2 2         2          2|
|42x x x  - 38x x  - 37x x x  + 7x x  + 28x x x  - 38x x  - 3x x x  - 29x x x |
|   0 5 6      2 6      2 3 6     3 6      2 4 6      4 6     2 5 6      3 5 6|
|-----------------------------------------------------------------------------|
|         2      2 2                   2                         2            |
|- 47x x x  + 36x x  + 30x x x x  - 22x x x  - 20x x x x  - 41x x x  -        |
|     4 5 6      5 6      0 1 2 7      1 2 7      1 2 3 7      1 3 7          |
|-----------------------------------------------------------------------------|
|   2                                   2                                     |
|30x x x  + 22x x x x  + 20x x x x  - 4x x x  + 26x x x x  + 41x x x x  -     |
|   0 4 7      0 1 4 7      0 3 4 7     3 4 7      1 2 5 7      0 3 5 7       |
|-----------------------------------------------------------------------------|
|                                                        2          2         |
|28x x x x  + 4x x x x  - 26x x x x  + 12x x x x  + 28x x x  - 12x x x  -     |
|   1 3 5 7     2 3 5 7      0 4 5 7      3 4 5 7      0 5 7      2 5 7       |
|-----------------------------------------------------------------------------|
|                                                       2                     |
|21x x x x  - 28x x x x  + 37x x x x  + 21x x x x  - 11x x x  - 28x x x x  -  |
|   0 2 6 7      1 2 6 7      0 3 6 7      2 3 6 7      3 6 7      0 4 6 7    |
|-----------------------------------------------------------------------------|
|                                                                             |
|21x x x x  + 3x x x x  + 47x x x x  + 48x x x x  + 2x x x x  - 45x x x x  -  |
|   1 4 6 7     0 5 6 7      1 5 6 7      2 5 6 7     3 5 6 7      4 5 6 7    |
|-----------------------------------------------------------------------------|
|   2          2 2          2      2 2          2      2 2          2         |
|33x x x  - 38x x  + 28x x x  - 38x x  - 21x x x  + 48x x  - 48x x x  +       |
|   5 6 7      0 7      0 1 7      1 7      0 3 7      3 7      0 5 7         |
|-----------------------------------------------------------------------------|
|       2          2      2 2                   2            2                |
|45x x x  - 47x x x  - 48x x  + 11x x x x  - 10x x x  + 20x x x  + 11x x x x  |
|   1 5 7      3 5 7      5 7      0 1 2 8      1 2 8      1 2 8      0 1 3 8 |
|-----------------------------------------------------------------------------|
|     2                       2                                               |
|+ 42x x x  + 41x x x x  - 11x x x  + 10x x x x  - 20x x x x  - 26x x x x  +  |
|     1 3 8      1 2 3 8      0 4 8      0 1 4 8      0 2 4 8      1 2 4 8    |
|-----------------------------------------------------------------------------|
|                              2          2        2                          |
|28x x x x  + 4x x x x  + 26x x x  - 12x x x  - 11x x x  - 42x x x x  -       |
|   1 3 4 8     2 3 4 8      0 4 8      3 4 8      0 5 8      0 1 5 8         |
|-----------------------------------------------------------------------------|
|               2                                                             |
|41x x x x  - 4x x x  - 28x x x x  + 12x x x x  + 37x x x x  + 3x x x x  -    |
|   0 2 5 8     2 5 8      0 4 5 8      2 4 5 8      0 2 6 8     1 2 6 8      |
|-----------------------------------------------------------------------------|
|   2                                                                         |
|21x x x  - 14x x x x  + 29x x x x  + 11x x x x  + 47x x x x  - 48x x x x  -  |
|   2 6 8      0 3 6 8      1 3 6 8      2 3 6 8      1 4 6 8      2 4 6 8    |
|-----------------------------------------------------------------------------|
|               2                                                 2           |
|2x x x x  + 45x x x  + 29x x x x  + 25x x x x  + 33x x x x  - 37x x x  -     |
|  3 4 6 8      4 6 8      0 5 6 8      1 5 6 8      4 5 6 8      0 7 8       |
|-----------------------------------------------------------------------------|
|               2                                                             |
|3x x x x  - 47x x x  + 21x x x x  + 11x x x x  + x x x x  + 48x x x x  -     |
|  0 1 7 8      1 7 8      0 2 7 8      0 3 7 8    2 3 7 8      0 4 7 8       |
|-----------------------------------------------------------------------------|
|                                                                             |
|45x x x x  + 47x x x x  - 2x x x x  + 33x x x x  + 47x x x x  - x x x x  +   |
|   1 4 7 8      3 4 7 8     0 5 7 8      1 5 7 8      2 5 7 8    4 5 7 8     |
|-----------------------------------------------------------------------------|
|  2 2          2      2 2          2      2 2         2          2          2|
|7x x  - 29x x x  + 36x x  - 11x x x  + 48x x  + 2x x x  - 33x x x  - 47x x x |
|  0 8      0 1 8      1 8      0 2 8      2 8     0 4 8      1 4 8      2 4 8|
|-----------------------------------------------------------------------------|
|     2 2                                                                     |
|- 48x x  + 48x x x x  - 48x x x x  - 48x x x x  + 48x x x x  + 48x x x x  -  |
|     4 8      3 4 6 9      2 5 6 9      1 3 7 9      0 5 7 9      1 2 8 9    |
|-----------------------------------------------------------------------------|
|48x x x x                                                                    |
|   0 4 8 9                                                                   |
+-----------------------------------------------------------------------------+
|i4 : assert(phi * psi == 1 and psi * phi == 1)                               |
+-----------------------------------------------------------------------------+
|i5 : time psi' = approximateInverseMap(phi,CodimBsInv=>5);                   |
|-- approximateInverseMap: step 1 of 3                                        |
|-- approximateInverseMap: step 2 of 3                                        |
|-- approximateInverseMap: step 3 of 3                                        |
|     -- used 1.04417 seconds                                                 |
|                                                                             |
|o5 : RationalMap (quadratic rational map from PP^8 to hypersurface in PP^9)  |
+-----------------------------------------------------------------------------+
|i6 : assert(psi == psi')                                                     |
+-----------------------------------------------------------------------------+

A more complicated example is the following (here inverseMap,
takes a lot of time!).

+-----------------------------------------------------------------------------+
|i7 : phi = rationalMap map(P8,ZZ/97[x_0..                                    |
|                                                                             |
|o7 = -- rational map --                                                      |
|                  ZZ                                                         |
|     source: Proj(--[t , t , t , t , t ,                                     |
|                  97  0   1   2   3   4                                      |
|                                ZZ                                           |
|     target: subvariety of Proj(--[x , x                                     |
|                                97  0   1                                    |
|             {                                                               |
|                                2                                            |
|              x x  - 8x x  + 25x  - 25x x                                    |
|               1 3     2 3      3      2                                     |
|                                                                             |
|               2               2                                             |
|              x  + 17x x  - 14x  - 13x x                                     |
|               2      2 3      3      2 4                                    |
|                                                                             |
|                                 2                                           |
|              x x  - 40x x  + 28x  - x x                                     |
|               1 2      2 3      3    0 4                                    |
|             }                                                               |
|     defining forms: {                                                       |
|                       2                                                     |
|                      t  + t t  + t t  +                                     |
|                       4    0 5    1 5                                       |
|                                                                             |
|                                                                             |
|                      t t  + 4t t  + 39t                                     |
|                       3 4     0 5      1                                    |
|                                                                             |
|                                                                             |
|                      t t  - 5t t  - 40t                                     |
|                       2 4     0 5      1                                    |
|                                                                             |
|                                                                             |
|                      t t  - t t  - 8t t                                     |
|                       0 4    0 5     1 5                                    |
|                                                                             |
|                                                                             |
|                      t t  - t t  - t t                                      |
|                       2 3    0 5    1 5                                     |
|                                                                             |
|                                                                             |
|                      t t  - 7t t  + t t                                     |
|                       1 3     1 5    1 6                                    |
|                                                                             |
|                                                                             |
|                      t t  - 46t t  - 39t                                    |
|                       0 3      0 5                                          |
|                                                                             |
|                       2                                                     |
|                      t  - 46t t  - 33t t                                    |
|                       2      1 4      0                                     |
|                                                                             |
|                      t t  + 6t t  + 5t t                                    |
|                       1 2     1 5     0                                     |
|                                                                             |
|                                                                             |
|                      t t  + t t  + 5t t                                     |
|                       0 2    1 4     0 5                                    |
|                                                                             |
|                      t t  - 39t t  + 40t                                    |
|                       0 1      1 4                                          |
|                                                                             |
|                       2                                                     |
|                      t  + 12t t  + 20t t                                    |
|                       0      1 4      0                                     |
|                     }                                                       |
|                                                                             |
|o7 : RationalMap (quadratic rational map                                     |
|-----------------------------------------------------------------------------|
|x_11]/ideal(x_1*x_3-8*x_2*x_3+25*x_3^2-25*x_2*x_4-22*x_3*x_4+x_0*x_5+13*x_2*x|
|                                                                             |
|                                                                             |
|                                                                             |
|t , t , t , t ])                                                             |
| 5   6   7   8                                                               |
|                                                                             |
|, x , x , x , x , x , x , x , x , x  , x  ]) defined by                      |
|   2   3   4   5   6   7   8   9   10   11                                   |
|                                                                             |
|                                                                             |
|  - 22x x  + x x  + 13x x  + 41x x  - x x  + 12x x  + 25x x  + 25x x  + 23x x|
|4      3 4    0 5      2 5      3 5    0 6      2 6      1 7      3 7      5 |
|                                                                             |
|                                                                             |
| + 34x x  + 44x x  - 30x x  + 27x x  + 31x x  - 36x x  - x x  + 13x x  + 8x x|
|      3 4      0 5      2 5      3 5      2 6      3 6    0 7      1 7     3 |
|                                                                             |
|                                                                             |
| + 5x x  - 16x x  + 5x x  - 36x x  + 37x x  + 48x x  - 5x x  - 5x x  + x x  +|
|     2 4      3 4     0 5      2 5      3 5      2 6     1 7     3 7    5 7  |
|                                                                             |
|                                                                             |
|                             2                                               |
|35t t  + 10t t  + 25t t  - 5t  - 14t t  - 14t t  - 5t t  - 13t t  + 37t t  + |
|   2 5      3 5      4 5     5      0 6      1 6     2 6      4 6      5 6   |
|                                                                             |
|                                   2                                         |
|t  - 40t t  + 40t t  + 26t t  - 20t  + 41t t  + 36t t  - 22t t  + 36t t  - 30|
| 5      2 5      3 5      4 5      5      0 6      1 6      2 6      4 6     |
|                                                                             |
|                                   2                                         |
|t  + 12t t  + 47t t  + 37t t  + 25t  - 27t t  - 22t t  + 27t t  - 23t t  + 5t|
| 5      2 5      3 5      4 5      5      0 6      1 6      2 6      4 6     |
|                                                                             |
|                                2                                            |
| - 35t t  - 10t t  - 33t t  + 5t  + 15t t  + 15t t  + 5t t  + 15t t  - 38t t |
|      2 5      3 5      4 5     5      0 6      1 6     2 6      4 6      5 6|
|                                                                             |
|                               2                                             |
|- 35t t  - 10t t  - 33t t  + 5t  + 14t t  + 14t t  + 5t t  + 14t t  - 31t t  |
|     2 5      3 5      4 5     5      0 6      1 6     2 6      4 6      5 6 |
|                                                                             |
|                    2                                                        |
| + t t  - 7t t  + 2t  - t t ,                                                |
|    4 6     5 6     6    3 7                                                 |
|                                                                             |
|                                    2                                        |
| t  - 43t t  - 41t t  - 26t t  - 28t  - 35t t  - 36t t  + 20t t  - 36t t  + 9|
|1 5      2 5      3 5      4 5      5      0 6      1 6      2 6      4 6    |
|                                                                             |
|                                           2                                 |
|  - 45t t  - 39t t  - 39t t  - 46t t  - 29t  - 48t t  - 38t t  - 30t t  + 19t|
|5      1 5      2 5      3 5      4 5      5      0 6      1 6      2 6      |
|                                                                             |
|  - 2t t  - t t  - t t  + 5t t  + t t  - 2t t  - 7t t  + 2t t  - 2t t  + 3t t|
|6     1 6    4 6    5 6     0 7    1 7     2 7     5 7     6 7     1 8     7 |
|                                                                             |
|                                          2                                  |
| + 32t t  - 20t t  - 47t t  - 37t t  - 25t  + 19t t  + 22t t  - 25t t  + 25t |
|      1 5      2 5      3 5      4 5      5      0 6      1 6      2 6      4|
|                                                                             |
| t  - 37t t  - 39t t  + 19t t  - 39t t  - 38t t  + 39t t  + 19t t  + 18t t  -|
|1 5      0 6      1 6      4 6      5 6      0 7      1 7      2 7      5 7  |
|                                                                             |
|                                          2                                  |
|  + 27t t  - 8t t  + 37t t  + 28t t  + 30t  - 46t t  + 24t t  - 40t t  + 25t |
|5      1 5     2 5      3 5      4 5      5      0 6      1 6      2 6      4|
|                                                                             |
|                                                                             |
|from PP^8 to 8-dimensional subvariety of PP^11)                              |
|-----------------------------------------------------------------------------|
|_5+41*x_3*x_5-x_0*x_6+12*x_2*x_6+25*x_1*x_7                                  |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|  - 3x x  + 2x x  + 11x x  - 37x x  - 23x x                                  |
|7     6 7     0 8      1 8      3 8      4                                   |
|                                                                             |
|                                                                             |
|  + 9x x  + 46x x  + 41x x  - 7x x  - 34x x                                  |
|7     5 7      6 7      0 8     1 8      3                                   |
|                                                                             |
|                                                                             |
| 20x x  + 10x x  + 34x x  + 41x x  - x x  +                                  |
|    6 7      0 8      1 8      3 8    4 8                                    |
|                                                                             |
|                                                                             |
|   2                                                                         |
|22t  - 31t t  + 26t t  + 12t t  - 45t t  -                                   |
|   6      3 7      4 7      5 7      6 7                                     |
|                                                                             |
|          2                                                                  |
|t t  - 13t  - 25t t  + 5t t  - 35t t  + 10t                                  |
| 5 6      6      3 7     4 7      5 7                                        |
|                                                                             |
|         2                                                                   |
| t  - 13t  - 39t t  - 29t t  + 9t t  + 39t                                   |
|5 6      6      3 7      4 7     5 7      6                                  |
|                                                                             |
|      2                                                                      |
| - 22t  + 31t t  - 25t t  - 19t t  + 47t t                                   |
|      6      3 7      4 7      5 7      6 7                                  |
|                                                                             |
|     2                                                                       |
|- 24t  + 32t t  - 25t t  - 19t t  + 47t t                                    |
|     6      3 7      4 7      5 7      6 7                                   |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|          2                                                                  |
|t t  + 15t  + 26t t  - 5t t  + 35t t  - 10t                                  |
| 5 6      6      3 7     4 7      5 7                                        |
|                                                                             |
|                  2                                                          |
| t  - 44t t  - 47t  - 36t t  - 46t t  + t t                                  |
|4 6      5 6      6      0 7      1 7    2                                   |
|                                                                             |
| ,                                                                           |
|8                                                                            |
|                                                                             |
|                2                                                            |
|t  - 5t t  + 13t  + 5t t  + t t  + 39t t  +                                  |
| 6     5 6      6     0 7    1 7      3 7                                    |
|                                                                             |
| 19t t  + 19t t  + 20t t ,                                                   |
|    6 7      1 8      7 8                                                    |
|                                                                             |
|                 2                                                           |
|t  + 16t t  - 35t  + 29t t  + 12t t  - 35t                                   |
| 6      5 6      6      0 7      1 7      2                                  |
|-----------------------------------------------------------------------------|
|+25*x_3*x_7+23*x_5*x_7-3*x_6*x_7+2*x_0*x_8+11*x_1*x_8-37*x_3*x_8-23*x_4*x    |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|  - 33x x  + 8x x  + 10x x  - 25x x  - 9x x  + 3x x  + 24x x  - 27x x  -     |
|8      6 8     0 9      1 9      2 9     3 9     4 9      5 9      6 9       |
|                                                                             |
|                                                                             |
|  - 9x x  - 46x x  - 17x x  + 32x x  - 8x x  - 35x x  - 46x x  + 26x x  +    |
|8     4 8      6 8      0 9      1 9     2 9      3 9      4 9      5 9      |
|                                                                             |
|                                                                             |
| x x  + 40x x  - 32x x  + 5x x  - 11x x  - 20x x  + 45x x  - 14x x  - 25x    |
|  6 8      0 9      1 9     2 9      3 9      4 9      5 9      6 9          |
|                                                                             |
|                                                                             |
|                                                                             |
|46t t  + 37t t  + 28t t  + 33t t ,                                           |
|   3 8      4 8      5 8      6 8                                            |
|                                                                             |
|                                                                             |
| t  + 11t t  + 46t t  + 29t t  + 28t t ,                                     |
|6 7      3 8      4 8      5 8      6 8                                      |
|                                                                             |
|                                                                             |
|t  + 36t t  + 13t t  + 26t t  + 37t t ,                                      |
| 7      3 8      4 8      5 8      6 8                                       |
|                                                                             |
|                                                                             |
| + 46t t  - 36t t  - 35t t  - 31t t ,                                        |
|      3 8      4 8      5 8      6 8                                         |
|                                                                             |
|                                                                             |
|+ 46t t  - 36t t  - 35t t  - 31t t ,                                         |
|     3 8      4 8      5 8      6 8                                          |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
| t  - 10t t  - 46t t  + 47t t  - 25t t ,                                     |
|6 7      3 8      4 8      5 8      6 8                                      |
|                                                                             |
|                                                                             |
|  - 44t t  + 48t t  - 14t t  + 4t t  - 36t t  - 46t t  + 47t t  - 34t t      |
|7      3 7      4 7      5 7     6 7      0 8      1 8      2 8      3 8     |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
| 28t t  - 9t t  - 39t t  + 4t t  + t t  - 36t t  - 14t t  - 26t t  - 37t     |
|    4 7     5 7      6 7     0 8    1 8      3 8      4 8      5 8      6    |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|t  - 8t t  - 18t t  + 42t t  - 12t t  - 6t t  + 12t t  - 15t t  + 9t t  +    |
| 7     3 7      4 7      5 7      6 7     0 8      1 8      3 8     4 8      |
|-----------------------------------------------------------------------------|
|_8-33*x_6*x_8+8*x_0*x_9+10*x_1*x_9-25*x_2*x_9-9*x_3*x_9+3*x_4*x_9+24*x_5*x_  |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|5x x   + 28x x   + 37x x   + 9x x   + 27x x   - 25x x   + 9x x   + 27x x     |
|  0 10      1 10      2 10     4 10      6 10      0 11     2 11      4 11   |
|                                                                             |
|                                                                             |
| 17x x  + 15x x   + 35x x   + 34x x   + 20x x   + 14x x   + 36x x   + 35x x  |
|    6 9      0 10      1 10      2 10      4 10      0 11      1 11      2   |
|                                                                             |
|                                                                             |
| x   + 45x x   - 41x x   - 46x x   + 8x x   - 28x x   + 11x x   + 14x x   -  |
|0 10      1 10      2 10      4 10     6 10      0 11      2 11      4 11    |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|- 24t t  - 12t t  - 47t t  + 47t t ,                                         |
|     4 8      5 8      6 8      7 8                                          |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|t ,                                                                          |
| 8                                                                           |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
| 20t t  - 30t t  + 4t t                                                      |
|    5 8      6 8     7 8                                                     |
|-----------------------------------------------------------------------------|
|9-27*x_6*x_9-5*x_0*x_10+28*x_1*x_10+37*x_2*x_10+9*x_4*x_10+27*x_6*x_10-25*x_0|
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|- 27x x  ,                                                                   |
|     5 11                                                                    |
|                                                                             |
|                                                                             |
|   - 17x x  ,                                                                |
|11      4 11                                                                 |
|                                                                             |
|                                                                             |
| 8x x                                                                        |
|   5 11                                                                      |
|-----------------------------------------------------------------------------|
|*x_11+9*x_2*x_11+27*x_4*x_11-27*x_5*x_11,x_2^2+17*x_2*x_3-14*x_3^2-13*x_2*x_4|
|-----------------------------------------------------------------------------|
|+34*x_3*x_4+44*x_0*x_5-30*x_2*x_5+27*x_3*x_5+31*x_2*x_6-36*x_3*x_6-x_0*x_7+13|
|-----------------------------------------------------------------------------|
|*x_1*x_7+8*x_3*x_7+9*x_5*x_7+46*x_6*x_7+41*x_0*x_8-7*x_1*x_8-34*x_3*x_8-9*x_4|
|-----------------------------------------------------------------------------|
|*x_8-46*x_6*x_8-17*x_0*x_9+32*x_1*x_9-8*x_2*x_9-35*x_3*x_9-46*x_4*x_9+26*x_5*|
|-----------------------------------------------------------------------------|
|x_9+17*x_6*x_9+15*x_0*x_10+35*x_1*x_10+34*x_2*x_10+20*x_4*x_10+14*x_0*x_11+36|
|-----------------------------------------------------------------------------|
|*x_1*x_11+35*x_2*x_11-17*x_4*x_11,x_1*x_2-40*x_2*x_3+28*x_3^2-x_0*x_4+5*x_2*x|
|-----------------------------------------------------------------------------|
|_4-16*x_3*x_4+5*x_0*x_5-36*x_2*x_5+37*x_3*x_5+48*x_2*x_6-5*x_1*x_7-5*x_3*x_7+|
|-----------------------------------------------------------------------------|
|x_5*x_7+20*x_6*x_7+10*x_0*x_8+34*x_1*x_8+41*x_3*x_8-x_4*x_8+x_6*x_8+40*x_0*x_|
|-----------------------------------------------------------------------------|
|9-32*x_1*x_9+5*x_2*x_9-11*x_3*x_9-20*x_4*x_9+45*x_5*x_9-14*x_6*x_9-25*x_0*x_ |
|-----------------------------------------------------------------------------|
|10+45*x_1*x_10-41*x_2*x_10-46*x_4*x_10+8*x_6*x_10-28*x_0*x_11+11*x_2*x_11+14*|
|-----------------------------------------------------------------------------|
|x_4*x_11-8*x_5*x_11),{t_4^2+t_0*t_5+t_1*t_5+35*t_2*t_5+10*t_3*t_5+25*t_4*t_5-|
|-----------------------------------------------------------------------------|
|5*t_5^2-14*t_0*t_6-14*t_1*t_6-5*t_2*t_6-13*t_4*t_6+37*t_5*t_6+22*t_6^2-31*t_3|
|-----------------------------------------------------------------------------|
|*t_7+26*t_4*t_7+12*t_5*t_7-45*t_6*t_7-46*t_3*t_8+37*t_4*t_8+28*t_5*t_8+33*t_6|
|-----------------------------------------------------------------------------|
|*t_8,t_3*t_4+4*t_0*t_5+39*t_1*t_5-40*t_2*t_5+40*t_3*t_5+26*t_4*t_5-20*t_5^2+ |
|-----------------------------------------------------------------------------|
|41*t_0*t_6+36*t_1*t_6-22*t_2*t_6+36*t_4*t_6-30*t_5*t_6-13*t_6^2-25*t_3*t_7+5*|
|-----------------------------------------------------------------------------|
|t_4*t_7-35*t_5*t_7+10*t_6*t_7+11*t_3*t_8+46*t_4*t_8+29*t_5*t_8+28*t_6*t_8,t_2|
|-----------------------------------------------------------------------------|
|*t_4-5*t_0*t_5-40*t_1*t_5+12*t_2*t_5+47*t_3*t_5+37*t_4*t_5+25*t_5^2-27*t_0*t_|
|-----------------------------------------------------------------------------|
|6-22*t_1*t_6+27*t_2*t_6-23*t_4*t_6+5*t_5*t_6-13*t_6^2-39*t_3*t_7-29*t_4*t_7+9|
|-----------------------------------------------------------------------------|
|*t_5*t_7+39*t_6*t_7+36*t_3*t_8+13*t_4*t_8+26*t_5*t_8+37*t_6*t_8,t_0*t_4-t_0*t|
|-----------------------------------------------------------------------------|
|_5-8*t_1*t_5-35*t_2*t_5-10*t_3*t_5-33*t_4*t_5+5*t_5^2+15*t_0*t_6+15*t_1*t_6+5|
|-----------------------------------------------------------------------------|
|*t_2*t_6+15*t_4*t_6-38*t_5*t_6-22*t_6^2+31*t_3*t_7-25*t_4*t_7-19*t_5*t_7+47*t|
|-----------------------------------------------------------------------------|
|_6*t_7+46*t_3*t_8-36*t_4*t_8-35*t_5*t_8-31*t_6*t_8,t_2*t_3-t_0*t_5-t_1*t_5-35|
|-----------------------------------------------------------------------------|
|*t_2*t_5-10*t_3*t_5-33*t_4*t_5+5*t_5^2+14*t_0*t_6+14*t_1*t_6+5*t_2*t_6+14*t_4|
|-----------------------------------------------------------------------------|
|*t_6-31*t_5*t_6-24*t_6^2+32*t_3*t_7-25*t_4*t_7-19*t_5*t_7+47*t_6*t_7+46*t_3*t|
|-----------------------------------------------------------------------------|
|_8-36*t_4*t_8-35*t_5*t_8-31*t_6*t_8,t_1*t_3-7*t_1*t_5+t_1*t_6+t_4*t_6-7*t_5*t|
|-----------------------------------------------------------------------------|
|_6+2*t_6^2-t_3*t_7,t_0*t_3-46*t_0*t_5-39*t_1*t_5-43*t_2*t_5-41*t_3*t_5-26*t_4|
|-----------------------------------------------------------------------------|
|*t_5-28*t_5^2-35*t_0*t_6-36*t_1*t_6+20*t_2*t_6-36*t_4*t_6+9*t_5*t_6+15*t_6^2+|
|-----------------------------------------------------------------------------|
|26*t_3*t_7-5*t_4*t_7+35*t_5*t_7-10*t_6*t_7-10*t_3*t_8-46*t_4*t_8+47*t_5*t_8- |
|-----------------------------------------------------------------------------|
|25*t_6*t_8,t_2^2-46*t_1*t_4-33*t_0*t_5-45*t_1*t_5-39*t_2*t_5-39*t_3*t_5-46*t_|
|-----------------------------------------------------------------------------|
|4*t_5-29*t_5^2-48*t_0*t_6-38*t_1*t_6-30*t_2*t_6+19*t_4*t_6-44*t_5*t_6-47*t_6^|
|-----------------------------------------------------------------------------|
|2-36*t_0*t_7-46*t_1*t_7+t_2*t_7-44*t_3*t_7+48*t_4*t_7-14*t_5*t_7+4*t_6*t_7-36|
|-----------------------------------------------------------------------------|
|*t_0*t_8-46*t_1*t_8+47*t_2*t_8-34*t_3*t_8-24*t_4*t_8-12*t_5*t_8-47*t_6*t_8+47|
|-----------------------------------------------------------------------------|
|*t_7*t_8,t_1*t_2+6*t_1*t_5+5*t_0*t_6-2*t_1*t_6-t_4*t_6-t_5*t_6+5*t_0*t_7+t_1*|
|-----------------------------------------------------------------------------|
|t_7-2*t_2*t_7-7*t_5*t_7+2*t_6*t_7-2*t_1*t_8+3*t_7*t_8,t_0*t_2+t_1*t_4+5*t_0*t|
|-----------------------------------------------------------------------------|
|_5+32*t_1*t_5-20*t_2*t_5-47*t_3*t_5-37*t_4*t_5-25*t_5^2+19*t_0*t_6+22*t_1*t_6|
|-----------------------------------------------------------------------------|
|-25*t_2*t_6+25*t_4*t_6-5*t_5*t_6+13*t_6^2+5*t_0*t_7+t_1*t_7+39*t_3*t_7+28*t_4|
|-----------------------------------------------------------------------------|
|*t_7-9*t_5*t_7-39*t_6*t_7+4*t_0*t_8+t_1*t_8-36*t_3*t_8-14*t_4*t_8-26*t_5*t_8-|
|-----------------------------------------------------------------------------|
|37*t_6*t_8,t_0*t_1-39*t_1*t_4+40*t_1*t_5-37*t_0*t_6-39*t_1*t_6+19*t_4*t_6-39*|
|-----------------------------------------------------------------------------|
|t_5*t_6-38*t_0*t_7+39*t_1*t_7+19*t_2*t_7+18*t_5*t_7-19*t_6*t_7+19*t_1*t_8+20*|
|-----------------------------------------------------------------------------|
|t_7*t_8,t_0^2+12*t_1*t_4+20*t_0*t_5+27*t_1*t_5-8*t_2*t_5+37*t_3*t_5+28*t_4*t_|
|-----------------------------------------------------------------------------|
|5+30*t_5^2-46*t_0*t_6+24*t_1*t_6-40*t_2*t_6+25*t_4*t_6+16*t_5*t_6-35*t_6^2+29|
|-----------------------------------------------------------------------------|
|*t_0*t_7+12*t_1*t_7-35*t_2*t_7-8*t_3*t_7-18*t_4*t_7+42*t_5*t_7-12*t_6*t_7-6*t|
|-----------------------------------------------------------------------------|
|_0*t_8+12*t_1*t_8-15*t_3*t_8+9*t_4*t_8+20*t_5*t_8-30*t_6*t_8+4*t_7*t_8})     |
+-----------------------------------------------------------------------------+
|i8 : -- without the option 'CodimBsInv=>4', it takes about                   |
|     time psi=approximateInverseMap(phi,CodimBsInv=>4)                       |
|-- approximateInverseMap: step 1 of 3                                        |
|-- approximateInverseMap: step 2 of 3                                        |
|-- approximateInverseMap: step 3 of 3                                        |
|     -- used 5.10168 seconds                                                 |
|                                                                             |
|o8 = -- rational map --                                                      |
|                                ZZ                                           |
|     source: subvariety of Proj(--[x , x , x , x , x , x ,                   |
|                                97  0   1   2   3   4   5                    |
|             {                                                               |
|                                2                                            |
|              x x  - 8x x  + 25x  - 25x x  - 22x x  + x x                    |
|               1 3     2 3      3      2 4      3 4    0 5                   |
|                                                                             |
|               2               2                                             |
|              x  + 17x x  - 14x  - 13x x  + 34x x  + 44x x                   |
|               2      2 3      3      2 4      3 4      0 5                  |
|                                                                             |
|                                 2                                           |
|              x x  - 40x x  + 28x  - x x  + 5x x  - 16x x                    |
|               1 2      2 3      3    0 4     2 4      3 4                   |
|             }                                                               |
|                  ZZ                                                         |
|     target: Proj(--[t , t , t , t , t , t , t , t , t ])                    |
|                  97  0   1   2   3   4   5   6   7   8                      |
|     defining forms: {                                                       |
|                      x x  + 2x x  + x x  + 2x x  - 4x x  -                  |
|                       3 5     5 7    1 8     2 8     3 8                    |
|                                                                             |
|                      x x  + 6x x  + 2x x  + 5x x  - 10x x                   |
|                       2 5     5 7     1 8     2 8      3 8                  |
|                                                                             |
|                      x x  + 8x x  + x x  + 4x x  + 10x x                    |
|                       0 5     5 7    0 8     1 8      2 8                   |
|                                                                             |
|                      x x  - 4x x  + 46x x  - 38x x  - 43x                   |
|                       3 4     2 6      3 6      3 7      5                  |
|                                                                             |
|                      x x  + 17x x  + 41x x  - x x  - 18x x                  |
|                       2 4      2 6      3 6    1 7      3                   |
|                                                                             |
|                       2                                                     |
|                      x  - 32x x  + 42x x  + 27x x  - 42x x                  |
|                       3      0 4      0 6      2 6      3                   |
|                                                                             |
|                      x x  + x x  - 16x x  - 10x x  + 2x x                   |
|                       2 3    0 4      2 6      3 6     0 7                  |
|                                                                             |
|                       2                                                     |
|                      x  + 36x x  + x x  + 7x x  - 4x x  -                   |
|                       1      0 4    4 5     0 6     1 6                     |
|                                                                             |
|                      x x  + 2x x  - 5x x  - 34x x  - 16x x                  |
|                       0 1     0 2     0 3      0 4      0                   |
|                     }                                                       |
|                                                                             |
|o8 : RationalMap (quadratic rational map from 8-dimensional                  |
|-----------------------------------------------------------------------------|
|triple time                                                                  |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|x , x , x , x , x  , x  ]) defined by                                        |
| 6   7   8   9   10   11                                                     |
|                                                                             |
|                                                                             |
|+ 13x x  + 41x x  - x x  + 12x x  + 25x x  + 25x x  + 23x x  - 3x x  + 2x x  |
|     2 5      3 5    0 6      2 6      1 7      3 7      5 7     6 7     0   |
|                                                                             |
|                                                                             |
| - 30x x  + 27x x  + 31x x  - 36x x  - x x  + 13x x  + 8x x  + 9x x  + 46x   |
|      2 5      3 5      2 6      3 6    0 7      1 7     3 7     5 7      6  |
|                                                                             |
|                                                                             |
|+ 5x x  - 36x x  + 37x x  + 48x x  - 5x x  - 5x x  + x x  + 20x x  + 10x x   |
|    0 5      2 5      3 5      2 6     1 7     3 7    5 7      6 7      0 8  |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
| 2x x  + x x  - 6x x  - 5x x   - 10x x   + 25x x   + 5x x   - 5x x  ,        |
|   4 8    5 8     5 9     1 10      2 10      3 10     4 10     5 10         |
|                                                                             |
| - 6x x  - 46x x  - 44x x  - 22x x  + 36x x   - 25x x   + 14x x   + 15x x    |
|     4 8      5 8      6 8      5 9      1 10      2 10      3 10      4 10  |
|                                                                             |
|- 25x x  - 8x x  + 5x x  - 25x x  - 20x x   - 45x x   + 28x x   + 20x x   -  |
|     3 8     4 8     5 8      5 9      1 10      2 10      3 10      4 10    |
|                                                                             |
|x  - 39x x  - 41x x  + 19x x  + 40x x  + 43x x  - 39x x  - 37x x  + 3x x  +  |
| 7      6 7      1 8      2 8      3 8      4 8      5 8      6 8     1 9    |
|                                                                             |
|  + 46x x  - 16x x  - 36x x  + 9x x  - 27x x  - 46x x  - 44x x  - 29x x  -   |
|7      5 7      6 7      1 8     2 8      3 8      4 8      5 8      6 8     |
|                                                                             |
|                                                                             |
|  + 33x x  + 33x x  - 21x x  - 25x x  + 45x x  + 23x x  + 10x x  - 7x x  +   |
|6      0 7      2 7      3 7      5 7      6 7      0 8      1 8     2 8     |
|                                                                             |
| + 2x x  + 34x x  + 22x x  + 38x x  + x x  + 30x x  - 21x x  - 34x x  - 21x  |
|     2 7      3 7      5 7      6 7    0 8      1 8      2 8      3 8        |
|                                                                             |
|                                                                             |
|21x x  + 30x x  - x x  - 5x x  - 29x x  + 2x x  - 29x x  - 27x x  - 5x x  +  |
|   2 6      3 6    4 6     5 6      0 7     1 7      2 7      3 7     5 7    |
|                                                                             |
|  + 31x x  + 29x x  + 10x x  - 27x x  - 31x x  - 17x x  - 28x x  + 39x x  -  |
|6      0 7      2 7      3 7      5 7      6 7      0 8      1 8      2 8    |
|                                                                             |
|                                                                             |
| subvariety of PP^11 to PP^8)                                                |
|-----------------------------------------------------------------------------|
|  + 11x x  - 37x x  - 23x x  - 33x x  + 8x x  + 10x x  - 25x x  - 9x x  + 3x |
|8      1 8      3 8      4 8      6 8     0 9      1 9      2 9     3 9     4|
|                                                                             |
|                                                                             |
|x  + 41x x  - 7x x  - 34x x  - 9x x  - 46x x  - 17x x  + 32x x  - 8x x  - 35x|
| 7      0 8     1 8      3 8     4 8      6 8      0 9      1 9     2 9      |
|                                                                             |
|                                                                             |
| + 34x x  + 41x x  - x x  + x x  + 40x x  - 32x x  + 5x x  - 11x x  - 20x x  |
|      1 8      3 8    4 8    6 8      0 9      1 9     2 9      3 9      4 9 |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
| + 36x x   + 36x x   - 36x x  ,                                              |
|      5 10      6 10      5 11                                               |
|                                                                             |
| 25x x  ,                                                                    |
|    5 10                                                                     |
|                                                                             |
| 38x x  - 2x x  + 39x x  - 11x x  - 28x x   + 21x x   - 5x x   - 10x x   + x |
|    2 9     3 9      4 9      5 9      1 10      2 10     3 10      4 10    5|
|                                                                             |
|17x x  + 18x x  + 45x x  + 16x x  + 5x x  + 36x x  + 39x x   - 36x x   - 33x |
|   1 9      2 9      3 9      4 9     5 9      6 9      1 10      2 10      3|
|                                                                             |
|                                                                             |
|5x x  - 7x x  + 45x x  + 25x x  - 47x x  + 4x x  - 29x x  + 32x x  - 13x x  -|
|  3 8     4 8      5 8      6 8      0 9     1 9      2 9      3 9      4 9  |
|                                                                             |
| x  + 38x x  + 46x x  - 6x x  + 12x x  - 48x x  + 17x x  - 39x x  - 44x x  - |
|4 8      5 8      6 8     0 9      1 9      2 9      3 9      4 9      5 9   |
|                                                                             |
|                                                                             |
| 4x x  + 17x x  - 44x x  + 18x x  - 42x x  + 39x x  + 9x x  - 13x x  + 48x x |
|   6 7      0 8      1 8      2 8      3 8      4 8     5 8      6 8      0 9|
|                                                                             |
| 32x x  - 7x x  - 29x x  - 47x x  + 35x x  + 38x x  - 43x x  - 2x x  - 32x x |
|    3 8     4 8      5 8      6 8      0 9      1 9      2 9     3 9      4 9|
|-----------------------------------------------------------------------------|
|x  + 24x x  - 27x x  - 5x x   + 28x x   + 37x x   + 9x x   + 27x x   - 25x x |
| 9      5 9      6 9     0 10      1 10      2 10     4 10      6 10      0  |
|                                                                             |
|                                                                             |
| x  - 46x x  + 26x x  + 17x x  + 15x x   + 35x x   + 34x x   + 20x x   + 14x |
|3 9      4 9      5 9      6 9      0 10      1 10      2 10      4 10       |
|                                                                             |
|                                                                             |
|+ 45x x  - 14x x  - 25x x   + 45x x   - 41x x   - 46x x   + 8x x   - 28x x   |
|     5 9      6 9      0 10      1 10      2 10      4 10     6 10      0 11 |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|x   - x x   - 46x x   + 2x x   + x x  ,                                      |
| 10    6 10      1 11     2 11    5 11                                       |
|                                                                             |
|x   - 29x x   + 26x x   - 26x x   - 41x x   - 45x x   - 36x x   + 26x x  ,   |
| 10      4 10      5 10      6 10      1 11      2 11      4 11      5 11    |
|                                                                             |
|                                                                             |
| 47x x  - 42x x  - 18x x   - 5x x   + 44x x   - 39x x   - 15x x   - 31x x    |
|    5 9      6 9      0 10     1 10      2 10      3 10      4 10      5 10  |
|                                                                             |
|5x x   - 15x x   - 13x x   - 20x x   - 45x x   + 4x x   - 4x x   + 10x x   + |
|  0 10      1 10      2 10      3 10      4 10     5 10     6 10      1 11   |
|                                                                             |
|                                                                             |
| - 32x x  - 37x x  - 4x x  - 38x x  + 10x x  + 13x x  + 12x x   + 35x x   +  |
|      1 9      2 9     3 9      4 9      5 9      6 9      0 10      1 10    |
|                                                                             |
| - 43x x  + 12x x  - 12x x   + 14x x   - 47x x   - 46x x   - 14x x   + 48x x |
|      5 9      6 9      0 10      1 10      2 10      3 10      4 10      5  |
|-----------------------------------------------------------------------------|
|   + 9x x   + 27x x   - 27x x  ,                                             |
|11     2 11      4 11      5 11                                              |
|                                                                             |
|                                                                             |
| x   + 36x x   + 35x x   - 17x x  ,                                          |
|0 11      1 11      2 11      4 11                                           |
|                                                                             |
|                                                                             |
| + 11x x   + 14x x   - 8x x                                                  |
|      2 11      4 11     5 11                                                |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|+ 15x x   - 17x x   - 29x x   + 35x x   - 17x x   - 31x x  ,                 |
|     6 10      0 11      1 11      2 11      3 11      5 11                  |
|                                                                             |
| 8x x   + 4x x  ,                                                            |
|   2 11     5 11                                                             |
|                                                                             |
|                                                                             |
|13x x   + 31x x   + 30x x   - 45x x   - 15x x   + 37x x   + 44x x   + 7x x   |
|   2 10      3 10      4 10      5 10      6 10      0 11      1 11     2 11 |
|                                                                             |
|   + 12x x   - 12x x   + 48x x   - x x   - 9x x   + 48x x                    |
|10      6 10      0 11      1 11    2 11     3 11      5 11                  |
|-----------------------------------------------------------------------------|
|+ 9x x   - 25x x   - 45x x  ,                                                |
|    3 11      4 11      5 11                                                 |
+-----------------------------------------------------------------------------+
|i9 : -- but...                                                               |
|     phi * psi == 1                                                          |
|                                                                             |
|o9 = false                                                                   |
+-----------------------------------------------------------------------------+
|i10 : -- in this case we can remedy enabling the option MathMode             |
|      time psi = approximateInverseMap(phi,CodimBsInv=>4,MathMode=>true)     |
|-- approximateInverseMap: step 1 of 3                                        |
|-- approximateInverseMap: step 2 of 3                                        |
|-- approximateInverseMap: step 3 of 3                                        |
|MathMode: output certified!                                                  |
|     -- used 7.69704 seconds                                                 |
|                                                                             |
|o10 = -- rational map --                                                     |
|                                 ZZ                                          |
|      source: subvariety of Proj(--[x , x , x , x , x , x , x , x , x , x , x|
|                                 97  0   1   2   3   4   5   6   7   8   9   |
|              {                                                              |
|                                 2                                           |
|               x x  - 8x x  + 25x  - 25x x  - 22x x  + x x  + 13x x  + 41x x |
|                1 3     2 3      3      2 4      3 4    0 5      2 5      3 5|
|                                                                             |
|                2               2                                            |
|               x  + 17x x  - 14x  - 13x x  + 34x x  + 44x x  - 30x x  + 27x x|
|                2      2 3      3      2 4      3 4      0 5      2 5      3 |
|                                                                             |
|                                  2                                          |
|               x x  - 40x x  + 28x  - x x  + 5x x  - 16x x  + 5x x  - 36x x  |
|                1 2      2 3      3    0 4     2 4      3 4     0 5      2 5 |
|              }                                                              |
|                   ZZ                                                        |
|      target: Proj(--[t , t , t , t , t , t , t , t , t ])                   |
|                   97  0   1   2   3   4   5   6   7   8                     |
|      defining forms: {                                                      |
|                                   2                                         |
|                       - 2x x  + 6x  - 24x x  - 25x x  + 39x x  + 3x x  + 46x|
|                           2 3     3      2 4      3 4      0 5     2 5      |
|                                                                             |
|                       - 19x x  - 40x x  + 19x x  + 19x x  - 38x x  - 39x x  |
|                            2 5      3 5      1 8      2 8      3 8      5 8 |
|                                                                             |
|                       - 39x x  - 39x x  - 38x x  - 39x x  + 19x x  + 2x x  +|
|                            2 3      0 4      3 4      0 5      2 5     3 5  |
|                                                                             |
|                            2              2                                 |
|                       - 39x  - 8x x  + 25x  + 19x x  + 46x x  - 22x x  + x x|
|                            1     2 3      3      0 4      2 4      3 4    0 |
|                                                                             |
|                                                             2               |
|                       - 39x x  + 19x x  + x x  + 8x x  - 25x  - 23x x  - 30x|
|                            0 1      0 2    0 3     2 3      3      2 4      |
|                                                                             |
|                       - 24x x  - 25x x  + 22x x  + 48x x  - 17x x  + 24x x  |
|                            2 4      3 4      2 5      3 5      2 6      1 7 |
|                                                                             |
|                       19x x  + x x  + 19x x  + 39x x  - 19x x  + 37x x  - 36|
|                          2 5    3 5      5 7      1 8      4 8      6 8     |
|                                                                             |
|                       39x x  - 19x x  - 2x x  + 39x x  + 19x x  - x x  - 37x|
|                          0 5      2 5     3 5      0 8      1 8    3 8      |
|                                                                             |
|                       43x x  - 30x x  - 19x x  - 40x x  + 44x x  - 22x x  - |
|                          2 4      3 4      0 5      2 5      3 5      2 6   |
|                      }                                                      |
|                                                                             |
|o10 : RationalMap (quadratic birational map from 8-dimensional subvariety of |
|-----------------------------------------------------------------------------|
|  , x  ]) defined by                                                         |
|10   11                                                                      |
|                                                                             |
|                                                                             |
| - x x  + 12x x  + 25x x  + 25x x  + 23x x  - 3x x  + 2x x  + 11x x  - 37x   |
|    0 6      2 6      1 7      3 7      5 7     6 7     0 8      1 8      3  |
|                                                                             |
|                                                                             |
|  + 31x x  - 36x x  - x x  + 13x x  + 8x x  + 9x x  + 46x x  + 41x x  - 7x   |
|5      2 6      3 6    0 7      1 7     3 7     5 7      6 7      0 8     1  |
|                                                                             |
|                                                                             |
|+ 37x x  + 48x x  - 5x x  - 5x x  + x x  + 20x x  + 10x x  + 34x x  + 41x x  |
|     3 5      2 6     1 7     3 7    5 7      6 7      0 8      1 8      3   |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
| x  - 39x x  - 17x x  - 38x x  + 24x x  + 24x x  + 5x x  + x x  - 19x x  -   |
|3 5      0 6      2 6      3 6      1 7      3 7     5 7    6 7      0 8     |
|                                                                             |
|- 37x x  - 21x x  + x x   + 2x x   - 5x x   + x x   - 5x x   + 5x x  ,       |
|     6 8      5 9    1 10     2 10     3 10    5 10     6 10     5 11        |
|                                                                             |
| 19x x  + 19x x  + 21x x  + 19x x  - 19x x  + x x  - 39x x  + 37x x  + 40x   |
|    0 7      2 7      3 7      0 8      1 8    3 8      4 8      6 8      0  |
|                                                                             |
|                                                                             |
|  - 8x x  + 32x x  - 39x x  + x x  - 38x x  - 30x x  - 5x x  + 39x x  + x x  |
|5     2 5      3 5      4 5    0 6      1 6      2 6     3 6      4 6    5   |
|                                                                             |
|                                                                             |
| x  - 21x x  - 10x x  - 34x x  - 38x x  - 7x x  + 5x x  + 19x x  + 23x x  +  |
|3 4      0 5      2 5      3 5      0 6     2 6     3 6      0 7      1 7    |
|                                                                             |
|+ 24x x  + 5x x  + x x  + 41x x  + 12x x  - 5x x  - 26x x  + 42x x  - 24x x  |
|     3 7     5 7    6 7      1 8      3 8     4 8      6 8      1 9      2   |
|                                                                             |
|x x  - x x   + 5x x   - 5x x  ,                                              |
| 5 9    4 10     6 10     5 11                                               |
|                                                                             |
| x  + 37x x  + x x   + x x   - 5x x   + 5x x  ,                              |
|6 8      5 9    1 10    2 10     6 10     5 11                               |
|                                                                             |
|5x x  - 43x x  - 22x x  - 43x x  - 3x x  - 19x x  - 42x x  - 13x x  + 43x x  |
|  3 6      1 7      3 7      5 7     6 7      0 8      1 8      3 8      4   |
|                                                                             |
|                                                                             |
|PP^11 to PP^8)                                                               |
|-----------------------------------------------------------------------------|
|x  - 23x x  - 33x x  + 8x x  + 10x x  - 25x x  - 9x x  + 3x x  + 24x x       |
| 8      4 8      6 8     0 9      1 9      2 9     3 9     4 9      5        |
|                                                                             |
|                                                                             |
|x  - 34x x  - 9x x  - 46x x  - 17x x  + 32x x  - 8x x  - 35x x  - 46x        |
| 8      3 8     4 8      6 8      0 9      1 9     2 9      3 9      4       |
|                                                                             |
|                                                                             |
|  - x x  + x x  + 40x x  - 32x x  + 5x x  - 11x x  - 20x x  + 45x x  -       |
|8    4 8    6 8      0 9      1 9     2 9      3 9      4 9      5 9         |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|37x x  + 12x x  - 5x x  - 5x x  + 21x x  + 42x x  - 5x x  + x x  - x x       |
|   1 8      3 8     4 8     6 8      0 9      1 9     2 9    3 9    4        |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|x  + 40x x  - 5x x  + 39x x  - 37x x  + x x   - x x   - x x   + x x          |
| 9      2 9     3 9      4 9      5 9    0 10    1 10    2 10    4 10        |
|                                                                             |
|                                                                             |
|  - 27x x  - 27x x  - 42x x  + 11x x  + 2x x  + 22x x  + 34x x  + 42x        |
|6      1 7      3 7      5 7      6 7     0 8      1 8      3 8      4       |
|                                                                             |
|                                                                             |
| 21x x  + 44x x  - 14x x  - 22x x  - 5x x  - 34x x  - 44x x  + 10x x         |
|    3 7      5 7      6 7      0 8     1 8      3 8      4 8      6 8        |
|                                                                             |
|  + 37x x  - x x  - 35x x  + 9x x  + 25x x   - 12x x   - 36x x   - 14x       |
|9      3 9    4 9      5 9     6 9      1 10      2 10      4 10             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|  - 26x x  - 45x x  + 22x x  - 42x x  + 3x x  - 13x x  - 4x x  - 24x x       |
|8      6 8      1 9      2 9      3 9     4 9      5 9     6 9      1        |
|-----------------------------------------------------------------------------|
|  - 27x x  - 5x x   + 28x x   + 37x x   + 9x x   + 27x x   - 25x x   + 9x x  |
|9      6 9     0 10      1 10      2 10     4 10      6 10      0 11     2 11|
|                                                                             |
|                                                                             |
|x  + 26x x  + 17x x  + 15x x   + 35x x   + 34x x   + 20x x   + 14x x   + 36x |
| 9      5 9      6 9      0 10      1 10      2 10      4 10      0 11      1|
|                                                                             |
|                                                                             |
| 14x x  - 25x x   + 45x x   - 41x x   - 46x x   + 8x x   - 28x x   + 11x x   |
|    6 9      0 10      1 10      2 10      4 10     6 10      0 11      2 11 |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|  + 2x x  + 48x x  - x x   + 26x x   - 12x x   - 36x x   - 18x x   - 5x x   -|
|9     5 9      6 9    0 10      1 10      2 10      4 10      6 10     0 11  |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|+ 5x x   - 5x x  ,                                                           |
|    6 10     5 11                                                            |
|                                                                             |
|                                                                             |
|x  + 14x x  + 8x x  + 16x x  + 27x x  + 24x x  - 11x x  - 6x x  + 2x x  - 5x |
| 8      6 8     0 9      1 9      2 9      3 9      4 9     5 9     6 9     0|
|                                                                             |
|                                                                             |
|- 44x x  - 21x x  - 21x x  - 9x x  + 14x x  - 22x x  + 45x x  + 5x x   + 20x |
|     0 9      1 9      2 9     3 9      4 9      5 9      6 9     0 10      1|
|                                                                             |
| x   - 37x x   - 9x x   + 14x x  ,                                           |
|6 10      2 11     4 11      5 11                                            |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|   + 13x x   + 39x x   - 6x x   + 5x x   + 42x x   + 4x x   + 6x x           |
|10      2 10      4 10     6 10     1 11      2 11     4 11     5 11         |
|-----------------------------------------------------------------------------|
| + 27x x   - 27x x  ,                                                        |
|      4 11      5 11                                                         |
|                                                                             |
|                                                                             |
|x   + 35x x   - 17x x  ,                                                     |
| 11      2 11      4 11                                                      |
|                                                                             |
|                                                                             |
|+ 14x x   - 8x x                                                             |
|     4 11     5 11                                                           |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
| 37x x   - 5x x   - 9x x   + 19x x  ,                                        |
|    2 11     3 11     4 11      5 11                                         |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|x   - 10x x   - 34x x   - 8x x   + 15x x   - 25x x   - 24x x   - 2x x   -    |
| 10      1 10      2 10     4 10      6 10      0 11      2 11     4 11      |
|                                                                             |
|                                                                             |
|x   + 34x x   + 12x x   - 25x x   + 20x x   - 5x x   + 9x x   - 45x x   +    |
| 10      2 10      4 10      6 10      0 11     1 11     2 11      4 11      |
|-----------------------------------------------------------------------------|
|15x x  ,                                                                     |
|   5 11                                                                      |
|                                                                             |
|                                                                             |
|25x x  ,                                                                     |
|   5 11                                                                      |
+-----------------------------------------------------------------------------+
|i11 : assert(phi * psi == 1)                                                 |
+-----------------------------------------------------------------------------+

The method also accepts as input a ring map (Macaulay2Doc),
representing a rational map between projective varieties. In this case, a
ring map (Macaulay2Doc), is returned as well.

Caveat
======

For the purpose of this method, the option MathMode,=>true is
too rigid, especially when the source of the passed map is not a projective
space.

See also
========

  * inverseMap -- inverse of a birational map
  * inverse(RationalMap) -- inverse of a
    birational map

Ways to use approximateInverseMap :
===================================

  * "approximateInverseMap(RationalMap)"
  * "approximateInverseMap(RationalMap,ZZ)"
  * "approximateInverseMap(RingMap)"
  * "approximateInverseMap(RingMap,ZZ)"

For the programmer
==================

The object approximateInverseMap, is a
method function with options (Macaulay2Doc).

BlowUpStrategy
**************

Description
===========

This is an optional argument for graph, and for the methods that
eventually call it. Currently, the possible values are "Eliminate" and
"Saturate", which indicate two different ways of computing the (closure of the)
graph of a rational map. The default choice is "Eliminate" and this is
generally preferable.

Functions with optional argument named BlowUpStrategy :
=======================================================

  * "ChernSchwartzMacPherson(...,BlowUpStrategy=>...)"
  * "degreeMap(...,BlowUpStrategy=>...)"
  * "EulerCharacteristic(...,BlowUpStrategy=>...)"
  * "graph(...,BlowUpStrategy=>...)"
  * "inverseMap(...,BlowUpStrategy=>...)"
  * "isBirational(...,BlowUpStrategy=>...)"
  * "projectiveDegrees(...,BlowUpStrategy=>...)"
  * "SegreClass(...,BlowUpStrategy=>...)"

For the programmer
==================

The object BlowUpStrategy, is a symbol (Macaulay2Doc).

ChernSchwartzMacPherson -- Chern-Schwartz-MacPherson class of a projective scheme
*********************************************************************************

Synopsis
========

  * Usage:
        ChernSchwartzMacPherson I
  * Inputs:
      * I, an ideal (Macaulay2Doc), a homogeneous ideal defining a
        closed subscheme $X\subset\mathbb{P}^n$
  * Optional inputs (Macaulay2Doc),:
      * BlowUpStrategy, => ..., default value
        "Eliminate", null
      * MathMode, => ..., default value false, whether to
        ensure correctness of output
      * Verbose, => ...,
        default value true, null
  * Outputs:
      * a ring element (Macaulay2Doc), the push-forward to
        the Chow ring of $\mathbb{P}^n$ of the Chern-Schwartz-MacPherson class
        $c_{SM}(X)$ of $X$. In particular, the coefficient of $H^n$ gives the
        Euler characteristic of the support of $X$, where $H$ denotes the
        hyperplane class.

Description
===========

This is an example of application of the method projectiveDegrees,
due to results shown in Computing characteristic classes of
projective schemes (see http://www.sciencedirect.com/science/article/pii/
S0747717102000895 ), by P. Aluffi. See also the corresponding methods in the
packages CSM-A (see http://www.math.fsu.edu/~aluffi/CSM/CSM.html ), by P.
Aluffi, and CharacteristicClasses (see
http://www.math.uiuc.edu/Macaulay2/doc/Macaulay2-1.16/share/doc/Macaulay2/
CharacteristicClasses/html/ ), by M. Helmer and C. Jost.

In the example below, we compute the push-forward to the Chow ring of
$\mathbb{P}^4$ of the Chern-Schwartz-MacPherson class of the cone over the
twisted cubic curve, using both a probabilistic and a non-probabilistic
approach.

+------------------------------------------------------+
|i1 : GF(5^7)[x_0..x_4]                                |
|                                                      |
|o1 = GF 78125[x ..x ]                                 |
|               0   4                                  |
|                                                      |
|o1 : PolynomialRing                                   |
+------------------------------------------------------+
|i2 : C = minors(2,matrix{{x_0,x_1,x_2},{x_1,x_2,x_3}})|
|                                                      |
|               2                           2          |
|o2 = ideal (- x  + x x , - x x  + x x , - x  + x x )  |
|               1    0 2     1 2    0 3     2    1 3   |
|                                                      |
|o2 : Ideal of GF 78125[x ..x ]                        |
|                        0   4                         |
+------------------------------------------------------+
|i3 : time ChernSchwartzMacPherson C                   |
|     -- used 2.24503 seconds                          |
|                                                      |
|       4     3     2                                  |
|o3 = 3H  + 5H  + 3H                                   |
|                                                      |
|     ZZ[H]                                            |
|o3 : -----                                            |
|        5                                             |
|       H                                              |
+------------------------------------------------------+
|i4 : time ChernSchwartzMacPherson(C,MathMode=>true)   |
|MathMode: output certified!                           |
|     -- used 2.62254 seconds                          |
|                                                      |
|       4     3     2                                  |
|o4 = 3H  + 5H  + 3H                                   |
|                                                      |
|     ZZ[H]                                            |
|o4 : -----                                            |
|        5                                             |
|       H                                              |
+------------------------------------------------------+
|i5 : oo == ooo                                        |
|                                                      |
|o5 = true                                             |
+------------------------------------------------------+

In the case when the input ideal I defines a smooth projective variety $X$, the
push-forward of $c_{SM}(X)$ can be computed much more efficiently using
SegreClass. Indeed, in this case, $c_{SM}(X)$ coincides with the
(total) Chern class of the tangent bundle of $X$ and can be obtained as follows
(in general the method below gives the push-forward of the so-called
Chern-Fulton class).

+-----------------------------------------------------------------------------+
|i6 : ChernClass = method(Options=>{MathMode=>false});                        |
+-----------------------------------------------------------------------------+
|i7 : ChernClass (Ideal) := o -> (I) -> (                                     |
|        s := SegreClass(I,MathMode=>o.MathMode);                             |
|        s*(1+first gens ring s)^(numgens ring I));                           |
+-----------------------------------------------------------------------------+
|i8 : -- example: Chern class of G(1,4)                                       |
|     G = Grassmannian(1,4,CoefficientRing=>ZZ/190181)                        |
|                                                                             |
|o8 = ideal (p   p    - p   p    + p   p   , p   p    - p   p    + p   p   ,  |
|             2,3 1,4    1,3 2,4    1,2 3,4   2,3 0,4    0,3 2,4    0,2 3,4   |
|     ------------------------------------------------------------------------|
|     p   p    - p   p    + p   p   , p   p    - p   p    + p   p   , p   p   |
|      1,3 0,4    0,3 1,4    0,1 3,4   1,2 0,4    0,2 1,4    0,1 2,4   1,2 0,3|
|     ------------------------------------------------------------------------|
|     - p   p    + p   p   )                                                  |
|        0,2 1,3    0,1 2,3                                                   |
|                                                                             |
|                ZZ                                                           |
|o8 : Ideal of ------[p   ..p   , p   , p   , p   , p   , p   , p   , p   , p |
|              190181  0,1   0,2   1,2   0,3   1,3   2,3   0,4   1,4   2,4   3|
|-----------------------------------------------------------------------------|
|  ]                                                                          |
|,4                                                                           |
+-----------------------------------------------------------------------------+
|i9 : time ChernClass G                                                       |
|     -- used 0.302312 seconds                                                |
|                                                                             |
|        9      8      7      6      5      4     3                           |
|o9 = 10H  + 30H  + 60H  + 75H  + 57H  + 25H  + 5H                            |
|                                                                             |
|     ZZ[H]                                                                   |
|o9 : -----                                                                   |
|       10                                                                    |
|      H                                                                      |
+-----------------------------------------------------------------------------+
|i10 : time ChernClass(G,MathMode=>true)                                      |
|MathMode: output certified!                                                  |
|     -- used 0.028657 seconds                                                |
|                                                                             |
|         9      8      7      6      5      4     3                          |
|o10 = 10H  + 30H  + 60H  + 75H  + 57H  + 25H  + 5H                           |
|                                                                             |
|      ZZ[H]                                                                  |
|o10 : -----                                                                  |
|        10                                                                   |
|       H                                                                     |
+-----------------------------------------------------------------------------+

See also
========

  * SegreClass -- Segre class of a closed subscheme of a
    projective variety
  * EulerCharacteristic -- topological Euler
    characteristic of a (smooth) projective variety
  * euler(ProjectiveVariety) (Macaulay2Doc),
    -- topological Euler characteristic of a (smooth) projective variety

Ways to use ChernSchwartzMacPherson :
=====================================

  * "ChernSchwartzMacPherson(Ideal)"

For the programmer
==================

The object ChernSchwartzMacPherson, is a
method function with options (Macaulay2Doc).

CodimBsInv
**********

Description
===========

This is a technical option for approximateInverseMap.
It accepts an integer which should be a lower bound for
the codimension of the base locus of the inverse map. In most cases, one can
obtain the optimal value to be passed as in the following example.

+-----------------------------------------------------------------------------+
|i1 : codimBsInv = (m) -> (                                                   |
|        -- input: m, the list of projective degrees of a birational map      |
|        -- output: the codimension of the base locus of the inverse map      |
|        k:=#m -1; z:=m_k; d:=floor(m_(k-1)/z);                               |
|        for i from 2 to k do if z*d^i - m_(k-i) > 0 then return i;           |
|     );                                                                      |
+-----------------------------------------------------------------------------+
|i2 : phi = toMap trim minors(2,genericSymmetricMatrix(QQ[x_0..x_5],3))       |
|                                                                             |
|                                    2                                    2   |
|o2 = map (QQ[x ..x ], QQ[x ..x ], {x  - x x , x x  - x x , x x  - x x , x  - |
|              0   5       0   5     4    3 5   2 4    1 5   2 3    1 4   2   |
|                                                                             |
|o2 : RingMap QQ[x ..x ] <--- QQ[x ..x ]                                      |
|                 0   5           0   5                                       |
|-----------------------------------------------------------------------------|
|                    2                                                        |
|x x , x x  - x x , x  - x x })                                               |
| 0 5   1 2    0 4   1    0 3                                                 |
+-----------------------------------------------------------------------------+
|i3 : codimBsInv projectiveDegrees phi                                        |
|                                                                             |
|o3 = 3                                                                       |
+-----------------------------------------------------------------------------+

However, sometimes larger values may be preferable.

Functions with optional argument named CodimBsInv :
===================================================

  * "approximateInverseMap(...,CodimBsInv=>...)"

For the programmer
==================

The object CodimBsInv, is a symbol (Macaulay2Doc).

coefficientRing(RationalMap) -- coefficient ring of a rational map
******************************************************************

Synopsis
========

  * Function: coefficientRing (Macaulay2Doc),
  * Usage:
        coefficientRing phi
  * Inputs:
      * phi, a rational map,
  * Outputs:
      * a ring (Macaulay2Doc), the coefficient ring of phi

See also
========

  * RationalMap ** Ring -- change the
    coefficient ring of a rational map

Ways to use this method:
========================

  * coefficientRing(RationalMap), --
    coefficient ring of a rational map

coefficients(RationalMap) -- coefficient matrix of a rational map
*****************************************************************

Synopsis
========

  * Function: coefficients (Macaulay2Doc),
  * Usage:
        coefficients phi
  * Inputs:
      * phi, a rational map,
  * Optional inputs (Macaulay2Doc),:
      * Monomials (Macaulay2Doc), => ..., default value
        null, null
      * Variables (Macaulay2Doc), => ..., default value
        null, null
  * Outputs:
      * a matrix (Macaulay2Doc), the coefficient matrix of the
        polynomials defining phi

Description
===========

+--------------------------------------------------------+
|i1 : K = QQ; ringP9 = K[x_0..x_9];                      |
+--------------------------------------------------------+
|i3 : M = random(K^10,K^10)                              |
|                                                        |
|o3 = | 9/2 7/10 2    1/2 5/3  4/3  2/3 1/8  1   5/2 |   |
|     | 1/2 1/2  6    10  7/2  3/7  6   10/3 7/5 5/2 |   |
|     | 9/4 7/10 5/4  3   2/5  9/10 5/4 3/4  3/2 1/6 |   |
|     | 1/2 7/3  2/9  3   6/5  4/7  2/9 4    1/5 3/4 |   |
|     | 1   7    5    3/2 5/4  5/2  8/5 1/4  5   4   |   |
|     | 3/4 3/7  3/10 4/3 5/7  5/9  9/4 1/3  5/7 8/5 |   |
|     | 3/2 5/2  1    7/8 5/9  5/9  2/9 4/3  3/8 10  |   |
|     | 3/4 6/7  3/7  5/6 5/3  6/7  3   9/10 3   2   |   |
|     | 7/4 2/3  5    5   4/5  2    9/8 5/4  1   1/3 |   |
|     | 7/9 1    10/9 2/5 1/10 1    1/2 1/7  1/2 5/2 |   |
|                                                        |
|              10        10                              |
|o3 : Matrix QQ   <--- QQ                                |
+--------------------------------------------------------+
|i4 : phi = rationalMap ((vars ringP9) * (transpose M)); |
|                                                        |
|o4 : RationalMap (linear rational map from PP^9 to PP^9)|
+--------------------------------------------------------+
|i5 : M' = coefficients phi                              |
|                                                        |
|o5 = | 9/2 7/10 2    1/2 5/3  4/3  2/3 1/8  1   5/2 |   |
|     | 1/2 1/2  6    10  7/2  3/7  6   10/3 7/5 5/2 |   |
|     | 9/4 7/10 5/4  3   2/5  9/10 5/4 3/4  3/2 1/6 |   |
|     | 1/2 7/3  2/9  3   6/5  4/7  2/9 4    1/5 3/4 |   |
|     | 1   7    5    3/2 5/4  5/2  8/5 1/4  5   4   |   |
|     | 3/4 3/7  3/10 4/3 5/7  5/9  9/4 1/3  5/7 8/5 |   |
|     | 3/2 5/2  1    7/8 5/9  5/9  2/9 4/3  3/8 10  |   |
|     | 3/4 6/7  3/7  5/6 5/3  6/7  3   9/10 3   2   |   |
|     | 7/4 2/3  5    5   4/5  2    9/8 5/4  1   1/3 |   |
|     | 7/9 1    10/9 2/5 1/10 1    1/2 1/7  1/2 5/2 |   |
|                                                        |
|              10        10                              |
|o5 : Matrix QQ   <--- QQ                                |
+--------------------------------------------------------+
|i6 : M == M'                                            |
|                                                        |
|o6 = true                                               |
+--------------------------------------------------------+

Ways to use this method:
========================

  * coefficients(RationalMap), --
    coefficient matrix of a rational map

degree(RationalMap) -- degree of a rational map
***********************************************

Synopsis
========

  * Function: degree (Macaulay2Doc),
  * Usage:
        degree phi
  * Inputs:
      * phi, a rational map,
  * Outputs:
      * an integer (Macaulay2Doc), the degree of phi. So this value
        is 1 if and only if the map is birational onto its image.

Description
===========

This is a shortcut for degreeMap(phi,MathMode=>true,Verbose=>false), see
degreeMap(RationalMap).

Ways to use this method:
========================

  * degree(RationalMap) -- degree of a rational
    map

degreeMap -- degree of a rational map between projective varieties
******************************************************************

Synopsis
========

  * Usage:
        degreeMap phi
  * Inputs:
      * phi, a ring map (Macaulay2Doc), which represents a
        rational map $\Phi$ between projective varieties
  * Optional inputs (Macaulay2Doc),:
      * BlowUpStrategy, => ..., default value
        "Eliminate", null
      * MathMode, => ..., default value false, whether to
        ensure correctness of output
      * Verbose, => ...,
        default value true, null
  * Outputs:
      * an integer (Macaulay2Doc), the degree of $\Phi$. So this
        value is 1 if and only if the map is birational onto its image.

Description
===========

One important case is when $\Phi:\mathbb{P}^n=Proj(K[x_0,\ldots,x_n])
\dashrightarrow \mathbb{P}^m=Proj(K[y_0,\ldots,y_m])$ is a rational map between
projective spaces, corresponding to a ring map $\phi$. If $p$ is a general
point of $\mathbb{P}^n$, denote by $F_p(\Phi)$ the closure of
$\Phi^{-1}(\Phi(p))\subseteq \mathbb{P}^n$. The degree of $\Phi$ is defined as
the degree of $F_p(\Phi)$ if $dim F_p(\Phi) = 0$ and $0$ otherwise. If $\Phi$
is defined by forms $F_0(x_0,\ldots,x_n),\ldots,F_m(x_0,\ldots,x_n)$ and $I_p$
is the ideal of the point $p$, then the ideal of $F_p(\Phi)$ is nothing but the
saturation ${(\phi(\phi^{-1}(I_p))):(F_0,....,F_m)}^{\infty}$.

+-----------------------------------------------------------------------------+
|i1 : -- Take a rational map phi:P^8--->G(1,5) subset P^14 defined by         |
|     -- of a generic 2 x 6 matrix of linear forms on P^8 (thus phi is        |
|     K=ZZ/3331; ringP8=K[x_0..x_8]; ringP14=K[t_0..t_14];                    |
|-----------------------------------------------------------------------------|
|the maximal minors                                                           |
| birational onto its image)                                                  |
+-----------------------------------------------------------------------------+
|i4 : phi=map(ringP8,ringP14,gens minors(2,matrix pack(6,for i to             |
|                                                                             |
|                                 2                  2                        |
|o4 = map (ringP8, ringP14, {- 95x  + 181x x  + 1028x  - 1384x x              |
|                                 0       0 1        1        0 2             |
|                                                                             |
|o4 : RingMap ringP8 <--- ringP14                                             |
|-----------------------------------------------------------------------------|
|11 list random(1,ringP8))))                                                  |
|                                                                             |
|                 2                                       2                   |
|- 1455x x  + 559x  - 502x x  + 1264x x  - 162x x  + 1209x  - 180x x  -       |
|       1 2       2       0 3        1 3       2 3        3       0 4         |
|-----------------------------------------------------------------------------|
|                                   2                                         |
|504x x  - 1168x x  - 676x x  + 501x  + 73x x  + 1263x x  + 1035x x  + 844x x |
|    1 4        2 4       3 4       4      0 5        1 5        2 5       3 5|
|-----------------------------------------------------------------------------|
|                 2                                                           |
|+ 1593x x  + 785x  + 982x x  - 412x x  + 1335x x  + 1136x x  + 826x x  +     |
|       4 5       5       0 6       1 6        2 6        3 6       4 6       |
|-----------------------------------------------------------------------------|
|                2                                                            |
|1078x x  + 1158x  + 335x x  - 982x x  - 1479x x  - 15x x  + 1363x x  +       |
|     5 6        6       0 7       1 7        2 7      3 7        4 7         |
|-----------------------------------------------------------------------------|
|                        2                                                    |
|1397x x  - 575x x  - 71x  + 1255x x  - 1138x x  - 1590x x  + 604x x  +       |
|     5 7       6 7      7        0 8        1 8        2 8       3 8         |
|-----------------------------------------------------------------------------|
|                                              2         2                 2  |
|1182x x  - 63x x  - 1382x x  - 1255x x  - 613x , - 1444x  + 575x x  + 767x  -|
|     4 8      5 8        6 8        7 8       8         0       0 1       1  |
|-----------------------------------------------------------------------------|
|                          2                                       2          |
|1495x x  + 1631x x  - 217x  - 294x x  - 1511x x  - 504x x  - 1284x  -        |
|     0 2        1 2       2       0 3        1 3       2 3        3          |
|-----------------------------------------------------------------------------|
|                                           2                                 |
|1459x x  + 152x x  + 141x x  - 10x x  - 95x  + 1056x x  + 654x x  + 1397x x  |
|     0 4       1 4       2 4      3 4      4        0 5       1 5        2 5 |
|-----------------------------------------------------------------------------|
|                          2                                                  |
|- 930x x  + 578x x  - 696x  + 759x x  + 733x x  + 505x x  - 609x x  + 526x x |
|      3 5       4 5       5       0 6       1 6       2 6       3 6       4 6|
|-----------------------------------------------------------------------------|
|                2                                                            |
|- 659x x  + 846x  + 1253x x  - 1519x x  + 635x x  + 576x x  + 54x x  -       |
|      5 6       6        0 7        1 7       2 7       3 7      4 7         |
|-----------------------------------------------------------------------------|
|                         2                                                   |
|1261x x  - 822x x  - 257x  - 986x x  + 356x x  - 1488x x  - 1561x x  -       |
|     5 7       6 7       7       0 8       1 8        2 8        3 8         |
|-----------------------------------------------------------------------------|
|                                             2        2                   2  |
|850x x  - 85x x  - 1350x x  - 783x x  - 1335x , - 871x  + 1006x x  - 1399x  -|
|    4 8      5 8        6 8       7 8        8        0        0 1        1  |
|-----------------------------------------------------------------------------|
|                         2                                      2            |
|1636x x  - 699x x  - 769x  - 307x x  - 1645x x  - 502x x  - 719x  + 1405x x  |
|     0 2       1 2       2       0 3        1 3       2 3       3        0 4 |
|-----------------------------------------------------------------------------|
|                                      2                                      |
|+ 870x x  - 1133x x  + 425x x  - 1203x  - 1601x x  + 117x x  - 382x x  +     |
|      1 4        2 4       3 4        4        0 5       1 5       2 5       |
|-----------------------------------------------------------------------------|
|                        2                                                    |
|318x x  - 117x x  - 560x  + 1135x x  + 1468x x  + 869x x  - 943x x  - 335x x |
|    3 5       4 5       5        0 6        1 6       2 6       3 6       4 6|
|-----------------------------------------------------------------------------|
|                 2                                                           |
|- 1218x x  + 201x  - 11x x  + 540x x  - 710x x  - 489x x  + 1605x x  +       |
|       5 6       6      0 7       1 7       2 7       3 7        4 7         |
|-----------------------------------------------------------------------------|
|                          2                                                  |
|1663x x  - 423x x  + 1246x  + 97x x  - 644x x  + 1655x x  + 1219x x  +       |
|     5 7       6 7        7      0 8       1 8        2 8        3 8         |
|-----------------------------------------------------------------------------|
|                                                2        2                   |
|1476x x  + 1355x x  + 1594x x  + 893x x  + 1150x , - 143x  + 1240x x  -      |
|     4 8        5 8        6 8       7 8        8        0        0 1        |
|-----------------------------------------------------------------------------|
|     2                             2                                      2  |
|1042x  + 1649x x  + 1024x x  + 794x  + 1442x x  - 1263x x  + 537x x  - 82x  -|
|     1        0 2        1 2       2        0 3        1 3       2 3      3  |
|-----------------------------------------------------------------------------|
|                                              2                              |
|734x x  - 1569x x  - 798x x  - 366x x  + 1289x  - 569x x  - 254x x  + 237x x |
|    0 4        1 4       2 4       3 4        4       0 5       1 5       2 5|
|-----------------------------------------------------------------------------|
|                           2                                                 |
|- 1234x x  - 807x x  + 264x  - 202x x  - 616x x  + 44x x  + 1465x x  +       |
|       3 5       4 5       5       0 6       1 6      2 6        3 6         |
|-----------------------------------------------------------------------------|
|                         2                                                   |
|685x x  + 1630x x  - 406x  - 123x x  - 4x x  + 1583x x  + 1235x x  + 162x x  |
|    4 6        5 6       6       0 7     1 7        2 7        3 7       4 7 |
|-----------------------------------------------------------------------------|
|                            2                                                |
|+ 1034x x  - 1035x x  + 737x  + 660x x  + 1459x x  - 359x x  - 1291x x  +    |
|       5 7        6 7       7       0 8        1 8       2 8        3 8      |
|-----------------------------------------------------------------------------|
|                                             2         2                2    |
|1638x x  - 325x x  - 631x x  + 73x x  - 1471x , - 1340x  + 31x x  - 994x  -  |
|     4 8       5 8       6 8      7 8        8         0      0 1       1    |
|-----------------------------------------------------------------------------|
|                       2                                      2              |
|880x x  - 89x x  + 574x  + 760x x  - 1054x x  + 772x x  - 239x  - 443x x  +  |
|    0 2      1 2       2       0 3        1 3       2 3       3       0 4    |
|-----------------------------------------------------------------------------|
|                                    2                                        |
|1240x x  + 637x x  - 1423x x  + 320x  - 1363x x  - 1139x x  - 158x x  -      |
|     1 4       2 4        3 4       4        0 5        1 5       2 5        |
|-----------------------------------------------------------------------------|
|                        2                                                    |
|325x x  - 1578x x  + 32x  + 695x x  + 305x x  + 1012x x  + 1492x x  +        |
|    3 5        4 5      5       0 6       1 6        2 6        3 6          |
|-----------------------------------------------------------------------------|
|                          2                                                  |
|1290x x  + 1579x x  - 342x  - 83x x  - 104x x  + 998x x  - 92x x  + 1554x x  |
|     4 6        5 6       6      0 7       1 7       2 7      3 7        4 7 |
|-----------------------------------------------------------------------------|
|                          2                                                  |
|+ 201x x  - 237x x  + 160x  - 228x x  - 543x x  - 1147x x  - 376x x  +       |
|      5 7       6 7       7       0 8       1 8        2 8       3 8         |
|-----------------------------------------------------------------------------|
|                                              2        2                  2  |
|1313x x  + 603x x  + 106x x  - 1361x x  + 699x , - 228x  - 1510x x  + 277x  -|
|     4 8       5 8       6 8        7 8       8        0        0 1       1  |
|-----------------------------------------------------------------------------|
|                      2                                       2              |
|4x x  - 22x x  - 1526x  + 234x x  + 969x x  + 1253x x  - 1426x  - 1474x x  + |
|  0 2      1 2        2       0 3       1 3        2 3        3        0 4   |
|-----------------------------------------------------------------------------|
|                                  2                                          |
|947x x  + 194x x  - 316x x  - 988x  - 1211x x  + 1087x x  + 536x x  - 491x x |
|    1 4       2 4       3 4       4        0 5        1 5       2 5       3 5|
|-----------------------------------------------------------------------------|
|                2                                                            |
|+ 870x x  - 659x  + 1490x x  - 469x x  + 1190x x  + 807x x  + 650x x  +      |
|      4 5       5        0 6       1 6        2 6       3 6       4 6        |
|-----------------------------------------------------------------------------|
|               2                                                             |
|448x x  - 1353x  - 218x x  + 759x x  - 253x x  + 830x x  - 1080x x  - 143x x |
|    5 6        6       0 7       1 7       2 7       3 7        4 7       5 7|
|-----------------------------------------------------------------------------|
|                 2                                                           |
|- 1313x x  - 374x  - 180x x  + 741x x  + 742x x  - 1254x x  + 458x x  -      |
|       6 7       7       0 8       1 8       2 8        3 8       4 8        |
|-----------------------------------------------------------------------------|
|                                  2       2                  2               |
|345x x  + 597x x  + 1567x x  - 31x , 1120x  + 709x x  - 1538x  - 1048x x  -  |
|    5 8       6 8        7 8      8       0       0 1        1        0 2    |
|-----------------------------------------------------------------------------|
|               2                                    2                        |
|162x x  - 1518x  - 73x x  + 380x x  + 533x x  - 286x  + 1374x x  - 74x x  -  |
|    1 2        2      0 3       1 3       2 3       3        0 4      1 4    |
|-----------------------------------------------------------------------------|
|                         2                                                   |
|22x x  + 1535x x  - 1071x  - 839x x  - 560x x  + 928x x  + 335x x  - 1008x x |
|   2 4        3 4        4       0 5       1 5       2 5       3 5        4 5|
|-----------------------------------------------------------------------------|
|      2                                                                    2 |
|+ 810x  - 448x x  - 357x x  - 107x x  + 40x x  + 784x x  - 1423x x  + 1276x  |
|      5       0 6       1 6       2 6      3 6       4 6        5 6        6 |
|-----------------------------------------------------------------------------|
|                                                                             |
|+ 147x x  + 443x x  - 598x x  - 1077x x  - 1214x x  + 322x x  - 1408x x  +   |
|      0 7       1 7       2 7        3 7        4 7       5 7        6 7     |
|-----------------------------------------------------------------------------|
|   2                                                                         |
|72x  - 63x x  - 1513x x  - 791x x  + 11x x  + 77x x  + 836x x  - 1100x x  +  |
|   7      0 8        1 8       2 8      3 8      4 8       5 8        6 8    |
|-----------------------------------------------------------------------------|
|               2       2                 2                           2       |
|1637x x  - 788x , 1331x  + 318x x  - 704x  + 51x x  + 275x x  + 1149x  +     |
|     7 8       8       0       0 1       1      0 2       1 2        2       |
|-----------------------------------------------------------------------------|
|                                   2                                         |
|1526x x  + 768x x  + 414x x  - 782x  - 262x x  + 686x x  - 380x x  + 1377x x |
|     0 3       1 3       2 3       3       0 4       1 4       2 4        3 4|
|-----------------------------------------------------------------------------|
|       2                                                            2        |
|+ 1077x  + 1650x x  - 1129x x  - 508x x  + 846x x  + 1513x x  + 460x  -      |
|       4        0 5        1 5       2 5       3 5        4 5       5        |
|-----------------------------------------------------------------------------|
|                                                                    2        |
|1626x x  - 1024x x  + 862x x  + 1352x x  - 188x x  - 1382x x  - 650x  +      |
|     0 6        1 6       2 6        3 6       4 6        5 6       6        |
|-----------------------------------------------------------------------------|
|                                                                             |
|55x x  - 326x x  + 1037x x  + 705x x  - 667x x  + 1483x x  + 1661x x  -      |
|   0 7       1 7        2 7       3 7       4 7        5 7        6 7        |
|-----------------------------------------------------------------------------|
|     2                                                                       |
|1652x  - 1052x x  - 692x x  - 542x x  + 162x x  + 582x x  - 1369x x  +       |
|     7        0 8       1 8       2 8       3 8       4 8        5 8         |
|-----------------------------------------------------------------------------|
|                          2        2                   2                     |
|934x x  + 1392x x  + 1227x , - 346x  + 1408x x  - 1225x  - 1536x x  -        |
|    6 8        7 8        8        0        0 1        1        0 2          |
|-----------------------------------------------------------------------------|
|               2                                       2                     |
|1028x x  - 985x  - 210x x  - 1312x x  + 915x x  + 1633x  - 202x x  - 1636x x |
|     1 2       2       0 3        1 3       2 3        3       0 4        1 4|
|-----------------------------------------------------------------------------|
|                            2                                                |
|- 1653x x  - 480x x  - 1260x  - 813x x  - 1623x x  - 1429x x  + 1094x x  -   |
|       2 4       3 4        4       0 5        1 5        2 5        3 5     |
|-----------------------------------------------------------------------------|
|              2                                                              |
|747x x  + 955x  + 898x x  - 795x x  - 35x x  - 566x x  + 1631x x  - 324x x  +|
|    4 5       5       0 6       1 6      2 6       3 6        4 6       5 6  |
|-----------------------------------------------------------------------------|
|    2                                                                        |
|926x  - 132x x  - 9x x  - 1290x x  - 543x x  + 902x x  + 735x x  - 342x x  - |
|    6       0 7     1 7        2 7       3 7       4 7       5 7       6 7   |
|-----------------------------------------------------------------------------|
|    2                                                                        |
|400x  + 900x x  - 463x x  + 694x x  - 1262x x  - 1449x x  - 448x x  -        |
|    7       0 8       1 8       2 8        3 8        4 8       5 8          |
|-----------------------------------------------------------------------------|
|                         2      2                 2                          |
|1402x x  - 731x x  - 996x , 301x  + 166x x  - 955x  - 739x x  - 1199x x  -   |
|     6 8       7 8       8      0       0 1       1       0 2        1 2     |
|-----------------------------------------------------------------------------|
|    2                                       2                                |
|319x  + 1047x x  - 532x x  + 902x x  + 1195x  - 663x x  + 1215x x  - 534x x  |
|    2        0 3       1 3       2 3        3       0 4        1 4       2 4 |
|-----------------------------------------------------------------------------|
|                2                                                         2  |
|- 332x x  - 973x  + 772x x  - 308x x  + 315x x  - 454x x  - 483x x  - 239x  -|
|      3 4       4       0 5       1 5       2 5       3 5       4 5       5  |
|-----------------------------------------------------------------------------|
|                                                                     2       |
|1313x x  - 419x x  - 1340x x  - 1388x x  - 1340x x  - 1665x x  - 333x  -     |
|     0 6       1 6        2 6        3 6        4 6        5 6       6       |
|-----------------------------------------------------------------------------|
|                                                                            2|
|465x x  - 1084x x  + 676x x  - 1612x x  - 288x x  + 11x x  - 1170x x  - 189x |
|    0 7        1 7       2 7        3 7       4 7      5 7        6 7       7|
|-----------------------------------------------------------------------------|
|                                                                             |
|+ 498x x  - 889x x  + 693x x  + 1460x x  - 473x x  - 414x x  - 122x x  -     |
|      0 8       1 8       2 8        3 8       4 8       5 8       6 8       |
|-----------------------------------------------------------------------------|
|                2     2                   2                             2    |
|1659x x  - 1421x , 14x  - 1049x x  + 1506x  + 1235x x  + 642x x  - 1034x  +  |
|     7 8        8     0        0 1        1        0 2       1 2        2    |
|-----------------------------------------------------------------------------|
|                                   2                                         |
|460x x  + 150x x  + 760x x  - 1246x  - 1407x x  + 1570x x  + 1403x x  -      |
|    0 3       1 3       2 3        3        0 4        1 4        2 4        |
|-----------------------------------------------------------------------------|
|               2                                                          2  |
|1610x x  - 431x  + 574x x  + 893x x  - 657x x  + 417x x  + 1362x x  + 224x  +|
|     3 4       4       0 5       1 5       2 5       3 5        4 5       5  |
|-----------------------------------------------------------------------------|
|                                                                  2          |
|268x x  + 1097x x  + 1132x x  + 148x x  + 1331x x  - 77x x  - 756x  + 228x x |
|    0 6        1 6        2 6       3 6        4 6      5 6       6       0 7|
|-----------------------------------------------------------------------------|
|                                                                    2        |
|+ 136x x  - 1484x x  - 1478x x  - 13x x  + 1620x x  - 701x x  - 769x  -      |
|      1 7        2 7        3 7      4 7        5 7       6 7       7        |
|-----------------------------------------------------------------------------|
|                                                                             |
|760x x  - 492x x  - 1077x x  - 1249x x  - 834x x  - 395x x  - 1358x x  -     |
|    0 8       1 8        2 8        3 8       4 8       5 8        6 8       |
|-----------------------------------------------------------------------------|
|              2         2                2                            2      |
|988x x  + 113x , - 1634x  - 13x x  + 805x  - 21x x  - 1655x x  + 1479x  -    |
|    7 8       8         0      0 1       1      0 2        1 2        2      |
|-----------------------------------------------------------------------------|
|                                    2                                        |
|1510x x  - 646x x  + 225x x  - 1411x  + 1227x x  - 1108x x  + 1291x x  -     |
|     0 3       1 3       2 3        3        0 4        1 4        2 4       |
|-----------------------------------------------------------------------------|
|             2                                                           2   |
|59x x  - 142x  + 586x x  - 676x x  + 655x x  - 1476x x  + 453x x  - 1076x  - |
|   3 4       4       0 5       1 5       2 5        3 5       4 5        5   |
|-----------------------------------------------------------------------------|
|                                                                   2         |
|1152x x  + 1373x x  - 1191x x  - 416x x  + 699x x  + 317x x  + 825x  -       |
|     0 6        1 6        2 6       3 6       4 6       5 6       6         |
|-----------------------------------------------------------------------------|
|                                                                             |
|1560x x  - 488x x  - 1035x x  - 1561x x  - 644x x  - 1178x x  - 1320x x  +   |
|     0 7       1 7        2 7        3 7       4 7        5 7        6 7     |
|-----------------------------------------------------------------------------|
|    2                                                                        |
|158x  + 889x x  + 1444x x  - 1486x x  - 1211x x  + 1269x x  - 1228x x  +     |
|    7       0 8        1 8        2 8        3 8        4 8        5 8       |
|-----------------------------------------------------------------------------|
|                          2      2                  2                        |
|568x x  + 1591x x  + 1207x , 105x  - 538x x  - 1222x  - 277x x  + 716x x  -  |
|    6 8        7 8        8      0       0 1        1       0 2       1 2    |
|-----------------------------------------------------------------------------|
|     2                                    2                                  |
|1067x  - 428x x  + 154x x  - 469x x  + 77x  + 538x x  - 179x x  + 921x x  -  |
|     2       0 3       1 3       2 3      3       0 4       1 4       2 4    |
|-----------------------------------------------------------------------------|
|               2                                                            2|
|223x x  + 1093x  - 262x x  + 1299x x  + 631x x  + 1486x x  - 1280x x  - 121x |
|    3 4        4       0 5        1 5       2 5        3 5        4 5       5|
|-----------------------------------------------------------------------------|
|                                                                   2         |
|- 50x x  - 978x x  - 694x x  - 531x x  + 505x x  + 1412x x  - 1061x  +       |
|     0 6       1 6       2 6       3 6       4 6        5 6        6         |
|-----------------------------------------------------------------------------|
|                                                                             |
|1202x x  + 448x x  - 187x x  + 1276x x  - 121x x  + 1361x x  + 697x x  +     |
|     0 7       1 7       2 7        3 7       4 7        5 7       6 7       |
|-----------------------------------------------------------------------------|
|    2                                                                        |
|682x  + 1592x x  + 705x x  - 227x x  - 7x x  - 1423x x  - 1446x x  - 1578x x |
|    7        0 8       1 8       2 8     3 8        4 8        5 8        6 8|
|-----------------------------------------------------------------------------|
|                 2       2                  2                            2   |
|+ 1511x x  + 917x , 1270x  - 391x x  - 1116x  - 287x x  + 653x x  + 1643x  + |
|       7 8       8       0       0 1        1       0 2       1 2        2   |
|-----------------------------------------------------------------------------|
|                                 2                                           |
|1623x x  + 514x x  - 14x x  - 90x  + 1232x x  - 1434x x  + 1296x x  +        |
|     0 3       1 3      2 3      3        0 4        1 4        2 4          |
|-----------------------------------------------------------------------------|
|               2                                                        2    |
|1522x x  + 136x  - 623x x  - 607x x  + 18x x  + 896x x  - 29x x  + 1059x  -  |
|     3 4       4       0 5       1 5      2 5       3 5      4 5        5    |
|-----------------------------------------------------------------------------|
|                                                                      2      |
|1053x x  + 1643x x  + 1652x x  - 1190x x  - 1073x x  + 1470x x  - 944x  -    |
|     0 6        1 6        2 6        3 6        4 6        5 6       6      |
|-----------------------------------------------------------------------------|
|                                                                            2|
|93x x  - 187x x  - 994x x  - 1415x x  - 229x x  - 796x x  + 1642x x  + 1600x |
|   0 7       1 7       2 7        3 7       4 7       5 7        6 7        7|
|-----------------------------------------------------------------------------|
|                                                                             |
|- 344x x  + 905x x  + 1032x x  - 538x x  - 891x x  + 1243x x  + 1290x x  +   |
|      0 8       1 8        2 8       3 8       4 8        5 8        6 8     |
|-----------------------------------------------------------------------------|
|               2       2                  2                             2    |
|490x x  - 1148x , 1613x  + 175x x  - 1346x  - 1000x x  - 1217x x  - 729x  -  |
|    7 8        8       0       0 1        1        0 2        1 2       2    |
|-----------------------------------------------------------------------------|
|                                    2                                        |
|1296x x  + 1456x x  + 745x x  + 539x  + 525x x  - 811x x  + 753x x  +        |
|     0 3        1 3       2 3       3       0 4       1 4       2 4          |
|-----------------------------------------------------------------------------|
|                2                                                          2 |
|1362x x  + 1629x  - 840x x  + 513x x  + 429x x  + 842x x  + 1414x x  - 308x  |
|     3 4        4       0 5       1 5       2 5       3 5        4 5       5 |
|-----------------------------------------------------------------------------|
|                                                                      2      |
|+ 1415x x  - 1461x x  - 1135x x  + 701x x  + 766x x  + 785x x  + 1503x  +    |
|       0 6        1 6        2 6       3 6       4 6       5 6        6      |
|-----------------------------------------------------------------------------|
|                                                                            2|
|147x x  + 929x x  - 1220x x  - 853x x  + 493x x  + 226x x  + 1416x x  + 280x |
|    0 7       1 7        2 7       3 7       4 7       5 7        6 7       7|
|-----------------------------------------------------------------------------|
|                                                                             |
|- 7x x  + 1632x x  + 520x x  + 1259x x  + 157x x  + 1596x x  + 655x x  -     |
|    0 8        1 8       2 8        3 8       4 8        5 8       6 8       |
|-----------------------------------------------------------------------------|
|             2                                                               |
|42x x  - 586x })                                                             |
|   7 8       8                                                               |
+-----------------------------------------------------------------------------+
|i5 : time degreeMap phi                                                      |
|     -- used 0.142569 seconds                                                |
|                                                                             |
|o5 = 1                                                                       |
+-----------------------------------------------------------------------------+
|i6 : -- Compose phi:P^8--->P^14 with a linear projection P^14--->P^8 from    |
|     -- of dimension 5 (so that the composition phi':P^8--->P^8 must have    |
|     phi'=phi*map(ringP14,ringP8,for i to 8 list random(1,ringP14))          |
|                                                                             |
|                                 2                  2                        |
|o6 = map (ringP8, ringP8, {- 780x  - 506x x  + 1537x  - 132x x  - 928x x     |
|                                 0       0 1        1       0 2       1 2    |
|                                                                             |
|o6 : RingMap ringP8 <--- ringP8                                              |
|-----------------------------------------------------------------------------|
|a general subspace of P^14                                                   |
|degree equal to deg(G(1,5))=14)                                              |
|                                                                             |
|                                                                             |
|      2                                      2                               |
|+ 386x  - 102x x  + 422x x  + 725x x  - 1073x  - 905x x  - 830x x  + 1500x x |
|      2       0 3       1 3       2 3        3       0 4       1 4        2 4|
|-----------------------------------------------------------------------------|
|                 2                                                           |
|+ 276x x  + 1533x  - 653x x  + 1558x x  + 939x x  - 1432x x  + 462x x  -     |
|      3 4        4       0 5        1 5       2 5        3 5       4 5       |
|-----------------------------------------------------------------------------|
|    2                                                                   2    |
|329x  - 92x x  + 661x x  - 1298x x  - 684x x  + 70x x  - 715x x  + 1093x  +  |
|    5      0 6       1 6        2 6       3 6      4 6       5 6        6    |
|-----------------------------------------------------------------------------|
|                                                                           2 |
|581x x  + 329x x  + 454x x  - 911x x  - 84x x  - 1452x x  - 809x x  + 1202x  |
|    0 7       1 7       2 7       3 7      4 7        5 7       6 7        7 |
|-----------------------------------------------------------------------------|
|                                                                             |
|+ 1353x x  + 1503x x  + 482x x  + 893x x  - 643x x  + 598x x  + 110x x  +    |
|       0 8        1 8       2 8       3 8       4 8       5 8       6 8      |
|-----------------------------------------------------------------------------|
|               2        2                  2                              2  |
|1064x x  - 472x , - 522x  - 583x x  + 1339x  + 1535x x  - 1317x x  + 1113x  -|
|     7 8       8        0       0 1        1        0 2        1 2        2  |
|-----------------------------------------------------------------------------|
|                                    2                                        |
|169x x  + 1440x x  - 1657x x  + 721x  + 40x x  - 1576x x  - 367x x  + 257x x |
|    0 3        1 3        2 3       3      0 4        1 4       2 4       3 4|
|-----------------------------------------------------------------------------|
|       2                                                             2       |
|- 1454x  + 1612x x  + 1529x x  - 1068x x  + 560x x  - 1441x x  + 608x  -     |
|       4        0 5        1 5        2 5       3 5        4 5       5       |
|-----------------------------------------------------------------------------|
|                                                               2             |
|92x x  - 1006x x  + 285x x  + 102x x  - 397x x  + 66x x  - 643x  - 38x x  +  |
|   0 6        1 6       2 6       3 6       4 6      5 6       6      0 7    |
|-----------------------------------------------------------------------------|
|                                                                  2          |
|1380x x  + 1069x x  - 426x x  + 1147x x  + 982x x  + 10x x  - 662x  + 16x x  |
|     1 7        2 7       3 7        4 7       5 7      6 7       7      0 8 |
|-----------------------------------------------------------------------------|
|                                                                             |
|+ 1561x x  + 1597x x  + 512x x  + 1288x x  - 1253x x  + 1317x x  + 1481x x  -|
|       1 8        2 8       3 8        4 8        5 8        6 8        7 8  |
|-----------------------------------------------------------------------------|
|    2        2                  2                             2              |
|354x , - 640x  - 1551x x  + 469x  + 1482x x  - 1593x x  - 986x  + 471x x  +  |
|    8        0        0 1       1        0 2        1 2       2       0 3    |
|-----------------------------------------------------------------------------|
|                          2                                                2 |
|612x x  + 1228x x  + 1156x  - 731x x  + 1503x x  - 628x x  + 674x x  - 799x  |
|    1 3        2 3        3       0 4        1 4       2 4       3 4       4 |
|-----------------------------------------------------------------------------|
|                                                          2                  |
|+ 1137x x  + 844x x  + 589x x  - 666x x  + 829x x  - 1024x  - 170x x  +      |
|       0 5       1 5       2 5       3 5       4 5        5       0 6        |
|-----------------------------------------------------------------------------|
|                                                         2                   |
|450x x  + 1497x x  + 1204x x  - 907x x  + 1621x x  - 417x  + 1297x x  +      |
|    1 6        2 6        3 6       4 6        5 6       6        0 7        |
|-----------------------------------------------------------------------------|
|                                                                2            |
|1444x x  + 4x x  + 398x x  + 996x x  - 1031x x  + 239x x  + 303x  + 1215x x  |
|     1 7     2 7       3 7       4 7        5 7       6 7       7        0 8 |
|-----------------------------------------------------------------------------|
|                                                                             |
|- 83x x  + 1571x x  - 1543x x  - 925x x  - 694x x  + 151x x  - 520x x  +     |
|     1 8        2 8        3 8       4 8       5 8       6 8       7 8       |
|-----------------------------------------------------------------------------|
|    2         2                 2                            2               |
|880x , - 1210x  - 222x x  + 185x  + 245x x  + 1059x x  - 322x  + 238x x  +   |
|    8         0       0 1       1       0 2        1 2       2       0 3     |
|-----------------------------------------------------------------------------|
|                          2                                                  |
|962x x  + 1260x x  - 1581x  + 50x x  + 1352x x  - 1465x x  + 1555x x  +      |
|    1 3        2 3        3      0 4        1 4        2 4        3 4        |
|-----------------------------------------------------------------------------|
|     2                                                             2         |
|1333x  + 1362x x  + 1365x x  + 1168x x  - 1401x x  + 149x x  - 652x  +       |
|     4        0 5        1 5        2 5        3 5       4 5       5         |
|-----------------------------------------------------------------------------|
|                                                                 2           |
|1378x x  - 557x x  - 112x x  + 26x x  + 315x x  + 111x x  + 1592x  - 283x x  |
|     0 6       1 6       2 6      3 6       4 6       5 6        6       0 7 |
|-----------------------------------------------------------------------------|
|                                                                     2       |
|- 1454x x  + 907x x  + 212x x  + 400x x  + 1049x x  - 882x x  - 1429x  -     |
|       1 7       2 7       3 7       4 7        5 7       6 7        7       |
|-----------------------------------------------------------------------------|
|                                                                             |
|183x x  + 1571x x  - 1286x x  - 1179x x  + 1319x x  + 240x x  - 1100x x  +   |
|    0 8        1 8        2 8        3 8        4 8       5 8        6 8     |
|-----------------------------------------------------------------------------|
|               2       2                   2                            2    |
|1500x x  - 348x , 1051x  - 1325x x  + 1354x  - 346x x  - 1532x x  - 466x  +  |
|     7 8       8       0        0 1        1       0 2        1 2       2    |
|-----------------------------------------------------------------------------|
|                                  2                                          |
|163x x  - 659x x  - 291x x  + 966x  + 789x x  + 393x x  + 403x x  - 1199x x  |
|    0 3       1 3       2 3       3       0 4       1 4       2 4        3 4 |
|-----------------------------------------------------------------------------|
|      2                                                          2           |
|- 570x  - 93x x  - 492x x  - 418x x  + 713x x  - 1323x x  - 1384x  - 830x x  |
|      4      0 5       1 5       2 5       3 5        4 5        5       0 6 |
|-----------------------------------------------------------------------------|
|                                                       2                     |
|- 54x x  - 306x x  + 709x x  + 421x x  - 954x x  - 299x  + 1053x x  -        |
|     1 6       2 6       3 6       4 6       5 6       6        0 7          |
|-----------------------------------------------------------------------------|
|                                                                     2       |
|1080x x  + 686x x  + 170x x  - 1272x x  - 1661x x  + 1235x x  + 1553x  -     |
|     1 7       2 7       3 7        4 7        5 7        6 7        7       |
|-----------------------------------------------------------------------------|
|                                                                             |
|1454x x  - 1411x x  - 1195x x  - 962x x  + 737x x  - 390x x  + 957x x  +     |
|     0 8        1 8        2 8       3 8       4 8       5 8       6 8       |
|-----------------------------------------------------------------------------|
|                2        2                2                           2      |
|1538x x  + 1234x , - 509x  + 9x x  - 1563x  - 710x x  - 642x x  + 541x  +    |
|     7 8        8        0     0 1        1       0 2       1 2       2      |
|-----------------------------------------------------------------------------|
|                                   2                                         |
|220x x  - 1214x x  - 16x x  + 1008x  - 1088x x  + 755x x  - 886x x  -        |
|    0 3        1 3      2 3        3        0 4       1 4       2 4          |
|-----------------------------------------------------------------------------|
|                2                                                            |
|1433x x  + 1154x  + 1627x x  - 1547x x  - 951x x  + 866x x  + 163x x  -      |
|     3 4        4        0 5        1 5       2 5       3 5       4 5        |
|-----------------------------------------------------------------------------|
|     2                                                                      2|
|1142x  - 668x x  + 1361x x  + 1324x x  - 490x x  + 282x x  - 1133x x  - 612x |
|     5       0 6        1 6        2 6       3 6       4 6        5 6       6|
|-----------------------------------------------------------------------------|
|                                                                             |
|+ 805x x  - 126x x  + 1296x x  - 973x x  + 1271x x  - 1646x x  + 844x x  +   |
|      0 7       1 7        2 7       3 7        4 7        5 7       6 7     |
|-----------------------------------------------------------------------------|
|     2                                                                       |
|1073x  - 1452x x  - 1112x x  - 141x x  + 176x x  - 1579x x  - 78x x  +       |
|     7        0 8        1 8       2 8       3 8        4 8      5 8         |
|-----------------------------------------------------------------------------|
|                         2   2                   2                           |
|848x x  - 1365x x  + 711x , x  + 1543x x  - 1076x  + 493x x  - 526x x  +     |
|    6 8        7 8       8   0        0 1        1       0 2       1 2       |
|-----------------------------------------------------------------------------|
|    2                                     2                                  |
|868x  - 582x x  - 996x x  + 206x x  - 419x  + 1258x x  - 391x x  + 1002x x  -|
|    2       0 3       1 3       2 3       3        0 4       1 4        2 4  |
|-----------------------------------------------------------------------------|
|               2                                                           2 |
|1539x x  + 931x  - 1504x x  + 810x x  + 324x x  + 1356x x  + 313x x  + 772x  |
|     3 4       4        0 5       1 5       2 5        3 5       4 5       5 |
|-----------------------------------------------------------------------------|
|                                                                   2         |
|+ 299x x  + 1186x x  + 718x x  + 407x x  - 64x x  - 828x x  - 1393x  + 94x x |
|      0 6        1 6       2 6       3 6      4 6       5 6        6      0 7|
|-----------------------------------------------------------------------------|
|                                                                    2        |
|- 290x x  - 766x x  + 950x x  - 640x x  + 265x x  - 1640x x  - 1403x  -      |
|      1 7       2 7       3 7       4 7       5 7        6 7        7        |
|-----------------------------------------------------------------------------|
|                                                                             |
|126x x  + 891x x  - 1519x x  - 927x x  - 1335x x  - 1448x x  - x x  -        |
|    0 8       1 8        2 8       3 8        4 8        5 8    6 8          |
|-----------------------------------------------------------------------------|
|                2      2                  2                           2      |
|1103x x  - 1152x , 821x  + 558x x  - 1174x  - 168x x  + 986x x  + 790x  +    |
|     7 8        8      0       0 1        1       0 2       1 2       2      |
|-----------------------------------------------------------------------------|
|                                   2                                         |
|549x x  + 817x x  + 1396x x  + 695x  + 1211x x  + 878x x  - 1061x x  -       |
|    0 3       1 3        2 3       3        0 4       1 4        2 4         |
|-----------------------------------------------------------------------------|
|               2                                                             |
|1244x x  - 880x  + 1409x x  - 567x x  + 1240x x  + 1126x x  - 1262x x  +     |
|     3 4       4        0 5       1 5        2 5        3 5        4 5       |
|-----------------------------------------------------------------------------|
|    2                                                                       2|
|490x  + 1553x x  + 1276x x  + 805x x  + 576x x  - 1076x x  + 1617x x  - 495x |
|    5        0 6        1 6       2 6       3 6        4 6        5 6       6|
|-----------------------------------------------------------------------------|
|                                                                             |
|- 750x x  - 277x x  + 544x x  + 1479x x  - 784x x  - 64x x  - 1203x x  +     |
|      0 7       1 7       2 7        3 7       4 7      5 7        6 7       |
|-----------------------------------------------------------------------------|
|    2                                                                        |
|405x  + 1013x x  + 604x x  + 1301x x  + 1003x x  + 235x x  + 696x x  +       |
|    7        0 8       1 8        2 8        3 8       4 8       5 8         |
|-----------------------------------------------------------------------------|
|                        2         2                  2                       |
|939x x  - 714x x  - 879x , - 1452x  + 727x x  - 1159x  + 449x x  - 1169x x  +|
|    6 8       7 8       8         0       0 1        1       0 2        1 2  |
|-----------------------------------------------------------------------------|
|    2                                     2                                  |
|732x  + 575x x  - 600x x  + 924x x  - 837x  + 1298x x  - 860x x  + 1010x x  +|
|    2       0 3       1 3       2 3       3        0 4       1 4        2 4  |
|-----------------------------------------------------------------------------|
|              2                                                              |
|774x x  + 319x  + 1087x x  - 1120x x  + 1439x x  + 1175x x  - 1648x x  +     |
|    3 4       4        0 5        1 5        2 5        3 5        4 5       |
|-----------------------------------------------------------------------------|
|    2                                                                    2   |
|985x  - 1317x x  - 878x x  + 399x x  - 1339x x  + 70x x  - 463x x  + 470x  - |
|    5        0 6       1 6       2 6        3 6      4 6       5 6       6   |
|-----------------------------------------------------------------------------|
|                                                                            2|
|628x x  - 907x x  + 748x x  + 98x x  + 1150x x  + 1140x x  + 1308x x  + 621x |
|    0 7       1 7       2 7      3 7        4 7        5 7        6 7       7|
|-----------------------------------------------------------------------------|
|                                                                             |
|+ 369x x  - 991x x  - 1186x x  + 61x x  - 907x x  - 681x x  - 1528x x  +     |
|      0 8       1 8        2 8      3 8       4 8       5 8        6 8       |
|-----------------------------------------------------------------------------|
|              2                                                              |
|717x x  + 854x })                                                            |
|    7 8       8                                                              |
+-----------------------------------------------------------------------------+
|i7 : time degreeMap phi'                                                     |
|     -- used 1.95062 seconds                                                 |
|                                                                             |
|o7 = 14                                                                      |
+-----------------------------------------------------------------------------+

See also
========

  * degree(RationalMap) -- degree of a rational
    map
  * projectiveDegrees -- projective degrees of a
    rational map between projective varieties

Ways to use degreeMap :
=======================

  * "degreeMap(RingMap)"
  * degreeMap(RationalMap) -- degree of a
    rational map

For the programmer
==================

The object degreeMap, is a method function with options (Macaulay2Doc).

degreeMap(RationalMap) -- degree of a rational map
**************************************************

Synopsis
========

  * Function: degreeMap,
  * Usage:
        degreeMap Phi
  * Inputs:
      * Phi, a rational map,
  * Optional inputs (Macaulay2Doc),:
      * BlowUpStrategy, => ..., default value
        "Eliminate", null
      * MathMode, => ..., default value false, whether to
        ensure correctness of output
      * Verbose, => ...,
        default value true, null
  * Outputs:
      * an integer (Macaulay2Doc), the degree of Phi. So this value
        is 1 if and only if the map is birational onto its image.

Description
===========

This computation is done through the corresponding method for ring maps. See
degreeMap(RingMap), for more details and examples.

See also
========

  * degreeMap(RingMap) -- degree of a rational map between
    projective varieties
  * projectiveDegrees -- projective degrees of a
    rational map between projective varieties
  * degree(RationalMap) -- degree of a rational
    map

Ways to use this method:
========================

  * degreeMap(RationalMap) -- degree of a
    rational map

degrees(RationalMap) -- projective degrees of a rational map
************************************************************

Synopsis
========

  * Function: degrees (Macaulay2Doc),
  * Usage:
        degrees phi
        multidegree phi
  * Inputs:
      * phi, a rational map,
  * Outputs:
      * a list (Macaulay2Doc), the list of projective degrees of
        phi

Description
===========

This is a shortcut for projectiveDegrees(phi,MathMode=>true,Verbose=>false),
see projectiveDegrees(RationalMap).

Ways to use this method:
========================

  * degrees(RationalMap) -- projective degrees
    of a rational map

describe(RationalMap) -- describe a rational map
************************************************

Synopsis
========

  * Function: describe (Macaulay2Doc),
  * Usage:
        describe phi
  * Inputs:
      * phi, a rational map,
  * Outputs:
      * a description of phi, giving some indication of what has already been
        calculated.

Description
===========

+---------------------------------------------------------------+
|i1 : ZZ/33331[t_0..t_4];                                       |
+---------------------------------------------------------------+
|i2 : phi = rationalMap minors(2,matrix{{t_0..t_3},{t_1..t_4}});|
|                                                               |
|o2 : RationalMap (quadratic rational map from PP^4 to PP^5)    |
+---------------------------------------------------------------+
|i3 : describe phi                                              |
|                                                               |
|o3 = rational map defined by forms of degree 2                 |
|     source variety: PP^4                                      |
|     target variety: PP^5                                      |
|     coefficient ring: ZZ/33331                                |
+---------------------------------------------------------------+
|i4 : I = image phi;                                            |
|                                                               |
|                ZZ                                             |
|o4 : Ideal of -----[x ..x ]                                    |
|              33331  0   5                                     |
+---------------------------------------------------------------+
|i5 : describe phi                                              |
|                                                               |
|o5 = rational map defined by forms of degree 2                 |
|     source variety: PP^4                                      |
|     target variety: PP^5                                      |
|     image: smooth quadric hypersurface in PP^5                |
|     dominance: false                                          |
|     birationality: false                                      |
|     coefficient ring: ZZ/33331                                |
+---------------------------------------------------------------+
|i6 : ? I                                                       |
|                                                               |
|o6 = smooth quadric hypersurface in PP^5                       |
+---------------------------------------------------------------+
|i7 : phi!;                                                     |
|                                                               |
|o7 : RationalMap (quadratic rational map from PP^4 to PP^5)    |
+---------------------------------------------------------------+
|i8 : describe phi                                              |
|                                                               |
|o8 = rational map defined by forms of degree 2                 |
|     source variety: PP^4                                      |
|     target variety: PP^5                                      |
|     image: smooth quadric hypersurface in PP^5                |
|     dominance: false                                          |
|     birationality: false                                      |
|     degree of map: 1                                          |
|     projective degrees: {1, 2, 4, 4, 2}                       |
|     number of minimal representatives: 1                      |
|     dimension base locus: 1                                   |
|     degree base locus: 4                                      |
|     coefficient ring: ZZ/33331                                |
+---------------------------------------------------------------+

See also
========

  * RationalMap ! -- calculates every possible thing

Ways to use this method:
========================

  * describe(RationalMap) -- describe a
    rational map

Dominant
********

Description
===========

This is an optional argument for toMap. When true (Macaulay2Doc),
or infinity (Macaulay2Doc), is passed to
this option, the kernel of the returned ring map will be zero.

Functions with optional argument named Dominant :
=================================================

  * "rationalMap(...,Dominant=>...)"
  * "toMap(...,Dominant=>...)"

For the programmer
==================

The object Dominant, is a symbol (Macaulay2Doc).

entries(RationalMap) -- the entries of the matrix associated to a rational map
******************************************************************************

Synopsis
========

  * Function: entries (Macaulay2Doc),
  * Usage:
        entries Phi
  * Inputs:
      * Phi, a rational map,
  * Outputs:
      * a list (Macaulay2Doc), the entries of the matrix associated
        to the ring map defining the rational map Phi

Description
===========

This is equivalent to flatten entries matrix Phi.

See also
========

  * matrix(RationalMap) -- the matrix
    associated to a rational map

Ways to use this method:
========================

  * entries(RationalMap) -- the entries of the
    matrix associated to a rational map

EulerCharacteristic -- topological Euler characteristic of a (smooth) projective variety
****************************************************************************************

Synopsis
========

  * Usage:
        EulerCharacteristic I
  * Inputs:
      * I, an ideal (Macaulay2Doc), a homogeneous ideal defining a
        smooth projective variety $X\subset\mathbb{P}^n$
  * Optional inputs (Macaulay2Doc),:
      * BlowUpStrategy, => ..., default value
        "Eliminate", null
      * MathMode, => ..., default value false, whether to
        ensure correctness of output
      * Verbose, => ...,
        default value true, null
  * Outputs:
      * an integer (Macaulay2Doc), the topological Euler
        characteristics of $X$.

Description
===========

This is an application of the method SegreClass. See also
the corresponding methods in the packages CSM-A (see
http://www.math.fsu.edu/~aluffi/CSM/CSM.html ), by P. Aluffi, and
CharacteristicClasses (see
http://www.math.uiuc.edu/Macaulay2/doc/Macaulay2-1.16/share/doc/Macaulay2/
CharacteristicClasses/html/ ), by M. Helmer and C. Jost.

In general, even if the input ideal defines a singular variety $X$, the
returned value equals the degree of the component of dimension 0 of the
Chern-Fulton class of $X$. The Euler characteristic of a singular variety can
be computed via the method ChernSchwartzMacPherson.

In the example below, we compute the Euler characteristic of
$\mathbb{G}(1,4)\subset\mathbb{P}^{9}$, using both a probabilistic and a
non-probabilistic approach.

+-----------------------------------------------------------------------------+
|i1 : I = Grassmannian(1,4,CoefficientRing=>ZZ/190181);                       |
|                                                                             |
|                ZZ                                                           |
|o1 : Ideal of ------[p   ..p   , p   , p   , p   , p   , p   , p   , p   ,   |
|              190181  0,1   0,2   1,2   0,3   1,3   2,3   0,4   1,4   2,4    |
|-----------------------------------------------------------------------------|
|p   ]                                                                        |
| 3,4                                                                         |
+-----------------------------------------------------------------------------+
|i2 : time EulerCharacteristic I                                              |
|     -- used 0.289474 seconds                                                |
|                                                                             |
|o2 = 10                                                                      |
+-----------------------------------------------------------------------------+
|i3 : time EulerCharacteristic(I,MathMode=>true)                              |
|MathMode: output certified!                                                  |
|     -- used 0.0947265 seconds                                               |
|                                                                             |
|o3 = 10                                                                      |
+-----------------------------------------------------------------------------+

Caveat
======

No test is made to see if the projective variety is smooth.

See also
========

  * euler(ProjectiveVariety) (Macaulay2Doc),
    -- topological Euler characteristic of a (smooth) projective variety
  * ChernSchwartzMacPherson, --
    Chern-Schwartz-MacPherson class of a projective scheme
  * SegreClass -- Segre class of a closed subscheme of a
    projective variety

Ways to use EulerCharacteristic :
=================================

  * "EulerCharacteristic(Ideal)"

For the programmer
==================

The object EulerCharacteristic, is a method function with options (Macaulay2Doc).

exceptionalLocus -- exceptional locus of a birational map
*********************************************************

Synopsis
========

  * Usage:
        exceptionalLocus phi
  * Inputs:
      * phi, a rational map, a birational map
        $X\dashrightarrow Y$
  * Optional inputs (Macaulay2Doc),:
      * MathMode, => ..., default value false, whether to
        ensure correctness of output
  * Outputs:
      * an ideal (Macaulay2Doc), the ideal defining the closure in
        X of the locus where phi is not a local isomorphism

Description
===========

This method simply calculates the inverse image,
of the base locus, of the inverse map,
which in turn is determined through the method inverse.

Below, we compute the exceptional locus of the map defined by the linear system
of quadrics through the quintic rational normal curve in $\mathbb{P}^5$.

+-----------------------------------------------------------------------------+
|i1 : P5 := ZZ/100003[x_0..x_5];                                              |
+-----------------------------------------------------------------------------+
|i2 : phi = rationalMap(minors(2,matrix{{x_0,x_1,x_2,x_3,x_4},{x_1,x_         |
|                                                                             |
|o2 : RationalMap (quadratic rational map from PP^5 to 5-dimensional          |
|-----------------------------------------------------------------------------|
|2,x_3,x_4,x_5}}),Dominant=>2);                                               |
|                                                                             |
|subvariety of PP^9)                                                          |
+-----------------------------------------------------------------------------+
|i3 : E = exceptionalLocus phi;                                               |
|                                                                             |
|                ZZ                                                           |
|o3 : Ideal of ------[x ..x ]                                                 |
|              100003  0   5                                                  |
+-----------------------------------------------------------------------------+
|i4 : assert(E == phi^* ideal phi^-1)                                         |
+-----------------------------------------------------------------------------+
|i5 : assert(E == minors(3,matrix{{x_0,x_1,x_2,x_3},{x_1,x_2,x_3,x_4},{x_2,x_3|
|-----------------------------------------------------------------------------|
|,x_4,x_5}}))                                                                 |
+-----------------------------------------------------------------------------+

See also
========

  * ideal(RationalMap) -- base locus of a
    rational map
  * inverseMap(RationalMap) -- inverse of a birational map
  * RationalMap ^** Ideal -- inverse image
    via a rational map
  * isIsomorphism(RationalMap), --
    whether a birational map is an isomorphism
  * forceInverseMap -- declare that two rational maps
    are one the inverse of the other

Ways to use exceptionalLocus :
==============================

  * "exceptionalLocus(RationalMap)"

For the programmer
==================

The object exceptionalLocus, is a method function with options (Macaulay2Doc).

flatten(RationalMap) -- write source and target as nondegenerate varieties
**************************************************************************

Synopsis
========

  * Function: flatten (Macaulay2Doc),
  * Usage:
        flatten phi
  * Inputs:
      * phi, a rational map,
  * Outputs:
      * a rational map, a rational map isomorphic to the
        original map, flattened in the sense that the ideals of source and
        target contain no linear forms

Description
===========

+-----------------------------------------------------------------------------+
|i1 : P5 = QQ[t_0..t_5]; phi = rationalMap(P5/(35*t_1+45*t_2+21*t             |
|                                                                             |
|o2 : RationalMap (linear rational map from threefold in PP^5 to              |
|-----------------------------------------------------------------------------|
|_3+525*t_4+1365*t_5,1575*t_0*t_2-3250*t_2^2+735*t_0*t_3-1890*t_2*t_3-1666*t_3|
|                                                                             |
|hypersurface in PP^5)                                                        |
|-----------------------------------------------------------------------------|
|^2+17150*t_0*t_4-47250*t_2*t_4-22050*t_3*t_4-276850*t_4^2+46550*t_0*t_5-     |
|-----------------------------------------------------------------------------|
|122850*t_2*t_5-57330*t_3*t_5-1433250*t_4*t_5-1864450*t_5^2),P5/(315*t_0+280*t|
|-----------------------------------------------------------------------------|
|_1+45*t_2+21*t_3+210*t_4+1050*t_5),{-45*t_2-21*t_3-490*t_4-1330*t_5,         |
|-----------------------------------------------------------------------------|
|45*t_2+21*t_3+525*t_4+1365*t_5, 35*t_2, 35*t_3, 35*t_4, 35*t_5});            |
+-----------------------------------------------------------------------------+
|i3 : describe phi                                                            |
|                                                                             |
|o3 = rational map defined by forms of degree 1                               |
|     source variety: smooth complete intersection of type (1,2) in PP^5      |
|     target variety: hyperplane in PP^5                                      |
|     coefficient ring: QQ                                                    |
+-----------------------------------------------------------------------------+
|i4 : psi = flatten phi;                                                      |
|                                                                             |
|o4 : RationalMap (linear rational map from hypersurface in PP^4 to PP^4)     |
+-----------------------------------------------------------------------------+
|i5 : describe psi                                                            |
|                                                                             |
|o5 = rational map defined by forms of degree 1                               |
|     source variety: smooth quadric hypersurface in PP^4                     |
|     target variety: PP^4                                                    |
|     coefficient ring: QQ                                                    |
+-----------------------------------------------------------------------------+

Ways to use this method:
========================

  * flatten(RationalMap) -- write source and
    target as nondegenerate varieties

forceImage -- declare which is the image of a rational map
**********************************************************

Synopsis
========

  * Usage:
        forceImage(Phi,I)
  * Inputs:
      * Phi, a rational map,
      * I, an ideal (Macaulay2Doc),
  * Outputs:
      * null (Macaulay2Doc)

Description
===========

This method allows to inform the system about the image of a given rational map
without performing any computation. In particular, this can be used to declare
that a rational map is dominant.

+-----------------------------------------------------------------------------+
|i1 : P6 = QQ[t_0..t_6]; X =                                                  |
|                                                                             |
|o2 : Ideal of P6                                                             |
|-----------------------------------------------------------------------------|
|minors(3,matrix{{t_0..t_4},{t_1..t_5},{t_2..t_6}});                          |
+-----------------------------------------------------------------------------+
|i3 : Phi = rationalMap(X,Dominant=>2);                                       |
|                                                                             |
|o3 : RationalMap (cubic rational map from PP^6 to 6-dimensional subvariety of|
|-----------------------------------------------------------------------------|
|PP^9)                                                                        |
+-----------------------------------------------------------------------------+
|i4 : time forceImage(Phi,ideal 0_(target Phi))                               |
|     -- used 0.000975322 seconds                                             |
+-----------------------------------------------------------------------------+
|i5 : Phi;                                                                    |
|                                                                             |
|o5 : RationalMap (cubic dominant rational map from PP^6 to 6-dimensional     |
|-----------------------------------------------------------------------------|
|subvariety of PP^9)                                                          |
+-----------------------------------------------------------------------------+

Caveat
======

If the declaration is false, nonsensical answers may result.

See also
========

  * image(RationalMap) -- closure of the
    image of a rational map
  * forceInverseMap -- declare that two rational maps
    are one the inverse of the other

Ways to use forceImage :
========================

  * "forceImage(RationalMap,Ideal)"

For the programmer
==================

The object forceImage, is a method function (Macaulay2Doc).

forceInverseMap -- declare that two rational maps are one the inverse of the other
**********************************************************************************

Synopsis
========

  * Usage:
        forceInverseMap(Phi,Psi)
  * Inputs:
      * Phi, a rational map,
      * Psi, a rational map,
  * Outputs:
      * null (Macaulay2Doc)

Description
===========

This method allows to inform the system that two maps are one the inverse of
the other without performing any computation. This is useful in particular if
you calculate the inverse map using your own method.

Caveat
======

If the declaration is false, nonsensical answers may result.

See also
========

  * isInverseMap(RationalMap,RationalMap)
    -- checks whether two rational
    maps are one the inverse of the other
  * inverse(RationalMap) -- inverse of a
    birational map

Ways to use forceInverseMap :
=============================

  * "forceInverseMap(RationalMap,RationalMap)"

For the programmer
==================

The object forceInverseMap, is a method function (Macaulay2Doc).

graph -- closure of the graph of a rational map
***********************************************

Synopsis
========

  * Usage:
        graph phi
  * Inputs:
      * phi, a rational map,
  * Optional inputs (Macaulay2Doc),:
      * BlowUpStrategy, => ..., default value
        "Eliminate", null
  * Outputs:
      * a rational map, the first projection
      * a rational map, the second projection

Description
===========

+-----------------------------------------------------------------------------+
|i1 : (ZZ/190181)[x_0..x_4]; phi = rationalMap(minors(2,matrix{{x_0..x_3},{x_ |
|                                                                             |
|o2 = -- rational map --                                                      |
|                    ZZ                                                       |
|     source: Proj(------[x , x , x , x , x ])                                |
|                  190181  0   1   2   3   4                                  |
|                                  ZZ                                         |
|     target: subvariety of Proj(------[y , y , y , y , y , y ]) defined by   |
|                                190181  0   1   2   3   4   5                |
|             {                                                               |
|              y y  - y y  + y y                                              |
|               2 3    1 4    0 5                                             |
|             }                                                               |
|     defining forms: {                                                       |
|                         2                                                   |
|                      - x  + x x ,                                           |
|                         1    0 2                                            |
|                                                                             |
|                      - x x  + x x ,                                         |
|                         1 2    0 3                                          |
|                                                                             |
|                         2                                                   |
|                      - x  + x x ,                                           |
|                         2    1 3                                            |
|                                                                             |
|                      - x x  + x x ,                                         |
|                         1 3    0 4                                          |
|                                                                             |
|                      - x x  + x x ,                                         |
|                         2 3    1 4                                          |
|                                                                             |
|                         2                                                   |
|                      - x  + x x                                             |
|                         3    2 4                                            |
|                     }                                                       |
|                                                                             |
|o2 : RationalMap (quadratic dominant rational map from PP^4 to hypersurface  |
|-----------------------------------------------------------------------------|
|1..x_4}}),Dominant=>true)                                                    |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|in PP^5)                                                                     |
+-----------------------------------------------------------------------------+
|i3 : time (p1,p2) = graph phi;                                               |
|     -- used 0.0472853 seconds                                               |
+-----------------------------------------------------------------------------+
|i4 : p1                                                                      |
|                                                                             |
|o4 = -- rational map --                                                      |
|                                  ZZ                                         |
|     source: subvariety of Proj(------[x , x , x , x , x                     |
|                                190181  0   1   2   3                        |
|             {                                                               |
|              y y  - y y  + y y ,                                            |
|               2 3    1 4    0 5                                             |
|                                                                             |
|              x y  - x y  + x y ,                                            |
|               4 2    3 4    2 5                                             |
|                                                                             |
|              x y  - x y  + x y ,                                            |
|               3 2    2 4    1 5                                             |
|                                                                             |
|              x y  - x y  + x y ,                                            |
|               4 1    3 3    1 5                                             |
|                                                                             |
|              x y  - x y  + x y ,                                            |
|               3 1    2 3    0 5                                             |
|                                                                             |
|              x y  - x y  - x y  + x y ,                                     |
|               2 1    1 2    1 3    0 4                                      |
|                                                                             |
|              x y  - x y  + x y ,                                            |
|               4 0    2 3    1 4                                             |
|                                                                             |
|              x y  - x y  + x y ,                                            |
|               3 0    1 3    0 4                                             |
|                                                                             |
|              x y  - x y  + x y                                              |
|               2 0    1 1    0 2                                             |
|             }                                                               |
|                    ZZ                                                       |
|     target: Proj(------[x , x , x , x , x ])                                |
|                  190181  0   1   2   3   4                                  |
|     defining forms: {                                                       |
|                      x ,                                                    |
|                       0                                                     |
|                                                                             |
|                      x ,                                                    |
|                       1                                                     |
|                                                                             |
|                      x ,                                                    |
|                       2                                                     |
|                                                                             |
|                      x ,                                                    |
|                       3                                                     |
|                                                                             |
|                      x                                                      |
|                       4                                                     |
|                     }                                                       |
|                                                                             |
|o4 : MultihomogeneousRationalMap (birational map from 4-                     |
|-----------------------------------------------------------------------------|
|             ZZ                                                              |
| ]) x Proj(------[y , y , y , y , y , y ]) defined by                        |
|4          190181  0   1   2   3   4   5                                     |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|dimensional subvariety of PP^4 x PP^5 to PP^4)                               |
+-----------------------------------------------------------------------------+
|i5 : p2                                                                      |
|                                                                             |
|o5 = -- rational map --                                                      |
|                                  ZZ                                         |
|     source: subvariety of Proj(------[x ,                                   |
|                                190181  0                                    |
|             {                                                               |
|              y y  - y y  + y y ,                                            |
|               2 3    1 4    0 5                                             |
|                                                                             |
|              x y  - x y  + x y ,                                            |
|               4 2    3 4    2 5                                             |
|                                                                             |
|              x y  - x y  + x y ,                                            |
|               3 2    2 4    1 5                                             |
|                                                                             |
|              x y  - x y  + x y ,                                            |
|               4 1    3 3    1 5                                             |
|                                                                             |
|              x y  - x y  + x y ,                                            |
|               3 1    2 3    0 5                                             |
|                                                                             |
|              x y  - x y  - x y  + x y ,                                     |
|               2 1    1 2    1 3    0 4                                      |
|                                                                             |
|              x y  - x y  + x y ,                                            |
|               4 0    2 3    1 4                                             |
|                                                                             |
|              x y  - x y  + x y ,                                            |
|               3 0    1 3    0 4                                             |
|                                                                             |
|              x y  - x y  + x y                                              |
|               2 0    1 1    0 2                                             |
|             }                                                               |
|                                  ZZ                                         |
|     target: subvariety of Proj(------[y ,                                   |
|                                190181  0                                    |
|             {                                                               |
|              y y  - y y  + y y                                              |
|               2 3    1 4    0 5                                             |
|             }                                                               |
|     defining forms: {                                                       |
|                      y ,                                                    |
|                       0                                                     |
|                                                                             |
|                      y ,                                                    |
|                       1                                                     |
|                                                                             |
|                      y ,                                                    |
|                       2                                                     |
|                                                                             |
|                      y ,                                                    |
|                       3                                                     |
|                                                                             |
|                      y ,                                                    |
|                       4                                                     |
|                                                                             |
|                      y                                                      |
|                       5                                                     |
|                     }                                                       |
|                                                                             |
|o5 : MultihomogeneousRationalMap (dominant                                   |
|-----------------------------------------------------------------------------|
|                          ZZ                                                 |
|x , x , x , x ]) x Proj(------[y , y , y , y , y , y ]) defined by           |
| 1   2   3   4          190181  0   1   2   3   4   5                        |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|y , y , y , y , y ]) defined by                                              |
| 1   2   3   4   5                                                           |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|rational map from 4-dimensional subvariety of PP^4 x PP^5 to hypersurface in |
|-----------------------------------------------------------------------------|
|PP^5)                                                                        |
+-----------------------------------------------------------------------------+
|i6 : assert(p1 * phi == p2 and p2 * phi^-1 == p1)                            |
+-----------------------------------------------------------------------------+
|i7 : describe p2                                                             |
|                                                                             |
|o7 = rational map defined by multiforms of degree {0, 1}                     |
|     source variety: 4-dimensional subvariety of PP^4 x PP^5 cut out by 9    |
|     target variety: smooth quadric hypersurface in PP^5                     |
|     dominance: true                                                         |
|     coefficient ring: ZZ/190181                                             |
|-----------------------------------------------------------------------------|
|hypersurfaces of degrees ({0, 2},{1, 1},{1, 1},{1, 1},{1, 1},{1, 1},{1,      |
|-----------------------------------------------------------------------------|
|1},{1, 1},{1, 1})                                                            |
+-----------------------------------------------------------------------------+
|i8 : projectiveDegrees p2                                                    |
|                                                                             |
|o8 = {51, 28, 14, 6, 2}                                                      |
|                                                                             |
|o8 : List                                                                    |
+-----------------------------------------------------------------------------+

When the source of the rational map is a multi-projective variety, the method
returns all the projections.

+-----------------------------------------------------------------------------+
|i9 : time g = graph p2;                                                      |
|     -- used 0.0849586 seconds                                               |
+-----------------------------------------------------------------------------+
|i10 : g_0;                                                                   |
|                                                                             |
|o10 : MultihomogeneousRationalMap (rational map from 4-dimensional subvariety|
|-----------------------------------------------------------------------------|
|of PP^4 x PP^5 x PP^5 to PP^4)                                               |
+-----------------------------------------------------------------------------+
|i11 : g_1;                                                                   |
|                                                                             |
|o11 : MultihomogeneousRationalMap (rational map from 4-dimensional subvariety|
|-----------------------------------------------------------------------------|
|of PP^4 x PP^5 x PP^5 to PP^5)                                               |
+-----------------------------------------------------------------------------+
|i12 : g_2;                                                                   |
|                                                                             |
|o12 : MultihomogeneousRationalMap (dominant rational map from 4-dimensional  |
|-----------------------------------------------------------------------------|
|subvariety of PP^4 x PP^5 x PP^5 to hypersurface in PP^5)                    |
+-----------------------------------------------------------------------------+
|i13 : describe g_0                                                           |
|                                                                             |
|o13 = rational map defined by multiforms of degree {1, 0, 0}                 |
|      source variety: 4-dimensional subvariety of PP^4 x PP^5 x PP^5 cut out |
|      target variety: PP^4                                                   |
|      coefficient ring: ZZ/190181                                            |
|-----------------------------------------------------------------------------|
|by 34 hypersurfaces of degrees ({0, 1, 1},{0, 0, 2},{0, 1, 1},{0, 1, 1},{0,  |
|-----------------------------------------------------------------------------|
|1, 1},{0, 1, 1},{0, 1, 1},{0, 1, 1},{1, 0, 1},{1, 0, 1},{0, 1, 1},{0, 1,     |
|-----------------------------------------------------------------------------|
|1},{0, 1, 1},{0, 1, 1},{1, 0, 1},{1, 0, 1},{1, 0, 1},{0, 1, 1},{0, 1, 1},{0, |
|-----------------------------------------------------------------------------|
|1, 1},{0, 1, 1},{0, 1, 1},{1, 0, 1},{1, 0, 1},{1, 0, 1},{0, 2, 0},{1, 1,     |
|-----------------------------------------------------------------------------|
|0},{1, 1, 0},{1, 1, 0},{1, 1, 0},{1, 1, 0},{1, 1, 0},{1, 1, 0},{1, 1, 0})    |
+-----------------------------------------------------------------------------+

See also
========

  * graph(RingMap) -- closure of the graph of a
    rational map
  * graphIdeal (Macaulay2Doc) -- the ideal of
    the graph of the regular map corresponding to a ring map

Ways to use graph :
===================

  * "graph(RationalMap)"
  * graph(RingMap) -- closure of the graph of a
    rational map

For the programmer
==================

The object graph, is a method function with options (Macaulay2Doc).

graph(RingMap) -- closure of the graph of a rational map
********************************************************

Synopsis
========

  * Function: graph,
  * Usage:
        graph phi
  * Inputs:
      * phi, a ring map (Macaulay2Doc), representing a rational
        map $\Phi:X \dashrightarrow Y$
  * Optional inputs (Macaulay2Doc),:
      * BlowUpStrategy, => ..., default value
        "Eliminate", null
  * Outputs:
      * a ring map (Macaulay2Doc), representing the projection
        on the first factor $\mathbf{Graph}(\Phi) \to X$
      * a ring map (Macaulay2Doc), representing the projection
        on the second factor $\mathbf{Graph}(\Phi) \to Y$

Description
===========

+-----------------------------------------------------------------------------+
|i1 : phi = map(QQ[x_0..x_3],QQ[y_0..y_2],{-x_1^2+x_0*x_2,-x_1*x_2+x_0*x_3,-x_|
|                                                                             |
|                                      2                           2          |
|o1 = map (QQ[x ..x ], QQ[y ..y ], {- x  + x x , - x x  + x x , - x  + x x }) |
|              0   3       0   2       1    0 2     1 2    0 3     2    1 3   |
|                                                                             |
|o1 : RingMap QQ[x ..x ] <--- QQ[y ..y ]                                      |
|                 0   3           0   2                                       |
|-----------------------------------------------------------------------------|
|2^2+x_1*x_3})                                                                |
+-----------------------------------------------------------------------------+
|i2 : graph phi                                                               |
|                                                                             |
|                      QQ[x ..x , y ..y ]                                     |
|                          0   3   0   2                                      |
|o2 = (map (----------------------------------------, QQ[x ..x ], {x , x , x ,|
|           (x y  - x y  + x y , x y  - x y  + x y )      0   3     0   1   2 |
|             3 0    2 1    1 2   2 0    1 1    0 2                           |
|     ------------------------------------------------------------------------|
|                           QQ[x ..x , y ..y ]                                |
|                               0   3   0   2                                 |
|     x }), map (----------------------------------------, QQ[y ..y ], {y ,   |
|      3         (x y  - x y  + x y , x y  - x y  + x y )      0   2     0    |
|                  3 0    2 1    1 2   2 0    1 1    0 2                      |
|     ------------------------------------------------------------------------|
|     y , y }))                                                               |
|      1   2                                                                  |
|                                                                             |
|o2 : Sequence                                                                |
+-----------------------------------------------------------------------------+

See also
========

  * graph(RationalMap) -- closure of the graph of a rational map
  * graphIdeal (Macaulay2Doc) -- the ideal of
    the graph of the regular map corresponding to a ring map

Ways to use this method:
========================

  * graph(RingMap) -- closure of the graph of a
    rational map

ideal(RationalMap) -- base locus of a rational map
**************************************************

Synopsis
========

  * Function: ideal (Macaulay2Doc),
  * Usage:
        ideal phi
  * Inputs:
      * phi, a rational map,
  * Outputs:
      * an ideal (Macaulay2Doc), the ideal of the base locus of
        phi

Description
===========

This is generally difficult, but in some cases it is equivalent to ideal matrix
phi, which does not perform any computation.

+-----------------------------------------------------------------------------+
|i1 : y = gens(QQ[x_0..x_5]/(x_2^2-x_2*x_3+x_1*x_4-x_0*x_5));                 |
+-----------------------------------------------------------------------------+
|i2 : phi = rationalMap {y_4^2-y_3*y_5,-y_2*y_4+y_3*y_4-y_1*y_5, -y_2*y_3+y_3^|
|                                                                             |
|o2 = -- rational map --                                                      |
|     source: subvariety of Proj(QQ[x , x , x , x , x , x ]) defined by       |
|                                    0   1   2   3   4   5                    |
|             {                                                               |
|               2                                                             |
|              x  - x x  + x x  - x x                                         |
|               2    2 3    1 4    0 5                                        |
|             }                                                               |
|     target: Proj(QQ[y , y , y , y , y ])                                    |
|                      0   1   2   3   4                                      |
|     defining forms: {                                                       |
|                       2                                                     |
|                      x  - x x ,                                             |
|                       4    3 5                                              |
|                                                                             |
|                      - x x  + x x  - x x ,                                  |
|                         2 4    3 4    1 5                                   |
|                                                                             |
|                                2                                            |
|                      - x x  + x  - x x ,                                    |
|                         2 3    3    1 4                                     |
|                                                                             |
|                      - x x  + x x  - x x ,                                  |
|                         1 2    1 3    0 4                                   |
|                                                                             |
|                       2                                                     |
|                      x  - x x                                               |
|                       1    0 3                                              |
|                     }                                                       |
|                                                                             |
|o2 : RationalMap (quadratic rational map from hypersurface in PP^5 to PP^4)  |
|-----------------------------------------------------------------------------|
|2-y_1*y_4, -y_1*y_2+y_1*y_3-y_0*y_4, y_1^2-y_0*y_3}                          |
+-----------------------------------------------------------------------------+
|i3 : time ideal phi                                                          |
|     -- used 0.00278176 seconds                                              |
|                                                                             |
|             2                                     2                         |
|o3 = ideal (x  - x x , x x  - x x  + x x , x x  - x  + x x , x x  - x x  +   |
|             4    3 5   2 4    3 4    1 5   2 3    3    1 4   1 2    1 3     |
|     ------------------------------------------------------------------------|
|            2                                                                |
|     x x , x  - x x )                                                        |
|      0 4   1    0 3                                                         |
|                                                                             |
|                     QQ[x ..x ]                                              |
|                         0   5                                               |
|o3 : Ideal of -----------------------                                        |
|               2                                                             |
|              x  - x x  + x x  - x x                                         |
|               2    2 3    1 4    0 5                                        |
+-----------------------------------------------------------------------------+
|i4 : assert(ideal phi == ideal matrix phi)                                   |
+-----------------------------------------------------------------------------+
|i5 : phi' = last graph phi                                                   |
|                                                                             |
|o5 = -- rational map --                                                      |
|     source: subvariety of Proj(QQ[x , x , x ,                               |
|                                    0   1   2                                |
|             {                                                               |
|              x y  - x y  + x y ,                                            |
|               1 2    3 3    4 4                                             |
|                                                                             |
|              x y  - x y  - x y  + x y ,                                     |
|               0 2    1 3    2 4    3 4                                      |
|                                                                             |
|              x y  - x y  + x y  - x y ,                                     |
|               2 1    3 1    4 2    5 3                                      |
|                                                                             |
|              x y  - x y  + x y ,                                            |
|               1 1    2 2    5 4                                             |
|                                                                             |
|              x y  - x y  + x y ,                                            |
|               0 1    2 3    4 4                                             |
|                                                                             |
|              x y  - x y  + x y  - x y ,                                     |
|               2 0    3 0    4 1    5 2                                      |
|                                                                             |
|              x y  - x y  + x y ,                                            |
|               1 0    3 1    4 2                                             |
|                                                                             |
|              x y  - x y  + x y ,                                            |
|               0 0    2 2    4 3                                             |
|                                                                             |
|               2                                                             |
|              x  - x x  + x x  - x x                                         |
|               2    2 3    1 4    0 5                                        |
|             }                                                               |
|     target: Proj(QQ[y , y , y , y , y ])                                    |
|                      0   1   2   3   4                                      |
|     defining forms: {                                                       |
|                      y ,                                                    |
|                       0                                                     |
|                                                                             |
|                      y ,                                                    |
|                       1                                                     |
|                                                                             |
|                      y ,                                                    |
|                       2                                                     |
|                                                                             |
|                      y ,                                                    |
|                       3                                                     |
|                                                                             |
|                      y                                                      |
|                       4                                                     |
|                     }                                                       |
|                                                                             |
|o5 : MultihomogeneousRationalMap (rational map                               |
|-----------------------------------------------------------------------------|
|x , x , x ]) x Proj(QQ[y , y , y , y , y ]) defined by                       |
| 3   4   5              0   1   2   3   4                                    |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|from 4-dimensional subvariety of PP^5 x PP^4 to PP^4)                        |
+-----------------------------------------------------------------------------+
|i6 : time ideal phi'                                                         |
|     -- used 0.141197 seconds                                                |
|                                                                             |
|o6 = ideal 1                                                                 |
|                                                                             |
|                                                                             |
|                                                                             |
|o6 : Ideal of ---------------------------------------------------------------|
|                                                                             |
|              (x y  - x y  + x y , x y  - x y  - x y  + x y , x y  - x y  + x|
|                1 2    3 3    4 4   0 2    1 3    2 4    3 4   2 1    3 1    |
|-----------------------------------------------------------------------------|
|                               QQ[x ..x , y ..y ]                            |
|                                   0   5   0   4                             |
|-----------------------------------------------------------------------------|
|                                                                             |
| y  - x y , x y  - x y  + x y , x y  - x y  + x y , x y  - x y  + x y  - x y |
|4 2    5 3   1 1    2 2    5 4   0 1    2 3    4 4   2 0    3 0    4 1    5 2|
|-----------------------------------------------------------------------------|
|------------------------------------------------------------------           |
|                                           2                                 |
|, x y  - x y  + x y , x y  - x y  + x y , x  - x x  + x x  - x x )           |
|   1 0    3 1    4 2   0 0    2 2    4 3   2    2 3    1 4    0 5            |
+-----------------------------------------------------------------------------+
|i7 : assert(ideal phi' != ideal matrix phi')                                 |
+-----------------------------------------------------------------------------+

See also
========

  * isMorphism -- whether a rational map is a morphism
  * matrix(RationalMap) -- the matrix
    associated to a rational map

Ways to use this method:
========================

  * ideal(RationalMap) -- base locus of a
    rational map

image(RationalMap,String) -- closure of the image of a rational map using the F4 algorithm (experimental)
*********************************************************************************************************

Synopsis
========

  * Function: image (Macaulay2Doc),
  * Usage:
        image(Phi,"F4")
        image(Phi,"MGB")
  * Inputs:
      * Phi, a rational map,
      * a string (Macaulay2Doc), "F4" or "MGB"
  * Outputs:
      * the ideal (Macaulay2Doc), defining the closure of the image
        of Phi; the calculation passes through groebnerBasis (Macaulay2Doc),
        (...,Strategy=>"F4") or
        groebnerBasis (Macaulay2Doc),(...,Strategy=>"MGB").

See also
========

  * image(RationalMap) -- closure of the
    image of a rational map
  * image(RationalMap,ZZ) -- closure of the
    image of a rational map
  * groebnerBasis (Macaulay2Doc) -- Gröbner basis, as a
    matrix

Ways to use this method:
========================

  * image(RationalMap,String), --
    closure of the image of a rational map using the F4 algorithm
    (experimental)

image(RationalMap,ZZ) -- closure of the image of a rational map
***************************************************************

Synopsis
========

  * Function: image (Macaulay2Doc),
  * Usage:
        image Phi
        image(Phi,d)
  * Inputs:
      * Phi, a rational map,
      * d, an integer (Macaulay2Doc),
  * Outputs:
      * an ideal (Macaulay2Doc), the ideal defining the closure of
        the image of Phi, or its degree d homogeneous component if d is passed

Description
===========

This computation is done through the kernel of a ring map representing the
rational map. See kernel(RingMap) (Macaulay2Doc), and
kernel(RingMap,ZZ), for more details.

See also
========

  * kernel(RingMap,ZZ) (missing documentation)
  * kernel(RingMap) (Macaulay2Doc) -- kernel of a
    ringmap
  * image(RationalMap,String), --
    closure of the image of a rational map using the F4 algorithm
    (experimental)

Ways to use this method:
========================

  * "image(RationalMap)"
  * image(RationalMap,ZZ) -- closure of the
    image of a rational map

inverse(RationalMap) -- inverse of a birational map
***************************************************

Synopsis
========

  * Function: inverse (Macaulay2Doc),
  * Usage:
        inverse phi
        inverse(phi,MathMode=>b)
  * Inputs:
      * phi, a rational map, which has to be birational,
        and b is a boolean value (Macaulay2Doc), that is, true
        or false (the default value is false)
  * Outputs:
      * a rational map, the inverse map of phi

Description
===========

inverse(phi,MathMode=>true) is the same as inverseMap,
(phi,MathMode=>true,Verbose=>false), while
inverse(phi,MathMode=>false) applies a middle ground approach between
inverseMap,(phi,MathMode=>true) and inverseMap,
(phi,MathMode=>false). The procedure for the latter is as follows:
It first computes the inverse map of phi using psi = See inverseMap,
phi. Then it is checked that psi phi p,
== p and phi psi q, == q, where p,q are,
respectively, a random point, on the source,
and the target, of phi.
Finally, if the tests pass, the command forceInverseMap,
(phi,psi) is invoked and psi is returned.

+-----------------------------------------------------------------------------+
|i1 : R = QQ[x_0..x_4]; phi = rationalMap minors(4,random(R^{4:1},            |
|                                                                             |
|o2 = -- rational map --                                                      |
|     source: Proj(QQ[x , x , x , x , x ])                                    |
|                      0   1   2   3   4                                      |
|     target: Proj(QQ[x , x , x , x , x ])                                    |
|                      0   1   2   3   4                                      |
|     defining forms: {                                                       |
|                        87713 4   171940669 3     786693217 2 2              |
|                      - -----x  + ---------x x  - ---------x x  -            |
|                         7840 0    3628800  0 1    16934400 0 1              |
|                                                                             |
|                      77687 4   1893375163 3     745990081 2 2               |
|                      -----x  - ----------x x  - ---------x x  +             |
|                      44100 0    74088000  0 1    3704400  0 1               |
|                                                                             |
|                      20470217 4   6197290213 3     142427891567             |
|                      --------x  - ----------x x  - ------------x            |
|                       882000  0    42336000  0 1     169344000              |
|                                                                             |
|                        1500391 4   8275752563 3     256341089 2             |
|                      - -------x  - ----------x x  + ---------x x            |
|                         211680 0    88905600  0 1    3704400  0             |
|                                                                             |
|                        25197 4   140616709 3     13520392891 2 2            |
|                      - -----x  - ---------x x  + -----------x x             |
|                         2800 0    6350400  0 1     50803200  0 1            |
|                     }                                                       |
|                                                                             |
|o2 : RationalMap (rational map from PP^4 to PP^4)                            |
|-----------------------------------------------------------------------------|
|R^5)) -- special Cremona transformation of P^4 of type (4,4)                 |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
| 1176261   3   174575 4   456216499 3     52359194927 2                      |
| -------x x  + ------x  - ---------x x  + -----------x x x  -                |
|   8960  0 1    2268  1    21168000 0 2    444528000  0 1 2                  |
|                                                                             |
|246515089   3   35446399 4   12828001 3     4299402481 2                     |
|---------x x  + --------x  - --------x x  - ----------x x x  -               |
| 1693440  0 1     80640  1    2940000 0 2    37044000  0 1 2                 |
|                                                                             |
|2 2   1607881319   3   402659 4   6075301 3     261895079099 2               |
| x  + ----------x x  + ------x  + -------x x  - ------------x                |
|0 1     4838400  0 1     720  1    705600 0 2     423360000  0               |
|                                                                             |
|2   155007079   3   746581 4   97867211 3     164921515901 2                 |
|  + ---------x x  - ------x  - --------x x  - ------------x x                |
|1    5080320  0 1    6480  1    3528000 0 2     889056000  0 1               |
|                                                                             |
|   13683556193   3   43193719 4   1310991 3     13938392243 2                |
| + -----------x x  - --------x  - -------x x  + -----------x x               |
|     33868800  0 1    181440  1    196000 0 2    381024000  0                |
|-----------------------------------------------------------------------------|
|5579886061   2     13389751 3     191644459 2 2   59850847787     2          |
|----------x x x  - --------x x  - ---------x x  + -----------x x x  -        |
| 39513600  0 1 2    282240  1 2   105840000 0 2    889056000  0 1 2          |
|                                                                             |
| 117657989077   2     520789147 3     47018753 2 2   2447714863     2        |
| ------------x x x  + ---------x x  - --------x x  - ----------x x x         |
|   177811200  0 1 2    8467200  1 2    1470000 0 2     9878400  0 1 2        |
|                                                                             |
|       1197196974853   2     129429707 3     4720865 2 2   16381014529       |
|x x  - -------------x x x  + ---------x x  - -------x x  - -----------       |
| 1 2     1016064000  0 1 2     403200  1 2    56448  0 2     26460000        |
|                                                                             |
|     24403628009   2     888520553 3     382779157 2 2   5957276623          |
|x  + -----------x x x  + ---------x x  - ---------x x  - ----------x x       |
| 2    106686720  0 1 2    38102400 1 2    10584000 0 2    74088000  0        |
|                                                                             |
|      20490507127   2     1092604379 3     25878779 2 2   61718231           |
| x  + -----------x x x  + ----------x x  + --------x x  + --------x x        |
|1 2     47628000  0 1 2    10160640  1 2    2268000 0 2    2126250 0 1       |
|-----------------------------------------------------------------------------|
|831631429 2 2   31307303   3   8534795951   3   10081913 4   11675519 3     1|
|---------x x  + --------x x  + ----------x x  + --------x  - --------x x  + -|
| 35562240 1 2    3307500 0 2    296352000 1 2    1764000 2    441000  0 3    |
|                                                                             |
|  14479054193 2 2   536047   3   1192105381   3   518639 4   5114703379 3    |
|- -----------x x  - ------x x  - ----------x x  - ------x  + ----------x x  +|
|    50803200  1 2    17640 0 2    14817600  1 2   117600 2    277830000 0 3  |
|                                                                             |
|     2   185942825261 2 2   522507949   3   50490451   3   3948499 4   187962|
|x x x  - ------------x x  - ---------x x  - --------x x  - -------x  + ------|
| 0 1 2     508032000  1 2    7056000  0 2    288000  1 2    235200 2    26460|
|                                                                             |
|  2   509959133 2 2   885643   3   25594339   3   60397 4   124434781 3     9|
| x  + ---------x x  - ------x x  - --------x x  - -----x  + ---------x x  + -|
|1 2    5292000  1 2    49000 0 2    1411200 1 2   12000 2    2778300  0 3    |
|                                                                             |
| 2   17113948007 2 2   3781009   3   1399587607   3   3213307 4   201997 3   |
|x  - -----------x x  - -------x x  - ----------x x  - -------x  - ------x x  |
| 2    762048000  1 2    992250 0 2    31752000  1 2    529200 2    73500 0 3 |
|-----------------------------------------------------------------------------|
|92249615263 2       36291945199   2     56838053 3     1873054933 2          |
|-----------x x x  - -----------x x x  + --------x x  + ----------x x x       |
|1143072000  0 1 3    152409600  0 1 3    1306368 1 3   2222640000 0 2 3      |
|                                                                             |
| 3691001057 2       79302551   2     613515787 3     6101491049 2            |
| ----------x x x  + --------x x x  + ---------x x  + ----------x x x  +      |
|  17781120  0 1 3    864000  0 1 3     907200  1 3    123480000 0 2 3        |
|                                                                             |
|641 3     9589727641 2       5095947877   2     8620609 3     242438299      |
|---x x  - ----------x x x  + ----------x x x  + -------x x  + ---------x     |
|00  0 3    63504000  0 1 3    14515200  0 1 3    20736  1 3    13230000      |
|                                                                             |
|0257972921 2       1098062669   2     2057266549 3     2039769983 2          |
|----------x x x  + ----------x x x  - ----------x x  + ----------x x x       |
|1333584000 0 1 3    31752000  0 1 3     5443200  1 3    22226400  0 2 3      |
|                                                                             |
|  4300057681 2       18208353301   2     2892598211 3     958803161 2        |
|+ ----------x x x  + -----------x x x  - ----------x x  + ---------x x x     |
|   28576800  0 1 3     32659200  0 1 3     6531840  1 3    15876000 0 2      |
|-----------------------------------------------------------------------------|
|  292082344411           23709080881 2       74483500913   2     35210041763 |
|+ ------------x x x x  - -----------x x x  + -----------x x x  + -----------x|
|   1600300800  0 1 2 3    114307200  1 2 3    2222640000 0 2 3    5334336000 |
|                                                                             |
|2497012027           24426294703 2       8032480129   2     393103933   2    |
|----------x x x x  + -----------x x x  + ----------x x x  + ---------x x x  +|
|  6945750  0 1 2 3    190512000  1 2 3    222264000 0 2 3    5556600  1 2 3  |
|                                                                             |
|2       30818449           2599354883 2       299855093   2     6354704233   |
| x x  + --------x x x x  + ----------x x x  - ---------x x x  + ----------x x|
|0 2 3    4704000 0 1 2 3     5443200  1 2 3    6615000  0 2 3    127008000 1 |
|                                                                             |
|  225727376089           2460325939 2       8187871753   2     10446122737   |
|+ ------------x x x x  + ----------x x x  + ----------x x x  + -----------x x|
|    833490000  0 1 2 3    63504000  1 2 3    222264000 0 2 3     90720000  1 |
|                                                                             |
|    8509111559           95425957337 2       8879315339   2     123111557327 |
|  + ----------x x x x  + -----------x x x  + ----------x x x  + ------------x|
|3    21432600  0 1 2 3    137168640  1 2 3    158760000 0 2 3     571536000  |
|-----------------------------------------------------------------------------|
|  2     2080929049 3     203544727 2 2   5850860317                          |
| x x  + ----------x x  + ---------x x  - ----------                          |
|1 2 3    222264000 2 3    3175200  0 3    342921600                          |
|                                                                             |
| 980054 3     1676997047 2 2   16148725991     2                             |
| ------x x  - ----------x x  - -----------x x x  -                           |
| 231525 2 3    20837250  0 3    190512000  0 1 3                             |
|                                                                             |
|2     30475577 3     35776819 2 2   155423077     2                          |
| x  - --------x x  + --------x x  + ---------x x x                           |
|2 3    1512000 2 3    705600  0 3     345600  0 1 3                          |
|                                                                             |
|2      675949 3     151489834 2 2   887711869     2                          |
| x  - -------x x  + ---------x x  + ---------x x x                           |
|2 3   3528000 2 3    10418625 0 3    63504000 0 1 3                          |
|                                                                             |
|  2     804820927 3     838659919 2 2   64213060183                          |
| x x  + ---------x x  - ---------x x  - -----------                          |
|1 2 3    95256000 2 3    15876000 0 3    228614400                           |
|-----------------------------------------------------------------------------|
|     2   53160721 2 2   34691361079     2   10467532387     2   58824896633 2|
|x x x  - --------x x  + -----------x x x  - -----------x x x  + -----------x |
| 0 1 3    1224720 1 3    222264000  0 2 3    228614400  1 2 3    1333584000 2|
|                                                                             |
|541267781 2 2   35711433817     2   1583696827     2   1235700847 2 2   87106|
|---------x x  + -----------x x x  - ----------x x x  + ----------x x  - -----|
| 10886400 1 3    666792000  0 2 3    142884000 1 2 3    66679200  2 3    4762|
|                                                                             |
|   331874303 2 2   9042325657     2   29069826377     2   75778393 2 2   4296|
| - ---------x x  - ----------x x x  + -----------x x x  - --------x x  - ----|
|     622080  1 3    127008000 0 2 3    130636800  1 2 3    1587600 2 3    151|
|                                                                             |
|   165710771 2 2   432824251999     2   13643011097     2   2379244109 2 2   |
| - ---------x x  - ------------x x x  + -----------x x x  - ----------x x  - |
|     604800  1 3    6667920000  0 2 3    114307200  1 2 3    119070000 2 3   |
|                                                                             |
|     2   30588325141 2 2   9844329091     2   3831602699     2   421910291 2 |
|x x x  - -----------x x  - ----------x x x  + ----------x x x  - ---------x x|
| 0 1 3     65318400  1 3    190512000 0 2 3    95256000  1 2 3    31752000 2 |
|-----------------------------------------------------------------------------|
| 2   398325457   3   514981   3    829687   3   109219 4   87928937 3     373|
|x  - ---------x x  + ------x x  + -------x x  - ------x  - --------x x  + ---|
| 3    4762800  0 3    30240 1 3   1058400 2 3    3780  3   19051200 0 4    30|
|                                                                             |
|963   3   625319561   3   298242641   3   544463 4   13856723 3     106241101|
|---x x  - ---------x x  + ---------x x  + ------x  + --------x x  + ---------|
|800 0 3    8164800  1 3    9525600  2 3   113400 3    1984500 0 4    29635200|
|                                                                             |
|577   3   33468533   3   15349   3   31001 4   7356550399 3     271122359 2  |
|---x x  + --------x x  - -----x x  - -----x  + ----------x x  + ---------x x |
|200 0 3    373248  1 3   19200 2 3   25920 3    158760000 0 4    15876000 0 1|
|                                                                             |
|94290809   3   6889639   3   1258555709   3   336733 4   108579713 3     3462|
|--------x x  - -------x x  - ----------x x  - ------x  - ---------x x  + ----|
| 4762800 0 3    466560 1 3    95256000  2 3   226800 3    95256000 0 4    889|
|                                                                             |
|2   1356293   3   90385021   3   1080170969   3   240439 4   708417343 3     |
|  + -------x x  - --------x x  + ----------x x  + ------x  - ---------x x  - |
|3    352800 0 3    604800  1 3    31752000  2 3    15120 3    47628000 0 4   |
|-----------------------------------------------------------------------------|
|80364421 2       12850450633   2     304700929 3     600713887 2       520240|
|--------x x x  - -----------x x x  - ---------x x  - ---------x x x  + ------|
|4819200  0 1 4    152409600  0 1 4    7620480  1 4   127008000 0 2 4    35562|
|                                                                             |
|79 2       48549025723   2     734224931 3     409063541 2       1819317229  |
|--x x x  + -----------x x x  + ---------x x  + ---------x x x  + ----------x |
|0  0 1 4    254016000  0 1 4    2419200  1 4    13608000 0 2 4     7056000  0|
|                                                                             |
|     47203852511   2     404391767 3     87849878513 2       92563384943     |
|x  + -----------x x x  + ---------x x  + -----------x x x  + -----------x x x|
| 4     63504000  0 1 4    2419200  1 4    1905120000 0 2 4    254016000  0 1 |
|                                                                             |
|3880909 2       1486648359659   2     3469044511 3     812299043 2       1016|
|-------x x x  + -------------x x x  - ----------x x  - ---------x x x  - ----|
|056000  0 1 4     5334336000  0 1 4    38102400  1 4    35721000 0 2 4    571|
|                                                                             |
|69211419139 2       821880229741   2     8234269157 3     17527342831 2      |
|-----------x x x  + ------------x x x  + ----------x x  - -----------x x x  -|
| 444528000  0 1 4    4267468800  0 1 4    152409600 1 4    714420000  0 2 4  |
|-----------------------------------------------------------------------------|
|788881           12352174879 2       192049751   2     3302801963   2     369|
|------x x x x  - -----------x x x  + ---------x x x  + ----------x x x  + ---|
|24000  0 1 2 4    266716800  1 2 4    42336000 0 2 4    84672000  1 2 4    70|
|                                                                             |
|         98792752963 2       274596281   2     94078309523   2     122592691 |
|x x x  + -----------x x x  + ---------x x x  + -----------x x x  + ---------x|
| 1 2 4    190512000  1 2 4    95256000 0 2 4    533433600  1 2 4    15876000 |
|                                                                             |
|      476223629723 2       243843073   2     34868254657   2     16067797 3  |
| x  + ------------x x x  - ---------x x x  + -----------x x x  + --------x x |
|2 4     508032000  1 2 4    76204800 0 2 4    127008000  1 2 4    1814400 2 4|
|                                                                             |
|76789773           7196517913 2       4944129079   2     111040487203   2    |
|--------x x x x  + ----------x x x  - ----------x x x  - ------------x x x  -|
|5360000  0 1 2 4    381024000 1 2 4    95256000  0 2 4     952560000  1 2 4  |
|                                                                             |
| 5079418246169           271977807167 2       3766010893   2     73836492767 |
| -------------x x x x  + ------------x x x  - ----------x x x  - -----------x|
|  16003008000  0 1 2 4    1524096000  1 2 4    95256000  0 2 4    533433600  |
|-----------------------------------------------------------------------------|
|31661 3     588577417 2       1475796509           8966991391 2       4710589|
|-----x x  - ---------x x x  + ----------x x x x  - ----------x x x  - -------|
|56000 2 4    35721000 0 3 4    78382080  0 1 3 4    54867456  1 3 4    533433|
|                                                                             |
|3      61593467 2       1430441815217           7429733591 2       8305986596|
| x  + ---------x x x  - -------------x x x x  - ----------x x x  + ----------|
|2 4   200037600 0 3 4    11430720000  0 1 3 4    11664000  1 3 4    171460800|
|                                                                             |
|   253641949 2       102150887           1308957383 2       19959639787      |
| + ---------x x x  + ---------x x x x  - ----------x x x  + -----------x x x |
|    3969000  0 3 4    31752000 0 1 3 4     806400   1 3 4    381024000  0 2 3|
|                                                                             |
| 1960711 3     738628408877 2       29850049441           23161548511 2      |
| -------x x  + ------------x x x  + -----------x x x x  - -----------x x x  +|
|  84000  2 4    10001880000 0 3 4    228614400  0 1 3 4    228614400  1 3 4  |
|                                                                             |
|  2     6083219 3     69268081709 2       166294514647           188202892601|
| x x  - -------x x  + -----------x x x  + ------------x x x x  + ------------|
|1 2 4    211680 2 4    1000188000 0 3 4    2667168000  0 1 3 4     457228800 |
|-----------------------------------------------------------------------------|
|6363           10761984361           1540753237 2       7830532057   2     10|
|----x x x x  - -----------x x x x  - ----------x x x  + ----------x x x  + --|
|600  0 2 3 4     65318400  1 2 3 4    15876000  2 3 4    428652000 0 3 4     |
|                                                                             |
|3           4387536922399           22245892841 2       161480778617   2     |
|-x x x x  + -------------x x x x  - -----------x x x  - ------------x x x  - |
|0 0 2 3 4    34292160000  1 2 3 4    444528000  2 3 4    1428840000  0 3 4   |
|                                                                             |
|     225792765497           8331927001 2       2381334211   2     1895122339 |
|x  + ------------x x x x  + ----------x x x  + ----------x x x  - ----------x|
| 4    1143072000  1 2 3 4    285768000 2 3 4    47628000  0 3 4     6531840  |
|                                                                             |
| 350948383           500867067709           3587852269 2       35587222067   |
| ---------x x x x  + ------------x x x x  + ----------x x x  - -----------x x|
|  3499200  0 2 3 4    1714608000  1 2 3 4    105840000 2 3 4    8001504000 0 |
|                                                                             |
| 2       30929665997           15654734391433           584160397 2       590|
|x x x  + -----------x x x x  + --------------x x x x  + ---------x x x  - ---|
| 1 3 4    240045120  0 2 3 4     48009024000  1 2 3 4    14817600 2 3 4    40|
|-----------------------------------------------------------------------------|
|360739819   2     126855097379   2     97816669 3                            |
|---------x x x  + ------------x x x  + --------x x  -                        |
|34292160  1 3 4    1333584000  2 3 4    6350400 3 4                          |
|                                                                             |
|14301904817   2     22041159893   2     261691907 3                          |
|-----------x x x  - -----------x x x  + ---------x x                         |
|  36288000  1 3 4    952560000  2 3 4    13608000 3 4                        |
|                                                                             |
|  2     42535616623   2     157432169 3     1457325563                       |
| x x  - -----------x x x  + ---------x x  + ----------                       |
|1 3 4    571536000  2 3 4    1632960  3 4    31752000                        |
|                                                                             |
|2     1638347143   2     4960572769   2     89034755 3                       |
| x  + ----------x x x  - ----------x x x  + --------x                        |
|3 4    76204800  1 3 4    381024000 2 3 4    3048192 3                       |
|                                                                             |
|797374319   2     395965971767   2     491764815781                          |
|---------x x x  - ------------x x x  - ------------x x                       |
|00752000  0 3 4    1524096000  1 3 4    2667168000  2                        |
|-----------------------------------------------------------------------------|
|194637089 2 2   129721589     2   810200723 2 2   3458531599     2   10016990|
|---------x x  + ---------x x x  - ---------x x  - ----------x x x  + --------|
| 11907000 0 4    12096000 0 1 4    15240960 1 4    63504000  0 2 4    1778112|
|                                                                             |
|  36414451 2 2   24541197491     2   1293610919 2 2   75958487     2   495343|
|- --------x x  + -----------x x x  - ----------x x  + --------x x x  + ------|
|  31752000 0 4    317520000  0 1 4     6048000  1 4    3402000 0 2 4    11907|
|                                                                             |
| 2 2   48181219883     2   20798623 2 2   10545160561     2   119416726721   |
|x x  + -----------x x x  - --------x x  + -----------x x x  + ------------x x|
| 0 4     63504000  0 1 4    134400  1 4     63504000  0 2 4     127008000  1 |
|                                                                             |
|     2840497253 2 2   185863846411     2   389117173 2 2   36324424369     2 |
|x  + ----------x x  + ------------x x x  + ---------x x  - -----------x x x  |
| 4    272160000 0 4     889056000  0 1 4    3048192  1 4    1905120000 0 2 4 |
|                                                                             |
|2     1214588279 3     2308919491 2 2   437921877679     2   40210722691 2 2 |
| x  + ----------x x  - ----------x x  - ------------x x x  + -----------x x  |
|3 4    27216000  3 4    190512000 0 4    1778112000  0 1 4    304819200  1 4 |
|-----------------------------------------------------------------------------|
|171     2   402378101 2 2   210959377967     2   409370286581     2          |
|---x x x  - ---------x x  - ------------x x x  + ------------x x x  -        |
|000 1 2 4    21168000 2 4    2857680000  0 3 4    2286144000  1 3 4          |
|                                                                             |
|08121     2   789360553 2 2   138709401809     2   38760394277     2         |
|-----x x x  + ---------x x  - ------------x x x  - -----------x x x  -       |
|0000  1 2 4    31752000 2 4    1428840000  0 3 4     81648000  1 3 4         |
|                                                                             |
|  2   6035444641 2 2   916767947     2   2861857     2   1443756259          |
| x  + ----------x x  - ---------x x x  - -------x x x  - ----------x x       |
|2 4    63504000  2 4    3175200  0 3 4     6720  1 3 4     4762800  2        |
|                                                                             |
|  17653930411     2   103864601 2 2   594188313743     2   2800420663        |
|+ -----------x x x  - ---------x x  - ------------x x x  + ----------x       |
|    95256000  1 2 4    3024000  2 4    8001504000  0 3 4    28576800         |
|                                                                             |
|  2916578449     2   395005523113     2   315679271 2 2   534410724893       |
|- ----------x x x  - ------------x x x  - ---------x x  + ------------       |
|   47628000  0 2 4    1333584000  1 2 4    5292000  2 4    4000752000        |
|-----------------------------------------------------------------------------|
|374657652319     2   11558520289 2 2   862261831   3   190847047   3   211570|
|------------x x x  + -----------x x  - ---------x x  + ---------x x  - ------|
| 3333960000  2 3 4    190512000  3 4    19845000 0 4    63504000 1 4    33075|
|                                                                             |
| 99078815873     2   7078651 2 2   3013669   3   116122337   3   320231   3  |
| -----------x x x  + -------x x  + -------x x  - ---------x x  + ------x x  +|
|  476280000  2 3 4    38880  3 4    302400 0 4     756000  1 4    12096 2 4  |
|                                                                             |
|  2   5256437 2 2   670106873   3   11389349   3   17933177   3   17828999   |
| x  - -------x x  + ---------x x  + --------x x  + --------x x  - --------x x|
|3 4    108864 3 4    5292000  0 4    302400  1 4     98000  2 4    226800  3 |
|                                                                             |
|    2   12401450617     2   898438523 2 2   1147560823   3   912182179   3   |
| x x  - -----------x x x  - ---------x x  - ----------x x  + ---------x x  - |
|1 3 4    190512000  2 3 4    38102400 3 4    63504000  0 4    12700800 1 4   |
|                                                                             |
|     2   69884537     2   216151621817     2   2988196411 2 2   97251001   3 |
|x x x  - --------x x x  + ------------x x x  + ----------x x  - --------x x  |
| 0 3 4   71442000 1 3 4    1333584000  2 3 4    95256000  3 4    3969000 0 4 |
|-----------------------------------------------------------------------------|
|741   3   4335215   3   489173 4                                             |
|---x x  + -------x x  - ------x ,                                            |
|00  2 4    254016 3 4   126000 4                                             |
|                                                                             |
| 17810837   3   1247 4                                                       |
| --------x x  - ----x ,                                                      |
|  168000  3 4    300 4                                                       |
|                                                                             |
|3   19613 4                                                                  |
|  + -----x ,                                                                 |
|4    1800 4                                                                  |
|                                                                             |
|20621633   3   26614447   3    563 4                                         |
|--------x x  - --------x x  - ----x ,                                        |
| 604800  2 4    846720  3 4   2800 4                                         |
|                                                                             |
|  848159597   3   194830663   3   276462167   3   52207 4                    |
|- ---------x x  - ---------x x  + ---------x x  - -----x                     |
|  127008000 1 4    5292000  2 4    21168000 3 4   28000 4                    |
+-----------------------------------------------------------------------------+
|i3 : time inverse phi                                                        |
|     -- used 0.0758058 seconds                                               |
|                                                                             |
|o3 = -- rational map --                                                      |
|     source: Proj(QQ[x , x , x , x , x ])                                    |
|                      0   1   2   3   4                                      |
|     target: Proj(QQ[x , x , x , x , x ])                                    |
|                      0   1   2   3   4                                      |
|     defining forms: {                                                       |
|                                        4                   3                |
|                      - 122896266822000x  + 610226014948200x x               |
|                                        0                   0                |
|                                                                             |
|                                     4                  3                    |
|                      15912286185600x  - 32666729760000x x  -                |
|                                     0                  0 1                  |
|                                                                             |
|                                       4                  3                  |
|                      - 52294658119200x  - 73775781752400x x                 |
|                                       0                  0 1                |
|                                                                             |
|                                      4                   3                  |
|                      225299805544800x  - 330642588691800x x                 |
|                                      0                   0 1                |
|                                                                             |
|                                     4                  3                    |
|                      26800218446400x  - 69315776006400x x  -                |
|                                     0                  0 1                  |
|                     }                                                       |
|                                                                             |
|o3 : RationalMap (Cremona transformation of PP^4)                            |
|-----------------------------------------------------------------------------|
|                    2 2                     3                 4              |
|  - 576753063780600x x  + 102720879015300x x  - 9414842673600x  + 36998520552|
|1                   0 1                   0 1                 1              |
|                                                                             |
|               2 2                    3                 4                  3 |
|15108013053000x x  + 15508549507500x x  - 3635299974600x  - 30053222277120x x|
|               0 1                  0 1                 1                  0 |
|                                                                             |
|                  2 2                    3                 4                 |
|+ 377375404858200x x  - 74465712770400x x  + 4404619800000x  - 54482531040000|
|                  0 1                  0 1                 1                 |
|                                                                             |
|                 2 2                   3                 4                   |
|+ 27235893138300x x  + 4343860521000x x  + 1629779356800x  + 159823007245440x|
|                 0 1                 0 1                 1                   |
|                                                                             |
|              2 2                   3                  4                 3   |
|7878027748500x x  - 4717267948050x x  + 13887758556000x  - 9134842500000x x  |
|              0 1                 0 1                  1                 0 2 |
|-----------------------------------------------------------------------------|
|   3                     2                                                   |
|00x x  + 294739615170000x x x  - 138153302961660x                            |
|   0 2                   0 1 2                                               |
|                                                                             |
|                   2                        2                                |
|  + 67143621337920x x x  - 45819417514320x x x  +                            |
|2                  0 1 2                  0 1 2                              |
|                                                                             |
| 3                    2                        2                             |
|x x  - 40382993229840x x x  + 65390796852150x x x                            |
| 0 2                  0 1 2                  0 1                             |
|                                                                             |
|3                    2                     2                                 |
| x  - 30763120793040x x x  + 53087799420x x x  +                             |
|0 2                  0 1 2               0 1 2                               |
|                                                                             |
|                  2                         2                                |
|- 187370537916240x x x  + 237359616229120x x x  -                            |
|                  0 1 2                   0 1 2                              |
|-----------------------------------------------------------------------------|
|  2                    3                    2 2                      2       |
| x x  - 20531975385600x x  + 67442944887360x x  + 72946285062840x x x  - 2253|
|0 1 2                  1 2                  0 2                  0 1 2       |
|                                                                             |
|               3                    2 2                      2               |
| 3125261592180x x  - 30415524074496x x  + 27467429978016x x x  - 110130430219|
|               1 2                  0 2                  0 1 2               |
|                                                                             |
|                   3                   2 2                      2            |
|  + 18463537352400x x  + 2252721466800x x  - 47125565704560x x x  + 269831250|
|2                  1 2                 0 2                  0 1 2            |
|                                                                             |
|              3                    2 2                      2                |
|2357693352000x x  - 57993313351968x x  + 87594730201440x x x  - 1160191542240|
|              1 2                  0 2                  0 1 2                |
|                                                                             |
|                3                    2 2                       2             |
| 22502882833200x x  - 15239563197696x x  - 133834103989600x x x  + 5472770520|
|                1 2                  0 2                   0 1 2             |
|-----------------------------------------------------------------------------|
|           2 2                    3                    3                  4  |
|6566332560x x  - 20227694518080x x  + 53474573648160x x  - 19027177344000x  +|
|           1 2                  0 2                  1 2                  2  |
|                                                                             |
|   2 2                   3                   3                 4             |
|20x x  + 7978479813504x x  - 7818421145760x x  + 6786624268800x  + 2852620848|
|   1 2                 0 2                 1 2                 2             |
|                                                                             |
|      2 2                    3                    3                 4        |
|40200x x  + 21432159826560x x  - 37470504057600x x  + 6994536192000x  + 26059|
|      1 2                  0 2                  1 2                 2        |
|                                                                             |
|  2 2                    3                    3                 4            |
|0x x  - 46757080311840x x  + 11671845984000x x  - 3195942048000x  + 395410910|
|  1 2                  0 2                  1 2                 2            |
|                                                                             |
|    2 2                    3                    3                 4          |
|000x x  + 13610153329920x x  - 10555926360000x x  + 7196874624000x  - 1956122|
|    1 2                  0 2                  1 2                 2          |
|-----------------------------------------------------------------------------|
|                 3                     2                         2           |
| 543647816472600x x  - 729632501047800x x x  + 393880976764800x x x  + 173325|
|                 0 3                   0 1 3                   0 1 3         |
|                                                                             |
|    3                    2                        2                   3      |
|000x x  - 54380379049920x x x  - 14059142854260x x x  + 9343146891960x x  + 7|
|    0 3                  0 1 3                  0 1 3                 1 3    |
|                                                                             |
|           3                     2                         2                 |
|4623850400x x  + 290841609214800x x x  - 303850711350900x x x  - 977884801320|
|           0 3                   0 1 3                   0 1 3               |
|                                                                             |
|      3                     2                        2                   3   |
|58000x x  - 120804577464060x x x  + 28835014157460x x x  - 2466278992800x x  |
|      0 3                   0 1 3                  0 1 3                 1 3 |
|                                                                             |
|         3                     2                         2                   |
|12628000x x  + 261387739630080x x x  - 157547757764460x x x  - 55942226460225|
|         0 3                   0 1 3                   0 1 3                 |
|-----------------------------------------------------------------------------|
|         3                     2                                             |
|71210850x x  + 138326986841400x x x  - 239573496489940x x x x  - 506129434051|
|         1 3                   0 2 3                   0 1 2 3               |
|                                                                             |
|              2                                              2               |
|9896990438720x x x  + 7987739976640x x x x  - 25646613872940x x x  + 19021075|
|              0 2 3                 0 1 2 3                  1 2 3           |
|                                                                             |
|  3                    2                                              2      |
|0x x  - 29582678880720x x x  - 5821672506720x x x x  + 26932109457575x x x  -|
|  1 3                  0 2 3                 0 1 2 3                  1 2 3  |
|                                                                             |
|                 2                                               2           |
|- 11861418547440x x x  + 52491339201900x x x x  - 35328936789360x x x  - 7294|
|                 0 2 3                  0 1 2 3                  1 2 3       |
|                                                                             |
| 3                     2                                                 2   |
|x x  - 255570602711760x x x  + 291230119915840x x x x  + 161137875687600x x x|
| 1 3                   0 2 3                   0 1 2 3                   1 2 |
|-----------------------------------------------------------------------------|
|   2                        2                      2                    3    |
|50x x x  + 76933021250736x x x  - 76938251041620x x x  + 61524106237440x x  +|
|   1 2 3                  0 2 3                  1 2 3                  2 3  |
|                                                                             |
|         2                      2                   3                    2 2 |
|914240x x x  + 32507048522880x x x  - 9037822798080x x  + 41170201541280x x  |
|       0 2 3                  1 2 3                 2 3                  0 3 |
|                                                                             |
|                   2                      2                    3             |
| 114157548135120x x x  + 62244094514000x x x  - 12743685696000x x  + 56768113|
|                 0 2 3                  1 2 3                  2 3           |
|                                                                             |
|             2                      2                    3                   |
|3723015680x x x  + 69884569051200x x x  - 28497367821600x x  - 20195800901136|
|           0 2 3                  1 2 3                  2 3                 |
|                                                                             |
|                     2                       2                    3          |
|  - 43253689984960x x x  - 117978688008720x x x  + 12055394668800x x  - 59078|
|3                  0 2 3                   1 2 3                  2 3        |
|-----------------------------------------------------------------------------|
|                 2 2                       2                   2 2           |
| 388020756853800x x  - 454982331858600x x x  + 275439328969350x x  + 33549696|
|                 0 3                   0 1 3                   1 3           |
|                                                                             |
|                      2                   2 2                      2         |
|- 129277287708240x x x  + 100692437922720x x  + 67019128295392x x x  - 134970|
|                  0 1 3                   1 3                  0 2 3         |
|                                                                             |
|       2 2                       2                   2 2                     |
|573920x x  + 116528888316960x x x  - 132283849065900x x  - 177817600243080x x|
|       0 3                   0 1 3                   1 3                   0 |
|                                                                             |
|  2 2                       2                  2 2                      2    |
|0x x  + 305966037223980x x x  - 47053010390400x x  - 71004284369424x x x  - 1|
|  0 3                   0 1 3                  1 3                  0 2 3    |
|                                                                             |
|         2 2                       2                   2 2                   |
|24748000x x  + 156082348994880x x x  - 256381925276925x x  - 254719525231920x|
|         0 3                   0 1 3                   1 3                   |
|-----------------------------------------------------------------------------|
|            2                       2                  2 2                   |
|6653240x x x  - 334524418004700x x x  + 74995973730720x x  - 571931229844800x|
|        0 2 3                   1 2 3                  2 3                   |
|                                                                             |
|              2                  2 2                   3                    3|
|011087280x x x  + 26495069231232x x  - 1425580880640x x  + 89454000031200x x |
|          1 2 3                  2 3                 0 3                  1 3|
|                                                                             |
|  2                       2                   2 2                     3      |
| x  + 204495419762900x x x  - 122915918681920x x  - 244398593890080x x  - 106|
|2 3                   1 2 3                   2 3                   0 3      |
|                                                                             |
|                  2                  2 2                     3               |
|6114742635500x x x  + 23260801016880x x  + 114072546052080x x  - 109248978787|
|              1 2 3                  2 3                   0 3               |
|                                                                             |
|    2                       2                  2 2                     3     |
| x x  + 366271610224800x x x  - 71709385681920x x  + 387462921665400x x  - 21|
|0 2 3                   1 2 3                  2 3                   0 3     |
|-----------------------------------------------------------------------------|
|  3                     3                     3                  4           |
| x  + 411337054789500x x  - 177295703054400x x  - 72053361828000x  - 47099167|
|0 3                   1 3                   2 3                  3           |
|                                                                             |
|                   3                  4                  3                   |
| - 9264577136640x x  - 79671916598400x  + 12396780012960x x  + 64270393367040|
|                 2 3                  3                  0 4                 |
|                                                                             |
|               3                    3                   4                  3 |
|437100652400x x  + 63842392588800x x  + 263445795043200x  + 68901019210800x x|
|             1 3                  2 3                   3                  0 |
|                                                                             |
|      3                    3                  4                   3          |
|200x x  + 70993732340160x x  - 15491192749200x  - 275388970968720x x  + 62625|
|    1 3                  2 3                  3                   0 4        |
|                                                                             |
|                3                    3                  4                   3|
|9335874968700x x  + 15303220430400x x  + 59254693344000x  + 185730473214720x |
|              1 3                  2 3                  3                   0|
|-----------------------------------------------------------------------------|
|        3                     2                         2                    |
|5558600x x  + 684524587950000x x x  - 343387979006100x x x  + 111129455341800|
|        0 4                   0 1 4                   0 1 4                  |
|                                                                             |
| 2                        2                    3                   2         |
|x x x  - 60099940693380x x x  + 12129811669080x x  + 2300911411392x x x  + 23|
| 0 1 4                  0 1 4                  1 4                 0 2 4     |
|                                                                             |
|                    2                         2                    3         |
|  - 372047414193000x x x  + 150903886102200x x x  - 87019431651600x x  + 2589|
|4                   0 1 4                   0 1 4                  1 4       |
|                                                                             |
|          2                        2                    3                    |
|658942980x x x  + 53255457148320x x x  + 29163843465120x x  - 576912053785824|
|          0 1 4                  0 1 4                  1 4                  |
|                                                                             |
|                     2                         2                    3        |
|x  - 495104912099280x x x  + 307458192136410x x x  - 40089460842900x x  + 127|
| 4                   0 1 4                   0 1 4                  1 4      |
|-----------------------------------------------------------------------------|
| 3                    2                                                 2    |
|x x  - 52885876241520x x x  + 227503935136240x x x x  - 265242788438040x x x |
| 1 4                  0 2 4                   0 1 2 4                   1 2 4|
|                                                                             |
|                                     2                        2              |
|325405967136x x x x  - 6082343882748x x x  + 73111088663712x x x  - 681204860|
|             0 1 2 4                 1 2 4                  0 2 4            |
|                                                                             |
|            2                                                 2              |
|78077139600x x x  - 115436174046840x x x x  + 199039436315860x x x  + 1282258|
|            0 2 4                   0 1 2 4                   1 2 4          |
|                                                                             |
| 2                                                2                         2|
|x x x  + 404199969170424x x x x  - 67449368795760x x x  - 266641184600160x x |
| 0 2 4                   0 1 2 4                  1 2 4                   0 2|
|                                                                             |
|             2                                                2              |
|821373553232x x x  - 305764104788352x x x x  + 54154262364720x x x  - 5264814|
|             0 2 4                   0 1 2 4                  1 2 4          |
|-----------------------------------------------------------------------------|
|                    2                       2                    3           |
| + 21164925227040x x x  + 182800484601840x x x  - 42083923896000x x  + 998536|
|                  0 2 4                   1 2 4                  2 4         |
|                                                                             |
|        2                    3                    2                          |
|26992x x x  + 41148725837760x x  - 98159593245840x x x  + 156513277197480x x |
|      1 2 4                  2 4                  0 3 4                   0 1|
|                                                                             |
|           2                       2                    3                    |
|36841760x x x  - 133218587957360x x x  + 10342556582400x x  - 794753437625280|
|         0 2 4                   1 2 4                  2 4                  |
|                                                                             |
|                      2                    3                     2           |
|x  + 58294033645680x x x  - 13960444449600x x  + 160714167148080x x x  - 1291|
| 4                  1 2 4                  2 4                   0 3 4       |
|                                                                             |
|        2                     2                  3                     2     |
|41280x x x  - 1939032443040x x x  - 298224547200x x  - 494696985166440x x x  |
|      0 2 4                 1 2 4                2 4                   0 3 4 |
|-----------------------------------------------------------------------------|
|          2                                                  2               |
|378213080x x x  - 1064263857132840x x x x  + 603623670792450x x x  + 67671686|
|          0 3 4                    0 1 3 4                   1 3 4           |
|                                                                             |
|                      2                                                      |
|x x  + 16501520276640x x x  - 207759315898960x x x x  + 195854027927160x x x |
| 3 4                  1 3 4                   0 2 3 4                   1 2 3|
|                                                                             |
| 2                                                 2                         |
|x x x  + 257762615322240x x x x  - 505293200605200x x x  - 806213859353028x x|
| 0 3 4                   0 1 3 4                   1 3 4                   0 |
|                                                                             |
|                                    2                                        |
|6558170180x x x x  - 26261077229100x x x  - 94356272818080x x x x  + 11999887|
|           0 1 3 4                  1 3 4                  0 2 3 4           |
|                                                                             |
|                                          2                                  |
|+ 14347439336160x x x x  + 92012951496375x x x  + 134677601441280x x x x  - 1|
|                 0 1 3 4                  1 3 4                   0 2 3 4    |
|-----------------------------------------------------------------------------|
|                                                            2                |
|8932748x x x x  - 626804085414660x x x x  + 163725370837560x x x  - 160427754|
|        0 2 3 4                   1 2 3 4                   2 3 4            |
|                                                                             |
|                    2                         2                       2      |
|x  - 96637565423232x x x  + 312482519545056x x x  - 133557694053840x x x  + 1|
| 4                  2 3 4                   0 3 4                   1 3 4    |
|                                                                             |
|                                                 2                         2 |
| x x  + 400237544346010x x x x  - 11414117909600x x x  + 126206635227120x x x|
|2 3 4                   1 2 3 4                  2 3 4                   0 3 |
|                                                                             |
|                                 2                         2                 |
|8313770x x x x  - 90778928140440x x x  + 126390462812208x x x  - 599794484499|
|        1 2 3 4                  2 3 4                   0 3 4               |
|                                                                             |
|                                        2                         2          |
|95719283432120x x x x  + 86753997181920x x x  - 860450603570460x x x  + 31580|
|               1 2 3 4                  2 3 4                   0 3 4        |
|-----------------------------------------------------------------------------|
|         2                       2                      2                   3|
|360720x x x  + 340388071535400x x x  - 22401861485640x x x  - 3623047936200x |
|       0 3 4                   1 3 4                  2 3 4                 3|
|                                                                             |
|                 2                    3                    2 2               |
|16796604427616x x x  + 37928741981760x x  - 91936123478640x x  + 291430984345|
|               2 3 4                  3 4                  0 4               |
|                                                                             |
|                      2                       2                    3         |
|  - 267310968237600x x x  - 287360473692600x x x  + 32167828425600x x  + 5410|
|4                   1 3 4                   2 3 4                  3 4       |
|                                                                             |
|     2                      2                   3                     2 2    |
|00x x x  + 58653041453280x x x  - 2420069830920x x  - 845779476744720x x  + 6|
|   1 3 4                  2 3 4                 3 4                   0 4    |
|                                                                             |
|             2                       2                   3                   |
|9652088350x x x  - 155220929307360x x x  + 4037540207400x x  + 36464153468904|
|           1 3 4                   2 3 4                 3 4                 |
|-----------------------------------------------------------------------------|
|                     2 2                       2                  2 2        |
|x  - 426737044818000x x  + 227827854626400x x x  - 49334139653400x x  - 92973|
| 4                   0 4                   0 1 4                  1 4        |
|                                                                             |
|       2                  2 2                      2                      2  |
|20x x x  + 16869404149920x x  + 27342751884480x x x  - 83406790985280x x x  +|
|   0 1 4                  1 4                  0 2 4                  1 2 4  |
|                                                                             |
|            2 2                       2                  2 2                 |
|64472429600x x  - 276072673766400x x x  + 68463563968800x x  + 47338481619576|
|            0 4                   0 1 4                  1 4                 |
|                                                                             |
|                   2                  2 2                       2            |
|28310108510280x x x  - 78558663501360x x  - 582730586356320x x x  + 181873147|
|               0 1 4                  1 4                   0 2 4            |
|                                                                             |
|  2 2                       2                  2 2                       2   |
|0x x  - 311216066852040x x x  + 92748263687100x x  + 130329065616480x x x  - |
|  0 4                   0 1 4                  1 4                   0 2 4   |
|-----------------------------------------------------------------------------|
|              2                      2                  2 2                  |
|815620560x x x  + 10918769215200x x x  + 26397954424800x x  + 757906867892160|
|          0 2 4                  1 2 4                  2 4                  |
|                                                                             |
|                2 2                       2                       2          |
| 51118373655360x x  - 192278537972640x x x  + 142531521945120x x x  - 8889020|
|                2 4                   0 3 4                   1 3 4          |
|                                                                             |
|      2                      2                 2 2                        2  |
|0x x x  - 89147044933800x x x  - 5338173120000x x  - 1436138162166960x x x  +|
|  0 2 4                  1 2 4                 2 4                    0 3 4  |
|                                                                             |
|           2                  2 2                      2                     |
|979880x x x  - 65589467119200x x  + 94124711908080x x x  - 61731213131700x x |
|       1 2 4                  2 4                  0 3 4                  1 3|
|                                                                             |
|                   2                 2 2                      2              |
|86447865818160x x x  + 8594176291200x x  + 62272611138780x x x  + 53164776290|
|               1 2 4                 2 4                  0 3 4              |
|-----------------------------------------------------------------------------|
|     2                       2                      2                  2 2   |
|x x x  - 153494997056100x x x  + 17739208087440x x x  + 50625488377800x x  - |
| 0 3 4                   1 3 4                  2 3 4                  3 4   |
|                                                                             |
|            2                 2 2                    3                    3  |
|6851680x x x  + 9031252991040x x  - 63958637836800x x  + 15433367065200x x  -|
|        2 3 4                 3 4                  0 4                  1 4  |
|                                                                             |
|                     2                      2                  2 2           |
| 246331058941800x x x  - 66870834534840x x x  - 28553692305600x x  + 55363805|
|                 1 3 4                  2 3 4                  3 4           |
|                                                                             |
| 2                      2                  2 2                     3         |
|x  + 13912561897560x x x  + 15055109125560x x  - 232983267451200x x  + 121634|
| 4                  2 3 4                  3 4                   0 4         |
|                                                                             |
|        2                      2                 2 2                    3    |
|850x x x  - 25036510773600x x x  - 9045236919600x x  + 76794624471600x x  - 3|
|    1 3 4                  2 3 4                 3 4                  0 4    |
|-----------------------------------------------------------------------------|
|                  3                   3                   3                  |
|271153558821600x x  + 8845812435600x x  + 7986790425600x x  + 42802362262800x|
|                0 4                 1 4                 2 4                  |
|                                                                             |
|                  3                    3                  4                  |
| 21116429006400x x  + 38945764872000x x  - 22590246168000x ,                 |
|                2 4                  3 4                  4                  |
|                                                                             |
|          3                    3                    3                     3  |
|8041600x x  - 55469319393600x x  + 48823967858400x x  - 154582777792800x x  +|
|        0 4                  1 4                  2 4                   3 4  |
|                                                                             |
|            3                    3                    3               4      |
|372487600x x  - 77210531143200x x  + 11083813297200x x  - 33720624000x ,     |
|          1 4                  2 4                  3 4               4      |
|                                                                             |
|                3                    3                   3                 4 |
|8904748432200x x  + 20464559539200x x  + 7610584602600x x  - 3236751252000x  |
|              1 4                  2 4                 3 4                 4 |
|-----------------------------------------------------------------------------|
|  3                  4                                                       |
| x  - 42149700432000x ,                                                      |
|3 4                  4                                                       |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                4                                                            |
| 90765505152000x ,                                                           |
|                4                                                            |
+-----------------------------------------------------------------------------+

See also
========

  * inverseMap -- inverse of a birational map
  * RationalMap ^ ZZ -- power
  * isInverseMap(RationalMap,RationalMap)
    -- checks whether two rational
    maps are one the inverse of the other

Ways to use this method:
========================

  * inverse(RationalMap) -- inverse of a
    birational map
  * "inverse(RationalMap,Option)"

inverseMap -- inverse of a birational map
*****************************************

Synopsis
========

  * Usage:
        inverseMap phi
  * Inputs:
      * phi, a rational map, a birational map
  * Optional inputs (Macaulay2Doc),:
      * BlowUpStrategy, => ..., default value
        "Eliminate", null
      * MathMode, => ..., default value false, whether to
        ensure correctness of output
      * Verbose, => ...,
        default value true, null
  * Outputs:
      * a rational map, the inverse map of phi

Description
===========

If the source variety is a projective space and if a further technical
condition is satisfied, then the algorithm used is that described in the paper
by Russo and Simis - On birational maps and Jacobian matrices - Compos. Math.
126 (3), 335-358, 2001. For the general case, the algorithm used is the same as
for invertBirationalMap (see
http://www.math.uiuc.edu/Macaulay2/doc/Macaulay2-1.16/share/doc/Macaulay2/
Parametrization/html/_invert__Birational__Map.html ) in the package
Parametrization (see https://faculty.math.illinois.edu/Macaulay2/doc/Macaulay2-
1.16/share/doc/Macaulay2/Parametrization/html ). Note that in this case, the
analogous method inverseOfMap (see
http://www2.macaulay2.com/Macaulay2/doc/Macaulay2-1.16/share/doc/Macaulay2/
RationalMaps/html/_inverse__Of__Map.html ) in the package RationalMaps (see
http://www2.macaulay2.com/Macaulay2/doc/Macaulay2-1.16/share/doc/Macaulay2/
RationalMaps/html/index.html ) generally turns out to be faster.

+-----------------------------------------------------------------------------+
|i1 : -- A Cremona transformation of P^20                                     |
|     phi = rationalMap map quadroQuadricCremonaTransformation(20,1)          |
|                                                                             |
|o1 = -- rational map --                                                      |
|     source: Proj(QQ[w , w , w , w , w , w , w , w , w , w , w  , w  , w  ,  |
|                      0   1   2   3   4   5   6   7   8   9   10   11   12   |
|     target: Proj(QQ[w , w , w , w , w , w , w , w , w , w , w  , w  , w  ,  |
|                      0   1   2   3   4   5   6   7   8   9   10   11   12   |
|     defining forms: {                                                       |
|                      w  w   - w w   + w w  ,                                |
|                       10 15    9 16    6 20                                 |
|                                                                             |
|                      w  w   - w w   + w w  ,                                |
|                       10 14    8 16    5 20                                 |
|                                                                             |
|                      w w   - w w   + w w  ,                                 |
|                       9 14    8 15    4 20                                  |
|                                                                             |
|                      w w   - w w   + w w  ,                                 |
|                       6 14    5 15    4 16                                  |
|                                                                             |
|                      w  w   - w  w   + w  w   - w  w   + w  w  ,            |
|                       11 13    16 17    15 18    14 19    12 20             |
|                                                                             |
|                      w w   - w  w   + w w   - w w   + w w  ,                |
|                       3 13    10 17    9 18    8 19    7 20                 |
|                                                                             |
|                      w  w   - w w   - w w   - w w   + w w  ,                |
|                       10 12    2 13    7 16    6 18    5 19                 |
|                                                                             |
|                      w w   - w w   - w w   - w w   + w w  ,                 |
|                       9 12    1 13    7 15    6 17    4 19                  |
|                                                                             |
|                      w w   - w w   - w w   - w w   + w w  ,                 |
|                       8 12    0 13    7 14    5 17    4 18                  |
|                                                                             |
|                      w  w   - w w   + w w  ,                                |
|                       10 11    3 16    2 20                                 |
|                                                                             |
|                      w w   - w w   + w w  ,                                 |
|                       9 11    3 15    1 20                                  |
|                                                                             |
|                      w w   - w w   + w w  ,                                 |
|                       8 11    3 14    0 20                                  |
|                                                                             |
|                      w w   - w w   + w w   - w w   + w w  ,                 |
|                       7 11    3 12    2 17    1 18    0 19                  |
|                                                                             |
|                      w w   - w w   + w w  ,                                 |
|                       6 11    2 15    1 16                                  |
|                                                                             |
|                      w w   - w w   + w w  ,                                 |
|                       5 11    2 14    0 16                                  |
|                                                                             |
|                      w w   - w w   + w w  ,                                 |
|                       4 11    1 14    0 15                                  |
|                                                                             |
|                      w w  - w w  + w w  ,                                   |
|                       6 8    5 9    4 10                                    |
|                                                                             |
|                      w w  - w w  + w w  ,                                   |
|                       3 6    2 9    1 10                                    |
|                                                                             |
|                      w w  - w w  + w w  ,                                   |
|                       3 5    2 8    0 10                                    |
|                                                                             |
|                      w w  - w w  + w w ,                                    |
|                       3 4    1 8    0 9                                     |
|                                                                             |
|                      w w  - w w  + w w                                      |
|                       2 4    1 5    0 6                                     |
|                     }                                                       |
|                                                                             |
|o1 : RationalMap (quadratic Cremona transformation of PP^20)                 |
|-----------------------------------------------------------------------------|
|w  , w  , w  , w  , w  , w  , w  , w  ])                                     |
| 13   14   15   16   17   18   19   20                                       |
|w  , w  , w  , w  , w  , w  , w  , w  ])                                     |
| 13   14   15   16   17   18   19   20                                       |
+-----------------------------------------------------------------------------+
|i2 : time psi = inverseMap phi                                               |
|     -- used 0.167556 seconds                                                |
|                                                                             |
|o2 = -- rational map --                                                      |
|     source: Proj(QQ[w , w , w , w , w , w , w , w , w , w , w  , w  , w  ,  |
|                      0   1   2   3   4   5   6   7   8   9   10   11   12   |
|     target: Proj(QQ[w , w , w , w , w , w , w , w , w , w , w  , w  , w  ,  |
|                      0   1   2   3   4   5   6   7   8   9   10   11   12   |
|     defining forms: {                                                       |
|                      - w  w   + w  w   - w  w  ,                            |
|                         15 18    14 19    11 20                             |
|                                                                             |
|                      - w  w   + w  w   - w  w  ,                            |
|                         15 17    13 19    10 20                             |
|                                                                             |
|                      - w  w   + w  w   - w w  ,                             |
|                         14 17    13 18    9 20                              |
|                                                                             |
|                      - w  w   + w  w   - w w  ,                             |
|                         11 17    10 18    9 19                              |
|                                                                             |
|                      - w  w   + w w   - w w  ,                              |
|                         15 16    3 19    2 20                               |
|                                                                             |
|                      - w  w   + w w   - w w  ,                              |
|                         14 16    3 18    1 20                               |
|                                                                             |
|                      - w  w   + w w   - w w  ,                              |
|                         13 16    3 17    0 20                               |
|                                                                             |
|                      - w  w   - w w   + w w   - w w   - w w  ,              |
|                         12 16    8 17    7 18    6 19    5 20               |
|                                                                             |
|                      - w  w   + w w   - w w  ,                              |
|                         11 16    2 18    1 19                               |
|                                                                             |
|                      - w  w   + w w   - w w  ,                              |
|                         10 16    2 17    0 19                               |
|                                                                             |
|                      - w w   + w w   - w w  ,                               |
|                         9 16    1 17    0 18                                |
|                                                                             |
|                      - w  w   + w  w   - w w  ,                             |
|                         11 13    10 14    9 15                              |
|                                                                             |
|                      - w w   - w w   + w w   - w w   - w w  ,               |
|                         3 12    8 13    7 14    6 15    4 20                |
|                                                                             |
|                      w w  + w w  - w w  + w w  - w w  ,                     |
|                       3 5    2 6    1 7    0 8    4 16                      |
|                                                                             |
|                      - w w   + w w   - w w  ,                               |
|                         3 11    2 14    1 15                                |
|                                                                             |
|                      - w w   + w w   - w w  ,                               |
|                         3 10    2 13    0 15                                |
|                                                                             |
|                      - w w  + w w   - w w  ,                                |
|                         3 9    1 13    0 14                                 |
|                                                                             |
|                      - w w   + w w   - w w   + w w   - w w  ,               |
|                         8 10    7 11    2 12    5 15    4 19                |
|                                                                             |
|                      - w w  + w w   - w w   + w w   - w w  ,                |
|                         8 9    6 11    1 12    5 14    4 18                 |
|                                                                             |
|                      - w w  + w w   - w w   + w w   - w w  ,                |
|                         7 9    6 10    0 12    5 13    4 17                 |
|                                                                             |
|                      - w w  + w w   - w w                                   |
|                         2 9    1 10    0 11                                 |
|                     }                                                       |
|                                                                             |
|o2 : RationalMap (quadratic rational map from PP^20 to PP^20)                |
|-----------------------------------------------------------------------------|
|w  , w  , w  , w  , w  , w  , w  , w  ])                                     |
| 13   14   15   16   17   18   19   20                                       |
|w  , w  , w  , w  , w  , w  , w  , w  ])                                     |
| 13   14   15   16   17   18   19   20                                       |
+-----------------------------------------------------------------------------+
|i3 : assert(phi * psi == 1)                                                  |
+-----------------------------------------------------------------------------+

The method also accepts as input a ring map (Macaulay2Doc),
representing a rational map $\Phi$ between projective varieties. In this case,
the ring map (Macaulay2Doc), defining $\Phi^{-1}$ is returned.

+-----------------------------------------------------------------------------+
|i4 : -- A Cremona transformation of P^26                                     |
|     phi = map quadroQuadricCremonaTransformation(26,1)                      |
|                                                                             |
|o4 = map (QQ[w ..w  ], QQ[w ..w  ], {w  w   - w  w   - w  w   - w  w   -     |
|              0   26       0   26     21 22    20 23    15 24    10 25       |
|                                                                             |
|o4 : RingMap QQ[w ..w  ] <--- QQ[w ..w  ]                                    |
|                 0   26           0   26                                     |
|-----------------------------------------------------------------------------|
|w w  , w  w   - w  w   - w  w   - w  w   - w w  , w  w   - w  w   - w  w   - |
| 0 26   19 22    18 23    16 24    11 25    1 26   19 20    18 21    17 24   |
|-----------------------------------------------------------------------------|
|w  w   - w w  , w  w   - w  w   + w  w   - w  w   - w w  , w  w   - w  w   + |
| 12 25    2 26   15 19    16 21    17 23    13 25    3 26   10 19    11 21   |
|-----------------------------------------------------------------------------|
|w  w   + w  w   - w w  , w w   - w w   + w w   + w w   + w w  , w  w   -     |
| 12 23    13 24    4 26   0 19    1 21    2 23    3 24    4 25   15 18       |
|-----------------------------------------------------------------------------|
|w  w   + w  w   - w  w   - w w  , w  w   - w  w   + w  w   + w  w   - w w  , |
| 16 20    17 22    14 25    5 26   10 18    11 20    12 22    14 24    6 26  |
|-----------------------------------------------------------------------------|
|w w   - w w   + w w   + w w   + w w  , w  w   - w  w   - w  w   + w  w   -   |
| 0 18    1 20    2 22    5 24    6 25   12 16    11 17    13 18    14 19     |
|-----------------------------------------------------------------------------|
|w w  , w w   - w w   - w w   + w w   + w w  , w  w   - w  w   - w  w   +     |
| 7 26   2 16    1 17    3 18    5 19    7 25   12 15    10 17    13 20       |
|-----------------------------------------------------------------------------|
|w  w   - w w  , w  w   - w  w   - w  w   + w  w   - w w  , w w   - w w   -   |
| 14 21    8 26   11 15    10 16    13 22    14 23    9 26   2 15    0 17     |
|-----------------------------------------------------------------------------|
|w w   + w w   + w w  , w w   - w w   - w w   + w w   + w w  , w w   - w w   +|
| 3 20    5 21    8 25   1 15    0 16    3 22    5 23    9 25   5 13    3 14  |
|-----------------------------------------------------------------------------|
|w w   - w w   + w w  , w w   - w w   - w w   - w w   + w w  , w w   - w w   -|
| 7 15    8 16    9 17   5 12    2 14    6 17    8 18    7 20   3 12    2 13  |
|-----------------------------------------------------------------------------|
|w w   - w w   + w w  , w w   - w w   - w w   - w w   + w w  , w w   - w w   -|
| 4 17    8 19    7 21   5 11    1 14    6 16    9 18    7 22   3 11    1 13  |
|-----------------------------------------------------------------------------|
|w w   - w w   + w w  , w w   - w w   - w w   + w w   - w w  , w w   - w w   +|
| 4 16    9 19    7 23   2 11    1 12    4 18    6 19    7 24   7 10    8 11  |
|-----------------------------------------------------------------------------|
|w w   + w w   - w w  , w w   - w w   - w w   - w w   + w w  , w w   - w w   -|
| 9 12    6 13    4 14   5 10    0 14    6 15    9 20    8 22   3 10    0 13  |
|-----------------------------------------------------------------------------|
|w w   - w w   + w w  , w w   - w w   - w w   + w w   - w w  , w w   - w w   -|
| 4 15    9 21    8 23   2 10    0 12    4 20    6 21    8 24   1 10    0 11  |
|-----------------------------------------------------------------------------|
|w w   + w w   - w w  , w w  - w w  - w w  + w w  - w w })                    |
| 4 22    6 23    9 24   4 5    3 6    0 7    1 8    2 9                      |
+-----------------------------------------------------------------------------+
|i5 : time psi = inverseMap phi                                               |
|     -- used 0.344559 seconds                                                |
|                                                                             |
|o5 = map (QQ[w ..w  ], QQ[w ..w  ], {- w w   + w w   + w  w   - w  w   -     |
|              0   26       0   26       5 22    8 23    14 24    13 25       |
|                                                                             |
|o5 : RingMap QQ[w ..w  ] <--- QQ[w ..w  ]                                    |
|                 0   26           0   26                                     |
|-----------------------------------------------------------------------------|
|w w  , - w w   + w w   + w  w   - w  w   - w w  , - w w   + w w   + w  w   - |
| 0 26     5 18    8 19    14 20    10 25    1 26     5 16    8 17    13 20   |
|-----------------------------------------------------------------------------|
|w  w   - w w  , - w w   - w  w   + w  w   - w  w   - w w  , - w w   - w  w   |
| 10 24    2 26     5 15    14 17    13 19    10 23    3 26     5 21    20 23 |
|-----------------------------------------------------------------------------|
|+ w  w   - w  w   - w w  , - w w   - w  w   + w  w   - w  w   - w w  , -     |
|   19 24    17 25    4 26     8 15    14 16    13 18    10 22    6 26        |
|-----------------------------------------------------------------------------|
|w w   - w  w   + w  w   - w  w   - w w  , w  w   - w  w   + w  w   - w  w   -|
| 8 21    20 22    18 24    16 25    7 26   17 18    16 19    15 20    10 21  |
|-----------------------------------------------------------------------------|
|w w  , - w  w   + w  w   - w  w   + w  w   - w  w  , - w  w   + w  w   -     |
| 9 26     13 21    17 22    16 23    15 24    11 26     14 21    19 22       |
|-----------------------------------------------------------------------------|
|w  w   + w  w   - w  w  , w w   - w w   + w w   + w  w   - w  w  , - w w   + |
| 18 23    15 25    12 26   0 21    4 22    7 23    12 24    11 25     4 18   |
|-----------------------------------------------------------------------------|
|w w   + w  w   + w w   - w w  , - w w   + w w   + w  w   + w w   - w w  , -  |
| 7 19    12 20    1 21    9 25     4 16    7 17    11 20    2 21    9 24     |
|-----------------------------------------------------------------------------|
|w w   - w  w   + w  w   + w w   - w w  , - w w   - w  w   + w  w   + w w   - |
| 4 15    12 17    11 19    3 21    9 23     7 15    12 16    11 18    6 21   |
|-----------------------------------------------------------------------------|
|w w  , w  w   - w  w   + w w   - w w   + w w  , w  w   - w w   + w w   -     |
| 9 22   12 13    11 14    0 15    3 22    6 23   10 12    9 14    1 15       |
|-----------------------------------------------------------------------------|
|w w   + w w  , w  w   - w w   + w w   - w w   + w w  , w w  - w w   + w w   -|
| 3 18    6 19   10 11    9 13    2 15    3 16    6 17   8 9    7 10    1 16  |
|-----------------------------------------------------------------------------|
|w w   + w w  , w w  - w w   + w w   - w w   + w w  , w w   - w w   + w w   - |
| 2 18    6 20   5 9    4 10    1 17    2 19    3 20   8 11    7 13    0 16   |
|-----------------------------------------------------------------------------|
|w w   + w w  , w w   - w w   + w w   - w w   + w w  , w w   - w w   + w w   -|
| 2 22    6 24   5 11    4 13    0 17    2 23    3 24   8 12    7 14    0 18  |
|-----------------------------------------------------------------------------|
|w w   + w w  , w w   - w w   + w w   - w w   + w w  , w w  - w w  - w w   +  |
| 1 22    6 25   5 12    4 14    0 19    1 23    3 25   5 7    4 8    0 20    |
|-----------------------------------------------------------------------------|
|w w   - w w  , - w w  + w w  + w w   - w w   + w w  , w w  - w w  - w w  +   |
| 1 24    2 25     5 6    3 8    0 10    1 13    2 14   4 6    3 7    0 9     |
|-----------------------------------------------------------------------------|
|w w   - w w  })                                                              |
| 1 11    2 12                                                                |
+-----------------------------------------------------------------------------+
|i6 : assert isInverseMap(phi,psi)                                            |
+-----------------------------------------------------------------------------+

Caveat
======

If the map passed is not birational and the option MathMode, is
set to false, you might not get any error message.

See also
========

  * approximateInverseMap -- random map related
    to the inverse of a birational map
  * inverse(RationalMap) -- inverse of a
    birational map

Ways to use inverseMap :
========================

  * "inverseMap(RationalMap)"
  * "inverseMap(RingMap)"

For the programmer
==================

The object inverseMap, is a method function with options (Macaulay2Doc).

inverseMap(...,Verbose=>...)
****************************

Description
===========

This option accepts a Boolean (Macaulay2Doc), value. Set this to
false if you don't want to get the certification message from MathMode.

+--------------------------------------------------+
|i1 : f = toMap vars(QQ[x_0..x_2]);                |
|                                                  |
|o1 : RingMap QQ[x ..x ] <--- QQ[x ..x ]           |
|                 0   2           0   2            |
+--------------------------------------------------+
|i2 : isBirational(f,MathMode=>true)               |
|MathMode: output certified!                       |
|                                                  |
|o2 = true                                         |
+--------------------------------------------------+
|i3 : isBirational(f,MathMode=>true,Verbose=>false)|
|                                                  |
|o3 = true                                         |
+--------------------------------------------------+

Further information
===================

  * Default value: true (Macaulay2Doc),
  * Function: inverseMap, -- inverse of a birational map
  * Option key: Verbose (Macaulay2Doc), -- request verbose
    feedback

Functions with optional argument named Verbose :
================================================

  * "check(...,Verbose=>...)" -- see check (Macaulay2Doc), --
    perform tests of a package
  * "checkDegrees(...,Verbose=>...)" -- see checkDegrees (Isomorphism),
    -- compares the degrees of generators of two
    modules
  * "copyDirectory(...,Verbose=>...)" -- see
    copyDirectory(String,String) (Macaulay2Doc),
  * "copyFile(...,Verbose=>...)" -- see copyFile(String,String) (Macaulay2Doc),
  * "findProgram(...,Verbose=>...)" -- see findProgram (Macaulay2Doc),
    -- load external program
  * "installPackage(...,Verbose=>...)" -- see installPackage (Macaulay2Doc),
    -- load and install a package and its
    documentation
  * "approximateInverseMap(...,Verbose=>...)"
  * "ChernSchwartzMacPherson(...,Verbose=>...)"
  * "degreeMap(...,Verbose=>...)"
  * "EulerCharacteristic(...,Verbose=>...)"
  * inverseMap(...,Verbose=>...)
  * "isBirational(...,Verbose=>...)"
  * "isDominant(...,Verbose=>...)"
  * "projectiveDegrees(...,Verbose=>...)"
  * "SegreClass(...,Verbose=>...)"
  * "isIsomorphic(...,Verbose=>...)" -- see isIsomorphic (Isomorphism),
    -- Probabalistic test for isomorphism of modules
  * "moveFile(...,Verbose=>...)" -- see moveFile(String,String) (Macaulay2Doc),
  * "runProgram(...,Verbose=>...)" -- see runProgram (Macaulay2Doc),
    -- run an external program
  * "symlinkDirectory(...,Verbose=>...)" -- see
    symlinkDirectory(String,String) (Macaulay2Doc),
    -- make symbolic links
    for all files in a directory tree

isBirational -- whether a rational map is birational
****************************************************

Synopsis
========

  * Usage:
        isBirational phi
  * Inputs:
      * phi, a rational map,
  * Optional inputs (Macaulay2Doc),:
      * BlowUpStrategy, => ..., default value
        "Eliminate", null
      * MathMode, => ..., default value false, whether to
        ensure correctness of output
      * Verbose, => ...,
        default value true, null
  * Outputs:
      * a Boolean value (Macaulay2Doc), whether phi is
        birational

Description
===========

The testing passes through the methods projectiveDegrees,
see degreeMap, and isDominant.

+-----------------------------------------------------------------------------+
|i1 : GF(331^2)[t_0..t_4]                                                     |
|                                                                             |
|o1 = GF 109561[t ..t ]                                                       |
|                0   4                                                        |
|                                                                             |
|o1 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i2 : phi = rationalMap(minors(2,matrix{{t_0..t_3},{t_1..t_4}}),              |
|                                                                             |
|o2 = -- rational map --                                                      |
|     source: Proj(GF 109561[t , t , t , t , t ])                             |
|                             0   1   2   3   4                               |
|     target: subvariety of Proj(GF 109561[x , x , x , x , x , x              |
|                                           0   1   2   3   4                 |
|             {                                                               |
|              x x  - x x  + x x                                              |
|               2 3    1 4    0 5                                             |
|             }                                                               |
|     defining forms: {                                                       |
|                         2                                                   |
|                      - t  + t t ,                                           |
|                         1    0 2                                            |
|                                                                             |
|                      - t t  + t t ,                                         |
|                         1 2    0 3                                          |
|                                                                             |
|                         2                                                   |
|                      - t  + t t ,                                           |
|                         2    1 3                                            |
|                                                                             |
|                      - t t  + t t ,                                         |
|                         1 3    0 4                                          |
|                                                                             |
|                      - t t  + t t ,                                         |
|                         2 3    1 4                                          |
|                                                                             |
|                         2                                                   |
|                      - t  + t t                                             |
|                         3    2 4                                            |
|                     }                                                       |
|                                                                             |
|o2 : RationalMap (quadratic dominant rational map from PP^4 to               |
|-----------------------------------------------------------------------------|
|Dominant=>infinity)                                                          |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
| ]) defined by                                                               |
|5                                                                            |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|hypersurface in PP^5)                                                        |
+-----------------------------------------------------------------------------+
|i3 : time isBirational phi                                                   |
|     -- used 0.0399102 seconds                                               |
|                                                                             |
|o3 = true                                                                    |
+-----------------------------------------------------------------------------+
|i4 : time isBirational(phi,MathMode=>true)                                   |
|MathMode: output certified!                                                  |
|     -- used 0.0386664 seconds                                               |
|                                                                             |
|o4 = true                                                                    |
+-----------------------------------------------------------------------------+

See also
========

  * isDominant -- whether a rational map is dominant

Ways to use isBirational :
==========================

  * "isBirational(RationalMap)"
  * "isBirational(RingMap)"

For the programmer
==================

The object isBirational, is a method function with options (Macaulay2Doc).

isDominant -- whether a rational map is dominant
************************************************

Synopsis
========

  * Usage:
        isDominant phi
  * Inputs:
      * phi, a rational map,
  * Optional inputs (Macaulay2Doc),:
      * MathMode, => ..., default value false, whether to
        ensure correctness of output
      * Verbose, => ...,
        default value true, null
  * Outputs:
      * a Boolean value (Macaulay2Doc), whether phi is dominant

Description
===========

This method is based on the fibre dimension theorem. A more standard way would
be to perform the command kernel map phi == 0.

+-----------------------------------------------------------------------------+
|i1 : P8 = ZZ/101[x_0..x_8];                                                  |
+-----------------------------------------------------------------------------+
|i2 : phi = rationalMap ideal jacobian ideal                                  |
|                                                                             |
|o2 : RationalMap (rational map from PP^8 to                                  |
|-----------------------------------------------------------------------------|
|det matrix{{x_0..x_4},{x_1..x_5},{x_2..x_6},{x_3..x_7},{x_4..x_8}};          |
|                                                                             |
|PP^8)                                                                        |
+-----------------------------------------------------------------------------+
|i3 : time isDominant(phi,MathMode=>true)                                     |
|MathMode: output certified!                                                  |
|     -- used 5.367 seconds                                                   |
|                                                                             |
|o3 = true                                                                    |
+-----------------------------------------------------------------------------+
|i4 : P7 = ZZ/101[x_0..x_7];                                                  |
+-----------------------------------------------------------------------------+
|i5 : -- hyperelliptic curve of genus 3                                       |
|     C = ideal(x_4*x_5+23*x_5^2-23*x_0*x_6-18*x_1*x_6+6*x_2*x_6+37*x_3*x_6+23|
|                                                                             |
|o5 : Ideal of P7                                                             |
|-----------------------------------------------------------------------------|
|*x_4*x_6-26*x_5*x_6+2*x_6^2-25*x_0*x_7+45*x_1*x_7+30*x_2*x_7-49*x_3*x_7-49*x_|
|-----------------------------------------------------------------------------|
|4*x_7+50*x_5*x_7,x_3*x_5-24*x_5^2+21*x_0*x_6+x_1*x_6+46*x_3*x_6+27*x_4*x_6+5*|
|-----------------------------------------------------------------------------|
|x_5*x_6+35*x_6^2+20*x_0*x_7-23*x_1*x_7+8*x_2*x_7-22*x_3*x_7+20*x_4*x_7-15*x_5|
|-----------------------------------------------------------------------------|
|*x_7,x_2*x_5+47*x_5^2-40*x_0*x_6+37*x_1*x_6-25*x_2*x_6-22*x_3*x_6-8*x_4*x_6+ |
|-----------------------------------------------------------------------------|
|27*x_5*x_6+15*x_6^2-23*x_0*x_7-42*x_1*x_7+27*x_2*x_7+35*x_3*x_7+39*x_4*x_7+24|
|-----------------------------------------------------------------------------|
|*x_5*x_7,x_1*x_5+15*x_5^2+49*x_0*x_6+8*x_1*x_6-31*x_2*x_6+9*x_3*x_6+38*x_4*x_|
|-----------------------------------------------------------------------------|
|6-36*x_5*x_6-30*x_6^2-33*x_0*x_7+26*x_1*x_7+32*x_2*x_7+27*x_3*x_7+6*x_4*x_7+ |
|-----------------------------------------------------------------------------|
|36*x_5*x_7,x_0*x_5+30*x_5^2-11*x_0*x_6-38*x_1*x_6+13*x_2*x_6-32*x_3*x_6-30*x_|
|-----------------------------------------------------------------------------|
|4*x_6+4*x_5*x_6-28*x_6^2-30*x_0*x_7-6*x_1*x_7-45*x_2*x_7+34*x_3*x_7+20*x_4*x_|
|-----------------------------------------------------------------------------|
|7+48*x_5*x_7,x_3*x_4+46*x_5^2-37*x_0*x_6+27*x_1*x_6+33*x_2*x_6+8*x_3*x_6-32*x|
|-----------------------------------------------------------------------------|
|_4*x_6+42*x_5*x_6-34*x_6^2-37*x_0*x_7-28*x_1*x_7+10*x_2*x_7-27*x_3*x_7-42*x_4|
|-----------------------------------------------------------------------------|
|*x_7-8*x_5*x_7,x_2*x_4-25*x_5^2-4*x_0*x_6+2*x_1*x_6-31*x_2*x_6-5*x_3*x_6+16*x|
|-----------------------------------------------------------------------------|
|_4*x_6-24*x_5*x_6+31*x_6^2-30*x_0*x_7+32*x_1*x_7+12*x_2*x_7-40*x_3*x_7+3*x_4*|
|-----------------------------------------------------------------------------|
|x_7-28*x_5*x_7,x_0*x_4+15*x_5^2+48*x_0*x_6-50*x_1*x_6+46*x_2*x_6-48*x_3*x_6- |
|-----------------------------------------------------------------------------|
|23*x_4*x_6-28*x_5*x_6+39*x_6^2+38*x_1*x_7-5*x_3*x_7+5*x_4*x_7-34*x_5*x_7,x_3^|
|-----------------------------------------------------------------------------|
|2-31*x_5^2+41*x_0*x_6-30*x_1*x_6-4*x_2*x_6+43*x_3*x_6+23*x_4*x_6+7*x_5*x_6+31|
|-----------------------------------------------------------------------------|
|*x_6^2-19*x_0*x_7+25*x_1*x_7-49*x_2*x_7-16*x_3*x_7-45*x_4*x_7+25*x_5*x_7,x_2*|
|-----------------------------------------------------------------------------|
|x_3+13*x_5^2-45*x_0*x_6-22*x_1*x_6+33*x_2*x_6-26*x_3*x_6-21*x_4*x_6+34*x_5*x_|
|-----------------------------------------------------------------------------|
|6-21*x_6^2-47*x_0*x_7-10*x_1*x_7+29*x_2*x_7-46*x_3*x_7-x_4*x_7+20*x_5*x_7,x_1|
|-----------------------------------------------------------------------------|
|*x_3+22*x_5^2+4*x_0*x_6+3*x_1*x_6+45*x_2*x_6+37*x_3*x_6+17*x_4*x_6+36*x_5*x_6|
|-----------------------------------------------------------------------------|
|-2*x_6^2-31*x_0*x_7+3*x_1*x_7-12*x_2*x_7+19*x_3*x_7+28*x_4*x_7+30*x_5*x_7,x_0|
|-----------------------------------------------------------------------------|
|*x_3-47*x_5^2-43*x_0*x_6+6*x_1*x_6-40*x_2*x_6+21*x_3*x_6+26*x_4*x_6-5*x_5*x_6|
|-----------------------------------------------------------------------------|
|-5*x_6^2+4*x_0*x_7-15*x_1*x_7+18*x_2*x_7-31*x_3*x_7+50*x_4*x_7-46*x_5*x_7,x_2|
|-----------------------------------------------------------------------------|
|^2+4*x_5^2+31*x_0*x_6+41*x_1*x_6+31*x_2*x_6+28*x_3*x_6+42*x_4*x_6-28*x_5*x_6-|
|-----------------------------------------------------------------------------|
|4*x_6^2-7*x_0*x_7+15*x_1*x_7-9*x_2*x_7+31*x_3*x_7+3*x_4*x_7+7*x_5*x_7,x_1*x_2|
|-----------------------------------------------------------------------------|
|-46*x_5^2-6*x_0*x_6-50*x_1*x_6+32*x_2*x_6-10*x_3*x_6+42*x_4*x_6+33*x_5*x_6+18|
|-----------------------------------------------------------------------------|
|*x_6^2-9*x_0*x_7-20*x_1*x_7+45*x_2*x_7-9*x_3*x_7+10*x_4*x_7-8*x_5*x_7,x_0*x_2|
|-----------------------------------------------------------------------------|
|-9*x_5^2+34*x_0*x_6-45*x_1*x_6+19*x_2*x_6+24*x_3*x_6+23*x_4*x_6-37*x_5*x_6-44|
|-----------------------------------------------------------------------------|
|*x_6^2+24*x_0*x_7-33*x_2*x_7+41*x_3*x_7-40*x_4*x_7+4*x_5*x_7,x_1^2+x_1*x_4+x_|
|-----------------------------------------------------------------------------|
|4^2-28*x_5^2-33*x_0*x_6-17*x_1*x_6+11*x_3*x_6+20*x_4*x_6+25*x_5*x_6-21*x_6^2-|
|-----------------------------------------------------------------------------|
|22*x_0*x_7+24*x_1*x_7-14*x_2*x_7+5*x_3*x_7-39*x_4*x_7-18*x_5*x_7,x_0*x_1-47*x|
|-----------------------------------------------------------------------------|
|_5^2-5*x_0*x_6-9*x_1*x_6-45*x_2*x_6+48*x_3*x_6+45*x_4*x_6-29*x_5*x_6+3*x_6^2+|
|-----------------------------------------------------------------------------|
|29*x_0*x_7+40*x_1*x_7+46*x_2*x_7+27*x_3*x_7-36*x_4*x_7-39*x_5*x_7,x_0^2-31*x_|
|-----------------------------------------------------------------------------|
|5^2+36*x_0*x_6-30*x_1*x_6-10*x_2*x_6+42*x_3*x_6+9*x_4*x_6+34*x_5*x_6-6*x_6^2+|
|-----------------------------------------------------------------------------|
|48*x_0*x_7-47*x_1*x_7-19*x_2*x_7+25*x_3*x_7+28*x_4*x_7+34*x_5*x_7);          |
+-----------------------------------------------------------------------------+
|i6 : phi = rationalMap(C,3,2);                                               |
|                                                                             |
|o6 : RationalMap (cubic rational map from PP^7 to PP^7)                      |
+-----------------------------------------------------------------------------+
|i7 : time isDominant(phi,MathMode=>true)                                     |
|MathMode: output certified!                                                  |
|     -- used 6.13398 seconds                                                 |
|                                                                             |
|o7 = false                                                                   |
+-----------------------------------------------------------------------------+

See also
========

  * isBirational -- whether a rational map is birational

Ways to use isDominant :
========================

  * "isDominant(RationalMap)"
  * "isDominant(RingMap)"

For the programmer
==================

The object isDominant, is a method function with options (Macaulay2Doc).

isInverseMap -- checks whether a rational map is the inverse of another
***********************************************************************

Synopsis
========

  * Usage:
        isInverseMap(phi,psi)
  * Inputs:
      * phi, a ring map (Macaulay2Doc), representing a rational
        map $\Phi:X \dashrightarrow Y$
      * psi, a ring map (Macaulay2Doc), representing a rational
        map $\Psi:Y \dashrightarrow X$
  * Outputs:
      * a Boolean value (Macaulay2Doc), according to the
        condition that the composition $\Psi\,\Phi:X \dashrightarrow X$
        coincides with the identity of $X$ (as a rational map)

Ways to use isInverseMap :
==========================

  * "isInverseMap(RingMap,RingMap)"
  * isInverseMap(RationalMap,RationalMap)
    -- checks whether two rational
    maps are one the inverse of the other

For the programmer
==================

The object isInverseMap, is a method function (Macaulay2Doc).

isInverseMap(RationalMap,RationalMap) -- checks whether two rational maps are one the inverse of the other
**********************************************************************************************************

Synopsis
========

  * Function: isInverseMap,
  * Usage:
        isInverseMap(phi,psi)
  * Inputs:
      * phi, a rational map,
      * psi, a rational map,
  * Outputs:
      * a Boolean value (Macaulay2Doc), whether phi * psi == 1
        and psi * phi == 1
  * Consequences:
      * If the answer is affirmative, then the system will be informed and so
        commands like 'inverse phi' will execute fast.

See also
========

  * RationalMap == RationalMap -- equality
    of rational maps
  * RationalMap * RationalMap, --
    composition of rational maps
  * isInverseMap(RingMap,RingMap) -- checks whether a
    rational map is the inverse of another
  * inverse(RationalMap) -- inverse of a
    birational map
  * forceInverseMap -- declare that two rational maps
    are one the inverse of the other

Ways to use this method:
========================

  * isInverseMap(RationalMap,RationalMap)
    -- checks whether two rational
    maps are one the inverse of the other

isIsomorphism(RationalMap) -- whether a birational map is an isomorphism
************************************************************************

Synopsis
========

  * Function: isIsomorphism (Macaulay2Doc),
  * Usage:
        isIsomorphism phi
  * Inputs:
      * phi, a rational map,
  * Outputs:
      * a Boolean value (Macaulay2Doc), whether phi is an
        isomorphism

Description
===========

This method computes the inverse rational map using inverse.

+--------------------------------------------------------------------+
|i1 : P1 := QQ[a,b]; P4 := QQ[x,y,z,w];                              |
+--------------------------------------------------------------------+
|i3 : phi = rationalMap({a^4,a^3*b,a^2*b^2,a*b^3,b^4},Dominant=>true)|
|                                                                    |
|o3 = -- rational map --                                             |
|     source: Proj(QQ[a, b])                                         |
|     target: subvariety of Proj(QQ[t , t , t , t , t ]) defined by  |
|                                    0   1   2   3   4               |
|             {                                                      |
|               2                                                    |
|              t  - t t ,                                            |
|               3    2 4                                             |
|                                                                    |
|              t t  - t t ,                                          |
|               2 3    1 4                                           |
|                                                                    |
|              t t  - t t ,                                          |
|               1 3    0 4                                           |
|                                                                    |
|               2                                                    |
|              t  - t t ,                                            |
|               2    0 4                                             |
|                                                                    |
|              t t  - t t ,                                          |
|               1 2    0 3                                           |
|                                                                    |
|               2                                                    |
|              t  - t t                                              |
|               1    0 2                                             |
|             }                                                      |
|     defining forms: {                                              |
|                       4                                            |
|                      a ,                                           |
|                                                                    |
|                       3                                            |
|                      a b,                                          |
|                                                                    |
|                       2 2                                          |
|                      a b ,                                         |
|                                                                    |
|                         3                                          |
|                      a*b ,                                         |
|                                                                    |
|                       4                                            |
|                      b                                             |
|                     }                                              |
|                                                                    |
|o3 : RationalMap (dominant rational map from PP^1 to curve in PP^4) |
+--------------------------------------------------------------------+
|i4 : isIsomorphism phi                                              |
|                                                                    |
|o4 = true                                                           |
+--------------------------------------------------------------------+

See also
========

  * ideal(RationalMap) -- base locus of a
    rational map
  * isBirational -- whether a rational map is birational
  * isMorphism -- whether a rational map is a morphism

Ways to use this method:
========================

  * isIsomorphism(RationalMap), --
    whether a birational map is an isomorphism

isMorphism -- whether a rational map is a morphism
**************************************************

Synopsis
========

  * Usage:
        isMorphism phi
  * Inputs:
      * phi, a rational map,
  * Outputs:
      * a Boolean value (Macaulay2Doc), whether phi is a
        morphism (i.e., everywhere defined)

Description
===========

+-----------------------------------------------------------------------------+
|i1 : phi = quadroQuadricCremonaTransformation(5,1)                           |
|                                                                             |
|o1 = -- rational map --                                                      |
|     source: Proj(QQ[x, y, z, t, u, v])                                      |
|     target: Proj(QQ[x, y, z, t, u, v])                                      |
|     defining forms: {                                                       |
|                             2                                               |
|                      y*z - v ,                                              |
|                                                                             |
|                             2                                               |
|                      x*z - u ,                                              |
|                                                                             |
|                             2                                               |
|                      x*y - t ,                                              |
|                                                                             |
|                      - z*t + u*v,                                           |
|                                                                             |
|                      - y*u + t*v,                                           |
|                                                                             |
|                      t*u - x*v                                              |
|                     }                                                       |
|                                                                             |
|o1 : RationalMap (Cremona transformation of PP^5 of type (2,2))              |
+-----------------------------------------------------------------------------+
|i2 : isMorphism phi                                                          |
|                                                                             |
|o2 = false                                                                   |
+-----------------------------------------------------------------------------+
|i3 : phi' = last graph phi;                                                  |
|                                                                             |
|o3 : MultihomogeneousRationalMap (birational map from 5-dimensional          |
|-----------------------------------------------------------------------------|
|subvariety of PP^5 x PP^5 to PP^5)                                           |
+-----------------------------------------------------------------------------+
|i4 : isMorphism phi'                                                         |
|                                                                             |
|o4 = true                                                                    |
+-----------------------------------------------------------------------------+

See also
========

  * ideal(RationalMap) -- base locus of a
    rational map
  * isIsomorphism(RationalMap), --
    whether a birational map is an isomorphism

Ways to use isMorphism :
========================

  * "isMorphism(RationalMap)"

For the programmer
==================

The object isMorphism, is a method function (Macaulay2Doc).

kernel(RingMap,ZZ) -- homogeneous components of the kernel of a homogeneous ring map
************************************************************************************

Synopsis
========

  * Function: kernel (Macaulay2Doc),
  * Usage:
        kernel(phi,d)
  * Inputs:
      * phi, a ring map (Macaulay2Doc), $K[y_0,\ldots,y_m]/J \to
        K[x_0,\ldots,x_n]/I$, defined by homogeneous forms of the same degree
        and where $J$ and $I$ are homogeneous ideals
      * d, an integer (Macaulay2Doc),
  * Optional inputs (Macaulay2Doc),:
      * SubringLimit (Macaulay2Doc),
        => ..., default value infinity, null
  * Outputs:
      * the ideal (Macaulay2Doc), generated by all homogeneous
        elements of degree d belonging to the kernel of phi

Description
===========

This is equivalent to ideal image basis(d,kernel phi), but we use a more direct
algorithm. We take advantage of the homogeneity and reduce the problem to
linear algebra. For small values of d this method can be very fast, as the
following example shows.

+-----------------------------------------------------------------------------+
|i1 : phi = toMap map specialQuadraticTransformation 8                        |
|                                                                             |
|                                                                             |
|o1 = map (QQ[x ..x ], QQ[y ..y  ], {- 5x x  + x x  + x x  + 35x x  - 7x x  + |
|              0   8       0   11        0 3    2 4    3 4      0 5     2 5   |
|                                                                             |
|o1 : RingMap QQ[x ..x ] <--- QQ[y ..y  ]                                     |
|                 0   8           0   11                                      |
|-----------------------------------------------------------------------------|
|                 2                                     2                     |
|x x  - x x  - 49x  - 5x x  + 2x x  - x x  + 27x x  - 4x  + x x  - 7x x  +    |
| 3 5    4 5      5     0 6     2 6    4 6      5 6     6    4 7     5 7      |
|-----------------------------------------------------------------------------|
|                                                                             |
|2x x  - 2x x  + 14x x  - 4x x , - x x  - 6x x  - 5x x  + 2x x  + x x  + x x  |
|  6 7     4 8      5 8     6 8     1 2     1 5     0 6     1 6    4 6    5 6 |
|-----------------------------------------------------------------------------|
|                                                             2               |
|- 5x x  - x x  + 2x x  + 7x x  - 2x x  + 2x x  - 3x x , - 25x  + 9x x  +     |
|    0 7    1 7     2 7     5 7     6 7     1 8     7 8       0     0 2       |
|-----------------------------------------------------------------------------|
|                  2                                                          |
|10x x  - 2x x  - x  + 29x x  - x x  - 7x x  - 13x x  + 3x x  + x x  - x x  + |
|   0 4     2 4    4      0 5    2 5     4 5      0 6     4 6    5 6    0 7   |
|-----------------------------------------------------------------------------|
|                                                                     2       |
|2x x  - x x  + 7x x  - 2x x  - 8x x  + 2x x  - 3x x , x x  + x x  + x  +     |
|  2 7    4 7     5 7     6 7     0 8     4 8     7 8   2 4    3 4    4       |
|-----------------------------------------------------------------------------|
|                           2                                                 |
|7x x  - 9x x  + 12x x  - 4x  + 2x x  + 2x x  - 14x x  + 4x x  + x x  - x x  -|
|  2 5     4 5      5 6     6     3 7     4 7      5 7     6 7    3 8    4 8  |
|-----------------------------------------------------------------------------|
|                                                                             |
|14x x  + x x , - 5x x  + x x  - 7x x  + 8x x  - 5x x  + 2x x  - x x  + x x  -|
|   5 8    6 8      0 4    2 4     2 5     4 5     0 6     2 6    4 6    5 6  |
|-----------------------------------------------------------------------------|
|                                                     2                       |
|x x  + 7x x  - 2x x  - x x  + 7x x  - 2x x , x x  + x  - 7x x  - 8x x  + x x |
| 4 7     5 7     6 7    4 8     5 8     6 8   0 4    4     1 5     4 5    0 6|
|-----------------------------------------------------------------------------|
|                                                                             |
|+ x x  + 2x x  - x x  + x x  - 7x x  + 2x x  + x x  - 7x x  + 2x x , x x  +  |
|   1 6     4 6    5 6    4 7     5 7     6 7    4 8     5 8     6 8   2 3    |
|-----------------------------------------------------------------------------|
| 2                            2                                              |
|x  - 8x x  + x x  + 6x x  - 2x  + x x  + x x  - 7x x  + 2x x  + x x  - 7x x  |
| 4     4 5    4 6     5 6     6    3 7    4 7     5 7     6 7    4 8     5 8 |
|-----------------------------------------------------------------------------|
|                                                2                           2|
|+ 2x x , x x  - 7x x  + x x  + x x  - 7x x  + 2x  - x x , - 4x x  + x x  - x |
|    6 8   1 3     1 5    1 6    4 6     5 6     6    3 7      0 3    3 4    4|
|-----------------------------------------------------------------------------|
|                                          2                                  |
|- 7x x  + 8x x  + x x  - x x  - 6x x  + 2x  - x x  - x x  + 7x x  - 2x x  -  |
|    0 5     4 5    0 6    4 6     5 6     6    3 7    4 7     5 7     6 7    |
|-----------------------------------------------------------------------------|
|                                  2           2                              |
|x x  + 7x x  - 2x x , - 5x x  + 2x  + x x  - x  - x x  + 8x x  - 10x x  +    |
| 4 8     5 8     6 8      0 2     2    2 4    4    2 5     4 5      0 6      |
|-----------------------------------------------------------------------------|
|2x x  + 2x x  - 2x x  + 14x x  - 4x x  + 5x x  - 3x x  - 2x x  + 7x x  -     |
|  5 6     2 7     4 7      5 7     6 7     0 8     2 8     4 8     5 8       |
|-----------------------------------------------------------------------------|
|2x x  - 3x x , - 5x x  + x x  + x x  - 4x x  - x x  + x x  + x x , x x  -    |
|  6 8     7 8      0 1    1 2    1 4     0 6    1 6    4 6    0 7   0 2      |
|-----------------------------------------------------------------------------|
|x x  + 5x x  + x x  - 14x x  - x x  - 8x x  - 8x x  + 2x x  + 4x x  + 2x x  +|
| 1 2     0 4    1 4      1 5    2 5     4 5     0 6     1 6     4 6     2 7  |
|-----------------------------------------------------------------------------|
|4x x  + 3x x  - 7x x  + 2x x  - 3x x })                                      |
|  0 8     1 8     5 8     6 8     7 8                                        |
+-----------------------------------------------------------------------------+
|i2 : time kernel(phi,1)                                                      |
|     -- used 0.0951005 seconds                                               |
|                                                                             |
|o2 = ideal ()                                                                |
|                                                                             |
|o2 : Ideal of QQ[y ..y  ]                                                    |
|                  0   11                                                     |
+-----------------------------------------------------------------------------+
|i3 : time kernel(phi,2)                                                      |
|     -- used 2.25983 seconds                                                 |
|                                                                             |
|                           2                                                 |
|o3 = ideal (y y  + y y  + y  + 5y y  + y y  + 5y y  - y y  - 4y y  - 5y y  - |
|             2 4    3 4    4     2 5    3 5     4 5    1 6     2 6     5 6   |
|     ------------------------------------------------------------------------|
|                                                                             |
|     4y y  - 2y y  - y y  + 4y y  - 5y y  - 4y y  + 3y y  - 4y y  - y y   -  |
|       2 7     4 7    1 8     4 8     5 8     5 9     7 9     8 9    3 10    |
|     ------------------------------------------------------------------------|
|                                                                        2    |
|     3y y   - 5y y   - y y   + 4y y   + 5y y  , 3y y  - y y  - 3y y  - y  +  |
|       6 10     8 10    4 11     6 11     8 11    1 3    2 3     3 4    4    |
|     ------------------------------------------------------------------------|
|     2y y  - y y  + y y  + 2y y  + 3y y  - 7y y  - 4y y  + 7y y  - 2y y  +   |
|       0 5    3 5    1 6     2 6     5 6     2 7     4 7     1 8     4 8     |
|     ------------------------------------------------------------------------|
|     y y  - y y  + 2y y  + 2y y  + y y  - 7y y   + 5y y   - 3y y   - y y   - |
|      0 9    4 9     5 9     7 9    8 9     0 10     3 10     6 10    0 11   |
|     ------------------------------------------------------------------------|
|     2y y   - 2y y  , 7y y  + y y  + 7y y  - y y  + 8y y  - y y  - y y  +    |
|       3 11     4 11    0 1    0 4     1 4    3 4     0 5    3 5    1 6      |
|     ------------------------------------------------------------------------|
|     7y y  + 8y y  + y y  + 8y y  - y y  - 8y y  + 7y y  - 8y y  + 7y y  +   |
|       2 6     5 6    2 7     4 7    1 8     4 8     5 9     7 9     8 9     |
|     ------------------------------------------------------------------------|
|     y y   - y y   + 8y y   - 7y y   - 7y y   - 7y y  )                      |
|      0 10    3 10     6 10     0 11     4 11     6 11                       |
|                                                                             |
|o3 : Ideal of QQ[y ..y  ]                                                    |
|                  0   11                                                     |
+-----------------------------------------------------------------------------+

See also
========

  * kernel(RingMap) (Macaulay2Doc) -- kernel of a
    ringmap

Ways to use this method:
========================

  * kernel(RingMap,ZZ) -- homogeneous
    components of the kernel of a homogeneous ring map

map(RationalMap) -- get the ring map defining a rational map
************************************************************

Synopsis
========

  * Function: map (Macaulay2Doc),
  * Usage:
        map Phi
  * Inputs:
      * Phi, a rational map,
  * Optional inputs (Macaulay2Doc),:
      * Degree (Macaulay2Doc), => ..., default value null, null
      * DegreeLift (Macaulay2Doc), => ...,
        default value null, null
      * DegreeMap (Macaulay2Doc), => ...,
        default value null, null
  * Outputs:
      * a ring map (Macaulay2Doc), the ring map from which the
        rational map Phi was defined

Description
===========

+-------------------------------------------------------------------+
|i1 : QQ[t_0..t_3]                                                  |
|                                                                   |
|o1 = QQ[t ..t ]                                                    |
|         0   3                                                     |
|                                                                   |
|o1 : PolynomialRing                                                |
+-------------------------------------------------------------------+
|i2 : Phi = rationalMap {t_1^2+t_2^2+t_3^2,t_0*t_1,t_0*t_2,t_0*t_3} |
|                                                                   |
|o2 = -- rational map --                                            |
|     source: Proj(QQ[t , t , t , t ])                              |
|                      0   1   2   3                                |
|     target: Proj(QQ[t , t , t , t ])                              |
|                      0   1   2   3                                |
|     defining forms: {                                             |
|                       2    2    2                                 |
|                      t  + t  + t ,                                |
|                       1    2    3                                 |
|                                                                   |
|                      t t ,                                        |
|                       0 1                                         |
|                                                                   |
|                      t t ,                                        |
|                       0 2                                         |
|                                                                   |
|                      t t                                          |
|                       0 3                                         |
|                     }                                             |
|                                                                   |
|o2 : RationalMap (quadratic rational map from PP^3 to PP^3)        |
+-------------------------------------------------------------------+
|i3 : map Phi                                                       |
|                                                                   |
|                                    2    2    2                    |
|o3 = map (QQ[t ..t ], QQ[t ..t ], {t  + t  + t , t t , t t , t t })|
|              0   3       0   3     1    2    3   0 1   0 2   0 3  |
|                                                                   |
|o3 : RingMap QQ[t ..t ] <--- QQ[t ..t ]                            |
|                 0   3           0   3                             |
+-------------------------------------------------------------------+

The command map Phi is equivalent to map(0,Phi). More generally, the command
map(i,Phi) returns the i-th representative of the map Phi.

See also
========

  * matrix(RationalMap) -- the matrix
    associated to a rational map

Ways to use this method:
========================

  * map(RationalMap) -- get the ring map defining
    a rational map
  * "map(ZZ,RationalMap)"

MathMode -- whether to ensure correctness of output
***************************************************

Description
===========

This option accepts a Boolean (Macaulay2Doc), value, default
value false.

If turned on in the methods inverseMap, and
approximateInverseMap, then it will be checked whether
the maps in input and output are one the inverse of the other, throwing an
error if they are not. Actually, see approximateInverseMap,
will first try to fix the error of the approximation.
When turned on in the methods projectiveDegrees,
degreeMap, isBirational,
isDominant, SegreClass,
EulerCharacteristic, and ChernSchwartzMacPherson,
it means whether to use a non-probabilistic
algorithm.

Functions with optional argument named MathMode :
=================================================

  * "approximateInverseMap(...,MathMode=>...)"
  * "ChernSchwartzMacPherson(...,MathMode=>...)"
  * "degreeMap(...,MathMode=>...)"
  * "EulerCharacteristic(...,MathMode=>...)"
  * "exceptionalLocus(...,MathMode=>...)"
  * "inverseMap(...,MathMode=>...)"
  * "isBirational(...,MathMode=>...)"
  * "isDominant(...,MathMode=>...)"
  * "projectiveDegrees(...,MathMode=>...)"
  * "SegreClass(...,MathMode=>...)"

For the programmer
==================

The object MathMode, is a symbol (Macaulay2Doc).

matrix(RationalMap) -- the matrix associated to a rational map
**************************************************************

Synopsis
========

  * Function: matrix (Macaulay2Doc),
  * Usage:
        matrix Phi
  * Inputs:
      * Phi, a rational map,
  * Optional inputs (Macaulay2Doc),:
      * Degree (Macaulay2Doc), => ..., default value
        null, null
  * Outputs:
      * a matrix (Macaulay2Doc), the matrix associated to the
        ring map defining the rational map Phi

Description
===========

This is equivalent to matrix map Phi. Moreover, the command matrix Phi is
equivalent to matrix(0,Phi), and more generally the command matrix(i,Phi)
returns the matrix of the i-th representative of Phi.

See also
========

  * map(RationalMap) -- get the ring map defining
    a rational map
  * matrix(RingMap) (Macaulay2Doc) -- the matrix
    associated to a ring map

Ways to use this method:
========================

  * matrix(RationalMap) -- the matrix
    associated to a rational map
  * "matrix(ZZ,RationalMap)"

NumDegrees
**********

Description
===========

This is an optional argument for projectiveDegrees,
and accepts a non-negative integer, 1 less than the number of projective
degrees to be computed.

Functions with optional argument named NumDegrees :
===================================================

  * "projectiveDegrees(...,NumDegrees=>...)"

For the programmer
==================

The object NumDegrees, is a symbol (Macaulay2Doc).

parametrize -- parametrization of linear varieties and hyperquadrics
********************************************************************

Synopsis
========

  * Usage:
        parametrize I
  * Inputs:
      * I, an ideal (Macaulay2Doc), the ideal of a linear variety
        or of a hyperquadric
  * Outputs:
      * a rational map, a birational map phi such that I ==
        image phi

Description
===========

This function has been improved and extended in the package
MultiprojectiveVarieties (see
https://faculty.math.illinois.edu/Macaulay2/doc/Macaulay2/share/doc/Macaulay2/
MultiprojectiveVarieties/html/index.html ), see
parametrize(MultiprojectiveVariety) (see
https://faculty.math.illinois.edu/Macaulay2/doc/Macaulay2/share/doc/Macaulay2/
MultiprojectiveVarieties/html/_parametrize_lp__Multiprojective__Variety_rp.html
).

+-----------------------------------------------------------------------------+
|i1 : P9 := ZZ/10000019[x_0..x_9]                                             |
|                                                                             |
|        ZZ                                                                   |
|o1 = --------[x ..x ]                                                        |
|     10000019  0   9                                                         |
|                                                                             |
|o1 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i2 : L = trim ideal(random(1,P9),random(1,P9),random(1,P9),random(1,P9))     |
|                                                                             |
|o2 = ideal (x  - 1112016x  - 3901361x  - 3193863x  + 4143040x  - 1964417x  + |
|             3           4           5           6           7           8   |
|     ------------------------------------------------------------------------|
|     1074958x , x  + 632284x  + 492458x  + 3869254x  + 2840266x  + 4883974x  |
|             9   2          4          5           6           7           8 |
|     ------------------------------------------------------------------------|
|     + 3340961x , x  + 4724709x  - 3505386x  + 2469206x  - 1381515x  +       |
|               9   1           4           5           6           7         |
|     ------------------------------------------------------------------------|
|     2331280x  - 4936229x , x  - 2094456x  - 3936498x  - 4665404x  - 736943x |
|             8           9   0           4           5           6          7|
|     ------------------------------------------------------------------------|
|     - 849671x  + 3034137x )                                                 |
|              8           9                                                  |
|                                                                             |
|                 ZZ                                                          |
|o2 : Ideal of --------[x ..x ]                                               |
|              10000019  0   9                                                |
+-----------------------------------------------------------------------------+
|i3 : time parametrize L                                                      |
|     -- used 0.0125815 seconds                                               |
|                                                                             |
|o3 = -- rational map --                                                      |
|                     ZZ                                                      |
|     source: Proj(--------[t , t , t , t , t , t ])                          |
|                  10000019  0   1   2   3   4   5                            |
|                     ZZ                                                      |
|     target: Proj(--------[x , x , x , x , x , x , x , x , x , x ])          |
|                  10000019  0   1   2   3   4   5   6   7   8   9            |
|     defining forms: {                                                       |
|                      2094456t  + 3936498t  + 4665404t  + 736943t  +         |
|                              0           1           2          3           |
|                                                                             |
|                      - 4724709t  + 3505386t  - 2469206t  + 1381515t         |
|                                0           1           2           3        |
|                                                                             |
|                      - 632284t  - 492458t  - 3869254t  - 2840266t  -        |
|                               0          1           2           3          |
|                                                                             |
|                      1112016t  + 3901361t  + 3193863t  - 4143040t  +        |
|                              0           1           2           3          |
|                                                                             |
|                      t ,                                                    |
|                       0                                                     |
|                                                                             |
|                      t ,                                                    |
|                       1                                                     |
|                                                                             |
|                      t ,                                                    |
|                       2                                                     |
|                                                                             |
|                      t ,                                                    |
|                       3                                                     |
|                                                                             |
|                      t ,                                                    |
|                       4                                                     |
|                                                                             |
|                      t                                                      |
|                       5                                                     |
|                     }                                                       |
|                                                                             |
|o3 : RationalMap (linear rational map from PP^5 to PP^9)                     |
|-----------------------------------------------------------------------------|
|849671t  - 3034137t ,                                                        |
|       4           5                                                         |
|                                                                             |
| - 2331280t  + 4936229t ,                                                    |
|           4           5                                                     |
|                                                                             |
| 4883974t  - 3340961t ,                                                      |
|         4           5                                                       |
|                                                                             |
| 1964417t  - 1074958t ,                                                      |
|         4           5                                                       |
+-----------------------------------------------------------------------------+
|i4 : Q = trim ideal(random(2,P9),random(1,P9),random(1,P9))                  |
|                                                                             |
|                                                                             |
|o4 = ideal (x  - 3731285x  + 569485x  + 4255201x  - 2098712x  - 4248990x  -  |
|             1           2          3           4           5           6    |
|     ------------------------------------------------------------------------|
|                                                                             |
|     1801342x  + 4050229x  - 2319263x , x  - 3094689x  - 4410186x  +         |
|             7           8           9   0           2           3           |
|     ------------------------------------------------------------------------|
|                                                                            2|
|     3196146x  + 2713771x  + 2261412x  - 1267196x  - 4210403x  + 285932x , x |
|             4           5           6           7           8          9   2|
|     ------------------------------------------------------------------------|
|                            2                                       2        |
|     + 1045421x x  + 718532x  - 3701628x x  + 3903798x x  + 2842397x  -      |
|               2 3          3           2 4           3 4           4        |
|     ------------------------------------------------------------------------|
|                                                       2                     |
|     2997962x x  + 4189835x x  + 1489225x x  - 2279955x  + 2520782x x  +     |
|             2 5           3 5           4 5           5           2 6       |
|     ------------------------------------------------------------------------|
|                                                      2                      |
|     4494280x x  + 3101255x x  - 681950x x  + 1307490x  + 2690767x x  +      |
|             3 6           4 6          5 6           6           2 7        |
|     ------------------------------------------------------------------------|
|                                                                    2        |
|     4503651x x  + 1762528x x  + 137682x x  - 2229093x x  - 4018967x  +      |
|             3 7           4 7          5 7           6 7           7        |
|     ------------------------------------------------------------------------|
|                                                                             |
|     4536117x x  - 2541309x x  + 3810968x x  - 4208194x x  - 1643560x x  +   |
|             2 8           3 8           4 8           5 8           6 8     |
|     ------------------------------------------------------------------------|
|                           2                                                 |
|     3330573x x  - 2280516x  - 1532056x x  + 1883935x x  + 1887667x x  +     |
|             7 8           8           2 9           3 9           4 9       |
|     ------------------------------------------------------------------------|
|                                                                     2       |
|     1211601x x  - 2168594x x  - 1801762x x  + 3022242x x  + 3618789x )      |
|             5 9           6 9           7 9           8 9           9       |
|                                                                             |
|                 ZZ                                                          |
|o4 : Ideal of --------[x ..x ]                                               |
|              10000019  0   9                                                |
+-----------------------------------------------------------------------------+
|i5 : time parametrize Q                                                      |
|     -- used 0.867246 seconds                                                |
|                                                                             |
|o5 = -- rational map --                                                      |
|                     ZZ                                                      |
|     source: Proj(--------[t , t , t , t , t , t , t ])                      |
|                  10000019  0   1   2   3   4   5   6                        |
|                     ZZ                                                      |
|     target: Proj(--------[x , x , x , x , x , x , x , x , x , x ])          |
|                  10000019  0   1   2   3   4   5   6   7   8   9            |
|     defining forms: {                                                       |
|                             2                         2                     |
|                      817998t  + 1329216t t  - 1114182t  + 1344821t t  - 1780|
|                             0           0 1           1           0 2       |
|                                                                             |
|                              2                        2                     |
|                      2699292t  - 913286t t  + 1308567t  + 3742165t t  + 2234|
|                              0          0 1           1           0 2       |
|                                                                             |
|                              2                        2                     |
|                      2409725t  - 528341t t  + 1675402t  - 707616t t  - 12818|
|                              0          0 1           1          0 2        |
|                                                                             |
|                                2                         2                  |
|                      - 3257377t  - 1895252t t  + 2592730t  + 2601832t t  - 2|
|                                0           0 1           1           0 2    |
|                                                                             |
|                             2                         2                     |
|                      366446t  + 4297213t t  + 4708643t  + 2746493t t  - 3014|
|                             0           0 1           1           0 2       |
|                                                                             |
|                             2                         2                     |
|                      163273t  - 1180075t t  - 2150532t  + 2988598t t  + 4385|
|                             0           0 1           1           0 2       |
|                                                                             |
|                              2                         2                    |
|                      2129392t  - 2762640t t  + 2068935t  - 665335t t  + 1654|
|                              0           0 1           1          0 2       |
|                                                                             |
|                                2                        2                   |
|                      - 2140546t  - 4355211t t  - 346596t  - 588652t t  + 448|
|                                0           0 1          1          0 2      |
|                                                                             |
|                                2                         2                  |
|                      - 2759923t  + 3719767t t  - 1969015t  - 969262t t  - 81|
|                                0           0 1           1          0 2     |
|                                                                             |
|                       2                        2                            |
|                      t  + 2557201t t  + 897582t  - 1955667t t  - 4162832t t |
|                       0           0 1          1           0 2           1 2|
|                     }                                                       |
|                                                                             |
|o5 : RationalMap (quadratic rational map from PP^6 to PP^9)                  |
|-----------------------------------------------------------------------------|
|                  2                                                   2      |
|494t t  + 2360961t  - 230018t t  + 4128916t t  - 421002t t  + 4823510t  + 190|
|    1 2           2          0 3           1 3          2 3           3      |
|                                                                             |
|                  2                                                  2       |
|748t t  - 1090847t  + 24640t t  + 3357238t t  + 3401451t t  - 690691t  - 1092|
|    1 2           2         0 3           1 3           2 3          3       |
|                                                                             |
|                 2                                                     2     |
|06t t  + 1537300t  - 3535002t t  - 2913175t t  + 1869596t t  - 2751246t  - 65|
|   1 2           2           0 3           1 3           2 3           3     |
|                                                                             |
|                     2                                                     2 |
|552127t t  - 3334850t  - 2546231t t  - 4666038t t  - 3274793t t  - 2571387t  |
|       1 2           2           0 3           1 3           2 3           3 |
|                                                                             |
|                 2                                                    2      |
|690t t  - 967835t  + 4546708t t  - 235720t t  + 3940703t t  + 4714119t  - 226|
|    1 2          2           0 3          1 3           2 3           3      |
|                                                                             |
|                  2                                                   2      |
|649t t  - 4536315t  + 2379600t t  - 312013t t  - 629976t t  + 1770897t  - 453|
|    1 2           2           0 3          1 3          2 3           3      |
|                                                                             |
|                  2                                                     2    |
|813t t  + 3097870t  + 4330772t t  + 4106480t t  - 2058838t t  + 4922805t  + 3|
|    1 2           2           0 3           1 3           2 3           3    |
|                                                                             |
|                   2                                                     2   |
|1501t t  + 2091130t  - 1975694t t  + 2412002t t  + 4759999t t  + 2932610t  + |
|     1 2           2           0 3           1 3           2 3           3   |
|                                                                             |
|                   2                                                     2   |
|9291t t  + 3628124t  - 4781195t t  - 4169557t t  - 2707984t t  - 2673395t  - |
|     1 2           2           0 3           1 3           2 3           3   |
|                                                                             |
|           2                                                   2             |
| + 2917974t  - 2414045t t  - 3133456t t  + 130269t t  - 921025t  + 4924767t t|
|           2           0 3           1 3          2 3          3           0 |
|-----------------------------------------------------------------------------|
|                                                                             |
|2430t t  + 3436483t t  + 1535528t t  - 1083587t t                            |
|     0 4           1 4           2 4           3 4                           |
|                                                                             |
|                                                                             |
|420t t  - 2920363t t  + 2706944t t  + 4626949t t  -                          |
|    0 4           1 4           2 4           3 4                            |
|                                                                             |
|                                                                             |
|4474t t  - 3900969t t  - 2177290t t  + 4911566t t                            |
|     0 4           1 4           2 4           3 4                           |
|                                                                             |
|                                                                             |
|- 2276758t t  - 4598320t t  - 70152t t  + 2150293t                           |
|          0 4           1 4         2 4           3                          |
|                                                                             |
|                                                                             |
|0772t t  - 3378764t t  - 4247617t t  + 173136t t  +                          |
|     0 4           1 4           2 4          3 4                            |
|                                                                             |
|                                                                             |
|61t t  + 2486846t t  - 2344497t t  - 4161253t t  +                           |
|   0 4           1 4           2 4           3 4                             |
|                                                                             |
|                                                                             |
|532045t t  + 1114886t t  + 1503885t t  - 4151451t t                          |
|       0 4           1 4           2 4           3                           |
|                                                                             |
|                                                                             |
|4218913t t  - 229496t t  - 1516819t t  - 2986701t t                          |
|        0 4          1 4           2 4           3                           |
|                                                                             |
|                                                                             |
|2779068t t  - 3829406t t  + 2791987t t  + 1229602t                           |
|        0 4           1 4           2 4           3                          |
|                                                                             |
|                                                                             |
|  + 268844t t  - 1179881t t  - 1984252t t  + 85259t                          |
|4          1 4           2 4           3 4                                   |
|-----------------------------------------------------------------------------|
|          2                                                                  |
|+ 1558976t  - 3106890t t  - 1827455t t  + 4953911t t  + 3668093t t  - 3881277|
|          4           0 5           1 5           2 5           3 5          |
|                                                                             |
|         2                                                                   |
| 1500638t  - 176369t t  - 2192329t t  - 2325489t t  + 1182952t t  + 716259t t|
|         4          0 5           1 5           2 5           3 5          4 |
|                                                                             |
|          2                                                                  |
|- 2042755t  - 2218098t t  - 3795818t t  + 2809316t t  + 1031971t t  - 569887t|
|          4           0 5           1 5           2 5           3 5          |
|                                                                             |
|            2                                                                |
|t  - 177975t  - 81305t t  - 4300106t t  + 76999t t  + 1804125t t  + 2183565t |
| 4          4         0 5           1 5         2 5           3 5           4|
|                                                                             |
|         2                                                                   |
| 2760158t  - 2546350t t  + 2267342t t  + 3767051t t  - 1767935t t  - 4090037t|
|         4           0 5           1 5           2 5           3 5           |
|                                                                             |
|       2                                                                     |
|466259t  + 570919t t  + 4426686t t  - 248695t t  - 451433t t  + 4023298t t  +|
|       4          0 5           1 5          2 5          3 5           4 5  |
|                                                                             |
|            2                                                                |
|  - 2973500t  - 4218136t t  - 3804423t t  + 2726265t t  + 4523918t t  - 21032|
|4           4           0 5           1 5           2 5           3 5        |
|                                                                             |
|            2                                                                |
|  - 3352594t  - 4471899t t  - 2629530t t  + 676729t t  - 2338265t t  - 407830|
|4           4           0 5           1 5          2 5           3 5         |
|                                                                             |
|             2                                                               |
|t  + 4902870t  + 800952t t  - 3821621t t  - 868567t t  + 984931t t  + 974541t|
| 4           4          0 5           1 5          2 5          3 5          |
|                                                                             |
|2                                                                            |
|  - 989568t t  - 2303912t t  - 4074596t t  - 1741629t t  - 1251685t t  - 2195|
|4          0 5           1 5           2 5           3 5           4 5       |
|-----------------------------------------------------------------------------|
|               2                                                             |
|t t  + 2443307t  + 4514889t t  - 2074478t t  + 4328893t t  - 610448t t  - 276|
| 4 5           5           0 6           1 6           2 6          3 6      |
|                                                                             |
|            2                                                                |
|  + 2024145t  + 810232t t  - 4634403t t  - 1079647t t  - 4729356t t  - 262097|
|5           5          0 6           1 6           2 6           3 6         |
|                                                                             |
|             2                                                               |
| t  + 620121t  - 130126t t  - 3301437t t  - 2796797t t  - 2217084t t  + 36513|
|4 5          5          0 6           1 6           2 6           3 6        |
|                                                                             |
|             2                                                               |
|t  + 2762962t  - 1073345t t  + 2273000t t  - 1644197t t  - 880408t t  - 28905|
| 5           5           0 6           1 6           2 6          3 6        |
|                                                                             |
|              2                                                              |
| t  + 2006706t  - 972351t t  - 3883009t t  + 4831131t t  + 4438324t t  - 7567|
|4 5           5          0 6           1 6           2 6           3 6       |
|                                                                             |
|         2                                                                   |
| 1544133t  + 1234759t t  + 90290t t  - 2545586t t  - 1150739t t  - 1787777t t|
|         5           0 6         1 6           2 6           3 6           4 |
|                                                                             |
|                2                                                            |
|1t t  + 3766839t  + 1694279t t  + 2490538t t  + 758476t t  + 4575547t t  - 41|
|  4 5           5           0 6           1 6          2 6           3 6     |
|                                                                             |
|                2                                                            |
|8t t  + 3644505t  - 1738017t t  - 3885031t t  - 4740959t t  - 3459143t t  - 1|
|  4 5           5           0 6           1 6           2 6           3 6    |
|                                                                             |
|              2                                                              |
| t  - 4293434t  - 1633607t t  + 2030651t t  - 3564414t t  - 4859491t t  + 315|
|4 5           5           0 6           1 6           2 6           3 6      |
|                                                                             |
|    2                                                                        |
|520t  + 1090392t t  - 4221350t t  - 3633875t t  + 286385t t  - 4128258t t  - |
|    5           0 6           1 6           2 6          3 6           4 6   |
|-----------------------------------------------------------------------------|
|                                 2                                           |
|7549t t  - 3890948t t  + 1330950t ,                                          |
|     4 6           5 6           6                                           |
|                                                                             |
|                              2                                              |
|1t t  + 3524740t t  - 1796321t ,                                             |
|  4 6           5 6           6                                              |
|                                                                             |
|                               2                                             |
|58t t  - 4490638t t  - 4626378t ,                                            |
|   4 6           5 6           6                                             |
|                                                                             |
|                               2                                             |
|47t t  - 1618701t t  + 2885745t ,                                            |
|   4 6           5 6           6                                             |
|                                                                             |
|                               2                                             |
|86t t  + 4375859t t  - 1558913t ,                                            |
|   4 6           5 6           6                                             |
|                                                                             |
|                          2                                                  |
|  + 1802911t t  + 2332905t ,                                                 |
|6           5 6           6                                                  |
|                                                                             |
|                                  2                                          |
|06063t t  + 1864320t t  + 2128092t ,                                         |
|      4 6           5 6           6                                          |
|                                                                             |
|                                  2                                          |
|142348t t  - 2678247t t  + 517514t ,                                         |
|       4 6           5 6          6                                          |
|                                                                             |
|                               2                                             |
|3438t t  - 656219t t  + 399948t ,                                            |
|     4 6          5 6          6                                             |
|                                                                             |
|                      2                                                      |
|2812768t t  - 2652542t                                                       |
|        5 6           6                                                      |
+-----------------------------------------------------------------------------+

Ways to use parametrize :
=========================

  * "parametrize(Ideal)"
  * "parametrize(PolynomialRing)"
  * "parametrize(QuotientRing)"

For the programmer
==================

The object parametrize, is a method function (Macaulay2Doc).

point -- pick a random rational point on a projective variety
*************************************************************

Synopsis
========

  * Usage:
        point R
  * Inputs:
      * R, a ring (Macaulay2Doc), the homogeneous coordinate ring
        of a closed subscheme $X\subseteq\mathbb{P}^n$ over a finite ground
        field
  * Outputs:
      * an ideal (Macaulay2Doc), an ideal in R defining a point on
        $X$

Description
===========

This function is a variant of the randomKRationalPoint (Macaulay2Doc),
function, which has been further improved
and extended in the package MultiprojectiveVarieties (see
https://faculty.math.illinois.edu/Macaulay2/doc/Macaulay2/share/doc/Macaulay2/
MultiprojectiveVarieties/html/index.html ), see point(MultiprojectiveVariety)
(see https://faculty.math.illinois.edu/Macaulay2/doc/Macaulay2/share/doc/
Macaulay2/MultiprojectiveVarieties/html/_point_lp__Multiprojective__Variety_rp.
html ).

Below we verify the birationality of a rational map.

+-----------------------------------------------------------------------------+
|i1 : f = inverseMap specialQuadraticTransformation(9,ZZ/33331);              |
|                                                                             |
|o1 : RationalMap (cubic rational map from 8-dimensional subvariety of PP^11  |
|-----------------------------------------------------------------------------|
|to PP^8)                                                                     |
+-----------------------------------------------------------------------------+
|i2 : time p = point source f                                                 |
|     -- used 0.446639 seconds                                                |
|                                                                             |
|o2 = ideal (y   - 9235y  , y  + 11075y  , y  - 5847y  , y  + 7396y  , y  +   |
|             10        11   9         11   8        11   7        11   6     |
|     ------------------------------------------------------------------------|
|     13530y  , y  + 4359y  , y  - 2924y  , y  + 13040y  , y  + 6904y  , y  - |
|           11   5        11   4        11   3         11   2        11   1   |
|     ------------------------------------------------------------------------|
|     12227y  , y  - 5653y  )                                                 |
|           11   0        11                                                  |
|                                                                             |
|                                                             ZZ              |
|                                                           -----[y ..y  ]    |
|                                                           33331  0   11     |
|o2 : Ideal of ---------------------------------------------------------------|
|              (y y  - y y  + y y  , y y  - y y  + y y  , y y  - y y  + y y  ,|
|                6 7    5 8    4 11   3 7    2 8    1 11   3 5    2 6    0 11 |
|-----------------------------------------------------------------------------|
|----------------------------------------                                     |
| y y  - y y  + y y , y y  - y y  + y y )                                     |
|  3 4    1 6    0 8   2 4    1 5    0 7                                      |
+-----------------------------------------------------------------------------+
|i3 : time p == f^* f p                                                       |
|     -- used 0.317576 seconds                                                |
|                                                                             |
|o3 = true                                                                    |
+-----------------------------------------------------------------------------+

See also
========

  * randomKRationalPoint (Macaulay2Doc) -- Pick a
    random K rational point on the scheme X defined by I

Ways to use point :
===================

  * "point(PolynomialRing)"
  * "point(QuotientRing)"

For the programmer
==================

The object point, is a method function (Macaulay2Doc).

projectiveDegrees -- projective degrees of a rational map between projective varieties
**************************************************************************************

Synopsis
========

  * Usage:
        projectiveDegrees phi
  * Inputs:
      * phi, a ring map (Macaulay2Doc), which represents a
        rational map $\Phi$ between projective varieties
  * Optional inputs (Macaulay2Doc),:
      * BlowUpStrategy, => ..., default value
        "Eliminate", null
      * MathMode, => ..., default value false, whether to
        ensure correctness of output
      * NumDegrees, => ..., default value infinity, null
      * Verbose, => ...,
        default value true, null
  * Outputs:
      * a list (Macaulay2Doc), the list of the projective degrees
        of $\Phi$

Description
===========

Let $\phi:K[y_0,\ldots,y_m]/J \to K[x_0,\ldots,x_n]/I$ be a ring map
representing a rational map $\Phi: V(I) \subseteq
\mathbb{P}^n=Proj(K[x_0,\ldots,x_n]) \dashrightarrow V(J) \subseteq
\mathbb{P}^m=Proj(K[y_0,\ldots,y_m])$. The $i$-th projective degree of $\Phi$
is defined in terms of dimension and degree of the closure of $\Phi^{-1}(L)$,
where $L$ is a general linear subspace of $\mathbb{P}^m$ of a certain
dimension; for the precise definition, see Harris's book (Algebraic geometry: A
first course - Vol. 133 of Grad. Texts in Math., p. 240). If $\Phi$ is defined
by elements $F_0(x_0,\ldots,x_n),\ldots,F_m(x_0,\ldots,x_n)$ and $I_L$ denotes
the ideal of the subspace $L\subseteq \mathbb{P}^m$, then the ideal of the
closure of $\Phi^{-1}(L) $ is nothing but the saturation of the ideal
$(\phi(I_L))$ by $(F_0,....,F_m)$ in the ring $K[x_0,\ldots,x_n]/I$. So,
replacing in the definition, general linear subspace by random linear subspace,
we get a probabilistic algorithm to compute all projective degrees.
Furthermore, we can considerably speed up this algorithm by taking into account
two simple remarks: 1) the saturation $(\phi(I_L)):{(F_0,\ldots,F_m)}^{\infty}$
is the same as $(\phi(I_L)):{(\lambda_0 F_0+\cdots+\lambda_m F_m)}^{\infty}$,
where $\lambda_0,\ldots,\lambda_m\in\mathbb{K}$ are general scalars; 2) the
$i$-th projective degree of $\Phi$ coincides with the $(i-1)$-th projective
degree of the restriction of $\Phi$ to a general hyperplane section of $X$ (see
loc. cit.). This is what the method uses if MathMode, is set to
false. If instead MathMode, is set to true, then the method
simply computes the multidegree (Macaulay2Doc), of the
graph.

+-----------------------------------------------------------------------------+
|i1 : -- map from P^4 to G(1,3) given by the quadrics through a rational      |
|     GF(331^2)[t_0..t_4]; phi=toMap minors(2,matrix{{t_0..t_3},{t_1..t_4     |
|                                                                             |
|                                                    2                        |
|o2 = map (GF 109561[t ..t ], GF 109561[x ..x ], {- t  + t t , - t t  + t     |
|                     0   4              0   5       1    0 2     1 2         |
|                                                                             |
|o2 : RingMap GF 109561[t ..t ] <--- GF 109561[x ..x ]                        |
|                        0   4                  0   5                         |
|-----------------------------------------------------------------------------|
|normal curve of degree 4                                                     |
|}})                                                                          |
|                                                                             |
|        2                                          2                         |
| t , - t  + t t , - t t  + t t , - t t  + t t , - t  + t t , a})             |
|0 3     2    1 3     1 3    0 4     2 3    1 4     3    2 4                  |
+-----------------------------------------------------------------------------+
|i3 : time projectiveDegrees(phi,MathMode=>true)                              |
|MathMode: output certified!                                                  |
|     -- used 0.0377104 seconds                                               |
|                                                                             |
|o3 = {1, 2, 4, 4, 2}                                                         |
|                                                                             |
|o3 : List                                                                    |
+-----------------------------------------------------------------------------+
|i4 : psi=inverseMap(toMap(phi,Dominant=>infinity))                           |
|                                                                             |
|           GF 109561[x ..x ]                                                 |
|                      0   5                        2                         |
|o4 = map (------------------, GF 109561[t ..t ], {x  - x x  - x x , x x  -   |
|          x x  - x x  + x x              0   4     1    0 2    0 3   1 2     |
|           2 3    1 4    0 5                                                 |
|                                                                             |
|              GF 109561[x ..x ]                                              |
|                         0   5                                               |
|o4 : RingMap ------------------ <--- GF 109561[t ..t ]                       |
|             x x  - x x  + x x                  0   4                        |
|              2 3    1 4    0 5                                              |
|-----------------------------------------------------------------------------|
|       2                       2                                             |
|x x , x  - x x , x x  - x x , x  - x x  - x x , a})                          |
| 0 4   2    0 5   2 4    1 5   4    2 5    3 5                               |
+-----------------------------------------------------------------------------+
|i5 : time projectiveDegrees(psi,MathMode=>true)                              |
|MathMode: output certified!                                                  |
|     -- used 0.030976 seconds                                                |
|                                                                             |
|o5 = {2, 4, 4, 2, 1}                                                         |
|                                                                             |
|o5 : List                                                                    |
+-----------------------------------------------------------------------------+
+-----------------------------------------------------------------------------+
|i6 : -- Cremona transformation of P^6 defined by the quadrics through        |
|     phi = map specialCremonaTransformation(7,ZZ/300007)                     |
|                                                                             |
|            ZZ              ZZ                                               |
|o6 = map (------[x ..x ], ------[x ..x ], {x x  - x x , - 50341x x  -        |
|          300007  0   6   300007  0   6     2 4    1 5          0 4          |
|                                                                             |
|               ZZ                  ZZ                                        |
|o6 : RingMap ------[x ..x ] <--- ------[x ..x ]                              |
|             300007  0   6       300007  0   6                               |
|-----------------------------------------------------------------------------|
|a rational octic surface                                                     |
|                                                                             |
|                                                                             |
|                    2                                                        |
|113812x x  + 134072x  + 20472x x  + 123782x x  - 51108x x  + 124925x x  -    |
|       1 4          4         0 5          1 5         2 5          4 5      |
|-----------------------------------------------------------------------------|
|      2                                                                      |
|24689x  + 130567x x  + 29701x x  - 49318x x , x x  - x x , - 50341x x  -     |
|      5          3 6         4 6         5 6   2 3    0 5          1 3       |
|-----------------------------------------------------------------------------|
|                    2                                                        |
|113812x x  + 134072x  + 20472x x  + 123782x x  - 51108x x  + 124925x x  -    |
|       1 4          4         0 5          1 5         2 5          4 5      |
|-----------------------------------------------------------------------------|
|      2                                                                      |
|24689x  + 130567x x  + 29701x x  - 49318x x , 32881x x  - 85396x x  -        |
|      5          3 6         4 6         5 6        0 3         1 4          |
|-----------------------------------------------------------------------------|
|                  2                                                          |
|21242x x  - 32846x  - 114305x x  - 99802x x  + 74282x x  + 147078x x  +      |
|      3 4         4          0 5         1 5         2 5          3 5        |
|-----------------------------------------------------------------------------|
|                   2                                                         |
|110278x x  - 24441x  - 60401x x  - 104038x x  - 10704x x , - 50341x x  -     |
|       4 5         5         3 6          4 6         5 6          0 1       |
|-----------------------------------------------------------------------------|
|       2                                  2                                  |
|113812x  + 20472x x  + 123782x x  - 51108x  + 134072x x  + 124925x x  -      |
|       1         0 2          1 2         2          1 4          1 5        |
|-----------------------------------------------------------------------------|
|                                                       2          2          |
|24689x x  + 130567x x  + 29701x x  - 49318x x , 115212x  - 115763x  -        |
|      2 5          0 6         1 6         2 6         0          1          |
|-----------------------------------------------------------------------------|
|                              2                      2                       |
|72095x x  - 91989x x  - 28790x  + 72383x x  + 134072x  - 96548x x  +         |
|      0 2         1 2         2         1 4          4         0 5           |
|-----------------------------------------------------------------------------|
|                                            2                                |
|34797x x  - 128727x x  + 124925x x  - 24689x  - 15984x x  + 38578x x  -      |
|      1 5          2 5          4 5         5         0 6         1 6        |
|-----------------------------------------------------------------------------|
|128153x x  + 130567x x  + 29701x x  - 49318x x })                            |
|       2 6          3 6         4 6         5 6                              |
+-----------------------------------------------------------------------------+
|i7 : time projectiveDegrees phi                                              |
|     -- used 0.349198 seconds                                                |
|                                                                             |
|o7 = {1, 2, 4, 8, 8, 4, 1}                                                   |
|                                                                             |
|o7 : List                                                                    |
+-----------------------------------------------------------------------------+
|i8 : time projectiveDegrees(phi,NumDegrees=>1)                               |
|     -- used 0.0812298 seconds                                               |
|                                                                             |
|o8 = {4, 1}                                                                  |
|                                                                             |
|o8 : List                                                                    |
+-----------------------------------------------------------------------------+

Another way to use this method is by passing an integer i as second argument.
However, this is equivalent to first projectiveDegrees(phi,NumDegrees=>i) and
generally it is not faster.

See also
========

  * degrees(RationalMap) -- projective degrees
    of a rational map
  * degreeMap -- degree of a rational map between projective
    varieties
  * SegreClass -- Segre class of a closed subscheme of a
    projective variety

Ways to use projectiveDegrees :
===============================

  * "projectiveDegrees(RingMap)"
  * projectiveDegrees(RationalMap),
    -- projective degrees of a rational map

For the programmer
==================

The object projectiveDegrees, is a method function with options (Macaulay2Doc).

projectiveDegrees(RationalMap) -- projective degrees of a rational map
**********************************************************************

Synopsis
========

  * Function: projectiveDegrees,
  * Usage:
        projectiveDegrees Phi
  * Inputs:
      * Phi, a rational map,
  * Optional inputs (Macaulay2Doc),:
      * BlowUpStrategy, => ..., default value
        "Eliminate", null
      * MathMode, => ..., default value false, whether to
        ensure correctness of output
      * NumDegrees, => ..., default value infinity, null
      * Verbose, => ...,
        default value true, null
  * Outputs:
      * a list (Macaulay2Doc), the list of projective degrees of
        Phi

Description
===========

This computation is done through the corresponding method for ring maps. See
projectiveDegrees(RingMap), for more details and
examples.

See also
========

  * projectiveDegrees(RingMap) -- projective degrees
    of a rational map between projective varieties
  * degrees(RationalMap) -- projective degrees
    of a rational map
  * degree(RationalMap) -- degree of a rational
    map

Ways to use this method:
========================

  * projectiveDegrees(RationalMap),
    -- projective degrees of a rational map

quadroQuadricCremonaTransformation -- quadro-quadric Cremona transformations
****************************************************************************

Synopsis
========

  * Usage:
        quadroQuadricCremonaTransformation(n,i)
        quadroQuadricCremonaTransformation(n,i,K)
  * Inputs:
      * n, an integer (Macaulay2Doc), the dimension of the projective
        space
      * i, an integer (Macaulay2Doc), the i-th case in the
        classification for P^n (for instance, if n=5 then 1<=i<=39)
      * K, a ring (Macaulay2Doc), the ground field (optional, the
        default value is QQ (Macaulay2Doc))
  * Outputs:
      * a rational map, an example of quadro-quadric
        Cremona transformation over K, according to the classifications given
        in the paper Quadro-quadric Cremona transformations in low dimensions
        via the JC-correspondence (see
        https://aif.centre-mersenne.org/item/AIF_2014__64_1_71_0/ ), by Pirio
        and Russo.

Description
===========

+---------------------------------------------------------------+
|i1 : quadroQuadricCremonaTransformation(5,23)                  |
|                                                               |
|o1 = -- rational map --                                        |
|     source: Proj(QQ[x, y, z, t, u, v])                        |
|     target: Proj(QQ[x, y, z, t, u, v])                        |
|     defining forms: {                                         |
|                      x*y,                                     |
|                                                               |
|                       2                                       |
|                      x ,                                      |
|                                                               |
|                               2    2                          |
|                      - y*z + t  + u ,                         |
|                                                               |
|                      -x*t,                                    |
|                                                               |
|                      -x*u,                                    |
|                                                               |
|                      -x*v                                     |
|                     }                                         |
|                                                               |
|o1 : RationalMap (Cremona transformation of PP^5 of type (2,2))|
+---------------------------------------------------------------+
|i2 : describe oo                                               |
|                                                               |
|o2 = rational map defined by forms of degree 2                 |
|     source variety: PP^5                                      |
|     target variety: PP^5                                      |
|     dominance: true                                           |
|     birationality: true                                       |
|     projective degrees: {1, 2, 2, 2, 2, 1}                    |
|     number of minimal representatives: 1                      |
|     dimension base locus: 3                                   |
|     degree base locus: 2                                      |
|     coefficient ring: QQ                                      |
+---------------------------------------------------------------+

In addition, the four pairs (n,i)=(5,1),(8,1),(14,1),(26,1) correspond to the
four examples of special quadro-quadric Cremona transformations:

+------------------------------------------------------+
|i3 : describe quadroQuadricCremonaTransformation(5,1) |
|                                                      |
|o3 = rational map defined by forms of degree 2        |
|     source variety: PP^5                             |
|     target variety: PP^5                             |
|     dominance: true                                  |
|     birationality: true                              |
|     projective degrees: {1, 2, 4, 4, 2, 1}           |
|     number of minimal representatives: 1             |
|     dimension base locus: 2                          |
|     degree base locus: 4                             |
|     coefficient ring: QQ                             |
+------------------------------------------------------+
|i4 : describe quadroQuadricCremonaTransformation(8,1) |
|                                                      |
|o4 = rational map defined by forms of degree 2        |
|     source variety: PP^8                             |
|     target variety: PP^8                             |
|     dominance: true                                  |
|     birationality: true                              |
|     number of minimal representatives: 1             |
|     dimension base locus: 4                          |
|     degree base locus: 6                             |
|     coefficient ring: QQ                             |
+------------------------------------------------------+
|i5 : describe quadroQuadricCremonaTransformation(14,1)|
|                                                      |
|o5 = rational map defined by forms of degree 2        |
|     source variety: PP^14                            |
|     target variety: PP^14                            |
|     dominance: true                                  |
|     birationality: true                              |
|     number of minimal representatives: 1             |
|     dimension base locus: 8                          |
|     degree base locus: 14                            |
|     coefficient ring: QQ                             |
+------------------------------------------------------+
|i6 : describe quadroQuadricCremonaTransformation(26,1)|
|                                                      |
|o6 = rational map defined by forms of degree 2        |
|     source variety: PP^26                            |
|     target variety: PP^26                            |
|     dominance: true                                  |
|     birationality: true                              |
|     number of minimal representatives: 1             |
|     dimension base locus: 16                         |
|     degree base locus: 78                            |
|     coefficient ring: QQ                             |
+------------------------------------------------------+

See also
========

  * specialCremonaTransformation, --
    special Cremona transformations whose base locus has dimension at most
    three
  * specialQuadraticTransformation, --
    special quadratic transformations whose base locus has dimension three
  * specialCubicTransformation -- special
    cubic transformations whose base locus has dimension at most three

Ways to use quadroQuadricCremonaTransformation :
================================================

  * "quadroQuadricCremonaTransformation(Ring,ZZ,ZZ)"
  * "quadroQuadricCremonaTransformation(ZZ,ZZ)"
  * "quadroQuadricCremonaTransformation(ZZ,ZZ,Ring)"

For the programmer
==================

The object quadroQuadricCremonaTransformation,
is a method function (Macaulay2Doc).

RationalMap -- the class of all rational maps between absolutely irreducible projective varieties over a field
**************************************************************************************************************

Description
===========

An object of the class RationalMap can be basically replaced by a homogeneous
ring map of quotients of polynomial rings by homogeneous ideals. One main
advantage to using this class is that things computed using non-probabilistic
algorithms are stored internally (or partially stored).

The constructor for the class is rationalMap, which works
quite similar to toMap. See in particular the methods:
rationalMap(RingMap), rationalMap(Ideal,ZZ,ZZ),
see rationalMap(Tally),
and rationalMap(PolynomialRing,List).

In the package MultiprojectiveVarieties (see
https://faculty.math.illinois.edu/Macaulay2/doc/Macaulay2/share/doc/Macaulay2/
MultiprojectiveVarieties/html/index.html ), this class has been extended to
provide support to rational maps between multi-projective varieties, see
MultirationalMap (see https://faculty.math.illinois.edu/Macaulay2/doc/Macaulay2
/share/doc/Macaulay2/MultiprojectiveVarieties/html/___Multirational__Map.html
).

Functions and methods returning a rational map :
================================================

  * quadroQuadricCremonaTransformation
    -- quadro-quadric Cremona
    transformations
  * segre -- Segre embedding
  * specialCremonaTransformation, --
    special Cremona transformations whose base locus has dimension at most
    three
  * specialCubicTransformation -- special
    cubic transformations whose base locus has dimension at most three
  * specialQuadraticTransformation, --
    special quadratic transformations whose base locus has dimension three

Methods that use a rational map :
=================================

  * "abstractRationalMap(RationalMap)" -- see abstractRationalMap,
    -- make an abstract rational map
  * "approximateInverseMap(RationalMap)" -- see approximateInverseMap,
    -- random map related to the inverse of a birational
    map
  * "approximateInverseMap(RationalMap,ZZ)" -- see approximateInverseMap,
    -- random map related to the inverse of a birational
    map
  * coefficientRing(RationalMap), --
    coefficient ring of a rational map
  * coefficients(RationalMap), --
    coefficient matrix of a rational map
  * degree(RationalMap) -- degree of a rational
    map
  * degreeMap(RationalMap) -- degree of a
    rational map
  * degrees(RationalMap) -- projective degrees
    of a rational map
  * "multidegree(RationalMap)" -- see degrees(RationalMap),
    -- projective degrees of a rational map
  * describe(RationalMap) -- describe a
    rational map
  * entries(RationalMap) -- the entries of the
    matrix associated to a rational map
  * "exceptionalLocus(RationalMap)" -- see exceptionalLocus,
    -- exceptional locus of a birational map
  * flatten(RationalMap) -- write source and
    target as nondegenerate varieties
  * "forceImage(RationalMap,Ideal)" -- see forceImage, --
    declare which is the image of a rational map
  * "forceInverseMap(RationalMap,RationalMap)" -- see forceInverseMap,
    -- declare that two rational maps are one the inverse of
    the other
  * "graph(RationalMap)" -- see graph, -- closure of the graph of
    a rational map
  * ideal(RationalMap) -- base locus of a
    rational map
  * image(RationalMap,String), --
    closure of the image of a rational map using the F4 algorithm
    (experimental)
  * "image(RationalMap)" -- see image(RationalMap,ZZ),
    -- closure of the image of a rational map
  * image(RationalMap,ZZ) -- closure of the
    image of a rational map
  * inverse(RationalMap) -- inverse of a
    birational map
  * "inverse(RationalMap,Option)" -- see inverse(RationalMap),
    -- inverse of a birational map
  * "inverseMap(RationalMap)" -- see inverseMap, -- inverse
    of a birational map
  * "isBirational(RationalMap)" -- see isBirational, --
    whether a rational map is birational
  * "isDominant(RationalMap)" -- see isDominant, -- whether a
    rational map is dominant
  * isInverseMap(RationalMap,RationalMap)
    -- checks whether two rational
    maps are one the inverse of the other
  * isIsomorphism(RationalMap), --
    whether a birational map is an isomorphism
  * "isMorphism(RationalMap)" -- see isMorphism, -- whether a
    rational map is a morphism
  * map(RationalMap) -- get the ring map defining
    a rational map
  * "map(ZZ,RationalMap)" -- see map(RationalMap),
    -- get the ring map defining a rational map
  * matrix(RationalMap) -- the matrix
    associated to a rational map
  * "matrix(ZZ,RationalMap)" -- see matrix(RationalMap),
    -- the matrix associated to a rational map
  * projectiveDegrees(RationalMap),
    -- projective degrees of a rational map
  * RationalMap ! -- calculates every possible thing
  * "compose(RationalMap,RationalMap)" -- see RationalMap * RationalMap,
    -- composition of rational maps
  * RationalMap * RationalMap, --
    composition of rational maps
  * RationalMap ** Ring -- change the
    coefficient ring of a rational map
  * RationalMap == RationalMap -- equality
    of rational maps
  * "RationalMap == ZZ" -- see RationalMap == RationalMap,
    -- equality of rational maps
  * "ZZ == RationalMap" -- see RationalMap == RationalMap,
    -- equality of rational maps
  * RationalMap ^ ZZ -- power
  * "RationalMap ^*" -- see RationalMap ^** Ideal,
    -- inverse image via a rational map
  * RationalMap ^** Ideal -- inverse image
    via a rational map
  * RationalMap _* -- direct image via a rational
    map
  * "RationalMap Ideal" -- see RationalMap _*, --
    direct image via a rational map
  * RationalMap | Ideal -- restriction of a
    rational map
  * "RationalMap | Ring" -- see RationalMap | Ideal,
    -- restriction of a rational map
  * "RationalMap | RingElement" -- see RationalMap | Ideal,
    -- restriction of a rational map
  * RationalMap || Ideal -- restriction of a
    rational map
  * "RationalMap || Ring" -- see RationalMap || Ideal,
    -- restriction of a rational map
  * "RationalMap || RingElement" -- see RationalMap || Ideal,
    -- restriction of a rational map
  * "segre(RationalMap)" -- see segre, -- Segre embedding
  * "SegreClass(RationalMap)" -- see SegreClass, -- Segre
    class of a closed subscheme of a projective variety
  * source(RationalMap) -- coordinate ring of
    the source for a rational map
  * substitute(RationalMap,PolynomialRing,PolynomialRing),
    --
    substitute the ambient projective spaces of source and target
  * "rationalMap(RationalMap)" -- see super(RationalMap),
    -- get the rational map whose target is a
    projective space
  * super(RationalMap) -- get the rational map
    whose target is a projective space
  * target(RationalMap) -- coordinate ring of
    the target for a rational map
  * toExternalString(RationalMap), --
    convert to a readable string

For the programmer
==================

The object RationalMap, is a type (Macaulay2Doc),
with ancestor classes MutableHashTable (Macaulay2Doc),
< HashTable (Macaulay2Doc) <
Thing (Macaulay2Doc).

rationalMap -- makes a rational map
***********************************

Synopsis
========

  * Usage:
        rationalMap phi
        rationalMap F
  * Inputs:
      * a ring map (Macaulay2Doc), or a matrix (Macaulay2Doc),
        or a list (Macaulay2Doc), etc.
  * Optional inputs (Macaulay2Doc),:
      * Dominant, => ..., default value null, null
  * Outputs:
      * a rational map, the rational map represented by phi
        or by the ring map defined by F

Description
===========

This is the basic construction for a rational map. The
method is quite similar to toMap, except that it returns a
RationalMap, instead of a RingMap (Macaulay2Doc).

+---------------------------------------------------------------------+
|i1 : R := QQ[t_0..t_8]                                               |
|                                                                     |
|o1 = QQ[t ..t ]                                                      |
|         0   8                                                       |
|                                                                     |
|o1 : PolynomialRing                                                  |
+---------------------------------------------------------------------+
|i2 : F = matrix{{t_0*t_3*t_5, t_1*t_3*t_6, t_2*t_4*t_7, t_2*t_4*t_8}}|
|                                                                     |
|o2 = | t_0t_3t_5 t_1t_3t_6 t_2t_4t_7 t_2t_4t_8 |                     |
|                                                                     |
|                        1                  4                         |
|o2 : Matrix (QQ[t ..t ])  <--- (QQ[t ..t ])                          |
|                 0   8              0   8                            |
+---------------------------------------------------------------------+
|i3 : phi = toMap F                                                   |
|                                                                     |
|o3 = map (QQ[t ..t ], QQ[x ..x ], {t t t , t t t , t t t , t t t })  |
|              0   8       0   3     0 3 5   1 3 6   2 4 7   2 4 8    |
|                                                                     |
|o3 : RingMap QQ[t ..t ] <--- QQ[x ..x ]                              |
|                 0   8           0   3                               |
+---------------------------------------------------------------------+
|i4 : rationalMap phi                                                 |
|                                                                     |
|o4 = -- rational map --                                              |
|     source: Proj(QQ[t , t , t , t , t , t , t , t , t ])            |
|                      0   1   2   3   4   5   6   7   8              |
|     target: Proj(QQ[x , x , x , x ])                                |
|                      0   1   2   3                                  |
|     defining forms: {                                               |
|                      t t t ,                                        |
|                       0 3 5                                         |
|                                                                     |
|                      t t t ,                                        |
|                       1 3 6                                         |
|                                                                     |
|                      t t t ,                                        |
|                       2 4 7                                         |
|                                                                     |
|                      t t t                                          |
|                       2 4 8                                         |
|                     }                                               |
|                                                                     |
|o4 : RationalMap (cubic rational map from PP^8 to PP^3)              |
+---------------------------------------------------------------------+
|i5 : rationalMap F                                                   |
|                                                                     |
|o5 = -- rational map --                                              |
|     source: Proj(QQ[t , t , t , t , t , t , t , t , t ])            |
|                      0   1   2   3   4   5   6   7   8              |
|     target: Proj(QQ[x , x , x , x ])                                |
|                      0   1   2   3                                  |
|     defining forms: {                                               |
|                      t t t ,                                        |
|                       0 3 5                                         |
|                                                                     |
|                      t t t ,                                        |
|                       1 3 6                                         |
|                                                                     |
|                      t t t ,                                        |
|                       2 4 7                                         |
|                                                                     |
|                      t t t                                          |
|                       2 4 8                                         |
|                     }                                               |
|                                                                     |
|o5 : RationalMap (cubic rational map from PP^8 to PP^3)              |
+---------------------------------------------------------------------+

Multigraded rings are also permitted but in this case the method returns an
object of the class MultihomogeneousRationalMap, which can be considered as an
extension of the class RationalMap.

+-----------------------------------------------------------------------------+
|i6 : R' := newRing(R,Degrees=>{3:{1,0,0},2:{0,1,0},4:{0,0,1}})               |
|                                                                             |
|o6 = QQ[t ..t ]                                                              |
|         0   8                                                               |
|                                                                             |
|o6 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i7 : F' = sub(F,R')                                                          |
|                                                                             |
|o7 = | t_0t_3t_5 t_1t_3t_6 t_2t_4t_7 t_2t_4t_8 |                             |
|                                                                             |
|                        1                  4                                 |
|o7 : Matrix (QQ[t ..t ])  <--- (QQ[t ..t ])                                  |
|                 0   8              0   8                                    |
+-----------------------------------------------------------------------------+
|i8 : phi' = toMap F'                                                         |
|                                                                             |
|o8 = map (QQ[t ..t ], QQ[x ..x ], {t t t , t t t , t t t , t t t })          |
|              0   8       0   3     0 3 5   1 3 6   2 4 7   2 4 8            |
|                                                                             |
|o8 : RingMap QQ[t ..t ] <--- QQ[x ..x ]                                      |
|                 0   8           0   3                                       |
+-----------------------------------------------------------------------------+
|i9 : rationalMap phi'                                                        |
|                                                                             |
|o9 = -- rational map --                                                      |
|     source: Proj(QQ[t , t , t ]) x Proj(QQ[t , t ]) x Proj(QQ[t , t ,       |
|                      0   1   2              3   4              5   6        |
|     target: Proj(QQ[x , x , x , x ])                                        |
|                      0   1   2   3                                          |
|     defining forms: {                                                       |
|                      t t t ,                                                |
|                       0 3 5                                                 |
|                                                                             |
|                      t t t ,                                                |
|                       1 3 6                                                 |
|                                                                             |
|                      t t t ,                                                |
|                       2 4 7                                                 |
|                                                                             |
|                      t t t                                                  |
|                       2 4 8                                                 |
|                     }                                                       |
|                                                                             |
|o9 : MultihomogeneousRationalMap (rational map from PP^2 x PP^1 x PP^3       |
|-----------------------------------------------------------------------------|
|t , t ])                                                                     |
| 7   8                                                                       |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|to PP^3)                                                                     |
+-----------------------------------------------------------------------------+
|i10 : rationalMap F'                                                         |
|                                                                             |
|o10 = -- rational map --                                                     |
|      source: Proj(QQ[t , t , t ]) x Proj(QQ[t , t ]) x Proj(QQ[t , t ,      |
|                       0   1   2              3   4              5   6       |
|      target: Proj(QQ[x , x , x , x ])                                       |
|                       0   1   2   3                                         |
|      defining forms: {                                                      |
|                       t t t ,                                               |
|                        0 3 5                                                |
|                                                                             |
|                       t t t ,                                               |
|                        1 3 6                                                |
|                                                                             |
|                       t t t ,                                               |
|                        2 4 7                                                |
|                                                                             |
|                       t t t                                                 |
|                        2 4 8                                                |
|                      }                                                      |
|                                                                             |
|o10 : MultihomogeneousRationalMap (rational map from PP^2 x PP^1 x PP^3      |
|-----------------------------------------------------------------------------|
|t , t ])                                                                     |
| 7   8                                                                       |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|to PP^3)                                                                     |
+-----------------------------------------------------------------------------+

See also
========

  * toMap -- rational map defined by a linear system
  * rationalMap(Ideal) -- makes a
    rational map from an ideal
  * rationalMap(Tally) -- rational map
    defined by an effective divisor

Ways to use rationalMap :
=========================

  * "rationalMap(List)"
  * "rationalMap(Matrix)"
  * "rationalMap(Ring)"
  * "rationalMap(Ring,Ring)"
  * "rationalMap(Ring,Ring,List)"
  * "rationalMap(Ring,Ring,Matrix)"
  * "rationalMap(RingMap)"
  * "rationalMap(Ideal)" -- see rationalMap(Ideal,ZZ,ZZ),
    -- makes a rational map from an ideal
  * "rationalMap(Ideal,List)" -- see rationalMap(Ideal,ZZ,ZZ),
    -- makes a rational map from an ideal
  * "rationalMap(Ideal,ZZ)" -- see rationalMap(Ideal,ZZ,ZZ),
    -- makes a rational map from an ideal
  * rationalMap(Ideal,ZZ,ZZ) -- makes
    a rational map from an ideal
  * rationalMap(PolynomialRing,List)
    -- rational map defined by the
    linear system of hypersurfaces passing through random points with
    multiplicity
  * rationalMap(Ring,Tally) -- rational
    map defined by an effective divisor
  * "rationalMap(Tally)" -- see rationalMap(Ring,Tally),
    -- rational map defined by an effective
    divisor
  * "rationalMap(RationalMap)" -- see super(RationalMap),
    -- get the rational map whose target is a
    projective space

For the programmer
==================

The object rationalMap, is a method function with options (Macaulay2Doc).

RationalMap ! -- calculates every possible thing
************************************************

Synopsis
========

  * Operator: ! (Macaulay2Doc),
  * Usage:
        phi!
  * Inputs:
      * phi, a rational map,
  * Outputs:
      * a rational map, the same rational map phi

Description
===========

This method (mainly used for tests) applies almost all the deterministic
methods that are available.

+-----------------------------------------------------------------------------+
|i1 : QQ[x_0..x_5]; phi = rationalMap                                         |
|                                                                             |
|o2 : RationalMap (quadratic rational                                         |
|-----------------------------------------------------------------------------|
|{x_4^2-x_3*x_5,x_2*x_4-x_1*x_5,x_2*x_3-x_1*x_4,x_2^2-x_0*x_5,x_1*x_2-x_0*x_4,|
|                                                                             |
|map from PP^5 to PP^5)                                                       |
|-----------------------------------------------------------------------------|
|x_1^2-x_0*x_3};                                                              |
+-----------------------------------------------------------------------------+
|i3 : describe phi                                                            |
|                                                                             |
|o3 = rational map defined by forms of degree 2                               |
|     source variety: PP^5                                                    |
|     target variety: PP^5                                                    |
|     coefficient ring: QQ                                                    |
+-----------------------------------------------------------------------------+
|i4 : time phi! ;                                                             |
|     -- used 0.0994591 seconds                                               |
|                                                                             |
|o4 : RationalMap (Cremona transformation of PP^5 of type (2,2))              |
+-----------------------------------------------------------------------------+
|i5 : describe phi                                                            |
|                                                                             |
|o5 = rational map defined by forms of degree 2                               |
|     source variety: PP^5                                                    |
|     target variety: PP^5                                                    |
|     dominance: true                                                         |
|     birationality: true (the inverse map is already calculated)             |
|     projective degrees: {1, 2, 4, 4, 2, 1}                                  |
|     number of minimal representatives: 1                                    |
|     dimension base locus: 2                                                 |
|     degree base locus: 4                                                    |
|     coefficient ring: QQ                                                    |
+-----------------------------------------------------------------------------+
|i6 : QQ[x_0..x_4]; phi = rationalMap                                         |
|                                                                             |
|o7 : RationalMap (quadratic rational                                         |
|-----------------------------------------------------------------------------|
|{-x_1^2+x_0*x_2,-x_1*x_2+x_0*x_3,-x_2^2+x_1*x_3,-x_1*x_3+x_0*x_4,-x_2*x_3+x_1|
|                                                                             |
|map from PP^4 to PP^5)                                                       |
|-----------------------------------------------------------------------------|
|*x_4,-x_3^2+x_2*x_4};                                                        |
+-----------------------------------------------------------------------------+
|i8 : describe phi                                                            |
|                                                                             |
|o8 = rational map defined by forms of degree 2                               |
|     source variety: PP^4                                                    |
|     target variety: PP^5                                                    |
|     coefficient ring: QQ                                                    |
+-----------------------------------------------------------------------------+
|i9 : time phi! ;                                                             |
|     -- used 0.0581217 seconds                                               |
|                                                                             |
|o9 : RationalMap (quadratic rational map from PP^4 to PP^5)                  |
+-----------------------------------------------------------------------------+
|i10 : describe phi                                                           |
|                                                                             |
|o10 = rational map defined by forms of degree 2                              |
|      source variety: PP^4                                                   |
|      target variety: PP^5                                                   |
|      image: smooth quadric hypersurface in PP^5                             |
|      dominance: false                                                       |
|      birationality: false                                                   |
|      degree of map: 1                                                       |
|      projective degrees: {1, 2, 4, 4, 2}                                    |
|      number of minimal representatives: 1                                   |
|      dimension base locus: 1                                                |
|      degree base locus: 4                                                   |
|      coefficient ring: QQ                                                   |
+-----------------------------------------------------------------------------+

The command phi(*) does more or less the same thing but it uses probabilistic
methods and treats them as deterministic (the user should never use this).

+-----------------------------------------------------------------------------+
|i11 : phi = rationalMap rationalMap map specialQuadraticTransformation(8,ZZ/ |
|                                                                             |
|o11 : RationalMap (quadratic rational map from PP^8 to PP^11)                |
|-----------------------------------------------------------------------------|
|33331);                                                                      |
+-----------------------------------------------------------------------------+
|i12 : describe phi                                                           |
|                                                                             |
|o12 = rational map defined by forms of degree 2                              |
|      source variety: PP^8                                                   |
|      target variety: PP^11                                                  |
|      image: complete intersection of type (2,2,2) in PP^11                  |
|      dominance: false                                                       |
|      birationality: false                                                   |
|      degree of map: 1                                                       |
|      projective degrees: {1, 2, 4, 8, 16, 23, 23, 16, 8}                    |
|      number of minimal representatives: 1                                   |
|      dimension base locus: 3                                                |
|      degree base locus: 9                                                   |
|      coefficient ring: ZZ/33331                                             |
+-----------------------------------------------------------------------------+
|i13 : time phi(*) ;                                                          |
|     -- used 5.449e-6 seconds                                                |
|                                                                             |
|o13 : RationalMap (quadratic rational map from PP^8 to PP^11)                |
+-----------------------------------------------------------------------------+
|i14 : describe phi                                                           |
|                                                                             |
|o14 = rational map defined by forms of degree 2                              |
|      source variety: PP^8                                                   |
|      target variety: PP^11                                                  |
|      image: complete intersection of type (2,2,2) in PP^11                  |
|      dominance: false                                                       |
|      birationality: false                                                   |
|      degree of map: 1                                                       |
|      projective degrees: {1, 2, 4, 8, 16, 23, 23, 16, 8}                    |
|      number of minimal representatives: 1                                   |
|      dimension base locus: 3                                                |
|      degree base locus: 9                                                   |
|      coefficient ring: ZZ/33331                                             |
+-----------------------------------------------------------------------------+

See also
========

  * describe(RationalMap) -- describe a
    rational map

Ways to use this method:
========================

  * RationalMap ! -- calculates every possible thing

RationalMap * RationalMap -- composition of rational maps
*********************************************************

Synopsis
========

  * Operator: * (Macaulay2Doc),
  * Usage:
        phi * psi
        compose(phi,psi)
  * Inputs:
      * phi, a rational map, $X \dashrightarrow Y$
      * psi, a rational map, $Y \dashrightarrow Z$
  * Outputs:
      * a rational map, $X \dashrightarrow Z$, the
        composition of phi and psi

Description
===========

+-----------------------------------------------------------------------+
|i1 : R = QQ[x_0..x_3]; S = QQ[y_0..y_4]; T = QQ[z_0..z_4];             |
+-----------------------------------------------------------------------+
|i4 : phi = rationalMap(R,S,{x_0*x_2,x_0*x_3,x_1*x_2,x_1*x_3,x_2*x_3})  |
|                                                                       |
|o4 = -- rational map --                                                |
|     source: Proj(QQ[x , x , x , x ])                                  |
|                      0   1   2   3                                    |
|     target: Proj(QQ[y , y , y , y , y ])                              |
|                      0   1   2   3   4                                |
|     defining forms: {                                                 |
|                      x x ,                                            |
|                       0 2                                             |
|                                                                       |
|                      x x ,                                            |
|                       0 3                                             |
|                                                                       |
|                      x x ,                                            |
|                       1 2                                             |
|                                                                       |
|                      x x ,                                            |
|                       1 3                                             |
|                                                                       |
|                      x x                                              |
|                       2 3                                             |
|                     }                                                 |
|                                                                       |
|o4 : RationalMap (quadratic rational map from PP^3 to PP^4)            |
+-----------------------------------------------------------------------+
|i5 : psi = rationalMap(S,T,{y_0*y_3,-y_2*y_3,y_1*y_2,y_2*y_4,-y_3*y_4})|
|                                                                       |
|o5 = -- rational map --                                                |
|     source: Proj(QQ[y , y , y , y , y ])                              |
|                      0   1   2   3   4                                |
|     target: Proj(QQ[z , z , z , z , z ])                              |
|                      0   1   2   3   4                                |
|     defining forms: {                                                 |
|                      y y ,                                            |
|                       0 3                                             |
|                                                                       |
|                      -y y ,                                           |
|                        2 3                                            |
|                                                                       |
|                      y y ,                                            |
|                       1 2                                             |
|                                                                       |
|                      y y ,                                            |
|                       2 4                                             |
|                                                                       |
|                      -y y                                             |
|                        3 4                                            |
|                     }                                                 |
|                                                                       |
|o5 : RationalMap (quadratic rational map from PP^4 to PP^4)            |
+-----------------------------------------------------------------------+
|i6 : phi * psi                                                         |
|                                                                       |
|o6 = -- rational map --                                                |
|     source: Proj(QQ[x , x , x , x ])                                  |
|                      0   1   2   3                                    |
|     target: Proj(QQ[z , z , z , z , z ])                              |
|                      0   1   2   3   4                                |
|     defining forms: {                                                 |
|                      x ,                                              |
|                       0                                               |
|                                                                       |
|                      -x ,                                             |
|                        1                                              |
|                                                                       |
|                      x ,                                              |
|                       0                                               |
|                                                                       |
|                      x ,                                              |
|                       2                                               |
|                                                                       |
|                      -x                                               |
|                        3                                              |
|                     }                                                 |
|                                                                       |
|o6 : RationalMap (linear rational map from PP^3 to PP^4)               |
+-----------------------------------------------------------------------+
|i7 : (map phi) * (map psi)                                             |
|                                                                       |
|                             2                   2          2          |
|o7 = map (R, T, {x x x x , -x x x , x x x x , x x x , -x x x })        |
|                  0 1 2 3    1 2 3   0 1 2 3   1 2 3    1 2 3          |
|                                                                       |
|o7 : RingMap R <--- T                                                  |
+-----------------------------------------------------------------------+

See also
========

  * RingMap * RingMap (Macaulay2Doc) -- a binary operator, usually
    used for multiplication

Ways to use this method:
========================

  * RationalMap * RationalMap, --
    composition of rational maps

RationalMap ** Ring -- change the coefficient ring of a rational map
********************************************************************

Synopsis
========

  * Operator: ** (Macaulay2Doc),
  * Usage:
        phi ** K
  * Inputs:
      * phi, a rational map, defined over a coefficient
        ring F
      * K, a ring (Macaulay2Doc), the new coefficient ring (which
        must be a field)
  * Outputs:
      * a rational map, a rational map defined over K,
        obtained by coercing the coefficients of the forms defining phi into K

Description
===========

It is necessary that all forms in the old coefficient ring F can be
automatically coerced into the new coefficient ring K.

+-----------------------------------------------------------------------------+
|i1 : QQ[vars(0..5)]                                                          |
|                                                                             |
|o1 = QQ[a..f]                                                                |
|                                                                             |
|o1 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i2 : phi = rationalMap {e^2-d*f, c*e-b*f, c*d-b*e, c^2-a*f, b*c-a*e, b^2-a*d}|
|                                                                             |
|o2 = -- rational map --                                                      |
|     source: Proj(QQ[a, b, c, d, e, f])                                      |
|     target: Proj(QQ[a, b, c, d, e, f])                                      |
|     defining forms: {                                                       |
|                       2                                                     |
|                      e  - d*f,                                              |
|                                                                             |
|                      c*e - b*f,                                             |
|                                                                             |
|                      c*d - b*e,                                             |
|                                                                             |
|                       2                                                     |
|                      c  - a*f,                                              |
|                                                                             |
|                      b*c - a*e,                                             |
|                                                                             |
|                       2                                                     |
|                      b  - a*d                                               |
|                     }                                                       |
|                                                                             |
|o2 : RationalMap (quadratic rational map from PP^5 to PP^5)                  |
+-----------------------------------------------------------------------------+
|i3 : K = ZZ/65521;                                                           |
+-----------------------------------------------------------------------------+
|i4 : phi ** K                                                                |
|                                                                             |
|o4 = -- rational map --                                                      |
|     source: Proj(K[a, b, c, d, e, f])                                       |
|     target: Proj(K[a, b, c, d, e, f])                                       |
|     defining forms: {                                                       |
|                       2                                                     |
|                      e  - d*f,                                              |
|                                                                             |
|                      c*e - b*f,                                             |
|                                                                             |
|                      c*d - b*e,                                             |
|                                                                             |
|                       2                                                     |
|                      c  - a*f,                                              |
|                                                                             |
|                      b*c - a*e,                                             |
|                                                                             |
|                       2                                                     |
|                      b  - a*d                                               |
|                     }                                                       |
|                                                                             |
|o4 : RationalMap (quadratic rational map from PP^5 to PP^5)                  |
+-----------------------------------------------------------------------------+
|i5 : phi ** frac(K[t])                                                       |
|                                                                             |
|o5 = -- rational map --                                                      |
|     source: Proj(frac(K[t])[a, b, c, d, e, f])                              |
|     target: Proj(frac(K[t])[a, b, c, d, e, f])                              |
|     defining forms: {                                                       |
|                       2                                                     |
|                      e  - d*f,                                              |
|                                                                             |
|                      c*e - b*f,                                             |
|                                                                             |
|                      c*d - b*e,                                             |
|                                                                             |
|                       2                                                     |
|                      c  - a*f,                                              |
|                                                                             |
|                      b*c - a*e,                                             |
|                                                                             |
|                       2                                                     |
|                      b  - a*d                                               |
|                     }                                                       |
|                                                                             |
|o5 : RationalMap (quadratic rational map from PP^5 to PP^5)                  |
+-----------------------------------------------------------------------------+

See also
========

  * coefficientRing(RationalMap), --
    coefficient ring of a rational map

Ways to use this method:
========================

  * RationalMap ** Ring -- change the
    coefficient ring of a rational map

RationalMap == RationalMap -- equality of rational maps
*******************************************************

Synopsis
========

  * Operator: == (Macaulay2Doc),
  * Usage:
        phi == psi
  * Inputs:
      * phi, a rational map,
      * psi, a rational map,
  * Outputs:
      * a Boolean value (Macaulay2Doc),  whether phi and psi are
        the same rational map

Description
===========

+-----------------------------------------------------------------------------+
|i1 : QQ[x_0..x_5]                                                            |
|                                                                             |
|o1 = QQ[x ..x ]                                                              |
|         0   5                                                               |
|                                                                             |
|o1 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i2 : phi = rationalMap {x_0*x_4^2-x_0*x_3*x_5,x_0*x_2*x_4-x_0*x_1*x_5,x_0*x_2|
|                                                                             |
|o2 = -- rational map --                                                      |
|     source: Proj(QQ[x , x , x , x , x , x ])                                |
|                      0   1   2   3   4   5                                  |
|     target: Proj(QQ[x , x , x , x , x , x ])                                |
|                      0   1   2   3   4   5                                  |
|     defining forms: {                                                       |
|                         2                                                   |
|                      x x  - x x x ,                                         |
|                       0 4    0 3 5                                          |
|                                                                             |
|                      x x x  - x x x ,                                       |
|                       0 2 4    0 1 5                                        |
|                                                                             |
|                      x x x  - x x x ,                                       |
|                       0 2 3    0 1 4                                        |
|                                                                             |
|                         2    2                                              |
|                      x x  - x x ,                                           |
|                       0 2    0 5                                            |
|                                                                             |
|                                2                                            |
|                      x x x  - x x ,                                         |
|                       0 1 2    0 4                                          |
|                                                                             |
|                         2    2                                              |
|                      x x  - x x                                             |
|                       0 1    0 3                                            |
|                     }                                                       |
|                                                                             |
|o2 : RationalMap (cubic rational map from PP^5 to PP^5)                      |
|-----------------------------------------------------------------------------|
|*x_3-x_0*x_1*x_4,x_0*x_2^2-x_0^2*x_5,x_0*x_1*x_2-x_0^2*x_4,x_0*x_1^2-x_0^2*x_|
|-----------------------------------------------------------------------------|
|3}                                                                           |
+-----------------------------------------------------------------------------+
|i3 : psi = rationalMap {x_4^2-x_3*x_5,x_2*x_4-x_1*x_5,x_2*x_3-x_1*x_4,x_2^2-x|
|                                                                             |
|o3 = -- rational map --                                                      |
|     source: Proj(QQ[x , x , x , x , x , x ])                                |
|                      0   1   2   3   4   5                                  |
|     target: Proj(QQ[x , x , x , x , x , x ])                                |
|                      0   1   2   3   4   5                                  |
|     defining forms: {                                                       |
|                       2                                                     |
|                      x  - x x ,                                             |
|                       4    3 5                                              |
|                                                                             |
|                      x x  - x x ,                                           |
|                       2 4    1 5                                            |
|                                                                             |
|                      x x  - x x ,                                           |
|                       2 3    1 4                                            |
|                                                                             |
|                       2                                                     |
|                      x  - x x ,                                             |
|                       2    0 5                                              |
|                                                                             |
|                      x x  - x x ,                                           |
|                       1 2    0 4                                            |
|                                                                             |
|                       2                                                     |
|                      x  - x x                                               |
|                       1    0 3                                              |
|                     }                                                       |
|                                                                             |
|o3 : RationalMap (quadratic rational map from PP^5 to PP^5)                  |
|-----------------------------------------------------------------------------|
|_0*x_5,x_1*x_2-x_0*x_4,x_1^2-x_0*x_3}                                        |
+-----------------------------------------------------------------------------+
|i4 : phi == psi                                                              |
|                                                                             |
|o4 = true                                                                    |
+-----------------------------------------------------------------------------+

Ways to use this method:
========================

  * RationalMap == RationalMap -- equality
    of rational maps
  * "RationalMap == ZZ"
  * "ZZ == RationalMap"

RationalMap ^ ZZ -- power
*************************

Synopsis
========

  * Operator: ^ (Macaulay2Doc),
  * Usage:
        phi^n
  * Inputs:
      * phi, a rational map,
      * n, an integer (Macaulay2Doc),
  * Outputs:
      * a rational map, phi^n

Description
===========

If the map is birational, then negative values may be used and the inverse will
be computed using inverse,(phi).

Ways to use this method:
========================

  * RationalMap ^ ZZ -- power

RationalMap ^** Ideal -- inverse image via a rational map
*********************************************************

Synopsis
========

  * Operator: ^** (Macaulay2Doc),
  * Usage:
        phi^** I
  * Inputs:
      * phi, a rational map,
      * I, an ideal (Macaulay2Doc), a homogeneus ideal in the
        coordinate ring of the target of phi
  * Outputs:
      * an ideal (Macaulay2Doc), the ideal of the closure of the
        inverse image of V(I) via phi

Description
===========

In most cases this is equivalent to phi^* I, which is faster but may not take
into account other representations of the map.

In the example below, we apply the method to check the birationality of a map
(deterministically).

+-----------------------------------------------------------------------------+
|i1 : phi = quadroQuadricCremonaTransformation(5,1)                           |
|                                                                             |
|o1 = -- rational map --                                                      |
|     source: Proj(QQ[x, y, z, t, u, v])                                      |
|     target: Proj(QQ[x, y, z, t, u, v])                                      |
|     defining forms: {                                                       |
|                             2                                               |
|                      y*z - v ,                                              |
|                                                                             |
|                             2                                               |
|                      x*z - u ,                                              |
|                                                                             |
|                             2                                               |
|                      x*y - t ,                                              |
|                                                                             |
|                      - z*t + u*v,                                           |
|                                                                             |
|                      - y*u + t*v,                                           |
|                                                                             |
|                      t*u - x*v                                              |
|                     }                                                       |
|                                                                             |
|o1 : RationalMap (Cremona transformation of PP^5 of type (2,2))              |
+-----------------------------------------------------------------------------+
|i2 : K := frac(QQ[vars(0..5)]); phi = phi ** K                               |
|                                                                             |
|o3 = -- rational map --                                                      |
|     source: Proj(frac(QQ[a..f])[x, y, z, t, u, v])                          |
|     target: Proj(frac(QQ[a..f])[x, y, z, t, u, v])                          |
|     defining forms: {                                                       |
|                             2                                               |
|                      y*z - v ,                                              |
|                                                                             |
|                             2                                               |
|                      x*z - u ,                                              |
|                                                                             |
|                             2                                               |
|                      x*y - t ,                                              |
|                                                                             |
|                      - z*t + u*v,                                           |
|                                                                             |
|                      - y*u + t*v,                                           |
|                                                                             |
|                      t*u - x*v                                              |
|                     }                                                       |
|                                                                             |
|o3 : RationalMap (quadratic rational map from PP^5 to PP^5)                  |
+-----------------------------------------------------------------------------+
|i4 : p = trim minors(2,(vars K)||(vars source phi))                          |
|                                                                             |
|                -e        -d        -c        -b        -a                   |
|o4 = ideal (u + --*v, t + --*v, z + --*v, y + --*v, x + --*v)                |
|                 f         f         f         f         f                   |
|                                                                             |
|o4 : Ideal of frac(QQ[a..f])[x, y, z, t, u, v]                               |
+-----------------------------------------------------------------------------+
|i5 : q = phi p                                                               |
|                                                                             |
|                                                           2                 |
|                b*e - d*f        c*d - e*f        - a*b + d                  |
|o5 = ideal (u + ---------*v, t + ---------*v, z + ----------*v, y +          |
|                d*e - a*f        d*e - a*f         d*e - a*f                 |
|     ------------------------------------------------------------------------|
|              2                 2                                            |
|     - a*c + e         - b*c + f                                             |
|     ----------*v, x + ----------*v)                                         |
|      d*e - a*f         d*e - a*f                                            |
|                                                                             |
|o5 : Ideal of frac(QQ[a..f])[x, y, z, t, u, v]                               |
+-----------------------------------------------------------------------------+
|i6 : time phi^** q                                                           |
|     -- used 0.664642 seconds                                                |
|                                                                             |
|                -e        -d        -c        -b        -a                   |
|o6 = ideal (u + --*v, t + --*v, z + --*v, y + --*v, x + --*v)                |
|                 f         f         f         f         f                   |
|                                                                             |
|o6 : Ideal of frac(QQ[a..f])[x, y, z, t, u, v]                               |
+-----------------------------------------------------------------------------+
|i7 : oo == p                                                                 |
|                                                                             |
|o7 = true                                                                    |
+-----------------------------------------------------------------------------+

See also
========

  * RationalMap _* -- direct image via a rational
    map
  * RationalMap ** Ring -- change the
    coefficient ring of a rational map
  * target(RationalMap) -- coordinate ring of
    the target for a rational map

Ways to use this method:
========================

  * RationalMap ^** Ideal -- inverse image
    via a rational map

RationalMap _* -- direct image via a rational map
*************************************************

Synopsis
========

  * Operator: _* (Macaulay2Doc),
  * Usage:
        phi_* I
  * Inputs:
      * phi, a rational map, I a homogeneus ideal in the
        coordinate ring of the source of phi
  * Outputs:
      * an ideal (Macaulay2Doc), the ideal of the closure of the
        direct image of V(I) via phi

Description
===========

In most cases this is equivalent to phi I, which is faster but may not take
into account other representations of the map.

See also
========

  * RationalMap ^** Ideal -- inverse image
    via a rational map
  * source(RationalMap) -- coordinate ring of
    the source for a rational map

Ways to use this method:
========================

  * RationalMap _* -- direct image via a rational
    map

RationalMap | Ideal -- restriction of a rational map
****************************************************

Synopsis
========

  * Operator: | (Macaulay2Doc),
  * Usage:
        Phi | I
  * Inputs:
      * Phi, a rational map, $\phi:X \dashrightarrow Y$
      * I, an ideal (Macaulay2Doc), a homogeneous ideal of a
        subvariety $Z\subset X$
  * Outputs:
      * a rational map, the restriction of $\phi$ to $Z$,
        $\phi|_{Z}: Z \dashrightarrow Y$

Description
===========

+-----------------------------------------------------------------------------+
|i1 : P5 = ZZ/190181[x_0..x_5]                                                |
|                                                                             |
|o1 = P5                                                                      |
|                                                                             |
|o1 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i2 : Phi = rationalMap {x_4^2-x_3*x_5,x_2*x_4-x_1*x_5,x_2*x_3-x_1*x_4,x_2^2-x|
|                                                                             |
|o2 = -- rational map --                                                      |
|                    ZZ                                                       |
|     source: Proj(------[x , x , x , x , x , x ])                            |
|                  190181  0   1   2   3   4   5                              |
|                    ZZ                                                       |
|     target: Proj(------[x , x , x , x , x , x ])                            |
|                  190181  0   1   2   3   4   5                              |
|     defining forms: {                                                       |
|                       2                                                     |
|                      x  - x x ,                                             |
|                       4    3 5                                              |
|                                                                             |
|                      x x  - x x ,                                           |
|                       2 4    1 5                                            |
|                                                                             |
|                      x x  - x x ,                                           |
|                       2 3    1 4                                            |
|                                                                             |
|                       2                                                     |
|                      x  - x x ,                                             |
|                       2    0 5                                              |
|                                                                             |
|                      x x  - x x ,                                           |
|                       1 2    0 4                                            |
|                                                                             |
|                       2                                                     |
|                      x  - x x                                               |
|                       1    0 3                                              |
|                     }                                                       |
|                                                                             |
|o2 : RationalMap (quadratic rational map from PP^5 to PP^5)                  |
|-----------------------------------------------------------------------------|
|_0*x_5,x_1*x_2-x_0*x_4,x_1^2-x_0*x_3}                                        |
+-----------------------------------------------------------------------------+
|i3 : I = ideal(random(2,P5),random(3,P5));                                   |
|                                                                             |
|o3 : Ideal of P5                                                             |
+-----------------------------------------------------------------------------+
|i4 : Phi' = Phi|I                                                            |
|                                                                             |
|o4 = -- rational map --                                                      |
|                                  ZZ                                         |
|     source: subvariety of Proj(------[x , x , x , x , x , x ]) defined by   |
|                                190181  0   1   2   3   4   5                |
|             {                                                               |
|               2                     2                                 2     |
|              x  + 16566x x  - 47468x  - 70158x x  + 90626x x  - 24212x  -   |
|               0         0 1         1         0 2         1 2         2     |
|                                                                             |
|                 2         3                       2            2            |
|              x x  - 51610x  - 80517x x x  + 21123x x  - 3492x x  + 85424x   |
|               0 1         1         0 1 2         1 2        0 2         1  |
|             }                                                               |
|                    ZZ                                                       |
|     target: Proj(------[x , x , x , x , x , x ])                            |
|                  190181  0   1   2   3   4   5                              |
|     defining forms: {                                                       |
|                       2                                                     |
|                      x  - x x ,                                             |
|                       4    3 5                                              |
|                                                                             |
|                      x x  - x x ,                                           |
|                       2 4    1 5                                            |
|                                                                             |
|                      x x  - x x ,                                           |
|                       2 3    1 4                                            |
|                                                                             |
|                       2                                                     |
|                      x  - x x ,                                             |
|                       2    0 5                                              |
|                                                                             |
|                      x x  - x x ,                                           |
|                       1 2    0 4                                            |
|                                                                             |
|                       2                                                     |
|                      x  - x x                                               |
|                       1    0 3                                              |
|                     }                                                       |
|                                                                             |
|o4 : RationalMap (quadratic rational map from threefold in PP^5 to PP^5)     |
|-----------------------------------------------------------------------------|
|                                        2                                    |
|38148x x  - 31779x x  + 19605x x  - 769x  - 77864x x  + 10660x x  +          |
|      0 3         1 3         2 3       3         0 4         1 4            |
|                                                                             |
| 2        3                       2                                          |
|x  + 3605x  + 12124x x x  - 30548x x  - 57743x x x  - 12590x x x  -          |
| 2        2         0 1 3         1 3         0 2 3         1 2 3            |
|-----------------------------------------------------------------------------|
|                             2                                               |
|7410x x  - 66565x x  - 49192x  - 71321x x  + 18433x x  - 46460x x  +         |
|     2 4         3 4         4         0 5         1 5         2 5           |
|                                                                             |
|      2             2           2           2         3                      |
|19357x x  - 25505x x  + 11508x x  + 35026x x  - 79088x  + 26615x x x         |
|      2 3         0 3         1 3         2 3         3         0 1 4        |
|-----------------------------------------------------------------------------|
|                             2                                               |
|4698x x  - 76890x x  - 55574x ,                                              |
|     3 5         4 5         5                                               |
|                                                                             |
|         2                                     2                             |
| - 10036x x  + 39457x x x  + 879x x x  + 78560x x  + 83997x x x  -           |
|         1 4         0 2 4       1 2 4         2 4         0 3 4             |
|-----------------------------------------------------------------------------|
|                                  2             2           2           2    |
|42552x x x  + 69752x x x  - 78713x x  + 52698x x  - 46597x x  - 42666x x  +  |
|      1 3 4         2 3 4         3 4         0 4         1 4         2 4    |
|-----------------------------------------------------------------------------|
|        2         3                       2                                  |
|34140x x  - 29206x  - 88405x x x  - 15770x x  + 18059x x x  - 14362x x x  +  |
|      3 4         4         0 1 5         1 5         0 2 5         1 2 5    |
|-----------------------------------------------------------------------------|
|      2                                                     2                |
|87935x x  + 67371x x x  - 60584x x x  - 81481x x x  - 61286x x  + 63878x x x |
|      2 5         0 3 5         1 3 5         2 3 5         3 5         0 4 5|
|-----------------------------------------------------------------------------|
|                                                  2             2           2|
|- 33047x x x  + 53673x x x  + 88603x x x  - 71230x x  - 45859x x  + 10167x x |
|        1 4 5         2 4 5         3 4 5         4 5         0 5         1 5|
|-----------------------------------------------------------------------------|
|         2           2          2         3                                  |
|+ 8993x x  - 77222x x  - 4109x x  - 16028x                                   |
|       2 5         3 5        4 5         5                                  |
+-----------------------------------------------------------------------------+
|i5 : describe Phi                                                            |
|                                                                             |
|o5 = rational map defined by forms of degree 2                               |
|     source variety: PP^5                                                    |
|     target variety: PP^5                                                    |
|     coefficient ring: ZZ/190181                                             |
+-----------------------------------------------------------------------------+
|i6 : describe Phi'                                                           |
|                                                                             |
|o6 = rational map defined by forms of degree 2                               |
|     source variety: complete intersection of type (2,3) in PP^5             |
|     target variety: PP^5                                                    |
|     coefficient ring: ZZ/190181                                             |
+-----------------------------------------------------------------------------+

See also
========

  * RationalMap || Ideal -- restriction of a
    rational map

Ways to use this method:
========================

  * RationalMap | Ideal -- restriction of a
    rational map
  * "RationalMap | Ring"
  * "RationalMap | RingElement"

RationalMap || Ideal -- restriction of a rational map
*****************************************************

Synopsis
========

  * Operator: || (Macaulay2Doc),
  * Usage:
        Phi || J
  * Inputs:
      * Phi, a rational map, $\phi:X \dashrightarrow Y$
      * J, an ideal (Macaulay2Doc), a homogeneous ideal of a
        subvariety $Z\subset Y$
  * Outputs:
      * a rational map, the restriction of $\phi$ to
        ${\phi}^{(-1)} Z$, ${{\phi}|}_{{\phi}^{(-1)} Z}: {\phi}^{(-1)} Z
        \dashrightarrow Z$

Description
===========

+-----------------------------------------------------------------------------+
|i1 : P5 = ZZ/190181[x_0..x_5]                                                |
|                                                                             |
|o1 = P5                                                                      |
|                                                                             |
|o1 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i2 : Phi = rationalMap {x_4^2-x_3*x_5,x_2*x_4-x_1*x_5,x_2*x_3-x_1*x_4,x_2^2-x|
|                                                                             |
|o2 = -- rational map --                                                      |
|                    ZZ                                                       |
|     source: Proj(------[x , x , x , x , x , x ])                            |
|                  190181  0   1   2   3   4   5                              |
|                    ZZ                                                       |
|     target: Proj(------[x , x , x , x , x , x ])                            |
|                  190181  0   1   2   3   4   5                              |
|     defining forms: {                                                       |
|                       2                                                     |
|                      x  - x x ,                                             |
|                       4    3 5                                              |
|                                                                             |
|                      x x  - x x ,                                           |
|                       2 4    1 5                                            |
|                                                                             |
|                      x x  - x x ,                                           |
|                       2 3    1 4                                            |
|                                                                             |
|                       2                                                     |
|                      x  - x x ,                                             |
|                       2    0 5                                              |
|                                                                             |
|                      x x  - x x ,                                           |
|                       1 2    0 4                                            |
|                                                                             |
|                       2                                                     |
|                      x  - x x                                               |
|                       1    0 3                                              |
|                     }                                                       |
|                                                                             |
|o2 : RationalMap (quadratic rational map from PP^5 to PP^5)                  |
|-----------------------------------------------------------------------------|
|_0*x_5,x_1*x_2-x_0*x_4,x_1^2-x_0*x_3}                                        |
+-----------------------------------------------------------------------------+
|i3 : J = ideal random(1,P5);                                                 |
|                                                                             |
|o3 : Ideal of P5                                                             |
+-----------------------------------------------------------------------------+
|i4 : Phi' = Phi||J                                                           |
|                                                                             |
|o4 = -- rational map --                                                      |
|                                  ZZ                                         |
|     source: subvariety of Proj(------[x , x                                 |
|                                190181  0   1                                |
|             {                                                               |
|               2                    2                                        |
|              x  + 9702x x  - 94294x  - x x                                  |
|               1        1 2         2    0 3                                 |
|             }                                                               |
|                                  ZZ                                         |
|     target: subvariety of Proj(------[x , x                                 |
|                                190181  0   1                                |
|             {                                                               |
|              x  + 16566x  - 70158x  - 38148x                                |
|               0         1         2                                         |
|             }                                                               |
|     defining forms: {                                                       |
|                       2                                                     |
|                      x  - x x ,                                             |
|                       4    3 5                                              |
|                                                                             |
|                      x x  - x x ,                                           |
|                       2 4    1 5                                            |
|                                                                             |
|                      x x  - x x ,                                           |
|                       2 3    1 4                                            |
|                                                                             |
|                       2                                                     |
|                      x  - x x ,                                             |
|                       2    0 5                                              |
|                                                                             |
|                      x x  - x x ,                                           |
|                       1 2    0 4                                            |
|                                                                             |
|                                         2                                   |
|                      - 9702x x  + 94294x  -                                 |
|                             1 2         2                                   |
|                     }                                                       |
|                                                                             |
|o4 : RationalMap (quadratic rational map from                                |
|-----------------------------------------------------------------------------|
|, x , x , x , x ]) defined by                                                |
|   2   3   4   5                                                             |
|                                                                             |
|                                                       2                     |
|+ 68094x x  - 9702x x  - 68094x x  + 93593x x  - 53251x  + 94294x x          |
|        2 3        0 4         1 4         2 4         4         0 5         |
|                                                                             |
|                                                                             |
|, x , x , x , x ]) defined by                                                |
|   2   3   4   5                                                             |
|                                                                             |
|  - 77864x  - 71321x                                                         |
|3         4         5                                                        |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                     2                       |
|68094x x  + 9702x x  + 68094x x  - 93593x x  + 53251x  - 94294x x  +         |
|      2 3        0 4         1 4         2 4         4         0 5           |
|                                                                             |
|                                                                             |
| hypersurface in PP^5 to hypersurface in PP^5)                               |
|-----------------------------------------------------------------------------|
|- 93593x x  + 53251x x                                                       |
|        1 5         3 5                                                      |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|93593x x  - 53251x x                                                         |
|      1 5         3 5                                                        |
+-----------------------------------------------------------------------------+
|i5 : describe Phi                                                            |
|                                                                             |
|o5 = rational map defined by forms of degree 2                               |
|     source variety: PP^5                                                    |
|     target variety: PP^5                                                    |
|     coefficient ring: ZZ/190181                                             |
+-----------------------------------------------------------------------------+
|i6 : describe Phi'                                                           |
|                                                                             |
|o6 = rational map defined by forms of degree 2                               |
|     source variety: smooth quadric hypersurface in PP^5                     |
|     target variety: hyperplane in PP^5                                      |
|     coefficient ring: ZZ/190181                                             |
+-----------------------------------------------------------------------------+

See also
========

  * RationalMap | Ideal -- restriction of a
    rational map

Ways to use this method:
========================

  * RationalMap || Ideal -- restriction of a
    rational map
  * "RationalMap || Ring"
  * "RationalMap || RingElement"

rationalMap(Ideal,ZZ,ZZ) -- makes a rational map from an ideal
**************************************************************

Synopsis
========

  * Function: rationalMap,
  * Usage:
        rationalMap(I,d,e)
        rationalMap(I,d)
        rationalMap I
  * Inputs:
      * I, an ideal (Macaulay2Doc), a homogeneous ideal in the
        coordinate ring of a projective variety $X\subseteq\mathbb{P}^n$
      * d, an integer (Macaulay2Doc), a positive integer (or a
        list (Macaulay2Doc), of integers in the case $X$ is embedded in a
        product of projective spaces)
      * e, an integer (Macaulay2Doc), a positive integer (if omitted,
        it is taken to be 1)
  * Optional inputs (Macaulay2Doc),:
      * Dominant, => ..., default value null, null
  * Outputs:
      * a rational map, the rational map $X\dashrightarrow
        \mathbb{P}^m$ defined by the linear system of hypersurfaces of degree
        $d$ having points of multiplicity $e$ along the projective subscheme of
        $X$ defined by $I$.

Description
===========

In most cases, the command rationalMap(I,d,e) yields the same output as
rationalMap(saturate(I^e),d), but the former is implemented using pure linear
algebra.

The command rationalMap I is basically equivalent to rationalMap(I,max degrees
I).

In the following example, we calculate the rational map defined by the linear
system of cubic hypersurfaces in $\mathbb{P}^6$ having double points along a
Veronese surface $V\subset\mathbb{P}^5\subset\mathbb{P}^6$.

+-----------------------------------------------------------------------------+
|i1 : ZZ/33331[x_0..x_6]; V =                                                 |
|                                                                             |
|                ZZ                                                           |
|o2 : Ideal of -----[x ..x ]                                                  |
|              33331  0   6                                                   |
|-----------------------------------------------------------------------------|
|ideal(x_4^2-x_3*x_5,x_2*x_4-x_1*x_5,x_2*x_3-x_1*x_4,x_2^2-x_0*x_5,x_1*x_2-x_0|
|-----------------------------------------------------------------------------|
|*x_4,x_1^2-x_0*x_3,x_6);                                                     |
+-----------------------------------------------------------------------------+
|i3 : time phi = rationalMap(V,3,2)                                           |
|     -- used 0.296142 seconds                                                |
|                                                                             |
|o3 = -- rational map --                                                      |
|                    ZZ                                                       |
|     source: Proj(-----[x , x , x , x , x , x , x ])                         |
|                  33331  0   1   2   3   4   5   6                           |
|                    ZZ                                                       |
|     target: Proj(-----[y , y , y , y , y , y , y , y , y , y , y  , y  ,    |
|                  33331  0   1   2   3   4   5   6   7   8   9   10   11     |
|     defining forms: {                                                       |
|                       3                                                     |
|                      x ,                                                    |
|                       6                                                     |
|                                                                             |
|                         2                                                   |
|                      x x ,                                                  |
|                       5 6                                                   |
|                                                                             |
|                         2                                                   |
|                      x x ,                                                  |
|                       4 6                                                   |
|                                                                             |
|                         2                                                   |
|                      x x ,                                                  |
|                       3 6                                                   |
|                                                                             |
|                         2                                                   |
|                      x x ,                                                  |
|                       2 6                                                   |
|                                                                             |
|                         2                                                   |
|                      x x ,                                                  |
|                       1 6                                                   |
|                                                                             |
|                         2                                                   |
|                      x x ,                                                  |
|                       0 6                                                   |
|                                                                             |
|                       2                                                     |
|                      x x  - x x x ,                                         |
|                       4 6    3 5 6                                          |
|                                                                             |
|                      x x x  - x x x ,                                       |
|                       2 4 6    1 5 6                                        |
|                                                                             |
|                      x x x  - x x x ,                                       |
|                       2 3 6    1 4 6                                        |
|                                                                             |
|                       2                                                     |
|                      x x  - x x x ,                                         |
|                       2 6    0 5 6                                          |
|                                                                             |
|                      x x x  - x x x ,                                       |
|                       1 2 6    0 4 6                                        |
|                                                                             |
|                       2                                                     |
|                      x x  - x x x ,                                         |
|                       1 6    0 3 6                                          |
|                                                                             |
|                       2                  2    2                             |
|                      x x  - 2x x x  + x x  + x x  - x x x                   |
|                       2 3     1 2 4    0 4    1 5    0 3 5                  |
|                     }                                                       |
|                                                                             |
|o3 : RationalMap (cubic rational map from PP^6 to PP^13)                     |
|-----------------------------------------------------------------------------|
|y  , y  ])                                                                   |
| 12   13                                                                     |
+-----------------------------------------------------------------------------+
|i4 : describe phi!                                                           |
|                                                                             |
|o4 = rational map defined by forms of degree 3                               |
|     source variety: PP^6                                                    |
|     target variety: PP^13                                                   |
|     image: 6-dimensional variety of degree 16 in PP^13 cut out by 21        |
|     dominance: false                                                        |
|     birationality: false                                                    |
|     degree of map: 1                                                        |
|     projective degrees: {1, 3, 6, 12, 16, 16, 16}                           |
|     number of minimal representatives: 1                                    |
|     dimension base locus: 4                                                 |
|     degree base locus: 3                                                    |
|     coefficient ring: ZZ/33331                                              |
|-----------------------------------------------------------------------------|
|hypersurfaces of degree 2                                                    |
+-----------------------------------------------------------------------------+

See also
========

  * toMap -- rational map defined by a linear system
  * rationalMap -- makes a rational map
  * rationalMap(Tally) -- rational map
    defined by an effective divisor

Ways to use this method:
========================

  * "rationalMap(Ideal)"
  * "rationalMap(Ideal,List)"
  * "rationalMap(Ideal,ZZ)"
  * rationalMap(Ideal,ZZ,ZZ) -- makes
    a rational map from an ideal

rationalMap(PolynomialRing,List) -- rational map defined by the linear system of hypersurfaces passing through random points with multiplicity
**********************************************************************************************************************************************

Synopsis
========

  * Function: rationalMap,
  * Usage:
        rationalMap(R,{a,i,j,k,...})
  * Inputs:
      * R, a polynomial ring (Macaulay2Doc),
      * a list (Macaulay2Doc), a list $\{a,i,j,k,\ldots\}$ of
        nonnegative integers
  * Optional inputs (Macaulay2Doc),:
      * Dominant, => ..., default value null, null
  * Outputs:
      * a rational map, the rational map defined by the
        linear system of hypersurfaces of degree $a$ in $Proj(R)$ having $i$
        random base points of multiplicity 1, $j$ random base points of
        multiplicity 2, $k$ random base points of multiplicity 3, and so on
        until the last integer in the given list.

Description
===========

In the example below, we take the rational map defined by the linear system of
septic plane curves with 3 random simple base points and 9 random double
points.

+-----------------------------------------------------------------------------+
|i1 : ringP2 = ZZ/65521[vars(0..2)];                                          |
+-----------------------------------------------------------------------------+
|i2 : phi = rationalMap(ringP2,{7,3,9})                                       |
|                                                                             |
|o2 = -- rational map --                                                      |
|                    ZZ                                                       |
|     source: Proj(-----[a, b, c])                                            |
|                  65521                                                      |
|                    ZZ                                                       |
|     target: Proj(-----[t , t , t , t , t , t ])                             |
|                  65521  0   1   2   3   4   5                               |
|     defining forms: {                                                       |
|                       2 5           6         7         6          5        |
|                      a b  - 17617a*b  + 12900b  + 19307a c - 18229a b*      |
|                                                                             |
|                       3 4          6         7         6          5         |
|                      a b  - 6417a*b  - 31396b  - 28886a c - 21440a b*c      |
|                                                                             |
|                       4 3           6         7        6          5         |
|                      a b  + 20866a*b  + 31138b  - 7183a c + 17095a b*c      |
|                                                                             |
|                       5 2          6        7         6         5           |
|                      a b  + 4714a*b  + 3006b  + 25391a c - 1317a b*c -      |
|                                                                             |
|                       6            6        7        6         5            |
|                      a b - 19717a*b  + 2972b  + 5457a c + 2562a b*c -       |
|                                                                             |
|                       7           6        7         6          5           |
|                      a  - 28386a*b  + 6699b  - 13796a c + 17142a b*c -      |
|                     }                                                       |
|                                                                             |
|o2 : RationalMap (rational map from PP^2 to PP^5)                            |
|-----------------------------------------------------------------------------|
|          4 2         3 3          2 4           5          6          5     |
|c - 30969a b c + 1575a b c + 24969a b c + 2454a*b c - 20297b c - 23940a c    |
|                                                                             |
|        4 2          3 3          2 4           5        6          5 2      |
| + 6917a b c - 10431a b c - 23992a b c - 7580a*b c - 788b c - 27190a c  +    |
|                                                                             |
|         4 2          3 3        2 4            5          6          5 2    |
| - 23521a b c - 13812a b c - 778a b c + 29807a*b c + 15984b c + 29820a c     |
|                                                                             |
|      4 2         3 3          2 4            5          6          5 2      |
| 6878a b c - 2149a b c - 14185a b c - 11763a*b c + 20233b c + 11143a c  +    |
|                                                                             |
|      4 2          3 3          2 4            5          6         5 2      |
|30501a b c - 20360a b c + 25738a b c + 18600a*b c - 22423b c - 3993a c  -    |
|                                                                             |
|      4 2         3 3          2 4           5          6          5 2       |
| 3532a b c + 7955a b c - 12957a b c + 7222a*b c - 32443b c + 23975a c  -     |
|-----------------------------------------------------------------------------|
|2         4   2         3 2 2         2 3 2          4 2         5 2         |
|  + 19340a b*c  - 31968a b c  + 30464a b c  + 8682a*b c  - 16059b c  - 27897a|
|                                                                             |
|       4   2         3 2 2         2 3 2           4 2         5 2         4 |
| 20014a b*c  - 20537a b c  + 27021a b c  - 23283a*b c  + 17852b c  - 24937a c|
|                                                                             |
|        4   2        3 2 2         2 3 2         4 2         5 2         4 3 |
| - 7941a b*c  + 2117a b c  + 13574a b c  + 736a*b c  - 25606b c  - 31365a c  |
|                                                                             |
|       4   2        3 2 2         2 3 2           4 2         5 2        4 3 |
| 13264a b*c  - 3964a b c  + 28248a b c  + 31891a*b c  - 23380b c  - 1149a c  |
|                                                                             |
|       4   2        3 2 2        2 3 2           4 2         5 2        4 3  |
| 10791a b*c  - 5480a b c  - 6946a b c  + 21025a*b c  - 10758b c  - 3912a c  -|
|                                                                             |
|      4   2        3 2 2         2 3 2           4 2         5 2         4 3 |
|28394a b*c  + 1532a b c  - 17058a b c  + 20899a*b c  + 16537b c  + 25830a c  |
|-----------------------------------------------------------------------------|
|4 3        3   3         2 2 3           3 3         4 3        3 4         2|
| c  + 9414a b*c  - 17051a b c  + 16858a*b c  + 16891b c  + 6542a c  + 11200a |
|                                                                             |
|3         3   3         2 2 3           3 3        4 3         3 4         2 |
|  - 16723a b*c  + 24564a b c  + 26115a*b c  - 8339b c  - 18678a c  - 15728a b|
|                                                                             |
|        3   3         2 2 3           3 3        4 3       3 4         2   4 |
|- 18421a b*c  - 10600a b c  - 29664a*b c  - 6435b c  - 630a c  + 20506a b*c  |
|                                                                             |
|        3   3         2 2 3           3 3         4 3         3 4         2  |
|- 13443a b*c  + 21881a b c  + 32594a*b c  - 21744b c  - 13857a c  + 16583a b*|
|                                                                             |
|      3   3         2 2 3           3 3         4 3         3 4         2   4|
| 6515a b*c  - 11351a b c  + 14417a*b c  + 17851b c  + 14014a c  - 31942a b*c |
|                                                                             |
|        3   3         2 2 3           3 3         4 3         3 4         2  |
|- 26584a b*c  - 10084a b c  + 32513a*b c  - 28825b c  - 16911a c  - 18959a b*|
|-----------------------------------------------------------------------------|
|   4           2 4        3 4         2 5             5         2 5          |
|b*c  + 18611a*b c  + 4864b c  + 25805a c  + 17308a*b*c  - 26633b c  - 18043a |
|                                                                             |
|  4           2 4         3 4         2 5            5         2 5           |
|*c  + 20581a*b c  - 14384b c  + 25509a c  + 2926a*b*c  - 17705b c  - 28136a* |
|                                                                             |
|          2 4         3 4         2 5            5         2 5           6   |
|- 28923a*b c  - 21257b c  + 16629a c  + 2906a*b*c  - 16104b c  + 21098a*c  - |
|                                                                             |
| 4          2 4         3 4         2 5            5        2 5         6    |
|c  - 5648a*b c  + 22435b c  + 23399a c  + 6718a*b*c  - 6761b c  - 371a*c  +  |
|                                                                             |
|          2 4        3 4         2 5             5        2 5           6    |
| + 2029a*b c  - 2448b c  - 13209a c  - 31099a*b*c  + 8072b c  + 11291a*c  -  |
|                                                                             |
| 4           2 4        3 4        2 5             5        2 5           6  |
|c  - 20721a*b c  - 4891b c  - 5083a c  - 21548a*b*c  + 1713b c  + 29336a*c   |
|-----------------------------------------------------------------------------|
|  6          6         7                                                     |
|*c  + 4571b*c  - 25269c ,                                                    |
|                                                                             |
| 6           6        7                                                      |
|c  - 21430b*c  + 8233c ,                                                     |
|                                                                             |
|         6         7                                                         |
| 19604b*c  - 15373c ,                                                        |
|                                                                             |
|        6         7                                                          |
|30515b*c  + 19313c ,                                                         |
|                                                                             |
|        6         7                                                          |
|12950b*c  + 10256c ,                                                         |
|                                                                             |
|         6         7                                                         |
|+ 3763b*c  - 30117c                                                          |
+-----------------------------------------------------------------------------+
|i3 : describe phi!                                                           |
|                                                                             |
|o3 = rational map defined by forms of degree 7                               |
|     source variety: PP^2                                                    |
|     target variety: PP^5                                                    |
|     image: surface of degree 10 and sectional genus 6 in PP^5 cut out by 10 |
|     dominance: false                                                        |
|     birationality: false                                                    |
|     degree of map: 1                                                        |
|     projective degrees: {1, 7, 10}                                          |
|     number of minimal representatives: 1                                    |
|     dimension base locus: 0                                                 |
|     degree base locus: 30                                                   |
|     coefficient ring: ZZ/65521                                              |
|-----------------------------------------------------------------------------|
|hypersurfaces of degree 3                                                    |
+-----------------------------------------------------------------------------+

See also
========

  * rationalMap(Ideal,ZZ,ZZ) -- makes
    a rational map from an ideal
  * point -- pick a random rational point on a projective variety

Ways to use this method:
========================

  * rationalMap(PolynomialRing,List)
    -- rational map defined by the
    linear system of hypersurfaces passing through random points with
    multiplicity

rationalMap(Ring,Tally) -- rational map defined by an effective divisor
***********************************************************************

Synopsis
========

  * Function: rationalMap,
  * Usage:
        rationalMap D
        rationalMap(R,D)
  * Inputs:
      * R, a ring (Macaulay2Doc), the coordinate ring of a locally
        factorial projective variety $X\subseteq\mathbb{P}^n$
      * D, a tally (Macaulay2Doc), a multiset of homogeneous
        ideals in $R$ (or in ambient (Macaulay2Doc), $R$)
        defining pure codimension 1 subschemes of $X$ with no embedded
        components; so that D is interpreted as an effective divisor on $X$
  * Optional inputs (Macaulay2Doc),:
      * Dominant, => ..., default value null, null
  * Outputs:
      * a rational map, the rational map defined by the
        complete linear system $|D|$

Description
===========

In the example below, we take a smooth complete intersection
$X\subset\mathbb{P}^5$ of three quadrics containing a conic
$C\subset\mathbb{P}^5$. Then we calculate the map defined by the linear system
$|2H+C|$, where $H$ is the hyperplane section class of $X$.

+-----------------------------------------------------------------------------+
|i1 : P5 = ZZ/65521[x_0..x_5];                                                |
+-----------------------------------------------------------------------------+
|i2 : C = ideal(x_1^2-x_0*x_2,x_3,x_4,x_5)                                    |
|                                                                             |
|             2                                                               |
|o2 = ideal (x  - x x , x , x , x )                                           |
|             1    0 2   3   4   5                                            |
|                                                                             |
|o2 : Ideal of P5                                                             |
+-----------------------------------------------------------------------------+
|i3 : X = quotient ideal(-x_1^2+x_0*x_2-x_1*x_3+x_3^2-x_0*x_5+x_1*x_5+x_3*x_5 |
|-----------------------------------------------------------------------------|
|,-x_0*x_3-x_1*x_3+x_2*x_4-x_3*x_4-x_4^2-x_1*x_5-x_2*x_5+x_5^2,-x_1^2+x_0*x_2+|
|-----------------------------------------------------------------------------|
|x_2*x_3+x_1*x_4-x_3*x_4-x_4*x_5);                                            |
+-----------------------------------------------------------------------------+
|i4 : H = ideal random(1,X)                                                   |
|                                                                             |
|o4 = ideal(- 32646x  - 28377x  + 26433x  - 29566x  + 3783x  + 26696x )       |
|                   0         1         2         3        4         5        |
|                                                                             |
|o4 : Ideal of X                                                              |
+-----------------------------------------------------------------------------+
|i5 : D = new Tally from {H => 2,C => 1};                                     |
+-----------------------------------------------------------------------------+
|i6 : time phi = rationalMap D                                                |
|     -- used 0.0574949 seconds                                               |
|                                                                             |
|o6 = -- rational map --                                                      |
|                                  ZZ                                         |
|     source: subvariety of Proj(-----[x , x , x , x , x , x ]) defined by    |
|                                65521  0   1   2   3   4   5                 |
|             {                                                               |
|                 2                  2                                        |
|              - x  + x x  - x x  + x  - x x  + x x  + x x ,                  |
|                 1    0 2    1 3    3    0 5    1 5    3 5                   |
|                                                                             |
|                                             2                  2            |
|              - x x  - x x  + x x  - x x  - x  - x x  - x x  + x ,           |
|                 0 3    1 3    2 4    3 4    4    1 5    2 5    5            |
|                                                                             |
|                 2                                                           |
|              - x  + x x  + x x  + x x  - x x  - x x                         |
|                 1    0 2    2 3    1 4    3 4    4 5                        |
|             }                                                               |
|                    ZZ                                                       |
|     target: Proj(-----[y , y , y , y , y , y , y , y , y , y , y  , y  , y  |
|                  65521  0   1   2   3   4   5   6   7   8   9   10   11   12|
|     defining forms: {                                                       |
|                      x x x ,                                                |
|                       0 4 5                                                 |
|                                                                             |
|                         2                                                   |
|                      x x ,                                                  |
|                       0 5                                                   |
|                                                                             |
|                      x x x ,                                                |
|                       1 2 5                                                 |
|                                                                             |
|                      x x x ,                                                |
|                       1 4 5                                                 |
|                                                                             |
|                         2                                                   |
|                      x x ,                                                  |
|                       1 5                                                   |
|                                                                             |
|                       2                                                     |
|                      x x ,                                                  |
|                       2 5                                                   |
|                                                                             |
|                      x x x ,                                                |
|                       2 3 5                                                 |
|                                                                             |
|                      x x x ,                                                |
|                       2 4 5                                                 |
|                                                                             |
|                         2                                                   |
|                      x x ,                                                  |
|                       2 5                                                   |
|                                                                             |
|                       2                                                     |
|                      x x ,                                                  |
|                       3 5                                                   |
|                                                                             |
|                      x x x ,                                                |
|                       3 4 5                                                 |
|                                                                             |
|                         2                                                   |
|                      x x ,                                                  |
|                       3 5                                                   |
|                                                                             |
|                       2                                                     |
|                      x x ,                                                  |
|                       4 5                                                   |
|                                                                             |
|                         2                                                   |
|                      x x ,                                                  |
|                       4 5                                                   |
|                                                                             |
|                       3                                                     |
|                      x ,                                                    |
|                       5                                                     |
|                                                                             |
|                       2      2                 2                       2    |
|                      x x  + x x  + x x x  + x x  - 3x x x  - x x x  - x x  +|
|                       0 1    0 2    0 1 2    0 2     0 2 4    1 2 4    2 4  |
|                                                                             |
|                       2                 2      2     2           3          |
|                      x x  + x x x  + x x  + x x  + 2x x  + 32760x  - 32760x |
|                       0 2    0 1 2    0 2    1 2     2 3         3         0|
|                                                                             |
|                                  2      2    3              2        2      |
|                      x x x  + x x  + x x  + x  + x x x  - 2x x  + x x ,     |
|                       0 1 2    0 2    1 2    2    1 2 4     2 4    2 4      |
|                                                                             |
|                                                                        2    |
|                      - 2x x x  + x x x  - 2x x x  + x x x  + x x x  - x x  +|
|                          0 2 5    0 4 5     1 4 5    2 4 5    3 4 5    4 5  |
|                                                                             |
|                         2                          2                2       |
|                      - x x  + 2x x x  + 2x x x  + x x  + 2x x x  - x x  + 4x|
|                         0 5     0 2 5     1 2 5    2 5     2 3 5    3 5     |
|                                                                             |
|                                                  2                         2|
|                      x x x  + x x x  + x x x  + x x  + x x x  - 2x x x  + x |
|                       0 1 5    0 2 5    1 2 5    2 5    1 4 5     2 4 5    4|
|                     }                                                       |
|                                                                             |
|o6 : RationalMap (cubic rational map from surface in PP^5 to PP^20)          |
|-----------------------------------------------------------------------------|
|, y  , y  , y  , y  , y  , y  , y  , y  ])                                   |
|   13   14   15   16   17   18   19   20                                     |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|    2      2       2    3    2                          2                2   |
| x x  - x x  + 2x x  - x  - x x  + 2x x x  + 2x x x  + x x  + 2x x x  - x x  |
|  0 4    1 4     2 4    4    0 5     0 2 5     1 2 5    2 5     2 3 5    3 5 |
|                                                                             |
|                      2                         2             2      2    2  |
|x x  - x x x  - 32760x x  + 32757x x x  - 32760x x  + 32760x x  + x x  - x x |
| 2 4    1 2 4         2 4         2 3 4         3 4         2 4    3 4    0 5|
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|    2      2                                                                 |
| x x  + x x ,                                                                |
|  1 5    4 5                                                                 |
|                                                                             |
|                   2        2       2       2       2    3                   |
| x x  - 3x x x  + x x  + x x  - 3x x  - 2x x  - 2x x  + x ,                  |
|1 4 5     3 4 5    4 5    0 5     1 5     2 5     4 5    5                   |
|                                                                             |
|                                                                             |
|x                                                                            |
| 5                                                                           |
|-----------------------------------------------------------------------------|
|                       2        2       2       2       2    3               |
|+ 4x x x  - 3x x x  + x x  + x x  - 3x x  - 2x x  - 2x x  + x ,              |
|    1 4 5     3 4 5    4 5    0 5     1 5     2 5     4 5    5               |
|                                                                             |
|                                                   2                 2       |
| - 32760x x x  - 32758x x x  + 32760x x x  + 32760x x  + 2x x x  - 3x x  +   |
|         0 1 5         0 2 5         1 2 5         2 5     2 3 5     3 5     |
|-----------------------------------------------------------------------------|
|                                                      2             2       2|
|32758x x x  + 7x x x  + 32760x x x  - 4x x x  - 32760x x  - 32758x x  - 5x x |
|      0 4 5     1 4 5         2 4 5     3 4 5         4 5         0 5     1 5|
|-----------------------------------------------------------------------------|
|     2           2       2         3                                         |
|- x x  + 32759x x  - 4x x  - 32759x ,                                        |
|   2 5         3 5     4 5         5                                         |
+-----------------------------------------------------------------------------+
|i7 : time ? image(phi,"F4")                                                  |
|     -- used 1.65549 seconds                                                 |
|                                                                             |
|o7 = surface of degree 38 and sectional genus 20 in PP^20 cut out by 153     |
|     hypersurfaces of degree 2                                               |
+-----------------------------------------------------------------------------+

See also the package Divisor (see
http://www2.macaulay2.com/Macaulay2/doc/Macaulay2-1.16/share/doc/Macaulay2/
Divisor/html/index.html ), which provides general tools for working with
divisors.

See also
========

  * rationalMap -- makes a rational map
  * rationalMap(Ideal,ZZ) -- makes a
    rational map from an ideal
  * image(RationalMap,String), --
    closure of the image of a rational map using the F4 algorithm
    (experimental)

Ways to use this method:
========================

  * rationalMap(Ring,Tally) -- rational
    map defined by an effective divisor
  * "rationalMap(Tally)"

segre -- Segre embedding
************************

Synopsis
========

  * Usage:
        segre phi
        segre R
  * Inputs:
      * phi, a rational map, with source a closed
        subvariety $X\subseteq\mathbb{P}^{n_1}\times\mathbb{P}^{n_2}\times\
        cdots\times\mathbb{P}^{n_k}$ of a product of projective spaces
      * R, a quotient ring (Macaulay2Doc), or a
        polynomial ring (Macaulay2Doc), the coordinate ring of
        the subvariety $X\subseteq\mathbb{P}^{n_1}\times\mathbb{P}^{n_2}\times\
        cdots\times\mathbb{P}^{n_k}$
  * Outputs:
      * a rational map, the restriction to $X$ of the Segre
        embedding of $\mathbb{P}^{n_1}\times\mathbb{P}^{n_2}\times\cdots\times\
        mathbb{P}^{n_k}$, where the linear span of the image is identified with
        a projective space

Description
===========

More properly, this method accepts and returns objects of the class
MultihomogeneousRationalMap.

+-----------------------------------------------------------------------------+
|i1 : phi = first graph quadroQuadricCremonaTransformation(3,1)               |
|                                                                             |
|o1 = -- rational map --                                                      |
|     source: subvariety of Proj(QQ[x , x , x , x ]) x Proj(QQ[y , y , y ,    |
|                                    0   1   2   3              0   1   2     |
|             {                                                               |
|              x y  - x y ,                                                   |
|               3 2    2 3                                                    |
|                                                                             |
|              x y  + x y ,                                                   |
|               3 1    1 3                                                    |
|                                                                             |
|              x y  + x y ,                                                   |
|               2 1    1 2                                                    |
|                                                                             |
|              x y  - x y  + x y  + x y                                       |
|               0 0    1 1    2 2    3 3                                      |
|             }                                                               |
|     target: Proj(QQ[x, y, z, t])                                            |
|     defining forms: {                                                       |
|                      x ,                                                    |
|                       0                                                     |
|                                                                             |
|                      x ,                                                    |
|                       1                                                     |
|                                                                             |
|                      x ,                                                    |
|                       2                                                     |
|                                                                             |
|                      x                                                      |
|                       3                                                     |
|                     }                                                       |
|                                                                             |
|o1 : MultihomogeneousRationalMap (birational map from threefold in PP^3 x    |
|-----------------------------------------------------------------------------|
|y ]) defined by                                                              |
| 3                                                                           |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|PP^3 to PP^3)                                                                |
+-----------------------------------------------------------------------------+
|i2 : segre phi                                                               |
|                                                                             |
|o2 = -- rational map --                                                      |
|     source: subvariety of Proj(QQ[x , x , x , x ]) x Proj(QQ[y , y , y , y  |
|                                    0   1   2   3              0   1   2   3 |
|             {                                                               |
|              x y  - x y ,                                                   |
|               3 2    2 3                                                    |
|                                                                             |
|              x y  + x y ,                                                   |
|               3 1    1 3                                                    |
|                                                                             |
|              x y  + x y ,                                                   |
|               2 1    1 2                                                    |
|                                                                             |
|              x y  - x y  + x y  + x y                                       |
|               0 0    1 1    2 2    3 3                                      |
|             }                                                               |
|     target: Proj(QQ[t , t , t , t , t , t , t , t , t , t , t  , t  ])      |
|                      0   1   2   3   4   5   6   7   8   9   10   11        |
|     defining forms: {                                                       |
|                      x y ,                                                  |
|                       0 1                                                   |
|                                                                             |
|                      x y ,                                                  |
|                       0 2                                                   |
|                                                                             |
|                      x y ,                                                  |
|                       0 3                                                   |
|                                                                             |
|                      x y ,                                                  |
|                       1 0                                                   |
|                                                                             |
|                      x y ,                                                  |
|                       1 1                                                   |
|                                                                             |
|                      x y ,                                                  |
|                       2 0                                                   |
|                                                                             |
|                      -x y ,                                                 |
|                        1 2                                                  |
|                                                                             |
|                      x y ,                                                  |
|                       2 2                                                   |
|                                                                             |
|                      x y ,                                                  |
|                       3 0                                                   |
|                                                                             |
|                      -x y ,                                                 |
|                        1 3                                                  |
|                                                                             |
|                      x y ,                                                  |
|                       2 3                                                   |
|                                                                             |
|                      x y                                                    |
|                       3 3                                                   |
|                     }                                                       |
|                                                                             |
|o2 : MultihomogeneousRationalMap (rational map from threefold in PP^3 x PP^3 |
|-----------------------------------------------------------------------------|
|]) defined by                                                                |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
| to PP^11)                                                                   |
+-----------------------------------------------------------------------------+

Ways to use segre :
===================

  * "segre(PolynomialRing)"
  * "segre(QuotientRing)"
  * "segre(RationalMap)"

For the programmer
==================

The object segre, is a method function (Macaulay2Doc).

SegreClass -- Segre class of a closed subscheme of a projective variety
***********************************************************************

Synopsis
========

  * Usage:
        SegreClass I
  * Inputs:
      * I, an ideal (Macaulay2Doc), a homogeneous ideal of a
        graded quotient ring $K[x_0,\ldots,x_n]/J$ defining a subscheme
        $X=V(I)$ of $Y=Proj(K[x_0,\ldots,x_n]/J)\subseteq
        \mathbb{P}^n=Proj(K[x_0,\ldots,x_n])$
  * Optional inputs (Macaulay2Doc),:
      * BlowUpStrategy, => ..., default value
        "Eliminate", null
      * MathMode, => ..., default value false, whether to
        ensure correctness of output
      * Verbose, => ...,
        default value true, null
  * Outputs:
      * a ring element (Macaulay2Doc), the push-forward to
        the Chow ring of $\mathbb{P}^n$ of the Segre class $s(X,Y)$ of $X$ in
        $Y$

Description
===========

This is an example of application of the method projectiveDegrees,;
see Proposition 4.4 in Intersection theory (see
http://link.springer.com/book/10.1007%2F978-3-662-02421-8 ), by W. Fulton, and
Subsection 2.3 in Lectures on Cremona transformations (see
http://www.math.lsa.umich.edu/~idolga/cremonalect.pdf ), by I. Dolgachev. See
also the corresponding methods in the packages CSM-A (see
http://www.math.fsu.edu/~aluffi/CSM/CSM.html ), by P. Aluffi, and
CharacteristicClasses (see
http://www.math.uiuc.edu/Macaulay2/doc/Macaulay2-1.16/share/doc/Macaulay2/
CharacteristicClasses/html/ ), by M. Helmer and C. Jost.

In the example below, we take $Y\subset\mathbb{P}^7$ to be the dual
hypersurface of $\mathbb{P}^1\times\mathbb{P}^1\times\mathbb{P}^1\subset{\
mathbb{P}^7}^*$ and $X\subset Y$ its singular locus. We compute the
push-forward to the Chow ring of $\mathbb{P}^7$ of the Segre class both of $X$
in $Y$ and of $X$ in $\mathbb{P}^7$, using both a probabilistic and a
non-probabilistic approach.

+-----------------------------------------------------------------------------+
|i1 : P7 = ZZ/100003[x_0..x_7]                                                |
|                                                                             |
|o1 = P7                                                                      |
|                                                                             |
|o1 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i2 : Y = ideal(x_3^2*x_4^2-2*x_2*x_3*x_4*x_5+x_2^2*x_5^2-2*x_1*x_3*x_4*x_6-2*|
|                                                                             |
|            2 2                2 2                                        2 2|
|o2 = ideal(x x  - 2x x x x  + x x  - 2x x x x  - 2x x x x  + 4x x x x  + x x |
|            3 4     2 3 4 5    2 5     1 3 4 6     1 2 5 6     0 3 5 6    1 6|
|     ------------------------------------------------------------------------|
|                                                        2 2                  |
|     + 4x x x x  - 2x x x x  - 2x x x x  - 2x x x x  + x x )                 |
|         1 2 4 7     0 3 4 7     0 2 5 7     0 1 6 7    0 7                  |
|                                                                             |
|o2 : Ideal of P7                                                             |
|-----------------------------------------------------------------------------|
|x_1*x_2*x_5*x_6+4*x_0*x_3*x_5*x_6+x_1^2*x_6^2+4*x_1*x_2*x_4*x_7-2*x_0*x_3*x_4|
|-----------------------------------------------------------------------------|
|*x_7-2*x_0*x_2*x_5*x_7-2*x_0*x_1*x_6*x_7+x_0^2*x_7^2)                        |
+-----------------------------------------------------------------------------+
|i3 : X = sub(ideal jacobian Y,P7/Y)                                          |
|                                                                             |
|                                                        2                    |
|o3 = ideal (4x x x  - 2x x x  - 2x x x  - 2x x x  + 2x x , - 2x x x  -       |
|              3 5 6     3 4 7     2 5 7     1 6 7     0 7      3 4 6         |
|     ------------------------------------------------------------------------|
|                   2                                      2                  |
|     2x x x  + 2x x  + 4x x x  - 2x x x , - 2x x x  + 2x x  - 2x x x  +      |
|       2 5 6     1 6     2 4 7     0 6 7      3 4 5     2 5     1 5 6        |
|     ------------------------------------------------------------------------|
|                            2                                            2   |
|     4x x x  - 2x x x , 2x x  - 2x x x  - 2x x x  + 4x x x  - 2x x x , 2x x  |
|       1 4 7     0 5 7    3 4     2 4 5     1 4 6     0 5 6     0 4 7    3 4 |
|     ------------------------------------------------------------------------|
|                                                            2                |
|     - 2x x x  - 2x x x  + 4x x x  - 2x x x , - 2x x x  + 2x x  - 2x x x  +  |
|         2 3 5     1 3 6     1 2 7     0 3 7      2 3 4     2 5     1 2 6    |
|     ------------------------------------------------------------------------|
|                                                          2                  |
|     4x x x  - 2x x x , - 2x x x  - 2x x x  + 4x x x  + 2x x  - 2x x x ,     |
|       0 3 6     0 2 7      1 3 4     1 2 5     0 3 5     1 6     0 1 7      |
|     ------------------------------------------------------------------------|
|                                               2                             |
|     4x x x  - 2x x x  - 2x x x  - 2x x x  + 2x x )                          |
|       1 2 4     0 3 4     0 2 5     0 1 6     0 7                           |
|                                                                             |
|                                                                          P7 |
|o3 : Ideal of ---------------------------------------------------------------|
|               2 2                2 2                                        |
|              x x  - 2x x x x  + x x  - 2x x x x  - 2x x x x  + 4x x x x  + x|
|               3 4     2 3 4 5    2 5     1 3 4 6     1 2 5 6     0 3 5 6    |
|-----------------------------------------------------------------------------|
|----------------------------------------------------------                   |
|2 2                                                    2 2                   |
| x  + 4x x x x  - 2x x x x  - 2x x x x  - 2x x x x  + x x                    |
|1 6     1 2 4 7     0 3 4 7     0 2 5 7     0 1 6 7    0 7                   |
+-----------------------------------------------------------------------------+
|i4 : time SegreClass X                                                       |
|     -- used 1.09224 seconds                                                 |
|                                                                             |
|          7        6       5       4      3                                  |
|o4 = 3240H  - 1188H  + 396H  - 114H  + 24H                                   |
|                                                                             |
|     ZZ[H]                                                                   |
|o4 : -----                                                                   |
|        8                                                                    |
|       H                                                                     |
+-----------------------------------------------------------------------------+
|i5 : time SegreClass lift(X,P7)                                              |
|     -- used 0.965696 seconds                                                |
|                                                                             |
|          7        6       5      4      3                                   |
|o5 = 2816H  - 1056H  + 324H  - 78H  + 12H                                    |
|                                                                             |
|     ZZ[H]                                                                   |
|o5 : -----                                                                   |
|        8                                                                    |
|       H                                                                     |
+-----------------------------------------------------------------------------+
|i6 : time SegreClass(X,MathMode=>true)                                       |
|MathMode: output certified!                                                  |
|     -- used 0.0536664 seconds                                               |
|                                                                             |
|          7        6       5       4      3                                  |
|o6 = 3240H  - 1188H  + 396H  - 114H  + 24H                                   |
|                                                                             |
|     ZZ[H]                                                                   |
|o6 : -----                                                                   |
|        8                                                                    |
|       H                                                                     |
+-----------------------------------------------------------------------------+
|i7 : time SegreClass(lift(X,P7),MathMode=>true)                              |
|MathMode: output certified!                                                  |
|     -- used 0.3059 seconds                                                  |
|                                                                             |
|          7        6       5      4      3                                   |
|o7 = 2816H  - 1056H  + 324H  - 78H  + 12H                                    |
|                                                                             |
|     ZZ[H]                                                                   |
|o7 : -----                                                                   |
|        8                                                                    |
|       H                                                                     |
+-----------------------------------------------------------------------------+
|i8 : o4 == o6 and o5 == o7                                                   |
|                                                                             |
|o8 = true                                                                    |
+-----------------------------------------------------------------------------+

The method also accepts as input a ring map phi representing a rational map
$\Phi:X\dashrightarrow Y$ between projective varieties. In this case, the
method returns the push-forward to the Chow ring of the ambient projective
space of $X$ of the Segre class of the base locus of $\Phi$ in $X$, i.e., it
basically computes SegreClass ideal matrix phi. In the next example, we compute
the Segre class of the base locus of a birational map
$\mathbb{G}(1,4)\subset\mathbb{P}^9 \dashrightarrow \mathbb{P}^6$.

+-----------------------------------------------------------------------------+
|i9 : use ZZ/100003[x_0..x_6]                                                 |
|                                                                             |
|       ZZ                                                                    |
|o9 = ------[x ..x ]                                                          |
|     100003  0   6                                                           |
|                                                                             |
|o9 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i10 : time phi = inverseMap toMap(minors(2,matrix{{x_0,x_1,x_3,x_4,x_5},{x_1,|
|     -- used 0.180267 seconds                                                |
|                                                                             |
|                                                        ZZ                   |
|                                                      ------[y ..y ]         |
|                                                      100003  0   9          |
|o10 = map (------------------------------------------------------------------|
|           (y y  - y y  + y y , y y  - y y  + y y , y y  - y y  + y y , y y  |
|             5 7    4 8    2 9   5 6    3 8    1 9   4 6    3 7    0 9   2 6 |
|                                                                             |
|                                                           ZZ                |
|                                                         ------[y ..y ]      |
|                                                         100003  0   9       |
|o10 : RingMap ---------------------------------------------------------------|
|              (y y  - y y  + y y , y y  - y y  + y y , y y  - y y  + y y , y |
|                5 7    4 8    2 9   5 6    3 8    1 9   4 6    3 7    0 9   2|
|-----------------------------------------------------------------------------|
|x_2,x_4,x_5,x_6}}),Dominant=>2)                                              |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                      ZZ              2                      |
|----------------------------------, ------[x ..x ], {y  - y y  - y y , y y  -|
|- y y  + y y , y y  - y y  + y y )  100003  0   6     3    0 5    1 6   3 4  |
|   1 7    0 8   2 3    1 4    0 5                                            |
|                                                                             |
|                                                                             |
|                                                                             |
|                                             ZZ                              |
|------------------------------------- <--- ------[x ..x ]                    |
|y  - y y  + y y , y y  - y y  + y y )      100003  0   6                     |
| 6    1 7    0 8   2 3    1 4    0 5                                         |
|-----------------------------------------------------------------------------|
|       2                                                                     |
|y y , y  - y y  - y y , y y  + y y  - y y , y y  - y y , y y  - y y  - y y , |
| 1 7   4    2 7    0 9   2 5    3 5    1 8   4 5    1 9   4 8    2 9    3 9  |
|-----------------------------------------------------------------------------|
|y y  - y y  - y y })                                                         |
| 7 8    4 9    6 9                                                           |
+-----------------------------------------------------------------------------+
|i11 : time SegreClass phi                                                    |
|     -- used 0.550745 seconds                                                |
|                                                                             |
|         9      8      7      6     5                                        |
|o11 = 23H  - 42H  + 36H  - 22H  + 9H                                         |
|                                                                             |
|      ZZ[H]                                                                  |
|o11 : -----                                                                  |
|        10                                                                   |
|       H                                                                     |
+-----------------------------------------------------------------------------+
|i12 : B = ideal matrix phi                                                   |
|                                                                             |
|              2                              2                               |
|o12 = ideal (y  - y y  - y y , y y  - y y , y  - y y  - y y , y y  + y y  -  |
|              3    0 5    1 6   3 4    1 7   4    2 7    0 9   2 5    3 5    |
|      -----------------------------------------------------------------------|
|      y y , y y  - y y , y y  - y y  - y y , y y  - y y  - y y )             |
|       1 8   4 5    1 9   4 8    2 9    3 9   7 8    4 9    6 9              |
|                                                                             |
|                                                            ZZ               |
|                                                          ------[y ..y ]     |
|                                                          100003  0   9      |
|o12 : Ideal of --------------------------------------------------------------|
|               (y y  - y y  + y y , y y  - y y  + y y , y y  - y y  + y y , y|
|                 5 7    4 8    2 9   5 6    3 8    1 9   4 6    3 7    0 9   |
|-----------------------------------------------------------------------------|
|--------------------------------------                                       |
| y  - y y  + y y , y y  - y y  + y y )                                       |
|2 6    1 7    0 8   2 3    1 4    0 5                                        |
+-----------------------------------------------------------------------------+
|i13 : -- Segre class of B in G(1,4)                                          |
|      time SegreClass B                                                      |
|     -- used 0.64213 seconds                                                 |
|                                                                             |
|         9      8      7      6     5                                        |
|o13 = 23H  - 42H  + 36H  - 22H  + 9H                                         |
|                                                                             |
|      ZZ[H]                                                                  |
|o13 : -----                                                                  |
|        10                                                                   |
|       H                                                                     |
+-----------------------------------------------------------------------------+
|i14 : -- Segre class of B in P^9                                             |
|      time SegreClass lift(B,ambient ring B)                                 |
|     -- used 2.26927 seconds                                                 |
|                                                                             |
|           9       8       7      6     5                                    |
|o14 = 2764H  - 984H  + 294H  - 67H  + 9H                                     |
|                                                                             |
|      ZZ[H]                                                                  |
|o14 : -----                                                                  |
|        10                                                                   |
|       H                                                                     |
+-----------------------------------------------------------------------------+

See also
========

  * projectiveDegrees -- projective degrees of a
    rational map between projective varieties
  * ChernSchwartzMacPherson, --
    Chern-Schwartz-MacPherson class of a projective scheme

Ways to use SegreClass :
========================

  * "SegreClass(Ideal)"
  * "SegreClass(RationalMap)"
  * "SegreClass(RingMap)"

For the programmer
==================

The object SegreClass, is a method function with options (Macaulay2Doc).

source(RationalMap) -- coordinate ring of the source for a rational map
***********************************************************************

Synopsis
========

  * Function: source (Macaulay2Doc),
  * Usage:
        source phi
  * Inputs:
      * phi, a rational map,
  * Outputs:
      * a ring (Macaulay2Doc), the coordinate ring of the source of
        phi

Description
===========

This is equivalent to target map phi.

See also
========

  * target(RationalMap) -- coordinate ring of
    the target for a rational map

Ways to use this method:
========================

  * source(RationalMap) -- coordinate ring of
    the source for a rational map

specialCremonaTransformation -- special Cremona transformations whose base locus has dimension at most three
************************************************************************************************************

Synopsis
========

  * Usage:
        specialCremonaTransformation i
        specialCremonaTransformation(i,K)
  * Inputs:
      * i, an integer (Macaulay2Doc), an integer between 1 and 12
      * K, a ring (Macaulay2Doc), the ground field (optional, the
        default value is QQ (Macaulay2Doc))
  * Outputs:
      * a rational map, an example of special Cremona
        transformation over K, according to the classification given in Table 1
        of Special cubic Cremona transformations of P6 and P7 (see
        https://www.degruyter.com/view/journals/advg/19/2/article-p191.xml ).

Description
===========

A Cremona transformation is said to be special if the base locus scheme is
smooth and irreducible. To ensure this condition, the field K must be large
enough but no check is made.

+-----------------------------------------------------------------------------+
|i1 : time apply(1..12,i -> describe specialCremonaTransformation(i,ZZ/3331)) |
|     -- used 2.65197 seconds                                                 |
|                                                                             |
|o1 = (rational map defined by forms of degree 3,                             |
|      source variety: PP^3                                                   |
|      target variety: PP^3                                                   |
|      dominance: true                                                        |
|      birationality: true                                                    |
|      projective degrees: {1, 3, 3, 1}                                       |
|      number of minimal representatives: 1                                   |
|      dimension base locus: 1                                                |
|      degree base locus: 6                                                   |
|      coefficient ring: ZZ/3331                                              |
|     ------------------------------------------------------------------------|
|     rational map defined by forms of degree 2,                              |
|     source variety: PP^4                                                    |
|     target variety: PP^4                                                    |
|     dominance: true                                                         |
|     birationality: true                                                     |
|     projective degrees: {1, 2, 4, 3, 1}                                     |
|     number of minimal representatives: 1                                    |
|     dimension base locus: 1                                                 |
|     degree base locus: 5                                                    |
|     coefficient ring: ZZ/3331                                               |
|     ------------------------------------------------------------------------|
|     rational map defined by forms of degree 3,                              |
|     source variety: PP^4                                                    |
|     target variety: PP^4                                                    |
|     dominance: true                                                         |
|     birationality: true                                                     |
|     projective degrees: {1, 3, 4, 2, 1}                                     |
|     number of minimal representatives: 1                                    |
|     dimension base locus: 2                                                 |
|     degree base locus: 5                                                    |
|     coefficient ring: ZZ/3331                                               |
|     ------------------------------------------------------------------------|
|     rational map defined by forms of degree 4,                              |
|     source variety: PP^4                                                    |
|     target variety: PP^4                                                    |
|     dominance: true                                                         |
|     birationality: true                                                     |
|     projective degrees: {1, 4, 6, 4, 1}                                     |
|     number of minimal representatives: 1                                    |
|     dimension base locus: 2                                                 |
|     degree base locus: 10                                                   |
|     coefficient ring: ZZ/3331                                               |
|     ------------------------------------------------------------------------|
|     rational map defined by forms of degree 2,                              |
|     source variety: PP^5                                                    |
|     target variety: PP^5                                                    |
|     dominance: true                                                         |
|     birationality: true                                                     |
|     projective degrees: {1, 2, 4, 4, 2, 1}                                  |
|     number of minimal representatives: 1                                    |
|     dimension base locus: 2                                                 |
|     degree base locus: 4                                                    |
|     coefficient ring: ZZ/3331                                               |
|     ------------------------------------------------------------------------|
|     rational map defined by forms of degree 2,                              |
|     source variety: PP^6                                                    |
|     target variety: PP^6                                                    |
|     dominance: true                                                         |
|     birationality: true                                                     |
|     projective degrees: {1, 2, 4, 8, 9, 4, 1}                               |
|     number of minimal representatives: 1                                    |
|     dimension base locus: 2                                                 |
|     degree base locus: 7                                                    |
|     coefficient ring: ZZ/3331                                               |
|     ------------------------------------------------------------------------|
|     rational map defined by forms of degree 2,                              |
|     source variety: PP^6                                                    |
|     target variety: PP^6                                                    |
|     dominance: true                                                         |
|     birationality: true                                                     |
|     projective degrees: {1, 2, 4, 8, 8, 4, 1}                               |
|     number of minimal representatives: 1                                    |
|     dimension base locus: 2                                                 |
|     degree base locus: 8                                                    |
|     coefficient ring: ZZ/3331                                               |
|     ------------------------------------------------------------------------|
|     rational map defined by forms of degree 5,                              |
|     source variety: PP^5                                                    |
|     target variety: PP^5                                                    |
|     dominance: true                                                         |
|     birationality: true                                                     |
|     projective degrees: {1, 5, 10, 10, 5, 1}                                |
|     number of minimal representatives: 1                                    |
|     dimension base locus: 3                                                 |
|     degree base locus: 15                                                   |
|     coefficient ring: ZZ/3331                                               |
|     ------------------------------------------------------------------------|
|     rational map defined by forms of degree 2         ,                     |
|     source variety: PP^8                                                    |
|     target variety: PP^8                                                    |
|     dominance: true                                                         |
|     birationality: true                                                     |
|     projective degrees: {1, 2, 4, 8, 16, 20, 14, 5, 1}                      |
|     number of minimal representatives: 1                                    |
|     dimension base locus: 3                                                 |
|     degree base locus: 12                                                   |
|     coefficient ring: ZZ/3331                                               |
|     ------------------------------------------------------------------------|
|     rational map defined by forms of degree 2         ,                     |
|     source variety: PP^8                                                    |
|     target variety: PP^8                                                    |
|     dominance: true                                                         |
|     birationality: true                                                     |
|     projective degrees: {1, 2, 4, 8, 16, 19, 13, 5, 1}                      |
|     number of minimal representatives: 1                                    |
|     dimension base locus: 3                                                 |
|     degree base locus: 13                                                   |
|     coefficient ring: ZZ/3331                                               |
|     ------------------------------------------------------------------------|
|     rational map defined by forms of degree 3  ,                            |
|     source variety: PP^6                                                    |
|     target variety: PP^6                                                    |
|     dominance: true                                                         |
|     birationality: true                                                     |
|     projective degrees: {1, 3, 9, 13, 11, 5, 1}                             |
|     number of minimal representatives: 1                                    |
|     dimension base locus: 3                                                 |
|     degree base locus: 14                                                   |
|     coefficient ring: ZZ/3331                                               |
|     ------------------------------------------------------------------------|
|     rational map defined by forms of degree 3  )                            |
|     source variety: PP^6                                                    |
|     target variety: PP^6                                                    |
|     dominance: true                                                         |
|     birationality: true                                                     |
|     projective degrees: {1, 3, 9, 14, 12, 5, 1}                             |
|     number of minimal representatives: 1                                    |
|     dimension base locus: 3                                                 |
|     degree base locus: 13                                                   |
|     coefficient ring: ZZ/3331                                               |
|                                                                             |
|o1 : Sequence                                                                |
+-----------------------------------------------------------------------------+

See also
========

  * quadroQuadricCremonaTransformation
    -- quadro-quadric Cremona
    transformations
  * specialQuadraticTransformation, --
    special quadratic transformations whose base locus has dimension three
  * specialCubicTransformation -- special
    cubic transformations whose base locus has dimension at most three

Ways to use specialCremonaTransformation :
==========================================

  * "specialCremonaTransformation(Ring,ZZ)"
  * "specialCremonaTransformation(ZZ)"
  * "specialCremonaTransformation(ZZ,Ring)"

For the programmer
==================

The object specialCremonaTransformation, is
a method function (Macaulay2Doc).

specialCubicTransformation -- special cubic transformations whose base locus has dimension at most three
********************************************************************************************************

Synopsis
========

  * Usage:
        specialCubicTransformation i
        specialCubicTransformation(i,K)
  * Inputs:
      * i, an integer (Macaulay2Doc), an integer between 1 and 9
      * K, a ring (Macaulay2Doc), the ground field (optional, the
        default value is QQ (Macaulay2Doc))
  * Outputs:
      * a rational map, an example of special cubic
        birational transformation over K, according to the classification given
        in Table 2 of Special cubic birational transformations of projective
        spaces (see https://link.springer.com/article/10.1007/s13348-019-00251-
        8 ).

Description
===========

The field K is required to be large enough.

+-----------------------------------------------------------------------------+
|i1 : time specialCubicTransformation 9                                       |
|     -- used 0.320657 seconds                                                |
|                                                                             |
|o1 = -- rational map --                                                      |
|     source: Proj(QQ[x , x , x , x , x , x , x ])                            |
|                      0   1   2   3   4   5   6                              |
|     target: subvariety of Proj(QQ[t , t , t , t , t                         |
|                                    0   1   2   3                            |
|             {                                                               |
|                                                                             |
|              3t t  + 10t t  + 10t t  - 3t t  - 10t                          |
|                2 4      3 4      0 5     1 5      2                         |
|                                                                             |
|                                                                             |
|              3t t  - 8t t  - 5t t  + 8t t  - 8t t                           |
|                0 2     3 4     0 5     2 5     4 5                          |
|                                                                             |
|                                                                             |
|              t t  - t t  - 2t t  - 2t t  + 2t t  -                          |
|               0 1    0 4     3 4     0 5     2 5                            |
|             }                                                               |
|     defining forms: {                                                       |
|                          2                 2                                |
|                      - 6x x  - 2x x x  + 8x x  + 5x                         |
|                          0 2     0 1 2     1 2                              |
|                                                                             |
|                          3     2         2     2                            |
|                      - 6x  - 8x x  - 6x x  + 4x x                           |
|                          0     0 1     0 1     0 2                          |
|                                                                             |
|                        3     2          2      2                            |
|                      6x  + 4x x  - 10x x  - 14x x                           |
|                        0     0 1      0 1      0 2                          |
|                                                                             |
|                           3     2       2                                   |
|                      - 12x  - 8x x  + 7x x  + 6x x                          |
|                           0     0 1     0 2     0 1                         |
|                                                                             |
|                         3      2          2      3                          |
|                      12x  - 12x x  - 12x x  + 12x                           |
|                         0      0 1      0 1      1                          |
|                                                                             |
|                          3      2         2      3                          |
|                      - 6x  + 20x x  - 2x x  - 12x                           |
|                          0      0 1     0 1      1                          |
|                                                                             |
|                           3     2          2     2                          |
|                      - 24x  + 8x x  + 16x x  - 4x x                         |
|                           0     0 1      0 1     0                          |
|                                                                             |
|                        2         2      3     2                             |
|                      8x x  - 4x x  - 24x  - 7x x  +                         |
|                        0 1     0 1      1     0 2                           |
|                                                                             |
|                           2        3      2                                 |
|                      - 12x x  + 12x  + 12x x  - 4x                          |
|                           0 1      1      0 2     0                         |
|                                                                             |
|                        2          2      3      2                           |
|                      8x x  - 12x x  + 24x  - 11x x                          |
|                        0 1      0 1      1      0 2                         |
|                     }                                                       |
|                                                                             |
|o1 : RationalMap (cubic birational map from PP^6 to                          |
|-----------------------------------------------------------------------------|
| , t , t , t , t , t ]) defined by                                           |
|4   5   6   7   8   9                                                        |
|                                                                             |
|                         2                                                   |
|t  + 6t t  + 13t t  + 13t  - 10t t  - 10t t  + t t  + 10t t  - 2t t  +       |
| 5     3 5      4 5      5      0 6      1 6    2 6      4 6     5 6         |
|                                                                             |
|    2                                           2                            |
|- 8t  + 8t t  + 8t t  + t t  - 8t t  + t t  - 8t  - 2t t  - t t  - 2t        |
|    5     0 6     1 6    2 6     4 6    5 6     6     0 7    1 7     2       |
|                                                                             |
|          2                                    2                             |
|2t t  - 2t  + 2t t  + 2t t  + t t  - 3t t  - 3t  - t t  - t t  + t t         |
|  4 5     5     0 6     1 6    3 6     4 6     6    0 7    2 7    4 7        |
|                                                                             |
|                                                                             |
|  2       2    3                          2         2                        |
| x  - 6x x  + x  + 2x x x  - 16x x x  + 7x x  + 8x x  - 5x x x  - 2x x       |
|0 2     1 2    2     0 2 3      1 2 3     2 3     2 3     0 2 4     1        |
|                                                                             |
|              2         2      2      2                 2                    |
|+ 7x x x  + 6x x  + 2x x  + x x  + 12x x  + 6x x x  - 6x x  - 6x x x         |
|    0 1 2     1 2     0 2    1 2      0 3     0 1 3     1 3     0 2 3        |
|                                                                             |
|               2        2                                         2          |
|- 12x x x  - 6x x  - 10x x  + 6x x x  + 18x x x  + 10x x x  + 4x x  -        |
|     0 1 2     1 2      0 3     0 1 3      0 2 3      1 2 3     0 3          |
|                                                                             |
|       2         2       2     3     2                                       |
|x  + 8x x  + 3x x  - 6x x  + 2x  + 8x x  - 8x x x  + 5x x x  - 16x x x       |
| 2     1 2     0 2     1 2     2     0 3     0 1 3     0 2 3      1 2        |
|                                                                             |
|              2         2       2    3      2                   2            |
|+ 6x x x  - 6x x  - 3x x  + 4x x  - x  + 14x x  + 24x x x  - 38x x  -        |
|    0 1 2     1 2     0 2     1 2    2      0 3      0 1 3      1 3          |
|                                                                             |
|   2                 2        2       2      2                  2            |
|- x x  - 2x x x  + 8x x  - x x  - 4x x  - 14x x  + 2x x x  + 32x x  +        |
|   0 2     0 1 2     1 2    0 2     1 2      0 3     0 1 3      1 3          |
|                                                                             |
|                2         2       2    3     2                               |
|  - 4x x x  + 8x x  + 3x x  - 4x x  + x  - 8x x  - 32x x x  + 8x x x         |
|2     0 1 2     1 2     0 2     1 2    2     0 3      0 1 3     0 2 3        |
|                                                                             |
|              2         2       2     3      2                  2            |
| 5x x x  + 24x x  + 4x x  - 9x x  + 3x  - 10x x  + 4x x x  + 70x x  -        |
|   0 1 2      1 2     0 2     1 2     2      0 3     0 1 3      1 3          |
|                                                                             |
|          2         2       2      2                  2                      |
|x x  - 14x x  + 8x x  + 6x x  + 12x x  - 4x x x  - 32x x  + 10x x x  +       |
| 1 2      1 2     0 2     1 2      0 3     0 1 3      1 3      0 2 3         |
|                                                                             |
|                 2          2        2     3     2                   2       |
| + 17x x x  - 24x x  - 10x x  + 11x x  - 3x  - 6x x  + 28x x x  - 70x        |
|      0 1 2      1 2      0 2      1 2     2     0 3      0 1 3      1       |
|                                                                             |
|                                                                             |
|6-dimensional subvariety of PP^9)                                            |
|-----------------------------------------------------------------------------|
|    2                                                      2                 |
| 10t  + 4t t  - 7t t  + 4t t  - 2t t  - 8t t  + 29t t  - 4t  + 10t t  - 4t   |
|    6     0 7     1 7     2 7     4 7     5 7      6 7     7      1 8        |
|                                                                             |
|                                       2                                     |
|t  + 3t t  - 2t t  - 5t t  - 13t t  - t  - 3t t  - 8t t  + 2t t  + 8t t  -   |
| 7     3 7     4 7     5 7      6 7    7     0 8     1 8     3 8     4 8     |
|                                                                             |
|           2                                                                 |
|- 4t t  + t  - 2t t  + t t  + 2t t  - 2t t  - 3t t  + t t  - t t  - t t  +   |
|    6 7    7     1 8    3 8     4 8     5 8     6 8    7 8    0 9    2 9     |
|                                                                             |
|                                                                             |
|        2                  2     2                 2                         |
| x  + 3x x  + 2x x x  - x x  + 6x x  - 2x x x  - 4x x  - x x x  + 8x x x     |
|2 4     2 4     2 3 4    2 4     0 5     0 1 5     1 5    0 2 5     1 2 5    |
|                                                                             |
|              2         2        2       2     3    2                        |
|- 9x x x  - 2x x  - 2x x  + 10x x  + 2x x  - 4x  - x x  - 3x x x  + x x x    |
|    1 2 3     2 3     0 3      1 3     2 3     3    0 4     0 1 4    0 2 4   |
|                                                                             |
|    2      2                2                                                |
|4x x  + 11x x  + x x x  - 2x x  - 5x x x  - 5x x x  - 6x x x  - 2x x x  +    |
|  2 3      0 4    0 1 4     1 4     0 2 4     1 2 4     0 3 4     1 3 4      |
|                                                                             |
|      2         2       2      2                                     2       |
|  + 8x x  + 8x x  + 8x x  - 10x x  - 4x x x  + 6x x x  + 2x x x  + 2x x  +   |
|3     2 3     0 3     2 3      0 4     0 1 4     0 2 4     1 2 4     2 4     |
|                                                                             |
|                       2          2        2       2      3      2           |
|7x x x  + 14x x x  - 5x x  - 10x x  + 38x x  - 8x x  - 12x  + 24x x  - 16x   |
|  0 2 3      1 2 3     2 3      0 3      1 3     2 3      3      0 4         |
|                                                                             |
|                       2          2       2     3      2                     |
|2x x x  - 16x x x  + 4x x  - 28x x  + 8x x  + 8x  - 11x x  + 17x x x  + 4x   |
|  0 2 3      1 2 3     2 3      1 3     2 3     3      0 4      0 1 4        |
|                                                                             |
|               2          2       2      2                 2                 |
|- 16x x x  + 5x x  + 16x x  + 8x x  - 32x x  + 4x x x  + 8x x  - 2x x x  -   |
|     1 2 3     2 3      0 3     2 3      0 4     0 1 4     1 4     0 2 4     |
|                                                                             |
|                       2         2        2        2      3     2            |
|x x x  - 47x x x  + 11x x  - 2x x  - 66x x  + 22x x  + 20x  - 2x x  + 18x    |
| 0 2 3      1 2 3      2 3     0 3      1 3      2 3      3     0 4      0   |
|                                                                             |
|              2         2        2        2     3                2           |
| 26x x x  - 6x x  + 4x x  + 28x x  - 12x x  - 8x  - 10x x x  - 2x x  + 10x   |
|    1 2 3     2 3     0 3      1 3      2 3     3      0 1 4     1 4         |
|                                                                             |
|                              2          2        2        2      3     2    |
|x  - 21x x x  + 47x x x  - 13x x  - 14x x  + 66x x  - 22x x  - 20x  + 2x x   |
| 3      0 2 3      1 2 3      2 3      0 3      1 3      2 3      3     0    |
|-----------------------------------------------------------------------------|
| t  - 13t t  + 13t t  + 18t t  - 4t t  + 4t t  - 7t t  + 4t t  - 2t t  - 21t |
|3 8      4 8      5 8      6 8     7 8     0 9     1 9     2 9     4 9      5|
|                                                                             |
|                                                                             |
| 8t t  - 3t t  - t t  - 2t t  - t t  - 2t t  + 3t t  - 2t t  + 3t t  - 5t t  |
|   5 8     6 8    7 8     0 9    1 9     2 9     3 9     4 9     5 9     6 9 |
|                                                                             |
|                                                                             |
| t t  + 2t t  - t t  + t t  + t t                                            |
|  4 9     5 9    6 9    7 9    8 9                                           |
|                                                                             |
|                                                                             |
|    2                                     2                         2        |
|- 3x x  + 2x x x  + 8x x x  - 9x x x  - 4x x  + 5x x x  - x x x  + x x  + x x|
|    2 5     0 3 5     1 3 5     2 3 5     3 5     0 4 5    2 4 5    4 5    0 |
|                                                                             |
|                                             2      2      2      2          |
| + 3x x x  + 7x x x  - x x x  - 4x x x  + x x  - x x  + x x  - 10x x  - 9x x |
|     1 2 4     0 3 4    1 3 4     2 3 4    0 4    2 4    3 4      0 5     0 1|
|                                                                             |
|            2         2      2      2    3     2                   2         |
|8x x x  + 4x x  + 6x x  - x x  + x x  + x  + 4x x  - 13x x x  - 14x x  - 22x |
|  2 3 4     3 4     0 4    1 4    2 4    4     0 5      0 1 5      1 5      0|
|                                                                             |
|                                 2         2      2     2                 2  |
| 4x x x  - 4x x x  + 3x x x  + 4x x  - 2x x  + x x  - 8x x  - 6x x x  - 4x x |
|   0 3 4     1 3 4     2 3 4     3 4     0 4    2 4     0 5     0 1 5     1 5|
|                                                                             |
|          2                 2                                       2        |
| x x  - 8x x  + 3x x x  - 2x x  + 17x x x  + 17x x x  - 5x x x  - 8x x  + 15x|
|0 1 4     1 4     1 2 4     2 4      0 3 4      1 3 4     2 3 4     3 4      |
|                                                                             |
|2                2                                      2         2       2  |
| x  - 6x x x  + x x  - 12x x x  - 8x x x  + 6x x x  + 4x x  - 6x x  + 3x x  +|
|1 4     1 2 4    2 4      0 3 4     1 3 4     2 3 4     3 4     0 4     1 4  |
|                                                                             |
|             2                                      2          2     3      2|
| 4x x x  + 2x x  - 4x x x  - 16x x x  + 6x x x  + 8x x  - 14x x  - 2x  - 10x |
|   1 2 4     2 4     0 3 4      1 3 4     2 3 4     3 4      0 4     4      0|
|                                                                             |
|         2                           2                                     2 |
|x x  + 2x x  - 8x x x  + 2x x x  + 2x x  - 19x x x  - 7x x x  + x x x  + 4x x|
| 1 4     1 4     0 2 4     1 2 4     2 4      0 3 4     1 3 4    2 3 4     3 |
|                                                                             |
|                   2                              2       2       2      2   |
| x x  + 3x x x  + x x  + 10x x x  + 2x x x  - 2x x  + 2x x  + 2x x  + 12x x  |
|0 2 4     1 2 4    2 4      0 3 4     1 3 4     1 4     2 4     3 4      1 5 |
|                                                                             |
|                 2                            2                              |
|  - 2x x x  - 10x x  - 11x x x  + 8x x x  - 5x x  + 3x x x  + 23x x x  - 11x |
|4     0 1 4      1 4      0 2 4     1 2 4     2 4     0 3 4      1 3 4      2|
|-----------------------------------------------------------------------------|
|t  + 19t t  - 4t t  - 4t t ,                                                 |
| 9      6 9     7 9     8 9                                                  |
|                                                                             |
|                                                                             |
|- t t  - t t ,                                                               |
|   7 9    8 9                                                                |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|2       2       2       2      2     3               2                       |
|  - 6x x  + 2x x  + 6x x  + x x  - 2x  + 4x x x  - 4x x  - 11x x x  - 2x x x |
|5     1 5     2 5     3 5    4 5     5     0 1 6     1 6      0 2 6     1 2  |
|                                                                             |
|                           2                                     2           |
|x  + 8x x x  + 9x x x  + 2x x  + 8x x x  - 8x x x  - 6x x x  + 6x x  - 3x x  |
| 5     0 2 5     1 2 5     2 5     0 3 5     1 3 5     2 3 5     3 5     0 4 |
|                                                                             |
|                                                    2                        |
|x x  - 11x x x  + 2x x x  + 18x x x  + 12x x x  - 4x x  + 10x x x  - 4x x x  |
| 2 5      1 2 5     0 3 5      1 3 5      2 3 5     3 5      0 4 5     1 4 5 |
|                                                                             |
|                           2                                                 |
| + 12x x x  + 12x x x  - 2x x  + 7x x x  + 4x x x  - 7x x x  - x x x  + 5x x |
|      0 2 5      1 2 5     2 5     0 3 5     1 3 5     2 3 5    0 4 5     2  |
|                                                                             |
|  2       2       2     3     2                   2                          |
| x  - 5x x  + 5x x  + 3x  - 4x x  - 16x x x  + 20x x  + 2x x x  - 5x x x  +  |
|0 4     1 4     3 4     4     0 5      0 1 5      1 5     0 2 5     1 2 5    |
|                                                                             |
|    2       2    3     2                  2                            2     |
| x x  - 2x x  - x  + 5x x  + 7x x x  - 22x x  - 2x x x  + 10x x x  - 3x x  - |
|  2 4     3 4    4     0 5     0 1 5      1 5     0 2 5      1 2 5     2 5   |
|                                                                             |
|                  2                            2                             |
|x  + 26x x x  + 4x x  - 4x x x  + 10x x x  - 2x x  - 26x x x  - 8x x x  - 9x |
| 5      0 1 5     1 5     0 2 5      1 2 5     2 5      0 3 5     1 3 5      |
|                                                                             |
|        2       2       2       2    3     2                   2             |
|  - 3x x  + 7x x  - 3x x  - 7x x  - x  + 9x x  - 12x x x  - 42x x  + 7x x x  |
|4     0 4     1 4     2 4     3 4    4     0 5      0 1 5      1 5     0 2 5 |
|                                                                             |
|                         2                                        2          |
|+ 4x x x  - 17x x x  + 7x x  + 2x x x  - 24x x x  + 18x x x  + 12x x  - x x  |
|    0 2 5      1 2 5     2 5     0 3 5      1 3 5      2 3 5      3 5    1 4 |
|                                                                             |
|          2         2       2       2       2    3      2                    |
|x x  - 12x x  + 3x x  - 3x x  - 2x x  + 3x x  + x  - 11x x  + 14x x x  + 34x |
| 3 4      3 4     0 4     1 4     2 4     3 4    4      0 5      0 1 5       |
|-----------------------------------------------------------------------------|
|      2                                     2                                |
|  + 6x x  - 4x x x  + 8x x x  + 2x x x  - 4x x  + 2x x x  - 5x x x  - 2x x   |
|6     2 6     0 3 6     1 3 6     2 3 6     3 6     1 4 6     2 4 6     3 4  |
|                                                                             |
|                            2       2       2     2                2         |
|x  + 3x x x  + x x x  - 4x x  + 4x x  - 2x x  + 4x x  - x x x  - 6x x  - 2x  |
| 5     2 4 5    3 4 5     0 5     2 5     3 5     0 6    0 1 6     1 6       |
|                                                                             |
|               2         2        2       2       2      2     3      2      |
| - 7x x x  + 4x x  - 6x x  - 15x x  - 8x x  + 8x x  - x x  - 4x  + 18x x  +  |
|     2 4 5     4 5     0 5      1 5     2 5     3 5    4 5     5      0 6    |
|                                                                             |
|                2         2       2       2       2      2     3     2       |
| x  + x x x  + x x  - 3x x  - 6x x  + 6x x  + 5x x  + x x  - 2x  - 3x x  -   |
|4 5    3 4 5    4 5     0 5     1 5     2 5     3 5    4 5     5     0 6     |
|                                                                             |
|  2                                        2                                 |
|2x x  + 15x x x  - 41x x x  + 6x x x  + 20x x  - 4x x x  - 12x x x  + x x x  |
|  2 5      0 3 5      1 3 5     2 3 5      3 5     0 4 5      1 4 5    2 4   |
|                                                                             |
|                                    2                                        |
| 6x x x  + 38x x x  - 10x x x  - 16x x  + 3x x x  + 9x x x  - 4x x x  - 8x   |
|   0 3 5      1 3 5      2 3 5      3 5     0 4 5     1 4 5     2 4 5     3  |
|                                                                             |
|          2                                                  2         2     |
| x x  + 4x x  - 11x x x  + 12x x x  - 3x x x  - 12x x x  - 3x x  + 7x x  +   |
|2 3 5     3 5      0 4 5      1 4 5     2 4 5      3 4 5     4 5     0 5     |
|                                                                             |
|                2                                         2                  |
| + 28x x x  - 4x x  + 13x x x  + 82x x x  - 24x x x  - 38x x  + 16x x x  +   |
|      1 2 5     2 5      0 3 5      1 3 5      2 3 5      3 5      0 4 5     |
|                                                                             |
|                             2       2       2     2                  2      |
|x  + 3x x x  + 2x x x  + 3x x  - 5x x  - 4x x  - 6x x  - 12x x x  - 6x x  +  |
| 5     2 4 5     3 4 5     1 5     2 5     3 5     0 6      0 1 6     1 6    |
|                                                                             |
|2                            2                                         2     |
| x  - 6x x x  - 16x x x  + 3x x  - 15x x x  - 66x x x  + 12x x x  + 30x x    |
|1 5     0 2 5      1 2 5     2 5      0 3 5      1 3 5      2 3 5      3 5   |
|-----------------------------------------------------------------------------|
|                                                        2         2          |
|x  + 4x x x  + 4x x x  - 2x x x  - 4x x x  + x x x  + 5x x  + 2x x  + 2x     |
| 6     0 5 6     1 5 6     2 5 6     3 5 6    4 5 6     5 6     0 6          |
|                                                                             |
|                               2                                             |
| x x  + 4x x x  + 14x x x  - 8x x  + 5x x x  - x x x  - 2x x x  + 2x x x     |
|1 2 6     0 3 6      1 3 6     3 6     0 4 6    1 4 6     2 4 6     3 4      |
|                                                                             |
|               2                                                  2          |
| 28x x x  + 10x x  - 4x x x  - 30x x x  - 22x x x  + 4x x x  + 12x x  +      |
|    0 1 6      1 6     0 2 6      0 3 6      1 3 6     2 3 6      3 6        |
|                                                                             |
|            2                           2                                    |
|8x x x  - 4x x  + 7x x x  + 2x x x  + 3x x  + 4x x x  + 4x x x  + x x x      |
|  0 1 6     1 6     0 2 6     1 2 6     2 6     0 3 6     1 3 6    2 3 6     |
|                                                                             |
|                2         2        2      2        2       2     3           |
|  + 12x x x  - x x  - 5x x  + 11x x  - x x  - 11x x  - 4x x  + 2x  + 20x     |
|5      3 4 5    4 5     0 5      1 5    2 5      3 5     4 5     5           |
|                                                                             |
|           2        2       2        2       2     3      2                  |
|x x  + 3x x  - 12x x  + 3x x  + 10x x  + 3x x  - 2x  - 18x x  + 18x x x      |
| 4 5     0 5      1 5     2 5      3 5     4 5     5      0 6      0 1 6     |
|                                                                             |
|    2       2       2       2     3      2                  2                |
|6x x  + 3x x  - 6x x  + 3x x  + 2x  - 30x x  - 14x x x  + 4x x  + 3x x x     |
|  1 5     2 5     3 5     4 5     5      0 6      0 1 6     1 6     0 2      |
|                                                                             |
|            2         2        2       2        2      2     3      2        |
|4x x x  + 6x x  - 3x x  - 27x x  + 9x x  + 27x x  + x x  - 6x  + 16x x       |
|  2 4 5     4 5     0 5      1 5     2 5      3 5    4 5     5      0 6      |
|                                                                             |
|                                                        2                    |
| 9x x x  + 10x x x  + 10x x x  + 10x x x  - 6x x x  - 4x x  - 5x x x  -      |
|   0 2 6      1 2 6      0 3 6      1 3 6     2 3 6     3 6     0 4 6        |
|                                                                             |
|                                             2         2        2            |
|- 19x x x  + 2x x x  - 5x x x  - 2x x x  - 7x x  + 6x x  + 21x x  - 3x x     |
|     0 4 5     1 4 5     2 4 5     3 4 5     4 5     0 5      1 5     2      |
|-----------------------------------------------------------------------------|
|  2       2       2      2       2     3                                     |
| x  - 6x x  - 2x x  + x x  - 3x x  + 2x ,                                    |
|1 6     2 6     3 6    4 6     5 6     6                                     |
|                                                                             |
|     2                                               2         2       2     |
|  + x x  + 2x x x  - 8x x x  + 10x x x  + x x x  - 2x x  + 4x x  + 4x x      |
|6    4 6     0 5 6     1 5 6      3 5 6    4 5 6     5 6     0 6     1 6     |
|                                                                             |
|                                          2                                  |
|11x x x  + 7x x x  + 2x x x  - 8x x x  + x x  + 30x x x  + 27x x x  - 4x     |
|   0 4 6     1 4 6     2 4 6     3 4 6    4 6      0 5 6      1 5 6     2    |
|                                                                             |
|                                                                        2    |
| - x x x  - 2x x x  + x x x  + 4x x x  + 5x x x  + x x x  + 2x x x  + 4x     |
|    0 4 6     1 4 6    2 4 6     0 5 6     2 5 6    3 5 6     4 5 6     5    |
|                                                                             |
|2                  2                            2                            |
| x  + 8x x x  - 28x x  - 6x x x  + 12x x x  - 4x x  - 6x x x  + 58x x x      |
|0 6     0 1 6      1 6     0 2 6      1 2 6     2 6     0 3 6      1 3 6     |
|                                                                             |
|      2                  2                                         2         |
| + 20x x  - 12x x x  + 2x x  - 12x x x  - 36x x x  + 12x x x  + 16x x  -     |
|      1 6      1 2 6     2 6      0 3 6      1 3 6      2 3 6      3 6       |
|                                                                             |
|                 2                                       2                   |
|  - 10x x x  + 4x x  + 14x x x  - 8x x x  + 12x x x  + 4x x  - 25x x x  -    |
|6      1 2 6     2 6      0 3 6     1 3 6      2 3 6     3 6      0 4 6      |
|                                                                             |
|               2                             2                               |
|+ 9x x x  + 24x x  - 13x x x  - 22x x x  + 5x x  - 16x x x  - 54x x x  +     |
|    0 1 6      1 6      0 2 6      1 2 6     2 6      0 3 6      1 3 6       |
|                                                                             |
|                               2                                             |
|5x x x  + 4x x x  + 4x x x  - x x  - x x x  + x x x  + 8x x x  + 2x x x      |
|  1 4 6     2 4 6     3 4 6    4 6    0 5 6    1 5 6     2 5 6     3 5 6     |
|                                                                             |
|2        2      2     3     2                  2                             |
|  - 21x x  + x x  + 5x  - 8x x  + 7x x x  - 32x x  - 13x x x  + 28x x x      |
|5      3 5    4 5     5     0 6     0 1 6      1 6      0 2 6      1 2 6     |
|-----------------------------------------------------------------------------|
|      2       2       2                                                      |
|- 4x x  + 2x x  + 4x x ,                                                     |
|    3 6     4 6     5 6                                                      |
|                                                                             |
|                                2         2       2                          |
|x x  - 24x x x  + 13x x x  + 12x x  - 2x x  - 2x x ,                         |
| 5 6      3 5 6      4 5 6      5 6     1 6     4 6                          |
|                                                                             |
|         2       2       2      2       2                                    |
|x  - 3x x  - 2x x  - 2x x  - x x  - 2x x ,                                   |
| 6     0 6     1 6     2 6    4 6     5 6                                    |
|                                                                             |
|                2                                                2           |
|- 14x x x  - 28x x  + 26x x x  + 6x x x  - 4x x x  - 6x x x  + 8x x  + 8x x x|
|     2 3 6      3 6      0 4 6     1 4 6     2 4 6     3 4 6     4 6     0 5 |
|                                                                             |
|                                 2                                           |
|18x x x  + 2x x x  + 4x x x  - 4x x  + 28x x x  - 8x x x  - 24x x x  - 4x x x|
|   0 4 6     1 4 6     2 4 6     4 6      1 5 6     2 5 6      3 5 6     4 5 |
|                                                                             |
|                                 2                                           |
| 8x x x  + 3x x x  + 8x x x  - 5x x  - 23x x x  + 2x x x  - 6x x x  - 2x x x |
|   1 4 6     2 4 6     3 4 6     4 6      0 5 6     1 5 6     2 5 6     3 5 6|
|                                                                             |
|              2                                              2               |
|21x x x  + 28x x  + 7x x x  + 4x x x  - 6x x x  - 6x x x  - x x  + 17x x x  +|
|   2 3 6      3 6     0 4 6     1 4 6     2 4 6     3 4 6    4 6      0 5 6  |
|                                                                             |
|             2         2       2       2       2       2                     |
|- x x x  + 2x x  - 6x x  - 6x x  + 4x x  - 2x x  - 4x x ,                    |
|   4 5 6     5 6     0 6     1 6     3 6     4 6     5 6                     |
|                                                                             |
|    2                              2                                         |
|- 9x x  + 70x x x  - 27x x x  - 36x x  + x x x  + 4x x x  - 7x x x  - 2x x x |
|    2 6      1 3 6      2 3 6      3 6    0 4 6     1 4 6     2 4 6     3 4 6|
|-----------------------------------------------------------------------------|
|                                                2         2        2       2 |
|  - 32x x x  + 5x x x  + 32x x x  + 7x x x  - 9x x  + 4x x  + 20x x  - 6x x  |
|6      1 5 6     2 5 6      3 5 6     4 5 6     5 6     0 6      1 6     2 6 |
|                                                                             |
|      2          2       2       2       2       2       2                   |
|  + 8x x  - 12x x  - 8x x  + 4x x  + 8x x  - 4x x  - 8x x ,                  |
|6     5 6      0 6     1 6     2 6     3 6     4 6     5 6                   |
|                                                                             |
|                2         2       2       2       2       2       2          |
| - 11x x x  - 2x x  - 6x x  - 4x x  + 4x x  + 4x x  - 2x x  - 4x x ,         |
|      4 5 6     5 6     0 6     1 6     2 6     3 6     4 6     5 6          |
|                                                                             |
|                                               2          2       2       2  |
| 29x x x  - 13x x x  - 33x x x  + 9x x x  + 12x x  + 14x x  - 6x x  + 6x x  +|
|    1 5 6      2 5 6      3 5 6     4 5 6      5 6      0 6     1 6     3 6  |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|     2                                                             2         |
| + 3x x  - 25x x x  - 23x x x  + 4x x x  + 27x x x  - 14x x x  - 9x x  - 2x x|
|     4 6      0 5 6      1 5 6     2 5 6      3 5 6      4 5 6     5 6     0 |
|-----------------------------------------------------------------------------|
|       2       2        2     3                                              |
|- 20x x  + 2x x  + 12x x  - 4x ,                                             |
|     3 6     4 6      5 6     6                                              |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|     2       2     3                                                         |
| 3x x  - 2x x  + 4x ,                                                        |
|   4 6     5 6     6                                                         |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|2        2       2        2       2       2                                  |
|  + 10x x  - 6x x  - 10x x  + 3x x  - 2x x                                   |
|6      1 6     2 6      3 6     4 6     5 6                                  |
+-----------------------------------------------------------------------------+
|i2 : time describe oo                                                        |
|     -- used 0.114234 seconds                                                |
|                                                                             |
|o2 = rational map defined by forms of degree 3                               |
|     source variety: PP^6                                                    |
|     target variety: complete intersection of type (2,2,2) in PP^9           |
|     dominance: true                                                         |
|     birationality: true                                                     |
|     projective degrees: {1, 3, 9, 17, 21, 16, 8}                            |
|     number of minimal representatives: 1                                    |
|     dimension base locus: 3                                                 |
|     degree base locus: 10                                                   |
|     coefficient ring: QQ                                                    |
+-----------------------------------------------------------------------------+

See also
========

  * specialCremonaTransformation, --
    special Cremona transformations whose base locus has dimension at most
    three
  * specialQuadraticTransformation, --
    special quadratic transformations whose base locus has dimension three
  * quadroQuadricCremonaTransformation
    -- quadro-quadric Cremona
    transformations

Ways to use specialCubicTransformation :
========================================

  * "specialCubicTransformation(Ring,ZZ)"
  * "specialCubicTransformation(ZZ)"
  * "specialCubicTransformation(ZZ,Ring)"

For the programmer
==================

The object specialCubicTransformation, is a
method function (Macaulay2Doc).

specialQuadraticTransformation -- special quadratic transformations whose base locus has dimension three
********************************************************************************************************

Synopsis
========

  * Usage:
        specialQuadraticTransformation i
        specialQuadraticTransformation(i,K)
  * Inputs:
      * i, an integer (Macaulay2Doc), an integer between 1 and 11
      * K, a ring (Macaulay2Doc), the ground field (optional, the
        default value is QQ (Macaulay2Doc))
  * Outputs:
      * a rational map, an example of special quadratic
        birational transformation over K, according to the classification given
        in Table 1 of Examples of special quadratic birational transformations
        into complete intersections of quadrics (see
        https://www.sciencedirect.com/science/article/pii/S0747717115001029?via
        %3Dihub ).

Description
===========

The field K is required to be large enough.

+-----------------------------------------------------------------------------+
|i1 : time specialQuadraticTransformation 4                                   |
|     -- used 0.194148 seconds                                                |
|                                                                             |
|o1 = -- rational map --                                                      |
|     source: Proj(QQ[x , x , x , x , x , x , x , x , x ])                    |
|                      0   1   2   3   4   5   6   7   8                      |
|     target: subvariety of Proj(QQ[y , y , y , y , y , y , y , y , y , y ])  |
|                                    0   1   2   3   4   5   6   7   8   9    |
|             {                                                               |
|                 2      2             2        2      2             2        |
|              y y  - y y  - y y y  + y y  + y y  - y y  - y y y  + y y  + y  |
|               0 1    1 2    0 1 3    2 3    1 3    2 3    0 1 4    1 4    1 |
|             }                                                               |
|     defining forms: {                                                       |
|                                                   2                         |
|                      x x  + x x  - x x  - x x  - x  - x x  + x x  - x x ,   |
|                       0 7    2 7    4 7    5 7    7    3 8    6 8    7 8    |
|                                                                             |
|                      x x  - x x  - x x  + x x ,                             |
|                       5 6    4 7    5 7    6 8                              |
|                                                                             |
|                      x x  - x x ,                                           |
|                       2 6    1 7                                            |
|                                                                             |
|                      x x  - x x  - x x  + x x  + x x ,                      |
|                       3 5    1 7    5 7    6 7    6 8                       |
|                                                                             |
|                                     2                                       |
|                      x x  - x x  - x  - x x  - x x  + x x  - x x ,          |
|                       2 5    4 5    5    6 7    1 8    4 8    5 8           |
|                                                                             |
|                      x x  - x x  + x x  + x x ,                             |
|                       0 5    5 7    6 7    6 8                              |
|                                                                             |
|                                                   2                         |
|                      x x  - x x  - x x  + x x  + x  + x x ,                 |
|                       3 4    0 6    1 6    4 6    6    5 7                  |
|                                                                             |
|                                            2                                |
|                      x x  - x x  + x x  + x  + x x  - x x  + x x ,          |
|                       2 4    1 5    4 5    5    6 7    4 8    5 8           |
|                                                                             |
|                                                   2                         |
|                      x x  + x x  - x x  - x x  - x  - x x  + x x  - x x ,   |
|                       0 2    3 7    4 7    5 7    7    0 8    6 8    7 8    |
|                                                                             |
|                                                   2                         |
|                      x x  - x x  + x x  - x x  - x  - x x                   |
|                       0 1    0 4    3 6    4 6    6    5 7                  |
|                     }                                                       |
|                                                                             |
|o1 : RationalMap (quadratic birational map from PP^8 to hypersurface in PP^9 |
|-----------------------------------------------------------------------------|
|defined by                                                                   |
|                                                                             |
|                                                                             |
|                            2             2                                  |
|y y  + y y y  - y y y  - y y  + y y y  - y y  - y y y  + y y y  + y y y  +   |
| 2 5    0 4 5    3 4 5    1 5    0 1 6    1 6    0 2 6    1 3 6    1 4 6     |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|)                                                                            |
|-----------------------------------------------------------------------------|
| 2                                          2                                |
|y y  - y y y  + y y y  - y y y  - y y y  - y y  + y y y  + y y y  - y y y  - |
| 1 7    1 2 7    2 5 7    3 5 7    5 6 7    1 8    1 2 8    1 5 8    2 5 8   |
|-----------------------------------------------------------------------------|
|                            2                                                |
|y y y  - y y y  + y y y  - y y  - y y y  + y y y  + y y y  - y y y  + y y y  |
| 4 6 8    1 7 8    3 7 8    1 9    2 4 9    3 4 9    1 5 9    2 5 9    0 7 9 |
|-----------------------------------------------------------------------------|
|- y y y  + y y y                                                             |
|   1 7 9    1 8 9                                                            |
+-----------------------------------------------------------------------------+
|i2 : time describe oo                                                        |
|     -- used 0.00637759 seconds                                              |
|                                                                             |
|o2 = rational map defined by forms of degree 2                               |
|     source variety: PP^8                                                    |
|     target variety: hypersurface of degree 3 in PP^9                        |
|     dominance: true                                                         |
|     birationality: true                                                     |
|     projective degrees: {1, 2, 4, 8, 16, 21, 17, 9, 3}                      |
|     number of minimal representatives: 1                                    |
|     dimension base locus: 3                                                 |
|     degree base locus: 11                                                   |
|     coefficient ring: QQ                                                    |
+-----------------------------------------------------------------------------+

See also
========

  * specialCremonaTransformation, --
    special Cremona transformations whose base locus has dimension at most
    three
  * specialCubicTransformation -- special
    cubic transformations whose base locus has dimension at most three
  * quadroQuadricCremonaTransformation
    -- quadro-quadric Cremona
    transformations

Ways to use specialQuadraticTransformation :
============================================

  * "specialQuadraticTransformation(Ring,ZZ)"
  * "specialQuadraticTransformation(ZZ)"
  * "specialQuadraticTransformation(ZZ,Ring)"

For the programmer
==================

The object specialQuadraticTransformation,
is a method function (Macaulay2Doc).

substitute(RationalMap,PolynomialRing,PolynomialRing) -- substitute the ambient projective spaces of source and target
**********************************************************************************************************************

Synopsis
========

  * Function: substitute (Macaulay2Doc),
  * Usage:
        sub(phi,R,S)
  * Inputs:
      * phi, a rational map,
        $\phi:X\subseteq\mathbb{P}^n\dashrightarrow Y\subseteq\mathbb{P}^m$
      * R, a polynomial ring (Macaulay2Doc), the
        coordinate ring of $\mathbb{P}^n$
      * S, a polynomial ring (Macaulay2Doc), the
        coordinate ring of $\mathbb{P}^m$
  * Outputs:
      * a rational map, a rational map isomorphic to the
        original map such that the ambient (Macaulay2Doc), of the
        source, is $R$ and the ambient (Macaulay2Doc),
        of the target, is
        $S$

Description
===========

+-----------------------------------------------------------------------------+
|i1 : ZZ/3331[vars(0..5)];                                                    |
+-----------------------------------------------------------------------------+
|i2 : phi = rationalMap {e^2-d*f, c*e-b*f, c*d-b*e, c^2-a*f, b*c-a*e, b^2-a*d}|
|                                                                             |
|o2 = -- rational map --                                                      |
|                   ZZ                                                        |
|     source: Proj(----[a, b, c, d, e, f])                                    |
|                  3331                                                       |
|                   ZZ                                                        |
|     target: Proj(----[a, b, c, d, e, f])                                    |
|                  3331                                                       |
|     defining forms: {                                                       |
|                       2                                                     |
|                      e  - d*f,                                              |
|                                                                             |
|                      c*e - b*f,                                             |
|                                                                             |
|                      c*d - b*e,                                             |
|                                                                             |
|                       2                                                     |
|                      c  - a*f,                                              |
|                                                                             |
|                      b*c - a*e,                                             |
|                                                                             |
|                       2                                                     |
|                      b  - a*d                                               |
|                     }                                                       |
|                                                                             |
|o2 : RationalMap (quadratic rational map from PP^5 to PP^5)                  |
+-----------------------------------------------------------------------------+
|i3 : R = ZZ/3331[x_0..x_5], S = ZZ/3331[y_0..y_5];                           |
+-----------------------------------------------------------------------------+
|i4 : sub(phi,R,S)                                                            |
|                                                                             |
|o4 = -- rational map --                                                      |
|                   ZZ                                                        |
|     source: Proj(----[x , x , x , x , x , x ])                              |
|                  3331  0   1   2   3   4   5                                |
|                   ZZ                                                        |
|     target: Proj(----[y , y , y , y , y , y ])                              |
|                  3331  0   1   2   3   4   5                                |
|     defining forms: {                                                       |
|                       2                                                     |
|                      x  - x x ,                                             |
|                       4    3 5                                              |
|                                                                             |
|                      x x  - x x ,                                           |
|                       2 4    1 5                                            |
|                                                                             |
|                      x x  - x x ,                                           |
|                       2 3    1 4                                            |
|                                                                             |
|                       2                                                     |
|                      x  - x x ,                                             |
|                       2    0 5                                              |
|                                                                             |
|                      x x  - x x ,                                           |
|                       1 2    0 4                                            |
|                                                                             |
|                       2                                                     |
|                      x  - x x                                               |
|                       1    0 3                                              |
|                     }                                                       |
|                                                                             |
|o4 : RationalMap (quadratic rational map from PP^5 to PP^5)                  |
+-----------------------------------------------------------------------------+

See also
========

  * RationalMap ** Ring -- change the
    coefficient ring of a rational map

Ways to use this method:
========================

  * substitute(RationalMap,PolynomialRing,PolynomialRing),
    --
    substitute the ambient projective spaces of source and target

super(RationalMap) -- get the rational map whose target is a projective space
*****************************************************************************

Synopsis
========

  * Function: super (Macaulay2Doc),
  * Usage:
        super phi
        rationalMap(phi,Dominant=>null)
        rationalMap phi
  * Inputs:
      * phi, a rational map, whose target is a subvariety
        $Y\subset\mathbb{P}^n$
  * Outputs:
      * a rational map, the composition of phi with the
        inclusion of $Y$ into $\mathbb{P}^n$

Description
===========

So that, for instance, if phi is a dominant map, then the code
rationalMap(super phi,Dominant=>true) yields a map isomorphic to phi.

+-----------------------------------------------------------------------------+
|i1 : phi = specialQuadraticTransformation 7;                                 |
|                                                                             |
|o1 : RationalMap (quadratic birational map from PP^8 to 8-dimensional        |
|-----------------------------------------------------------------------------|
|subvariety of PP^10)                                                         |
+-----------------------------------------------------------------------------+
|i2 : phi' = super phi;                                                       |
|                                                                             |
|o2 : RationalMap (quadratic rational map from PP^8 to PP^10)                 |
+-----------------------------------------------------------------------------+
|i3 : describe phi                                                            |
|                                                                             |
|o3 = rational map defined by forms of degree 2                               |
|     source variety: PP^8                                                    |
|     target variety: complete intersection of type (2,2) in PP^10            |
|     dominance: true                                                         |
|     birationality: true                                                     |
|     projective degrees: {1, 2, 4, 8, 16, 22, 20, 12, 4}                     |
|     number of minimal representatives: 1                                    |
|     dimension base locus: 3                                                 |
|     degree base locus: 10                                                   |
|     coefficient ring: QQ                                                    |
+-----------------------------------------------------------------------------+
|i4 : describe phi'                                                           |
|                                                                             |
|o4 = rational map defined by forms of degree 2                               |
|     source variety: PP^8                                                    |
|     target variety: PP^10                                                   |
|     image: complete intersection of type (2,2) in PP^10                     |
|     dominance: false                                                        |
|     birationality: false                                                    |
|     degree of map: 1                                                        |
|     projective degrees: {1, 2, 4, 8, 16, 22, 20, 12, 4}                     |
|     number of minimal representatives: 1                                    |
|     dimension base locus: 3                                                 |
|     degree base locus: 10                                                   |
|     coefficient ring: QQ                                                    |
+-----------------------------------------------------------------------------+
|i5 : describe rationalMap(phi',Dominant=>true)                               |
|                                                                             |
|o5 = rational map defined by forms of degree 2                               |
|     source variety: PP^8                                                    |
|     target variety: complete intersection of type (2,2) in PP^10            |
|     dominance: true                                                         |
|     birationality: true                                                     |
|     projective degrees: {1, 2, 4, 8, 16, 22, 20, 12, 4}                     |
|     number of minimal representatives: 1                                    |
|     dimension base locus: 3                                                 |
|     degree base locus: 10                                                   |
|     coefficient ring: QQ                                                    |
+-----------------------------------------------------------------------------+

See also
========

  * target(RationalMap) -- coordinate ring of
    the target for a rational map
  * ambient (Macaulay2Doc) -- ambient free module of a
    subquotient, or ambient ring
  * super (Macaulay2Doc) -- get the ambient module

Ways to use this method:
========================

  * super(RationalMap) -- get the rational map
    whose target is a projective space

target(RationalMap) -- coordinate ring of the target for a rational map
***********************************************************************

Synopsis
========

  * Function: target (Macaulay2Doc),
  * Usage:
        target phi
  * Inputs:
      * phi, a rational map,
  * Outputs:
      * a ring (Macaulay2Doc), the coordinate ring of the target of
        phi

Description
===========

This is equivalent to source map phi.

See also
========

  * source(RationalMap) -- coordinate ring of
    the source for a rational map

Ways to use this method:
========================

  * target(RationalMap) -- coordinate ring of
    the target for a rational map

toExternalString(RationalMap) -- convert to a readable string
*************************************************************

Synopsis
========

  * Function: toExternalString (Macaulay2Doc),
  * Usage:
        toExternalString phi
  * Inputs:
      * phi, a rational map,
  * Outputs:
      * a string (Macaulay2Doc), a string representation of phi,
        which can be used, in conjunction with value (Macaulay2Doc),
        to read the object back into the program later

Description
===========

All internal data of the input are included in the returned string.

+-------------------------------------------------------------------------+
|i1 : phi = (specialCubicTransformation(2,ZZ/33331))!;                    |
|                                                                         |
|o1 : RationalMap (cubic birational map from PP^3 to hypersurface in PP^4)|
+-------------------------------------------------------------------------+
|i2 : str = toExternalString phi;                                         |
+-------------------------------------------------------------------------+
|i3 : #str                                                                |
|                                                                         |
|o3 = 7432                                                                |
+-------------------------------------------------------------------------+
|i4 : time phi' = value str;                                              |
|     -- used 0.0330062 seconds                                           |
|                                                                         |
|o4 : RationalMap (cubic birational map from PP^3 to hypersurface in PP^4)|
+-------------------------------------------------------------------------+
|i5 : time describe phi'                                                  |
|     -- used 0.0132171 seconds                                           |
|                                                                         |
|o5 = rational map defined by forms of degree 3                           |
|     source variety: PP^3                                                |
|     target variety: smooth quadric hypersurface in PP^4                 |
|     dominance: true                                                     |
|     birationality: true (the inverse map is already calculated)         |
|     projective degrees: {1, 3, 4, 2}                                    |
|     number of minimal representatives: 1                                |
|     dimension base locus: 1                                             |
|     degree base locus: 5                                                |
|     coefficient ring: ZZ/33331                                          |
+-------------------------------------------------------------------------+
|i6 : time describe inverse phi'                                          |
|     -- used 0.0134457 seconds                                           |
|                                                                         |
|o6 = rational map defined by forms of degree 2                           |
|     source variety: smooth quadric hypersurface in PP^4                 |
|     target variety: PP^3                                                |
|     dominance: true                                                     |
|     birationality: true (the inverse map is already calculated)         |
|     projective degrees: {2, 4, 3, 1}                                    |
|     number of minimal representatives: 1                                |
|     dimension base locus: 1                                             |
|     degree base locus: 5                                                |
|     coefficient ring: ZZ/33331                                          |
+-------------------------------------------------------------------------+

Ways to use this method:
========================

  * toExternalString(RationalMap), --
    convert to a readable string

toMap -- rational map defined by a linear system
************************************************

Synopsis
========

  * Usage:
        toMap("linear system")
  * Inputs:
      * a matrix (Macaulay2Doc), or a list (Macaulay2Doc),
        etc.
  * Optional inputs (Macaulay2Doc),:
      * Dominant, => ..., default value null, null
  * Outputs:
      * a ring map (Macaulay2Doc),

Description
===========

When the input represents a list of homogeneous elements $F_0,\ldots,F_m\in
R=K[t_0,\ldots,t_n]/I$ of the same degree, then the method returns the ring map
$\phi:K[x_0,\ldots,x_m] \to R$ that sends $x_i$ into $F_i$.

+-------------------------------------------------------------------+
|i1 : QQ[t_0,t_1];                                                  |
+-------------------------------------------------------------------+
|i2 : linSys=gens (ideal(t_0,t_1))^5                                |
|                                                                   |
|o2 = | t_0^5 t_0^4t_1 t_0^3t_1^2 t_0^2t_1^3 t_0t_1^4 t_1^5 |       |
|                                                                   |
|                        1                  6                       |
|o2 : Matrix (QQ[t ..t ])  <--- (QQ[t ..t ])                        |
|                 0   1              0   1                          |
+-------------------------------------------------------------------+
|i3 : phi=toMap linSys                                              |
|                                                                   |
|                                    5   4     3 2   2 3     4   5  |
|o3 = map (QQ[t ..t ], QQ[x ..x ], {t , t t , t t , t t , t t , t })|
|              0   1       0   5     0   0 1   0 1   0 1   0 1   1  |
|                                                                   |
|o3 : RingMap QQ[t ..t ] <--- QQ[x ..x ]                            |
|                 0   1           0   5                             |
+-------------------------------------------------------------------+

If a positive integer $d$ is passed to the option Dominant,
then the method returns the induced map on $K[x_0,\ldots,x_m]/J_d$, where $J_d$
is the ideal generated by all homogeneous elements of degree $d$ of the kernel
of $\phi$ (in this case kernel(RingMap,ZZ), is
called).

+-----------------------------------------------------------------------------+
|i4 : phi'=toMap(linSys,Dominant=>2)                                          |
|                                                                             |
|                                                                             |
|                                                                             |
|o4 = map (QQ[t ..t ], -------------------------------------------------------|
|              0   1     2                                                 2  |
|                      (x  - x x , x x  - x x , x x  - x x , x x  - x x , x  -|
|                        4    3 5   3 4    2 5   2 4    1 5   1 4    0 5   3  |
|                                                                             |
|                                                                             |
|                                                                             |
|o4 : RingMap QQ[t ..t ] <--- ------------------------------------------------|
|                 0   1         2                                             |
|                             (x  - x x , x x  - x x , x x  - x x , x x  - x x|
|                               4    3 5   3 4    2 5   2 4    1 5   1 4    0 |
|-----------------------------------------------------------------------------|
| QQ[x ..x ]                                                                  |
|     0   5                                                             5   4 |
|-------------------------------------------------------------------, {t , t t|
|                                  2                       2            0   0 |
| x x , x x  - x x , x x  - x x , x  - x x , x x  - x x , x  - x x )          |
|  1 5   2 3    0 5   1 3    0 4   2    0 4   1 2    0 3   1    0 2           |
|                                                                             |
|        QQ[x ..x ]                                                           |
|            0   5                                                            |
|--------------------------------------------------------------------------   |
|    2                                    2                       2           |
| , x  - x x , x x  - x x , x x  - x x , x  - x x , x x  - x x , x  - x x )   |
|5   3    1 5   2 3    0 5   1 3    0 4   2    0 4   1 2    0 3   1    0 2    |
|-----------------------------------------------------------------------------|
|    3 2   2 3     4   5                                                      |
| , t t , t t , t t , t })                                                    |
|1   0 1   0 1   0 1   1                                                      |
+-----------------------------------------------------------------------------+

If the input is a pair consisting of a homogeneous ideal $I$ and an integer
$v$, then the output will be the map defined by the linear system of
hypersurfaces of degree $v$ which contain the projective subscheme defined by
$I$.

+-----------------------------------------------------------------------------+
|i5 : I=kernel phi                                                            |
|                                                                             |
|             2                                                 2             |
|o5 = ideal (x  - x x , x x  - x x , x x  - x x , x x  - x x , x  - x x , x x |
|             4    3 5   3 4    2 5   2 4    1 5   1 4    0 5   3    1 5   2 3|
|     ------------------------------------------------------------------------|
|                           2                       2                         |
|     - x x , x x  - x x , x  - x x , x x  - x x , x  - x x )                 |
|        0 5   1 3    0 4   2    0 4   1 2    0 3   1    0 2                  |
|                                                                             |
|o5 : Ideal of QQ[x ..x ]                                                     |
|                  0   5                                                      |
+-----------------------------------------------------------------------------+
|i6 : toMap(I,2)                                                              |
|                                                                             |
|                                    2                                        |
|o6 = map (QQ[x ..x ], QQ[y ..y ], {x  - x x , x x  - x x , x x  - x x , x x  |
|              0   5       0   9     4    3 5   3 4    2 5   2 4    1 5   1 4 |
|                                                                             |
|o6 : RingMap QQ[x ..x ] <--- QQ[y ..y ]                                      |
|                 0   5           0   9                                       |
|-----------------------------------------------------------------------------|
|         2                                    2                       2      |
|- x x , x  - x x , x x  - x x , x x  - x x , x  - x x , x x  - x x , x  -    |
|   0 5   3    1 5   2 3    0 5   1 3    0 4   2    0 4   1 2    0 3   1      |
|-----------------------------------------------------------------------------|
|x x })                                                                       |
| 0 2                                                                         |
+-----------------------------------------------------------------------------+

This is identical to toMap(I,v,1), while the output of toMap(I,v,e) will be the
map defined by the linear system of hypersurfaces of degree $v$ having points
of multiplicity $e$ along the projective subscheme defined by $I$.

+-----------------------------------------------------------------------------+
|i7 : toMap(I,2,1)                                                            |
|                                                                             |
|                                    2                                        |
|o7 = map (QQ[x ..x ], QQ[y ..y ], {x  - x x , x x  - x x , x x  - x x , x x  |
|              0   5       0   9     4    3 5   3 4    2 5   2 4    1 5   1 4 |
|                                                                             |
|o7 : RingMap QQ[x ..x ] <--- QQ[y ..y ]                                      |
|                 0   5           0   9                                       |
|-----------------------------------------------------------------------------|
|         2                                    2                       2      |
|- x x , x  - x x , x x  - x x , x x  - x x , x  - x x , x x  - x x , x  -    |
|   0 5   3    1 5   2 3    0 5   1 3    0 4   2    0 4   1 2    0 3   1      |
|-----------------------------------------------------------------------------|
|x x })                                                                       |
| 0 2                                                                         |
+-----------------------------------------------------------------------------+
|i8 : toMap(I,2,2)                                                            |
|                                                                             |
|o8 = map (QQ[x ..x ], QQ[], {})                                              |
|              0   5                                                          |
|                                                                             |
|o8 : RingMap QQ[x ..x ] <--- QQ[]                                            |
|                 0   5                                                       |
+-----------------------------------------------------------------------------+
|i9 : toMap(I,3,2)                                                            |
|                                                                             |
|                                    3                2    2                2 |
|o9 = map (QQ[x ..x ], QQ[y ..y ], {x  - 2x x x  + x x  + x x  - x x x , x x  |
|              0   5       0   3     3     2 3 4    1 4    2 5    1 3 5   2 3 |
|                                                                             |
|o9 : RingMap QQ[x ..x ] <--- QQ[y ..y ]                                      |
|                 0   5           0   3                                       |
|-----------------------------------------------------------------------------|
|   2                 2                     2        2                        |
|- x x  - x x x  + x x  + x x x  - x x x , x x  - x x  - x x x  + x x x  +    |
|   2 4    1 3 4    0 4    1 2 5    0 3 5   2 3    1 3    1 2 4    0 3 4      |
|-----------------------------------------------------------------------------|
| 2              3                2    2                                      |
|x x  - x x x , x  - 2x x x  + x x  + x x  - x x x })                         |
| 1 5    0 2 5   2     1 2 3    0 3    1 4    0 2 4                           |
+-----------------------------------------------------------------------------+

See also
========

  * rationalMap(Matrix) -- makes a rational map
  * rationalMap(Ideal,ZZ,ZZ) -- makes
    a rational map from an ideal

Ways to use toMap :
===================

  * "toMap(Ideal)"
  * "toMap(Ideal,List)"
  * "toMap(Ideal,ZZ)"
  * "toMap(Ideal,ZZ,ZZ)"
  * "toMap(List)"
  * "toMap(Matrix)"
  * "toMap(RingMap)"

For the programmer
==================

The object toMap, is a method function with options (Macaulay2Doc).