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

Jets -- compute jets of various algebraic, geometric and combinatorial objects
******************************************************************************

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

This package enables computations with jet functors. It introduces the
jets, method to compute jets of polynomial rings, ideals, quotients, ring
homomorphisms, and varieties. The construction of jets follows an algebraic
procedure discussed in several sources, including the first three references
below.

Additional features include an alternative algorithm to compute the radical of
jets of monomial ideals, a function to construct jets of graphs, a method for
principal components of jets, and an option for jets with "projective"
gradings.

References
==========

L. Ein and M. Mustaţă, Jet schemes and singularities. (see
https://arxiv.org/abs/math/0612862 )

F. Galetto, E. Helmick, and M. Walsh, Jet graphs. (see
https://arxiv.org/abs/2104.08933 )

R.A. Goward and K.E. Smith, The jet scheme of a monomial scheme. (see
https://doi.org/10.1080/00927870500454927 )

P. Vojta, Jets via Hasse-Schmidt Derivations. (see
https://arxiv.org/abs/math/0407113 )

Authors
=======

  * Federico Galetto (see http://math.galetto.org )
    <galetto.federico@gmail.com>
  * Nicholas Iammarino <nickiammarino@gmail.com>

Version
=======

This documentation describes version 1.0 of Jets.

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

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

Exports
=======

  * Functions and commands
      * jets -- compute the jets of an object
      * jetsProjection -- canonical map between jets
        rings
      * jetsRadical -- compute radicals of jets ideals
      * principalComponent -- compute principal
        component of jets
  * Methods
      * jets(ZZ,AffineVariety) -- the jets
        of an affine variety
      * jets(ZZ,Graph) -- the jets of a graph
      * "jets(ZZ,HyperGraph)" -- see jets(ZZ,Graph),
        -- the jets of a graph
      * jets(ZZ,Ideal) -- compute jets of a an
        ideal in a polynomial ring
      * jets(ZZ,PolynomialRing), --
        compute jets of a polynomial ring
      * jets(ZZ,QuotientRing) -- the jets
        of an affine algebra
      * jets(ZZ,RingMap) -- the jets of a
        homomorphism of rings
      * "jetsProjection(ZZ,ZZ,PolynomialRing)" -- see jetsProjection,
        -- canonical map between jets rings
      * "jetsProjection(ZZ,ZZ,QuotientRing)" -- see jetsProjection,
        -- canonical map between jets rings
      * "jetsRadical(ZZ,Ideal)" -- see jetsRadical, --
        compute radicals of jets ideals
      * "principalComponent(ZZ,Ideal)" -- see principalComponent,
        -- compute principal component of jets
  * Symbols
      * jet -- hashtable key
      * jetsBase -- hashtable value
      * jetsInfo -- hashtable key
      * jetsMatrix -- hashtable value
      * jetsMaxOrder -- hashtable value
      * jetsRing -- hashtable value
      * projet -- hashtable key
      * Saturate -- option for principal components
  * Other things
      * JJ -- scripted functor associated with jets

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

The object Jets, is a package (Macaulay2Doc).

Package methods

Examples from the literature

Technical information

jets -- compute the jets of an object
*************************************

Synopsis
========

  * Optional inputs (Macaulay2Doc),:
      * Projective, => ...,
        default value false, Option for jets

Ways to use jets :
==================

  * jets(ZZ,AffineVariety) -- the jets of
    an affine variety
  * jets(ZZ,Graph) -- the jets of a graph
  * "jets(ZZ,HyperGraph)" -- see jets(ZZ,Graph), --
    the jets of a graph
  * jets(ZZ,Ideal) -- compute jets of a an ideal
    in a polynomial ring
  * jets(ZZ,PolynomialRing) -- compute
    jets of a polynomial ring
  * jets(ZZ,QuotientRing) -- the jets of an
    affine algebra
  * jets(ZZ,RingMap) -- the jets of a
    homomorphism of rings

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

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

jets(ZZ,PolynomialRing) -- compute jets of a polynomial ring
************************************************************

Synopsis
========

  * Function: jets,
  * Usage:
        jets (n,R)
  * Inputs:
      * n, an integer (Macaulay2Doc),
      * R, a polynomial ring (Macaulay2Doc),
  * Optional inputs (Macaulay2Doc),:
      * Projective, => ...,
        default value false, Option for jets
  * Outputs:
      * a polynomial ring (Macaulay2Doc), of jets order
        n.

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

This function is provided by the package Jets.  Rings are
constructed incrementally as towers.  The function returns the ring with
variables in the jets order requested, and coefficients in all lower orders.
The grading or multigrading of the jets ring follows from that of the base
ring.

+-----------------------------------------------------------------------------+
|i1 : R= QQ[x,y,z,Degrees=>{2,1,3}]                                           |
|                                                                             |
|o1 = R                                                                       |
|                                                                             |
|o1 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i2 : JR= jets(2,R)                                                           |
|                                                                             |
|o2 = JR                                                                      |
|                                                                             |
|o2 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i3 : describe JR                                                             |
|                                                                             |
|o3 = QQ[x0, y0, z0][x1, y1, z1][x2, y2, z2, Degrees => {2, 1, 3}, Heft =>    |
|                                                                             |
|                                                                             |
|-----------------------------------------------------------------------------|
|{1}, MonomialOrder => {MonomialSize => 32  }, DegreeRank => 1]               |
|                      {GRevLex => {2, 1, 3}}                                 |
|                      {Position => Up      }                                 |
+-----------------------------------------------------------------------------+
|i4 : degrees (flattenRing JR)_0                                              |
|                                                                             |
|o4 = {{2}, {1}, {3}, {2}, {1}, {3}, {2}, {1}, {3}}                           |
|                                                                             |
|o4 : List                                                                    |
+-----------------------------------------------------------------------------+

When the jets(...,Projective=>...),
option is set to true, the degree
of each jets variable matches the jets order, in accordance with Proposition
6.6 (c) of P. Vojta, Jets via Hasse-Schmidt Derivations (see
https://arxiv.org/abs/math/0407113 ).

+--------------------------------------------------+
|i5 : R=QQ[x,y,z,Degrees=>{2,1,3}]                 |
|                                                  |
|o5 = R                                            |
|                                                  |
|o5 : PolynomialRing                               |
+--------------------------------------------------+
|i6 : JR= jets(2,R,Projective=>true)               |
|                                                  |
|o6 = JR                                           |
|                                                  |
|o6 : PolynomialRing                               |
+--------------------------------------------------+
|i7 : degrees (flattenRing JR)_0                   |
|                                                  |
|o7 = {{2}, {2}, {2}, {1}, {1}, {1}, {0}, {0}, {0}}|
|                                                  |
|o7 : List                                         |
+--------------------------------------------------+

The convention for labeling variables in the jets of polynomial ring is to
append the order of the jets to name of the variables in the base ring.
Existing subscripts are preserved.

+-----------------------------------------------------------------------------+
|i8 : A=QQ[a_1..a_3]                                                          |
|                                                                             |
|o8 = A                                                                       |
|                                                                             |
|o8 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i9 : JA= jets(1,A)                                                           |
|                                                                             |
|o9 = JA                                                                      |
|                                                                             |
|o9 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i10 : describe JA                                                            |
|                                                                             |
|o10 = QQ[a0 ..a0 ][a1 ..a1 , Degrees => {3:1}, Heft => {1}, MonomialOrder => |
|           1    3    1    3                                                  |
|                                                                             |
|-----------------------------------------------------------------------------|
|{MonomialSize => 32}, DegreeRank => 1]                                       |
|{GRevLex => {3:1}  }                                                         |
|{Position => Up    }                                                         |
+-----------------------------------------------------------------------------+

Note that the coefficient ring of the polynomial ring does not need to be a
field. The jets of the input polynomial ring will be a polynomial ring with the
same coefficient ring as the input.

+-----------------------------------------------------------------------------+
|i11 : Zi=ZZ[i]/ideal(i^2+1)                                                  |
|                                                                             |
|o11 = Zi                                                                     |
|                                                                             |
|o11 : QuotientRing                                                           |
+-----------------------------------------------------------------------------+
|i12 : B=Zi[b_1..b_3]                                                         |
|                                                                             |
|o12 = B                                                                      |
|                                                                             |
|o12 : PolynomialRing                                                         |
+-----------------------------------------------------------------------------+
|i13 : JB= jets(1,B)                                                          |
|                                                                             |
|o13 = JB                                                                     |
|                                                                             |
|o13 : PolynomialRing                                                         |
+-----------------------------------------------------------------------------+
|i14 : describe JB                                                            |
|                                                                             |
|o14 = Zi[b0 ..b0 ][b1 ..b1 , Degrees => {3:{1}}, Heft => {1, 0},             |
|           1    3    1    3                {0}                               |
|                                                                             |
|-----------------------------------------------------------------------------|
|MonomialOrder => {MonomialSize => 32}, DegreeRank => 2]                      |
|                 {GRevLex => {3:1}  }                                        |
|                 {Position => Up    }                                        |
+-----------------------------------------------------------------------------+

Caveat
======

With Projective=>true the jet variables of order zero have degree 0, therefore
no heft vector exist for the ambient ring of the jets. As a result, certain
computations will not be supported, and others may run more slowly. See
heft vectors (Macaulay2Doc), for more information.

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

  * jets(ZZ,PolynomialRing) -- compute
    jets of a polynomial ring

jets(ZZ,Ideal) -- compute jets of a an ideal in a polynomial ring
*****************************************************************

Synopsis
========

  * Function: jets,
  * Usage:
        jets (n,I)
  * Inputs:
      * n, an integer (Macaulay2Doc),
      * I, an ideal (Macaulay2Doc),
  * Optional inputs (Macaulay2Doc),:
      * Projective, => ...,
        default value false, Option for jets
  * Outputs:
      * an ideal (Macaulay2Doc), generated by the jets of the
        generators of I

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

This function is provided by the package Jets.

+-----------------------------------------------------------------------------+
|i1 : R= QQ[x,y]                                                              |
|                                                                             |
|o1 = R                                                                       |
|                                                                             |
|o1 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i2 : I= ideal (x^3 + y^3 - 3*x*y)                                            |
|                                                                             |
|            3    3                                                           |
|o2 = ideal(x  + y  - 3x*y)                                                   |
|                                                                             |
|o2 : Ideal of R                                                              |
+-----------------------------------------------------------------------------+
|i3 : J= jets(3,I);                                                           |
|                                                                             |
|o3 : Ideal of QQ[x0, y0][x1, y1][x2, y2][x3, y3]                             |
+-----------------------------------------------------------------------------+
|i4 : netList J_*                                                             |
|                                                                             |
|     +-----------------------------------------------------------------------|
|     |    2                2                                                 |
|o4 = |(3x0  - 3y0)x3 + (3y0  - 3x0)y3 + (6x0*x1 - 3y1)x2 + (- 3x1 + 6y0*y1)y2|
|     +-----------------------------------------------------------------------|
|     |    2                2                  2                  2           |
|     |(3x0  - 3y0)x2 + (3y0  - 3x0)y2 + 3x0*x1  - 3x1*y1 + 3y0*y1            |
|     +-----------------------------------------------------------------------|
|     |    2                2                                                 |
|     |(3x0  - 3y0)x1 + (3y0  - 3x0)y1                                        |
|     +-----------------------------------------------------------------------|
|     |  3     3                                                              |
|     |x0  + y0  - 3x0*y0                                                     |
|     +-----------------------------------------------------------------------|
|-----------------------------------------------------------------------------|
|------------+                                                                |
|     3     3|                                                                |
| + x1  + y1 |                                                                |
|------------+                                                                |
|            |                                                                |
|            |                                                                |
|------------+                                                                |
|            |                                                                |
|            |                                                                |
|------------+                                                                |
|            |                                                                |
|            |                                                                |
|------------+                                                                |
+-----------------------------------------------------------------------------+

When the jets(...,Projective=>...),
option is set to true, the degree
of each jets variable matches its order, in accordance with Proposition 6.6 (c)
of P. Vojta, Jets via Hasse-Schmidt Derivations (see
https://arxiv.org/abs/math/0407113 ). As a result, the jets of any ideal will
be homogeneous regardless of the homogeneity of the base ideal, or that of its
affine jets.

+-----------------------------------------------------------------------------+
|i5 : R= QQ[x,y,z]                                                            |
|                                                                             |
|o5 = R                                                                       |
|                                                                             |
|o5 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i6 : I= ideal (y-x^2, z-x^3)                                                 |
|                                                                             |
|               2         3                                                   |
|o6 = ideal (- x  + y, - x  + z)                                              |
|                                                                             |
|o6 : Ideal of R                                                              |
+-----------------------------------------------------------------------------+
|i7 : JI= jets(2,I)                                                           |
|                                                                             |
|                              2                     2            2           |
|o7 = ideal (- 2x0*x2 + y2 - x1 , - 2x0*x1 + y1, - x0  + y0, - 3x0 x2 + z2 -  |
|     ------------------------------------------------------------------------|
|           2       2             3                                           |
|     3x0*x1 , - 3x0 x1 + z1, - x0  + z0)                                     |
|                                                                             |
|o7 : Ideal of QQ[x0, y0, z0][x1, y1, z1][x2, y2, z2]                         |
+-----------------------------------------------------------------------------+
|i8 : isHomogeneous JI                                                        |
|                                                                             |
|o8 = false                                                                   |
+-----------------------------------------------------------------------------+
|i9 : JIproj= jets(2,I,Projective=>true)                                      |
|                                                                             |
|                              2                     2            2           |
|o9 = ideal (- 2x0*x2 + y2 - x1 , - 2x0*x1 + y1, - x0  + y0, - 3x0 x2 + z2 -  |
|     ------------------------------------------------------------------------|
|           2       2             3                                           |
|     3x0*x1 , - 3x0 x1 + z1, - x0  + z0)                                     |
|                                                                             |
|o9 : Ideal of QQ[x0, y0, z0][x1, y1, z1][x2, y2, z2]                         |
+-----------------------------------------------------------------------------+
|i10 : isHomogeneous JIproj                                                   |
|                                                                             |
|o10 = true                                                                   |
+-----------------------------------------------------------------------------+

Caveat
======

With Projective=>true the jet variables of order zero have degree 0, therefore
no heft vector exist for the ambient ring of the jets. As a result, certain
computations will not be supported, and others may run more slowly. See
heft vectors (Macaulay2Doc), for more information.

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

  * jets(ZZ,Ideal) -- compute jets of a an ideal
    in a polynomial ring

jets(ZZ,QuotientRing) -- the jets of an affine algebra
******************************************************

Synopsis
========

  * Function: jets,
  * Usage:
        jets (n,Q)
  * Inputs:
      * n, an integer (Macaulay2Doc),
      * Q, a quotient ring (Macaulay2Doc),
  * Optional inputs (Macaulay2Doc),:
      * Projective, => ...,
        default value false, Option for jets
  * Outputs:
      * a quotient ring (Macaulay2Doc),

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

This function is provided by the package Jets.  Forms the jets of a
QuotientRing (Macaulay2Doc), by forming the quotient of
jets(ZZ,PolynomialRing), of the ambient
ring of Q with jets(ZZ,Ideal), of the ideal
defining Q

+------------------------------------------------------------------------+
|i1 : R= QQ[x,y];                                                        |
+------------------------------------------------------------------------+
|i2 : I= ideal(y^2-x^3);                                                 |
|                                                                        |
|o2 : Ideal of R                                                         |
+------------------------------------------------------------------------+
|i3 : Q= R/I;                                                            |
+------------------------------------------------------------------------+
|i4 : JQ= jets(2,Q);                                                     |
+------------------------------------------------------------------------+
|i5 : describe JQ                                                        |
|                                                                        |
|                          QQ[x0, y0][x1, y1][x2, y2]                    |
|o5 = -------------------------------------------------------------------|
|           2                    2     2       2                 3     2 |
|     (- 3x0 x2 + 2y0*y2 - 3x0*x1  + y1 , - 3x0 x1 + 2y0*y1, - x0  + y0 )|
+------------------------------------------------------------------------+

Caveat
======

Forming quotients triggers a Groebner basis computation, which may be time
consuming.

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

  * jets(ZZ,QuotientRing) -- the jets of an
    affine algebra

jets(ZZ,RingMap) -- the jets of a homomorphism of rings
*******************************************************

Synopsis
========

  * Function: jets,
  * Usage:
        jets (n,f)
  * Inputs:
      * n, an integer (Macaulay2Doc),
      * f, a ring map (Macaulay2Doc),
  * Optional inputs (Macaulay2Doc),:
      * Projective, => ...,
        default value false, Option for jets
  * Outputs:
      * a ring map (Macaulay2Doc), obtained by applying the n-th
        jets functor to f

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

This function is provided by the package Jets.

+-----------------------------------------------------------------------+
|i1 : R= QQ[x,y,z]                                                      |
|                                                                       |
|o1 = R                                                                 |
|                                                                       |
|o1 : PolynomialRing                                                    |
+-----------------------------------------------------------------------+
|i2 : S= QQ[t]                                                          |
|                                                                       |
|o2 = S                                                                 |
|                                                                       |
|o2 : PolynomialRing                                                    |
+-----------------------------------------------------------------------+
|i3 : f= map(S,R,{t,t^2,t^3})                                           |
|                                                                       |
|                     2   3                                             |
|o3 = map (S, R, {t, t , t })                                           |
|                                                                       |
|o3 : RingMap S <--- R                                                  |
+-----------------------------------------------------------------------+
|i4 : Jf= jets(2,f);                                                    |
|                                                                       |
|o4 : RingMap QQ[t0][t1][t2] <--- QQ[x0, y0, z0][x1, y1, z1][x2, y2, z2]|
+-----------------------------------------------------------------------+
|i5 : matrix Jf                                                         |
|                                                                       |
|o5 = | t2 2t0t2+t1^2 3t0^2t2+3t0t1^2 t1 2t0t1 3t0^2t1 t0 t0^2 t0^3 |   |
|                                                                       |
|                            1                      9                   |
|o5 : Matrix (QQ[t0][t1][t2])  <--- (QQ[t0][t1][t2])                    |
+-----------------------------------------------------------------------+

This function can also be applied when the source and/or the target of the ring
homomorphism are quotients of a polynomial ring

+-----------------------------------------------------------------------------+
|i6 : I= ideal(y-x^2,z-x^3)                                                   |
|                                                                             |
|               2         3                                                   |
|o6 = ideal (- x  + y, - x  + z)                                              |
|                                                                             |
|o6 : Ideal of R                                                              |
+-----------------------------------------------------------------------------+
|i7 : Q= R/I                                                                  |
|                                                                             |
|o7 = Q                                                                       |
|                                                                             |
|o7 : QuotientRing                                                            |
+-----------------------------------------------------------------------------+
|i8 : g= map(S,Q,{t,t^2,t^3})                                                 |
|                                                                             |
|                     2   3                                                   |
|o8 = map (S, Q, {t, t , t })                                                 |
|                                                                             |
|o8 : RingMap S <--- Q                                                        |
+-----------------------------------------------------------------------------+
|i9 : isWellDefined g                                                         |
|                                                                             |
|o9 = true                                                                    |
+-----------------------------------------------------------------------------+
|i10 : Jg= jets(2,g);                                                         |
|                                                                             |
|                                                                             |
|o10 : RingMap QQ[t0][t1][t2] <---                                            |
|                                                                             |
|                                                                             |
|-----------------------------------------------------------------------------|
|                               QQ[x0, y0, z0][x1, y1, z1][x2, y2, z2]        |
|-----------------------------------------------------------------------------|
|                   2                     2            2                2     |
|(- 2x0*x2 + y2 - x1 , - 2x0*x1 + y1, - x0  + y0, - 3x0 x2 + z2 - 3x0*x1 , - 3|
|-----------------------------------------------------------------------------|
|-----------------------                                                      |
|  2             3                                                            |
|x0 x1 + z1, - x0  + z0)                                                      |
+-----------------------------------------------------------------------------+
|i11 : isWellDefined Jg                                                       |
|                                                                             |
|o11 = true                                                                   |
+-----------------------------------------------------------------------------+

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

  * jets(ZZ,RingMap) -- the jets of a
    homomorphism of rings

jets(ZZ,Graph) -- the jets of a graph
*************************************

Synopsis
========

  * Function: jets,
  * Usage:
        jets (n,G)
  * Inputs:
      * n, an integer (Macaulay2Doc),
      * G, a graph (EdgeIdeals), undirected, finite, and simple
        graph or hypergraph
  * Optional inputs (Macaulay2Doc),:
      * Projective, => ...,
        default value false, Option for jets
  * Outputs:
      * a graph (EdgeIdeals), the (hyper)graph of n-jets of G

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

This function is provided by the package Jets.

Jets of graphs are defined in § 2 of F. Galetto, E. Helmick, and M. Walsh, Jet
graphs (see https://arxiv.org/abs/2104.08933 ). The input is of type
Graph (EdgeIdeals), as defined by the EdgeIdeals,
package, which is automatically exported when loading Jets.

+-----------------------------------------------------------------------------+
|i1 : R= QQ[x,y,z]                                                            |
|                                                                             |
|o1 = R                                                                       |
|                                                                             |
|o1 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i2 : G= graph(R,{{x,y},{y,z}})                                               |
|                                                                             |
|o2 = Graph{edges => {{x, y}, {y, z}}}                                        |
|           ring => R                                                         |
|           vertices => {x, y, z}                                             |
|                                                                             |
|o2 : Graph                                                                   |
+-----------------------------------------------------------------------------+
|i3 : JG= jets(2,G)                                                           |
|                                                                             |
|o3 = Graph{edges => {{x1, y1}, {y1, z1}, {y2, x0}, {y1, x0}, {x2, y0}, {z2,  |
|           ring => QQ[x2, y2, z2, x1, y1, z1, x0, y0, z0]                    |
|           vertices => {x2, y2, z2, x1, y1, z1, x0, y0, z0}                  |
|                                                                             |
|o3 : Graph                                                                   |
|-----------------------------------------------------------------------------|
|y0}, {x1, y0}, {z1, y0}, {x0, y0}, {y2, z0}, {y1, z0}, {y0, z0}}}            |
+-----------------------------------------------------------------------------+
|i4 : vertexCovers JG                                                         |
|                                                                             |
|o4 = {y2*y1*y0, x2*z2*x1*z1*x0*z0, y1*x0*y0*z0, x1*z1*x0*y0*z0}              |
|                                                                             |
|o4 : List                                                                    |
+-----------------------------------------------------------------------------+

We can also calculate the jets of a  HyperGraph (EdgeIdeals).

+-----------------------------------------------------------------------------+
|i5 : R= QQ[u,v,w,x,y,z]                                                      |
|                                                                             |
|o5 = R                                                                       |
|                                                                             |
|o5 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i6 : H= hyperGraph(R,{{u},{v,w},{x,y,z}})                                    |
|                                                                             |
|o6 = HyperGraph{edges => {{u}, {v, w}, {x, y, z}}}                           |
|                ring => R                                                    |
|                vertices => {u, v, w, x, y, z}                               |
|                                                                             |
|o6 : HyperGraph                                                              |
+-----------------------------------------------------------------------------+
|i7 : jets(1,H)                                                               |
|                                                                             |
|o7 = HyperGraph{edges => {{u1}, {u0}, {w1, v0}, {v1, w0}, {v0, w0}, {z1, x0, |
|                ring => QQ[u1, v1, w1, x1, y1, z1, u0, v0, w0, x0, y0, z0]   |
|                vertices => {u1, v1, w1, x1, y1, z1, u0, v0, w0, x0, y0, z0} |
|                                                                             |
|o7 : HyperGraph                                                              |
|-----------------------------------------------------------------------------|
|y0}, {y1, x0, z0}, {x1, y0, z0}, {x0, y0, z0}}}                              |
+-----------------------------------------------------------------------------+

Caveat
======

Rings of jets are usually constructed as towers of rings with tiers
corresponding to jets of different orders. However, the tower is flattened out
before constructing the edge ideal of the jets of a (hyper)graph. This is done
in order to ensure compatibility with the EdgeIdeals,
package.

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

  * jets(ZZ,Graph) -- the jets of a graph
  * "jets(ZZ,HyperGraph)"

jets(ZZ,AffineVariety) -- the jets of an affine variety
*******************************************************

Synopsis
========

  * Function: jets,
  * Usage:
        jets (n,V)
  * Inputs:
      * n, an integer (Macaulay2Doc),
      * V, an affine variety (Macaulay2Doc),
  * Optional inputs (Macaulay2Doc),:
      * Projective, => ...,
        default value false, Option for jets
  * Outputs:
      * a variety (Macaulay2Doc), an AffineVariety (Macaulay2Doc),
        or a ProjectiveVariety (Macaulay2Doc),

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

Returns the jets of an AffineVariety (Macaulay2Doc), as an
AffineVariety (Macaulay2Doc).

+-----------------------------------------------------------------------------+
|i1 : R=QQ[x,y]                                                               |
|                                                                             |
|o1 = R                                                                       |
|                                                                             |
|o1 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i2 : I= ideal(y^2-x^2*(x+1))                                                 |
|                                                                             |
|              3    2    2                                                    |
|o2 = ideal(- x  - x  + y )                                                   |
|                                                                             |
|o2 : Ideal of R                                                              |
+-----------------------------------------------------------------------------+
|i3 : A= Spec(R/I)                                                            |
|                                                                             |
|o3 = A                                                                       |
|                                                                             |
|o3 : AffineVariety                                                           |
+-----------------------------------------------------------------------------+
|i4 : jets(2,A)                                                               |
|                                                                             |
|         /                                   QQ[x0, y0][x1, y1][x2, y2]      |
|o4 = Spec|-------------------------------------------------------------------|
|         |       2                                  2     2        2         |
|         \((- 3x0  - 2x0)x2 + 2y0*y2 + (- 3x0 - 1)x1  + y1 , (- 3x0  - 2x0)x1|
|                                                                             |
|o4 : AffineVariety                                                           |
|-----------------------------------------------------------------------------|
|                             \                                               |
|-----------------------------|                                               |
|               3     2     2 |                                               |
| + 2y0*y1, - x0  - x0  + y0 )/                                               |
+-----------------------------------------------------------------------------+

If jets(...,Projective=>...),
is set to true, then jets are
computed with the grading introduced in Proposition 6.6 (c) of P. Vojta, Jets
via Hasse-Schmidt Derivations (see https://arxiv.org/abs/math/0407113 ), and
the function returns a ProjectiveVariety (Macaulay2Doc).

+-----------------------------------------------------------------------------+
|i5 : jets(2,A,Projective=>true)                                              |
|                                                                             |
|         /                                   QQ[x0, y0][x1, y1][x2, y2]      |
|o5 = Proj|-------------------------------------------------------------------|
|         |       2                                  2     2        2         |
|         \((- 3x0  - 2x0)x2 + 2y0*y2 + (- 3x0 - 1)x1  + y1 , (- 3x0  - 2x0)x1|
|                                                                             |
|o5 : ProjectiveVariety                                                       |
|-----------------------------------------------------------------------------|
|                             \                                               |
|-----------------------------|                                               |
|               3     2     2 |                                               |
| + 2y0*y1, - x0  - x0  + y0 )/                                               |
+-----------------------------------------------------------------------------+

Caveat
======

With Projective=>true the jet variables of order zero have degree 0, therefore
no heft vector exist for the ambient ring of the jets. As a result, certain
computations will not be supported, and others may run more slowly. See
heft vectors (Macaulay2Doc), for more information.

Note: jets of projective varieties are currently not implemented.

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

  * jets(ZZ,AffineVariety) -- the jets of
    an affine variety

jets(...,Projective=>...) -- Option for jets
********************************************

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

Set the degree of each jet variable to match its order, as in Proposition 6.6
(c) of P. Vojta, Jets via Hasse-Schmidt Derivations (see
https://arxiv.org/abs/math/0407113 ). This guarantees that the output of
jets, is homogeneous.

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

  * Default value: false (Macaulay2Doc),
  * Function: jets, -- compute the jets of an object
  * Option key: Projective (Macaulay2Doc), -- whether to
    produce a projective Hilbert polynomial

Caveat
======

With Projective=>true the jet variables of order zero have degree 0, therefore
no heft vector exist for the ambient ring of the jets. As a result, certain
computations will not be supported, and others may run more slowly. See
heft vectors (Macaulay2Doc), for more information.

See also
========

  * jets(ZZ,PolynomialRing) -- compute
    jets of a polynomial ring
  * jets(ZZ,Ideal) -- compute jets of a an ideal
    in a polynomial ring

Functions with optional argument named Projective :
===================================================

  * hilbertPolynomial(...,Projective=>...) (Macaulay2Doc),
    --
    choose how to display the Hilbert polynomial
  * jets(...,Projective=>...)
    -- Option for jets
  * "jetsProjection(...,Projective=>...)"

JJ -- scripted functor associated with jets
*******************************************

Synopsis
========

  * Usage:
        JJ_n X
  * Inputs:
      * n, an integer (Macaulay2Doc),

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

Shorthand for jets,

+-----------------------------------------------------------------------------+
|i1 : R= QQ[x,y]                                                              |
|                                                                             |
|o1 = R                                                                       |
|                                                                             |
|o1 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i2 : I= ideal(y^2-x^3)                                                       |
|                                                                             |
|              3    2                                                         |
|o2 = ideal(- x  + y )                                                        |
|                                                                             |
|o2 : Ideal of R                                                              |
+-----------------------------------------------------------------------------+
|i3 : JJ_2 R                                                                  |
|                                                                             |
|o3 = QQ[x0, y0][x1, y1][x2, y2]                                              |
|                                                                             |
|o3 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i4 : JJ_2 I                                                                  |
|                                                                             |
|                 2                    2     2       2                 3      |
|o4 = ideal (- 3x0 x2 + 2y0*y2 - 3x0*x1  + y1 , - 3x0 x1 + 2y0*y1, - x0  +    |
|     ------------------------------------------------------------------------|
|       2                                                                     |
|     y0 )                                                                    |
|                                                                             |
|o4 : Ideal of QQ[x0, y0][x1, y1][x2, y2]                                     |
+-----------------------------------------------------------------------------+

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

The object JJ, is a scripted functor (Macaulay2Doc).

jetsProjection -- canonical map between jets rings
**************************************************

Synopsis
========

  * Usage:
        jets(t,s,R)
        jets(t,s,Q)
  * Inputs:
      * t, an integer (Macaulay2Doc),
      * s, an integer (Macaulay2Doc),
      * R, a polynomial ring (Macaulay2Doc), or a
        quotient of
  * Optional inputs (Macaulay2Doc),:
      * Projective, => ...,
        default value false, Option for jets
  * Outputs:
      * a ring map (Macaulay2Doc), between jets orders

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

This function is provided by the package Jets.  Generates an
inclusion map from the order s into the order t jets of a (quotient of a)
polynomial ring. Throws an error if t<s.

+-----------------------------------------------------------------------------+
|i1 : R=QQ[x,y]                                                               |
|                                                                             |
|o1 = R                                                                       |
|                                                                             |
|o1 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i2 : f= jetsProjection(5,2,R)                                                |
|                                                                             |
|o2 = map (QQ[x0, y0][x1, y1][x2, y2][x3, y3][x4, y4][x5, y5], QQ[x0,         |
|                                                                             |
|o2 : RingMap QQ[x0, y0][x1, y1][x2, y2][x3, y3][x4, y4][x5, y5] <---         |
|-----------------------------------------------------------------------------|
|y0][x1, y1][x2, y2], {x2, y2, x1, y1, x0, y0})                               |
|                                                                             |
|QQ[x0, y0][x1, y1][x2, y2]                                                   |
+-----------------------------------------------------------------------------+
|i3 : use jets(2,R)                                                           |
|                                                                             |
|o3 = QQ[x0, y0][x1, y1][x2, y2]                                              |
|                                                                             |
|o3 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i4 : p= (x2 + 2*x1*y1 + x0*y2^2)                                             |
|                                                                             |
|          2                                                                  |
|o4 = x0*y2  + x2 + 2x1*y1                                                    |
|                                                                             |
|o4 : QQ[x0, y0][x1, y1][x2, y2]                                              |
+-----------------------------------------------------------------------------+
|i5 : f p                                                                     |
|                                                                             |
|          2                                                                  |
|o5 = x0*y2  + x2 + 2x1*y1                                                    |
|                                                                             |
|o5 : QQ[x0, y0][x1, y1][x2, y2][x3, y3][x4, y4][x5, y5]                      |
+-----------------------------------------------------------------------------+

Ways to use jetsProjection :
============================

  * "jetsProjection(ZZ,ZZ,PolynomialRing)"
  * "jetsProjection(ZZ,ZZ,QuotientRing)"

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

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

jetsRadical -- compute radicals of jets ideals
**********************************************

Synopsis
========

  * Usage:
        jetsRadical(n,I)
  * Inputs:
      * n, an integer (Macaulay2Doc),
      * I, an ideal (Macaulay2Doc),
  * Outputs:
      * an ideal (Macaulay2Doc), radical of the nth jets of I

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

This function is provided by the package Jets. It returns the
radical of the ideal of jets of the input ideal.

If the input is not a monomial ideal, this function uses the radical (MinimalPrimes),
function from the MinimalPrimes,
package.

If the input is a monomial ideal, it uses an algorithm based on the proof of
Theorem 3.2 in R.A. Goward and K.E. Smith, The jet scheme of a monomial scheme
(see https://doi.org/10.1080/00927870500454927 ). This has the potential to
speed up the computation, especially for large jet orders. Note that the
generating set of the output may not be minimal, unless the generators of the
input are squarefree monomials.

An ideal generated by squarefree monomials:

+------------------------------------------+
|i1 : R= QQ[x,y,z]                         |
|                                          |
|o1 = R                                    |
|                                          |
|o1 : PolynomialRing                       |
+------------------------------------------+
|i2 : I= ideal (x*z, y*z)                  |
|                                          |
|o2 = ideal (x*z, y*z)                     |
|                                          |
|o2 : Ideal of R                           |
+------------------------------------------+
|i3 : J= jets(1,I);                        |
|                                          |
|o3 : Ideal of QQ[x0, y0, z0][x1, y1, z1]  |
+------------------------------------------+
|i4 : MP= radical J;                       |
|                                          |
|o4 : Ideal of QQ[x0, y0, z0][x1, y1, z1]  |
+------------------------------------------+
|i5 : GS= jetsRadical(1,I);                |
|                                          |
|o5 : Ideal of QQ[x0, y0, z0][x1, y1, z1]  |
+------------------------------------------+
|i6 : netList sort MP_* | netList sort GS_*|
|                                          |
|     +-----++-----+                       |
|o6 = |y0*z0||y0*z0|                       |
|     +-----++-----+                       |
|     |x0*z0||x0*z0|                       |
|     +-----++-----+                       |
|     |y0*z1||y0*z1|                       |
|     +-----++-----+                       |
|     |x0*z1||x0*z1|                       |
|     +-----++-----+                       |
|     |z0*y1||z0*y1|                       |
|     +-----++-----+                       |
|     |z0*x1||z0*x1|                       |
|     +-----++-----+                       |
+------------------------------------------+

An ideal with genereators which are not squarefree:

+-------------------------------------------+
|i7 : R= QQ[x,y,z]                          |
|                                           |
|o7 = R                                     |
|                                           |
|o7 : PolynomialRing                        |
+-------------------------------------------+
|i8 : I= ideal(x*y^2, z*x, x^3)             |
|                                           |
|               2        3                  |
|o8 = ideal (x*y , x*z, x )                 |
|                                           |
|o8 : Ideal of R                            |
+-------------------------------------------+
|i9 : J= jets(1,I);                         |
|                                           |
|o9 : Ideal of QQ[x0, y0, z0][x1, y1, z1]   |
+-------------------------------------------+
|i10 : MP= radical J;                       |
|                                           |
|o10 : Ideal of QQ[x0, y0, z0][x1, y1, z1]  |
+-------------------------------------------+
|i11 : GS= jetsRadical(1,I);                |
|                                           |
|o11 : Ideal of QQ[x0, y0, z0][x1, y1, z1]  |
+-------------------------------------------+
|i12 : netList sort MP_* | netList sort GS_*|
|                                           |
|      +-----++--------+                    |
|o12 = |x0   ||x0      |                    |
|      +-----++--------+                    |
|      |z0*x1||x0*z0   |                    |
|      +-----++--------+                    |
|      |y0*x1||x0*y0   |                    |
|      +-----++--------+                    |
|             |x0*z1   |                    |
|             +--------+                    |
|             |x0*y0*y1|                    |
|             +--------+                    |
|             |z0*x1   |                    |
|             +--------+                    |
|             |y0*x1   |                    |
|             +--------+                    |
|             |x0*x1   |                    |
|             +--------+                    |
+-------------------------------------------+
|i13 : MP == GS                             |
|                                           |
|o13 = true                                 |
+-------------------------------------------+

Ways to use jetsRadical :
=========================

  * "jetsRadical(ZZ,Ideal)"

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

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

principalComponent -- compute principal component of jets
*********************************************************

Synopsis
========

  * Usage:
        principalComponent(s,I)
  * Inputs:
      * s, an integer (Macaulay2Doc),
      * I, an ideal (Macaulay2Doc),
  * Optional inputs (Macaulay2Doc),:
      * Saturate, => ..., default value true, option for
        principal components
  * Outputs:
      * an ideal (Macaulay2Doc), whose vanishing locus is the
        principal component of the s-jets of I

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

This function is provided by the package Jets.

Consider an affine variety $X \subseteq \mathbb{A}^n_\Bbbk$. The principal (or
dominant) component of the $s$-jets of $X$ is the Zariski closure of the
$s$-jets of the smooth locus of $X$. Let $X_{\mathrm{reg}}$ and
$X_{\mathrm{sing}}$ denote respectively the smooth and singular locus of $X$.
If $\mathcal{J}_s$ denotes the $s$-jets functor, then there is a natural
embedding $$X_\mathrm{sing} \subset X \subseteq \mathbb{A}^n_\Bbbk \subset
\mathcal{J}_s (\mathbb{A}^n_\Bbbk) \cong \mathbb{A}^{n(s+1)}_\Bbbk.$$ Let $I$
denote the ideal of $X_\mathrm{sing}$ in this embedding, and let $J$ denote the
ideal of $\mathcal{J}_s (X)$; both ideals live in the polynomial ring $\Bbbk
[\mathbb{A}^{n(s+1)}_\Bbbk]$. We have an equality of sets $$\mathcal{J}_s
(X_\mathrm{reg}) = \mathcal{J}_s (X) \setminus X_\mathrm{sing} = \mathbf{V} (J)
\setminus \mathbf{V} (I).$$ By Theorem 10 in Chapter 4, §4 of D.A. Cox, J.
Little, D. O'Shea - Ideals, Varieties, and Algorithms (see
https://doi.org/10.1007/978-3-319-16721-3 ), if $\Bbbk$ is algebraically
closed, then there is an equality $$\mathbf{V} (J\colon I^\infty) =
\overline{\mathbf{V} (J) \setminus \mathbf{V} (I)} = \overline{\mathcal{J}_s
(X_\mathrm{reg})}.$$ This function returns the ideal $J\colon I^\infty$.

If $J$ is known to be a radical ideal, then $\mathbf{V} (J\colon I) =
\overline{\mathbf{V} (J) \setminus \mathbf{V} (I)}$ by Corollary 11 in Chapter
4, §4 of D.A. Cox, J. Little, D. O'Shea - Ideals, Varieties, and Algorithms
(see https://doi.org/10.1007/978-3-319-16721-3 ). In this case, the user may
pass the option Saturate=>false to return the ideal $J\colon I$, which can
speed up computations.

As an example, consider the union of three non parallel lines in the affine
plane. We compute the principal component of the jets of order two.

+-----------------------------------------------------------------------------+
|i1 : R=QQ[x,y]                                                               |
|                                                                             |
|o1 = R                                                                       |
|                                                                             |
|o1 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i2 : I=ideal(x*y*(x+y-1))                                                    |
|                                                                             |
|            2       2                                                        |
|o2 = ideal(x y + x*y  - x*y)                                                 |
|                                                                             |
|o2 : Ideal of R                                                              |
+-----------------------------------------------------------------------------+
|i3 : PC=principalComponent(2,I)                                              |
|                                                                             |
|                             2          2             2                     2|
|o3 = ideal (y1*x2 - x1*y2, x0 y0 + x0*y0  - x0*y0, (x0  + x0*y0 - x0)y1, (y0 |
|     ------------------------------------------------------------------------|
|                                                                   2         |
|     - y0)x1 - x0*y0*y1, x0*y0*x1 + x0*y0*y1, (y0 - 1)x1*y1 - x0*y1 ,        |
|     ------------------------------------------------------------------------|
|                     2       2                2    2          2     2        |
|     x0*x1*y1 + x0*y1 , y0*x1  + x1*y1 + x0*y1 , x1 y1 + x1*y1 , (x0  + x0*y0|
|     ------------------------------------------------------------------------|
|                                                            2                |
|     - x0)y2, ((y0 - 1)x1 - x0*y1)y2, (x0*x1 + x0*y1)y2, (x1  + x1*y1)y2,    |
|     ------------------------------------------------------------------------|
|        2                                                                    |
|     (y0  - y0)x2 - x0*y0*y2, x0*y0*x2 + x0*y0*y2, y0*x1*x2 + (x1 + x0*y1)y2,|
|     ------------------------------------------------------------------------|
|                          2                  2                  2       2    |
|     (y0 - 1)x2*y2 - x0*y2 , x0*x2*y2 + x0*y2 , x1*x2*y2 + x1*y2 , y0*x2  +  |
|     ------------------------------------------------------------------------|
|                  2    2          2                                          |
|     x2*y2 + x0*y2 , x2 y2 + x2*y2 )                                         |
|                                                                             |
|o3 : Ideal of QQ[x0, y0][x1, y1][x2, y2]                                     |
+-----------------------------------------------------------------------------+

Despite the name, the principal component need not be a component of the jet
scheme (i.e., it need not be irreducible). In this example, the principal
component has degree 3 and is the union of three components of degree 1.

+-----------------------------------------------------------------------------+
|i4 : P=primaryDecomposition jets(2,I)                                        |
|                                                                             |
|               2                                         2                   |
|o4 = {ideal (y0 , x0*y0, y0*y1, y0*x1 + x0*y1, y0*y2 - y1 , y0*x2 + x0*y2 +  |
|     ------------------------------------------------------------------------|
|              3                   2                                          |
|     x1*y1, x0 ), ideal (x0*y0, x0 , y0*x1 + x0*y1, x0*x1, y0*x2 + x0*y2 +   |
|     ------------------------------------------------------------------------|
|                      2    3            2                                    |
|     x1*y1, x0*x2 - x1 , y0 ), ideal (y0 , x0*y0 - y0, y0*y1, y0*x1 + (x0 -  |
|     ------------------------------------------------------------------------|
|                     2                                  2    3      2        |
|     1)y1, y0*y2 - y1 , y0*x2 + (x0 - 1)y2 + x1*y1 + 3y1 , x0  - 3x0  + 3x0 -|
|     ------------------------------------------------------------------------|
|                          2         2     2                                  |
|     1), ideal (x0*y0 + y0  - y0, x0  - y0  - 2x0 + 1, y0*x1 + (x0 + 2y0 -   |
|     ------------------------------------------------------------------------|
|                                                                    2        |
|     1)y1, (x0 - 1)x1 - y0*y1, y0*x2 + (x0 + 2y0 - 1)y2 + x1*y1 + y1 , (x0 - |
|     ------------------------------------------------------------------------|
|                      2               2    3                                 |
|     1)x2 - y0*y2 - x1  - 3x1*y1 - 2y1 , y0 ), ideal (y0, y1, y2), ideal     |
|     ------------------------------------------------------------------------|
|                    2                                                     2  |
|     (x0*y0 - x0, x0 , (y0 - 1)x1 + x0*y1, x0*x1, (y0 - 1)x2 + x0*y2 + 3x1  +|
|     ------------------------------------------------------------------------|
|                      2    3      2                              2           |
|     x1*y1, x0*x2 - x1 , y0  - 3y0  + 3y0 - 1), ideal (x0*y0 + y0  - x0 - 2y0|
|     ------------------------------------------------------------------------|
|            2     2                                                          |
|     + 1, x0  - y0  + 2y0 - 1, (y0 - 1)x1 + (x0 + 2y0 - 2)y1, x0*x1 + (- y0 +|
|     ------------------------------------------------------------------------|
|                                              2               2              |
|     1)y1, (y0 - 1)x2 + (x0 + 2y0 - 2)y2 - 3x1  - 5x1*y1 - 2y1 , x0*x2 + (-  |
|     ------------------------------------------------------------------------|
|                    2              2    3      2                             |
|     y0 + 1)y2 + 2x1  + 3x1*y1 + y1 , y0  - 3y0  + 3y0 - 1), ideal (x0, x1,  |
|     ------------------------------------------------------------------------|
|     x2), ideal (x0 + y0 - 1, x1 + y1, x2 + y2)}                             |
|                                                                             |
|o4 : List                                                                    |
+-----------------------------------------------------------------------------+
|i5 : any(P,c -> c==PC)                                                       |
|                                                                             |
|o5 = false                                                                   |
+-----------------------------------------------------------------------------+
|i6 : PC==intersect(select(P,c -> degree c==1))                               |
|                                                                             |
|o6 = true                                                                    |
+-----------------------------------------------------------------------------+

Caveat
======

This function requires computation of a singular locus, a saturation (or
quotient), and jets, with each step being potentially quite time consuming.

Ways to use principalComponent :
================================

  * "principalComponent(ZZ,Ideal)"

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

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

Saturate -- option for principal components
*******************************************

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

Strategy for computing principal components of jet schemes

See also
========

  * principalComponent -- compute principal
    component of jets

Functions with optional argument named Saturate :
=================================================

  * "principalComponent(...,Saturate=>...)"

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

The object Saturate, is a symbol (Macaulay2Doc).

Example 1 -- jets of monomial ideals
************************************

As observed in R.A. Goward and K.E. Smith, The jet scheme of a monomial scheme
(see https://doi.org/10.1080/00927870500454927 ) [GS06], the ideal of jets of a
monomial ideal is typically not a monomial ideal.

+-----------------------------------------------------------------------------+
|i1 : R=QQ[x,y,z]                                                             |
|                                                                             |
|o1 = R                                                                       |
|                                                                             |
|o1 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i2 : I=ideal(x*y*z)                                                          |
|                                                                             |
|o2 = ideal(x*y*z)                                                            |
|                                                                             |
|o2 : Ideal of R                                                              |
+-----------------------------------------------------------------------------+
|i3 : J2I=jets(2,I)                                                           |
|                                                                             |
|o3 = ideal (y0*z0*x2 + x0*z0*y2 + x0*y0*z2 + z0*x1*y1 + y0*x1*z1 + x0*y1*z1, |
|     ------------------------------------------------------------------------|
|     y0*z0*x1 + x0*z0*y1 + x0*y0*z1, x0*y0*z0)                               |
|                                                                             |
|o3 : Ideal of QQ[x0, y0, z0][x1, y1, z1][x2, y2, z2]                         |
+-----------------------------------------------------------------------------+

However, by [GS06, Theorem 3.1], the radical is always a (squarefree) monomial
ideal. In fact, the proof of [GS06, Theorem 3.2] shows that the radical is
generated by the terms of the jet equations constructed as in the introduction.
This observation provides an alternative algorithm for computing radicals of
jets of monomial ideals, which can be faster than the default radical
computation in Macaulay2.

+-----------------------------------------------------------------------------+
|i4 : elapsedTime jetsRadical(2,I)                                            |
| -- 0.00469286 seconds elapsed                                               |
|                                                                             |
|o4 = ideal (y0*z0*x2, x0*z0*y2, x0*y0*z2, z0*x1*y1, y0*x1*z1, x0*y1*z1,      |
|     ------------------------------------------------------------------------|
|     y0*z0*x1, x0*z0*y1, x0*y0*z1, x0*y0*z0)                                 |
|                                                                             |
|o4 : Ideal of QQ[x0, y0, z0][x1, y1, z1][x2, y2, z2]                         |
+-----------------------------------------------------------------------------+
|i5 : elapsedTime radical J2I                                                 |
| -- 0.378238 seconds elapsed                                                 |
|                                                                             |
|o5 = ideal (x0*y0*z0, x0*y0*z1, x0*z0*y1, y0*z0*x1, x0*y1*z1, y0*x1*z1,      |
|     ------------------------------------------------------------------------|
|     z0*x1*y1, x0*y0*z2, x0*z0*y2, y0*z0*x2)                                 |
|                                                                             |
|o5 : Ideal of QQ[x0, y0, z0][x1, y1, z1][x2, y2, z2]                         |
+-----------------------------------------------------------------------------+

For a monomial hypersurface, [GS06, Theorem 3.2] describes the minimal primes
of the ideal of jets. Moreover, the main theorem in C. Yuen, Multiplicity of
jet schemes of monomial schemes (see https://arxiv.org/abs/math/0607638 )
counts the multiplicity of the jet scheme of a monomial hypersurface along its
minimal primes (see also C. Yuen, The multiplicity of jet schemes of a simple
normal crossing divisor (see https://doi.org/10.1080/00927870701512168 )). We
compute the minimal primes, then use the LocalRings,
package to compute their multiplicities in the second jet scheme of the example
above. Note that we need to flatten the polynomial ring of jets because the
LocalRings package does not allow towers of rings.

+-----------------------------------------------------------------------------+
|i6 : P=minimalPrimes J2I                                                     |
|                                                                             |
|o6 = {ideal (z0, y0, x0), ideal (z0, y0, z1), ideal (z0, y0, y1), ideal (z0, |
|     ------------------------------------------------------------------------|
|     x0, z1), ideal (z0, x0, x1), ideal (z0, z1, z2), ideal (y0, x0, y1),    |
|     ------------------------------------------------------------------------|
|     ideal (y0, x0, x1), ideal (y0, y1, y2), ideal (x0, x1, x2)}             |
|                                                                             |
|o6 : List                                                                    |
+-----------------------------------------------------------------------------+
|i7 : (A,f)=flattenRing ring J2I                                              |
|                                                                             |
|o7 = (A, map (A, QQ[x0, y0, z0][x1, y1, z1][x2, y2, z2], {x2, y2, z2, x1, y1,|
|     ------------------------------------------------------------------------|
|     z1, x0, y0, z0}))                                                       |
|                                                                             |
|o7 : Sequence                                                                |
+-----------------------------------------------------------------------------+
|i8 : needsPackage "LocalRings"                                               |
|                                                                             |
|o8 = LocalRings                                                              |
|                                                                             |
|o8 : Package                                                                 |
+-----------------------------------------------------------------------------+
|i9 : M=cokernel gens f J2I                                                   |
|                                                                             |
|o9 = cokernel | x2y0z0+y2x0z0+z2x0y0+x1y1z0+x1z1y0+y1z1x0                    |
|                                                                             |
|                            1                                                |
|o9 : A-module, quotient of A                                                 |
|-----------------------------------------------------------------------------|
|x1y0z0+y1x0z0+z1x0y0 x0y0z0 |                                                |
+-----------------------------------------------------------------------------+
|i10 : mult=for p in P list (                                                 |
|          Rp := localRing(A,f p);                                            |
|          length(M ** Rp)                                                    |
|          );                                                                 |
+-----------------------------------------------------------------------------+
|i11 : netList(pack(4,mingle{P,mult}),HorizontalSpace=>1)                     |
|                                                                             |
|      +--------------------+---+--------------------+---+                    |
|o11 = | ideal (z0, y0, x0) | 6 | ideal (z0, y0, z1) | 3 |                    |
|      +--------------------+---+--------------------+---+                    |
|      | ideal (z0, y0, y1) | 3 | ideal (z0, x0, z1) | 3 |                    |
|      +--------------------+---+--------------------+---+                    |
|      | ideal (z0, x0, x1) | 3 | ideal (z0, z1, z2) | 1 |                    |
|      +--------------------+---+--------------------+---+                    |
|      | ideal (y0, x0, y1) | 3 | ideal (y0, x0, x1) | 3 |                    |
|      +--------------------+---+--------------------+---+                    |
|      | ideal (y0, y1, y2) | 1 | ideal (x0, x1, x2) | 1 |                    |
|      +--------------------+---+--------------------+---+                    |
+-----------------------------------------------------------------------------+

Example 2 -- jets of graphs
***************************

Jets of graphs were introduced in F. Galetto, E. Helmick, and M. Walsh, Jet
graphs (see https://arxiv.org/abs/2104.08933 ) [GHW21]. Starting with a finite,
simple graph $G$, one may construct a quadratic squarefree monomial ideal
$I(G)$ (known as the \emph{edge ideal} of the graph) by converting edges to
monomials. One may then consider the radical of the ideal of $s$-jets of
$I(G)$, which is again a quadratic squarefree monomial ideal. The graph
corresponding to this ideal is the graph of $s$-jets of $G$, denoted
$\mathcal{J}_s (G)$.

Jets of graphs and hypergraphs can be obtained by applying the jets,
method to objects of type Graph (EdgeIdeals), and
HyperGraph (EdgeIdeals), from the Macaulay2 EdgeIdeals,
package (which is automatically loaded by the Jets,
package. Consider, for example, the graph in the figure below.

a graph on 5 vertices
+-----------------------------------------------------------------------------+
|i1 : R=QQ[a..e]                                                              |
|                                                                             |
|o1 = R                                                                       |
|                                                                             |
|o1 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i2 : G=graph({{a,c},{a,d},{a,e},{b,c},{b,d},{b,e},{c,e}})                    |
|                                                                             |
|o2 = Graph{edges => {{a, c}, {b, c}, {a, d}, {b, d}, {a, e}, {b, e}, {c, e}}}|
|           ring => R                                                         |
|           vertices => {a, b, c, d, e}                                       |
|                                                                             |
|o2 : Graph                                                                   |
+-----------------------------------------------------------------------------+

We compute the first and second order jets, and list their edges.

+---------------------------------------------------------------------+
|i3 : J1G=jets(1,G); netList pack(7,edges J1G)                        |
|                                                                     |
|     +--------+--------+--------+--------+--------+--------+--------+|
|o4 = |{c1, a0}|{d1, a0}|{e1, a0}|{c1, b0}|{d1, b0}|{e1, b0}|{a1, c0}||
|     +--------+--------+--------+--------+--------+--------+--------+|
|     |{b1, c0}|{e1, c0}|{a0, c0}|{b0, c0}|{a1, d0}|{b1, d0}|{a0, d0}||
|     +--------+--------+--------+--------+--------+--------+--------+|
|     |{b0, d0}|{a1, e0}|{b1, e0}|{c1, e0}|{a0, e0}|{b0, e0}|{c0, e0}||
|     +--------+--------+--------+--------+--------+--------+--------+|
+---------------------------------------------------------------------+
|i5 : J2G=jets(2,G); netList pack(7,edges J2G)                        |
|                                                                     |
|     +--------+--------+--------+--------+--------+--------+--------+|
|o6 = |{a1, c1}|{b1, c1}|{a1, d1}|{b1, d1}|{a1, e1}|{b1, e1}|{c1, e1}||
|     +--------+--------+--------+--------+--------+--------+--------+|
|     |{c2, a0}|{d2, a0}|{e2, a0}|{c1, a0}|{d1, a0}|{e1, a0}|{c2, b0}||
|     +--------+--------+--------+--------+--------+--------+--------+|
|     |{d2, b0}|{e2, b0}|{c1, b0}|{d1, b0}|{e1, b0}|{a2, c0}|{b2, c0}||
|     +--------+--------+--------+--------+--------+--------+--------+|
|     |{e2, c0}|{a1, c0}|{b1, c0}|{e1, c0}|{a0, c0}|{b0, c0}|{a2, d0}||
|     +--------+--------+--------+--------+--------+--------+--------+|
|     |{b2, d0}|{a1, d0}|{b1, d0}|{a0, d0}|{b0, d0}|{a2, e0}|{b2, e0}||
|     +--------+--------+--------+--------+--------+--------+--------+|
|     |{c2, e0}|{a1, e0}|{b1, e0}|{c1, e0}|{a0, e0}|{b0, e0}|{c0, e0}||
|     +--------+--------+--------+--------+--------+--------+--------+|
+---------------------------------------------------------------------+

As predicted in [GHW21, Theorem 3.1], all jets have the same chromatic number.

+---------------------------------------+
|i7 : apply({G,J1G,J2G},chromaticNumber)|
|                                       |
|o7 = {3, 3, 3}                         |
|                                       |
|o7 : List                              |
+---------------------------------------+

By contrast, jets may not preserve the property of being co-chordal.

+--------------------------------------------------------+
|i8 : apply({G,J1G,J2G},x -> isChordal complementGraph x)|
|                                                        |
|o8 = {true, true, false}                                |
|                                                        |
|o8 : List                                               |
+--------------------------------------------------------+

Using Fröberg's Theorem (cf. R. Fröberg, On Stanley-Reisner rings), we deduce
that although the edge ideal of a graph may have a linear free resolution, the
edge ideals of its jets may not have linear resolutions.

Finally, we compare minimal vertex covers of the graph and of its second order
jets.

+-------------------------------------------------------------+
|i9 : vertexCovers G                                          |
|                                                             |
|o9 = {a*b*c, a*b*e, c*d*e}                                   |
|                                                             |
|o9 : List                                                    |
+-------------------------------------------------------------+
|i10 : netList pack(2,vertexCovers J2G)                       |
|                                                             |
|      +--------------------------+--------------------------+|
|o10 = |a2*b2*c2*a1*b1*c1*a0*b0*c0|a2*b2*e2*a1*b1*e1*a0*b0*e0||
|      +--------------------------+--------------------------+|
|      |a2*b2*a1*b1*c1*a0*b0*c0*e0|a2*b2*a1*b1*e1*a0*b0*c0*e0||
|      +--------------------------+--------------------------+|
|      |c2*d2*e2*c1*d1*e1*c0*d0*e0|a1*b1*c1*a0*b0*c0*d0*e0   ||
|      +--------------------------+--------------------------+|
|      |a1*b1*e1*a0*b0*c0*d0*e0   |c1*d1*e1*a0*b0*c0*d0*e0   ||
|      +--------------------------+--------------------------+|
+-------------------------------------------------------------+

With the exception of the second row, many vertex covers arise as indicated in
[GHW21, Proposition 5.2, 5.3].

Example 3 -- jets of determinantal varieties
********************************************

Consider the determinantal varieties $X_r$ of $3\times 3$ matrices of rank at
most $r$, which are defined by the vanishing of minors of size $r+1$.  We
illustrate computationally some of the known results about jets.

+--------------------------------+
|i1 : R=QQ[x_(1,1)..x_(3,3)]     |
|                                |
|o1 = R                          |
|                                |
|o1 : PolynomialRing             |
+--------------------------------+
|i2 : G=genericMatrix(R,3,3)     |
|                                |
|o2 = | x_(1,1) x_(2,1) x_(3,1) ||
|     | x_(1,2) x_(2,2) x_(3,2) ||
|     | x_(1,3) x_(2,3) x_(3,3) ||
|                                |
|             3       3          |
|o2 : Matrix R  <--- R           |
+--------------------------------+

Since $X_0$ is a single point, its first jet scheme consists of a single
(smooth) point.

+-----------------------------------------------------------------------------+
|i3 : I1=minors(1,G)                                                          |
|                                                                             |
|o3 = ideal (x   , x   , x   , x   , x   , x   , x   , x   , x   )            |
|             1,1   1,2   1,3   2,1   2,2   2,3   3,1   3,2   3,3             |
|                                                                             |
|o3 : Ideal of R                                                              |
+-----------------------------------------------------------------------------+
|i4 : JI1=jets(1,I1)                                                          |
|                                                                             |
|o4 = ideal (x1   , x0   , x1   , x0   , x1   , x0   , x1   , x0   , x1   ,   |
|              1,1    1,1    1,2    1,2    1,3    1,3    2,1    2,1    2,2    |
|     ------------------------------------------------------------------------|
|     x0   , x1   , x0   , x1   , x0   , x1   , x0   , x1   , x0   )          |
|       2,2    2,3    2,3    3,1    3,1    3,2    3,2    3,3    3,3           |
|                                                                             |
|o4 : Ideal of QQ[x0   ..x0   ][x1   ..x1   ]                                 |
|                   1,1    3,3    1,1    3,3                                  |
+-----------------------------------------------------------------------------+
|i5 : dim JI1, isPrime JI1                                                    |
|                                                                             |
|o5 = (0, true)                                                               |
|                                                                             |
|o5 : Sequence                                                                |
+-----------------------------------------------------------------------------+

The jets of $X_2$ (the variety of maximal minors) are known to be irreducible
(see Theorem 3.1 in T. Košir, B.A. Sethuraman, Determinantal varieties over
truncated polynomial rings (see https://doi.org/10.1016/j.jpaa.2004.06.001 )
[KS05], or Corollary 4.13 in R. Docampo, Arcs on determinantal varieties (see
https://doi.org/10.1090/S0002-9947-2012-05564-4 ) [Doc13]).

+-----------------------------------------------------------------------------+
|i6 : I3=minors(3,G)                                                          |
|                                                                             |
|o6 = ideal(- x   x   x    + x   x   x    + x   x   x    - x   x   x    -     |
|              1,3 2,2 3,1    1,2 2,3 3,1    1,3 2,1 3,2    1,1 2,3 3,2       |
|     ------------------------------------------------------------------------|
|     x   x   x    + x   x   x   )                                            |
|      1,2 2,1 3,3    1,1 2,2 3,3                                             |
|                                                                             |
|o6 : Ideal of R                                                              |
+-----------------------------------------------------------------------------+
|i7 : JI3=jets(1,I3)                                                          |
|                                                                             |
|o7 = ideal ((- x0   x0    + x0   x0   )x1    + (x0   x0    - x0   x0   )x1   |
|                 2,3  3,2     2,2  3,3   1,1      2,3  3,1     2,1  3,3   1,2|
|     ------------------------------------------------------------------------|
|     + (- x0   x0    + x0   x0   )x1    + (x0   x0    - x0   x0   )x1    + (-|
|            2,2  3,1     2,1  3,2   1,3      1,3  3,2     1,2  3,3   2,1     |
|     ------------------------------------------------------------------------|
|     x0   x0    + x0   x0   )x1    + (x0   x0    - x0   x0   )x1    + (-     |
|       1,3  3,1     1,1  3,3   2,2      1,2  3,1     1,1  3,2   2,3          |
|     ------------------------------------------------------------------------|
|     x0   x0    + x0   x0   )x1    + (x0   x0    - x0   x0   )x1    + (-     |
|       1,3  2,2     1,2  2,3   3,1      1,3  2,1     1,1  2,3   3,2          |
|     ------------------------------------------------------------------------|
|     x0   x0    + x0   x0   )x1   , - x0   x0   x0    + x0   x0   x0    +    |
|       1,2  2,1     1,1  2,2   3,3      1,3  2,2  3,1     1,2  2,3  3,1      |
|     ------------------------------------------------------------------------|
|     x0   x0   x0    - x0   x0   x0    - x0   x0   x0    + x0   x0   x0   )  |
|       1,3  2,1  3,2     1,1  2,3  3,2     1,2  2,1  3,3     1,1  2,2  3,3   |
|                                                                             |
|o7 : Ideal of QQ[x0   ..x0   ][x1   ..x1   ]                                 |
|                   1,1    3,3    1,1    3,3                                  |
+-----------------------------------------------------------------------------+
|i8 : isPrime JI3                                                             |
|                                                                             |
|o8 = true                                                                    |
+-----------------------------------------------------------------------------+

As for the case of $2\times 2$ minors, Theorem 5.1 in [KS05], Theorem 5.1 in C.
Yuen, Jet schemes of determinantal varieties (see
https://arxiv.org/abs/math/0608632 ), and Corollary 4.13 in [Doc13] all count
the number of components; the first two references describe the components
further. As expected, the first jet scheme of $X_1$ has two components, one of
them an affine space.

+-----------------------------------------------------------------------------+
|i9 : I2=minors(2,G)                                                          |
|                                                                             |
|o9 = ideal (- x   x    + x   x   , - x   x    + x   x   , - x   x    +       |
|               1,2 2,1    1,1 2,2     1,3 2,1    1,1 2,3     1,3 2,2         |
|     ------------------------------------------------------------------------|
|     x   x   , - x   x    + x   x   , - x   x    + x   x   , - x   x    +    |
|      1,2 2,3     1,2 3,1    1,1 3,2     1,3 3,1    1,1 3,3     1,3 3,2      |
|     ------------------------------------------------------------------------|
|     x   x   , - x   x    + x   x   , - x   x    + x   x   , - x   x    +    |
|      1,2 3,3     2,2 3,1    2,1 3,2     2,3 3,1    2,1 3,3     2,3 3,2      |
|     ------------------------------------------------------------------------|
|     x   x   )                                                               |
|      2,2 3,3                                                                |
|                                                                             |
|o9 : Ideal of R                                                              |
+-----------------------------------------------------------------------------+
|i10 : JI2=jets(1,I2)                                                         |
|                                                                             |
|o10 = ideal (x0   x1    - x0   x1    - x0   x1    + x0   x1   , - x0   x0    |
|               2,2  1,1     2,1  1,2     1,2  2,1     1,1  2,2      1,2  2,1 |
|      -----------------------------------------------------------------------|
|      + x0   x0   , x0   x1    - x0   x1    - x0   x1    + x0   x1   , -     |
|          1,1  2,2    2,3  1,1     2,1  1,3     1,3  2,1     1,1  2,3        |
|      -----------------------------------------------------------------------|
|      x0   x0    + x0   x0   , x0   x1    - x0   x1    - x0   x1    +        |
|        1,3  2,1     1,1  2,3    2,3  1,2     2,2  1,3     1,3  2,2          |
|      -----------------------------------------------------------------------|
|      x0   x1   , - x0   x0    + x0   x0   , x0   x1    - x0   x1    -       |
|        1,2  2,3      1,3  2,2     1,2  2,3    3,2  1,1     3,1  1,2         |
|      -----------------------------------------------------------------------|
|      x0   x1    + x0   x1   , - x0   x0    + x0   x0   , x0   x1    -       |
|        1,2  3,1     1,1  3,2      1,2  3,1     1,1  3,2    3,3  1,1         |
|      -----------------------------------------------------------------------|
|      x0   x1    - x0   x1    + x0   x1   , - x0   x0    + x0   x0   ,       |
|        3,1  1,3     1,3  3,1     1,1  3,3      1,3  3,1     1,1  3,3        |
|      -----------------------------------------------------------------------|
|      x0   x1    - x0   x1    - x0   x1    + x0   x1   , - x0   x0    +      |
|        3,3  1,2     3,2  1,3     1,3  3,2     1,2  3,3      1,3  3,2        |
|      -----------------------------------------------------------------------|
|      x0   x0   , x0   x1    - x0   x1    - x0   x1    + x0   x1   , -       |
|        1,2  3,3    3,2  2,1     3,1  2,2     2,2  3,1     2,1  3,2          |
|      -----------------------------------------------------------------------|
|      x0   x0    + x0   x0   , x0   x1    - x0   x1    - x0   x1    +        |
|        2,2  3,1     2,1  3,2    3,3  2,1     3,1  2,3     2,3  3,1          |
|      -----------------------------------------------------------------------|
|      x0   x1   , - x0   x0    + x0   x0   , x0   x1    - x0   x1    -       |
|        2,1  3,3      2,3  3,1     2,1  3,3    3,3  2,2     3,2  2,3         |
|      -----------------------------------------------------------------------|
|      x0   x1    + x0   x1   , - x0   x0    + x0   x0   )                    |
|        2,3  3,2     2,2  3,3      2,3  3,2     2,2  3,3                     |
|                                                                             |
|o10 : Ideal of QQ[x0   ..x0   ][x1   ..x1   ]                                |
|                    1,1    3,3    1,1    3,3                                 |
+-----------------------------------------------------------------------------+
|i11 : P=primaryDecomposition JI2; #P                                         |
|                                                                             |
|o12 = 2                                                                      |
+-----------------------------------------------------------------------------+
|i13 : P_1                                                                    |
|                                                                             |
|o13 = ideal (x0   , x0   , x0   , x0   , x0   , x0   , x0   , x0   , x0   )  |
|               3,3    3,2    3,1    2,3    2,2    2,1    1,3    1,2    1,1   |
|                                                                             |
|o13 : Ideal of QQ[x0   ..x0   ][x1   ..x1   ]                                |
|                    1,1    3,3    1,1    3,3                                 |
+-----------------------------------------------------------------------------+

The other component is the so-called principal component of the jet scheme,
i.e., the Zariski closure of the first jets of the smooth locus of $X_1$. To
check this, we first establish that the first jet scheme is reduced (i.e. its
ideal is radical), then use the principalComponent,
method with the option principalComponent(...,Saturate=>...),
set to false to speed up computations.

+-----------------------------------------------------------------------------+
|i14 : radical JI2==JI2                                                       |
|                                                                             |
|o14 = true                                                                   |
+-----------------------------------------------------------------------------+
|i15 : P_0 == principalComponent(1,I2,Saturate=>false)                        |
|                                                                             |
|o15 = true                                                                   |
+-----------------------------------------------------------------------------+
|i16 : P_0                                                                    |
|                                                                             |
|o16 = ideal (x0   x0    - x0   x0   , x0   x0    - x0   x0   , x0   x0    -  |
|               2,3  3,2     2,2  3,3    1,3  3,2     1,2  3,3    2,3  3,1    |
|      -----------------------------------------------------------------------|
|      x0   x0   , x0   x0    - x0   x0   , x0   x0    - x0   x0   ,          |
|        2,1  3,3    2,2  3,1     2,1  3,2    1,3  3,1     1,1  3,3           |
|      -----------------------------------------------------------------------|
|      x0   x0    - x0   x0   , x0   x0    - x0   x0   , x0   x0    -         |
|        1,2  3,1     1,1  3,2    1,3  2,2     1,2  2,3    1,3  2,1           |
|      -----------------------------------------------------------------------|
|      x0   x0   , x0   x0    - x0   x0   , x0   x1    - x0   x1    -         |
|        1,1  2,3    1,2  2,1     1,1  2,2    3,3  2,2     3,2  2,3           |
|      -----------------------------------------------------------------------|
|      x0   x1    + x0   x1   , x0   x1    - x0   x1    - x0   x1    +        |
|        2,3  3,2     2,2  3,3    3,3  2,1     3,1  2,3     2,3  3,1          |
|      -----------------------------------------------------------------------|
|      x0   x1   , x0   x1    - x0   x1    - x0   x1    + x0   x1   ,         |
|        2,1  3,3    3,2  2,1     3,1  2,2     2,2  3,1     2,1  3,2          |
|      -----------------------------------------------------------------------|
|      x0   x1    - x0   x1    - x0   x1    + x0   x1   , x0   x1    -        |
|        3,3  1,2     3,2  1,3     1,3  3,2     1,2  3,3    2,3  1,2          |
|      -----------------------------------------------------------------------|
|      x0   x1    - x0   x1    + x0   x1   , x0   x1    - x0   x1    -        |
|        2,2  1,3     1,3  2,2     1,2  2,3    3,3  1,1     3,1  1,3          |
|      -----------------------------------------------------------------------|
|      x0   x1    + x0   x1   , x0   x1    - x0   x1    - x0   x1    +        |
|        1,3  3,1     1,1  3,3    3,2  1,1     3,1  1,2     1,2  3,1          |
|      -----------------------------------------------------------------------|
|      x0   x1   , x0   x1    - x0   x1    - x0   x1    + x0   x1   ,         |
|        1,1  3,2    2,3  1,1     2,1  1,3     1,3  2,1     1,1  2,3          |
|      -----------------------------------------------------------------------|
|      x0   x1    - x0   x1    - x0   x1    + x0   x1   , x1   x1   x1    -   |
|        2,2  1,1     2,1  1,2     1,2  2,1     1,1  2,2    1,3  2,2  3,1     |
|      -----------------------------------------------------------------------|
|      x1   x1   x1    - x1   x1   x1    + x1   x1   x1    + x1   x1   x1    -|
|        1,2  2,3  3,1     1,3  2,1  3,2     1,1  2,3  3,2     1,2  2,1  3,3  |
|      -----------------------------------------------------------------------|
|      x1   x1   x1   )                                                       |
|        1,1  2,2  3,3                                                        |
|                                                                             |
|o16 : Ideal of QQ[x0   ..x0   ][x1   ..x1   ]                                |
|                    1,1    3,3    1,1    3,3                                 |
+-----------------------------------------------------------------------------+

Finally, as observed in Theorem 18 of S.R. Ghorpade, B. Jonov and B.A.
Sethuraman, Hilbert series of certain jet schemes of determinantal varieties
(see http://dx.doi.org/10.2140/pjm.2014.272.147 ) the Hilbert series of the
principal component of the first jet scheme of $X_1$ is the square of the
Hilbert series of $X_1$.

+---------------------------------------------------------+
|i17 : apply({P_0,I2}, X -> hilbertSeries(X,Reduce=>true))|
|                                                         |
|                   2     3    4            2             |
|       1 + 8T + 18T  + 8T  + T   1 + 4T + T              |
|o17 = {------------------------, -----------}            |
|                      10                  5              |
|               (1 - T)             (1 - T)               |
|                                                         |
|o17 : List                                               |
+---------------------------------------------------------+
|i18 : numerator (first oo) == (numerator last oo)^2      |
|                                                         |
|o18 = true                                               |
+---------------------------------------------------------+

Storing Computations -- caching scheme for jets computations
************************************************************

In many cases, the jets, method will store its results inside a
CacheTable (Macaulay2Doc), in the base object. When the method
is called again with the same or a lower jets order, the result is pulled from
the cache.

For polynomial rings, data is stored under *.jet.

+---------------------------------------------------------------+
|i1 : R= QQ[x,y]                                                |
|                                                               |
|o1 = R                                                         |
|                                                               |
|o1 : PolynomialRing                                            |
+---------------------------------------------------------------+
|i2 : R.?jet                                                    |
|                                                               |
|o2 = false                                                     |
+---------------------------------------------------------------+
|i3 : jets(3,R)                                                 |
|                                                               |
|o3 = QQ[x0, y0][x1, y1][x2, y2][x3, y3]                        |
|                                                               |
|o3 : PolynomialRing                                            |
+---------------------------------------------------------------+
|i4 : R.?jet                                                    |
|                                                               |
|o4 = true                                                      |
+---------------------------------------------------------------+
|i5 : peek R.jet                                                |
|                                                               |
|o5 = CacheTable{jetsMaxOrder => 3                             }|
|                jetsRing => QQ[x0, y0][x1, y1][x2, y2][x3, y3] |
+---------------------------------------------------------------+

Note also that rings of jets are built as towers from lower to higher jets
orders. Therefore it is possible to store a single ring of the highest order
computed thus far.

For ideals, data is stored under *.cache.jet. A single matrix is stored
containing generators for the highest order of jets computed thus far.
Generators for lower orders are recovered from this matrix without additional
computations.

+----------------------------------------------------------------------------+
|i6 : I= ideal (x^2 - y)                                                     |
|                                                                            |
|            2                                                               |
|o6 = ideal(x  - y)                                                          |
|                                                                            |
|o6 : Ideal of R                                                             |
+----------------------------------------------------------------------------+
|i7 : I.cache.?jet                                                           |
|                                                                            |
|o7 = false                                                                  |
+----------------------------------------------------------------------------+
|i8 : elapsedTime jets(3,I)                                                  |
| -- 0.0989431 seconds elapsed                                               |
|                                                                            |
|                                                  2                 2       |
|o8 = ideal (2x0*x3 - y3 + 2x1*x2, 2x0*x2 - y2 + x1 , 2x0*x1 - y1, x0  - y0) |
|                                                                            |
|o8 : Ideal of QQ[x0, y0][x1, y1][x2, y2][x3, y3]                            |
+----------------------------------------------------------------------------+
|i9 : I.cache.?jet                                                           |
|                                                                            |
|o9 = true                                                                   |
+----------------------------------------------------------------------------+
|i10 : peek I.cache.jet                                                      |
|                                                                            |
|o10 = CacheTable{jetsMatrix => | 2x0x3-y3+2x1x2 |}                          |
|                               | 2x0x2-y2+x1^2  |                           |
|                               | 2x0x1-y1       |                           |
|                               | x0^2-y0        |                           |
|                 jetsMaxOrder => 3                                          |
+----------------------------------------------------------------------------+
|i11 : elapsedTime jets(3,I)                                                 |
| -- 0.00518438 seconds elapsed                                              |
|                                                                            |
|                                                   2                 2      |
|o11 = ideal (2x0*x3 - y3 + 2x1*x2, 2x0*x2 - y2 + x1 , 2x0*x1 - y1, x0  - y0)|
|                                                                            |
|o11 : Ideal of QQ[x0, y0][x1, y1][x2, y2][x3, y3]                           |
+----------------------------------------------------------------------------+
|i12 : elapsedTime jets(2,I)                                                 |
| -- 0.00382195 seconds elapsed                                              |
|                                                                            |
|                             2                 2                            |
|o12 = ideal (2x0*x2 - y2 + x1 , 2x0*x1 - y1, x0  - y0)                      |
|                                                                            |
|o12 : Ideal of QQ[x0, y0][x1, y1][x2, y2]                                   |
+----------------------------------------------------------------------------+

For quotient rings, data is stored under *.jet. Each jets order gives rise to a
different quotient that is stored separately under *.jet.jetsRing (order zero
jets are always included by default).

+-----------------------------------------------------------------------------+
|i13 : Q= R/I                                                                 |
|                                                                             |
|o13 = Q                                                                      |
|                                                                             |
|o13 : QuotientRing                                                           |
+-----------------------------------------------------------------------------+
|i14 : Q.?jet                                                                 |
|                                                                             |
|o14 = false                                                                  |
+-----------------------------------------------------------------------------+
|i15 : jets(3,Q)                                                              |
|                                                                             |
|                     QQ[x0, y0][x1, y1][x2, y2][x3, y3]                      |
|o15 = ----------------------------------------------------------------       |
|                                             2                 2             |
|      (2x0*x3 - y3 + 2x1*x2, 2x0*x2 - y2 + x1 , 2x0*x1 - y1, x0  - y0)       |
|                                                                             |
|o15 : QuotientRing                                                           |
+-----------------------------------------------------------------------------+
|i16 : Q.?jet                                                                 |
|                                                                             |
|o16 = true                                                                   |
+-----------------------------------------------------------------------------+
|i17 : peek Q.jet.jetsRing                                                    |
|                                                                             |
|                                     QQ[x0, y0][x1, y1][x2, y2][x3, y3]      |
|o17 = CacheTable{3 => -------------------------------------------------------|
|                                                             2               |
|                      (2x0*x3 - y3 + 2x1*x2, 2x0*x2 - y2 + x1 , 2x0*x1 - y1, |
|                      QQ[x0, y0]                                             |
|                 0 => ----------                                             |
|                         2                                                   |
|                       x0  - y0                                              |
|-----------------------------------------------------------------------------|
|---------}                                                                   |
|  2                                                                          |
|x0  - y0)                                                                    |
+-----------------------------------------------------------------------------+
|i18 : jets(2,Q)                                                              |
|                                                                             |
|              QQ[x0, y0][x1, y1][x2, y2]                                     |
|o18 = ------------------------------------------                             |
|                       2                 2                                   |
|      (2x0*x2 - y2 + x1 , 2x0*x1 - y1, x0  - y0)                             |
|                                                                             |
|o18 : QuotientRing                                                           |
+-----------------------------------------------------------------------------+
|i19 : peek Q.jet.jetsRing                                                    |
|                                                                             |
|                                     QQ[x0, y0][x1, y1][x2, y2][x3, y3]      |
|o19 = CacheTable{3 => -------------------------------------------------------|
|                                                             2               |
|                      (2x0*x3 - y3 + 2x1*x2, 2x0*x2 - y2 + x1 , 2x0*x1 - y1, |
|                              QQ[x0, y0][x1, y1][x2, y2]                     |
|                 2 => ------------------------------------------             |
|                                       2                 2                   |
|                      (2x0*x2 - y2 + x1 , 2x0*x1 - y1, x0  - y0)             |
|                      QQ[x0, y0]                                             |
|                 0 => ----------                                             |
|                         2                                                   |
|                       x0  - y0                                              |
|-----------------------------------------------------------------------------|
|---------}                                                                   |
|  2                                                                          |
|x0  - y0)                                                                    |
+-----------------------------------------------------------------------------+

For ring homomorphisms, data is stored under *.cache.jet. A single matrix is
stored describing the map for the highest order of jets computed thus far.
Lower orders map are recovered from this matrix without additional
computations.

+-----------------------------------------------------------------------------+
|i20 : S= QQ[t]                                                               |
|                                                                             |
|o20 = S                                                                      |
|                                                                             |
|o20 : PolynomialRing                                                         |
+-----------------------------------------------------------------------------+
|i21 : f= map(S,Q,{t,t^2})                                                    |
|                                                                             |
|                      2                                                      |
|o21 = map (S, Q, {t, t })                                                    |
|                                                                             |
|o21 : RingMap S <--- Q                                                       |
+-----------------------------------------------------------------------------+
|i22 : isWellDefined f                                                        |
|                                                                             |
|o22 = true                                                                   |
+-----------------------------------------------------------------------------+
|i23 : f.cache.?jet                                                           |
|                                                                             |
|o23 = false                                                                  |
+-----------------------------------------------------------------------------+
|i24 : elapsedTime jets(3,f)                                                  |
| -- 0.0652982 seconds elapsed                                                |
|                                                                             |
|                                                                             |
|o24 = map (QQ[t0][t1][t2][t3],                                               |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|o24 : RingMap QQ[t0][t1][t2][t3                                              |
|                                                                             |
|                                                                             |
|-----------------------------------------------------------------------------|
|               QQ[x0, y0][x1, y1][x2, y2][x3, y3]                            |
|----------------------------------------------------------------, {t3, 2t0*t3|
|                                       2                 2                   |
|(2x0*x3 - y3 + 2x1*x2, 2x0*x2 - y2 + x1 , 2x0*x1 - y1, x0  - y0)             |
|                                                                             |
|                      QQ[x0, y0][x1, y1][x2, y2][x3, y3]                     |
|] <--- ----------------------------------------------------------------      |
|                                              2                 2            |
|       (2x0*x3 - y3 + 2x1*x2, 2x0*x2 - y2 + x1 , 2x0*x1 - y1, x0  - y0)      |
|-----------------------------------------------------------------------------|
|                         2                    2                              |
|+ 2t1*t2, t2, 2t0*t2 + t1 , t1, 2t0*t1, t0, t0 })                            |
+-----------------------------------------------------------------------------+
|i25 : f.cache.?jet                                                           |
|                                                                             |
|o25 = true                                                                   |
+-----------------------------------------------------------------------------+
|i26 : peek f.cache.jet                                                       |
|                                                                             |
|o26 = CacheTable{jetsMatrix => | t3 2t0t3+2t1t2 |}                           |
|                               | t2 2t0t2+t1^2  |                            |
|                               | t1 2t0t1       |                            |
|                               | t0 t0^2        |                            |
|                 jetsMaxOrder => 3                                           |
+-----------------------------------------------------------------------------+
|i27 : elapsedTime jets(2,f)                                                  |
| -- 0.0027911 seconds elapsed                                                |
|                                                                             |
|                                   QQ[x0, y0][x1, y1][x2, y2]                |
|o27 = map (QQ[t0][t1][t2], ------------------------------------------, {t2,  |
|                                            2                 2              |
|                           (2x0*x2 - y2 + x1 , 2x0*x1 - y1, x0  - y0)        |
|                                                                             |
|                                          QQ[x0, y0][x1, y1][x2, y2]         |
|o27 : RingMap QQ[t0][t1][t2] <--- ------------------------------------------ |
|                                                   2                 2       |
|                                  (2x0*x2 - y2 + x1 , 2x0*x1 - y1, x0  - y0) |
|-----------------------------------------------------------------------------|
|           2                    2                                            |
|2t0*t2 + t1 , t1, 2t0*t1, t0, t0 })                                          |
+-----------------------------------------------------------------------------+

Projective jets data is stored separately under *.projet or *.cache.projet to
accommodate for the different grading.

+--------------------------------------------------------+
|i28 : jets(2,I,Projective=>true)                        |
|                                                        |
|                             2                 2        |
|o28 = ideal (2x0*x2 - y2 + x1 , 2x0*x1 - y1, x0  - y0)  |
|                                                        |
|o28 : Ideal of QQ[x0, y0][x1, y1][x2, y2]               |
+--------------------------------------------------------+
|i29 : peek I.cache.projet                               |
|                                                        |
|o29 = CacheTable{jetsMatrix => {-2} | 2x0x2-y2+x1^2 |}  |
|                               {-1} | 2x0x1-y1      |   |
|                               {0}  | x0^2-y0       |   |
|                 jetsMaxOrder => 2                      |
+--------------------------------------------------------+
|i30 : peek R.projet                                     |
|                                                        |
|o30 = CacheTable{jetsMaxOrder => 2                     }|
|                 jetsRing => QQ[x0, y0][x1, y1][x2, y2] |
+--------------------------------------------------------+

Caveat
======

No data is cached when computing jets of affine varieties and (hyper)graphs,
radicals, or principal components.

jet -- hashtable key
********************

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

See CacheTable (Macaulay2Doc), for storing information on jets
constructed from a base object x. For PolynomialRing (Macaulay2Doc),
and QuotientRing (Macaulay2Doc),
stored as x.*. For RingMap (Macaulay2Doc),
and Ideal (Macaulay2Doc), stored as
x.cache.*.

See also
========

  * projet -- hashtable key
  * jetsRing -- hashtable value
  * jetsMaxOrder -- hashtable value
  * jetsMatrix -- hashtable value
  * jetsBase -- hashtable value
  * jetsInfo -- hashtable key

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

The object jet, is a symbol (Macaulay2Doc).

projet -- hashtable key
***********************

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

See CacheTable (Macaulay2Doc), for storing information on the
projective jets of the base object x. For PolynomialRing (Macaulay2Doc),
and QuotientRing (Macaulay2Doc),
stored as x.*. For RingMap (Macaulay2Doc),
and Ideal (Macaulay2Doc), stored as
x.cache.*.

See also
========

  * jet -- hashtable key
  * jetsRing -- hashtable value
  * jetsMaxOrder -- hashtable value
  * jetsMatrix -- hashtable value
  * jetsBase -- hashtable value
  * jetsInfo -- hashtable key

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

The object projet, is a symbol (Macaulay2Doc).

jetsRing -- hashtable value
***************************

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

The jets(ZZ,PolynomialRing), of highest
order computed thus far for a particular base ring.  Stored in jet,
or projet, of the base.

See also
========

  * jet -- hashtable key
  * projet -- hashtable key
  * jetsMaxOrder -- hashtable value
  * jetsMatrix -- hashtable value
  * jetsBase -- hashtable value
  * jetsInfo -- hashtable key

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

The object jetsRing, is a symbol (Macaulay2Doc).

jetsMaxOrder -- hashtable value
*******************************

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

The highest order of jets computed thus far for a particular object.  Stored in
jet, or projet, of the base object.

See also
========

  * jet -- hashtable key
  * projet -- hashtable key
  * jetsRing -- hashtable value
  * jetsMatrix -- hashtable value
  * jetsBase -- hashtable value
  * jetsInfo -- hashtable key

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

The object jetsMaxOrder, is a symbol (Macaulay2Doc).

jetsMatrix -- hashtable value
*****************************

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

A matrix of jets elements which generate a jets(ZZ,Ideal),
or serve as targets for a jets(ZZ,RingMap).
Stored in jet, or projet, of
the base.

See also
========

  * jet -- hashtable key
  * projet -- hashtable key
  * jetsRing -- hashtable value
  * jetsMaxOrder -- hashtable value
  * jetsBase -- hashtable value
  * jetsInfo -- hashtable key

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

The object jetsMatrix, is a symbol (Macaulay2Doc).

jetsBase -- hashtable value
***************************

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

The base ring of a jets(ZZ,PolynomialRing).
Stored in a jets object for reference.

See also
========

  * jet -- hashtable key
  * projet -- hashtable key
  * jetsRing -- hashtable value
  * jetsMaxOrder -- hashtable value
  * jetsMatrix -- hashtable value
  * jetsInfo -- hashtable key

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

The object jetsBase, is a symbol (Macaulay2Doc).

jetsInfo -- hashtable key
*************************

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

See CacheTable (Macaulay2Doc), for storing information on the base
object within the jets object.

See also
========

  * jet -- hashtable key
  * projet -- hashtable key
  * jetsRing -- hashtable value
  * jetsMatrix -- hashtable value
  * jetsBase -- hashtable value
  * jetsMaxOrder -- hashtable value

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

The object jetsInfo, is a symbol (Macaulay2Doc).