This is MatrixFactorizations.info, produced by Macaulay2, version 1.26.06

MatrixFactorizations -- A package for creating and computing objects in the category of ZZ/d-graded factorizations, such as matrix factorizations
*************************************************************************************************************************************************

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

A ZZ/d-graded factorization F  of a ring element f is a ZZ/d-graded complex of
free R-modules equipped with a degree -1 (mod d) endomorphism $\text{d}^F$ such
that $(\text{d}^F)^d = f * id_F$. In practice, a ZZdFactorization,
may be visualized as a sequence of R-module maps:

$$F_0 \leftarrow F_1 \leftarrow \cdots \leftarrow F_{d-1}$$

with the caveat that $d^F_0 : F_0 \to F_{d-1}$, since one should count degree
modulo d. Any 2-periodic complex may be reinterpretted as a ZZ/2-graded
factorization of 0, and likewise a matrix factorization of a ring element f is
equivalently a ZZ/2-graded factorization of f. Because of their similarity with
complexes, much of the functionality and syntax for this package closely
resembles the Complexes, package, with some key
differences.

Firstly, the output string of a ZZdFactorization, and
ZZdFactorizationMap, is meant to illustrate the
periodic nature of a ZZ/d-graded factorization.

+---------------------------------------------------------------+
|i1 : S = ZZ/101[a..c];                                         |
+---------------------------------------------------------------+
|i2 : K = koszulMF({a,b,c}, a^2 + b^2 + c^2)                    |
|                                                               |
|      4      4      4                                          |
|o2 = S  <-- S  <-- S                                           |
|                                                               |
|     0      1      0                                           |
|                                                               |
|o2 : ZZdFactorization                                          |
+---------------------------------------------------------------+
|i3 : diffs = K.dd                                              |
|                                                               |
|          4                      4                             |
|o3 = 1 : S  <------------------ S  : 0                         |
|               | c 0  b  a  |                                  |
|               | 0 c  a  -b |                                  |
|               | b a  -c 0  |                                  |
|               | a -b 0  -c |                                  |
|                                                               |
|          4                      4                             |
|     0 : S  <------------------ S  : 1                         |
|               | c 0  b  a  |                                  |
|               | 0 c  a  -b |                                  |
|               | b a  -c 0  |                                  |
|               | a -b 0  -c |                                  |
|                                                               |
|o3 : ZZdFactorizationMap                                       |
+---------------------------------------------------------------+
|i4 : K.dd^2                                                    |
|                                                               |
|          4                                               4    |
|o4 = 0 : S  <------------------------------------------- S  : 0|
|               | a2+b2+c2 0        0        0        |         |
|               | 0        a2+b2+c2 0        0        |         |
|               | 0        0        a2+b2+c2 0        |         |
|               | 0        0        0        a2+b2+c2 |         |
|                                                               |
|          4                                               4    |
|     1 : S  <------------------------------------------- S  : 1|
|               | a2+b2+c2 0        0        0        |         |
|               | 0        a2+b2+c2 0        0        |         |
|               | 0        0        a2+b2+c2 0        |         |
|               | 0        0        0        a2+b2+c2 |         |
|                                                               |
|o4 : ZZdFactorizationMap                                       |
+---------------------------------------------------------------+

A ZZ/d-graded factorization does not have a concentration, but instead has a
period. The period is a very important invariant, since almost
all of the methods implemented depend on the period of the factorization, and
will give legitimately different outputs as the period varies.

+-----------------------------------------------------------------------------+
|i5 : period K                                                                |
|                                                                             |
|o5 = 2                                                                       |
+-----------------------------------------------------------------------------+
|i6 : K' = linearMF(a^3 + b^3 + c^3, t) --we have to adjoin a root of unity t |
|                                                                             |
|     /   S[t]   \9     /   S[t]   \9     /   S[t]   \9     /   S[t]   \9     |
|o6 = |----------|  <-- |----------|  <-- |----------|  <-- |----------|      |
|     | 2        |      | 2        |      | 2        |      | 2        |      |
|     \t  + t + 1/      \t  + t + 1/      \t  + t + 1/      \t  + t + 1/      |
|                                                                             |
|     0                 1                 2                 0                 |
|                                                                             |
|o6 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i7 : period K'                                                               |
|                                                                             |
|o7 = 3                                                                       |
+-----------------------------------------------------------------------------+
|i8 : diffs' = K'.dd                                                          |
|                                                                             |
|         /   S[t]   \9                                                       |
|o8 = 2 : |----------|  <-----------------------------------------------------|
|         | 2        |     {0, 3} | c 0  0     b  a  0     0     0     0     ||
|         \t  + t + 1/     {0, 3} | 0 c  0     0  bt a     0     0     0     ||
|                          {0, 3} | 0 0  c     a  0  -bt-b 0     0     0     ||
|                          {0, 3} | 0 0  0     ct 0  0     b     a     0     ||
|                          {0, 3} | 0 0  0     0  ct 0     0     bt    a     ||
|                          {0, 3} | 0 0  0     0  0  ct    a     0     -bt-b ||
|                          {0, 3} | b a  0     0  0  0     -ct-c 0     0     ||
|                          {0, 3} | 0 bt a     0  0  0     0     -ct-c 0     ||
|                          {0, 3} | a 0  -bt-b 0  0  0     0     0     -ct-c ||
|                                                                             |
|         /   S[t]   \9                                                       |
|     0 : |----------|  <-----------------------------------------------------|
|         | 2        |     {0, 3} | c 0  0     b  a  0     0     0     0     ||
|         \t  + t + 1/     {0, 3} | 0 c  0     0  bt a     0     0     0     ||
|                          {0, 3} | 0 0  c     a  0  -bt-b 0     0     0     ||
|                          {0, 3} | 0 0  0     ct 0  0     b     a     0     ||
|                          {0, 3} | 0 0  0     0  ct 0     0     bt    a     ||
|                          {0, 3} | 0 0  0     0  0  ct    a     0     -bt-b ||
|                          {0, 3} | b a  0     0  0  0     -ct-c 0     0     ||
|                          {0, 3} | 0 bt a     0  0  0     0     -ct-c 0     ||
|                          {0, 3} | a 0  -bt-b 0  0  0     0     0     -ct-c ||
|                                                                             |
|         /   S[t]   \9                                                       |
|     1 : |----------|  <-----------------------------------------------------|
|         | 2        |     {0, 3} | c 0  0     b  a  0     0     0     0     ||
|         \t  + t + 1/     {0, 3} | 0 c  0     0  bt a     0     0     0     ||
|                          {0, 3} | 0 0  c     a  0  -bt-b 0     0     0     ||
|                          {0, 3} | 0 0  0     ct 0  0     b     a     0     ||
|                          {0, 3} | 0 0  0     0  ct 0     0     bt    a     ||
|                          {0, 3} | 0 0  0     0  0  ct    a     0     -bt-b ||
|                          {0, 3} | b a  0     0  0  0     -ct-c 0     0     ||
|                          {0, 3} | 0 bt a     0  0  0     0     -ct-c 0     ||
|                          {0, 3} | a 0  -bt-b 0  0  0     0     0     -ct-c ||
|                                                                             |
|o8 : ZZdFactorizationMap                                                     |
|-----------------------------------------------------------------------------|
|   /   S[t]   \9                                                             |
|-- |----------|  : 0                                                         |
|   | 2        |                                                              |
|   \t  + t + 1/                                                              |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|   /   S[t]   \9                                                             |
|-- |----------|  : 1                                                         |
|   | 2        |                                                              |
|   \t  + t + 1/                                                              |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|   /   S[t]   \9                                                             |
|-- |----------|  : 2                                                         |
|   | 2        |                                                              |
|   \t  + t + 1/                                                              |
+-----------------------------------------------------------------------------+
|i9 : (diffs')^3                                                              |
|                                                                             |
|         /   S[t]   \9                                                       |
|o9 = 0 : |----------|  <-----------------------------------------------------|
|         | 2        |     {0, 3} | a3+b3+c3 0        0        0        0     |
|         \t  + t + 1/     {0, 3} | 0        a3+b3+c3 0        0        0     |
|                          {0, 3} | 0        0        a3+b3+c3 0        0     |
|                          {0, 3} | 0        0        0        a3+b3+c3 0     |
|                          {0, 3} | 0        0        0        0        a3+b3+|
|                          {0, 3} | 0        0        0        0        0     |
|                          {0, 3} | 0        0        0        0        0     |
|                          {0, 3} | 0        0        0        0        0     |
|                          {0, 3} | 0        0        0        0        0     |
|                                                                             |
|         /   S[t]   \9                                                       |
|     1 : |----------|  <-----------------------------------------------------|
|         | 2        |     {0, 3} | a3+b3+c3 0        0        0        0     |
|         \t  + t + 1/     {0, 3} | 0        a3+b3+c3 0        0        0     |
|                          {0, 3} | 0        0        a3+b3+c3 0        0     |
|                          {0, 3} | 0        0        0        a3+b3+c3 0     |
|                          {0, 3} | 0        0        0        0        a3+b3+|
|                          {0, 3} | 0        0        0        0        0     |
|                          {0, 3} | 0        0        0        0        0     |
|                          {0, 3} | 0        0        0        0        0     |
|                          {0, 3} | 0        0        0        0        0     |
|                                                                             |
|         /   S[t]   \9                                                       |
|     2 : |----------|  <-----------------------------------------------------|
|         | 2        |     {0, 3} | a3+b3+c3 0        0        0        0     |
|         \t  + t + 1/     {0, 3} | 0        a3+b3+c3 0        0        0     |
|                          {0, 3} | 0        0        a3+b3+c3 0        0     |
|                          {0, 3} | 0        0        0        a3+b3+c3 0     |
|                          {0, 3} | 0        0        0        0        a3+b3+|
|                          {0, 3} | 0        0        0        0        0     |
|                          {0, 3} | 0        0        0        0        0     |
|                          {0, 3} | 0        0        0        0        0     |
|                          {0, 3} | 0        0        0        0        0     |
|                                                                             |
|o9 : ZZdFactorizationMap                                                     |
|-----------------------------------------------------------------------------|
|                                           /   S[t]   \9                     |
|------------------------------------------ |----------|  : 0                 |
|   0        0        0        0        |   | 2        |                      |
|   0        0        0        0        |   \t  + t + 1/                      |
|   0        0        0        0        |                                     |
|   0        0        0        0        |                                     |
|c3 0        0        0        0        |                                     |
|   a3+b3+c3 0        0        0        |                                     |
|   0        a3+b3+c3 0        0        |                                     |
|   0        0        a3+b3+c3 0        |                                     |
|   0        0        0        a3+b3+c3 |                                     |
|                                                                             |
|                                           /   S[t]   \9                     |
|------------------------------------------ |----------|  : 1                 |
|   0        0        0        0        |   | 2        |                      |
|   0        0        0        0        |   \t  + t + 1/                      |
|   0        0        0        0        |                                     |
|   0        0        0        0        |                                     |
|c3 0        0        0        0        |                                     |
|   a3+b3+c3 0        0        0        |                                     |
|   0        a3+b3+c3 0        0        |                                     |
|   0        0        a3+b3+c3 0        |                                     |
|   0        0        0        a3+b3+c3 |                                     |
|                                                                             |
|                                           /   S[t]   \9                     |
|------------------------------------------ |----------|  : 2                 |
|   0        0        0        0        |   | 2        |                      |
|   0        0        0        0        |   \t  + t + 1/                      |
|   0        0        0        0        |                                     |
|   0        0        0        0        |                                     |
|c3 0        0        0        0        |                                     |
|   a3+b3+c3 0        0        0        |                                     |
|   0        a3+b3+c3 0        0        |                                     |
|   0        0        a3+b3+c3 0        |                                     |
|   0        0        0        a3+b3+c3 |                                     |
+-----------------------------------------------------------------------------+

As seen in the above, many constructions of factorizations with periods $>2$
require the user to adjoin or specify a primitive root of unity. For an
in-depth discussion on all the methods implemented for accomplishing this, see
adjoinRoot.

Finally, every factorization (assuming it is well-defined) has an associated
potential, which is the polynomial $f$ such that all $d$-fold
compositions of the differentials are equal to $f$ times the identity. This
potential can be accessed as follows:

+--------------------------+
|i10 : potential K         |
|                          |
|       2    2    2        |
|o10 = a  + b  + c         |
|                          |
|o10 : S                   |
+--------------------------+
|i11 : isdFactorization K  |
|                          |
|              2    2    2 |
|o11 = (true, a  + b  + c )|
|                          |
|o11 : Sequence            |
+--------------------------+
|i12 : potential K'        |
|                          |
|       3    3    3        |
|o12 = a  + b  + c         |
|                          |
|         S[t]             |
|o12 : ----------          |
|       2                  |
|      t  + t + 1          |
+--------------------------+
|i13 : isdFactorization K' |
|                          |
|              3    3    3 |
|o13 = (true, a  + b  + c )|
|                          |
|o13 : Sequence            |
+--------------------------+

Much of the syntax and functionality of the types ZZdFactorization and
ZZdFactorizationMap are based on current functionalities for the analogous
objects in the Complexes package, so there should be essentially no learning
curve for users already familiar with working with chain complexes.

See also
========

  * Making ZZdFactorizations -- Information
    about the basic constructors
  * Making maps between factorizations
    -- information about the basic constructors
  * Basic invariants and properties, --
    information about accessing basic features
  * differential of a ZZ/d-graded factorization
    -- get the maps between the terms in a
    ZZ/d-graded factorization
  * Preprogrammed examples and operations
    -- Information about the basic constructors

Authors
=======

  * David Favero (see  ) <favero@umn.edu>
  * Sasha Pevzner (see  ) <pevzn002@umn.edu>
  * Timothy Tribone (see  ) <tim.tribone@utah.edu>
  * Keller VandeBogert (see https://sites.google.com/view/kellervandebogert/
    home ) <kvandebo@nd.edu>

Version
=======

This documentation describes version 0.1 of MatrixFactorizations, released
August 13, 2025.

Citation
========

If you have used this package in your research, please cite it as follows:

+-----------------------------------------------------------------------------+
|@misc{MatrixFactorizationsSource,                                            |
|  title = {{MatrixFactorizations: computing with matrix factorizations of    |
|  author = {David Favero and Sasha Pevzner and Timothy Tribone and Keller    |
|  howpublished = {A \emph{Macaulay2} package available at                    |
|    \url{https://github.com/Macaulay2/M2/tree/stable/M2/Macaulay2/packages   |
|}                                                                            |
|-----------------------------------------------------------------------------|
|different lengths. Version~0.1}},                                            |
|VandeBogert},                                                                |
|                                                                             |
|}}                                                                           |
+-----------------------------------------------------------------------------+

Exports
=======

  * Types
      * ZZdFactorization -- the class of all
        ZZ/d-graded factorizations
      * ZZdFactorizationMap -- the class of all
        maps between ZZ/d-graded factorizations
  * Functions and commands
      * adjoinRoot -- Adjoin a root of unity to the
        underlying object input
      * adjointFactorization -- Constructs matrix
        factorization of a determinant of a matrix
      * branchedToMF -- Converts a maximal Cohen-Macaulay
        module over a d-fold branched cover into a d-fold factorization
      * collapseMF -- Converts a d-fold factorization into a
        (d-1)-fold factorization by composing the kth differential with the
        (k+1)th differential
      * eulerMF -- Construct a Koszul matrix factorization with
        respect to the Jacobian ideal
      * Fold -- Convert any complex or complex map into a
        ZZ/d-graded factorization (or map) for a fixed integer d
      * fullCollapse -- Converts a d-fold factorization
        into a 2-fold factorization
      * higherHomotopyFactorization, --
        Constructs the matrix factorization associated with a system of higher
        homotopies
      * injectiveCover -- Constructs the injective hull
        of a d-fold matrix factorization
      * isdFactorization -- Checks if the
        differentials of a factorization compose to a scalar multiple of the
        identity
      * "isFactorizationMorphism" -- see
        isFactorizationMorphism(ZZdFactorizationMap),
        -- whether a
        ZZdFactorizationMap is a morphism of factorizations
      * isZZdComplex -- Checks if the differentials of a
        factorization compose to 0
      * koszulMF -- Construct a Koszul matrix factorization
        from an ideal and a polynomial
      * linearMF -- Constructs a Koszul d-fold factorization
        of a homogeneous element of degree d
      * monomialMF -- Construct a trivial d-fold
        factorization of a monomial
      * mooreMF -- Constructs the matrix factorization of the
        Moore matrix and its adjoint
      * period -- the period of a ZZ/d-graded factorization or
        map
      * potential -- Outputs the polynomial $f$ such that the
        dth power of the differentials is equal to $ f \cdot \text{id}$
      * projectiveCover -- Constructs the projective
        cover of a d-fold matrix factorization
      * randomFactorizationMap -- a random map
        of ZZ/d-graded factorizations
      * randomLinearMF -- Generates a linear d-fold
        factorization of a random degree d polynomial
      * randomTailMF -- Construct a matrix factorization
        from a high syzygy of a random module over a hypersurface
      * rk1MCM2gen -- Construct every possible rank 1,
        2-generated maximal Cohen-Macaulay module over the cubic Fermat
        hypersurface in 4 variables
      * suspension -- Constructs the suspension of a d-fold
        factorization
      * tailMF -- Generate a ZZdFactorization from a module over
        a hypersurface ring
      * toBranchedCover -- Converts a d-fold matrix
        factorization into a maximal Cohen-Macaulay module over a d-fold
        branched cover of the potential
      * "zeroOutDegrees" -- see toBranchedCover, --
        Converts a d-fold matrix factorization into a maximal Cohen-Macaulay
        module over a d-fold branched cover of the potential
      * trivialMF -- Constructs the trivial matrix
        factorization of an element f
      * unfold -- Converts a factorization into a complex
      * ZZdfactorization -- make a ZZ/d-graded
        factorization
  * Methods
      * "adjoinRoot(ZZ,Ring,RingElement)" -- see adjoinRoot,
        -- Adjoin a root of unity to the underlying object input
      * "adjoinRoot(ZZ,Ring,Symbol)" -- see adjoinRoot, --
        Adjoin a root of unity to the underlying object input
      * "adjoinRoot(ZZdFactorization,RingElement)" -- see adjoinRoot,
        -- Adjoin a root of unity to the underlying object input
      * "adjoinRoot(ZZdFactorization,Symbol)" -- see adjoinRoot,
        -- Adjoin a root of unity to the underlying object input
      * "adjoinRoot(ZZdFactorizationMap,RingElement)" -- see adjoinRoot,
        -- Adjoin a root of unity to the underlying object input
      * "adjoinRoot(ZZdFactorizationMap,Symbol)" -- see adjoinRoot,
        -- Adjoin a root of unity to the underlying object input
      * "adjointFactorization(Matrix)" -- see adjointFactorization,
        -- Constructs matrix factorization of a
        determinant of a matrix
      * "- ZZdFactorizationMap" -- see arithmetic with ZZ/d-graded factorization maps,
        --
        perform arithmetic operations on ZZ/d-graded factorization maps
      * "Number * ZZdFactorizationMap" -- see arithmetic with ZZ/d-graded factorization maps,
        --
        perform arithmetic operations on ZZ/d-graded factorization maps
      * "Number + ZZdFactorizationMap" -- see arithmetic with ZZ/d-graded factorization maps,
        --
        perform arithmetic operations on ZZ/d-graded factorization maps
      * "Number - ZZdFactorizationMap" -- see arithmetic with ZZ/d-graded factorization maps,
        --
        perform arithmetic operations on ZZ/d-graded factorization maps
      * "RingElement * ZZdFactorizationMap" -- see arithmetic with ZZ/d-graded factorization maps,
        -- perform arithmetic operations on ZZ/d-graded
        factorization maps
      * "RingElement + ZZdFactorizationMap" -- see arithmetic with ZZ/d-graded factorization maps,
        -- perform arithmetic operations on ZZ/d-graded
        factorization maps
      * "RingElement - ZZdFactorizationMap" -- see arithmetic with ZZ/d-graded factorization maps,
        -- perform arithmetic operations on ZZ/d-graded
        factorization maps
      * "ZZdFactorizationMap * Number" -- see arithmetic with ZZ/d-graded factorization maps,
        --
        perform arithmetic operations on ZZ/d-graded factorization maps
      * "ZZdFactorizationMap * RingElement" -- see arithmetic with ZZ/d-graded factorization maps,
        -- perform arithmetic operations on ZZ/d-graded
        factorization maps
      * "ZZdFactorizationMap + Number" -- see arithmetic with ZZ/d-graded factorization maps,
        --
        perform arithmetic operations on ZZ/d-graded factorization maps
      * "ZZdFactorizationMap + RingElement" -- see arithmetic with ZZ/d-graded factorization maps,
        -- perform arithmetic operations on ZZ/d-graded
        factorization maps
      * "ZZdFactorizationMap + ZZdFactorizationMap" -- see arithmetic with ZZ/d-graded factorization maps,
        -- perform arithmetic operations on ZZ/d-graded
        factorization maps
      * "ZZdFactorizationMap - Number" -- see arithmetic with ZZ/d-graded factorization maps,
        --
        perform arithmetic operations on ZZ/d-graded factorization maps
      * "ZZdFactorizationMap - RingElement" -- see arithmetic with ZZ/d-graded factorization maps,
        -- perform arithmetic operations on ZZ/d-graded
        factorization maps
      * "ZZdFactorizationMap - ZZdFactorizationMap" -- see arithmetic with ZZ/d-graded factorization maps,
        -- perform arithmetic operations on ZZ/d-graded
        factorization maps
      * basis(List,ZZdFactorization) (missing documentation)
      * basis(ZZ,ZZdFactorization) (missing documentation)
      * "branchedToMF(Matrix)" -- see branchedToMF, --
        Converts a maximal Cohen-Macaulay module over a d-fold branched cover
        into a d-fold factorization
      * "branchedToMF(Matrix,Ring)" -- see branchedToMF, --
        Converts a maximal Cohen-Macaulay module over a d-fold branched cover
        into a d-fold factorization
      * "branchedToMF(Module)" -- see branchedToMF, --
        Converts a maximal Cohen-Macaulay module over a d-fold branched cover
        into a d-fold factorization
      * "branchedToMF(Module,Ring)" -- see branchedToMF, --
        Converts a maximal Cohen-Macaulay module over a d-fold branched cover
        into a d-fold factorization
      * coimage(ZZdFactorizationMap),
        -- make the coimage of a map of ZZ/d-graded factorizations
      * cokernel(ZZdFactorizationMap),
        -- make the cokernel of a map of ZZ/d-graded factorizations
      * "collapseMF(ZZdFactorization,ZZ)" -- see collapseMF,
        -- Converts a d-fold factorization into a (d-1)-fold factorization by
        composing the kth differential with the (k+1)th differential
      * "Complex ** ZZdFactorizationMap" -- see ComplexMap ** ZZdFactorizationMap,
        -- the map
        of ZZ/d-graded factorizations between tensor factorizations, obtained
        by first folding the relevant complex map
      * ComplexMap ** ZZdFactorizationMap
        -- the map of ZZ/d-graded factorizations between
        tensor factorizations, obtained by first folding the relevant complex
        map
      * "ZZdFactorizationMap ** Complex" -- see ComplexMap ** ZZdFactorizationMap,
        -- the map
        of ZZ/d-graded factorizations between tensor factorizations, obtained
        by first folding the relevant complex map
      * "ZZdFactorizationMap ** ComplexMap" -- see ComplexMap ** ZZdFactorizationMap,
        -- the map
        of ZZ/d-graded factorizations between tensor factorizations, obtained
        by first folding the relevant complex map
      * components(ZZdFactorization),
        -- list the components of a direct sum
      * components(ZZdFactorizationMap)
        -- list the components of a direct
        sum
      * cone(ZZdFactorizationMap) -- make
        the mapping cone of a morphism of ZZ/d-graded factorizations
      * degree(ZZdFactorizationMap), --
        get the degree of a map of ZZ/d-graded factorizations
      * "Symbol ^ ZZdFactorization" -- see differential of a ZZ/d-graded factorization,
        -- get the
        maps between the terms in a ZZ/d-graded factorization
      * directSum(ZZdFactorization), --
        direct sum of ZZ/d-graded factorizations
      * "ZZdFactorization ++ ZZdFactorization" -- see
        directSum(ZZdFactorization), -- direct
        sum of ZZ/d-graded factorizations
      * dual(ZZdFactorization) -- make the
        dual of a ZZ/d-graded factorization
      * "dual(ZZdFactorization,RingElement)" -- see
        dual(ZZdFactorization), -- make the dual of
        a ZZ/d-graded factorization
      * "dual(ZZdFactorization,Symbol)" -- see dual(ZZdFactorization),
        -- make the dual of a ZZ/d-graded
        factorization
      * dual(ZZdFactorizationMap) -- the
        dual of a map of ZZ/d-graded factorizations
      * dual(ZZdFactorizationMap,RingElement)
        -- the dual of a map of
        ZZ/d-graded factorizations
      * "dual(ZZdFactorizationMap,Symbol)" -- see
        dual(ZZdFactorizationMap,RingElement),
        -- the dual of a map of
        ZZ/d-graded factorizations
      * euler(ZZdFactorization), --
        Calculates the Euler characteristic of a ZZdFactorization
      * "eulerMF(RingElement)" -- see eulerMF, -- Construct a
        Koszul matrix factorization with respect to the Jacobian ideal
      * expression(ZZdFactorizationMap) (missing documentation)
      * extend(ZZdFactorization,ZZdFactorization,Matrix) (missing
        documentation)
      * extend(ZZdFactorization,ZZdFactorization,Matrix,Sequence) (missing
        documentation)
      * "Fold(Complex,ZZ)" -- see Fold, -- Convert any complex or
        complex map into a ZZ/d-graded factorization (or map) for a fixed
        integer d
      * "Fold(ComplexMap,ZZ)" -- see Fold, -- Convert any complex
        or complex map into a ZZ/d-graded factorization (or map) for a fixed
        integer d
      * "fullCollapse(ZZdFactorization,ZZ,ZZ)" -- see fullCollapse,
        -- Converts a d-fold factorization into a 2-fold
        factorization
      * gradedModule(ZZdFactorization)
        -- a new ZZ/d-graded factorization
        in which the differential is zero
      * HH ZZdFactorization -- homology of a
        ZZ/d-graded factorization
      * HH ZZdFactorizationMap -- induced map on
        homology or cohomology
      * "HH^ZZ ZZdFactorizationMap" -- see HH ZZdFactorizationMap,
        -- induced map on homology or cohomology
      * "HH_ZZ ZZdFactorizationMap" -- see HH ZZdFactorizationMap,
        -- induced map on homology or cohomology
      * HH_ZZ ZZdFactorization -- homology or
        cohomology module of a ZZ/d-graded factorization
      * "HH_ZZ(ZZ,ZZdFactorization)" -- see HH_ZZ ZZdFactorization,
        -- homology or cohomology module of a
        ZZ/d-graded factorization
      * "higherHomotopyFactorization(List,Complex)" -- see
        higherHomotopyFactorization, -- Constructs
        the matrix factorization associated with a system of higher homotopies
      * "higherHomotopyFactorization(RingElement,Complex)" -- see
        higherHomotopyFactorization, -- Constructs
        the matrix factorization associated with a system of higher homotopies
      * Hom(Complex,ZZdFactorization)
        -- the ZZ/d-graded homomorphism
        factorization formed by folding the complex, then taking the
        ZZ/d-graded Hom factorization
      * "Hom(Complex,ZZdFactorization,RingElement)" -- see
        Hom(Complex,ZZdFactorization), --
        the ZZ/d-graded homomorphism factorization formed by folding the
        complex, then taking the ZZ/d-graded Hom factorization
      * "Hom(Complex,ZZdFactorization,Symbol)" -- see
        Hom(Complex,ZZdFactorization), --
        the ZZ/d-graded homomorphism factorization formed by folding the
        complex, then taking the ZZ/d-graded Hom factorization
      * "Hom(ZZdFactorization,Complex)" -- see
        Hom(Complex,ZZdFactorization), --
        the ZZ/d-graded homomorphism factorization formed by folding the
        complex, then taking the ZZ/d-graded Hom factorization
      * "Hom(ZZdFactorization,Complex,RingElement)" -- see
        Hom(Complex,ZZdFactorization), --
        the ZZ/d-graded homomorphism factorization formed by folding the
        complex, then taking the ZZ/d-graded Hom factorization
      * "Hom(ZZdFactorization,Complex,Symbol)" -- see
        Hom(Complex,ZZdFactorization), --
        the ZZ/d-graded homomorphism factorization formed by folding the
        complex, then taking the ZZ/d-graded Hom factorization
      * Hom(ComplexMap,ZZdFactorizationMap)
        -- the map of factorizations
        between Hom factorizations formed by first folding the relevant complex
        map
      * "Hom(ComplexMap,ZZdFactorizationMap,RingElement)" -- see
        Hom(ComplexMap,ZZdFactorizationMap),
        -- the map of factorizations
        between Hom factorizations formed by first folding the relevant complex
        map
      * "Hom(ComplexMap,ZZdFactorizationMap,Symbol)" -- see
        Hom(ComplexMap,ZZdFactorizationMap),
        -- the map of factorizations
        between Hom factorizations formed by first folding the relevant complex
        map
      * "Hom(ZZdFactorizationMap,ComplexMap)" -- see
        Hom(ComplexMap,ZZdFactorizationMap),
        -- the map of factorizations
        between Hom factorizations formed by first folding the relevant complex
        map
      * "Hom(ZZdFactorizationMap,ComplexMap,RingElement)" -- see
        Hom(ComplexMap,ZZdFactorizationMap),
        -- the map of factorizations
        between Hom factorizations formed by first folding the relevant complex
        map
      * "Hom(ZZdFactorizationMap,ComplexMap,Symbol)" -- see
        Hom(ComplexMap,ZZdFactorizationMap),
        -- the map of factorizations
        between Hom factorizations formed by first folding the relevant complex
        map
      * "Hom(Module,ZZdFactorization)" -- see
        Hom(ZZdFactorization,ZZdFactorization),
        -- the ZZ/d-graded
        homomorphism factorization between two ZZ/d-graded factorizations
      * "Hom(Ring,ZZdFactorization)" -- see
        Hom(ZZdFactorization,ZZdFactorization),
        -- the ZZ/d-graded
        homomorphism factorization between two ZZ/d-graded factorizations
      * "Hom(ZZdFactorization,Module)" -- see
        Hom(ZZdFactorization,ZZdFactorization),
        -- the ZZ/d-graded
        homomorphism factorization between two ZZ/d-graded factorizations
      * "Hom(ZZdFactorization,Ring)" -- see
        Hom(ZZdFactorization,ZZdFactorization),
        -- the ZZ/d-graded
        homomorphism factorization between two ZZ/d-graded factorizations
      * Hom(ZZdFactorization,ZZdFactorization)
        -- the ZZ/d-graded
        homomorphism factorization between two ZZ/d-graded factorizations
      * "Hom(ZZdFactorization,Module,RingElement)" -- see
        Hom(ZZdFactorization,ZZdFactorization,Symbol),
        -- the
        ZZ/d-graded homomorphism factorization between two ZZ/d-graded
        factorizations
      * "Hom(ZZdFactorization,Module,Symbol)" -- see
        Hom(ZZdFactorization,ZZdFactorization,Symbol),
        -- the
        ZZ/d-graded homomorphism factorization between two ZZ/d-graded
        factorizations
      * "Hom(ZZdFactorization,ZZdFactorization,RingElement)" -- see
        Hom(ZZdFactorization,ZZdFactorization,Symbol),
        -- the
        ZZ/d-graded homomorphism factorization between two ZZ/d-graded
        factorizations
      * Hom(ZZdFactorization,ZZdFactorization,Symbol)
        -- the
        ZZ/d-graded homomorphism factorization between two ZZ/d-graded
        factorizations
      * "Hom(Matrix,ZZdFactorization)" -- see
        Hom(ZZdFactorizationMap,ZZdFactorizationMap),
        -- the map of
        factorizations between Hom complexes
      * "Hom(Matrix,ZZdFactorizationMap)" -- see
        Hom(ZZdFactorizationMap,ZZdFactorizationMap),
        -- the map of
        factorizations between Hom complexes
      * "Hom(Module,ZZdFactorizationMap)" -- see
        Hom(ZZdFactorizationMap,ZZdFactorizationMap),
        -- the map of
        factorizations between Hom complexes
      * "Hom(Ring,ZZdFactorizationMap)" -- see
        Hom(ZZdFactorizationMap,ZZdFactorizationMap),
        -- the map of
        factorizations between Hom complexes
      * "Hom(ZZdFactorization,Matrix)" -- see
        Hom(ZZdFactorizationMap,ZZdFactorizationMap),
        -- the map of
        factorizations between Hom complexes
      * "Hom(ZZdFactorization,ZZdFactorizationMap)" -- see
        Hom(ZZdFactorizationMap,ZZdFactorizationMap),
        -- the map of
        factorizations between Hom complexes
      * "Hom(ZZdFactorizationMap,Matrix)" -- see
        Hom(ZZdFactorizationMap,ZZdFactorizationMap),
        -- the map of
        factorizations between Hom complexes
      * "Hom(ZZdFactorizationMap,Module)" -- see
        Hom(ZZdFactorizationMap,ZZdFactorizationMap),
        -- the map of
        factorizations between Hom complexes
      * "Hom(ZZdFactorizationMap,Ring)" -- see
        Hom(ZZdFactorizationMap,ZZdFactorizationMap),
        -- the map of
        factorizations between Hom complexes
      * "Hom(ZZdFactorizationMap,ZZdFactorization)" -- see
        Hom(ZZdFactorizationMap,ZZdFactorizationMap),
        -- the map of
        factorizations between Hom complexes
      * Hom(ZZdFactorizationMap,ZZdFactorizationMap)
        -- the map of
        factorizations between Hom complexes
      * "Hom(ZZdFactorization,Matrix,RingElement)" -- see
        Hom(ZZdFactorizationMap,ZZdFactorizationMap,Symbol),
        -- the map
        of factorizations between Hom complexes
      * "Hom(ZZdFactorization,Matrix,Symbol)" -- see
        Hom(ZZdFactorizationMap,ZZdFactorizationMap,Symbol),
        -- the map
        of factorizations between Hom complexes
      * "Hom(ZZdFactorization,ZZdFactorizationMap,RingElement)" -- see
        Hom(ZZdFactorizationMap,ZZdFactorizationMap,Symbol),
        -- the map
        of factorizations between Hom complexes
      * "Hom(ZZdFactorization,ZZdFactorizationMap,Symbol)" -- see
        Hom(ZZdFactorizationMap,ZZdFactorizationMap,Symbol),
        -- the map
        of factorizations between Hom complexes
      * "Hom(ZZdFactorizationMap,Matrix,RingElement)" -- see
        Hom(ZZdFactorizationMap,ZZdFactorizationMap,Symbol),
        -- the map
        of factorizations between Hom complexes
      * "Hom(ZZdFactorizationMap,Matrix,Symbol)" -- see
        Hom(ZZdFactorizationMap,ZZdFactorizationMap,Symbol),
        -- the map
        of factorizations between Hom complexes
      * "Hom(ZZdFactorizationMap,Module,RingElement)" -- see
        Hom(ZZdFactorizationMap,ZZdFactorizationMap,Symbol),
        -- the map
        of factorizations between Hom complexes
      * "Hom(ZZdFactorizationMap,Module,Symbol)" -- see
        Hom(ZZdFactorizationMap,ZZdFactorizationMap,Symbol),
        -- the map
        of factorizations between Hom complexes
      * "Hom(ZZdFactorizationMap,Ring,RingElement)" -- see
        Hom(ZZdFactorizationMap,ZZdFactorizationMap,Symbol),
        -- the map
        of factorizations between Hom complexes
      * "Hom(ZZdFactorizationMap,Ring,Symbol)" -- see
        Hom(ZZdFactorizationMap,ZZdFactorizationMap,Symbol),
        -- the map
        of factorizations between Hom complexes
      * "Hom(ZZdFactorizationMap,ZZdFactorization,RingElement)" -- see
        Hom(ZZdFactorizationMap,ZZdFactorizationMap,Symbol),
        -- the map
        of factorizations between Hom complexes
      * "Hom(ZZdFactorizationMap,ZZdFactorization,Symbol)" -- see
        Hom(ZZdFactorizationMap,ZZdFactorizationMap,Symbol),
        -- the map
        of factorizations between Hom complexes
      * "Hom(ZZdFactorizationMap,ZZdFactorizationMap,RingElement)" -- see
        Hom(ZZdFactorizationMap,ZZdFactorizationMap,Symbol),
        -- the map
        of factorizations between Hom complexes
      * Hom(ZZdFactorizationMap,ZZdFactorizationMap,Symbol)
        -- the map
        of factorizations between Hom complexes
      * homomorphism'(ZZdFactorizationMap)
        -- get the element of Hom from
        a map of factorizations
      * homomorphism(ZZ,Matrix,ZZdFactorization)
        -- get the
        homomorphism from an element of Hom
      * homomorphism(ZZdFactorizationMap)
        -- get the homomorphism from an
        element of Hom
      * image(ZZdFactorizationMap), --
        make the image of a map of ZZ/d-graded factorizations
      * inducedMap(ZZdFactorization,ZZdFactorization)
        -- make the map of
        ZZ/d-graded factorizations induced at each term by the identity map
      * inducedMap(ZZdFactorization,ZZdFactorization,ZZdFactorizationMap)
        (missing documentation)
      * "injectiveCover(ZZdFactorization)" -- see injectiveCover,
        -- Constructs the injective hull of a d-fold matrix
        factorization
      * isCommutative(ZZdFactorizationMap)
        -- whether a ZZ/d-graded
        factorization map commutes with the differentials
      * "isdFactorization(ZZdFactorization)" -- see isdFactorization,
        -- Checks if the differentials of a factorization
        compose to a scalar multiple of the identity
      * isFactorizationMorphism(ZZdFactorizationMap)
        -- whether a
        ZZdFactorizationMap is a morphism of factorizations
      * isFree(ZZdFactorization), --
        whether a ZZ/d-graded factorization consists of free modules
      * isHomogeneous(ZZdFactorizationMap)
        -- whether a map of ZZ/d-graded
        factorizations is homogeneous
      * isNullHomotopic(ZZdFactorizationMap)
        -- whether a map of
        ZZ/d-graded factorizations is null-homotopic
      * isNullHomotopyOf(ZZdFactorizationMap,ZZdFactorizationMap),
        --
        whether the first map of ZZ/d-graded factorizations is a null homotopy
        for the second
      * isQuasiIsomorphism(ZZdFactorizationMap)
        -- whether a map of
        ZZ/d-graded factorizations is a quasi-isomorphism
      * isShortExactSequence(ZZdFactorizationMap,ZZdFactorizationMap),
        --
        whether a pair of ZZ/d-graded factorization maps forms a short exact
        sequence
      * isWellDefined(ZZdFactorization)
        -- whether a ZZ/d-graded
        factorization is well-defined
      * isWellDefined(ZZdFactorizationMap)
        -- whether a map of ZZ/d-graded
        factorizations is well-defined
      * "isZZdComplex(ZZdFactorization)" -- see isZZdComplex,
        -- Checks if the differentials of a factorization compose
        to 0
      * kernel(ZZdFactorizationMap), --
        make the kernel of a map of ZZ/d-graded factorizations
      * "koszulMF(Ideal,RingElement)" -- see koszulMF, --
        Construct a Koszul matrix factorization from an ideal and a polynomial
      * "koszulMF(List,RingElement)" -- see koszulMF, --
        Construct a Koszul matrix factorization from an ideal and a polynomial
      * "koszulMF(RingElement)" -- see koszulMF, -- Construct a
        Koszul matrix factorization from an ideal and a polynomial
      * "linearMF(RingElement)" -- see linearMF, -- Constructs
        a Koszul d-fold factorization of a homogeneous element of degree d
      * "linearMF(RingElement,RingElement)" -- see linearMF, --
        Constructs a Koszul d-fold factorization of a homogeneous element of
        degree d
      * "linearMF(RingElement,Symbol)" -- see linearMF, --
        Constructs a Koszul d-fold factorization of a homogeneous element of
        degree d
      * map(ZZdFactorization,ZZdFactorization,Function) (missing documentation)
      * map(ZZdFactorization,ZZdFactorization,HashTable)
        -- make a map
        of ZZ/d-graded factorizations
      * map(ZZdFactorization,ZZdFactorization,List) (missing documentation)
      * map(ZZdFactorization,ZZdFactorization,ZZ)
        -- make the zero map
        or identity between ZZ/d-graded factorizations
      * map(ZZdFactorization,ZZdFactorization,ZZdFactorizationMap),
        --
        make a new map of ZZ/d-graded factorizations from an existing one (for
        inducing maps)
      * minimalPresentation(ZZdFactorization)
        -- minimal presentation of
        all terms in a ZZ/d-graded factorization
      * "minimalPresentation(ZZdFactorizationMap)" -- see
        minimalPresentation(ZZdFactorization),
        -- minimal presentation of
        all terms in a ZZ/d-graded factorization
      * "prune(ZZdFactorization)" -- see
        minimalPresentation(ZZdFactorization),
        -- minimal presentation of
        all terms in a ZZ/d-graded factorization
      * "prune(ZZdFactorizationMap)" -- see
        minimalPresentation(ZZdFactorization),
        -- minimal presentation of
        all terms in a ZZ/d-graded factorization
      * "monomialMF(RingElement)" -- see monomialMF, --
        Construct a trivial d-fold factorization of a monomial
      * "mooreMF(ZZ)" -- see mooreMF, -- Constructs the matrix
        factorization of the Moore matrix and its adjoint
      * net(ZZdFactorization) (missing documentation)
      * net(ZZdFactorizationMap) (missing documentation)
      * nullHomotopy(ZZdFactorizationMap)
        -- a map which is a candidate
        for being a null homotopy
      * "period(ZZdFactorization)" -- see period, -- the period
        of a ZZ/d-graded factorization or map
      * "period(ZZdFactorizationMap)" -- see period, -- the
        period of a ZZ/d-graded factorization or map
      * "potential(ZZdFactorization)" -- see potential, --
        Outputs the polynomial $f$ such that the dth power of the differentials
        is equal to $ f \cdot \text{id}$
      * "projectiveCover(ZZdFactorization)" -- see projectiveCover,
        -- Constructs the projective cover of a d-fold matrix
        factorization
      * "randomFactorizationMap(ZZdFactorization,ZZdFactorization)" -- see
        randomFactorizationMap, -- a random map
        of ZZ/d-graded factorizations
      * "randomLinearMF(ZZ,Ring)" -- see randomLinearMF,
        -- Generates a linear d-fold factorization of a random degree d
        polynomial
      * "randomLinearMF(ZZ,Ring,RingElement)" -- see randomLinearMF,
        -- Generates a linear d-fold factorization of a random
        degree d polynomial
      * "randomLinearMF(ZZ,Ring,Symbol)" -- see randomLinearMF,
        -- Generates a linear d-fold factorization of a random
        degree d polynomial
      * "randomTailMF(RingElement)" -- see randomTailMF, --
        Construct a matrix factorization from a high syzygy of a random module
        over a hypersurface
      * "randomTailMF(RingElement,ZZ,ZZ)" -- see randomTailMF,
        -- Construct a matrix factorization from a high syzygy of
        a random module over a hypersurface
      * "randomTailMF(RingElement,ZZ,ZZ,ZZ)" -- see randomTailMF,
        -- Construct a matrix factorization from a high syzygy of
        a random module over a hypersurface
      * ring(ZZdFactorization) -- access the
        ring of a ZZ/d-graded factorization or a factorization map
      * "ring(ZZdFactorizationMap)" -- see ring(ZZdFactorization),
        -- access the ring of a ZZ/d-graded
        factorization or a factorization map
      * "Ring ** ZZdFactorization" -- see RingMap ** ZZdFactorization,
        -- tensor a ZZ/d-graded factorization
        along a ring map
      * RingMap ** ZZdFactorization, --
        tensor a ZZ/d-graded factorization along a ring map
      * "tensor(RingMap,ZZdFactorization)" -- see RingMap ** ZZdFactorization,
        -- tensor a
        ZZ/d-graded factorization along a ring map
      * "tensor(ZZdFactorization,RingMap)" -- see RingMap ** ZZdFactorization,
        -- tensor a
        ZZ/d-graded factorization along a ring map
      * "ZZdFactorization ** Ring" -- see RingMap ** ZZdFactorization,
        -- tensor a ZZ/d-graded factorization
        along a ring map
      * "ZZdFactorization ** RingMap" -- see RingMap ** ZZdFactorization,
        -- tensor a ZZ/d-graded factorization
        along a ring map
      * "Ring ** ZZdFactorizationMap" -- see RingMap ** ZZdFactorizationMap,
        -- tensor a
        map of ZZ/d-graded factorizations along a ring map
      * RingMap ** ZZdFactorizationMap
        -- tensor a map of ZZ/d-graded factorizations
        along a ring map
      * "tensor(RingMap,ZZdFactorizationMap)" -- see RingMap ** ZZdFactorizationMap,
        -- tensor a
        map of ZZ/d-graded factorizations along a ring map
      * "tensor(ZZdFactorizationMap,RingMap)" -- see RingMap ** ZZdFactorizationMap,
        -- tensor a
        map of ZZ/d-graded factorizations along a ring map
      * "ZZdFactorizationMap ** Ring" -- see RingMap ** ZZdFactorizationMap,
        -- tensor a
        map of ZZ/d-graded factorizations along a ring map
      * "ZZdFactorizationMap ** RingMap" -- see RingMap ** ZZdFactorizationMap,
        -- tensor a
        map of ZZ/d-graded factorizations along a ring map
      * RingMap ZZdFactorization -- apply a
        ring map
      * RingMap ZZdFactorizationMap, --
        apply a ring map to a map of ZZ/d-graded factorizations
      * "rk1MCM2gen(List)" -- see rk1MCM2gen, -- Construct
        every possible rank 1, 2-generated maximal Cohen-Macaulay module over
        the cubic Fermat hypersurface in 4 variables
      * "rk1MCM2gen(List,ZZ)" -- see rk1MCM2gen, -- Construct
        every possible rank 1, 2-generated maximal Cohen-Macaulay module over
        the cubic Fermat hypersurface in 4 variables
      * source(ZZdFactorizationMap), --
        get the source of a map of ZZ/d-graded factorizations
      * support(ZZdFactorization) (missing documentation)
      * "suspension(ZZ,ZZdFactorization)" -- see suspension,
        -- Constructs the suspension of a d-fold factorization
      * "suspension(ZZdFactorization)" -- see suspension, --
        Constructs the suspension of a d-fold factorization
      * "suspension(ZZdFactorizationMap)" -- see suspension,
        -- Constructs the suspension of a d-fold factorization
      * "tailMF(Ideal)" -- see tailMF, -- Generate a
        ZZdFactorization from a module over a hypersurface ring
      * "tailMF(Module)" -- see tailMF, -- Generate a
        ZZdFactorization from a module over a hypersurface ring
      * target(ZZdFactorizationMap), --
        get the target of a map of ZZ/d-graded factorizations
      * tensor(ZZdFactorization,ZZdFactorization,RingElement) (missing
        documentation)
      * tensor(ZZdFactorization,ZZdFactorization,Symbol) (missing
        documentation)
      * tensor(ZZdFactorizationMap,ZZdFactorizationMap,RingElement) (missing
        documentation)
      * tensor(ZZdFactorizationMap,ZZdFactorizationMap,Symbol) (missing
        documentation)
      * tensorAssociativity(ZZdFactorization,ZZdFactorization, ZZdFactorization)
        -- make the canonical
        isomorphism arising from associativity
      * tensorCommutativity(ZZdFactorization,ZZdFactorization)
        -- make
        the canonical isomorphism arising from commutativity of the tensor
        product operation
      * "toBranchedCover(ZZdFactorization,RingElement)" -- see
        toBranchedCover, -- Converts a d-fold matrix
        factorization into a maximal Cohen-Macaulay module over a d-fold
        branched cover of the potential
      * "toBranchedCover(ZZdFactorization,Symbol)" -- see
        toBranchedCover, -- Converts a d-fold matrix
        factorization into a maximal Cohen-Macaulay module over a d-fold
        branched cover of the potential
      * "zeroOutDegrees(Ring)" -- see toBranchedCover,
        -- Converts a d-fold matrix factorization into a maximal Cohen-Macaulay
        module over a d-fold branched cover of the potential
      * "zeroOutDegrees(ZZdFactorization)" -- see toBranchedCover,
        -- Converts a d-fold matrix factorization into a
        maximal Cohen-Macaulay module over a d-fold branched cover of the
        potential
      * "trivialMF(Module,RingElement)" -- see trivialMF, --
        Constructs the trivial matrix factorization of an element f
      * "trivialMF(ZZ,Module,RingElement)" -- see trivialMF,
        -- Constructs the trivial matrix factorization of an element f
      * "trivialMF(ZZ,ZZ,Module,RingElement)" -- see trivialMF,
        -- Constructs the trivial matrix factorization of an element
        f
      * "trivialMF(ZZ,ZZ,Module,ZZ)" -- see trivialMF, --
        Constructs the trivial matrix factorization of an element f
      * truncate(List,ZZdFactorization) (missing documentation)
      * truncate(ZZ,ZZdFactorization) (missing documentation)
      * "unfold(ZZdFactorization,List)" -- see unfold, --
        Converts a factorization into a complex
      * "unfold(ZZdFactorization,ZZ)" -- see unfold, -- Converts
        a factorization into a complex
      * "unfold(ZZdFactorizationMap,List)" -- see unfold, --
        Converts a factorization into a complex
      * "unfold(ZZdFactorizationMap,ZZ)" -- see unfold, --
        Converts a factorization into a complex
      * "ZZdfactorization(List)" -- see ZZdfactorization,
        -- make a ZZ/d-graded factorization
      * "Matrix ** ZZdFactorization" -- see ZZdFactorization ** Matrix,
        -- create the tensor product of a
        ZZ/d-graded factorization and a map of modules
      * ZZdFactorization ** Matrix, --
        create the tensor product of a ZZ/d-graded factorization and a map of
        modules
      * "Complex ** ZZdFactorization" -- see ZZdFactorization ** ZZdFactorization,
        -- tensor
        product of ZZ/d-graded factorizations
      * "Module ** ZZdFactorization" -- see ZZdFactorization ** ZZdFactorization,
        -- tensor
        product of ZZ/d-graded factorizations
      * "tensor(ZZdFactorization,ZZdFactorization)" -- see
        ZZdFactorization ** ZZdFactorization,
        -- tensor product of ZZ/d-graded factorizations
      * "ZZdFactorization ** Complex" -- see ZZdFactorization ** ZZdFactorization,
        -- tensor
        product of ZZ/d-graded factorizations
      * "ZZdFactorization ** Module" -- see ZZdFactorization ** ZZdFactorization,
        -- tensor
        product of ZZ/d-graded factorizations
      * ZZdFactorization ** ZZdFactorization
        -- tensor product of ZZ/d-graded factorizations
      * "ZZ == ZZdFactorization" -- see ZZdFactorization == ZZdFactorization,
        -- whether two
        ZZ/d-graded factorizations are equal
      * "ZZdFactorization == ZZ" -- see ZZdFactorization == ZZdFactorization,
        -- whether two
        ZZ/d-graded factorizations are equal
      * ZZdFactorization == ZZdFactorization
        -- whether two ZZ/d-graded factorizations are equal
      * "ZZdFactorization ^ Array" -- see ZZdFactorization _ Array,
        -- the canonical inclusion or projection
        map of a direct sum
      * ZZdFactorization _ Array -- the
        canonical inclusion or projection map of a direct sum
      * "ZZdFactorization ^ ZZ" -- see ZZdFactorization _ ZZ,
        -- access individual object in a ZZ/d-graded
        factorization
      * ZZdFactorization _ ZZ -- access
        individual object in a ZZ/d-graded factorization
      * ZZdFactorization Array -- shift a
        ZZ/d-graded factorization or map of ZZ/d-graded factorizations
      * "ZZdFactorizationMap Array" -- see ZZdFactorization Array,
        -- shift a ZZ/d-graded factorization or map of
        ZZ/d-graded factorizations
      * ZZdfactorization(HashTable), --
        make a ZZ/d-graded factorization
      * "ZZdfactorization(Ideal,ZZ)" -- see ZZdfactorization(Module,ZZ),
        -- convert a module/ring/ideal into
        a ZZ/d-graded factorization for specified period d
      * ZZdfactorization(Module,ZZ),
        -- convert a module/ring/ideal into a ZZ/d-graded factorization for
        specified period d
      * "ZZdfactorization(Ring,ZZ)" -- see ZZdfactorization(Module,ZZ),
        -- convert a module/ring/ideal into
        a ZZ/d-graded factorization for specified period d
      * ZZdfactorization(ZZdFactorization)
        -- make a ZZ/d-graded
        factorization with shifted base; used for permuting the modules without
        adding signs
      * ZZdFactorizationMap * ZZdFactorizationMap
        -- composition of homomorphisms of ZZ/d-graded
        factorizations
      * "Module ** ZZdFactorizationMap" -- see ZZdFactorizationMap ** ZZdFactorizationMap,
        --
        the map of ZZ/d-graded factorizations between tensor factorizations
      * "tensor(ZZdFactorizationMap,ZZdFactorizationMap)" -- see
        ZZdFactorizationMap ** ZZdFactorizationMap,
        -- the map of ZZ/d-graded factorizations between
        tensor factorizations
      * "ZZdFactorization ** ZZdFactorizationMap" -- see
        ZZdFactorizationMap ** ZZdFactorizationMap,
        -- the map of ZZ/d-graded factorizations between
        tensor factorizations
      * "ZZdFactorizationMap ** Module" -- see ZZdFactorizationMap ** ZZdFactorizationMap,
        --
        the map of ZZ/d-graded factorizations between tensor factorizations
      * "ZZdFactorizationMap ** ZZdFactorization" -- see
        ZZdFactorizationMap ** ZZdFactorizationMap,
        -- the map of ZZ/d-graded factorizations between
        tensor factorizations
      * ZZdFactorizationMap ** ZZdFactorizationMap
        -- the map of ZZ/d-graded factorizations
        between tensor factorizations
      * "directSum(ZZdFactorizationMap)" -- see ZZdFactorizationMap ++ ZZdFactorizationMap,
        --
        direct sum of ZZ/d-graded factorization maps
      * ZZdFactorizationMap ++ ZZdFactorizationMap
        -- direct sum of ZZ/d-graded factorization maps
      * "RingElement == ZZdFactorizationMap" -- see ZZdFactorizationMap == ZZdFactorizationMap,
        --
        whether two ZZ/d-graded factorization maps are equal
      * "ZZ == ZZdFactorizationMap" -- see ZZdFactorizationMap == ZZdFactorizationMap,
        --
        whether two ZZ/d-graded factorization maps are equal
      * "ZZdFactorizationMap == RingElement" -- see ZZdFactorizationMap == ZZdFactorizationMap,
        --
        whether two ZZ/d-graded factorization maps are equal
      * "ZZdFactorizationMap == ZZ" -- see ZZdFactorizationMap == ZZdFactorizationMap,
        --
        whether two ZZ/d-graded factorization maps are equal
      * ZZdFactorizationMap == ZZdFactorizationMap
        -- whether two ZZ/d-graded factorization maps
        are equal
      * ZZdFactorizationMap ^ Array -- the
        composition with the canonical inclusion or projection map
      * "ZZdFactorizationMap _ Array" -- see ZZdFactorizationMap ^ Array,
        -- the composition with the canonical
        inclusion or projection map
      * ZZdFactorizationMap ^ ZZ -- the n-fold
        composition
      * ZZdFactorizationMap _ ZZ -- access
        individual matrices in a ZZ/d-graded factorization map
      * ZZdFactorizationMap | ZZdFactorizationMap
        -- join or concatenate maps horizontally
      * ZZdFactorizationMap || ZZdFactorizationMap
        -- join or concatenate maps vertically
  * Symbols
      * "RootOfUnity" -- see adjoinRoot, -- Adjoin a root of
        unity to the underlying object input
      * "rootOfUnity" -- see adjoinRoot, -- Adjoin a root of
        unity to the underlying object input
      * WellDefined (missing documentation)

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

The object MatrixFactorizations, is a package (Macaulay2Doc),
defined in MatrixFactorizations.m2, with auxiliary
files in MatrixFactorizations/.

-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:57:0.

adjoinRoot -- Adjoin a root of unity to the underlying object input
*******************************************************************

  * Usage:
        adjoinRoot(ZZ, Ring, Symbol)
        adjoinRoot(ZZ, Ring, RingElement)
        adjoinRoot(ZZdFactorization, RingElement)
        adjoinRoot(ZZdFactorization, Symbol)
        adjoinRoot(ZZdFactorizationMap, RingElement)
        adjoinRoot(ZZdFactorizationMap, Symbol)
  * Inputs:
      * ZZ, an integer (Macaulay2Doc), An integer representing the
        order of the root of unity
      * Ring, a ring (Macaulay2Doc), The ring object
      * Symbol, a symbol (Macaulay2Doc), A symbol or RingElement
        representing the name assigned to the new indeterminate
  * Outputs:
      * a ring (Macaulay2Doc),

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

When working with ZZ/d-graded factorizations of period > 2, the operations are
often dependent on the existence of a distinguished primitive root of unity.
The adjoinRoot command allows the user to adjoin or specify a distinguished
root of unity to either a ring or a ZZdFactorization,
/see ZZdFactorizationMap.

We will illustrate all of the methods of adjoining a distinguished root of
unity, including the advantages/disadvantages of using certain methods.

+----------------------------------------------------------+
|i1 : Q = QQ[x_1..x_3];                                    |
+----------------------------------------------------------+
|i2 : d = 3;                                               |
+----------------------------------------------------------+
|i3 : Qt = adjoinRoot(d, Q, t)                             |
|                                                          |
|o3 = Qt                                                   |
|                                                          |
|o3 : QuotientRing                                         |
+----------------------------------------------------------+
|i4 : Qt.rootOfUnity --stores the root of unity in the ring|
|                                                          |
|o4 = t                                                    |
|                                                          |
|o4 : Qt                                                   |
+----------------------------------------------------------+
|i5 : {t, t^2, t^3}                                        |
|                                                          |
|o5 = {t, - t - 1, 1}                                      |
|                                                          |
|o5 : List                                                 |
+----------------------------------------------------------+

Any factorization of length > 2 constructed over the ring $Qt$ will
automatically cache the distinguished root of unity $t$.

+-------------------------------------------------------+
|i6 : Dt = ZZdfactorization {x_1*1_Qt,x_2*1_Qt,x_3*1_Qt}|
|                                                       |
|       1       1       1       1                       |
|o6 = Qt  <-- Qt  <-- Qt  <-- Qt                        |
|                                                       |
|     0       1       2       0                         |
|                                                       |
|o6 : ZZdFactorization                                  |
+-------------------------------------------------------+
|i7 : Dt.cache.rootOfUnity                              |
|                                                       |
|o7 = t                                                 |
|                                                       |
|o7 : Qt                                                |
+-------------------------------------------------------+

If the user forgets to adjoin a root of unity, then one can directly adjoin a
root to the factorization by either using adjoinRoot or tensoring with a ring
that contains a root of unity.

+-------------------------------------------------------------------------+
|i8 : S = QQ[x,y,z];                                                      |
+-------------------------------------------------------------------------+
|i9 : C = ZZdfactorization {x,y,z}                                        |
|                                                                         |
|      1      1      1      1                                             |
|o9 = S  <-- S  <-- S  <-- S                                              |
|                                                                         |
|     0      1      2      0                                              |
|                                                                         |
|o9 : ZZdFactorization                                                    |
+-------------------------------------------------------------------------+
|i10 : C.cache.?rootOfUnity                                               |
|                                                                         |
|o10 = false                                                              |
+-------------------------------------------------------------------------+
|i11 : Ct = adjoinRoot(C, t)                                              |
|                                                                         |
|      /   S[t]   \1     /   S[t]   \1     /   S[t]   \1     /   S[t]   \1|
|o11 = |----------|  <-- |----------|  <-- |----------|  <-- |----------| |
|      | 2        |      | 2        |      | 2        |      | 2        | |
|      \t  + t + 1/      \t  + t + 1/      \t  + t + 1/      \t  + t + 1/ |
|                                                                         |
|      0                 1                 2                 0            |
|                                                                         |
|o11 : ZZdFactorization                                                   |
+-------------------------------------------------------------------------+
|i12 : (Ct.cache.?rootOfUnity, Ct.cache.rootOfUnity)                      |
|                                                                         |
|o12 = (true, t)                                                          |
|                                                                         |
|o12 : Sequence                                                           |
+-------------------------------------------------------------------------+
|i13 : St = adjoinRoot(3, S, t);                                          |
+-------------------------------------------------------------------------+
|i14 : Ct' = C**St                                                        |
|                                                                         |
|        1       1       1       1                                        |
|o14 = St  <-- St  <-- St  <-- St                                         |
|                                                                         |
|      0       1       2       0                                          |
|                                                                         |
|o14 : ZZdFactorization                                                   |
+-------------------------------------------------------------------------+
|i15 : Ct'.cache.rootOfUnity                                              |
|                                                                         |
|o15 = t                                                                  |
|                                                                         |
|o15 : St                                                                 |
+-------------------------------------------------------------------------+

Sometimes a ring already has a distinguished root of unity without the need to
adjoin a new variable. The user can specify such a distinguished root of unity
in this case, and all constructions for factorizations of larger period will go
through using this distinguished root of unifty.

+-----------------------------------------------------------------------------+
|i16 : R = ZZ/3[x,y,z]                                                        |
|                                                                             |
|o16 = R                                                                      |
|                                                                             |
|o16 : PolynomialRing                                                         |
+-----------------------------------------------------------------------------+
|i17 : R.rootOfUnity = 1_R                                                    |
|                                                                             |
|o17 = 1                                                                      |
|                                                                             |
|o17 : R                                                                      |
+-----------------------------------------------------------------------------+
|i18 : Cx = ZZdfactorization {x,x,x}                                          |
|                                                                             |
|       1      1      1      1                                                |
|o18 = R  <-- R  <-- R  <-- R                                                 |
|                                                                             |
|      0      1      2      0                                                 |
|                                                                             |
|o18 : ZZdFactorization                                                       |
+-----------------------------------------------------------------------------+
|i19 : Cy = ZZdfactorization {y,y,y}                                          |
|                                                                             |
|       1      1      1      1                                                |
|o19 = R  <-- R  <-- R  <-- R                                                 |
|                                                                             |
|      0      1      2      0                                                 |
|                                                                             |
|o19 : ZZdFactorization                                                       |
+-----------------------------------------------------------------------------+
|i20 : Cz = ZZdfactorization {z,z,z}                                          |
|                                                                             |
|       1      1      1      1                                                |
|o20 = R  <-- R  <-- R  <-- R                                                 |
|                                                                             |
|      0      1      2      0                                                 |
|                                                                             |
|o20 : ZZdFactorization                                                       |
+-----------------------------------------------------------------------------+
|i21 : Cxyz = Cx**Cy**Cz                                                      |
|                                                                             |
|       9      9      9      9                                                |
|o21 = R  <-- R  <-- R  <-- R                                                 |
|                                                                             |
|      0      1      2      0                                                 |
|                                                                             |
|o21 : ZZdFactorization                                                       |
+-----------------------------------------------------------------------------+
|i22 : Cxyz.dd                                                                |
|                                                                             |
|           9                             9                                   |
|o22 = 2 : R  <------------------------- R  : 0                               |
|                | z 0 0 y x 0 0 0 0 |                                        |
|                | 0 z 0 0 y x 0 0 0 |                                        |
|                | 0 0 z x 0 y 0 0 0 |                                        |
|                | 0 0 0 z 0 0 y x 0 |                                        |
|                | 0 0 0 0 z 0 0 y x |                                        |
|                | 0 0 0 0 0 z x 0 y |                                        |
|                | y x 0 0 0 0 z 0 0 |                                        |
|                | 0 y x 0 0 0 0 z 0 |                                        |
|                | x 0 y 0 0 0 0 0 z |                                        |
|                                                                             |
|           9                             9                                   |
|      0 : R  <------------------------- R  : 1                               |
|                | z 0 0 y x 0 0 0 0 |                                        |
|                | 0 z 0 0 y x 0 0 0 |                                        |
|                | 0 0 z x 0 y 0 0 0 |                                        |
|                | 0 0 0 z 0 0 y x 0 |                                        |
|                | 0 0 0 0 z 0 0 y x |                                        |
|                | 0 0 0 0 0 z x 0 y |                                        |
|                | y x 0 0 0 0 z 0 0 |                                        |
|                | 0 y x 0 0 0 0 z 0 |                                        |
|                | x 0 y 0 0 0 0 0 z |                                        |
|                                                                             |
|           9                             9                                   |
|      1 : R  <------------------------- R  : 2                               |
|                | z 0 0 y x 0 0 0 0 |                                        |
|                | 0 z 0 0 y x 0 0 0 |                                        |
|                | 0 0 z x 0 y 0 0 0 |                                        |
|                | 0 0 0 z 0 0 y x 0 |                                        |
|                | 0 0 0 0 z 0 0 y x |                                        |
|                | 0 0 0 0 0 z x 0 y |                                        |
|                | y x 0 0 0 0 z 0 0 |                                        |
|                | 0 y x 0 0 0 0 z 0 |                                        |
|                | x 0 y 0 0 0 0 0 z |                                        |
|                                                                             |
|o22 : ZZdFactorizationMap                                                    |
+-----------------------------------------------------------------------------+
|i23 : Cxyz.dd^3                                                              |
|                                                                             |
|           9                                                                 |
|o23 = 0 : R  <---------------------------------------------------------------|
|                | x3+y3+z3 0        0        0        0        0        0    |
|                | 0        x3+y3+z3 0        0        0        0        0    |
|                | 0        0        x3+y3+z3 0        0        0        0    |
|                | 0        0        0        x3+y3+z3 0        0        0    |
|                | 0        0        0        0        x3+y3+z3 0        0    |
|                | 0        0        0        0        0        x3+y3+z3 0    |
|                | 0        0        0        0        0        0        x3+y3|
|                | 0        0        0        0        0        0        0    |
|                | 0        0        0        0        0        0        0    |
|                                                                             |
|           9                                                                 |
|      1 : R  <---------------------------------------------------------------|
|                | x3+y3+z3 0        0        0        0        0        0    |
|                | 0        x3+y3+z3 0        0        0        0        0    |
|                | 0        0        x3+y3+z3 0        0        0        0    |
|                | 0        0        0        x3+y3+z3 0        0        0    |
|                | 0        0        0        0        x3+y3+z3 0        0    |
|                | 0        0        0        0        0        x3+y3+z3 0    |
|                | 0        0        0        0        0        0        x3+y3|
|                | 0        0        0        0        0        0        0    |
|                | 0        0        0        0        0        0        0    |
|                                                                             |
|           9                                                                 |
|      2 : R  <---------------------------------------------------------------|
|                | x3+y3+z3 0        0        0        0        0        0    |
|                | 0        x3+y3+z3 0        0        0        0        0    |
|                | 0        0        x3+y3+z3 0        0        0        0    |
|                | 0        0        0        x3+y3+z3 0        0        0    |
|                | 0        0        0        0        x3+y3+z3 0        0    |
|                | 0        0        0        0        0        x3+y3+z3 0    |
|                | 0        0        0        0        0        0        x3+y3|
|                | 0        0        0        0        0        0        0    |
|                | 0        0        0        0        0        0        0    |
|                                                                             |
|o23 : ZZdFactorizationMap                                                    |
|-----------------------------------------------------------------------------|
|                           9                                                 |
|------------------------- R  : 0                                             |
|    0        0        |                                                      |
|    0        0        |                                                      |
|    0        0        |                                                      |
|    0        0        |                                                      |
|    0        0        |                                                      |
|    0        0        |                                                      |
|+z3 0        0        |                                                      |
|    x3+y3+z3 0        |                                                      |
|    0        x3+y3+z3 |                                                      |
|                                                                             |
|                           9                                                 |
|------------------------- R  : 1                                             |
|    0        0        |                                                      |
|    0        0        |                                                      |
|    0        0        |                                                      |
|    0        0        |                                                      |
|    0        0        |                                                      |
|    0        0        |                                                      |
|+z3 0        0        |                                                      |
|    x3+y3+z3 0        |                                                      |
|    0        x3+y3+z3 |                                                      |
|                                                                             |
|                           9                                                 |
|------------------------- R  : 2                                             |
|    0        0        |                                                      |
|    0        0        |                                                      |
|    0        0        |                                                      |
|    0        0        |                                                      |
|    0        0        |                                                      |
|    0        0        |                                                      |
|+z3 0        0        |                                                      |
|    x3+y3+z3 0        |                                                      |
|    0        x3+y3+z3 |                                                      |
+-----------------------------------------------------------------------------+

The user can also adjoin roots of unity directly to maps of factorizations, if
needed.

+---------------------------------------------------------------+
|i24 : use S;                                                   |
+---------------------------------------------------------------+
|i25 : C = ZZdfactorization {x,y,z}                             |
|                                                               |
|       1      1      1      1                                  |
|o25 = S  <-- S  <-- S  <-- S                                   |
|                                                               |
|      0      1      2      0                                   |
|                                                               |
|o25 : ZZdFactorization                                         |
+---------------------------------------------------------------+
|i26 : newId = adjoinRoot(id_C, t)                              |
|                                                               |
|          /   S[t]   \1            /   S[t]   \1               |
|o26 = 0 : |----------|  <--------- |----------|  : 0           |
|          | 2        |     | 1 |   | 2        |                |
|          \t  + t + 1/             \t  + t + 1/                |
|                                                               |
|          /   S[t]   \1            /   S[t]   \1               |
|      1 : |----------|  <--------- |----------|  : 1           |
|          | 2        |     | 1 |   | 2        |                |
|          \t  + t + 1/             \t  + t + 1/                |
|                                                               |
|          /   S[t]   \1            /   S[t]   \1               |
|      2 : |----------|  <--------- |----------|  : 2           |
|          | 2        |     | 1 |   | 2        |                |
|          \t  + t + 1/             \t  + t + 1/                |
|                                                               |
|o26 : ZZdFactorizationMap                                      |
+---------------------------------------------------------------+
|i27 : tnewId = newId**newId                                    |
|                                                               |
|          /   S[t]   \3                /   S[t]   \3           |
|o27 = 0 : |----------|  <------------- |----------|  : 0       |
|          | 2        |     | 1 0 0 |   | 2        |            |
|          \t  + t + 1/     | 0 1 0 |   \t  + t + 1/            |
|                           | 0 0 1 |                           |
|                                                               |
|          /   S[t]   \3                /   S[t]   \3           |
|      1 : |----------|  <------------- |----------|  : 1       |
|          | 2        |     | 1 0 0 |   | 2        |            |
|          \t  + t + 1/     | 0 1 0 |   \t  + t + 1/            |
|                           | 0 0 1 |                           |
|                                                               |
|          /   S[t]   \3                /   S[t]   \3           |
|      2 : |----------|  <------------- |----------|  : 2       |
|          | 2        |     | 1 0 0 |   | 2        |            |
|          \t  + t + 1/     | 0 1 0 |   \t  + t + 1/            |
|                           | 0 0 1 |                           |
|                                                               |
|o27 : ZZdFactorizationMap                                      |
+---------------------------------------------------------------+
|i28 : assert(source tnewId == (C**ring newId)**(C**ring newId))|
+---------------------------------------------------------------+

See also
========

  * Making ZZdFactorizations -- Information
    about the basic constructors

Ways to use adjoinRoot:
=======================

  * "adjoinRoot(ZZ,Ring,RingElement)"
  * "adjoinRoot(ZZ,Ring,Symbol)"
  * "adjoinRoot(ZZdFactorization,RingElement)"
  * "adjoinRoot(ZZdFactorization,Symbol)"
  * "adjoinRoot(ZZdFactorizationMap,RingElement)"
  * "adjoinRoot(ZZdFactorizationMap,Symbol)"

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

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

-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:5420:0.

adjointFactorization -- Constructs matrix factorization of a determinant of a matrix
************************************************************************************

  * Usage:
        adjointFactorization M
  * Inputs:
      * M, a matrix (Macaulay2Doc), A square matrix
  * Outputs:
      * a ZZ/d graded factorization, The matrix
        factorization of the determinant of M determined by the adjoint matrix

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

Given a matrix $M$, the adjoint matrix $M'$ is the matrix satisfying $M \cdot
M' = M' \cdot M = \det(M) id$. This means that any square matrix induces a
matrix factorization of its determinant, and this function implements this
induced matrix factorization.

+-----------------------------------------------------------------------------+
|i1 : Q = QQ[x_(1,1)..x_(3,3)]                                                |
|                                                                             |
|o1 = Q                                                                       |
|                                                                             |
|o1 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i2 : M = genericMatrix(Q,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 Q  <-- Q                                                         |
+-----------------------------------------------------------------------------+
|i3 : F = adjointFactorization M                                              |
|                                                                             |
|      3      3      3                                                        |
|o3 = Q  <-- Q  <-- Q                                                         |
|                                                                             |
|     0      1      0                                                         |
|                                                                             |
|o3 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i4 : F.dd                                                                    |
|                                                                             |
|          3                                                                  |
|o4 = 1 : Q  <----------------------------------------------------------------|
|               {1} | -x_(2,3)x_(3,2)+x_(2,2)x_(3,3) x_(2,3)x_(3,1)-x_(2,1)x_(|
|               {1} | x_(1,3)x_(3,2)-x_(1,2)x_(3,3)  -x_(1,3)x_(3,1)+x_(1,1)x_|
|               {1} | -x_(1,3)x_(2,2)+x_(1,2)x_(2,3) x_(1,3)x_(2,1)-x_(1,1)x_(|
|                                                                             |
|          3                                       3                          |
|     0 : Q  <----------------------------------- Q  : 1                      |
|               {2} | x_(1,1) x_(2,1) x_(3,1) |                               |
|               {2} | x_(1,2) x_(2,2) x_(3,2) |                               |
|               {2} | x_(1,3) x_(2,3) x_(3,3) |                               |
|                                                                             |
|o4 : ZZdFactorizationMap                                                     |
|-----------------------------------------------------------------------------|
|                                          3                                  |
|---------------------------------------- Q  : 0                              |
|3,3)  -x_(2,2)x_(3,1)+x_(2,1)x_(3,2) |                                       |
|(3,3) x_(1,2)x_(3,1)-x_(1,1)x_(3,2)  |                                       |
|2,3)  -x_(1,2)x_(2,1)+x_(1,1)x_(2,2) |                                       |
+-----------------------------------------------------------------------------+
|i5 : potential F == determinant M                                            |
|                                                                             |
|o5 = true                                                                    |
+-----------------------------------------------------------------------------+

See also
========

  * mooreMF -- Constructs the matrix factorization of the Moore
    matrix and its adjoint
  * rk1MCM2gen -- Construct every possible rank 1,
    2-generated maximal Cohen-Macaulay module over the cubic Fermat
    hypersurface in 4 variables
  * Preprogrammed examples and operations
    -- Information about the basic constructors

Ways to use adjointFactorization:
=================================

  * "adjointFactorization(Matrix)"

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

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

-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:6275:0.

arithmetic with ZZ/d-graded factorization maps -- perform arithmetic operations on ZZ/d-graded factorization maps
*****************************************************************************************************************

  * Usage:
        f + g
        a + f
        f + a
        -f
        f - g
        a - f
        f - a
        a * f
  * Inputs:
      * f, a map of ZZ/d-graded factorizations,
      * g, a map of ZZ/d-graded factorizations,
      * a, a ring element (Macaulay2Doc), that is, an
        element in the underlying ring or a number
  * Outputs:
      * a map of ZZ/d-graded factorizations,

The set of ZZ/d-graded factorizations maps forms a module over the underlying
ring. These methods implement the basic
operations of addition, subtraction, and scalar multiplication.

+-------------------------------------------------------------------------+
|i1 : S = ZZ/101[a,b];                                                    |
+-------------------------------------------------------------------------+
|i2 : R = S/(a^3+b^3);                                                    |
+-------------------------------------------------------------------------+
|i3 : m = ideal vars R                                                    |
|                                                                         |
|o3 = ideal (a, b)                                                        |
|                                                                         |
|o3 : Ideal of R                                                          |
+-------------------------------------------------------------------------+
|i4 : C = tailMF m                                                        |
|                                                                         |
|      2      2      2                                                    |
|o4 = S  <-- S  <-- S                                                     |
|                                                                         |
|     0      1      0                                                     |
|                                                                         |
|o4 : ZZdFactorization                                                    |
+-------------------------------------------------------------------------+
|i5 : D = tailMF (m^2)                                                    |
|                                                                         |
|      3      3      3                                                    |
|o5 = S  <-- S  <-- S                                                     |
|                                                                         |
|     0      1      0                                                     |
|                                                                         |
|o5 : ZZdFactorization                                                    |
+-------------------------------------------------------------------------+
|i6 : f = randomFactorizationMap(D, C, Cycle => true, InternalDegree => 1)|
|                                                                         |
|          3                           2                                  |
|o6 = 0 : S  <----------------------- S  : 0                              |
|               {3} | 36 24a-30b  |                                       |
|               {3} | 30 36a+24b  |                                       |
|               {3} | 24 -30a-36b |                                       |
|                                                                         |
|          3                       2                                      |
|     1 : S  <------------------- S  : 1                                  |
|               {5} | 36  24  |                                           |
|               {5} | -30 -36 |                                           |
|               {5} | 24  -30 |                                           |
|                                                                         |
|o6 : ZZdFactorizationMap                                                 |
+-------------------------------------------------------------------------+
|i7 : g = randomFactorizationMap(D, C, Boundary => true)                  |
|                                                                         |
|          3                                      2                       |
|o7 = 0 : S  <---------------------------------- S  : 0                   |
|               {3} | -29ab+10b2 -10a2b-29b3 |                            |
|               {3} | 19ab+29b2  -29a2b+19b3 |                            |
|               {3} | 19ab+8b2   -8a2b+19b3  |                            |
|                                                                         |
|          3                                    2                         |
|     1 : S  <-------------------------------- S  : 1                     |
|               {5} | -29ab-19b2 -10ab+8b2 |                              |
|               {5} | -19ab-29b2 29ab-10b2 |                              |
|               {5} | 19ab+19b2  -8ab-29b2 |                              |
|                                                                         |
|o7 : ZZdFactorizationMap                                                 |
+-------------------------------------------------------------------------+
+-----------------------------------------------------------------+
|i8 : use S;                                                      |
+-----------------------------------------------------------------+
|i9 : f+g                                                         |
|                                                                 |
|          3                                                 2    |
|o9 = 0 : S  <--------------------------------------------- S  : 0|
|               {3} | -29ab+10b2+36 -10a2b-29b3+24a-30b |         |
|               {3} | 19ab+29b2+30  -29a2b+19b3+36a+24b |         |
|               {3} | 19ab+8b2+24   -8a2b+19b3-30a-36b  |         |
|                                                                 |
|          3                                          2           |
|     1 : S  <-------------------------------------- S  : 1       |
|               {5} | -29ab-19b2+36 -10ab+8b2+24 |                |
|               {5} | -19ab-29b2-30 29ab-10b2-36 |                |
|               {5} | 19ab+19b2+24  -8ab-29b2-30 |                |
|                                                                 |
|o9 : ZZdFactorizationMap                                         |
+-----------------------------------------------------------------+
|i10 : f-g                                                        |
|                                                                 |
|           3                                                2    |
|o10 = 0 : S  <-------------------------------------------- S  : 0|
|                {3} | 29ab-10b2+36  10a2b+29b3+24a-30b |         |
|                {3} | -19ab-29b2+30 29a2b-19b3+36a+24b |         |
|                {3} | -19ab-8b2+24  8a2b-19b3-30a-36b  |         |
|                                                                 |
|           3                                           2         |
|      1 : S  <--------------------------------------- S  : 1     |
|                {5} | 29ab+19b2+36  10ab-8b2+24   |              |
|                {5} | 19ab+29b2-30  -29ab+10b2-36 |              |
|                {5} | -19ab-19b2+24 8ab+29b2-30   |              |
|                                                                 |
|o10 : ZZdFactorizationMap                                        |
+-----------------------------------------------------------------+
|i11 : -f                                                         |
|                                                                 |
|           3                            2                        |
|o11 = 0 : S  <------------------------ S  : 0                    |
|                {3} | -36 -24a+30b |                             |
|                {3} | -30 -36a-24b |                             |
|                {3} | -24 30a+36b  |                             |
|                                                                 |
|           3                       2                             |
|      1 : S  <------------------- S  : 1                         |
|                {5} | -36 -24 |                                  |
|                {5} | 30  36  |                                  |
|                {5} | -24 30  |                                  |
|                                                                 |
|o11 : ZZdFactorizationMap                                        |
+-----------------------------------------------------------------+
|i12 : 3*f                                                        |
|                                                                 |
|           3                            2                        |
|o12 = 0 : S  <------------------------ S  : 0                    |
|                {3} | 7   -29a+11b |                             |
|                {3} | -11 7a-29b   |                             |
|                {3} | -29 11a-7b   |                             |
|                                                                 |
|           3                       2                             |
|      1 : S  <------------------- S  : 1                         |
|                {5} | 7   -29 |                                  |
|                {5} | 11  -7  |                                  |
|                {5} | -29 11  |                                  |
|                                                                 |
|o12 : ZZdFactorizationMap                                        |
+-----------------------------------------------------------------+
|i13 : 0*f                                                        |
|                                                                 |
|o13 = 0                                                          |
|                                                                 |
|o13 : ZZdFactorizationMap                                        |
+-----------------------------------------------------------------+
|i14 : a*f                                                        |
|                                                                 |
|           3                              2                      |
|o14 = 0 : S  <-------------------------- S  : 0                  |
|                {3} | 36a 24a2-30ab  |                           |
|                {3} | 30a 36a2+24ab  |                           |
|                {3} | 24a -30a2-36ab |                           |
|                                                                 |
|           3                         2                           |
|      1 : S  <--------------------- S  : 1                       |
|                {5} | 36a  24a  |                                |
|                {5} | -30a -36a |                                |
|                {5} | 24a  -30a |                                |
|                                                                 |
|o14 : ZZdFactorizationMap                                        |
+-----------------------------------------------------------------+
|i15 : assert(0*f == 0)                                           |
+-----------------------------------------------------------------+
|i16 : assert(1*f == f)                                           |
+-----------------------------------------------------------------+
|i17 : assert((-1)*f == -f)                                       |
+-----------------------------------------------------------------+
|i18 : assert(-(f-g) == g-f)                                      |
+-----------------------------------------------------------------+
|i19 : assert((a+b)*f == a*f + b*f)                               |
+-----------------------------------------------------------------+
|i20 : assert(a*(f+g) == a*f + a*g)                               |
+-----------------------------------------------------------------+

Adding or subtracting a scalar is the same as adding or subtracting the scalar
multiple of the identity.  In particular, the source and target must be equal.

See also
========

  * Making maps between factorizations
    -- information about the basic constructors
  * randomFactorizationMap -- a random map of
    ZZ/d-graded factorizations
  * map(ZZdFactorization,ZZdFactorization,ZZdFactorizationMap)
    -- make
    a new map of ZZ/d-graded factorizations from an existing one (for inducing
    maps)
-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:4115:0.

Basic invariants and properties -- information about accessing basic features
*****************************************************************************

Predicates for factorizations and factorization maps
====================================================

  * isWellDefined(ZZdFactorization),
    -- whether a ZZ/d-graded factorization is well-defined
  * isFree(ZZdFactorization) -- whether a
    ZZ/d-graded factorization consists of free modules
  * isWellDefined(ZZdFactorizationMap)
    -- whether a map of ZZ/d-graded
    factorizations is well-defined
  * isCommutative(ZZdFactorizationMap)
    -- whether a ZZ/d-graded
    factorization map commutes with the differentials
  * isQuasiIsomorphism(ZZdFactorizationMap)
    -- whether a map of
    ZZ/d-graded factorizations is a quasi-isomorphism
  * isShortExactSequence(ZZdFactorizationMap,ZZdFactorizationMap),
    --
    whether a pair of ZZ/d-graded factorization maps forms a short exact
    sequence

Other invariants for ZZdFactorizations
======================================

  * ring(ZZdFactorization) -- access the
    ring of a ZZ/d-graded factorization or a factorization map
  * period(ZZdFactorization) -- the period of a ZZ/d-graded
    factorization or map
  * components(ZZdFactorization), --
    list the components of a direct sum

Other invariants for factorization maps
=======================================

  * source(ZZdFactorizationMap) -- get
    the source of a map of ZZ/d-graded factorizations
  * target(ZZdFactorizationMap) -- get
    the target of a map of ZZ/d-graded factorizations
  * degree(ZZdFactorizationMap) -- get
    the degree of a map of ZZ/d-graded factorizations
  * ring(ZZdFactorizationMap) -- access the
    ring of a ZZ/d-graded factorization or a factorization map
  * components(ZZdFactorizationMap),
    -- list the components of a direct sum

See also
========

  * Making ZZdFactorizations -- Information
    about the basic constructors
  * Making maps between factorizations
    -- information about the basic constructors
  * Preprogrammed examples and operations
    -- Information about the basic constructors
-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:219:0.

branchedToMF -- Converts a maximal Cohen-Macaulay module over a d-fold branched cover into a d-fold factorization
*****************************************************************************************************************

  * Usage:
        branchedToMF(M)
        branchedToMF(M, R)
  * Inputs:
      * M, a module (Macaulay2Doc), The input module, a MCM over
        the branched cover $S[z]/(z^d + f)$
  * Outputs:
      * a ZZ/d graded factorization, A ZZ/d-graded
        factorization with potential $-f$.

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

This method converts a maximal Cohen-Macaulay module over a d-fold branched
cover into a ZZ/d-graded factorization. This method is designed to try to order
the rows and columns of the matrices in such a way that one can deduce the
decomposable block structure, should one exist. We first illustrate how to
obtain a factorization from a high syzygy of a module over a branched cover. In
the following, the zeroOutDegrees function is used to ensure that modules over
the resulting branched cover are well-behaved with respect to the pushforward
along the natural map $S \to S[z]/(z^d + f)$.

+-------------------------------------------------------------+
|i1 : S = zeroOutDegrees (ZZ/101[a..c])                       |
|                                                             |
|o1 = S                                                       |
|                                                             |
|o1 : PolynomialRing                                          |
+-------------------------------------------------------------+
|i2 : f = a^3 + b^3 + c^3;                                    |
+-------------------------------------------------------------+
|i3 : bS = S[z]/(z^2 + f)                                     |
|                                                             |
|o3 = bS                                                      |
|                                                             |
|o3 : QuotientRing                                            |
+-------------------------------------------------------------+
|i4 : F = freeResolution(ideal(a,b,c,z), LengthLimit => 4)    |
|                                                             |
|       1       4       7       9       9                     |
|o4 = bS  <-- bS  <-- bS  <-- bS  <-- bS                      |
|                                                             |
|     0       1       2       3       4                       |
|                                                             |
|o4 : Complex                                                 |
+-------------------------------------------------------------+
|i5 : C = branchedToMF F.dd_4                                 |
|                                                             |
|      8      8      8                                        |
|o5 = S  <-- S  <-- S                                         |
|                                                             |
|     0      1      0                                         |
|                                                             |
|o5 : ZZdFactorization                                        |
+-------------------------------------------------------------+
|i6 : isdFactorization C                                      |
|                                                             |
|               3    3    3                                   |
|o6 = (true, - a  - b  - c )                                  |
|                                                             |
|o6 : Sequence                                                |
+-------------------------------------------------------------+
|i7 : C.dd                                                    |
|                                                             |
|          8                                        8         |
|o7 = 1 : S  <------------------------------------ S  : 0     |
|               | 0   0  0   0   a  -b2 c2  0  |              |
|               | 0   0  0   0   -b -a2 0   c2 |              |
|               | 0   0  0   0   c  0   -a2 b2 |              |
|               | 0   0  0   0   0  c   b   a  |              |
|               | -a2 b2 -c2 0   0  0   0   0  |              |
|               | b   a  0   -c2 0  0   0   0  |              |
|               | -c  0  a   -b2 0  0   0   0  |              |
|               | 0   -c -b  -a2 0  0   0   0  |              |
|                                                             |
|          8                                        8         |
|     0 : S  <------------------------------------ S  : 1     |
|               | 0   0  0   0   a  -b2 c2  0  |              |
|               | 0   0  0   0   -b -a2 0   c2 |              |
|               | 0   0  0   0   c  0   -a2 b2 |              |
|               | 0   0  0   0   0  c   b   a  |              |
|               | -a2 b2 -c2 0   0  0   0   0  |              |
|               | b   a  0   -c2 0  0   0   0  |              |
|               | -c  0  a   -b2 0  0   0   0  |              |
|               | 0   -c -b  -a2 0  0   0   0  |              |
|                                                             |
|o7 : ZZdFactorizationMap                                     |
+-------------------------------------------------------------+
|i8 : K = higherHomotopyFactorization(f, koszulComplex vars S)|
|                                                             |
|      4      4      4                                        |
|o8 = S  <-- S  <-- S                                         |
|                                                             |
|     0      1      0                                         |
|                                                             |
|o8 : ZZdFactorization                                        |
+-------------------------------------------------------------+
|i9 : K.dd                                                    |
|                                                             |
|          4                        4                         |
|o9 = 1 : S  <-------------------- S  : 0                     |
|               | a2 -b -c  0  |                              |
|               | b2 a  0   -c |                              |
|               | c2 0  a   b  |                              |
|               | 0  c2 -b2 a2 |                              |
|                                                             |
|          4                         4                        |
|     0 : S  <--------------------- S  : 1                    |
|               | a   b   c  0  |                             |
|               | -b2 a2  0  c  |                             |
|               | -c2 0   a2 -b |                             |
|               | 0   -c2 b2 a  |                             |
|                                                             |
|o9 : ZZdFactorizationMap                                     |
+-------------------------------------------------------------+

In the above example, we see that the factorization obtained by taking a high
syzygy of the residue field over the branched cover is remarkably similar to a
fold of the factorization obtained by taking a high syzygy of the residue field
over the original ring. We can obtain other examples of factorizations by
taking other modules:

+-----------------------------------------------------------------------------+
|i10 : F2 = freeResolution(trim (ideal(a,b,c,z))^2, LengthLimit => 4)         |
|                                                                             |
|        1       9       20       24       24                                 |
|o10 = bS  <-- bS  <-- bS   <-- bS   <-- bS                                   |
|                                                                             |
|      0       1       2        3        4                                    |
|                                                                             |
|o10 : Complex                                                                |
+-----------------------------------------------------------------------------+
|i11 : C2 = branchedToMF F2.dd_4                                              |
|                                                                             |
|       24      24      24                                                    |
|o11 = S   <-- S   <-- S                                                      |
|                                                                             |
|      0       1       0                                                      |
|                                                                             |
|o11 : ZZdFactorization                                                       |
+-----------------------------------------------------------------------------+
|i12 : C2.dd                                                                  |
|                                                                             |
|           24                                                                |
|o12 = 1 : S   <--------------------------------------------------------------|
|                 | 0   0  0   0   0   0  0   0   0   0  0   0    a  0  0  -b2|
|                 | 0   0  0   0   0   0  0   0   0   0  0   0    -b 0  0  -a2|
|                 | 0   0  0   0   0   0  0   0   0   0  0   0    c  0  0  0  |
|                 | 0   0  0   0   0   0  0   0   0   0  0   0    0  0  0  c  |
|                 | 0   0  0   0   0   0  0   0   0   0  0   0    0  a  0  0  |
|                 | 0   0  0   0   0   0  0   0   0   0  0   0    0  -b 0  0  |
|                 | 0   0  0   0   0   0  0   0   0   0  0   0    0  c  0  0  |
|                 | 0   0  0   0   0   0  0   0   0   0  0   0    0  0  0  0  |
|                 | 0   0  0   0   0   0  0   0   0   0  0   0    0  0  a  0  |
|                 | 0   0  0   0   0   0  0   0   0   0  0   0    0  0  -b 0  |
|                 | 0   0  0   0   0   0  0   0   0   0  0   0    0  0  c  0  |
|                 | 0   0  0   0   0   0  0   0   0   0  0   0    0  0  0  0  |
|                 | -a2 b2 -c2 0   0   0  0   0   c2  0  -ac b2c  0  0  0  0  |
|                 | 0   0  0   0   -a2 b2 -c2 0   b2  ab 0   -bc2 0  0  0  0  |
|                 | 0   0  0   0   0   0  0   0   -a2 b2 -c2 0    0  0  0  0  |
|                 | b   a  0   -c2 0   0  0   0   0   0  0   0    0  0  0  0  |
|                 | -c  0  a   -b2 0   0  0   0   0   0  0   0    0  0  0  0  |
|                 | 0   -c -b  -a2 0   0  0   0   0   0  0   0    0  0  0  0  |
|                 | 0   0  0   0   b   a  0   -c2 0   0  0   0    0  0  0  0  |
|                 | 0   0  0   0   -c  0  a   -b2 0   0  0   0    0  0  0  0  |
|                 | 0   0  0   0   0   -c -b  -a2 0   0  0   0    0  0  0  0  |
|                 | 0   0  0   0   0   0  0   0   b   a  0   -c2  0  0  0  0  |
|                 | 0   0  0   0   0   0  0   0   -c  0  a   -b2  0  0  0  0  |
|                 | 0   0  0   0   0   0  0   0   0   -c -b  -a2  0  0  0  0  |
|                                                                             |
|           24                                                                |
|      0 : S   <--------------------------------------------------------------|
|                 | 0   0  0   0   0   0  0   0   0   0  0   0    a  0  0  -b2|
|                 | 0   0  0   0   0   0  0   0   0   0  0   0    -b 0  0  -a2|
|                 | 0   0  0   0   0   0  0   0   0   0  0   0    c  0  0  0  |
|                 | 0   0  0   0   0   0  0   0   0   0  0   0    0  0  0  c  |
|                 | 0   0  0   0   0   0  0   0   0   0  0   0    0  a  0  0  |
|                 | 0   0  0   0   0   0  0   0   0   0  0   0    0  -b 0  0  |
|                 | 0   0  0   0   0   0  0   0   0   0  0   0    0  c  0  0  |
|                 | 0   0  0   0   0   0  0   0   0   0  0   0    0  0  0  0  |
|                 | 0   0  0   0   0   0  0   0   0   0  0   0    0  0  a  0  |
|                 | 0   0  0   0   0   0  0   0   0   0  0   0    0  0  -b 0  |
|                 | 0   0  0   0   0   0  0   0   0   0  0   0    0  0  c  0  |
|                 | 0   0  0   0   0   0  0   0   0   0  0   0    0  0  0  0  |
|                 | -a2 b2 -c2 0   0   0  0   0   c2  0  -ac b2c  0  0  0  0  |
|                 | 0   0  0   0   -a2 b2 -c2 0   b2  ab 0   -bc2 0  0  0  0  |
|                 | 0   0  0   0   0   0  0   0   -a2 b2 -c2 0    0  0  0  0  |
|                 | b   a  0   -c2 0   0  0   0   0   0  0   0    0  0  0  0  |
|                 | -c  0  a   -b2 0   0  0   0   0   0  0   0    0  0  0  0  |
|                 | 0   -c -b  -a2 0   0  0   0   0   0  0   0    0  0  0  0  |
|                 | 0   0  0   0   b   a  0   -c2 0   0  0   0    0  0  0  0  |
|                 | 0   0  0   0   -c  0  a   -b2 0   0  0   0    0  0  0  0  |
|                 | 0   0  0   0   0   -c -b  -a2 0   0  0   0    0  0  0  0  |
|                 | 0   0  0   0   0   0  0   0   b   a  0   -c2  0  0  0  0  |
|                 | 0   0  0   0   0   0  0   0   -c  0  a   -b2  0  0  0  0  |
|                 | 0   0  0   0   0   0  0   0   0   -c -b  -a2  0  0  0  0  |
|                                                                             |
|o12 : ZZdFactorizationMap                                                    |
|-----------------------------------------------------------------------------|
|                                   24                                        |
|--------------------------------- S   : 0                                    |
| c2  0  0   0   0  0   ac  0  |                                              |
| 0   c2 0   0   0  0   -bc 0  |                                              |
| -a2 b2 0   0   0  0   c2  0  |                                              |
| b   a  0   0   0  0   0   0  |                                              |
| 0   0  -b2 c2  0  -ab 0   0  |                                              |
| 0   0  -a2 0   c2 b2  0   0  |                                              |
| 0   0  0   -a2 b2 -bc 0   0  |                                              |
| 0   0  c   b   a  0   0   0  |                                              |
| 0   0  0   0   0  -b2 c2  0  |                                              |
| 0   0  0   0   0  -a2 0   c2 |                                              |
| 0   0  0   0   0  0   -a2 b2 |                                              |
| 0   0  0   0   0  c   b   a  |                                              |
| 0   0  0   0   0  0   0   0  |                                              |
| 0   0  0   0   0  0   0   0  |                                              |
| 0   0  0   0   0  0   0   0  |                                              |
| 0   0  0   0   0  0   0   0  |                                              |
| 0   0  0   0   0  0   0   0  |                                              |
| 0   0  0   0   0  0   0   0  |                                              |
| 0   0  0   0   0  0   0   0  |                                              |
| 0   0  0   0   0  0   0   0  |                                              |
| 0   0  0   0   0  0   0   0  |                                              |
| 0   0  0   0   0  0   0   0  |                                              |
| 0   0  0   0   0  0   0   0  |                                              |
| 0   0  0   0   0  0   0   0  |                                              |
|                                                                             |
|                                   24                                        |
|--------------------------------- S   : 1                                    |
| c2  0  0   0   0  0   ac  0  |                                              |
| 0   c2 0   0   0  0   -bc 0  |                                              |
| -a2 b2 0   0   0  0   c2  0  |                                              |
| b   a  0   0   0  0   0   0  |                                              |
| 0   0  -b2 c2  0  -ab 0   0  |                                              |
| 0   0  -a2 0   c2 b2  0   0  |                                              |
| 0   0  0   -a2 b2 -bc 0   0  |                                              |
| 0   0  c   b   a  0   0   0  |                                              |
| 0   0  0   0   0  -b2 c2  0  |                                              |
| 0   0  0   0   0  -a2 0   c2 |                                              |
| 0   0  0   0   0  0   -a2 b2 |                                              |
| 0   0  0   0   0  c   b   a  |                                              |
| 0   0  0   0   0  0   0   0  |                                              |
| 0   0  0   0   0  0   0   0  |                                              |
| 0   0  0   0   0  0   0   0  |                                              |
| 0   0  0   0   0  0   0   0  |                                              |
| 0   0  0   0   0  0   0   0  |                                              |
| 0   0  0   0   0  0   0   0  |                                              |
| 0   0  0   0   0  0   0   0  |                                              |
| 0   0  0   0   0  0   0   0  |                                              |
| 0   0  0   0   0  0   0   0  |                                              |
| 0   0  0   0   0  0   0   0  |                                              |
| 0   0  0   0   0  0   0   0  |                                              |
| 0   0  0   0   0  0   0   0  |                                              |
+-----------------------------------------------------------------------------+
|i13 : M = toBranchedCover(C,z)                                               |
|                                                                             |
|o13 = | z   0  0   0   0  0   0   0  0   0  0   0   a  -b2 c2  0  |          |
|      | 0   z  0   0   0  0   0   0  0   0  0   0   -b -a2 0   c2 |          |
|      | 0   0  z   0   0  0   0   0  0   0  0   0   c  0   -a2 b2 |          |
|      | 0   0  0   z   0  0   0   0  0   0  0   0   0  c   b   a  |          |
|      | 0   0  0   0   z  0   0   0  -a2 b2 -c2 0   0  0   0   0  |          |
|      | 0   0  0   0   0  z   0   0  b   a  0   -c2 0  0   0   0  |          |
|      | 0   0  0   0   0  0   z   0  -c  0  a   -b2 0  0   0   0  |          |
|      | 0   0  0   0   0  0   0   z  0   -c -b  -a2 0  0   0   0  |          |
|      | 0   0  0   0   a  -b2 c2  0  -z  0  0   0   0  0   0   0  |          |
|      | 0   0  0   0   -b -a2 0   c2 0   -z 0   0   0  0   0   0  |          |
|      | 0   0  0   0   c  0   -a2 b2 0   0  -z  0   0  0   0   0  |          |
|      | 0   0  0   0   0  c   b   a  0   0  0   -z  0  0   0   0  |          |
|      | -a2 b2 -c2 0   0  0   0   0  0   0  0   0   -z 0   0   0  |          |
|      | b   a  0   -c2 0  0   0   0  0   0  0   0   0  -z  0   0  |          |
|      | -c  0  a   -b2 0  0   0   0  0   0  0   0   0  0   -z  0  |          |
|      | 0   -c -b  -a2 0  0   0   0  0   0  0   0   0  0   0   -z |          |
|                                                                             |
|             /       S[z]      \16     /       S[z]      \16                 |
|o13 : Matrix |-----------------|   <-- |-----------------|                   |
|             | 2    3    3    3|       | 2    3    3    3|                   |
|             \z  - a  - b  - c /       \z  - a  - b  - c /                   |
+-----------------------------------------------------------------------------+
|i14 : liftM = sub(M, ambient ring M)                                         |
|                                                                             |
|o14 = | z   0  0   0   0  0   0   0  0   0  0   0   a  -b2 c2  0  |          |
|      | 0   z  0   0   0  0   0   0  0   0  0   0   -b -a2 0   c2 |          |
|      | 0   0  z   0   0  0   0   0  0   0  0   0   c  0   -a2 b2 |          |
|      | 0   0  0   z   0  0   0   0  0   0  0   0   0  c   b   a  |          |
|      | 0   0  0   0   z  0   0   0  -a2 b2 -c2 0   0  0   0   0  |          |
|      | 0   0  0   0   0  z   0   0  b   a  0   -c2 0  0   0   0  |          |
|      | 0   0  0   0   0  0   z   0  -c  0  a   -b2 0  0   0   0  |          |
|      | 0   0  0   0   0  0   0   z  0   -c -b  -a2 0  0   0   0  |          |
|      | 0   0  0   0   a  -b2 c2  0  -z  0  0   0   0  0   0   0  |          |
|      | 0   0  0   0   -b -a2 0   c2 0   -z 0   0   0  0   0   0  |          |
|      | 0   0  0   0   c  0   -a2 b2 0   0  -z  0   0  0   0   0  |          |
|      | 0   0  0   0   0  c   b   a  0   0  0   -z  0  0   0   0  |          |
|      | -a2 b2 -c2 0   0  0   0   0  0   0  0   0   -z 0   0   0  |          |
|      | b   a  0   -c2 0  0   0   0  0   0  0   0   0  -z  0   0  |          |
|      | -c  0  a   -b2 0  0   0   0  0   0  0   0   0  0   -z  0  |          |
|      | 0   -c -b  -a2 0  0   0   0  0   0  0   0   0  0   0   -z |          |
|                                                                             |
|                   16           16                                           |
|o14 : Matrix (S[z])   <-- (S[z])                                             |
+-----------------------------------------------------------------------------+
|i15 : prune ker liftM == 0 --this implies that the cokernel is MCM over the  |
|                                                                             |
|o15 = true                                                                   |
|-----------------------------------------------------------------------------|
|hypersurface                                                                 |
+-----------------------------------------------------------------------------+

This method works for d-fold factorizations with d > 2 in the same way:

+---------------------------------------------------------+
|i16 : Q = adjoinRoot(4, zeroOutDegrees (ZZ/101[a..b]), t)|
|                                                         |
|o16 = Q                                                  |
|                                                         |
|o16 : QuotientRing                                       |
+---------------------------------------------------------+
|i17 : g = a^4+b^4                                        |
|                                                         |
|       4    4                                            |
|o17 = a  + b                                             |
|                                                         |
|       ZZ                                                |
|o17 : ---[a..b]                                          |
|      101                                                |
+---------------------------------------------------------+
|i18 : bQ = Q[z]/(z^4 + g)                                |
|                                                         |
|o18 = bQ                                                 |
|                                                         |
|o18 : QuotientRing                                       |
+---------------------------------------------------------+
|i19 : G = freeResolution(ideal(a,b,z), LengthLimit => 3) |
|                                                         |
|        1       3       4       4                        |
|o19 = bQ  <-- bQ  <-- bQ  <-- bQ                         |
|                                                         |
|      0       1       2       3                          |
|                                                         |
|o19 : Complex                                            |
+---------------------------------------------------------+
|i20 : D = branchedToMF G.dd_3                            |
|                                                         |
|       8      8      8      8      8                     |
|o20 = Q  <-- Q  <-- Q  <-- Q  <-- Q                      |
|                                                         |
|      0      1      2      3      0                      |
|                                                         |
|o20 : ZZdFactorization                                   |
+---------------------------------------------------------+
|i21 : D.dd                                               |
|                                                         |
|           8                                 8           |
|o21 = 3 : Q  <----------------------------- Q  : 0       |
|                | 0  0   0 0 0 0 -a3 b3 |                |
|                | 0  0   0 0 0 0 b   a  |                |
|                | a  -b3 0 0 0 0 0   0  |                |
|                | -b -a3 0 0 0 0 0   0  |                |
|                | 0  0   1 0 0 0 0   0  |                |
|                | 0  0   0 1 0 0 0   0  |                |
|                | 0  0   0 0 1 0 0   0  |                |
|                | 0  0   0 0 0 1 0   0  |                |
|                                                         |
|           8                                 8           |
|      0 : Q  <----------------------------- Q  : 1       |
|                | 0  0   0 0 0 0 -a3 b3 |                |
|                | 0  0   0 0 0 0 b   a  |                |
|                | a  -b3 0 0 0 0 0   0  |                |
|                | -b -a3 0 0 0 0 0   0  |                |
|                | 0  0   1 0 0 0 0   0  |                |
|                | 0  0   0 1 0 0 0   0  |                |
|                | 0  0   0 0 1 0 0   0  |                |
|                | 0  0   0 0 0 1 0   0  |                |
|                                                         |
|           8                                 8           |
|      1 : Q  <----------------------------- Q  : 2       |
|                | 0  0   0 0 0 0 -a3 b3 |                |
|                | 0  0   0 0 0 0 b   a  |                |
|                | a  -b3 0 0 0 0 0   0  |                |
|                | -b -a3 0 0 0 0 0   0  |                |
|                | 0  0   1 0 0 0 0   0  |                |
|                | 0  0   0 1 0 0 0   0  |                |
|                | 0  0   0 0 1 0 0   0  |                |
|                | 0  0   0 0 0 1 0   0  |                |
|                                                         |
|           8                                 8           |
|      2 : Q  <----------------------------- Q  : 3       |
|                | 0  0   0 0 0 0 -a3 b3 |                |
|                | 0  0   0 0 0 0 b   a  |                |
|                | a  -b3 0 0 0 0 0   0  |                |
|                | -b -a3 0 0 0 0 0   0  |                |
|                | 0  0   1 0 0 0 0   0  |                |
|                | 0  0   0 1 0 0 0   0  |                |
|                | 0  0   0 0 1 0 0   0  |                |
|                | 0  0   0 0 0 1 0   0  |                |
|                                                         |
|o21 : ZZdFactorizationMap                                |
+---------------------------------------------------------+

In this case, we obtain something that looks like a fold of the Koszul
factorization of the potential, but padded with additional identity maps so
that the resulting period is 4.

See also
========

  * Making ZZdFactorizations -- Information
    about the basic constructors
  * toBranchedCover -- Converts a d-fold matrix
    factorization into a maximal Cohen-Macaulay module over a d-fold branched
    cover of the potential
  * zeroOutDegrees -- Converts a d-fold matrix
    factorization into a maximal Cohen-Macaulay module over a d-fold branched
    cover of the potential
  * higherHomotopyFactorization, --
    Constructs the matrix factorization associated with a system of higher
    homotopies

Ways to use branchedToMF:
=========================

  * "branchedToMF(Matrix)"
  * "branchedToMF(Matrix,Ring)"
  * "branchedToMF(Module)"
  * "branchedToMF(Module,Ring)"

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

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

-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:6166:0.

coimage(ZZdFactorizationMap) -- make the coimage of a map of ZZ/d-graded factorizations
***************************************************************************************

  * Function: coimage (Macaulay2Doc),
  * Usage:
        coimage f
  * Inputs:
      * f, a map of ZZ/d-graded factorizations,
  * Outputs:
      * a ZZ/d graded factorization,

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

The coimage of a ZZ/d-graded factorization map $f : C \to D$ is the ZZ/d-graded
factorization $E$ whose $i-th$ term is $coimage(f_i)$, and whose differential
is induced from the differential on the source.

In the following example, we first construct a random factorization morphism $f
: C \to D$.

+-----------------------------------------------------------------------------+
|i1 : S = ZZ/101[a,b];                                                        |
+-----------------------------------------------------------------------------+
|i2 : R = S/(a^3+b^3);                                                        |
+-----------------------------------------------------------------------------+
|i3 : m = ideal vars R                                                        |
|                                                                             |
|o3 = ideal (a, b)                                                            |
|                                                                             |
|o3 : Ideal of R                                                              |
+-----------------------------------------------------------------------------+
|i4 : C = tailMF m                                                            |
|                                                                             |
|      2      2      2                                                        |
|o4 = S  <-- S  <-- S                                                         |
|                                                                             |
|     0      1      0                                                         |
|                                                                             |
|o4 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i5 : D = tailMF (m^2)                                                        |
|                                                                             |
|      3      3      3                                                        |
|o5 = S  <-- S  <-- S                                                         |
|                                                                             |
|     0      1      0                                                         |
|                                                                             |
|o5 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i6 : f = randomFactorizationMap(C, D, Cycle => true, InternalDegree => 2)    |
|                                                                             |
|          2                                                                  |
|o6 = 0 : S  <----------------------------------------------------------------|
|               {2} | -34a3+15a2b-31ab2-38b3 -29a3+35a2b+6ab2+38b3 -22a3-5a2b+|
|               {3} | -38a2-16ab+39b2        -10a2-29ab-8b2        21a2+34ab+1|
|                                                                             |
|          2                                                                  |
|     1 : S  <----------------------------------------------------------------|
|               {4} | -34a3-14a2b-12ab2-19b3 29a3+44a2b-35ab2+39b3 -22a3-39a2b|
|               {4} | -38a3+8a2b+3ab2-30b3   10a3+21a2b-40ab2+38b3 21a3+18a2b+|
|                                                                             |
|o6 : ZZdFactorizationMap                                                     |
|-----------------------------------------------------------------------------|
|                3                                                            |
|-------------- S  : 0                                                        |
|41ab2-30b3 |                                                                 |
|9b2        |                                                                 |
|                                                                             |
|                3                                                            |
|-------------- S  : 1                                                        |
|+48ab2-8b3 |                                                                 |
|32ab2-38b3 |                                                                 |
+-----------------------------------------------------------------------------+
|i7 : isWellDefined coimage f                                                 |
|                                                                             |
|o7 = true                                                                    |
+-----------------------------------------------------------------------------+
|i8 : inducedMap(coimage f, D)                                                |
|                                                                             |
|                                                                             |
|o8 = 0 : cokernel {3} | -29a5-27a4b+a3b2+2a2b3+10ab4+50b5    |               |
|                  {3} | -19a5-38a4b+30a3b2+14a2b3+29ab4+21b5 |               |
|                  {3} | a5+37a4b+a3b2+29a2b3-24ab4-30b5      |               |
|                                                                             |
|                                                                             |
|                                                                             |
|     1 : cokernel {5} | -29a5+a4b-37a3b2+38a2b3+44ab4+30b5  |                |
|                  {5} | 19a5-10a4b-47a3b2+34a2b3+40ab4+50b5 |                |
|                  {5} | a5+17a4b+47a3b2+12a2b3-22ab4+21b5   |                |
|                                                                             |
|                                                                             |
|o8 : ZZdFactorizationMap                                                     |
|-----------------------------------------------------------------------------|
|                     3                                                       |
| <----------------- S  : 0                                                   |
|    {3} | 1 0 0 |                                                            |
|    {3} | 0 1 0 |                                                            |
|    {3} | 0 0 1 |                                                            |
|                                                                             |
|                    3                                                        |
|<----------------- S  : 1                                                    |
|   {5} | 1 0 0 |                                                             |
|   {5} | 0 1 0 |                                                             |
|   {5} | 0 0 1 |                                                             |
+-----------------------------------------------------------------------------+
|i9 : prune coimage f                                                         |
|                                                                             |
|o9 = cokernel {3} | -29a5-27a4b+a3b2+2a2b3+10ab4+50b5    | <-- cokernel {5} ||
|              {3} | -19a5-38a4b+30a3b2+14a2b3+29ab4+21b5 |              {5} ||
|              {3} | a5+37a4b+a3b2+29a2b3-24ab4-30b5      |              {5} ||
|                                                                             |
|     0                                                         1             |
|                                                                             |
|o9 : ZZdFactorization                                                        |
|-----------------------------------------------------------------------------|
|-29a5+a4b-37a3b2+38a2b3+44ab4+30b5  | <-- cokernel {3} |                     |
|19a5-10a4b-47a3b2+34a2b3+40ab4+50b5 |              {3} |                     |
|a5+17a4b+47a3b2+12a2b3-22ab4+21b5   |              {3} |                     |
|                                                                             |
|                                          0                                  |
|-----------------------------------------------------------------------------|
|-29a5-27a4b+a3b2+2a2b3+10ab4+50b5    |                                       |
|-19a5-38a4b+30a3b2+14a2b3+29ab4+21b5 |                                       |
|a5+37a4b+a3b2+29a2b3-24ab4-30b5      |                                       |
+-----------------------------------------------------------------------------+
|i10 : potential coimage f                                                    |
|                                                                             |
|       3    3                                                                |
|o10 = a  + b                                                                 |
|                                                                             |
|o10 : S                                                                      |
+-----------------------------------------------------------------------------+

See also
========

  * Making ZZdFactorizations -- Information
    about the basic constructors
  * Making maps between factorizations
    -- information about the basic constructors
  * coimage (Macaulay2Doc) -- coimage of a map
  * image(ZZdFactorizationMap) -- make
    the image of a map of ZZ/d-graded factorizations
  * kernel(ZZdFactorizationMap) -- make
    the kernel of a map of ZZ/d-graded factorizations
  * cokernel(ZZdFactorizationMap), --
    make the cokernel of a map of ZZ/d-graded factorizations

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

  * coimage(ZZdFactorizationMap), --
    make the coimage of a map of ZZ/d-graded factorizations
-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:4356:0.

cokernel(ZZdFactorizationMap) -- make the cokernel of a map of ZZ/d-graded factorizations
*****************************************************************************************

  * Function: cokernel (Macaulay2Doc),
  * Usage:
        cokernel f
        coker f
  * Inputs:
      * f, a map of ZZ/d-graded factorizations,
  * Outputs:
      * a ZZ/d graded factorization,

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

If $f : C \to D$ is a map of ZZ/d-graded factorizations of degree $d$, then the
cokernel is the factorization $E$ whose $i-th$ term is $cokernel(f_{i-d})$, and
whose differential is induced from the differential on the target.

In the following example, we first construct a random factorization morphism $f
: C \to D$.

+-----------------------------------------------------------------------------+
|i1 : S = ZZ/101[a,b];                                                        |
+-----------------------------------------------------------------------------+
|i2 : R = S/(a^3+b^3);                                                        |
+-----------------------------------------------------------------------------+
|i3 : m = ideal vars R                                                        |
|                                                                             |
|o3 = ideal (a, b)                                                            |
|                                                                             |
|o3 : Ideal of R                                                              |
+-----------------------------------------------------------------------------+
|i4 : use S;                                                                  |
+-----------------------------------------------------------------------------+
|i5 : C = tailMF m                                                            |
|                                                                             |
|      2      2      2                                                        |
|o5 = S  <-- S  <-- S                                                         |
|                                                                             |
|     0      1      0                                                         |
|                                                                             |
|o5 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i6 : D = tailMF (m^2)                                                        |
|                                                                             |
|      3      3      3                                                        |
|o6 = S  <-- S  <-- S                                                         |
|                                                                             |
|     0      1      0                                                         |
|                                                                             |
|o6 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i7 : f = randomFactorizationMap(D, C, Cycle => true, InternalDegree => 2)    |
|                                                                             |
|          3                                      2                           |
|o7 = 0 : S  <---------------------------------- S  : 0                       |
|               {3} | 20a+29b 24a2-17ab+9b2  |                                |
|               {3} | 10a-19b 30a2-48ab-7b2  |                                |
|               {3} | 32a-36b 19a2-11ab-21b2 |                                |
|                                                                             |
|          3                                2                                 |
|     1 : S  <---------------------------- S  : 1                             |
|               {5} | 20a+21b 24a-36b  |                                      |
|               {5} | -10a+9b -30a-29b |                                      |
|               {5} | 32a-7b  19a+19b  |                                      |
|                                                                             |
|o7 : ZZdFactorizationMap                                                     |
+-----------------------------------------------------------------------------+
|i8 : g = inducedMap(coker f, D)                                              |
|                                                                             |
|                                                                     3       |
|o8 = 0 : cokernel {3} | 20a+29b 24a2-17ab+9b2  | <----------------- S  : 0   |
|                  {3} | 10a-19b 30a2-48ab-7b2  |    {3} | 1 0 0 |            |
|                  {3} | 32a-36b 19a2-11ab-21b2 |    {3} | 0 1 0 |            |
|                                                    {3} | 0 0 1 |            |
|                                                                             |
|                                                               3             |
|     1 : cokernel {5} | 20a+21b 24a-36b  | <----------------- S  : 1         |
|                  {5} | -10a+9b -30a-29b |    {5} | 1 0 0 |                  |
|                  {5} | 32a-7b  19a+19b  |    {5} | 0 1 0 |                  |
|                                              {5} | 0 0 1 |                  |
|                                                                             |
|o8 : ZZdFactorizationMap                                                     |
+-----------------------------------------------------------------------------+
|i9 : coker g == 0                                                            |
|                                                                             |
|o9 = true                                                                    |
+-----------------------------------------------------------------------------+
|i10 : prune coker f                                                          |
|                                                                             |
|o10 = cokernel {3} | -12a+23b 27a2+17ab+2b2 | <-- cokernel {5} | -27a+15b    |
|               {3} | -6a-29b  a2+29ab+13b2  |              {5} | a-5b        |
|               {3} | a-39b    -36b2         |              {5} | -31b        |
|                                                                             |
|      0                                           1                          |
|                                                                             |
|o10 : ZZdFactorization                                                       |
|-----------------------------------------------------------------------------|
|49a-42b | <-- cokernel {3} | -12a+23b 27a2+17ab+2b2 |                        |
|-36b    |              {3} | -6a-29b  a2+29ab+13b2  |                        |
|a-32b   |              {3} | a-39b    -36b2         |                        |
|                                                                             |
|              0                                                              |
+-----------------------------------------------------------------------------+
|i11 : (coker f).dd^2 == a^3+b^3                                              |
|                                                                             |
|o11 = true                                                                   |
+-----------------------------------------------------------------------------+

See also
========

  * Making ZZdFactorizations -- Information
    about the basic constructors
  * Making maps between factorizations
    -- information about the basic constructors
  * cokernel (Macaulay2Doc) -- cokernel of a map
  * image(ZZdFactorizationMap) -- make
    the image of a map of ZZ/d-graded factorizations
  * coimage(ZZdFactorizationMap), --
    make the coimage of a map of ZZ/d-graded factorizations
  * kernel(ZZdFactorizationMap) -- make
    the kernel of a map of ZZ/d-graded factorizations

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

  * cokernel(ZZdFactorizationMap), --
    make the cokernel of a map of ZZ/d-graded factorizations
-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:4439:0.

collapseMF -- Converts a d-fold factorization into a (d-1)-fold factorization by composing the kth differential with the (k+1)th differential
*********************************************************************************************************************************************

  * Usage:
        collapseMF(ZZdFactorization, ZZ)
  * Inputs:
      * ZZdFactorization, a ZZ/d graded factorization,
        A ZZdFactorization object representing a d-fold factorization
      * ZZ, an integer (Macaulay2Doc), An integer representing the
        kth differential
  * Outputs:
      * a ZZ/d graded factorization,

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

This method collapses a d-fold factorization into a d-1-fold factorization by
composing the kth differential with the (k+1)th differential. It then permutes
the resulting factorization to ensure the correct ordering.

+-----------------------------------------------------------------------------+
|i1 : Q = QQ[x_1..x_3];                                                       |
+-----------------------------------------------------------------------------+
|i2 : C = ZZdfactorization {x_1,x_2,x_3}                                      |
|                                                                             |
|      1      1      1      1                                                 |
|o2 = Q  <-- Q  <-- Q  <-- Q                                                  |
|                                                                             |
|     0      1      2      0                                                  |
|                                                                             |
|o2 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i3 : C.dd                                                                    |
|                                                                             |
|          1               1                                                  |
|o3 = 2 : Q  <----------- Q  : 0                                              |
|               | x_3 |                                                       |
|                                                                             |
|          1               1                                                  |
|     0 : Q  <----------- Q  : 1                                              |
|               | x_1 |                                                       |
|                                                                             |
|          1               1                                                  |
|     1 : Q  <----------- Q  : 2                                              |
|               | x_2 |                                                       |
|                                                                             |
|o3 : ZZdFactorizationMap                                                     |
+-----------------------------------------------------------------------------+
|i4 : C1 = collapseMF(C, 1)                                                   |
|                                                                             |
|      1      1      1                                                        |
|o4 = Q  <-- Q  <-- Q                                                         |
|                                                                             |
|     0      1      0                                                         |
|                                                                             |
|o4 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i5 : C1.dd                                                                   |
|                                                                             |
|          1               1                                                  |
|o5 = 1 : Q  <----------- Q  : 0                                              |
|               | x_3 |                                                       |
|                                                                             |
|          1                  1                                               |
|     0 : Q  <-------------- Q  : 1                                           |
|               | x_1x_2 |                                                    |
|                                                                             |
|o5 : ZZdFactorizationMap                                                     |
+-----------------------------------------------------------------------------+
|i6 : C2 = collapseMF(C, 2)                                                   |
|                                                                             |
|      1      1      1                                                        |
|o6 = Q  <-- Q  <-- Q                                                         |
|                                                                             |
|     0      1      0                                                         |
|                                                                             |
|o6 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i7 : C2.dd                                                                   |
|                                                                             |
|          1                  1                                               |
|o7 = 1 : Q  <-------------- Q  : 0                                           |
|               | x_2x_3 |                                                    |
|                                                                             |
|          1               1                                                  |
|     0 : Q  <----------- Q  : 1                                              |
|               | x_1 |                                                       |
|                                                                             |
|o7 : ZZdFactorizationMap                                                     |
+-----------------------------------------------------------------------------+
|i8 : K = linearMF(x_1^4 + x_2^4, t)                                          |
|                                                                             |
|     / Q[t] \4     / Q[t] \4     / Q[t] \4     / Q[t] \4     / Q[t] \4       |
|o8 = |------|  <-- |------|  <-- |------|  <-- |------|  <-- |------|        |
|     | 2    |      | 2    |      | 2    |      | 2    |      | 2    |        |
|     \t  + 1/      \t  + 1/      \t  + 1/      \t  + 1/      \t  + 1/        |
|                                                                             |
|     0             1             2             3             0               |
|                                                                             |
|o8 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i9 : collapseMF(K, 1)                                                        |
|                                                                             |
|     / Q[t] \4     / Q[t] \4     / Q[t] \4     / Q[t] \4                     |
|o9 = |------|  <-- |------|  <-- |------|  <-- |------|                      |
|     | 2    |      | 2    |      | 2    |      | 2    |                      |
|     \t  + 1/      \t  + 1/      \t  + 1/      \t  + 1/                      |
|                                                                             |
|     0             1             2             0                             |
|                                                                             |
|o9 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i10 : oo.dd                                                                  |
|                                                                             |
|          / Q[t] \4                                     / Q[t] \4            |
|o10 = 2 : |------|  <---------------------------------- |------|  : 0        |
|          | 2    |     {0, 2} | x_2 x_1  0    0     |   | 2    |             |
|          \t  + 1/     {0, 2} | 0   x_2t x_1  0     |   \t  + 1/             |
|                       {0, 2} | 0   0    -x_2 x_1   |                        |
|                       {0, 2} | x_1 0    0    -x_2t |                        |
|                                                                             |
|          / Q[t] \4                                                          |
|      0 : |------|  <--------------------------------------------------------|
|          | 2    |     {0, 2} | x_2^2           x_1x_2t+x_1x_2 x_1^2         |
|          \t  + 1/     {0, 2} | 0               -x_2^2         x_1x_2t-x_1x_2|
|                       {0, 2} | x_1^2           0              x_2^2         |
|                       {0, 2} | -x_1x_2t+x_1x_2 x_1^2          0             |
|                                                                             |
|          / Q[t] \4                                     / Q[t] \4            |
|      1 : |------|  <---------------------------------- |------|  : 2        |
|          | 2    |     {0, 2} | x_2 x_1  0    0     |   | 2    |             |
|          \t  + 1/     {0, 2} | 0   x_2t x_1  0     |   \t  + 1/             |
|                       {0, 2} | 0   0    -x_2 x_1   |                        |
|                       {0, 2} | x_1 0    0    -x_2t |                        |
|                                                                             |
|o10 : ZZdFactorizationMap                                                    |
|-----------------------------------------------------------------------------|
|                     / Q[t] \4                                               |
|-------------------- |------|  : 1                                           |
| 0               |   | 2    |                                                |
| x_1^2           |   \t  + 1/                                                |
| -x_1x_2t-x_1x_2 |                                                           |
| -x_2^2          |                                                           |
+-----------------------------------------------------------------------------+
|i11 : collapseMF(K, 2)                                                       |
|                                                                             |
|      / Q[t] \4     / Q[t] \4     / Q[t] \4     / Q[t] \4                    |
|o11 = |------|  <-- |------|  <-- |------|  <-- |------|                     |
|      | 2    |      | 2    |      | 2    |      | 2    |                     |
|      \t  + 1/      \t  + 1/      \t  + 1/      \t  + 1/                     |
|                                                                             |
|      0             1             2             0                            |
|                                                                             |
|o11 : ZZdFactorization                                                       |
+-----------------------------------------------------------------------------+
|i12 : oo.dd                                                                  |
|                                                                             |
|          / Q[t] \4                                     / Q[t] \4            |
|o12 = 2 : |------|  <---------------------------------- |------|  : 0        |
|          | 2    |     {0, 2} | x_2 x_1  0    0     |   | 2    |             |
|          \t  + 1/     {0, 2} | 0   x_2t x_1  0     |   \t  + 1/             |
|                       {0, 2} | 0   0    -x_2 x_1   |                        |
|                       {0, 2} | x_1 0    0    -x_2t |                        |
|                                                                             |
|          / Q[t] \4                                     / Q[t] \4            |
|      0 : |------|  <---------------------------------- |------|  : 1        |
|          | 2    |     {0, 2} | x_2 x_1  0    0     |   | 2    |             |
|          \t  + 1/     {0, 2} | 0   x_2t x_1  0     |   \t  + 1/             |
|                       {0, 2} | 0   0    -x_2 x_1   |                        |
|                       {0, 2} | x_1 0    0    -x_2t |                        |
|                                                                             |
|          / Q[t] \4                                                          |
|      1 : |------|  <--------------------------------------------------------|
|          | 2    |     {0, 2} | x_2^2           x_1x_2t+x_1x_2 x_1^2         |
|          \t  + 1/     {0, 2} | 0               -x_2^2         x_1x_2t-x_1x_2|
|                       {0, 2} | x_1^2           0              x_2^2         |
|                       {0, 2} | -x_1x_2t+x_1x_2 x_1^2          0             |
|                                                                             |
|o12 : ZZdFactorizationMap                                                    |
|-----------------------------------------------------------------------------|
|                     / Q[t] \4                                               |
|-------------------- |------|  : 2                                           |
| 0               |   | 2    |                                                |
| x_1^2           |   \t  + 1/                                                |
| -x_1x_2t-x_1x_2 |                                                           |
| -x_2^2          |                                                           |
+-----------------------------------------------------------------------------+
|i13 : collapseMF(K, 3)                                                       |
|                                                                             |
|      / Q[t] \4     / Q[t] \4     / Q[t] \4     / Q[t] \4                    |
|o13 = |------|  <-- |------|  <-- |------|  <-- |------|                     |
|      | 2    |      | 2    |      | 2    |      | 2    |                     |
|      \t  + 1/      \t  + 1/      \t  + 1/      \t  + 1/                     |
|                                                                             |
|      0             1             2             0                            |
|                                                                             |
|o13 : ZZdFactorization                                                       |
+-----------------------------------------------------------------------------+
|i14 : oo.dd                                                                  |
|                                                                             |
|          / Q[t] \4                                                          |
|o14 = 2 : |------|  <--------------------------------------------------------|
|          | 2    |     {0, 2} | x_2^2           x_1x_2t+x_1x_2 x_1^2         |
|          \t  + 1/     {0, 2} | 0               -x_2^2         x_1x_2t-x_1x_2|
|                       {0, 2} | x_1^2           0              x_2^2         |
|                       {0, 2} | -x_1x_2t+x_1x_2 x_1^2          0             |
|                                                                             |
|          / Q[t] \4                                     / Q[t] \4            |
|      0 : |------|  <---------------------------------- |------|  : 1        |
|          | 2    |     {0, 2} | x_2 x_1  0    0     |   | 2    |             |
|          \t  + 1/     {0, 2} | 0   x_2t x_1  0     |   \t  + 1/             |
|                       {0, 2} | 0   0    -x_2 x_1   |                        |
|                       {0, 2} | x_1 0    0    -x_2t |                        |
|                                                                             |
|          / Q[t] \4                                     / Q[t] \4            |
|      1 : |------|  <---------------------------------- |------|  : 2        |
|          | 2    |     {0, 2} | x_2 x_1  0    0     |   | 2    |             |
|          \t  + 1/     {0, 2} | 0   x_2t x_1  0     |   \t  + 1/             |
|                       {0, 2} | 0   0    -x_2 x_1   |                        |
|                       {0, 2} | x_1 0    0    -x_2t |                        |
|                                                                             |
|o14 : ZZdFactorizationMap                                                    |
|-----------------------------------------------------------------------------|
|                     / Q[t] \4                                               |
|-------------------- |------|  : 0                                           |
| 0               |   | 2    |                                                |
| x_1^2           |   \t  + 1/                                                |
| -x_1x_2t-x_1x_2 |                                                           |
| -x_2^2          |                                                           |
+-----------------------------------------------------------------------------+

Ways to use collapseMF:
=======================

  * "collapseMF(ZZdFactorization,ZZ)"

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

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

-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:5700:0.

ComplexMap ** ZZdFactorizationMap -- the map of ZZ/d-graded factorizations between tensor factorizations, obtained by first folding the relevant complex map
************************************************************************************************************************************************************

  * Operator: ** (Macaulay2Doc),
  * Usage:
        h = f ** g
        h = tensor(f, g)
  * Inputs:
      * f, a map of complexes (Complexes), or a map of ZZ/d-graded factorizations,
      * g, a map of ZZ/d-graded factorizations, or
        a map of complexes (Complexes),
  * Outputs:
      * h, a map of ZZ/d-graded factorizations,

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

The maps $f : C \to D$ and $g : E \to F$ of ZZ/d-graded factorizations induce
the map $h = f \otimes g : C \otimes E \to D \otimes F$ defined by $c \otimes e
\mapsto f(c) \otimes g(e)$.

+-----------------------------------------------------------------------------+
|i1 : S = ZZ/101[a..c]                                                        |
|                                                                             |
|o1 = S                                                                       |
|                                                                             |
|o1 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i2 : C = freeResolution coker vars S                                         |
|                                                                             |
|      1      3      3      1                                                 |
|o2 = S  <-- S  <-- S  <-- S                                                  |
|                                                                             |
|     0      1      2      3                                                  |
|                                                                             |
|o2 : Complex                                                                 |
+-----------------------------------------------------------------------------+
|i3 : D = (freeResolution coker matrix{{a^2,a*b,b^3}})[-1]                    |
|                                                                             |
|      1      3      2                                                        |
|o3 = S  <-- S  <-- S                                                         |
|                                                                             |
|     1      2      3                                                         |
|                                                                             |
|o3 : Complex                                                                 |
+-----------------------------------------------------------------------------+
|i4 : f = randomComplexMap(D,C)                                               |
|                                                                             |
|                   1                                                         |
|o4 = 0 : 0 <----- S  : 0                                                     |
|              0                                                              |
|                                                                             |
|          1                                                3                 |
|     1 : S  <-------------------------------------------- S  : 1             |
|               | 24a-36b-30c -29a+19b+19c -10a-29b-8c |                      |
|                                                                             |
|          3                           3                                      |
|     2 : S  <----------------------- S  : 2                                  |
|               {2} | -22 -24 -16 |                                           |
|               {2} | -29 -38 39  |                                           |
|               {3} | 0   0   0   |                                           |
|                                                                             |
|          2                  1                                               |
|     3 : S  <-------------- S  : 3                                           |
|               {3} | 21 |                                                    |
|               {4} | 0  |                                                    |
|                                                                             |
|o4 : ComplexMap                                                              |
+-----------------------------------------------------------------------------+
|i5 : m = ideal vars (S/(a^3+b^3))                                            |
|                                                                             |
|o5 = ideal (a, b, c)                                                         |
|                                                                             |
|                 S                                                           |
|o5 : Ideal of -------                                                        |
|               3    3                                                        |
|              a  + b                                                         |
+-----------------------------------------------------------------------------+
|i6 : g = randomFactorizationMap(tailMF m, tailMF (m^2), Cycle => true)       |
|                                                                             |
|          4                                                                  |
|o6 = 0 : S  <----------------------------------------------------------------|
|               {3} | -47a-18b+50c 47a-48b-41c 6a+44b+42c 13a2+47ab+49b2 7a2-4|
|               {4} | 40           19          11         -16a-2b-38c    -47a+|
|               {4} | 47           -2          15         -11a+38b       -30a-|
|               {4} | -34          -35         23         -47a-37b+11c   40a+4|
|                                                                             |
|          4                                                                  |
|     1 : S  <----------------------------------------------------------------|
|               {5} | -47a-25b-38c -28a-15b    47a-37b+15c  6a+33b-16c   -13a-|
|               {5} | -40a-47b-31c -39a+4b-47c -19a-22b-11c -11a+39b-12c -16a+|
|               {5} | -47a+17b+11c -5a-28b     2a+47b-26c   -15a-34b-40c -11a-|
|               {6} | 34           48          35           -23          -47  |
|                                                                             |
|o6 : ZZdFactorizationMap                                                     |
|-----------------------------------------------------------------------------|
|                                                                             |
|-----------------------------------------------------------------------------|
|7ab+17b2+47ac-41bc -28a2+41ab-45b2 -45a2-50ab-28b2 -11a2+2ab+47b2-50ac+47bc 1|
|34b+23c            39a-47b+19c     -43a+48b+15c    -22a+35b-16c             3|
|25b                5a-19b          26a-15b         -7a-37b                  -|
|7b-23c             -48a-37b-5c     2a-4b-26c       19a+22b-40c              1|
|                                                                             |
|                                                                 9           |
|--------------------------------------------------------------- S  : 1       |
|19b     -7a+47b-19c  45a-38b      11a-2b-38c   -11a+15b+23c |                |
|37b+50c -47a+34b-46c -43a-37b-41c -22a+35b+11c 39a-23b+38c  |                |
|45b     -30a-18b+5c  26a-49b      -7a-48b+11c  -28a+44b-23c |                |
|        40           2            19           11           |                |
|-----------------------------------------------------------------------------|
|                                 9                                           |
|------------------------------- S  : 0                                       |
|1a2-15ab-34b2-16ac+7bc+47c2 |                                                |
|9a-23b+2c                   |                                                |
|28a+33b+48c                 |                                                |
|1a-39b-33c                  |                                                |
+-----------------------------------------------------------------------------+
|i7 : isWellDefined (g**f)                                                    |
|                                                                             |
|o7 = true                                                                    |
+-----------------------------------------------------------------------------+

See also
========

  * ZZdFactorization ** ZZdFactorization
    -- tensor product of ZZ/d-graded factorizations
  * randomFactorizationMap(ZZdFactorization,ZZdFactorization)
    -- a random map of ZZ/d-graded factorizations
  * Hom(ZZdFactorization,ZZdFactorization)
    -- the ZZ/d-graded
    homomorphism factorization between two ZZ/d-graded factorizations

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

  * "Complex ** ZZdFactorizationMap"
  * ComplexMap ** ZZdFactorizationMap
    -- the map of ZZ/d-graded factorizations between
    tensor factorizations, obtained by first folding the relevant complex map
  * "ZZdFactorizationMap ** Complex"
  * "ZZdFactorizationMap ** ComplexMap"
-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:3902:0.

components(ZZdFactorization) -- list the components of a direct sum
*******************************************************************

  * Function: components (Macaulay2Doc),
  * Usage:
        components C
  * Inputs:
      * C, a ZZ/d graded factorization,
  * Outputs:
      * a list (Macaulay2Doc), the component factorizations of a
        direct sum (of ZZ/d-graded factorizations)

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

A ZZ/d-graded factorization which has been constructed as a direct sum stores
its component factorizations.

+---------------------------------------------+
|i1 : S = ZZ/101[a,b,c];                      |
+---------------------------------------------+
|i2 : f = a^3 + b^3 + c^3;                    |
+---------------------------------------------+
|i3 : C1 = randomTailMF(f)                    |
|                                             |
|      6      6      6                        |
|o3 = S  <-- S  <-- S                         |
|                                             |
|     0      1      0                         |
|                                             |
|o3 : ZZdFactorization                        |
+---------------------------------------------+
|i4 : C2 = randomTailMF(f)                    |
|                                             |
|      12      12      12                     |
|o4 = S   <-- S   <-- S                       |
|                                             |
|     0       1       0                       |
|                                             |
|o4 : ZZdFactorization                        |
+---------------------------------------------+
|i5 : D = C1 ++ C2                            |
|                                             |
|      18      18      18                     |
|o5 = S   <-- S   <-- S                       |
|                                             |
|     0       1       0                       |
|                                             |
|o5 : ZZdFactorization                        |
+---------------------------------------------+
|i6 : L = components D                        |
|                                             |
|       6      6      6   12      12      12  |
|o6 = {S  <-- S  <-- S , S   <-- S   <-- S  } |
|                                             |
|      0      1      0   0       1       0    |
|                                             |
|o6 : List                                    |
+---------------------------------------------+
|i7 : L_0 === C1                              |
|                                             |
|o7 = true                                    |
+---------------------------------------------+
|i8 : L_1 === C2                              |
|                                             |
|o8 = true                                    |
+---------------------------------------------+
|i9 : E = (peanut => C1) ++ (butter => C2)    |
|                                             |
|      18      18      18                     |
|o9 = S   <-- S   <-- S                       |
|                                             |
|     0       1       0                       |
|                                             |
|o9 : ZZdFactorization                        |
+---------------------------------------------+
|i10 : components E                           |
|                                             |
|        6      6      6   12      12      12 |
|o10 = {S  <-- S  <-- S , S   <-- S   <-- S  }|
|                                             |
|       0      1      0   0       1       0   |
|                                             |
|o10 : List                                   |
+---------------------------------------------+

The names of the component complexes are called indices, and are used to access
the relevant inclusion and projection maps.

+----------------------------------------------------------------------+
|i11 : indices D                                                       |
|                                                                      |
|o11 = {0, 1}                                                          |
|                                                                      |
|o11 : List                                                            |
+----------------------------------------------------------------------+
|i12 : D^[0]                                                           |
|                                                                      |
|           6                                                    18    |
|o12 = 0 : S  <------------------------------------------------ S   : 0|
|                {9}  | 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |          |
|                {9}  | 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |          |
|                {9}  | 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |          |
|                {10} | 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |          |
|                {10} | 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 |          |
|                {10} | 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 |          |
|                                                                      |
|           6                                                    18    |
|      1 : S  <------------------------------------------------ S   : 1|
|                {11} | 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |          |
|                {11} | 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |          |
|                {11} | 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |          |
|                {11} | 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |          |
|                {11} | 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 |          |
|                {11} | 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 |          |
|                                                                      |
|o12 : ZZdFactorizationMap                                             |
+----------------------------------------------------------------------+
|i13 : indices E                                                       |
|                                                                      |
|o13 = {peanut, butter}                                                |
|                                                                      |
|o13 : List                                                            |
+----------------------------------------------------------------------+
|i14 : E_[butter]                                                      |
|                                                                      |
|           18                                        12               |
|o14 = 0 : S   <------------------------------------ S   : 0           |
|                 {9}  | 0 0 0 0 0 0 0 0 0 0 0 0 |                     |
|                 {9}  | 0 0 0 0 0 0 0 0 0 0 0 0 |                     |
|                 {9}  | 0 0 0 0 0 0 0 0 0 0 0 0 |                     |
|                 {10} | 0 0 0 0 0 0 0 0 0 0 0 0 |                     |
|                 {10} | 0 0 0 0 0 0 0 0 0 0 0 0 |                     |
|                 {10} | 0 0 0 0 0 0 0 0 0 0 0 0 |                     |
|                 {7}  | 1 0 0 0 0 0 0 0 0 0 0 0 |                     |
|                 {7}  | 0 1 0 0 0 0 0 0 0 0 0 0 |                     |
|                 {7}  | 0 0 1 0 0 0 0 0 0 0 0 0 |                     |
|                 {7}  | 0 0 0 1 0 0 0 0 0 0 0 0 |                     |
|                 {7}  | 0 0 0 0 1 0 0 0 0 0 0 0 |                     |
|                 {7}  | 0 0 0 0 0 1 0 0 0 0 0 0 |                     |
|                 {7}  | 0 0 0 0 0 0 1 0 0 0 0 0 |                     |
|                 {7}  | 0 0 0 0 0 0 0 1 0 0 0 0 |                     |
|                 {7}  | 0 0 0 0 0 0 0 0 1 0 0 0 |                     |
|                 {7}  | 0 0 0 0 0 0 0 0 0 1 0 0 |                     |
|                 {7}  | 0 0 0 0 0 0 0 0 0 0 1 0 |                     |
|                 {7}  | 0 0 0 0 0 0 0 0 0 0 0 1 |                     |
|                                                                      |
|           18                                        12               |
|      1 : S   <------------------------------------ S   : 1           |
|                 {11} | 0 0 0 0 0 0 0 0 0 0 0 0 |                     |
|                 {11} | 0 0 0 0 0 0 0 0 0 0 0 0 |                     |
|                 {11} | 0 0 0 0 0 0 0 0 0 0 0 0 |                     |
|                 {11} | 0 0 0 0 0 0 0 0 0 0 0 0 |                     |
|                 {11} | 0 0 0 0 0 0 0 0 0 0 0 0 |                     |
|                 {11} | 0 0 0 0 0 0 0 0 0 0 0 0 |                     |
|                 {8}  | 1 0 0 0 0 0 0 0 0 0 0 0 |                     |
|                 {8}  | 0 1 0 0 0 0 0 0 0 0 0 0 |                     |
|                 {8}  | 0 0 1 0 0 0 0 0 0 0 0 0 |                     |
|                 {8}  | 0 0 0 1 0 0 0 0 0 0 0 0 |                     |
|                 {8}  | 0 0 0 0 1 0 0 0 0 0 0 0 |                     |
|                 {8}  | 0 0 0 0 0 1 0 0 0 0 0 0 |                     |
|                 {9}  | 0 0 0 0 0 0 1 0 0 0 0 0 |                     |
|                 {9}  | 0 0 0 0 0 0 0 1 0 0 0 0 |                     |
|                 {9}  | 0 0 0 0 0 0 0 0 1 0 0 0 |                     |
|                 {9}  | 0 0 0 0 0 0 0 0 0 1 0 0 |                     |
|                 {9}  | 0 0 0 0 0 0 0 0 0 0 1 0 |                     |
|                 {9}  | 0 0 0 0 0 0 0 0 0 0 0 1 |                     |
|                                                                      |
|o14 : ZZdFactorizationMap                                             |
+----------------------------------------------------------------------+

See also
========

  * directSum(ZZdFactorization), --
    direct sum of ZZ/d-graded factorizations
  * indices (Macaulay2Doc) -- indices of a polynomial; also
    components for a direct sum
  * ZZdFactorization _ Array -- the
    canonical inclusion or projection map of a direct sum
  * ZZdFactorization ^ Array -- the
    canonical inclusion or projection map of a direct sum

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

  * components(ZZdFactorization), --
    list the components of a direct sum
-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:1298:0.

components(ZZdFactorizationMap) -- list the components of a direct sum
**********************************************************************

  * Function: components (Macaulay2Doc),
  * Usage:
        components f
  * Inputs:
      * f, a map of ZZ/d-graded factorizations,
  * Outputs:
      * a list (Macaulay2Doc), the component maps of a direct sum
        of maps of ZZ/d-graded factorizations

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

A map of ZZ/d-graded factorizations stores its component maps.

+-----------------------------------------------------------------------------+
|i1 : S = ZZ/101[a,b,c]                                                       |
|                                                                             |
|o1 = S                                                                       |
|                                                                             |
|o1 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i2 : R = S/(a^2+b^2+c^2);                                                    |
+-----------------------------------------------------------------------------+
|i3 : m = ideal vars R                                                        |
|                                                                             |
|o3 = ideal (a, b, c)                                                         |
|                                                                             |
|o3 : Ideal of R                                                              |
+-----------------------------------------------------------------------------+
|i4 : C = tailMF m                                                            |
|                                                                             |
|      4      4      4                                                        |
|o4 = S  <-- S  <-- S                                                         |
|                                                                             |
|     0      1      0                                                         |
|                                                                             |
|o4 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i5 : g1 = id_C                                                               |
|                                                                             |
|          4                       4                                          |
|o5 = 0 : S  <------------------- S  : 0                                      |
|               {3} | 1 0 0 0 |                                               |
|               {3} | 0 1 0 0 |                                               |
|               {3} | 0 0 1 0 |                                               |
|               {3} | 0 0 0 1 |                                               |
|                                                                             |
|          4                       4                                          |
|     1 : S  <------------------- S  : 1                                      |
|               {4} | 1 0 0 0 |                                               |
|               {4} | 0 1 0 0 |                                               |
|               {4} | 0 0 1 0 |                                               |
|               {4} | 0 0 0 1 |                                               |
|                                                                             |
|o5 : ZZdFactorizationMap                                                     |
+-----------------------------------------------------------------------------+
|i6 : g2 = randomFactorizationMap(C[1], C[2], Boundary => true)               |
|                                                                             |
|          4                                                                  |
|o6 = 0 : S  <--------------------------------------------------------------- |
|               {4} | 48a-36b-c    -18a-15b-11c -38a-50b-24c -39a-34b-13c |   |
|               {4} | 37a+29b+11c  -28a+10b+32c 11a-23b-22c  -38a-34b-35c |   |
|               {4} | -22a+30b-14c 19a-44b-39c  -25a-34b-8c  16a+19b+9c   |   |
|               {4} | 44a-24b+28c  31a+20b+25c  -15a+10b+29c -21a+23b     |   |
|                                                                             |
|          4                                                                  |
|     1 : S  <-------------------------------------------------------------- S|
|               {3} | 11a+20b-9c  -37a-23b+39c -28a-10b+14c -38a+24b-8c  |    |
|               {3} | 25a+15b+35c -22a-34b-32c -19a-50b-11c -16a-36b-22c |    |
|               {3} | 38a-44b     48a-19b+25c  18a+34b+28c  39a-30b-29c  |    |
|               {3} | 15a+10b+13c 44a+34b+11c  -31a+23b+c   21a-29b-24c  |    |
|                                                                             |
|o6 : ZZdFactorizationMap                                                     |
|-----------------------------------------------------------------------------|
| 4                                                                           |
|S  : 0                                                                       |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|4                                                                            |
|  : 1                                                                        |
+-----------------------------------------------------------------------------+
|i7 : f = g1 ++ g2                                                            |
|                                                                             |
|          8                                                                  |
|o7 = 0 : S  <----------------------------------------------------------------|
|               {3} | 1 0 0 0 0            0            0            0        |
|               {3} | 0 1 0 0 0            0            0            0        |
|               {3} | 0 0 1 0 0            0            0            0        |
|               {3} | 0 0 0 1 0            0            0            0        |
|               {4} | 0 0 0 0 48a-36b-c    -18a-15b-11c -38a-50b-24c -39a-34b-|
|               {4} | 0 0 0 0 37a+29b+11c  -28a+10b+32c 11a-23b-22c  -38a-34b-|
|               {4} | 0 0 0 0 -22a+30b-14c 19a-44b-39c  -25a-34b-8c  16a+19b+9|
|               {4} | 0 0 0 0 44a-24b+28c  31a+20b+25c  -15a+10b+29c -21a+23b |
|                                                                             |
|          8                                                                  |
|     1 : S  <----------------------------------------------------------------|
|               {4} | 1 0 0 0 0           0            0            0         |
|               {4} | 0 1 0 0 0           0            0            0         |
|               {4} | 0 0 1 0 0           0            0            0         |
|               {4} | 0 0 0 1 0           0            0            0         |
|               {3} | 0 0 0 0 11a+20b-9c  -37a-23b+39c -28a-10b+14c -38a+24b-8|
|               {3} | 0 0 0 0 25a+15b+35c -22a-34b-32c -19a-50b-11c -16a-36b-2|
|               {3} | 0 0 0 0 38a-44b     48a-19b+25c  18a+34b+28c  39a-30b-29|
|               {3} | 0 0 0 0 15a+10b+13c 44a+34b+11c  -31a+23b+c   21a-29b-24|
|                                                                             |
|o7 : ZZdFactorizationMap                                                     |
|-----------------------------------------------------------------------------|
|         8                                                                   |
|------- S  : 0                                                               |
|    |                                                                        |
|    |                                                                        |
|    |                                                                        |
|    |                                                                        |
|13c |                                                                        |
|35c |                                                                        |
|c   |                                                                        |
|    |                                                                        |
|                                                                             |
|        8                                                                    |
|------ S  : 1                                                                |
|   |                                                                         |
|   |                                                                         |
|   |                                                                         |
|   |                                                                         |
|c  |                                                                         |
|2c |                                                                         |
|c  |                                                                         |
|c  |                                                                         |
+-----------------------------------------------------------------------------+
|i8 : assert isWellDefined f                                                  |
+-----------------------------------------------------------------------------+
|i9 : L = components f                                                        |
|                                                                             |
|           4                       4           4                             |
|o9 = {0 : S  <------------------- S  : 0, 0 : S                              |
|                {3} | 1 0 0 0 |                                              |
|                {3} | 0 1 0 0 |                                              |
|                {3} | 0 0 1 0 |                                              |
|                {3} | 0 0 0 1 |                                              |
|                                                                             |
|           4                       4           4                             |
|      1 : S  <------------------- S  : 1  1 : S                              |
|                {4} | 1 0 0 0 |                                              |
|                {4} | 0 1 0 0 |                                              |
|                {4} | 0 0 1 0 |                                              |
|                {4} | 0 0 0 1 |                                              |
|     ------------------------------------------------------------------------|
|                                                                       4     |
|     <--------------------------------------------------------------- S  : 0}|
|        {4} | 48a-36b-c    -18a-15b-11c -38a-50b-24c -39a-34b-13c |          |
|        {4} | 37a+29b+11c  -28a+10b+32c 11a-23b-22c  -38a-34b-35c |          |
|        {4} | -22a+30b-14c 19a-44b-39c  -25a-34b-8c  16a+19b+9c   |          |
|        {4} | 44a-24b+28c  31a+20b+25c  -15a+10b+29c -21a+23b     |          |
|                                                                             |
|                                                                      4      |
|     <-------------------------------------------------------------- S  : 1  |
|        {3} | 11a+20b-9c  -37a-23b+39c -28a-10b+14c -38a+24b-8c  |           |
|        {3} | 25a+15b+35c -22a-34b-32c -19a-50b-11c -16a-36b-22c |           |
|        {3} | 38a-44b     48a-19b+25c  18a+34b+28c  39a-30b-29c  |           |
|        {3} | 15a+10b+13c 44a+34b+11c  -31a+23b+c   21a-29b-24c  |           |
|                                                                             |
|o9 : List                                                                    |
+-----------------------------------------------------------------------------+
|i10 : L_0 === g1                                                             |
|                                                                             |
|o10 = true                                                                   |
+-----------------------------------------------------------------------------+
|i11 : L_1 === g2                                                             |
|                                                                             |
|o11 = true                                                                   |
+-----------------------------------------------------------------------------+
|i12 : indices f                                                              |
|                                                                             |
|o12 = {0, 1}                                                                 |
|                                                                             |
|o12 : List                                                                   |
+-----------------------------------------------------------------------------+
|i13 : f' = (chicken => g1) ++ (nuggets => g2)                                |
|                                                                             |
|           8                                                                 |
|o13 = 0 : S  <---------------------------------------------------------------|
|                {3} | 1 0 0 0 0            0            0            0       |
|                {3} | 0 1 0 0 0            0            0            0       |
|                {3} | 0 0 1 0 0            0            0            0       |
|                {3} | 0 0 0 1 0            0            0            0       |
|                {4} | 0 0 0 0 48a-36b-c    -18a-15b-11c -38a-50b-24c -39a-34b|
|                {4} | 0 0 0 0 37a+29b+11c  -28a+10b+32c 11a-23b-22c  -38a-34b|
|                {4} | 0 0 0 0 -22a+30b-14c 19a-44b-39c  -25a-34b-8c  16a+19b+|
|                {4} | 0 0 0 0 44a-24b+28c  31a+20b+25c  -15a+10b+29c -21a+23b|
|                                                                             |
|           8                                                                 |
|      1 : S  <---------------------------------------------------------------|
|                {4} | 1 0 0 0 0           0            0            0        |
|                {4} | 0 1 0 0 0           0            0            0        |
|                {4} | 0 0 1 0 0           0            0            0        |
|                {4} | 0 0 0 1 0           0            0            0        |
|                {3} | 0 0 0 0 11a+20b-9c  -37a-23b+39c -28a-10b+14c -38a+24b-|
|                {3} | 0 0 0 0 25a+15b+35c -22a-34b-32c -19a-50b-11c -16a-36b-|
|                {3} | 0 0 0 0 38a-44b     48a-19b+25c  18a+34b+28c  39a-30b-2|
|                {3} | 0 0 0 0 15a+10b+13c 44a+34b+11c  -31a+23b+c   21a-29b-2|
|                                                                             |
|o13 : ZZdFactorizationMap                                                    |
|-----------------------------------------------------------------------------|
|          8                                                                  |
|-------- S  : 0                                                              |
|     |                                                                       |
|     |                                                                       |
|     |                                                                       |
|     |                                                                       |
|-13c |                                                                       |
|-35c |                                                                       |
|9c   |                                                                       |
|     |                                                                       |
|                                                                             |
|         8                                                                   |
|------- S  : 1                                                               |
|    |                                                                        |
|    |                                                                        |
|    |                                                                        |
|    |                                                                        |
|8c  |                                                                        |
|22c |                                                                        |
|9c  |                                                                        |
|4c  |                                                                        |
+-----------------------------------------------------------------------------+
|i14 : components f'                                                          |
|                                                                             |
|            4                       4           4                            |
|o14 = {0 : S  <------------------- S  : 0, 0 : S                             |
|                 {3} | 1 0 0 0 |                                             |
|                 {3} | 0 1 0 0 |                                             |
|                 {3} | 0 0 1 0 |                                             |
|                 {3} | 0 0 0 1 |                                             |
|                                                                             |
|            4                       4           4                            |
|       1 : S  <------------------- S  : 1  1 : S                             |
|                 {4} | 1 0 0 0 |                                             |
|                 {4} | 0 1 0 0 |                                             |
|                 {4} | 0 0 1 0 |                                             |
|                 {4} | 0 0 0 1 |                                             |
|      -----------------------------------------------------------------------|
|                                                                        4    |
|      <--------------------------------------------------------------- S  : 0|
|         {4} | 48a-36b-c    -18a-15b-11c -38a-50b-24c -39a-34b-13c |         |
|         {4} | 37a+29b+11c  -28a+10b+32c 11a-23b-22c  -38a-34b-35c |         |
|         {4} | -22a+30b-14c 19a-44b-39c  -25a-34b-8c  16a+19b+9c   |         |
|         {4} | 44a-24b+28c  31a+20b+25c  -15a+10b+29c -21a+23b     |         |
|                                                                             |
|                                                                       4     |
|      <-------------------------------------------------------------- S  : 1 |
|         {3} | 11a+20b-9c  -37a-23b+39c -28a-10b+14c -38a+24b-8c  |          |
|         {3} | 25a+15b+35c -22a-34b-32c -19a-50b-11c -16a-36b-22c |          |
|         {3} | 38a-44b     48a-19b+25c  18a+34b+28c  39a-30b-29c  |          |
|         {3} | 15a+10b+13c 44a+34b+11c  -31a+23b+c   21a-29b-24c  |          |
|      -----------------------------------------------------------------------|
|      }                                                                      |
|                                                                             |
|o14 : List                                                                   |
+-----------------------------------------------------------------------------+
|i15 : indices f'                                                             |
|                                                                             |
|o15 = {chicken, nuggets}                                                     |
|                                                                             |
|o15 : List                                                                   |
+-----------------------------------------------------------------------------+

The names of the components are called indices, and are used to access the
relevant inclusion and projection maps.

+-----------------------------------------------------------------------------+
|i16 : f'_[chicken]                                                           |
|                                                                             |
|           8                       4                                         |
|o16 = 0 : S  <------------------- S  : 0                                     |
|                {3} | 1 0 0 0 |                                              |
|                {3} | 0 1 0 0 |                                              |
|                {3} | 0 0 1 0 |                                              |
|                {3} | 0 0 0 1 |                                              |
|                {4} | 0 0 0 0 |                                              |
|                {4} | 0 0 0 0 |                                              |
|                {4} | 0 0 0 0 |                                              |
|                {4} | 0 0 0 0 |                                              |
|                                                                             |
|           8                       4                                         |
|      1 : S  <------------------- S  : 1                                     |
|                {4} | 1 0 0 0 |                                              |
|                {4} | 0 1 0 0 |                                              |
|                {4} | 0 0 1 0 |                                              |
|                {4} | 0 0 0 1 |                                              |
|                {3} | 0 0 0 0 |                                              |
|                {3} | 0 0 0 0 |                                              |
|                {3} | 0 0 0 0 |                                              |
|                {3} | 0 0 0 0 |                                              |
|                                                                             |
|o16 : ZZdFactorizationMap                                                    |
+-----------------------------------------------------------------------------+
|i17 : f'^[nuggets]                                                           |
|                                                                             |
|           4                                                                 |
|o17 = 0 : S  <---------------------------------------------------------------|
|                {4} | 0 0 0 0 48a-36b-c    -18a-15b-11c -38a-50b-24c -39a-34b|
|                {4} | 0 0 0 0 37a+29b+11c  -28a+10b+32c 11a-23b-22c  -38a-34b|
|                {4} | 0 0 0 0 -22a+30b-14c 19a-44b-39c  -25a-34b-8c  16a+19b+|
|                {4} | 0 0 0 0 44a-24b+28c  31a+20b+25c  -15a+10b+29c -21a+23b|
|                                                                             |
|           4                                                                 |
|      1 : S  <---------------------------------------------------------------|
|                {3} | 0 0 0 0 11a+20b-9c  -37a-23b+39c -28a-10b+14c -38a+24b-|
|                {3} | 0 0 0 0 25a+15b+35c -22a-34b-32c -19a-50b-11c -16a-36b-|
|                {3} | 0 0 0 0 38a-44b     48a-19b+25c  18a+34b+28c  39a-30b-2|
|                {3} | 0 0 0 0 15a+10b+13c 44a+34b+11c  -31a+23b+c   21a-29b-2|
|                                                                             |
|o17 : ZZdFactorizationMap                                                    |
|-----------------------------------------------------------------------------|
|          8                                                                  |
|-------- S  : 0                                                              |
|-13c |                                                                       |
|-35c |                                                                       |
|9c   |                                                                       |
|     |                                                                       |
|                                                                             |
|         8                                                                   |
|------- S  : 1                                                               |
|8c  |                                                                        |
|22c |                                                                        |
|9c  |                                                                        |
|4c  |                                                                        |
+-----------------------------------------------------------------------------+
|i18 : f^[0]                                                                  |
|                                                                             |
|           4                               8                                 |
|o18 = 0 : S  <--------------------------- S  : 0                             |
|                {3} | 1 0 0 0 0 0 0 0 |                                      |
|                {3} | 0 1 0 0 0 0 0 0 |                                      |
|                {3} | 0 0 1 0 0 0 0 0 |                                      |
|                {3} | 0 0 0 1 0 0 0 0 |                                      |
|                                                                             |
|           4                               8                                 |
|      1 : S  <--------------------------- S  : 1                             |
|                {4} | 1 0 0 0 0 0 0 0 |                                      |
|                {4} | 0 1 0 0 0 0 0 0 |                                      |
|                {4} | 0 0 1 0 0 0 0 0 |                                      |
|                {4} | 0 0 0 1 0 0 0 0 |                                      |
|                                                                             |
|o18 : ZZdFactorizationMap                                                    |
+-----------------------------------------------------------------------------+
|i19 : f_[0]                                                                  |
|                                                                             |
|           8                       4                                         |
|o19 = 0 : S  <------------------- S  : 0                                     |
|                {3} | 1 0 0 0 |                                              |
|                {3} | 0 1 0 0 |                                              |
|                {3} | 0 0 1 0 |                                              |
|                {3} | 0 0 0 1 |                                              |
|                {4} | 0 0 0 0 |                                              |
|                {4} | 0 0 0 0 |                                              |
|                {4} | 0 0 0 0 |                                              |
|                {4} | 0 0 0 0 |                                              |
|                                                                             |
|           8                       4                                         |
|      1 : S  <------------------- S  : 1                                     |
|                {4} | 1 0 0 0 |                                              |
|                {4} | 0 1 0 0 |                                              |
|                {4} | 0 0 1 0 |                                              |
|                {4} | 0 0 0 1 |                                              |
|                {3} | 0 0 0 0 |                                              |
|                {3} | 0 0 0 0 |                                              |
|                {3} | 0 0 0 0 |                                              |
|                {3} | 0 0 0 0 |                                              |
|                                                                             |
|o19 : ZZdFactorizationMap                                                    |
+-----------------------------------------------------------------------------+

See also
========

  * directSum(ZZdFactorizationMap)
    -- direct sum of ZZ/d-graded factorization maps
  * components(ZZdFactorization), --
    list the components of a direct sum
  * indices (Macaulay2Doc) -- indices of a polynomial; also
    components for a direct sum
  * ZZdFactorizationMap _ Array -- the
    composition with the canonical inclusion or projection map
  * ZZdFactorizationMap ^ Array -- the
    composition with the canonical inclusion or projection map

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

  * components(ZZdFactorizationMap),
    -- list the components of a direct sum
-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:3049:0.

cone(ZZdFactorizationMap) -- make the mapping cone of a morphism of ZZ/d-graded factorizations
**********************************************************************************************

  * Function: cone (Macaulay2Doc),
  * Usage:
        cone f
  * Inputs:
      * f, a map of ZZ/d-graded factorizations,
        which is a morphism of ZZ/d-graded factorizations
  * Outputs:
      * a ZZ/d graded factorization,

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

Given a morphism $f \colon B \to C$, the mapping cone is the factorization
whose $i$-th term is $B_{i-1} \oplus C_i$, and whose $i$-th differential is
given by \[ \begin{bmatrix} -\operatorname{dd}^{B[-1]} & 0 \\ f[-1] &
\operatorname{dd}^C \end{bmatrix}. \]

A map between modules induces a map between their free resolutions, and we
compute the associated mapping cone.

+-----------------------------------------------------------------------------+
|i1 : S = ZZ/101[a,b];                                                        |
+-----------------------------------------------------------------------------+
|i2 : R = S/(a^3+b^3);                                                        |
+-----------------------------------------------------------------------------+
|i3 : m = ideal vars R                                                        |
|                                                                             |
|o3 = ideal (a, b)                                                            |
|                                                                             |
|o3 : Ideal of R                                                              |
+-----------------------------------------------------------------------------+
|i4 : use S;                                                                  |
+-----------------------------------------------------------------------------+
|i5 : C = tailMF m                                                            |
|                                                                             |
|      2      2      2                                                        |
|o5 = S  <-- S  <-- S                                                         |
|                                                                             |
|     0      1      0                                                         |
|                                                                             |
|o5 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i6 : D = tailMF (m^2)                                                        |
|                                                                             |
|      3      3      3                                                        |
|o6 = S  <-- S  <-- S                                                         |
|                                                                             |
|     0      1      0                                                         |
|                                                                             |
|o6 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i7 : f = randomFactorizationMap(D, C, Cycle => true, InternalDegree => 2)    |
|                                                                             |
|          3                                      2                           |
|o7 = 0 : S  <---------------------------------- S  : 0                       |
|               {3} | 20a+29b 24a2-17ab+9b2  |                                |
|               {3} | 10a-19b 30a2-48ab-7b2  |                                |
|               {3} | 32a-36b 19a2-11ab-21b2 |                                |
|                                                                             |
|          3                                2                                 |
|     1 : S  <---------------------------- S  : 1                             |
|               {5} | 20a+21b 24a-36b  |                                      |
|               {5} | -10a+9b -30a-29b |                                      |
|               {5} | 32a-7b  19a+19b  |                                      |
|                                                                             |
|o7 : ZZdFactorizationMap                                                     |
+-----------------------------------------------------------------------------+
|i8 : Cf = cone f                                                             |
|                                                                             |
|      5      5      5                                                        |
|o8 = S  <-- S  <-- S                                                         |
|                                                                             |
|     0      1      0                                                         |
|                                                                             |
|o8 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i9 : dd^Cf                                                                   |
|                                                                             |
|          5                                                  5               |
|o9 = 1 : S  <---------------------------------------------- S  : 0           |
|               {4} | a       b2             0   0   0   |                    |
|               {4} | -b      a2             0   0   0   |                    |
|               {3} | 20a+29b 24a2-17ab+9b2  -a2 -b2 -ab |                    |
|               {3} | 10a-19b 30a2-48ab-7b2  -ab a2  -b2 |                    |
|               {3} | 32a-36b 19a2-11ab-21b2 b2  -ab -a2 |                    |
|                                                                             |
|          5                                         5                        |
|     0 : S  <------------------------------------- S  : 1                    |
|               {2} | a2      -b2      0  0  0  |                             |
|               {3} | b       a        0  0  0  |                             |
|               {5} | 20a+21b 24a-36b  -a 0  b  |                             |
|               {5} | -10a+9b -30a-29b -b a  0  |                             |
|               {5} | 32a-7b  19a+19b  0  -b -a |                             |
|                                                                             |
|o9 : ZZdFactorizationMap                                                     |
+-----------------------------------------------------------------------------+
|i10 : isdFactorization Cf                                                    |
|                                                                             |
|              3    3                                                         |
|o10 = (true, a  + b )                                                        |
|                                                                             |
|o10 : Sequence                                                               |
+-----------------------------------------------------------------------------+
|i11 : cone inducedMap(coker f, target f)                                     |
|                                                                             |
|o11 = cokernel {3} | 0       0        | <-- cokernel {5} | 0                 |
|               {3} | 0       0        |              {5} | 0                 |
|               {3} | 0       0        |              {5} | 0                 |
|               {5} | 20a+21b 24a-36b  |              {3} | 20a+29b           |
|               {5} | -10a+9b -30a-29b |              {3} | 10a-19b           |
|               {5} | 32a-7b  19a+19b  |              {3} | 32a-36b           |
|                                                                             |
|      0                                     1                                |
|                                                                             |
|o11 : ZZdFactorization                                                       |
|-----------------------------------------------------------------------------|
|0              | <-- cokernel {3} | 0       0        |                       |
|0              |              {3} | 0       0        |                       |
|0              |              {3} | 0       0        |                       |
|24a2-17ab+9b2  |              {5} | 20a+21b 24a-36b  |                       |
|30a2-48ab-7b2  |              {5} | -10a+9b -30a-29b |                       |
|19a2-11ab-21b2 |              {5} | 32a-7b  19a+19b  |                       |
|                                                                             |
|                     0                                                       |
+-----------------------------------------------------------------------------+
|i12 : isdFactorization oo                                                    |
|                                                                             |
|              3    3                                                         |
|o12 = (true, a  + b )                                                        |
|                                                                             |
|o12 : Sequence                                                               |
+-----------------------------------------------------------------------------+

The mapping cone fits into a canonical short exact sequence of factorizations:
$$0 \to C \to \operatorname{cone}(f) \to B[1] \to 0.$$

See also
========

  * Making ZZdFactorizations -- Information
    about the basic constructors
  * Making maps between factorizations
    -- information about the basic constructors
  * isQuasiIsomorphism (Complexes), --
    whether a map of complexes is a quasi-isomorphism
  * isShortExactSequence (Complexes),
    -- whether a chain complex is a short exact sequence

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

  * cone(ZZdFactorizationMap) -- make the
    mapping cone of a morphism of ZZ/d-graded factorizations
-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:4485:0.

degree(ZZdFactorizationMap) -- get the degree of a map of ZZ/d-graded factorizations
************************************************************************************

  * Function: degree (Macaulay2Doc),
  * Usage:
        degree f
  * Inputs:
      * f, a map of ZZ/d-graded factorizations,
  * Outputs:
      * an integer (Macaulay2Doc),

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

A ZZ/d-graded factorization map $f : C \to D$ of degree $d$ is a sequence of of
maps $f_i : C_i \to D_{i+d}$. This method returns $d$.

The degree of the differential of a factorization is always -1.

+--------------------------------------+
|i1 : S = ZZ/101[a,b,c];               |
+--------------------------------------+
|i2 : F = randomTailMF(a^3 + b^3 + c^3)|
|                                      |
|      6      6      6                 |
|o2 = S  <-- S  <-- S                  |
|                                      |
|     0      1      0                  |
|                                      |
|o2 : ZZdFactorization                 |
+--------------------------------------+
|i3 : assert(degree dd^F == -1)        |
+--------------------------------------+
+----------------------------------------------------------------+
|i4 : R = S/(a^2+b^2+c^2);                                       |
+----------------------------------------------------------------+
|i5 : m = ideal vars R                                           |
|                                                                |
|o5 = ideal (a, b, c)                                            |
|                                                                |
|o5 : Ideal of R                                                 |
+----------------------------------------------------------------+
|i6 : C = tailMF m                                               |
|                                                                |
|      4      4      4                                           |
|o6 = S  <-- S  <-- S                                            |
|                                                                |
|     0      1      0                                            |
|                                                                |
|o6 : ZZdFactorization                                           |
+----------------------------------------------------------------+
|i7 : D = tailMF (m^2)                                           |
|                                                                |
|      8      8      8                                           |
|o7 = S  <-- S  <-- S                                            |
|                                                                |
|     0      1      0                                            |
|                                                                |
|o7 : ZZdFactorization                                           |
+----------------------------------------------------------------+
|i8 : f = randomFactorizationMap(C, D, Cycle=>true, Degree => -1)|
|                                                                |
|          4                                               8     |
|o8 = 1 : S  <------------------------------------------- S  : 0 |
|               {4} | 30  30  42  -24 27  30  1   33  |          |
|               {4} | -27 12  47  -30 30  -24 38  28  |          |
|               {4} | 30  1   33  -27 -24 -30 -30 -42 |          |
|               {4} | 24  -38 -28 30  30  -27 12  47  |          |
|                                                                |
|          4                                              8      |
|     0 : S  <------------------------------------------ S  : 1  |
|               {3} | 30  27 -12 -47 -30 -24 38  28  |           |
|               {3} | 24  30 1   33  27  30  30  42  |           |
|               {3} | -27 30 30  42  24  -30 -1  -33 |           |
|               {3} | -30 24 -38 -28 -30 27  -12 -47 |           |
|                                                                |
|o8 : ZZdFactorizationMap                                        |
+----------------------------------------------------------------+
|i9 : assert(degree f == -1)                                     |
+----------------------------------------------------------------+

See also
========

  * Basic invariants and properties, --
    information about accessing basic features
  * source(ZZdFactorizationMap) -- get
    the source of a map of ZZ/d-graded factorizations
  * target(ZZdFactorizationMap) -- get
    the target of a map of ZZ/d-graded factorizations
  * randomFactorizationMap(ZZdFactorization,ZZdFactorization)
    -- a random map of ZZ/d-graded factorizations

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

  * degree(ZZdFactorizationMap) -- get
    the degree of a map of ZZ/d-graded factorizations
-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:2915:0.

differential of a ZZ/d-graded factorization -- get the maps between the terms in a ZZ/d-graded factorization
************************************************************************************************************

  * Usage:
        dd^C
        dd_C
  * Inputs:
      * C, a ZZ/d graded factorization,
  * Outputs:
      * a map of ZZ/d-graded factorizations, a map
        of degree -1

A Z/d-graded factorization is a sequence of modules connected by homomorphisms,
called differentials, such that any d-fold composition of the maps is a scalar
multiple of the identity.

One can access the differential of a factorization as follows.

+-----------------------------------------------------------------------------+
|i1 : R = QQ[a..d]/(c^2-b*d+a^2);                                             |
+-----------------------------------------------------------------------------+
|i2 : m = ideal vars R                                                        |
|                                                                             |
|o2 = ideal (a, b, c, d)                                                      |
|                                                                             |
|o2 : Ideal of R                                                              |
+-----------------------------------------------------------------------------+
|i3 : C = tailMF (m^2)                                                        |
|                                                                             |
|               24               24               24                          |
|o3 = (QQ[a..d])   <-- (QQ[a..d])   <-- (QQ[a..d])                            |
|                                                                             |
|     0                1                0                                     |
|                                                                             |
|o3 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i4 : dd^C                                                                    |
|                                                                             |
|                   24                                                        |
|o4 = 1 : (QQ[a..d])   <------------------------------------------------------|
|                         {6} | a  0  0  -d 0  d  0  0  0  0  0  c  0  0  0  0|
|                         {6} | 0  a  0  0  0  0  0  d  0  0  0  0  0  c  d  0|
|                         {6} | 0  0  a  0  0  0  0  0  d  0  0  0  0  0  c  d|
|                         {6} | 0  0  0  a  0  0  0  0  0  d  0  0  0  0  0  c|
|                         {6} | 0  0  0  0  -a 0  -b 0  -d 0  0  0  0  0  0  0|
|                         {6} | -b 0  0  0  0  -a 0  0  0  -d 0  0  0  0  0  0|
|                         {6} | 0  0  d  0  0  0  -a 0  0  0  0  0  0  0  0  0|
|                         {6} | 0  -b 0  d  0  0  0  -a 0  0  0  0  0  0  0  0|
|                         {6} | 0  0  -b 0  0  0  0  0  -a 0  0  0  0  0  0  0|
|                         {6} | 0  0  0  -b 0  0  0  0  0  -a 0  0  0  0  0  0|
|                         {6} | -d 0  0  0  0  0  c  0  0  0  -a 0  0  0  -d 0|
|                         {6} | c  0  0  0  0  0  0  0  0  0  0  -a 0  0  0  -|
|                         {6} | 0  -d 0  0  0  0  0  0  0  0  0  0  -a 0  0  0|
|                         {6} | 0  c  -d 0  0  0  0  0  0  0  0  0  0  -a 0  0|
|                         {6} | 0  0  c  -d 0  0  0  0  0  0  0  0  0  0  -a 0|
|                         {6} | 0  0  0  c  0  0  0  0  0  0  0  0  0  0  0  -|
|                         {6} | 0  0  0  0  c  -d 0  0  0  0  b  0  0  0  0  0|
|                         {6} | 0  0  0  0  0  c  0  0  0  0  0  b  0  0  0  0|
|                         {6} | 0  0  0  0  0  0  -d 0  0  0  0  0  -c -d 0  0|
|                         {6} | 0  0  0  0  -d 0  0  0  0  0  -c -d 0  0  0  0|
|                         {6} | 0  0  0  0  0  0  c  -d 0  0  0  0  b  0  -d 0|
|                         {6} | 0  0  0  0  0  0  0  c  -d 0  0  0  0  b  0  -|
|                         {6} | 0  0  0  0  0  0  0  0  c  -d 0  0  0  0  b  0|
|                         {6} | 0  0  0  0  0  0  0  0  0  c  0  0  0  0  0  b|
|                                                                             |
|                   24                                                        |
|     0 : (QQ[a..d])   <------------------------------------------------------|
|                         {5} | a  0  0  d  0  d  0  0  0  0  0  c  0  0  0  0|
|                         {5} | 0  a  0  0  0  0  0  d  0  0  0  0  0  c  d  0|
|                         {5} | 0  0  a  0  0  0  0  0  d  0  0  0  0  0  c  d|
|                         {5} | 0  0  0  a  0  0  0  0  0  d  0  0  0  0  0  c|
|                         {5} | 0  0  0  0  -a 0  b  0  d  0  0  0  0  0  0  0|
|                         {5} | -b 0  0  0  0  -a 0  0  0  d  0  0  0  0  0  0|
|                         {5} | 0  0  d  0  0  0  -a 0  0  0  0  0  0  0  0  0|
|                         {5} | 0  -b 0  d  0  0  0  -a 0  0  0  0  0  0  0  0|
|                         {5} | 0  0  -b 0  0  0  0  0  -a 0  0  0  0  0  0  0|
|                         {5} | 0  0  0  -b 0  0  0  0  0  -a 0  0  0  0  0  0|
|                         {5} | -d 0  0  0  0  0  -c 0  0  0  -a 0  0  0  d  0|
|                         {5} | c  0  0  0  0  0  0  0  0  0  0  -a 0  0  0  d|
|                         {5} | 0  -d 0  0  0  0  0  0  0  0  0  0  -a 0  0  0|
|                         {5} | 0  c  -d 0  0  0  0  0  0  0  0  0  0  -a 0  0|
|                         {5} | 0  0  c  -d 0  0  0  0  0  0  0  0  0  0  -a 0|
|                         {5} | 0  0  0  c  0  0  0  0  0  0  0  0  0  0  0  -|
|                         {5} | 0  0  0  0  c  -d 0  0  0  0  b  0  0  0  0  0|
|                         {5} | 0  0  0  0  0  c  0  0  0  0  0  b  0  0  0  0|
|                         {5} | 0  0  0  0  0  0  -d 0  0  0  0  0  -c -d 0  0|
|                         {5} | 0  0  0  0  -d 0  0  0  0  0  -c -d 0  0  0  0|
|                         {5} | 0  0  0  0  0  0  c  -d 0  0  0  0  b  0  -d 0|
|                         {5} | 0  0  0  0  0  0  0  c  -d 0  0  0  0  b  0  -|
|                         {5} | 0  0  0  0  0  0  0  0  c  -d 0  0  0  0  b  0|
|                         {5} | 0  0  0  0  0  0  0  0  0  c  0  0  0  0  0  b|
|                                                                             |
|o4 : ZZdFactorizationMap                                                     |
|-----------------------------------------------------------------------------|
|                                        24                                   |
|----------------------------- (QQ[a..d])   : 0                               |
|  0  0  0  0  0  0  0  0  |                                                  |
|  0  0  0  0  0  0  0  0  |                                                  |
|  0  0  0  0  0  0  0  0  |                                                  |
|  0  0  0  0  0  0  0  0  |                                                  |
|  c  d  0  b  0  0  0  0  |                                                  |
|  0  c  0  0  0  0  0  0  |                                                  |
|  0  0  b  0  c  d  0  0  |                                                  |
|  0  0  0  0  0  c  d  0  |                                                  |
|  0  0  0  0  0  0  c  d  |                                                  |
|  0  0  0  0  0  0  0  c  |                                                  |
|  -d 0  0  -c 0  0  0  0  |                                                  |
|d 0  -d 0  0  0  0  0  0  |                                                  |
|  0  0  -c 0  -d 0  0  0  |                                                  |
|  0  0  0  0  0  -d 0  0  |                                                  |
|  0  0  0  0  0  0  -d 0  |                                                  |
|a 0  0  0  0  0  0  0  -d |                                                  |
|  a  0  0  0  0  0  -d 0  |                                                  |
|  0  a  0  0  0  0  0  -d |                                                  |
|  0  0  a  0  0  0  0  0  |                                                  |
|  0  0  -b a  -c -d 0  0  |                                                  |
|  0  0  0  0  a  0  0  0  |                                                  |
|d 0  0  0  0  0  a  0  0  |                                                  |
|  0  0  0  0  0  0  a  0  |                                                  |
|  0  0  0  0  0  0  0  a  |                                                  |
|                                                                             |
|                                        24                                   |
|----------------------------- (QQ[a..d])   : 1                               |
|  0  0  0  0  0  0  0  0  |                                                  |
|  0  0  0  0  0  0  0  0  |                                                  |
|  0  0  0  0  0  0  0  0  |                                                  |
|  0  0  0  0  0  0  0  0  |                                                  |
|  c  d  0  b  0  0  0  0  |                                                  |
|  0  c  0  0  0  0  0  0  |                                                  |
|  0  0  b  0  c  d  0  0  |                                                  |
|  0  0  0  0  0  c  d  0  |                                                  |
|  0  0  0  0  0  0  c  d  |                                                  |
|  0  0  0  0  0  0  0  c  |                                                  |
|  -d 0  0  -c 0  0  0  0  |                                                  |
|  0  -d 0  0  0  0  0  0  |                                                  |
|  0  0  -c 0  -d 0  0  0  |                                                  |
|  0  0  0  0  0  -d 0  0  |                                                  |
|  0  0  0  0  0  0  -d 0  |                                                  |
|a 0  0  0  0  0  0  0  -d |                                                  |
|  a  0  0  0  0  0  d  0  |                                                  |
|  0  a  0  0  0  0  0  d  |                                                  |
|  0  0  a  0  0  0  0  0  |                                                  |
|  0  0  b  a  c  d  0  0  |                                                  |
|  0  0  0  0  a  0  0  0  |                                                  |
|d 0  0  0  0  0  a  0  0  |                                                  |
|  0  0  0  0  0  0  a  0  |                                                  |
|  0  0  0  0  0  0  0  a  |                                                  |
+-----------------------------------------------------------------------------+
|i5 : assert(dd^C === C.dd)                                                   |
+-----------------------------------------------------------------------------+
|i6 : assert(source dd^C === C)                                               |
+-----------------------------------------------------------------------------+
|i7 : assert(target dd^C === C)                                               |
+-----------------------------------------------------------------------------+
|i8 : assert(degree dd^C === -1)                                              |
+-----------------------------------------------------------------------------+

The composition of the differential with itself should be a scalar multiple of
the identity.

+------------------------------------+
|i9 : (dd^C)^2 == (R.relations)_(0,0)|
|                                    |
|o9 = true                           |
+------------------------------------+

The individual maps between terms are indexed by their source.

+-----------------------------------------------------------------------------+
|i10 : dd^C_2                                                                 |
|                                                                             |
|o10 = {6} | a  0  0  -d 0  d  0  0  0  0  0  c  0  0  0  0  0  0  0  0  0  0 |
|      {6} | 0  a  0  0  0  0  0  d  0  0  0  0  0  c  d  0  0  0  0  0  0  0 |
|      {6} | 0  0  a  0  0  0  0  0  d  0  0  0  0  0  c  d  0  0  0  0  0  0 |
|      {6} | 0  0  0  a  0  0  0  0  0  d  0  0  0  0  0  c  0  0  0  0  0  0 |
|      {6} | 0  0  0  0  -a 0  -b 0  -d 0  0  0  0  0  0  0  c  d  0  b  0  0 |
|      {6} | -b 0  0  0  0  -a 0  0  0  -d 0  0  0  0  0  0  0  c  0  0  0  0 |
|      {6} | 0  0  d  0  0  0  -a 0  0  0  0  0  0  0  0  0  0  0  b  0  c  d |
|      {6} | 0  -b 0  d  0  0  0  -a 0  0  0  0  0  0  0  0  0  0  0  0  0  c |
|      {6} | 0  0  -b 0  0  0  0  0  -a 0  0  0  0  0  0  0  0  0  0  0  0  0 |
|      {6} | 0  0  0  -b 0  0  0  0  0  -a 0  0  0  0  0  0  0  0  0  0  0  0 |
|      {6} | -d 0  0  0  0  0  c  0  0  0  -a 0  0  0  -d 0  -d 0  0  -c 0  0 |
|      {6} | c  0  0  0  0  0  0  0  0  0  0  -a 0  0  0  -d 0  -d 0  0  0  0 |
|      {6} | 0  -d 0  0  0  0  0  0  0  0  0  0  -a 0  0  0  0  0  -c 0  -d 0 |
|      {6} | 0  c  -d 0  0  0  0  0  0  0  0  0  0  -a 0  0  0  0  0  0  0  -d|
|      {6} | 0  0  c  -d 0  0  0  0  0  0  0  0  0  0  -a 0  0  0  0  0  0  0 |
|      {6} | 0  0  0  c  0  0  0  0  0  0  0  0  0  0  0  -a 0  0  0  0  0  0 |
|      {6} | 0  0  0  0  c  -d 0  0  0  0  b  0  0  0  0  0  a  0  0  0  0  0 |
|      {6} | 0  0  0  0  0  c  0  0  0  0  0  b  0  0  0  0  0  a  0  0  0  0 |
|      {6} | 0  0  0  0  0  0  -d 0  0  0  0  0  -c -d 0  0  0  0  a  0  0  0 |
|      {6} | 0  0  0  0  -d 0  0  0  0  0  -c -d 0  0  0  0  0  0  -b a  -c -d|
|      {6} | 0  0  0  0  0  0  c  -d 0  0  0  0  b  0  -d 0  0  0  0  0  a  0 |
|      {6} | 0  0  0  0  0  0  0  c  -d 0  0  0  0  b  0  -d 0  0  0  0  0  a |
|      {6} | 0  0  0  0  0  0  0  0  c  -d 0  0  0  0  b  0  0  0  0  0  0  0 |
|      {6} | 0  0  0  0  0  0  0  0  0  c  0  0  0  0  0  b  0  0  0  0  0  0 |
|      -----------------------------------------------------------------------|
|      0  0  |                                                                |
|      0  0  |                                                                |
|      0  0  |                                                                |
|      0  0  |                                                                |
|      0  0  |                                                                |
|      0  0  |                                                                |
|      0  0  |                                                                |
|      d  0  |                                                                |
|      c  d  |                                                                |
|      0  c  |                                                                |
|      0  0  |                                                                |
|      0  0  |                                                                |
|      0  0  |                                                                |
|      0  0  |                                                                |
|      -d 0  |                                                                |
|      0  -d |                                                                |
|      -d 0  |                                                                |
|      0  -d |                                                                |
|      0  0  |                                                                |
|      0  0  |                                                                |
|      0  0  |                                                                |
|      0  0  |                                                                |
|      a  0  |                                                                |
|      0  a  |                                                                |
|                                                                             |
|                       24               24                                   |
|o10 : Matrix (QQ[a..d])   <-- (QQ[a..d])                                     |
+-----------------------------------------------------------------------------+
|i11 : assert(source dd^C_2 === C_2)                                          |
+-----------------------------------------------------------------------------+
|i12 : assert(target dd^C_2 === C_1)                                          |
+-----------------------------------------------------------------------------+

See also
========

  * Making maps between ZZ/d-graded factorizations
    -- information about the basic constructors
  * ZZdFactorizationMap _ ZZ -- access
    individual matrices in a ZZ/d-graded factorization map
  * ZZdFactorization _ ZZ -- access individual
    object in a ZZ/d-graded factorization
  * source(ZZdFactorizationMap) -- get
    the source of a map of ZZ/d-graded factorizations
  * target(ZZdFactorizationMap) -- get
    the target of a map of ZZ/d-graded factorizations
  * degree(ZZdFactorizationMap) -- get
    the degree of a map of ZZ/d-graded factorizations
-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:926:0.

directSum(ZZdFactorization) -- direct sum of ZZ/d-graded factorizations
***********************************************************************

  * Function: directSum (Macaulay2Doc),
  * Usage:
        D = C1 ++ C2
        D = directSum(C1,C2,...)
        D = directSum(name1 => C1, name2 => C2, ...)
  * Inputs:
      * Ci, a ZZ/d graded factorization,
  * Outputs:
      * D, a ZZ/d graded factorization, the direct sum
        of the input ZZ/d-graded factorizations

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

The direct sum of two factorizations is another factorization, assuming the
inputs factor the same ring element. The differentials are simply the direct
sum of the constituent differentials.

+-----------------------------------------------------------------------------+
|i1 : S = ZZ/101[x,y];                                                        |
+-----------------------------------------------------------------------------+
|i2 : C1 = randomLinearMF(2,S)                                                |
|                                                                             |
|      4      4      4                                                        |
|o2 = S  <-- S  <-- S                                                         |
|                                                                             |
|     0      1      0                                                         |
|                                                                             |
|o2 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i3 : C2 = randomLinearMF(2,S)                                                |
|                                                                             |
|      4      4      4                                                        |
|o3 = S  <-- S  <-- S                                                         |
|                                                                             |
|     0      1      0                                                         |
|                                                                             |
|o3 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i4 : C12 = C1 ++ C2                                                          |
|                                                                             |
|      8      8      8                                                        |
|o4 = S  <-- S  <-- S                                                         |
|                                                                             |
|     0      1      0                                                         |
|                                                                             |
|o4 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i5 : potential(C1) == potential(C2)                                          |
|                                                                             |
|o5 = false                                                                   |
+-----------------------------------------------------------------------------+
|i6 : isdFactorization(C12)                                                   |
|                                                                             |
|o6 = (false, no potential)                                                   |
|                                                                             |
|o6 : Sequence                                                                |
+-----------------------------------------------------------------------------+
|i7 : C12.dd^2                                                                |
|                                                                             |
|          8                                                                  |
|o7 = 0 : S  <----------------------------------------------------------------|
|               {3} | 24x2-36xy-30y2 0              0              0          |
|               {3} | 0              24x2-36xy-30y2 0              0          |
|               {3} | 0              0              24x2-36xy-30y2 0          |
|               {3} | 0              0              0              24x2-36xy-3|
|               {3} | 0              0              0              0          |
|               {3} | 0              0              0              0          |
|               {3} | 0              0              0              0          |
|               {3} | 0              0              0              0          |
|                                                                             |
|          8                                                                  |
|     1 : S  <----------------------------------------------------------------|
|               {3} | 24x2-36xy-30y2 0              0              0          |
|               {3} | 0              24x2-36xy-30y2 0              0          |
|               {3} | 0              0              24x2-36xy-30y2 0          |
|               {3} | 0              0              0              24x2-36xy-3|
|               {3} | 0              0              0              0          |
|               {3} | 0              0              0              0          |
|               {3} | 0              0              0              0          |
|               {3} | 0              0              0              0          |
|                                                                             |
|o7 : ZZdFactorizationMap                                                     |
|-----------------------------------------------------------------------------|
|                                                                         8   |
|----------------------------------------------------------------------- S  : |
|    0               0               0               0               |        |
|    0               0               0               0               |        |
|    0               0               0               0               |        |
|0y2 0               0               0               0               |        |
|    -29x2+19xy+19y2 0               0               0               |        |
|    0               -29x2+19xy+19y2 0               0               |        |
|    0               0               -29x2+19xy+19y2 0               |        |
|    0               0               0               -29x2+19xy+19y2 |        |
|                                                                             |
|                                                                         8   |
|----------------------------------------------------------------------- S  : |
|    0               0               0               0               |        |
|    0               0               0               0               |        |
|    0               0               0               0               |        |
|0y2 0               0               0               0               |        |
|    -29x2+19xy+19y2 0               0               0               |        |
|    0               -29x2+19xy+19y2 0               0               |        |
|    0               0               -29x2+19xy+19y2 0               |        |
|    0               0               0               -29x2+19xy+19y2 |        |
|-----------------------------------------------------------------------------|
|0                                                                            |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|1                                                                            |
+-----------------------------------------------------------------------------+

As we can see in the above example, the problem stems from the fact that the
direct sum of matrix factorizations with different potentials is no longer a
matrix factorization. Constructing factorizations with the same potential will
solve this:

+------------------------------------+
|i8 : Q = ZZ/101[x,y]                |
|                                    |
|o8 = Q                              |
|                                    |
|o8 : PolynomialRing                 |
+------------------------------------+
|i9 : f = x^3+y^3;                   |
+------------------------------------+
|i10 : R = Q/(f)                     |
|                                    |
|o10 = R                             |
|                                    |
|o10 : QuotientRing                  |
+------------------------------------+
|i11 : m = ideal vars R              |
|                                    |
|o11 = ideal (x, y)                  |
|                                    |
|o11 : Ideal of R                    |
+------------------------------------+
|i12 : F1 = tailMF m                 |
|                                    |
|       2      2      2              |
|o12 = Q  <-- Q  <-- Q               |
|                                    |
|      0      1      0               |
|                                    |
|o12 : ZZdFactorization              |
+------------------------------------+
|i13 : F2 = tailMF (m^2)             |
|                                    |
|       3      3      3              |
|o13 = Q  <-- Q  <-- Q               |
|                                    |
|      0      1      0               |
|                                    |
|o13 : ZZdFactorization              |
+------------------------------------+
|i14 : potential(F1) == potential(F2)|
|                                    |
|o14 = true                          |
+------------------------------------+
|i15 : F12 = F1++ F2                 |
|                                    |
|       5      5      5              |
|o15 = Q  <-- Q  <-- Q               |
|                                    |
|      0      1      0               |
|                                    |
|o15 : ZZdFactorization              |
+------------------------------------+
|i16 : isdFactorization F12          |
|                                    |
|              3    3                |
|o16 = (true, x  + y )               |
|                                    |
|o16 : Sequence                      |
+------------------------------------+

The direct sum is an n-ary operator with projection and inclusion maps from
each component satisfying appropriate identities.

+--------------------------------------------------------------+
|i17 : C4 = directSum(first => F1, second => F2)               |
|                                                              |
|       5      5      5                                        |
|o17 = Q  <-- Q  <-- Q                                         |
|                                                              |
|      0      1      0                                         |
|                                                              |
|o17 : ZZdFactorization                                        |
+--------------------------------------------------------------+
|i18 : C4_[first] -- inclusion map C1 --> C4                   |
|                                                              |
|           5                   2                              |
|o18 = 0 : Q  <--------------- Q  : 0                          |
|                {2} | 1 0 |                                   |
|                {3} | 0 1 |                                   |
|                {3} | 0 0 |                                   |
|                {3} | 0 0 |                                   |
|                {3} | 0 0 |                                   |
|                                                              |
|           5                   2                              |
|      1 : Q  <--------------- Q  : 1                          |
|                {4} | 1 0 |                                   |
|                {4} | 0 1 |                                   |
|                {5} | 0 0 |                                   |
|                {5} | 0 0 |                                   |
|                {5} | 0 0 |                                   |
|                                                              |
|o18 : ZZdFactorizationMap                                     |
+--------------------------------------------------------------+
|i19 : C4^[first] -- projection map C4 --> C1                  |
|                                                              |
|           2                         5                        |
|o19 = 0 : Q  <--------------------- Q  : 0                    |
|                {2} | 1 0 0 0 0 |                             |
|                {3} | 0 1 0 0 0 |                             |
|                                                              |
|           2                         5                        |
|      1 : Q  <--------------------- Q  : 1                    |
|                {4} | 1 0 0 0 0 |                             |
|                {4} | 0 1 0 0 0 |                             |
|                                                              |
|o19 : ZZdFactorizationMap                                     |
+--------------------------------------------------------------+
|i20 : C4^[first] * C4_[first] == 1                            |
|                                                              |
|o20 = true                                                    |
+--------------------------------------------------------------+
|i21 : C4^[second] * C4_[second] == 1                          |
|                                                              |
|o21 = true                                                    |
+--------------------------------------------------------------+
|i22 : C4^[first] * C4_[second] == 0                           |
|                                                              |
|o22 = true                                                    |
+--------------------------------------------------------------+
|i23 : C4^[second] * C4_[first] == 0                           |
|                                                              |
|o23 = true                                                    |
+--------------------------------------------------------------+
|i24 : C4_[first] * C4^[first] + C4_[second] * C4^[second] == 1|
|                                                              |
|o24 = true                                                    |
+--------------------------------------------------------------+

There are two short exact sequences associated to a direct sum.

+---------------------------------------------------+
|i25 : isShortExactSequence(C4^[first], C4_[second])|
|                                                   |
|o25 = true                                         |
+---------------------------------------------------+
|i26 : isShortExactSequence(C4^[second], C4_[first])|
|                                                   |
|o26 = true                                         |
+---------------------------------------------------+

Given a factorization which is a direct sum, we obtain the component complexes
and their names (indices) as follows (even if the resulting factorization is
not well-defined, we can still obtain the components).

+------------------------------------------+
|i27 : components C12                      |
|                                          |
|        4      4      4   4      4      4 |
|o27 = {S  <-- S  <-- S , S  <-- S  <-- S }|
|                                          |
|       0      1      0   0      1      0  |
|                                          |
|o27 : List                                |
+------------------------------------------+
|i28 : indices C12                         |
|                                          |
|o28 = {0, 1}                              |
|                                          |
|o28 : List                                |
+------------------------------------------+
|i29 : components C4                       |
|                                          |
|        2      2      2   3      3      3 |
|o29 = {Q  <-- Q  <-- Q , Q  <-- Q  <-- Q }|
|                                          |
|       0      1      0   0      1      0  |
|                                          |
|o29 : List                                |
+------------------------------------------+
|i30 : indices C4                          |
|                                          |
|o30 = {first, second}                     |
|                                          |
|o30 : List                                |
+------------------------------------------+

See also
========

  * components(ZZdFactorization), --
    list the components of a direct sum
  * indices (Macaulay2Doc) -- indices of a polynomial; also
    components for a direct sum
  * ZZdFactorization ^ Array -- the
    canonical inclusion or projection map of a direct sum
  * ZZdFactorization _ Array -- the
    canonical inclusion or projection map of a direct sum
  * isShortExactSequence(ZZdFactorizationMap,ZZdFactorizationMap),
    --
    whether a pair of ZZ/d-graded factorization maps forms a short exact
    sequence
  * sum(Complex) (Complexes) -- make the direct sum of
    all terms

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

  * directSum(ZZdFactorization), --
    direct sum of ZZ/d-graded factorizations
-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:1195:0.

dual(ZZdFactorization) -- make the dual of a ZZ/d-graded factorization
**********************************************************************

  * Function: dual (Macaulay2Doc),
  * Usage:
        dual C
  * Inputs:
      * C, a ZZ/d graded factorization,
  * Outputs:
      * a ZZ/d graded factorization,

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

The dual of a ZZ/d-graded factorization $C$ is by definition $Hom(C, R)$, where
$R$ is the ring of $C$. If $C$ is a factorization of $f$, then the dual of $C$
is a factorization of $-f$.

+--------------------------------+
|i1 : S = ZZ/101[a..d];          |
+--------------------------------+
|i2 : f = a^2+b^2+c^2+d^2;       |
+--------------------------------+
|i3 : R = S/(f)                  |
|                                |
|o3 = R                          |
|                                |
|o3 : QuotientRing               |
+--------------------------------+
|i4 : C1 = tailMF ideal vars R   |
|                                |
|      8      8      8           |
|o4 = S  <-- S  <-- S            |
|                                |
|     0      1      0            |
|                                |
|o4 : ZZdFactorization           |
+--------------------------------+
|i5 : C2 = dual C1               |
|                                |
|      8      8      8           |
|o5 = S  <-- S  <-- S            |
|                                |
|     0      1      0            |
|                                |
|o5 : ZZdFactorization           |
+--------------------------------+
|i6 : isdFactorization C2        |
|                                |
|               2    2    2    2 |
|o6 = (true, - a  - b  - c  - d )|
|                                |
|o6 : Sequence                   |
+--------------------------------+
|i7 : potential C1               |
|                                |
|      2    2    2    2          |
|o7 = a  + b  + c  + d           |
|                                |
|o7 : S                          |
+--------------------------------+
|i8 : potential C2               |
|                                |
|        2    2    2    2        |
|o8 = - a  - b  - c  - d         |
|                                |
|o8 : S                          |
+--------------------------------+

The double dual of a ZZ/2-graded factorization is isomorphic to the original
factorization. If the period of the factorization is $>2$, then one should
adjoin a root of unity to the underlying ring or factorization. This can be
done in a few different ways:

+-----------------------------------------------------------------------------+
|i9 : Q = ZZ/101[a..c];                                                       |
+-----------------------------------------------------------------------------+
|i10 : f = a^3+b^3+c^3                                                        |
|                                                                             |
|       3    3    3                                                           |
|o10 = a  + b  + c                                                            |
|                                                                             |
|o10 : Q                                                                      |
+-----------------------------------------------------------------------------+
|i11 : F = linearMF(f,t) --this syntax automatically adjoins a root           |
|                                                                             |
|      /   Q[t]   \9     /   Q[t]   \9     /   Q[t]   \9     /   Q[t]   \9    |
|o11 = |----------|  <-- |----------|  <-- |----------|  <-- |----------|     |
|      | 2        |      | 2        |      | 2        |      | 2        |     |
|      \t  + t + 1/      \t  + t + 1/      \t  + t + 1/      \t  + t + 1/     |
|                                                                             |
|      0                 1                 2                 0                |
|                                                                             |
|o11 : ZZdFactorization                                                       |
+-----------------------------------------------------------------------------+
|i12 : Fd = dual F                                                            |
|                                                                             |
|      /   Q[t]   \9     /   Q[t]   \9     /   Q[t]   \9     /   Q[t]   \9    |
|o12 = |----------|  <-- |----------|  <-- |----------|  <-- |----------|     |
|      | 2        |      | 2        |      | 2        |      | 2        |     |
|      \t  + t + 1/      \t  + t + 1/      \t  + t + 1/      \t  + t + 1/     |
|                                                                             |
|      0                 1                 2                 0                |
|                                                                             |
|o12 : ZZdFactorization                                                       |
+-----------------------------------------------------------------------------+
|i13 : Fd.dd                                                                  |
|                                                                             |
|          /   Q[t]   \9                                                      |
|o13 = 2 : |----------|  <----------------------------------------------------|
|          | 2        |     {0, -3} | ct+c 0    0    0    0    0    bt+b 0    |
|          \t  + t + 1/     {0, -3} | 0    ct+c 0    0    0    0    at+a -b   |
|                           {0, -3} | 0    0    ct+c 0    0    0    0    at+a |
|                           {0, -3} | bt+b 0    at+a -c   0    0    0    0    |
|                           {0, -3} | at+a -b   0    0    -c   0    0    0    |
|                           {0, -3} | 0    at+a -bt  0    0    -c   0    0    |
|                           {0, -3} | 0    0    0    bt+b 0    at+a -ct  0    |
|                           {0, -3} | 0    0    0    at+a -b   0    0    -ct  |
|                           {0, -3} | 0    0    0    0    at+a -bt  0    0    |
|                                                                             |
|          /   Q[t]   \9                                                      |
|      0 : |----------|  <----------------------------------------------------|
|          | 2        |     {0, -3} | -c 0   0    0   0   0    -b   0    -a   |
|          \t  + t + 1/     {0, -3} | 0  -c  0    0   0   0    -a   -bt  0    |
|                           {0, -3} | 0  0   -c   0   0   0    0    -a   bt+b |
|                           {0, -3} | -b 0   -a   -ct 0   0    0    0    0    |
|                           {0, -3} | -a -bt 0    0   -ct 0    0    0    0    |
|                           {0, -3} | 0  -a  bt+b 0   0   -ct  0    0    0    |
|                           {0, -3} | 0  0   0    -b  0   -a   ct+c 0    0    |
|                           {0, -3} | 0  0   0    -a  -bt 0    0    ct+c 0    |
|                           {0, -3} | 0  0   0    0   -a  bt+b 0    0    ct+c |
|                                                                             |
|          /   Q[t]   \9                                                      |
|      1 : |----------|  <----------------------------------------------------|
|          | 2        |     {0, -3} | -ct 0    0   0    0    0    -bt 0    -at|
|          \t  + t + 1/     {0, -3} | 0   -ct  0   0    0    0    -at bt+b 0  |
|                           {0, -3} | 0   0    -ct 0    0    0    0   -at  -b |
|                           {0, -3} | -bt 0    -at ct+c 0    0    0   0    0  |
|                           {0, -3} | -at bt+b 0   0    ct+c 0    0   0    0  |
|                           {0, -3} | 0   -at  -b  0    0    ct+c 0   0    0  |
|                           {0, -3} | 0   0    0   -bt  0    -at  -c  0    0  |
|                           {0, -3} | 0   0    0   -at  bt+b 0    0   -c   0  |
|                           {0, -3} | 0   0    0   0    -at  -b   0   0    -c |
|                                                                             |
|o13 : ZZdFactorizationMap                                                    |
|-----------------------------------------------------------------------------|
|         /   Q[t]   \9                                                       |
|-------- |----------|  : 0                                                   |
|at+a |   | 2        |                                                        |
|0    |   \t  + t + 1/                                                        |
|-bt  |                                                                       |
|0    |                                                                       |
|0    |                                                                       |
|0    |                                                                       |
|0    |                                                                       |
|0    |                                                                       |
|-ct  |                                                                       |
|                                                                             |
|    /   Q[t]   \9                                                            |
|--- |----------|  : 1                                                        |
||   | 2        |                                                             |
||   \t  + t + 1/                                                             |
||                                                                            |
||                                                                            |
||                                                                            |
||                                                                            |
||                                                                            |
||                                                                            |
||                                                                            |
|                                                                             |
|     /   Q[t]   \9                                                           |
|---- |----------|  : 2                                                       |
| |   | 2        |                                                            |
| |   \t  + t + 1/                                                            |
| |                                                                           |
| |                                                                           |
| |                                                                           |
| |                                                                           |
| |                                                                           |
| |                                                                           |
| |                                                                           |
+-----------------------------------------------------------------------------+
|i14 : potential F                                                            |
|                                                                             |
|       3    3    3                                                           |
|o14 = a  + b  + c                                                            |
|                                                                             |
|         Q[t]                                                                |
|o14 : ----------                                                             |
|       2                                                                     |
|      t  + t + 1                                                             |
+-----------------------------------------------------------------------------+
|i15 : potential dual F                                                       |
|                                                                             |
|         3    3    3                                                         |
|o15 = - a  - b  - c                                                          |
|                                                                             |
|         Q[t]                                                                |
|o15 : ----------                                                             |
|       2                                                                     |
|      t  + t + 1                                                             |
+-----------------------------------------------------------------------------+
|i16 : F' = ZZdfactorization {a,a,a} --no root of unity in this case          |
|                                                                             |
|       1      1      1      1                                                |
|o16 = Q  <-- Q  <-- Q  <-- Q                                                 |
|                                                                             |
|      0      1      2      0                                                 |
|                                                                             |
|o16 : ZZdFactorization                                                       |
+-----------------------------------------------------------------------------+
|i17 : Ft = adjoinRoot(F',t)                                                  |
|                                                                             |
|      /   Q[t]   \1     /   Q[t]   \1     /   Q[t]   \1     /   Q[t]   \1    |
|o17 = |----------|  <-- |----------|  <-- |----------|  <-- |----------|     |
|      | 2        |      | 2        |      | 2        |      | 2        |     |
|      \t  + t + 1/      \t  + t + 1/      \t  + t + 1/      \t  + t + 1/     |
|                                                                             |
|      0                 1                 2                 0                |
|                                                                             |
|o17 : ZZdFactorization                                                       |
+-----------------------------------------------------------------------------+
|i18 : dual Ft                                                                |
|                                                                             |
|      /   Q[t]   \1     /   Q[t]   \1     /   Q[t]   \1     /   Q[t]   \1    |
|o18 = |----------|  <-- |----------|  <-- |----------|  <-- |----------|     |
|      | 2        |      | 2        |      | 2        |      | 2        |     |
|      \t  + t + 1/      \t  + t + 1/      \t  + t + 1/      \t  + t + 1/     |
|                                                                             |
|      0                 1                 2                 0                |
|                                                                             |
|o18 : ZZdFactorization                                                       |
+-----------------------------------------------------------------------------+
|i19 : Fd' = dual(F', t) --this syntax adjoins the root for the user          |
|                                                                             |
|      /   Q[t]   \1     /   Q[t]   \1     /   Q[t]   \1     /   Q[t]   \1    |
|o19 = |----------|  <-- |----------|  <-- |----------|  <-- |----------|     |
|      | 2        |      | 2        |      | 2        |      | 2        |     |
|      \t  + t + 1/      \t  + t + 1/      \t  + t + 1/      \t  + t + 1/     |
|                                                                             |
|      0                 1                 2                 0                |
|                                                                             |
|o19 : ZZdFactorization                                                       |
+-----------------------------------------------------------------------------+
|i20 : Fd'.dd                                                                 |
|                                                                             |
|          /   Q[t]   \1               /   Q[t]   \1                          |
|o20 = 2 : |----------|  <------------ |----------|  : 0                      |
|          | 2        |     | at+a |   | 2        |                           |
|          \t  + t + 1/                \t  + t + 1/                           |
|                                                                             |
|          /   Q[t]   \1             /   Q[t]   \1                            |
|      0 : |----------|  <---------- |----------|  : 1                        |
|          | 2        |     | -a |   | 2        |                             |
|          \t  + t + 1/              \t  + t + 1/                             |
|                                                                             |
|          /   Q[t]   \1              /   Q[t]   \1                           |
|      1 : |----------|  <----------- |----------|  : 2                       |
|          | 2        |     | -at |   | 2        |                            |
|          \t  + t + 1/               \t  + t + 1/                            |
|                                                                             |
|o20 : ZZdFactorizationMap                                                    |
+-----------------------------------------------------------------------------+

See also
========

  * Hom(ZZdFactorization,ZZdFactorization)
    -- the ZZ/d-graded
    homomorphism factorization between two ZZ/d-graded factorizations
  * dual(Module) (Macaulay2Doc) -- dual module

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

  * dual(ZZdFactorization) -- make the dual
    of a ZZ/d-graded factorization
  * "dual(ZZdFactorization,RingElement)"
  * "dual(ZZdFactorization,Symbol)"
-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:1853:0.

dual(ZZdFactorizationMap) -- the dual of a map of ZZ/d-graded factorizations
****************************************************************************

  * Function: dual (Macaulay2Doc),
  * Usage:
        h = dual f
  * Inputs:
      * f, a map of ZZ/d-graded factorizations,
  * Outputs:
      * h, a map of ZZ/d-graded factorizations,

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

The map $f : C \to D$ of ZZ/d-graded factorizations over the ring $S$ induces
the map $h = Hom(f, S^1) : Hom(D, S^1) \to Hom(C,S^1)$ defined by $\phi \mapsto
\phi f$.

+----------------------------------------------------------+
|i1 : S = ZZ/101[a,b];                                     |
+----------------------------------------------------------+
|i2 : R = S/(a^3+b^3);                                     |
+----------------------------------------------------------+
|i3 : m = ideal vars R                                     |
|                                                          |
|o3 = ideal (a, b)                                         |
|                                                          |
|o3 : Ideal of R                                           |
+----------------------------------------------------------+
|i4 : C = tailMF m                                         |
|                                                          |
|      2      2      2                                     |
|o4 = S  <-- S  <-- S                                      |
|                                                          |
|     0      1      0                                      |
|                                                          |
|o4 : ZZdFactorization                                     |
+----------------------------------------------------------+
|i5 : D = tailMF (m^2)                                     |
|                                                          |
|      3      3      3                                     |
|o5 = S  <-- S  <-- S                                      |
|                                                          |
|     0      1      0                                      |
|                                                          |
|o5 : ZZdFactorization                                     |
+----------------------------------------------------------+
|i6 : f = randomFactorizationMap(C,D)                      |
|                                                          |
|          2                                         3     |
|o6 = 0 : S  <------------------------------------- S  : 0 |
|               {2} | 24a-36b -29a+19b -10a-29b |          |
|               {3} | -30     19       -8       |          |
|                                                          |
|          2                                          3    |
|     1 : S  <-------------------------------------- S  : 1|
|               {4} | -22a-29b -16a+39b 19a-47b  |         |
|               {4} | -24a-38b 21a+34b  -39a-18b |         |
|                                                          |
|o6 : ZZdFactorizationMap                                  |
+----------------------------------------------------------+
|i7 : h = dual f                                           |
|                                                          |
|          3                                  2            |
|o7 = 0 : S  <------------------------------ S  : 0        |
|               {-3} | -22a-29b -24a-38b |                 |
|               {-3} | -16a+39b 21a+34b  |                 |
|               {-3} | 19a-47b  -39a-18b |                 |
|                                                          |
|          3                             2                 |
|     1 : S  <------------------------- S  : 1             |
|               {-5} | 24a-36b  -30 |                      |
|               {-5} | -29a+19b 19  |                      |
|               {-5} | -10a-29b -8  |                      |
|                                                          |
|o7 : ZZdFactorizationMap                                  |
+----------------------------------------------------------+
|i8 : assert isWellDefined h                               |
+----------------------------------------------------------+

This routine is functorial.

+-----------------------------------------------------------+
|i9 : D' = tailMF (trim m^3)                                |
|                                                           |
|      3      3      3                                      |
|o9 = S  <-- S  <-- S                                       |
|                                                           |
|     0      1      0                                       |
|                                                           |
|o9 : ZZdFactorization                                      |
+-----------------------------------------------------------+
|i10 : f' = randomFactorizationMap(D, D')                   |
|                                                           |
|           3                                          3    |
|o10 = 0 : S  <-------------------------------------- S  : 0|
|                {3} | -13a-43b 2a+16b   -47a+47b |         |
|                {3} | -15a-28b 22a+45b  19a-16b  |         |
|                {3} | -47a+38b -34a-48b 7a+15b   |         |
|                                                           |
|           3                                        3      |
|      1 : S  <------------------------------------ S  : 1  |
|                {5} | -23a+39b 36a+35b 11a+46b |           |
|                {5} | 43a-17b  11a-38b -28a+b  |           |
|                {5} | -11a+48b 33a+40b -3a+22b |           |
|                                                           |
|o10 : ZZdFactorizationMap                                  |
+-----------------------------------------------------------+
|i11 : dual(f * f') == dual f' * dual f                     |
|                                                           |
|o11 = true                                                 |
+-----------------------------------------------------------+

See also
========

  * Hom(ZZdFactorizationMap,ZZdFactorizationMap)
    -- the map of
    factorizations between Hom complexes
  * randomFactorizationMap(ZZdFactorization,ZZdFactorization)
    -- a random map of ZZ/d-graded factorizations
  * dual(Matrix) (Macaulay2Doc) -- dual of a map

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

  * dual(ZZdFactorizationMap) -- the dual
    of a map of ZZ/d-graded factorizations
-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:3662:0.

dual(ZZdFactorizationMap,RingElement) -- the dual of a map of ZZ/d-graded factorizations
****************************************************************************************

  * Function: dual (Macaulay2Doc),
  * Usage:
        h = dual(f,t)
  * Inputs:
      * f, a map of ZZ/d-graded factorizations,
      * t, a ring element (Macaulay2Doc), optional input
        specifying the symbol used to represent the distinguished root of
        unity, required only if the underlying ring does not have a specified
        root of unity and the period is > 2
  * Outputs:
      * h, a map of ZZ/d-graded factorizations,

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

The map $f : C \to D$ of ZZ/d-graded factorizations over the ring $S$ induces
the map $h = Hom(f, S^1) : Hom(D, S^1) \to Hom(C,S^1)$ defined by $\phi \mapsto
\phi f$. If the period of the factorization is >2, then there must be a root of
unity adjoined in order for the dual to be defined.

The dual is a factorization of the negative of the potential.

+-----------------------------------------------------------------------------+
|i1 : S = ZZ/101[a..c]                                                        |
|                                                                             |
|o1 = S                                                                       |
|                                                                             |
|o1 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i2 : C = linearMF(a^3+b^3, t)                                                |
|                                                                             |
|     /   S[t]   \3     /   S[t]   \3     /   S[t]   \3     /   S[t]   \3     |
|o2 = |----------|  <-- |----------|  <-- |----------|  <-- |----------|      |
|     | 2        |      | 2        |      | 2        |      | 2        |      |
|     \t  + t + 1/      \t  + t + 1/      \t  + t + 1/      \t  + t + 1/      |
|                                                                             |
|     0                 1                 2                 0                 |
|                                                                             |
|o2 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i3 : St = ring C;                                                            |
+-----------------------------------------------------------------------------+
|i4 : D = (koszulComplex {a,b})**St                                           |
|                                                                             |
|       1       2       1                                                     |
|o4 = St  <-- St  <-- St                                                      |
|                                                                             |
|     0       1       2                                                       |
|                                                                             |
|o4 : Complex                                                                 |
+-----------------------------------------------------------------------------+
|i5 : f = randomFactorizationMap(C,D**C, Cycle => true)                       |
|                                                                             |
|           3                                                                 |
|o5 = 0 : St  <---------------------------------------------------------------|
|                {0, 2} | 0 0 0 (21a+47b)t+29a-7b -14bt+41b          (-4a-8b)t|
|                {0, 2} | 0 0 0 (9a+6b)t+7a-46b   (-35a+47b)t-25a-7b -44bt+27b|
|                {0, 2} | 0 0 0 -30bt+11b         (-5a+2b)t-28a-8b   (-33a+47b|
|                                                                             |
|           3                                                                 |
|     1 : St  <---------------------------------------------------------------|
|                {0, 2} | 0 0 0 (-37a+47b)t+33a-47b -41bt+46b         (-23a-8b|
|                {0, 2} | 0 0 0 (25a+6b)t+4a-46b    (8a+47b)t-21a-47b -27bt+30|
|                {0, 2} | 0 0 0 -11bt-41b           (-2a+2b)t-9a-8b   (10a+47b|
|                                                                             |
|           3                                                                 |
|     2 : St  <---------------------------------------------------------------|
|                {0, 2} | 0 0 0 (25a+7b)t-10a-47b -46bt+14b          (-7a-8b)t|
|                {0, 2} | 0 0 0 (28a+6b)t+23a-46b (-31a+7b)t+37a-47b -30bt+44b|
|                {0, 2} | 0 0 0 41bt+30b          (-21a+2b)t-25a-8b  (-29a+7b)|
|                                                                             |
|o5 : ZZdFactorizationMap                                                     |
|-----------------------------------------------------------------------------|
|                                                                             |
|-----------------------------------------------------------------------------|
|+21a-47b  (39a-10b-27c)t+15a-4b+8c    (-10a-29b-8c)t+29a-19b-19c (46a+27b+50c|
|          (-48a-47b+47c)t-46a-27b-50c (39a-10b-27c)t+15a-4b+8c   (-29a+19b+19|
|)t+31a-7b (39a+10b-11c)t+10a+29b+8c   (2a+20b+4c)t+48a+47b-47c   (39a-10b-27c|
|                                                                             |
|                                                                             |
|-----------------------------------------------------------------------------|
|)t+5a-47b  (-24a+6b+35c)t-39a+10b+27c  (-29a+19b+19c)t-39a-10b+11c (46a+27b+5|
|b          (-48a-47b+47c)t-46a-27b-50c (-24a+6b+35c)t-39a+10b+27c  (39a+10b-1|
|)t+35a-47b (-10a-29b-8c)t+29a-19b-19c  (2a+20b+4c)t+48a+47b-47c    (-24a+6b+3|
|                                                                             |
|                                                                             |
|-----------------------------------------------------------------------------|
|+2a-47b  (-15a+4b-8c)t+24a-6b-35c    (39a+10b-11c)t+10a+29b+8c (46a+27b+50c)t|
|         (-48a-47b+47c)t-46a-27b-50c (-15a+4b-8c)t+24a-6b-35c  (-10a-29b-8c)t|
|t-8a-47b (-29a+19b+19c)t-39a-10b+11c (2a+20b+4c)t+48a+47b-47c  (-15a+4b-8c)t+|
|-----------------------------------------------------------------------------|
|                                                                             |
|-----------------------------------------------------------------------------|
|)t-2a-20b-4c    (49a2+33ab-36b2-44ac+40bc+26c2-7a-35b+19c)t+48a2+36ab+11b2+35|
|c)t-39a-10b+11c (7a2-ab-13b2-16ac-43bc-15c2-19a-38b-39c)t-19a+25b+16c        |
|)t+15a-4b+8c    (22a-15b-34c)t-7a2+39ab-b2+23ac-41bc+17c2-16a-38b-30c        |
|                                                                             |
|                                                                             |
|-----------------------------------------------------------------------------|
|0c)t-2a-20b-4c   (-48a2-36ab-11b2-35ac+38bc-33c2+20a-44b-11c)t+a2-3ab-47b2+22|
|1c)t+10a+29b+8c  (47a2+39ab+13b2+18ac+43bc+15c2+2a+17b-46c)t+47a2+39ab+13b2+1|
|5c)t-39a+10b+27c (22a+45b-34c)t-7a2+39ab-b2+23ac-41bc+17c2-16a+33b-30c       |
|                                                                             |
|                                                                             |
|-----------------------------------------------------------------------------|
|-2a-20b-4c   (-a2+3ab+47b2-22ac+23bc+7c2+31a-22b-8c)t-49a2-33ab+36b2+44ac-40b|
|+29a-19b-19c (-47a2+38ab+2ac+42a+24b-16c)t+7a2-ab-13b2-16ac-43bc-15c2+5a+32b+|
|24a-6b-35c   (-18a-26b-34c)t-7a2+39ab-b2+23ac-41bc+17c2-16a+22b-30c          |
|-----------------------------------------------------------------------------|
|                                                                             |
|-----------------------------------------------------------------------------|
|ac-38bc+33c2-a-3b+11c (7a2-39ab+b2-23ac+41bc-17c2+18a+44b+34c)t+7a2+15ab+39b2|
|                      (49a2+33ab-36b2-44ac+40bc+26c2-31a-18b+8c)t+48a2+36ab+1|
|                      (-7a2+ab+13b2+16ac+43bc+15c2-20a-19b+47c)t+47a2+39ab+13|
|                                                                             |
|                                                                             |
|-----------------------------------------------------------------------------|
|ac-23bc-7c2-9a-25b+8c     (7a2-39ab+b2-23ac+41bc-17c2+18a-43b+34c)t+7a2+15ab+|
|8ac+43bc+15c2+12a-14b+39c (-48a2-36ab-11b2-35ac+38bc-33c2-9a-26b-19c)t+a2-3ab|
|                          (-43a+38b-43c)t+7a2-ab-13b2-16ac-43bc-15c2+15a+21b-|
|                                                                             |
|                                                                             |
|-----------------------------------------------------------------------------|
|c-26c2-31a+28b-19c (7a2-39ab+b2-23ac+41bc-17c2+18a-2b+34c)t+7a2+15ab+39b2-23a|
|46c                (-a2+3ab+47b2-22ac+23bc+7c2-20a+44b+11c)t-49a2-33ab+36b2+4|
|                   (-47a2-39ab-13b2-18ac-43bc-15c2-36a-7b-4c)t-49a-36b+43c   |
|-----------------------------------------------------------------------------|
|                                                                             |
|-----------------------------------------------------------------------------|
|-23ac+43bc-17c2+46a-45b+50c    (34a+50b+50c)t-47a2-39ab-13b2-18ac-43bc-15c2+3|
|1b2+35ac-38bc+33c2-29a+19b+19c (-7a2-15ab-39b2+23ac-43bc+17c2-40a-27b)t+31a+9|
|b2+18ac+43bc+15c2-40a+9b+4c    (49a2+33ab-36b2-44ac+40bc+26c2)t+48a2+36ab+11b|
|                                                                             |
|                                                                             |
|-----------------------------------------------------------------------------|
|39b2-23ac+43bc-17c2-15a+15b+50c (-47a2-39ab-13b2-18ac-43bc-15c2-22a-8b-31c)t+|
|-47b2+22ac-23bc-7c2+23a+10b-11c (-7a2-15ab-39b2+23ac-43bc+17c2)t-30a-21b-20c |
|47c                             (-48a2-36ab-11b2-35ac+38bc-33c2)t+a2-3ab-47b2|
|                                                                             |
|                                                                             |
|-----------------------------------------------------------------------------|
|c+43bc-17c2-15a-31b+50c  (-7a2+ab+13b2+16ac+43bc+15c2-39a+13b-19c)t-7a2+ab+13|
|4ac-40bc-26c2-10a-29b-8c (-7a2-15ab-39b2+23ac-43bc+17c2-40a+30b)t+31a+36b-20c|
|                         (-a2+3ab+47b2-22ac+23bc+7c2+16a)t-49a2-33ab+36b2+44a|
|-----------------------------------------------------------------------------|
|                               12                                            |
|---------------------------- St   : 0                                        |
|7a+34b+19c               |                                                   |
|b-20c                    |                                                   |
|2+35ac-38bc+33c2+19a-47b |                                                   |
|                                                                             |
|                               12                                            |
|---------------------------- St   : 1                                        |
|47a2-38ab-2ac+35a-3b-50c |                                                   |
|                         |                                                   |
|+22ac-23bc-7c2-41a-7b    |                                                   |
|                                                                             |
|                                   12                                        |
|-------------------------------- St   : 2                                    |
|b2+16ac+43bc+15c2+4a-46b+31c |                                               |
|                             |                                               |
|c-40bc-26c2-22a-47b          |                                               |
+-----------------------------------------------------------------------------+
|i6 : h = dual f                                                              |
|                                                                             |
|           12                                                                |
|o6 = 0 : St   <--------------------------------------------------------------|
|                 {0, -2} | 0                                                 |
|                 {0, -2} | 0                                                 |
|                 {0, -2} | 0                                                 |
|                 {0, -3} | (21a+47b)t+29a-7b                                 |
|                 {0, -3} | -14bt+41b                                         |
|                 {0, -3} | (-4a-8b)t+21a-47b                                 |
|                 {0, -3} | (39a-10b-27c)t+15a-4b+8c                          |
|                 {0, -3} | (-10a-29b-8c)t+29a-19b-19c                        |
|                 {0, -3} | (46a+27b+50c)t-2a-20b-4c                          |
|                 {0, -4} | (49a2+33ab-36b2-44ac+40bc+26c2-7a-35b+19c)t+48a2+3|
|                 {0, -4} | (7a2-39ab+b2-23ac+41bc-17c2+18a+44b+34c)t+7a2+15ab|
|                 {0, -4} | (34a+50b+50c)t-47a2-39ab-13b2-18ac-43bc-15c2+37a+3|
|                                                                             |
|           12                                                                |
|     1 : St   <--------------------------------------------------------------|
|                 {0, -2} | 0                                                 |
|                 {0, -2} | 0                                                 |
|                 {0, -2} | 0                                                 |
|                 {0, -3} | (25a+7b)t-10a-47b                                 |
|                 {0, -3} | -46bt+14b                                         |
|                 {0, -3} | (-7a-8b)t+2a-47b                                  |
|                 {0, -3} | (-15a+4b-8c)t+24a-6b-35c                          |
|                 {0, -3} | (39a+10b-11c)t+10a+29b+8c                         |
|                 {0, -3} | (46a+27b+50c)t-2a-20b-4c                          |
|                 {0, -4} | (-a2+3ab+47b2-22ac+23bc+7c2+31a-22b-8c)t-49a2-33ab|
|                 {0, -4} | (7a2-39ab+b2-23ac+41bc-17c2+18a-2b+34c)t+7a2+15ab+|
|                 {0, -4} | (-7a2+ab+13b2+16ac+43bc+15c2-39a+13b-19c)t-7a2+ab+|
|                                                                             |
|           12                                                                |
|     2 : St   <--------------------------------------------------------------|
|                 {0, -2} | 0                                                 |
|                 {0, -2} | 0                                                 |
|                 {0, -2} | 0                                                 |
|                 {0, -3} | (-37a+47b)t+33a-47b                               |
|                 {0, -3} | -41bt+46b                                         |
|                 {0, -3} | (-23a-8b)t+5a-47b                                 |
|                 {0, -3} | (-24a+6b+35c)t-39a+10b+27c                        |
|                 {0, -3} | (-29a+19b+19c)t-39a-10b+11c                       |
|                 {0, -3} | (46a+27b+50c)t-2a-20b-4c                          |
|                 {0, -4} | (-48a2-36ab-11b2-35ac+38bc-33c2+20a-44b-11c)t+a2-3|
|                 {0, -4} | (7a2-39ab+b2-23ac+41bc-17c2+18a-43b+34c)t+7a2+15ab|
|                 {0, -4} | (-47a2-39ab-13b2-18ac-43bc-15c2-22a-8b-31c)t+47a2-|
|                                                                             |
|o6 : ZZdFactorizationMap                                                     |
|-----------------------------------------------------------------------------|
|                                                                             |
|-----------------------------------------------------------------------------|
|                                 0                                           |
|                                 0                                           |
|                                 0                                           |
|                                 (9a+6b)t+7a-46b                             |
|                                 (-35a+47b)t-25a-7b                          |
|                                 -44bt+27b                                   |
|                                 (-48a-47b+47c)t-46a-27b-50c                 |
|                                 (39a-10b-27c)t+15a-4b+8c                    |
|                                 (-29a+19b+19c)t-39a-10b+11c                 |
|6ab+11b2+35ac-38bc+33c2-a-3b+11c (7a2-ab-13b2-16ac-43bc-15c2-19a-38b-39c)t-19|
|+39b2-23ac+43bc-17c2+46a-45b+50c (49a2+33ab-36b2-44ac+40bc+26c2-31a-18b+8c)t+|
|4b+19c                           (-7a2-15ab-39b2+23ac-43bc+17c2-40a-27b)t+31a|
|                                                                             |
|                                                                             |
|-----------------------------------------------------------------------------|
|                                 0                                           |
|                                 0                                           |
|                                 0                                           |
|                                 (28a+6b)t+23a-46b                           |
|                                 (-31a+7b)t+37a-47b                          |
|                                 -30bt+44b                                   |
|                                 (-48a-47b+47c)t-46a-27b-50c                 |
|                                 (-15a+4b-8c)t+24a-6b-35c                    |
|                                 (-10a-29b-8c)t+29a-19b-19c                  |
|+36b2+44ac-40bc-26c2-31a+28b-19c (-47a2+38ab+2ac+42a+24b-16c)t+7a2-ab-13b2-16|
|39b2-23ac+43bc-17c2-15a-31b+50c  (-a2+3ab+47b2-22ac+23bc+7c2-20a+44b+11c)t-49|
|13b2+16ac+43bc+15c2+4a-46b+31c   (-7a2-15ab-39b2+23ac-43bc+17c2-40a+30b)t+31a|
|                                                                             |
|                                                                             |
|-----------------------------------------------------------------------------|
|                                 0                                           |
|                                 0                                           |
|                                 0                                           |
|                                 (25a+6b)t+4a-46b                            |
|                                 (8a+47b)t-21a-47b                           |
|                                 -27bt+30b                                   |
|                                 (-48a-47b+47c)t-46a-27b-50c                 |
|                                 (-24a+6b+35c)t-39a+10b+27c                  |
|                                 (39a+10b-11c)t+10a+29b+8c                   |
|ab-47b2+22ac-23bc-7c2-9a-25b+8c  (47a2+39ab+13b2+18ac+43bc+15c2+2a+17b-46c)t+|
|+39b2-23ac+43bc-17c2-15a+15b+50c (-48a2-36ab-11b2-35ac+38bc-33c2-9a-26b-19c)t|
|38ab-2ac+35a-3b-50c              (-7a2-15ab-39b2+23ac-43bc+17c2)t-30a-21b-20c|
|-----------------------------------------------------------------------------|
|                                                                             |
|-----------------------------------------------------------------------------|
|                                          0                                  |
|                                          0                                  |
|                                          0                                  |
|                                          -30bt+11b                          |
|                                          (-5a+2b)t-28a-8b                   |
|                                          (-33a+47b)t+31a-7b                 |
|                                          (39a+10b-11c)t+10a+29b+8c          |
|                                          (2a+20b+4c)t+48a+47b-47c           |
|                                          (39a-10b-27c)t+15a-4b+8c           |
|a+25b+16c                                 (22a-15b-34c)t-7a2+39ab-b2+23ac-41b|
|48a2+36ab+11b2+35ac-38bc+33c2-29a+19b+19c (-7a2+ab+13b2+16ac+43bc+15c2-20a-19|
|+9b-20c                                   (49a2+33ab-36b2-44ac+40bc+26c2)t+48|
|                                                                             |
|                                                                             |
|-----------------------------------------------------------------------------|
|                                       0                                     |
|                                       0                                     |
|                                       0                                     |
|                                       41bt+30b                              |
|                                       (-21a+2b)t-25a-8b                     |
|                                       (-29a+7b)t-8a-47b                     |
|                                       (-29a+19b+19c)t-39a-10b+11c           |
|                                       (2a+20b+4c)t+48a+47b-47c              |
|                                       (-15a+4b-8c)t+24a-6b-35c              |
|ac-43bc-15c2+5a+32b+46c                (-18a-26b-34c)t-7a2+39ab-b2+23ac-41bc+|
|a2-33ab+36b2+44ac-40bc-26c2-10a-29b-8c (-47a2-39ab-13b2-18ac-43bc-15c2-36a-7b|
|+36b-20c                               (-a2+3ab+47b2-22ac+23bc+7c2+16a)t-49a2|
|                                                                             |
|                                                                             |
|-----------------------------------------------------------------------------|
|                                          0                                  |
|                                          0                                  |
|                                          0                                  |
|                                          -11bt-41b                          |
|                                          (-2a+2b)t-9a-8b                    |
|                                          (10a+47b)t+35a-47b                 |
|                                          (-10a-29b-8c)t+29a-19b-19c         |
|                                          (2a+20b+4c)t+48a+47b-47c           |
|                                          (-24a+6b+35c)t-39a+10b+27c         |
|47a2+39ab+13b2+18ac+43bc+15c2+12a-14b+39c (22a+45b-34c)t-7a2+39ab-b2+23ac-41b|
|+a2-3ab-47b2+22ac-23bc-7c2+23a+10b-11c    (-43a+38b-43c)t+7a2-ab-13b2-16ac-43|
|                                          (-48a2-36ab-11b2-35ac+38bc-33c2)t+a|
|-----------------------------------------------------------------------------|
|                                                      3                      |
|--------------------------------------------------- St  : 0                  |
|                                                |                            |
|                                                |                            |
|                                                |                            |
|                                                |                            |
|                                                |                            |
|                                                |                            |
|                                                |                            |
|                                                |                            |
|                                                |                            |
|c+17c2-16a-38b-30c                              |                            |
|b+47c)t+47a2+39ab+13b2+18ac+43bc+15c2-40a+9b+4c |                            |
|a2+36ab+11b2+35ac-38bc+33c2+19a-47b             |                            |
|                                                                             |
|                                        3                                    |
|------------------------------------- St  : 1                                |
|                                  |                                          |
|                                  |                                          |
|                                  |                                          |
|                                  |                                          |
|                                  |                                          |
|                                  |                                          |
|                                  |                                          |
|                                  |                                          |
|                                  |                                          |
|17c2-16a+22b-30c                  |                                          |
|-4c)t-49a-36b+43c                 |                                          |
|-33ab+36b2+44ac-40bc-26c2-22a-47b |                                          |
|                                                                             |
|                                      3                                      |
|----------------------------------- St  : 2                                  |
|                                |                                            |
|                                |                                            |
|                                |                                            |
|                                |                                            |
|                                |                                            |
|                                |                                            |
|                                |                                            |
|                                |                                            |
|                                |                                            |
|c+17c2-16a+33b-30c              |                                            |
|bc-15c2+15a+21b-47c             |                                            |
|2-3ab-47b2+22ac-23bc-7c2-41a-7b |                                            |
+-----------------------------------------------------------------------------+
|i7 : assert isWellDefined h                                                  |
+-----------------------------------------------------------------------------+

This routine is functorial.

+-----------------------------------------------------------------------------+
|i8 : D' = C**D                                                               |
|                                                                             |
|       12       12       12       12                                         |
|o8 = St   <-- St   <-- St   <-- St                                           |
|                                                                             |
|     0        1        2        0                                            |
|                                                                             |
|o8 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i9 : f' = randomFactorizationMap(D**C, D')                                   |
|                                                                             |
|           12                                                                |
|o9 = 0 : St   <--------------------------------------------------------------|
|                 {0, 2} | 15  -10 39  32a2-9ab-20b2-32ac+24bc-30c2   -9a2-35a|
|                 {0, 2} | -37 30  27  -48a2-15ab+39ac+33bc-49c2      25a2-2ab|
|                 {0, 2} | -13 -18 -22 -33a2-19ab-20b2+17ac+44bc-39c2 30a2-47a|
|                 {0, 3} | 0   0   0   36a+9b-39c                     -31a-39b|
|                 {0, 3} | 0   0   0   4a+13b-26c                     -48a-29b|
|                 {0, 3} | 0   0   0   22a-49b-11c                    30a-37b+|
|                 {0, 3} | 0   0   0   -8a+43b-8c                     -49a+28b|
|                 {0, 3} | 0   0   0   36a-3b-22c                     46a+b+40|
|                 {0, 3} | 0   0   0   -30a+41b+16c                   -22a+10b|
|                 {0, 4} | 0   0   0   -28                            30      |
|                 {0, 4} | 0   0   0   -6                             13      |
|                 {0, 4} | 0   0   0   35                             -17     |
|                                                                             |
|           12                                                                |
|     1 : St   <--------------------------------------------------------------|
|                 {0, 2} | -44a-42b-17c 24a-24b-47c 43a+5b-21c   -37a+10b+10c |
|                 {0, 2} | -23a-4b-2c   12a-31b+37c 23a-47b+10c  34a-42b+34c  |
|                 {0, 2} | 34a-8b+27c   4a+5b+36c   -15a+47b+15c -44a-39b-40c |
|                 {0, 3} | 7            -16         -11          -29          |
|                 {0, 3} | 38           6           -3           50           |
|                 {0, 3} | 37           -43         -28          -10          |
|                 {0, 3} | -24          -27         -50          -37          |
|                 {0, 3} | 25           -50         17           -36          |
|                 {0, 3} | -42          -6          -30          32           |
|                 {0, 4} | 0            0           0            0            |
|                 {0, 4} | 0            0           0            0            |
|                 {0, 4} | 0            0           0            0            |
|                                                                             |
|           12                                                                |
|     2 : St   <--------------------------------------------------------------|
|                 {0, 2} | 2a2-25ab+27b2-46ac-44bc-40c2  -33a2-21ab-43b2+39ac-|
|                 {0, 2} | 20a2+18ab-3b2-32ac+21bc+38c2  28a2+47ab-18b2-20ac+1|
|                 {0, 2} | -48a2-33ab+39b2-34ac-6bc-18c2 -29a2-21ab+17b2+2ac+1|
|                 {0, 3} | 18a+37b-17c                   -3a+42b+46c          |
|                 {0, 3} | 34a+7b-44c                    47a+29b+37c          |
|                 {0, 3} | 36a+48b+46c                   -10a+16b-10c         |
|                 {0, 3} | 38a+27b-5c                    -47a-27b-c           |
|                 {0, 3} | 12a+39b-41c                   44a+43b+12c          |
|                 {0, 3} | 17a-40b+35c                   9a-25b+16c           |
|                 {0, 4} | 28                            32                   |
|                 {0, 4} | 17                            16                   |
|                 {0, 4} | 23                            -43                  |
|                                                                             |
|o9 : ZZdFactorizationMap                                                     |
|-----------------------------------------------------------------------------|
|                                                                             |
|-----------------------------------------------------------------------------|
|b+40b2+6ac+3bc-31c2   -13a2+3ab+8b2-41ac+8bc-29c2    5a-37b-33c   12a+3b+9c  |
|-49b2-41ac-13bc+4c2   30a2-46ab-18b2+49ac+42bc+23c2  -28a+42b+44c -2a+20b-26c|
|b-40b2+27ac+37bc-35c2 -28a2+15ab-16b2+18ac-46bc+12c2 30a+4b+22c   33a+16b+10c|
|-31c                  -18a+27b-21c                   5            31         |
|-48c                  23a-37b-23c                    -20          28         |
|47c                   44a-39b+20c                    -13          -6         |
|-18c                  19a-47c                        -29          21         |
|c                     -28a+47b-28c                   15           -30        |
|+7c                   6a-9b-33c                      -4           -4         |
|                      28                             0            0          |
|                      -29                            0            0          |
|                      26                             0            0          |
|                                                                             |
|                                                                             |
|-----------------------------------------------------------------------------|
|-3a+14b-37c  -33a-19b-29c -17 46  33 -26a2-41ab-17b2-17ac-34bc     -49a2-49ab|
|10a+33b+26c  21a+46b+10c  -47 -35 13 39a2-35ab-24b2+44ac+15bc-20c2 -38a2+41ab|
|-18a+49b-41c -16a+4b+45c  -41 -39 32 28a2-37ab-12b2-41ac+45bc+22c2 22a2+17ab-|
|38           -39          0   0   0  -49a-46b+4c                   -42a+21b-5|
|14           20           0   0   0  22a+7b+49c                    35a+43c   |
|6            25           0   0   0  -20a-45b+36c                  47a-16b+11|
|50           11           0   0   0  -43a+46b+26c                  -29a-18b-3|
|-36          41           0   0   0  -13a+29b+10c                  42a-43b+48|
|-40          47           0   0   0  3a-47b+2c                     24a-23b-46|
|0            0            0   0   0  -50                           -36       |
|0            0            0   0   0  0                             50        |
|0            0            0   0   0  9                             10        |
|                                                                             |
|                                                                             |
|-----------------------------------------------------------------------------|
|22bc-15c2 -43a2-14ab+26b2+20ac+36bc+2c2  -4a+11b+c    -21a+18b-33c 22a-41b+3c|
|8bc-36c2  -47a2+30ab+13b2-5ac+45bc-46c2  -38a+48b+29c -35a+19b+7c  -6a+7b+17c|
|8bc+9c2   -25a2-11ab+27b2+19ac-15bc-30c2 -39a-20b+48c 36a+11b+7c   -18a+8b+25|
|          11a-9b-34c                     -46          19           -31       |
|          44a-28b-42c                    -6           -40          -2        |
|          -32a-38b-7c                    -27          -4           45        |
|          21a-37b-10c                    23           49           36        |
|          24a-48b+19c                    -45          -37          50        |
|          29a-31b-35c                    -18          22           -41       |
|          41                             0            0            0         |
|          -20                            0            0            0         |
|          43                             0            0            0         |
|-----------------------------------------------------------------------------|
|                                                         12                  |
|------------------------------------------------------ St   : 0              |
| -14a-33b-42c 18a-28b+42c 2a-19b+43c   37a+34b+5c  |                         |
| -44a-5b-16c  -11a+8b+42c -28a-50b-29c 16a-31b-49c |                         |
| -35a-39b-4c  49a+5b-38c  -26a-49b+34c -a+43b+48c  |                         |
| -24          -26         31           8           |                         |
| -32          28          28           -40         |                         |
| -23          -33         36           -47         |                         |
| -18          9           -40          19          |                         |
| 27           -7          45           -45         |                         |
| -45          -46         42           -29         |                         |
| 0            0           0            0           |                         |
| 0            0           0            0           |                         |
| 0            0           0            0           |                         |
|                                                                             |
|                                                         12                  |
|------------------------------------------------------ St   : 1              |
|-49b2+20ac-34bc+24c2 -2a2+29ab+44b2+37ac-44bc-24c2 |                         |
|+10b2+15ac+16bc+16c2 -33a2-6ab-46b2-47ac-27bc+38c2 |                         |
|41b2-8ac-36bc+13c2   43a2-33ab+15b2+25ac-42bc-25c2 |                         |
|0c                   -10a+25b+24c                  |                         |
|                     -27a-28b-24c                  |                         |
|c                    -30a+43b-25c                  |                         |
|c                    7a+7b+9c                      |                         |
|c                    37a-4b+30c                    |                         |
|c                    -26a-17b-14c                  |                         |
|                     18                            |                         |
|                     -12                           |                         |
|                     -12                           |                         |
|                                                                             |
|                                                          12                 |
|------------------------------------------------------- St   : 2             |
|  -9a-17b-32c  -17a+8b-6c   34a+18b-44c  16 28  -35 |                        |
|  -27a+27b-48c -8a-25b-23c  -21a-19b+30c -7 19  50  |                        |
|c 41a-39b+22c  -23a+26b+44c 5a-24b-23c   26 -11 48  |                        |
|  26           -12          -13          0  0   0   |                        |
|  43           3            -44          0  0   0   |                        |
|  26           -26          11           0  0   0   |                        |
|  2            6            -45          0  0   0   |                        |
|  1            -36          7            0  0   0   |                        |
|  13           34           6            0  0   0   |                        |
|  0            0            0            0  0   0   |                        |
|  0            0            0            0  0   0   |                        |
|  0            0            0            0  0   0   |                        |
+-----------------------------------------------------------------------------+

See also
========

  * Hom(ZZdFactorizationMap,ZZdFactorizationMap)
    -- the map of
    factorizations between Hom complexes
  * randomFactorizationMap(ZZdFactorization,ZZdFactorization)
    -- a random map of ZZ/d-graded factorizations
  * dual(Matrix) (Macaulay2Doc) -- dual of a map

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

  * dual(ZZdFactorizationMap,RingElement)
    -- the dual of a map of
    ZZ/d-graded factorizations
  * "dual(ZZdFactorizationMap,Symbol)"
-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:3710:0.

euler(ZZdFactorization) -- Calculates the Euler characteristic of a ZZdFactorization
************************************************************************************

  * Function: euler (Macaulay2Doc),
  * Usage:
        euler(ZZdFactorization)
  * Inputs:
      * ZZdFactorization, a ZZ/d graded factorization,
        A ZZdFactorization object representing a complex
  * Outputs:
      * an integer (Macaulay2Doc),

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

Calculates the Euler characteristic of a ZZdFactorization. To be well-defined,
the input should be a complex. This method calculates the Euler characteristic
by computing $$\ell_R (H_0 (C)) - \ell_R (H_1 (C))$$ where $C$ is some
ZZ/2-graded complex. An easy way to construct such complexes is to take the
endomorphisms of a matrix factorization arising from an isolated singularity.

+-----------------------------------------------------------------------------+
|i1 : S = ZZ/101[a..c]                                                        |
|                                                                             |
|o1 = S                                                                       |
|                                                                             |
|o1 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i2 : C = koszulMF(a^3+b^3+c^3)                                               |
|                                                                             |
|      4      4      4                                                        |
|o2 = S  <-- S  <-- S                                                         |
|                                                                             |
|     0      1      0                                                         |
|                                                                             |
|o2 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i3 : E = Hom(C,C)                                                            |
|                                                                             |
|      32      32      32                                                     |
|o3 = S   <-- S   <-- S                                                       |
|                                                                             |
|     0       1       0                                                       |
|                                                                             |
|o3 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i4 : prune HH E                                                              |
|                                                                             |
|o4 = cokernel | c b a 0 0 0 0 0 0 0 0 0 | <-- cokernel | c b a 0 0 0 0 0 0 0 |
|              | 0 0 0 c b a 0 0 0 0 0 0 |              | 0 0 0 c b a 0 0 0 0 |
|              | 0 0 0 0 0 0 c b a 0 0 0 |              | 0 0 0 0 0 0 c b a 0 |
|              | 0 0 0 0 0 0 0 0 0 c b a |              | 0 0 0 0 0 0 0 0 0 c |
|                                                                             |
|     0                                        1                              |
|                                                                             |
|o4 : ZZdFactorization                                                        |
|-----------------------------------------------------------------------------|
|0 0 | <-- cokernel | c b a 0 0 0 0 0 0 0 0 0 |                               |
|0 0 |              | 0 0 0 c b a 0 0 0 0 0 0 |                               |
|0 0 |              | 0 0 0 0 0 0 c b a 0 0 0 |                               |
|b a |              | 0 0 0 0 0 0 0 0 0 c b a |                               |
|                                                                             |
|          0                                                                  |
+-----------------------------------------------------------------------------+
|i5 : euler E                                                                 |
|                                                                             |
|o5 = 0                                                                       |
+-----------------------------------------------------------------------------+
|i6 : Q = ZZ/101[a,b,c,d]                                                     |
|                                                                             |
|o6 = Q                                                                       |
|                                                                             |
|o6 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i7 : D = koszulMF(a*b - c*d)                                                 |
|                                                                             |
|      2      2      2                                                        |
|o7 = Q  <-- Q  <-- Q                                                         |
|                                                                             |
|     0      1      0                                                         |
|                                                                             |
|o7 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i8 : F = Hom(D,D)                                                            |
|                                                                             |
|      8      8      8                                                        |
|o8 = Q  <-- Q  <-- Q                                                         |
|                                                                             |
|     0      1      0                                                         |
|                                                                             |
|o8 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i9 : euler(F)                                                                |
|                                                                             |
|o9 = 1                                                                       |
+-----------------------------------------------------------------------------+

Caveat
======

In order to be well-defined, the input should be a complex (ie, the
differential should square to 0).

See also
========

  * Making ZZdFactorizations -- Information
    about the basic constructors

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

  * euler(ZZdFactorization) -- Calculates
    the Euler characteristic of a ZZdFactorization
-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:5563:0.

eulerMF -- Construct a Koszul matrix factorization with respect to the Jacobian ideal
*************************************************************************************

  * Usage:
        eulerMF(RingElement)
  * Inputs:
      * RingElement, a ring element (Macaulay2Doc), A
        polynomial element
  * Outputs:
      * a ZZ/d graded factorization,

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

Constructs a Koszul matrix factorization with respect to the Jacobian ideal.
This method works best in characteristic 0. This method utilizes the \(
\text{koszulMF} \) function to construct a Koszul matrix factorization with
respect to the Jacobian ideal of the polynomial \( f \).

+-----------------------------------------------------------------------------+
|i1 : R = ZZ/101[x,y,z];                                                      |
+-----------------------------------------------------------------------------+
|i2 : f = x^2*y - y^3;                                                        |
+-----------------------------------------------------------------------------+
|i3 : K = eulerMF(f)                                                          |
|                                                                             |
|      2      2      2                                                        |
|o3 = R  <-- R  <-- R                                                         |
|                                                                             |
|     0      1      0                                                         |
|                                                                             |
|o3 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i4 : K.dd                                                                    |
|                                                                             |
|          2                       2                                          |
|o4 = 1 : R  <------------------- R  : 0                                      |
|               | 34y 2xy     |                                               |
|               | 34x -x2+3y2 |                                               |
|                                                                             |
|          2                       2                                          |
|     0 : R  <------------------- R  : 1                                      |
|               | x2-3y2 2xy  |                                               |
|               | 34x    -34y |                                               |
|                                                                             |
|o4 : ZZdFactorizationMap                                                     |
+-----------------------------------------------------------------------------+
|i5 : g = random(4,R)                                                         |
|                                                                             |
|        4      3       2 2        3      4      3       2           2        |
|o5 = 24x  - 36x y - 29x y  - 10x*y  - 29y  - 30x z + 19x y*z - 29x*y z -     |
|     ------------------------------------------------------------------------|
|        3       2 2         2      2 2        3        3      4              |
|     24y z + 19x z  - 8x*y*z  - 38y z  - 22x*z  - 16y*z  + 39z               |
|                                                                             |
|o5 : R                                                                       |
+-----------------------------------------------------------------------------+
|i6 : K' = eulerMF g                                                          |
|                                                                             |
|      4      4      4                                                        |
|o6 = R  <-- R  <-- R                                                         |
|                                                                             |
|     0      1      0                                                         |
|                                                                             |
|o6 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i7 : K'.dd                                                                   |
|                                                                             |
|          4                                                                  |
|o7 = 1 : R  <----------------------------------------------------------------|
|               | -25z 0                                                      |
|               | 0    -25z                                                   |
|               | -25y -5x3-7x2y+43xy2-10y3+11x2z+38xyz-29y2z+38xz2-8yz2-22z3 |
|               | -25x 36x3-43x2y+30xy2+15y3-19x2z-43xyz-29y2z+8xz2-25yz2+16z3|
|                                                                             |
|          4                                                                  |
|     0 : R  <----------------------------------------------------------------|
|               | -30x3+19x2y-29xy2-24y3+38x2z-16xyz+25y2z+35xz2-48yz2-46z3 0 |
|               | 0                                                         -3|
|               | -25y                                                      -5|
|               | -25x                                                      36|
|                                                                             |
|o7 : ZZdFactorizationMap                                                     |
|-----------------------------------------------------------------------------|
|                                                                             |
|-----------------------------------------------------------------------------|
| -36x3+43x2y-30xy2-15y3+19x2z+43xyz+29y2z-8xz2+25yz2-16z3 -5x3-7x2y+43xy2-10y|
| -25x                                                     25y                |
| 30x3-19x2y+29xy2+24y3-38x2z+16xyz-25y2z-35xz2+48yz2+46z3 0                  |
| 0                                                        30x3-19x2y+29xy2+24|
|                                                                             |
|                                                                             |
|-----------------------------------------------------------------------------|
|                                                        -36x3+43x2y-30xy2-15y|
|0x3+19x2y-29xy2-24y3+38x2z-16xyz+25y2z+35xz2-48yz2-46z3 -25x                 |
|x3-7x2y+43xy2-10y3+11x2z+38xyz-29y2z+38xz2-8yz2-22z3    25z                  |
|x3-43x2y+30xy2+15y3-19x2z-43xyz-29y2z+8xz2-25yz2+16z3   0                    |
|-----------------------------------------------------------------------------|
|                                           4                                 |
|----------------------------------------- R  : 0                             |
|3+11x2z+38xyz-29y2z+38xz2-8yz2-22z3   |                                      |
|                                      |                                      |
|                                      |                                      |
|y3-38x2z+16xyz-25y2z-35xz2+48yz2+46z3 |                                      |
|                                                                             |
|                                                                             |
|-----------------------------------------------------------------------------|
|3+19x2z+43xyz+29y2z-8xz2+25yz2-16z3 -5x3-7x2y+43xy2-10y3+11x2z+38xyz-29y2z+38|
|                                    25y                                      |
|                                    0                                        |
|                                    25z                                      |
|-----------------------------------------------------------------------------|
|                   4                                                         |
|----------------- R  : 1                                                     |
|xz2-8yz2-22z3 |                                                              |
|              |                                                              |
|              |                                                              |
|              |                                                              |
+-----------------------------------------------------------------------------+
|i8 : potential K' == g                                                       |
|                                                                             |
|o8 = true                                                                    |
+-----------------------------------------------------------------------------+

Caveat
======

Since this method involves computing the jacobian ideal, the characteristic of
the underlying field should be sufficiently large with respect to the degree of
f.

See also
========

  * Making ZZdFactorizations -- Information
    about the basic constructors
  * koszulMF -- Construct a Koszul matrix factorization from
    an ideal and a polynomial

Ways to use eulerMF:
====================

  * "eulerMF(RingElement)"

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

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

-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:5296:0.

Fold -- Convert any complex or complex map into a ZZ/d-graded factorization (or map) for a fixed integer d
**********************************************************************************************************

  * Usage:
        Fold(C,d)
        Fold(phi,d)
  * Inputs:
      * C, a complex (Complexes), or a map of complexes (Complexes),
      * d, an integer (Macaulay2Doc), an integer specifying the
        period of the resulting factorization or factorization map
  * Outputs:
      * a ZZ/d graded factorization,

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

Any complex can be viewed as a ZZ/d-graded factorization of 0 by grouping all
terms in homological degrees that are the same, modulo the period.

+-----------------------------------------------------------------+
|i1 : Q = QQ[x_1..x_3];                                           |
+-----------------------------------------------------------------+
|i2 : K = koszulComplex vars Q                                    |
|                                                                 |
|      1      3      3      1                                     |
|o2 = Q  <-- Q  <-- Q  <-- Q                                      |
|                                                                 |
|     0      1      2      3                                      |
|                                                                 |
|o2 : Complex                                                     |
+-----------------------------------------------------------------+
|i3 : fK = Fold(K, 2)  --this groups the odd/even degrees together|
|                                                                 |
|      4      4      4                                            |
|o3 = Q  <-- Q  <-- Q                                             |
|                                                                 |
|     0      1      0                                             |
|                                                                 |
|o3 : ZZdFactorization                                            |
+-----------------------------------------------------------------+
|i4 : fK.dd                                                       |
|                                                                 |
|          4                                4                     |
|o4 = 1 : Q  <---------------------------- Q  : 0                 |
|               {1} | 0 -x_2 -x_3 0    |                          |
|               {1} | 0 x_1  0    -x_3 |                          |
|               {1} | 0 0    x_1  x_2  |                          |
|               {3} | 0 0    0    0    |                          |
|                                                                 |
|          4                                4                     |
|     0 : Q  <---------------------------- Q  : 1                 |
|               {0} | x_1 x_2 x_3 0    |                          |
|               {2} | 0   0   0   x_3  |                          |
|               {2} | 0   0   0   -x_2 |                          |
|               {2} | 0   0   0   x_1  |                          |
|                                                                 |
|o4 : ZZdFactorizationMap                                         |
+-----------------------------------------------------------------+
|i5 : isZZdComplex fK                                             |
|                                                                 |
|o5 = true                                                        |
+-----------------------------------------------------------------+
|i6 : f3K = Fold(K,3)                                             |
|                                                                 |
|      2      3      3      2                                     |
|o6 = Q  <-- Q  <-- Q  <-- Q                                      |
|                                                                 |
|     0      1      2      0                                      |
|                                                                 |
|o6 : ZZdFactorization                                            |
+-----------------------------------------------------------------+
|i7 : f3K.dd                                                      |
|                                                                 |
|          3                      2                               |
|o7 = 2 : Q  <------------------ Q  : 0                           |
|               {2} | 0 x_3  |                                    |
|               {2} | 0 -x_2 |                                    |
|               {2} | 0 x_1  |                                    |
|                                                                 |
|          2                           3                          |
|     0 : Q  <----------------------- Q  : 1                      |
|               {0} | x_1 x_2 x_3 |                               |
|               {3} | 0   0   0   |                               |
|                                                                 |
|          3                              3                       |
|     1 : Q  <-------------------------- Q  : 2                   |
|               {1} | -x_2 -x_3 0    |                            |
|               {1} | x_1  0    -x_3 |                            |
|               {1} | 0    x_1  x_2  |                            |
|                                                                 |
|o7 : ZZdFactorizationMap                                         |
+-----------------------------------------------------------------+
|i8 : f3K.dd^2                                                    |
|                                                                 |
|o8 = 0                                                           |
|                                                                 |
|o8 : ZZdFactorizationMap                                         |
+-----------------------------------------------------------------+
|i9 : isZZdComplex(f3K)                                           |
|                                                                 |
|o9 = true                                                        |
+-----------------------------------------------------------------+

When the specified period is longer than the actual complex, the output will
just be the complex but viewed with additional zero positions.

+-----------------------------------------+
|i10 : K' = koszulComplex {x_1,x_2}       |
|                                         |
|       1      2      1                   |
|o10 = Q  <-- Q  <-- Q                    |
|                                         |
|      0      1      2                    |
|                                         |
|o10 : Complex                            |
+-----------------------------------------+
|i11 : Fold(K',4)                         |
|                                         |
|       1      2      1            1      |
|o11 = Q  <-- Q  <-- Q  <-- 0 <-- Q       |
|                                         |
|      0      1      2      3     0       |
|                                         |
|o11 : ZZdFactorization                   |
+-----------------------------------------+
|i12 : Fold(K',5)                         |
|                                         |
|       1      2      1                  1|
|o12 = Q  <-- Q  <-- Q  <-- 0 <-- 0 <-- Q |
|                                         |
|      0      1      2      3     4     0 |
|                                         |
|o12 : ZZdFactorization                   |
+-----------------------------------------+

The Fold function is also functorial and can be applied to complex maps.

+------------------------------------------------+
|i13 : Fold(id_K, 2)                             |
|                                                |
|           4                       4            |
|o13 = 0 : Q  <------------------- Q  : 0        |
|                {0} | 1 0 0 0 |                 |
|                {2} | 0 1 0 0 |                 |
|                {2} | 0 0 1 0 |                 |
|                {2} | 0 0 0 1 |                 |
|                                                |
|           4                       4            |
|      1 : Q  <------------------- Q  : 1        |
|                {1} | 1 0 0 0 |                 |
|                {1} | 0 1 0 0 |                 |
|                {1} | 0 0 1 0 |                 |
|                {3} | 0 0 0 1 |                 |
|                                                |
|o13 : ZZdFactorizationMap                       |
+------------------------------------------------+
|i14 : oo == id_(Fold(K,2))                      |
|                                                |
|o14 = true                                      |
+------------------------------------------------+
|i15 : f = randomComplexMap(K, K', Cycle => true)|
|                                                |
|           1               1                    |
|o15 = 0 : Q  <----------- Q  : 0                |
|                | 9/2 |                         |
|                                                |
|           3                       2            |
|      1 : Q  <------------------- Q  : 1        |
|                {1} | 9/2 0   |                 |
|                {1} | 0   9/2 |                 |
|                {1} | 0   0   |                 |
|                                                |
|           3                   1                |
|      2 : Q  <--------------- Q  : 2            |
|                {2} | 9/2 |                     |
|                {2} | 0   |                     |
|                {2} | 0   |                     |
|                                                |
|o15 : ComplexMap                                |
+------------------------------------------------+
|i16 : ff = Fold(f,2)                            |
|                                                |
|           4                       2            |
|o16 = 0 : Q  <------------------- Q  : 0        |
|                {0} | 9/2 0   |                 |
|                {2} | 0   9/2 |                 |
|                {2} | 0   0   |                 |
|                {2} | 0   0   |                 |
|                                                |
|           4                       2            |
|      1 : Q  <------------------- Q  : 1        |
|                {1} | 9/2 0   |                 |
|                {1} | 0   9/2 |                 |
|                {1} | 0   0   |                 |
|                {3} | 0   0   |                 |
|                                                |
|o16 : ZZdFactorizationMap                       |
+------------------------------------------------+
|i17 : isCommutative Fold(f, 2)                  |
|                                                |
|o17 = true                                      |
+------------------------------------------------+
|i18 : isCommutative Fold(f, 3)                  |
|                                                |
|o18 = true                                      |
+------------------------------------------------+

See also
========

  * Making ZZdFactorizations -- Information
    about the basic constructors

Ways to use Fold:
=================

  * "Fold(Complex,ZZ)"
  * "Fold(ComplexMap,ZZ)"

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

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

-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:5172:0.

fullCollapse -- Converts a d-fold factorization into a 2-fold factorization
***************************************************************************

  * Usage:
        fullCollapse(X, n, r)
  * Inputs:
      * X, a ZZ/d graded factorization, The input
        d-fold factorization
      * n, an integer (Macaulay2Doc), Starting position for composing
        maps
      * r, an integer (Macaulay2Doc), Number of maps to compose
  * Outputs:
      * a ZZ/d graded factorization, The resulting
        2-fold factorization

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

This method converts a d-fold factorization into a 2-fold factorization by
composing the maps in the specified positions. It starts composing maps from
position n and continues composing r maps. The resulting 2-fold factorization
is returned.

+-----------------------------------------------------------------------------+
|i1 : Q = ZZ/101[a,b];                                                        |
+-----------------------------------------------------------------------------+
|i2 : C = linearMF(a^4+b^4, t)                                                |
|                                                                             |
|     / Q[t] \4     / Q[t] \4     / Q[t] \4     / Q[t] \4     / Q[t] \4       |
|o2 = |------|  <-- |------|  <-- |------|  <-- |------|  <-- |------|        |
|     | 2    |      | 2    |      | 2    |      | 2    |      | 2    |        |
|     \t  + 1/      \t  + 1/      \t  + 1/      \t  + 1/      \t  + 1/        |
|                                                                             |
|     0             1             2             3             0               |
|                                                                             |
|o2 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i3 : C.dd                                                                    |
|                                                                             |
|         / Q[t] \4                             / Q[t] \4                     |
|o3 = 3 : |------|  <-------------------------- |------|  : 0                 |
|         | 2    |     {0, 2} | b a  0  0   |   | 2    |                      |
|         \t  + 1/     {0, 2} | 0 bt a  0   |   \t  + 1/                      |
|                      {0, 2} | 0 0  -b a   |                                 |
|                      {0, 2} | a 0  0  -bt |                                 |
|                                                                             |
|         / Q[t] \4                             / Q[t] \4                     |
|     0 : |------|  <-------------------------- |------|  : 1                 |
|         | 2    |     {0, 2} | b a  0  0   |   | 2    |                      |
|         \t  + 1/     {0, 2} | 0 bt a  0   |   \t  + 1/                      |
|                      {0, 2} | 0 0  -b a   |                                 |
|                      {0, 2} | a 0  0  -bt |                                 |
|                                                                             |
|         / Q[t] \4                             / Q[t] \4                     |
|     1 : |------|  <-------------------------- |------|  : 2                 |
|         | 2    |     {0, 2} | b a  0  0   |   | 2    |                      |
|         \t  + 1/     {0, 2} | 0 bt a  0   |   \t  + 1/                      |
|                      {0, 2} | 0 0  -b a   |                                 |
|                      {0, 2} | a 0  0  -bt |                                 |
|                                                                             |
|         / Q[t] \4                             / Q[t] \4                     |
|     2 : |------|  <-------------------------- |------|  : 3                 |
|         | 2    |     {0, 2} | b a  0  0   |   | 2    |                      |
|         \t  + 1/     {0, 2} | 0 bt a  0   |   \t  + 1/                      |
|                      {0, 2} | 0 0  -b a   |                                 |
|                      {0, 2} | a 0  0  -bt |                                 |
|                                                                             |
|o3 : ZZdFactorizationMap                                                     |
+-----------------------------------------------------------------------------+
|i4 : C.dd^4                                                                  |
|                                                                             |
|         / Q[t] \4                                         / Q[t] \4         |
|o4 = 0 : |------|  <-------------------------------------- |------|  : 0     |
|         | 2    |     {0, 2} | a4+b4 0     0     0     |   | 2    |          |
|         \t  + 1/     {0, 2} | 0     a4+b4 0     0     |   \t  + 1/          |
|                      {0, 2} | 0     0     a4+b4 0     |                     |
|                      {0, 2} | 0     0     0     a4+b4 |                     |
|                                                                             |
|         / Q[t] \4                                         / Q[t] \4         |
|     1 : |------|  <-------------------------------------- |------|  : 1     |
|         | 2    |     {0, 2} | a4+b4 0     0     0     |   | 2    |          |
|         \t  + 1/     {0, 2} | 0     a4+b4 0     0     |   \t  + 1/          |
|                      {0, 2} | 0     0     a4+b4 0     |                     |
|                      {0, 2} | 0     0     0     a4+b4 |                     |
|                                                                             |
|         / Q[t] \4                                         / Q[t] \4         |
|     2 : |------|  <-------------------------------------- |------|  : 2     |
|         | 2    |     {0, 2} | a4+b4 0     0     0     |   | 2    |          |
|         \t  + 1/     {0, 2} | 0     a4+b4 0     0     |   \t  + 1/          |
|                      {0, 2} | 0     0     a4+b4 0     |                     |
|                      {0, 2} | 0     0     0     a4+b4 |                     |
|                                                                             |
|         / Q[t] \4                                         / Q[t] \4         |
|     3 : |------|  <-------------------------------------- |------|  : 3     |
|         | 2    |     {0, 2} | a4+b4 0     0     0     |   | 2    |          |
|         \t  + 1/     {0, 2} | 0     a4+b4 0     0     |   \t  + 1/          |
|                      {0, 2} | 0     0     a4+b4 0     |                     |
|                      {0, 2} | 0     0     0     a4+b4 |                     |
|                                                                             |
|o4 : ZZdFactorizationMap                                                     |
+-----------------------------------------------------------------------------+
|i5 : C' = fullCollapse(C,2,1)                                                |
|                                                                             |
|     / Q[t] \4     / Q[t] \4     / Q[t] \4                                   |
|o5 = |------|  <-- |------|  <-- |------|                                    |
|     | 2    |      | 2    |      | 2    |                                    |
|     \t  + 1/      \t  + 1/      \t  + 1/                                    |
|                                                                             |
|     0             1             0                                           |
|                                                                             |
|o5 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i6 : isdFactorization C'                                                     |
|                                                                             |
|             4    4                                                          |
|o6 = (true, a  + b )                                                         |
|                                                                             |
|o6 : Sequence                                                                |
+-----------------------------------------------------------------------------+
|i7 : E = Hom(C,C)                                                            |
|                                                                             |
|     / Q[t] \64     / Q[t] \64     / Q[t] \64     / Q[t] \64     / Q[t] \64  |
|o7 = |------|   <-- |------|   <-- |------|   <-- |------|   <-- |------|    |
|     | 2    |       | 2    |       | 2    |       | 2    |       | 2    |    |
|     \t  + 1/       \t  + 1/       \t  + 1/       \t  + 1/       \t  + 1/    |
|                                                                             |
|     0              1              2              3              0           |
|                                                                             |
|o7 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i8 : prune HH_1 fullCollapse(E,2,1)                                          |
|                                                                             |
|o8 = cokernel | 0         0         -ab2t+ab2  ab2t-ab2 2a2bt-a2b            |
|              | 0         0         0          -abt     -a2t-a2              |
|              | 0         0         48b2t+50b2 0        -48abt-50ab          |
|              | 0         0         50bt+50b   0        -50at-50a            |
|              | 0         0         0          0        0                    |
|              | ab2t+2ab2 a2bt+2a2b 0          0        0                    |
|              | -2ab      -2a2      0          0        0                    |
|              | 0         0         0          0        0                    |
|              | 0         0         0          0        0                    |
|              | 0         0         0          0        0                    |
|              | 0         0         0          0        0                    |
|              | 0         0         0          0        0                    |
|                                                                             |
|      Q[t]                      / Q[t] \12                                   |
|o8 : -------module, quotient of |------|                                     |
|      2                         | 2    |                                     |
|     t  + 1                     \t  + 1/                                     |
|-----------------------------------------------------------------------------|
|-3a2bt-a2b 49ab2t+50ab2 -a2b -a3 b3t-b3        ab2t-ab2    50a2bt+48a2b      |
|0          0            0    0   -b2t+b2       -abt+ab     a2                |
|-2ab       49b2t+49b2   abt  a2t 0             0           -49abt+49ab       |
|0          50bt+50b     0    0   0             0           -50at+50a         |
|0          0            0    0   0             0           0                 |
|0          0            0    0   -50a2bt-50a2b -50a3t-50a3 0                 |
|0          0            0    0   0             0           0                 |
|0          0            0    0   -abt+ab       -a2t+a2     0                 |
|0          0            0    0   0             0           0                 |
|0          0            0    0   0             0           0                 |
|0          0            0    0   -bt+b         -at+a       0                 |
|0          0            0    0   0             0           0                 |
|-----------------------------------------------------------------------------|
|-a2bt+50a2b -a3t+50a3    a2b2t 0 0 0 b3     -ab2 0 a2bt    0   0  0   2a2bt  |
|0           0            0     0 0 0 b2t-b2 0    0 0       0   0  0   0      |
|-ab         -a2          0     0 0 0 0      0    0 0       0   0  0   0      |
|0           0            0     0 0 0 0      0    0 0       0   0  0   0      |
|0           0            0     0 0 0 0      0    0 ab2     a2b a3 b3t 0      |
|50b3t-50b3  49ab2t+49ab2 -34a4 0 0 0 0      0    0 b3t+2b3 0   0  0   2b3    |
|0           2ab          0     0 0 0 0      0    0 -2b2    0   0  0   -2b2   |
|0           0            33a3  0 0 0 0      0    0 0       0   0  0   0      |
|b           a            0     0 0 0 0      0    0 0       0   0  0   0      |
|0           0            0     0 0 0 0      0    0 0       0   0  0   0      |
|0           0            0     0 0 0 0      0    0 0       0   0  0   0      |
|0           0            0     0 0 0 0      0    0 0       0   0  0   0      |
|-----------------------------------------------------------------------------|
|-b3t-2b3     0    -2a2bt   0         b3t+4b3      0    0   -49a2b            |
|2b2          0    0        0         -4b2         0    0   0                 |
|0            0    0        0         0            0    0   -2abt             |
|0            0    0        0         0            0    0   0                 |
|0            0    0        0         0            0    0   0                 |
|50a2bt+50a2b -a3t -2b3t-b3 -a2bt+a2b 49a2bt-50a2b -a2b -a3 -50b3t-50b3       |
|0            0    2b2t+2b2 2a2t      0            0    0   0                 |
|abt+ab       0    0        0         -3abt-5ab    abt  a2t 0                 |
|0            0    0        0         0            0    0   bt                |
|0            0    0        0         0            0    0   0                 |
|bt+b         0    0        0         -3bt-3b      0    0   0                 |
|0            0    0        0         0            0    0   0                 |
|-----------------------------------------------------------------------------|
|-a3t      0        0            b3t+2b3       b3      ab2 -a3b 0 0 0 0 0     |
|0         0        0            -2b2          -b2     -ab a3   0 0 0 0 0     |
|-a2t-a2   0        0            0             0       0   0    0 0 0 0 0     |
|0         0        0            0             0       0   0    0 0 0 0 0     |
|0         0        0            0             0       0   0    0 0 0 0 0     |
|-ab2t-ab2 3ab2t    47ab2t+50ab2 -48a2bt+50a2b a2b     0   ab3  0 0 0 0 b3t+b3|
|2ab       -2abt-ab 2abt+2ab     -2a2t         0       0   0    0 0 0 0 -2b2  |
|0         -49b2    -b2          -abt          -abt-ab -a2 -b3t 0 0 0 0 0     |
|at+a      0        0            0             0       0   0    0 0 0 0 0     |
|0         -bt-50b  bt           -at+a         0       0   0    0 0 0 0 0     |
|0         0        0            -bt-b         -b      -a  0    0 0 0 0 0     |
|0         0        0            0             0       0   0    0 0 0 0 0     |
|-----------------------------------------------------------------------------|
|0    -2b3t         -2ab2t-ab2 0 0             0   0  0   |                   |
|0    b2t+b2        0          0 0             0   0  0   |                   |
|0    0             -2b2       0 0             0   0  0   |                   |
|0    0             0          0 0             0   0  0   |                   |
|0    0             0          0 0             0   0  0   |                   |
|-ab2 -50a2bt+49a2b 33a3       0 -50a2bt+50a2b 0   0  0   |                   |
|0    0             0          0 0             0   0  0   |                   |
|0    abt+ab        -33a2      0 abt+ab        0   0  0   |                   |
|0    0             0          0 0             0   0  0   |                   |
|0    0             0          0 0             0   0  0   |                   |
|0    bt+b          0          0 bt+b          0   0  0   |                   |
|0    0             0          0 ab2           a2b a3 b3t |                   |
+-----------------------------------------------------------------------------+

See also
========

  * Making ZZdFactorizations -- Information
    about the basic constructors

Ways to use fullCollapse:
=========================

  * "fullCollapse(ZZdFactorization,ZZ,ZZ)"

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

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

-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:6312:0.

gradedModule(ZZdFactorization) -- a new ZZ/d-graded factorization in which the differential is zero
***************************************************************************************************

  * Function: gradedModule (Macaulay2Doc),
  * Usage:
        gradedModule C
  * Inputs:
      * C, a ZZ/d graded factorization,
  * Outputs:
      * a ZZ/d graded factorization, whose
        differential is the zero map

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

This routine isolates the terms in the factorization and forgets the
differentials

+------------------------------------------------------------------+
|i1 : R = ZZ/101[a,b,c]/(a^3+b^3+c^3);                             |
+------------------------------------------------------------------+
|i2 : C = tailMF ideal vars R                                      |
|                                                                  |
|       ZZ       4       ZZ       4       ZZ       4               |
|o2 = (---[a..c])  <-- (---[a..c])  <-- (---[a..c])                |
|      101              101              101                       |
|                                                                  |
|     0                1                0                          |
|                                                                  |
|o2 : ZZdFactorization                                             |
+------------------------------------------------------------------+
|i3 : dd^C                                                         |
|                                                                  |
|           ZZ       4                             ZZ       4      |
|o3 = 1 : (---[a..c])  <------------------------ (---[a..c])  : 0  |
|          101            {5} | -a -c2 b2 0  |    101              |
|                         {5} | -c a2  0  b2 |                     |
|                         {5} | b  0   a2 c2 |                     |
|                         {6} | 0  -b  -c a  |                     |
|                                                                  |
|           ZZ       4                               ZZ       4    |
|     0 : (---[a..c])  <-------------------------- (---[a..c])  : 1|
|          101            {3} | -a2 -c2 b2 0   |    101            |
|                         {4} | -c  a   0  -b2 |                   |
|                         {4} | b   0   a  -c2 |                   |
|                         {4} | 0   b   c  a2  |                   |
|                                                                  |
|o3 : ZZdFactorizationMap                                          |
+------------------------------------------------------------------+
|i4 : G = gradedModule C                                           |
|                                                                  |
|       ZZ       4       ZZ       4       ZZ       4               |
|o4 = (---[a..c])  <-- (---[a..c])  <-- (---[a..c])                |
|      101              101              101                       |
|                                                                  |
|     0                1                0                          |
|                                                                  |
|o4 : ZZdFactorization                                             |
+------------------------------------------------------------------+
|i5 : dd^G                                                         |
|                                                                  |
|o5 = 0                                                            |
|                                                                  |
|o5 : ZZdFactorizationMap                                          |
+------------------------------------------------------------------+
|i6 : dd^G == 0                                                    |
|                                                                  |
|o6 = true                                                         |
+------------------------------------------------------------------+
|i7 : assert((isdFactorization G)_0)                               |
+------------------------------------------------------------------+
|i8 : assert(G != C)                                               |
+------------------------------------------------------------------+
|i9 : assert(HH G == G)                                            |
+------------------------------------------------------------------+

See also
========

  * HH ZZdFactorization -- homology of a
    ZZ/d-graded factorization

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

  * gradedModule(ZZdFactorization),
    -- a new ZZ/d-graded factorization in which the differential is zero
-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:1023:0.

HH ZZdFactorization -- homology of a ZZ/d-graded factorization
**************************************************************

  * Function: homology (Macaulay2Doc),
  * Usage:
        H = HH C
  * Inputs:
      * C, a ZZ/d graded factorization,
  * Outputs:
      * H, a ZZ/d graded factorization,

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

The homology of a 2-fold factorization $H$ is defined by ker dd^C/image dd^C.
The differential of the homology complex is the zero map. If the differentials
of the factorization do not compose to 0, then the homology is not defined.
Similarly, in order to make sense of the homology of a d-fold factorization for
d > 3, one should use the fullCollapse command.

An easy way to construct complexes from factorizations is to use the End
command, which computes the endomorphisms of the factorization. In general, if
$F$ is a factorization of some polynomial $f$ and $G$ is a factorization of
some polynomial $g$, then $\operatorname{Hom} (F,G)$ is a factorization of
$g-f$.

+----------------------------+
|i1 : Q = ZZ/11[x,y];        |
+----------------------------+
|i2 : F = randomLinearMF(2,Q)|
|                            |
|      4      4      4       |
|o2 = Q  <-- Q  <-- Q        |
|                            |
|     0      1      0        |
|                            |
|o2 : ZZdFactorization       |
+----------------------------+
|i3 : E = Hom(F,F)           |
|                            |
|      32      32      32    |
|o3 = Q   <-- Q   <-- Q      |
|                            |
|     0       1       0      |
|                            |
|o3 : ZZdFactorization       |
+----------------------------+
|i4 : isZZdComplex E         |
|                            |
|o4 = true                   |
+----------------------------+

Thus $E$ is a $2$-periodic complex. This means that the homology is
well-defined:

+-----------------------------------------------------------------------------+
|i5 : prune HH E                                                              |
|                                                                             |
|o5 = cokernel | y x 0 0 0 0 0 0 0 0 0 0 0 0 0 0 | <-- cokernel | y x 0 0 0 0 |
|              | 0 0 y x 0 0 0 0 0 0 0 0 0 0 0 0 |              | 0 0 y x 0 0 |
|              | 0 0 0 0 y x 0 0 0 0 0 0 0 0 0 0 |              | 0 0 0 0 y x |
|              | 0 0 0 0 0 0 y x 0 0 0 0 0 0 0 0 |              | 0 0 0 0 0 0 |
|              | 0 0 0 0 0 0 0 0 y x 0 0 0 0 0 0 |              | 0 0 0 0 0 0 |
|              | 0 0 0 0 0 0 0 0 0 0 y x 0 0 0 0 |              | 0 0 0 0 0 0 |
|              | 0 0 0 0 0 0 0 0 0 0 0 0 y x 0 0 |              | 0 0 0 0 0 0 |
|              | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 y x |              | 0 0 0 0 0 0 |
|                                                                             |
|     0                                                1                      |
|                                                                             |
|o5 : ZZdFactorization                                                        |
|-----------------------------------------------------------------------------|
|0 0 0 0 0 0 0 0 0 0 | <-- cokernel | y x 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |       |
|0 0 0 0 0 0 0 0 0 0 |              | 0 0 y x 0 0 0 0 0 0 0 0 0 0 0 0 |       |
|0 0 0 0 0 0 0 0 0 0 |              | 0 0 0 0 y x 0 0 0 0 0 0 0 0 0 0 |       |
|y x 0 0 0 0 0 0 0 0 |              | 0 0 0 0 0 0 y x 0 0 0 0 0 0 0 0 |       |
|0 0 y x 0 0 0 0 0 0 |              | 0 0 0 0 0 0 0 0 y x 0 0 0 0 0 0 |       |
|0 0 0 0 y x 0 0 0 0 |              | 0 0 0 0 0 0 0 0 0 0 y x 0 0 0 0 |       |
|0 0 0 0 0 0 y x 0 0 |              | 0 0 0 0 0 0 0 0 0 0 0 0 y x 0 0 |       |
|0 0 0 0 0 0 0 0 y x |              | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 y x |       |
|                                                                             |
|                          0                                                  |
+-----------------------------------------------------------------------------+
|i6 : R = Q/(potential F);                                                    |
+-----------------------------------------------------------------------------+
|i7 : netList for i to 3 list prune Ext^i (coker vars R, coker vars R)        |
|                                                                             |
|     +-------------------------+                                             |
|o7 = |cokernel | y x |         |                                             |
|     +-------------------------+                                             |
|     |cokernel {-1} | y x 0 0 ||                                             |
|     |         {-1} | 0 0 y x ||                                             |
|     +-------------------------+                                             |
|     |cokernel {-2} | y x 0 0 ||                                             |
|     |         {-2} | 0 0 y x ||                                             |
|     +-------------------------+                                             |
|     |cokernel {-3} | y x 0 0 ||                                             |
|     |         {-3} | 0 0 y x ||                                             |
|     +-------------------------+                                             |
+-----------------------------------------------------------------------------+

In the above case, the homology of the endomorphism factorization is computing
the stable Ext of the residue field over the hypersurface $R/(f)$, ie, the Ext
module obtained by taking sufficiently high Ext values.

See also
========

  * dual(ZZdFactorization) -- make the dual
    of a ZZ/d-graded factorization
  * prune(ZZdFactorization),
    -- minimal presentation of all terms in a ZZ/d-graded factorization

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

  * HH ZZdFactorization -- homology of a
    ZZ/d-graded factorization
-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:1067:0.

HH ZZdFactorizationMap -- induced map on homology or cohomology
***************************************************************

  * Function: homology (Macaulay2Doc),
  * Usage:
        h = HH f
  * Inputs:
      * f, a map of ZZ/d-graded factorizations,
  * Outputs:
      * h, a map of ZZ/d-graded factorizations,

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

Homology defines a functor from the category of ZZ/d-graded complexes to
itself.  Given a map of ZZ/d-graded complexes $f : C \to D$, this method
returns the induced map $HH f : HH C \to HH D$.

To directly obtain the $n$-th map in $h$, use HH_n f or HH^n f.  By definition
HH^n f === HH_(-n) f. This can be more efficient, as it will compute only the
desired induced map. Note that this method does not check whether the
differentials in the factorization compose to 0, so the user should verify this
for themselves using isZZdComplex, or a direct check.

If $f$ commutes with the differentials, then these induced maps are well
defined.

+-----------------------------------------------------------------------------+
|i1 : S = ZZ/101[a,b];                                                        |
+-----------------------------------------------------------------------------+
|i2 : R = S/(a^3+b^3);                                                        |
+-----------------------------------------------------------------------------+
|i3 : m = ideal vars R                                                        |
|                                                                             |
|o3 = ideal (a, b)                                                            |
|                                                                             |
|o3 : Ideal of R                                                              |
+-----------------------------------------------------------------------------+
|i4 : C = tailMF m                                                            |
|                                                                             |
|      2      2      2                                                        |
|o4 = S  <-- S  <-- S                                                         |
|                                                                             |
|     0      1      0                                                         |
|                                                                             |
|o4 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i5 : D = tailMF (m^2)                                                        |
|                                                                             |
|      3      3      3                                                        |
|o5 = S  <-- S  <-- S                                                         |
|                                                                             |
|     0      1      0                                                         |
|                                                                             |
|o5 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i6 : f = randomFactorizationMap(D,C, Cycle => true, InternalDegree => 1)     |
|                                                                             |
|          3                           2                                      |
|o6 = 0 : S  <----------------------- S  : 0                                  |
|               {3} | 36 24a-30b  |                                           |
|               {3} | 30 36a+24b  |                                           |
|               {3} | 24 -30a-36b |                                           |
|                                                                             |
|          3                       2                                          |
|     1 : S  <------------------- S  : 1                                      |
|               {5} | 36  24  |                                               |
|               {5} | -30 -36 |                                               |
|               {5} | 24  -30 |                                               |
|                                                                             |
|o6 : ZZdFactorizationMap                                                     |
+-----------------------------------------------------------------------------+
|i7 : g = Hom(f,C)                                                            |
|                                                                             |
|          8                                                                  |
|o7 = 0 : S  <----------------------------------------------------------------|
|               {0}  | -36      0        -30      0        -24     0       0  |
|               {1}  | 0        -36      0        -30      0       -24     0  |
|               {-1} | -24a+30b 0        -36a-24b 0        30a+36b 0       0  |
|               {0}  | 0        -24a+30b 0        -36a-24b 0       30a+36b 0  |
|               {0}  | 0        0        0        0        0       0       -36|
|               {0}  | 0        0        0        0        0       0       0  |
|               {0}  | 0        0        0        0        0       0       -24|
|               {0}  | 0        0        0        0        0       0       0  |
|                                                                             |
|          8                                                                  |
|     1 : S  <----------------------------------------------------------------|
|               {2}  | -36      0        -30      0        -24     0       0  |
|               {2}  | 0        -36      0        -30      0       -24     0  |
|               {1}  | -24a+30b 0        -36a-24b 0        30a+36b 0       0  |
|               {1}  | 0        -24a+30b 0        -36a-24b 0       30a+36b 0  |
|               {-2} | 0        0        0        0        0       0       -36|
|               {-1} | 0        0        0        0        0       0       0  |
|               {-2} | 0        0        0        0        0       0       -24|
|               {-1} | 0        0        0        0        0       0       0  |
|                                                                             |
|o7 : ZZdFactorizationMap                                                     |
|-----------------------------------------------------------------------------|
|                        12                                                   |
|---------------------- S   : 0                                               |
| 0   0  0  0   0   |                                                         |
| 0   0  0  0   0   |                                                         |
| 0   0  0  0   0   |                                                         |
| 0   0  0  0   0   |                                                         |
| 0   30 0  -24 0   |                                                         |
| -36 0  30 0   -24 |                                                         |
| 0   36 0  30  0   |                                                         |
| -24 0  36 0   30  |                                                         |
|                                                                             |
|                        12                                                   |
|---------------------- S   : 1                                               |
| 0   0  0  0   0   |                                                         |
| 0   0  0  0   0   |                                                         |
| 0   0  0  0   0   |                                                         |
| 0   0  0  0   0   |                                                         |
| 0   30 0  -24 0   |                                                         |
| -36 0  30 0   -24 |                                                         |
| 0   36 0  30  0   |                                                         |
| -24 0  36 0   30  |                                                         |
+-----------------------------------------------------------------------------+
|i8 : assert isCommutative g                                                  |
+-----------------------------------------------------------------------------+
|i9 : (isZZdComplex source g, isZZdComplex target g)                          |
|                                                                             |
|o9 = (true, true)                                                            |
|                                                                             |
|o9 : Sequence                                                                |
+-----------------------------------------------------------------------------+
|i10 : h = HH(g)                                                              |
|                                                                             |
|o10 = 0 : subquotient ({0}  | 1 0   -b 0   |, {0}  | a2  -b2 0  0            |
|                       {1}  | 0 1   0  0   |  {1}  | b   a   0  0            |
|                       {-1} | 0 -ab a2 -b2 |  {-1} | 0   0   a2 -b2          |
|                       {0}  | 1 0   0  a   |  {0}  | 0   0   b  a            |
|                       {0}  | 1 0   0  0   |  {0}  | a2  0   b  0            |
|                       {0}  | 0 a   0  b   |  {0}  | 0   a2  0  b            |
|                       {0}  | 0 -b  a  0   |  {0}  | -b2 0   a  0            |
|                       {0}  | 1 0   -b a   |  {0}  | 0   -b2 0  a            |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|      1 : subquotient ({2}  | 0  0  1  a   |, {2}  | -a  -b2 0  0            |
|                       {2}  | -1 0  0  -b  |  {2}  | b   -a2 0  0            |
|                       {1}  | -b a  0  0   |  {1}  | 0   0   -a -b2          |
|                       {1}  | 0  -b -a 0   |  {1}  | 0   0   b  -a2          |
|                       {-2} | 0  -b -a -a2 |  {-2} | a2  0   b  0            |
|                       {-1} | 1  0  0  0   |  {-1} | 0   a2  0  b            |
|                       {-2} | b  -a 0  b2  |  {-2} | -b2 0   a  0            |
|                       {-1} | 0  0  1  0   |  {-1} | 0   -b2 0  a            |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|o10 : ZZdFactorizationMap                                                    |
|-----------------------------------------------------------------------------|
|a  0  -b 0  |) <----------------------------- subquotient ({-1} | -a -b a  0 |
|0  a  0  -b |     {0} | 0 0 0   0 0   0   |                {0}  | 0  0  0  0 |
|b2 0  a2 0  |     {1} | 0 0 -30 0 -36 -24 |                {-1} | 0  a  0  b |
|0  b2 0  a2 |     {1} | 0 0 0   0 0   0   |                {0}  | 0  0  1  0 |
|a  b2 0  0  |     {1} | 0 0 0   0 0   0   |                {-1} | b  0  0  a |
|-b a2 0  0  |                                              {0}  | 0  0  0  0 |
|0  0  a  b2 |                                              {-1} | -a 0  a  0 |
|0  0  -b a2 |                                              {-1} | b  0  0  0 |
|                                                           {-1} | 0  -a 0  0 |
|                                                           {-1} | 0  b  -a 0 |
|                                                           {-1} | 0  0  b  a |
|                                                           {-1} | 0  0  0  -b|
|                                                                             |
|a   0  -b  0  |) <---------------------------- subquotient ({1}  | -1 0  0  0|
|0   a  0   -b |     {2} | 30 -36 -24 0 0 0 |                {1}  | 0  -1 0  -|
|b2  0  a2  0  |     {2} | 0  0   0   0 0 0 |                {1}  | 0  0  -1 0|
|0   b2 0   a2 |     {2} | 36 -24 30  0 0 0 |                {1}  | 1  0  0  0|
|-a2 b2 0   0  |     {3} | 0  0   0   0 0 0 |                {1}  | 0  1  0  0|
|-b  -a 0   0  |                                             {1}  | 0  0  -1 b|
|0   0  -a2 b2 |                                             {-3} | a  0  b  -|
|0   0  -b  -a |                                             {-2} | 0  1  0  a|
|                                                            {-3} | 0  -b -a 0|
|                                                            {-2} | 1  0  0  0|
|                                                            {-3} | b  -a 0  0|
|                                                            {-2} | 0  0  1  0|
|-----------------------------------------------------------------------------|
| 0  -b |, {-1} | a2 -b2 0   0   0   0   a  0  b  0  0  0  |) : 0             |
| 1  0  |  {0}  | b  a   0   0   0   0   0  a  0  b  0  0  |                  |
| -b 0  |  {-1} | 0  0   a2  -b2 0   0   0  0  -a 0  b  0  |                  |
| 0  0  |  {0}  | 0  0   b   a   0   0   0  0  0  -a 0  b  |                  |
| 0  0  |  {-1} | 0  0   0   0   a2  -b2 -b 0  0  0  a  0  |                  |
| 0  1  |  {0}  | 0  0   0   0   b   a   0  -b 0  0  0  a  |                  |
| 0  -b |  {-1} | a2 0   ab  0   -b2 0   a  b2 0  0  0  0  |                  |
| a  0  |  {-1} | 0  a2  0   ab  0   -b2 -b a2 0  0  0  0  |                  |
| b  0  |  {-1} | b2 0   -a2 0   ab  0   0  0  a  b2 0  0  |                  |
| 0  b  |  {-1} | 0  b2  0   -a2 0   ab  0  0  -b a2 0  0  |                  |
| 0  0  |  {-1} | ab 0   b2  0   a2  0   0  0  0  0  a  b2 |                  |
| b  a  |  {-1} | 0  ab  0   b2  0   a2  0  0  0  0  -b a2 |                  |
|                                                                             |
|   0   -a |, {1}  | -a -b2 0   0   0   0   a   0  b   0  0   0  |) : 1       |
|a  0   b  |  {1}  | b  -a2 0   0   0   0   0   a  0   b  0   0  |            |
|   a   0  |  {1}  | 0  0   -a  -b2 0   0   0   0  -a  0  b   0  |            |
|   -b  0  |  {1}  | 0  0   b   -a2 0   0   0   0  0   -a 0   b  |            |
|   0   0  |  {1}  | 0  0   0   0   -a  -b2 -b  0  0   0  a   0  |            |
|   0   0  |  {1}  | 0  0   0   0   b   -a2 0   -b 0   0  0   a  |            |
|b2 -ab a2 |  {-3} | a2 0   ab  0   -b2 0   -a2 b2 0   0  0   0  |            |
|   0   0  |  {-2} | 0  a2  0   ab  0   -b2 -b  -a 0   0  0   0  |            |
|   a2  b2 |  {-3} | b2 0   -a2 0   ab  0   0   0  -a2 b2 0   0  |            |
|   0   0  |  {-2} | 0  b2  0   -a2 0   ab  0   0  -b  -a 0   0  |            |
|   -b2 ab |  {-3} | ab 0   b2  0   a2  0   0   0  0   0  -a2 b2 |            |
|   0   0  |  {-2} | 0  ab  0   b2  0   a2  0   0  0   0  -b  -a |            |
+-----------------------------------------------------------------------------+
|i11 : assert isWellDefined h                                                 |
+-----------------------------------------------------------------------------+
|i12 : prune h                                                                |
|                                                                             |
|o12 = 0 : cokernel | b a 0 0 |                                               |
|                   | 0 0 b a |                                               |
|                                                                             |
|                                                                             |
|      1 : cokernel | b a 0 0 |                                               |
|                   | 0 0 b a |                                               |
|                                                                             |
|                                                                             |
|o12 : ZZdFactorizationMap                                                    |
|-----------------------------------------------------------------------------|
|<------------------- cokernel | b a 0 0 0 0 | : 0                            |
|   | 0   0   0   |            | 0 0 b a 0 0 |                                |
|   | -30 -36 -24 |            | 0 0 0 0 b a |                                |
|                                                                             |
|<------------------ cokernel | b a 0 0 0 0 | : 1                             |
|   | 30 -36 -24 |            | 0 0 b a 0 0 |                                 |
|   | 36 -24 30  |            | 0 0 0 0 b a |                                 |
+-----------------------------------------------------------------------------+
|i13 : assert(source h == HH Hom(D,C))                                        |
+-----------------------------------------------------------------------------+
|i14 : assert(target h == HH Hom(C,C))                                        |
+-----------------------------------------------------------------------------+
+-----------------------------------------------------------------------------+
|i15 : f2 = randomFactorizationMap(C, D, Cycle => true, Degree => 1,          |
|                                                                             |
|           2                           3                                     |
|o15 = 1 : S  <----------------------- S  : 0                                 |
|                {4} | 29  -19 19  |                                          |
|                {4} | -19 -29 -19 |                                          |
|                                                                             |
|           2                                          3                      |
|      0 : S  <-------------------------------------- S  : 1                  |
|                {2} | -29a+19b -19a-19b -19a-29b |                           |
|                {3} | 19       -29      19       |                           |
|                                                                             |
|o15 : ZZdFactorizationMap                                                    |
|-----------------------------------------------------------------------------|
|InternalDegree => 1)                                                         |
+-----------------------------------------------------------------------------+
|i16 : h2 = HH Hom(C,f2)                                                      |
|                                                                             |
|o16 = 1 : subquotient ({2}  | 0  0  1  a   |, {2}  | -a  -b2 0  0            |
|                       {2}  | -1 0  0  -b  |  {2}  | b   -a2 0  0            |
|                       {1}  | -b a  0  0   |  {1}  | 0   0   -a -b2          |
|                       {1}  | 0  -b -a 0   |  {1}  | 0   0   b  -a2          |
|                       {-2} | 0  -b -a -a2 |  {-2} | a2  0   b  0            |
|                       {-1} | 1  0  0  0   |  {-1} | 0   a2  0  b            |
|                       {-2} | b  -a 0  b2  |  {-2} | -b2 0   a  0            |
|                       {-1} | 0  0  1  0   |  {-1} | 0   -b2 0  a            |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|      0 : subquotient ({0}  | 1 0   -b 0   |, {0}  | a2  -b2 0  0            |
|                       {1}  | 0 1   0  0   |  {1}  | b   a   0  0            |
|                       {-1} | 0 -ab a2 -b2 |  {-1} | 0   0   a2 -b2          |
|                       {0}  | 1 0   0  a   |  {0}  | 0   0   b  a            |
|                       {0}  | 1 0   0  0   |  {0}  | a2  0   b  0            |
|                       {0}  | 0 a   0  b   |  {0}  | 0   a2  0  b            |
|                       {0}  | 0 -b  a  0   |  {0}  | -b2 0   a  0            |
|                       {0}  | 1 0   -b a   |  {0}  | 0   -b2 0  a            |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|o16 : ZZdFactorizationMap                                                    |
|-----------------------------------------------------------------------------|
|a   0  -b  0  |) <---------------------------- subquotient ({1} | 0 -1 0  a  |
|0   a  0   -b |     {2} | -19 19 29  0 0 0 |                {1} | 0 0  -1 0  |
|b2  0  a2  0  |     {2} | 0   0  0   0 0 0 |                {1} | 1 0  0  0  |
|0   b2 0   a2 |     {2} | -19 29 -19 0 0 0 |                {0} | a 0  b  b2 |
|-a2 b2 0   0  |     {3} | 0   0  0   0 0 0 |                {0} | b -a 0  0  |
|-b  -a 0   0  |                                             {0} | 0 b  a  0  |
|0   0  -a2 b2 |                                             {1} | 0 -1 0  a  |
|0   0  -b  -a |                                             {1} | 0 0  1  b  |
|                                                            {1} | 1 0  0  0  |
|                                                            {1} | 1 0  0  0  |
|                                                            {1} | 0 1  0  0  |
|                                                            {1} | 0 0  1  0  |
|                                                                             |
|a  0  -b 0  |) <---------------------------- subquotient ({3}  | 0  0  0  0  |
|0  a  0  -b |     {0} | 0  0 0   0 0   0 |                {3}  | 1  0  0  0  |
|b2 0  a2 0  |     {1} | 29 0 -19 0 -19 0 |                {3}  | 0  0  1  0  |
|0  b2 0  a2 |     {1} | 0  0 0   0 0   0 |                {2}  | -b a  -a 0  |
|a  b2 0  0  |     {1} | 0  0 0   0 0   0 |                {2}  | 0  b  0  -a |
|-b a2 0  0  |                                             {2}  | 0  0  0  b  |
|0  0  a  b2 |                                             {-1} | 0  -b 0  0  |
|0  0  -b a2 |                                             {-1} | a  0  0  -b |
|                                                          {-1} | -b 0  -a 0  |
|                                                          {-1} | b  -a a  0  |
|                                                          {-1} | 0  0  b  -a |
|                                                          {-1} | 0  0  0  0  |
|-----------------------------------------------------------------------------|
|0   0   |, {1} | a2  b2  ab  0   0   0  a  0  0  -b 0  0  |) : 0             |
|-a  0   |  {1} | ab  -a2 b2  0   0   0  0  a  0  0  -b 0  |                  |
|0   -a  |  {1} | -b2 ab  a2  0   0   0  0  0  a  0  0  -b |                  |
|0   0   |  {0} | 0   0   0   a2  b2  ab b2 0  0  a2 0  0  |                  |
|-b2 0   |  {0} | 0   0   0   ab  -a2 b2 0  b2 0  0  a2 0  |                  |
|0   -b2 |  {0} | 0   0   0   -b2 ab  a2 0  0  b2 0  0  a2 |                  |
|0   b   |  {1} | a2  0   0   b   0   0  a  0  -b 0  0  0  |                  |
|a   0   |  {1} | 0   a2  0   0   b   0  b  -a 0  0  0  0  |                  |
|-b  -a  |  {1} | 0   0   a2  0   0   b  0  b  a  0  0  0  |                  |
|0   0   |  {1} | -b2 0   0   a   0   0  0  0  0  a  0  -b |                  |
|0   0   |  {1} | 0   -b2 0   0   a   0  0  0  0  b  -a 0  |                  |
|0   0   |  {1} | 0   0   -b2 0   0   a  0  0  0  0  b  a  |                  |
|                                                                             |
|1  0  |, {3}  | -a  0   b   0  0  0  a   0   0   -b  0   0   |) : 1          |
|0  0  |  {3}  | -b  a   0   0  0  0  0   a   0   0   -b  0   |               |
|0  0  |  {3}  | 0   -b  -a  0  0  0  0   0   a   0   0   -b  |               |
|0  -b |  {2}  | 0   0   0   -a 0  b  b2  0   0   a2  0   0   |               |
|a  0  |  {2}  | 0   0   0   -b a  0  0   b2  0   0   a2  0   |               |
|0  a  |  {2}  | 0   0   0   0  -b -a 0   0   b2  0   0   a2  |               |
|-a 0  |  {-1} | a2  0   0   b  0  0  -a2 -b2 -ab 0   0   0   |               |
|0  0  |  {-1} | 0   a2  0   0  b  0  -ab a2  -b2 0   0   0   |               |
|0  -b |  {-1} | 0   0   a2  0  0  b  b2  -ab -a2 0   0   0   |               |
|0  0  |  {-1} | -b2 0   0   a  0  0  0   0   0   -a2 -b2 -ab |               |
|a  0  |  {-1} | 0   -b2 0   0  a  0  0   0   0   -ab a2  -b2 |               |
|-b -a |  {-1} | 0   0   -b2 0  0  a  0   0   0   b2  -ab -a2 |               |
+-----------------------------------------------------------------------------+
|i17 : assert isWellDefined h2                                                |
+-----------------------------------------------------------------------------+
|i18 : prune h2                                                               |
|                                                                             |
|o18 = 1 : cokernel | b a 0 0 | <------------------ cokernel | b a 0 0 0 0 | :|
|                   | 0 0 b a |    | -19 19 29  |            | 0 0 b a 0 0 |  |
|                                  | -19 29 -19 |            | 0 0 0 0 b a |  |
|                                                                             |
|      0 : cokernel | b a 0 0 | <------------------ cokernel | b a 0 0 0 0 | :|
|                   | 0 0 b a |    | 0  0   0   |            | 0 0 b a 0 0 |  |
|                                  | 29 -19 -19 |            | 0 0 0 0 b a |  |
|                                                                             |
|o18 : ZZdFactorizationMap                                                    |
|-----------------------------------------------------------------------------|
|0                                                                            |
|                                                                             |
|                                                                             |
|                                                                             |
|1                                                                            |
+-----------------------------------------------------------------------------+

A boundary will always induce the zero map.

+-----------------------------------------------------------------------------+
|i19 : f3 = randomFactorizationMap(D, C, Boundary => true)                    |
|                                                                             |
|           3                                      2                          |
|o19 = 0 : S  <---------------------------------- S  : 0                      |
|                {3} | -10ab+22b2 -22a2b-10b3 |                               |
|                {3} | -29ab+29b2 -29a2b-29b3 |                               |
|                {3} | -8ab+24b2  -24a2b-8b3  |                               |
|                                                                             |
|           3                                    2                            |
|      1 : S  <-------------------------------- S  : 1                        |
|                {5} | -10ab+8b2 -22ab+24b2 |                                 |
|                {5} | 29ab-10b2 29ab-22b2  |                                 |
|                {5} | -8ab-29b2 -24ab-29b2 |                                 |
|                                                                             |
|o19 : ZZdFactorizationMap                                                    |
+-----------------------------------------------------------------------------+
|i20 : h3 = HH Hom(C,f3)                                                      |
|                                                                             |
|o20 = 0 : subquotient ({1} | 0 -1 0  a  0   0   |, {1} | a2  b2  ab  0       |
|                       {1} | 0 0  -1 0  -a  0   |  {1} | ab  -a2 b2  0       |
|                       {1} | 1 0  0  0  0   -a  |  {1} | -b2 ab  a2  0       |
|                       {0} | a 0  b  b2 0   0   |  {0} | 0   0   0   a2      |
|                       {0} | b -a 0  0  -b2 0   |  {0} | 0   0   0   ab      |
|                       {0} | 0 b  a  0  0   -b2 |  {0} | 0   0   0   -b2     |
|                       {1} | 0 -1 0  a  0   b   |  {1} | a2  0   0   b       |
|                       {1} | 0 0  1  b  a   0   |  {1} | 0   a2  0   0       |
|                       {1} | 1 0  0  0  -b  -a  |  {1} | 0   0   a2  0       |
|                       {1} | 1 0  0  0  0   0   |  {1} | -b2 0   0   a       |
|                       {1} | 0 1  0  0  0   0   |  {1} | 0   -b2 0   0       |
|                       {1} | 0 0  1  0  0   0   |  {1} | 0   0   -b2 0       |
|                                                                             |
|      1 : subquotient ({3}  | 0  0  0  0  1  0  |, {3}  | -a  0   b   0      |
|                       {3}  | 1  0  0  0  0  0  |  {3}  | -b  a   0   0      |
|                       {3}  | 0  0  1  0  0  0  |  {3}  | 0   -b  -a  0      |
|                       {2}  | -b a  -a 0  0  -b |  {2}  | 0   0   0   -a     |
|                       {2}  | 0  b  0  -a a  0  |  {2}  | 0   0   0   -b     |
|                       {2}  | 0  0  0  b  0  a  |  {2}  | 0   0   0   0      |
|                       {-1} | 0  -b 0  0  -a 0  |  {-1} | a2  0   0   b      |
|                       {-1} | a  0  0  -b 0  0  |  {-1} | 0   a2  0   0      |
|                       {-1} | -b 0  -a 0  0  -b |  {-1} | 0   0   a2  0      |
|                       {-1} | b  -a a  0  0  0  |  {-1} | -b2 0   0   a      |
|                       {-1} | 0  0  b  -a a  0  |  {-1} | 0   -b2 0   0      |
|                       {-1} | 0  0  0  0  -b -a |  {-1} | 0   0   -b2 0      |
|                                                                             |
|o20 : ZZdFactorizationMap                                                    |
|-----------------------------------------------------------------------------|
|0   0  a  0  0  -b 0  0  |) <----- subquotient ({0}  | 1 0   -b 0   |, {0}   |
|0   0  0  a  0  0  -b 0  |     0                {1}  | 0 1   0  0   |  {1}   |
|0   0  0  0  a  0  0  -b |                      {-1} | 0 -ab a2 -b2 |  {-1}  |
|b2  ab b2 0  0  a2 0  0  |                      {0}  | 1 0   0  a   |  {0}   |
|-a2 b2 0  b2 0  0  a2 0  |                      {0}  | 1 0   0  0   |  {0}   |
|ab  a2 0  0  b2 0  0  a2 |                      {0}  | 0 a   0  b   |  {0}   |
|0   0  a  0  -b 0  0  0  |                      {0}  | 0 -b  a  0   |  {0}   |
|b   0  b  -a 0  0  0  0  |                      {0}  | 1 0   -b a   |  {0}   |
|0   b  0  b  a  0  0  0  |                                                   |
|0   0  0  0  0  a  0  -b |                                                   |
|a   0  0  0  0  b  -a 0  |                                                   |
|0   a  0  0  0  0  b  a  |                                                   |
|                                                                             |
|0  0  a   0   0   -b  0   0   |) <----- subquotient ({2}  | 0  0  1  a   |,  |
|0  0  0   a   0   0   -b  0   |     0                {2}  | -1 0  0  -b  |   |
|0  0  0   0   a   0   0   -b  |                      {1}  | -b a  0  0   |   |
|0  b  b2  0   0   a2  0   0   |                      {1}  | 0  -b -a 0   |   |
|a  0  0   b2  0   0   a2  0   |                      {-2} | 0  -b -a -a2 |   |
|-b -a 0   0   b2  0   0   a2  |                      {-1} | 1  0  0  0   |   |
|0  0  -a2 -b2 -ab 0   0   0   |                      {-2} | b  -a 0  b2  |   |
|b  0  -ab a2  -b2 0   0   0   |                      {-1} | 0  0  1  0   |   |
|0  b  b2  -ab -a2 0   0   0   |                                              |
|0  0  0   0   0   -a2 -b2 -ab |                                              |
|a  0  0   0   0   -ab a2  -b2 |                                              |
|0  a  0   0   0   b2  -ab -a2 |                                              |
|-----------------------------------------------------------------------------|
|| a2  -b2 0  0   a  0  -b 0  |) : 0                                          |
|| b   a   0  0   0  a  0  -b |                                               |
|| 0   0   a2 -b2 b2 0  a2 0  |                                               |
|| 0   0   b  a   0  b2 0  a2 |                                               |
|| a2  0   b  0   a  b2 0  0  |                                               |
|| 0   a2  0  b   -b a2 0  0  |                                               |
|| -b2 0   a  0   0  0  a  b2 |                                               |
|| 0   -b2 0  a   0  0  -b a2 |                                               |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|{2}  | -a  -b2 0  0   a   0  -b  0  |) : 1                                   |
|{2}  | b   -a2 0  0   0   a  0   -b |                                        |
|{1}  | 0   0   -a -b2 b2  0  a2  0  |                                        |
|{1}  | 0   0   b  -a2 0   b2 0   a2 |                                        |
|{-2} | a2  0   b  0   -a2 b2 0   0  |                                        |
|{-1} | 0   a2  0  b   -b  -a 0   0  |                                        |
|{-2} | -b2 0   a  0   0   0  -a2 b2 |                                        |
|{-1} | 0   -b2 0  a   0   0  -b  -a |                                        |
+-----------------------------------------------------------------------------+
|i21 : assert isWellDefined h3                                                |
+-----------------------------------------------------------------------------+
|i22 : assert(h3 == 0)                                                        |
+-----------------------------------------------------------------------------+

See also
========

  * HH ZZdFactorization -- homology of a
    ZZ/d-graded factorization
  * HH_ZZ ZZdFactorization -- homology or
    cohomology module of a ZZ/d-graded factorization
  * prune(ZZdFactorizationMap)
    -- minimal presentation of all
    terms in a ZZ/d-graded factorization

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

  * HH ZZdFactorizationMap -- induced map on
    homology or cohomology
  * "HH_ZZ ZZdFactorizationMap"
-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:4710:0.

HH_ZZ ZZdFactorization -- homology or cohomology module of a ZZ/d-graded factorization
**************************************************************************************

  * Function: homology (Macaulay2Doc),
  * Usage:
        HH_i C
  * Inputs:
      * i, an integer (Macaulay2Doc),
      * C, a ZZ/d graded factorization,
  * Outputs:
      * a module (Macaulay2Doc), the $i$-th homology or
        cohomology of the ZZ/d-graded factorization

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

The homology of a 2-fold factorization $H$ is defined by ker dd^C/image dd^C.
The differential of the homology complex is the zero map. If the differentials
of the factorization do not compose to 0, then the homology is not defined.
Similarly, in order to make sense of the homology of a d-fold factorization for
d > 2, one should specify both the spot to take homology in, and also how many
compositions of the differentials to use (since there are multiple ways to
compose the differentials for a longer factorization)

An easy way to construct complexes from factorizations is to compute the
endomorphisms of the factorization. In general, if $F$ is a factorization of
some polynomial $f$ and $G$ is a factorization of some polynomial $g$, then
$\operatorname{Hom} (F,G)$ is a factorization of $g-f$.

+----------------------------+
|i1 : Q = ZZ/11[x,y];        |
+----------------------------+
|i2 : F = randomLinearMF(2,Q)|
|                            |
|      4      4      4       |
|o2 = Q  <-- Q  <-- Q        |
|                            |
|     0      1      0        |
|                            |
|o2 : ZZdFactorization       |
+----------------------------+
|i3 : E = Hom(F,F)           |
|                            |
|      32      32      32    |
|o3 = Q   <-- Q   <-- Q      |
|                            |
|     0       1       0      |
|                            |
|o3 : ZZdFactorization       |
+----------------------------+
|i4 : isZZdComplex E         |
|                            |
|o4 = true                   |
+----------------------------+

Thus $E$ is a $2$-periodic complex. This means that the homology is
well-defined, and moreover the indices of homology are also taken modulo 2:

+---------------------------------------------------------------------+
|i5 : prune HH_0 E                                                    |
|                                                                     |
|o5 = cokernel | y x 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                    |
|              | 0 0 y x 0 0 0 0 0 0 0 0 0 0 0 0 |                    |
|              | 0 0 0 0 y x 0 0 0 0 0 0 0 0 0 0 |                    |
|              | 0 0 0 0 0 0 y x 0 0 0 0 0 0 0 0 |                    |
|              | 0 0 0 0 0 0 0 0 y x 0 0 0 0 0 0 |                    |
|              | 0 0 0 0 0 0 0 0 0 0 y x 0 0 0 0 |                    |
|              | 0 0 0 0 0 0 0 0 0 0 0 0 y x 0 0 |                    |
|              | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 y x |                    |
|                                                                     |
|                            8                                        |
|o5 : Q-module, quotient of Q                                         |
+---------------------------------------------------------------------+
|i6 : prune HH_1 E                                                    |
|                                                                     |
|o6 = cokernel | y x 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                    |
|              | 0 0 y x 0 0 0 0 0 0 0 0 0 0 0 0 |                    |
|              | 0 0 0 0 y x 0 0 0 0 0 0 0 0 0 0 |                    |
|              | 0 0 0 0 0 0 y x 0 0 0 0 0 0 0 0 |                    |
|              | 0 0 0 0 0 0 0 0 y x 0 0 0 0 0 0 |                    |
|              | 0 0 0 0 0 0 0 0 0 0 y x 0 0 0 0 |                    |
|              | 0 0 0 0 0 0 0 0 0 0 0 0 y x 0 0 |                    |
|              | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 y x |                    |
|                                                                     |
|                            8                                        |
|o6 : Q-module, quotient of Q                                         |
+---------------------------------------------------------------------+
|i7 : prune HH_4 E                                                    |
|                                                                     |
|o7 = cokernel | y x 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                    |
|              | 0 0 y x 0 0 0 0 0 0 0 0 0 0 0 0 |                    |
|              | 0 0 0 0 y x 0 0 0 0 0 0 0 0 0 0 |                    |
|              | 0 0 0 0 0 0 y x 0 0 0 0 0 0 0 0 |                    |
|              | 0 0 0 0 0 0 0 0 y x 0 0 0 0 0 0 |                    |
|              | 0 0 0 0 0 0 0 0 0 0 y x 0 0 0 0 |                    |
|              | 0 0 0 0 0 0 0 0 0 0 0 0 y x 0 0 |                    |
|              | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 y x |                    |
|                                                                     |
|                            8                                        |
|o7 : Q-module, quotient of Q                                         |
+---------------------------------------------------------------------+
|i8 : R = Q/(potential F);                                            |
+---------------------------------------------------------------------+
|i9 : netList for i to 3 list prune Ext^i (coker vars R, coker vars R)|
|                                                                     |
|     +-------------------------+                                     |
|o9 = |cokernel | y x |         |                                     |
|     +-------------------------+                                     |
|     |cokernel {-1} | y x 0 0 ||                                     |
|     |         {-1} | 0 0 y x ||                                     |
|     +-------------------------+                                     |
|     |cokernel {-2} | y x 0 0 ||                                     |
|     |         {-2} | 0 0 y x ||                                     |
|     +-------------------------+                                     |
|     |cokernel {-3} | y x 0 0 ||                                     |
|     |         {-3} | 0 0 y x ||                                     |
|     +-------------------------+                                     |
+---------------------------------------------------------------------+

In the above case, the homology of the endomorphism factorization is computing
the stable Ext of the residue field over the hypersurface $R/(f)$, ie, the Ext
module obtained by taking sufficiently high Ext values.

See also
========

  * prune (Macaulay2Doc) -- prune, e.g., compute a minimal
    presentation
  * dual(Complex) (Complexes) -- make the dual of a
    complex

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

  * HH_ZZ ZZdFactorization -- homology or
    cohomology module of a ZZ/d-graded factorization
  * "HH_ZZ(ZZ,ZZdFactorization)"
-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:1118:0.

higherHomotopyFactorization -- Constructs the matrix factorization associated with a system of higher homotopies
****************************************************************************************************************

  * Usage:
        higherHomotopyFactorization(L, C)
        higherHomotopyFactorization(f, C)
  * Inputs:
      * L, a list (Macaulay2Doc), A list of ring elements, usually
        a regular sequence
      * C, a complex (Complexes), A complex whose homology is
        annihilated by the elements of the list
      * f, a ring element (Macaulay2Doc), A single ring
        element annihilating the homology of C
  * Outputs:
      * a ZZ/d graded factorization, The matrix
        factorization associated with the system of higher homotopies built
        from C, with respect to the sequence of ring elements

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

For each sequence of elements $f_1 , \dots , f_c \in S$ annihilating the
homology of a complex, there is an associated system of higher homotopies that
can be used to construct a matrix factorization of $f_1 t_1 + f_2 t_2 + \cdots
+ f_c t_c \in S[t_1, \dots , t_c]$. When $c= 1$, this simply recovers a matrix
factorization of $f = f_1$. This function uses existing commands from the
CompleteIntersectionResolutions, package.

+---------------------------------------------------------------------------+
|i1 : S = ZZ/101[x,y,z]                                                     |
|                                                                           |
|o1 = S                                                                     |
|                                                                           |
|o1 : PolynomialRing                                                        |
+---------------------------------------------------------------------------+
|i2 : K = koszulComplex vars S                                              |
|                                                                           |
|      1      3      3      1                                               |
|o2 = S  <-- S  <-- S  <-- S                                                |
|                                                                           |
|     0      1      2      3                                                |
|                                                                           |
|o2 : Complex                                                               |
+---------------------------------------------------------------------------+
|i3 : L = {x^2,y^2,z^2}                                                     |
|                                                                           |
|       2   2   2                                                           |
|o3 = {x , y , z }                                                          |
|                                                                           |
|o3 : List                                                                  |
+---------------------------------------------------------------------------+
|i4 : H = higherHomotopyFactorization(L, K)                                 |
|                                                                           |
|                4                4                4                        |
|o4 = (S[t ..t ])  <-- (S[t ..t ])  <-- (S[t ..t ])                         |
|         1   3            1   3            1   3                           |
|                                                                           |
|     0                1                0                                   |
|                                                                           |
|o4 : ZZdFactorization                                                      |
+---------------------------------------------------------------------------+
|i5 : H.dd                                                                  |
|                                                                           |
|                    4                                                 4    |
|o5 = 1 : (S[t ..t ])  <----------------------------------- (S[t ..t ])  : 0|
|             1   3       {0, 1} | xt_1 -y   -z    0    |       1   3       |
|                         {0, 1} | yt_2 x    0     -z   |                   |
|                         {0, 1} | zt_3 0    x     y    |                   |
|                         {0, 3} | 0    zt_3 -yt_2 xt_1 |                   |
|                                                                           |
|                    4                                                4     |
|     0 : (S[t ..t ])  <---------------------------------- (S[t ..t ])  : 1 |
|             1   3       {0, 0} | x     y     z    0  |       1   3        |
|                         {0, 2} | -yt_2 xt_1  0    z  |                    |
|                         {0, 2} | -zt_3 0     xt_1 -y |                    |
|                         {0, 2} | 0     -zt_3 yt_2 x  |                    |
|                                                                           |
|o5 : ZZdFactorizationMap                                                   |
+---------------------------------------------------------------------------+
|i6 : isdFactorization H                                                    |
|                                                                           |
|             2      2      2                                               |
|o6 = (true, x t  + y t  + z t )                                            |
|               1      2      3                                             |
|                                                                           |
|o6 : Sequence                                                              |
+---------------------------------------------------------------------------+
|i7 : H' = higherHomotopyFactorization(x^3+y^3+z^3, K)                      |
|                                                                           |
|      4      4      4                                                      |
|o7 = S  <-- S  <-- S                                                       |
|                                                                           |
|     0      1      0                                                       |
|                                                                           |
|o7 : ZZdFactorization                                                      |
+---------------------------------------------------------------------------+
|i8 : H'.dd                                                                 |
|                                                                           |
|          4                            4                                   |
|o8 = 1 : S  <------------------------ S  : 0                               |
|               {1} | x2 -y -z  0  |                                        |
|               {1} | y2 x  0   -z |                                        |
|               {1} | z2 0  x   y  |                                        |
|               {3} | 0  z2 -y2 x2 |                                        |
|                                                                           |
|          4                             4                                  |
|     0 : S  <------------------------- S  : 1                              |
|               {0} | x   y   z  0  |                                       |
|               {2} | -y2 x2  0  z  |                                       |
|               {2} | -z2 0   x2 -y |                                       |
|               {2} | 0   -z2 y2 x  |                                       |
|                                                                           |
|o8 : ZZdFactorizationMap                                                   |
+---------------------------------------------------------------------------+

The terms of the higher homotopies can be accessed from the differentials. For
instance, each component of a higher homotopy is a map $C_i \to C_{i+t}$ for
some odd integer $t$. The user can access this component of the higher
homotopies as follows:

+-------------------------------------------------------------------+
|i9 : dH0 = H'.dd_0;                                                |
|                                                                   |
|             4      4                                              |
|o9 : Matrix S  <-- S                                               |
+-------------------------------------------------------------------+
|i10 : dH1 = H'.dd_1;                                               |
|                                                                   |
|              4      4                                             |
|o10 : Matrix S  <-- S                                              |
+-------------------------------------------------------------------+
|i11 : dH0_[0]^[1] --the higher homotopy K_0 --> K_1                |
|                                                                   |
|o11 = {1} | x2 |                                                   |
|      {1} | y2 |                                                   |
|      {1} | z2 |                                                   |
|                                                                   |
|              3      1                                             |
|o11 : Matrix S  <-- S                                              |
+-------------------------------------------------------------------+
|i12 : dH0_[2]^[3] --the higher homotopy K_2 --> K_3                |
|                                                                   |
|o12 = {3} | z2 -y2 x2 |                                            |
|                                                                   |
|              1      3                                             |
|o12 : Matrix S  <-- S                                              |
+-------------------------------------------------------------------+
|i13 : dH0_[2]^[1] --the original differential of the Koszul complex|
|                                                                   |
|o13 = {1} | -y -z 0  |                                             |
|      {1} | x  0  -z |                                             |
|      {1} | 0  x  y  |                                             |
|                                                                   |
|              3      3                                             |
|o13 : Matrix S  <-- S                                              |
+-------------------------------------------------------------------+
|i14 : dH1_[1]^[2] --the higher homotopy K_1 --> K_2                |
|                                                                   |
|o14 = {2} | -y2 x2  0  |                                           |
|      {2} | -z2 0   x2 |                                           |
|      {2} | 0   -z2 y2 |                                           |
|                                                                   |
|              3      3                                             |
|o14 : Matrix S  <-- S                                              |
+-------------------------------------------------------------------+

Note that the construction of higher homotopies does not require that the
starting resolution is finite. One can attempt to build factorizations from any
complex as long as the ring elements annihilate the homology:

+-----------------------------------------------------------------------------+
|i15 : Q = ZZ/101[x,y]                                                        |
|                                                                             |
|o15 = Q                                                                      |
|                                                                             |
|o15 : PolynomialRing                                                         |
+-----------------------------------------------------------------------------+
|i16 : K = koszulComplex vars Q;                                              |
+-----------------------------------------------------------------------------+
|i17 : C = complex {K.dd_1, map(source K.dd_1, target K.dd_2, K.dd_2*K.dd_1), |
|                                                                             |
|       1      2      2      1                                                |
|o17 = Q  <-- Q  <-- Q  <-- Q                                                 |
|                                                                             |
|      0      1      2      3                                                 |
|                                                                             |
|o17 : Complex                                                                |
|-----------------------------------------------------------------------------|
|K.dd_2}                                                                      |
+-----------------------------------------------------------------------------+
|i18 : isWellDefined C                                                        |
|                                                                             |
|o18 = true                                                                   |
+-----------------------------------------------------------------------------+
|i19 : Cn = higherHomotopyFactorization(x^3+y^3, C)                           |
|                                                                             |
|       3      3      3                                                       |
|o19 = Q  <-- Q  <-- Q                                                        |
|                                                                             |
|      0      1      0                                                        |
|                                                                             |
|o19 : ZZdFactorization                                                       |
+-----------------------------------------------------------------------------+
|i20 : Cn.dd                                                                  |
|                                                                             |
|           3                          3                                      |
|o20 = 1 : Q  <---------------------- Q  : 0                                  |
|                {1} | x2 -xy -y2 |                                           |
|                {1} | y2 x2  xy  |                                           |
|                {2} | xy -y2 x2  |                                           |
|                                                                             |
|           3                       3                                         |
|      0 : Q  <------------------- Q  : 1                                     |
|                {0} | x  y 0  |                                              |
|                {1} | 0  x -y |                                              |
|                {1} | -y 0 x  |                                              |
|                                                                             |
|o20 : ZZdFactorizationMap                                                    |
+-----------------------------------------------------------------------------+
|i21 : Cn.dd^2                                                                |
|                                                                             |
|           3                                 3                               |
|o21 = 0 : Q  <----------------------------- Q  : 0                           |
|                {0} | x3+y3 0     0     |                                    |
|                {1} | 0     x3+y3 0     |                                    |
|                {1} | 0     0     x3+y3 |                                    |
|                                                                             |
|           3                                 3                               |
|      1 : Q  <----------------------------- Q  : 1                           |
|                {1} | x3+y3 0     0     |                                    |
|                {1} | 0     x3+y3 0     |                                    |
|                {2} | 0     0     x3+y3 |                                    |
|                                                                             |
|o21 : ZZdFactorizationMap                                                    |
+-----------------------------------------------------------------------------+

This function can also be used to construct matrix factor

See also
========

  * Making ZZdFactorizations -- Information
    about the basic constructors
  * toBranchedCover -- Converts a d-fold matrix
    factorization into a maximal Cohen-Macaulay module over a d-fold branched
    cover of the potential

Ways to use higherHomotopyFactorization:
========================================

  * "higherHomotopyFactorization(List,Complex)"
  * "higherHomotopyFactorization(RingElement,Complex)"

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

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

-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:6033:0.

Hom(Complex,ZZdFactorization) -- the ZZ/d-graded homomorphism factorization formed by folding the complex, then taking the ZZ/d-graded Hom factorization
********************************************************************************************************************************************************

  * Function: Hom (Macaulay2Doc),
  * Usage:
        D = Hom(C1,C2)
  * Inputs:
      * C1, a complex (Complexes), or a ZZ/d graded factorization,
      * C2, a ZZ/d graded factorization, or a
        complex (Complexes), with an optional Symbol or RingElement
        input specifying a root of unity
  * Optional inputs (Macaulay2Doc),:
      * DegreeLimit (Macaulay2Doc), => ..., default value null,
      * MinimalGenerators (Macaulay2Doc), => ..., default value true,
      * Strategy (Macaulay2Doc), => ..., default value null,
  * Outputs:
      * D, a ZZ/d graded factorization, the
        ZZ/d-graded factorization of homomorphisms between C1 and C2

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

The factorization of homomorphisms is a ZZ/d-graded factorization $D$ whose
$i$th component is the direct sum of $Hom(C1_j, C2_{k})$ over all $k-j = i \mod
d$. The differential on $Hom(C1_j, C2_{k})$ is the differential $Hom(id_{C1},
dd^{C2}) + t^j Hom(dd^{C1}, id_{C2})$ where $t$ is a primitive $d$th root of
unity.

The use of a primitive $d$th root of unity adds some subtlety to this
construction, since for $d > 2$ the user may need to adjoin a root of unity
using the \texttt{adjoinRoot} command. In general, if $C1$ is a factorizations
of $f$ and $C2$ is a factorization of $g$, then the Hom factorization
$\operatorname{Hom} (C1,C2)$ is a factorization of the difference $g-f$.

If one of the inputs is a complex, the method will automatically Fold,
the complex and take the d-periodic Hom.

+-----------------------------+
|i1 : S = ZZ/101[a..c];       |
+-----------------------------+
|i2 : f = a^3 + b^3 + c^3     |
|                             |
|      3    3    3            |
|o2 = a  + b  + c             |
|                             |
|o2 : S                       |
+-----------------------------+
|i3 : C = randomTailMF(f)     |
|                             |
|      6      6      6        |
|o3 = S  <-- S  <-- S         |
|                             |
|     0      1      0         |
|                             |
|o3 : ZZdFactorization        |
+-----------------------------+
|i4 : K = koszulComplex vars S|
|                             |
|      1      3      3      1 |
|o4 = S  <-- S  <-- S  <-- S  |
|                             |
|     0      1      2      3  |
|                             |
|o4 : Complex                 |
+-----------------------------+
|i5 : D = Hom(K,C)            |
|                             |
|      48      48      48     |
|o5 = S   <-- S   <-- S       |
|                             |
|     0       1       0       |
|                             |
|o5 : ZZdFactorization        |
+-----------------------------+
|i6 : isWellDefined D         |
|                             |
|o6 = true                    |
+-----------------------------+
|i7 : potential C             |
|                             |
|      3    3    3            |
|o7 = a  + b  + c             |
|                             |
|o7 : S                       |
+-----------------------------+
|i8 : potential D             |
|                             |
|        3    3    3          |
|o8 = - a  - b  - c           |
|                             |
|o8 : S                       |
+-----------------------------+

See also
========

  * randomFactorizationMap(ZZdFactorization,ZZdFactorization)
    -- a random map of ZZ/d-graded factorizations
  * indices (Macaulay2Doc) -- indices of a polynomial; also
    components for a direct sum
  * components (Macaulay2Doc) -- list the components of a
    direct sum
  * Hom(ZZdFactorizationMap,ZZdFactorizationMap)
    -- the map of
    factorizations between Hom complexes

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

  * Hom(Complex,ZZdFactorization),
    -- the ZZ/d-graded homomorphism factorization formed by folding the
    complex, then taking the ZZ/d-graded Hom factorization
  * "Hom(Complex,ZZdFactorization,RingElement)"
  * "Hom(Complex,ZZdFactorization,Symbol)"
  * "Hom(ZZdFactorization,Complex)"
  * "Hom(ZZdFactorization,Complex,RingElement)"
  * "Hom(ZZdFactorization,Complex,Symbol)"
-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:1538:0.

Hom(ComplexMap,ZZdFactorizationMap) -- the map of factorizations between Hom factorizations formed by first folding the relevant complex map
********************************************************************************************************************************************

  * Function: Hom (Macaulay2Doc),
  * Usage:
        h = Hom(f,g)
  * Inputs:
      * f, a map of complexes (Complexes), or a map of ZZ/d-graded factorizations,
      * g, a map of ZZ/d-graded factorizations, or
        a map of complexes (Complexes),
  * Optional inputs (Macaulay2Doc),:
      * DegreeLimit (Macaulay2Doc), => ..., default value null,
      * MinimalGenerators (Macaulay2Doc), => ..., default value true,
      * Strategy (Macaulay2Doc), => ..., default value null,
  * Outputs:
      * h, a map of ZZ/d-graded factorizations,

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

The maps $f : C \to D$ and $g : E \to F$ of ZZ/d-graded factorizations induces
the map $h = Hom(f,g) : Hom(D,E) \to Hom(C,F)$ defined by $\phi \mapsto g \phi
f$.

+-----------------------------+
|i1 : S = ZZ/101[a,b];        |
+-----------------------------+
|i2 : R = S/(a^3+b^3);        |
+-----------------------------+
|i3 : m = ideal vars R        |
|                             |
|o3 = ideal (a, b)            |
|                             |
|o3 : Ideal of R              |
+-----------------------------+
|i4 : C = tailMF m            |
|                             |
|      2      2      2        |
|o4 = S  <-- S  <-- S         |
|                             |
|     0      1      0         |
|                             |
|o4 : ZZdFactorization        |
+-----------------------------+
|i5 : D = tailMF (m^2)        |
|                             |
|      3      3      3        |
|o5 = S  <-- S  <-- S         |
|                             |
|     0      1      0         |
|                             |
|o5 : ZZdFactorization        |
+-----------------------------+
|i6 : K = koszulComplex vars S|
|                             |
|      1      2      1        |
|o6 = S  <-- S  <-- S         |
|                             |
|     0      1      2         |
|                             |
|o6 : Complex                 |
+-----------------------------+
|i7 : H = Hom(K, C)           |
|                             |
|      8      8      8        |
|o7 = S  <-- S  <-- S         |
|                             |
|     0      1      0         |
|                             |
|o7 : ZZdFactorization        |
+-----------------------------+
|i8 : potential H             |
|                             |
|        3    3               |
|o8 = - a  - b                |
|                             |
|o8 : S                       |
+-----------------------------+
|i9 : H' = Hom(D, K)          |
|                             |
|      12      12      12     |
|o9 = S   <-- S   <-- S       |
|                             |
|     0       1       0       |
|                             |
|o9 : ZZdFactorization        |
+-----------------------------+
|i10 : potential H'           |
|                             |
|       3    3                |
|o10 = a  + b                 |
|                             |
|o10 : S                      |
+-----------------------------+
|i11 : isZZdComplex (H**H')   |
|                             |
|o11 = true                   |
+-----------------------------+

See also
========

  * homomorphism(ZZdFactorizationMap)
    -- get the homomorphism from an
    element of Hom
  * homomorphism'(ZZdFactorizationMap)
    -- get the element of Hom from a
    map of factorizations
  * randomFactorizationMap(ZZdFactorization,ZZdFactorization)
    -- a random map of ZZ/d-graded factorizations
  * Hom(ZZdFactorization,ZZdFactorization)
    -- the ZZ/d-graded
    homomorphism factorization between two ZZ/d-graded factorizations

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

  * Hom(ComplexMap,ZZdFactorizationMap)
    -- the map of factorizations
    between Hom factorizations formed by first folding the relevant complex map
  * "Hom(ComplexMap,ZZdFactorizationMap,RingElement)"
  * "Hom(ComplexMap,ZZdFactorizationMap,Symbol)"
  * "Hom(ZZdFactorizationMap,ComplexMap)"
  * "Hom(ZZdFactorizationMap,ComplexMap,RingElement)"
  * "Hom(ZZdFactorizationMap,ComplexMap,Symbol)"
-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:3375:0.

Hom(ZZdFactorization,ZZdFactorization) -- the ZZ/d-graded homomorphism factorization between two ZZ/d-graded factorizations
***************************************************************************************************************************

  * Function: Hom (Macaulay2Doc),
  * Usage:
        D = Hom(C1,C2)
  * Inputs:
      * C1, a ZZ/d graded factorization, or a
        module (Macaulay2Doc), or a ring (Macaulay2Doc),
      * C2, a ZZ/d graded factorization, or a
        module (Macaulay2Doc), or a ring (Macaulay2Doc),
  * Optional inputs (Macaulay2Doc),:
      * DegreeLimit (Macaulay2Doc), => ..., default value null,
      * MinimalGenerators (Macaulay2Doc), => ..., default value true,
      * Strategy (Macaulay2Doc), => ..., default value null,
  * Outputs:
      * D, a ZZ/d graded factorization, the
        ZZ/d-graded factorization of homomorphisms between C1 and C2

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

The factorization of homomorphisms is a ZZ/d-graded factorization $D$ whose
$i$th component is the direct sum of $Hom(C1_j, C2_{k})$ over all $k-j = i \mod
d$. The differential on $Hom(C1_j, C2_{k})$ is the differential $Hom(id_{C1},
dd^{C2}) + t^j Hom(dd^{C1}, id_{C2})$ where $t$ is a primitive $d$th root of
unity.

The use of a primitive $d$th root of unity adds some subtlety to this
construction, since for $d > 2$ the user may need to adjoin a root of unity
using the \texttt{adjoinRoot} command. In general, if $C1$ is a factorizations
of $f$ and $C2$ is a factorization of $g$, then the Hom factorization
$\operatorname{Hom} (C1,C2)$ is a factorization of the difference $g-f$.

+-----------------------------------------------------------------------------+
|i1 : S = ZZ/101[a..c];                                                       |
+-----------------------------------------------------------------------------+
|i2 : f = a^3 + b^3 + c^3                                                     |
|                                                                             |
|      3    3    3                                                            |
|o2 = a  + b  + c                                                             |
|                                                                             |
|o2 : S                                                                       |
+-----------------------------------------------------------------------------+
|i3 : C = randomTailMF(f)                                                     |
|                                                                             |
|      6      6      6                                                        |
|o3 = S  <-- S  <-- S                                                         |
|                                                                             |
|     0      1      0                                                         |
|                                                                             |
|o3 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i4 : D = Hom(C,C)                                                            |
|                                                                             |
|      72      72      72                                                     |
|o4 = S   <-- S   <-- S                                                       |
|                                                                             |
|     0       1       0                                                       |
|                                                                             |
|o4 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i5 : isZZdComplex D                                                          |
|                                                                             |
|o5 = true                                                                    |
+-----------------------------------------------------------------------------+
|i6 : Q = ZZ/101[x,y];                                                        |
+-----------------------------------------------------------------------------+
|i7 : F = randomLinearMF(2,Q)                                                 |
|                                                                             |
|      4      4      4                                                        |
|o7 = Q  <-- Q  <-- Q                                                         |
|                                                                             |
|     0      1      0                                                         |
|                                                                             |
|o7 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i8 : E = Hom(F,F)                                                            |
|                                                                             |
|      32      32      32                                                     |
|o8 = Q   <-- Q   <-- Q                                                       |
|                                                                             |
|     0       1       0                                                       |
|                                                                             |
|o8 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i9 : diffs = E.dd                                                            |
|                                                                             |
|          32                                                                 |
|o9 = 1 : Q   <---------------------------------------------------------------|
|                | -y  0    -30y -38x 0  0    0    0    0   0    0    0    0  |
|                | 0   -y   -x   x    0  0    0    0    0   0    0    0    0  |
|                | -x  -38x -y   0    0  0    0    0    0   0    0    0    0  |
|                | -x  30y  0    -y   0  0    0    0    0   0    0    0    0  |
|                | 0   0    0    0    -y 0    -30y -38x 0   0    0    0    0  |
|                | 0   0    0    0    0  -y   -x   x    0   0    0    0    0  |
|                | 0   0    0    0    -x -38x -y   0    0   0    0    0    0  |
|                | 0   0    0    0    -x 30y  0    -y   0   0    0    0    0  |
|                | 0   0    0    0    0  0    0    0    -y  0    -30y -38x 0  |
|                | 0   0    0    0    0  0    0    0    0   -y   -x   x    0  |
|                | 0   0    0    0    0  0    0    0    -x  -38x -y   0    0  |
|                | 0   0    0    0    0  0    0    0    -x  30y  0    -y   0  |
|                | 0   0    0    0    0  0    0    0    0   0    0    0    -y |
|                | 0   0    0    0    0  0    0    0    0   0    0    0    0  |
|                | 0   0    0    0    0  0    0    0    0   0    0    0    -x |
|                | 0   0    0    0    0  0    0    0    0   0    0    0    -x |
|                | -y  0    0    0    0  0    0    0    x   0    0    0    x  |
|                | 0   -y   0    0    0  0    0    0    0   x    0    0    0  |
|                | 0   0    -y   0    0  0    0    0    0   0    x    0    0  |
|                | 0   0    0    -y   0  0    0    0    0   0    0    x    0  |
|                | 0   0    0    0    -y 0    0    0    38x 0    0    0    -30|
|                | 0   0    0    0    0  -y   0    0    0   38x  0    0    0  |
|                | 0   0    0    0    0  0    -y   0    0   0    38x  0    0  |
|                | 0   0    0    0    0  0    0    -y   0   0    0    38x  0  |
|                | 30y 0    0    0    x  0    0    0    -y  0    0    0    0  |
|                | 0   30y  0    0    0  x    0    0    0   -y   0    0    0  |
|                | 0   0    30y  0    0  0    x    0    0   0    -y   0    0  |
|                | 0   0    0    30y  0  0    0    x    0   0    0    -y   0  |
|                | 38x 0    0    0    -x 0    0    0    0   0    0    0    -y |
|                | 0   38x  0    0    0  -x   0    0    0   0    0    0    0  |
|                | 0   0    38x  0    0  0    -x   0    0   0    0    0    0  |
|                | 0   0    0    38x  0  0    0    -x   0   0    0    0    0  |
|                                                                             |
|          32                                                                 |
|     0 : Q   <---------------------------------------------------------------|
|                | -y  0    30y 38x 0  0    0   0   0   0    0   0   0    0   |
|                | 0   -y   x   -x  0  0    0   0   0   0    0   0   0    0   |
|                | x   38x  -y  0   0  0    0   0   0   0    0   0   0    0   |
|                | x   -30y 0   -y  0  0    0   0   0   0    0   0   0    0   |
|                | 0   0    0   0   -y 0    30y 38x 0   0    0   0   0    0   |
|                | 0   0    0   0   0  -y   x   -x  0   0    0   0   0    0   |
|                | 0   0    0   0   x  38x  -y  0   0   0    0   0   0    0   |
|                | 0   0    0   0   x  -30y 0   -y  0   0    0   0   0    0   |
|                | 0   0    0   0   0  0    0   0   -y  0    30y 38x 0    0   |
|                | 0   0    0   0   0  0    0   0   0   -y   x   -x  0    0   |
|                | 0   0    0   0   0  0    0   0   x   38x  -y  0   0    0   |
|                | 0   0    0   0   0  0    0   0   x   -30y 0   -y  0    0   |
|                | 0   0    0   0   0  0    0   0   0   0    0   0   -y   0   |
|                | 0   0    0   0   0  0    0   0   0   0    0   0   0    -y  |
|                | 0   0    0   0   0  0    0   0   0   0    0   0   x    38x |
|                | 0   0    0   0   0  0    0   0   0   0    0   0   x    -30y|
|                | -y  0    0   0   0  0    0   0   x   0    0   0   x    0   |
|                | 0   -y   0   0   0  0    0   0   0   x    0   0   0    x   |
|                | 0   0    -y  0   0  0    0   0   0   0    x   0   0    0   |
|                | 0   0    0   -y  0  0    0   0   0   0    0   x   0    0   |
|                | 0   0    0   0   -y 0    0   0   38x 0    0   0   -30y 0   |
|                | 0   0    0   0   0  -y   0   0   0   38x  0   0   0    -30y|
|                | 0   0    0   0   0  0    -y  0   0   0    38x 0   0    0   |
|                | 0   0    0   0   0  0    0   -y  0   0    0   38x 0    0   |
|                | 30y 0    0   0   x  0    0   0   -y  0    0   0   0    0   |
|                | 0   30y  0   0   0  x    0   0   0   -y   0   0   0    0   |
|                | 0   0    30y 0   0  0    x   0   0   0    -y  0   0    0   |
|                | 0   0    0   30y 0  0    0   x   0   0    0   -y  0    0   |
|                | 38x 0    0   0   -x 0    0   0   0   0    0   0   -y   0   |
|                | 0   38x  0   0   0  -x   0   0   0   0    0   0   0    -y  |
|                | 0   0    38x 0   0  0    -x  0   0   0    0   0   0    0   |
|                | 0   0    0   38x 0  0    0   -x  0   0    0   0   0    0   |
|                                                                             |
|o9 : ZZdFactorizationMap                                                     |
|-----------------------------------------------------------------------------|
|                                                                             |
|-----------------------------------------------------------------------------|
|  0    0    0    y   0    0    0    0  0    0    0    x   0    0    0    x   |
|  0    0    0    0   y    0    0    0  0    0    0    0   x    0    0    0   |
|  0    0    0    0   0    y    0    0  0    0    0    0   0    x    0    0   |
|  0    0    0    0   0    0    y    0  0    0    0    0   0    0    x    0   |
|  0    0    0    0   0    0    0    y  0    0    0    38x 0    0    0    -30y|
|  0    0    0    0   0    0    0    0  y    0    0    0   38x  0    0    0   |
|  0    0    0    0   0    0    0    0  0    y    0    0   0    38x  0    0   |
|  0    0    0    0   0    0    0    0  0    0    y    0   0    0    38x  0   |
|  0    0    0    30y 0    0    0    x  0    0    0    y   0    0    0    0   |
|  0    0    0    0   30y  0    0    0  x    0    0    0   y    0    0    0   |
|  0    0    0    0   0    30y  0    0  0    x    0    0   0    y    0    0   |
|  0    0    0    0   0    0    30y  0  0    0    x    0   0    0    y    0   |
|  0    -30y -38x 38x 0    0    0    -x 0    0    0    0   0    0    0    y   |
|  -y   -x   x    0   38x  0    0    0  -x   0    0    0   0    0    0    0   |
|  -38x -y   0    0   0    38x  0    0  0    -x   0    0   0    0    0    0   |
|  30y  0    -y   0   0    0    38x  0  0    0    -x   0   0    0    0    0   |
|  0    0    0    y   0    -30y -38x 0  0    0    0    0   0    0    0    0   |
|  x    0    0    0   y    -x   x    0  0    0    0    0   0    0    0    0   |
|  0    x    0    -x  -38x y    0    0  0    0    0    0   0    0    0    0   |
|  0    0    x    -x  30y  0    y    0  0    0    0    0   0    0    0    0   |
|y 0    0    0    0   0    0    0    y  0    -30y -38x 0   0    0    0    0   |
|  -30y 0    0    0   0    0    0    0  y    -x   x    0   0    0    0    0   |
|  0    -30y 0    0   0    0    0    -x -38x y    0    0   0    0    0    0   |
|  0    0    -30y 0   0    0    0    -x 30y  0    y    0   0    0    0    0   |
|  0    0    0    0   0    0    0    0  0    0    0    y   0    -30y -38x 0   |
|  0    0    0    0   0    0    0    0  0    0    0    0   y    -x   x    0   |
|  0    0    0    0   0    0    0    0  0    0    0    -x  -38x y    0    0   |
|  0    0    0    0   0    0    0    0  0    0    0    -x  30y  0    y    0   |
|  0    0    0    0   0    0    0    0  0    0    0    0   0    0    0    y   |
|  -y   0    0    0   0    0    0    0  0    0    0    0   0    0    0    0   |
|  0    -y   0    0   0    0    0    0  0    0    0    0   0    0    0    -x  |
|  0    0    -y   0   0    0    0    0  0    0    0    0   0    0    0    -x  |
|                                                                             |
|                                                                             |
|-----------------------------------------------------------------------------|
| 0    0    y   0    0   0   0  0    0   0   x   0    0   0   x    0    0    0|
| 0    0    0   y    0   0   0  0    0   0   0   x    0   0   0    x    0    0|
| 0    0    0   0    y   0   0  0    0   0   0   0    x   0   0    0    x    0|
| 0    0    0   0    0   y   0  0    0   0   0   0    0   x   0    0    0    x|
| 0    0    0   0    0   0   y  0    0   0   38x 0    0   0   -30y 0    0    0|
| 0    0    0   0    0   0   0  y    0   0   0   38x  0   0   0    -30y 0    0|
| 0    0    0   0    0   0   0  0    y   0   0   0    38x 0   0    0    -30y 0|
| 0    0    0   0    0   0   0  0    0   y   0   0    0   38x 0    0    0    -|
| 0    0    30y 0    0   0   x  0    0   0   y   0    0   0   0    0    0    0|
| 0    0    0   30y  0   0   0  x    0   0   0   y    0   0   0    0    0    0|
| 0    0    0   0    30y 0   0  0    x   0   0   0    y   0   0    0    0    0|
| 0    0    0   0    0   30y 0  0    0   x   0   0    0   y   0    0    0    0|
| 30y  38x  38x 0    0   0   -x 0    0   0   0   0    0   0   y    0    0    0|
| x    -x   0   38x  0   0   0  -x   0   0   0   0    0   0   0    y    0    0|
| -y   0    0   0    38x 0   0  0    -x  0   0   0    0   0   0    0    y    0|
| 0    -y   0   0    0   38x 0  0    0   -x  0   0    0   0   0    0    0    y|
| 0    0    y   0    30y 38x 0  0    0   0   0   0    0   0   0    0    0    0|
| 0    0    0   y    x   -x  0  0    0   0   0   0    0   0   0    0    0    0|
| x    0    x   38x  y   0   0  0    0   0   0   0    0   0   0    0    0    0|
| 0    x    x   -30y 0   y   0  0    0   0   0   0    0   0   0    0    0    0|
| 0    0    0   0    0   0   y  0    30y 38x 0   0    0   0   0    0    0    0|
| 0    0    0   0    0   0   0  y    x   -x  0   0    0   0   0    0    0    0|
| -30y 0    0   0    0   0   x  38x  y   0   0   0    0   0   0    0    0    0|
| 0    -30y 0   0    0   0   x  -30y 0   y   0   0    0   0   0    0    0    0|
| 0    0    0   0    0   0   0  0    0   0   y   0    30y 38x 0    0    0    0|
| 0    0    0   0    0   0   0  0    0   0   0   y    x   -x  0    0    0    0|
| 0    0    0   0    0   0   0  0    0   0   x   38x  y   0   0    0    0    0|
| 0    0    0   0    0   0   0  0    0   0   x   -30y 0   y   0    0    0    0|
| 0    0    0   0    0   0   0  0    0   0   0   0    0   0   y    0    30y  3|
| 0    0    0   0    0   0   0  0    0   0   0   0    0   0   0    y    x    -|
| -y   0    0   0    0   0   0  0    0   0   0   0    0   0   x    38x  y    0|
| 0    -y   0   0    0   0   0  0    0   0   0   0    0   0   x    -30y 0    y|
|-----------------------------------------------------------------------------|
|                     32                                                      |
|------------------- Q   : 0                                                  |
| 0    0    0    |                                                            |
| x    0    0    |                                                            |
| 0    x    0    |                                                            |
| 0    0    x    |                                                            |
| 0    0    0    |                                                            |
| -30y 0    0    |                                                            |
| 0    -30y 0    |                                                            |
| 0    0    -30y |                                                            |
| 0    0    0    |                                                            |
| 0    0    0    |                                                            |
| 0    0    0    |                                                            |
| 0    0    0    |                                                            |
| 0    0    0    |                                                            |
| y    0    0    |                                                            |
| 0    y    0    |                                                            |
| 0    0    y    |                                                            |
| 0    0    0    |                                                            |
| 0    0    0    |                                                            |
| 0    0    0    |                                                            |
| 0    0    0    |                                                            |
| 0    0    0    |                                                            |
| 0    0    0    |                                                            |
| 0    0    0    |                                                            |
| 0    0    0    |                                                            |
| 0    0    0    |                                                            |
| 0    0    0    |                                                            |
| 0    0    0    |                                                            |
| 0    0    0    |                                                            |
| 0    -30y -38x |                                                            |
| y    -x   x    |                                                            |
| -38x y    0    |                                                            |
| 30y  0    y    |                                                            |
|                                                                             |
|         32                                                                  |
|------- Q   : 1                                                              |
|    |                                                                        |
|    |                                                                        |
|    |                                                                        |
|    |                                                                        |
|    |                                                                        |
|    |                                                                        |
|    |                                                                        |
|30y |                                                                        |
|    |                                                                        |
|    |                                                                        |
|    |                                                                        |
|    |                                                                        |
|    |                                                                        |
|    |                                                                        |
|    |                                                                        |
|    |                                                                        |
|    |                                                                        |
|    |                                                                        |
|    |                                                                        |
|    |                                                                        |
|    |                                                                        |
|    |                                                                        |
|    |                                                                        |
|    |                                                                        |
|    |                                                                        |
|    |                                                                        |
|    |                                                                        |
|    |                                                                        |
|8x  |                                                                        |
|x   |                                                                        |
|    |                                                                        |
|    |                                                                        |
+-----------------------------------------------------------------------------+
|i10 : diffs^2                                                                |
|                                                                             |
|o10 = 0                                                                      |
|                                                                             |
|o10 : ZZdFactorizationMap                                                    |
+-----------------------------------------------------------------------------+

The homology of $E$ actually computes the stable Ext of the maximal
Cohen-Macaulay module defined by the matrix factorization (up to twists).

+-----------------------------------------------------------------------------+
|i11 : R = Q/(potential F)                                                    |
|                                                                             |
|o11 = R                                                                      |
|                                                                             |
|o11 : QuotientRing                                                           |
+-----------------------------------------------------------------------------+
|i12 : M = coker (F.dd_0**R)                                                  |
|                                                                             |
|o12 = cokernel {3} | y 0    30y 38x |                                        |
|               {3} | 0 y    x   -x  |                                        |
|               {3} | x 38x  y   0   |                                        |
|               {3} | x -30y 0   y   |                                        |
|                                                                             |
|                             4                                               |
|o12 : R-module, quotient of R                                                |
+-----------------------------------------------------------------------------+
|i13 : prune Ext^1(M,M)                                                       |
|                                                                             |
|o13 = cokernel {-1} | y x 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                      |
|               {-1} | 0 0 y x 0 0 0 0 0 0 0 0 0 0 0 0 |                      |
|               {-1} | 0 0 0 0 y x 0 0 0 0 0 0 0 0 0 0 |                      |
|               {-1} | 0 0 0 0 0 0 y x 0 0 0 0 0 0 0 0 |                      |
|               {-1} | 0 0 0 0 0 0 0 0 y x 0 0 0 0 0 0 |                      |
|               {-1} | 0 0 0 0 0 0 0 0 0 0 y x 0 0 0 0 |                      |
|               {-1} | 0 0 0 0 0 0 0 0 0 0 0 0 y x 0 0 |                      |
|               {-1} | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 y x |                      |
|                                                                             |
|                             8                                               |
|o13 : R-module, quotient of R                                                |
+-----------------------------------------------------------------------------+
|i14 : prune Ext^2(M,M)                                                       |
|                                                                             |
|o14 = cokernel {-2} | y x 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                      |
|               {-2} | 0 0 y x 0 0 0 0 0 0 0 0 0 0 0 0 |                      |
|               {-2} | 0 0 0 0 y x 0 0 0 0 0 0 0 0 0 0 |                      |
|               {-2} | 0 0 0 0 0 0 y x 0 0 0 0 0 0 0 0 |                      |
|               {-2} | 0 0 0 0 0 0 0 0 y x 0 0 0 0 0 0 |                      |
|               {-2} | 0 0 0 0 0 0 0 0 0 0 y x 0 0 0 0 |                      |
|               {-2} | 0 0 0 0 0 0 0 0 0 0 0 0 y x 0 0 |                      |
|               {-2} | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 y x |                      |
|                                                                             |
|                             8                                               |
|o14 : R-module, quotient of R                                                |
+-----------------------------------------------------------------------------+
|i15 : prune HH E                                                             |
|                                                                             |
|o15 = cokernel | y x 0 0 0 0 0 0 0 0 0 0 0 0 0 0 | <-- cokernel | y x 0 0 0 0|
|               | 0 0 y x 0 0 0 0 0 0 0 0 0 0 0 0 |              | 0 0 y x 0 0|
|               | 0 0 0 0 y x 0 0 0 0 0 0 0 0 0 0 |              | 0 0 0 0 y x|
|               | 0 0 0 0 0 0 y x 0 0 0 0 0 0 0 0 |              | 0 0 0 0 0 0|
|               | 0 0 0 0 0 0 0 0 y x 0 0 0 0 0 0 |              | 0 0 0 0 0 0|
|               | 0 0 0 0 0 0 0 0 0 0 y x 0 0 0 0 |              | 0 0 0 0 0 0|
|               | 0 0 0 0 0 0 0 0 0 0 0 0 y x 0 0 |              | 0 0 0 0 0 0|
|               | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 y x |              | 0 0 0 0 0 0|
|                                                                             |
|      0                                                1                     |
|                                                                             |
|o15 : ZZdFactorization                                                       |
|-----------------------------------------------------------------------------|
|0 0 0 0 0 0 0 0 0 0 | <-- cokernel | y x 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |       |
|0 0 0 0 0 0 0 0 0 0 |              | 0 0 y x 0 0 0 0 0 0 0 0 0 0 0 0 |       |
|0 0 0 0 0 0 0 0 0 0 |              | 0 0 0 0 y x 0 0 0 0 0 0 0 0 0 0 |       |
|y x 0 0 0 0 0 0 0 0 |              | 0 0 0 0 0 0 y x 0 0 0 0 0 0 0 0 |       |
|0 0 y x 0 0 0 0 0 0 |              | 0 0 0 0 0 0 0 0 y x 0 0 0 0 0 0 |       |
|0 0 0 0 y x 0 0 0 0 |              | 0 0 0 0 0 0 0 0 0 0 y x 0 0 0 0 |       |
|0 0 0 0 0 0 y x 0 0 |              | 0 0 0 0 0 0 0 0 0 0 0 0 y x 0 0 |       |
|0 0 0 0 0 0 0 0 y x |              | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 y x |       |
|                                                                             |
|                          0                                                  |
+-----------------------------------------------------------------------------+

If one of the arguments is a module or a ring, it is considered as a
factorization concentrated in degree 0.

+--------------------------+
|i16 : E = Hom(C, S^2)     |
|                          |
|       12      12      12 |
|o16 = S   <-- S   <-- S   |
|                          |
|      0       1       0   |
|                          |
|o16 : ZZdFactorization    |
+--------------------------+
|i17 : isdFactorization E  |
|                          |
|              3    3    3 |
|o17 = (true, a  + b  + c )|
|                          |
|o17 : Sequence            |
+--------------------------+

There is a simple relationship between Hom factorizations and shifts (Complexes).
Specifically, shifting the first argument is the
same as the negative shift of the result.  But shifting the second argument is
only the same as the positive shift of the result up to a sign.

+----------------------------+
|i18 : Hom(C[3], C) == D[-3] |
|                            |
|o18 = false                 |
+----------------------------+
|i19 : Hom(C, C[-2]) == D[-2]|
|                            |
|o19 = true                  |
+----------------------------+
|i20 : Hom(C, C[-3]) != D[-3]|
|                            |
|o20 = true                  |
+----------------------------+

Specific maps and morphisms between complexes can be obtained with the
homomorphism command.

Because the Hom factorization can be regarded as the totalization of a
d-periodic double complex, each term comes with pairs of indices, labelling the
summands.

+----------------------+
|i21 : indices D_-1    |
|                      |
|o21 = {{0, 1}, {1, 0}}|
|                      |
|o21 : List            |
+----------------------+
|i22 : components D_-1 |
|                      |
|        36   36       |
|o22 = {S  , S  }      |
|                      |
|o22 : List            |
+----------------------+
|i23 : indices D_-2    |
|                      |
|o23 = {{0, 0}, {1, 1}}|
|                      |
|o23 : List            |
+----------------------+
|i24 : components D_-2 |
|                      |
|        36   36       |
|o24 = {S  , S  }      |
|                      |
|o24 : List            |
+----------------------+

See also
========

  * homomorphism(ComplexMap) (Complexes), --
    get the homomorphism from an element of Hom
  * homomorphism'(ComplexMap) (Complexes),
    -- get the element of Hom from a map of complexes
  * randomFactorizationMap(ZZdFactorization,ZZdFactorization)
    -- a random map of ZZ/d-graded factorizations
  * indices (Macaulay2Doc) -- indices of a polynomial; also
    components for a direct sum
  * components (Macaulay2Doc) -- list the components of a
    direct sum
  * Hom(ZZdFactorizationMap,ZZdFactorizationMap)
    -- the map of
    factorizations between Hom complexes

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

  * "Hom(Module,ZZdFactorization)"
  * "Hom(Ring,ZZdFactorization)"
  * "Hom(ZZdFactorization,Module)"
  * "Hom(ZZdFactorization,Ring)"
  * Hom(ZZdFactorization,ZZdFactorization)
    -- the ZZ/d-graded
    homomorphism factorization between two ZZ/d-graded factorizations
-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:1488:0.

Hom(ZZdFactorization,ZZdFactorization,Symbol) -- the ZZ/d-graded homomorphism factorization between two ZZ/d-graded factorizations
**********************************************************************************************************************************

  * Function: Hom (Macaulay2Doc),
  * Usage:
        D = Hom(C1,C2,t)
  * Inputs:
      * C1, a ZZ/d graded factorization, or a
        module (Macaulay2Doc),
      * C2, a ZZ/d graded factorization, or a
        module (Macaulay2Doc),
      * t, a symbol (Macaulay2Doc), or a ring element (Macaulay2Doc),
  * Optional inputs (Macaulay2Doc),:
      * DegreeLimit (Macaulay2Doc), => ..., default value null,
      * MinimalGenerators (Macaulay2Doc), => ..., default value true,
      * Strategy (Macaulay2Doc), => ..., default value null,
  * Outputs:
      * D, a ZZ/d graded factorization, the
        ZZ/d-graded factorization of homomorphisms between C1 and C2

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

The factorization of homomorphisms is a ZZ/d-graded factorization $D$ whose
$i$th component is the direct sum of $Hom(C1_j, C2_{k})$ over all $k-j = i \mod
d$. The differential on $Hom(C1_j, C2_{k})$ is the differential $Hom(id_{C1},
dd^{C2}) + t^j Hom(dd^{C1}, id_{C2})$ where $t$ is a primitive $d$th root of
unity.

The use of a primitive $d$th root of unity adds some subtlety to this
construction, since for $d > 2$ the user may need to adjoin a root of unity
using the \texttt{adjoinRoot} command. In general, if $C1$ is a factorizations
of $f$ and $C2$ is a factorization of $g$, then the Hom factorization
$\operatorname{Hom} (C1,C2)$ is a factorization of the difference $g-f$.

+-----------------------------------------------------------------------------+
|i1 : S = ZZ/101[a..c];                                                       |
+-----------------------------------------------------------------------------+
|i2 : f = a^3 + b^3 + c^3                                                     |
|                                                                             |
|      3    3    3                                                            |
|o2 = a  + b  + c                                                             |
|                                                                             |
|o2 : S                                                                       |
+-----------------------------------------------------------------------------+
|i3 : C = randomTailMF(f)                                                     |
|                                                                             |
|      6      6      6                                                        |
|o3 = S  <-- S  <-- S                                                         |
|                                                                             |
|     0      1      0                                                         |
|                                                                             |
|o3 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i4 : D = Hom(C,C)                                                            |
|                                                                             |
|      72      72      72                                                     |
|o4 = S   <-- S   <-- S                                                       |
|                                                                             |
|     0       1       0                                                       |
|                                                                             |
|o4 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i5 : isZZdComplex D                                                          |
|                                                                             |
|o5 = true                                                                    |
+-----------------------------------------------------------------------------+
|i6 : Q = ZZ/101[x,y];                                                        |
+-----------------------------------------------------------------------------+
|i7 : F = randomLinearMF(2,Q)                                                 |
|                                                                             |
|      4      4      4                                                        |
|o7 = Q  <-- Q  <-- Q                                                         |
|                                                                             |
|     0      1      0                                                         |
|                                                                             |
|o7 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i8 : E = Hom(F,F)                                                            |
|                                                                             |
|      32      32      32                                                     |
|o8 = Q   <-- Q   <-- Q                                                       |
|                                                                             |
|     0       1       0                                                       |
|                                                                             |
|o8 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i9 : diffs = E.dd                                                            |
|                                                                             |
|          32                                                                 |
|o9 = 1 : Q   <---------------------------------------------------------------|
|                | -y  0    -30y -38x 0  0    0    0    0   0    0    0    0  |
|                | 0   -y   -x   x    0  0    0    0    0   0    0    0    0  |
|                | -x  -38x -y   0    0  0    0    0    0   0    0    0    0  |
|                | -x  30y  0    -y   0  0    0    0    0   0    0    0    0  |
|                | 0   0    0    0    -y 0    -30y -38x 0   0    0    0    0  |
|                | 0   0    0    0    0  -y   -x   x    0   0    0    0    0  |
|                | 0   0    0    0    -x -38x -y   0    0   0    0    0    0  |
|                | 0   0    0    0    -x 30y  0    -y   0   0    0    0    0  |
|                | 0   0    0    0    0  0    0    0    -y  0    -30y -38x 0  |
|                | 0   0    0    0    0  0    0    0    0   -y   -x   x    0  |
|                | 0   0    0    0    0  0    0    0    -x  -38x -y   0    0  |
|                | 0   0    0    0    0  0    0    0    -x  30y  0    -y   0  |
|                | 0   0    0    0    0  0    0    0    0   0    0    0    -y |
|                | 0   0    0    0    0  0    0    0    0   0    0    0    0  |
|                | 0   0    0    0    0  0    0    0    0   0    0    0    -x |
|                | 0   0    0    0    0  0    0    0    0   0    0    0    -x |
|                | -y  0    0    0    0  0    0    0    x   0    0    0    x  |
|                | 0   -y   0    0    0  0    0    0    0   x    0    0    0  |
|                | 0   0    -y   0    0  0    0    0    0   0    x    0    0  |
|                | 0   0    0    -y   0  0    0    0    0   0    0    x    0  |
|                | 0   0    0    0    -y 0    0    0    38x 0    0    0    -30|
|                | 0   0    0    0    0  -y   0    0    0   38x  0    0    0  |
|                | 0   0    0    0    0  0    -y   0    0   0    38x  0    0  |
|                | 0   0    0    0    0  0    0    -y   0   0    0    38x  0  |
|                | 30y 0    0    0    x  0    0    0    -y  0    0    0    0  |
|                | 0   30y  0    0    0  x    0    0    0   -y   0    0    0  |
|                | 0   0    30y  0    0  0    x    0    0   0    -y   0    0  |
|                | 0   0    0    30y  0  0    0    x    0   0    0    -y   0  |
|                | 38x 0    0    0    -x 0    0    0    0   0    0    0    -y |
|                | 0   38x  0    0    0  -x   0    0    0   0    0    0    0  |
|                | 0   0    38x  0    0  0    -x   0    0   0    0    0    0  |
|                | 0   0    0    38x  0  0    0    -x   0   0    0    0    0  |
|                                                                             |
|          32                                                                 |
|     0 : Q   <---------------------------------------------------------------|
|                | -y  0    30y 38x 0  0    0   0   0   0    0   0   0    0   |
|                | 0   -y   x   -x  0  0    0   0   0   0    0   0   0    0   |
|                | x   38x  -y  0   0  0    0   0   0   0    0   0   0    0   |
|                | x   -30y 0   -y  0  0    0   0   0   0    0   0   0    0   |
|                | 0   0    0   0   -y 0    30y 38x 0   0    0   0   0    0   |
|                | 0   0    0   0   0  -y   x   -x  0   0    0   0   0    0   |
|                | 0   0    0   0   x  38x  -y  0   0   0    0   0   0    0   |
|                | 0   0    0   0   x  -30y 0   -y  0   0    0   0   0    0   |
|                | 0   0    0   0   0  0    0   0   -y  0    30y 38x 0    0   |
|                | 0   0    0   0   0  0    0   0   0   -y   x   -x  0    0   |
|                | 0   0    0   0   0  0    0   0   x   38x  -y  0   0    0   |
|                | 0   0    0   0   0  0    0   0   x   -30y 0   -y  0    0   |
|                | 0   0    0   0   0  0    0   0   0   0    0   0   -y   0   |
|                | 0   0    0   0   0  0    0   0   0   0    0   0   0    -y  |
|                | 0   0    0   0   0  0    0   0   0   0    0   0   x    38x |
|                | 0   0    0   0   0  0    0   0   0   0    0   0   x    -30y|
|                | -y  0    0   0   0  0    0   0   x   0    0   0   x    0   |
|                | 0   -y   0   0   0  0    0   0   0   x    0   0   0    x   |
|                | 0   0    -y  0   0  0    0   0   0   0    x   0   0    0   |
|                | 0   0    0   -y  0  0    0   0   0   0    0   x   0    0   |
|                | 0   0    0   0   -y 0    0   0   38x 0    0   0   -30y 0   |
|                | 0   0    0   0   0  -y   0   0   0   38x  0   0   0    -30y|
|                | 0   0    0   0   0  0    -y  0   0   0    38x 0   0    0   |
|                | 0   0    0   0   0  0    0   -y  0   0    0   38x 0    0   |
|                | 30y 0    0   0   x  0    0   0   -y  0    0   0   0    0   |
|                | 0   30y  0   0   0  x    0   0   0   -y   0   0   0    0   |
|                | 0   0    30y 0   0  0    x   0   0   0    -y  0   0    0   |
|                | 0   0    0   30y 0  0    0   x   0   0    0   -y  0    0   |
|                | 38x 0    0   0   -x 0    0   0   0   0    0   0   -y   0   |
|                | 0   38x  0   0   0  -x   0   0   0   0    0   0   0    -y  |
|                | 0   0    38x 0   0  0    -x  0   0   0    0   0   0    0   |
|                | 0   0    0   38x 0  0    0   -x  0   0    0   0   0    0   |
|                                                                             |
|o9 : ZZdFactorizationMap                                                     |
|-----------------------------------------------------------------------------|
|                                                                             |
|-----------------------------------------------------------------------------|
|  0    0    0    y   0    0    0    0  0    0    0    x   0    0    0    x   |
|  0    0    0    0   y    0    0    0  0    0    0    0   x    0    0    0   |
|  0    0    0    0   0    y    0    0  0    0    0    0   0    x    0    0   |
|  0    0    0    0   0    0    y    0  0    0    0    0   0    0    x    0   |
|  0    0    0    0   0    0    0    y  0    0    0    38x 0    0    0    -30y|
|  0    0    0    0   0    0    0    0  y    0    0    0   38x  0    0    0   |
|  0    0    0    0   0    0    0    0  0    y    0    0   0    38x  0    0   |
|  0    0    0    0   0    0    0    0  0    0    y    0   0    0    38x  0   |
|  0    0    0    30y 0    0    0    x  0    0    0    y   0    0    0    0   |
|  0    0    0    0   30y  0    0    0  x    0    0    0   y    0    0    0   |
|  0    0    0    0   0    30y  0    0  0    x    0    0   0    y    0    0   |
|  0    0    0    0   0    0    30y  0  0    0    x    0   0    0    y    0   |
|  0    -30y -38x 38x 0    0    0    -x 0    0    0    0   0    0    0    y   |
|  -y   -x   x    0   38x  0    0    0  -x   0    0    0   0    0    0    0   |
|  -38x -y   0    0   0    38x  0    0  0    -x   0    0   0    0    0    0   |
|  30y  0    -y   0   0    0    38x  0  0    0    -x   0   0    0    0    0   |
|  0    0    0    y   0    -30y -38x 0  0    0    0    0   0    0    0    0   |
|  x    0    0    0   y    -x   x    0  0    0    0    0   0    0    0    0   |
|  0    x    0    -x  -38x y    0    0  0    0    0    0   0    0    0    0   |
|  0    0    x    -x  30y  0    y    0  0    0    0    0   0    0    0    0   |
|y 0    0    0    0   0    0    0    y  0    -30y -38x 0   0    0    0    0   |
|  -30y 0    0    0   0    0    0    0  y    -x   x    0   0    0    0    0   |
|  0    -30y 0    0   0    0    0    -x -38x y    0    0   0    0    0    0   |
|  0    0    -30y 0   0    0    0    -x 30y  0    y    0   0    0    0    0   |
|  0    0    0    0   0    0    0    0  0    0    0    y   0    -30y -38x 0   |
|  0    0    0    0   0    0    0    0  0    0    0    0   y    -x   x    0   |
|  0    0    0    0   0    0    0    0  0    0    0    -x  -38x y    0    0   |
|  0    0    0    0   0    0    0    0  0    0    0    -x  30y  0    y    0   |
|  0    0    0    0   0    0    0    0  0    0    0    0   0    0    0    y   |
|  -y   0    0    0   0    0    0    0  0    0    0    0   0    0    0    0   |
|  0    -y   0    0   0    0    0    0  0    0    0    0   0    0    0    -x  |
|  0    0    -y   0   0    0    0    0  0    0    0    0   0    0    0    -x  |
|                                                                             |
|                                                                             |
|-----------------------------------------------------------------------------|
| 0    0    y   0    0   0   0  0    0   0   x   0    0   0   x    0    0    0|
| 0    0    0   y    0   0   0  0    0   0   0   x    0   0   0    x    0    0|
| 0    0    0   0    y   0   0  0    0   0   0   0    x   0   0    0    x    0|
| 0    0    0   0    0   y   0  0    0   0   0   0    0   x   0    0    0    x|
| 0    0    0   0    0   0   y  0    0   0   38x 0    0   0   -30y 0    0    0|
| 0    0    0   0    0   0   0  y    0   0   0   38x  0   0   0    -30y 0    0|
| 0    0    0   0    0   0   0  0    y   0   0   0    38x 0   0    0    -30y 0|
| 0    0    0   0    0   0   0  0    0   y   0   0    0   38x 0    0    0    -|
| 0    0    30y 0    0   0   x  0    0   0   y   0    0   0   0    0    0    0|
| 0    0    0   30y  0   0   0  x    0   0   0   y    0   0   0    0    0    0|
| 0    0    0   0    30y 0   0  0    x   0   0   0    y   0   0    0    0    0|
| 0    0    0   0    0   30y 0  0    0   x   0   0    0   y   0    0    0    0|
| 30y  38x  38x 0    0   0   -x 0    0   0   0   0    0   0   y    0    0    0|
| x    -x   0   38x  0   0   0  -x   0   0   0   0    0   0   0    y    0    0|
| -y   0    0   0    38x 0   0  0    -x  0   0   0    0   0   0    0    y    0|
| 0    -y   0   0    0   38x 0  0    0   -x  0   0    0   0   0    0    0    y|
| 0    0    y   0    30y 38x 0  0    0   0   0   0    0   0   0    0    0    0|
| 0    0    0   y    x   -x  0  0    0   0   0   0    0   0   0    0    0    0|
| x    0    x   38x  y   0   0  0    0   0   0   0    0   0   0    0    0    0|
| 0    x    x   -30y 0   y   0  0    0   0   0   0    0   0   0    0    0    0|
| 0    0    0   0    0   0   y  0    30y 38x 0   0    0   0   0    0    0    0|
| 0    0    0   0    0   0   0  y    x   -x  0   0    0   0   0    0    0    0|
| -30y 0    0   0    0   0   x  38x  y   0   0   0    0   0   0    0    0    0|
| 0    -30y 0   0    0   0   x  -30y 0   y   0   0    0   0   0    0    0    0|
| 0    0    0   0    0   0   0  0    0   0   y   0    30y 38x 0    0    0    0|
| 0    0    0   0    0   0   0  0    0   0   0   y    x   -x  0    0    0    0|
| 0    0    0   0    0   0   0  0    0   0   x   38x  y   0   0    0    0    0|
| 0    0    0   0    0   0   0  0    0   0   x   -30y 0   y   0    0    0    0|
| 0    0    0   0    0   0   0  0    0   0   0   0    0   0   y    0    30y  3|
| 0    0    0   0    0   0   0  0    0   0   0   0    0   0   0    y    x    -|
| -y   0    0   0    0   0   0  0    0   0   0   0    0   0   x    38x  y    0|
| 0    -y   0   0    0   0   0  0    0   0   0   0    0   0   x    -30y 0    y|
|-----------------------------------------------------------------------------|
|                     32                                                      |
|------------------- Q   : 0                                                  |
| 0    0    0    |                                                            |
| x    0    0    |                                                            |
| 0    x    0    |                                                            |
| 0    0    x    |                                                            |
| 0    0    0    |                                                            |
| -30y 0    0    |                                                            |
| 0    -30y 0    |                                                            |
| 0    0    -30y |                                                            |
| 0    0    0    |                                                            |
| 0    0    0    |                                                            |
| 0    0    0    |                                                            |
| 0    0    0    |                                                            |
| 0    0    0    |                                                            |
| y    0    0    |                                                            |
| 0    y    0    |                                                            |
| 0    0    y    |                                                            |
| 0    0    0    |                                                            |
| 0    0    0    |                                                            |
| 0    0    0    |                                                            |
| 0    0    0    |                                                            |
| 0    0    0    |                                                            |
| 0    0    0    |                                                            |
| 0    0    0    |                                                            |
| 0    0    0    |                                                            |
| 0    0    0    |                                                            |
| 0    0    0    |                                                            |
| 0    0    0    |                                                            |
| 0    0    0    |                                                            |
| 0    -30y -38x |                                                            |
| y    -x   x    |                                                            |
| -38x y    0    |                                                            |
| 30y  0    y    |                                                            |
|                                                                             |
|         32                                                                  |
|------- Q   : 1                                                              |
|    |                                                                        |
|    |                                                                        |
|    |                                                                        |
|    |                                                                        |
|    |                                                                        |
|    |                                                                        |
|    |                                                                        |
|30y |                                                                        |
|    |                                                                        |
|    |                                                                        |
|    |                                                                        |
|    |                                                                        |
|    |                                                                        |
|    |                                                                        |
|    |                                                                        |
|    |                                                                        |
|    |                                                                        |
|    |                                                                        |
|    |                                                                        |
|    |                                                                        |
|    |                                                                        |
|    |                                                                        |
|    |                                                                        |
|    |                                                                        |
|    |                                                                        |
|    |                                                                        |
|    |                                                                        |
|    |                                                                        |
|8x  |                                                                        |
|x   |                                                                        |
|    |                                                                        |
|    |                                                                        |
+-----------------------------------------------------------------------------+
|i10 : diffs^2                                                                |
|                                                                             |
|o10 = 0                                                                      |
|                                                                             |
|o10 : ZZdFactorizationMap                                                    |
+-----------------------------------------------------------------------------+

The homology of $E$ actually computes the stable Ext of the maximal
Cohen-Macaulay module defined by the matrix factorization (up to twists).

+-----------------------------------------------------------------------------+
|i11 : R = Q/(potential F)                                                    |
|                                                                             |
|o11 = R                                                                      |
|                                                                             |
|o11 : QuotientRing                                                           |
+-----------------------------------------------------------------------------+
|i12 : M = coker (F.dd_0**R)                                                  |
|                                                                             |
|o12 = cokernel {3} | y 0    30y 38x |                                        |
|               {3} | 0 y    x   -x  |                                        |
|               {3} | x 38x  y   0   |                                        |
|               {3} | x -30y 0   y   |                                        |
|                                                                             |
|                             4                                               |
|o12 : R-module, quotient of R                                                |
+-----------------------------------------------------------------------------+
|i13 : prune Ext^1(M,M)                                                       |
|                                                                             |
|o13 = cokernel {-1} | y x 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                      |
|               {-1} | 0 0 y x 0 0 0 0 0 0 0 0 0 0 0 0 |                      |
|               {-1} | 0 0 0 0 y x 0 0 0 0 0 0 0 0 0 0 |                      |
|               {-1} | 0 0 0 0 0 0 y x 0 0 0 0 0 0 0 0 |                      |
|               {-1} | 0 0 0 0 0 0 0 0 y x 0 0 0 0 0 0 |                      |
|               {-1} | 0 0 0 0 0 0 0 0 0 0 y x 0 0 0 0 |                      |
|               {-1} | 0 0 0 0 0 0 0 0 0 0 0 0 y x 0 0 |                      |
|               {-1} | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 y x |                      |
|                                                                             |
|                             8                                               |
|o13 : R-module, quotient of R                                                |
+-----------------------------------------------------------------------------+
|i14 : prune Ext^2(M,M)                                                       |
|                                                                             |
|o14 = cokernel {-2} | y x 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                      |
|               {-2} | 0 0 y x 0 0 0 0 0 0 0 0 0 0 0 0 |                      |
|               {-2} | 0 0 0 0 y x 0 0 0 0 0 0 0 0 0 0 |                      |
|               {-2} | 0 0 0 0 0 0 y x 0 0 0 0 0 0 0 0 |                      |
|               {-2} | 0 0 0 0 0 0 0 0 y x 0 0 0 0 0 0 |                      |
|               {-2} | 0 0 0 0 0 0 0 0 0 0 y x 0 0 0 0 |                      |
|               {-2} | 0 0 0 0 0 0 0 0 0 0 0 0 y x 0 0 |                      |
|               {-2} | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 y x |                      |
|                                                                             |
|                             8                                               |
|o14 : R-module, quotient of R                                                |
+-----------------------------------------------------------------------------+
|i15 : prune HH E                                                             |
|                                                                             |
|o15 = cokernel | y x 0 0 0 0 0 0 0 0 0 0 0 0 0 0 | <-- cokernel | y x 0 0 0 0|
|               | 0 0 y x 0 0 0 0 0 0 0 0 0 0 0 0 |              | 0 0 y x 0 0|
|               | 0 0 0 0 y x 0 0 0 0 0 0 0 0 0 0 |              | 0 0 0 0 y x|
|               | 0 0 0 0 0 0 y x 0 0 0 0 0 0 0 0 |              | 0 0 0 0 0 0|
|               | 0 0 0 0 0 0 0 0 y x 0 0 0 0 0 0 |              | 0 0 0 0 0 0|
|               | 0 0 0 0 0 0 0 0 0 0 y x 0 0 0 0 |              | 0 0 0 0 0 0|
|               | 0 0 0 0 0 0 0 0 0 0 0 0 y x 0 0 |              | 0 0 0 0 0 0|
|               | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 y x |              | 0 0 0 0 0 0|
|                                                                             |
|      0                                                1                     |
|                                                                             |
|o15 : ZZdFactorization                                                       |
|-----------------------------------------------------------------------------|
|0 0 0 0 0 0 0 0 0 0 | <-- cokernel | y x 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |       |
|0 0 0 0 0 0 0 0 0 0 |              | 0 0 y x 0 0 0 0 0 0 0 0 0 0 0 0 |       |
|0 0 0 0 0 0 0 0 0 0 |              | 0 0 0 0 y x 0 0 0 0 0 0 0 0 0 0 |       |
|y x 0 0 0 0 0 0 0 0 |              | 0 0 0 0 0 0 y x 0 0 0 0 0 0 0 0 |       |
|0 0 y x 0 0 0 0 0 0 |              | 0 0 0 0 0 0 0 0 y x 0 0 0 0 0 0 |       |
|0 0 0 0 y x 0 0 0 0 |              | 0 0 0 0 0 0 0 0 0 0 y x 0 0 0 0 |       |
|0 0 0 0 0 0 y x 0 0 |              | 0 0 0 0 0 0 0 0 0 0 0 0 y x 0 0 |       |
|0 0 0 0 0 0 0 0 y x |              | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 y x |       |
|                                                                             |
|                          0                                                  |
+-----------------------------------------------------------------------------+

If one of the arguments is a module or a ring, it is considered as a
factorization concentrated in degree 0.

+--------------------------+
|i16 : E = Hom(C, S^2)     |
|                          |
|       12      12      12 |
|o16 = S   <-- S   <-- S   |
|                          |
|      0       1       0   |
|                          |
|o16 : ZZdFactorization    |
+--------------------------+
|i17 : isdFactorization E  |
|                          |
|              3    3    3 |
|o17 = (true, a  + b  + c )|
|                          |
|o17 : Sequence            |
+--------------------------+

There is a simple relationship between Hom factorizations and shifts (Complexes).
Specifically, shifting the first argument is the
same as the negative shift of the result.  But shifting the second argument is
only the same as the positive shift of the result up to a sign.

+----------------------------+
|i18 : Hom(C[3], C) == D[-3] |
|                            |
|o18 = false                 |
+----------------------------+
|i19 : Hom(C, C[-2]) == D[-2]|
|                            |
|o19 = true                  |
+----------------------------+
|i20 : Hom(C, C[-3]) != D[-3]|
|                            |
|o20 = true                  |
+----------------------------+

Specific maps and morphisms between complexes can be obtained with the
homomorphism command.

Because the Hom factorization can be regarded as the totalization of a
d-periodic double complex, each term comes with pairs of indices, labelling the
summands.

+----------------------+
|i21 : indices D_-1    |
|                      |
|o21 = {{0, 1}, {1, 0}}|
|                      |
|o21 : List            |
+----------------------+
|i22 : components D_-1 |
|                      |
|        36   36       |
|o22 = {S  , S  }      |
|                      |
|o22 : List            |
+----------------------+
|i23 : indices D_-2    |
|                      |
|o23 = {{0, 0}, {1, 1}}|
|                      |
|o23 : List            |
+----------------------+
|i24 : components D_-2 |
|                      |
|        36   36       |
|o24 = {S  , S  }      |
|                      |
|o24 : List            |
+----------------------+

See also
========

  * homomorphism(ComplexMap) (Complexes), --
    get the homomorphism from an element of Hom
  * homomorphism'(ComplexMap) (Complexes),
    -- get the element of Hom from a map of complexes
  * randomComplexMap(Complex,Complex) (Complexes)
    -- a random map of
    chain complexes
  * indices (Macaulay2Doc) -- indices of a polynomial; also
    components for a direct sum
  * components (Macaulay2Doc) -- list the components of a
    direct sum
  * Hom(ComplexMap,ComplexMap) (Complexes)
    -- the map of complexes
    between Hom complexes

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

  * "Hom(ZZdFactorization,Module,RingElement)"
  * "Hom(ZZdFactorization,Module,Symbol)"
  * "Hom(ZZdFactorization,ZZdFactorization,RingElement)"
  * Hom(ZZdFactorization,ZZdFactorization,Symbol)
    -- the ZZ/d-graded
    homomorphism factorization between two ZZ/d-graded factorizations
-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:1624:0.

Hom(ZZdFactorizationMap,ZZdFactorizationMap) -- the map of factorizations between Hom complexes
***********************************************************************************************

  * Function: Hom (Macaulay2Doc),
  * Usage:
        h = Hom(f,g)
  * Inputs:
      * f, a map of ZZ/d-graded factorizations,
      * g, a map of ZZ/d-graded factorizations,
  * Optional inputs (Macaulay2Doc),:
      * DegreeLimit (Macaulay2Doc), => ..., default value null,
      * MinimalGenerators (Macaulay2Doc), => ..., default value true,
      * Strategy (Macaulay2Doc), => ..., default value null,
  * Outputs:
      * h, a map of ZZ/d-graded factorizations,

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

The maps $f : C \to D$ and $g : E \to F$ of ZZ/d-graded factorizations induces
the map $h = Hom(f,g) : Hom(D,E) \to Hom(C,F)$ defined by $\phi \mapsto g \phi
f$.

+-----------------------------------------------------------------------------+
|i1 : S = ZZ/101[a,b];                                                        |
+-----------------------------------------------------------------------------+
|i2 : R = S/(a^3+b^3);                                                        |
+-----------------------------------------------------------------------------+
|i3 : m = ideal vars R                                                        |
|                                                                             |
|o3 = ideal (a, b)                                                            |
|                                                                             |
|o3 : Ideal of R                                                              |
+-----------------------------------------------------------------------------+
|i4 : C = tailMF m                                                            |
|                                                                             |
|      2      2      2                                                        |
|o4 = S  <-- S  <-- S                                                         |
|                                                                             |
|     0      1      0                                                         |
|                                                                             |
|o4 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i5 : D = tailMF (m^2)                                                        |
|                                                                             |
|      3      3      3                                                        |
|o5 = S  <-- S  <-- S                                                         |
|                                                                             |
|     0      1      0                                                         |
|                                                                             |
|o5 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i6 : f = randomFactorizationMap(C,D)                                         |
|                                                                             |
|          2                                         3                        |
|o6 = 0 : S  <------------------------------------- S  : 0                    |
|               {2} | 24a-36b -29a+19b -10a-29b |                             |
|               {3} | -30     19       -8       |                             |
|                                                                             |
|          2                                          3                       |
|     1 : S  <-------------------------------------- S  : 1                   |
|               {4} | -22a-29b -16a+39b 19a-47b  |                            |
|               {4} | -24a-38b 21a+34b  -39a-18b |                            |
|                                                                             |
|o6 : ZZdFactorizationMap                                                     |
+-----------------------------------------------------------------------------+
|i7 : E = (dual C)                                                            |
|                                                                             |
|      2      2      2                                                        |
|o7 = S  <-- S  <-- S                                                         |
|                                                                             |
|     0      1      0                                                         |
|                                                                             |
|o7 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i8 : F = (dual D)                                                            |
|                                                                             |
|      3      3      3                                                        |
|o8 = S  <-- S  <-- S                                                         |
|                                                                             |
|     0      1      0                                                         |
|                                                                             |
|o8 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i9 : g = randomFactorizationMap(F,E)                                         |
|                                                                             |
|          3                            2                                     |
|o9 = 0 : S  <------------------------ S  : 0                                 |
|               {-3} | -13a-43b 2  |                                          |
|               {-3} | -15a-28b 16 |                                          |
|               {-3} | -47a+38b 22 |                                          |
|                                                                             |
|          3                                 2                                |
|     1 : S  <----------------------------- S  : 1                            |
|               {-5} | 45a-34b  -16a+7b |                                     |
|               {-5} | -48a-47b 15a-23b |                                     |
|               {-5} | 47a+19b  39a+43b |                                     |
|                                                                             |
|o9 : ZZdFactorizationMap                                                     |
+-----------------------------------------------------------------------------+
|i10 : h = Hom(f,g)                                                           |
|                                                                             |
|           18                                                                |
|o10 = 0 : S   <--------------------------------------------------------------|
|                 {-6}  | 9a2-42ab-33b2   -48a-29b 14a+23b  -41 0             |
|                 {-6}  | -44a2+31ab+2b2  20a-30b  -46a-32b -25 0             |
|                 {-6}  | 17a2+22ab-46b2  -23a-16b 4a+29b   -47 0             |
|                 {-6}  | 27a2+10ab+9b2   -43a-38b 45a+9b   -38 0             |
|                 {-6}  | -31a2-22ab+27b2 -41a-b   -18a+27b -1  0             |
|                 {-6}  | -50a2-25ab-15b2 32a-14b  -16a-15b -14 0             |
|                 {-6}  | -29a2+ab-35b2   20a-43b  -3a-41b  16  0             |
|                 {-6}  | -49a2-8ab-4b2   -42a-41b -19a-22b 27  0             |
|                 {-6}  | 35a2+27ab-9b2   18a+32b  28a+b    -26 0             |
|                 {-10} | 0               0        0        0   -20a2-49ab+24b|
|                 {-10} | 0               0        0        0   -46a2-2ab-50b2|
|                 {-10} | 0               0        0        0   24a2-37ab+46b2|
|                 {-10} | 0               0        0        0   13a2+24ab+13b2|
|                 {-10} | 0               0        0        0   40a2+9ab+15b2 |
|                 {-10} | 0               0        0        0   45a2-14ab-34b2|
|                 {-10} | 0               0        0        0   -47a2+34ab+18b|
|                 {-10} | 0               0        0        0   3a2-50ab+13b2 |
|                 {-10} | 0               0        0        0   16a2+30ab-16b2|
|                                                                             |
|           18                                                                |
|      1 : S   <--------------------------------------------------------------|
|                 {-8} | 31a2+12ab-12b2  -20a2-37ab+50b2 37a-10b  25a+8b   0  |
|                 {-8} | 41a2+6ab+25b2   44a2-19ab-20b2  -26a+4b  46a+17b  0  |
|                 {-8} | -17a2+24ab-23b2 -27a2-32ab+33b2 -4a-36b  -42a-23b 0  |
|                 {-8} | -8a2-23ab+40b2  41a2+2ab-32b2   -47a+40b a-32b    0  |
|                 {-8} | 22a2-47ab-16b2  31a2-43ab+33b2  3a-16b   18a+33b  0  |
|                 {-8} | 50a2-39ab+43b2  20a2+ab-9b2     16a+43b  -34a-9b  0  |
|                 {-8} | 46a2-45ab+24b2  42a2+10ab+b2    -44a+31b -27a-45b 0  |
|                 {-8} | 25a2-44ab-50b2  49a2+3ab+40b2   20a+28b  19a+18b  0  |
|                 {-8} | -35a2+38ab+46b2 -14a2+46ab+35b2 -28a-50b 9a+41b   0  |
|                 {-8} | 0               0               0        0        17a|
|                 {-8} | 0               0               0        0        -27|
|                 {-8} | 0               0               0        0        -24|
|                 {-8} | 0               0               0        0        -6a|
|                 {-8} | 0               0               0        0        -38|
|                 {-8} | 0               0               0        0        -45|
|                 {-8} | 0               0               0        0        45a|
|                 {-8} | 0               0               0        0        -18|
|                 {-8} | 0               0               0        0        -16|
|                                                                             |
|o10 : ZZdFactorizationMap                                                    |
|-----------------------------------------------------------------------------|
|                                                      8                      |
|---------------------------------------------------- S  : 0                  |
|  0              0               0               |                           |
|  0              0               0               |                           |
|  0              0               0               |                           |
|  0              0               0               |                           |
|  0              0               0               |                           |
|  0              0               0               |                           |
|  0              0               0               |                           |
|  0              0               0               |                           |
|  0              0               0               |                           |
|2 -49a2-7ab+b2   -31a2-15ab+21b2 20a2-36ab-37b2  |                           |
|  27a2+30ab+40b2 -41a2-23ab+32b2 -44a2+18ab+35b2 |                           |
|  50a2-44ab+35b2 17a2+20ab+15b2  27a2-11ab+18b2  |                           |
|  47a2+29ab+30b2 -36a2-8ab+45b2  33a2-7ab-36b2   |                           |
|  38a2-44ab-12b2 -2a2-7ab-18b2   -12a2-27ab-26b2 |                           |
|  18a2-25ab+40b2 23a2+23ab-40b2  -11a2-7ab-48b2  |                           |
|2 a2+24ab+26b2   38a2-11ab-6b2   -18a2-15ab+25b2 |                           |
|  18a2+31ab+30b2 47a2+30ab-38b2  -21a2-21ab-10b2 |                           |
|  -34a2+6ab+b2   15a2-29ab+39b2  6a2-45ab-34b2   |                           |
|                                                                             |
|                                                    8                        |
|-------------------------------------------------- S  : 1                    |
|             0        0               0        |                             |
|             0        0               0        |                             |
|             0        0               0        |                             |
|             0        0               0        |                             |
|             0        0               0        |                             |
|             0        0               0        |                             |
|             0        0               0        |                             |
|             0        0               0        |                             |
|             0        0               0        |                             |
|2-10ab-35b2  44a-43b  -9a2-11ab-18b2  48a-25b  |                             |
|a2-41ab-4b2  49a-41b  44a2-30ab+47b2  -20a+2b  |                             |
|a2-22ab-9b2  -21a+32b -17a2+35ab+30b2 23a+28b  |                             |
|2+21ab-40b2  32a+23b  -30a2+32ab+48b2 -42a+33b |                             |
|a2+36ab-19b2 -47a-18b 12a2-13ab+43b2  -33a-39b |                             |
|a2+17ab+33b2 49a-50b  -23a2-8ab+21b2  43a-41b  |                             |
|2+4ab-b2     -38a-7b  -2a2+8ab+34b2   -23a+36b |                             |
|a2+29ab-3b2  -a+45b   21a2-49ab+b2    18a-15b  |                             |
|a2-2ab-32b2  -14a+24b -15a2+30ab-23b2 50a-8b   |                             |
+-----------------------------------------------------------------------------+
|i11 : assert isWellDefined h                                                 |
+-----------------------------------------------------------------------------+

We illustrate the defining property of the map $h$ on a random element $\phi$
in degree zero.

+-----------------------------------------------------------------------------+
|i12 : e = randomFactorizationMap(source h, ZZdfactorization(S^1,2))          |
|                                                                             |
|           8                                                                 |
|o12 = 0 : S  <---------------------------------------------------------------|
|                {-4} | -17a4-11a3b+48a2b2+36ab3+35b4                         |
|                {-5} | 11a5-38a4b+33a3b2+40a2b3+11ab4+46b5                   |
|                {-5} | -28a5+a4b-3a3b2+22a2b3-47ab4-23b5                     |
|                {-6} | -7a6+2a5b+29a4b2-47a3b3+15a2b4-37ab5-13b6             |
|                {-8} | -10a8+30a7b-18a6b2+39a5b3+27a4b4-22a3b5+32a2b6-9ab7-32|
|                {-8} | -20a8+24a7b-30a6b2-48a5b3-15a4b4+39a3b5+33ab7-49b8    |
|                {-8} | -33a8-19a7b+17a6b2-20a5b3+44a4b4-39a3b5+36a2b6+9ab7-39|
|                {-8} | 4a8+13a7b-26a6b2+22a5b3-49a4b4-11a3b5-8a2b6+43ab7-8b8 |
|                                                                             |
|           8                                                                 |
|      1 : S  <----- 0 : 1                                                    |
|                0                                                            |
|                                                                             |
|o12 : ZZdFactorizationMap                                                    |
|-----------------------------------------------------------------------------|
|        1                                                                    |
|------ S  : 0                                                                |
|   |                                                                         |
|   |                                                                         |
|   |                                                                         |
|   |                                                                         |
|b8 |                                                                         |
|   |                                                                         |
|b8 |                                                                         |
|   |                                                                         |
+-----------------------------------------------------------------------------+
|i13 : phi = homomorphism e                                                   |
|                                                                             |
|           2                                                                 |
|o13 = 0 : S  <---------------------------------------------------------------|
|                {-2} | -17a4-11a3b+48a2b2+36ab3+35b4       -28a5+a4b-3a3b2+22|
|                {-3} | 11a5-38a4b+33a3b2+40a2b3+11ab4+46b5 -7a6+2a5b+29a4b2-4|
|                                                                             |
|           2                                                                 |
|      1 : S  <---------------------------------------------------------------|
|                {-4} | -10a8+30a7b-18a6b2+39a5b3+27a4b4-22a3b5+32a2b6-9ab7-32|
|                {-4} | -20a8+24a7b-30a6b2-48a5b3-15a4b4+39a3b5+33ab7-49b8    |
|                                                                             |
|o13 : ZZdFactorizationMap                                                    |
|-----------------------------------------------------------------------------|
|                             2                                               |
|--------------------------- S  : 0                                           |
|a2b3-47ab4-23b5         |                                                    |
|7a3b3+15a2b4-37ab5-13b6 |                                                    |
|                                                                             |
|                                                                 2           |
|--------------------------------------------------------------- S  : 1       |
|b8 -33a8-19a7b+17a6b2-20a5b3+44a4b4-39a3b5+36a2b6+9ab7-39b8 |                |
|   4a8+13a7b-26a6b2+22a5b3-49a4b4-11a3b5-8a2b6+43ab7-8b8    |                |
+-----------------------------------------------------------------------------+
|i14 : e == homomorphism'(phi)                                                |
|                                                                             |
|o14 = true                                                                   |
+-----------------------------------------------------------------------------+

If either of the arguments is a ZZdFactorization, that
argument is understood to be the identity map on that factorization.

+---------------------------------------+
|i15 : assert(Hom(f, C) == Hom(f, id_C))|
+---------------------------------------+
|i16 : assert(Hom(C, f) == Hom(id_C, f))|
+---------------------------------------+
+-----------------------------------------------------------------------------+
|i17 : e = randomFactorizationMap(source h, ZZdfactorization(S^1, 2, Base => 1|
|                                                                             |
|           8                                                                 |
|o17 = 0 : S  <----- 0 : 0                                                    |
|                0                                                            |
|                                                                             |
|           8                                                                 |
|      1 : S  <---------------------------------------------------------------|
|                {-6} | 36a6-3a5b-22a4b2-30a3b3+41a2b4+16ab5-28b6          |  |
|                {-6} | -6a6+35a5b-9a4b2-35a3b3+6a2b4+40ab5+3b6            |  |
|                {-7} | -31a7+25a6b-2a5b2-41a4b3-49a3b4-13a2b5+4ab6+30b7   |  |
|                {-7} | -47a7+27a6b-40a5b2+37a4b3-35a3b4-31a2b5-39ab6-31b7 |  |
|                {-6} | -48a6-29a5b-48a4b2+30a3b3-37a2b4+47ab5-49b6        |  |
|                {-7} | 28a7-18a6b+46a5b2+a4b3+40a3b4-22a2b5+10ab6+7b7     |  |
|                {-6} | 30a6+13a5b-17a4b2-13a3b3+3a2b4-41ab5+8b6           |  |
|                {-7} | 8a7-29a6b+30a5b2-46a4b3+49a3b4-18a2b5+42ab6+23b7   |  |
|                                                                             |
|o17 : ZZdFactorizationMap                                                    |
|-----------------------------------------------------------------------------|
|))                                                                           |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|  1                                                                          |
| S  : 1                                                                      |
+-----------------------------------------------------------------------------+
|i18 : phi = homomorphism e                                                   |
|                                                                             |
|           2                                                                 |
|o18 = 1 : S  <---------------------------------------------------------------|
|                {-4} | 36a6-3a5b-22a4b2-30a3b3+41a2b4+16ab5-28b6 -31a7+25a6b-|
|                {-4} | -6a6+35a5b-9a4b2-35a3b3+6a2b4+40ab5+3b6   -47a7+27a6b-|
|                                                                             |
|           2                                                                 |
|      0 : S  <---------------------------------------------------------------|
|                {-2} | -48a6-29a5b-48a4b2+30a3b3-37a2b4+47ab5-49b6    30a6+13|
|                {-3} | 28a7-18a6b+46a5b2+a4b3+40a3b4-22a2b5+10ab6+7b7 8a7-29a|
|                                                                             |
|o18 : ZZdFactorizationMap                                                    |
|-----------------------------------------------------------------------------|
|                                            2                                |
|------------------------------------------ S  : 0                            |
|2a5b2-41a4b3-49a3b4-13a2b5+4ab6+30b7   |                                     |
|40a5b2+37a4b3-35a3b4-31a2b5-39ab6-31b7 |                                     |
|                                                                             |
|                                               2                             |
|--------------------------------------------- S  : 1                         |
|a5b-17a4b2-13a3b3+3a2b4-41ab5+8b6         |                                  |
|6b+30a5b2-46a4b3+49a3b4-18a2b5+42ab6+23b7 |                                  |
+-----------------------------------------------------------------------------+
|i19 : assert(degree phi == 1)                                                |
+-----------------------------------------------------------------------------+
|i20 : psi = homomorphism'(g * phi * f)                                       |
|                                                                             |
|           18                                                                |
|o20 = 1 : S   <--------------------------------------------------------------|
|                 {-8} | -25a8+19a7b+37a6b2-26a5b3-19a4b4+46a3b5+20a2b6-31ab7-|
|                 {-8} | 43a8-2a7b-32a6b2+12a5b3+33a4b4-13a3b5+20a2b6+44ab7-45|
|                 {-8} | -32a8-14a7b+20a6b2-21a5b3-21a4b4+31a3b5-42a2b6+2ab7+2|
|                 {-8} | 33a8-38a7b+50a6b2-5a5b3+4a4b4-39a3b5-35a2b6+23ab7+34b|
|                 {-8} | 30a8+5a6b2-33a5b3-7a4b4+14a3b5+9a2b6-28ab7+47b8      |
|                 {-8} | 46a8-35a7b-8a6b2+a5b3-43a4b4-5a3b5+14a2b6-46ab7-35b8 |
|                 {-8} | 3a8+13a7b+26a6b2+50a5b3-39a4b4-28a3b5+37a2b6+21ab7-40|
|                 {-8} | -2a8-44a7b-16a6b2-42a5b3-36a4b4-45a3b5-15a2b6-48ab7+1|
|                 {-8} | 24a8+26a7b+43a6b2-5a5b3-38a4b4-17a3b5+46a2b6-9ab7+15b|
|                 {-8} | -25a8+8a7b-32a6b2-11a5b3-29a4b4+48a3b5-28a2b6-33ab7+1|
|                 {-8} | 10a8+21a7b-31a6b2+44a5b3-26a4b4-9a3b5+35a2b6-19ab7-28|
|                 {-8} | -36a8+22a7b+20a6b2-28a5b3+12a4b4-3a3b5+44a2b6+33ab7-3|
|                 {-8} | -49a8+27a7b+22a6b2-10a5b3+15a4b4-22a3b5-21a2b6+10ab7-|
|                 {-8} | 2a8-26a7b-3a6b2-2a5b3-40a4b4+24a3b5-15a2b6-44ab7-50b8|
|                 {-8} | 46a8-32a7b+33a6b2-4a5b3-11a4b4+37a2b6-14ab7+15b8     |
|                 {-8} | 34a8+42a7b-18a6b2+36a5b3+31a4b4+8a3b5+22a2b6+17ab7+11|
|                 {-8} | 6a8+17a7b-29a6b2-24a5b3-a4b4+45a3b5-17a2b6-50ab7-24b8|
|                 {-8} | -23a8+32a7b-44a6b2+5a5b3+37a4b4-49a3b5-11a2b6-26ab7+4|
|                                                                             |
|           18                                                                |
|      0 : S   <----- 0 : 1                                                   |
|                 0                                                           |
|                                                                             |
|o20 : ZZdFactorizationMap                                                    |
|-----------------------------------------------------------------------------|
|          1                                                                  |
|-------- S  : 0                                                              |
|39b8 |                                                                       |
|b8   |                                                                       |
|8b8  |                                                                       |
|8    |                                                                       |
|     |                                                                       |
|     |                                                                       |
|b8   |                                                                       |
|6b8  |                                                                       |
|8    |                                                                       |
|2b8  |                                                                       |
|b8   |                                                                       |
|4b8  |                                                                       |
|32b8 |                                                                       |
|     |                                                                       |
|     |                                                                       |
|b8   |                                                                       |
|     |                                                                       |
|6b8  |                                                                       |
+-----------------------------------------------------------------------------+
|i21 : i = map(ZZdfactorization(S^1, 2), source e, id_(source e), Degree => 1)|
|                                                                             |
|o21 = 1 : 0 <----- 0 : 0                                                     |
|               0                                                             |
|                                                                             |
|           1             1                                                   |
|      0 : S  <--------- S  : 1                                               |
|                | 1 |                                                        |
|                                                                             |
|o21 : ZZdFactorizationMap                                                    |
+-----------------------------------------------------------------------------+
|i22 : assert((degree h, degree e, degree psi, degree i) === (0, 0, 1, 1))    |
+-----------------------------------------------------------------------------+

See also
========

  * homomorphism(ZZdFactorizationMap)
    -- get the homomorphism from an
    element of Hom
  * homomorphism'(ZZdFactorizationMap)
    -- get the element of Hom from a
    map of factorizations
  * randomFactorizationMap(ZZdFactorization,ZZdFactorization)
    -- a random map of ZZ/d-graded factorizations
  * Hom(ZZdFactorization,ZZdFactorization)
    -- the ZZ/d-graded
    homomorphism factorization between two ZZ/d-graded factorizations

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

  * "Hom(Matrix,ZZdFactorization)"
  * "Hom(Matrix,ZZdFactorizationMap)"
  * "Hom(Module,ZZdFactorizationMap)"
  * "Hom(Ring,ZZdFactorizationMap)"
  * "Hom(ZZdFactorization,Matrix)"
  * "Hom(ZZdFactorization,ZZdFactorizationMap)"
  * "Hom(ZZdFactorizationMap,Matrix)"
  * "Hom(ZZdFactorizationMap,Module)"
  * "Hom(ZZdFactorizationMap,Ring)"
  * "Hom(ZZdFactorizationMap,ZZdFactorization)"
  * Hom(ZZdFactorizationMap,ZZdFactorizationMap)
    -- the map of
    factorizations between Hom complexes
-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:3331:0.

Hom(ZZdFactorizationMap,ZZdFactorizationMap,Symbol) -- the map of factorizations between Hom complexes
******************************************************************************************************

  * Function: Hom (Macaulay2Doc),
  * Usage:
        h = Hom(f,g,t)
  * Inputs:
      * f, a map of ZZ/d-graded factorizations,
      * g, a map of ZZ/d-graded factorizations,
      * t, a symbol (Macaulay2Doc), optional input specifying the
        symbol used to represent the distinguished root of unity, required only
        if the underlying ring does not have a specified root of unity and the
        period is > 2
  * Optional inputs (Macaulay2Doc),:
      * DegreeLimit (Macaulay2Doc), => ..., default value null,
      * MinimalGenerators (Macaulay2Doc), => ..., default value true,
      * Strategy (Macaulay2Doc), => ..., default value null,
  * Outputs:
      * h, a map of ZZ/d-graded factorizations,

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

The maps $f : C \to D$ and $g : E \to F$ of ZZ/d-graded factorizations induces
the map $h = Hom(f,g) : Hom(D,E) \to Hom(C,F)$ defined by $\phi \mapsto g \phi
f$. When the period of a factorization is greater than $2$, one should adjoin a
root of unity in order for the Hom factorization to be defined.

+----------------------------------------------------------------------------+
|i1 : S = ZZ/101[a,b];                                                       |
+----------------------------------------------------------------------------+
|i2 : C = linearMF(a^3+b^3, t)                                               |
|                                                                            |
|     /   S[t]   \3     /   S[t]   \3     /   S[t]   \3     /   S[t]   \3    |
|o2 = |----------|  <-- |----------|  <-- |----------|  <-- |----------|     |
|     | 2        |      | 2        |      | 2        |      | 2        |     |
|     \t  + t + 1/      \t  + t + 1/      \t  + t + 1/      \t  + t + 1/     |
|                                                                            |
|     0                 1                 2                 0                |
|                                                                            |
|o2 : ZZdFactorization                                                       |
+----------------------------------------------------------------------------+
|i3 : C.cache.?rootOfUnity                                                   |
|                                                                            |
|o3 = true                                                                   |
+----------------------------------------------------------------------------+
|i4 : H = Hom(C,C) --no need to adjoin root of unity                         |
|                                                                            |
|     /   S[t]   \27     /   S[t]   \27     /   S[t]   \27     /   S[t]   \27|
|o4 = |----------|   <-- |----------|   <-- |----------|   <-- |----------|  |
|     | 2        |       | 2        |       | 2        |       | 2        |  |
|     \t  + t + 1/       \t  + t + 1/       \t  + t + 1/       \t  + t + 1/  |
|                                                                            |
|     0                  1                  2                  0             |
|                                                                            |
|o4 : ZZdFactorization                                                       |
+----------------------------------------------------------------------------+
|i5 : A = ZZdfactorization {a,a,a}                                           |
|                                                                            |
|      1      1      1      1                                                |
|o5 = S  <-- S  <-- S  <-- S                                                 |
|                                                                            |
|     0      1      2      0                                                 |
|                                                                            |
|o5 : ZZdFactorization                                                       |
+----------------------------------------------------------------------------+
|i6 : A.cache.?rootOfUnity                                                   |
|                                                                            |
|o6 = false                                                                  |
+----------------------------------------------------------------------------+
|i7 : H' = Hom(A,A,t) --need to adjoin root of unity                         |
|                                                                            |
|     /   S[t]   \3     /   S[t]   \3     /   S[t]   \3     /   S[t]   \3    |
|o7 = |----------|  <-- |----------|  <-- |----------|  <-- |----------|     |
|     | 2        |      | 2        |      | 2        |      | 2        |     |
|     \t  + t + 1/      \t  + t + 1/      \t  + t + 1/      \t  + t + 1/     |
|                                                                            |
|     0                 1                 2                 0                |
|                                                                            |
|o7 : ZZdFactorization                                                       |
+----------------------------------------------------------------------------+

If one instead wants to define a new factorization over the same ambient ring,
use the tensor product instead.

+-----------------------------------------+
|i8 : St = ring C;                        |
+-----------------------------------------+
|i9 : At = A**St                          |
|                                         |
|       1       1       1       1         |
|o9 = St  <-- St  <-- St  <-- St          |
|                                         |
|     0       1       2       0           |
|                                         |
|o9 : ZZdFactorization                    |
+-----------------------------------------+
|i10 : Ht = Hom(At,At)                    |
|                                         |
|        3       3       3       3        |
|o10 = St  <-- St  <-- St  <-- St         |
|                                         |
|      0       1       2       0          |
|                                         |
|o10 : ZZdFactorization                   |
+-----------------------------------------+
|i11 : Ht**H                              |
|                                         |
|        243       243       243       243|
|o11 = St    <-- St    <-- St    <-- St   |
|                                         |
|      0         1         2         0    |
|                                         |
|o11 : ZZdFactorization                   |
+-----------------------------------------+
|i12 : isZZdComplex Ht                    |
|                                         |
|o12 = true                               |
+-----------------------------------------+

The homomorphism and homomorphism' commands are also implemented for
factorizations of longer length, as well as randomFactorizationMap.

+------------------------------------------------------------+
|i13 : e = randomFactorizationMap(C,C, Cycle => true)        |
|                                                            |
|            3                                          3    |
|o13 = 0 : St  <------------------------------------- St  : 0|
|                 {0, 2} | 19     -41t-12 -12t+24 |          |
|                 {0, 2} | 36t+12 19      12t-29  |          |
|                 {0, 2} | 29t+41 -24t-36 19      |          |
|                                                            |
|            3                                          3    |
|      1 : St  <------------------------------------- St  : 1|
|                 {0, 2} | 19      29t+41 -24t-36 |          |
|                 {0, 2} | -12t+24 19     -41t-12 |          |
|                 {0, 2} | 12t-29  36t+12 19      |          |
|                                                            |
|            3                                          3    |
|      2 : St  <------------------------------------- St  : 2|
|                 {0, 2} | 19      12t-29  36t+12 |          |
|                 {0, 2} | -24t-36 19      29t+41 |          |
|                 {0, 2} | -41t-12 -12t+24 19     |          |
|                                                            |
|o13 : ZZdFactorizationMap                                   |
+------------------------------------------------------------+
|i14 : phi = homomorphism' e                                 |
|                                                            |
|            27                    1                         |
|o14 = 0 : St   <--------------- St  : 0                     |
|                  | 19      |                               |
|                  | 36t+12  |                               |
|                  | 29t+41  |                               |
|                  | -41t-12 |                               |
|                  | 19      |                               |
|                  | -24t-36 |                               |
|                  | -12t+24 |                               |
|                  | 12t-29  |                               |
|                  | 19      |                               |
|                  | 19      |                               |
|                  | -12t+24 |                               |
|                  | 12t-29  |                               |
|                  | 29t+41  |                               |
|                  | 19      |                               |
|                  | 36t+12  |                               |
|                  | -24t-36 |                               |
|                  | -41t-12 |                               |
|                  | 19      |                               |
|                  | 19      |                               |
|                  | -24t-36 |                               |
|                  | -41t-12 |                               |
|                  | 12t-29  |                               |
|                  | 19      |                               |
|                  | -12t+24 |                               |
|                  | 36t+12  |                               |
|                  | 29t+41  |                               |
|                  | 19      |                               |
|                                                            |
|            27                                              |
|      1 : St   <----- 0 : 1                                 |
|                  0                                         |
|                                                            |
|            27                                              |
|      2 : St   <----- 0 : 2                                 |
|                  0                                         |
|                                                            |
|o14 : ZZdFactorizationMap                                   |
+------------------------------------------------------------+

If either of the arguments is a ZZdFactorization, that
argument is understood to be the identity map on the factorization.

+---------------------------------------+
|i15 : assert(Hom(e, C) == Hom(e, id_C))|
+---------------------------------------+
|i16 : assert(Hom(C, e) == Hom(id_C, e))|
+---------------------------------------+

See also
========

  * homomorphism(ZZdFactorizationMap)
    -- get the homomorphism from an
    element of Hom
  * homomorphism'(ZZdFactorizationMap)
    -- get the element of Hom from a
    map of factorizations
  * randomFactorizationMap(ZZdFactorization,ZZdFactorization)
    -- a random map of ZZ/d-graded factorizations
  * Hom(ZZdFactorization,ZZdFactorization)
    -- the ZZ/d-graded
    homomorphism factorization between two ZZ/d-graded factorizations

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

  * "Hom(ZZdFactorization,Matrix,RingElement)"
  * "Hom(ZZdFactorization,Matrix,Symbol)"
  * "Hom(ZZdFactorization,ZZdFactorizationMap,RingElement)"
  * "Hom(ZZdFactorization,ZZdFactorizationMap,Symbol)"
  * "Hom(ZZdFactorizationMap,Matrix,RingElement)"
  * "Hom(ZZdFactorizationMap,Matrix,Symbol)"
  * "Hom(ZZdFactorizationMap,Module,RingElement)"
  * "Hom(ZZdFactorizationMap,Module,Symbol)"
  * "Hom(ZZdFactorizationMap,Ring,RingElement)"
  * "Hom(ZZdFactorizationMap,Ring,Symbol)"
  * "Hom(ZZdFactorizationMap,ZZdFactorization,RingElement)"
  * "Hom(ZZdFactorizationMap,ZZdFactorization,Symbol)"
  * "Hom(ZZdFactorizationMap,ZZdFactorizationMap,RingElement)"
  * Hom(ZZdFactorizationMap,ZZdFactorizationMap,Symbol)
    -- the map of
    factorizations between Hom complexes
-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:3445:0.

homomorphism'(ZZdFactorizationMap) -- get the element of Hom from a map of factorizations
*****************************************************************************************

  * Function: homomorphism' (Macaulay2Doc),
  * Usage:
        f = homomorphism g
  * Inputs:
      * g, a map of ZZ/d-graded factorizations,
        from $C$ to $D$
  * Optional inputs (Macaulay2Doc),:
      * DegreeLimit (Macaulay2Doc), => ..., default value
        null,
      * MinimalGenerators (Macaulay2Doc), => ..., default
        value true,
      * Strategy (Macaulay2Doc), => ..., default value
        null,
  * Outputs:
      * f, a map of ZZ/d-graded factorizations, a
        map of the form $f : R^1 \to Hom(C, D)$, where $R$ is the underlying
        ring of these factorizations

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

As a first example, consider two matrix factorizations $C$ and $D$. From a
random map $f : R^1 \to Hom(C, D)$, we construct the corresponding map of
ZZ/d-graded factorizations $g : C \to D$.

+----------------------------------------------------------+
|i1 : S = ZZ/101[a,b];                                     |
+----------------------------------------------------------+
|i2 : R = S/(a^3+b^3);                                     |
+----------------------------------------------------------+
|i3 : m = ideal vars R                                     |
|                                                          |
|o3 = ideal (a, b)                                         |
|                                                          |
|o3 : Ideal of R                                           |
+----------------------------------------------------------+
|i4 : C = tailMF m                                         |
|                                                          |
|      2      2      2                                     |
|o4 = S  <-- S  <-- S                                      |
|                                                          |
|     0      1      0                                      |
|                                                          |
|o4 : ZZdFactorization                                     |
+----------------------------------------------------------+
|i5 : D = tailMF (m^2)                                     |
|                                                          |
|      3      3      3                                     |
|o5 = S  <-- S  <-- S                                      |
|                                                          |
|     0      1      0                                      |
|                                                          |
|o5 : ZZdFactorization                                     |
+----------------------------------------------------------+
|i6 : g = randomFactorizationMap(D, C, InternalDegree => 2)|
|                                                          |
|          3                                        2      |
|o6 = 0 : S  <------------------------------------ S  : 0  |
|               {3} | 24a-36b  -10a2-29ab-8b2  |           |
|               {3} | -30a-29b -22a2-29ab-24b2 |           |
|               {3} | 19a+19b  -38a2-16ab+39b2 |           |
|                                                          |
|          3                                 2             |
|     1 : S  <----------------------------- S  : 1         |
|               {5} | 21a+34b  -13a-43b |                  |
|               {5} | 19a-47b  -15a-28b |                  |
|               {5} | -39a-18b -47a+38b |                  |
|                                                          |
|o6 : ZZdFactorizationMap                                  |
+----------------------------------------------------------+
|i7 : isWellDefined g                                      |
|                                                          |
|o7 = true                                                 |
+----------------------------------------------------------+
|i8 : f = homomorphism' g                                  |
|                                                          |
|          12                               1              |
|o8 = 0 : S   <--------------------------- S  : 0          |
|                {1} | 24a-36b         |                   |
|                {1} | -30a-29b        |                   |
|                {1} | 19a+19b         |                   |
|                {0} | -10a2-29ab-8b2  |                   |
|                {0} | -22a2-29ab-24b2 |                   |
|                {0} | -38a2-16ab+39b2 |                   |
|                {1} | 21a+34b         |                   |
|                {1} | 19a-47b         |                   |
|                {1} | -39a-18b        |                   |
|                {1} | -13a-43b        |                   |
|                {1} | -15a-28b        |                   |
|                {1} | -47a+38b        |                   |
|                                                          |
|          12                                              |
|     1 : S   <----- 0 : 1                                 |
|                0                                         |
|                                                          |
|o8 : ZZdFactorizationMap                                  |
+----------------------------------------------------------+
|i9 : isWellDefined f                                      |
|                                                          |
|o9 = true                                                 |
+----------------------------------------------------------+

The map $g : C \to D$ corresponding to a random map into $Hom(C,D)$ does not
generally commute with the differentials.  However, if the element of
$Hom(C,D)$ is a cycle, then the corresponding map does commute.

+--------------------------------------------------------------------------+
|i10 : g = randomFactorizationMap(D, C, Cycle => true, InternalDegree => 3)|
|                                                                          |
|           3                                                      2       |
|o10 = 0 : S  <-------------------------------------------------- S  : 0   |
|                {3} | 40a2+41ab+48b2  2a3-31a2b-48ab2+26b3   |            |
|                {3} | 32a2-24ab-19b2  -45a3+36a2b+49ab2+45b3 |            |
|                {3} | -37a2-27ab+22b2 -47a3-9a2b+47ab2+10b3  |            |
|                                                                          |
|           3                                               2              |
|      1 : S  <------------------------------------------- S  : 1          |
|                {5} | 40a2-21ab-10b2  2a2+16ab+22b2   |                   |
|                {5} | -32a2+8ab+26b2  45a2-34ab-48b2  |                   |
|                {5} | -37a2-42ab+45b2 -47a2+47ab+19b2 |                   |
|                                                                          |
|o10 : ZZdFactorizationMap                                                 |
+--------------------------------------------------------------------------+
|i11 : isWellDefined g                                                     |
|                                                                          |
|o11 = true                                                                |
+--------------------------------------------------------------------------+
|i12 : f = homomorphism' g                                                 |
|                                                                          |
|           12                                      1                      |
|o12 = 0 : S   <---------------------------------- S  : 0                  |
|                 {1} | 40a2+41ab+48b2         |                           |
|                 {1} | 32a2-24ab-19b2         |                           |
|                 {1} | -37a2-27ab+22b2        |                           |
|                 {0} | 2a3-31a2b-48ab2+26b3   |                           |
|                 {0} | -45a3+36a2b+49ab2+45b3 |                           |
|                 {0} | -47a3-9a2b+47ab2+10b3  |                           |
|                 {1} | 40a2-21ab-10b2         |                           |
|                 {1} | -32a2+8ab+26b2         |                           |
|                 {1} | -37a2-42ab+45b2        |                           |
|                 {1} | 2a2+16ab+22b2          |                           |
|                 {1} | 45a2-34ab-48b2         |                           |
|                 {1} | -47a2+47ab+19b2        |                           |
|                                                                          |
|           12                                                             |
|      1 : S   <----- 0 : 1                                                |
|                 0                                                        |
|                                                                          |
|o12 : ZZdFactorizationMap                                                 |
+--------------------------------------------------------------------------+
|i13 : isWellDefined f                                                     |
|                                                                          |
|o13 = true                                                                |
+--------------------------------------------------------------------------+
|i14 : assert isCommutative g                                              |
+--------------------------------------------------------------------------+
|i15 : assert(degree f === 0)                                              |
+--------------------------------------------------------------------------+
|i16 : assert(source f == ZZdfactorization(S^{-3}, 2))                     |
+--------------------------------------------------------------------------+
|i17 : assert(target g === D)                                              |
+--------------------------------------------------------------------------+
|i18 : assert(homomorphism f == g)                                         |
+--------------------------------------------------------------------------+

See also
========

  * homomorphism'(Matrix) (Macaulay2Doc) -- get the
    element of Hom from a homomorphism
  * homomorphism(ZZdFactorizationMap)
    -- get the homomorphism from an
    element of Hom
  * Hom(ZZdFactorization,ZZdFactorization)
    -- the ZZ/d-graded
    homomorphism factorization between two ZZ/d-graded factorizations
  * randomFactorizationMap(ZZdFactorization,ZZdFactorization)
    -- a random map of ZZ/d-graded factorizations

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

  * homomorphism'(ZZdFactorizationMap)
    -- get the element of Hom from a
    map of factorizations
-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:3623:0.

homomorphism(ZZ,Matrix,ZZdFactorization) -- get the homomorphism from an element of Hom
***************************************************************************************

  * Function: homomorphism (Macaulay2Doc),
  * Usage:
        g = homomorphism(i, f, E)
  * Inputs:
      * i, an integer (Macaulay2Doc),
      * f, a matrix (Macaulay2Doc), a map of the form $f \colon
        R^1 \to E_i$
      * E, a ZZ/d graded factorization, having the
        form $E = \operatorname{Hom}(C, D)$ for some factorizations $C$ and $D$
  * Outputs:
      * g, a map of ZZ/d-graded factorizations, the
        corresponding map of chain complexes from $C$ to $D$ of degree $i$

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

An element of the factorization $\operatorname{Hom}(C, D)$ corresponds to a map
of factorizations from $C$ to $D$.  Given an element in the $i$-th term, this
method returns the corresponding map of complexes of degree $i$.

As a first example, consider two Koszul complexes $C$ and $D$. From a random
map $f \colon R^1 \to Hom(C, D)$, we construct the corresponding map of chain
complexes $g \colon C \to D$.

+-----------------------------------------------------------------------------+
|i1 : S = ZZ/101[a,b];                                                        |
+-----------------------------------------------------------------------------+
|i2 : R = S/(a^3+b^3);                                                        |
+-----------------------------------------------------------------------------+
|i3 : m = ideal vars R                                                        |
|                                                                             |
|o3 = ideal (a, b)                                                            |
|                                                                             |
|o3 : Ideal of R                                                              |
+-----------------------------------------------------------------------------+
|i4 : C = tailMF m                                                            |
|                                                                             |
|      2      2      2                                                        |
|o4 = S  <-- S  <-- S                                                         |
|                                                                             |
|     0      1      0                                                         |
|                                                                             |
|o4 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i5 : D = tailMF (m^2)                                                        |
|                                                                             |
|      3      3      3                                                        |
|o5 = S  <-- S  <-- S                                                         |
|                                                                             |
|     0      1      0                                                         |
|                                                                             |
|o5 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i6 : E = Hom(C,D)                                                            |
|                                                                             |
|      12      12      12                                                     |
|o6 = S   <-- S   <-- S                                                       |
|                                                                             |
|     0       1       0                                                       |
|                                                                             |
|o6 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i7 : f = random(E_2, S^{-5})                                                 |
|                                                                             |
|o7 = {1} | 24a4-22a3b-47a2b2+2ab3-16b4        |                              |
|     {1} | -36a4-29a3b-39a2b2+16ab3+7b4       |                              |
|     {1} | -30a4-24a3b-18a2b2+22ab3+15b4      |                              |
|     {0} | 36a5-38a4b+11a3b2+a2b3-47ab4+2b5   |                              |
|     {0} | 35a5+33a4b+46a3b2-3a2b3-23ab4+29b5 |                              |
|     {0} | 11a5+40a4b-28a3b2+22a2b3-7ab4-47b5 |                              |
|     {1} | -29a4-38a3b-13a2b2+45ab3-23b4      |                              |
|     {1} | 19a4-16a3b-43a2b2-34ab3+39b4       |                              |
|     {1} | 19a4+39a3b-15a2b2-48ab3+43b4       |                              |
|     {1} | -10a4+21a3b-28a2b2-47ab3-17b4      |                              |
|     {1} | -29a4+34a3b-47a2b2+47ab3-11b4      |                              |
|     {1} | -8a4+19a3b+38a2b2+19ab3+48b4       |                              |
|                                                                             |
|             12      1                                                       |
|o7 : Matrix S   <-- S                                                        |
+-----------------------------------------------------------------------------+
|i8 : g = homomorphism(2, f, E)                                               |
|                                                                             |
|          3                                                                  |
|o8 = 0 : S  <----------------------------------------------------------------|
|               {3} | 24a4-22a3b-47a2b2+2ab3-16b4   36a5-38a4b+11a3b2+a2b3-47a|
|               {3} | -36a4-29a3b-39a2b2+16ab3+7b4  35a5+33a4b+46a3b2-3a2b3-23|
|               {3} | -30a4-24a3b-18a2b2+22ab3+15b4 11a5+40a4b-28a3b2+22a2b3-7|
|                                                                             |
|          3                                                                  |
|     1 : S  <----------------------------------------------------------------|
|               {5} | -29a4-38a3b-13a2b2+45ab3-23b4 -10a4+21a3b-28a2b2-47ab3-1|
|               {5} | 19a4-16a3b-43a2b2-34ab3+39b4  -29a4+34a3b-47a2b2+47ab3-1|
|               {5} | 19a4+39a3b-15a2b2-48ab3+43b4  -8a4+19a3b+38a2b2+19ab3+48|
|                                                                             |
|o8 : ZZdFactorizationMap                                                     |
|-----------------------------------------------------------------------------|
|              2                                                              |
|------------ S  : 0                                                          |
|b4+2b5   |                                                                   |
|ab4+29b5 |                                                                   |
|ab4-47b5 |                                                                   |
|                                                                             |
|         2                                                                   |
|------- S  : 1                                                               |
|7b4 |                                                                        |
|1b4 |                                                                        |
|b4  |                                                                        |
+-----------------------------------------------------------------------------+
|i9 : assert isWellDefined g                                                  |
+-----------------------------------------------------------------------------+
|i10 : assert not isCommutative g                                             |
+-----------------------------------------------------------------------------+

The map $g \colon C \to D$ corresponding to a random map into $Hom(C,D)$ does
not generally commute with the differentials.  However, if the element of
$Hom(C,D)$ is a cycle, then the corresponding map does commute.

+-----------------------------------------------------------------------------+
|i11 : h = randomFactorizationMap(E, ZZdfactorization(S^{-2}, 2), Cycle =>    |
|                                                                             |
|           12                              1                                 |
|o11 = 0 : S   <-------------------------- S  : 0                             |
|                 {1} | -26a+10b       |                                      |
|                 {1} | -3a+18b        |                                      |
|                 {1} | -7a-37b        |                                      |
|                 {0} | 15a2-7ab+44b2  |                                      |
|                 {0} | 13a2+25ab-10b2 |                                      |
|                 {0} | 30a2-31ab-32b2 |                                      |
|                 {1} | -26a+32b       |                                      |
|                 {1} | 3a+44b         |                                      |
|                 {1} | -7a-10b        |                                      |
|                 {1} | 15a-37b        |                                      |
|                 {1} | -13a-10b       |                                      |
|                 {1} | 30a-18b        |                                      |
|                                                                             |
|           12                                                                |
|      1 : S   <----- 0 : 1                                                   |
|                 0                                                           |
|                                                                             |
|o11 : ZZdFactorizationMap                                                    |
|-----------------------------------------------------------------------------|
|true)                                                                        |
+-----------------------------------------------------------------------------+
|i12 : f = h_0                                                                |
|                                                                             |
|o12 = {1} | -26a+10b       |                                                 |
|      {1} | -3a+18b        |                                                 |
|      {1} | -7a-37b        |                                                 |
|      {0} | 15a2-7ab+44b2  |                                                 |
|      {0} | 13a2+25ab-10b2 |                                                 |
|      {0} | 30a2-31ab-32b2 |                                                 |
|      {1} | -26a+32b       |                                                 |
|      {1} | 3a+44b         |                                                 |
|      {1} | -7a-10b        |                                                 |
|      {1} | 15a-37b        |                                                 |
|      {1} | -13a-10b       |                                                 |
|      {1} | 30a-18b        |                                                 |
|                                                                             |
|              12      1                                                      |
|o12 : Matrix S   <-- S                                                       |
+-----------------------------------------------------------------------------+
|i13 : g = homomorphism(0, f, E)                                              |
|                                                                             |
|           3                                       2                         |
|o13 = 0 : S  <----------------------------------- S  : 0                     |
|                {3} | -26a+10b 15a2-7ab+44b2  |                              |
|                {3} | -3a+18b  13a2+25ab-10b2 |                              |
|                {3} | -7a-37b  30a2-31ab-32b2 |                              |
|                                                                             |
|           3                                 2                               |
|      1 : S  <----------------------------- S  : 1                           |
|                {5} | -26a+32b 15a-37b  |                                    |
|                {5} | 3a+44b   -13a-10b |                                    |
|                {5} | -7a-10b  30a-18b  |                                    |
|                                                                             |
|o13 : ZZdFactorizationMap                                                    |
+-----------------------------------------------------------------------------+
|i14 : assert isWellDefined g                                                 |
+-----------------------------------------------------------------------------+
|i15 : assert isCommutative g                                                 |
+-----------------------------------------------------------------------------+
|i16 : assert(degree g === 0)                                                 |
+-----------------------------------------------------------------------------+
|i17 : assert(source g === C)                                                 |
+-----------------------------------------------------------------------------+
|i18 : assert(target g === D)                                                 |
+-----------------------------------------------------------------------------+
|i19 : assert(homomorphism' g == h)                                           |
+-----------------------------------------------------------------------------+

See also
========

  * homomorphism(Matrix) (Macaulay2Doc) -- get the
    homomorphism from element of Hom
  * homomorphism'(ZZdFactorizationMap)
    -- get the element of Hom from a
    map of factorizations
  * Hom(ZZdFactorization,ZZdFactorization)
    -- the ZZ/d-graded
    homomorphism factorization between two ZZ/d-graded factorizations
  * randomFactorizationMap(ZZdFactorization,ZZdFactorization)
    -- a random map of ZZ/d-graded factorizations

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

  * homomorphism(ZZ,Matrix,ZZdFactorization)
    -- get the homomorphism
    from an element of Hom
-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:3503:0.

homomorphism(ZZdFactorizationMap) -- get the homomorphism from an element of Hom
********************************************************************************

  * Function: homomorphism (Macaulay2Doc),
  * Usage:
        g = homomorphism f
  * Inputs:
      * f, a map of ZZ/d-graded factorizations, a
        map of the form $f : R^1 \to Hom(C, D)$, where $C$ and $D$ are
        factorization, $Hom(C,D)$ has been previously computed, and $R$ is the
        underlying ring of these complexes
  * Outputs:
      * g, a map of ZZ/d-graded factorizations, the
        corresponding map of chain complexes from $C$ to $D$

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

As a first example, consider two Koszul complexes $C$ and $D$. From a random
map $f : R^1 \to Hom(C, D)$, we construct the corresponding map of chain
complexes $g : C \to D$.

+----------------------------------------------------------------+
|i1 : S = ZZ/101[a,b];                                           |
+----------------------------------------------------------------+
|i2 : R = S/(a^3+b^3);                                           |
+----------------------------------------------------------------+
|i3 : m = ideal vars R                                           |
|                                                                |
|o3 = ideal (a, b)                                               |
|                                                                |
|o3 : Ideal of R                                                 |
+----------------------------------------------------------------+
|i4 : C = tailMF m                                               |
|                                                                |
|      2      2      2                                           |
|o4 = S  <-- S  <-- S                                            |
|                                                                |
|     0      1      0                                            |
|                                                                |
|o4 : ZZdFactorization                                           |
+----------------------------------------------------------------+
|i5 : D = tailMF (m^2)                                           |
|                                                                |
|      3      3      3                                           |
|o5 = S  <-- S  <-- S                                            |
|                                                                |
|     0      1      0                                            |
|                                                                |
|o5 : ZZdFactorization                                           |
+----------------------------------------------------------------+
|i6 : H = Hom(C,D)                                               |
|                                                                |
|      12      12      12                                        |
|o6 = S   <-- S   <-- S                                          |
|                                                                |
|     0       1       0                                          |
|                                                                |
|o6 : ZZdFactorization                                           |
+----------------------------------------------------------------+
|i7 : f = randomFactorizationMap(H, ZZdfactorization( S^{-2}, 2))|
|                                                                |
|          12                               1                    |
|o7 = 0 : S   <--------------------------- S  : 0                |
|                {1} | 24a-36b         |                         |
|                {1} | -30a-29b        |                         |
|                {1} | 19a+19b         |                         |
|                {0} | -10a2-29ab-8b2  |                         |
|                {0} | -22a2-29ab-24b2 |                         |
|                {0} | -38a2-16ab+39b2 |                         |
|                {1} | 21a+34b         |                         |
|                {1} | 19a-47b         |                         |
|                {1} | -39a-18b        |                         |
|                {1} | -13a-43b        |                         |
|                {1} | -15a-28b        |                         |
|                {1} | -47a+38b        |                         |
|                                                                |
|          12                                                    |
|     1 : S   <----- 0 : 1                                       |
|                0                                               |
|                                                                |
|o7 : ZZdFactorizationMap                                        |
+----------------------------------------------------------------+
|i8 : isWellDefined f                                            |
|                                                                |
|o8 = true                                                       |
+----------------------------------------------------------------+
|i9 : g = homomorphism f                                         |
|                                                                |
|          3                                        2            |
|o9 = 0 : S  <------------------------------------ S  : 0        |
|               {3} | 24a-36b  -10a2-29ab-8b2  |                 |
|               {3} | -30a-29b -22a2-29ab-24b2 |                 |
|               {3} | 19a+19b  -38a2-16ab+39b2 |                 |
|                                                                |
|          3                                 2                   |
|     1 : S  <----------------------------- S  : 1               |
|               {5} | 21a+34b  -13a-43b |                        |
|               {5} | 19a-47b  -15a-28b |                        |
|               {5} | -39a-18b -47a+38b |                        |
|                                                                |
|o9 : ZZdFactorizationMap                                        |
+----------------------------------------------------------------+
|i10 : isWellDefined g                                           |
|                                                                |
|o10 = true                                                      |
+----------------------------------------------------------------+
|i11 : assert not isCommutative g                                |
+----------------------------------------------------------------+

The map $g : C \to D$ corresponding to a random map into $Hom(C,D)$ does not
generally commute with the differentials.  However, if the element of
$Hom(C,D)$ is a cycle, then the corresponding map does commute.

+-----------------------------------------------------------------------------+
|i12 : f = randomFactorizationMap(H, ZZdfactorization( S^{-2}, 2), Cycle =>   |
|                                                                             |
|           12                               1                                |
|o12 = 0 : S   <--------------------------- S  : 0                            |
|                 {1} | 25a-45b         |                                     |
|                 {1} | -20a+48b        |                                     |
|                 {1} | 21a+16b         |                                     |
|                 {0} | 2a2-18ab-b2     |                                     |
|                 {0} | -22a2-43ab-38b2 |                                     |
|                 {0} | -34a2-26ab-37b2 |                                     |
|                 {1} | 25a+37b         |                                     |
|                 {1} | 20a-b           |                                     |
|                 {1} | 21a-38b         |                                     |
|                 {1} | 2a+16b          |                                     |
|                 {1} | 22a+45b         |                                     |
|                 {1} | -34a-48b        |                                     |
|                                                                             |
|           12                                                                |
|      1 : S   <----- 0 : 1                                                   |
|                 0                                                           |
|                                                                             |
|o12 : ZZdFactorizationMap                                                    |
|-----------------------------------------------------------------------------|
|true)                                                                        |
+-----------------------------------------------------------------------------+
|i13 : isWellDefined f                                                        |
|                                                                             |
|o13 = true                                                                   |
+-----------------------------------------------------------------------------+
|i14 : g = homomorphism f                                                     |
|                                                                             |
|           3                                        2                        |
|o14 = 0 : S  <------------------------------------ S  : 0                    |
|                {3} | 25a-45b  2a2-18ab-b2     |                             |
|                {3} | -20a+48b -22a2-43ab-38b2 |                             |
|                {3} | 21a+16b  -34a2-26ab-37b2 |                             |
|                                                                             |
|           3                                2                                |
|      1 : S  <---------------------------- S  : 1                            |
|                {5} | 25a+37b 2a+16b   |                                     |
|                {5} | 20a-b   22a+45b  |                                     |
|                {5} | 21a-38b -34a-48b |                                     |
|                                                                             |
|o14 : ZZdFactorizationMap                                                    |
+-----------------------------------------------------------------------------+
|i15 : isWellDefined g                                                        |
|                                                                             |
|o15 = true                                                                   |
+-----------------------------------------------------------------------------+
|i16 : assert isCommutative g                                                 |
+-----------------------------------------------------------------------------+
|i17 : assert(degree g === 0)                                                 |
+-----------------------------------------------------------------------------+
|i18 : assert(source g === C)                                                 |
+-----------------------------------------------------------------------------+
|i19 : assert(target g === D)                                                 |
+-----------------------------------------------------------------------------+
|i20 : assert(homomorphism' g == f)                                           |
+-----------------------------------------------------------------------------+

A homomorphism of non-zero degree can be encoded in (at least) two ways.

+----------------------------------------------------------------------------+
|i21 : f1 = randomFactorizationMap(H, ZZdfactorization( S^1, 2), Degree => 1)|
|                                                                            |
|           12                         1                                     |
|o21 = 1 : S   <--------------------- S  : 0                                 |
|                 {3}  | 0        |                                          |
|                 {3}  | 0        |                                          |
|                 {3}  | 0        |                                          |
|                 {2}  | 0        |                                          |
|                 {2}  | 0        |                                          |
|                 {2}  | 0        |                                          |
|                 {-1} | -16a+7b  |                                          |
|                 {-1} | 15a-23b  |                                          |
|                 {-1} | 39a+43b  |                                          |
|                 {-1} | -17a-11b |                                          |
|                 {-1} | 48a+36b  |                                          |
|                 {-1} | 35a+11b  |                                          |
|                                                                            |
|           12                                                               |
|      0 : S   <----- 0 : 1                                                  |
|                 0                                                          |
|                                                                            |
|o21 : ZZdFactorizationMap                                                   |
+----------------------------------------------------------------------------+
|i22 : f2 = map(target f1, (source f1)[1], i -> f1_(i+1))                    |
|                                                                            |
|           12                                                               |
|o22 = 0 : S   <----- 0 : 0                                                  |
|                 0                                                          |
|                                                                            |
|           12                         1                                     |
|      1 : S   <--------------------- S  : 1                                 |
|                 {3}  | 0        |                                          |
|                 {3}  | 0        |                                          |
|                 {3}  | 0        |                                          |
|                 {2}  | 0        |                                          |
|                 {2}  | 0        |                                          |
|                 {2}  | 0        |                                          |
|                 {-1} | -16a+7b  |                                          |
|                 {-1} | 15a-23b  |                                          |
|                 {-1} | 39a+43b  |                                          |
|                 {-1} | -17a-11b |                                          |
|                 {-1} | 48a+36b  |                                          |
|                 {-1} | 35a+11b  |                                          |
|                                                                            |
|o22 : ZZdFactorizationMap                                                   |
+----------------------------------------------------------------------------+
|i23 : assert isWellDefined f2                                               |
+----------------------------------------------------------------------------+
|i24 : g1 = homomorphism f1                                                  |
|                                                                            |
|           3         2                                                      |
|o24 = 1 : S  <----- S  : 0                                                  |
|                0                                                           |
|                                                                            |
|           3                                2                               |
|      0 : S  <---------------------------- S  : 1                           |
|                {3} | -16a+7b -17a-11b |                                    |
|                {3} | 15a-23b 48a+36b  |                                    |
|                {3} | 39a+43b 35a+11b  |                                    |
|                                                                            |
|o24 : ZZdFactorizationMap                                                   |
+----------------------------------------------------------------------------+
|i25 : g2 = homomorphism f2                                                  |
|                                                                            |
|           3         2                                                      |
|o25 = 1 : S  <----- S  : 0                                                  |
|                0                                                           |
|                                                                            |
|           3                                2                               |
|      0 : S  <---------------------------- S  : 1                           |
|                {3} | -16a+7b -17a-11b |                                    |
|                {3} | 15a-23b 48a+36b  |                                    |
|                {3} | 39a+43b 35a+11b  |                                    |
|                                                                            |
|o25 : ZZdFactorizationMap                                                   |
+----------------------------------------------------------------------------+
|i26 : assert(g1 == g2)                                                      |
+----------------------------------------------------------------------------+
|i27 : assert isWellDefined g1                                               |
+----------------------------------------------------------------------------+
|i28 : assert isWellDefined g2                                               |
+----------------------------------------------------------------------------+
|i29 : homomorphism' g1 == f1                                                |
|                                                                            |
|o29 = true                                                                  |
+----------------------------------------------------------------------------+
|i30 : homomorphism' g2 == f1                                                |
|                                                                            |
|o30 = true                                                                  |
+----------------------------------------------------------------------------+

See also
========

  * Working with Ext (missing documentation)
  * homomorphism(Matrix) (Macaulay2Doc) -- get the
    homomorphism from element of Hom
  * homomorphism(ZZ,Matrix,ZZdFactorization)
    -- get the homomorphism
    from an element of Hom
  * homomorphism'(ZZdFactorizationMap)
    -- get the element of Hom from a
    map of factorizations
  * Hom(ZZdFactorization,ZZdFactorization)
    -- the ZZ/d-graded
    homomorphism factorization between two ZZ/d-graded factorizations
  * randomFactorizationMap(ZZdFactorization,ZZdFactorization)
    -- a random map of ZZ/d-graded factorizations

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

  * homomorphism(ZZdFactorizationMap)
    -- get the homomorphism from an
    element of Hom
-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:3573:0.

id _ ZZdFactorization -- the identity map of a ZZ/d-graded factorization
************************************************************************

  * Scripted functor: id (Macaulay2Doc),
  * Usage:
        f = id_C
  * Inputs:
      * C, a ZZ/d graded factorization,
  * Outputs:
      * f, a map of ZZ/d-graded factorizations, the
        identity map from $C$ to itself

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

The collection of ZZ/d-graded factorizations together with ZZ/d-graded
factorization morphisms forms a category.  In particular, every ZZ/d-graded
factorization has an identity map.

+-----------------------------------------------+
|i1 : S = ZZ/101[a,b,c]                         |
|                                               |
|o1 = S                                         |
|                                               |
|o1 : PolynomialRing                            |
+-----------------------------------------------+
|i2 : R = S/(a^2+b^2+c^2);                      |
+-----------------------------------------------+
|i3 : m = ideal vars R                          |
|                                               |
|o3 = ideal (a, b, c)                           |
|                                               |
|o3 : Ideal of R                                |
+-----------------------------------------------+
|i4 : C = tailMF m                              |
|                                               |
|      4      4      4                          |
|o4 = S  <-- S  <-- S                           |
|                                               |
|     0      1      0                           |
|                                               |
|o4 : ZZdFactorization                          |
+-----------------------------------------------+
|i5 : D = tailMF (m^2)                          |
|                                               |
|      8      8      8                          |
|o5 = S  <-- S  <-- S                           |
|                                               |
|     0      1      0                           |
|                                               |
|o5 : ZZdFactorization                          |
+-----------------------------------------------+
|i6 : f = id_C                                  |
|                                               |
|          4                       4            |
|o6 = 0 : S  <------------------- S  : 0        |
|               {3} | 1 0 0 0 |                 |
|               {3} | 0 1 0 0 |                 |
|               {3} | 0 0 1 0 |                 |
|               {3} | 0 0 0 1 |                 |
|                                               |
|          4                       4            |
|     1 : S  <------------------- S  : 1        |
|               {4} | 1 0 0 0 |                 |
|               {4} | 0 1 0 0 |                 |
|               {4} | 0 0 1 0 |                 |
|               {4} | 0 0 0 1 |                 |
|                                               |
|o6 : ZZdFactorizationMap                       |
+-----------------------------------------------+
|i7 : assert isWellDefined f                    |
+-----------------------------------------------+
|i8 : assert isFactorizationMorphism f          |
+-----------------------------------------------+
|i9 : g = id_D                                  |
|                                               |
|          8                               8    |
|o9 = 0 : S  <--------------------------- S  : 0|
|               {4} | 1 0 0 0 0 0 0 0 |         |
|               {4} | 0 1 0 0 0 0 0 0 |         |
|               {4} | 0 0 1 0 0 0 0 0 |         |
|               {4} | 0 0 0 1 0 0 0 0 |         |
|               {4} | 0 0 0 0 1 0 0 0 |         |
|               {4} | 0 0 0 0 0 1 0 0 |         |
|               {4} | 0 0 0 0 0 0 1 0 |         |
|               {4} | 0 0 0 0 0 0 0 1 |         |
|                                               |
|          8                               8    |
|     1 : S  <--------------------------- S  : 1|
|               {5} | 1 0 0 0 0 0 0 0 |         |
|               {5} | 0 1 0 0 0 0 0 0 |         |
|               {5} | 0 0 1 0 0 0 0 0 |         |
|               {5} | 0 0 0 1 0 0 0 0 |         |
|               {5} | 0 0 0 0 1 0 0 0 |         |
|               {5} | 0 0 0 0 0 1 0 0 |         |
|               {5} | 0 0 0 0 0 0 1 0 |         |
|               {5} | 0 0 0 0 0 0 0 1 |         |
|                                               |
|o9 : ZZdFactorizationMap                       |
+-----------------------------------------------+
|i10 : assert isWellDefined g                   |
+-----------------------------------------------+
|i11 : assert isFactorizationMorphism g         |
+-----------------------------------------------+

See also
========

  * map(ZZdFactorization,ZZdFactorization,ZZ)
    -- make the zero map or
    identity between ZZ/d-graded factorizations
  * isWellDefined(ZZdFactorizationMap)
    -- whether a map of ZZ/d-graded
    factorizations is well-defined
  * isFactorizationMorphism(ZZdFactorizationMap)
    -- whether a
    ZZdFactorizationMap is a morphism of factorizations
  * Hom(ZZdFactorization,ZZdFactorization)
    -- the ZZ/d-graded
    homomorphism factorization between two ZZ/d-graded factorizations

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

  * id _ ZZdFactorization -- the identity map
    of a ZZ/d-graded factorization
-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:2712:0.

image(ZZdFactorizationMap) -- make the image of a map of ZZ/d-graded factorizations
***********************************************************************************

  * Function: image (Macaulay2Doc),
  * Usage:
        E = image f
  * Inputs:
      * f, a map of ZZ/d-graded factorizations,
  * Outputs:
      * E, a ZZ/d graded factorization,

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

If $f : C \to D$ is a map of ZZ/d-graded factorizations of degree $d$, then the
image is the ZZ/d-graded factorization $E$ whose $i-th$ is $image(f_{i-d})$,
and whose differential is induced from the differential on the target.

In the following example, we first construct a random factorization morphism $f
: C \to D$.

+-----------------------------------------------------------------------------+
|i1 : S = ZZ/101[a,b];                                                        |
+-----------------------------------------------------------------------------+
|i2 : R = S/(a^3+b^3);                                                        |
+-----------------------------------------------------------------------------+
|i3 : m = ideal vars R                                                        |
|                                                                             |
|o3 = ideal (a, b)                                                            |
|                                                                             |
|o3 : Ideal of R                                                              |
+-----------------------------------------------------------------------------+
|i4 : C = tailMF m                                                            |
|                                                                             |
|      2      2      2                                                        |
|o4 = S  <-- S  <-- S                                                         |
|                                                                             |
|     0      1      0                                                         |
|                                                                             |
|o4 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i5 : D = tailMF (m^2)                                                        |
|                                                                             |
|      3      3      3                                                        |
|o5 = S  <-- S  <-- S                                                         |
|                                                                             |
|     0      1      0                                                         |
|                                                                             |
|o5 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i6 : f = randomFactorizationMap(D, C, Cycle => true, InternalDegree => 2)    |
|                                                                             |
|          3                                      2                           |
|o6 = 0 : S  <---------------------------------- S  : 0                       |
|               {3} | 20a+29b 24a2-17ab+9b2  |                                |
|               {3} | 10a-19b 30a2-48ab-7b2  |                                |
|               {3} | 32a-36b 19a2-11ab-21b2 |                                |
|                                                                             |
|          3                                2                                 |
|     1 : S  <---------------------------- S  : 1                             |
|               {5} | 20a+21b 24a-36b  |                                      |
|               {5} | -10a+9b -30a-29b |                                      |
|               {5} | 32a-7b  19a+19b  |                                      |
|                                                                             |
|o6 : ZZdFactorizationMap                                                     |
+-----------------------------------------------------------------------------+
|i7 : isWellDefined image f                                                   |
|                                                                             |
|o7 = true                                                                    |
+-----------------------------------------------------------------------------+
|i8 : potential image f                                                       |
|                                                                             |
|      3    3                                                                 |
|o8 = a  + b                                                                  |
|                                                                             |
|o8 : S                                                                       |
+-----------------------------------------------------------------------------+
|i9 : g = inducedMap(D, image f)                                              |
|                                                                             |
|          3                                                                  |
|o9 = 0 : S  <---------------------------------- image                        |
|               {3} | 20a+29b 24a2-17ab+9b2  |                                |
|               {3} | 10a-19b 30a2-48ab-7b2  |                                |
|               {3} | 32a-36b 19a2-11ab-21b2 |                                |
|                                                                             |
|          3                                                                  |
|     1 : S  <---------------------------- image {5} |                        |
|               {5} | 20a+21b 24a-36b  |         {5} |                        |
|               {5} | -10a+9b -30a-29b |         {5} |                        |
|               {5} | 32a-7b  19a+19b  |                                      |
|                                                                             |
|o9 : ZZdFactorizationMap                                                     |
|-----------------------------------------------------------------------------|
|{3} | 20a+29b 24a2-17ab+9b2  | : 0                                           |
|{3} | 10a-19b 30a2-48ab-7b2  |                                               |
|{3} | 32a-36b 19a2-11ab-21b2 |                                               |
|                                                                             |
|                                                                             |
|                                                                             |
|20a+21b 24a-36b  | : 1                                                       |
|-10a+9b -30a-29b |                                                           |
|32a-7b  19a+19b  |                                                           |
+-----------------------------------------------------------------------------+
|i10 : prune image f                                                          |
|                                                                             |
|       2      2      2                                                       |
|o10 = S  <-- S  <-- S                                                        |
|                                                                             |
|      0      1      0                                                        |
|                                                                             |
|o10 : ZZdFactorization                                                       |
+-----------------------------------------------------------------------------+
|i11 : oo.dd                                                                  |
|                                                                             |
|           2                     2                                           |
|o11 = 1 : S  <----------------- S  : 0                                       |
|                {6} | a  b2 |                                                |
|                {6} | -b a2 |                                                |
|                                                                             |
|           2                      2                                          |
|      0 : S  <------------------ S  : 1                                      |
|                {4} | a2 -b2 |                                               |
|                {5} | b  a   |                                               |
|                                                                             |
|o11 : ZZdFactorizationMap                                                    |
+-----------------------------------------------------------------------------+

See also
========

  * Making ZZdFactorizations -- Information
    about the basic constructors
  * Making maps between factorizations
    -- information about the basic constructors
  * image (Macaulay2Doc) -- image of a map
  * coimage(ZZdFactorizationMap), --
    make the coimage of a map of ZZ/d-graded factorizations
  * kernel(ZZdFactorizationMap) -- make
    the kernel of a map of ZZ/d-graded factorizations
  * cokernel(ZZdFactorizationMap), --
    make the cokernel of a map of ZZ/d-graded factorizations

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

  * image(ZZdFactorizationMap) -- make
    the image of a map of ZZ/d-graded factorizations
-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:4316:0.

inducedMap(ZZdFactorization,ZZdFactorization) -- make the map of ZZ/d-graded factorizations induced at each term by the identity map
************************************************************************************************************************************

  * Function: inducedMap (Macaulay2Doc),
  * Usage:
        f = inducedMap(D, C)
  * Inputs:
      * C, a ZZ/d graded factorization,
      * D, a ZZ/d graded factorization,
  * Optional inputs (Macaulay2Doc),:
      * Degree (Macaulay2Doc),
        => an integer (Macaulay2Doc), default value null, specify
        the degree of the map of ZZ/d-graded factorizations, if not 0
      * Verify (Macaulay2Doc),
        => a Boolean value (Macaulay2Doc), default value
        true, if true, check that the resulting maps are well-defined
  * Outputs:
      * f, a map of ZZ/d-graded factorizations,

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

Let $d$ be the value of the optional argument Degree, or zero, if not given.
For each $i$, the terms $D_{i+d}$ and $C_i$ must be subquotients of the same
ambient free module.  This method returns the factorization map induced by the
identity on each of these free modules.

If Verify => true is given, then this method also checks that these identity
maps induced well-defined maps.  This can be a relatively expensive
computation.

We illustrate this method by inducing some of the natural inclusions and
surjections induced by taking kernels/cokernels of morphisms of factorizations.

+-----------------------------------------------------------------------------+
|i1 : R = ZZ/101[a,b,c]                                                       |
|                                                                             |
|o1 = R                                                                       |
|                                                                             |
|o1 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i2 : C = koszulMF({a,b,c}, a^3+b^3+c^3)                                      |
|                                                                             |
|      4      4      4                                                        |
|o2 = R  <-- R  <-- R                                                         |
|                                                                             |
|     0      1      0                                                         |
|                                                                             |
|o2 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i3 : f = randomFactorizationMap(C, C, Cycle => true, InternalDegree => 1)    |
|                                                                             |
|          4                                                           4      |
|o3 = 0 : R  <------------------------------------------------------- R  : 0  |
|               | 24a-36b-30c 0           0           0           |           |
|               | -29c        24a-36b-30c 0           0           |           |
|               | -29a        0           24a-36b-30c 0           |           |
|               | 29b         0           0           24a-36b-30c |           |
|                                                                             |
|          4                                                           4      |
|     1 : R  <------------------------------------------------------- R  : 1  |
|               | 24a-36b-30c 0           0           0           |           |
|               | -29c        24a-36b-30c -29b        -29a        |           |
|               | 0           0           24a-36b-30c 0           |           |
|               | 0           0           0           24a-36b-30c |           |
|                                                                             |
|o3 : ZZdFactorizationMap                                                     |
+-----------------------------------------------------------------------------+
|i4 : isWellDefined coker f                                                   |
|                                                                             |
|o4 = true                                                                    |
+-----------------------------------------------------------------------------+
|i5 : (coker f).dd^2 == (a^3 + b^3 + c^3)*id_(coker f)                        |
|                                                                             |
|o5 = true                                                                    |
+-----------------------------------------------------------------------------+
|i6 : i1 = inducedMap(coker f, C)                                             |
|                                                                             |
|                                                                             |
|o6 = 0 : cokernel | 24a-36b-30c 0           0           0           |        |
|                  | -29c        24a-36b-30c 0           0           |        |
|                  | -29a        0           24a-36b-30c 0           |        |
|                  | 29b         0           0           24a-36b-30c |        |
|                                                                             |
|                                                                             |
|                                                                             |
|     1 : cokernel | 24a-36b-30c 0           0           0           |        |
|                  | -29c        24a-36b-30c -29b        -29a        |        |
|                  | 0           0           24a-36b-30c 0           |        |
|                  | 0           0           0           24a-36b-30c |        |
|                                                                             |
|                                                                             |
|o6 : ZZdFactorizationMap                                                     |
|-----------------------------------------------------------------------------|
|                  4                                                          |
|<--------------- R  : 0                                                      |
|   | 1 0 0 0 |                                                               |
|   | 0 1 0 0 |                                                               |
|   | 0 0 1 0 |                                                               |
|   | 0 0 0 1 |                                                               |
|                                                                             |
|                  4                                                          |
|<--------------- R  : 1                                                      |
|   | 1 0 0 0 |                                                               |
|   | 0 1 0 0 |                                                               |
|   | 0 0 1 0 |                                                               |
|   | 0 0 0 1 |                                                               |
+-----------------------------------------------------------------------------+
|i7 : i2 = inducedMap(C, image f)                                             |
|                                                                             |
|          4                                                                  |
|o7 = 0 : R  <------------------------------------------------------- image | |
|               | 24a-36b-30c 0           0           0           |         | |
|               | -29c        24a-36b-30c 0           0           |         | |
|               | -29a        0           24a-36b-30c 0           |         | |
|               | 29b         0           0           24a-36b-30c |           |
|                                                                             |
|          4                                                                  |
|     1 : R  <------------------------------------------------------- image | |
|               | 24a-36b-30c 0           0           0           |         | |
|               | -29c        24a-36b-30c -29b        -29a        |         | |
|               | 0           0           24a-36b-30c 0           |         | |
|               | 0           0           0           24a-36b-30c |           |
|                                                                             |
|o7 : ZZdFactorizationMap                                                     |
|-----------------------------------------------------------------------------|
|24a-36b-30c 0           0           0           | : 0                        |
|-29c        24a-36b-30c 0           0           |                            |
|-29a        0           24a-36b-30c 0           |                            |
|29b         0           0           24a-36b-30c |                            |
|                                                                             |
|                                                                             |
|                                                                             |
|24a-36b-30c 0           0           0           | : 1                        |
|-29c        24a-36b-30c -29b        -29a        |                            |
|0           0           24a-36b-30c 0           |                            |
|0           0           0           24a-36b-30c |                            |
+-----------------------------------------------------------------------------+
|i8 : ker i1 == image i2                                                      |
|                                                                             |
|o8 = true                                                                    |
+-----------------------------------------------------------------------------+

See also
========

  * inducedMap(Module,Module) (Macaulay2Doc)
    -- compute the map induced
    by the identity

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

  * inducedMap(ZZdFactorization,ZZdFactorization)
    -- make the map of
    ZZ/d-graded factorizations induced at each term by the identity map
-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:4043:0.

injectiveCover -- Constructs the injective hull of a d-fold matrix factorization
********************************************************************************

  * Usage:
        injectiveCover(C)
  * Inputs:
      * C, a ZZ/d graded factorization, A
        ZZdFactorization object representing a d-fold matrix factorization
  * Outputs:
      * a map of ZZ/d-graded factorizations,

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

This method constructs the injective cover of a d-fold matrix factorization.
The output is a ZZdFactorizationMap, which is the canonical injection from the
original factorization into the injective cover.

+---------------------------------------------------------------------------+
|i1 : Q = ZZ/101[a,b,c];                                                    |
+---------------------------------------------------------------------------+
|i2 : C = linearMF(a^3+b^3,t)                                               |
|                                                                           |
|     /   Q[t]   \3     /   Q[t]   \3     /   Q[t]   \3     /   Q[t]   \3   |
|o2 = |----------|  <-- |----------|  <-- |----------|  <-- |----------|    |
|     | 2        |      | 2        |      | 2        |      | 2        |    |
|     \t  + t + 1/      \t  + t + 1/      \t  + t + 1/      \t  + t + 1/    |
|                                                                           |
|     0                 1                 2                 0               |
|                                                                           |
|o2 : ZZdFactorization                                                      |
+---------------------------------------------------------------------------+
|i3 : f = injectiveCover C                                                  |
|                                                                           |
|         /   Q[t]   \9                                    /   Q[t]   \3    |
|o3 = 0 : |----------|  <--------------------------------- |----------|  : 0|
|         | 2        |     {0, 2} | 1    0       0     |   | 2        |     |
|         \t  + t + 1/     {0, 2} | 0    1       0     |   \t  + t + 1/     |
|                          {0, 2} | 0    0       1     |                    |
|                          {0, 2} | b2   abt+ab  a2    |                    |
|                          {0, 2} | a2   -b2t-b2 -ab   |                    |
|                          {0, 2} | -abt a2      b2t   |                    |
|                          {0, 2} | b    a       0     |                    |
|                          {0, 2} | 0    bt      a     |                    |
|                          {0, 2} | a    0       -bt-b |                    |
|                                                                           |
|         /   Q[t]   \9                                    /   Q[t]   \3    |
|     1 : |----------|  <--------------------------------- |----------|  : 1|
|         | 2        |     {0, 2} | b    a       0     |   | 2        |     |
|         \t  + t + 1/     {0, 2} | 0    bt      a     |   \t  + t + 1/     |
|                          {0, 2} | a    0       -bt-b |                    |
|                          {0, 2} | 1    0       0     |                    |
|                          {0, 2} | 0    1       0     |                    |
|                          {0, 2} | 0    0       1     |                    |
|                          {0, 2} | b2   abt+ab  a2    |                    |
|                          {0, 2} | a2   -b2t-b2 -ab   |                    |
|                          {0, 2} | -abt a2      b2t   |                    |
|                                                                           |
|         /   Q[t]   \9                                    /   Q[t]   \3    |
|     2 : |----------|  <--------------------------------- |----------|  : 2|
|         | 2        |     {0, 2} | b2   abt+ab  a2    |   | 2        |     |
|         \t  + t + 1/     {0, 2} | a2   -b2t-b2 -ab   |   \t  + t + 1/     |
|                          {0, 2} | -abt a2      b2t   |                    |
|                          {0, 2} | b    a       0     |                    |
|                          {0, 2} | 0    bt      a     |                    |
|                          {0, 2} | a    0       -bt-b |                    |
|                          {0, 2} | 1    0       0     |                    |
|                          {0, 2} | 0    1       0     |                    |
|                          {0, 2} | 0    0       1     |                    |
|                                                                           |
|o3 : ZZdFactorizationMap                                                   |
+---------------------------------------------------------------------------+
|i4 : isCommutative f                                                       |
|                                                                           |
|o4 = true                                                                  |
+---------------------------------------------------------------------------+
|i5 : prune ker f                                                           |
|                                                                           |
|o5 = 0 <-- 0 <-- 0 <-- 0                                                   |
|                                                                           |
|     0     1     2     0                                                   |
|                                                                           |
|o5 : ZZdFactorization                                                      |
+---------------------------------------------------------------------------+
|i6 : prune coker f                                                         |
|                                                                           |
|     /   Q[t]   \6     /   Q[t]   \6     /   Q[t]   \6     /   Q[t]   \6   |
|o6 = |----------|  <-- |----------|  <-- |----------|  <-- |----------|    |
|     | 2        |      | 2        |      | 2        |      | 2        |    |
|     \t  + t + 1/      \t  + t + 1/      \t  + t + 1/      \t  + t + 1/    |
|                                                                           |
|     0                 1                 2                 0               |
|                                                                           |
|o6 : ZZdFactorization                                                      |
+---------------------------------------------------------------------------+
|i7 : oo.dd                                                                 |
|                                                                           |
|         /   Q[t]   \6                                 /   Q[t]   \6       |
|o7 = 2 : |----------|  <------------------------------ |----------|  : 0   |
|         | 2        |     | 0 0 0 -b2 -abt-ab -a2  |   | 2        |        |
|         \t  + t + 1/     | 0 0 0 -a2 b2t+b2  ab   |   \t  + t + 1/        |
|                          | 0 0 0 abt -a2     -b2t |                       |
|                          | 1 0 0 -b  -a      0    |                       |
|                          | 0 1 0 0   -bt     -a   |                       |
|                          | 0 0 1 -a  0       bt+b |                       |
|                                                                           |
|         /   Q[t]   \6                                 /   Q[t]   \6       |
|     0 : |----------|  <------------------------------ |----------|  : 1   |
|         | 2        |     | -b2 -abt-ab -a2  0 0 0 |   | 2        |        |
|         \t  + t + 1/     | -a2 b2t+b2  ab   0 0 0 |   \t  + t + 1/        |
|                          | abt -a2     -b2t 0 0 0 |                       |
|                          | -b  -a      0    1 0 0 |                       |
|                          | 0   -bt     -a   0 1 0 |                       |
|                          | -a  0       bt+b 0 0 1 |                       |
|                                                                           |
|         /   Q[t]   \6                                 /   Q[t]   \6       |
|     1 : |----------|  <------------------------------ |----------|  : 2   |
|         | 2        |     | 1 0 0 -b  -a      0    |   | 2        |        |
|         \t  + t + 1/     | 0 1 0 0   -bt     -a   |   \t  + t + 1/        |
|                          | 0 0 1 -a  0       bt+b |                       |
|                          | 0 0 0 -b2 -abt-ab -a2  |                       |
|                          | 0 0 0 -a2 b2t+b2  ab   |                       |
|                          | 0 0 0 abt -a2     -b2t |                       |
|                                                                           |
|o7 : ZZdFactorizationMap                                                   |
+---------------------------------------------------------------------------+
|i8 : D = koszulMF(a^3+b^3+c^3)                                             |
|                                                                           |
|      4      4      4                                                      |
|o8 = Q  <-- Q  <-- Q                                                       |
|                                                                           |
|     0      1      0                                                       |
|                                                                           |
|o8 : ZZdFactorization                                                      |
+---------------------------------------------------------------------------+
|i9 : D.dd                                                                  |
|                                                                           |
|          4                        4                                       |
|o9 = 1 : Q  <-------------------- Q  : 0                                   |
|               | c2 0  b  a   |                                            |
|               | 0  c2 a2 -b2 |                                            |
|               | b2 a  -c 0   |                                            |
|               | a2 -b 0  -c  |                                            |
|                                                                           |
|          4                         4                                      |
|     0 : Q  <--------------------- Q  : 1                                  |
|               | c  0  b   a   |                                           |
|               | 0  c  a2  -b2 |                                           |
|               | b2 a  -c2 0   |                                           |
|               | a2 -b 0   -c2 |                                           |
|                                                                           |
|o9 : ZZdFactorizationMap                                                   |
+---------------------------------------------------------------------------+
|i10 : g = injectiveCover D                                                 |
|                                                                           |
|           8                        4                                      |
|o10 = 0 : Q  <-------------------- Q  : 0                                  |
|                | 1  0  0  0   |                                           |
|                | 0  1  0  0   |                                           |
|                | 0  0  1  0   |                                           |
|                | 0  0  0  1   |                                           |
|                | c2 0  b  a   |                                           |
|                | 0  c2 a2 -b2 |                                           |
|                | b2 a  -c 0   |                                           |
|                | a2 -b 0  -c  |                                           |
|                                                                           |
|           8                         4                                     |
|      1 : Q  <--------------------- Q  : 1                                 |
|                | c  0  b   a   |                                          |
|                | 0  c  a2  -b2 |                                          |
|                | b2 a  -c2 0   |                                          |
|                | a2 -b 0   -c2 |                                          |
|                | 1  0  0   0   |                                          |
|                | 0  1  0   0   |                                          |
|                | 0  0  1   0   |                                          |
|                | 0  0  0   1   |                                          |
|                                                                           |
|o10 : ZZdFactorizationMap                                                  |
+---------------------------------------------------------------------------+
|i11 : isCommutative g                                                      |
|                                                                           |
|o11 = true                                                                 |
+---------------------------------------------------------------------------+
|i12 : F = prune coker g                                                    |
|                                                                           |
|       4      4      4                                                     |
|o12 = Q  <-- Q  <-- Q                                                      |
|                                                                           |
|      0      1      0                                                      |
|                                                                           |
|o12 : ZZdFactorization                                                     |
+---------------------------------------------------------------------------+
|i13 : oo.dd                                                                |
|                                                                           |
|           4                         4                                     |
|o13 = 1 : Q  <--------------------- Q  : 0                                 |
|                | -c  0  -b  -a |                                          |
|                | 0   -c -a2 b2 |                                          |
|                | -b2 -a c2  0  |                                          |
|                | -a2 b  0   c2 |                                          |
|                                                                           |
|           4                          4                                    |
|      0 : Q  <---------------------- Q  : 1                                |
|                | -c2 0   -b  -a |                                         |
|                | 0   -c2 -a2 b2 |                                         |
|                | -b2 -a  c   0  |                                         |
|                | -a2 b   0   c  |                                         |
|                                                                           |
|o13 : ZZdFactorizationMap                                                  |
+---------------------------------------------------------------------------+
|i14 : F == D[1]                                                            |
|                                                                           |
|o14 = true                                                                 |
+---------------------------------------------------------------------------+

In this case, using the cokernel into the injective cover gives a factorization
that is directly equal to the shift of a 2-periodic factorization. In general
the cokernel of this inclusion natural defines a suspension functor on the
category of d-fold factorizations.

Ways to use injectiveCover:
===========================

  * "injectiveCover(ZZdFactorization)"

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

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

-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:5858:0.

isCommutative(ZZdFactorizationMap) -- whether a ZZ/d-graded factorization map commutes with the differentials
*************************************************************************************************************

  * Function: isCommutative (Macaulay2Doc),
  * Usage:
        isCommutative f
  * Inputs:
      * f, a map of ZZ/d-graded factorizations,
  * Outputs:
      * a Boolean value (Macaulay2Doc), that is true when $f$
        commutes with the differentials

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

For a ZZ/d-graded factorization map $f : C \to D$ of degree $d$, this method
checks whether, for all $i$, we have $dd^D_{i+d} * f_i =  (f_{i-1} * dd^C_i)$.

We first construct a random factorization map which commutes with the
differential.

+-----------------------------------------------------------------------------+
|i1 : S = ZZ/101[a,b];                                                        |
+-----------------------------------------------------------------------------+
|i2 : C = koszulMF({a,b}, a^3 + b^3)                                          |
|                                                                             |
|      2      2      2                                                        |
|o2 = S  <-- S  <-- S                                                         |
|                                                                             |
|     0      1      0                                                         |
|                                                                             |
|o2 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i3 : D = C ** C                                                              |
|                                                                             |
|      8      8      8                                                        |
|o3 = S  <-- S  <-- S                                                         |
|                                                                             |
|     0      1      0                                                         |
|                                                                             |
|o3 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i4 : f1 = randomFactorizationMap(C,C, Boundary => true)                      |
|                                                                             |
|          2                                                 2                |
|o4 = 0 : S  <--------------------------------------------- S  : 0            |
|               | -10a2+19b2-36a+24b -10a-20b           |                     |
|               | -5a2-46b2          -30a2+29b2+19a+29b |                     |
|                                                                             |
|          2                                                 2                |
|     1 : S  <--------------------------------------------- S  : 1            |
|               | -30a2+19b2+19a+24b 20b2-5a            |                     |
|               | -10a2+46b          -10a2+29b2-36a+29b |                     |
|                                                                             |
|o4 : ZZdFactorizationMap                                                     |
+-----------------------------------------------------------------------------+
|i5 : f2 = randomFactorizationMap(D,D, Cycle => true, InternalDegree => 1, Deg|
|                                                                             |
|          8                                                                  |
|o5 = 1 : S  <----------------------------------------------------------------|
|               | -37a-39b 47a+39b-12  -32a+19b-18 39          -22a-26b    -32|
|               | 45a-43b  -18a-13b+41 4a+13b-46   38          -7          -18|
|               | 22a-16b  22a+40b-11  -30a+3b     13a+20b-34  -40a+43b-16 -12|
|               | 11a-22b  32a+b-16    17a+28b     25a+2b-24   -11a+23b    41a|
|               | -27a-37b 34a+19b+16  -45a-b+48   39          -22a-26b-32 -45|
|               | 22a-16b  50a-42b-11  -48a-14b    -13a-20b-41 -36a+17b-16 35a|
|               | 22a+6b   -43a-15b+6  -21a+11b+24 38          7           -43|
|               | 11a-22b  18a+32b-16  8a+46b      -25a-2b+11  11a-23b     9a+|
|                                                                             |
|          8                                                                  |
|     0 : S  <----------------------------------------------------------------|
|               | 22a+26b-47  -22a+20b+4  -38         39          -22a-26b+22 |
|               | -49a+17b+16 -2a+18b-11  4a+13b-11   32a-19b+17  -7a+41b     |
|               | -31a-15b+16 8a-26b-11   -21a+11b-17 45a+b-17    -48a+21b    |
|               | 11a-22b     -22a+16b    25a-27b+16  -23a+11b-11 11a-22b     |
|               | -8a-15b     -34a+17b    -13a-20b+49 -36         18a+17b     |
|               | -16a-34b+16 17a-29b-11  -4a-13b-49  -45a-b-41   -29a-24b    |
|               | 30a+28b-16  -26a-46b+11 -21a+11b+11 32a-19b+34  -8a-22b     |
|               | -11a+23b    9a+24b      7           -25a-2b-42  11a-23b     |
|                                                                             |
|o5 : ZZdFactorizationMap                                                     |
|-----------------------------------------------------------------------------|
|ree => 1)                                                                    |
|                                                                             |
|                                      8                                      |
|------------------------------------ S  : 0                                  |
|a+19b-33 -47a-39b+31 -36         |                                           |
|a-13b-13 -4a-13b+17  22a-20b+43  |                                           |
|a+20b+11 -14a-25b    34a-17b     |                                           |
|+25b     15a+48b-16  -25a-46b+11 |                                           |
|a-b+29   -34a-19b-1  36          |                                           |
|-31b+11  43a+27b     -34a+17b    |                                           |
|a-15b+35 21a-11b+30  22a-20b-17  |                                           |
|8b       -40a-21b-16 -24a+37b+11 |                                           |
|                                                                             |
|                                        8                                    |
|-------------------------------------- S  : 1                                |
|-38         22a-20b+30 39          |                                         |
|-18a-13b    39a+21b    -47a-39b+43 |                                         |
|-43a-15b+41 19a-38b    -34a-19b-17 |                                         |
|50a+33b-16  -22a+16b   29a+2b+11   |                                         |
|-13a-20b+45 34a-17b    36          |                                         |
|18a+13b-28  -44a-8b    34a+19b     |                                         |
|-43a-15b    -38a-16b   -47a-39b    |                                         |
|-7          -32a+25b   -25a-2b-24  |                                         |
+-----------------------------------------------------------------------------+
|i6 : isCommutative f1                                                        |
|                                                                             |
|o6 = true                                                                    |
+-----------------------------------------------------------------------------+
|i7 : isCommutative f2                                                        |
|                                                                             |
|o7 = true                                                                    |
+-----------------------------------------------------------------------------+
|i8 : assert(degree f1 == 0)                                                  |
+-----------------------------------------------------------------------------+
|i9 : assert(source f1 == C and target f1 == C)                               |
+-----------------------------------------------------------------------------+

We can verify directly that maps commute with the differentials:

+-----------------------------------------------------------------------------+
|i10 : f3 = randomFactorizationMap(C, C, Cycle => true, Degree=>1,            |
|                                                                             |
|           2                       2                                         |
|o10 = 1 : S  <------------------- S  : 0                                     |
|                | 40a-33b -38 |                                              |
|                | 38a-40b -33 |                                              |
|                                                                             |
|           2                            2                                    |
|      0 : S  <------------------------ S  : 1                                |
|                | 33      -38      |                                         |
|                | 38a-40b -40a+33b |                                         |
|                                                                             |
|o10 : ZZdFactorizationMap                                                    |
|-----------------------------------------------------------------------------|
|InternalDegree => 1)                                                         |
+-----------------------------------------------------------------------------+
|i11 : isCommutative f3                                                       |
|                                                                             |
|o11 = true                                                                   |
+-----------------------------------------------------------------------------+
|i12 : assert(degree f3 == 1)                                                 |
+-----------------------------------------------------------------------------+
|i13 : part1 = dd^C_3 * f3_2                                                  |
|                                                                             |
|o13 = | 38a2-33b2             -33a-38b   |                                   |
|      | 40a3-33a2b-38ab2+40b3 -38a2+33b2 |                                   |
|                                                                             |
|              2      2                                                       |
|o13 : Matrix S  <-- S                                                        |
+-----------------------------------------------------------------------------+
|i14 : part2 = f3_1 * dd^C_2                                                  |
|                                                                             |
|o14 = | -38a2+33b2             33a+38b   |                                   |
|  | -40a3+33a2b+38ab2-40b3 38a2-33b2 |                                       |
|                                                                             |
|              2      2                                                       |
|o14 : Matrix S  <-- S                                                        |
+-----------------------------------------------------------------------------+
|i15 : assert(part1 + part2 == 0)                                             |
+-----------------------------------------------------------------------------+

If the debugLevel (Macaulay2Doc), is greater than zero, then
the location of the first failure of commutativity is displayed.

+---------------------------------------+
|i16 : f4 = randomFactorizationMap(D, C)|
|                                       |
|           8                   2       |
|o16 = 0 : S  <--------------- S  : 0   |
|                | 11  -7  |            |
|                | 46  2   |            |
|                | -28 29  |            |
|                | 1   -47 |            |
|                | -3  15  |            |
|                | 22  -37 |            |
|                | -47 -13 |            |
|                | -23 -10 |            |
|                                       |
|           8                   2       |
|      1 : S  <--------------- S  : 1   |
|                | 30  -20 |            |
|                | -18 24  |            |
|                | 39  -30 |            |
|                | 27  -48 |            |
|                | -22 -15 |            |
|                | 32  39  |            |
|                | -9  0   |            |
|                | -32 33  |            |
|                                       |
|o16 : ZZdFactorizationMap              |
+---------------------------------------+
|i17 : isCommutative f4                 |
|                                       |
|o17 = false                            |
+---------------------------------------+
|i18 : debugLevel = 1                   |
|                                       |
|o18 = 1                                |
+---------------------------------------+
|i19 : isCommutative f4                 |
|-- block (1, 0) fails to commute       |
|                                       |
|o19 = false                            |
+---------------------------------------+

See also
========

  * isFactorizationMorphism
    -- whether a
    ZZdFactorizationMap is a morphism of factorizations
  * randomFactorizationMap -- a random map of
    ZZ/d-graded factorizations

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

  * isCommutative(ZZdFactorizationMap)
    -- whether a ZZ/d-graded
    factorization map commutes with the differentials
-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:3265:0.

isdFactorization -- Checks if the differentials of a factorization compose to a scalar multiple of the identity
***************************************************************************************************************

  * Usage:
        isdFactorization(X)
  * Inputs:
      * X, a ZZ/d graded factorization, The input
        d-fold matrix factorization
  * Outputs:
      * a sequence (Macaulay2Doc), A sequence specifying
        whether the differentials of the factorization compose to a scalar
        multiple of the identity, where the second term of the sequence is the
        scalar multiple if it exists, otherwise it outputs no potential.

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

This method checks if the differentials of a factorization compose to a scalar
multiple of the identity. It returns a sequence where the first element is a
boolean value indicating whether the factorization is well-defined, and the
second element is the scalar multiple if it exists, otherwise it outputs no
potential.

This check is distinct from isWellDefined for factorizations, since it does not
do any other checks for well-definedness except for checking the differentials
compose to a scalar multiple of the identity.

+-----------------------------------------------------------------------------+
|i1 : Q = ZZ/101[x_1..x_3];                                                   |
+-----------------------------------------------------------------------------+
|i2 : X = ZZdfactorization {x_1, x_2 , x_3}                                   |
|                                                                             |
|      1      1      1      1                                                 |
|o2 = Q  <-- Q  <-- Q  <-- Q                                                  |
|                                                                             |
|     0      1      2      0                                                  |
|                                                                             |
|o2 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i3 : isdFactorization(X)                                                     |
|                                                                             |
|o3 = (true, x x x )                                                          |
|             1 2 3                                                           |
|                                                                             |
|o3 : Sequence                                                                |
+-----------------------------------------------------------------------------+
|i4 : f = x_1^3 + x_2^3 + x_3^3;                                              |
+-----------------------------------------------------------------------------+
|i5 : X2 = randomTailMF(f, 2, 4, 2)                                           |
|                                                                             |
|      4      4      4                                                        |
|o5 = Q  <-- Q  <-- Q                                                         |
|                                                                             |
|     0      1      0                                                         |
|                                                                             |
|o5 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i6 : X2.dd                                                                   |
|                                                                             |
|          4                                                                  |
|o6 = 1 : Q  <----------------------------------------------------------------|
|               {3} | 47x_2^2+8x_2x_3+14x_3^2 12x_2^2+46x_2x_3+17x_3^2 x_1^2+4|
|               {4} | -x_2-25x_3              x_1-46x_2+17x_3          2x_1+33|
|               {4} | x_1-49x_2-34x_3         9x_1-5x_2-6x_3           12x_1+2|
|               {4} | x_1+14x_2+26x_3         9x_1-43x_2-50x_3         12x_1-2|
|                                                                             |
|          4                                                                  |
|     0 : Q  <----------------------------------------------------------------|
|               {2} | 6x_1-50x_2-35x_3  -9x_1^2+38x_1x_2+32x_2^2+38x_1x_3-42x_|
|               {2} | -2x_1-29x_2+24x_3 x_1^2+37x_1x_2+10x_2^2-40x_1x_3+44x_2x|
|               {2} | x_1-45x_2-35x_3   7x_2^2+26x_2x_3+8x_3^2                |
|               {3} | 0                 5x_2+9x_3                             |
|                                                                             |
|o6 : ZZdFactorizationMap                                                     |
|-----------------------------------------------------------------------------|
|                                                                             |
|-----------------------------------------------------------------------------|
|5x_1x_2+50x_2^2+35x_1x_3-38x_2x_3-37x_3^2 -4x_1x_2^2-11x_2^3-9x_1x_2x_3-41x_2|
|x_2+28x_3                                 20x_1x_2+12x_2^2-8x_1x_3-13x_2x_3+4|
|4x_2+27x_3                                -20x_1^2+45x_1x_2-13x_2^2+17x_1x_3+|
|6x_2-17x_3                                9x_1x_2-48x_2^2+17x_1x_3-32x_2x_3-6|
|                                                                             |
|                                                                             |
|-----------------------------------------------------------------------------|
|2x_3-29x_3^2 47x_1x_2-23x_2^2-41x_1x_3+15x_2x_3+10x_3^2 x_1^2+31x_1x_2+32x_2^|
|_3-31x_3^2   x_1x_2+15x_2^2+40x_1x_3-26x_2x_3-13x_3^2   -37x_2^2-15x_1x_3-17x|
|             20x_2^2+45x_2x_3+6x_3^2                    34x_2^2+48x_2x_3-20x_|
|             5x_1+9x_2                                  -5x_1+3x_2-3x_3      |
|-----------------------------------------------------------------------------|
|                                         4                                   |
|--------------------------------------- Q  : 0                               |
|^2x_3+19x_1x_3^2+28x_2x_3^2-43x_3^3 |                                        |
|3x_3^2                              |                                        |
|46x_2x_3-42x_3^2                    |                                        |
|x_3^2                               |                                        |
|                                                                             |
|                                4                                            |
|------------------------------ Q  : 1                                        |
|2-8x_1x_3+22x_2x_3-27x_3^2 |                                                 |
|_3^2                       |                                                 |
|3^2                        |                                                 |
|                           |                                                 |
+-----------------------------------------------------------------------------+
|i7 : isdFactorization X2                                                     |
|                                                                             |
|             3    3    3                                                     |
|o7 = (true, x  + x  + x )                                                    |
|             1    2    3                                                     |
|                                                                             |
|o7 : Sequence                                                                |
+-----------------------------------------------------------------------------+
|i8 : randomLinearMF(2,Q)                                                     |
|                                                                             |
|      32      32      32                                                     |
|o8 = Q   <-- Q   <-- Q                                                       |
|                                                                             |
|     0       1       0                                                       |
|                                                                             |
|o8 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i9 : isdFactorization oo                                                     |
|                                                                             |
|              2               2                        2                     |
|o9 = (true, 7x  + 15x x  + 39x  - 23x x  + 43x x  - 17x )                    |
|              1      1 2      2      1 3      2 3      3                     |
|                                                                             |
|o9 : Sequence                                                                |
+-----------------------------------------------------------------------------+
|i10 : L = linearMF(f, t) --must specify root of unity t for larger period    |
|                                                                             |
|      /   Q[t]   \9     /   Q[t]   \9     /   Q[t]   \9     /   Q[t]   \9    |
|o10 = |----------|  <-- |----------|  <-- |----------|  <-- |----------|     |
|      | 2        |      | 2        |      | 2        |      | 2        |     |
|      \t  + t + 1/      \t  + t + 1/      \t  + t + 1/      \t  + t + 1/     |
|                                                                             |
|      0                 1                 2                 0                |
|                                                                             |
|o10 : ZZdFactorization                                                       |
+-----------------------------------------------------------------------------+
|i11 : isdFactorization L                                                     |
|                                                                             |
|              3    3    3                                                    |
|o11 = (true, x  + x  + x )                                                   |
|              1    2    3                                                    |
|                                                                             |
|o11 : Sequence                                                               |
+-----------------------------------------------------------------------------+
|i12 : L.dd                                                                   |
|                                                                             |
|          /   Q[t]   \9                                                      |
|o12 = 2 : |----------|  <----------------------------------------------------|
|          | 2        |     {0, 3} | x_3 0    0         x_2  x_1  0         0 |
|          \t  + t + 1/     {0, 3} | 0   x_3  0         0    x_2t x_1       0 |
|                           {0, 3} | 0   0    x_3       x_1  0    -x_2t-x_2 0 |
|                           {0, 3} | 0   0    0         x_3t 0    0         x_|
|                           {0, 3} | 0   0    0         0    x_3t 0         0 |
|                           {0, 3} | 0   0    0         0    0    x_3t      x_|
|                           {0, 3} | x_2 x_1  0         0    0    0         -x|
|                           {0, 3} | 0   x_2t x_1       0    0    0         0 |
|                           {0, 3} | x_1 0    -x_2t-x_2 0    0    0         0 |
|                                                                             |
|          /   Q[t]   \9                                                      |
|      0 : |----------|  <----------------------------------------------------|
|          | 2        |     {0, 3} | x_3 0    0         x_2  x_1  0         0 |
|          \t  + t + 1/     {0, 3} | 0   x_3  0         0    x_2t x_1       0 |
|                           {0, 3} | 0   0    x_3       x_1  0    -x_2t-x_2 0 |
|                           {0, 3} | 0   0    0         x_3t 0    0         x_|
|                           {0, 3} | 0   0    0         0    x_3t 0         0 |
|                           {0, 3} | 0   0    0         0    0    x_3t      x_|
|                           {0, 3} | x_2 x_1  0         0    0    0         -x|
|                           {0, 3} | 0   x_2t x_1       0    0    0         0 |
|                           {0, 3} | x_1 0    -x_2t-x_2 0    0    0         0 |
|                                                                             |
|          /   Q[t]   \9                                                      |
|      1 : |----------|  <----------------------------------------------------|
|          | 2        |     {0, 3} | x_3 0    0         x_2  x_1  0         0 |
|          \t  + t + 1/     {0, 3} | 0   x_3  0         0    x_2t x_1       0 |
|                           {0, 3} | 0   0    x_3       x_1  0    -x_2t-x_2 0 |
|                           {0, 3} | 0   0    0         x_3t 0    0         x_|
|                           {0, 3} | 0   0    0         0    x_3t 0         0 |
|                           {0, 3} | 0   0    0         0    0    x_3t      x_|
|                           {0, 3} | x_2 x_1  0         0    0    0         -x|
|                           {0, 3} | 0   x_2t x_1       0    0    0         0 |
|                           {0, 3} | x_1 0    -x_2t-x_2 0    0    0         0 |
|                                                                             |
|o12 : ZZdFactorizationMap                                                    |
|-----------------------------------------------------------------------------|
|                                /   Q[t]   \9                                |
|------------------------------- |----------|  : 0                            |
|        0         0         |   | 2        |                                 |
|        0         0         |   \t  + t + 1/                                 |
|        0         0         |                                                |
|2       x_1       0         |                                                |
|        x_2t      x_1       |                                                |
|1       0         -x_2t-x_2 |                                                |
|_3t-x_3 0         0         |                                                |
|        -x_3t-x_3 0         |                                                |
|        0         -x_3t-x_3 |                                                |
|                                                                             |
|                                /   Q[t]   \9                                |
|------------------------------- |----------|  : 1                            |
|        0         0         |   | 2        |                                 |
|        0         0         |   \t  + t + 1/                                 |
|        0         0         |                                                |
|2       x_1       0         |                                                |
|        x_2t      x_1       |                                                |
|1       0         -x_2t-x_2 |                                                |
|_3t-x_3 0         0         |                                                |
|        -x_3t-x_3 0         |                                                |
|        0         -x_3t-x_3 |                                                |
|                                                                             |
|                                /   Q[t]   \9                                |
|------------------------------- |----------|  : 2                            |
|        0         0         |   | 2        |                                 |
|        0         0         |   \t  + t + 1/                                 |
|        0         0         |                                                |
|2       x_1       0         |                                                |
|        x_2t      x_1       |                                                |
|1       0         -x_2t-x_2 |                                                |
|_3t-x_3 0         0         |                                                |
|        -x_3t-x_3 0         |                                                |
|        0         -x_3t-x_3 |                                                |
+-----------------------------------------------------------------------------+
|i13 : L.dd^3                                                                 |
|                                                                             |
|          /   Q[t]   \9                                                      |
|o13 = 0 : |----------|  <----------------------------------------------------|
|          | 2        |     {0, 3} | x_1^3+x_2^3+x_3^3 0                 0    |
|          \t  + t + 1/     {0, 3} | 0                 x_1^3+x_2^3+x_3^3 0    |
|                           {0, 3} | 0                 0                 x_1^3|
|                           {0, 3} | 0                 0                 0    |
|                           {0, 3} | 0                 0                 0    |
|                           {0, 3} | 0                 0                 0    |
|                           {0, 3} | 0                 0                 0    |
|                           {0, 3} | 0                 0                 0    |
|                           {0, 3} | 0                 0                 0    |
|                                                                             |
|          /   Q[t]   \9                                                      |
|      1 : |----------|  <----------------------------------------------------|
|          | 2        |     {0, 3} | x_1^3+x_2^3+x_3^3 0                 0    |
|          \t  + t + 1/     {0, 3} | 0                 x_1^3+x_2^3+x_3^3 0    |
|                           {0, 3} | 0                 0                 x_1^3|
|                           {0, 3} | 0                 0                 0    |
|                           {0, 3} | 0                 0                 0    |
|                           {0, 3} | 0                 0                 0    |
|                           {0, 3} | 0                 0                 0    |
|                           {0, 3} | 0                 0                 0    |
|                           {0, 3} | 0                 0                 0    |
|                                                                             |
|          /   Q[t]   \9                                                      |
|      2 : |----------|  <----------------------------------------------------|
|          | 2        |     {0, 3} | x_1^3+x_2^3+x_3^3 0                 0    |
|          \t  + t + 1/     {0, 3} | 0                 x_1^3+x_2^3+x_3^3 0    |
|                           {0, 3} | 0                 0                 x_1^3|
|                           {0, 3} | 0                 0                 0    |
|                           {0, 3} | 0                 0                 0    |
|                           {0, 3} | 0                 0                 0    |
|                           {0, 3} | 0                 0                 0    |
|                           {0, 3} | 0                 0                 0    |
|                           {0, 3} | 0                 0                 0    |
|                                                                             |
|o13 : ZZdFactorizationMap                                                    |
|-----------------------------------------------------------------------------|
|                                                                             |
|-----------------------------------------------------------------------------|
|             0                 0                 0                 0         |
|             0                 0                 0                 0         |
|+x_2^3+x_3^3 0                 0                 0                 0         |
|             x_1^3+x_2^3+x_3^3 0                 0                 0         |
|             0                 x_1^3+x_2^3+x_3^3 0                 0         |
|             0                 0                 x_1^3+x_2^3+x_3^3 0         |
|             0                 0                 0                 x_1^3+x_2^|
|             0                 0                 0                 0         |
|             0                 0                 0                 0         |
|                                                                             |
|                                                                             |
|-----------------------------------------------------------------------------|
|             0                 0                 0                 0         |
|             0                 0                 0                 0         |
|+x_2^3+x_3^3 0                 0                 0                 0         |
|             x_1^3+x_2^3+x_3^3 0                 0                 0         |
|             0                 x_1^3+x_2^3+x_3^3 0                 0         |
|             0                 0                 x_1^3+x_2^3+x_3^3 0         |
|             0                 0                 0                 x_1^3+x_2^|
|             0                 0                 0                 0         |
|             0                 0                 0                 0         |
|                                                                             |
|                                                                             |
|-----------------------------------------------------------------------------|
|             0                 0                 0                 0         |
|             0                 0                 0                 0         |
|+x_2^3+x_3^3 0                 0                 0                 0         |
|             x_1^3+x_2^3+x_3^3 0                 0                 0         |
|             0                 x_1^3+x_2^3+x_3^3 0                 0         |
|             0                 0                 x_1^3+x_2^3+x_3^3 0         |
|             0                 0                 0                 x_1^3+x_2^|
|             0                 0                 0                 0         |
|             0                 0                 0                 0         |
|-----------------------------------------------------------------------------|
|                                                /   Q[t]   \9                |
|----------------------------------------------- |----------|  : 0            |
|        0                 0                 |   | 2        |                 |
|        0                 0                 |   \t  + t + 1/                 |
|        0                 0                 |                                |
|        0                 0                 |                                |
|        0                 0                 |                                |
|        0                 0                 |                                |
|3+x_3^3 0                 0                 |                                |
|        x_1^3+x_2^3+x_3^3 0                 |                                |
|        0                 x_1^3+x_2^3+x_3^3 |                                |
|                                                                             |
|                                                /   Q[t]   \9                |
|----------------------------------------------- |----------|  : 1            |
|        0                 0                 |   | 2        |                 |
|        0                 0                 |   \t  + t + 1/                 |
|        0                 0                 |                                |
|        0                 0                 |                                |
|        0                 0                 |                                |
|        0                 0                 |                                |
|3+x_3^3 0                 0                 |                                |
|        x_1^3+x_2^3+x_3^3 0                 |                                |
|        0                 x_1^3+x_2^3+x_3^3 |                                |
|                                                                             |
|                                                /   Q[t]   \9                |
|----------------------------------------------- |----------|  : 2            |
|        0                 0                 |   | 2        |                 |
|        0                 0                 |   \t  + t + 1/                 |
|        0                 0                 |                                |
|        0                 0                 |                                |
|        0                 0                 |                                |
|        0                 0                 |                                |
|3+x_3^3 0                 0                 |                                |
|        x_1^3+x_2^3+x_3^3 0                 |                                |
|        0                 x_1^3+x_2^3+x_3^3 |                                |
+-----------------------------------------------------------------------------+

Caveat
======

This command is distinct from isWellDefined, since it only checks if the
differentials compose to be a scalar multiple of the identity.

See also
========

  * isWellDefined(ZZdFactorization),
    -- whether a ZZ/d-graded factorization is well-defined
  * tailMF(Module) -- Generate a ZZdFactorization from a module
    over a hypersurface ring
  * randomTailMF(RingElement) -- Construct a matrix
    factorization from a high syzygy of a random module over a hypersurface
  * linearMF(RingElement) -- Constructs a Koszul d-fold
    factorization of a homogeneous element of degree d
  * randomLinearMF(ZZ,Ring) -- Generates a linear d-fold
    factorization of a random degree d polynomial

Ways to use isdFactorization:
=============================

  * "isdFactorization(ZZdFactorization)"

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

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

-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:780:0.

isFactorizationMorphism(ZZdFactorizationMap) -- whether a ZZdFactorizationMap is a morphism of factorizations
*************************************************************************************************************

  * Function: isFactorizationMorphism,
  * Usage:
        isFactorizationMorphism f
  * Inputs:
      * f, a map of ZZ/d-graded factorizations,
  * Outputs:
      * a Boolean value (Macaulay2Doc), that is true when $f$
        commutes with the differentials and has degree $0$

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

For a factorization map $f : C \to D$ of degree $d$, this method checks whether
$d = 0$ and, for all $i$, we have $dd^D_{i+d} * f_i = (-1)^d * (f_{i-1} *
dd^C_i)$.

We first construct a random factorization morphism.

+-----------------------------------------------------------------------+
|i1 : S = ZZ/101[a,b,c];                                                |
+-----------------------------------------------------------------------+
|i2 : C = freeResolution coker vars S                                   |
|                                                                       |
|      1      3      3      1                                           |
|o2 = S  <-- S  <-- S  <-- S                                            |
|                                                                       |
|     0      1      2      3                                            |
|                                                                       |
|o2 : Complex                                                           |
+-----------------------------------------------------------------------+
|i3 : D = C ** C                                                        |
|                                                                       |
|      1      6      15      20      15      6      1                   |
|o3 = S  <-- S  <-- S   <-- S   <-- S   <-- S  <-- S                    |
|                                                                       |
|     0      1      2       3       4       5      6                    |
|                                                                       |
|o3 : Complex                                                           |
+-----------------------------------------------------------------------+
|i4 : f1 = randomComplexMap(D, C, Boundary => true, InternalDegree => 1)|
|                                                                       |
|          1                       1                                    |
|o4 = 0 : S  <------------------- S  : 0                                |
|               | -5a-17b-11c |                                         |
|                                                                       |
|          6                                                      3     |
|     1 : S  <-------------------------------------------------- S  : 1 |
|               {1} | 2a-28b+50c   -28a+39b-13c -23a-b-48c   |          |
|               {1} | 26a-16b+42c  41a-20b-19c  23a-11b-16c  |          |
|               {1} | 18a+31b+19c  -5a-23b-48c  50a-38b-19c  |          |
|               {1} | -7a-25b-38c  28a-36b+16c  23a-b-4c     |          |
|               {1} | 10a+16b-21c  -49a+3b-41c  -21a+11b+32c |          |
|               {1} | -41a+49b-19c 2a-29b+48c   -3a+5b+8c    |          |
|                                                                       |
|          15                                                      3    |
|     2 : S   <-------------------------------------------------- S  : 2|
|                {2} | 33a+7b-12c   16a-20b+41c  -39a-42b+11c |         |
|                {2} | 30a+40b-7c   -2a+46b+14c  4a+20b+35c   |         |
|                {2} | -3a-39b+2c   -39a-30b+47c 22a-34b-43c  |         |
|                {2} | -28a+39b+9c  -23a+32b+46c 47b-47c      |         |
|                {2} | 8a-25b+14c   7a-33b+16c   39a+3b-11c   |         |
|                {2} | -35a+8b+10c  -49a-20b+7c  -4a+33b+22c  |         |
|                {2} | 31a+35b-8c   -17a-20b-19c -8a-43b+4c   |         |
|                {2} | -28a+16b-29c 42a+43c      -39a-11b-37c |         |
|                {2} | 15a+8b-39c   -25a+30b     -25a-4b-16c  |         |
|                {2} | 8a-14b-7c    3a+33b-36c   -22a+41b+48c |         |
|                {2} | -24a+49b+2c  -37a+44b+5c  -19a+7b-24c  |         |
|                {2} | 50a+18b      43a+23b-19c  49a-38b+48c  |         |
|                {2} | -18a+42c     -38a+33b+34c -8a-2b-22c   |         |
|                {2} | 10a-b-10c    46b-45c      -22a-32b-6c  |         |
|                {2} | -25a+39c     -45a+44b-21c -50a+12b-25c |         |
|                                                                       |
|          20                            1                              |
|     3 : S   <------------------------ S  : 3                          |
|                {3} | 9a+22b+11c   |                                   |
|                {3} | -39a-32b+46c |                                   |
|                {3} | 4a+9b-28c    |                                   |
|                {3} | 13a+32b+c    |                                   |
|                {3} | -26a+20b-3c  |                                   |
|                {3} | 22a-24b+22c  |                                   |
|                {3} | -49a+30b-47c |                                   |
|                {3} | -11a+48b-23c |                                   |
|                {3} | -8a+15b-7c   |                                   |
|                {3} | 43a-39b+2c   |                                   |
|                {3} | -8a+29c      |                                   |
|                {3} | 36a-33b-47c  |                                   |
|                {3} | -3a+49b+15c  |                                   |
|                {3} | -22a+33b-37c |                                   |
|                {3} | -30a+19b-13c |                                   |
|                {3} | 41a-17b-10c  |                                   |
|                {3} | 16a+20b+30c  |                                   |
|                {3} | -28a-44b-18c |                                   |
|                {3} | -6a+39b+39c  |                                   |
|                {3} | 35a-36b+27c  |                                   |
|                                                                       |
|o4 : ComplexMap                                                        |
+-----------------------------------------------------------------------+
|i5 : isComplexMorphism f1                                              |
|                                                                       |
|o5 = true                                                              |
+-----------------------------------------------------------------------+
|i6 : assert(degree f1 == 0)                                            |
+-----------------------------------------------------------------------+
|i7 : assert isNullHomotopic f1                                         |
+-----------------------------------------------------------------------+
|i8 : assert(source f1 == C and target f1 == D)                         |
+-----------------------------------------------------------------------+

We next generate a complex morphism that (likely) induces a nontrivial map on
homology.

+-----------------------------------------------+
|i9 : f2 = randomComplexMap(D, C, Cycle => true)|
|                                               |
|          1               1                    |
|o9 = 0 : S  <----------- S  : 0                |
|               | -40 |                         |
|                                               |
|          6                           3        |
|     1 : S  <----------------------- S  : 1    |
|               {1} | -44 -48 22  |             |
|               {1} | 41  2   1   |             |
|               {1} | 18  -1  -9  |             |
|               {1} | 4   48  -22 |             |
|               {1} | -41 -42 -1  |             |
|               {1} | -18 1   -31 |             |
|                                               |
|          15                           3       |
|     2 : S   <----------------------- S  : 2   |
|                {2} | -11 -3  -35 |            |
|                {2} | -41 22  6   |            |
|                {2} | -49 -25 31  |            |
|                {2} | -48 22  0   |            |
|                {2} | 13  4   35  |            |
|                {2} | 40  -31 -6  |            |
|                {2} | 33  -3  -13 |            |
|                {2} | -41 0   1   |            |
|                {2} | 31  25  -40 |            |
|                {2} | -41 -35 -47 |            |
|                {2} | -49 35  29  |            |
|                {2} | 0   -18 1   |            |
|                {2} | -9  -4  -13 |            |
|                {2} | -40 35  -47 |            |
|                {2} | -31 35  -2  |            |
|                                               |
|          20                   1               |
|     3 : S   <--------------- S  : 3           |
|                {3} | -9  |                    |
|                {3} | -35 |                    |
|                {3} | 6   |                    |
|                {3} | 40  |                    |
|                {3} | 3   |                    |
|                {3} | -31 |                    |
|                {3} | 25  |                    |
|                {3} | -2  |                    |
|                {3} | -41 |                    |
|                {3} | -49 |                    |
|                {3} | -13 |                    |
|                {3} | 4   |                    |
|                {3} | 30  |                    |
|                {3} | -47 |                    |
|                {3} | 27  |                    |
|                {3} | -40 |                    |
|                {3} | 37  |                    |
|                {3} | -35 |                    |
|                {3} | -31 |                    |
|                {3} | -39 |                    |
|                                               |
|o9 : ComplexMap                                |
+-----------------------------------------------+
|i10 : isComplexMorphism f2                     |
|                                               |
|o10 = true                                     |
+-----------------------------------------------+
|i11 : assert(degree f2 == 0)                   |
+-----------------------------------------------+
|i12 : assert isComplexMorphism f2              |
+-----------------------------------------------+

When the degree is non-zero, the map is not a complex morphism. If the
debugLevel (Macaulay2Doc), is greater than zero, then information
about the failure is displayed.

+-----------------------------------------------------------------------------+
|i13 : f3 = randomComplexMap(D, C, Cycle => true, Degree=>1, InternalDegree =>|
|                                                                             |
|           6                   1                                             |
|o13 = 1 : S  <--------------- S  : 0                                         |
|                {1} | -26 |                                                  |
|                {1} | -50 |                                                  |
|                {1} | 1   |                                                  |
|                {1} | 26  |                                                  |
|                {1} | 50  |                                                  |
|                {1} | -1  |                                                  |
|                                                                             |
|           15                           3                                    |
|      2 : S   <----------------------- S  : 1                                |
|                 {2} | 35  -16 -48 |                                         |
|                 {2} | 17  49  -40 |                                         |
|                 {2} | 1   44  11  |                                         |
|                 {2} | 26  0   0   |                                         |
|                 {2} | 15  16  48  |                                         |
|                 {2} | -18 -49 40  |                                         |
|                 {2} | 35  10  -48 |                                         |
|                 {2} | 0   50  0   |                                         |
|                 {2} | -1  -45 -11 |                                         |
|                 {2} | 17  49  -14 |                                         |
|                 {2} | 1   44  -40 |                                         |
|                 {2} | 0   0   -1  |                                         |
|                 {2} | -15 10  -48 |                                         |
|                 {2} | 18  49  -14 |                                         |
|                 {2} | 1   45  -40 |                                         |
|                                                                             |
|           20                           3                                    |
|      3 : S   <----------------------- S  : 2                                |
|                 {3} | 29  -48 31  |                                         |
|                 {3} | 16  48  0   |                                         |
|                 {3} | -49 40  0   |                                         |
|                 {3} | 28  37  -31 |                                         |
|                 {3} | 35  0   48  |                                         |
|                 {3} | 46  -48 -30 |                                         |
|                 {3} | 1   0   -11 |                                         |
|                 {3} | -29 -18 -47 |                                         |
|                 {3} | 0   17  49  |                                         |
|                 {3} | 0   1   44  |                                         |
|                 {3} | -10 48  0   |                                         |
|                 {3} | -15 0   48  |                                         |
|                 {3} | -10 -37 -30 |                                         |
|                 {3} | -49 14  0   |                                         |
|                 {3} | 28  22  -47 |                                         |
|                 {3} | 0   18  49  |                                         |
|                 {3} | 46  18  -40 |                                         |
|                 {3} | 1   0   40  |                                         |
|                 {3} | 0   1   45  |                                         |
|                 {3} | 10  22  40  |                                         |
|                                                                             |
|           15                   1                                            |
|      4 : S   <--------------- S  : 3                                        |
|                 {4} | -31 |                                                 |
|                 {4} | -48 |                                                 |
|                 {4} | -29 |                                                 |
|                 {4} | -48 |                                                 |
|                 {4} | 30  |                                                 |
|                 {4} | -37 |                                                 |
|                 {4} | 47  |                                                 |
|                 {4} | -49 |                                                 |
|                 {4} | 28  |                                                 |
|                 {4} | -18 |                                                 |
|                 {4} | 46  |                                                 |
|                 {4} | 1   |                                                 |
|                 {4} | 40  |                                                 |
|                 {4} | -22 |                                                 |
|                 {4} | 10  |                                                 |
|                                                                             |
|o13 : ComplexMap                                                             |
|-----------------------------------------------------------------------------|
|1)                                                                           |
+-----------------------------------------------------------------------------+
|i14 : assert(degree f3 == 1)                                                 |
+-----------------------------------------------------------------------------+
|i15 : isComplexMorphism f3                                                   |
|                                                                             |
|o15 = false                                                                  |
+-----------------------------------------------------------------------------+
|i16 : debugLevel = 1                                                         |
|                                                                             |
|o16 = 1                                                                      |
+-----------------------------------------------------------------------------+
|i17 : isComplexMorphism f3                                                   |
|-- the complex map has non-zero degree                                       |
|                                                                             |
|o17 = false                                                                  |
+-----------------------------------------------------------------------------+
|i18 : assert isCommutative f3                                                |
+-----------------------------------------------------------------------------+
+---------------------------------------------+
|i19 : f4 = randomComplexMap(D, C)            |
|                                             |
|           1             1                   |
|o19 = 0 : S  <--------- S  : 0               |
|                | 7 |                        |
|                                             |
|           6                           3     |
|      1 : S  <----------------------- S  : 1 |
|                {1} | 30  8   -18 |          |
|                {1} | 13  8   42  |          |
|                {1} | -17 -29 23  |          |
|                {1} | -13 30  -28 |          |
|                {1} | 3   -46 15  |          |
|                {1} | -41 49  18  |          |
|                                             |
|           15                           3    |
|      2 : S   <----------------------- S  : 2|
|                 {2} | -16 -28 30  |         |
|                 {2} | -46 47  4   |         |
|                 {2} | 12  -28 22  |         |
|                 {2} | -18 6   5   |         |
|                 {2} | 27  -9  -20 |         |
|                 {2} | -21 -33 -13 |         |
|                 {2} | 23  28  -29 |         |
|                 {2} | -37 -29 15  |         |
|                 {2} | -23 26  -4  |         |
|                 {2} | 44  5   12  |         |
|                 {2} | -39 -37 3   |         |
|                 {2} | 20  -33 9   |         |
|                 {2} | 19  -28 -2  |         |
|                 {2} | 0   42  20  |         |
|                 {2} | -47 44  -26 |         |
|                                             |
|           20                   1            |
|      3 : S   <--------------- S  : 3        |
|                 {3} | 33  |                 |
|                 {3} | 16  |                 |
|                 {3} | 10  |                 |
|                 {3} | 31  |                 |
|                 {3} | 28  |                 |
|                 {3} | -6  |                 |
|                 {3} | 21  |                 |
|                 {3} | -30 |                 |
|                 {3} | -4  |                 |
|                 {3} | -14 |                 |
|                 {3} | -33 |                 |
|                 {3} | -42 |                 |
|                 {3} | -44 |                 |
|                 {3} | -5  |                 |
|                 {3} | -16 |                 |
|                 {3} | -35 |                 |
|                 {3} | -39 |                 |
|                 {3} | -4  |                 |
|                 {3} | -24 |                 |
|                 {3} | -32 |                 |
|                                             |
|o19 : ComplexMap                             |
+---------------------------------------------+
|i20 : assert(degree f4 == 0)                 |
+---------------------------------------------+
|i21 : debugLevel = 0                         |
|                                             |
|o21 = 0                                      |
+---------------------------------------------+
|i22 : isComplexMorphism f4                   |
|                                             |
|o22 = false                                  |
+---------------------------------------------+
|i23 : debugLevel = 1                         |
|                                             |
|o23 = 1                                      |
+---------------------------------------------+
|i24 : isComplexMorphism f4                   |
|-- block (1, 0) fails to commute             |
|                                             |
|o24 = false                                  |
+---------------------------------------------+

See also
========

  * isCommutative(ComplexMap) (Complexes),
    -- whether a complex map commutes with the differentials
  * randomComplexMap (Complexes),
    -- a random map of chain complexes
  * freeResolution (Complexes) -- compute a free
    resolution of a module or ideal

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

  * isFactorizationMorphism(ZZdFactorizationMap)
    -- whether a
    ZZdFactorizationMap is a morphism of factorizations
-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:118:0.

isFree(ZZdFactorization) -- whether a ZZ/d-graded factorization consists of free modules
****************************************************************************************

  * Function: isFree (Complexes),
  * Usage:
        isFree C
  * Inputs:
      * C, a ZZ/d graded factorization,
  * Outputs:
      * a Boolean value (Macaulay2Doc), that is true when each
        $C_i$ is a free module

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

This method checks whether the given representation of each module $C_i$ is
free. To determine whether the factorization $C$ is isomorphic to a free
factorization, use prune.

The following example demonstrates that the presentation of a module might not
reveal the property of being free.

+---------------------------------------------------------------+
|i1 : S = ZZ/101[a,b];                                          |
+---------------------------------------------------------------+
|i2 : M = koszulMF(ideal vars S, a^3+b^3)                       |
|                                                               |
|      2      2      2                                          |
|o2 = S  <-- S  <-- S                                           |
|                                                               |
|     0      1      0                                           |
|                                                               |
|o2 : ZZdFactorization                                          |
+---------------------------------------------------------------+
|i3 : M' = coker (M++M)_[0]                                     |
|                                                               |
|o3 = cokernel | 1 0 | <-- cokernel | 1 0 | <-- cokernel | 1 0 ||
|              | 0 1 |              | 0 1 |              | 0 1 ||
|              | 0 0 |              | 0 0 |              | 0 0 ||
|              | 0 0 |              | 0 0 |              | 0 0 ||
|                                                               |
|     0                    1                    0               |
|                                                               |
|o3 : ZZdFactorization                                          |
+---------------------------------------------------------------+
|i4 : prune M'                                                  |
|                                                               |
|      2      2      2                                          |
|o4 = S  <-- S  <-- S                                           |
|                                                               |
|     0      1      0                                           |
|                                                               |
|o4 : ZZdFactorization                                          |
+---------------------------------------------------------------+
|i5 : assert not isFree M'                                      |
+---------------------------------------------------------------+
|i6 : assert isFree prune M                                     |
+---------------------------------------------------------------+

See also
========

  * isFreeModule (Macaulay2Doc) -- whether something is a
    free module
  * prune(ZZdFactorization),
    -- minimal presentation of all terms in a ZZ/d-graded factorization

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

  * isFree(ZZdFactorization) -- whether a
    ZZ/d-graded factorization consists of free modules
-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:5330:0.

isHomogeneous(ZZdFactorizationMap) -- whether a map of ZZ/d-graded factorizations is homogeneous
************************************************************************************************

  * Function: isHomogeneous (Macaulay2Doc),
  * Usage:
        isHomogeneous f
  * Inputs:
      * f, a map of ZZ/d-graded factorizations,
  * Outputs:
      * a Boolean value (Macaulay2Doc), that is true when $f_i$
        is homogeneous, for all $i$

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

A map of factorizations $f \colon C \to D$ is homogeneous (graded) if its
underlying ring is graded, and all the component maps $f_i \colon C_i \to
D_{d+i}$ are graded of degree zero, where $f$ has degree $d$.

+-----------------------------------------------------------------------------+
|i1 : S = ZZ/101[a,b,c];                                                      |
+-----------------------------------------------------------------------------+
|i2 : R = S/(a^2+b^2+c^2);                                                    |
+-----------------------------------------------------------------------------+
|i3 : m = ideal vars R                                                        |
|                                                                             |
|o3 = ideal (a, b, c)                                                         |
|                                                                             |
|o3 : Ideal of R                                                              |
+-----------------------------------------------------------------------------+
|i4 : C = tailMF m                                                            |
|                                                                             |
|      4      4      4                                                        |
|o4 = S  <-- S  <-- S                                                         |
|                                                                             |
|     0      1      0                                                         |
|                                                                             |
|o4 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i5 : D = tailMF (m^2)                                                        |
|                                                                             |
|      8      8      8                                                        |
|o5 = S  <-- S  <-- S                                                         |
|                                                                             |
|     0      1      0                                                         |
|                                                                             |
|o5 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i6 : assert isHomogeneous dd^C                                               |
+-----------------------------------------------------------------------------+
|i7 : f = randomFactorizationMap(C, C, Degree => -1)                          |
|                                                                             |
|          4         4                                                        |
|o7 = 1 : S  <----- S  : 0                                                    |
|               0                                                             |
|                                                                             |
|          4                                                                  |
|     0 : S  <--------------------------------------------------------------- |
|               {3} | 24a-36b-30c  -38a-16b+39c -28a-47b+38c -16a+7b+15c  |   |
|               {3} | -29a+19b+19c 21a+34b+19c  2a+16b+22c   -23a+39b+43c |   |
|               {3} | -10a-29b-8c  -47a-39b-18c 45a-34b-48c  -17a-11b+48c |   |
|               {3} | -22a-29b-24c -13a-43b-15c -47a+47b+19c 36a+35b+11c  |   |
|                                                                             |
|o7 : ZZdFactorizationMap                                                     |
|-----------------------------------------------------------------------------|
| 4                                                                           |
|S  : 1                                                                       |
+-----------------------------------------------------------------------------+
|i8 : f = randomFactorizationMap(C, C, InternalDegree => 2)                   |
|                                                                             |
|          4                                                                  |
|o8 = 0 : S  <----------------------------------------------------------------|
|               {3} | -38a2+33ab+11b2+40ac+46bc-28c2 32a2-9ab-20b2-32ac+24bc-3|
|               {3} | a2-3ab-47b2+22ac-23bc-7c2      -48a2-15ab+39ac+33bc-49c2|
|               {3} | 2a2+29ab+15b2-47ac-37bc-13c2   -33a2-19ab-20b2+17ac+44bc|
|               {3} | -10a2+30ab+39b2-18ac+27bc-22c2 36a2+9ab+4b2-39ac+13bc-26|
|                                                                             |
|          4                                                                  |
|     1 : S  <----------------------------------------------------------------|
|               {4} | -22a2+10ab+30b2+7ac+13bc-17c2  -18a2+27ab+23b2-21ac-37bc|
|               {4} | -13a2+3ab+8b2-41ac+8bc-29c2    44a2-39ab+19b2+20ac-47c2 |
|               {4} | 30a2-46ab-18b2+49ac+42bc+23c2  -28a2+47ab+6b2-28ac-9bc-3|
|               {4} | -28a2+15ab-16b2+18ac-46bc+12c2 28a2-29ab+5b2+26ac-37bc-3|
|                                                                             |
|o8 : ZZdFactorizationMap                                                     |
|-----------------------------------------------------------------------------|
|                                                                       4     |
|--------------------------------------------------------------------- S  : 0 |
|0c2   22a2-49ab-8b2-11ac+43bc-8c2  -49a2-13ab+30b2+4ac-47bc+27c2  |          |
|      36a2-3ab-30b2-22ac+41bc+16c2 -40a2+37ab-31b2-35ac-39bc-31c2 |          |
|-39c2 -28a2-6ab-9b2+35ac-35bc+6c2  -48a2-29ab+30b2-48ac-37bc+47c2 |          |
|c2    40a2+3ab+25b2-31ac-2bc-41c2  -49a2+28ab+46b2-18ac+bc+40c2   |          |
|                                                                             |
|                                                                        4    |
|---------------------------------------------------------------------- S  : 1|
|-23c2 -28a2+42ab+30b2+44ac+4bc+22c2 21a2-30ab-14b2-4ac-33bc-42c2   |         |
|      5a2-20ab-29b2-13ac+15bc-4c2   -44a2-5ab-35b2-16ac-39bc-4c2   |         |
|3c2   12a2+3ab-2b2+9ac+20bc-26c2    -24a2-32ab-18b2-23ac+27bc-45c2 |         |
|3c2   33a2+16ab+31b2+10ac+28bc-6c2  18a2-28ab-11b2+42ac+8bc+42c2   |         |
+-----------------------------------------------------------------------------+

The image of a homogeneous factorization under a nonhomogeneous ring map may
fail to be homogeneous.

+-----------------------------------------------------------------------------+
|i9 : use S;                                                                  |
+-----------------------------------------------------------------------------+
|i10 : phi = map(S, S, {1,b,c})                                               |
|                                                                             |
|o10 = map (S, S, {1, b, c})                                                  |
|                                                                             |
|o10 : RingMap S <-- S                                                        |
+-----------------------------------------------------------------------------+
|i11 : D = phi C                                                              |
|                                                                             |
|       4      4      4                                                       |
|o11 = S  <-- S  <-- S                                                        |
|                                                                             |
|      0      1      0                                                        |
|                                                                             |
|o11 : ZZdFactorization                                                       |
+-----------------------------------------------------------------------------+
|i12 : dd^D                                                                   |
|                                                                             |
|           4                          4                                      |
|o12 = 1 : S  <---------------------- S  : 0                                  |
|                {4} | 0  -b 1 -c |                                           |
|                {4} | -1 -c 0 b  |                                           |
|                {4} | -c 1  b 0  |                                           |
|                {4} | b  0  c 1  |                                           |
|                                                                             |
|           4                          4                                      |
|      0 : S  <---------------------- S  : 1                                  |
|                {3} | 0  -1 -c b |                                           |
|                {3} | -b -c 1  0 |                                           |
|                {3} | 1  0  b  c |                                           |
|                {3} | -c b  0  1 |                                           |
|                                                                             |
|o12 : ZZdFactorizationMap                                                    |
+-----------------------------------------------------------------------------+
|i13 : assert not isHomogeneous dd^D                                          |
+-----------------------------------------------------------------------------+
|i14 : g = randomFactorizationMap(D, D, InternalDegree => 1)                  |
|                                                                             |
|           4                                                                 |
|o14 = 0 : S  <-------------------------------------------------------------- |
|                {3} | 49a+5b-38c   -28a-50b-29c 37a+34b+5c  19a-45b-29c  |   |
|                {3} | -26a+28b-33c -26a-49b+34c 16a-31b-49c -44a-42b-17c |   |
|                {3} | 9a-7b-46c    31a+28b+36c  -a+43b+48c  -23a-4b-2c   |   |
|                {3} | 2a-19b+43c   -40a+45b+42c 8a-40b-47c  34a-8b+27c   |   |
|                                                                             |
|           4                                                                 |
|      1 : S  <-------------------------------------------------------------- |
|                {4} | 7a+38b+37c   4a+5b+36c   23a-47b+10c  -37a+10b+10c |   |
|                {4} | -24a+25b-42c -16a+6b-43c -15a+47b+15c 34a-42b+34c  |   |
|                {4} | 24a-24b-47c  -27a-50b-6c -11a-3b-28c  -44a-39b-40c |   |
|                {4} | 12a-31b+37c  43a+5b-21c  -50a+17b-30c -29a+50b-10c |   |
|                                                                             |
|o14 : ZZdFactorizationMap                                                    |
|-----------------------------------------------------------------------------|
| 4                                                                           |
|S  : 0                                                                       |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
| 4                                                                           |
|S  : 1                                                                       |
+-----------------------------------------------------------------------------+

See also
========

  * Basic invariants and properties, --
    information about accessing basic features
  * isHomogeneous (Macaulay2Doc) -- whether something is
    homogeneous (graded)
  * randomFactorizationMap(ZZdFactorization,ZZdFactorization)
    -- a random map of ZZ/d-graded factorizations

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

  * isHomogeneous(ZZdFactorizationMap)
    -- whether a map of ZZ/d-graded
    factorizations is homogeneous
-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:2959:0.

isNullHomotopic(ZZdFactorizationMap) -- whether a map of ZZ/d-graded factorizations is null-homotopic
*****************************************************************************************************

  * Function: isNullHomotopic (Complexes),
  * Usage:
        isNullHomotopic f
  * Inputs:
      * f, a map of ZZ/d-graded factorizations,
  * Outputs:
      * a Boolean value (Macaulay2Doc), that is true when $f$ is
        null-homotopic

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

A map of ZZ/d-graded factorizations $f \colon C \to D$ is null-homotopic if
there exists a map of factorizations $h : C \to D$ of degree $\deg(f)+1$, such
that we have the equality \[ f = \operatorname{dd}^D h + (-1)^{\deg(f)} h
\operatorname{dd}^C. \]

As a first example, we verify that the identity map on the "trivial"
factorization is nullhomotopic.

+-------------------------------------------------------------+
|i1 : S = ZZ/101[a,b];                                        |
+-------------------------------------------------------------+
|i2 : C = trivialMF(S^2, a^3+b^3)                             |
|                                                             |
|      2      2      2                                        |
|o2 = S  <-- S  <-- S                                         |
|                                                             |
|     0      1      0                                         |
|                                                             |
|o2 : ZZdFactorization                                        |
+-------------------------------------------------------------+
|i3 : h = map(C, C, i -> if i == 1 then id_(S^2), Degree => 1)|
|                                                             |
|          2         2                                        |
|o3 = 1 : S  <----- S  : 0                                    |
|               0                                             |
|                                                             |
|          2               2                                  |
|     0 : S  <----------- S  : 1                              |
|               | 1 0 |                                       |
|               | 0 1 |                                       |
|                                                             |
|o3 : ZZdFactorizationMap                                     |
+-------------------------------------------------------------+
|i4 : isWellDefined h                                         |
|                                                             |
|o4 = true                                                    |
+-------------------------------------------------------------+
|i5 : assert isNullHomotopyOf(h, id_C)                        |
+-------------------------------------------------------------+
|i6 : assert isNullHomotopic id_C                             |
+-------------------------------------------------------------+

A random map of factorizations, arising as a boundary in the associated Hom
complex, is automatically null homotopic.  We use the method
nullHomotopy (Complexes), to construct a witness
and verify it is a null homotopy.

+------------------------------------------------------------+
|i7 : D = randomTailMF(a^3+b^3, 1,2,4)                       |
|                                                            |
|      2      2      2                                       |
|o7 = S  <-- S  <-- S                                        |
|                                                            |
|     0      1      0                                        |
|                                                            |
|o7 : ZZdFactorization                                       |
+------------------------------------------------------------+
|i8 : D.dd                                                   |
|                                                            |
|          2                                 2               |
|o8 = 1 : S  <----------------------------- S  : 0           |
|               {1} | -26b2 a2-3ab+32b2 |                    |
|               {2} | a+3b  3a+8b       |                    |
|                                                            |
|          2                              2                  |
|     0 : S  <-------------------------- S  : 1              |
|               | -3a-8b a2-3ab+32b2 |                       |
|               | a+3b   26b2        |                       |
|                                                            |
|o8 : ZZdFactorizationMap                                    |
+------------------------------------------------------------+
|i9 : f = randomFactorizationMap(D, D[1], Boundary => true)  |
|                                                            |
|          2                                   2             |
|o9 = 0 : S  <------------------------------- S  : 0         |
|               | -19a-38b -7a2+33ab-37b2 |                  |
|               | 19a-20b  -5a2+35ab-30b2 |                  |
|                                                            |
|          2                                            2    |
|     1 : S  <---------------------------------------- S  : 1|
|               {1} | 5a2-35ab-48b2 -4a2+24ab-42b2 |         |
|               {2} | 22a-11b       28a-39b        |         |
|                                                            |
|o9 : ZZdFactorizationMap                                    |
+------------------------------------------------------------+
|i10 : assert isNullHomotopic f                              |
+------------------------------------------------------------+
|i11 : h = nullHomotopy f                                    |
|                                                            |
|           2                           2                    |
|o11 = 1 : S  <----------------------- S  : 0                |
|                {1} | -10 -29a-8b |                         |
|                {2} | 0   -22     |                         |
|                                                            |
|           2                   2                            |
|      0 : S  <--------------- S  : 1                        |
|                | -29 -38 |                                 |
|                | -24 0   |                                 |
|                                                            |
|o11 : ZZdFactorizationMap                                   |
+------------------------------------------------------------+
|i12 : assert isNullHomotopyOf(h, f)                         |
+------------------------------------------------------------+

This procedure also works for complex maps whose degree is non-zero.

+------------------------------------------------------------------------+
|i13 : f = randomFactorizationMap(D, D[2], Boundary => true, Degree => 1)|
|                                                                        |
|           2                                             2              |
|o13 = 1 : S  <----------------------------------------- S  : 0          |
|                {1} | 15a2+38ab+48b2 46a2-44ab-44b2 |                   |
|                {2} | 39b            -22a-32b       |                   |
|                                                                        |
|           2                                   2                        |
|      0 : S  <------------------------------- S  : 1                    |
|                | 25a+40b 45a2-41ab+25b2  |                             |
|                | -a+36b  -15a2-38ab+27b2 |                             |
|                                                                        |
|o13 : ZZdFactorizationMap                                               |
+------------------------------------------------------------------------+
|i14 : assert isNullHomotopic f                                          |
+------------------------------------------------------------------------+
|i15 : h = nullHomotopy f                                                |
|                                                                        |
|           2                  2                                         |
|o15 = 0 : S  <-------------- S  : 0                                     |
|                | -16 21 |                                              |
|                | 39  34 |                                              |
|                                                                        |
|           2                           2                                |
|      1 : S  <----------------------- S  : 1                            |
|                {1} | 19 -47a-39b |                                     |
|                {2} | 0  0        |                                     |
|                                                                        |
|o15 : ZZdFactorizationMap                                               |
+------------------------------------------------------------------------+
|i16 : assert isNullHomotopyOf(h, f)                                     |
+------------------------------------------------------------------------+

See also
========

  * Basic invariants and properties, --
    information about accessing basic features
  * isNullHomotopyOf(ZZdFactorizationMap,ZZdFactorizationMap)
    -- whether
    the first map of ZZ/d-graded factorizations is a null homotopy for the
    second
  * nullHomotopy(ZZdFactorizationMap)
    -- a map which is a candidate for
    being a null homotopy
  * randomFactorizationMap -- a random map of
    ZZ/d-graded factorizations
  * Hom(ZZdFactorization,ZZdFactorization)
    -- the ZZ/d-graded
    homomorphism factorization between two ZZ/d-graded factorizations

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

  * isNullHomotopic(ZZdFactorizationMap)
    -- whether a map of ZZ/d-graded
    factorizations is null-homotopic
-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:5048:0.

isNullHomotopyOf(ZZdFactorizationMap,ZZdFactorizationMap) -- whether the first map of ZZ/d-graded factorizations is a null homotopy for the second
**************************************************************************************************************************************************

  * Function: isNullHomotopyOf (Complexes),
  * Usage:
        isNullHomotopyOf(h, f)
  * Inputs:
      * h, a map of ZZ/d-graded factorizations,
      * f, a map of ZZ/d-graded factorizations,
  * Outputs:
      * a Boolean value (Macaulay2Doc), that is true when $h$ is
        a null homotopy of $f$

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

A map of ZZ/d-graded factorizations $f \colon C \to D$ is null-homotopic if
there exists a map of factorizations $h : C \to D$ of degree $\deg(f)+1$, such
that we have the equality \[ f = \operatorname{dd}^D h + (-1)^{\deg(f)} h
\operatorname{dd}^C. \]

As a first example, we verify that the identity map on the "trivial"
factorization is nullhomotopic.

+-------------------------------------------------------------+
|i1 : S = ZZ/101[a,b];                                        |
+-------------------------------------------------------------+
|i2 : C = trivialMF(S^2, a^3+b^3)                             |
|                                                             |
|      2      2      2                                        |
|o2 = S  <-- S  <-- S                                         |
|                                                             |
|     0      1      0                                         |
|                                                             |
|o2 : ZZdFactorization                                        |
+-------------------------------------------------------------+
|i3 : h = map(C, C, i -> if i == 1 then id_(S^2), Degree => 1)|
|                                                             |
|          2         2                                        |
|o3 = 1 : S  <----- S  : 0                                    |
|               0                                             |
|                                                             |
|          2               2                                  |
|     0 : S  <----------- S  : 1                              |
|               | 1 0 |                                       |
|               | 0 1 |                                       |
|                                                             |
|o3 : ZZdFactorizationMap                                     |
+-------------------------------------------------------------+
|i4 : isWellDefined h                                         |
|                                                             |
|o4 = true                                                    |
+-------------------------------------------------------------+
|i5 : assert isNullHomotopyOf(h, id_C)                        |
+-------------------------------------------------------------+
|i6 : assert isNullHomotopic id_C                             |
+-------------------------------------------------------------+

A random map of factorizations, arising as a boundary in the associated Hom
complex, is automatically null homotopic.  We use the method
nullHomotopy (Complexes), to construct a witness
and verify it is a null homotopy.

+------------------------------------------------------------+
|i7 : D = randomTailMF(a^3+b^3, 1,2,4)                       |
|                                                            |
|      2      2      2                                       |
|o7 = S  <-- S  <-- S                                        |
|                                                            |
|     0      1      0                                        |
|                                                            |
|o7 : ZZdFactorization                                       |
+------------------------------------------------------------+
|i8 : D.dd                                                   |
|                                                            |
|          2                                 2               |
|o8 = 1 : S  <----------------------------- S  : 0           |
|               {1} | -26b2 a2-3ab+32b2 |                    |
|               {2} | a+3b  3a+8b       |                    |
|                                                            |
|          2                              2                  |
|     0 : S  <-------------------------- S  : 1              |
|               | -3a-8b a2-3ab+32b2 |                       |
|               | a+3b   26b2        |                       |
|                                                            |
|o8 : ZZdFactorizationMap                                    |
+------------------------------------------------------------+
|i9 : f = randomFactorizationMap(D, D[1], Boundary => true)  |
|                                                            |
|          2                                   2             |
|o9 = 0 : S  <------------------------------- S  : 0         |
|               | -19a-38b -7a2+33ab-37b2 |                  |
|               | 19a-20b  -5a2+35ab-30b2 |                  |
|                                                            |
|          2                                            2    |
|     1 : S  <---------------------------------------- S  : 1|
|               {1} | 5a2-35ab-48b2 -4a2+24ab-42b2 |         |
|               {2} | 22a-11b       28a-39b        |         |
|                                                            |
|o9 : ZZdFactorizationMap                                    |
+------------------------------------------------------------+
|i10 : assert isNullHomotopic f                              |
+------------------------------------------------------------+
|i11 : h = nullHomotopy f                                    |
|                                                            |
|           2                           2                    |
|o11 = 1 : S  <----------------------- S  : 0                |
|                {1} | -10 -29a-8b |                         |
|                {2} | 0   -22     |                         |
|                                                            |
|           2                   2                            |
|      0 : S  <--------------- S  : 1                        |
|                | -29 -38 |                                 |
|                | -24 0   |                                 |
|                                                            |
|o11 : ZZdFactorizationMap                                   |
+------------------------------------------------------------+
|i12 : assert isNullHomotopyOf(h, f)                         |
+------------------------------------------------------------+

By assigning debugLevel (Macaulay2Doc), a positive value, this
method provides some information about the nature of the failure to be a null
homotopy.

+---------------------------------------------------------------------+
|i13 : g1 = randomFactorizationMap(D, D[1], Degree => 1)              |
|                                                                     |
|           2                           2                             |
|o13 = 1 : S  <----------------------- S  : 0                         |
|                {1} | -16 39a+21b |                                  |
|                {2} | 0   34      |                                  |
|                                                                     |
|           2                   2                                     |
|      0 : S  <--------------- S  : 1                                 |
|                | 19  -39 |                                          |
|                | -47 -18 |                                          |
|                                                                     |
|o13 : ZZdFactorizationMap                                            |
+---------------------------------------------------------------------+
|i14 : g2 = randomFactorizationMap(D, D[1], Degree => -1)             |
|                                                                     |
|           2                            2                            |
|o14 = 1 : S  <------------------------ S  : 0                        |
|                {1} | -13 -43a-15b |                                 |
|                {2} | 0   -28      |                                 |
|                                                                     |
|           2                  2                                      |
|      0 : S  <-------------- S  : 1                                  |
|                | -47 2  |                                           |
|                | 38  16 |                                           |
|                                                                     |
|o14 : ZZdFactorizationMap                                            |
+---------------------------------------------------------------------+
|i15 : debugLevel = 1                                                 |
|                                                                     |
|o15 = 1                                                              |
+---------------------------------------------------------------------+
|i16 : assert not isNullHomotopyOf(g1, f)                             |
|fails to be a null homotopy at location 0                            |
|fails to be a null homotopy at location 1                            |
|fails to be a null homotopy at location 2                            |
+---------------------------------------------------------------------+
|i17 : assert not isNullHomotopyOf(g2, f)                             |
|expected degree of first map to be one more than degree of the second|
+---------------------------------------------------------------------+

See also
========

  * Basic invariants and properties, --
    information about accessing basic features
  * isNullHomotopic(ZZdFactorizationMap)
    -- whether a map of ZZ/d-graded
    factorizations is null-homotopic
  * nullHomotopy(ZZdFactorizationMap)
    -- a map which is a candidate for
    being a null homotopy
  * randomFactorizationMap -- a random map of
    ZZ/d-graded factorizations
  * Hom(ZZdFactorization,ZZdFactorization)
    -- the ZZ/d-graded
    homomorphism factorization between two ZZ/d-graded factorizations

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

  * isNullHomotopyOf(ZZdFactorizationMap,ZZdFactorizationMap)
    -- whether
    the first map of ZZ/d-graded factorizations is a null homotopy for the
    second
-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:4987:0.

isQuasiIsomorphism(ZZdFactorizationMap) -- whether a map of ZZ/d-graded factorizations is a quasi-isomorphism
*************************************************************************************************************

  * Function: isQuasiIsomorphism (Complexes),
  * Usage:
        isQuasiIsomorphism f
  * Inputs:
      * f, a map of ZZ/d-graded factorizations,
  * Optional inputs (Macaulay2Doc),:
      * Concentration (Complexes), =>
        ..., default value (-infinity,infinity),
  * Outputs:
      * a Boolean value (Macaulay2Doc), that is true when $f$ is
        a morphism of ZZ/d-graded factorizations such that the induced maps on
        homology are all isomorphisms

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

The cone, of a map $f \colon C \to D$ is
acyclic exactly when $f$ is a quasi-isomorphism.

+-----------------------------------------------------------------------------+
|i1 : S = ZZ/101[a,b];                                                        |
+-----------------------------------------------------------------------------+
|i2 : R = S/(a^3+b^3);                                                        |
+-----------------------------------------------------------------------------+
|i3 : m = ideal vars R                                                        |
|                                                                             |
|o3 = ideal (a, b)                                                            |
|                                                                             |
|o3 : Ideal of R                                                              |
+-----------------------------------------------------------------------------+
|i4 : C = tailMF m                                                            |
|                                                                             |
|      2      2      2                                                        |
|o4 = S  <-- S  <-- S                                                         |
|                                                                             |
|     0      1      0                                                         |
|                                                                             |
|o4 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i5 : D = tailMF (m^2)                                                        |
|                                                                             |
|      3      3      3                                                        |
|o5 = S  <-- S  <-- S                                                         |
|                                                                             |
|     0      1      0                                                         |
|                                                                             |
|o5 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i6 : f = randomFactorizationMap(C, C, Cycle => true) --only scalar mults of  |
|                                                                             |
|          2                     2                                            |
|o6 = 0 : S  <----------------- S  : 0                                        |
|               {2} | 24 0  |                                                 |
|               {3} | 0  24 |                                                 |
|                                                                             |
|          2                     2                                            |
|     1 : S  <----------------- S  : 1                                        |
|               {4} | 24 0  |                                                 |
|               {4} | 0  24 |                                                 |
|                                                                             |
|o6 : ZZdFactorizationMap                                                     |
|-----------------------------------------------------------------------------|
|the identity                                                                 |
+-----------------------------------------------------------------------------+
|i7 : isQuasiIsomorphism(Hom(f,C))                                            |
|                                                                             |
|o7 = true                                                                    |
+-----------------------------------------------------------------------------+
|i8 : g = randomFactorizationMap(D, D, Cycle => true, Degree => 1,            |
|                                                                             |
|          3                           3                                      |
|o8 = 1 : S  <----------------------- S  : 0                                  |
|               {5} | -26 19  -30 |                                           |
|               {5} | -1  -36 19  |                                           |
|               {5} | -38 -29 -10 |                                           |
|                                                                             |
|          3                                        3                         |
|     0 : S  <------------------------------------ S  : 1                     |
|               {3} | 26a+19b 19a+b    30a+36b |                              |
|               {3} | -a-10b  36a+38b  19a+29b |                              |
|               {3} | 38a+30b -29a-26b 10a+19b |                              |
|                                                                             |
|o8 : ZZdFactorizationMap                                                     |
|-----------------------------------------------------------------------------|
|InternalDegree => 2)                                                         |
+-----------------------------------------------------------------------------+
|i9 : assert isCommutative g                                                  |
+-----------------------------------------------------------------------------+
|i10 : isQuasiIsomorphism Hom(C,g)                                            |
|                                                                             |
|o10 = false                                                                  |
+-----------------------------------------------------------------------------+
|i11 : h = randomFactorizationMap(D, D, Boundary => true)                     |
|                                                                             |
|           3                                                         3       |
|o11 = 0 : S  <----------------------------------------------------- S  : 0   |
|                {3} | -29a2b-8ab2-16b3  16ab2+34b3  -38ab2+8b3  |            |
|                {3} | -22a2b-29ab2+39b3 -39ab2+19b3 41ab2+29b3  |            |
|                {3} | -24a2b-38ab2+21b3 -21ab2-47b3 -23ab2+38b3 |            |
|                                                                             |
|           3                                                         3       |
|      1 : S  <----------------------------------------------------- S  : 1   |
|                {5} | -29a2b+16ab2+38b3 -16ab2-21b3 34ab2+47b3  |            |
|                {5} | 22a2b-8b3         -39ab2-16b3 -19ab2+34b3 |            |
|                {5} | -24a2b+41ab2-29b3 21ab2+39b3  -47ab2+19b3 |            |
|                                                                             |
|o11 : ZZdFactorizationMap                                                    |
+-----------------------------------------------------------------------------+
|i12 : assert( HH Hom(D,h) == 0 )                                             |
+-----------------------------------------------------------------------------+

See also
========

  * Basic invariants and properties, --
    information about accessing basic features
  * cone(ZZdFactorizationMap) -- make the
    mapping cone of a morphism of ZZ/d-graded factorizations

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

  * isQuasiIsomorphism(ZZdFactorizationMap)
    -- whether a map of
    ZZ/d-graded factorizations is a quasi-isomorphism
-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:4923:0.

isShortExactSequence(ZZdFactorizationMap,ZZdFactorizationMap) -- whether a pair of ZZ/d-graded factorization maps forms a short exact sequence
**********************************************************************************************************************************************

  * Function: isShortExactSequence (Complexes),
  * Usage:
        isShortExactSequence(g, f)
  * Inputs:
      * f, a map of ZZ/d-graded factorizations,
      * g, a map of ZZ/d-graded factorizations,
  * Outputs:
      * a Boolean value (Macaulay2Doc), that is true (Macaulay2Doc),
        if these form a short exact sequence

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

A short exact sequence of ZZ/d-graded factorizations \[ 0 \to B \xrightarrow{f}
C \xrightarrow{g} D \to 0\] consists of two morphisms of factorizations $f
\colon B \to C$ and $g \colon C \to D$ such that $g f = 0$,
$\operatorname{image} f = \operatorname{ker} g$, $\operatorname{ker} f = 0$,
and $\operatorname{coker} g = 0$.

From a factorization morphism $h \colon B \to C$, one obtains a short exact
sequence \[ 0 \to \operatorname{image} h \to C \to \operatorname{coker} h \to
0. \]

+-----------------------------------------------------------------------------+
|i1 : S = ZZ/101[a,b];                                                        |
+-----------------------------------------------------------------------------+
|i2 : R = S/(a^3+b^3);                                                        |
+-----------------------------------------------------------------------------+
|i3 : m = ideal vars R                                                        |
|                                                                             |
|o3 = ideal (a, b)                                                            |
|                                                                             |
|o3 : Ideal of R                                                              |
+-----------------------------------------------------------------------------+
|i4 : C = tailMF m                                                            |
|                                                                             |
|      2      2      2                                                        |
|o4 = S  <-- S  <-- S                                                         |
|                                                                             |
|     0      1      0                                                         |
|                                                                             |
|o4 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i5 : D = tailMF (m^2)                                                        |
|                                                                             |
|      3      3      3                                                        |
|o5 = S  <-- S  <-- S                                                         |
|                                                                             |
|     0      1      0                                                         |
|                                                                             |
|o5 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i6 : h = randomFactorizationMap(C, D, Cycle => true)                         |
|                                                                             |
|          2                                         3                        |
|o6 = 0 : S  <------------------------------------- S  : 0                    |
|               {2} | 47a+17b -36a-48b -29a+24b |                             |
|               {3} | 19      -30      19       |                             |
|                                                                             |
|          2                                        3                         |
|     1 : S  <------------------------------------ S  : 1                     |
|               {4} | 47a-19b 36a+19b -29a-30b |                              |
|               {4} | 19a+24b 30a-17b 19a+48b  |                              |
|                                                                             |
|o6 : ZZdFactorizationMap                                                     |
+-----------------------------------------------------------------------------+
|i7 : f = inducedMap(C, image h)                                              |
|                                                                             |
|          2                                                                  |
|o7 = 0 : S  <------------------------------------- image {2} | 47a+17b       |
|               {2} | 47a+17b -36a-48b -29a+24b |         {3} | 19            |
|               {3} | 19      -30      19       |                             |
|                                                                             |
|          2                                                                  |
|     1 : S  <------------------------------------ image {4} | 47a-19b        |
|               {4} | 47a-19b 36a+19b -29a-30b |         {4} | 19a+24b        |
|               {4} | 19a+24b 30a-17b 19a+48b  |                              |
|                                                                             |
|o7 : ZZdFactorizationMap                                                     |
|-----------------------------------------------------------------------------|
| -36a-48b -29a+24b | : 0                                                     |
| -30      19       |                                                         |
|                                                                             |
|                                                                             |
|                                                                             |
|36a+19b -29a-30b | : 1                                                       |
|30a-17b 19a+48b  |                                                           |
+-----------------------------------------------------------------------------+
|i8 : g = inducedMap(coker h, C)                                              |
|                                                                             |
|                                                                      2      |
|o8 = 0 : cokernel {2} | 47a+17b -36a-48b -29a+24b | <--------------- S  : 0  |
|                  {3} | 19      -30      19       |    {2} | 1 0 |           |
|                                                       {3} | 0 0 |           |
|                                                                             |
|                                                                     2       |
|     1 : cokernel {4} | 47a-19b 36a+19b -29a-30b | <--------------- S  : 1   |
|                  {4} | 19a+24b 30a-17b 19a+48b  |    {4} | 1 0 |            |
|                                                      {4} | 0 1 |            |
|                                                                             |
|o8 : ZZdFactorizationMap                                                     |
+-----------------------------------------------------------------------------+
|i9 : assert isShortExactSequence(g,f)                                        |
+-----------------------------------------------------------------------------+

See also
========

  * Basic invariants and properties, --
    information about accessing basic features
  * cone(ZZdFactorizationMap) -- make the
    mapping cone of a morphism of ZZ/d-graded factorizations

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

  * isShortExactSequence(ZZdFactorizationMap,ZZdFactorizationMap),
    --
    whether a pair of ZZ/d-graded factorization maps forms a short exact
    sequence
-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:4883:0.

isWellDefined(ZZdFactorization) -- whether a ZZ/d-graded factorization is well-defined
**************************************************************************************

  * Function: isWellDefined (Macaulay2Doc),
  * Usage:
        isWellDefined C
  * Inputs:
      * C, a ZZ/d graded factorization,
  * Outputs:
      * a Boolean value (Macaulay2Doc), that is true when C
        determines a well defined factorization

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

This routine does NOT check that the differential of C composes to a scalar
multiple of the identity. Use isdFactorization, to
check this. It checks that the underlying data in C is a properly formed
ZZdFactorization object in Macaulay2. If the variable debugLevel is set to a
value greater than zero, then information about the nature of any failure is
displayed.

Most of the basic constructors will by default yield a well-defined
factorization.

+-----------------------------------------------------------------------------+
|i1 : R = ZZ/101[a..d];                                                       |
+-----------------------------------------------------------------------------+
|i2 : K = koszulMF(ideal vars R, a^2+b^2+c^2+d^2)                             |
|                                                                             |
|      8      8      8                                                        |
|o2 = R  <-- R  <-- R                                                         |
|                                                                             |
|     0      1      0                                                         |
|                                                                             |
|o2 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i3 : isWellDefined K                                                         |
|                                                                             |
|o3 = true                                                                    |
+-----------------------------------------------------------------------------+
|i4 : K.dd                                                                    |
|                                                                             |
|          8                                  8                               |
|o4 = 1 : R  <------------------------------ R  : 0                           |
|               | d 0  0  0  c  0  b  a  |                                    |
|               | 0 d  0  0  0  c  a  -b |                                    |
|               | 0 0  d  0  b  a  -c 0  |                                    |
|               | 0 0  0  d  a  -b 0  -c |                                    |
|               | c 0  b  a  -d 0  0  0  |                                    |
|               | 0 c  a  -b 0  -d 0  0  |                                    |
|               | b a  -c 0  0  0  -d 0  |                                    |
|               | a -b 0  -c 0  0  0  -d |                                    |
|                                                                             |
|          8                                  8                               |
|     0 : R  <------------------------------ R  : 1                           |
|               | d 0  0  0  c  0  b  a  |                                    |
|               | 0 d  0  0  0  c  a  -b |                                    |
|               | 0 0  d  0  b  a  -c 0  |                                    |
|               | 0 0  0  d  a  -b 0  -c |                                    |
|               | c 0  b  a  -d 0  0  0  |                                    |
|               | 0 c  a  -b 0  -d 0  0  |                                    |
|               | b a  -c 0  0  0  -d 0  |                                    |
|               | a -b 0  -c 0  0  0  -d |                                    |
|                                                                             |
|o4 : ZZdFactorizationMap                                                     |
+-----------------------------------------------------------------------------+
|i5 : K.dd^2                                                                  |
|                                                                             |
|          8                                                                  |
|o5 = 0 : R  <----------------------------------------------------------------|
|               | a2+b2+c2+d2 0           0           0           0           |
|               | 0           a2+b2+c2+d2 0           0           0           |
|               | 0           0           a2+b2+c2+d2 0           0           |
|               | 0           0           0           a2+b2+c2+d2 0           |
|               | 0           0           0           0           a2+b2+c2+d2 |
|               | 0           0           0           0           0           |
|               | 0           0           0           0           0           |
|               | 0           0           0           0           0           |
|                                                                             |
|          8                                                                  |
|     1 : R  <----------------------------------------------------------------|
|               | a2+b2+c2+d2 0           0           0           0           |
|               | 0           a2+b2+c2+d2 0           0           0           |
|               | 0           0           a2+b2+c2+d2 0           0           |
|               | 0           0           0           a2+b2+c2+d2 0           |
|               | 0           0           0           0           a2+b2+c2+d2 |
|               | 0           0           0           0           0           |
|               | 0           0           0           0           0           |
|               | 0           0           0           0           0           |
|                                                                             |
|o5 : ZZdFactorizationMap                                                     |
|-----------------------------------------------------------------------------|
|                                         8                                   |
|--------------------------------------- R  : 0                               |
|0           0           0           |                                        |
|0           0           0           |                                        |
|0           0           0           |                                        |
|0           0           0           |                                        |
|0           0           0           |                                        |
|a2+b2+c2+d2 0           0           |                                        |
|0           a2+b2+c2+d2 0           |                                        |
|0           0           a2+b2+c2+d2 |                                        |
|                                                                             |
|                                         8                                   |
|--------------------------------------- R  : 1                               |
|0           0           0           |                                        |
|0           0           0           |                                        |
|0           0           0           |                                        |
|0           0           0           |                                        |
|0           0           0           |                                        |
|a2+b2+c2+d2 0           0           |                                        |
|0           a2+b2+c2+d2 0           |                                        |
|0           0           a2+b2+c2+d2 |                                        |
+-----------------------------------------------------------------------------+
|i6 : isdFactorization K                                                      |
|                                                                             |
|             2    2    2    2                                                |
|o6 = (true, a  + b  + c  + d )                                               |
|                                                                             |
|o6 : Sequence                                                                |
+-----------------------------------------------------------------------------+

The direct sum of factorizations is considered well-defined, but it is NOT a
ZZ/d-graded factorization since the differential does not compose to a scalar
multiple of the identity.

+-----------------------------------------+
|i7 : C1 = randomTailMF(a^3+b^3, 2,6,2)   |
|                                         |
|      15      15      15                 |
|o7 = R   <-- R   <-- R                   |
|                                         |
|     0       1       0                   |
|                                         |
|o7 : ZZdFactorization                    |
+-----------------------------------------+
|i8 : C2 = randomTailMF(a^3+b^3+c^3,2,6,2)|
|                                         |
|      12      12      12                 |
|o8 = R   <-- R   <-- R                   |
|                                         |
|     0       1       0                   |
|                                         |
|o8 : ZZdFactorization                    |
+-----------------------------------------+
|i9 : isWellDefined (C1++C2)              |
|                                         |
|o9 = true                                |
+-----------------------------------------+
|i10 : isdFactorization (C1++C2)          |
|                                         |
|o10 = (false, no potential)              |
|                                         |
|o10 : Sequence                           |
+-----------------------------------------+

The zero factorization is well-defined, regardless of the specified period.

+-------------------------------------------+
|i11 : C = ZZdfactorization(R^0,2)          |
|                                           |
|o11 = 0 <-- 0 <-- 0                        |
|                                           |
|      0     1     0                        |
|                                           |
|o11 : ZZdFactorization                     |
+-------------------------------------------+
|i12 : isWellDefined C                      |
|                                           |
|o12 = true                                 |
+-------------------------------------------+
|i13 : isWellDefined ZZdfactorization(R^0,5)|
|                                           |
|o13 = true                                 |
+-------------------------------------------+

See also
========

  * isWellDefined(ZZdFactorizationMap)
    -- whether a map of ZZ/d-graded
    factorizations is well-defined
  * map (Macaulay2Doc) -- make a map

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

  * isWellDefined(ZZdFactorization),
    -- whether a ZZ/d-graded factorization is well-defined
-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:3758:0.

isWellDefined(ZZdFactorizationMap) -- whether a map of ZZ/d-graded factorizations is well-defined
*************************************************************************************************

  * Function: isWellDefined (Macaulay2Doc),
  * Usage:
        isWellDefined f
  * Inputs:
      * f, a map of ZZ/d-graded factorizations,
  * Outputs:
      * a Boolean value (Macaulay2Doc), that is true when f
        determines a well defined ZZ/d-graded factorization map

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

A map of factorizations $f : C \to D$ of degree $d$ is a sequence of maps $f_i
: C_i \to D_{d+i}$.  No relationship is required between these maps and the
differentials in the source and target.

This routine checks that $C$ and $D$ are well-defined factorizations, and that,
for each $f_i$, the source and target equal $C_i$ and $D_{d+i}$, respectively.
If the variable debugLevel is set to a value greater than zero, then
information about the nature of any failure is displayed.

Unlike the isWellDefined(ZZdFactorization),
the basic constructors for ZZ/d-graded
factorization maps are all but assured to be well defined. The only case that
could cause a problem is if one constructs the source or target complex, and
those are not well defined.

+-----------------------------------------------------------------------------+
|i1 : S = ZZ/101[a,b,c]                                                       |
|                                                                             |
|o1 = S                                                                       |
|                                                                             |
|o1 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i2 : R = S/(a^2+b^2+c^2);                                                    |
+-----------------------------------------------------------------------------+
|i3 : m = ideal vars R                                                        |
|                                                                             |
|o3 = ideal (a, b, c)                                                         |
|                                                                             |
|o3 : Ideal of R                                                              |
+-----------------------------------------------------------------------------+
|i4 : C = tailMF m                                                            |
|                                                                             |
|      4      4      4                                                        |
|o4 = S  <-- S  <-- S                                                         |
|                                                                             |
|     0      1      0                                                         |
|                                                                             |
|o4 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i5 : D = tailMF (m^2)                                                        |
|                                                                             |
|      8      8      8                                                        |
|o5 = S  <-- S  <-- S                                                         |
|                                                                             |
|     0      1      0                                                         |
|                                                                             |
|o5 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i6 : use S                                                                   |
|                                                                             |
|o6 = S                                                                       |
|                                                                             |
|o6 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i7 : H = hashTable { 2 => map(C_0, D_0, matrix {{0, 0, -c, -b, 0,            |
|              0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, b, 0, 0, 0}}),                 |
|         1 => map(C_1, D_1, matrix {{0, 0, 0, 0, 0, 0, 0, 0}, {0,            |
|              0, 0, 0, 0, 0}, {b, 0, 0, 0, 0, 0, 0, 0}})                     |
|         }                                                                   |
|                                                                             |
|o7 = HashTable{1 => {4} | 0  0 0 0  0 0 0 0 |  }                             |
|                    {4} | 0  0 0 -c b c 0 0 |                                |
|                    {4} | -c 0 0 0  0 0 0 0 |                                |
|                    {4} | b  0 0 0  0 0 0 0 |                                |
|               2 => {3} | 0 0 -c -b 0  -c 0 0 |                              |
|                    {3} | 0 0 0  0  -c 0  0 0 |                              |
|                    {3} | 0 0 0  0  0  0  0 0 |                              |
|                    {3} | 0 0 0  0  b  0  0 0 |                              |
|                                                                             |
|o7 : HashTable                                                               |
|-----------------------------------------------------------------------------|
|-c, 0, 0}, {0, 0, 0, 0, -c, 0, 0, 0}, {0, 0,                                 |
|                                                                             |
|0, 0, -c, b, c, 0, 0}, {-c, 0, 0,                                            |
+-----------------------------------------------------------------------------+
|i8 : f = map(C, D, H)                                                        |
|                                                                             |
|          4                                   8                              |
|o8 = 0 : S  <------------------------------- S  : 0                          |
|               {3} | 0 0 -c -b 0  -c 0 0 |                                   |
|               {3} | 0 0 0  0  -c 0  0 0 |                                   |
|               {3} | 0 0 0  0  0  0  0 0 |                                   |
|               {3} | 0 0 0  0  b  0  0 0 |                                   |
|                                                                             |
|          4                                 8                                |
|     1 : S  <----------------------------- S  : 1                            |
|               {4} | 0  0 0 0  0 0 0 0 |                                     |
|               {4} | 0  0 0 -c b c 0 0 |                                     |
|               {4} | -c 0 0 0  0 0 0 0 |                                     |
|               {4} | b  0 0 0  0 0 0 0 |                                     |
|                                                                             |
|o8 : ZZdFactorizationMap                                                     |
+-----------------------------------------------------------------------------+
|i9 : assert isWellDefined f                                                  |
+-----------------------------------------------------------------------------+
|i10 : assert isHomogeneous f                                                 |
+-----------------------------------------------------------------------------+
|i11 : assert(degree f == 0)                                                  |
+-----------------------------------------------------------------------------+
|i12 : assert isFactorizationMorphism f                                       |
+-----------------------------------------------------------------------------+

We construct two random maps of factorizations, and check to see that, as
should be the case, both are well defined.

+-----------------------------------------------------------------------------+
|i13 : g = randomFactorizationMap(C,D)                                        |
|                                                                             |
|           4                                                                 |
|o13 = 0 : S  <---------------------------------------------------------------|
|                {3} | 24a-36b-30c  -38a-16b+39c -28a-47b+38c -16a+7b+15c  -38|
|                {3} | -29a+19b+19c 21a+34b+19c  2a+16b+22c   -23a+39b+43c 11a|
|                {3} | -10a-29b-8c  -47a-39b-18c 45a-34b-48c  -17a-11b+48c a-3|
|                {3} | -22a-29b-24c -13a-43b-15c -47a+47b+19c 36a+35b+11c  -47|
|                                                                             |
|           4                                                                 |
|      1 : S  <---------------------------------------------------------------|
|                {4} | 22a-49b-11c  -28a-6b+35c -49a-13b+4c  -48a-29b-48c -22a|
|                {4} | -8a+43b-8c   -9a-35b+6c  30a-47b+27c  30a-37b+47c  30a+|
|                {4} | 36a-3b-22c   40a+3b-31c  -40a+37b-35c -49a+28b-18c -13a|
|                {4} | -30a+41b+16c 25a-2b-41c  -31a-39b-31c 46a+b+40c    8a+8|
|                                                                             |
|o13 : ZZdFactorizationMap                                                    |
|-----------------------------------------------------------------------------|
|                                                      8                      |
|---------------------------------------------------- S  : 0                  |
|a+33b+40c 2a+29b-47c   32a-9b-32c   -33a-19b+17c |                           |
|+46b-28c  15a-37b-13c  -20a+24b-30c -20a+44b-39c |                           |
|b+22c     -10a+30b-18c -48a-15b+39c 36a+9b-39c   |                           |
|a-23b-7c  39a+27b-22c  33b-49c      4a+13b-26c   |                           |
|                                                                             |
|                                                    8                        |
|-------------------------------------------------- S  : 1                    |
|+10b+7c 30a-46b+49c  -18a+27b-21c -28a+47b-28c |                             |
|13b-17c -18a+42b+23c 23a-37b-23c  6a-9b-33c    |                             |
|+3b-41c -28a+15b+18c 44a-39b+20c  28a-29b+26c  |                             |
|b-29c   -16a-46b+12c 19a-47c      5a-37b-33c   |                             |
+-----------------------------------------------------------------------------+
|i14 : assert isWellDefined g                                                 |
+-----------------------------------------------------------------------------+
|i15 : assert not isCommutative g                                             |
+-----------------------------------------------------------------------------+
+-----------------------------------------------------------------------------+
|i16 : h = randomFactorizationMap(C,D, Cycle => true)                         |
|                                                                             |
|           4                                                                 |
|o16 = 0 : S  <---------------------------------------------------------------|
|                {3} | 28a+18b-25c -3a+15b+35c -25a+28b+10c 38a+47b+45c  38a+1|
|                {3} | 46a-22b-33c 32a-42b-16c -a-3b+15c    16a+2b-42c   -38a+|
|                {3} | -40a+48b-4c 23a-20b+29c -30a+16b+40c -31a-18b+35c -5a+3|
|                {3} | 29a-13b+42c -36a+4b-46c 5a+20b+33c   33a-35b-37c  14a+4|
|                                                                             |
|           4                                                                 |
|      1 : S  <---------------------------------------------------------------|
|                {4} | -5a+2b-11c   40a+35b-37c  -23a+24b+8c 30a-5b-2c    -31a|
|                {4} | -38a+35b-7c  28a+46b-42c  -3a-20b+37c -25a+21b+17c -38a|
|                {4} | -38a+18b+23c -46a-11b+45c -32a+24b-9c a-35b-7c     16a+|
|                {4} | 14a-47b-36c  -29a+9b-35c  36a-30b-18c -5a+36b+12c  33a+|
|                                                                             |
|o16 : ZZdFactorizationMap                                                    |
|-----------------------------------------------------------------------------|
|                                                  8                          |
|------------------------------------------------ S  : 0                      |
|7b-12c  44a+9b+23c  -30a-30b+5c  2a+36b+34c  |                               |
|39b-12c 28a-35b-7c  5a-24b+29c   33a+5b-4c   |                               |
|4b+40c  37a-11b+36c -28a+24b+49c 12a-35b-14c |                               |
|9b-7c   24a+46b-11c -29a-20b+5c  31a+21b-50c |                               |
|                                                                             |
|                                                    8                        |
|-------------------------------------------------- S  : 1                    |
|-39b+42c 37a+22b+7c   -28a+42b+44c 12a+3b+9c   |                             |
|+49b-33c -44a-13b+12c 30a+4b+22c   -2a+20b-26c |                             |
|34b-25c  28a+48b+12c  5a-20b-13c   33a+16b+10c |                             |
|17b+4c   24a+18b+40c  -29a+15b-4c  31a+28b-6c  |                             |
+-----------------------------------------------------------------------------+
|i17 : assert isWellDefined h                                                 |
+-----------------------------------------------------------------------------+
|i18 : assert isFactorizationMorphism h                                       |
+-----------------------------------------------------------------------------+

This method also checks the following aspects of the data structure:

  * The underlying hash table has exactly the expected keys, namely, source,
    target, degree, map, cache
  * The ring of the source and target are the same
  * The source and target are well defined complexes
  * The degree is an integer
  * All keys in the map field are integers, in the range of the concentration
    of the source
  * The source and target of each $f_i$ is as expected
  * If the isCommutative key is present in the cache table, then commutativity
    of the map with the differentials is checked

See also
========

  * isWellDefined(ZZdFactorization),
    -- whether a ZZ/d-graded factorization is well-defined
  * isCommutative(ZZdFactorizationMap)
    -- whether a ZZ/d-graded
    factorization map commutes with the differentials
  * map(ZZdFactorization,ZZdFactorization,HashTable)
    -- make a map of
    ZZ/d-graded factorizations

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

  * isWellDefined(ZZdFactorizationMap)
    -- whether a map of ZZ/d-graded
    factorizations is well-defined
-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:2794:0.

isZZdComplex -- Checks if the differentials of a factorization compose to 0
***************************************************************************

  * Usage:
        isZZdComplex(ZZdFactorization)
  * Inputs:
      * ZZdFactorization, a ZZ/d graded factorization,
        A ZZdFactorization object representing a complex
  * Outputs:
      * a Boolean value (Macaulay2Doc),

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

This method evaluates whether all d-fold compositions of the differentials are
equal to 0. A simple way to obtain a ZZ/d-graded complex is to form the
endomorphisms of a factorization:

+----------------------------------------------------------------------------+
|i1 : Q = ZZ/101[x_1..x_3];                                                  |
+----------------------------------------------------------------------------+
|i2 : F = randomTailMF(x_1^3+x_2^3 + x_3^3 , 2, 5, 2)                        |
|                                                                            |
|      9      9      9                                                       |
|o2 = Q  <-- Q  <-- Q                                                        |
|                                                                            |
|     0      1      0                                                        |
|                                                                            |
|o2 : ZZdFactorization                                                       |
+----------------------------------------------------------------------------+
|i3 : E = Hom(F,F)                                                           |
|                                                                            |
|      162      162      162                                                 |
|o3 = Q    <-- Q    <-- Q                                                    |
|                                                                            |
|     0        1        0                                                    |
|                                                                            |
|o3 : ZZdFactorization                                                       |
+----------------------------------------------------------------------------+
|i4 : isZZdComplex E                                                         |
|                                                                            |
|o4 = true                                                                   |
+----------------------------------------------------------------------------+
|i5 : F' = linearMF(x_1^3 + x_2^3 , t)                                       |
|                                                                            |
|     /   Q[t]   \3     /   Q[t]   \3     /   Q[t]   \3     /   Q[t]   \3    |
|o5 = |----------|  <-- |----------|  <-- |----------|  <-- |----------|     |
|     | 2        |      | 2        |      | 2        |      | 2        |     |
|     \t  + t + 1/      \t  + t + 1/      \t  + t + 1/      \t  + t + 1/     |
|                                                                            |
|     0                 1                 2                 0                |
|                                                                            |
|o5 : ZZdFactorization                                                       |
+----------------------------------------------------------------------------+
|i6 : E' = Hom(F', F')                                                       |
|                                                                            |
|     /   Q[t]   \27     /   Q[t]   \27     /   Q[t]   \27     /   Q[t]   \27|
|o6 = |----------|   <-- |----------|   <-- |----------|   <-- |----------|  |
|     | 2        |       | 2        |       | 2        |       | 2        |  |
|     \t  + t + 1/       \t  + t + 1/       \t  + t + 1/       \t  + t + 1/  |
|                                                                            |
|     0                  1                  2                  0             |
|                                                                            |
|o6 : ZZdFactorization                                                       |
+----------------------------------------------------------------------------+
|i7 : isZZdComplex E'                                                        |
|                                                                            |
|o7 = true                                                                   |
+----------------------------------------------------------------------------+

Folding a complex is also another simple way to obtain a ZZ/d-graded complex:

+-----------------------------------------+
|i8 : K = koszulComplex vars Q            |
|                                         |
|      1      3      3      1             |
|o8 = Q  <-- Q  <-- Q  <-- Q              |
|                                         |
|     0      1      2      3              |
|                                         |
|o8 : Complex                             |
+-----------------------------------------+
|i9 : fK = Fold(K, 2)                     |
|                                         |
|      4      4      4                    |
|o9 = Q  <-- Q  <-- Q                     |
|                                         |
|     0      1      0                     |
|                                         |
|o9 : ZZdFactorization                    |
+-----------------------------------------+
|i10 : isZZdComplex fK                    |
|                                         |
|o10 = true                               |
+-----------------------------------------+
|i11 : Fold(K**K,4)                       |
|                                         |
|       16      12      16      20      16|
|o11 = Q   <-- Q   <-- Q   <-- Q   <-- Q  |
|                                         |
|      0       1       2       3       0  |
|                                         |
|o11 : ZZdFactorization                   |
+-----------------------------------------+
|i12 : isZZdComplex oo                    |
|                                         |
|o12 = true                               |
+-----------------------------------------+

See also
========

  * Making ZZdFactorizations -- Information
    about the basic constructors
  * Fold -- Convert any complex or complex map into a ZZ/d-graded
    factorization (or map) for a fixed integer d
  * randomTailMF -- Construct a matrix factorization from
    a high syzygy of a random module over a hypersurface

Ways to use isZZdComplex:
=========================

  * "isZZdComplex(ZZdFactorization)"

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

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

-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:5664:0.

kernel(ZZdFactorizationMap) -- make the kernel of a map of ZZ/d-graded factorizations
*************************************************************************************

  * Function: kernel (Macaulay2Doc),
  * Usage:
        kernel f
        ker f
  * Inputs:
      * f, a map of ZZ/d-graded factorizations,
  * Optional inputs (Macaulay2Doc),:
      * DegreeLimit (Macaulay2Doc),
        => ..., default value {},
      * Strategy (Macaulay2Doc),
        => ..., default value {},
      * SubringLimit (Macaulay2Doc),
        => ..., default value infinity,
  * Outputs:
      * a ZZ/d graded factorization,

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

The kernel of a ZZ/d-graded factorization map $f : C \to D$ is the
factorization $E$ whose $i-th$ term is $kernel(f_i)$, and whose differential is
induced from the differential on the source.

In the following example, we first construct a random factorization morphism $f
: C \to D$.

+-----------------------------------------------------------------------------+
|i1 : S = ZZ/101[a,b];                                                        |
+-----------------------------------------------------------------------------+
|i2 : R = S/(a^3+b^3);                                                        |
+-----------------------------------------------------------------------------+
|i3 : m = ideal vars R                                                        |
|                                                                             |
|o3 = ideal (a, b)                                                            |
|                                                                             |
|o3 : Ideal of R                                                              |
+-----------------------------------------------------------------------------+
|i4 : C = tailMF m                                                            |
|                                                                             |
|      2      2      2                                                        |
|o4 = S  <-- S  <-- S                                                         |
|                                                                             |
|     0      1      0                                                         |
|                                                                             |
|o4 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i5 : D = tailMF (m^2)                                                        |
|                                                                             |
|      3      3      3                                                        |
|o5 = S  <-- S  <-- S                                                         |
|                                                                             |
|     0      1      0                                                         |
|                                                                             |
|o5 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i6 : f = randomFactorizationMap(C, D, Cycle => true, InternalDegree => 2)    |
|                                                                             |
|          2                                                                  |
|o6 = 0 : S  <----------------------------------------------------------------|
|               {2} | -34a3+15a2b-31ab2-38b3 -29a3+35a2b+6ab2+38b3 -22a3-5a2b+|
|               {3} | -38a2-16ab+39b2        -10a2-29ab-8b2        21a2+34ab+1|
|                                                                             |
|          2                                                                  |
|     1 : S  <----------------------------------------------------------------|
|               {4} | -34a3-14a2b-12ab2-19b3 29a3+44a2b-35ab2+39b3 -22a3-39a2b|
|               {4} | -38a3+8a2b+3ab2-30b3   10a3+21a2b-40ab2+38b3 21a3+18a2b+|
|                                                                             |
|o6 : ZZdFactorizationMap                                                     |
|-----------------------------------------------------------------------------|
|                3                                                            |
|-------------- S  : 0                                                        |
|41ab2-30b3 |                                                                 |
|9b2        |                                                                 |
|                                                                             |
|                3                                                            |
|-------------- S  : 1                                                        |
|+48ab2-8b3 |                                                                 |
|32ab2-38b3 |                                                                 |
+-----------------------------------------------------------------------------+
|i7 : g = inducedMap(D, ker f)                                                |
|                                                                             |
|          3                                                                  |
|o7 = 0 : S  <------------------------------------------------ image {3} |    |
|               {3} | -29a5-27a4b+a3b2+2a2b3+10ab4+50b5    |         {3} |    |
|               {3} | -19a5-38a4b+30a3b2+14a2b3+29ab4+21b5 |         {3} |    |
|               {3} | a5+37a4b+a3b2+29a2b3-24ab4-30b5      |                  |
|                                                                             |
|          3                                                                  |
|     1 : S  <----------------------------------------------- image {5} |     |
|               {5} | -29a5+a4b-37a3b2+38a2b3+44ab4+30b5  |         {5} |     |
|               {5} | 19a5-10a4b-47a3b2+34a2b3+40ab4+50b5 |         {5} |     |
|               {5} | a5+17a4b+47a3b2+12a2b3-22ab4+21b5   |                   |
|                                                                             |
|o7 : ZZdFactorizationMap                                                     |
|-----------------------------------------------------------------------------|
| -29a5-27a4b+a3b2+2a2b3+10ab4+50b5    | : 0                                  |
| -19a5-38a4b+30a3b2+14a2b3+29ab4+21b5 |                                      |
| a5+37a4b+a3b2+29a2b3-24ab4-30b5      |                                      |
|                                                                             |
|                                                                             |
|                                                                             |
|-29a5+a4b-37a3b2+38a2b3+44ab4+30b5  | : 1                                    |
|19a5-10a4b-47a3b2+34a2b3+40ab4+50b5 |                                        |
|a5+17a4b+47a3b2+12a2b3-22ab4+21b5   |                                        |
+-----------------------------------------------------------------------------+
|i8 : ker g == 0                                                              |
|                                                                             |
|o8 = true                                                                    |
+-----------------------------------------------------------------------------+
|i9 : prune ker f --since this is a 1x1 factorization of an irreducible,      |
|                                                                             |
|      1      1      1                                                        |
|o9 = S  <-- S  <-- S                                                         |
|                                                                             |
|     0      1      0                                                         |
|                                                                             |
|o9 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i10 : oo.dd       --it must be the trivial factorization                     |
|                                                                             |
|           1                    1                                            |
|o10 = 1 : S  <---------------- S  : 0                                        |
|                {10} | a+b |                                                 |
|                                                                             |
|           1                        1                                        |
|      0 : S  <-------------------- S  : 1                                    |
|                {8} | a2-ab+b2 |                                             |
|                                                                             |
|o10 : ZZdFactorizationMap                                                    |
+-----------------------------------------------------------------------------+

See also
========

  * Making ZZdFactorizations -- Information
    about the basic constructors
  * Making maps between factorizations
    -- information about the basic constructors
  * kernel (Macaulay2Doc) -- kernel of a map of modules or rings
  * image(ZZdFactorizationMap) -- make
    the image of a map of ZZ/d-graded factorizations
  * coimage(ZZdFactorizationMap), --
    make the coimage of a map of ZZ/d-graded factorizations
  * cokernel(ZZdFactorizationMap), --
    make the cokernel of a map of ZZ/d-graded factorizations

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

  * kernel(ZZdFactorizationMap) -- make
    the kernel of a map of ZZ/d-graded factorizations
-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:4397:0.

koszulMF -- Construct a Koszul matrix factorization from an ideal and a polynomial
**********************************************************************************

  * Usage:
        koszulMF(List, RingElement)
  * Inputs:
      * List, a list (Macaulay2Doc), A list of ring elements or an
        ideal I
      * RingElement, a ring element (Macaulay2Doc), A
        polynomial element
  * Outputs:
      * a ZZ/d graded factorization,

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

Constructs a Koszul matrix factorization from a list and a polynomial, where
the factorization is built by writing the ring element as a linear combination
of the ring elements in the list. If the list is instead and ideal, then the
factorization is built with respect to a generating set of the ideal. If no
list or ring is specified, then the command constructs the factorization with
respect the the homogeneous maximal ideal.

+-----------------------------------------------------------------------------+
|i1 : R = QQ[x,y,z]                                                           |
|                                                                             |
|o1 = R                                                                       |
|                                                                             |
|o1 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i2 : I = ideal(x^2*y, y^3*z)                                                 |
|                                                                             |
|             2    3                                                          |
|o2 = ideal (x y, y z)                                                        |
|                                                                             |
|o2 : Ideal of R                                                              |
+-----------------------------------------------------------------------------+
|i3 : f = x^2*y + y^3*z                                                       |
|                                                                             |
|      3     2                                                                |
|o3 = y z + x y                                                               |
|                                                                             |
|o3 : R                                                                       |
+-----------------------------------------------------------------------------+
|i4 : K = koszulMF({x, y, z}, f)                                              |
|                                                                             |
|      2      2      2                                                        |
|o4 = R  <-- R  <-- R                                                         |
|                                                                             |
|     0      1      0                                                         |
|                                                                             |
|o4 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i5 : K == koszulMF(f)                                                        |
|                                                                             |
|o5 = true                                                                    |
+-----------------------------------------------------------------------------+
|i6 : K.dd                                                                    |
|                                                                             |
|          2                 2                                                |
|o6 = 1 : R  <------------- R  : 0                                            |
|               | y3 y  |                                                     |
|               | x2 -z |                                                     |
|                                                                             |
|          2                  2                                               |
|     0 : R  <-------------- R  : 1                                           |
|               | z  y   |                                                    |
|               | x2 -y3 |                                                    |
|                                                                             |
|o6 : ZZdFactorizationMap                                                     |
+-----------------------------------------------------------------------------+
|i7 : K' = koszulMF({x, y^2, z}, f)                                           |
|                                                                             |
|      2      2      2                                                        |
|o7 = R  <-- R  <-- R                                                         |
|                                                                             |
|     0      1      0                                                         |
|                                                                             |
|o7 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i8 : K'.dd                                                                   |
|                                                                             |
|          2                 2                                                |
|o8 = 1 : R  <------------- R  : 0                                            |
|               | y3 x  |                                                     |
|               | xy -z |                                                     |
|                                                                             |
|          2                  2                                               |
|     0 : R  <-------------- R  : 1                                           |
|               | z  x   |                                                    |
|               | xy -y3 |                                                    |
|                                                                             |
|o8 : ZZdFactorizationMap                                                     |
+-----------------------------------------------------------------------------+
|i9 : koszulMF(ideal(x^2,y^2,z^2), f) --factorization changes, depending on   |
|                                                                             |
|      2      2      2                                                        |
|o9 = R  <-- R  <-- R                                                         |
|                                                                             |
|     0      1      0                                                         |
|                                                                             |
|o9 : ZZdFactorization                                                        |
|-----------------------------------------------------------------------------|
|list                                                                         |
+-----------------------------------------------------------------------------+
|i10 : oo.dd                                                                  |
|                                                                             |
|           2                  2                                              |
|o10 = 1 : R  <-------------- R  : 0                                          |
|                | yz x2  |                                                   |
|                | y  -y2 |                                                   |
|                                                                             |
|           2                  2                                              |
|      0 : R  <-------------- R  : 1                                          |
|                | y2 x2  |                                                   |
|                | y  -yz |                                                   |
|                                                                             |
|o10 : ZZdFactorizationMap                                                    |
+-----------------------------------------------------------------------------+
|i11 : K3 = koszulMF(I, f)                                                    |
|                                                                             |
|       2      2      2                                                       |
|o11 = R  <-- R  <-- R                                                        |
|                                                                             |
|      0      1      0                                                        |
|                                                                             |
|o11 : ZZdFactorization                                                       |
+-----------------------------------------------------------------------------+
|i12 : oo.dd  --looks like tensor product of trivial factorizations           |
|                                                                             |
|           2                  2                                              |
|o12 = 1 : R  <-------------- R  : 0                                          |
|                | 1 x2y  |                                                   |
|                | 1 -y3z |                                                   |
|                                                                             |
|           2                   2                                             |
|      0 : R  <--------------- R  : 1                                         |
|                | y3z x2y |                                                  |
|                | 1   -1  |                                                  |
|                                                                             |
|o12 : ZZdFactorizationMap                                                    |
+-----------------------------------------------------------------------------+
|i13 : isNullHomotopic id_K3                                                  |
|                                                                             |
|o13 = true                                                                   |
+-----------------------------------------------------------------------------+
|i14 : nullHomotopy id_K3                                                     |
|                                                                             |
|           2                2                                                |
|o14 = 1 : R  <------------ R  : 0                                            |
|                | 0 0  |                                                     |
|                | 0 -1 |                                                     |
|                                                                             |
|           2               2                                                 |
|      0 : R  <----------- R  : 1                                             |
|                | 1 0 |                                                      |
|                | 0 0 |                                                      |
|                                                                             |
|o14 : ZZdFactorizationMap                                                    |
+-----------------------------------------------------------------------------+

Caveat
======

This method does not actually check if the ring element can be written as a
linear combination of the elements in the list.

See also
========

  * Making ZZdFactorizations -- Information
    about the basic constructors
  * tailMF -- Generate a ZZdFactorization from a module over a
    hypersurface ring
  * eulerMF -- Construct a Koszul matrix factorization with
    respect to the Jacobian ideal

Ways to use koszulMF:
=====================

  * "koszulMF(Ideal,RingElement)"
  * "koszulMF(List,RingElement)"
  * "koszulMF(RingElement)"

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

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

-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:5262:0.

linearMF -- Constructs a Koszul d-fold factorization of a homogeneous element of degree d
*****************************************************************************************

  * Usage:
        linearMF(RingElement)
  * Inputs:
      * RingElement, a ring element (Macaulay2Doc), A ring
        element and a Symbol of RingElement, specifying the name of a
        distinguished root of unity if one needs to be adjoined.
  * Outputs:
      * a ZZ/d graded factorization,

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

This method constructs a Koszul d-fold factorization of a homogeneous element
of degree $d$. The code first checks if the input element $f$ is homogeneous.
If it is, it constructs a Koszul d-fold factorization obtained by taking the
tensor product of the "trivial" factorizations of the constituent monomial
terms (obtained by using the monomialMF, function).

+-----------------------------------------------------------------------------+
|i1 : Q = QQ[x..z];                                                           |
+-----------------------------------------------------------------------------+
|i2 : f = x*y^2*z^3 + x^3*y*z^2                                               |
|                                                                             |
|      3   2      2 3                                                         |
|o2 = x y*z  + x*y z                                                          |
|                                                                             |
|o2 : Q                                                                       |
+-----------------------------------------------------------------------------+
|i3 : K = linearMF(f, t)                                                      |
|                                                                             |
|     /   Q[t]   \6     /   Q[t]   \6     /   Q[t]   \6     /   Q[t]   \6     |
|o3 = |----------|  <-- |----------|  <-- |----------|  <-- |----------|  <-- |
|     | 2        |      | 2        |      | 2        |      | 2        |      |
|     \t  - t + 1/      \t  - t + 1/      \t  - t + 1/      \t  - t + 1/      |
|                                                                             |
|     0                 1                 2                 3                 |
|                                                                             |
|o3 : ZZdFactorization                                                        |
|-----------------------------------------------------------------------------|
|/   Q[t]   \6     /   Q[t]   \6     /   Q[t]   \6                            |
||----------|  <-- |----------|  <-- |----------|                             |
|| 2        |      | 2        |      | 2        |                             |
|\t  - t + 1/      \t  - t + 1/      \t  - t + 1/                             |
|                                                                             |
|4                 5                 0                                        |
+-----------------------------------------------------------------------------+
|i4 : diffs = K.dd                                                            |
|                                                                             |
|         /   Q[t]   \6                                        /   Q[t]   \6  |
|o4 = 5 : |----------|  <------------------------------------- |----------|  :|
|         | 2        |     {0, 2} | x z  0    0  0   0     |   | 2        |   |
|         \t  - t + 1/     {0, 2} | 0 yt z    0  0   0     |   \t  - t + 1/   |
|                          {0, 2} | 0 0  yt-y y  0   0     |                  |
|                          {0, 2} | 0 0  0    -z x   0     |                  |
|                          {0, 2} | 0 0  0    0  -zt x     |                  |
|                          {0, 2} | x 0  0    0  0   -zt+z |                  |
|                                                                             |
|         /   Q[t]   \6                                        /   Q[t]   \6  |
|     0 : |----------|  <------------------------------------- |----------|  :|
|         | 2        |     {0, 2} | z z  0    0  0   0     |   | 2        |   |
|         \t  - t + 1/     {0, 2} | 0 xt z    0  0   0     |   \t  - t + 1/   |
|                          {0, 2} | 0 0  yt-y y  0   0     |                  |
|                          {0, 2} | 0 0  0    -y x   0     |                  |
|                          {0, 2} | 0 0  0    0  -zt x     |                  |
|                          {0, 2} | x 0  0    0  0   -zt+z |                  |
|                                                                             |
|         /   Q[t]   \6                                        /   Q[t]   \6  |
|     1 : |----------|  <------------------------------------- |----------|  :|
|         | 2        |     {0, 2} | z z  0    0  0   0     |   | 2        |   |
|         \t  - t + 1/     {0, 2} | 0 zt z    0  0   0     |   \t  - t + 1/   |
|                          {0, 2} | 0 0  xt-x y  0   0     |                  |
|                          {0, 2} | 0 0  0    -y x   0     |                  |
|                          {0, 2} | 0 0  0    0  -yt x     |                  |
|                          {0, 2} | x 0  0    0  0   -zt+z |                  |
|                                                                             |
|         /   Q[t]   \6                                        /   Q[t]   \6  |
|     2 : |----------|  <------------------------------------- |----------|  :|
|         | 2        |     {0, 2} | z z  0    0  0   0     |   | 2        |   |
|         \t  - t + 1/     {0, 2} | 0 zt z    0  0   0     |   \t  - t + 1/   |
|                          {0, 2} | 0 0  zt-z y  0   0     |                  |
|                          {0, 2} | 0 0  0    -x x   0     |                  |
|                          {0, 2} | 0 0  0    0  -yt x     |                  |
|                          {0, 2} | x 0  0    0  0   -yt+y |                  |
|                                                                             |
|         /   Q[t]   \6                                        /   Q[t]   \6  |
|     3 : |----------|  <------------------------------------- |----------|  :|
|         | 2        |     {0, 2} | y z  0    0  0   0     |   | 2        |   |
|         \t  - t + 1/     {0, 2} | 0 zt z    0  0   0     |   \t  - t + 1/   |
|                          {0, 2} | 0 0  zt-z y  0   0     |                  |
|                          {0, 2} | 0 0  0    -z x   0     |                  |
|                          {0, 2} | 0 0  0    0  -xt x     |                  |
|                          {0, 2} | x 0  0    0  0   -yt+y |                  |
|                                                                             |
|         /   Q[t]   \6                                        /   Q[t]   \6  |
|     4 : |----------|  <------------------------------------- |----------|  :|
|         | 2        |     {0, 2} | y z  0    0  0   0     |   | 2        |   |
|         \t  - t + 1/     {0, 2} | 0 yt z    0  0   0     |   \t  - t + 1/   |
|                          {0, 2} | 0 0  zt-z y  0   0     |                  |
|                          {0, 2} | 0 0  0    -z x   0     |                  |
|                          {0, 2} | 0 0  0    0  -zt x     |                  |
|                          {0, 2} | x 0  0    0  0   -xt+x |                  |
|                                                                             |
|o4 : ZZdFactorizationMap                                                     |
|-----------------------------------------------------------------------------|
|0                                                                            |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|1                                                                            |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|2                                                                            |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|3                                                                            |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|4                                                                            |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|5                                                                            |
+-----------------------------------------------------------------------------+
|i5 : diffs^6                                                                 |
|                                                                             |
|         /   Q[t]   \6                                                       |
|o5 = 0 : |----------|  <-----------------------------------------------------|
|         | 2        |     {0, 2} | x3yz2+xy2z3 0           0           0     |
|         \t  - t + 1/     {0, 2} | 0           x3yz2+xy2z3 0           0     |
|                          {0, 2} | 0           0           x3yz2+xy2z3 0     |
|                          {0, 2} | 0           0           0           x3yz2+|
|                          {0, 2} | 0           0           0           0     |
|                          {0, 2} | 0           0           0           0     |
|                                                                             |
|         /   Q[t]   \6                                                       |
|     1 : |----------|  <-----------------------------------------------------|
|         | 2        |     {0, 2} | x3yz2+xy2z3 0           0           0     |
|         \t  - t + 1/     {0, 2} | 0           x3yz2+xy2z3 0           0     |
|                          {0, 2} | 0           0           x3yz2+xy2z3 0     |
|                          {0, 2} | 0           0           0           x3yz2+|
|                          {0, 2} | 0           0           0           0     |
|                          {0, 2} | 0           0           0           0     |
|                                                                             |
|         /   Q[t]   \6                                                       |
|     2 : |----------|  <-----------------------------------------------------|
|         | 2        |     {0, 2} | x3yz2+xy2z3 0           0           0     |
|         \t  - t + 1/     {0, 2} | 0           x3yz2+xy2z3 0           0     |
|                          {0, 2} | 0           0           x3yz2+xy2z3 0     |
|                          {0, 2} | 0           0           0           x3yz2+|
|                          {0, 2} | 0           0           0           0     |
|                          {0, 2} | 0           0           0           0     |
|                                                                             |
|         /   Q[t]   \6                                                       |
|     3 : |----------|  <-----------------------------------------------------|
|         | 2        |     {0, 2} | x3yz2+xy2z3 0           0           0     |
|         \t  - t + 1/     {0, 2} | 0           x3yz2+xy2z3 0           0     |
|                          {0, 2} | 0           0           x3yz2+xy2z3 0     |
|                          {0, 2} | 0           0           0           x3yz2+|
|                          {0, 2} | 0           0           0           0     |
|                          {0, 2} | 0           0           0           0     |
|                                                                             |
|         /   Q[t]   \6                                                       |
|     4 : |----------|  <-----------------------------------------------------|
|         | 2        |     {0, 2} | x3yz2+xy2z3 0           0           0     |
|         \t  - t + 1/     {0, 2} | 0           x3yz2+xy2z3 0           0     |
|                          {0, 2} | 0           0           x3yz2+xy2z3 0     |
|                          {0, 2} | 0           0           0           x3yz2+|
|                          {0, 2} | 0           0           0           0     |
|                          {0, 2} | 0           0           0           0     |
|                                                                             |
|         /   Q[t]   \6                                                       |
|     5 : |----------|  <-----------------------------------------------------|
|         | 2        |     {0, 2} | x3yz2+xy2z3 0           0           0     |
|         \t  - t + 1/     {0, 2} | 0           x3yz2+xy2z3 0           0     |
|                          {0, 2} | 0           0           x3yz2+xy2z3 0     |
|                          {0, 2} | 0           0           0           x3yz2+|
|                          {0, 2} | 0           0           0           0     |
|                          {0, 2} | 0           0           0           0     |
|                                                                             |
|o5 : ZZdFactorizationMap                                                     |
|-----------------------------------------------------------------------------|
|                                  /   Q[t]   \6                              |
|--------------------------------- |----------|  : 0                          |
|      0           0           |   | 2        |                               |
|      0           0           |   \t  - t + 1/                               |
|      0           0           |                                              |
|xy2z3 0           0           |                                              |
|      x3yz2+xy2z3 0           |                                              |
|      0           x3yz2+xy2z3 |                                              |
|                                                                             |
|                                  /   Q[t]   \6                              |
|--------------------------------- |----------|  : 1                          |
|      0           0           |   | 2        |                               |
|      0           0           |   \t  - t + 1/                               |
|      0           0           |                                              |
|xy2z3 0           0           |                                              |
|      x3yz2+xy2z3 0           |                                              |
|      0           x3yz2+xy2z3 |                                              |
|                                                                             |
|                                  /   Q[t]   \6                              |
|--------------------------------- |----------|  : 2                          |
|      0           0           |   | 2        |                               |
|      0           0           |   \t  - t + 1/                               |
|      0           0           |                                              |
|xy2z3 0           0           |                                              |
|      x3yz2+xy2z3 0           |                                              |
|      0           x3yz2+xy2z3 |                                              |
|                                                                             |
|                                  /   Q[t]   \6                              |
|--------------------------------- |----------|  : 3                          |
|      0           0           |   | 2        |                               |
|      0           0           |   \t  - t + 1/                               |
|      0           0           |                                              |
|xy2z3 0           0           |                                              |
|      x3yz2+xy2z3 0           |                                              |
|      0           x3yz2+xy2z3 |                                              |
|                                                                             |
|                                  /   Q[t]   \6                              |
|--------------------------------- |----------|  : 4                          |
|      0           0           |   | 2        |                               |
|      0           0           |   \t  - t + 1/                               |
|      0           0           |                                              |
|xy2z3 0           0           |                                              |
|      x3yz2+xy2z3 0           |                                              |
|      0           x3yz2+xy2z3 |                                              |
|                                                                             |
|                                  /   Q[t]   \6                              |
|--------------------------------- |----------|  : 5                          |
|      0           0           |   | 2        |                               |
|      0           0           |   \t  - t + 1/                               |
|      0           0           |                                              |
|xy2z3 0           0           |                                              |
|      x3yz2+xy2z3 0           |                                              |
|      0           x3yz2+xy2z3 |                                              |
+-----------------------------------------------------------------------------+

These linear factorizations are interesting because they give an explicit
construction of nontrivial Ulrich modules over hypersurface rings. These Ulrich
modules are constructed by taking the cokernel of any of the matrices in the
factorization, then tensoring with the hypersurface ring.

See also
========

  * Making ZZdFactorizations -- Information
    about the basic constructors

Ways to use linearMF:
=====================

  * "linearMF(RingElement)"
  * "linearMF(RingElement,RingElement)"
  * "linearMF(RingElement,Symbol)"

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

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

-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:5491:0.

Making maps between factorizations -- information about the basic constructors
******************************************************************************

Basic constructors
==================

  * map(ZZdFactorization,ZZdFactorization,HashTable)
    -- make a map of
    ZZ/d-graded factorizations
  * map(ZZdFactorization,ZZdFactorization,ZZ)
    -- make the zero map or
    identity between ZZ/d-graded factorizations
  * map(ZZdFactorization,ZZdFactorization,ZZdFactorizationMap)
    -- make
    a new map of ZZ/d-graded factorizations from an existing one (for inducing
    maps)
  * id _ ZZdFactorization -- the identity map
    of a ZZ/d-graded factorization
  * ZZdFactorizationMap Array -- shift a
    ZZ/d-graded factorization or map of ZZ/d-graded factorizations
  * isWellDefined(ZZdFactorizationMap)
    -- whether a map of ZZ/d-graded
    factorizations is well-defined

Important computations creating new factorization maps
======================================================

  * HH ZZdFactorizationMap -- induced map on
    homology or cohomology
  * ZZdFactorization ** Matrix -- create
    the tensor product of a ZZ/d-graded factorization and a map of modules
  * nullHomotopy(ZZdFactorizationMap)
    -- a map which is a candidate for
    being a null homotopy

Canonical maps between factorizations
=====================================

Some factorizations come with canonical maps. To access the factorization map,
one uses inducedMap(ZZdFactorization,ZZdFactorization).

  * kernel(ZZdFactorizationMap) -- make
    the kernel of a map of ZZ/d-graded factorizations
  * cokernel(ZZdFactorizationMap), --
    make the cokernel of a map of ZZ/d-graded factorizations
  * image(ZZdFactorizationMap) -- make
    the image of a map of ZZ/d-graded factorizations
  * coimage(ZZdFactorizationMap), --
    make the coimage of a map of ZZ/d-graded factorizations
  * cone(ZZdFactorizationMap) -- make the
    mapping cone of a morphism of ZZ/d-graded factorizations
  * inducedMap(ZZdFactorization,ZZdFactorization)
    -- make the map of
    ZZ/d-graded factorizations induced at each term by the identity map

Random maps of ZZ/d-graded factorizations
=========================================

The method randomFactorizationMap(ZZdFactorization,ZZdFactorization),
allows one to construct random factorization maps,
random morphisms between factorizations, and random null homotopies between
factorizations.

  * isCommutative(ZZdFactorizationMap)
    -- whether a ZZ/d-graded
    factorization map commutes with the differentials
  * isFactorizationMorphism(ZZdFactorizationMap)
    -- whether a
    ZZdFactorizationMap is a morphism of factorizations
  * isNullHomotopic(ZZdFactorizationMap)
    -- whether a map of ZZ/d-graded
    factorizations is null-homotopic

Elementary operations on factorization maps
===========================================

  * arithmetic with ZZ/d-graded factorization maps
    -- perform arithmetic operations on
    ZZ/d-graded factorization maps
  * ZZdFactorizationMap + ZZdFactorizationMap
    -- perform arithmetic operations on
    ZZ/d-graded factorization maps
  * ZZdFactorizationMap | ZZdFactorizationMap
    -- join or concatenate maps horizontally
  * ZZdFactorizationMap || ZZdFactorizationMap
    -- join or concatenate maps vertically
  * ZZdFactorizationMap ++ ZZdFactorizationMap
    -- direct sum of ZZ/d-graded factorization maps
  * ZZdFactorizationMap ** ZZdFactorizationMap
    -- the map of ZZ/d-graded factorizations
    between tensor factorizations
  * Hom(ZZdFactorizationMap,ZZdFactorizationMap)
    -- the map of
    factorizations between Hom complexes
  * dual(ZZdFactorizationMap) -- the dual
    of a map of ZZ/d-graded factorizations
  * ZZdFactorizationMap _ Array -- the
    composition with the canonical inclusion or projection map
  * ZZdFactorizationMap ^ Array -- the
    composition with the canonical inclusion or projection map
  * RingMap ZZdFactorizationMap -- apply a
    ring map to a map of ZZ/d-graded factorizations
  * RingMap ** ZZdFactorizationMap,
    -- tensor a map of ZZ/d-graded factorizations along a ring map

See also
========

  * Making ZZdFactorizations -- Information
    about the basic constructors
  * Basic invariants and properties, --
    information about accessing basic features
  * Preprogrammed examples and operations
    -- Information about the basic constructors
-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:353:0.

Making maps between ZZ/d-graded factorizations -- information about the basic constructors
******************************************************************************************

Basic constructors
==================

  * map(ZZdFactorization,ZZdFactorization,HashTable)
    -- make a map of
    ZZ/d-graded factorizations
  * map(ZZdFactorization,ZZdFactorization,ZZ)
    -- make the zero map or
    identity between ZZ/d-graded factorizations
  * map(ZZdFactorization,ZZdFactorization,ZZdFactorizationMap)
    -- make
    a new map of ZZ/d-graded factorizations from an existing one (for inducing
    maps)
  * id _ ZZdFactorization -- the identity map
    of a ZZ/d-graded factorization
  * differential of a ZZ/d-graded factorization
    -- get the maps between the terms in a
    ZZ/d-graded factorization
  * ZZdFactorizationMap Array -- shift a
    ZZ/d-graded factorization or map of ZZ/d-graded factorizations
  * isWellDefined(ZZdFactorizationMap)
    -- whether a map of ZZ/d-graded
    factorizations is well-defined

Important computations creating new ZZ/d-graded factorization maps
==================================================================

  * HH ZZdFactorizationMap -- induced map on
    homology or cohomology
  * ZZdFactorization ** Matrix -- create
    the tensor product of a ZZ/d-graded factorization and a map of modules
  * nullHomotopy(ZZdFactorizationMap)
    -- a map which is a candidate for
    being a null homotopy

Canonical maps between ZZ/d-graded factorizations
=================================================

Some ZZ/d-graded factorizations come with canonical maps. To access the
ZZ/d-graded factorization map, one uses
inducedMap(ZZdFactorization,ZZdFactorization).

  * kernel(ZZdFactorizationMap) -- make
    the kernel of a map of ZZ/d-graded factorizations
  * cokernel(ZZdFactorizationMap), --
    make the cokernel of a map of ZZ/d-graded factorizations
  * image(ZZdFactorizationMap) -- make
    the image of a map of ZZ/d-graded factorizations
  * coimage(ZZdFactorizationMap), --
    make the coimage of a map of ZZ/d-graded factorizations
  * cone(ZZdFactorizationMap) -- make the
    mapping cone of a morphism of ZZ/d-graded factorizations
  * inducedMap(ZZdFactorization,ZZdFactorization)
    -- make the map of
    ZZ/d-graded factorizations induced at each term by the identity map

Random maps of ZZ/d-graded factorizations
=========================================

The method randomFactorizationMap(ZZdFactorization,ZZdFactorization),
allows one to construct random ZZ/d-graded
factorization maps, random morphisms between factorizations, and random null
homotopies between factorizaions.

  * isCommutative(ZZdFactorizationMap)
    -- whether a ZZ/d-graded
    factorization map commutes with the differentials
  * isFactorizationMorphism(ZZdFactorizationMap)
    -- whether a
    ZZdFactorizationMap is a morphism of factorizations
  * isNullHomotopic(ZZdFactorizationMap)
    -- whether a map of ZZ/d-graded
    factorizations is null-homotopic

Elementary operations on factorization maps
===========================================

  * arithmetic with complex maps (missing documentation)
  * ZZdFactorizationMap + ZZdFactorizationMap
    -- perform arithmetic operations on
    ZZ/d-graded factorization maps
  * ZZdFactorizationMap | ZZdFactorizationMap
    -- join or concatenate maps horizontally
  * ZZdFactorizationMap || ZZdFactorizationMap
    -- join or concatenate maps vertically
  * ZZdFactorizationMap ++ ZZdFactorizationMap
    -- direct sum of ZZ/d-graded factorization maps
  * ZZdFactorizationMap ** ZZdFactorizationMap
    -- the map of ZZ/d-graded factorizations
    between tensor factorizations
  * Hom(ZZdFactorizationMap,ZZdFactorizationMap)
    -- the map of
    factorizations between Hom complexes
  * dual(ZZdFactorizationMap) -- the dual
    of a map of ZZ/d-graded factorizations
  * ZZdFactorizationMap _ Array -- the
    composition with the canonical inclusion or projection map
  * ZZdFactorizationMap ^ Array -- the
    composition with the canonical inclusion or projection map
  * RingMap ZZdFactorizationMap -- apply a
    ring map to a map of ZZ/d-graded factorizations
  * RingMap ** ZZdFactorizationMap,
    -- tensor a map of ZZ/d-graded factorizations along a ring map

See also
========

  * Making ZZdFactorizations -- Information
    about the basic constructors
  * Basic invariants and properties, --
    information about accessing basic features
-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:2319:0.

Making ZZdFactorizations -- Information about the basic constructors
********************************************************************

Basic constructors
==================

  * ZZdfactorization(HashTable) -- make
    a ZZ/d-graded factorization
  * ZZdfactorization(List) -- make a ZZ/d-graded
    factorization
  * isWellDefined(ZZdFactorization),
    -- whether a ZZ/d-graded factorization is well-defined
  * isdFactorization(ZZdFactorization) -- Checks if
    the differentials of a factorization compose to a scalar multiple of the
    identity

Important constructors for creating ZZ/d-graded factorizations
==============================================================

  * koszulMF(List,RingElement) -- Construct a Koszul matrix
    factorization from an ideal and a polynomial
  * linearMF(RingElement) -- Constructs a Koszul d-fold
    factorization of a homogeneous element of degree d
  * randomLinearMF(ZZ,Ring) -- Generates a linear d-fold
    factorization of a random degree d polynomial
  * tailMF(Module) -- Generate a ZZdFactorization from a module
    over a hypersurface ring
  * randomTailMF(RingElement) -- Construct a matrix
    factorization from a high syzygy of a random module over a hypersurface
  * gradedModule(ZZdFactorization),
    -- a new ZZ/d-graded factorization in which the differential is zero
  * HH ZZdFactorization -- homology of a
    ZZ/d-graded factorization

More advanced constructors
==========================

  * ZZdFactorization ++ ZZdFactorization
    -- direct sum of ZZ/d-graded
    factorizations
  * ZZdFactorization ** ZZdFactorization
    -- tensor product of ZZ/d-graded factorizations
  * Hom(ZZdFactorization,ZZdFactorization)
    -- the ZZ/d-graded
    homomorphism factorization between two ZZ/d-graded factorizations
  * dual(ZZdFactorization) -- make the dual
    of a ZZ/d-graded factorization
  * RingMap ZZdFactorization -- apply a ring
    map
  * RingMap ** ZZdFactorization, --
    tensor a ZZ/d-graded factorization along a ring map
  * minimalPresentation(ZZdFactorization)
    -- minimal presentation of all
    terms in a ZZ/d-graded factorization

Extracting ZZ/d-graded factorization from ZZ/d-graded factorization maps
========================================================================

  * source(ZZdFactorizationMap) -- get
    the source of a map of ZZ/d-graded factorizations
  * target(ZZdFactorizationMap) -- get
    the target of a map of ZZ/d-graded factorizations
  * kernel(ZZdFactorizationMap) -- make
    the kernel of a map of ZZ/d-graded factorizations
  * cokernel(ZZdFactorizationMap), --
    make the cokernel of a map of ZZ/d-graded factorizations
  * image(ZZdFactorizationMap) -- make
    the image of a map of ZZ/d-graded factorizations
  * coimage(ZZdFactorizationMap), --
    make the coimage of a map of ZZ/d-graded factorizations
  * cone(ZZdFactorizationMap) -- make the
    mapping cone of a morphism of ZZ/d-graded factorizations

See also
========

  * Making maps between factorizations
    -- information about the basic constructors
  * Basic invariants and properties, --
    information about accessing basic features
  * Preprogrammed examples and operations
    -- Information about the basic constructors
-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:176:0.

map(ZZdFactorization,ZZdFactorization,HashTable) -- make a map of ZZ/d-graded factorizations
********************************************************************************************

  * Function: map (Macaulay2Doc),
  * Usage:
        f = map(D, C, H)
  * Inputs:
      * C, a ZZ/d graded factorization,
      * D, a ZZ/d graded factorization,
      * H, a hash table (Macaulay2Doc), whose keys are
        integers, and whose values are the maps between the corresponding terms
  * Optional inputs (Macaulay2Doc),:
      * Degree (Macaulay2Doc), =>
        an integer (Macaulay2Doc), default value null, the degree of
        the resulting map
      * DegreeLift (Macaulay2Doc), => ...,
        default value null, unused
      * DegreeMap (Macaulay2Doc), => ...,
        default value null, unused
  * Outputs:
      * f, a map of ZZ/d-graded factorizations,

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

A map of ZZ/d-graded factorizations $f : C \rightarrow D$ of degree $d$ is a
sequence of maps $f_i : C_i \rightarrow D_{d+i}$. No relationship between the
maps $f_i$ and and the differentials of either $C$ or $D$ is assumed.

We construct a map of factorizations by specifying the individual maps between
the terms.

+-----------------------------------------------------------------------------+
|i1 : S = ZZ/101[a,b,c]                                                       |
|                                                                             |
|o1 = S                                                                       |
|                                                                             |
|o1 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i2 : R = S/(a^2+b^2+c^2);                                                    |
+-----------------------------------------------------------------------------+
|i3 : m = ideal vars R                                                        |
|                                                                             |
|o3 = ideal (a, b, c)                                                         |
|                                                                             |
|o3 : Ideal of R                                                              |
+-----------------------------------------------------------------------------+
|i4 : C = tailMF m                                                            |
|                                                                             |
|      4      4      4                                                        |
|o4 = S  <-- S  <-- S                                                         |
|                                                                             |
|     0      1      0                                                         |
|                                                                             |
|o4 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i5 : D = tailMF (m^2)                                                        |
|                                                                             |
|      8      8      8                                                        |
|o5 = S  <-- S  <-- S                                                         |
|                                                                             |
|     0      1      0                                                         |
|                                                                             |
|o5 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i6 : use S                                                                   |
|                                                                             |
|o6 = S                                                                       |
|                                                                             |
|o6 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i7 : H = hashTable { 2 => map(C_0, D_0, matrix {{0, 0, -c, -b, 0,            |
|              0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, b, 0, 0, 0}}),                 |
|         1 => map(C_1, D_1, matrix {{0, 0, 0, 0, 0, 0, 0, 0}, {0,            |
|              0, 0, 0, 0, 0}, {b, 0, 0, 0, 0, 0, 0, 0}})                     |
|         }                                                                   |
|                                                                             |
|o7 = HashTable{1 => {4} | 0  0 0 0  0 0 0 0 |  }                             |
|                    {4} | 0  0 0 -c b c 0 0 |                                |
|                    {4} | -c 0 0 0  0 0 0 0 |                                |
|                    {4} | b  0 0 0  0 0 0 0 |                                |
|               2 => {3} | 0 0 -c -b 0  -c 0 0 |                              |
|                    {3} | 0 0 0  0  -c 0  0 0 |                              |
|                    {3} | 0 0 0  0  0  0  0 0 |                              |
|                    {3} | 0 0 0  0  b  0  0 0 |                              |
|                                                                             |
|o7 : HashTable                                                               |
|-----------------------------------------------------------------------------|
|-c, 0, 0}, {0, 0, 0, 0, -c, 0, 0, 0}, {0, 0,                                 |
|                                                                             |
|0, 0, -c, b, c, 0, 0}, {-c, 0, 0,                                            |
+-----------------------------------------------------------------------------+
|i8 : f = map(C, D, H)                                                        |
|                                                                             |
|          4                                   8                              |
|o8 = 0 : S  <------------------------------- S  : 0                          |
|               {3} | 0 0 -c -b 0  -c 0 0 |                                   |
|               {3} | 0 0 0  0  -c 0  0 0 |                                   |
|               {3} | 0 0 0  0  0  0  0 0 |                                   |
|               {3} | 0 0 0  0  b  0  0 0 |                                   |
|                                                                             |
|          4                                 8                                |
|     1 : S  <----------------------------- S  : 1                            |
|               {4} | 0  0 0 0  0 0 0 0 |                                     |
|               {4} | 0  0 0 -c b c 0 0 |                                     |
|               {4} | -c 0 0 0  0 0 0 0 |                                     |
|               {4} | b  0 0 0  0 0 0 0 |                                     |
|                                                                             |
|o8 : ZZdFactorizationMap                                                     |
+-----------------------------------------------------------------------------+
|i9 : assert isWellDefined f                                                  |
+-----------------------------------------------------------------------------+
|i10 : assert isHomogeneous f                                                 |
+-----------------------------------------------------------------------------+
|i11 : assert(degree f == 0)                                                  |
+-----------------------------------------------------------------------------+
|i12 : assert isFactorizationMorphism f                                       |
+-----------------------------------------------------------------------------+

The keys in the hash table index the terms in the source of the map.  If a key
is missing, that map is taken to be the zero map. We illustrate by constructing
a map of factorizations having nonzero degree, and omitting one key in the hash
table.

+-----------------------------------------------------------------------------+
|i13 : E = D[1]                                                               |
|                                                                             |
|       8      8      8                                                       |
|o13 = S  <-- S  <-- S                                                        |
|                                                                             |
|      0      1      0                                                        |
|                                                                             |
|o13 : ZZdFactorization                                                       |
+-----------------------------------------------------------------------------+
|i14 : g = map(E, C, hashTable {}, Degree => 1)                               |
|                                                                             |
|o14 = 0                                                                      |
|                                                                             |
|o14 : ZZdFactorizationMap                                                    |
+-----------------------------------------------------------------------------+
|i15 : assert isWellDefined g                                                 |
+-----------------------------------------------------------------------------+
|i16 : assert isHomogeneous g                                                 |
+-----------------------------------------------------------------------------+
|i17 : assert(degree g == 1)                                                  |
+-----------------------------------------------------------------------------+
|i18 : assert not isFactorizationMorphism g --since the map has nonzero degree|
+-----------------------------------------------------------------------------+
|i19 : assert isCommutative g                                                 |
+-----------------------------------------------------------------------------+
|i20 : assert(source g == C)                                                  |
+-----------------------------------------------------------------------------+
|i21 : assert(target g == E)                                                  |
+-----------------------------------------------------------------------------+

This is the primary constructor used by all of the more user friendly methods
for constructing a chain complex.

Caveat
======

This constructor minimizes computation and does very little error checking. To
verify that a complex is well constructed, use
isWellDefined(ZZdFactorizationMap).

See also
========

  * ZZdFactorizationMap -- the class of all maps
    between ZZ/d-graded factorizations
  * isWellDefined(ZZdFactorizationMap)
    -- whether a map of ZZ/d-graded
    factorizations is well-defined
  * degree(ZZdFactorizationMap) -- get
    the degree of a map of ZZ/d-graded factorizations
  * isFactorizationMorphism(ZZdFactorizationMap)
    -- whether a
    ZZdFactorizationMap is a morphism of factorizations
  * isCommutative(ZZdFactorizationMap)
    -- whether a ZZ/d-graded
    factorization map commutes with the differentials
  * source(ZZdFactorizationMap) -- get
    the source of a map of ZZ/d-graded factorizations
  * target(ZZdFactorizationMap) -- get
    the target of a map of ZZ/d-graded factorizations

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

  * map(ZZdFactorization,ZZdFactorization,HashTable)
    -- make a map of
    ZZ/d-graded factorizations
-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:2429:0.

map(ZZdFactorization,ZZdFactorization,ZZ) -- make the zero map or identity between ZZ/d-graded factorizations
*************************************************************************************************************

  * Function: map (Macaulay2Doc),
  * Usage:
        f = map(D, C, 0)
        f = map(C, C, 1)
  * Inputs:
      * C, a ZZ/d graded factorization,
      * D, a ZZ/d graded factorization,
      * 0, an integer (Macaulay2Doc), or 1
  * Optional inputs (Macaulay2Doc),:
      * Degree (Macaulay2Doc), =>
        an integer (Macaulay2Doc), default value null, the degree of
        the resulting map
      * DegreeLift (Macaulay2Doc), => ...,
        default value null, unused
      * DegreeMap (Macaulay2Doc), => ...,
        default value null, unused
  * Outputs:
      * f, a map of ZZ/d-graded factorizations, the
        zero map from $C$ to $D$ or the identity map from $C$ to $C$

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

A map of ZZ/d-graded factorizations $f : C \rightarrow D$ of degree $d$ is a
sequence of maps $f_i : C_i \rightarrow D_{d+i}$.

We construct the zero map between two factorizations.

+------------------------------------------+
|i1 : S = ZZ/101[a,b,c]                    |
|                                          |
|o1 = S                                    |
|                                          |
|o1 : PolynomialRing                       |
+------------------------------------------+
|i2 : R = S/(a^2+b^2+c^2);                 |
+------------------------------------------+
|i3 : m = ideal vars R                     |
|                                          |
|o3 = ideal (a, b, c)                      |
|                                          |
|o3 : Ideal of R                           |
+------------------------------------------+
|i4 : C = tailMF m                         |
|                                          |
|      4      4      4                     |
|o4 = S  <-- S  <-- S                      |
|                                          |
|     0      1      0                      |
|                                          |
|o4 : ZZdFactorization                     |
+------------------------------------------+
|i5 : D = tailMF (m^2)                     |
|                                          |
|      8      8      8                     |
|o5 = S  <-- S  <-- S                      |
|                                          |
|     0      1      0                      |
|                                          |
|o5 : ZZdFactorization                     |
+------------------------------------------+
|i6 : f = map(D, C, 0)                     |
|                                          |
|o6 = 0                                    |
|                                          |
|o6 : ZZdFactorizationMap                  |
+------------------------------------------+
|i7 : assert isWellDefined f               |
+------------------------------------------+
|i8 : assert isFactorizationMorphism f     |
+------------------------------------------+
|i9 : g = map(C, C, 0, Degree => 13)       |
|                                          |
|o9 = 0                                    |
|                                          |
|o9 : ZZdFactorizationMap                  |
+------------------------------------------+
|i10 : assert isWellDefined g              |
+------------------------------------------+
|i11 : assert(degree g == 13)              |
+------------------------------------------+
|i12 : assert not isFactorizationMorphism g|
+------------------------------------------+
|i13 : assert isCommutative g              |
+------------------------------------------+
|i14 : assert isHomogeneous g              |
+------------------------------------------+
|i15 : assert(source g == C)               |
+------------------------------------------+
|i16 : assert(target g == C)               |
+------------------------------------------+

Using this function to create the identity map is the same as using id _ ZZdFactorization.

+-----------------------------------+
|i17 : assert(map(C, C, 1) === id_C)|
+-----------------------------------+

See also
========

  * ZZdFactorizationMap -- the class of all maps
    between ZZ/d-graded factorizations
  * isWellDefined(ZZdFactorizationMap)
    -- whether a map of ZZ/d-graded
    factorizations is well-defined
  * degree(ZZdFactorizationMap) -- get
    the degree of a map of ZZ/d-graded factorizations
  * isCommutative(ZZdFactorizationMap)
    -- whether a ZZ/d-graded
    factorization map commutes with the differentials
  * source(ZZdFactorizationMap) -- get
    the source of a map of ZZ/d-graded factorizations
  * target(ZZdFactorizationMap) -- get
    the target of a map of ZZ/d-graded factorizations
  * id _ ZZdFactorization -- the identity map
    of a ZZ/d-graded factorization

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

  * map(ZZdFactorization,ZZdFactorization,ZZ)
    -- make the zero map or
    identity between ZZ/d-graded factorizations
-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:2572:0.

map(ZZdFactorization,ZZdFactorization,ZZdFactorizationMap) -- make a new map of ZZ/d-graded factorizations from an existing one (for inducing maps)
***************************************************************************************************************************************************

  * Function: map (Macaulay2Doc),
  * Usage:
        g = map(D, C, f)
  * Inputs:
      * C, a ZZ/d graded factorization,
      * D, a ZZ/d graded factorization,
      * f, a map of ZZ/d-graded factorizations,
        regarded as providing matrices which induce maps between the terms of
        $C$ and $D$
  * Optional inputs (Macaulay2Doc),:
      * Degree (Macaulay2Doc), =>
        an integer (Macaulay2Doc), default value null, the degree $d$
        of the resulting map
      * DegreeLift (Macaulay2Doc), => ...,
        default value null, unused
      * DegreeMap (Macaulay2Doc), => ...,
        default value null, unused
  * Outputs:
      * g, a map of ZZ/d-graded factorizations,

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

A map of factorizations $f : C' \rightarrow D'$ is a sequence of maps $f_i :
C'_i \rightarrow D'_{d'+i}$. The new map $g : C \rightarrow D$ is the sequence
of maps $g_i : C_i \rightarrow D_{d+i}$ induced by the matrix of $f_i$.

One use for this function is to get the new map of ZZ/d-graded factorizations
obtained by shifting the source or target of an existing chain map.  For
example, one can regard the differential on a factorization can be regarded as
a map of degree zero between shifted factorizations.

+---------------------------------------------+
|i1 : S = ZZ/101[a,b,c]                       |
|                                             |
|o1 = S                                       |
|                                             |
|o1 : PolynomialRing                          |
+---------------------------------------------+
|i2 : R = S/(a^2+b^2+c^2);                    |
+---------------------------------------------+
|i3 : m = ideal vars R                        |
|                                             |
|o3 = ideal (a, b, c)                         |
|                                             |
|o3 : Ideal of R                              |
+---------------------------------------------+
|i4 : C = tailMF m                            |
|                                             |
|      4      4      4                        |
|o4 = S  <-- S  <-- S                         |
|                                             |
|     0      1      0                         |
|                                             |
|o4 : ZZdFactorization                        |
+---------------------------------------------+
|i5 : D = ZZdfactorization(C, Base => 1)      |
|                                             |
|      4      4      4                        |
|o5 = S  <-- S  <-- S                         |
|                                             |
|     0      1      0                         |
|                                             |
|o5 : ZZdFactorization                        |
+---------------------------------------------+
|i6 : f = map(D, C, dd^C, Degree => 0)        |
|                                             |
|          4                          4       |
|o6 = 0 : S  <---------------------- S  : 0   |
|               {4} | 0  -b a -c |            |
|               {4} | -a -c 0 b  |            |
|               {4} | -c a  b 0  |            |
|               {4} | b  0  c a  |            |
|                                             |
|          4                          4       |
|     1 : S  <---------------------- S  : 1   |
|               {3} | 0  -a -c b |            |
|               {3} | -b -c a  0 |            |
|               {3} | a  0  b  c |            |
|               {3} | -c b  0  a |            |
|                                             |
|o6 : ZZdFactorizationMap                     |
+---------------------------------------------+
|i7 : assert isWellDefined f                  |
+---------------------------------------------+
|i8 : assert(degree f == 0)                   |
+---------------------------------------------+
|i9 : assert isCommutative f                  |
+---------------------------------------------+
|i10 : assert isFactorizationMorphism f       |
+---------------------------------------------+
|i11 : assert not isFactorizationMorphism dd^C|
+---------------------------------------------+

See also
========

  * ZZdFactorizationMap -- the class of all maps
    between ZZ/d-graded factorizations
  * isWellDefined(ZZdFactorizationMap)
    -- whether a map of ZZ/d-graded
    factorizations is well-defined
  * degree(ZZdFactorizationMap) -- get
    the degree of a map of ZZ/d-graded factorizations
  * isFactorizationMorphism(ZZdFactorizationMap)
    -- whether a
    ZZdFactorizationMap is a morphism of factorizations
  * isCommutative(ZZdFactorizationMap)
    -- whether a ZZ/d-graded
    factorization map commutes with the differentials
  * ZZdFactorization Array -- shift a
    ZZ/d-graded factorization or map of ZZ/d-graded factorizations

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

  * map(ZZdFactorization,ZZdFactorization,ZZdFactorizationMap)
    -- make
    a new map of ZZ/d-graded factorizations from an existing one (for inducing
    maps)
-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:2677:0.

minimalPresentation(ZZdFactorization) -- minimal presentation of all terms in a ZZ/d-graded factorization
*********************************************************************************************************

  * Function: minimalPresentation (Macaulay2Doc),
  * Usage:
        D = minimalPresentation C
        D = prune C
        h = minimalPresentation f
        h = prune f
  * Inputs:
      * C, a ZZ/d graded factorization, or $f$ a
        map of ZZ/d-graded factorizations,
  * Optional inputs (Macaulay2Doc),:
      * Exclude (Macaulay2Doc), => ...,
        default value {}, unused
  * Outputs:
      * D, a ZZ/d graded factorization, isomorphic to
        the input, where each term is replaced by a minimally presented model,
        or $h$ a map of ZZ/d-graded factorizations,
        where the source and target are minimally presented
  * Consequences:
      * The isomorphism $g : D \to C$ is available as g = D.cache.pruningMap.
        The inverse isomorphism can be obtained as g^-1

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

This is frequently useful to make the output of certain operations readable or
understandable.  This operation is functorial, applying both to ZZ/d-graded
factorizations and factorization maps.

In particular, homology often needs to be pruned to be understood.  For
instance, this is useful for recognizing when terms given by subquotient
modules are actually zero. One can directly obtain the pruning map by accessing
the cached pruningMap key.

+-----------------------------------------------------------------------------+
|i1 : S = ZZ/101[x,y,z,w];                                                    |
+-----------------------------------------------------------------------------+
|i2 : F = koszulMF({x,y,z,w}, y*w - x*z);                                     |
+-----------------------------------------------------------------------------+
|i3 : E = Hom(F,F)                                                            |
|                                                                             |
|      8      8      8                                                        |
|o3 = S  <-- S  <-- S                                                         |
|                                                                             |
|     0      1      0                                                         |
|                                                                             |
|o3 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i4 : Ed = dual E                                                             |
|                                                                             |
|      8      8      8                                                        |
|o4 = S  <-- S  <-- S                                                         |
|                                                                             |
|     0      1      0                                                         |
|                                                                             |
|o4 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i5 : C = HH E                                                                |
|                                                                             |
|o5 = subquotient (| 1 0  z  0  -x |, | w  z  0  0  y  0  -x 0  |) <--        |
|                  | 0 -x -y 0  0  |  | -x -y 0  0  0  y  0  -x |             |
|                  | 0 0  0  z  -w |  | 0  0  w  z  z  0  -w 0  |             |
|                  | 1 -w 0  -y 0  |  | 0  0  -x -y 0  z  0  -w |             |
|                  | 1 0  0  0  0  |  | w  0  -x 0  y  z  0  0  |             |
|                  | 0 0  w  -x 0  |  | 0  w  0  -x -x -w 0  0  |             |
|                  | 0 z  0  0  y  |  | z  0  -y 0  0  0  y  z  |             |
|                  | 1 -w z  -y -x |  | 0  z  0  -y 0  0  -x -w |             |
|                                                                             |
|     0                                                                       |
|                                                                             |
|o5 : ZZdFactorization                                                        |
|-----------------------------------------------------------------------------|
|subquotient (| 0  -y 0  0  z  -y -x |, | -y -z 0  0  y  0  -x 0  |) <--      |
|             | -y 0  -x 0  -w 0  0  |  | x  w  0  0  0  y  0  -x |           |
|             | 0  -z -z -y 0  0  -w |  | 0  0  -y -z z  0  -w 0  |           |
|             | -z 0  0  x  0  -w 0  |  | 0  0  x  w  0  z  0  -w |           |
|             | z  w  0  -x 0  w  0  |  | w  0  -x 0  -w -z 0  0  |           |
|             | -y -x -x 0  -w 0  0  |  | 0  w  0  -x x  y  0  0  |           |
|             | 0  0  -z -y 0  0  -w |  | z  0  -y 0  0  0  -w -z |           |
|             | 0  0  0  0  -z y  x  |  | 0  z  0  -y 0  0  x  y  |           |
|                                                                             |
|1                                                                            |
|-----------------------------------------------------------------------------|
|subquotient (| 1 0  z  0  -x |, | w  z  0  0  y  0  -x 0  |)                 |
|             | 0 -x -y 0  0  |  | -x -y 0  0  0  y  0  -x |                  |
|             | 0 0  0  z  -w |  | 0  0  w  z  z  0  -w 0  |                  |
|             | 1 -w 0  -y 0  |  | 0  0  -x -y 0  z  0  -w |                  |
|             | 1 0  0  0  0  |  | w  0  -x 0  y  z  0  0  |                  |
|             | 0 0  w  -x 0  |  | 0  w  0  -x -x -w 0  0  |                  |
|             | 0 z  0  0  y  |  | z  0  -y 0  0  0  y  z  |                  |
|             | 1 -w z  -y -x |  | 0  z  0  -y 0  0  -x -w |                  |
|                                                                             |
|0                                                                            |
+-----------------------------------------------------------------------------+
|i6 : D = prune C                                                             |
|                                                                             |
|o6 = cokernel | w z y x | <-- 0 <-- cokernel | w z y x |                     |
|                                                                             |
|     0                        1     0                                        |
|                                                                             |
|o6 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i7 : g = D.cache.pruningMap                                                  |
|                                                                             |
|o7 = 0 : subquotient (| 1 0  z  0  -x |, | w  z  0  0  y  0  -x 0  |)        |
|                      | 0 -x -y 0  0  |  | -x -y 0  0  0  y  0  -x |         |
|                      | 0 0  0  z  -w |  | 0  0  w  z  z  0  -w 0  |         |
|                      | 1 -w 0  -y 0  |  | 0  0  -x -y 0  z  0  -w |         |
|                      | 1 0  0  0  0  |  | w  0  -x 0  y  z  0  0  |         |
|                      | 0 0  w  -x 0  |  | 0  w  0  -x -x -w 0  0  |         |
|                      | 0 z  0  0  y  |  | z  0  -y 0  0  0  y  z  |         |
|                      | 1 -w z  -y -x |  | 0  z  0  -y 0  0  -x -w |         |
|                                                                             |
|     1 : subquotient (| 0  -y 0  0  z  -y -x |, | -y -z 0  0  y  0  -x       |
|                      | -y 0  -x 0  -w 0  0  |  | x  w  0  0  0  y  0        |
|                      | 0  -z -z -y 0  0  -w |  | 0  0  -y -z z  0  -w       |
|                      | -z 0  0  x  0  -w 0  |  | 0  0  x  w  0  z  0        |
|                      | z  w  0  -x 0  w  0  |  | w  0  -x 0  -w -z 0        |
|                      | -y -x -x 0  -w 0  0  |  | 0  w  0  -x x  y  0        |
|                      | 0  0  -z -y 0  0  -w |  | z  0  -y 0  0  0  -w       |
|                      | 0  0  0  0  -z y  x  |  | 0  z  0  -y 0  0  x        |
|                                                                             |
|o7 : ZZdFactorizationMap                                                     |
|-----------------------------------------------------------------------------|
|<------------- cokernel | w z y x | : 0                                      |
|   {0} | 1 |                                                                 |
|   {1} | 0 |                                                                 |
|   {1} | 0 |                                                                 |
|   {1} | 0 |                                                                 |
|   {1} | 0 |                                                                 |
|                                                                             |
|                                                                             |
|                                                                             |
| 0  |) <----- 0 : 1                                                          |
| -x |     0                                                                  |
| 0  |                                                                        |
| -w |                                                                        |
| 0  |                                                                        |
| 0  |                                                                        |
| -z |                                                                        |
| y  |                                                                        |
+-----------------------------------------------------------------------------+
|i8 : assert isWellDefined g                                                  |
+-----------------------------------------------------------------------------+
|i9 : assert isFactorizationMorphism g                                        |
+-----------------------------------------------------------------------------+
|i10 : assert (target g == C)                                                 |
+-----------------------------------------------------------------------------+
|i11 : assert (source g == D)                                                 |
+-----------------------------------------------------------------------------+
|i12 : g^-1                                                                   |
|                                                                             |
|o12 = 0 : cokernel | w z y x |                                               |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|      1 : 0 <----- subquotient                                               |
|               0                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|o12 : ZZdFactorizationMap                                                    |
|-----------------------------------------------------------------------------|
|<----------------- subquotient (| 1 0  z  0  -x |, | w  z  0  0  y  0  -x 0  |
|   | 1 0 0 0 0 |                | 0 -x -y 0  0  |  | -x -y 0  0  0  y  0  -x |
|                                | 0 0  0  z  -w |  | 0  0  w  z  z  0  -w 0  |
|                                | 1 -w 0  -y 0  |  | 0  0  -x -y 0  z  0  -w |
|                                | 1 0  0  0  0  |  | w  0  -x 0  y  z  0  0  |
|                                | 0 0  w  -x 0  |  | 0  w  0  -x -x -w 0  0  |
|                                | 0 z  0  0  y  |  | z  0  -y 0  0  0  y  z  |
|                                | 1 -w z  -y -x |  | 0  z  0  -y 0  0  -x -w |
|                                                                             |
|(| 0  -y 0  0  z  -y -x |, | -y -z 0  0  y  0  -x 0  |) : 1                  |
| | -y 0  -x 0  -w 0  0  |  | x  w  0  0  0  y  0  -x |                       |
| | 0  -z -z -y 0  0  -w |  | 0  0  -y -z z  0  -w 0  |                       |
| | -z 0  0  x  0  -w 0  |  | 0  0  x  w  0  z  0  -w |                       |
| | z  w  0  -x 0  w  0  |  | w  0  -x 0  -w -z 0  0  |                       |
| | -y -x -x 0  -w 0  0  |  | 0  w  0  -x x  y  0  0  |                       |
| | 0  0  -z -y 0  0  -w |  | z  0  -y 0  0  0  -w -z |                       |
| | 0  0  0  0  -z y  x  |  | 0  z  0  -y 0  0  x  y  |                       |
|-----------------------------------------------------------------------------|
||) : 0                                                                       |
||                                                                            |
||                                                                            |
||                                                                            |
||                                                                            |
||                                                                            |
||                                                                            |
||                                                                            |
+-----------------------------------------------------------------------------+
|i13 : assert(g*g^-1 == 1 and g^-1*g == 1)                                    |
+-----------------------------------------------------------------------------+

See also
========

  * Making ZZdFactorizations -- Information
    about the basic constructors
  * minimalPresentation(Module) (Macaulay2Doc)
    -- minimal presentation of a
    module
  * randomFactorizationMap -- a random map of
    ZZ/d-graded factorizations
  * isFactorizationMorphism
    -- whether a
    ZZdFactorizationMap is a morphism of factorizations

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

  * minimalPresentation(ZZdFactorization)
    -- minimal presentation of all
    terms in a ZZ/d-graded factorization
  * "minimalPresentation(ZZdFactorizationMap)"
-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:2052:0.

monomialMF -- Construct a trivial d-fold factorization of a monomial
********************************************************************

  * Usage:
        monomialMF(RingElement)
  * Inputs:
      * RingElement, a ring element (Macaulay2Doc), A
        monomial in some polynomial ring
  * Outputs:
      * a ZZ/d graded factorization,

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

Constructs a trivial d-fold factorization of a degree d monomial, which is
given by multiplying all variables of the monomial.

+-------------------------------------------------+
|i1 : Q = QQ[x..z]                                |
|                                                 |
|o1 = Q                                           |
|                                                 |
|o1 : PolynomialRing                              |
+-------------------------------------------------+
|i2 : f = x*y^2*z^3                               |
|                                                 |
|        2 3                                      |
|o2 = x*y z                                       |
|                                                 |
|o2 : Q                                           |
+-------------------------------------------------+
|i3 : degree f                                    |
|                                                 |
|o3 = {6}                                         |
|                                                 |
|o3 : List                                        |
+-------------------------------------------------+
|i4 : C = monomialMF(f)                           |
|                                                 |
|      1      1      1      1      1      1      1|
|o4 = Q  <-- Q  <-- Q  <-- Q  <-- Q  <-- Q  <-- Q |
|                                                 |
|     0      1      2      3      4      5      0 |
|                                                 |
|o4 : ZZdFactorization                            |
+-------------------------------------------------+
|i5 : isdFactorization C                          |
|                                                 |
|               2 3                               |
|o5 = (true, x*y z )                              |
|                                                 |
|o5 : Sequence                                    |
+-------------------------------------------------+
|i6 : period C                                    |
|                                                 |
|o6 = 6                                           |
+-------------------------------------------------+
|i7 : g = 2/3*x*y*z                               |
|                                                 |
|     2                                           |
|o7 = -x*y*z                                      |
|     3                                           |
|                                                 |
|o7 : Q                                           |
+-------------------------------------------------+
|i8 : C' = monomialMF(g)                          |
|                                                 |
|      1      1      1      1                     |
|o8 = Q  <-- Q  <-- Q  <-- Q                      |
|                                                 |
|     0      1      2      0                      |
|                                                 |
|o8 : ZZdFactorization                            |
+-------------------------------------------------+
|i9 : C'.dd                                       |
|                                                 |
|          1                 1                    |
|o9 = 2 : Q  <------------- Q  : 0                |
|               {1} | x |                         |
|                                                 |
|          1                    1                 |
|     0 : Q  <---------------- Q  : 1             |
|               {1} | 2/3z |                      |
|                                                 |
|          1                 1                    |
|     1 : Q  <------------- Q  : 2                |
|               {1} | y |                         |
|                                                 |
|o9 : ZZdFactorizationMap                         |
+-------------------------------------------------+

See also
========

  * Making ZZdFactorizations -- Information
    about the basic constructors
  * linearMF -- Constructs a Koszul d-fold factorization of a
    homogeneous element of degree d
  * randomLinearMF -- Generates a linear d-fold
    factorization of a random degree d polynomial

Ways to use monomialMF:
=======================

  * "monomialMF(RingElement)"

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

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

-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:5453:0.

mooreMF -- Constructs the matrix factorization of the Moore matrix and its adjoint
**********************************************************************************

  * Usage:
        mooreMF(p)
  * Inputs:
      * p, an integer (Macaulay2Doc), The characteristic of the
        underlying field (p = 0 for rational coefficients)
  * Outputs:
      * a ZZ/d graded factorization, The Moore matrix
        factorization

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

This method constructs the Moore matrix factorization corresponding in some
characteristic specified by the integer p.

+-----------------------------------------------------------------------------+
|i1 : F = mooreMF(0)                                                          |
|                                                                             |
|                         3                         3                         |
|o1 = (QQ[a ..a , x ..x ])  <-- (QQ[a ..a , x ..x ])  <-- (QQ[a ..a ,         |
|          0   2   0   2             0   2   0   2             0   2          |
|                                                                             |
|     0                         1                         0                   |
|                                                                             |
|o1 : ZZdFactorization                                                        |
|-----------------------------------------------------------------------------|
|        3                                                                    |
|x ..x ])                                                                     |
| 0   2                                                                       |
+-----------------------------------------------------------------------------+
|i2 : F.dd                                                                    |
|                                                                             |
|                             3                                               |
|o2 = 1 : (QQ[a ..a , x ..x ])                                                |
|              0   2   0   2                                                  |
|                                                                             |
|                                                                             |
|                                                                             |
|                             3                                               |
|     0 : (QQ[a ..a , x ..x ])                                                |
|              0   2   0   2                                                  |
|                                                                             |
|                                                                             |
|                                                                             |
|o2 : ZZdFactorizationMap                                                     |
|-----------------------------------------------------------------------------|
|                                                                             |
|<----------------------------------------------------------------------------|
|   {2} | a_1a_2x_0^2-a_0^2x_1x_2  a_0a_2x_1^2-a_1^2x_0x_2  -a_2^2x_0x_1+a_0a_|
|   {2} | -a_1^2x_0x_1+a_0a_2x_2^2 a_0a_1x_0^2-a_2^2x_1x_2  a_1a_2x_1^2-a_0^2x|
|   {2} | a_0a_1x_1^2-a_2^2x_0x_2  -a_0^2x_0x_1+a_1a_2x_2^2 a_0a_2x_0^2-a_1^2x|
|                                                                             |
|                                                      3                      |
|<-------------------------------- (QQ[a ..a , x ..x ])  : 1                  |
|   {4} | a_0x_0 a_1x_2 a_2x_1 |        0   2   0   2                         |
|   {4} | a_1x_1 a_2x_0 a_0x_2 |                                              |
|   {4} | a_2x_2 a_0x_1 a_1x_0 |                                              |
|-----------------------------------------------------------------------------|
|                               3                                             |
|---------- (QQ[a ..a , x ..x ])  : 0                                         |
|1x_2^2 |        0   2   0   2                                                |
|_0x_2  |                                                                     |
|_1x_2  |                                                                     |
+-----------------------------------------------------------------------------+
|i3 : potential F                                                             |
|                                                                             |
|            3          3    3          3          3                3         |
|o3 = a a a x  + a a a x  - a x x x  - a x x x  - a x x x  + a a a x          |
|      0 1 2 0    0 1 2 1    0 0 1 2    1 0 1 2    2 0 1 2    0 1 2 2         |
|                                                                             |
|o3 : QQ[a ..a , x ..x ]                                                      |
|         0   2   0   2                                                       |
+-----------------------------------------------------------------------------+
|i4 : E = Hom(F,F)                                                            |
|                                                                             |
|                         18                         18                       |
|o4 = (QQ[a ..a , x ..x ])   <-- (QQ[a ..a , x ..x ])   <-- (QQ[a ..a ,       |
|          0   2   0   2              0   2   0   2              0   2        |
|                                                                             |
|     0                          1                          0                 |
|                                                                             |
|o4 : ZZdFactorization                                                        |
|-----------------------------------------------------------------------------|
|        18                                                                   |
|x ..x ])                                                                     |
| 0   2                                                                       |
+-----------------------------------------------------------------------------+
|i5 : prune HH_1 E                                                            |
|                                                                             |
|o5 = cokernel | a_1 a_0 0   0   0   0   -a_2 0   0   0   0   -a_2 0   0   0  |
|              | 0   0   x_2 x_0 0   0   0    x_1 0   0   0   0    0   0   0  |
|              | 0   0   0   0   a_2 a_1 a_0  0   0   0   0   0    0   0   0  |
|              | 0   0   0   0   0   0   0    x_2 x_1 x_0 0   0    0   0   0  |
|              | 0   0   0   0   0   0   0    0   0   0   a_2 a_1  a_0 0   0  |
|              | 0   0   0   0   0   0   0    0   0   0   0   0    0   x_2 x_1|
|                                                                             |
|                                                                6            |
|o5 : QQ[a ..a , x ..x ]-module, quotient of (QQ[a ..a , x ..x ])             |
|         0   2   0   2                           0   2   0   2               |
|-----------------------------------------------------------------------------|
|0    |                                                                       |
|0    |                                                                       |
|0    |                                                                       |
|-x_2 |                                                                       |
|0    |                                                                       |
|x_0  |                                                                       |
+-----------------------------------------------------------------------------+
|i6 : prune HH_0 E                                                            |
|                                                                             |
|o6 = cokernel | a_1a_2x_1^2-a_0^2x_0x_2 a_1^2x_0x_1-a_0a_2x_2^2 a_0a_1x_0^2-a|
|                                                                             |
|                                                                1            |
|o6 : QQ[a ..a , x ..x ]-module, quotient of (QQ[a ..a , x ..x ])             |
|         0   2   0   2                           0   2   0   2               |
|-----------------------------------------------------------------------------|
|_2^2x_1x_2 a_0a_2x_1^2-a_1^2x_0x_2 a_0^2x_0x_1-a_1a_2x_2^2                   |
|-----------------------------------------------------------------------------|
|-a_2^2x_0x_1+a_0a_1x_2^2 -a_0a_2x_0^2+a_1^2x_1x_2 -a_1a_2x_0^2+a_0^2x_1x_2   |
|-----------------------------------------------------------------------------|
|a_0a_1x_1^2-a_2^2x_0x_2 |                                                    |
+-----------------------------------------------------------------------------+
|i7 : netList (ann oo)_* --recover entries of 0th differential                |
|                                                                             |
|     +---------------+                                                       |
|     |     2    2    |                                                       |
|o7 = |a a x  - a x x |                                                       |
|     | 1 2 1    0 0 2|                                                       |
|     +---------------+                                                       |
|     |     2    2    |                                                       |
|     |a a x  - a x x |                                                       |
|     | 0 2 1    1 0 2|                                                       |
|     +---------------+                                                       |
|     |     2    2    |                                                       |
|     |a a x  - a x x |                                                       |
|     | 0 1 1    2 0 2|                                                       |
|     +---------------+                                                       |
|     | 2            2|                                                       |
|     |a x x  - a a x |                                                       |
|     | 2 0 1    0 1 2|                                                       |
|     +---------------+                                                       |
|     | 2            2|                                                       |
|     |a x x  - a a x |                                                       |
|     | 1 0 1    0 2 2|                                                       |
|     +---------------+                                                       |
|     | 2            2|                                                       |
|     |a x x  - a a x |                                                       |
|     | 0 0 1    1 2 2|                                                       |
|     +---------------+                                                       |
|     |     2    2    |                                                       |
|     |a a x  - a x x |                                                       |
|     | 1 2 0    0 1 2|                                                       |
|     +---------------+                                                       |
|     |     2    2    |                                                       |
|     |a a x  - a x x |                                                       |
|     | 0 2 0    1 1 2|                                                       |
|     +---------------+                                                       |
|     |     2    2    |                                                       |
|     |a a x  - a x x |                                                       |
|     | 0 1 0    2 1 2|                                                       |
|     +---------------+                                                       |
+-----------------------------------------------------------------------------+

See also
========

  * rk1MCM2gen -- Construct every possible rank 1,
    2-generated maximal Cohen-Macaulay module over the cubic Fermat
    hypersurface in 4 variables
  * adjointFactorization -- Constructs matrix
    factorization of a determinant of a matrix
  * Preprogrammed examples and operations
    -- Information about the basic constructors

Ways to use mooreMF:
====================

  * "mooreMF(ZZ)"

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

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

-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:6203:0.

nullHomotopy(ZZdFactorizationMap) -- a map which is a candidate for being a null homotopy
*****************************************************************************************

  * Function: nullHomotopy (Complexes),
  * Usage:
        h = nullHomotopy f
  * Inputs:
      * f, a map of ZZ/d-graded factorizations,
  * Outputs:
      * h, a map of ZZ/d-graded factorizations,

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

A map of ZZ/d-graded factorizations $f \colon C \to D$ is null-homotopic if
there exists a map of factorizations $h : C \to D$ of degree $\deg(f)+1$, such
that we have the equality \[ f = \operatorname{dd}^D h + (-1)^{\deg(f)} h
\operatorname{dd}^C. \]

As a first example, we verify that the identity map on the "trivial"
factorization is nullhomotopic.

+-------------------------------------------------------------+
|i1 : S = ZZ/101[a,b];                                        |
+-------------------------------------------------------------+
|i2 : C = trivialMF(S^2, a^3+b^3)                             |
|                                                             |
|      2      2      2                                        |
|o2 = S  <-- S  <-- S                                         |
|                                                             |
|     0      1      0                                         |
|                                                             |
|o2 : ZZdFactorization                                        |
+-------------------------------------------------------------+
|i3 : h = map(C, C, i -> if i == 1 then id_(S^2), Degree => 1)|
|                                                             |
|          2         2                                        |
|o3 = 1 : S  <----- S  : 0                                    |
|               0                                             |
|                                                             |
|          2               2                                  |
|     0 : S  <----------- S  : 1                              |
|               | 1 0 |                                       |
|               | 0 1 |                                       |
|                                                             |
|o3 : ZZdFactorizationMap                                     |
+-------------------------------------------------------------+
|i4 : isWellDefined h                                         |
|                                                             |
|o4 = true                                                    |
+-------------------------------------------------------------+
|i5 : assert isNullHomotopyOf(h, id_C)                        |
+-------------------------------------------------------------+
|i6 : assert isNullHomotopic id_C                             |
+-------------------------------------------------------------+

A random map of factorizations, arising as a boundary in the associated Hom
complex, is automatically null homotopic.  We use the method
nullHomotopy (Complexes), to construct a witness
and verify it is a null homotopy.

+------------------------------------------------------------+
|i7 : D = randomTailMF(a^3+b^3, 1,2,4)                       |
|                                                            |
|      2      2      2                                       |
|o7 = S  <-- S  <-- S                                        |
|                                                            |
|     0      1      0                                        |
|                                                            |
|o7 : ZZdFactorization                                       |
+------------------------------------------------------------+
|i8 : D.dd                                                   |
|                                                            |
|          2                                 2               |
|o8 = 1 : S  <----------------------------- S  : 0           |
|               {1} | -26b2 a2-3ab+32b2 |                    |
|               {2} | a+3b  3a+8b       |                    |
|                                                            |
|          2                              2                  |
|     0 : S  <-------------------------- S  : 1              |
|               | -3a-8b a2-3ab+32b2 |                       |
|               | a+3b   26b2        |                       |
|                                                            |
|o8 : ZZdFactorizationMap                                    |
+------------------------------------------------------------+
|i9 : f = randomFactorizationMap(D, D[1], Boundary => true)  |
|                                                            |
|          2                                   2             |
|o9 = 0 : S  <------------------------------- S  : 0         |
|               | -19a-38b -7a2+33ab-37b2 |                  |
|               | 19a-20b  -5a2+35ab-30b2 |                  |
|                                                            |
|          2                                            2    |
|     1 : S  <---------------------------------------- S  : 1|
|               {1} | 5a2-35ab-48b2 -4a2+24ab-42b2 |         |
|               {2} | 22a-11b       28a-39b        |         |
|                                                            |
|o9 : ZZdFactorizationMap                                    |
+------------------------------------------------------------+
|i10 : assert isNullHomotopic f                              |
+------------------------------------------------------------+
|i11 : h = nullHomotopy f                                    |
|                                                            |
|           2                           2                    |
|o11 = 1 : S  <----------------------- S  : 0                |
|                {1} | -10 -29a-8b |                         |
|                {2} | 0   -22     |                         |
|                                                            |
|           2                   2                            |
|      0 : S  <--------------- S  : 1                        |
|                | -29 -38 |                                 |
|                | -24 0   |                                 |
|                                                            |
|o11 : ZZdFactorizationMap                                   |
+------------------------------------------------------------+
|i12 : assert isNullHomotopyOf(h, f)                         |
+------------------------------------------------------------+

When a map of factorizations is not null-homotopic, this method nevertheless
returns a map $h$ of factorizations, having the correct source, target and
degree, but cannot be a null homotopy.

+-----------------------------------------------------+
|i13 : g = randomFactorizationMap(D, D[1])            |
|                                                     |
|           2                                    2    |
|o13 = 0 : S  <-------------------------------- S  : 0|
|                | -16a+39b 19a2-47ab-39b2  |         |
|                | 21a+34b  -18a2-13ab-43b2 |         |
|                                                     |
|           2         2                               |
|      1 : S  <----- S  : 1                           |
|                0                                    |
|                                                     |
|o13 : ZZdFactorizationMap                            |
+-----------------------------------------------------+
|i14 : assert not isNullHomotopic g                   |
+-----------------------------------------------------+
|i15 : h' = nullHomotopy g                            |
|                                                     |
|           2                    2                    |
|o15 = 1 : S  <---------------- S  : 0                |
|                {1} | 0 0  |                         |
|                {2} | 0 19 |                         |
|                                                     |
|           2         2                               |
|      0 : S  <----- S  : 1                           |
|                0                                    |
|                                                     |
|o15 : ZZdFactorizationMap                            |
+-----------------------------------------------------+
|i16 : assert isWellDefined h'                        |
+-----------------------------------------------------+
|i17 : assert(degree h' === degree g + 1)             |
+-----------------------------------------------------+
|i18 : assert not isNullHomotopyOf(h', g)             |
+-----------------------------------------------------+

Caveat
======

The output is only a null homotopy when one exists.

See also
========

  * Making maps between factorizations
    -- information about the basic constructors
  * isNullHomotopic(ZZdFactorizationMap)
    -- whether a map of ZZ/d-graded
    factorizations is null-homotopic
  * isNullHomotopyOf(ZZdFactorizationMap,ZZdFactorizationMap)
    -- whether
    the first map of ZZ/d-graded factorizations is a null homotopy for the
    second
  * randomFactorizationMap -- a random map of
    ZZ/d-graded factorizations
  * Hom(ZZdFactorization,ZZdFactorization)
    -- the ZZ/d-graded
    homomorphism factorization between two ZZ/d-graded factorizations

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

  * nullHomotopy(ZZdFactorizationMap)
    -- a map which is a candidate for
    being a null homotopy
-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:5114:0.

period -- the period of a ZZ/d-graded factorization or map
**********************************************************

  * Usage:
        p = period C
  * Inputs:
      * C, a ZZ/d graded factorization,
  * Outputs:
      * an integer (Macaulay2Doc), the integer d for which C is a
        ZZ/d-graded factorization

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

In this package, each factorization has a period d. This function is mainly
used in programming, to loop over all non-zero modules or maps in the
factorization.  This should not be confused with the support of a factorization
(that is, all spots with a nonzero module).

+--------------------------------------------------------------------+
|i1 : S = ZZ/101[a..c];                                              |
+--------------------------------------------------------------------+
|i2 : F = ZZdfactorization(S^0, 2)                                   |
|                                                                    |
|o2 = 0 <-- 0 <-- 0                                                  |
|                                                                    |
|     0     1     0                                                  |
|                                                                    |
|o2 : ZZdFactorization                                               |
+--------------------------------------------------------------------+
|i3 : period F -- even though all modules are 0, period is unchanged.|
|                                                                    |
|o3 = 2                                                              |
+--------------------------------------------------------------------+
|i4 : F == 0                                                         |
|                                                                    |
|o4 = true                                                           |
+--------------------------------------------------------------------+
|i5 : C = tailMF ideal vars (S/(a^2+b^2+c^2))                        |
|                                                                    |
|      4      4      4                                               |
|o5 = S  <-- S  <-- S                                                |
|                                                                    |
|     0      1      0                                                |
|                                                                    |
|o5 : ZZdFactorization                                               |
+--------------------------------------------------------------------+
|i6 : period C                                                       |
|                                                                    |
|o6 = 2                                                              |
+--------------------------------------------------------------------+
|i7 : D = C ++ C[5]                                                  |
|                                                                    |
|      8      8      8                                               |
|o7 = S  <-- S  <-- S                                                |
|                                                                    |
|     0      1      0                                                |
|                                                                    |
|o7 : ZZdFactorization                                               |
+--------------------------------------------------------------------+
|i8 : period D                                                       |
|                                                                    |
|o8 = 2                                                              |
+--------------------------------------------------------------------+

Unlike the "concentration" command for complexes, indices outside the period
are taken modulo the period, and all of the standard operations on
factorizations leave the period unchanged. If you want to change the period of
a factorization, try using TO (unfold, ZZdFactorization, List) instead.

+----------------------------------------+
|i9 : C_-1                               |
|                                        |
|      4                                 |
|o9 = S                                  |
|                                        |
|o9 : S-module, free, degrees {4:4}      |
+----------------------------------------+
|i10 : D_4                               |
|                                        |
|       8                                |
|o10 = S                                 |
|                                        |
|o10 : S-module, free, degrees {4:3, 4:4}|
+----------------------------------------+

The function period does no computation. Use prune to obtain the pruned
outputs.

+-----------------------------------------------------------------------------+
|i11 : f1 = a*id_C                                                            |
|                                                                             |
|           4                       4                                         |
|o11 = 0 : S  <------------------- S  : 0                                     |
|                {3} | a 0 0 0 |                                              |
|                {3} | 0 a 0 0 |                                              |
|                {3} | 0 0 a 0 |                                              |
|                {3} | 0 0 0 a |                                              |
|                                                                             |
|           4                       4                                         |
|      1 : S  <------------------- S  : 1                                     |
|                {4} | a 0 0 0 |                                              |
|                {4} | 0 a 0 0 |                                              |
|                {4} | 0 0 a 0 |                                              |
|                {4} | 0 0 0 a |                                              |
|                                                                             |
|o11 : ZZdFactorizationMap                                                    |
+-----------------------------------------------------------------------------+
|i12 : E = coker f1                                                           |
|                                                                             |
|o12 = cokernel {3} | a 0 0 0 | <-- cokernel {4} | a 0 0 0 | <-- cokernel {3} |
|               {3} | 0 a 0 0 |              {4} | 0 a 0 0 |              {3} |
|               {3} | 0 0 a 0 |              {4} | 0 0 a 0 |              {3} |
|               {3} | 0 0 0 a |              {4} | 0 0 0 a |              {3} |
|                                                                             |
|      0                            1                            0            |
|                                                                             |
|o12 : ZZdFactorization                                                       |
|-----------------------------------------------------------------------------|
|| a 0 0 0 |                                                                  |
|| 0 a 0 0 |                                                                  |
|| 0 0 a 0 |                                                                  |
|| 0 0 0 a |                                                                  |
+-----------------------------------------------------------------------------+
|i13 : Z = coker id_C                                                         |
|                                                                             |
|o13 = cokernel {3} | 1 0 0 0 | <-- cokernel {4} | 1 0 0 0 | <-- cokernel {3} |
|               {3} | 0 1 0 0 |              {4} | 0 1 0 0 |              {3} |
|               {3} | 0 0 1 0 |              {4} | 0 0 1 0 |              {3} |
|               {3} | 0 0 0 1 |              {4} | 0 0 0 1 |              {3} |
|                                                                             |
|      0                            1                            0            |
|                                                                             |
|o13 : ZZdFactorization                                                       |
|-----------------------------------------------------------------------------|
|| 1 0 0 0 |                                                                  |
|| 0 1 0 0 |                                                                  |
|| 0 0 1 0 |                                                                  |
|| 0 0 0 1 |                                                                  |
+-----------------------------------------------------------------------------+
|i14 : Z == 0                                                                 |
|                                                                             |
|o14 = true                                                                   |
+-----------------------------------------------------------------------------+
|i15 : period prune Z                                                         |
|                                                                             |
|o15 = 2                                                                      |
+-----------------------------------------------------------------------------+

A module may be viewed as a ZZ/d-graded factorization with any period. We can
construct this factorization as follows. We can specify the base homological
degree using the option Base.

+-------------------------------------------------------+
|i16 : C0 = ZZdfactorization(coker vars S, 2)           |
|                                                       |
|o16 = cokernel | a b c | <-- 0 <-- cokernel | a b c |  |
|                                                       |
|      0                      1     0                   |
|                                                       |
|o16 : ZZdFactorization                                 |
+-------------------------------------------------------+
|i17 : C1 = ZZdfactorization(coker vars S, 2, Base => 1)|
|                                                       |
|o17 = 0 <-- cokernel | a b c | <-- 0                   |
|                                                       |
|      0     1                      0                   |
|                                                       |
|o17 : ZZdFactorization                                 |
+-------------------------------------------------------+
|i18 : period C0                                        |
|                                                       |
|o18 = 2                                                |
+-------------------------------------------------------+
|i19 : period C1                                        |
|                                                       |
|o19 = 2                                                |
+-------------------------------------------------------+
|i20 : prune C0 == (prune C1)[1]                        |
|                                                       |
|o20 = true                                             |
+-------------------------------------------------------+

See also
========

  * Basic invariants and properties, --
    information about accessing basic features
  * ZZdFactorization _ ZZ -- access individual
    object in a ZZ/d-graded factorization
  * period(ZZdFactorizationMap) -- the period of a ZZ/d-graded
    factorization or map

Ways to use period:
===================

  * "period(ZZdFactorization)"
  * "period(ZZdFactorizationMap)"

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

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

-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:490:0.

potential -- Outputs the polynomial $f$ such that the dth power of the differentials is equal to $ f \cdot \text{id}$
*********************************************************************************************************************

  * Usage:
        potential(C)
  * Inputs:
      * C, a ZZ/d graded factorization, A ZZ/d-graded
        factorization
  * Outputs:
      * a ring element (Macaulay2Doc),

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

This method determines the potential of the factorization $C$ by first checking
if $C$ a well-defined factorization using the isdFactorization function. If it
is, it returns the potential \( f \); otherwise, it throws an error.

+-------------------------------------------------------------+
|i1 : Q = ZZ/101[a..d]                                        |
|                                                             |
|o1 = Q                                                       |
|                                                             |
|o1 : PolynomialRing                                          |
+-------------------------------------------------------------+
|i2 : f = a^2+b^2+c^2+d^2                                     |
|                                                             |
|      2    2    2    2                                       |
|o2 = a  + b  + c  + d                                        |
|                                                             |
|o2 : Q                                                       |
+-------------------------------------------------------------+
|i3 : C = linearMF(f)                                         |
|                                                             |
|      8      8      8                                        |
|o3 = Q  <-- Q  <-- Q                                         |
|                                                             |
|     0      1      0                                         |
|                                                             |
|o3 : ZZdFactorization                                        |
+-------------------------------------------------------------+
|i4 : potential C                                             |
|                                                             |
|      2    2    2    2                                       |
|o4 = a  + b  + c  + d                                        |
|                                                             |
|o4 : Q                                                       |
+-------------------------------------------------------------+
|i5 : S = ZZ/101[a,b]                                         |
|                                                             |
|o5 = S                                                       |
|                                                             |
|o5 : PolynomialRing                                          |
+-------------------------------------------------------------+
|i6 : D = randomTailMF(a^3 + b^3, 2, 6, 3)                    |
|                                                             |
|      5      5      5                                        |
|o6 = S  <-- S  <-- S                                         |
|                                                             |
|     0      1      0                                         |
|                                                             |
|o6 : ZZdFactorization                                        |
+-------------------------------------------------------------+
|i7 : D.dd                                                    |
|                                                             |
|          5                                 5                |
|o7 = 1 : S  <----------------------------- S  : 0            |
|               {1} | -a2 b2 0   0   0  |                     |
|               {1} | 0   0  -a2 b2  ab |                     |
|               {1} | 0   0  -ab -a2 b2 |                     |
|               {1} | 0   0  b2  ab  a2 |                     |
|               {2} | b   a  0   0   0  |                     |
|                                                             |
|          5                         5                        |
|     0 : S  <--------------------- S  : 1                    |
|               | -a 0  0  0 b2 |                             |
|               | b  0  0  0 a2 |                             |
|               | 0  -a 0  b 0  |                             |
|               | 0  b  -a 0 0  |                             |
|               | 0  0  b  a 0  |                             |
|                                                             |
|o7 : ZZdFactorizationMap                                     |
+-------------------------------------------------------------+
|i8 : D.dd^2                                                  |
|                                                             |
|          5                                         5        |
|o8 = 0 : S  <------------------------------------- S  : 0    |
|               | a3+b3 0     0     0     0     |             |
|               | 0     a3+b3 0     0     0     |             |
|               | 0     0     a3+b3 0     0     |             |
|               | 0     0     0     a3+b3 0     |             |
|               | 0     0     0     0     a3+b3 |             |
|                                                             |
|          5                                             5    |
|     1 : S  <----------------------------------------- S  : 1|
|               {1} | a3+b3 0     0     0     0     |         |
|               {1} | 0     a3+b3 0     0     0     |         |
|               {1} | 0     0     a3+b3 0     0     |         |
|               {1} | 0     0     0     a3+b3 0     |         |
|               {2} | 0     0     0     0     a3+b3 |         |
|                                                             |
|o8 : ZZdFactorizationMap                                     |
+-------------------------------------------------------------+
|i9 : potential D                                             |
|                                                             |
|      3    3                                                 |
|o9 = a  + b                                                  |
|                                                             |
|o9 : S                                                       |
+-------------------------------------------------------------+

See also
========

  * Making ZZdFactorizations -- Information
    about the basic constructors

Ways to use potential:
======================

  * "potential(ZZdFactorization)"

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

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

-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:5775:0.

Preprogrammed examples and operations -- Information about the basic constructors
*********************************************************************************

Basic constructors
==================

  * ZZdfactorization(HashTable) -- make
    a ZZ/d-graded factorization
  * ZZdfactorization(List) -- make a ZZ/d-graded
    factorization
  * isWellDefined(ZZdFactorization),
    -- whether a ZZ/d-graded factorization is well-defined
  * isdFactorization(ZZdFactorization) -- Checks if
    the differentials of a factorization compose to a scalar multiple of the
    identity

Important constructors for creating ZZ/d-graded factorizations
==============================================================

  * koszulMF(List,RingElement) -- Construct a Koszul matrix
    factorization from an ideal and a polynomial
  * linearMF(RingElement) -- Constructs a Koszul d-fold
    factorization of a homogeneous element of degree d
  * randomLinearMF(ZZ,Ring) -- Generates a linear d-fold
    factorization of a random degree d polynomial
  * tailMF(Module) -- Generate a ZZdFactorization from a module
    over a hypersurface ring
  * randomTailMF(RingElement) -- Construct a matrix
    factorization from a high syzygy of a random module over a hypersurface
  * gradedModule(ZZdFactorization),
    -- a new ZZ/d-graded factorization in which the differential is zero
  * HH ZZdFactorization -- homology of a
    ZZ/d-graded factorization

More advanced constructors
==========================

  * ZZdFactorization ++ ZZdFactorization
    -- direct sum of ZZ/d-graded
    factorizations
  * ZZdFactorization ** ZZdFactorization
    -- tensor product of ZZ/d-graded factorizations
  * Hom(ZZdFactorization,ZZdFactorization)
    -- the ZZ/d-graded
    homomorphism factorization between two ZZ/d-graded factorizations
  * dual(ZZdFactorization) -- make the dual
    of a ZZ/d-graded factorization
  * RingMap ZZdFactorization -- apply a ring
    map
  * RingMap ** ZZdFactorization, --
    tensor a ZZ/d-graded factorization along a ring map
  * minimalPresentation(ZZdFactorization)
    -- minimal presentation of all
    terms in a ZZ/d-graded factorization

Extracting ZZ/d-graded factorization from ZZ/d-graded factorization maps
========================================================================

  * source(ZZdFactorizationMap) -- get
    the source of a map of ZZ/d-graded factorizations
  * target(ZZdFactorizationMap) -- get
    the target of a map of ZZ/d-graded factorizations
  * kernel(ZZdFactorizationMap) -- make
    the kernel of a map of ZZ/d-graded factorizations
  * cokernel(ZZdFactorizationMap), --
    make the cokernel of a map of ZZ/d-graded factorizations
  * image(ZZdFactorizationMap) -- make
    the image of a map of ZZ/d-graded factorizations
  * coimage(ZZdFactorizationMap), --
    make the coimage of a map of ZZ/d-graded factorizations
  * cone(ZZdFactorizationMap) -- make the
    mapping cone of a morphism of ZZ/d-graded factorizations

See also
========

  * Making maps between factorizations
    -- information about the basic constructors
  * Basic invariants and properties, --
    information about accessing basic features
  * Preprogrammed examples and operations
    -- Information about the basic constructors
-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:277:0.

projectiveCover -- Constructs the projective cover of a d-fold matrix factorization
***********************************************************************************

  * Usage:
        projectiveCover(C)
  * Inputs:
      * C, a ZZ/d graded factorization, A
        ZZdFactorization object representing a d-fold matrix factorization
  * Outputs:
      * a map of ZZ/d-graded factorizations,

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

This method constructs the projective cover of a d-fold matrix factorization.
The output is a ZZdFactorizationMap, which is the canonical surjection from the
cover onto the original factorization.

+-----------------------------------------------------------------------------+
|i1 : Q = ZZ/101[a,b,c];                                                      |
+-----------------------------------------------------------------------------+
|i2 : C = linearMF(a^3+b^3,t)                                                 |
|                                                                             |
|     /   Q[t]   \3     /   Q[t]   \3     /   Q[t]   \3     /   Q[t]   \3     |
|o2 = |----------|  <-- |----------|  <-- |----------|  <-- |----------|      |
|     | 2        |      | 2        |      | 2        |      | 2        |      |
|     \t  + t + 1/      \t  + t + 1/      \t  + t + 1/      \t  + t + 1/      |
|                                                                             |
|     0                 1                 2                 0                 |
|                                                                             |
|o2 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i3 : f = projectiveCover C                                                   |
|                                                                             |
|         /   Q[t]   \3                                                       |
|o3 = 0 : |----------|  <------------------------------------------------     |
|         | 2        |     {0, 2} | 1 0 0 b a  0     b2   abt+ab  a2  |       |
|         \t  + t + 1/     {0, 2} | 0 1 0 0 bt a     a2   -b2t-b2 -ab |       |
|                          {0, 2} | 0 0 1 a 0  -bt-b -abt a2      b2t |       |
|                                                                             |
|         /   Q[t]   \3                                                       |
|     1 : |----------|  <------------------------------------------------     |
|         | 2        |     {0, 2} | b2   abt+ab  a2  1 0 0 b a  0     |       |
|         \t  + t + 1/     {0, 2} | a2   -b2t-b2 -ab 0 1 0 0 bt a     |       |
|                          {0, 2} | -abt a2      b2t 0 0 1 a 0  -bt-b |       |
|                                                                             |
|         /   Q[t]   \3                                                       |
|     2 : |----------|  <------------------------------------------------     |
|         | 2        |     {0, 2} | b a  0     b2   abt+ab  a2  1 0 0 |       |
|         \t  + t + 1/     {0, 2} | 0 bt a     a2   -b2t-b2 -ab 0 1 0 |       |
|                          {0, 2} | a 0  -bt-b -abt a2      b2t 0 0 1 |       |
|                                                                             |
|o3 : ZZdFactorizationMap                                                     |
|-----------------------------------------------------------------------------|
|/   Q[t]   \9                                                                |
||----------|  : 0                                                            |
|| 2        |                                                                 |
|\t  + t + 1/                                                                 |
|                                                                             |
|                                                                             |
|/   Q[t]   \9                                                                |
||----------|  : 1                                                            |
|| 2        |                                                                 |
|\t  + t + 1/                                                                 |
|                                                                             |
|                                                                             |
|/   Q[t]   \9                                                                |
||----------|  : 2                                                            |
|| 2        |                                                                 |
|\t  + t + 1/                                                                 |
+-----------------------------------------------------------------------------+
|i4 : isCommutative f                                                         |
|                                                                             |
|o4 = true                                                                    |
+-----------------------------------------------------------------------------+
|i5 : prune coker f                                                           |
|                                                                             |
|o5 = 0 <-- 0 <-- 0 <-- 0                                                     |
|                                                                             |
|     0     1     2     0                                                     |
|                                                                             |
|o5 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i6 : prune ker f                                                             |
|                                                                             |
|     /   Q[t]   \6     /   Q[t]   \6     /   Q[t]   \6     /   Q[t]   \6     |
|o6 = |----------|  <-- |----------|  <-- |----------|  <-- |----------|      |
|     | 2        |      | 2        |      | 2        |      | 2        |      |
|     \t  + t + 1/      \t  + t + 1/      \t  + t + 1/      \t  + t + 1/      |
|                                                                             |
|     0                 1                 2                 0                 |
|                                                                             |
|o6 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i7 : oo.dd                                                                   |
|                                                                             |
|         /   Q[t]   \6                                       /   Q[t]   \6   |
|o7 = 2 : |----------|  <------------------------------------ |----------|  : |
|         | 2        |     | 0  -bt -a   -a2 b2t+b2  ab   |   | 2        |    |
|         \t  + t + 1/     | -b -a  0    -b2 -abt-ab -a2  |   \t  + t + 1/    |
|                          | 0  1   0    0   0       0    |                   |
|                          | -a 0   bt+b abt -a2     -b2t |                   |
|                          | 0  0   1    0   0       0    |                   |
|                          | 1  0   0    0   0       0    |                   |
|                                                                             |
|         /   Q[t]   \6                                       /   Q[t]   \6   |
|     0 : |----------|  <------------------------------------ |----------|  : |
|         | 2        |     | -abt-ab -a2  -b2 -b -a  0    |   | 2        |    |
|         \t  + t + 1/     | b2t+b2  ab   -a2 0  -bt -a   |   \t  + t + 1/    |
|                          | -a2     -b2t abt -a 0   bt+b |                   |
|                          | 0       0    0   1  0   0    |                   |
|                          | 0       0    0   0  1   0    |                   |
|                          | 0       0    0   0  0   1    |                   |
|                                                                             |
|         /   Q[t]   \6                                       /   Q[t]   \6   |
|     1 : |----------|  <------------------------------------ |----------|  : |
|         | 2        |     | 1   0  0       0    0    0   |   | 2        |    |
|         \t  + t + 1/     | 0   0  0       1    0    0   |   \t  + t + 1/    |
|                          | 0   1  0       0    0    0   |                   |
|                          | -a  -b -abt-ab 0    -a2  -b2 |                   |
|                          | -bt 0  b2t+b2  -a   ab   -a2 |                   |
|                          | 0   -a -a2     bt+b -b2t abt |                   |
|                                                                             |
|o7 : ZZdFactorizationMap                                                     |
|-----------------------------------------------------------------------------|
|0                                                                            |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|1                                                                            |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|2                                                                            |
+-----------------------------------------------------------------------------+
|i8 : D = koszulMF(a^3+b^3+c^3)                                               |
|                                                                             |
|      4      4      4                                                        |
|o8 = Q  <-- Q  <-- Q                                                         |
|                                                                             |
|     0      1      0                                                         |
|                                                                             |
|o8 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i9 : D.dd                                                                    |
|                                                                             |
|          4                        4                                         |
|o9 = 1 : Q  <-------------------- Q  : 0                                     |
|               | c2 0  b  a   |                                              |
|               | 0  c2 a2 -b2 |                                              |
|               | b2 a  -c 0   |                                              |
|               | a2 -b 0  -c  |                                              |
|                                                                             |
|          4                         4                                        |
|     0 : Q  <--------------------- Q  : 1                                    |
|               | c  0  b   a   |                                             |
|               | 0  c  a2  -b2 |                                             |
|               | b2 a  -c2 0   |                                             |
|               | a2 -b 0   -c2 |                                             |
|                                                                             |
|o9 : ZZdFactorizationMap                                                     |
+-----------------------------------------------------------------------------+
|i10 : g = projectiveCover D                                                  |
|                                                                             |
|           4                                 8                               |
|o10 = 0 : Q  <----------------------------- Q  : 0                           |
|                | 1 0 0 0 c  0  b   a   |                                    |
|                | 0 1 0 0 0  c  a2  -b2 |                                    |
|                | 0 0 1 0 b2 a  -c2 0   |                                    |
|                | 0 0 0 1 a2 -b 0   -c2 |                                    |
|                                                                             |
|           4                                8                                |
|      1 : Q  <---------------------------- Q  : 1                            |
|                | c2 0  b  a   1 0 0 0 |                                     |
|                | 0  c2 a2 -b2 0 1 0 0 |                                     |
|                | b2 a  -c 0   0 0 1 0 |                                     |
|                | a2 -b 0  -c  0 0 0 1 |                                     |
|                                                                             |
|o10 : ZZdFactorizationMap                                                    |
+-----------------------------------------------------------------------------+
|i11 : isCommutative g                                                        |
|                                                                             |
|o11 = true                                                                   |
+-----------------------------------------------------------------------------+
|i12 : prune ker g                                                            |
|                                                                             |
|       4      4      4                                                       |
|o12 = Q  <-- Q  <-- Q                                                        |
|                                                                             |
|      0      1      0                                                        |
|                                                                             |
|o12 : ZZdFactorization                                                       |
+-----------------------------------------------------------------------------+
|i13 : oo.dd                                                                  |
|                                                                             |
|           4                         4                                       |
|o13 = 1 : Q  <--------------------- Q  : 0                                   |
|                | -a -b2 c2  0  |                                            |
|                | b  -a2 0   c2 |                                            |
|                | -c 0   -a2 b2 |                                            |
|                | 0  -c  -b  -a |                                            |
|                                                                             |
|           4                          4                                      |
|      0 : Q  <---------------------- Q  : 1                                  |
|                | -a2 b2 -c2 0   |                                           |
|                | -b  -a 0   -c2 |                                           |
|                | c   0  -a  -b2 |                                           |
|                | 0   c  b   -a2 |                                           |
|                                                                             |
|o13 : ZZdFactorizationMap                                                    |
+-----------------------------------------------------------------------------+

It turns out that the kernel of this projective when the period is 2 is
isomorphic to the shift of the original factorization. In general, the kernel
of the projective covering map gives a canonical method of defining the
suspension, of a d-fold factorization.

See also
========

  * suspension -- Constructs the suspension of a d-fold
    factorization
  * injectiveCover -- Constructs the injective hull of a
    d-fold matrix factorization

Ways to use projectiveCover:
============================

  * "projectiveCover(ZZdFactorization)"

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

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

-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:5817:0.

randomFactorizationMap -- a random map of ZZ/d-graded factorizations
********************************************************************

  * Usage:
        f = randomFactorizationMap(C,D)
  * Inputs:
      * C, a ZZ/d graded factorization,
      * D, a ZZ/d graded factorization,
  * Optional inputs (Macaulay2Doc),:
      * Boundary => a Boolean value (Macaulay2Doc), default
        value false, whether the constructed f is a null homotopy
      * Cycle => a Boolean value (Macaulay2Doc), default value
        false, whether the constructed f commutes with the differentials
      * Degree => an integer (Macaulay2Doc), default value 0, the
        degree of the constructed map of chain complexes
      * InternalDegree => a list (Macaulay2Doc), default value
        null, or an integer (Macaulay2Doc),
  * Outputs:
      * f, a map of ZZ/d-graded factorizations,

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

A random ZZ/d-graded factorization map $f : C \to D$ is obtained from a random
element in the ZZ/d-graded factorization $Hom(C,D)$.

+-------------------------------------+
|i1 : S = ZZ/101[a,b];                |
+-------------------------------------+
|i2 : R = S/(a^3+b^3);                |
+-------------------------------------+
|i3 : m = ideal vars R                |
|                                     |
|o3 = ideal (a, b)                    |
|                                     |
|o3 : Ideal of R                      |
+-------------------------------------+
|i4 : C = tailMF m                    |
|                                     |
|      2      2      2                |
|o4 = S  <-- S  <-- S                 |
|                                     |
|     0      1      0                 |
|                                     |
|o4 : ZZdFactorization                |
+-------------------------------------+
|i5 : D = tailMF (m^2)                |
|                                     |
|      3      3      3                |
|o5 = S  <-- S  <-- S                 |
|                                     |
|     0      1      0                 |
|                                     |
|o5 : ZZdFactorization                |
+-------------------------------------+
|i6 : f = randomFactorizationMap(D,C) |
|                                     |
|          3                     2    |
|o6 = 0 : S  <----------------- S  : 0|
|               {3} | 0 24  |         |
|               {3} | 0 -36 |         |
|               {3} | 0 -30 |         |
|                                     |
|          3         2                |
|     1 : S  <----- S  : 1            |
|               0                     |
|                                     |
|o6 : ZZdFactorizationMap             |
+-------------------------------------+
|i7 : assert isWellDefined f          |
+-------------------------------------+
|i8 : assert not isCommutative f      |
+-------------------------------------+

When the random element in the factorization $Hom(C,D)$ lies in the kernel of
the differential, the associated map of complexes commutes with the
differential.

+------------------------------------------------------------------------+
|i9 : g = randomFactorizationMap(D,C, Cycle => true, InternalDegree => 2)|
|                                                                        |
|          3                                        2                    |
|o9 = 0 : S  <------------------------------------ S  : 0                |
|               {3} | -41a+10b -29a2-10ab-30b2 |                         |
|               {3} | -43a+8b  -19a2-19ab+48b2 |                         |
|               {3} | -5a+19b  -29a2+11ab+14b2 |                         |
|                                                                        |
|          3                                 2                           |
|     1 : S  <----------------------------- S  : 1                       |
|               {5} | -41a-14b -29a+19b |                                |
|               {5} | 43a-30b  19a-10b  |                                |
|               {5} | -5a+48b  -29a-8b  |                                |
|                                                                        |
|o9 : ZZdFactorizationMap                                                |
+------------------------------------------------------------------------+
|i10 : assert isWellDefined g                                            |
+------------------------------------------------------------------------+
|i11 : assert isCommutative g                                            |
+------------------------------------------------------------------------+
|i12 : assert isFactorizationMorphism g                                  |
+------------------------------------------------------------------------+

Assume that $C$ and $D$ are factorizations of the same potential. Then the
factorization $Hom(C,D)$ is actually a ZZ/d-graded complex. When the random
element in the factorization $Hom(C,D)$ lies in the image of the differential,
the associated map of complexes is a null homotopy.

+-------------------------------------------------------+
|i13 : h = randomFactorizationMap(D,C, Boundary => true)|
|                                                       |
|           3                                     2     |
|o13 = 0 : S  <--------------------------------- S  : 0 |
|                {3} | -38ab-21b2 21a2b-38b3 |          |
|                {3} | -16ab-34b2 34a2b-16b3 |          |
|                {3} | 39ab-19b2  19a2b+39b3 |          |
|                                                       |
|           3                                     2     |
|      1 : S  <--------------------------------- S  : 1 |
|                {5} | -38ab-39b2 21ab-19b2  |          |
|                {5} | 16ab-38b2  -34ab+21b2 |          |
|                {5} | 39ab-16b2  19ab+34b2  |          |
|                                                       |
|o13 : ZZdFactorizationMap                              |
+-------------------------------------------------------+
|i14 : assert isWellDefined h                           |
+-------------------------------------------------------+
|i15 : assert isCommutative h                           |
+-------------------------------------------------------+
|i16 : assert isFactorizationMorphism h                 |
+-------------------------------------------------------+

When the degree of the random element in the factorization $Hom(C,D)$ is
non-zero, the associated map of factorizations has the same degree.

+------------------------------------------------------------------+
|i17 : p = randomFactorizationMap(D, C, Cycle => true, Degree => 1)|
|                                                                  |
|           3         2                                            |
|o17 = 1 : S  <----- S  : 0                                        |
|                0                                                 |
|                                                                  |
|           3         2                                            |
|      0 : S  <----- S  : 1                                        |
|                0                                                 |
|                                                                  |
|o17 : ZZdFactorizationMap                                         |
+------------------------------------------------------------------+
|i18 : assert isWellDefined p                                      |
+------------------------------------------------------------------+
|i19 : assert isCommutative p                                      |
+------------------------------------------------------------------+
|i20 : assert not isFactorizationMorphism p                        |
+------------------------------------------------------------------+
|i21 : assert(degree p === 1)                                      |
+------------------------------------------------------------------+

By default, the random element is constructed as a random linear combination of
the basis elements in the appropriate degree of $Hom(C,D)$.  Given an internal
degree, the random element is constructed as maps of modules with this degree.

+-----------------------------------------------------------------------------+
|i22 : q = randomFactorizationMap(D, C, Boundary => true, InternalDegree => 2)|
|                                                                             |
|           3                                                       2         |
|o22 = 0 : S  <--------------------------------------------------- S  : 0     |
|                {3} | -13ab3+28b4 -28a2b3-13b5-47a2-18ab-39b2 |              |
|                {3} | -43ab3+47b4 -47a2b3-43b5+39a2-47ab-18b2 |              |
|                {3} | -15ab3-38b4 38a2b3-15b5-18a2-39ab+47b2  |              |
|                                                                             |
|           3                                               2                 |
|      1 : S  <------------------------------------------- S  : 1             |
|                {5} | -13ab3+15b4-47b -28ab3-38b4-47a |                      |
|                {5} | 43ab3-13b4-39b  47ab3-28b4-39a  |                      |
|                {5} | -15ab3-43b4-18b 38ab3-47b4-18a  |                      |
|                                                                             |
|o22 : ZZdFactorizationMap                                                    |
+-----------------------------------------------------------------------------+
|i23 : assert all({0,1,2}, i -> degree q_i === {2})                           |
+-----------------------------------------------------------------------------+
|i24 : assert isWellDefined q                                                 |
+-----------------------------------------------------------------------------+
|i25 : assert isCommutative q                                                 |
+-----------------------------------------------------------------------------+
|i26 : assert isFactorizationMorphism q                                       |
+-----------------------------------------------------------------------------+
|i27 : source q === C                                                         |
|                                                                             |
|o27 = true                                                                   |
+-----------------------------------------------------------------------------+
|i28 : target q === D                                                         |
|                                                                             |
|o28 = true                                                                   |
+-----------------------------------------------------------------------------+

See also
========

  * homomorphism(ZZdFactorizationMap)
    -- get the homomorphism from an
    element of Hom
  * homomorphism'(ZZdFactorizationMap)
    -- get the element of Hom from a
    map of factorizations
  * Hom(ZZdFactorization,ZZdFactorization)
    -- the ZZ/d-graded
    homomorphism factorization between two ZZ/d-graded factorizations

Ways to use randomFactorizationMap:
===================================

  * "randomFactorizationMap(ZZdFactorization,ZZdFactorization)"

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

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

-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:4647:0.

randomLinearMF -- Generates a linear d-fold factorization of a random degree d polynomial
*****************************************************************************************

  * Usage:
        randomLinearMF(ZZ, Ring)
  * Inputs:
      * ZZ, an integer (Macaulay2Doc), An integer representing the
        degree
      * Ring, a ring (Macaulay2Doc), The ring object
      * RingElement, a ring element (Macaulay2Doc), An
        element in the ring
      * Symbol, a symbol (Macaulay2Doc), A symbol representing
        the indeterminate
  * Outputs:
      * a ZZ/d graded factorization,

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

Generates a linear d-fold factorization of a random degree $d$ polynomial using
the linearMF, command. If the ring has too many variables the
output may be a factorization that is too large to be useful.

+-----------------------------------------------------------------------------+
|i1 : Q = QQ[x,y,z];                                                          |
+-----------------------------------------------------------------------------+
|i2 : d = 3;                                                                  |
+-----------------------------------------------------------------------------+
|i3 : K = randomLinearMF(d, Q, t) --way too many terms!                       |
|                                                                             |
|     /   Q[t]   \19683     /   Q[t]   \19683     /   Q[t]   \19683           |
|o3 = |----------|      <-- |----------|      <-- |----------|      <--       |
|     | 2        |          | 2        |          | 2        |                |
|     \t  + t + 1/          \t  + t + 1/          \t  + t + 1/                |
|                                                                             |
|     0                     1                     2                           |
|                                                                             |
|o3 : ZZdFactorization                                                        |
|-----------------------------------------------------------------------------|
|/   Q[t]   \19683                                                            |
||----------|                                                                 |
|| 2        |                                                                 |
|\t  + t + 1/                                                                 |
|                                                                             |
|0                                                                            |
+-----------------------------------------------------------------------------+
|i4 : S = QQ[x,y]                                                             |
|                                                                             |
|o4 = S                                                                       |
|                                                                             |
|o4 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i5 : K' = randomLinearMF(d, S, t)                                            |
|                                                                             |
|     /   S[t]   \27     /   S[t]   \27     /   S[t]   \27     /   S[t]   \27 |
|o5 = |----------|   <-- |----------|   <-- |----------|   <-- |----------|   |
|     | 2        |       | 2        |       | 2        |       | 2        |   |
|     \t  + t + 1/       \t  + t + 1/       \t  + t + 1/       \t  + t + 1/   |
|                                                                             |
|     0                  1                  2                  0              |
|                                                                             |
|o5 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i6 : isdFactorization K'                                                     |
|                                                                             |
|            6 3     2    5   2   2 3                                         |
|o6 = (true, -x  + 6x y + -x*y  + -y )                                        |
|            7            4       9                                           |
|                                                                             |
|o6 : Sequence                                                                |
+-----------------------------------------------------------------------------+

Ways to use randomLinearMF:
===========================

  * "randomLinearMF(ZZ,Ring)"
  * "randomLinearMF(ZZ,Ring,RingElement)"
  * "randomLinearMF(ZZ,Ring,Symbol)"

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

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

-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:5527:0.

randomTailMF -- Construct a matrix factorization from a high syzygy of a random module over a hypersurface
**********************************************************************************************************

  * Usage:
        randomTailMF(f, n, m, deg)
  * Inputs:
      * f, a ring element (Macaulay2Doc), A ring element
        representing a nonzerodivisor on the ambient ring
      * n, an integer (Macaulay2Doc), \( n \): The bound controlling
        the size of the presentation of the module
      * m, an integer (Macaulay2Doc), - \( m \): The bound
        controlling the size of the presentation of the module
      * deg, an integer (Macaulay2Doc), - \( d \): The degree bound
        on the generators
  * Optional inputs (Macaulay2Doc),:
      * WellDefined (missing documentation) => ..., default value true,
  * Outputs:
      * a ZZ/d graded factorization, A matrix
        factorization built from a high syzygy of a random coker presented as
        the cokernel of a map $R^m \to R^n$ with entries at most degree $d$.

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

If no degree is specified, then a random list of degrees with values ranging
from 1 to 10 is chosen. If no parameters on the presentation matrix are
specified, then random values between 1 and 10 are chosen. It is highly
recommended that one specifies bounds when working over a ring with more than 3
variables, since the computations may get out of hand if the presentation size
is randomly chosen to be too large. This function is mostly meant as a helper
function for generating interesting examples of matrix factorizations en masse.
Note that for certain parameters this function may take some time to run, since
the code will continue to generate examples until it obtains a well-defined
matrix factorization (if it does not do this, the ranks of the modules in
resulting factorization may not be equal).

+-----------------------------------------------------------------------------+
|i1 : Q = ZZ/101[x_1..x_3]                                                    |
|                                                                             |
|o1 = Q                                                                       |
|                                                                             |
|o1 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i2 : f = random(2,Q)                                                         |
|                                                                             |
|        2               2                        2                           |
|o2 = 24x  - 36x x  - 29x  - 30x x  + 19x x  + 19x                            |
|        1      1 2      2      1 3      2 3      3                           |
|                                                                             |
|o2 : Q                                                                       |
+-----------------------------------------------------------------------------+
|i3 : C = randomTailMF(f, 4, 8, 5)                                            |
|                                                                             |
|      8      8      8                                                        |
|o3 = Q  <-- Q  <-- Q                                                         |
|                                                                             |
|     0      1      0                                                         |
|                                                                             |
|o3 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i4 : C.dd                                                                    |
|                                                                             |
|          8                                                                  |
|o4 = 1 : Q  <----------------------------------------------------------------|
|               {4} | 46x_3             -41x_3           39x_3            -40x|
|               {4} | 4x_3              -15x_1+5x_3      32x_1-24x_3      4x_1|
|               {4} | -35x_2-10x_3      40x_2+42x_3      24x_1+4x_2+22x_3 -42x|
|               {4} | -13x_3            -15x_3           -14x_3           22x_|
|               {4} | -41x_2+12x_3      24x_1+22x_2-5x_3 50x_3            21x_|
|               {4} | -22x_3            33x_3            38x_3            22x_|
|               {4} | 24x_1+43x_2+21x_3 24x_2+44x_3      -27x_3           -42x|
|               {4} | 17x_3             15x_2+43x_3      -32x_2-50x_3     24x_|
|                                                                             |
|          8                                                                  |
|     0 : Q  <----------------------------------------------------------------|
|               {3} | 3x_3          21x_3             11x_3              -13x_|
|               {3} | 41x_3         42x_3             -16x_3             -12x_|
|               {3} | -4x_2+48x_3   -21x_2-5x_3       x_1-41x_2-46x_3    13x_2|
|               {3} | 41x_2+27x_3   x_2+25x_3         -6x_3              -16x_|
|               {3} | x_1+47x_2+x_3 30x_2+19x_3       -40x_2-48x_3       -28x_|
|               {3} | 45x_2-7x_3    5x_2+37x_3        27x_2+27x_3        x_1+4|
|               {3} | 16x_2-22x_3   41x_2-22x_3       -21x_2-48x_3       30x_2|
|               {3} | 17x_2-27x_3   -11x_1+34x_2+2x_3 -19x_1+22x_2+12x_3 49x_1|
|                                                                             |
|o4 : ZZdFactorizationMap                                                     |
|-----------------------------------------------------------------------------|
|                                                                             |
|-----------------------------------------------------------------------------|
|_3            24x_1+48x_2+47x_3 -47x_2+31x_3      -40x_2-31x_3       -8x_2-32|
|-29x_2-45x_3  -49x_2-28x_3      -40x_1+8x_2+23x_3 -33x_1+24x_2-29x_3 7x_1+25x|
|_2-14x_3      -5x_2-41x_3       -41x_2+25x_3      13x_2+32x_3        46x_2+35|
|3             31x_2-34x_3       24x_1-36x_2-23x_3 -41x_2-31x_3       -35x_2+4|
|3             26x_3             49x_3             -36x_3             9x_3    |
|3             20x_2+23x_3       11x_2-49x_3       24x_1-12x_2+19x_3  16x_2-48|
|_3            29x_3             41x_3             -13x_3             -46x_3  |
|1-40x_2+45x_3 26x_2-42x_3       40x_2-30x_3       33x_2+49x_3        -7x_2+27|
|                                                                             |
|                                                                             |
|-----------------------------------------------------------------------------|
|3           -x_2-35x_3       21x_3            x_1+43x_2-40x_3 -27x_3         |
|3           x_1+6x_2+21x_3   34x_3            48x_2+50x_3     30x_3          |
|-22x_3      -19x_2+33x_3     -21x_2-4x_3      -28x_2-8x_3     -20x_2-7x_3    |
|3           -3x_3            -35x_3           -47x_3          x_1+39x_3      |
|2+43x_3     44x_2+22x_3      -16x_2+19x_3     -44x_3          -5x_2+49x_3    |
|2x_2-27x_3  41x_2+49x_3      17x_2-32x_3      30x_3           16x_2+35x_3    |
|-22x_3      13x_2+48x_3      x_1-33x_2+14x_3  43x_3           10x_2+28x_3    |
|+16x_2+4x_3 31x_1-4x_2-41x_3 48x_1+7x_2+12x_3 -33x_3          -15x_1+28x_2-40|
|-----------------------------------------------------------------------------|
|              8                                                              |
|------------ Q  : 0                                                          |
|x_3      |                                                                   |
|_2+38x_3 |                                                                   |
|x_3      |                                                                   |
|4x_3     |                                                                   |
|         |                                                                   |
|x_3      |                                                                   |
|         |                                                                   |
|x_3      |                                                                   |
|                                                                             |
|         8                                                                   |
|------- Q  : 1                                                               |
|    |                                                                        |
|    |                                                                        |
|    |                                                                        |
|    |                                                                        |
|    |                                                                        |
|    |                                                                        |
|    |                                                                        |
|x_3 |                                                                        |
+-----------------------------------------------------------------------------+
|i5 : C.dd^2                                                                  |
|                                                                             |
|          8                                                                  |
|o5 = 0 : Q  <----------------------------------------------------------------|
|               {3} | 24x_1^2-36x_1x_2-29x_2^2-30x_1x_3+19x_2x_3+19x_3^2 0    |
|               {3} | 0                                                  24x_1|
|               {3} | 0                                                  0    |
|               {3} | 0                                                  0    |
|               {3} | 0                                                  0    |
|               {3} | 0                                                  0    |
|               {3} | 0                                                  0    |
|               {3} | 0                                                  0    |
|                                                                             |
|          8                                                                  |
|     1 : Q  <----------------------------------------------------------------|
|               {4} | 24x_1^2-36x_1x_2-29x_2^2-30x_1x_3+19x_2x_3+19x_3^2 0    |
|               {4} | 0                                                  24x_1|
|               {4} | 0                                                  0    |
|               {4} | 0                                                  0    |
|               {4} | 0                                                  0    |
|               {4} | 0                                                  0    |
|               {4} | 0                                                  0    |
|               {4} | 0                                                  0    |
|                                                                             |
|o5 : ZZdFactorizationMap                                                     |
|-----------------------------------------------------------------------------|
|                                                                             |
|-----------------------------------------------------------------------------|
|                                              0                              |
|^2-36x_1x_2-29x_2^2-30x_1x_3+19x_2x_3+19x_3^2 0                              |
|                                              24x_1^2-36x_1x_2-29x_2^2-30x_1x|
|                                              0                              |
|                                              0                              |
|                                              0                              |
|                                              0                              |
|                                              0                              |
|                                                                             |
|                                                                             |
|-----------------------------------------------------------------------------|
|                                              0                              |
|^2-36x_1x_2-29x_2^2-30x_1x_3+19x_2x_3+19x_3^2 0                              |
|                                              24x_1^2-36x_1x_2-29x_2^2-30x_1x|
|                                              0                              |
|                                              0                              |
|                                              0                              |
|                                              0                              |
|                                              0                              |
|-----------------------------------------------------------------------------|
|                                                                             |
|-----------------------------------------------------------------------------|
|                    0                                                  0     |
|                    0                                                  0     |
|_3+19x_2x_3+19x_3^2 0                                                  0     |
|                    24x_1^2-36x_1x_2-29x_2^2-30x_1x_3+19x_2x_3+19x_3^2 0     |
|                    0                                                  24x_1^|
|                    0                                                  0     |
|                    0                                                  0     |
|                    0                                                  0     |
|                                                                             |
|                                                                             |
|-----------------------------------------------------------------------------|
|                    0                                                  0     |
|                    0                                                  0     |
|_3+19x_2x_3+19x_3^2 0                                                  0     |
|                    24x_1^2-36x_1x_2-29x_2^2-30x_1x_3+19x_2x_3+19x_3^2 0     |
|                    0                                                  24x_1^|
|                    0                                                  0     |
|                    0                                                  0     |
|                    0                                                  0     |
|-----------------------------------------------------------------------------|
|                                                                             |
|-----------------------------------------------------------------------------|
|                                             0                               |
|                                             0                               |
|                                             0                               |
|                                             0                               |
|2-36x_1x_2-29x_2^2-30x_1x_3+19x_2x_3+19x_3^2 0                               |
|                                             24x_1^2-36x_1x_2-29x_2^2-30x_1x_|
|                                             0                               |
|                                             0                               |
|                                                                             |
|                                                                             |
|-----------------------------------------------------------------------------|
|                                             0                               |
|                                             0                               |
|                                             0                               |
|                                             0                               |
|2-36x_1x_2-29x_2^2-30x_1x_3+19x_2x_3+19x_3^2 0                               |
|                                             24x_1^2-36x_1x_2-29x_2^2-30x_1x_|
|                                             0                               |
|                                             0                               |
|-----------------------------------------------------------------------------|
|                                                                             |
|-----------------------------------------------------------------------------|
|                   0                                                  0      |
|                   0                                                  0      |
|                   0                                                  0      |
|                   0                                                  0      |
|                   0                                                  0      |
|3+19x_2x_3+19x_3^2 0                                                  0      |
|                   24x_1^2-36x_1x_2-29x_2^2-30x_1x_3+19x_2x_3+19x_3^2 0      |
|                   0                                                  24x_1^2|
|                                                                             |
|                                                                             |
|-----------------------------------------------------------------------------|
|                   0                                                  0      |
|                   0                                                  0      |
|                   0                                                  0      |
|                   0                                                  0      |
|                   0                                                  0      |
|3+19x_2x_3+19x_3^2 0                                                  0      |
|                   24x_1^2-36x_1x_2-29x_2^2-30x_1x_3+19x_2x_3+19x_3^2 0      |
|                   0                                                  24x_1^2|
|-----------------------------------------------------------------------------|
|                                                 8                           |
|----------------------------------------------- Q  : 0                       |
|                                            |                                |
|                                            |                                |
|                                            |                                |
|                                            |                                |
|                                            |                                |
|                                            |                                |
|                                            |                                |
|-36x_1x_2-29x_2^2-30x_1x_3+19x_2x_3+19x_3^2 |                                |
|                                                                             |
|                                                 8                           |
|----------------------------------------------- Q  : 1                       |
|                                            |                                |
|                                            |                                |
|                                            |                                |
|                                            |                                |
|                                            |                                |
|                                            |                                |
|                                            |                                |
|-36x_1x_2-29x_2^2-30x_1x_3+19x_2x_3+19x_3^2 |                                |
+-----------------------------------------------------------------------------+
|i6 : isWellDefined C                                                         |
|                                                                             |
|o6 = true                                                                    |
+-----------------------------------------------------------------------------+
|i7 : f == potential C                                                        |
|                                                                             |
|o7 = true                                                                    |
+-----------------------------------------------------------------------------+
|i8 : D = randomTailMF(f, 3, 5) --without specifying generator degrees        |
|                                                                             |
|      4      4      4                                                        |
|o8 = Q  <-- Q  <-- Q                                                         |
|                                                                             |
|     0      1      0                                                         |
|                                                                             |
|o8 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i9 : isdFactorization D                                                      |
|                                                                             |
|               2               2                        2                    |
|o9 = (true, 24x  - 36x x  - 29x  - 30x x  + 19x x  + 19x )                   |
|               1      1 2      2      1 3      2 3      3                    |
|                                                                             |
|o9 : Sequence                                                                |
+-----------------------------------------------------------------------------+
|i10 : S = ZZ/101[a,b,c];                                                     |
+-----------------------------------------------------------------------------+
|i11 : g = a^3 + b^3 + c^3;                                                   |
+-----------------------------------------------------------------------------+
|i12 : E = randomTailMF(g)  --without specifying presentation bounds or degree|
|                                                                             |
|       24      24      24                                                    |
|o12 = S   <-- S   <-- S                                                      |
|                                                                             |
|      0       1       0                                                      |
|                                                                             |
|o12 : ZZdFactorization                                                       |
|-----------------------------------------------------------------------------|
|bounds                                                                       |
+-----------------------------------------------------------------------------+
|i13 : isdFactorization E                                                     |
|                                                                             |
|              3    3    3                                                    |
|o13 = (true, a  + b  + c )                                                   |
|                                                                             |
|o13 : Sequence                                                               |
+-----------------------------------------------------------------------------+

If the user does not care about whether the output is a well-defined
factorization, use the option WellDefined => false.

+---------------------------------------------------------+
|i14 : E' = randomTailMF(g, 1, 2, 2, WellDefined => false)|
|                                                         |
|       1            1                                    |
|o14 = S  <-- 0 <-- S                                     |
|                                                         |
|      0      1     0                                     |
|                                                         |
|o14 : ZZdFactorization                                   |
+---------------------------------------------------------+

See also
========

  * tailMF -- Generate a ZZdFactorization from a module over a
    hypersurface ring

Ways to use randomTailMF:
=========================

  * "randomTailMF(RingElement)"
  * "randomTailMF(RingElement,ZZ,ZZ)"
  * "randomTailMF(RingElement,ZZ,ZZ,ZZ)"

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

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

-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:5966:0.

ring(ZZdFactorization) -- access the ring of a ZZ/d-graded factorization or a factorization map
***********************************************************************************************

  * Function: ring (Macaulay2Doc),
  * Usage:
        ring C
  * Inputs:
      * C, a ZZ/d graded factorization, or a
        ZZdFactorizationMap,
  * Outputs:
      * a ring (Macaulay2Doc),

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

Every ZZ/d-graded factorization or factorization map has a base ring.  This
function accesses that information.

+--------------------------------------------------+
|i1 : S = ZZ/101[a,b,c,d];                         |
+--------------------------------------------------+
|i2 : C = koszulMF({a,b,c,d}, a^2+b^2+c^2+d^2)     |
|                                                  |
|      8      8      8                             |
|o2 = S  <-- S  <-- S                              |
|                                                  |
|     0      1      0                              |
|                                                  |
|o2 : ZZdFactorization                             |
+--------------------------------------------------+
|i3 : C.dd                                         |
|                                                  |
|          8                                  8    |
|o3 = 1 : S  <------------------------------ S  : 0|
|               | d 0  0  0  c  0  b  a  |         |
|               | 0 d  0  0  0  c  a  -b |         |
|               | 0 0  d  0  b  a  -c 0  |         |
|               | 0 0  0  d  a  -b 0  -c |         |
|               | c 0  b  a  -d 0  0  0  |         |
|               | 0 c  a  -b 0  -d 0  0  |         |
|               | b a  -c 0  0  0  -d 0  |         |
|               | a -b 0  -c 0  0  0  -d |         |
|                                                  |
|          8                                  8    |
|     0 : S  <------------------------------ S  : 1|
|               | d 0  0  0  c  0  b  a  |         |
|               | 0 d  0  0  0  c  a  -b |         |
|               | 0 0  d  0  b  a  -c 0  |         |
|               | 0 0  0  d  a  -b 0  -c |         |
|               | c 0  b  a  -d 0  0  0  |         |
|               | 0 c  a  -b 0  -d 0  0  |         |
|               | b a  -c 0  0  0  -d 0  |         |
|               | a -b 0  -c 0  0  0  -d |         |
|                                                  |
|o3 : ZZdFactorizationMap                          |
+--------------------------------------------------+
|i4 : ring C                                       |
|                                                  |
|o4 = S                                            |
|                                                  |
|o4 : PolynomialRing                               |
+--------------------------------------------------+
|i5 : assert(ring C === S)                         |
+--------------------------------------------------+
|i6 : ring id_C                                    |
|                                                  |
|o6 = S                                            |
|                                                  |
|o6 : PolynomialRing                               |
+--------------------------------------------------+
|i7 : assert(ring id_C === S)                      |
+--------------------------------------------------+

See also
========

  * Basic invariants and properties, --
    information about accessing basic features
  * ring (Macaulay2Doc) -- get the associated ring of an object

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

  * ring(ZZdFactorization) -- access the
    ring of a ZZ/d-graded factorization or a factorization map
  * "ring(ZZdFactorizationMap)"
-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:430:0.

RingMap ** ZZdFactorization -- tensor a ZZ/d-graded factorization along a ring map
**********************************************************************************

  * Operator: ** (Macaulay2Doc),
  * Usage:
        phi ** C
        tensor(phi, C)
        S ** C
        C ** S
  * Inputs:
      * phi, a ring map (Macaulay2Doc), whose source is a ring
        $R$ and whose target is a ring $S$
      * C, a ZZ/d graded factorization, over the ring
        $R$
  * Outputs:
      * a ZZ/d graded factorization, over the ring $S$

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

These methods implement the base change of rings.  As input, one can either
give a ring map $\phi$, or the ring $S$ (when there is a canonical map from $R$
to $S$).

We illustrate the tensor product of a ZZ/d-graded factorization along a ring
map.

+------------------------------------------------------------+
|i1 : R = QQ[x,y,z]                                          |
|                                                            |
|o1 = R                                                      |
|                                                            |
|o1 : PolynomialRing                                         |
+------------------------------------------------------------+
|i2 : S = QQ[s,t]                                            |
|                                                            |
|o2 = S                                                      |
|                                                            |
|o2 : PolynomialRing                                         |
+------------------------------------------------------------+
|i3 : phi = map(S, R, {s, s+t, t})                           |
|                                                            |
|o3 = map (S, R, {s, s + t, t})                              |
|                                                            |
|o3 : RingMap S <-- R                                        |
+------------------------------------------------------------+
|i4 : Rf = R/(x^3+y^3+z^3)                                   |
|                                                            |
|o4 = Rf                                                     |
|                                                            |
|o4 : QuotientRing                                           |
+------------------------------------------------------------+
|i5 : C = tailMF ideal vars Rf                               |
|                                                            |
|      4      4      4                                       |
|o5 = R  <-- R  <-- R                                        |
|                                                            |
|     0      1      0                                        |
|                                                            |
|o5 : ZZdFactorization                                       |
+------------------------------------------------------------+
|i6 : D = phi**C                                             |
|                                                            |
|      4      4      4                                       |
|o6 = S  <-- S  <-- S                                        |
|                                                            |
|     0      1      0                                        |
|                                                            |
|o6 : ZZdFactorization                                       |
+------------------------------------------------------------+
|i7 : isdFactorization D                                     |
|                                                            |
|              3     2        2     3                        |
|o7 = (true, 2s  + 3s t + 3s*t  + 2t )                       |
|                                                            |
|o7 : Sequence                                               |
+------------------------------------------------------------+
|i8 : phi(potential C) == potential D                        |
|                                                            |
|o8 = true                                                   |
+------------------------------------------------------------+
|i9 : dd^D                                                   |
|                                                            |
|          4                                            4    |
|o9 = 1 : S  <---------------------------------------- S  : 0|
|               {5} | -s  -t2  s2+2st+t2 0         |         |
|               {5} | -t  s2   0         s2+2st+t2 |         |
|               {5} | s+t 0    s2        t2        |         |
|               {6} | 0   -s-t -t        s         |         |
|                                                            |
|          4                                            4    |
|     0 : S  <---------------------------------------- S  : 1|
|               {3} | -s2 -t2 s2+2st+t2 0          |         |
|               {4} | -t  s   0         -s2-2st-t2 |         |
|               {4} | s+t 0   s         -t2        |         |
|               {4} | 0   s+t t         s2         |         |
|                                                            |
|o9 : ZZdFactorizationMap                                    |
+------------------------------------------------------------+

If a ring is used rather than a ring map, then the implicit map from the
underlying ring of the complex to the given ring is used.

+-------------------------------------+
|i10 : use R;                         |
+-------------------------------------+
|i11 : A = R/(x^2+y^2+z^2);           |
+-------------------------------------+
|i12 : C ** A                         |
|                                     |
|       4      4      4               |
|o12 = A  <-- A  <-- A                |
|                                     |
|      0      1      0                |
|                                     |
|o12 : ZZdFactorization               |
+-------------------------------------+
|i13 : assert(map(A,R) ** C == C ** A)|
+-------------------------------------+

The commutativity of tensor product is witnessed as follows.

+------------------------------+
|i14 : assert(D == C ** phi)   |
+------------------------------+
|i15 : assert(C ** A == A ** C)|
+------------------------------+

When the modules in the factorization are not free modules, this is different
than the image of a factorization under a ring map.

+-----------------------------------------------------------------------------+
|i16 : use R                                                                  |
|                                                                             |
|o16 = R                                                                      |
|                                                                             |
|o16 : PolynomialRing                                                         |
+-----------------------------------------------------------------------------+
|i17 : C' = C ** coker matrix{{x^2+y^2+z^2}}                                  |
|                                                                             |
|o17 = cokernel {3} | x2+y2+z2 0        0        0        | <-- cokernel {5} ||
|               {4} | 0        x2+y2+z2 0        0        |              {5} ||
|               {4} | 0        0        x2+y2+z2 0        |              {5} ||
|               {4} | 0        0        0        x2+y2+z2 |              {6} ||
|                                                                             |
|      0                                                        1             |
|                                                                             |
|o17 : ZZdFactorization                                                       |
|-----------------------------------------------------------------------------|
|x2+y2+z2 0        0        0        | <-- cokernel {3} | x2+y2+z2 0          |
|0        x2+y2+z2 0        0        |              {4} | 0        x2+y2+z2   |
|0        0        x2+y2+z2 0        |              {4} | 0        0          |
|0        0        0        x2+y2+z2 |              {4} | 0        0          |
|                                                                             |
|                                          0                                  |
|-----------------------------------------------------------------------------|
|0        0        |                                                          |
|0        0        |                                                          |
|x2+y2+z2 0        |                                                          |
|0        x2+y2+z2 |                                                          |
+-----------------------------------------------------------------------------+
|i18 : D1 = phi C                                                             |
|                                                                             |
|       4      4      4                                                       |
|o18 = S  <-- S  <-- S                                                        |
|                                                                             |
|      0      1      0                                                        |
|                                                                             |
|o18 : ZZdFactorization                                                       |
+-----------------------------------------------------------------------------+
|i19 : isdFactorization D1                                                    |
|                                                                             |
|               3     2        2     3                                        |
|o19 = (true, 2s  + 3s t + 3s*t  + 2t )                                       |
|                                                                             |
|o19 : Sequence                                                               |
+-----------------------------------------------------------------------------+
|i20 : D2 = phi ** C'                                                         |
|                                                                             |
|o20 = cokernel {3} | 2s2+2st+2t2 0           0           0           | <--   |
|               {4} | 0           2s2+2st+2t2 0           0           |       |
|               {4} | 0           0           2s2+2st+2t2 0           |       |
|               {4} | 0           0           0           2s2+2st+2t2 |       |
|                                                                             |
|      0                                                                      |
|                                                                             |
|o20 : ZZdFactorization                                                       |
|-----------------------------------------------------------------------------|
|cokernel {5} | 2s2+2st+2t2 0           0           0           | <-- cokernel|
|         {5} | 0           2s2+2st+2t2 0           0           |             |
|         {5} | 0           0           2s2+2st+2t2 0           |             |
|         {6} | 0           0           0           2s2+2st+2t2 |             |
|                                                                             |
|1                                                                    0       |
|-----------------------------------------------------------------------------|
|{3} | 2s2+2st+2t2 0           0           0           |                      |
|{4} | 0           2s2+2st+2t2 0           0           |                      |
|{4} | 0           0           2s2+2st+2t2 0           |                      |
|{4} | 0           0           0           2s2+2st+2t2 |                      |
+-----------------------------------------------------------------------------+
|i21 : isdFactorization D2                                                    |
|                                                                             |
|              3                                                              |
|o21 = (true, t )                                                             |
|                                                                             |
|o21 : Sequence                                                               |
+-----------------------------------------------------------------------------+
|i22 : prune D1                                                               |
|                                                                             |
|       4      4      4                                                       |
|o22 = S  <-- S  <-- S                                                        |
|                                                                             |
|      0      1      0                                                        |
|                                                                             |
|o22 : ZZdFactorization                                                       |
+-----------------------------------------------------------------------------+
|i23 : prune D2                                                               |
|                                                                             |
|o23 = cokernel {3} | s2+st+t2 0        0        0        | <-- cokernel {5} ||
|               {4} | 0        s2+st+t2 0        0        |              {5} ||
|               {4} | 0        0        s2+st+t2 0        |              {5} ||
|               {4} | 0        0        0        s2+st+t2 |              {6} ||
|                                                                             |
|      0                                                        1             |
|                                                                             |
|o23 : ZZdFactorization                                                       |
|-----------------------------------------------------------------------------|
|s2+st+t2 0        0        0        | <-- cokernel {3} | s2+st+t2 0          |
|0        s2+st+t2 0        0        |              {4} | 0        s2+st+t2   |
|0        0        s2+st+t2 0        |              {4} | 0        0          |
|0        0        0        s2+st+t2 |              {4} | 0        0          |
|                                                                             |
|                                          0                                  |
|-----------------------------------------------------------------------------|
|0        0        |                                                          |
|0        0        |                                                          |
|s2+st+t2 0        |                                                          |
|0        s2+st+t2 |                                                          |
+-----------------------------------------------------------------------------+

When the ring map doesn't preserve homogeneity, the DegreeMap (Macaulay2Doc),
option is needed to determine the degrees of the image
free modules in the factorization.

+-----------------------------------------------------------------------------+
|i24 : R = ZZ/101[a..d];                                                      |
+-----------------------------------------------------------------------------+
|i25 : S = ZZ/101[s,t];                                                       |
+-----------------------------------------------------------------------------+
|i26 : f = map(S, R, {s^4, s^3*t, s*t^3, t^4}, DegreeMap => i -> 4*i)         |
|                                                                             |
|                   4   3      3   4                                          |
|o26 = map (S, R, {s , s t, s*t , t })                                        |
|                                                                             |
|o26 : RingMap S <-- R                                                        |
+-----------------------------------------------------------------------------+
|i27 : C = koszulMF({a,b,c,d}, a^2+b^2+c^2+d^2)                               |
|                                                                             |
|       8      8      8                                                       |
|o27 = R  <-- R  <-- R                                                        |
|                                                                             |
|      0      1      0                                                        |
|                                                                             |
|o27 : ZZdFactorization                                                       |
+-----------------------------------------------------------------------------+
|i28 : D = f ** C                                                             |
|                                                                             |
|       8      8      8                                                       |
|o28 = S  <-- S  <-- S                                                        |
|                                                                             |
|      0      1      0                                                        |
|                                                                             |
|o28 : ZZdFactorization                                                       |
+-----------------------------------------------------------------------------+
|i29 : isdFactorization D                                                     |
|                                                                             |
|              8    6 2    2 6    8                                           |
|o29 = (true, s  + s t  + s t  + t )                                          |
|                                                                             |
|o29 : Sequence                                                               |
+-----------------------------------------------------------------------------+
|i30 : potential D == f(potential C)                                          |
|                                                                             |
|o30 = true                                                                   |
+-----------------------------------------------------------------------------+
|i31 : D == f C                                                               |
|                                                                             |
|o31 = true                                                                   |
+-----------------------------------------------------------------------------+
|i32 : C1 = Hom(C, image vars R)                                              |
|                                                                             |
|o32 = image | d c b a 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|            | 0 0 0 0 d c b a 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|            | 0 0 0 0 0 0 0 0 d c b a 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|            | 0 0 0 0 0 0 0 0 0 0 0 0 d c b a 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|            | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 d c b a 0 0 0 0 0 0 0 0 0 0 0 0|
|            | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 d c b a 0 0 0 0 0 0 0 0|
|            | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 d c b a 0 0 0 0|
|            | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 d c b a|
|                                                                             |
|      0                                                                      |
|                                                                             |
|o32 : ZZdFactorization                                                       |
|-----------------------------------------------------------------------------|
|| <-- image | d c b a 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
||           | 0 0 0 0 d c b a 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
||           | 0 0 0 0 0 0 0 0 d c b a 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
||           | 0 0 0 0 0 0 0 0 0 0 0 0 d c b a 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
||           | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 d c b a 0 0 0 0 0 0 0 0 0 0 0 0|
||           | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 d c b a 0 0 0 0 0 0 0 0|
||           | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 d c b a 0 0 0 0|
||           | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 d c b a|
|                                                                             |
|      1                                                                      |
|-----------------------------------------------------------------------------|
|| <-- image | d c b a 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
||           | 0 0 0 0 d c b a 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
||           | 0 0 0 0 0 0 0 0 d c b a 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
||           | 0 0 0 0 0 0 0 0 0 0 0 0 d c b a 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
||           | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 d c b a 0 0 0 0 0 0 0 0 0 0 0 0|
||           | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 d c b a 0 0 0 0 0 0 0 0|
||           | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 d c b a 0 0 0 0|
||           | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 d c b a|
|                                                                             |
|      0                                                                      |
|-----------------------------------------------------------------------------|
||                                                                            |
||                                                                            |
||                                                                            |
||                                                                            |
||                                                                            |
||                                                                            |
||                                                                            |
||                                                                            |
+-----------------------------------------------------------------------------+
|i33 : D1 = f ** C1                                                           |
|                                                                             |
|o33 = cokernel {4} | st3 s3t 0    s4  0    0    0   0   0    0   0    0      |
|               {4} | -t4 0   s3t  0   s4   0    0   0   0    0   0    0      |
|               {4} | 0   -t4 -st3 0   0    s4   0   0   0    0   0    0      |
|               {4} | 0   0   0    -t4 -st3 -s3t 0   0   0    0   0    0      |
|               {4} | 0   0   0    0   0    0    st3 s3t 0    s4  0    0      |
|               {4} | 0   0   0    0   0    0    -t4 0   s3t  0   s4   0      |
|               {4} | 0   0   0    0   0    0    0   -t4 -st3 0   0    s4     |
|               {4} | 0   0   0    0   0    0    0   0   0    -t4 -st3 -s3t   |
|               {4} | 0   0   0    0   0    0    0   0   0    0   0    0      |
|               {4} | 0   0   0    0   0    0    0   0   0    0   0    0      |
|               {4} | 0   0   0    0   0    0    0   0   0    0   0    0      |
|               {4} | 0   0   0    0   0    0    0   0   0    0   0    0      |
|               {4} | 0   0   0    0   0    0    0   0   0    0   0    0      |
|               {4} | 0   0   0    0   0    0    0   0   0    0   0    0      |
|               {4} | 0   0   0    0   0    0    0   0   0    0   0    0      |
|               {4} | 0   0   0    0   0    0    0   0   0    0   0    0      |
|               {4} | 0   0   0    0   0    0    0   0   0    0   0    0      |
|               {4} | 0   0   0    0   0    0    0   0   0    0   0    0      |
|               {4} | 0   0   0    0   0    0    0   0   0    0   0    0      |
|               {4} | 0   0   0    0   0    0    0   0   0    0   0    0      |
|               {4} | 0   0   0    0   0    0    0   0   0    0   0    0      |
|               {4} | 0   0   0    0   0    0    0   0   0    0   0    0      |
|               {4} | 0   0   0    0   0    0    0   0   0    0   0    0      |
|               {4} | 0   0   0    0   0    0    0   0   0    0   0    0      |
|               {4} | 0   0   0    0   0    0    0   0   0    0   0    0      |
|               {4} | 0   0   0    0   0    0    0   0   0    0   0    0      |
|               {4} | 0   0   0    0   0    0    0   0   0    0   0    0      |
|               {4} | 0   0   0    0   0    0    0   0   0    0   0    0      |
|               {4} | 0   0   0    0   0    0    0   0   0    0   0    0      |
|               {4} | 0   0   0    0   0    0    0   0   0    0   0    0      |
|               {4} | 0   0   0    0   0    0    0   0   0    0   0    0      |
|               {4} | 0   0   0    0   0    0    0   0   0    0   0    0      |
|                                                                             |
|      0                                                                      |
|                                                                             |
|o33 : ZZdFactorization                                                       |
|-----------------------------------------------------------------------------|
|0   0   0    0   0    0    0   0   0    0   0    0    0   0   0    0   0     |
|0   0   0    0   0    0    0   0   0    0   0    0    0   0   0    0   0     |
|0   0   0    0   0    0    0   0   0    0   0    0    0   0   0    0   0     |
|0   0   0    0   0    0    0   0   0    0   0    0    0   0   0    0   0     |
|0   0   0    0   0    0    0   0   0    0   0    0    0   0   0    0   0     |
|0   0   0    0   0    0    0   0   0    0   0    0    0   0   0    0   0     |
|0   0   0    0   0    0    0   0   0    0   0    0    0   0   0    0   0     |
|0   0   0    0   0    0    0   0   0    0   0    0    0   0   0    0   0     |
|st3 s3t 0    s4  0    0    0   0   0    0   0    0    0   0   0    0   0     |
|-t4 0   s3t  0   s4   0    0   0   0    0   0    0    0   0   0    0   0     |
|0   -t4 -st3 0   0    s4   0   0   0    0   0    0    0   0   0    0   0     |
|0   0   0    -t4 -st3 -s3t 0   0   0    0   0    0    0   0   0    0   0     |
|0   0   0    0   0    0    st3 s3t 0    s4  0    0    0   0   0    0   0     |
|0   0   0    0   0    0    -t4 0   s3t  0   s4   0    0   0   0    0   0     |
|0   0   0    0   0    0    0   -t4 -st3 0   0    s4   0   0   0    0   0     |
|0   0   0    0   0    0    0   0   0    -t4 -st3 -s3t 0   0   0    0   0     |
|0   0   0    0   0    0    0   0   0    0   0    0    st3 s3t 0    s4  0     |
|0   0   0    0   0    0    0   0   0    0   0    0    -t4 0   s3t  0   s4    |
|0   0   0    0   0    0    0   0   0    0   0    0    0   -t4 -st3 0   0     |
|0   0   0    0   0    0    0   0   0    0   0    0    0   0   0    -t4 -st3  |
|0   0   0    0   0    0    0   0   0    0   0    0    0   0   0    0   0     |
|0   0   0    0   0    0    0   0   0    0   0    0    0   0   0    0   0     |
|0   0   0    0   0    0    0   0   0    0   0    0    0   0   0    0   0     |
|0   0   0    0   0    0    0   0   0    0   0    0    0   0   0    0   0     |
|0   0   0    0   0    0    0   0   0    0   0    0    0   0   0    0   0     |
|0   0   0    0   0    0    0   0   0    0   0    0    0   0   0    0   0     |
|0   0   0    0   0    0    0   0   0    0   0    0    0   0   0    0   0     |
|0   0   0    0   0    0    0   0   0    0   0    0    0   0   0    0   0     |
|0   0   0    0   0    0    0   0   0    0   0    0    0   0   0    0   0     |
|0   0   0    0   0    0    0   0   0    0   0    0    0   0   0    0   0     |
|0   0   0    0   0    0    0   0   0    0   0    0    0   0   0    0   0     |
|0   0   0    0   0    0    0   0   0    0   0    0    0   0   0    0   0     |
|                                                                             |
|                                                                             |
|-----------------------------------------------------------------------------|
|0    0   0   0    0   0    0    0   0   0    0   0    0    0   0   0    0    |
|0    0   0   0    0   0    0    0   0   0    0   0    0    0   0   0    0    |
|0    0   0   0    0   0    0    0   0   0    0   0    0    0   0   0    0    |
|0    0   0   0    0   0    0    0   0   0    0   0    0    0   0   0    0    |
|0    0   0   0    0   0    0    0   0   0    0   0    0    0   0   0    0    |
|0    0   0   0    0   0    0    0   0   0    0   0    0    0   0   0    0    |
|0    0   0   0    0   0    0    0   0   0    0   0    0    0   0   0    0    |
|0    0   0   0    0   0    0    0   0   0    0   0    0    0   0   0    0    |
|0    0   0   0    0   0    0    0   0   0    0   0    0    0   0   0    0    |
|0    0   0   0    0   0    0    0   0   0    0   0    0    0   0   0    0    |
|0    0   0   0    0   0    0    0   0   0    0   0    0    0   0   0    0    |
|0    0   0   0    0   0    0    0   0   0    0   0    0    0   0   0    0    |
|0    0   0   0    0   0    0    0   0   0    0   0    0    0   0   0    0    |
|0    0   0   0    0   0    0    0   0   0    0   0    0    0   0   0    0    |
|0    0   0   0    0   0    0    0   0   0    0   0    0    0   0   0    0    |
|0    0   0   0    0   0    0    0   0   0    0   0    0    0   0   0    0    |
|0    0   0   0    0   0    0    0   0   0    0   0    0    0   0   0    0    |
|0    0   0   0    0   0    0    0   0   0    0   0    0    0   0   0    0    |
|s4   0   0   0    0   0    0    0   0   0    0   0    0    0   0   0    0    |
|-s3t 0   0   0    0   0    0    0   0   0    0   0    0    0   0   0    0    |
|0    st3 s3t 0    s4  0    0    0   0   0    0   0    0    0   0   0    0    |
|0    -t4 0   s3t  0   s4   0    0   0   0    0   0    0    0   0   0    0    |
|0    0   -t4 -st3 0   0    s4   0   0   0    0   0    0    0   0   0    0    |
|0    0   0   0    -t4 -st3 -s3t 0   0   0    0   0    0    0   0   0    0    |
|0    0   0   0    0   0    0    st3 s3t 0    s4  0    0    0   0   0    0    |
|0    0   0   0    0   0    0    -t4 0   s3t  0   s4   0    0   0   0    0    |
|0    0   0   0    0   0    0    0   -t4 -st3 0   0    s4   0   0   0    0    |
|0    0   0   0    0   0    0    0   0   0    -t4 -st3 -s3t 0   0   0    0    |
|0    0   0   0    0   0    0    0   0   0    0   0    0    st3 s3t 0    s4   |
|0    0   0   0    0   0    0    0   0   0    0   0    0    -t4 0   s3t  0    |
|0    0   0   0    0   0    0    0   0   0    0   0    0    0   -t4 -st3 0    |
|0    0   0   0    0   0    0    0   0   0    0   0    0    0   0   0    -t4  |
|                                                                             |
|                                                                             |
|-----------------------------------------------------------------------------|
|0    0    | <-- cokernel {4} | st3 s3t 0    s4  0    0    0   0   0    0     |
|0    0    |              {4} | -t4 0   s3t  0   s4   0    0   0   0    0     |
|0    0    |              {4} | 0   -t4 -st3 0   0    s4   0   0   0    0     |
|0    0    |              {4} | 0   0   0    -t4 -st3 -s3t 0   0   0    0     |
|0    0    |              {4} | 0   0   0    0   0    0    st3 s3t 0    s4    |
|0    0    |              {4} | 0   0   0    0   0    0    -t4 0   s3t  0     |
|0    0    |              {4} | 0   0   0    0   0    0    0   -t4 -st3 0     |
|0    0    |              {4} | 0   0   0    0   0    0    0   0   0    -t4   |
|0    0    |              {4} | 0   0   0    0   0    0    0   0   0    0     |
|0    0    |              {4} | 0   0   0    0   0    0    0   0   0    0     |
|0    0    |              {4} | 0   0   0    0   0    0    0   0   0    0     |
|0    0    |              {4} | 0   0   0    0   0    0    0   0   0    0     |
|0    0    |              {4} | 0   0   0    0   0    0    0   0   0    0     |
|0    0    |              {4} | 0   0   0    0   0    0    0   0   0    0     |
|0    0    |              {4} | 0   0   0    0   0    0    0   0   0    0     |
|0    0    |              {4} | 0   0   0    0   0    0    0   0   0    0     |
|0    0    |              {4} | 0   0   0    0   0    0    0   0   0    0     |
|0    0    |              {4} | 0   0   0    0   0    0    0   0   0    0     |
|0    0    |              {4} | 0   0   0    0   0    0    0   0   0    0     |
|0    0    |              {4} | 0   0   0    0   0    0    0   0   0    0     |
|0    0    |              {4} | 0   0   0    0   0    0    0   0   0    0     |
|0    0    |              {4} | 0   0   0    0   0    0    0   0   0    0     |
|0    0    |              {4} | 0   0   0    0   0    0    0   0   0    0     |
|0    0    |              {4} | 0   0   0    0   0    0    0   0   0    0     |
|0    0    |              {4} | 0   0   0    0   0    0    0   0   0    0     |
|0    0    |              {4} | 0   0   0    0   0    0    0   0   0    0     |
|0    0    |              {4} | 0   0   0    0   0    0    0   0   0    0     |
|0    0    |              {4} | 0   0   0    0   0    0    0   0   0    0     |
|0    0    |              {4} | 0   0   0    0   0    0    0   0   0    0     |
|s4   0    |              {4} | 0   0   0    0   0    0    0   0   0    0     |
|0    s4   |              {4} | 0   0   0    0   0    0    0   0   0    0     |
|-st3 -s3t |              {4} | 0   0   0    0   0    0    0   0   0    0     |
|                                                                             |
|                1                                                            |
|-----------------------------------------------------------------------------|
|0    0    0   0   0    0   0    0    0   0   0    0   0    0    0   0   0    |
|0    0    0   0   0    0   0    0    0   0   0    0   0    0    0   0   0    |
|0    0    0   0   0    0   0    0    0   0   0    0   0    0    0   0   0    |
|0    0    0   0   0    0   0    0    0   0   0    0   0    0    0   0   0    |
|0    0    0   0   0    0   0    0    0   0   0    0   0    0    0   0   0    |
|s4   0    0   0   0    0   0    0    0   0   0    0   0    0    0   0   0    |
|0    s4   0   0   0    0   0    0    0   0   0    0   0    0    0   0   0    |
|-st3 -s3t 0   0   0    0   0    0    0   0   0    0   0    0    0   0   0    |
|0    0    st3 s3t 0    s4  0    0    0   0   0    0   0    0    0   0   0    |
|0    0    -t4 0   s3t  0   s4   0    0   0   0    0   0    0    0   0   0    |
|0    0    0   -t4 -st3 0   0    s4   0   0   0    0   0    0    0   0   0    |
|0    0    0   0   0    -t4 -st3 -s3t 0   0   0    0   0    0    0   0   0    |
|0    0    0   0   0    0   0    0    st3 s3t 0    s4  0    0    0   0   0    |
|0    0    0   0   0    0   0    0    -t4 0   s3t  0   s4   0    0   0   0    |
|0    0    0   0   0    0   0    0    0   -t4 -st3 0   0    s4   0   0   0    |
|0    0    0   0   0    0   0    0    0   0   0    -t4 -st3 -s3t 0   0   0    |
|0    0    0   0   0    0   0    0    0   0   0    0   0    0    st3 s3t 0    |
|0    0    0   0   0    0   0    0    0   0   0    0   0    0    -t4 0   s3t  |
|0    0    0   0   0    0   0    0    0   0   0    0   0    0    0   -t4 -st3 |
|0    0    0   0   0    0   0    0    0   0   0    0   0    0    0   0   0    |
|0    0    0   0   0    0   0    0    0   0   0    0   0    0    0   0   0    |
|0    0    0   0   0    0   0    0    0   0   0    0   0    0    0   0   0    |
|0    0    0   0   0    0   0    0    0   0   0    0   0    0    0   0   0    |
|0    0    0   0   0    0   0    0    0   0   0    0   0    0    0   0   0    |
|0    0    0   0   0    0   0    0    0   0   0    0   0    0    0   0   0    |
|0    0    0   0   0    0   0    0    0   0   0    0   0    0    0   0   0    |
|0    0    0   0   0    0   0    0    0   0   0    0   0    0    0   0   0    |
|0    0    0   0   0    0   0    0    0   0   0    0   0    0    0   0   0    |
|0    0    0   0   0    0   0    0    0   0   0    0   0    0    0   0   0    |
|0    0    0   0   0    0   0    0    0   0   0    0   0    0    0   0   0    |
|0    0    0   0   0    0   0    0    0   0   0    0   0    0    0   0   0    |
|0    0    0   0   0    0   0    0    0   0   0    0   0    0    0   0   0    |
|                                                                             |
|                                                                             |
|-----------------------------------------------------------------------------|
|0   0    0    0   0   0    0   0    0    0   0   0    0   0    0    0   0    |
|0   0    0    0   0   0    0   0    0    0   0   0    0   0    0    0   0    |
|0   0    0    0   0   0    0   0    0    0   0   0    0   0    0    0   0    |
|0   0    0    0   0   0    0   0    0    0   0   0    0   0    0    0   0    |
|0   0    0    0   0   0    0   0    0    0   0   0    0   0    0    0   0    |
|0   0    0    0   0   0    0   0    0    0   0   0    0   0    0    0   0    |
|0   0    0    0   0   0    0   0    0    0   0   0    0   0    0    0   0    |
|0   0    0    0   0   0    0   0    0    0   0   0    0   0    0    0   0    |
|0   0    0    0   0   0    0   0    0    0   0   0    0   0    0    0   0    |
|0   0    0    0   0   0    0   0    0    0   0   0    0   0    0    0   0    |
|0   0    0    0   0   0    0   0    0    0   0   0    0   0    0    0   0    |
|0   0    0    0   0   0    0   0    0    0   0   0    0   0    0    0   0    |
|0   0    0    0   0   0    0   0    0    0   0   0    0   0    0    0   0    |
|0   0    0    0   0   0    0   0    0    0   0   0    0   0    0    0   0    |
|0   0    0    0   0   0    0   0    0    0   0   0    0   0    0    0   0    |
|0   0    0    0   0   0    0   0    0    0   0   0    0   0    0    0   0    |
|s4  0    0    0   0   0    0   0    0    0   0   0    0   0    0    0   0    |
|0   s4   0    0   0   0    0   0    0    0   0   0    0   0    0    0   0    |
|0   0    s4   0   0   0    0   0    0    0   0   0    0   0    0    0   0    |
|-t4 -st3 -s3t 0   0   0    0   0    0    0   0   0    0   0    0    0   0    |
|0   0    0    st3 s3t 0    s4  0    0    0   0   0    0   0    0    0   0    |
|0   0    0    -t4 0   s3t  0   s4   0    0   0   0    0   0    0    0   0    |
|0   0    0    0   -t4 -st3 0   0    s4   0   0   0    0   0    0    0   0    |
|0   0    0    0   0   0    -t4 -st3 -s3t 0   0   0    0   0    0    0   0    |
|0   0    0    0   0   0    0   0    0    st3 s3t 0    s4  0    0    0   0    |
|0   0    0    0   0   0    0   0    0    -t4 0   s3t  0   s4   0    0   0    |
|0   0    0    0   0   0    0   0    0    0   -t4 -st3 0   0    s4   0   0    |
|0   0    0    0   0   0    0   0    0    0   0   0    -t4 -st3 -s3t 0   0    |
|0   0    0    0   0   0    0   0    0    0   0   0    0   0    0    st3 s3t  |
|0   0    0    0   0   0    0   0    0    0   0   0    0   0    0    -t4 0    |
|0   0    0    0   0   0    0   0    0    0   0   0    0   0    0    0   -t4  |
|0   0    0    0   0   0    0   0    0    0   0   0    0   0    0    0   0    |
|                                                                             |
|                                                                             |
|-----------------------------------------------------------------------------|
|0    0   0    0    | <-- cokernel {4} | st3 s3t 0    s4  0    0    0   0     |
|0    0   0    0    |              {4} | -t4 0   s3t  0   s4   0    0   0     |
|0    0   0    0    |              {4} | 0   -t4 -st3 0   0    s4   0   0     |
|0    0   0    0    |              {4} | 0   0   0    -t4 -st3 -s3t 0   0     |
|0    0   0    0    |              {4} | 0   0   0    0   0    0    st3 s3t   |
|0    0   0    0    |              {4} | 0   0   0    0   0    0    -t4 0     |
|0    0   0    0    |              {4} | 0   0   0    0   0    0    0   -t4   |
|0    0   0    0    |              {4} | 0   0   0    0   0    0    0   0     |
|0    0   0    0    |              {4} | 0   0   0    0   0    0    0   0     |
|0    0   0    0    |              {4} | 0   0   0    0   0    0    0   0     |
|0    0   0    0    |              {4} | 0   0   0    0   0    0    0   0     |
|0    0   0    0    |              {4} | 0   0   0    0   0    0    0   0     |
|0    0   0    0    |              {4} | 0   0   0    0   0    0    0   0     |
|0    0   0    0    |              {4} | 0   0   0    0   0    0    0   0     |
|0    0   0    0    |              {4} | 0   0   0    0   0    0    0   0     |
|0    0   0    0    |              {4} | 0   0   0    0   0    0    0   0     |
|0    0   0    0    |              {4} | 0   0   0    0   0    0    0   0     |
|0    0   0    0    |              {4} | 0   0   0    0   0    0    0   0     |
|0    0   0    0    |              {4} | 0   0   0    0   0    0    0   0     |
|0    0   0    0    |              {4} | 0   0   0    0   0    0    0   0     |
|0    0   0    0    |              {4} | 0   0   0    0   0    0    0   0     |
|0    0   0    0    |              {4} | 0   0   0    0   0    0    0   0     |
|0    0   0    0    |              {4} | 0   0   0    0   0    0    0   0     |
|0    0   0    0    |              {4} | 0   0   0    0   0    0    0   0     |
|0    0   0    0    |              {4} | 0   0   0    0   0    0    0   0     |
|0    0   0    0    |              {4} | 0   0   0    0   0    0    0   0     |
|0    0   0    0    |              {4} | 0   0   0    0   0    0    0   0     |
|0    0   0    0    |              {4} | 0   0   0    0   0    0    0   0     |
|0    s4  0    0    |              {4} | 0   0   0    0   0    0    0   0     |
|s3t  0   s4   0    |              {4} | 0   0   0    0   0    0    0   0     |
|-st3 0   0    s4   |              {4} | 0   0   0    0   0    0    0   0     |
|0    -t4 -st3 -s3t |              {4} | 0   0   0    0   0    0    0   0     |
|                                                                             |
|                         0                                                   |
|-----------------------------------------------------------------------------|
|0    0   0    0    0   0   0    0   0    0    0   0   0    0   0    0    0   |
|0    0   0    0    0   0   0    0   0    0    0   0   0    0   0    0    0   |
|0    0   0    0    0   0   0    0   0    0    0   0   0    0   0    0    0   |
|0    0   0    0    0   0   0    0   0    0    0   0   0    0   0    0    0   |
|0    s4  0    0    0   0   0    0   0    0    0   0   0    0   0    0    0   |
|s3t  0   s4   0    0   0   0    0   0    0    0   0   0    0   0    0    0   |
|-st3 0   0    s4   0   0   0    0   0    0    0   0   0    0   0    0    0   |
|0    -t4 -st3 -s3t 0   0   0    0   0    0    0   0   0    0   0    0    0   |
|0    0   0    0    st3 s3t 0    s4  0    0    0   0   0    0   0    0    0   |
|0    0   0    0    -t4 0   s3t  0   s4   0    0   0   0    0   0    0    0   |
|0    0   0    0    0   -t4 -st3 0   0    s4   0   0   0    0   0    0    0   |
|0    0   0    0    0   0   0    -t4 -st3 -s3t 0   0   0    0   0    0    0   |
|0    0   0    0    0   0   0    0   0    0    st3 s3t 0    s4  0    0    0   |
|0    0   0    0    0   0   0    0   0    0    -t4 0   s3t  0   s4   0    0   |
|0    0   0    0    0   0   0    0   0    0    0   -t4 -st3 0   0    s4   0   |
|0    0   0    0    0   0   0    0   0    0    0   0   0    -t4 -st3 -s3t 0   |
|0    0   0    0    0   0   0    0   0    0    0   0   0    0   0    0    st3 |
|0    0   0    0    0   0   0    0   0    0    0   0   0    0   0    0    -t4 |
|0    0   0    0    0   0   0    0   0    0    0   0   0    0   0    0    0   |
|0    0   0    0    0   0   0    0   0    0    0   0   0    0   0    0    0   |
|0    0   0    0    0   0   0    0   0    0    0   0   0    0   0    0    0   |
|0    0   0    0    0   0   0    0   0    0    0   0   0    0   0    0    0   |
|0    0   0    0    0   0   0    0   0    0    0   0   0    0   0    0    0   |
|0    0   0    0    0   0   0    0   0    0    0   0   0    0   0    0    0   |
|0    0   0    0    0   0   0    0   0    0    0   0   0    0   0    0    0   |
|0    0   0    0    0   0   0    0   0    0    0   0   0    0   0    0    0   |
|0    0   0    0    0   0   0    0   0    0    0   0   0    0   0    0    0   |
|0    0   0    0    0   0   0    0   0    0    0   0   0    0   0    0    0   |
|0    0   0    0    0   0   0    0   0    0    0   0   0    0   0    0    0   |
|0    0   0    0    0   0   0    0   0    0    0   0   0    0   0    0    0   |
|0    0   0    0    0   0   0    0   0    0    0   0   0    0   0    0    0   |
|0    0   0    0    0   0   0    0   0    0    0   0   0    0   0    0    0   |
|-----------------------------------------------------------------------------|
|0   0    0   0    0    0   0   0    0   0    0    0   0   0    0   0    0    |
|0   0    0   0    0    0   0   0    0   0    0    0   0   0    0   0    0    |
|0   0    0   0    0    0   0   0    0   0    0    0   0   0    0   0    0    |
|0   0    0   0    0    0   0   0    0   0    0    0   0   0    0   0    0    |
|0   0    0   0    0    0   0   0    0   0    0    0   0   0    0   0    0    |
|0   0    0   0    0    0   0   0    0   0    0    0   0   0    0   0    0    |
|0   0    0   0    0    0   0   0    0   0    0    0   0   0    0   0    0    |
|0   0    0   0    0    0   0   0    0   0    0    0   0   0    0   0    0    |
|0   0    0   0    0    0   0   0    0   0    0    0   0   0    0   0    0    |
|0   0    0   0    0    0   0   0    0   0    0    0   0   0    0   0    0    |
|0   0    0   0    0    0   0   0    0   0    0    0   0   0    0   0    0    |
|0   0    0   0    0    0   0   0    0   0    0    0   0   0    0   0    0    |
|0   0    0   0    0    0   0   0    0   0    0    0   0   0    0   0    0    |
|0   0    0   0    0    0   0   0    0   0    0    0   0   0    0   0    0    |
|0   0    0   0    0    0   0   0    0   0    0    0   0   0    0   0    0    |
|0   0    0   0    0    0   0   0    0   0    0    0   0   0    0   0    0    |
|s3t 0    s4  0    0    0   0   0    0   0    0    0   0   0    0   0    0    |
|0   s3t  0   s4   0    0   0   0    0   0    0    0   0   0    0   0    0    |
|-t4 -st3 0   0    s4   0   0   0    0   0    0    0   0   0    0   0    0    |
|0   0    -t4 -st3 -s3t 0   0   0    0   0    0    0   0   0    0   0    0    |
|0   0    0   0    0    st3 s3t 0    s4  0    0    0   0   0    0   0    0    |
|0   0    0   0    0    -t4 0   s3t  0   s4   0    0   0   0    0   0    0    |
|0   0    0   0    0    0   -t4 -st3 0   0    s4   0   0   0    0   0    0    |
|0   0    0   0    0    0   0   0    -t4 -st3 -s3t 0   0   0    0   0    0    |
|0   0    0   0    0    0   0   0    0   0    0    st3 s3t 0    s4  0    0    |
|0   0    0   0    0    0   0   0    0   0    0    -t4 0   s3t  0   s4   0    |
|0   0    0   0    0    0   0   0    0   0    0    0   -t4 -st3 0   0    s4   |
|0   0    0   0    0    0   0   0    0   0    0    0   0   0    -t4 -st3 -s3t |
|0   0    0   0    0    0   0   0    0   0    0    0   0   0    0   0    0    |
|0   0    0   0    0    0   0   0    0   0    0    0   0   0    0   0    0    |
|0   0    0   0    0    0   0   0    0   0    0    0   0   0    0   0    0    |
|0   0    0   0    0    0   0   0    0   0    0    0   0   0    0   0    0    |
|-----------------------------------------------------------------------------|
|0   0   0    0   0    0    |                                                 |
|0   0   0    0   0    0    |                                                 |
|0   0   0    0   0    0    |                                                 |
|0   0   0    0   0    0    |                                                 |
|0   0   0    0   0    0    |                                                 |
|0   0   0    0   0    0    |                                                 |
|0   0   0    0   0    0    |                                                 |
|0   0   0    0   0    0    |                                                 |
|0   0   0    0   0    0    |                                                 |
|0   0   0    0   0    0    |                                                 |
|0   0   0    0   0    0    |                                                 |
|0   0   0    0   0    0    |                                                 |
|0   0   0    0   0    0    |                                                 |
|0   0   0    0   0    0    |                                                 |
|0   0   0    0   0    0    |                                                 |
|0   0   0    0   0    0    |                                                 |
|0   0   0    0   0    0    |                                                 |
|0   0   0    0   0    0    |                                                 |
|0   0   0    0   0    0    |                                                 |
|0   0   0    0   0    0    |                                                 |
|0   0   0    0   0    0    |                                                 |
|0   0   0    0   0    0    |                                                 |
|0   0   0    0   0    0    |                                                 |
|0   0   0    0   0    0    |                                                 |
|0   0   0    0   0    0    |                                                 |
|0   0   0    0   0    0    |                                                 |
|0   0   0    0   0    0    |                                                 |
|0   0   0    0   0    0    |                                                 |
|st3 s3t 0    s4  0    0    |                                                 |
|-t4 0   s3t  0   s4   0    |                                                 |
|0   -t4 -st3 0   0    s4   |                                                 |
|0   0   0    -t4 -st3 -s3t |                                                 |
+-----------------------------------------------------------------------------+
|i34 : isdFactorization C1                                                    |
|                                                                             |
|o34 = (false, no potential)                                                  |
|                                                                             |
|o34 : Sequence                                                               |
+-----------------------------------------------------------------------------+
|i35 : isdFactorization D1                                                    |
|                                                                             |
|o35 = (false, no potential)                                                  |
|                                                                             |
|o35 : Sequence                                                               |
+-----------------------------------------------------------------------------+

See also
========

  * RingMap ** ZZdFactorizationMap,
    -- tensor a map of ZZ/d-graded factorizations along a ring map
  * RingMap ZZdFactorization -- apply a ring
    map

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

  * "Ring ** ZZdFactorization"
  * RingMap ** ZZdFactorization, --
    tensor a ZZ/d-graded factorization along a ring map
  * "ZZdFactorization ** Ring"
  * "ZZdFactorization ** RingMap"
-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:1990:0.

RingMap ** ZZdFactorizationMap -- tensor a map of ZZ/d-graded factorizations along a ring map
*********************************************************************************************

  * Operator: ** (Macaulay2Doc),
  * Usage:
        phi ** f
        tensor(phi, f)
        S ** f
        f ** S
  * Inputs:
      * phi, a ring map (Macaulay2Doc), whose source is a ring
        $R$, and whose target is a ring $S$
      * f, a map of ZZ/d-graded factorizations,
        over the ring $R$
  * Outputs:
      * a map of ZZ/d-graded factorizations, over
        the ring $S$

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

These methods implement the base change of rings.  As input, one can either
give a ring map $\phi$, or the ring $S$ (when there is a canonical map from $R$
to $S$).

We illustrate the tensor product of a map of ZZ/d-graded factorizations along a
ring map.

+-----------------------------------------------------------------------------+
|i1 : R = QQ[x,y,z]                                                           |
|                                                                             |
|o1 = R                                                                       |
|                                                                             |
|o1 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i2 : S = QQ[s,t]                                                             |
|                                                                             |
|o2 = S                                                                       |
|                                                                             |
|o2 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i3 : phi = map(S, R, {s, s+t, t})                                            |
|                                                                             |
|o3 = map (S, R, {s, s + t, t})                                               |
|                                                                             |
|o3 : RingMap S <-- R                                                         |
+-----------------------------------------------------------------------------+
|i4 : Rf = R/(x^3+y^3+z^3)                                                    |
|                                                                             |
|o4 = Rf                                                                      |
|                                                                             |
|o4 : QuotientRing                                                            |
+-----------------------------------------------------------------------------+
|i5 : C = tailMF ideal vars Rf                                                |
|                                                                             |
|      4      4      4                                                        |
|o5 = R  <-- R  <-- R                                                         |
|                                                                             |
|     0      1      0                                                         |
|                                                                             |
|o5 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i6 : D = phi ** C                                                            |
|                                                                             |
|      4      4      4                                                        |
|o6 = S  <-- S  <-- S                                                         |
|                                                                             |
|     0      1      0                                                         |
|                                                                             |
|o6 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i7 : isdFactorization D                                                      |
|                                                                             |
|              3     2        2     3                                         |
|o7 = (true, 2s  + 3s t + 3s*t  + 2t )                                        |
|                                                                             |
|o7 : Sequence                                                                |
+-----------------------------------------------------------------------------+
|i8 : phi(potential C) == potential D                                         |
|                                                                             |
|o8 = true                                                                    |
+-----------------------------------------------------------------------------+
|i9 : dd^D                                                                    |
|                                                                             |
|          4                                            4                     |
|o9 = 1 : S  <---------------------------------------- S  : 0                 |
|               {5} | -s  -t2  s2+2st+t2 0         |                          |
|               {5} | -t  s2   0         s2+2st+t2 |                          |
|               {5} | s+t 0    s2        t2        |                          |
|               {6} | 0   -s-t -t        s         |                          |
|                                                                             |
|          4                                            4                     |
|     0 : S  <---------------------------------------- S  : 1                 |
|               {3} | -s2 -t2 s2+2st+t2 0          |                          |
|               {4} | -t  s   0         -s2-2st-t2 |                          |
|               {4} | s+t 0   s         -t2        |                          |
|               {4} | 0   s+t t         s2         |                          |
|                                                                             |
|o9 : ZZdFactorizationMap                                                     |
+-----------------------------------------------------------------------------+
|i10 : f = randomFactorizationMap(C, C)                                       |
|                                                                             |
|           4                                                               4 |
|o10 = 0 : R  <----------------------------------------------------------- R  |
|                {3} | 9/2 9/4x+3/4y+7/4z 7/3x+7y+3/7z 2/9x+3/10y+3/7z |      |
|                {4} | 0   7/9            6/7          5               |      |
|                {4} | 0   7/10           6            10/9            |      |
|                {4} | 0   7/10           5/4          10              |      |
|                                                                             |
|           4                                           4                     |
|      1 : R  <--------------------------------------- R  : 1                 |
|                {5} | 3/2 5   7/2 5/7x+5/9y+5/3z  |                          |
|                {5} | 7/8 2/5 2/5 1/10x+4/3y+3/7z |                          |
|                {5} | 5/6 5/3 6/5 9/10x+4/7y+5/9z |                          |
|                {6} | 0   0   0   5/9             |                          |
|                                                                             |
|o10 : ZZdFactorizationMap                                                    |
|-----------------------------------------------------------------------------|
|: 0                                                                          |
+-----------------------------------------------------------------------------+
|i11 : assert isWellDefined f                                                 |
+-----------------------------------------------------------------------------+
|i12 : g = phi ** f                                                           |
|                                                                             |
|           4                                                     4           |
|o12 = 0 : S  <------------------------------------------------- S  : 0       |
|                {3} | 9/2 3s+5/2t 28/3s+52/7t 47/90s+51/70t |                |
|                {4} | 0   7/9     6/7         5             |                |
|                {4} | 0   7/10    6           10/9          |                |
|                {4} | 0   7/10    5/4         10            |                |
|                                                                             |
|           4                                          4                      |
|      1 : S  <-------------------------------------- S  : 1                  |
|                {5} | 3/2 5   7/2 80/63s+20/9t   |                           |
|                {5} | 7/8 2/5 2/5 43/30s+37/21t  |                           |
|                {5} | 5/6 5/3 6/5 103/70s+71/63t |                           |
|                {6} | 0   0   0   5/9            |                           |
|                                                                             |
|o12 : ZZdFactorizationMap                                                    |
+-----------------------------------------------------------------------------+
|i13 : assert isWellDefined g                                                 |
+-----------------------------------------------------------------------------+
|i14 : dd^(source g)                                                          |
|                                                                             |
|           4                                            4                    |
|o14 = 1 : S  <---------------------------------------- S  : 0                |
|                {5} | -s  -t2  s2+2st+t2 0         |                         |
|                {5} | -t  s2   0         s2+2st+t2 |                         |
|                {5} | s+t 0    s2        t2        |                         |
|                {6} | 0   -s-t -t        s         |                         |
|                                                                             |
|           4                                            4                    |
|      0 : S  <---------------------------------------- S  : 1                |
|                {3} | -s2 -t2 s2+2st+t2 0          |                         |
|                {4} | -t  s   0         -s2-2st-t2 |                         |
|                {4} | s+t 0   s         -t2        |                         |
|                {4} | 0   s+t t         s2         |                         |
|                                                                             |
|o14 : ZZdFactorizationMap                                                    |
+-----------------------------------------------------------------------------+
|i15 : dd^(target g)                                                          |
|                                                                             |
|           4                                            4                    |
|o15 = 1 : S  <---------------------------------------- S  : 0                |
|                {5} | -s  -t2  s2+2st+t2 0         |                         |
|                {5} | -t  s2   0         s2+2st+t2 |                         |
|                {5} | s+t 0    s2        t2        |                         |
|                {6} | 0   -s-t -t        s         |                         |
|                                                                             |
|           4                                            4                    |
|      0 : S  <---------------------------------------- S  : 1                |
|                {3} | -s2 -t2 s2+2st+t2 0          |                         |
|                {4} | -t  s   0         -s2-2st-t2 |                         |
|                {4} | s+t 0   s         -t2        |                         |
|                {4} | 0   s+t t         s2         |                         |
|                                                                             |
|o15 : ZZdFactorizationMap                                                    |
+-----------------------------------------------------------------------------+

See also
========

  * RingMap ** ZZdFactorization, --
    tensor a ZZ/d-graded factorization along a ring map
  * RingMap ZZdFactorizationMap -- apply a
    ring map to a map of ZZ/d-graded factorizations

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

  * "Ring ** ZZdFactorizationMap"
  * RingMap ** ZZdFactorizationMap,
    -- tensor a map of ZZ/d-graded factorizations along a ring map
  * "ZZdFactorizationMap ** Ring"
  * "ZZdFactorizationMap ** RingMap"
-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:3992:0.

RingMap ZZdFactorization -- apply a ring map
********************************************

  * Operator: SPACE (Macaulay2Doc),
  * Usage:
        phi C
  * Inputs:
      * phi, a ring map (Macaulay2Doc), whose source is a ring
        $R$, and whose target is a ring $S$
      * C, a ZZ/d graded factorization, over the ring
        $R$
  * Outputs:
      * a ZZ/d graded factorization, over the ring $S$

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

We illustrate the image of a ZZ/d-graded factorization under a ring map.

+------------------------------------------------------------+
|i1 : R = QQ[x,y,z]                                          |
|                                                            |
|o1 = R                                                      |
|                                                            |
|o1 : PolynomialRing                                         |
+------------------------------------------------------------+
|i2 : S = QQ[s,t]                                            |
|                                                            |
|o2 = S                                                      |
|                                                            |
|o2 : PolynomialRing                                         |
+------------------------------------------------------------+
|i3 : phi = map(S, R, {s, s+t, t})                           |
|                                                            |
|o3 = map (S, R, {s, s + t, t})                              |
|                                                            |
|o3 : RingMap S <-- R                                        |
+------------------------------------------------------------+
|i4 : Rf = R/(x^3+y^3+z^3)                                   |
|                                                            |
|o4 = Rf                                                     |
|                                                            |
|o4 : QuotientRing                                           |
+------------------------------------------------------------+
|i5 : C = tailMF ideal vars Rf                               |
|                                                            |
|      4      4      4                                       |
|o5 = R  <-- R  <-- R                                        |
|                                                            |
|     0      1      0                                        |
|                                                            |
|o5 : ZZdFactorization                                       |
+------------------------------------------------------------+
|i6 : D = phi C                                              |
|                                                            |
|      4      4      4                                       |
|o6 = S  <-- S  <-- S                                        |
|                                                            |
|     0      1      0                                        |
|                                                            |
|o6 : ZZdFactorization                                       |
+------------------------------------------------------------+
|i7 : isdFactorization D                                     |
|                                                            |
|              3     2        2     3                        |
|o7 = (true, 2s  + 3s t + 3s*t  + 2t )                       |
|                                                            |
|o7 : Sequence                                               |
+------------------------------------------------------------+
|i8 : phi(potential C) == potential D                        |
|                                                            |
|o8 = true                                                   |
+------------------------------------------------------------+
|i9 : dd^D                                                   |
|                                                            |
|          4                                            4    |
|o9 = 1 : S  <---------------------------------------- S  : 0|
|               {5} | -s  -t2  s2+2st+t2 0         |         |
|               {5} | -t  s2   0         s2+2st+t2 |         |
|               {5} | s+t 0    s2        t2        |         |
|               {6} | 0   -s-t -t        s         |         |
|                                                            |
|          4                                            4    |
|     0 : S  <---------------------------------------- S  : 1|
|               {3} | -s2 -t2 s2+2st+t2 0          |         |
|               {4} | -t  s   0         -s2-2st-t2 |         |
|               {4} | s+t 0   s         -t2        |         |
|               {4} | 0   s+t t         s2         |         |
|                                                            |
|o9 : ZZdFactorizationMap                                    |
+------------------------------------------------------------+

When the ring map doesn't preserve homogeneity, the DegreeMap (Macaulay2Doc),
option is needed to determine the degrees of the image
free modules in the factorizations.

+----------------------------------------------------------------------+
|i10 : R = ZZ/101[a..d]                                                |
|                                                                      |
|o10 = R                                                               |
|                                                                      |
|o10 : PolynomialRing                                                  |
+----------------------------------------------------------------------+
|i11 : S = ZZ/101[s,t]                                                 |
|                                                                      |
|o11 = S                                                               |
|                                                                      |
|o11 : PolynomialRing                                                  |
+----------------------------------------------------------------------+
|i12 : phi = map(S, R, {s^4, s^3*t, s*t^3, t^4}, DegreeMap => i -> 4*i)|
|                                                                      |
|                   4   3      3   4                                   |
|o12 = map (S, R, {s , s t, s*t , t })                                 |
|                                                                      |
|o12 : RingMap S <-- R                                                 |
+----------------------------------------------------------------------+
|i13 : C = koszulMF({a,b,c,d}, a^2+b^2+c^2+d^2)                        |
|                                                                      |
|       8      8      8                                                |
|o13 = R  <-- R  <-- R                                                 |
|                                                                      |
|      0      1      0                                                 |
|                                                                      |
|o13 : ZZdFactorization                                                |
+----------------------------------------------------------------------+
|i14 : D = phi C                                                       |
|                                                                      |
|       8      8      8                                                |
|o14 = S  <-- S  <-- S                                                 |
|                                                                      |
|      0      1      0                                                 |
|                                                                      |
|o14 : ZZdFactorization                                                |
+----------------------------------------------------------------------+
|i15 : isdFactorization D                                              |
|                                                                      |
|              8    6 2    2 6    8                                    |
|o15 = (true, s  + s t  + s t  + t )                                   |
|                                                                      |
|o15 : Sequence                                                        |
+----------------------------------------------------------------------+
|i16 : potential D == phi(potential C)                                 |
|                                                                      |
|o16 = true                                                            |
+----------------------------------------------------------------------+

Caveat
======

Every term in the ZZ/d-graded factorization must be free or a submodule of a
free module. Otherwise, use tensor(RingMap,ZZdFactorization).

See also
========

  * RingMap ZZdFactorizationMap -- apply a
    ring map to a map of ZZ/d-graded factorizations
  * RingMap ** ZZdFactorization, --
    tensor a ZZ/d-graded factorization along a ring map

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

  * RingMap ZZdFactorization -- apply a ring
    map
-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:1901:0.

RingMap ZZdFactorizationMap -- apply a ring map to a map of ZZ/d-graded factorizations
**************************************************************************************

  * Operator: SPACE (Macaulay2Doc),
  * Usage:
        phi f
  * Inputs:
      * phi, a ring map (Macaulay2Doc), whose source is a ring
        $R$, and whose target is a ring $S$
      * f, a map of ZZ/d-graded factorizations,
        over the ring $R$
  * Outputs:
      * a map of ZZ/d-graded factorizations, over
        the ring $S$

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

We illustrate the image of a ZZ/d-graded factorization map along a ring map.

+-----------------------------------------------------------------------------+
|i1 : R = QQ[x,y,z]                                                           |
|                                                                             |
|o1 = R                                                                       |
|                                                                             |
|o1 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i2 : S = QQ[s,t]                                                             |
|                                                                             |
|o2 = S                                                                       |
|                                                                             |
|o2 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i3 : phi = map(S, R, {s, s+t, t})                                            |
|                                                                             |
|o3 = map (S, R, {s, s + t, t})                                               |
|                                                                             |
|o3 : RingMap S <-- R                                                         |
+-----------------------------------------------------------------------------+
|i4 : Rf = R/(x^3+y^3+z^3)                                                    |
|                                                                             |
|o4 = Rf                                                                      |
|                                                                             |
|o4 : QuotientRing                                                            |
+-----------------------------------------------------------------------------+
|i5 : C = tailMF ideal vars Rf                                                |
|                                                                             |
|      4      4      4                                                        |
|o5 = R  <-- R  <-- R                                                         |
|                                                                             |
|     0      1      0                                                         |
|                                                                             |
|o5 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i6 : D = phi C                                                               |
|                                                                             |
|      4      4      4                                                        |
|o6 = S  <-- S  <-- S                                                         |
|                                                                             |
|     0      1      0                                                         |
|                                                                             |
|o6 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i7 : isdFactorization D                                                      |
|                                                                             |
|              3     2        2     3                                         |
|o7 = (true, 2s  + 3s t + 3s*t  + 2t )                                        |
|                                                                             |
|o7 : Sequence                                                                |
+-----------------------------------------------------------------------------+
|i8 : phi(potential C) == potential D                                         |
|                                                                             |
|o8 = true                                                                    |
+-----------------------------------------------------------------------------+
|i9 : dd^D                                                                    |
|                                                                             |
|          4                                            4                     |
|o9 = 1 : S  <---------------------------------------- S  : 0                 |
|               {5} | -s  -t2  s2+2st+t2 0         |                          |
|               {5} | -t  s2   0         s2+2st+t2 |                          |
|               {5} | s+t 0    s2        t2        |                          |
|               {6} | 0   -s-t -t        s         |                          |
|                                                                             |
|          4                                            4                     |
|     0 : S  <---------------------------------------- S  : 1                 |
|               {3} | -s2 -t2 s2+2st+t2 0          |                          |
|               {4} | -t  s   0         -s2-2st-t2 |                          |
|               {4} | s+t 0   s         -t2        |                          |
|               {4} | 0   s+t t         s2         |                          |
|                                                                             |
|o9 : ZZdFactorizationMap                                                     |
+-----------------------------------------------------------------------------+
|i10 : f = randomFactorizationMap(C, C)                                       |
|                                                                             |
|           4                                                               4 |
|o10 = 0 : R  <----------------------------------------------------------- R  |
|                {3} | 9/2 9/4x+3/4y+7/4z 7/3x+7y+3/7z 2/9x+3/10y+3/7z |      |
|                {4} | 0   7/9            6/7          5               |      |
|                {4} | 0   7/10           6            10/9            |      |
|                {4} | 0   7/10           5/4          10              |      |
|                                                                             |
|           4                                           4                     |
|      1 : R  <--------------------------------------- R  : 1                 |
|                {5} | 3/2 5   7/2 5/7x+5/9y+5/3z  |                          |
|                {5} | 7/8 2/5 2/5 1/10x+4/3y+3/7z |                          |
|                {5} | 5/6 5/3 6/5 9/10x+4/7y+5/9z |                          |
|                {6} | 0   0   0   5/9             |                          |
|                                                                             |
|o10 : ZZdFactorizationMap                                                    |
|-----------------------------------------------------------------------------|
|: 0                                                                          |
+-----------------------------------------------------------------------------+
|i11 : assert isWellDefined f                                                 |
+-----------------------------------------------------------------------------+
|i12 : g = phi f                                                              |
|                                                                             |
|           4                                                     4           |
|o12 = 0 : S  <------------------------------------------------- S  : 0       |
|                {3} | 9/2 3s+5/2t 28/3s+52/7t 47/90s+51/70t |                |
|                {4} | 0   7/9     6/7         5             |                |
|                {4} | 0   7/10    6           10/9          |                |
|                {4} | 0   7/10    5/4         10            |                |
|                                                                             |
|           4                                          4                      |
|      1 : S  <-------------------------------------- S  : 1                  |
|                {5} | 3/2 5   7/2 80/63s+20/9t   |                           |
|                {5} | 7/8 2/5 2/5 43/30s+37/21t  |                           |
|                {5} | 5/6 5/3 6/5 103/70s+71/63t |                           |
|                {6} | 0   0   0   5/9            |                           |
|                                                                             |
|o12 : ZZdFactorizationMap                                                    |
+-----------------------------------------------------------------------------+
|i13 : assert isWellDefined g                                                 |
+-----------------------------------------------------------------------------+
|i14 : dd^(source g)                                                          |
|                                                                             |
|           4                                            4                    |
|o14 = 1 : S  <---------------------------------------- S  : 0                |
|                {5} | -s  -t2  s2+2st+t2 0         |                         |
|                {5} | -t  s2   0         s2+2st+t2 |                         |
|                {5} | s+t 0    s2        t2        |                         |
|                {6} | 0   -s-t -t        s         |                         |
|                                                                             |
|           4                                            4                    |
|      0 : S  <---------------------------------------- S  : 1                |
|                {3} | -s2 -t2 s2+2st+t2 0          |                         |
|                {4} | -t  s   0         -s2-2st-t2 |                         |
|                {4} | s+t 0   s         -t2        |                         |
|                {4} | 0   s+t t         s2         |                         |
|                                                                             |
|o14 : ZZdFactorizationMap                                                    |
+-----------------------------------------------------------------------------+
|i15 : dd^(target g)                                                          |
|                                                                             |
|           4                                            4                    |
|o15 = 1 : S  <---------------------------------------- S  : 0                |
|                {5} | -s  -t2  s2+2st+t2 0         |                         |
|                {5} | -t  s2   0         s2+2st+t2 |                         |
|                {5} | s+t 0    s2        t2        |                         |
|                {6} | 0   -s-t -t        s         |                         |
|                                                                             |
|           4                                            4                    |
|      0 : S  <---------------------------------------- S  : 1                |
|                {3} | -s2 -t2 s2+2st+t2 0          |                         |
|                {4} | -t  s   0         -s2-2st-t2 |                         |
|                {4} | s+t 0   s         -t2        |                         |
|                {4} | 0   s+t t         s2         |                         |
|                                                                             |
|o15 : ZZdFactorizationMap                                                    |
+-----------------------------------------------------------------------------+

See also
========

  * RingMap ZZdFactorization -- apply a ring
    map
  * RingMap ** ZZdFactorizationMap,
    -- tensor a map of ZZ/d-graded factorizations along a ring map

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

  * RingMap ZZdFactorizationMap -- apply a
    ring map to a map of ZZ/d-graded factorizations
-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:3941:0.

rk1MCM2gen -- Construct every possible rank 1, 2-generated maximal Cohen-Macaulay module over the cubic Fermat hypersurface in 4 variables
******************************************************************************************************************************************

  * Usage:
        rk1MCM2gen(L,d)
  * Inputs:
      * L, a list (Macaulay2Doc), any permutation of the set
        {2,3,4}
      * d, an integer (Macaulay2Doc), any integer specifying the
        characteristic of the ambient field
  * Outputs:
      * a ZZ/d graded factorization, A matrix
        factorization corresponding to a rank 1, 2-generated maximal
        Cohen-Macaulay module over the cubic Fermat hypersurface in 4
        variables.

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

This method constructs every possible rank 1, 2-generated maximal
Cohen-Macaulay module (up to isomorphism) over the cubic Fermat hypersurface in
4 variables. It is known that such MCM modules are parametrized by all
permutations of $\{ 2, 3 ,4 \}$.

+-----------------------------------------------------------------------------+
|i1 : H = hashTable for i in permutations {2,3,4} list i => rk1MCM2gen(i,0);  |
+-----------------------------------------------------------------------------+
|i2 : H#{2,3,4}.dd                                                            |
|                                                                             |
|         /    QQ[x ..x , a, b]    \                                          |
|         |        1   4           |2                                         |
|o2 = 1 : |------------------------|                                          |
|         |  2           2         |                                          |
|         \(a  - a + 1, b  - b + 1)/                                          |
|                                                                             |
|         /    QQ[x ..x , a, b]    \                                          |
|         |        1   4           |2                                         |
|     0 : |------------------------|                                          |
|         |  2           2         |                                          |
|         \(a  - a + 1, b  - b + 1)/                                          |
|                                                                             |
|o2 : ZZdFactorizationMap                                                     |
|-----------------------------------------------------------------------------|
|                                                                   /    QQ[x |
|                                                                   |        1|
|<----------------------------------------------------------------- |---------|
|   {2} | x_1x_4a+x_4^2a+x_1^2-x_4^2 x_2x_3b+x_3^2b+x_2^2-x_3^2 |   |  2      |
|   {3} | x_3b-x_2                   -x_4a+x_1                  |   \(a  - a +|
|                                                                             |
|                                                   /    QQ[x ..x , a, b]    \|
|                                                   |        1   4           ||
|<------------------------------------------------- |------------------------||
|   {3} | -x_4a+x_1 -x_2x_3b-x_3^2b-x_2^2+x_3^2 |   |  2           2         ||
|   {3} | -x_3b+x_2 x_1x_4a+x_4^2a+x_1^2-x_4^2  |   \(a  - a + 1, b  - b + 1)/|
|-----------------------------------------------------------------------------|
|..x , a, b]    \                                                             |
|   4           |2                                                            |
|---------------|  : 0                                                        |
|     2         |                                                             |
| 1, b  - b + 1)/                                                             |
|                                                                             |
|                                                                             |
|2                                                                            |
|  : 1                                                                        |
+-----------------------------------------------------------------------------+
|i3 : H#{3,2,4}.dd                                                            |
|                                                                             |
|         /    QQ[x ..x , a, b]    \                                          |
|         |        1   4           |2                                         |
|o3 = 1 : |------------------------|                                          |
|         |  2           2         |                                          |
|         \(a  - a + 1, b  - b + 1)/                                          |
|                                                                             |
|         /    QQ[x ..x , a, b]    \                                          |
|         |        1   4           |2                                         |
|     0 : |------------------------|                                          |
|         |  2           2         |                                          |
|         \(a  - a + 1, b  - b + 1)/                                          |
|                                                                             |
|o3 : ZZdFactorizationMap                                                     |
|-----------------------------------------------------------------------------|
|                                                                   /    QQ[x |
|                                                                   |        1|
|<----------------------------------------------------------------- |---------|
|   {2} | x_1x_4a+x_4^2a+x_1^2-x_4^2 x_2^2b+x_2x_3b-x_2^2+x_3^2 |   |  2      |
|   {3} | x_2b-x_3                   -x_4a+x_1                  |   \(a  - a +|
|                                                                             |
|                                                   /    QQ[x ..x , a, b]    \|
|                                                   |        1   4           ||
|<------------------------------------------------- |------------------------||
|   {3} | -x_4a+x_1 -x_2^2b-x_2x_3b+x_2^2-x_3^2 |   |  2           2         ||
|   {3} | -x_2b+x_3 x_1x_4a+x_4^2a+x_1^2-x_4^2  |   \(a  - a + 1, b  - b + 1)/|
|-----------------------------------------------------------------------------|
|..x , a, b]    \                                                             |
|   4           |2                                                            |
|---------------|  : 0                                                        |
|     2         |                                                             |
| 1, b  - b + 1)/                                                             |
|                                                                             |
|                                                                             |
|2                                                                            |
|  : 1                                                                        |
+-----------------------------------------------------------------------------+
|i4 : H#{2,4,3}.dd                                                            |
|                                                                             |
|         /    QQ[x ..x , a, b]    \                                          |
|         |        1   4           |2                                         |
|o4 = 1 : |------------------------|                                          |
|         |  2           2         |                                          |
|         \(a  - a + 1, b  - b + 1)/                                          |
|                                                                             |
|         /    QQ[x ..x , a, b]    \                                          |
|         |        1   4           |2                                         |
|     0 : |------------------------|                                          |
|         |  2           2         |                                          |
|         \(a  - a + 1, b  - b + 1)/                                          |
|                                                                             |
|o4 : ZZdFactorizationMap                                                     |
|-----------------------------------------------------------------------------|
|                                                                   /    QQ[x |
|                                                                   |        1|
|<----------------------------------------------------------------- |---------|
|   {2} | x_1x_3a+x_3^2a+x_1^2-x_3^2 x_2x_4b+x_4^2b+x_2^2-x_4^2 |   |  2      |
|   {3} | x_4b-x_2                   -x_3a+x_1                  |   \(a  - a +|
|                                                                             |
|                                                   /    QQ[x ..x , a, b]    \|
|                                                   |        1   4           ||
|<------------------------------------------------- |------------------------||
|   {3} | -x_3a+x_1 -x_2x_4b-x_4^2b-x_2^2+x_4^2 |   |  2           2         ||
|   {3} | -x_4b+x_2 x_1x_3a+x_3^2a+x_1^2-x_3^2  |   \(a  - a + 1, b  - b + 1)/|
|-----------------------------------------------------------------------------|
|..x , a, b]    \                                                             |
|   4           |2                                                            |
|---------------|  : 0                                                        |
|     2         |                                                             |
| 1, b  - b + 1)/                                                             |
|                                                                             |
|                                                                             |
|2                                                                            |
|  : 1                                                                        |
+-----------------------------------------------------------------------------+
|i5 : H#{4,3,2}.dd                                                            |
|                                                                             |
|         /    QQ[x ..x , a, b]    \                                          |
|         |        1   4           |2                                         |
|o5 = 1 : |------------------------|                                          |
|         |  2           2         |                                          |
|         \(a  - a + 1, b  - b + 1)/                                          |
|                                                                             |
|         /    QQ[x ..x , a, b]    \                                          |
|         |        1   4           |2                                         |
|     0 : |------------------------|                                          |
|         |  2           2         |                                          |
|         \(a  - a + 1, b  - b + 1)/                                          |
|                                                                             |
|o5 : ZZdFactorizationMap                                                     |
|-----------------------------------------------------------------------------|
|                                                                   /    QQ[x |
|                                                                   |        1|
|<----------------------------------------------------------------- |---------|
|   {2} | x_1x_2a+x_2^2a+x_1^2-x_2^2 x_3^2b+x_3x_4b-x_3^2+x_4^2 |   |  2      |
|   {3} | x_3b-x_4                   -x_2a+x_1                  |   \(a  - a +|
|                                                                             |
|                                                   /    QQ[x ..x , a, b]    \|
|                                                   |        1   4           ||
|<------------------------------------------------- |------------------------||
|   {3} | -x_2a+x_1 -x_3^2b-x_3x_4b+x_3^2-x_4^2 |   |  2           2         ||
|   {3} | -x_3b+x_4 x_1x_2a+x_2^2a+x_1^2-x_2^2  |   \(a  - a + 1, b  - b + 1)/|
|-----------------------------------------------------------------------------|
|..x , a, b]    \                                                             |
|   4           |2                                                            |
|---------------|  : 0                                                        |
|     2         |                                                             |
| 1, b  - b + 1)/                                                             |
|                                                                             |
|                                                                             |
|2                                                                            |
|  : 1                                                                        |
+-----------------------------------------------------------------------------+
|i6 : H#{4,2,3}.dd                                                            |
|                                                                             |
|         /    QQ[x ..x , a, b]    \                                          |
|         |        1   4           |2                                         |
|o6 = 1 : |------------------------|                                          |
|         |  2           2         |                                          |
|         \(a  - a + 1, b  - b + 1)/                                          |
|                                                                             |
|         /    QQ[x ..x , a, b]    \                                          |
|         |        1   4           |2                                         |
|     0 : |------------------------|                                          |
|         |  2           2         |                                          |
|         \(a  - a + 1, b  - b + 1)/                                          |
|                                                                             |
|o6 : ZZdFactorizationMap                                                     |
|-----------------------------------------------------------------------------|
|                                                                   /    QQ[x |
|                                                                   |        1|
|<----------------------------------------------------------------- |---------|
|   {2} | x_1x_3a+x_3^2a+x_1^2-x_3^2 x_2^2b+x_2x_4b-x_2^2+x_4^2 |   |  2      |
|   {3} | x_2b-x_4                   -x_3a+x_1                  |   \(a  - a +|
|                                                                             |
|                                                   /    QQ[x ..x , a, b]    \|
|                                                   |        1   4           ||
|<------------------------------------------------- |------------------------||
|   {3} | -x_3a+x_1 -x_2^2b-x_2x_4b+x_2^2-x_4^2 |   |  2           2         ||
|   {3} | -x_2b+x_4 x_1x_3a+x_3^2a+x_1^2-x_3^2  |   \(a  - a + 1, b  - b + 1)/|
|-----------------------------------------------------------------------------|
|..x , a, b]    \                                                             |
|   4           |2                                                            |
|---------------|  : 0                                                        |
|     2         |                                                             |
| 1, b  - b + 1)/                                                             |
|                                                                             |
|                                                                             |
|2                                                                            |
|  : 1                                                                        |
+-----------------------------------------------------------------------------+
|i7 : H#{3,4,2}.dd                                                            |
|                                                                             |
|         /    QQ[x ..x , a, b]    \                                          |
|         |        1   4           |2                                         |
|o7 = 1 : |------------------------|                                          |
|         |  2           2         |                                          |
|         \(a  - a + 1, b  - b + 1)/                                          |
|                                                                             |
|         /    QQ[x ..x , a, b]    \                                          |
|         |        1   4           |2                                         |
|     0 : |------------------------|                                          |
|         |  2           2         |                                          |
|         \(a  - a + 1, b  - b + 1)/                                          |
|                                                                             |
|o7 : ZZdFactorizationMap                                                     |
|-----------------------------------------------------------------------------|
|                                                                   /    QQ[x |
|                                                                   |        1|
|<----------------------------------------------------------------- |---------|
|   {2} | x_1x_2a+x_2^2a+x_1^2-x_2^2 x_3x_4b+x_4^2b+x_3^2-x_4^2 |   |  2      |
|   {3} | x_4b-x_3                   -x_2a+x_1                  |   \(a  - a +|
|                                                                             |
|                                                   /    QQ[x ..x , a, b]    \|
|                                                   |        1   4           ||
|<------------------------------------------------- |------------------------||
|   {3} | -x_2a+x_1 -x_3x_4b-x_4^2b-x_3^2+x_4^2 |   |  2           2         ||
|   {3} | -x_4b+x_3 x_1x_2a+x_2^2a+x_1^2-x_2^2  |   \(a  - a + 1, b  - b + 1)/|
|-----------------------------------------------------------------------------|
|..x , a, b]    \                                                             |
|   4           |2                                                            |
|---------------|  : 0                                                        |
|     2         |                                                             |
| 1, b  - b + 1)/                                                             |
|                                                                             |
|                                                                             |
|2                                                                            |
|  : 1                                                                        |
+-----------------------------------------------------------------------------+
|i8 : for i in permutations {2,3,4} list potential H#i                        |
|                                                                             |
|       3    3    3    3   3    3    3    3   3    3    3    3   3    3    3  |
|o8 = {x  + x  + x  + x , x  + x  + x  + x , x  + x  + x  + x , x  + x  + x  +|
|       1    2    3    4   1    2    3    4   1    2    3    4   1    2    3  |
|     ------------------------------------------------------------------------|
|      3   3    3    3    3   3    3    3    3                                |
|     x , x  + x  + x  + x , x  + x  + x  + x }                               |
|      4   1    2    3    4   1    2    3    4                                |
|                                                                             |
|o8 : List                                                                    |
+-----------------------------------------------------------------------------+

See also
========

  * mooreMF -- Constructs the matrix factorization of the Moore
    matrix and its adjoint
  * adjointFactorization -- Constructs matrix
    factorization of a determinant of a matrix
  * Preprogrammed examples and operations
    -- Information about the basic constructors

Ways to use rk1MCM2gen:
=======================

  * "rk1MCM2gen(List)"
  * "rk1MCM2gen(List,ZZ)"

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

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

-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:6241:0.

source(ZZdFactorizationMap) -- get the source of a map of ZZ/d-graded factorizations
************************************************************************************

  * Function: source (Macaulay2Doc),
  * Usage:
        C = source f
  * Inputs:
      * f, a map of ZZ/d-graded factorizations,
  * Outputs:
      * C, a ZZ/d graded factorization,

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

Given a ZZ/d-graded factorization map $f : C \to D$ this method returns the
ZZ/d-graded factorization $C$.

+-----------------------------------------------------------------------------+
|i1 : S = ZZ/101[a,b,c]                                                       |
|                                                                             |
|o1 = S                                                                       |
|                                                                             |
|o1 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i2 : R = S/(a^2+b^2+c^2);                                                    |
+-----------------------------------------------------------------------------+
|i3 : m = ideal vars R                                                        |
|                                                                             |
|o3 = ideal (a, b, c)                                                         |
|                                                                             |
|o3 : Ideal of R                                                              |
+-----------------------------------------------------------------------------+
|i4 : C = tailMF m                                                            |
|                                                                             |
|      4      4      4                                                        |
|o4 = S  <-- S  <-- S                                                         |
|                                                                             |
|     0      1      0                                                         |
|                                                                             |
|o4 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i5 : D = tailMF (m^2)                                                        |
|                                                                             |
|      8      8      8                                                        |
|o5 = S  <-- S  <-- S                                                         |
|                                                                             |
|     0      1      0                                                         |
|                                                                             |
|o5 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i6 : f = randomFactorizationMap(C, D, Cycle=>true)                           |
|                                                                             |
|          4                                                                  |
|o6 = 0 : S  <----------------------------------------------------------------|
|               {3} | -20a-4b+47c -33a-29b+30c 45a-43b+33c -45a-20b+12c -42a+3|
|               {3} | -43a-39b+7c 39a+36b+41c  2a+16b-23c  -39a-15b-41c -48a+1|
|               {3} | -33a+3b+13c 13a-29b-30c  14a-39b+29c 41a-40b-15c  -11a-2|
|               {3} | 39a-14b-7c  18a+19b+47c  24a+34b+8c  25a-8b-15c   -18a-1|
|                                                                             |
|          4                                                                  |
|     1 : S  <----------------------------------------------------------------|
|               {4} | -11a-15b+38c 33a+14b-15c  -13a-9b-23c  -14a+3b-18c 41a-1|
|               {4} | 42a+8b-42c   -20a+42b-41c -33a+25b+9c  45a-46b+22c 45a-1|
|               {4} | -48a+40b+41c 43a-46b+12c  -39a+42b+38c -2a+24b+25c -39a-|
|               {4} | -18a+20b-5c  -39a+33b+15c -18a-8b-34c  -24a+9b+18c 25a+3|
|                                                                             |
|o6 : ZZdFactorizationMap                                                     |
|-----------------------------------------------------------------------------|
|                                                   8                         |
|------------------------------------------------- S  : 0                     |
|0b+5c  16a+33b+41c  29a-8b+20c   -21a+9b+16c  |                              |
|2b-18c -17a-14b-42c -10a+9b+40c  -47a-3b-16c  |                              |
|2b-21c -41a-46b+5c  24a+42b+3c   -38a+24b-47c |                              |
|4b+5c  -a+42b+38c   -22a+25b-23c -13a-46b+30c |                              |
|                                                                             |
|                                                    8                        |
|-------------------------------------------------- S  : 1                    |
|2b-7c   -41a+39b-5c  24a-36b-30c  -38a-16b+39c |                             |
|4b+7c   -16a-14b+18c -29a+19b+19c 21a+34b+19c  |                             |
|22b+47c -17a+3b-5c   -10a-29b-8c  -47a-39b-18c |                             |
|0b-13c  -a-4b-21c    -22a-29b-24c -13a-43b-15c |                             |
+-----------------------------------------------------------------------------+
|i7 : source f                                                                |
|                                                                             |
|      8      8      8                                                        |
|o7 = S  <-- S  <-- S                                                         |
|                                                                             |
|     0      1      0                                                         |
|                                                                             |
|o7 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i8 : assert isWellDefined f                                                  |
+-----------------------------------------------------------------------------+
|i9 : assert isFactorizationMorphism f                                        |
+-----------------------------------------------------------------------------+
|i10 : assert(source f == D)                                                  |
+-----------------------------------------------------------------------------+
|i11 : assert(target f == C)                                                  |
+-----------------------------------------------------------------------------+

The differential in a factorization is a map of factorizations.

+---------------------------------------+
|i12 : use S                            |
|                                       |
|o12 = S                                |
|                                       |
|o12 : PolynomialRing                   |
+---------------------------------------+
|i13 : F = randomTailMF(a^3 + b^3 + c^3)|
|                                       |
|       15      15      15              |
|o13 = S   <-- S   <-- S                |
|                                       |
|      0       1       0                |
|                                       |
|o13 : ZZdFactorization                 |
+---------------------------------------+
|i14 : source dd^F == F                 |
|                                       |
|o14 = true                             |
+---------------------------------------+
|i15 : target dd^F == F                 |
|                                       |
|o15 = true                             |
+---------------------------------------+
|i16 : degree dd^F == -1                |
|                                       |
|o16 = true                             |
+---------------------------------------+

See also
========

  * Making ZZdFactorizations -- Information
    about the basic constructors
  * target(ZZdFactorizationMap) -- get
    the target of a map of ZZ/d-graded factorizations
  * randomFactorizationMap(ZZdFactorization,ZZdFactorization)
    -- a random map of ZZ/d-graded factorizations

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

  * source(ZZdFactorizationMap) -- get
    the source of a map of ZZ/d-graded factorizations
-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:2838:0.

suspension -- Constructs the suspension of a d-fold factorization
*****************************************************************

  * Usage:
        suspension(ZZdFactorization)
        suspension(ZZ, ZZdFactorization)
        suspension(ZZdFactorizationMap)
  * Inputs:
      * ZZdFactorization, a ZZ/d graded factorization,
        A ZZdFactorization object representing a d-fold factorization
      * ZZ, an integer (Macaulay2Doc), An integer representing the
        dimension
      * ZZdFactorizationMap, a map of ZZ/d-graded factorizations,
        A ZZdFactorizationMap object representing a map
        of factorizations
  * Outputs:
      * a ZZ/d graded factorization,

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

The suspension of a d-fold factorization may be canonically defined by taking
the cokernel of the natural embedding of a factorization into its injective
cover. When $d=2$, this recovers the shift functor of a factorization, but when
$d > 2$ this object is an indecomposable yet nonminimal ZZ/d-graded
factorization.

+-----------------------------------------------------------------------------+
|i1 : Q = ZZ/101[a,b,c];                                                      |
+-----------------------------------------------------------------------------+
|i2 : D = koszulMF(a^3+b^3+c^3)                                               |
|                                                                             |
|      4      4      4                                                        |
|o2 = Q  <-- Q  <-- Q                                                         |
|                                                                             |
|     0      1      0                                                         |
|                                                                             |
|o2 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i3 : D.dd                                                                    |
|                                                                             |
|          4                        4                                         |
|o3 = 1 : Q  <-------------------- Q  : 0                                     |
|               | c2 0  b  a   |                                              |
|               | 0  c2 a2 -b2 |                                              |
|               | b2 a  -c 0   |                                              |
|               | a2 -b 0  -c  |                                              |
|                                                                             |
|          4                         4                                        |
|     0 : Q  <--------------------- Q  : 1                                    |
|               | c  0  b   a   |                                             |
|               | 0  c  a2  -b2 |                                             |
|               | b2 a  -c2 0   |                                             |
|               | a2 -b 0   -c2 |                                             |
|                                                                             |
|o3 : ZZdFactorizationMap                                                     |
+-----------------------------------------------------------------------------+
|i4 : suspension D                                                            |
|                                                                             |
|      4      4      4                                                        |
|o4 = Q  <-- Q  <-- Q                                                         |
|                                                                             |
|     0      1      0                                                         |
|                                                                             |
|o4 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i5 : oo == D[1]                                                              |
|                                                                             |
|o5 = true                                                                    |
+-----------------------------------------------------------------------------+
|i6 : suspension(2, D) == D                                                   |
|                                                                             |
|o6 = true                                                                    |
+-----------------------------------------------------------------------------+
|i7 : C = linearMF(a^3+b^3,t)                                                 |
|                                                                             |
|     /   Q[t]   \3     /   Q[t]   \3     /   Q[t]   \3     /   Q[t]   \3     |
|o7 = |----------|  <-- |----------|  <-- |----------|  <-- |----------|      |
|     | 2        |      | 2        |      | 2        |      | 2        |      |
|     \t  + t + 1/      \t  + t + 1/      \t  + t + 1/      \t  + t + 1/      |
|                                                                             |
|     0                 1                 2                 0                 |
|                                                                             |
|o7 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i8 : sC = suspension(C)                                                      |
|                                                                             |
|     /   Q[t]   \6     /   Q[t]   \6     /   Q[t]   \6     /   Q[t]   \6     |
|o8 = |----------|  <-- |----------|  <-- |----------|  <-- |----------|      |
|     | 2        |      | 2        |      | 2        |      | 2        |      |
|     \t  + t + 1/      \t  + t + 1/      \t  + t + 1/      \t  + t + 1/      |
|                                                                             |
|     0                 1                 2                 0                 |
|                                                                             |
|o8 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i9 : sC.dd                                                                   |
|                                                                             |
|         /   Q[t]   \6                                 /   Q[t]   \6         |
|o9 = 2 : |----------|  <------------------------------ |----------|  : 0     |
|         | 2        |     | 0 0 0 -b2 -abt-ab -a2  |   | 2        |          |
|         \t  + t + 1/     | 0 0 0 -a2 b2t+b2  ab   |   \t  + t + 1/          |
|                          | 0 0 0 abt -a2     -b2t |                         |
|                          | 1 0 0 -b  -a      0    |                         |
|                          | 0 1 0 0   -bt     -a   |                         |
|                          | 0 0 1 -a  0       bt+b |                         |
|                                                                             |
|         /   Q[t]   \6                                 /   Q[t]   \6         |
|     0 : |----------|  <------------------------------ |----------|  : 1     |
|         | 2        |     | -b2 -abt-ab -a2  0 0 0 |   | 2        |          |
|         \t  + t + 1/     | -a2 b2t+b2  ab   0 0 0 |   \t  + t + 1/          |
|                          | abt -a2     -b2t 0 0 0 |                         |
|                          | -b  -a      0    1 0 0 |                         |
|                          | 0   -bt     -a   0 1 0 |                         |
|                          | -a  0       bt+b 0 0 1 |                         |
|                                                                             |
|         /   Q[t]   \6                                 /   Q[t]   \6         |
|     1 : |----------|  <------------------------------ |----------|  : 2     |
|         | 2        |     | 1 0 0 -b  -a      0    |   | 2        |          |
|         \t  + t + 1/     | 0 1 0 0   -bt     -a   |   \t  + t + 1/          |
|                          | 0 0 1 -a  0       bt+b |                         |
|                          | 0 0 0 -b2 -abt-ab -a2  |                         |
|                          | 0 0 0 -a2 b2t+b2  ab   |                         |
|                          | 0 0 0 abt -a2     -b2t |                         |
|                                                                             |
|o9 : ZZdFactorizationMap                                                     |
+-----------------------------------------------------------------------------+
|i10 : sC.dd^3                                                                |
|                                                                             |
|          /   Q[t]   \6                                                      |
|o10 = 0 : |----------|  <-------------------------------------------         |
|          | 2        |     | a3+b3 0     0     0     0     0     |           |
|          \t  + t + 1/     | 0     a3+b3 0     0     0     0     |           |
|                           | 0     0     a3+b3 0     0     0     |           |
|                           | 0     0     0     a3+b3 0     0     |           |
|                           | 0     0     0     0     a3+b3 0     |           |
|                           | 0     0     0     0     0     a3+b3 |           |
|                                                                             |
|          /   Q[t]   \6                                                      |
|      1 : |----------|  <-------------------------------------------         |
|          | 2        |     | a3+b3 0     0     0     0     0     |           |
|          \t  + t + 1/     | 0     a3+b3 0     0     0     0     |           |
|                           | 0     0     a3+b3 0     0     0     |           |
|                           | 0     0     0     a3+b3 0     0     |           |
|                           | 0     0     0     0     a3+b3 0     |           |
|                           | 0     0     0     0     0     a3+b3 |           |
|                                                                             |
|          /   Q[t]   \6                                                      |
|      2 : |----------|  <-------------------------------------------         |
|          | 2        |     | a3+b3 0     0     0     0     0     |           |
|          \t  + t + 1/     | 0     a3+b3 0     0     0     0     |           |
|                           | 0     0     a3+b3 0     0     0     |           |
|                           | 0     0     0     a3+b3 0     0     |           |
|                           | 0     0     0     0     a3+b3 0     |           |
|                           | 0     0     0     0     0     a3+b3 |           |
|                                                                             |
|o10 : ZZdFactorizationMap                                                    |
|-----------------------------------------------------------------------------|
|/   Q[t]   \6                                                                |
||----------|  : 0                                                            |
|| 2        |                                                                 |
|\t  + t + 1/                                                                 |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|/   Q[t]   \6                                                                |
||----------|  : 1                                                            |
|| 2        |                                                                 |
|\t  + t + 1/                                                                 |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|/   Q[t]   \6                                                                |
||----------|  : 2                                                            |
|| 2        |                                                                 |
|\t  + t + 1/                                                                 |
+-----------------------------------------------------------------------------+
|i11 : suspension(3,C)                                                        |
|                                                                             |
|      /   Q[t]   \24     /   Q[t]   \24     /   Q[t]   \24     /   Q[t]   \24|
|o11 = |----------|   <-- |----------|   <-- |----------|   <-- |----------|  |
|      | 2        |       | 2        |       | 2        |       | 2        |  |
|      \t  + t + 1/       \t  + t + 1/       \t  + t + 1/       \t  + t + 1/  |
|                                                                             |
|      0                  1                  2                  0             |
|                                                                             |
|o11 : ZZdFactorization                                                       |
+-----------------------------------------------------------------------------+
|i12 : isdFactorization oo                                                    |
|                                                                             |
|              3    3                                                         |
|o12 = (true, a  + b )                                                        |
|                                                                             |
|o12 : Sequence                                                               |
+-----------------------------------------------------------------------------+

See also
========

  * injectiveCover -- Constructs the injective hull of a
    d-fold matrix factorization
  * projectiveCover -- Constructs the projective cover
    of a d-fold matrix factorization
  * kernel (Macaulay2Doc) -- kernel of a map of modules or rings
  * prune (Macaulay2Doc) -- prune, e.g., compute a minimal
    presentation

Ways to use suspension:
=======================

  * "suspension(ZZ,ZZdFactorization)"
  * "suspension(ZZdFactorization)"
  * "suspension(ZZdFactorizationMap)"

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

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

-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:5905:0.

tailMF -- Generate a ZZdFactorization from a module over a hypersurface ring
****************************************************************************

  * Usage:
        tailMF(Module)
  * Inputs:
      * Module, a module (Macaulay2Doc), A module over a
        hypersurface ring or an ideal (Macaulay2Doc), in a
        hypersurface ring
  * Outputs:
      * a ZZ/d graded factorization,

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

The function tailMF takes a module $M$ over a hypersurface ring $R = S/(f)$ and
generates a ZZdFactorization. This involves computing a resolution of $M$ over
the hypersurface $R$, taking a high truncation of this resolution, lifting it
to the ambient ring $S$, then finding a null homotopy for multiplication by
$f$.

+-----------------------------------------------------------------------------+
|i1 : S = ZZ/101[a,b,c];                                                      |
+-----------------------------------------------------------------------------+
|i2 : R = S/(a^3+b^3+c^3);                                                    |
+-----------------------------------------------------------------------------+
|i3 : m = ideal vars R;                                                       |
|                                                                             |
|o3 : Ideal of R                                                              |
+-----------------------------------------------------------------------------+
|i4 : C1 = tailMF m                                                           |
|                                                                             |
|      4      4      4                                                        |
|o4 = S  <-- S  <-- S                                                         |
|                                                                             |
|     0      1      0                                                         |
|                                                                             |
|o4 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i5 : C1.dd                                                                   |
|                                                                             |
|          4                            4                                     |
|o5 = 1 : S  <------------------------ S  : 0                                 |
|               {5} | -a -c2 b2 0  |                                          |
|               {5} | -c a2  0  b2 |                                          |
|               {5} | b  0   a2 c2 |                                          |
|               {6} | 0  -b  -c a  |                                          |
|                                                                             |
|          4                              4                                   |
|     0 : S  <-------------------------- S  : 1                               |
|               {3} | -a2 -c2 b2 0   |                                        |
|               {4} | -c  a   0  -b2 |                                        |
|               {4} | b   0   a  -c2 |                                        |
|               {4} | 0   b   c  a2  |                                        |
|                                                                             |
|o5 : ZZdFactorizationMap                                                     |
+-----------------------------------------------------------------------------+
|i6 : assert isWellDefined C1                                                 |
+-----------------------------------------------------------------------------+
|i7 : C1.dd^2                                                                 |
|                                                                             |
|          4                                                   4              |
|o7 = 0 : S  <----------------------------------------------- S  : 0          |
|               {3} | a3+b3+c3 0        0        0        |                   |
|               {4} | 0        a3+b3+c3 0        0        |                   |
|               {4} | 0        0        a3+b3+c3 0        |                   |
|               {4} | 0        0        0        a3+b3+c3 |                   |
|                                                                             |
|          4                                                   4              |
|     1 : S  <----------------------------------------------- S  : 1          |
|               {5} | a3+b3+c3 0        0        0        |                   |
|               {5} | 0        a3+b3+c3 0        0        |                   |
|               {5} | 0        0        a3+b3+c3 0        |                   |
|               {6} | 0        0        0        a3+b3+c3 |                   |
|                                                                             |
|o7 : ZZdFactorizationMap                                                     |
+-----------------------------------------------------------------------------+
|i8 : C2 = tailMF m^2                                                         |
|                                                                             |
|      9      9      9                                                        |
|o8 = S  <-- S  <-- S                                                         |
|                                                                             |
|     0      1      0                                                         |
|                                                                             |
|o8 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i9 : C2.dd                                                                   |
|                                                                             |
|          9                                               9                  |
|o9 = 1 : S  <------------------------------------------- S  : 0              |
|               {6} | -a 0  c  0   b2  0   0   0  0   |                       |
|               {6} | 0  -a 0  0   0   -c2 b2  0  bc  |                       |
|               {6} | 0  0  0  -ab -ac -b2 -bc a2 -c2 |                       |
|               {6} | 0  0  -a -ac 0   -bc -c2 0  b2  |                       |
|               {6} | -c 0  0  a2  0   ab  ac  b2 0   |                       |
|               {6} | b  0  0  0   a2  0   0   c2 ac  |                       |
|               {6} | 0  -c 0  -b2 -bc a2  0   ab 0   |                       |
|               {6} | 0  b  -c -c2 0   0   a2  0  0   |                       |
|               {6} | 0  0  b  0   -c2 0   0   ac a2  |                       |
|                                                                             |
|          9                                               9                  |
|     0 : S  <------------------------------------------- S  : 1              |
|               {4} | -a2 0   0  -ac -c2 b2 0   0  0  |                       |
|               {4} | 0   -a2 0  0   0   0  -c2 b2 bc |                       |
|               {4} | c2  0   0  -a2 -ac 0  0   0  b2 |                       |
|               {5} | -c  0   0  0   a   0  -b  -c 0  |                       |
|               {5} | b   0   0  0   0   a  0   0  -c |                       |
|               {5} | 0   -c  -b 0   0   0  a   0  0  |                       |
|               {5} | 0   b   0  -c  0   0  0   a  0  |                       |
|               {5} | 0   0   a  0   b   c  0   0  0  |                       |
|               {5} | 0   0   -c b   0   0  0   0  a  |                       |
|                                                                             |
|o9 : ZZdFactorizationMap                                                     |
+-----------------------------------------------------------------------------+
|i10 : C2.dd^2                                                                |
|                                                                             |
|           9                                                                 |
|o10 = 0 : S  <---------------------------------------------------------------|
|                {4} | a3+b3+c3 0        0        0        0        0        0|
|                {4} | 0        a3+b3+c3 0        0        0        0        0|
|                {4} | 0        0        a3+b3+c3 0        0        0        0|
|                {5} | 0        0        0        a3+b3+c3 0        0        0|
|                {5} | 0        0        0        0        a3+b3+c3 0        0|
|                {5} | 0        0        0        0        0        a3+b3+c3 0|
|                {5} | 0        0        0        0        0        0        a|
|                {5} | 0        0        0        0        0        0        0|
|                {5} | 0        0        0        0        0        0        0|
|                                                                             |
|           9                                                                 |
|      1 : S  <---------------------------------------------------------------|
|                {6} | a3+b3+c3 0        0        0        0        0        0|
|                {6} | 0        a3+b3+c3 0        0        0        0        0|
|                {6} | 0        0        a3+b3+c3 0        0        0        0|
|                {6} | 0        0        0        a3+b3+c3 0        0        0|
|                {6} | 0        0        0        0        a3+b3+c3 0        0|
|                {6} | 0        0        0        0        0        a3+b3+c3 0|
|                {6} | 0        0        0        0        0        0        a|
|                {6} | 0        0        0        0        0        0        0|
|                {6} | 0        0        0        0        0        0        0|
|                                                                             |
|o10 : ZZdFactorizationMap                                                    |
|-----------------------------------------------------------------------------|
|                               9                                             |
|----------------------------- S  : 0                                         |
|        0        0        |                                                  |
|        0        0        |                                                  |
|        0        0        |                                                  |
|        0        0        |                                                  |
|        0        0        |                                                  |
|        0        0        |                                                  |
|3+b3+c3 0        0        |                                                  |
|        a3+b3+c3 0        |                                                  |
|        0        a3+b3+c3 |                                                  |
|                                                                             |
|                               9                                             |
|----------------------------- S  : 1                                         |
|        0        0        |                                                  |
|        0        0        |                                                  |
|        0        0        |                                                  |
|        0        0        |                                                  |
|        0        0        |                                                  |
|        0        0        |                                                  |
|3+b3+c3 0        0        |                                                  |
|        a3+b3+c3 0        |                                                  |
|        0        a3+b3+c3 |                                                  |
+-----------------------------------------------------------------------------+

Caveat
======

There are no checks implemented for whether the ambient ring is actually a
hypersurface. The user should make sure the input module $M$ satisfies the
conditions put forth above.

See also
========

  * Making ZZdFactorizations -- Information
    about the basic constructors
  * koszulMF -- Construct a Koszul matrix factorization from
    an ideal and a polynomial
  * randomTailMF -- Construct a matrix factorization from
    a high syzygy of a random module over a hypersurface

Ways to use tailMF:
===================

  * "tailMF(Ideal)"
  * "tailMF(Module)"

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

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

-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:5215:0.

target(ZZdFactorizationMap) -- get the target of a map of ZZ/d-graded factorizations
************************************************************************************

  * Function: target (Macaulay2Doc),
  * Usage:
        C = target f
  * Inputs:
      * f, a map of ZZ/d-graded factorizations,
  * Outputs:
      * C, a ZZ/d graded factorization,

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

Given a ZZ/d-graded factorization map $f : C \to D$ this method returns the
ZZ/d-graded factorization $D$.

+-----------------------------------------------------------------------------+
|i1 : S = ZZ/101[a,b,c]                                                       |
|                                                                             |
|o1 = S                                                                       |
|                                                                             |
|o1 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i2 : R = S/(a^2+b^2+c^2);                                                    |
+-----------------------------------------------------------------------------+
|i3 : m = ideal vars R                                                        |
|                                                                             |
|o3 = ideal (a, b, c)                                                         |
|                                                                             |
|o3 : Ideal of R                                                              |
+-----------------------------------------------------------------------------+
|i4 : C = tailMF m                                                            |
|                                                                             |
|      4      4      4                                                        |
|o4 = S  <-- S  <-- S                                                         |
|                                                                             |
|     0      1      0                                                         |
|                                                                             |
|o4 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i5 : D = tailMF (m^2)                                                        |
|                                                                             |
|      8      8      8                                                        |
|o5 = S  <-- S  <-- S                                                         |
|                                                                             |
|     0      1      0                                                         |
|                                                                             |
|o5 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i6 : f = randomFactorizationMap(C, D, Cycle=>true)                           |
|                                                                             |
|          4                                                                  |
|o6 = 0 : S  <----------------------------------------------------------------|
|               {3} | -20a-4b+47c -33a-29b+30c 45a-43b+33c -45a-20b+12c -42a+3|
|               {3} | -43a-39b+7c 39a+36b+41c  2a+16b-23c  -39a-15b-41c -48a+1|
|               {3} | -33a+3b+13c 13a-29b-30c  14a-39b+29c 41a-40b-15c  -11a-2|
|               {3} | 39a-14b-7c  18a+19b+47c  24a+34b+8c  25a-8b-15c   -18a-1|
|                                                                             |
|          4                                                                  |
|     1 : S  <----------------------------------------------------------------|
|               {4} | -11a-15b+38c 33a+14b-15c  -13a-9b-23c  -14a+3b-18c 41a-1|
|               {4} | 42a+8b-42c   -20a+42b-41c -33a+25b+9c  45a-46b+22c 45a-1|
|               {4} | -48a+40b+41c 43a-46b+12c  -39a+42b+38c -2a+24b+25c -39a-|
|               {4} | -18a+20b-5c  -39a+33b+15c -18a-8b-34c  -24a+9b+18c 25a+3|
|                                                                             |
|o6 : ZZdFactorizationMap                                                     |
|-----------------------------------------------------------------------------|
|                                                   8                         |
|------------------------------------------------- S  : 0                     |
|0b+5c  16a+33b+41c  29a-8b+20c   -21a+9b+16c  |                              |
|2b-18c -17a-14b-42c -10a+9b+40c  -47a-3b-16c  |                              |
|2b-21c -41a-46b+5c  24a+42b+3c   -38a+24b-47c |                              |
|4b+5c  -a+42b+38c   -22a+25b-23c -13a-46b+30c |                              |
|                                                                             |
|                                                    8                        |
|-------------------------------------------------- S  : 1                    |
|2b-7c   -41a+39b-5c  24a-36b-30c  -38a-16b+39c |                             |
|4b+7c   -16a-14b+18c -29a+19b+19c 21a+34b+19c  |                             |
|22b+47c -17a+3b-5c   -10a-29b-8c  -47a-39b-18c |                             |
|0b-13c  -a-4b-21c    -22a-29b-24c -13a-43b-15c |                             |
+-----------------------------------------------------------------------------+
|i7 : source f                                                                |
|                                                                             |
|      8      8      8                                                        |
|o7 = S  <-- S  <-- S                                                         |
|                                                                             |
|     0      1      0                                                         |
|                                                                             |
|o7 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i8 : assert isWellDefined f                                                  |
+-----------------------------------------------------------------------------+
|i9 : assert isFactorizationMorphism f                                        |
+-----------------------------------------------------------------------------+
|i10 : assert(source f == D)                                                  |
+-----------------------------------------------------------------------------+
|i11 : assert(target f == C)                                                  |
+-----------------------------------------------------------------------------+

The differential in a factorization is a map of factorizations.

+---------------------------------------+
|i12 : use S                            |
|                                       |
|o12 = S                                |
|                                       |
|o12 : PolynomialRing                   |
+---------------------------------------+
|i13 : F = randomTailMF(a^3 + b^3 + c^3)|
|                                       |
|       15      15      15              |
|o13 = S   <-- S   <-- S                |
|                                       |
|      0       1       0                |
|                                       |
|o13 : ZZdFactorization                 |
+---------------------------------------+
|i14 : source dd^F == F                 |
|                                       |
|o14 = true                             |
+---------------------------------------+
|i15 : target dd^F == F                 |
|                                       |
|o15 = true                             |
+---------------------------------------+
|i16 : degree dd^F == -1                |
|                                       |
|o16 = true                             |
+---------------------------------------+

See also
========

  * Making ZZdFactorizations -- Information
    about the basic constructors
  * source(ZZdFactorizationMap) -- get
    the source of a map of ZZ/d-graded factorizations
  * randomFactorizationMap(ZZdFactorization,ZZdFactorization)
    -- a random map of ZZ/d-graded factorizations

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

  * target(ZZdFactorizationMap) -- get
    the target of a map of ZZ/d-graded factorizations
-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:2879:0.

tensorAssociativity(ZZdFactorization,ZZdFactorization,ZZdFactorization) -- make the canonical isomorphism arising from associativity
************************************************************************************************************************************

  * Function: tensorAssociativity (Macaulay2Doc),
  * Usage:
        tensorAssociativity(C, D, E)
  * Inputs:
      * C, a ZZ/d graded factorization,
      * D, a ZZ/d graded factorization,
      * E, a ZZ/d graded factorization,
  * Outputs:
      * a map of ZZ/d-graded factorizations, which
        is an isomorphism from C ** (D ** E) to (C ** D) ** E

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

The associativity of tensor products of modules induces the associativity of
tensor products of ZZ/d-graded factorizations. This method implements this
isomorphism for ZZ/d-graded factorizations. Note that although
tensorCommutativity (Complexes),
requires the factorizations to have period 2 to be a well defined morphism,
this function returns a well-defined factorization morphism regardless of the
period.

Using two term complexes of small rank, we see that this isomorphism need not
be the identity map.

+-----------------------------------------------------------------------------+
|i1 : S = ZZ/101[a,b];                                                        |
+-----------------------------------------------------------------------------+
|i2 : R = S/(a^3+b^3);                                                        |
+-----------------------------------------------------------------------------+
|i3 : m = ideal vars R                                                        |
|                                                                             |
|o3 = ideal (a, b)                                                            |
|                                                                             |
|o3 : Ideal of R                                                              |
+-----------------------------------------------------------------------------+
|i4 : C = tailMF m                                                            |
|                                                                             |
|      2      2      2                                                        |
|o4 = S  <-- S  <-- S                                                         |
|                                                                             |
|     0      1      0                                                         |
|                                                                             |
|o4 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i5 : D = tailMF (m^2)                                                        |
|                                                                             |
|      3      3      3                                                        |
|o5 = S  <-- S  <-- S                                                         |
|                                                                             |
|     0      1      0                                                         |
|                                                                             |
|o5 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i6 : use S;                                                                  |
+-----------------------------------------------------------------------------+
|i7 : E = randomTailMF(a^3+b^3, 1, 2, 3)                                      |
|                                                                             |
|      2      2      2                                                        |
|o7 = S  <-- S  <-- S                                                         |
|                                                                             |
|     0      1      0                                                         |
|                                                                             |
|o7 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i8 : E.dd                                                                    |
|                                                                             |
|          2                      2                                           |
|o8 = 1 : S  <------------------ S  : 0                                       |
|               {1} | -a2 b2 |                                                |
|               {2} | b   a  |                                                |
|                                                                             |
|          2                 2                                                |
|     0 : S  <------------- S  : 1                                            |
|               | -a b2 |                                                     |
|               | b  a2 |                                                     |
|                                                                             |
|o8 : ZZdFactorizationMap                                                     |
+-----------------------------------------------------------------------------+
|i9 : F = (C ** D) ** E                                                       |
|                                                                             |
|      48      48      48                                                     |
|o9 = S   <-- S   <-- S                                                       |
|                                                                             |
|     0       1       0                                                       |
|                                                                             |
|o9 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i10 : G = C ** (D ** E)                                                      |
|                                                                             |
|       48      48      48                                                    |
|o10 = S   <-- S   <-- S                                                      |
|                                                                             |
|      0       1       0                                                      |
|                                                                             |
|o10 : ZZdFactorization                                                       |
+-----------------------------------------------------------------------------+
|i11 : f = tensorAssociativity(C,D,E)                                         |
|                                                                             |
|           48                                                                |
|o11 = 0 : S   <--------------------------------------------------------------|
|                 {5}  | 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {5}  | 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {5}  | 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {5}  | 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {5}  | 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {5}  | 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {6}  | 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {6}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {6}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {6}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0|
|                 {6}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0|
|                 {6}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0|
|                 {9}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {9}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {9}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {9}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {9}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {9}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {9}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {9}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {9}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {9}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {9}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {9}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {8}  | 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {9}  | 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {8}  | 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {9}  | 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {8}  | 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {9}  | 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {9}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0|
|                 {10} | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0|
|                 {9}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0|
|                 {10} | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0|
|                 {9}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0|
|                 {10} | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0|
|                 {8}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0|
|                 {9}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0|
|                 {8}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1|
|                 {9}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {8}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {9}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {8}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {9}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {8}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {9}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {8}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {9}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                                                                             |
|           48                                                                |
|      1 : S   <--------------------------------------------------------------|
|                 {6}  | 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {7}  | 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {6}  | 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {7}  | 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {6}  | 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {7}  | 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {7}  | 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {8}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {7}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {8}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0|
|                 {7}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0|
|                 {8}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0|
|                 {10} | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {11} | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {10} | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {11} | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {10} | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {11} | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {10} | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {11} | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {10} | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {11} | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {10} | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {11} | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {7}  | 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {7}  | 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {7}  | 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {7}  | 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {7}  | 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {7}  | 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {8}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0|
|                 {8}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0|
|                 {8}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0|
|                 {8}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0|
|                 {8}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0|
|                 {8}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0|
|                 {7}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0|
|                 {7}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0|
|                 {7}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1|
|                 {7}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {7}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {7}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {7}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {7}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {7}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {7}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {7}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {7}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                                                                             |
|o11 : ZZdFactorizationMap                                                    |
|-----------------------------------------------------------------------------|
|                                                48                           |
|---------------------------------------------- S   : 0                       |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 |                                 |
|                                                                             |
|                                                48                           |
|---------------------------------------------- S   : 1                       |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 |                                 |
+-----------------------------------------------------------------------------+
|i12 : assert isWellDefined f                                                 |
+-----------------------------------------------------------------------------+
|i13 : assert isFactorizationMorphism f                                       |
+-----------------------------------------------------------------------------+
|i14 : assert(source f === G)                                                 |
+-----------------------------------------------------------------------------+
|i15 : assert(target f === F)                                                 |
+-----------------------------------------------------------------------------+
|i16 : f_1                                                                    |
|                                                                             |
|o16 = {6}  | 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |
|      {7}  | 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |
|      {6}  | 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |
|      {7}  | 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |
|      {6}  | 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |
|      {7}  | 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |
|      {7}  | 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |
|      {8}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |
|      {7}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |
|      {8}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |
|      {7}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |
|      {8}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |
|      {10} | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 |
|      {11} | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 |
|      {10} | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |
|      {11} | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |
|      {10} | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |
|      {11} | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |
|      {10} | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |
|      {11} | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |
|      {10} | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |
|      {11} | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |
|      {10} | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |
|      {11} | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |
|      {7}  | 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |
|      {7}  | 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |
|      {7}  | 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |
|      {7}  | 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |
|      {7}  | 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |
|      {7}  | 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |
|      {8}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 |
|      {8}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 |
|      {8}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 |
|      {8}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 |
|      {8}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 |
|      {8}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 |
|      {7}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 |
|      {7}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 |
|      {7}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 |
|      {7}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 |
|      {7}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 |
|      {7}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 |
|      {7}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |
|      {7}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |
|      {7}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |
|      {7}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |
|      {7}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |
|      {7}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |
|      -----------------------------------------------------------------------|
|      0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                      |
|      0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                      |
|      0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                      |
|      0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                      |
|      0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                      |
|      0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                      |
|      0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                      |
|      0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                      |
|      0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                      |
|      0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                      |
|      0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                      |
|      0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                      |
|      0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                      |
|      0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                      |
|      1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                      |
|      0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                      |
|      0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                      |
|      0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 |                                      |
|      0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 |                                      |
|      0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 |                                      |
|      0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 |                                      |
|      0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 |                                      |
|      0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 |                                      |
|      0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 |                                      |
|      0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                      |
|      0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                      |
|      0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                      |
|      0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                      |
|      0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                      |
|      0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                      |
|      0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                      |
|      0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                      |
|      0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                      |
|      0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                      |
|      0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                      |
|      0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                      |
|      0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                      |
|      0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                      |
|      0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                      |
|      0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                      |
|      0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                      |
|      0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                      |
|      0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 |                                      |
|      0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 |                                      |
|      0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 |                                      |
|      0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 |                                      |
|      0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 |                                      |
|      0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 |                                      |
|                                                                             |
|              48      48                                                     |
|o16 : Matrix S   <-- S                                                       |
+-----------------------------------------------------------------------------+
|i17 : assert(f_1 != id_(source f_1))                                         |
+-----------------------------------------------------------------------------+
|i18 : assert(prune ker f == 0)                                               |
+-----------------------------------------------------------------------------+
|i19 : assert(prune coker f == 0)                                             |
+-----------------------------------------------------------------------------+
|i20 : g = f^-1                                                               |
|                                                                             |
|           48                                                                |
|o20 = 0 : S   <--------------------------------------------------------------|
|                 {5}  | 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {5}  | 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {5}  | 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {5}  | 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {5}  | 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {5}  | 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {8}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0|
|                 {9}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0|
|                 {8}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1|
|                 {9}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {8}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {9}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {6}  | 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {6}  | 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {6}  | 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {6}  | 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {6}  | 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {6}  | 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {9}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {10} | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {9}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {10} | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {9}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {10} | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {8}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {9}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {8}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {9}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {8}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {9}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {9}  | 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {9}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {9}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {9}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0|
|                 {9}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0|
|                 {9}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0|
|                 {8}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {9}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {8}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {9}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {8}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {9}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {9}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0|
|                 {9}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0|
|                 {9}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0|
|                 {9}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0|
|                 {9}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0|
|                 {9}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0|
|                                                                             |
|           48                                                                |
|      1 : S   <--------------------------------------------------------------|
|                 {6}  | 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {7}  | 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {6}  | 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {7}  | 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {6}  | 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {7}  | 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {7}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0|
|                 {7}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0|
|                 {7}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1|
|                 {7}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {7}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {7}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {7}  | 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {8}  | 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {7}  | 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {8}  | 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {7}  | 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {8}  | 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {8}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {8}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {8}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {8}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {8}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {8}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {7}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {7}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {7}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {7}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {7}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {7}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {10} | 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {11} | 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {10} | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {11} | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0|
|                 {10} | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0|
|                 {11} | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0|
|                 {7}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {7}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {7}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {7}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {7}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {7}  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                 {10} | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0|
|                 {11} | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0|
|                 {10} | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0|
|                 {11} | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0|
|                 {10} | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0|
|                 {11} | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0|
|                                                                             |
|o20 : ZZdFactorizationMap                                                    |
|-----------------------------------------------------------------------------|
|                                                48                           |
|---------------------------------------------- S   : 0                       |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
|                                                                             |
|                                                48                           |
|---------------------------------------------- S   : 1                       |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |                                 |
+-----------------------------------------------------------------------------+
|i21 : assert isWellDefined g                                                 |
+-----------------------------------------------------------------------------+
|i22 : assert(g * f == 1)                                                     |
+-----------------------------------------------------------------------------+
|i23 : assert(f * g == 1)                                                     |
+-----------------------------------------------------------------------------+

See also
========

  * tensorCommutativity(ZZdFactorization,ZZdFactorization)
    -- make the
    canonical isomorphism arising from commutativity of the tensor product
    operation
  * tensorAssociativity(Module,Module,Module) (Macaulay2Doc)
    -- associativity isomorphisms for tensor
    products

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

  * tensorAssociativity(ZZdFactorization,ZZdFactorization, ZZdFactorization)
    -- make the canonical isomorphism
    arising from associativity
-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:4842:0.

tensorCommutativity(ZZdFactorization,ZZdFactorization) -- make the canonical isomorphism arising from commutativity of the tensor product operation
***************************************************************************************************************************************************

  * Function: tensorCommutativity (Complexes),
  * Usage:
        tensorCommutativity(C, D)
  * Inputs:
      * C, a ZZ/d graded factorization,
      * D, a ZZ/d graded factorization, both over the
        same ring $R$
  * Outputs:
      * a map of ZZ/d-graded factorizations, that
        is an isomorphism from $C \otimes_R D$ to $D \otimes_R C$, assuming
        factorizations of period 2

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

The commutativity of tensor products of modules induces the commutativity of
tensor products of ZZ/2-graded factorizations. The main difference for
factorizations is that there are coefficients depending on the degrees of the
terms being commuted. This method implements this isomorphism for ZZ/2-graded
factorizations.

Using two term complexes of small rank, we see that this isomorphism need not
be the identity map.

+----------------------------------------------------------------+
|i1 : S = ZZ/101[a,b];                                           |
+----------------------------------------------------------------+
|i2 : R = S/(a^3+b^3);                                           |
+----------------------------------------------------------------+
|i3 : m = ideal vars R                                           |
|                                                                |
|o3 = ideal (a, b)                                               |
|                                                                |
|o3 : Ideal of R                                                 |
+----------------------------------------------------------------+
|i4 : C = tailMF m                                               |
|                                                                |
|      2      2      2                                           |
|o4 = S  <-- S  <-- S                                            |
|                                                                |
|     0      1      0                                            |
|                                                                |
|o4 : ZZdFactorization                                           |
+----------------------------------------------------------------+
|i5 : D = tailMF (m^2)                                           |
|                                                                |
|      3      3      3                                           |
|o5 = S  <-- S  <-- S                                            |
|                                                                |
|     0      1      0                                            |
|                                                                |
|o5 : ZZdFactorization                                           |
+----------------------------------------------------------------+
|i6 : F = C**D                                                   |
|                                                                |
|      12      12      12                                        |
|o6 = S   <-- S   <-- S                                          |
|                                                                |
|     0       1       0                                          |
|                                                                |
|o6 : ZZdFactorization                                           |
+----------------------------------------------------------------+
|i7 : G = D**C                                                   |
|                                                                |
|      12      12      12                                        |
|o7 = S   <-- S   <-- S                                          |
|                                                                |
|     0       1       0                                          |
|                                                                |
|o7 : ZZdFactorization                                           |
+----------------------------------------------------------------+
|i8 : f = tensorCommutativity(C,D)                               |
|                                                                |
|          12                                             12     |
|o8 = 0 : S   <----------------------------------------- S   : 0 |
|                {5} | 1 0 0 0 0 0 0  0  0  0  0  0  |           |
|                {6} | 0 0 0 1 0 0 0  0  0  0  0  0  |           |
|                {5} | 0 1 0 0 0 0 0  0  0  0  0  0  |           |
|                {6} | 0 0 0 0 1 0 0  0  0  0  0  0  |           |
|                {5} | 0 0 1 0 0 0 0  0  0  0  0  0  |           |
|                {6} | 0 0 0 0 0 1 0  0  0  0  0  0  |           |
|                {9} | 0 0 0 0 0 0 -1 0  0  0  0  0  |           |
|                {9} | 0 0 0 0 0 0 0  0  0  -1 0  0  |           |
|                {9} | 0 0 0 0 0 0 0  -1 0  0  0  0  |           |
|                {9} | 0 0 0 0 0 0 0  0  0  0  -1 0  |           |
|                {9} | 0 0 0 0 0 0 0  0  -1 0  0  0  |           |
|                {9} | 0 0 0 0 0 0 0  0  0  0  0  -1 |           |
|                                                                |
|          12                                       12           |
|     1 : S   <----------------------------------- S   : 1       |
|                {7} | 0 0 0 0 0 0 1 0 0 0 0 0 |                 |
|                {7} | 0 0 0 0 0 0 0 0 0 1 0 0 |                 |
|                {7} | 0 0 0 0 0 0 0 1 0 0 0 0 |                 |
|                {7} | 0 0 0 0 0 0 0 0 0 0 1 0 |                 |
|                {7} | 0 0 0 0 0 0 0 0 1 0 0 0 |                 |
|                {7} | 0 0 0 0 0 0 0 0 0 0 0 1 |                 |
|                {7} | 1 0 0 0 0 0 0 0 0 0 0 0 |                 |
|                {8} | 0 0 0 1 0 0 0 0 0 0 0 0 |                 |
|                {7} | 0 1 0 0 0 0 0 0 0 0 0 0 |                 |
|                {8} | 0 0 0 0 1 0 0 0 0 0 0 0 |                 |
|                {7} | 0 0 1 0 0 0 0 0 0 0 0 0 |                 |
|                {8} | 0 0 0 0 0 1 0 0 0 0 0 0 |                 |
|                                                                |
|o8 : ZZdFactorizationMap                                        |
+----------------------------------------------------------------+
|i9 : assert isWellDefined f                                     |
+----------------------------------------------------------------+
|i10 : assert isFactorizationMorphism f                          |
+----------------------------------------------------------------+
|i11 : assert(source f === F)                                    |
+----------------------------------------------------------------+
|i12 : assert(target f === G)                                    |
+----------------------------------------------------------------+
|i13 : assert(f_1 != id_(source f_1))                            |
+----------------------------------------------------------------+
|i14 : assert(prune ker f == 0)                                  |
+----------------------------------------------------------------+
|i15 : assert(prune coker f == 0)                                |
+----------------------------------------------------------------+
|i16 : g = f^-1                                                  |
|                                                                |
|           12                                             12    |
|o16 = 0 : S   <----------------------------------------- S   : 0|
|                 {5} | 1 0 0 0 0 0 0  0  0  0  0  0  |          |
|                 {5} | 0 0 1 0 0 0 0  0  0  0  0  0  |          |
|                 {5} | 0 0 0 0 1 0 0  0  0  0  0  0  |          |
|                 {6} | 0 1 0 0 0 0 0  0  0  0  0  0  |          |
|                 {6} | 0 0 0 1 0 0 0  0  0  0  0  0  |          |
|                 {6} | 0 0 0 0 0 1 0  0  0  0  0  0  |          |
|                 {9} | 0 0 0 0 0 0 -1 0  0  0  0  0  |          |
|                 {9} | 0 0 0 0 0 0 0  0  -1 0  0  0  |          |
|                 {9} | 0 0 0 0 0 0 0  0  0  0  -1 0  |          |
|                 {9} | 0 0 0 0 0 0 0  -1 0  0  0  0  |          |
|                 {9} | 0 0 0 0 0 0 0  0  0  -1 0  0  |          |
|                 {9} | 0 0 0 0 0 0 0  0  0  0  0  -1 |          |
|                                                                |
|           12                                       12          |
|      1 : S   <----------------------------------- S   : 1      |
|                 {7} | 0 0 0 0 0 0 1 0 0 0 0 0 |                |
|                 {7} | 0 0 0 0 0 0 0 0 1 0 0 0 |                |
|                 {7} | 0 0 0 0 0 0 0 0 0 0 1 0 |                |
|                 {8} | 0 0 0 0 0 0 0 1 0 0 0 0 |                |
|                 {8} | 0 0 0 0 0 0 0 0 0 1 0 0 |                |
|                 {8} | 0 0 0 0 0 0 0 0 0 0 0 1 |                |
|                 {7} | 1 0 0 0 0 0 0 0 0 0 0 0 |                |
|                 {7} | 0 0 1 0 0 0 0 0 0 0 0 0 |                |
|                 {7} | 0 0 0 0 1 0 0 0 0 0 0 0 |                |
|                 {7} | 0 1 0 0 0 0 0 0 0 0 0 0 |                |
|                 {7} | 0 0 0 1 0 0 0 0 0 0 0 0 |                |
|                 {7} | 0 0 0 0 0 1 0 0 0 0 0 0 |                |
|                                                                |
|o16 : ZZdFactorizationMap                                       |
+----------------------------------------------------------------+
|i17 : assert isWellDefined g                                    |
+----------------------------------------------------------------+
|i18 : assert(g * f == 1)                                        |
+----------------------------------------------------------------+
|i19 : assert(f * g == 1)                                        |
+----------------------------------------------------------------+

This isomorphism works even when the modules of the factorization are not
necessarily free.

+---------------------------------------------------------------------+
|i20 : h2 = tensorCommutativity(C**(coker vars S), D**(coker vars S));|
+---------------------------------------------------------------------+
|i21 : assert isWellDefined h2                                        |
+---------------------------------------------------------------------+
|i22 : assert isFactorizationMorphism h2                              |
+---------------------------------------------------------------------+
|i23 : assert(ker h2 == 0)                                            |
+---------------------------------------------------------------------+
|i24 : assert(coker h2 == 0)                                          |
+---------------------------------------------------------------------+
|i25 : k = h2^-1;                                                     |
+---------------------------------------------------------------------+
|i26 : assert(h2*k == 1)                                              |
+---------------------------------------------------------------------+
|i27 : assert(k*h2 == 1)                                              |
+---------------------------------------------------------------------+
|i28 : h2_2                                                           |
|                                                                     |
|o28 = {5} | 1 0 0 0 0 0 0  0  0  0  0  0  |                          |
|      {6} | 0 0 0 1 0 0 0  0  0  0  0  0  |                          |
|      {5} | 0 1 0 0 0 0 0  0  0  0  0  0  |                          |
|      {6} | 0 0 0 0 1 0 0  0  0  0  0  0  |                          |
|      {5} | 0 0 1 0 0 0 0  0  0  0  0  0  |                          |
|      {6} | 0 0 0 0 0 1 0  0  0  0  0  0  |                          |
|      {9} | 0 0 0 0 0 0 -1 0  0  0  0  0  |                          |
|      {9} | 0 0 0 0 0 0 0  0  0  -1 0  0  |                          |
|      {9} | 0 0 0 0 0 0 0  -1 0  0  0  0  |                          |
|      {9} | 0 0 0 0 0 0 0  0  0  0  -1 0  |                          |
|      {9} | 0 0 0 0 0 0 0  0  -1 0  0  0  |                          |
|      {9} | 0 0 0 0 0 0 0  0  0  0  0  -1 |                          |
|                                                                     |
|o28 : Matrix                                                         |
+---------------------------------------------------------------------+
|i29 : assert(source h2_2 != target h2_2)                             |
+---------------------------------------------------------------------+

Interchanging the arguments gives the inverse map.

+----------------------------------------------------------------+
|i30 : h1 = tensorCommutativity(D, C)                            |
|                                                                |
|           12                                             12    |
|o30 = 0 : S   <----------------------------------------- S   : 0|
|                 {5} | 1 0 0 0 0 0 0  0  0  0  0  0  |          |
|                 {5} | 0 0 1 0 0 0 0  0  0  0  0  0  |          |
|                 {5} | 0 0 0 0 1 0 0  0  0  0  0  0  |          |
|                 {6} | 0 1 0 0 0 0 0  0  0  0  0  0  |          |
|                 {6} | 0 0 0 1 0 0 0  0  0  0  0  0  |          |
|                 {6} | 0 0 0 0 0 1 0  0  0  0  0  0  |          |
|                 {9} | 0 0 0 0 0 0 -1 0  0  0  0  0  |          |
|                 {9} | 0 0 0 0 0 0 0  0  -1 0  0  0  |          |
|                 {9} | 0 0 0 0 0 0 0  0  0  0  -1 0  |          |
|                 {9} | 0 0 0 0 0 0 0  -1 0  0  0  0  |          |
|                 {9} | 0 0 0 0 0 0 0  0  0  -1 0  0  |          |
|                 {9} | 0 0 0 0 0 0 0  0  0  0  0  -1 |          |
|                                                                |
|           12                                       12          |
|      1 : S   <----------------------------------- S   : 1      |
|                 {7} | 0 0 0 0 0 0 1 0 0 0 0 0 |                |
|                 {7} | 0 0 0 0 0 0 0 0 1 0 0 0 |                |
|                 {7} | 0 0 0 0 0 0 0 0 0 0 1 0 |                |
|                 {8} | 0 0 0 0 0 0 0 1 0 0 0 0 |                |
|                 {8} | 0 0 0 0 0 0 0 0 0 1 0 0 |                |
|                 {8} | 0 0 0 0 0 0 0 0 0 0 0 1 |                |
|                 {7} | 1 0 0 0 0 0 0 0 0 0 0 0 |                |
|                 {7} | 0 0 1 0 0 0 0 0 0 0 0 0 |                |
|                 {7} | 0 0 0 0 1 0 0 0 0 0 0 0 |                |
|                 {7} | 0 1 0 0 0 0 0 0 0 0 0 0 |                |
|                 {7} | 0 0 0 1 0 0 0 0 0 0 0 0 |                |
|                 {7} | 0 0 0 0 0 1 0 0 0 0 0 0 |                |
|                                                                |
|o30 : ZZdFactorizationMap                                       |
+----------------------------------------------------------------+
|i31 : assert isFactorizationMorphism h1                         |
+----------------------------------------------------------------+
|i32 : assert(h1*f == id_(C**D))                                 |
+----------------------------------------------------------------+
|i33 : assert(f*h1 == id_(D**C))                                 |
+----------------------------------------------------------------+

Caveat
======

This method will still run when the factorizations have period > 2, but the
resulting map will not be a well-defined morphism of factorizations.

See also
========

  * tensorCommutativity(Module,Module) (Complexes)
    -- make the canonical
    isomorphism arising from commutativity
  * tensorAssociativity(ZZdFactorization,ZZdFactorization, ZZdFactorization)
    -- make the canonical isomorphism
    arising from associativity
  * isFactorizationMorphism(ZZdFactorizationMap)
    -- whether a
    ZZdFactorizationMap is a morphism of factorizations

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

  * tensorCommutativity(ZZdFactorization,ZZdFactorization)
    -- make the
    canonical isomorphism arising from commutativity of the tensor product
    operation
-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:4786:0.

toBranchedCover -- Converts a d-fold matrix factorization into a maximal Cohen-Macaulay module over a d-fold branched cover of the potential
********************************************************************************************************************************************

  * Usage:
        toBranchedCover(C, z)
  * Inputs:
      * C, a ZZ/d graded factorization, The input
        d-fold matrix factorization
      * z, a symbol (Macaulay2Doc), The symbol representing the
        new variable in the branched cover
  * Outputs:
      * a matrix (Macaulay2Doc), A matrix, whose cokernel is a
        maximal Cohen-Macaulay module over the ring $R[z]/(z^d + f)$, where $f$
        is the potential of the original factorization.

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

This method converts a d-fold matrix factorization into a d-fold branched cover
of the potential, where the potential is the polynomial associated with the
factorization. The Symbol z specifies the name of the new variable introduced
in the branched cover. The input is assumed to be a well-defined factorization.
In the following example, the zeroOutDegrees function is used to ensure that
modules over the resulting branched cover are well-behaved with respect to the
pushforward along the natural map $S \to S[z]/(z^d + f)$.

+-----------------------------------------------------------------------------+
|i1 : S = zeroOutDegrees (ZZ/101[a..c])                                       |
|                                                                             |
|o1 = S                                                                       |
|                                                                             |
|o1 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i2 : C = koszulMF(a^3+b^3+c^3)                                               |
|                                                                             |
|      4      4      4                                                        |
|o2 = S  <-- S  <-- S                                                         |
|                                                                             |
|     0      1      0                                                         |
|                                                                             |
|o2 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i3 : M = toBranchedCover(C,z)                                                |
|                                                                             |
|o3 = | z  0  0   0   c2 0  b  a   |                                          |
|     | 0  z  0   0   0  c2 a2 -b2 |                                          |
|     | 0  0  z   0   b2 a  -c 0   |                                          |
|     | 0  0  0   z   a2 -b 0  -c  |                                          |
|     | c  0  b   a   -z 0  0  0   |                                          |
|     | 0  c  a2  -b2 0  -z 0  0   |                                          |
|     | b2 a  -c2 0   0  0  -z 0   |                                          |
|     | a2 -b 0   -c2 0  0  0  -z  |                                          |
|                                                                             |
|            /       S[z]      \8     /       S[z]      \8                    |
|o3 : Matrix |-----------------|  <-- |-----------------|                     |
|            | 2    3    3    3|      | 2    3    3    3|                     |
|            \z  + a  + b  + c /      \z  + a  + b  + c /                     |
+-----------------------------------------------------------------------------+
|i4 : liftM = sub(M, ambient ring M)                                          |
|                                                                             |
|o4 = | z  0  0   0   c2 0  b  a   |                                          |
|     | 0  z  0   0   0  c2 a2 -b2 |                                          |
|     | 0  0  z   0   b2 a  -c 0   |                                          |
|     | 0  0  0   z   a2 -b 0  -c  |                                          |
|     | c  0  b   a   -z 0  0  0   |                                          |
|     | 0  c  a2  -b2 0  -z 0  0   |                                          |
|     | b2 a  -c2 0   0  0  -z 0   |                                          |
|     | a2 -b 0   -c2 0  0  0  -z  |                                          |
|                                                                             |
|                  8           8                                              |
|o4 : Matrix (S[z])  <-- (S[z])                                               |
+-----------------------------------------------------------------------------+
|i5 : prune ker liftM == 0 --this implies that the cokernel is MCM over the   |
|                                                                             |
|o5 = true                                                                    |
|-----------------------------------------------------------------------------|
|hypersurface                                                                 |
+-----------------------------------------------------------------------------+

This method works for factorizations of arbitrary period:

+------------------------------------------------------------------------+
|i6 : D = linearMF(a^4 + b^4, t)                                         |
|                                                                        |
|     /   S[t]   \3     /   S[t]   \3     /   S[t]   \3     /   S[t]   \3|
|o6 = |----------|  <-- |----------|  <-- |----------|  <-- |----------| |
|     | 2        |      | 2        |      | 2        |      | 2        | |
|     \t  + t + 1/      \t  + t + 1/      \t  + t + 1/      \t  + t + 1/ |
|                                                                        |
|     0                 1                 2                 0            |
|                                                                        |
|o6 : ZZdFactorization                                                   |
+------------------------------------------------------------------------+
|i7 : N = toBranchedCover(D, z)                                          |
|                                                                        |
|o7 = | z 0   0     b  a2 0       0       0       0       |              |
|     | 0 z   0     0  bt a       0       0       0       |              |
|     | 0 0   z     a  0  -b2t-b2 0       0       0       |              |
|     | 0 0   0     tz 0  0       b2      a2      0       |              |
|     | 0 0   0     0  tz 0       0       bt      a       |              |
|     | 0 0   0     0  0  tz      a       0       -bt-b   |              |
|     | b a2  0     0  0  0       (-t-1)z 0       0       |              |
|     | 0 b2t a     0  0  0       0       (-t-1)z 0       |              |
|     | a 0   -bt-b 0  0  0       0       0       (-t-1)z |              |
|                                                                        |
|            /   S[t]      \      /   S[t]      \                        |
|            |----------[z]|      |----------[z]|                        |
|            | 2           |      | 2           |                        |
|            |t  + t + 1   |9     |t  + t + 1   |9                       |
|o7 : Matrix |-------------|  <-- |-------------|                        |
|            |  3    4    4|      |  3    4    4|                        |
|            \ z  + a  + b /      \ z  + a  + b /                        |
+------------------------------------------------------------------------+
|i8 : liftN = sub(N, ambient ring N)                                     |
|                                                                        |
|o8 = | z 0   0     b  a2 0       0       0       0       |              |
|     | 0 z   0     0  bt a       0       0       0       |              |
|     | 0 0   z     a  0  -b2t-b2 0       0       0       |              |
|     | 0 0   0     tz 0  0       b2      a2      0       |              |
|     | 0 0   0     0  tz 0       0       bt      a       |              |
|     | 0 0   0     0  0  tz      a       0       -bt-b   |              |
|     | b a2  0     0  0  0       (-t-1)z 0       0       |              |
|     | 0 b2t a     0  0  0       0       (-t-1)z 0       |              |
|     | a 0   -bt-b 0  0  0       0       0       (-t-1)z |              |
|                                                                        |
|            /   S[t]      \9     /   S[t]      \9                       |
|o8 : Matrix |----------[z]|  <-- |----------[z]|                        |
|            | 2           |      | 2           |                        |
|            \t  + t + 1   /      \t  + t + 1   /                        |
+------------------------------------------------------------------------+
|i9 : prune ker liftN == 0 --again, must be MCM                          |
|                                                                        |
|o9 = true                                                               |
+------------------------------------------------------------------------+

The user can convert the MCM module over a branched cover back into a
factorization using the branchedToMF, function. Composing
these functors yields a folded version of the original factorization (with a
negative sign), an insight originally noted by Knorrer.

+-----------------------------------------------------------------------------+
|i10 : bC = branchedToMF(M, S) --specifying S substitutes back into the       |
|                                                                             |
|       8      8      8                                                       |
|o10 = S  <-- S  <-- S                                                        |
|                                                                             |
|      0      1      0                                                        |
|                                                                             |
|o10 : ZZdFactorization                                                       |
|-----------------------------------------------------------------------------|
|original ring                                                                |
+-----------------------------------------------------------------------------+
|i11 : bC.dd                                                                  |
|                                                                             |
|           8                                      8                          |
|o11 = 1 : S  <---------------------------------- S  : 0                      |
|                | 0   0  0   0  c2 0  b  a   |                               |
|                | 0   0  0   0  0  c2 a2 -b2 |                               |
|                | 0   0  0   0  b2 a  -c 0   |                               |
|                | 0   0  0   0  a2 -b 0  -c  |                               |
|                | -c  0  -b  -a 0  0  0  0   |                               |
|                | 0   -c -a2 b2 0  0  0  0   |                               |
|                | -b2 -a c2  0  0  0  0  0   |                               |
|                | -a2 b  0   c2 0  0  0  0   |                               |
|                                                                             |
|           8                                      8                          |
|      0 : S  <---------------------------------- S  : 1                      |
|                | 0   0  0   0  c2 0  b  a   |                               |
|                | 0   0  0   0  0  c2 a2 -b2 |                               |
|                | 0   0  0   0  b2 a  -c 0   |                               |
|                | 0   0  0   0  a2 -b 0  -c  |                               |
|                | -c  0  -b  -a 0  0  0  0   |                               |
|                | 0   -c -a2 b2 0  0  0  0   |                               |
|                | -b2 -a c2  0  0  0  0  0   |                               |
|                | -a2 b  0   c2 0  0  0  0   |                               |
|                                                                             |
|o11 : ZZdFactorizationMap                                                    |
+-----------------------------------------------------------------------------+
|i12 : C.dd                                                                   |
|                                                                             |
|           4                        4                                        |
|o12 = 1 : S  <-------------------- S  : 0                                    |
|                | c2 0  b  a   |                                             |
|                | 0  c2 a2 -b2 |                                             |
|                | b2 a  -c 0   |                                             |
|                | a2 -b 0  -c  |                                             |
|                                                                             |
|           4                         4                                       |
|      0 : S  <--------------------- S  : 1                                   |
|                | c  0  b   a   |                                            |
|                | 0  c  a2  -b2 |                                            |
|                | b2 a  -c2 0   |                                            |
|                | a2 -b 0   -c2 |                                            |
|                                                                             |
|o12 : ZZdFactorizationMap                                                    |
+-----------------------------------------------------------------------------+
|i13 : isdFactorization bC                                                    |
|                                                                             |
|                3    3    3                                                  |
|o13 = (true, - a  - b  - c )                                                 |
|                                                                             |
|o13 : Sequence                                                               |
+-----------------------------------------------------------------------------+
|i14 : bD = branchedToMF(N, ring D)                                           |
|                                                                             |
|      /   S[t]   \11     /   S[t]   \11     /   S[t]   \11     /   S[t]   \11|
|o14 = |----------|   <-- |----------|   <-- |----------|   <-- |----------|  |
|      | 2        |       | 2        |       | 2        |       | 2        |  |
|      \t  + t + 1/       \t  + t + 1/       \t  + t + 1/       \t  + t + 1/  |
|                                                                             |
|      0                  1                  2                  0             |
|                                                                             |
|o14 : ZZdFactorization                                                       |
+-----------------------------------------------------------------------------+
|i15 : bD.dd --notice the                                                     |
|                                                                             |
|          /   S[t]   \11                                                     |
|o15 = 2 : |----------|                                                       |
|          | 2        |                                                       |
|          \t  + t + 1/                                                       |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|          /   S[t]   \11                                                     |
|      0 : |----------|                                                       |
|          | 2        |                                                       |
|          \t  + t + 1/                                                       |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|          /   S[t]   \11                                                     |
|      1 : |----------|                                                       |
|          | 2        |                                                       |
|          \t  + t + 1/                                                       |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|o15 : ZZdFactorizationMap                                                    |
|-----------------------------------------------------------------------------|
|block structure                                                              |
|                                                                             |
|                                                         /   S[t]   \11      |
|<------------------------------------------------------- |----------|   : 0  |
|   | 0  0    0    bt+b 0 0    0    0    0   0 0      |   | 2        |        |
|   | 0  0    0    0    0 at+a 0    0    0   0 0      |   \t  + t + 1/        |
|   | 0  0    0    at+a 0 -b2t 0    0    0   0 0      |                       |
|   | 0  0    0    0    0 0    -b2t -a2t 0   0 0      |                       |
|   | 0  0    0    0    0 0    0    bt+b -at 0 -a4-b4 |                       |
|   | 0  0    0    0    0 0    -at  0    -b  0 0      |                       |
|   | -b -a2  0    0    0 0    0    0    0   0 0      |                       |
|   | 0  -b2t -a   0    0 0    0    0    0   0 0      |                       |
|   | -a 0    bt+b 0    0 0    0    0    0   0 0      |                       |
|   | 0  0    0    0    1 0    0    0    0   0 0      |                       |
|   | 0  0    0    0    0 0    0    0    0   1 0      |                       |
|                                                                             |
|                                                         /   S[t]   \11      |
|<------------------------------------------------------- |----------|   : 1  |
|   | 0  0    0    bt+b 0 0    0    0    0   0 0      |   | 2        |        |
|   | 0  0    0    0    0 at+a 0    0    0   0 0      |   \t  + t + 1/        |
|   | 0  0    0    at+a 0 -b2t 0    0    0   0 0      |                       |
|   | 0  0    0    0    0 0    -b2t -a2t 0   0 0      |                       |
|   | 0  0    0    0    0 0    0    bt+b -at 0 -a4-b4 |                       |
|   | 0  0    0    0    0 0    -at  0    -b  0 0      |                       |
|   | -b -a2  0    0    0 0    0    0    0   0 0      |                       |
|   | 0  -b2t -a   0    0 0    0    0    0   0 0      |                       |
|   | -a 0    bt+b 0    0 0    0    0    0   0 0      |                       |
|   | 0  0    0    0    1 0    0    0    0   0 0      |                       |
|   | 0  0    0    0    0 0    0    0    0   1 0      |                       |
|                                                                             |
|                                                         /   S[t]   \11      |
|<------------------------------------------------------- |----------|   : 2  |
|   | 0  0    0    bt+b 0 0    0    0    0   0 0      |   | 2        |        |
|   | 0  0    0    0    0 at+a 0    0    0   0 0      |   \t  + t + 1/        |
|   | 0  0    0    at+a 0 -b2t 0    0    0   0 0      |                       |
|   | 0  0    0    0    0 0    -b2t -a2t 0   0 0      |                       |
|   | 0  0    0    0    0 0    0    bt+b -at 0 -a4-b4 |                       |
|   | 0  0    0    0    0 0    -at  0    -b  0 0      |                       |
|   | -b -a2  0    0    0 0    0    0    0   0 0      |                       |
|   | 0  -b2t -a   0    0 0    0    0    0   0 0      |                       |
|   | -a 0    bt+b 0    0 0    0    0    0   0 0      |                       |
|   | 0  0    0    0    1 0    0    0    0   0 0      |                       |
|   | 0  0    0    0    0 0    0    0    0   1 0      |                       |
+-----------------------------------------------------------------------------+
|i16 : D.dd                                                                   |
|                                                                             |
|          /   S[t]   \3                       /   S[t]   \3                  |
|o16 = 2 : |----------|  <-------------------- |----------|  : 0              |
|          | 2        |     | b a2 0       |   | 2        |                   |
|          \t  + t + 1/     | 0 bt a       |   \t  + t + 1/                   |
|                           | a 0  -b2t-b2 |                                  |
|                                                                             |
|          /   S[t]   \3                      /   S[t]   \3                   |
|      0 : |----------|  <------------------- |----------|  : 1               |
|          | 2        |     | b2 a2 0     |   | 2        |                    |
|          \t  + t + 1/     | 0  bt a     |   \t  + t + 1/                    |
|                           | a  0  -bt-b |                                   |
|                                                                             |
|          /   S[t]   \3                      /   S[t]   \3                   |
|      1 : |----------|  <------------------- |----------|  : 2               |
|          | 2        |     | b a2  0     |   | 2        |                    |
|          \t  + t + 1/     | 0 b2t a     |   \t  + t + 1/                    |
|                           | a 0   -bt-b |                                   |
|                                                                             |
|o16 : ZZdFactorizationMap                                                    |
+-----------------------------------------------------------------------------+
|i17 : isdFactorization bD                                                    |
|                                                                             |
|o17 = (false, no potential)                                                  |
|                                                                             |
|o17 : Sequence                                                               |
+-----------------------------------------------------------------------------+

See also
========

  * Making ZZdFactorizations -- Information
    about the basic constructors
  * branchedToMF -- Converts a maximal Cohen-Macaulay
    module over a d-fold branched cover into a d-fold factorization
  * higherHomotopyFactorization, --
    Constructs the matrix factorization associated with a system of higher
    homotopies

Ways to use toBranchedCover:
============================

  * "toBranchedCover(ZZdFactorization,RingElement)"
  * "toBranchedCover(ZZdFactorization,Symbol)"

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

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

-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:6095:0.

trivialMF -- Constructs the trivial matrix factorization of an element f
************************************************************************

  * Usage:
        trivialMF(d, i, M, f)
  * Inputs:
      * d, an integer (Macaulay2Doc), The period of the desired
        factorization
      * i, an integer (Macaulay2Doc), The homological degree that the
        module M will appear in
      * M, a module (Macaulay2Doc), A module
      * RingElement, a ring element (Macaulay2Doc), An
        element in the ring of M
  * Outputs:
      * a ZZ/d graded factorization,

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

Constructs the trivial matrix factorization associated to M, which is the
factorization: $$ M \xrightarrow{1} M \xrightarrow{1} \cdots \xrightarrow{1} M
\xrightarrow{f} M.$$ The user can specify using the index $i$ which
differential should be multiplication by the element $f$. If only one integer
is specified, it is assumed that multiplication by $f$ is the first
differential in the factorization. If no integers are specified, then the
output is the length 2 factorization with first differential given by
multiplication by $f$.

+---------------------------------------------------------------+
|i1 : Q = ZZ/101[a..c]                                          |
|                                                               |
|o1 = Q                                                         |
|                                                               |
|o1 : PolynomialRing                                            |
+---------------------------------------------------------------+
|i2 : f = a^3 + b^3 + c^3                                       |
|                                                               |
|      3    3    3                                              |
|o2 = a  + b  + c                                               |
|                                                               |
|o2 : Q                                                         |
+---------------------------------------------------------------+
|i3 : T = trivialMF(Q^3, f)                                     |
|                                                               |
|      3      3      3                                          |
|o3 = Q  <-- Q  <-- Q                                           |
|                                                               |
|     0      1      0                                           |
|                                                               |
|o3 : ZZdFactorization                                          |
+---------------------------------------------------------------+
|i4 : T.dd                                                      |
|                                                               |
|          3                 3                                  |
|o4 = 1 : Q  <------------- Q  : 0                              |
|               | 1 0 0 |                                       |
|               | 0 1 0 |                                       |
|               | 0 0 1 |                                       |
|                                                               |
|          3                                      3             |
|     0 : Q  <---------------------------------- Q  : 1         |
|               | a3+b3+c3 0        0        |                  |
|               | 0        a3+b3+c3 0        |                  |
|               | 0        0        a3+b3+c3 |                  |
|                                                               |
|o4 : ZZdFactorizationMap                                       |
+---------------------------------------------------------------+
|i5 : isdFactorization T                                        |
|                                                               |
|             3    3    3                                       |
|o5 = (true, a  + b  + c )                                      |
|                                                               |
|o5 : Sequence                                                  |
+---------------------------------------------------------------+
|i6 : isNullHomotopic id_T                                      |
|                                                               |
|o6 = true                                                      |
+---------------------------------------------------------------+
|i7 : nullHomotopy id_T                                         |
|                                                               |
|          3         3                                          |
|o7 = 1 : Q  <----- Q  : 0                                      |
|               0                                               |
|                                                               |
|          3                 3                                  |
|     0 : Q  <------------- Q  : 1                              |
|               | 1 0 0 |                                       |
|               | 0 1 0 |                                       |
|               | 0 0 1 |                                       |
|                                                               |
|o7 : ZZdFactorizationMap                                       |
+---------------------------------------------------------------+
|i8 : T1 = trivialMF(4, 2, Q^4, f)                              |
|                                                               |
|      4      4      4      4      4                            |
|o8 = Q  <-- Q  <-- Q  <-- Q  <-- Q                             |
|                                                               |
|     0      1      2      3      0                             |
|                                                               |
|o8 : ZZdFactorization                                          |
+---------------------------------------------------------------+
|i9 : T1.dd                                                     |
|                                                               |
|          4                   4                                |
|o9 = 3 : Q  <--------------- Q  : 0                            |
|               | 1 0 0 0 |                                     |
|               | 0 1 0 0 |                                     |
|               | 0 0 1 0 |                                     |
|               | 0 0 0 1 |                                     |
|                                                               |
|          4                   4                                |
|     0 : Q  <--------------- Q  : 1                            |
|               | 1 0 0 0 |                                     |
|               | 0 1 0 0 |                                     |
|               | 0 0 1 0 |                                     |
|               | 0 0 0 1 |                                     |
|                                                               |
|          4                                               4    |
|     1 : Q  <------------------------------------------- Q  : 2|
|               | a3+b3+c3 0        0        0        |         |
|               | 0        a3+b3+c3 0        0        |         |
|               | 0        0        a3+b3+c3 0        |         |
|               | 0        0        0        a3+b3+c3 |         |
|                                                               |
|          4                   4                                |
|     2 : Q  <--------------- Q  : 3                            |
|               | 1 0 0 0 |                                     |
|               | 0 1 0 0 |                                     |
|               | 0 0 1 0 |                                     |
|               | 0 0 0 1 |                                     |
|                                                               |
|o9 : ZZdFactorizationMap                                       |
+---------------------------------------------------------------+

See also
========

  * Making ZZdFactorizations -- Information
    about the basic constructors

Ways to use trivialMF:
======================

  * "trivialMF(Module,RingElement)"
  * "trivialMF(ZZ,Module,RingElement)"
  * "trivialMF(ZZ,ZZ,Module,RingElement)"
  * "trivialMF(ZZ,ZZ,Module,ZZ)"

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

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

-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:5744:0.

unfold -- Converts a factorization into a complex
*************************************************

  * Usage:
        unfold(ZZdFactorization, L)
        unfold(ZZdFactorization, d)
  * Inputs:
      * ZZdFactorization, a ZZ/d graded factorization,
        A ZZdFactorization
      * L, a list (Macaulay2Doc), A list specifying the endpoint
        homological degrees
      * d, an integer (Macaulay2Doc), An integer representing the
        endpoint homological degree
  * Outputs:
      * a complex (Complexes),

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

Converts a factorization into a complex, where the list specifies the endpoint
homological degrees. This method converts a factorization into a complex by
specifying the homological degrees. If a single integer is provided, it takes
homological endpoints from degrees 0 to d.

+--------------------------------------------------------+
|i1 : S = ZZ/101[a..c];                                  |
+--------------------------------------------------------+
|i2 : C = koszulMF(a^3+b^3+c^3)                          |
|                                                        |
|      4      4      4                                   |
|o2 = S  <-- S  <-- S                                    |
|                                                        |
|     0      1      0                                    |
|                                                        |
|o2 : ZZdFactorization                                   |
+--------------------------------------------------------+
|i3 : E = Hom(C,C)                                       |
|                                                        |
|      32      32      32                                |
|o3 = S   <-- S   <-- S                                  |
|                                                        |
|     0       1       0                                  |
|                                                        |
|o3 : ZZdFactorization                                   |
+--------------------------------------------------------+
|i4 : Eu = unfold(E, {-3,3})                             |
|                                                        |
|      32      32      32      32      32      32      32|
|o4 = S   <-- S   <-- S   <-- S   <-- S   <-- S   <-- S  |
|                                                        |
|     -3      -2      -1      0       1       2       3  |
|                                                        |
|o4 : Complex                                            |
+--------------------------------------------------------+
|i5 : isWellDefined Eu                                   |
|                                                        |
|o5 = true                                               |
+--------------------------------------------------------+
|i6 : concentration Eu                                   |
|                                                        |
|o6 = (-3, 3)                                            |
|                                                        |
|o6 : Sequence                                           |
+--------------------------------------------------------+
|i7 : prune HH_0 Eu == prune HH_0 E                      |
|                                                        |
|o7 = true                                               |
+--------------------------------------------------------+

If only one integer is specified, then the start point of the unfolded object
is assumed to be homological degree 0. Beware as well that unfolding a
factorization of a nonzero polynomial is not a well-defined complex.

+-----------------------------------+
|i8 : unfold(E, 3)                  |
|                                   |
|      32      32      32      32   |
|o8 = S   <-- S   <-- S   <-- S     |
|                                   |
|     0       1       2       3     |
|                                   |
|o8 : Complex                       |
+-----------------------------------+
|i9 : Cu = unfold(C, 4)             |
|                                   |
|      4      4      4      4      4|
|o9 = S  <-- S  <-- S  <-- S  <-- S |
|                                   |
|     0      1      2      3      4 |
|                                   |
|o9 : Complex                       |
+-----------------------------------+
|i10 : assert not isWellDefined Cu  |
+-----------------------------------+

The Fold, and unfold functors are not inverses to each other and
will in general change the homology of a ZZ/d-graded complex.

+---------------------------------------------------------------------+
|i11 : E' = Fold(unfold(E,1), 2)                                      |
|                                                                     |
|       32      32      32                                            |
|o11 = S   <-- S   <-- S                                              |
|                                                                     |
|      0       1       0                                              |
|                                                                     |
|o11 : ZZdFactorization                                               |
+---------------------------------------------------------------------+
|i12 : E'.dd_1 == E.dd_1                                              |
|                                                                     |
|o12 = true                                                           |
+---------------------------------------------------------------------+
|i13 : E'.dd_0 --the information of the 0th differential has been lost|
|                                                                     |
|o13 = 0                                                              |
|                                                                     |
|              32      32                                             |
|o13 : Matrix S   <-- S                                               |
+---------------------------------------------------------------------+
|i14 : Fold(unfold(E,2), 2)                                           |
|                                                                     |
|       64      32      64                                            |
|o14 = S   <-- S   <-- S                                              |
|                                                                     |
|      0       1       0                                              |
|                                                                     |
|o14 : ZZdFactorization                                               |
+---------------------------------------------------------------------+

This method is also functorial, applying to factorization maps with the same
syntax.

+-----------------------------------------------------------------------------+
|i15 : Id = unfold(id_E, {-2,2})                                              |
|                                                                             |
|            32                                                               |
|o15 = -2 : S   <-------------------------------------------------------------|
|                  | 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                  | 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                  | 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                  | 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                  | 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                  | 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                  | 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                  | 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                  | 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                  | 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                  | 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                  | 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                  | 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                  | 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0|
|                  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0|
|                  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0|
|                  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0|
|                  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0|
|                  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0|
|                  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0|
|                  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0|
|                  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0|
|                  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0|
|                  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0|
|                  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0|
|                  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1|
|                  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                                                                             |
|            32                                                               |
|      -1 : S   <-------------------------------------------------------------|
|                  | 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                  | 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                  | 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                  | 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                  | 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                  | 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                  | 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                  | 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                  | 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                  | 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                  | 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                  | 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                  | 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                  | 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0|
|                  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0|
|                  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0|
|                  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0|
|                  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0|
|                  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0|
|                  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0|
|                  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0|
|                  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0|
|                  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0|
|                  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0|
|                  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0|
|                  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1|
|                  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                  | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                                                                             |
|           32                                                                |
|      0 : S   <--------------------------------------------------------------|
|                 | 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |
|                 | 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |
|                 | 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |
|                 | 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |
|                 | 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |
|                 | 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |
|                 | 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |
|                 | 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |
|                 | 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |
|                 | 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |
|                 | 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |
|                 | 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |
|                 | 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |
|                 | 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |
|                 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |
|                 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 |
|                 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 |
|                 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 |
|                 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 |
|                 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 |
|                 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 |
|                 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 |
|                 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 |
|                 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 |
|                 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 |
|                 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 |
|                 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 |
|                 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 |
|                 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 |
|                 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |
|                 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |
|                 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |
|                                                                             |
|           32                                                                |
|      1 : S   <--------------------------------------------------------------|
|                 | 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |
|                 | 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |
|                 | 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |
|                 | 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |
|                 | 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |
|                 | 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |
|                 | 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |
|                 | 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |
|                 | 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |
|                 | 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |
|                 | 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |
|                 | 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |
|                 | 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |
|                 | 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |
|                 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |
|                 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 |
|                 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 |
|                 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 |
|                 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 |
|                 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 |
|                 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 |
|                 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 |
|                 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 |
|                 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 |
|                 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 |
|                 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 |
|                 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 |
|                 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 |
|                 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 |
|                 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |
|                 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |
|                 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |
|                                                                             |
|           32                                                                |
|      2 : S   <--------------------------------------------------------------|
|                 | 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |
|                 | 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |
|                 | 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |
|                 | 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |
|                 | 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |
|                 | 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |
|                 | 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |
|                 | 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |
|                 | 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |
|                 | 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |
|                 | 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |
|                 | 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |
|                 | 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |
|                 | 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |
|                 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |
|                 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 |
|                 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 |
|                 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 |
|                 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 |
|                 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 |
|                 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 |
|                 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 |
|                 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 |
|                 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 |
|                 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 |
|                 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 |
|                 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 |
|                 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 |
|                 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 |
|                 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |
|                 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |
|                 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |
|                                                                             |
|o15 : ComplexMap                                                             |
|-----------------------------------------------------------------------------|
|            32                                                               |
|---------- S   : -2                                                          |
| 0 0 0 |                                                                     |
| 0 0 0 |                                                                     |
| 0 0 0 |                                                                     |
| 0 0 0 |                                                                     |
| 0 0 0 |                                                                     |
| 0 0 0 |                                                                     |
| 0 0 0 |                                                                     |
| 0 0 0 |                                                                     |
| 0 0 0 |                                                                     |
| 0 0 0 |                                                                     |
| 0 0 0 |                                                                     |
| 0 0 0 |                                                                     |
| 0 0 0 |                                                                     |
| 0 0 0 |                                                                     |
| 0 0 0 |                                                                     |
| 0 0 0 |                                                                     |
| 0 0 0 |                                                                     |
| 0 0 0 |                                                                     |
| 0 0 0 |                                                                     |
| 0 0 0 |                                                                     |
| 0 0 0 |                                                                     |
| 0 0 0 |                                                                     |
| 0 0 0 |                                                                     |
| 0 0 0 |                                                                     |
| 0 0 0 |                                                                     |
| 0 0 0 |                                                                     |
| 0 0 0 |                                                                     |
| 0 0 0 |                                                                     |
| 0 0 0 |                                                                     |
| 1 0 0 |                                                                     |
| 0 1 0 |                                                                     |
| 0 0 1 |                                                                     |
|                                                                             |
|            32                                                               |
|---------- S   : -1                                                          |
| 0 0 0 |                                                                     |
| 0 0 0 |                                                                     |
| 0 0 0 |                                                                     |
| 0 0 0 |                                                                     |
| 0 0 0 |                                                                     |
| 0 0 0 |                                                                     |
| 0 0 0 |                                                                     |
| 0 0 0 |                                                                     |
| 0 0 0 |                                                                     |
| 0 0 0 |                                                                     |
| 0 0 0 |                                                                     |
| 0 0 0 |                                                                     |
| 0 0 0 |                                                                     |
| 0 0 0 |                                                                     |
| 0 0 0 |                                                                     |
| 0 0 0 |                                                                     |
| 0 0 0 |                                                                     |
| 0 0 0 |                                                                     |
| 0 0 0 |                                                                     |
| 0 0 0 |                                                                     |
| 0 0 0 |                                                                     |
| 0 0 0 |                                                                     |
| 0 0 0 |                                                                     |
| 0 0 0 |                                                                     |
| 0 0 0 |                                                                     |
| 0 0 0 |                                                                     |
| 0 0 0 |                                                                     |
| 0 0 0 |                                                                     |
| 0 0 0 |                                                                     |
| 1 0 0 |                                                                     |
| 0 1 0 |                                                                     |
| 0 0 1 |                                                                     |
|                                                                             |
|           32                                                                |
|--------- S   : 0                                                            |
|0 0 0 |                                                                      |
|0 0 0 |                                                                      |
|0 0 0 |                                                                      |
|0 0 0 |                                                                      |
|0 0 0 |                                                                      |
|0 0 0 |                                                                      |
|0 0 0 |                                                                      |
|0 0 0 |                                                                      |
|0 0 0 |                                                                      |
|0 0 0 |                                                                      |
|0 0 0 |                                                                      |
|0 0 0 |                                                                      |
|0 0 0 |                                                                      |
|0 0 0 |                                                                      |
|0 0 0 |                                                                      |
|0 0 0 |                                                                      |
|0 0 0 |                                                                      |
|0 0 0 |                                                                      |
|0 0 0 |                                                                      |
|0 0 0 |                                                                      |
|0 0 0 |                                                                      |
|0 0 0 |                                                                      |
|0 0 0 |                                                                      |
|0 0 0 |                                                                      |
|0 0 0 |                                                                      |
|0 0 0 |                                                                      |
|0 0 0 |                                                                      |
|0 0 0 |                                                                      |
|0 0 0 |                                                                      |
|1 0 0 |                                                                      |
|0 1 0 |                                                                      |
|0 0 1 |                                                                      |
|                                                                             |
|           32                                                                |
|--------- S   : 1                                                            |
|0 0 0 |                                                                      |
|0 0 0 |                                                                      |
|0 0 0 |                                                                      |
|0 0 0 |                                                                      |
|0 0 0 |                                                                      |
|0 0 0 |                                                                      |
|0 0 0 |                                                                      |
|0 0 0 |                                                                      |
|0 0 0 |                                                                      |
|0 0 0 |                                                                      |
|0 0 0 |                                                                      |
|0 0 0 |                                                                      |
|0 0 0 |                                                                      |
|0 0 0 |                                                                      |
|0 0 0 |                                                                      |
|0 0 0 |                                                                      |
|0 0 0 |                                                                      |
|0 0 0 |                                                                      |
|0 0 0 |                                                                      |
|0 0 0 |                                                                      |
|0 0 0 |                                                                      |
|0 0 0 |                                                                      |
|0 0 0 |                                                                      |
|0 0 0 |                                                                      |
|0 0 0 |                                                                      |
|0 0 0 |                                                                      |
|0 0 0 |                                                                      |
|0 0 0 |                                                                      |
|0 0 0 |                                                                      |
|1 0 0 |                                                                      |
|0 1 0 |                                                                      |
|0 0 1 |                                                                      |
|                                                                             |
|           32                                                                |
|--------- S   : 2                                                            |
|0 0 0 |                                                                      |
|0 0 0 |                                                                      |
|0 0 0 |                                                                      |
|0 0 0 |                                                                      |
|0 0 0 |                                                                      |
|0 0 0 |                                                                      |
|0 0 0 |                                                                      |
|0 0 0 |                                                                      |
|0 0 0 |                                                                      |
|0 0 0 |                                                                      |
|0 0 0 |                                                                      |
|0 0 0 |                                                                      |
|0 0 0 |                                                                      |
|0 0 0 |                                                                      |
|0 0 0 |                                                                      |
|0 0 0 |                                                                      |
|0 0 0 |                                                                      |
|0 0 0 |                                                                      |
|0 0 0 |                                                                      |
|0 0 0 |                                                                      |
|0 0 0 |                                                                      |
|0 0 0 |                                                                      |
|0 0 0 |                                                                      |
|0 0 0 |                                                                      |
|0 0 0 |                                                                      |
|0 0 0 |                                                                      |
|0 0 0 |                                                                      |
|0 0 0 |                                                                      |
|0 0 0 |                                                                      |
|1 0 0 |                                                                      |
|0 1 0 |                                                                      |
|0 0 1 |                                                                      |
+-----------------------------------------------------------------------------+
|i16 : Id == id_(source Id)                                                   |
|                                                                             |
|o16 = true                                                                   |
+-----------------------------------------------------------------------------+
|i17 : isCommutative Id                                                       |
|                                                                             |
|o17 = true                                                                   |
+-----------------------------------------------------------------------------+

See also
========

  * Fold -- Convert any complex or complex map into a ZZ/d-graded
    factorization (or map) for a fixed integer d
  * Making ZZdFactorizations -- Information
    about the basic constructors

Ways to use unfold:
===================

  * "unfold(ZZdFactorization,List)"
  * "unfold(ZZdFactorization,ZZ)"
  * "unfold(ZZdFactorizationMap,List)"
  * "unfold(ZZdFactorizationMap,ZZ)"

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

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

-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:5624:0.

WellDefined
***********

Functions with optional argument named WellDefined:
===================================================

  * randomTailMF(...,WellDefined=>...) (missing documentation)

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

The object WellDefined (missing documentation) is a symbol (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in currentString:1:386.

ZZdFactorization -- the class of all ZZ/d-graded factorizations
***************************************************************

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

A ZZ/d-graded factorization is a sequence of objects $C_i$, connected by maps
$dd^C_i : C_i \rightarrow C_{i-1}$ such that the composition of any d
consecutive maps is equal to a fixed scalar multiple of the identity.

In practice, a ZZdFactorization may be visualized as a sequence of R-module
maps:

$$F_0 \leftarrow F_1 \leftarrow \cdots \leftarrow F_{d-1}$$

with the caveat that $d^F_0 : F_0 \to F_{d-1}$, since one should count degree
modulo d. Any 2-periodic complex may be reinterpretted as a ZZ/2-graded
factorization of 0, and likewise a matrix factorization of a ring element f is
equivalently a ZZ/2-graded factorization of f. Because of their similarity with
complexes, much of the functionality and syntax for this package closely
resembles the "Complexes" package, with some key differences that we will
highlight below.

+----------------------------------------+
|i1 : Q = QQ[x_1..x_3];                  |
+----------------------------------------+
|i2 : F1 = ZZdfactorization {x_1,x_2}    |
|                                        |
|      1      1      1                   |
|o2 = Q  <-- Q  <-- Q                    |
|                                        |
|     0      1      0                    |
|                                        |
|o2 : ZZdFactorization                   |
+----------------------------------------+
|i3 : F1.dd                              |
|                                        |
|          1               1             |
|o3 = 1 : Q  <----------- Q  : 0         |
|               | x_2 |                  |
|                                        |
|          1               1             |
|     0 : Q  <----------- Q  : 1         |
|               | x_1 |                  |
|                                        |
|o3 : ZZdFactorizationMap                |
+----------------------------------------+
|i4 : F2 = ZZdfactorization {x_1,x_2,x_3}|
|                                        |
|      1      1      1      1            |
|o4 = Q  <-- Q  <-- Q  <-- Q             |
|                                        |
|     0      1      2      0             |
|                                        |
|o4 : ZZdFactorization                   |
+----------------------------------------+
|i5 : F2.dd                              |
|                                        |
|          1               1             |
|o5 = 2 : Q  <----------- Q  : 0         |
|               | x_3 |                  |
|                                        |
|          1               1             |
|     0 : Q  <----------- Q  : 1         |
|               | x_1 |                  |
|                                        |
|          1               1             |
|     1 : Q  <----------- Q  : 2         |
|               | x_2 |                  |
|                                        |
|o5 : ZZdFactorizationMap                |
+----------------------------------------+

Notice that in the above, both the modules and the differentials are displayed
modulo the period of the complex. Moreover, if the user tries to access the
data of the modules or differentials, this input is also taken modulo the
period:

+---------------------+
|i6 : F1_0            |
|                     |
|      1              |
|o6 = Q               |
|                     |
|o6 : Q-module, free  |
+---------------------+
|i7 : F1_2            |
|                     |
|      1              |
|o7 = Q               |
|                     |
|o7 : Q-module, free  |
+---------------------+
|i8 : F1.dd_123       |
|                     |
|o8 = | x_1 |         |
|                     |
|             1      1|
|o8 : Matrix Q  <-- Q |
+---------------------+

The package is implemented to not actually check for well-definedness of the
factorization (that is, it does not check if all of the differentials actually
compose to a scalar multiple of the identity). The user can check this by using
the isWellDefined and isdFactorization commands:

+------------------------+
|i9 : isdFactorization F2|
|                        |
|o9 = (true, x x x )     |
|             1 2 3      |
|                        |
|o9 : Sequence           |
+------------------------+

Much of the syntax and functionality of the types ZZdFactorization and
ZZdFactorizationMap are based on current functionalities for the analogous
objects in the Complexes package, so there should be essentially no learning
curve for users already familiar with working with chain complexes.

See also
========

  * Making ZZdFactorizations -- Information
    about the basic constructors
  * Making maps between factorizations
    -- information about the basic constructors
  * Basic invariants and properties, --
    information about accessing basic features
  * Preprogrammed examples and operations
    -- Information about the basic constructors

Functions and methods returning a ZZ/d graded factorization:
============================================================

  * "adjointFactorization(Matrix)" -- see adjointFactorization,
    -- Constructs matrix factorization of a determinant
    of a matrix
  * basis(List,ZZdFactorization) (missing documentation)
  * basis(ZZ,ZZdFactorization) (missing documentation)
  * "branchedToMF(Matrix)" -- see branchedToMF, -- Converts
    a maximal Cohen-Macaulay module over a d-fold branched cover into a d-fold
    factorization
  * "branchedToMF(Matrix,Ring)" -- see branchedToMF, --
    Converts a maximal Cohen-Macaulay module over a d-fold branched cover into
    a d-fold factorization
  * "branchedToMF(Module)" -- see branchedToMF, -- Converts
    a maximal Cohen-Macaulay module over a d-fold branched cover into a d-fold
    factorization
  * "branchedToMF(Module,Ring)" -- see branchedToMF, --
    Converts a maximal Cohen-Macaulay module over a d-fold branched cover into
    a d-fold factorization
  * coimage(ZZdFactorizationMap), --
    make the coimage of a map of ZZ/d-graded factorizations
  * cokernel(ZZdFactorizationMap), --
    make the cokernel of a map of ZZ/d-graded factorizations
  * cone(ZZdFactorizationMap) -- make the
    mapping cone of a morphism of ZZ/d-graded factorizations
  * "ZZdFactorization ++ ZZdFactorization" -- see
    directSum(ZZdFactorization), -- direct sum
    of ZZ/d-graded factorizations
  * dual(ZZdFactorization) -- make the dual
    of a ZZ/d-graded factorization
  * "dual(ZZdFactorization,RingElement)" -- see dual(ZZdFactorization),
    -- make the dual of a ZZ/d-graded factorization
  * "dual(ZZdFactorization,Symbol)" -- see dual(ZZdFactorization),
    -- make the dual of a ZZ/d-graded factorization
  * "eulerMF(RingElement)" -- see eulerMF, -- Construct a Koszul
    matrix factorization with respect to the Jacobian ideal
  * "fullCollapse(ZZdFactorization,ZZ,ZZ)" -- see fullCollapse,
    -- Converts a d-fold factorization into a 2-fold
    factorization
  * gradedModule(ZZdFactorization),
    -- a new ZZ/d-graded factorization in which the differential is zero
  * HH ZZdFactorization -- homology of a
    ZZ/d-graded factorization
  * Hom(Complex,ZZdFactorization),
    -- the ZZ/d-graded homomorphism factorization formed by folding the
    complex, then taking the ZZ/d-graded Hom factorization
  * "Hom(Complex,ZZdFactorization,RingElement)" -- see
    Hom(Complex,ZZdFactorization), -- the
    ZZ/d-graded homomorphism factorization formed by folding the complex, then
    taking the ZZ/d-graded Hom factorization
  * "Hom(Complex,ZZdFactorization,Symbol)" -- see
    Hom(Complex,ZZdFactorization), -- the
    ZZ/d-graded homomorphism factorization formed by folding the complex, then
    taking the ZZ/d-graded Hom factorization
  * "Hom(ZZdFactorization,Complex)" -- see Hom(Complex,ZZdFactorization),
    -- the ZZ/d-graded homomorphism
    factorization formed by folding the complex, then taking the ZZ/d-graded
    Hom factorization
  * "Hom(ZZdFactorization,Complex,RingElement)" -- see
    Hom(Complex,ZZdFactorization), -- the
    ZZ/d-graded homomorphism factorization formed by folding the complex, then
    taking the ZZ/d-graded Hom factorization
  * "Hom(ZZdFactorization,Complex,Symbol)" -- see
    Hom(Complex,ZZdFactorization), -- the
    ZZ/d-graded homomorphism factorization formed by folding the complex, then
    taking the ZZ/d-graded Hom factorization
  * "Hom(Module,ZZdFactorization)" -- see
    Hom(ZZdFactorization,ZZdFactorization),
    -- the ZZ/d-graded
    homomorphism factorization between two ZZ/d-graded factorizations
  * "Hom(ZZdFactorization,Module)" -- see
    Hom(ZZdFactorization,ZZdFactorization),
    -- the ZZ/d-graded
    homomorphism factorization between two ZZ/d-graded factorizations
  * "Hom(ZZdFactorization,Ring)" -- see
    Hom(ZZdFactorization,ZZdFactorization),
    -- the ZZ/d-graded
    homomorphism factorization between two ZZ/d-graded factorizations
  * Hom(ZZdFactorization,ZZdFactorization)
    -- the ZZ/d-graded
    homomorphism factorization between two ZZ/d-graded factorizations
  * "Hom(ZZdFactorization,Module,RingElement)" -- see
    Hom(ZZdFactorization,ZZdFactorization,Symbol),
    -- the ZZ/d-graded
    homomorphism factorization between two ZZ/d-graded factorizations
  * "Hom(ZZdFactorization,Module,Symbol)" -- see
    Hom(ZZdFactorization,ZZdFactorization,Symbol),
    -- the ZZ/d-graded
    homomorphism factorization between two ZZ/d-graded factorizations
  * "Hom(ZZdFactorization,ZZdFactorization,RingElement)" -- see
    Hom(ZZdFactorization,ZZdFactorization,Symbol),
    -- the ZZ/d-graded
    homomorphism factorization between two ZZ/d-graded factorizations
  * Hom(ZZdFactorization,ZZdFactorization,Symbol)
    -- the ZZ/d-graded
    homomorphism factorization between two ZZ/d-graded factorizations
  * image(ZZdFactorizationMap) -- make
    the image of a map of ZZ/d-graded factorizations
  * kernel(ZZdFactorizationMap) -- make
    the kernel of a map of ZZ/d-graded factorizations
  * "linearMF(RingElement)" -- see linearMF, -- Constructs a
    Koszul d-fold factorization of a homogeneous element of degree d
  * "linearMF(RingElement,RingElement)" -- see linearMF, --
    Constructs a Koszul d-fold factorization of a homogeneous element of degree
    d
  * "linearMF(RingElement,Symbol)" -- see linearMF, --
    Constructs a Koszul d-fold factorization of a homogeneous element of degree
    d
  * minimalPresentation(ZZdFactorization)
    -- minimal presentation of all
    terms in a ZZ/d-graded factorization
  * "prune(ZZdFactorization)" -- see
    minimalPresentation(ZZdFactorization),
    -- minimal presentation of all
    terms in a ZZ/d-graded factorization
  * "randomTailMF(RingElement)" -- see randomTailMF, --
    Construct a matrix factorization from a high syzygy of a random module over
    a hypersurface
  * "randomTailMF(RingElement,ZZ,ZZ)" -- see randomTailMF,
    -- Construct a matrix factorization from a high syzygy of a random module
    over a hypersurface
  * "randomTailMF(RingElement,ZZ,ZZ,ZZ)" -- see randomTailMF,
    -- Construct a matrix factorization from a high syzygy of a
    random module over a hypersurface
  * "ring(ZZdFactorizationMap)" -- see ring(ZZdFactorization),
    -- access the ring of a ZZ/d-graded
    factorization or a factorization map
  * "Ring ** ZZdFactorization" -- see RingMap ** ZZdFactorization,
    -- tensor a ZZ/d-graded factorization
    along a ring map
  * RingMap ** ZZdFactorization, --
    tensor a ZZ/d-graded factorization along a ring map
  * "tensor(RingMap,ZZdFactorization)" -- see RingMap ** ZZdFactorization,
    -- tensor a ZZ/d-graded
    factorization along a ring map
  * "tensor(ZZdFactorization,RingMap)" -- see RingMap ** ZZdFactorization,
    -- tensor a ZZ/d-graded
    factorization along a ring map
  * "ZZdFactorization ** Ring" -- see RingMap ** ZZdFactorization,
    -- tensor a ZZ/d-graded factorization
    along a ring map
  * "ZZdFactorization ** RingMap" -- see RingMap ** ZZdFactorization,
    -- tensor a ZZ/d-graded factorization
    along a ring map
  * RingMap ZZdFactorization -- apply a ring
    map
  * "rk1MCM2gen(List)" -- see rk1MCM2gen, -- Construct every
    possible rank 1, 2-generated maximal Cohen-Macaulay module over the cubic
    Fermat hypersurface in 4 variables
  * "rk1MCM2gen(List,ZZ)" -- see rk1MCM2gen, -- Construct
    every possible rank 1, 2-generated maximal Cohen-Macaulay module over the
    cubic Fermat hypersurface in 4 variables
  * source(ZZdFactorizationMap) -- get
    the source of a map of ZZ/d-graded factorizations
  * "suspension(ZZ,ZZdFactorization)" -- see suspension, --
    Constructs the suspension of a d-fold factorization
  * "suspension(ZZdFactorization)" -- see suspension, --
    Constructs the suspension of a d-fold factorization
  * "tailMF(Ideal)" -- see tailMF, -- Generate a ZZdFactorization
    from a module over a hypersurface ring
  * "tailMF(Module)" -- see tailMF, -- Generate a
    ZZdFactorization from a module over a hypersurface ring
  * target(ZZdFactorizationMap) -- get
    the target of a map of ZZ/d-graded factorizations
  * tensor(ZZdFactorization,ZZdFactorization,RingElement) (missing
    documentation)
  * tensor(ZZdFactorization,ZZdFactorization,Symbol) (missing documentation)
  * "trivialMF(Module,RingElement)" -- see trivialMF, --
    Constructs the trivial matrix factorization of an element f
  * "trivialMF(ZZ,Module,RingElement)" -- see trivialMF, --
    Constructs the trivial matrix factorization of an element f
  * "trivialMF(ZZ,ZZ,Module,RingElement)" -- see trivialMF, --
    Constructs the trivial matrix factorization of an element f
  * "trivialMF(ZZ,ZZ,Module,ZZ)" -- see trivialMF, --
    Constructs the trivial matrix factorization of an element f
  * truncate(List,ZZdFactorization) (missing documentation)
  * truncate(ZZ,ZZdFactorization) (missing documentation)
  * "ZZdfactorization(List)" -- see ZZdfactorization,
    -- make a ZZ/d-graded factorization
  * "Complex ** ZZdFactorization" -- see ZZdFactorization ** ZZdFactorization,
    -- tensor
    product of ZZ/d-graded factorizations
  * "Module ** ZZdFactorization" -- see ZZdFactorization ** ZZdFactorization,
    -- tensor
    product of ZZ/d-graded factorizations
  * "tensor(ZZdFactorization,ZZdFactorization)" -- see ZZdFactorization ** ZZdFactorization,
    -- tensor
    product of ZZ/d-graded factorizations
  * "ZZdFactorization ** Complex" -- see ZZdFactorization ** ZZdFactorization,
    -- tensor
    product of ZZ/d-graded factorizations
  * "ZZdFactorization ** Module" -- see ZZdFactorization ** ZZdFactorization,
    -- tensor
    product of ZZ/d-graded factorizations
  * ZZdFactorization ** ZZdFactorization
    -- tensor product of ZZ/d-graded factorizations
  * ZZdFactorization Array -- shift a
    ZZ/d-graded factorization or map of ZZ/d-graded factorizations
  * ZZdfactorization(HashTable) -- make
    a ZZ/d-graded factorization
  * "ZZdfactorization(Ideal,ZZ)" -- see ZZdfactorization(Module,ZZ),
    -- convert a module/ring/ideal into a
    ZZ/d-graded factorization for specified period d
  * ZZdfactorization(Module,ZZ), --
    convert a module/ring/ideal into a ZZ/d-graded factorization for specified
    period d
  * "ZZdfactorization(Ring,ZZ)" -- see ZZdfactorization(Module,ZZ),
    -- convert a module/ring/ideal into a
    ZZ/d-graded factorization for specified period d
  * ZZdfactorization(ZZdFactorization)
    -- make a ZZ/d-graded factorization
    with shifted base; used for permuting the modules without adding signs

Methods that use a ZZ/d graded factorization:
=============================================

  * "adjoinRoot(ZZdFactorization,RingElement)" -- see adjoinRoot,
    -- Adjoin a root of unity to the underlying object input
  * "adjoinRoot(ZZdFactorization,Symbol)" -- see adjoinRoot,
    -- Adjoin a root of unity to the underlying object input
  * "collapseMF(ZZdFactorization,ZZ)" -- see collapseMF, --
    Converts a d-fold factorization into a (d-1)-fold factorization by
    composing the kth differential with the (k+1)th differential
  * components(ZZdFactorization), --
    list the components of a direct sum
  * "Symbol ^ ZZdFactorization" -- see differential of a ZZ/d-graded factorization,
    -- get the maps
    between the terms in a ZZ/d-graded factorization
  * directSum(ZZdFactorization), --
    direct sum of ZZ/d-graded factorizations
  * euler(ZZdFactorization) -- Calculates
    the Euler characteristic of a ZZdFactorization
  * extend(ZZdFactorization,ZZdFactorization,Matrix) (missing documentation)
  * extend(ZZdFactorization,ZZdFactorization,Matrix,Sequence) (missing
    documentation)
  * HH_ZZ ZZdFactorization -- homology or
    cohomology module of a ZZ/d-graded factorization
  * "HH_ZZ(ZZ,ZZdFactorization)" -- see HH_ZZ ZZdFactorization,
    -- homology or cohomology module of a ZZ/d-graded
    factorization
  * "Hom(Ring,ZZdFactorization)" -- see
    Hom(ZZdFactorization,ZZdFactorization),
    -- the ZZ/d-graded
    homomorphism factorization between two ZZ/d-graded factorizations
  * "Hom(Matrix,ZZdFactorization)" -- see
    Hom(ZZdFactorizationMap,ZZdFactorizationMap),
    -- the map of
    factorizations between Hom complexes
  * "Hom(ZZdFactorization,Matrix)" -- see
    Hom(ZZdFactorizationMap,ZZdFactorizationMap),
    -- the map of
    factorizations between Hom complexes
  * "Hom(ZZdFactorization,ZZdFactorizationMap)" -- see
    Hom(ZZdFactorizationMap,ZZdFactorizationMap),
    -- the map of
    factorizations between Hom complexes
  * "Hom(ZZdFactorizationMap,ZZdFactorization)" -- see
    Hom(ZZdFactorizationMap,ZZdFactorizationMap),
    -- the map of
    factorizations between Hom complexes
  * "Hom(ZZdFactorization,Matrix,RingElement)" -- see
    Hom(ZZdFactorizationMap,ZZdFactorizationMap,Symbol),
    -- the map of
    factorizations between Hom complexes
  * "Hom(ZZdFactorization,Matrix,Symbol)" -- see
    Hom(ZZdFactorizationMap,ZZdFactorizationMap,Symbol),
    -- the map of
    factorizations between Hom complexes
  * "Hom(ZZdFactorization,ZZdFactorizationMap,RingElement)" -- see
    Hom(ZZdFactorizationMap,ZZdFactorizationMap,Symbol),
    -- the map of
    factorizations between Hom complexes
  * "Hom(ZZdFactorization,ZZdFactorizationMap,Symbol)" -- see
    Hom(ZZdFactorizationMap,ZZdFactorizationMap,Symbol),
    -- the map of
    factorizations between Hom complexes
  * "Hom(ZZdFactorizationMap,ZZdFactorization,RingElement)" -- see
    Hom(ZZdFactorizationMap,ZZdFactorizationMap,Symbol),
    -- the map of
    factorizations between Hom complexes
  * "Hom(ZZdFactorizationMap,ZZdFactorization,Symbol)" -- see
    Hom(ZZdFactorizationMap,ZZdFactorizationMap,Symbol),
    -- the map of
    factorizations between Hom complexes
  * homomorphism(ZZ,Matrix,ZZdFactorization)
    -- get the homomorphism
    from an element of Hom
  * inducedMap(ZZdFactorization,ZZdFactorization)
    -- make the map of
    ZZ/d-graded factorizations induced at each term by the identity map
  * inducedMap(ZZdFactorization,ZZdFactorization,ZZdFactorizationMap) (missing
    documentation)
  * "injectiveCover(ZZdFactorization)" -- see injectiveCover,
    -- Constructs the injective hull of a d-fold matrix
    factorization
  * "isdFactorization(ZZdFactorization)" -- see isdFactorization,
    -- Checks if the differentials of a factorization compose
    to a scalar multiple of the identity
  * isFree(ZZdFactorization) -- whether a
    ZZ/d-graded factorization consists of free modules
  * isWellDefined(ZZdFactorization),
    -- whether a ZZ/d-graded factorization is well-defined
  * "isZZdComplex(ZZdFactorization)" -- see isZZdComplex,
    -- Checks if the differentials of a factorization compose to 0
  * map(ZZdFactorization,ZZdFactorization,Function) (missing documentation)
  * map(ZZdFactorization,ZZdFactorization,HashTable)
    -- make a map of
    ZZ/d-graded factorizations
  * map(ZZdFactorization,ZZdFactorization,List) (missing documentation)
  * map(ZZdFactorization,ZZdFactorization,ZZ)
    -- make the zero map or
    identity between ZZ/d-graded factorizations
  * map(ZZdFactorization,ZZdFactorization,ZZdFactorizationMap)
    -- make
    a new map of ZZ/d-graded factorizations from an existing one (for inducing
    maps)
  * net(ZZdFactorization) (missing documentation)
  * "period(ZZdFactorization)" -- see period, -- the period of a
    ZZ/d-graded factorization or map
  * "potential(ZZdFactorization)" -- see potential, -- Outputs
    the polynomial $f$ such that the dth power of the differentials is equal to
    $ f \cdot \text{id}$
  * "projectiveCover(ZZdFactorization)" -- see projectiveCover,
    -- Constructs the projective cover of a d-fold matrix
    factorization
  * "randomFactorizationMap(ZZdFactorization,ZZdFactorization)" -- see
    randomFactorizationMap, -- a random map of
    ZZ/d-graded factorizations
  * ring(ZZdFactorization) -- access the
    ring of a ZZ/d-graded factorization or a factorization map
  * support(ZZdFactorization) (missing documentation)
  * tensorAssociativity(ZZdFactorization,ZZdFactorization, ZZdFactorization)
    -- make the canonical isomorphism
    arising from associativity
  * tensorCommutativity(ZZdFactorization,ZZdFactorization)
    -- make the
    canonical isomorphism arising from commutativity of the tensor product
    operation
  * "toBranchedCover(ZZdFactorization,RingElement)" -- see
    toBranchedCover, -- Converts a d-fold matrix factorization
    into a maximal Cohen-Macaulay module over a d-fold branched cover of the
    potential
  * "toBranchedCover(ZZdFactorization,Symbol)" -- see toBranchedCover,
    -- Converts a d-fold matrix factorization into a maximal
    Cohen-Macaulay module over a d-fold branched cover of the potential
  * "zeroOutDegrees(ZZdFactorization)" -- see toBranchedCover,
    -- Converts a d-fold matrix factorization into a maximal
    Cohen-Macaulay module over a d-fold branched cover of the potential
  * "unfold(ZZdFactorization,List)" -- see unfold, -- Converts a
    factorization into a complex
  * "unfold(ZZdFactorization,ZZ)" -- see unfold, -- Converts a
    factorization into a complex
  * "Matrix ** ZZdFactorization" -- see ZZdFactorization ** Matrix,
    -- create the tensor product of a
    ZZ/d-graded factorization and a map of modules
  * ZZdFactorization ** Matrix -- create
    the tensor product of a ZZ/d-graded factorization and a map of modules
  * "ZZ == ZZdFactorization" -- see ZZdFactorization == ZZdFactorization,
    -- whether two ZZ/d-graded
    factorizations are equal
  * "ZZdFactorization == ZZ" -- see ZZdFactorization == ZZdFactorization,
    -- whether two ZZ/d-graded
    factorizations are equal
  * ZZdFactorization == ZZdFactorization
    -- whether two ZZ/d-graded factorizations are equal
  * "ZZdFactorization ^ Array" -- see ZZdFactorization _ Array,
    -- the canonical inclusion or projection map of
    a direct sum
  * ZZdFactorization _ Array -- the
    canonical inclusion or projection map of a direct sum
  * "ZZdFactorization ^ ZZ" -- see ZZdFactorization _ ZZ,
    -- access individual object in a ZZ/d-graded
    factorization
  * ZZdFactorization _ ZZ -- access individual
    object in a ZZ/d-graded factorization
  * "ZZdFactorization ** ZZdFactorizationMap" -- see ZZdFactorizationMap ** ZZdFactorizationMap,
    --
    the map of ZZ/d-graded factorizations between tensor factorizations
  * "ZZdFactorizationMap ** ZZdFactorization" -- see ZZdFactorizationMap ** ZZdFactorizationMap,
    --
    the map of ZZ/d-graded factorizations between tensor factorizations

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

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

-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:400:0.

ZZdfactorization -- make a ZZ/d-graded factorization
****************************************************

  * Usage:
        ZZdfactorization L
  * Inputs:
      * L, a list (Macaulay2Doc), of maps
  * Optional inputs (Macaulay2Doc),:
      * Base (missing documentation) => an integer (Macaulay2Doc),
        default value 0, the index of the target of the first map in the
        differential.
  * Outputs:
      * a ZZ/d graded factorization,

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

A ZZ/d-graded factorization is a sequence of objects $C_i$, connected by maps
$dd^C_i : C_i \rightarrow C_{i-1}$ such that the composition of any d
consecutive maps is equal to a fixed scalar multiple of the identity.

In practice, a ZZdFactorization may be visualized as a sequence of R-module
maps:

$$F_0 \leftarrow F_1 \leftarrow \cdots \leftarrow F_{d-1}$$

with the caveat that $d^F_0 : F_0 \to F_{d-1}$, since one should count degree
modulo d.

Often, a factorization is most easily described by giving a list of consecutive
maps which form the differentials. If the list consists entirely of ring
elements, the constructor will recognize that the user intends to use scalar
multiplication as the maps in the factorization.

+------------------------------------+
|i1 : S = ZZ/101[a..d]               |
|                                    |
|o1 = S                              |
|                                    |
|o1 : PolynomialRing                 |
+------------------------------------+
|i2 : C1 = ZZdfactorization {a,b}    |
|                                    |
|      1      1      1               |
|o2 = S  <-- S  <-- S                |
|                                    |
|     0      1      0                |
|                                    |
|o2 : ZZdFactorization               |
+------------------------------------+
|i3 : C2 = ZZdfactorization {a,b,c}  |
|                                    |
|      1      1      1      1        |
|o3 = S  <-- S  <-- S  <-- S         |
|                                    |
|     0      1      2      0         |
|                                    |
|o3 : ZZdFactorization               |
+------------------------------------+
|i4 : C3 = ZZdfactorization {a,b,c,d}|
|                                    |
|      1      1      1      1      1 |
|o4 = S  <-- S  <-- S  <-- S  <-- S  |
|                                    |
|     0      1      2      3      0  |
|                                    |
|o4 : ZZdFactorization               |
+------------------------------------+
|i5 : period C1                      |
|                                    |
|o5 = 2                              |
+------------------------------------+
|i6 : period C2                      |
|                                    |
|o6 = 3                              |
+------------------------------------+
|i7 : period C3                      |
|                                    |
|o7 = 4                              |
+------------------------------------+
|i8 : isdFactorization C1            |
|                                    |
|o8 = (true, a*b)                    |
|                                    |
|o8 : Sequence                       |
+------------------------------------+
|i9 : isdFactorization C2            |
|                                    |
|o9 = (true, a*b*c)                  |
|                                    |
|o9 : Sequence                       |
+------------------------------------+
|i10 : isdFactorization C3           |
|                                    |
|o10 = (true, a*b*c*d)               |
|                                    |
|o10 : Sequence                      |
+------------------------------------+

To start a factorization at a base different from zero, use the optional
argument Base.

+---------------------------------------------+
|i11 : D1 = ZZdfactorization({a,b}, Base => 1)|
|                                             |
|       1      1      1                       |
|o11 = S  <-- S  <-- S                        |
|                                             |
|      0      1      0                        |
|                                             |
|o11 : ZZdFactorization                       |
+---------------------------------------------+
|i12 : isWellDefined D1                       |
|                                             |
|o12 = true                                   |
+---------------------------------------------+
|i13 : isdFactorization D1                    |
|                                             |
|o13 = (true, a*b)                            |
|                                             |
|o13 : Sequence                               |
+---------------------------------------------+

Notice that this changes the homological degrees of the maps, but is not the
same as the shift of the factorization (which will rescale the maps by roots of
unity in general).

+-------------------------------+
|i14 : dd^C1                    |
|                               |
|           1             1     |
|o14 = 1 : S  <--------- S  : 0 |
|                | b |          |
|                               |
|           1             1     |
|      0 : S  <--------- S  : 1 |
|                | a |          |
|                               |
|o14 : ZZdFactorizationMap      |
+-------------------------------+
|i15 : dd^(D1[-1])              |
|                               |
|           1              1    |
|o15 = 1 : S  <---------- S  : 0|
|                | -b |         |
|                               |
|           1              1    |
|      0 : S  <---------- S  : 1|
|                | -a |         |
|                               |
|o15 : ZZdFactorizationMap      |
+-------------------------------+

Having constructed this factorization, we can access individual terms and maps.

+------------------------------+
|i16 : C1_2                    |
|                              |
|       1                      |
|o16 = S                       |
|                              |
|o16 : S-module, free          |
+------------------------------+
|i17 : C1^(-1)                 |
|                              |
|       1                      |
|o17 = S                       |
|                              |
|o17 : S-module, free          |
+------------------------------+
|i18 : C1^(-1) == C1_1         |
|                              |
|o18 = true                    |
+------------------------------+
|i19 : C1_7                    |
|                              |
|       1                      |
|o19 = S                       |
|                              |
|o19 : S-module, free          |
+------------------------------+
|i20 : dd^C1                   |
|                              |
|           1             1    |
|o20 = 1 : S  <--------- S  : 0|
|                | b |         |
|                              |
|           1             1    |
|      0 : S  <--------- S  : 1|
|                | a |         |
|                              |
|o20 : ZZdFactorizationMap     |
+------------------------------+
|i21 : dd^C1_2                 |
|                              |
|o21 = | b |                   |
|                              |
|              1      1        |
|o21 : Matrix S  <-- S         |
+------------------------------+
|i22 : period C1               |
|                              |
|o22 = 2                       |
+------------------------------+

Caveat
======

This constructor minimizes computation and does very little error checking. To
verify that a factorization is well constructed, use
isWellDefined(ZZdFactorization).

See also
========

  * Making ZZdFactorizations -- Information
    about the basic constructors
  * isWellDefined(ZZdFactorization),
    -- whether a ZZ/d-graded factorization is well-defined
  * ZZdfactorization(HashTable) -- make
    a ZZ/d-graded factorization
  * ZZdFactorization Array -- shift a
    ZZ/d-graded factorization or map of ZZ/d-graded factorizations

Ways to use ZZdfactorization:
=============================

  * "ZZdfactorization(List)"
  * ZZdfactorization(HashTable) -- make
    a ZZ/d-graded factorization
  * "ZZdfactorization(Ideal,ZZ)" -- see ZZdfactorization(Module,ZZ),
    -- convert a module/ring/ideal into a
    ZZ/d-graded factorization for specified period d
  * ZZdfactorization(Module,ZZ), --
    convert a module/ring/ideal into a ZZ/d-graded factorization for specified
    period d
  * "ZZdfactorization(Ring,ZZ)" -- see ZZdfactorization(Module,ZZ),
    -- convert a module/ring/ideal into a
    ZZ/d-graded factorization for specified period d
  * ZZdfactorization(ZZdFactorization)
    -- make a ZZ/d-graded factorization
    with shifted base; used for permuting the modules without adding signs

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

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

-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:620:0.

ZZdFactorization ** Matrix -- create the tensor product of a ZZ/d-graded factorization and a map of modules
***********************************************************************************************************

  * Operator: ** (Macaulay2Doc),
  * Usage:
        h = C ** f
        h = f ** C
  * Inputs:
      * C, a ZZ/d graded factorization, over a ring
        $R$
      * f, a matrix (Macaulay2Doc), defining a homomorphism from
        the $R$-module $M$ to the $R$-module $N$
  * Outputs:
      * h, a map of ZZ/d-graded factorizations,
        from $C \otimes M$ to $C \otimes N$

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

For any ZZ/d-graded factorization map $C$, a map $f \colon M \to N$ of
$R$-modules induces a morphism $C \otimes f$ of ZZ/d-graded factorizations from
$C \otimes M$ to $C \otimes N$.  This method returns this map of
factorizations.

+-----------------------------------------------------------------------------+
|i1 : R = ZZ/101[a..d];                                                       |
+-----------------------------------------------------------------------------+
|i2 : I = ideal(c^2-b*d, b*c-a*d, b^2-a*c)                                    |
|                                                                             |
|             2                    2                                          |
|o2 = ideal (c  - b*d, b*c - a*d, b  - a*c)                                   |
|                                                                             |
|o2 : Ideal of R                                                              |
+-----------------------------------------------------------------------------+
|i3 : J = ideal(I_0, I_1)                                                     |
|                                                                             |
|             2                                                               |
|o3 = ideal (c  - b*d, b*c - a*d)                                             |
|                                                                             |
|o3 : Ideal of R                                                              |
+-----------------------------------------------------------------------------+
|i4 : C = koszulMF({a,b,c,d}, a^3+b^3+c^3+d^3)                                |
|                                                                             |
|      8      8      8                                                        |
|o4 = R  <-- R  <-- R                                                         |
|                                                                             |
|     0      1      0                                                         |
|                                                                             |
|o4 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i5 : f = map(R^1/I, R^1/J, 1)                                                |
|                                                                             |
|o5 = | 1 |                                                                   |
|                                                                             |
|o5 : Matrix                                                                  |
+-----------------------------------------------------------------------------+
|i6 : C ** f                                                                  |
|                                                                             |
|o6 = 0 : cokernel | c2-bd bc-ad b2-ac 0     0     0     0     0     0        |
|                  | 0     0     0     c2-bd bc-ad b2-ac 0     0     0        |
|                  | 0     0     0     0     0     0     c2-bd bc-ad b2-ac    |
|                  | 0     0     0     0     0     0     0     0     0        |
|                  | 0     0     0     0     0     0     0     0     0        |
|                  | 0     0     0     0     0     0     0     0     0        |
|                  | 0     0     0     0     0     0     0     0     0        |
|                  | 0     0     0     0     0     0     0     0     0        |
|                                                                             |
|                                                                             |
|     1 : cokernel | c2-bd bc-ad b2-ac 0     0     0     0     0     0        |
|                  | 0     0     0     c2-bd bc-ad b2-ac 0     0     0        |
|                  | 0     0     0     0     0     0     c2-bd bc-ad b2-ac    |
|                  | 0     0     0     0     0     0     0     0     0        |
|                  | 0     0     0     0     0     0     0     0     0        |
|                  | 0     0     0     0     0     0     0     0     0        |
|                  | 0     0     0     0     0     0     0     0     0        |
|                  | 0     0     0     0     0     0     0     0     0        |
|                                                                             |
|                                                                             |
|o6 : ZZdFactorizationMap                                                     |
|-----------------------------------------------------------------------------|
|0     0     0     0     0     0     0     0     0     0     0     0     0    |
|0     0     0     0     0     0     0     0     0     0     0     0     0    |
|0     0     0     0     0     0     0     0     0     0     0     0     0    |
|c2-bd bc-ad b2-ac 0     0     0     0     0     0     0     0     0     0    |
|0     0     0     c2-bd bc-ad b2-ac 0     0     0     0     0     0     0    |
|0     0     0     0     0     0     c2-bd bc-ad b2-ac 0     0     0     0    |
|0     0     0     0     0     0     0     0     0     c2-bd bc-ad b2-ac 0    |
|0     0     0     0     0     0     0     0     0     0     0     0     c2-bd|
|                                                                             |
|                                                                             |
|0     0     0     0     0     0     0     0     0     0     0     0     0    |
|0     0     0     0     0     0     0     0     0     0     0     0     0    |
|0     0     0     0     0     0     0     0     0     0     0     0     0    |
|c2-bd bc-ad b2-ac 0     0     0     0     0     0     0     0     0     0    |
|0     0     0     c2-bd bc-ad b2-ac 0     0     0     0     0     0     0    |
|0     0     0     0     0     0     c2-bd bc-ad b2-ac 0     0     0     0    |
|0     0     0     0     0     0     0     0     0     c2-bd bc-ad b2-ac 0    |
|0     0     0     0     0     0     0     0     0     0     0     0     c2-bd|
|                                                                             |
|-----------------------------------------------------------------------------|
|0     0     | <----------------------- cokernel | c2-bd bc-ad 0     0        |
|0     0     |    | 1 0 0 0 0 0 0 0 |            | 0     0     c2-bd bc-ad    |
|0     0     |    | 0 1 0 0 0 0 0 0 |            | 0     0     0     0        |
|0     0     |    | 0 0 1 0 0 0 0 0 |            | 0     0     0     0        |
|0     0     |    | 0 0 0 1 0 0 0 0 |            | 0     0     0     0        |
|0     0     |    | 0 0 0 0 1 0 0 0 |            | 0     0     0     0        |
|0     0     |    | 0 0 0 0 0 1 0 0 |            | 0     0     0     0        |
|bc-ad b2-ac |    | 0 0 0 0 0 0 1 0 |            | 0     0     0     0        |
|                 | 0 0 0 0 0 0 0 1 |                                         |
|                                                                             |
|0     0     | <----------------------- cokernel | c2-bd bc-ad 0     0        |
|0     0     |    | 1 0 0 0 0 0 0 0 |            | 0     0     c2-bd bc-ad    |
|0     0     |    | 0 1 0 0 0 0 0 0 |            | 0     0     0     0        |
|0     0     |    | 0 0 1 0 0 0 0 0 |            | 0     0     0     0        |
|0     0     |    | 0 0 0 1 0 0 0 0 |            | 0     0     0     0        |
|0     0     |    | 0 0 0 0 1 0 0 0 |            | 0     0     0     0        |
|0     0     |    | 0 0 0 0 0 1 0 0 |            | 0     0     0     0        |
|bc-ad b2-ac |    | 0 0 0 0 0 0 1 0 |            | 0     0     0     0        |
|                 | 0 0 0 0 0 0 0 1 |                                         |
|-----------------------------------------------------------------------------|
|0     0     0     0     0     0     0     0     0     0     0     0     | : 0|
|0     0     0     0     0     0     0     0     0     0     0     0     |    |
|c2-bd bc-ad 0     0     0     0     0     0     0     0     0     0     |    |
|0     0     c2-bd bc-ad 0     0     0     0     0     0     0     0     |    |
|0     0     0     0     c2-bd bc-ad 0     0     0     0     0     0     |    |
|0     0     0     0     0     0     c2-bd bc-ad 0     0     0     0     |    |
|0     0     0     0     0     0     0     0     c2-bd bc-ad 0     0     |    |
|0     0     0     0     0     0     0     0     0     0     c2-bd bc-ad |    |
|                                                                             |
|                                                                             |
|0     0     0     0     0     0     0     0     0     0     0     0     | : 1|
|0     0     0     0     0     0     0     0     0     0     0     0     |    |
|c2-bd bc-ad 0     0     0     0     0     0     0     0     0     0     |    |
|0     0     c2-bd bc-ad 0     0     0     0     0     0     0     0     |    |
|0     0     0     0     c2-bd bc-ad 0     0     0     0     0     0     |    |
|0     0     0     0     0     0     c2-bd bc-ad 0     0     0     0     |    |
|0     0     0     0     0     0     0     0     c2-bd bc-ad 0     0     |    |
|0     0     0     0     0     0     0     0     0     0     c2-bd bc-ad |    |
+-----------------------------------------------------------------------------+
|i7 : f ** C                                                                  |
|                                                                             |
|o7 = 0 : cokernel | c2-bd 0     0     0     0     0     0     0     bc-ad    |
|                  | 0     c2-bd 0     0     0     0     0     0     0        |
|                  | 0     0     c2-bd 0     0     0     0     0     0        |
|                  | 0     0     0     c2-bd 0     0     0     0     0        |
|                  | 0     0     0     0     c2-bd 0     0     0     0        |
|                  | 0     0     0     0     0     c2-bd 0     0     0        |
|                  | 0     0     0     0     0     0     c2-bd 0     0        |
|                  | 0     0     0     0     0     0     0     c2-bd 0        |
|                                                                             |
|                                                                             |
|     1 : cokernel | c2-bd 0     0     0     0     0     0     0     bc-ad    |
|                  | 0     c2-bd 0     0     0     0     0     0     0        |
|                  | 0     0     c2-bd 0     0     0     0     0     0        |
|                  | 0     0     0     c2-bd 0     0     0     0     0        |
|                  | 0     0     0     0     c2-bd 0     0     0     0        |
|                  | 0     0     0     0     0     c2-bd 0     0     0        |
|                  | 0     0     0     0     0     0     c2-bd 0     0        |
|                  | 0     0     0     0     0     0     0     c2-bd 0        |
|                                                                             |
|                                                                             |
|o7 : ZZdFactorizationMap                                                     |
|-----------------------------------------------------------------------------|
|0     0     0     0     0     0     0     b2-ac 0     0     0     0     0    |
|bc-ad 0     0     0     0     0     0     0     b2-ac 0     0     0     0    |
|0     bc-ad 0     0     0     0     0     0     0     b2-ac 0     0     0    |
|0     0     bc-ad 0     0     0     0     0     0     0     b2-ac 0     0    |
|0     0     0     bc-ad 0     0     0     0     0     0     0     b2-ac 0    |
|0     0     0     0     bc-ad 0     0     0     0     0     0     0     b2-ac|
|0     0     0     0     0     bc-ad 0     0     0     0     0     0     0    |
|0     0     0     0     0     0     bc-ad 0     0     0     0     0     0    |
|                                                                             |
|                                                                             |
|0     0     0     0     0     0     0     b2-ac 0     0     0     0     0    |
|bc-ad 0     0     0     0     0     0     0     b2-ac 0     0     0     0    |
|0     bc-ad 0     0     0     0     0     0     0     b2-ac 0     0     0    |
|0     0     bc-ad 0     0     0     0     0     0     0     b2-ac 0     0    |
|0     0     0     bc-ad 0     0     0     0     0     0     0     b2-ac 0    |
|0     0     0     0     bc-ad 0     0     0     0     0     0     0     b2-ac|
|0     0     0     0     0     bc-ad 0     0     0     0     0     0     0    |
|0     0     0     0     0     0     bc-ad 0     0     0     0     0     0    |
|                                                                             |
|-----------------------------------------------------------------------------|
|0     0     | <----------------------- cokernel | c2-bd 0     0     0        |
|0     0     |    | 1 0 0 0 0 0 0 0 |            | 0     c2-bd 0     0        |
|0     0     |    | 0 1 0 0 0 0 0 0 |            | 0     0     c2-bd 0        |
|0     0     |    | 0 0 1 0 0 0 0 0 |            | 0     0     0     c2-bd    |
|0     0     |    | 0 0 0 1 0 0 0 0 |            | 0     0     0     0        |
|0     0     |    | 0 0 0 0 1 0 0 0 |            | 0     0     0     0        |
|b2-ac 0     |    | 0 0 0 0 0 1 0 0 |            | 0     0     0     0        |
|0     b2-ac |    | 0 0 0 0 0 0 1 0 |            | 0     0     0     0        |
|                 | 0 0 0 0 0 0 0 1 |                                         |
|                                                                             |
|0     0     | <----------------------- cokernel | c2-bd 0     0     0        |
|0     0     |    | 1 0 0 0 0 0 0 0 |            | 0     c2-bd 0     0        |
|0     0     |    | 0 1 0 0 0 0 0 0 |            | 0     0     c2-bd 0        |
|0     0     |    | 0 0 1 0 0 0 0 0 |            | 0     0     0     c2-bd    |
|0     0     |    | 0 0 0 1 0 0 0 0 |            | 0     0     0     0        |
|0     0     |    | 0 0 0 0 1 0 0 0 |            | 0     0     0     0        |
|b2-ac 0     |    | 0 0 0 0 0 1 0 0 |            | 0     0     0     0        |
|0     b2-ac |    | 0 0 0 0 0 0 1 0 |            | 0     0     0     0        |
|                 | 0 0 0 0 0 0 0 1 |                                         |
|-----------------------------------------------------------------------------|
|0     0     0     0     bc-ad 0     0     0     0     0     0     0     | : 0|
|0     0     0     0     0     bc-ad 0     0     0     0     0     0     |    |
|0     0     0     0     0     0     bc-ad 0     0     0     0     0     |    |
|0     0     0     0     0     0     0     bc-ad 0     0     0     0     |    |
|c2-bd 0     0     0     0     0     0     0     bc-ad 0     0     0     |    |
|0     c2-bd 0     0     0     0     0     0     0     bc-ad 0     0     |    |
|0     0     c2-bd 0     0     0     0     0     0     0     bc-ad 0     |    |
|0     0     0     c2-bd 0     0     0     0     0     0     0     bc-ad |    |
|                                                                             |
|                                                                             |
|0     0     0     0     bc-ad 0     0     0     0     0     0     0     | : 1|
|0     0     0     0     0     bc-ad 0     0     0     0     0     0     |    |
|0     0     0     0     0     0     bc-ad 0     0     0     0     0     |    |
|0     0     0     0     0     0     0     bc-ad 0     0     0     0     |    |
|c2-bd 0     0     0     0     0     0     0     bc-ad 0     0     0     |    |
|0     c2-bd 0     0     0     0     0     0     0     bc-ad 0     0     |    |
|0     0     c2-bd 0     0     0     0     0     0     0     bc-ad 0     |    |
|0     0     0     c2-bd 0     0     0     0     0     0     0     bc-ad |    |
+-----------------------------------------------------------------------------+
|i8 : f' = random(R^2, R^{-1, -1, -1})                                        |
|                                                                             |
|o8 = | 24a-36b-30c-29d -8a-22b-29c-24d  34a+19b-47c-39d  |                   |
|     | 19a+19b-10c-29d -38a-16b+39c+21d -18a-13b-43c-15d |                   |
|                                                                             |
|             2      3                                                        |
|o8 : Matrix R  <-- R                                                         |
+-----------------------------------------------------------------------------+
|i9 : C ** f'                                                                 |
|                                                                             |
|          16                                                                 |
|o9 = 0 : R   <---------------------------------------------------------------|
|                | 24a-36b-30c-29d -8a-22b-29c-24d  34a+19b-47c-39d  0        |
|                | 19a+19b-10c-29d -38a-16b+39c+21d -18a-13b-43c-15d 0        |
|                | 0               0                0                24a-36b-3|
|                | 0               0                0                19a+19b-1|
|                | 0               0                0                0        |
|                | 0               0                0                0        |
|                | 0               0                0                0        |
|                | 0               0                0                0        |
|                | 0               0                0                0        |
|                | 0               0                0                0        |
|                | 0               0                0                0        |
|                | 0               0                0                0        |
|                | 0               0                0                0        |
|                | 0               0                0                0        |
|                | 0               0                0                0        |
|                | 0               0                0                0        |
|                                                                             |
|          16                                                                 |
|     1 : R   <---------------------------------------------------------------|
|                | 24a-36b-30c-29d -8a-22b-29c-24d  34a+19b-47c-39d  0        |
|                | 19a+19b-10c-29d -38a-16b+39c+21d -18a-13b-43c-15d 0        |
|                | 0               0                0                24a-36b-3|
|                | 0               0                0                19a+19b-1|
|                | 0               0                0                0        |
|                | 0               0                0                0        |
|                | 0               0                0                0        |
|                | 0               0                0                0        |
|                | 0               0                0                0        |
|                | 0               0                0                0        |
|                | 0               0                0                0        |
|                | 0               0                0                0        |
|                | 0               0                0                0        |
|                | 0               0                0                0        |
|                | 0               0                0                0        |
|                | 0               0                0                0        |
|                                                                             |
|o9 : ZZdFactorizationMap                                                     |
|-----------------------------------------------------------------------------|
|                                                                             |
|-----------------------------------------------------------------------------|
|       0                0                0               0                0  |
|       0                0                0               0                0  |
|0c-29d -8a-22b-29c-24d  34a+19b-47c-39d  0               0                0  |
|0c-29d -38a-16b+39c+21d -18a-13b-43c-15d 0               0                0  |
|       0                0                24a-36b-30c-29d -8a-22b-29c-24d  34a|
|       0                0                19a+19b-10c-29d -38a-16b+39c+21d -18|
|       0                0                0               0                0  |
|       0                0                0               0                0  |
|       0                0                0               0                0  |
|       0                0                0               0                0  |
|       0                0                0               0                0  |
|       0                0                0               0                0  |
|       0                0                0               0                0  |
|       0                0                0               0                0  |
|       0                0                0               0                0  |
|       0                0                0               0                0  |
|                                                                             |
|                                                                             |
|-----------------------------------------------------------------------------|
|       0                0                0               0                0  |
|       0                0                0               0                0  |
|0c-29d -8a-22b-29c-24d  34a+19b-47c-39d  0               0                0  |
|0c-29d -38a-16b+39c+21d -18a-13b-43c-15d 0               0                0  |
|       0                0                24a-36b-30c-29d -8a-22b-29c-24d  34a|
|       0                0                19a+19b-10c-29d -38a-16b+39c+21d -18|
|       0                0                0               0                0  |
|       0                0                0               0                0  |
|       0                0                0               0                0  |
|       0                0                0               0                0  |
|       0                0                0               0                0  |
|       0                0                0               0                0  |
|       0                0                0               0                0  |
|       0                0                0               0                0  |
|       0                0                0               0                0  |
|       0                0                0               0                0  |
|-----------------------------------------------------------------------------|
|                                                                             |
|-----------------------------------------------------------------------------|
|              0               0                0                0            |
|              0               0                0                0            |
|              0               0                0                0            |
|              0               0                0                0            |
|+19b-47c-39d  0               0                0                0            |
|a-13b-43c-15d 0               0                0                0            |
|              24a-36b-30c-29d -8a-22b-29c-24d  34a+19b-47c-39d  0            |
|              19a+19b-10c-29d -38a-16b+39c+21d -18a-13b-43c-15d 0            |
|              0               0                0                24a-36b-30c-2|
|              0               0                0                19a+19b-10c-2|
|              0               0                0                0            |
|              0               0                0                0            |
|              0               0                0                0            |
|              0               0                0                0            |
|              0               0                0                0            |
|              0               0                0                0            |
|                                                                             |
|                                                                             |
|-----------------------------------------------------------------------------|
|              0               0                0                0            |
|              0               0                0                0            |
|              0               0                0                0            |
|              0               0                0                0            |
|+19b-47c-39d  0               0                0                0            |
|a-13b-43c-15d 0               0                0                0            |
|              24a-36b-30c-29d -8a-22b-29c-24d  34a+19b-47c-39d  0            |
|              19a+19b-10c-29d -38a-16b+39c+21d -18a-13b-43c-15d 0            |
|              0               0                0                24a-36b-30c-2|
|              0               0                0                19a+19b-10c-2|
|              0               0                0                0            |
|              0               0                0                0            |
|              0               0                0                0            |
|              0               0                0                0            |
|              0               0                0                0            |
|              0               0                0                0            |
|-----------------------------------------------------------------------------|
|                                                                             |
|-----------------------------------------------------------------------------|
|   0                0                0               0                0      |
|   0                0                0               0                0      |
|   0                0                0               0                0      |
|   0                0                0               0                0      |
|   0                0                0               0                0      |
|   0                0                0               0                0      |
|   0                0                0               0                0      |
|   0                0                0               0                0      |
|9d -8a-22b-29c-24d  34a+19b-47c-39d  0               0                0      |
|9d -38a-16b+39c+21d -18a-13b-43c-15d 0               0                0      |
|   0                0                24a-36b-30c-29d -8a-22b-29c-24d  34a+19b|
|   0                0                19a+19b-10c-29d -38a-16b+39c+21d -18a-13|
|   0                0                0               0                0      |
|   0                0                0               0                0      |
|   0                0                0               0                0      |
|   0                0                0               0                0      |
|                                                                             |
|                                                                             |
|-----------------------------------------------------------------------------|
|   0                0                0               0                0      |
|   0                0                0               0                0      |
|   0                0                0               0                0      |
|   0                0                0               0                0      |
|   0                0                0               0                0      |
|   0                0                0               0                0      |
|   0                0                0               0                0      |
|   0                0                0               0                0      |
|9d -8a-22b-29c-24d  34a+19b-47c-39d  0               0                0      |
|9d -38a-16b+39c+21d -18a-13b-43c-15d 0               0                0      |
|   0                0                24a-36b-30c-29d -8a-22b-29c-24d  34a+19b|
|   0                0                19a+19b-10c-29d -38a-16b+39c+21d -18a-13|
|   0                0                0               0                0      |
|   0                0                0               0                0      |
|   0                0                0               0                0      |
|   0                0                0               0                0      |
|-----------------------------------------------------------------------------|
|                                                                             |
|-----------------------------------------------------------------------------|
|          0               0                0                0               0|
|          0               0                0                0               0|
|          0               0                0                0               0|
|          0               0                0                0               0|
|          0               0                0                0               0|
|          0               0                0                0               0|
|          0               0                0                0               0|
|          0               0                0                0               0|
|          0               0                0                0               0|
|          0               0                0                0               0|
|-47c-39d  0               0                0                0               0|
|b-43c-15d 0               0                0                0               0|
|          24a-36b-30c-29d -8a-22b-29c-24d  34a+19b-47c-39d  0               0|
|          19a+19b-10c-29d -38a-16b+39c+21d -18a-13b-43c-15d 0               0|
|          0               0                0                24a-36b-30c-29d -|
|          0               0                0                19a+19b-10c-29d -|
|                                                                             |
|                                                                             |
|-----------------------------------------------------------------------------|
|          0               0                0                0               0|
|          0               0                0                0               0|
|          0               0                0                0               0|
|          0               0                0                0               0|
|          0               0                0                0               0|
|          0               0                0                0               0|
|          0               0                0                0               0|
|          0               0                0                0               0|
|          0               0                0                0               0|
|          0               0                0                0               0|
|-47c-39d  0               0                0                0               0|
|b-43c-15d 0               0                0                0               0|
|          24a-36b-30c-29d -8a-22b-29c-24d  34a+19b-47c-39d  0               0|
|          19a+19b-10c-29d -38a-16b+39c+21d -18a-13b-43c-15d 0               0|
|          0               0                0                24a-36b-30c-29d -|
|          0               0                0                19a+19b-10c-29d -|
|-----------------------------------------------------------------------------|
|                                      24                                     |
|------------------------------------ R   : 0                                 |
|                0                |                                           |
|                0                |                                           |
|                0                |                                           |
|                0                |                                           |
|                0                |                                           |
|                0                |                                           |
|                0                |                                           |
|                0                |                                           |
|                0                |                                           |
|                0                |                                           |
|                0                |                                           |
|                0                |                                           |
|                0                |                                           |
|                0                |                                           |
|8a-22b-29c-24d  34a+19b-47c-39d  |                                           |
|38a-16b+39c+21d -18a-13b-43c-15d |                                           |
|                                                                             |
|                                      24                                     |
|------------------------------------ R   : 1                                 |
|                0                |                                           |
|                0                |                                           |
|                0                |                                           |
|                0                |                                           |
|                0                |                                           |
|                0                |                                           |
|                0                |                                           |
|                0                |                                           |
|                0                |                                           |
|                0                |                                           |
|                0                |                                           |
|                0                |                                           |
|                0                |                                           |
|                0                |                                           |
|8a-22b-29c-24d  34a+19b-47c-39d  |                                           |
|38a-16b+39c+21d -18a-13b-43c-15d |                                           |
+-----------------------------------------------------------------------------+
|i10 : f' ** C                                                                |
|                                                                             |
|           16                                                                |
|o10 = 0 : R   <--------------------------------------------------------------|
|                 | 24a-36b-30c-29d 0               0               0         |
|                 | 0               24a-36b-30c-29d 0               0         |
|                 | 0               0               24a-36b-30c-29d 0         |
|                 | 0               0               0               24a-36b-30|
|                 | 0               0               0               0         |
|                 | 0               0               0               0         |
|                 | 0               0               0               0         |
|                 | 0               0               0               0         |
|                 | 19a+19b-10c-29d 0               0               0         |
|                 | 0               19a+19b-10c-29d 0               0         |
|                 | 0               0               19a+19b-10c-29d 0         |
|                 | 0               0               0               19a+19b-10|
|                 | 0               0               0               0         |
|                 | 0               0               0               0         |
|                 | 0               0               0               0         |
|                 | 0               0               0               0         |
|                                                                             |
|           16                                                                |
|      1 : R   <--------------------------------------------------------------|
|                 | 24a-36b-30c-29d 0               0               0         |
|                 | 0               24a-36b-30c-29d 0               0         |
|                 | 0               0               24a-36b-30c-29d 0         |
|                 | 0               0               0               24a-36b-30|
|                 | 0               0               0               0         |
|                 | 0               0               0               0         |
|                 | 0               0               0               0         |
|                 | 0               0               0               0         |
|                 | 19a+19b-10c-29d 0               0               0         |
|                 | 0               19a+19b-10c-29d 0               0         |
|                 | 0               0               19a+19b-10c-29d 0         |
|                 | 0               0               0               19a+19b-10|
|                 | 0               0               0               0         |
|                 | 0               0               0               0         |
|                 | 0               0               0               0         |
|                 | 0               0               0               0         |
|                                                                             |
|o10 : ZZdFactorizationMap                                                    |
|-----------------------------------------------------------------------------|
|                                                                             |
|-----------------------------------------------------------------------------|
|      0               0               0               0               -8a-22b|
|      0               0               0               0               0      |
|      0               0               0               0               0      |
|c-29d 0               0               0               0               0      |
|      24a-36b-30c-29d 0               0               0               0      |
|      0               24a-36b-30c-29d 0               0               0      |
|      0               0               24a-36b-30c-29d 0               0      |
|      0               0               0               24a-36b-30c-29d 0      |
|      0               0               0               0               -38a-16|
|      0               0               0               0               0      |
|      0               0               0               0               0      |
|c-29d 0               0               0               0               0      |
|      19a+19b-10c-29d 0               0               0               0      |
|      0               19a+19b-10c-29d 0               0               0      |
|      0               0               19a+19b-10c-29d 0               0      |
|      0               0               0               19a+19b-10c-29d 0      |
|                                                                             |
|                                                                             |
|-----------------------------------------------------------------------------|
|      0               0               0               0               -8a-22b|
|      0               0               0               0               0      |
|      0               0               0               0               0      |
|c-29d 0               0               0               0               0      |
|      24a-36b-30c-29d 0               0               0               0      |
|      0               24a-36b-30c-29d 0               0               0      |
|      0               0               24a-36b-30c-29d 0               0      |
|      0               0               0               24a-36b-30c-29d 0      |
|      0               0               0               0               -38a-16|
|      0               0               0               0               0      |
|      0               0               0               0               0      |
|c-29d 0               0               0               0               0      |
|      19a+19b-10c-29d 0               0               0               0      |
|      0               19a+19b-10c-29d 0               0               0      |
|      0               0               19a+19b-10c-29d 0               0      |
|      0               0               0               19a+19b-10c-29d 0      |
|-----------------------------------------------------------------------------|
|                                                                             |
|-----------------------------------------------------------------------------|
|-29c-24d  0                0                0                0               |
|          -8a-22b-29c-24d  0                0                0               |
|          0                -8a-22b-29c-24d  0                0               |
|          0                0                -8a-22b-29c-24d  0               |
|          0                0                0                -8a-22b-29c-24d |
|          0                0                0                0               |
|          0                0                0                0               |
|          0                0                0                0               |
|b+39c+21d 0                0                0                0               |
|          -38a-16b+39c+21d 0                0                0               |
|          0                -38a-16b+39c+21d 0                0               |
|          0                0                -38a-16b+39c+21d 0               |
|          0                0                0                -38a-16b+39c+21d|
|          0                0                0                0               |
|          0                0                0                0               |
|          0                0                0                0               |
|                                                                             |
|                                                                             |
|-----------------------------------------------------------------------------|
|-29c-24d  0                0                0                0               |
|          -8a-22b-29c-24d  0                0                0               |
|          0                -8a-22b-29c-24d  0                0               |
|          0                0                -8a-22b-29c-24d  0               |
|          0                0                0                -8a-22b-29c-24d |
|          0                0                0                0               |
|          0                0                0                0               |
|          0                0                0                0               |
|b+39c+21d 0                0                0                0               |
|          -38a-16b+39c+21d 0                0                0               |
|          0                -38a-16b+39c+21d 0                0               |
|          0                0                -38a-16b+39c+21d 0               |
|          0                0                0                -38a-16b+39c+21d|
|          0                0                0                0               |
|          0                0                0                0               |
|          0                0                0                0               |
|-----------------------------------------------------------------------------|
|                                                                             |
|-----------------------------------------------------------------------------|
| 0                0                0                34a+19b-47c-39d  0       |
| 0                0                0                0                34a+19b-|
| 0                0                0                0                0       |
| 0                0                0                0                0       |
| 0                0                0                0                0       |
| -8a-22b-29c-24d  0                0                0                0       |
| 0                -8a-22b-29c-24d  0                0                0       |
| 0                0                -8a-22b-29c-24d  0                0       |
| 0                0                0                -18a-13b-43c-15d 0       |
| 0                0                0                0                -18a-13b|
| 0                0                0                0                0       |
| 0                0                0                0                0       |
| 0                0                0                0                0       |
| -38a-16b+39c+21d 0                0                0                0       |
| 0                -38a-16b+39c+21d 0                0                0       |
| 0                0                -38a-16b+39c+21d 0                0       |
|                                                                             |
|                                                                             |
|-----------------------------------------------------------------------------|
| 0                0                0                34a+19b-47c-39d  0       |
| 0                0                0                0                34a+19b-|
| 0                0                0                0                0       |
| 0                0                0                0                0       |
| 0                0                0                0                0       |
| -8a-22b-29c-24d  0                0                0                0       |
| 0                -8a-22b-29c-24d  0                0                0       |
| 0                0                -8a-22b-29c-24d  0                0       |
| 0                0                0                -18a-13b-43c-15d 0       |
| 0                0                0                0                -18a-13b|
| 0                0                0                0                0       |
| 0                0                0                0                0       |
| 0                0                0                0                0       |
| -38a-16b+39c+21d 0                0                0                0       |
| 0                -38a-16b+39c+21d 0                0                0       |
| 0                0                -38a-16b+39c+21d 0                0       |
|-----------------------------------------------------------------------------|
|                                                                             |
|-----------------------------------------------------------------------------|
|         0                0                0                0                |
|47c-39d  0                0                0                0                |
|         34a+19b-47c-39d  0                0                0                |
|         0                34a+19b-47c-39d  0                0                |
|         0                0                34a+19b-47c-39d  0                |
|         0                0                0                34a+19b-47c-39d  |
|         0                0                0                0                |
|         0                0                0                0                |
|         0                0                0                0                |
|-43c-15d 0                0                0                0                |
|         -18a-13b-43c-15d 0                0                0                |
|         0                -18a-13b-43c-15d 0                0                |
|         0                0                -18a-13b-43c-15d 0                |
|         0                0                0                -18a-13b-43c-15d |
|         0                0                0                0                |
|         0                0                0                0                |
|                                                                             |
|                                                                             |
|-----------------------------------------------------------------------------|
|         0                0                0                0                |
|47c-39d  0                0                0                0                |
|         34a+19b-47c-39d  0                0                0                |
|         0                34a+19b-47c-39d  0                0                |
|         0                0                34a+19b-47c-39d  0                |
|         0                0                0                34a+19b-47c-39d  |
|         0                0                0                0                |
|         0                0                0                0                |
|         0                0                0                0                |
|-43c-15d 0                0                0                0                |
|         -18a-13b-43c-15d 0                0                0                |
|         0                -18a-13b-43c-15d 0                0                |
|         0                0                -18a-13b-43c-15d 0                |
|         0                0                0                -18a-13b-43c-15d |
|         0                0                0                0                |
|         0                0                0                0                |
|-----------------------------------------------------------------------------|
|                                       24                                    |
|------------------------------------- R   : 0                                |
|0                0                |                                          |
|0                0                |                                          |
|0                0                |                                          |
|0                0                |                                          |
|0                0                |                                          |
|0                0                |                                          |
|34a+19b-47c-39d  0                |                                          |
|0                34a+19b-47c-39d  |                                          |
|0                0                |                                          |
|0                0                |                                          |
|0                0                |                                          |
|0                0                |                                          |
|0                0                |                                          |
|0                0                |                                          |
|-18a-13b-43c-15d 0                |                                          |
|0                -18a-13b-43c-15d |                                          |
|                                                                             |
|                                       24                                    |
|------------------------------------- R   : 1                                |
|0                0                |                                          |
|0                0                |                                          |
|0                0                |                                          |
|0                0                |                                          |
|0                0                |                                          |
|0                0                |                                          |
|34a+19b-47c-39d  0                |                                          |
|0                34a+19b-47c-39d  |                                          |
|0                0                |                                          |
|0                0                |                                          |
|0                0                |                                          |
|0                0                |                                          |
|0                0                |                                          |
|0                0                |                                          |
|-18a-13b-43c-15d 0                |                                          |
|0                -18a-13b-43c-15d |                                          |
+-----------------------------------------------------------------------------+
|i11 : assert isWellDefined(C ** f')                                          |
+-----------------------------------------------------------------------------+
|i12 : assert isWellDefined(f' ** C)                                          |
+-----------------------------------------------------------------------------+

Tensoring with a factorization defines a functor from the category of
$R$-modules to the category of factorizations over $R$ (that leaves the
potential unchanged).

+--------------------------------------------------------------+
|i13 : f'' = random(source f', R^{-2,-2})                      |
|                                                              |
|o13 = {1} | -28a-47b+38c+2d  -16a+7b+15c-23d |                |
|      {1} | 16a+22b+45c-34d  39a+43b-17c-11d |                |
|      {1} | -48a-47b+47c+19d 48a+36b+35c+11d |                |
|                                                              |
|              3      2                                        |
|o13 : Matrix R  <-- R                                         |
+--------------------------------------------------------------+
|i14 : assert((C ** f') * (C ** f'') == C ** (f' * f''))       |
+--------------------------------------------------------------+
|i15 : assert(C ** id_(R^{-1,-2,-3}) == id_(C ** R^{-1,-2,-3}))|
+--------------------------------------------------------------+

See also
========

  * Making maps between factorizations
    -- information about the basic constructors
  * ZZdFactorization ** ZZdFactorization
    -- tensor product of ZZ/d-graded factorizations

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

  * "Matrix ** ZZdFactorization"
  * ZZdFactorization ** Matrix -- create
    the tensor product of a ZZ/d-graded factorization and a map of modules
-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:3807:0.

ZZdFactorization ** ZZdFactorization -- tensor product of ZZ/d-graded factorizations
************************************************************************************

  * Operator: ** (Macaulay2Doc),
  * Usage:
        D = C1 ** C2
  * Inputs:
      * C1, a ZZ/d graded factorization, or a
        module (Macaulay2Doc), or a ZZ/d graded factorization,
      * C2, a ZZ/d graded factorization, or a
        module (Macaulay2Doc), or a ZZ/d graded factorization,
  * Outputs:
      * D, a ZZ/d graded factorization, tensor product
        of C1 and C2

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

The tensor product is a ZZ/d-graded factorization $D$ whose $i$th component is
the direct sum of $C1_j \otimes C2_k$ over all $i = j+k \mod d$. The
differential on $C1_j \otimes C2_k$ is the differential $dd^{C1} \otimes
id_{C2} + t^j id_{C1} \otimes dd^{C2}$, where $t$ is some primitive $d$th root
of unity (assuming both factorizations have period $d$).

The use of a primitive $d$th root of unity adds some subtlety to this
construction, since for $d > 2$ the user may need to adjoin a root of unity
using the adjoinRoot, command. In general, if $C1$ is a
factorizations of $f$ and $C2$ is a factorization of $g$, then the tensor
product $C1 \otimes C2$ is a factorization of the sum $f + g$. As the next
example illustrates, this allows one to always construct matrix factorizations
by taking the tensor product of "trivial" factorizations.

+----------------------------------------------------------------+
|i1 : S = ZZ/101[a..c]                                           |
|                                                                |
|o1 = S                                                          |
|                                                                |
|o1 : PolynomialRing                                             |
+----------------------------------------------------------------+
|i2 : Ca = ZZdfactorization {a,a}                                |
|                                                                |
|      1      1      1                                           |
|o2 = S  <-- S  <-- S                                            |
|                                                                |
|     0      1      0                                            |
|                                                                |
|o2 : ZZdFactorization                                           |
+----------------------------------------------------------------+
|i3 : Cb = ZZdfactorization {b,b}                                |
|                                                                |
|      1      1      1                                           |
|o3 = S  <-- S  <-- S                                            |
|                                                                |
|     0      1      0                                            |
|                                                                |
|o3 : ZZdFactorization                                           |
+----------------------------------------------------------------+
|i4 : Cc = ZZdfactorization {c,c}                                |
|                                                                |
|      1      1      1                                           |
|o4 = S  <-- S  <-- S                                            |
|                                                                |
|     0      1      0                                            |
|                                                                |
|o4 : ZZdFactorization                                           |
+----------------------------------------------------------------+
|i5 : Cab = Cb ** Ca                                             |
|                                                                |
|      2      2      2                                           |
|o5 = S  <-- S  <-- S                                            |
|                                                                |
|     0      1      0                                            |
|                                                                |
|o5 : ZZdFactorization                                           |
+----------------------------------------------------------------+
|i6 : diffs = dd^Cab                                             |
|                                                                |
|          2                2                                    |
|o6 = 1 : S  <------------ S  : 0                                |
|               | a b  |                                         |
|               | b -a |                                         |
|                                                                |
|          2                2                                    |
|     0 : S  <------------ S  : 1                                |
|               | a b  |                                         |
|               | b -a |                                         |
|                                                                |
|o6 : ZZdFactorizationMap                                        |
+----------------------------------------------------------------+
|i7 : diffs^2                                                    |
|                                                                |
|          2                       2                             |
|o7 = 0 : S  <------------------- S  : 0                         |
|               | a2+b2 0     |                                  |
|               | 0     a2+b2 |                                  |
|                                                                |
|          2                       2                             |
|     1 : S  <------------------- S  : 1                         |
|               | a2+b2 0     |                                  |
|               | 0     a2+b2 |                                  |
|                                                                |
|o7 : ZZdFactorizationMap                                        |
+----------------------------------------------------------------+
|i8 : potential Ca                                               |
|                                                                |
|      2                                                         |
|o8 = a                                                          |
|                                                                |
|o8 : S                                                          |
+----------------------------------------------------------------+
|i9 : potential Cb                                               |
|                                                                |
|      2                                                         |
|o9 = b                                                          |
|                                                                |
|o9 : S                                                          |
+----------------------------------------------------------------+
|i10 : potential Cab                                             |
|                                                                |
|       2    2                                                   |
|o10 = a  + b                                                    |
|                                                                |
|o10 : S                                                         |
+----------------------------------------------------------------+
|i11 : Cabc = Cc ** Cab                                          |
|                                                                |
|       4      4      4                                          |
|o11 = S  <-- S  <-- S                                           |
|                                                                |
|      0      1      0                                           |
|                                                                |
|o11 : ZZdFactorization                                          |
+----------------------------------------------------------------+
|i12 : Cc ** Cb ** Ca                                            |
|                                                                |
|       4      4      4                                          |
|o12 = S  <-- S  <-- S                                           |
|                                                                |
|      0      1      0                                           |
|                                                                |
|o12 : ZZdFactorization                                          |
+----------------------------------------------------------------+
|i13 : diffs2 = dd^Cabc                                          |
|                                                                |
|           4                      4                             |
|o13 = 1 : S  <------------------ S  : 0                         |
|                | a b  c  0  |                                  |
|                | b -a 0  c  |                                  |
|                | c 0  -a -b |                                  |
|                | 0 c  -b a  |                                  |
|                                                                |
|           4                      4                             |
|      0 : S  <------------------ S  : 1                         |
|                | a b  c  0  |                                  |
|                | b -a 0  c  |                                  |
|                | c 0  -a -b |                                  |
|                | 0 c  -b a  |                                  |
|                                                                |
|o13 : ZZdFactorizationMap                                       |
+----------------------------------------------------------------+
|i14 : diffs2^2                                                  |
|                                                                |
|           4                                               4    |
|o14 = 0 : S  <------------------------------------------- S  : 0|
|                | a2+b2+c2 0        0        0        |         |
|                | 0        a2+b2+c2 0        0        |         |
|                | 0        0        a2+b2+c2 0        |         |
|                | 0        0        0        a2+b2+c2 |         |
|                                                                |
|           4                                               4    |
|      1 : S  <------------------------------------------- S  : 1|
|                | a2+b2+c2 0        0        0        |         |
|                | 0        a2+b2+c2 0        0        |         |
|                | 0        0        a2+b2+c2 0        |         |
|                | 0        0        0        a2+b2+c2 |         |
|                                                                |
|o14 : ZZdFactorizationMap                                       |
+----------------------------------------------------------------+

Let us see an example of a longer factorization and tensor products of these
objects. In the following example, we use the notation $t$ to denote a
primitive $3$rd root of unity:

+------------------------------------------------+
|i15 : St = adjoinRoot(3,S,t)                    |
|                                                |
|o15 = St                                        |
|                                                |
|o15 : QuotientRing                              |
+------------------------------------------------+
|i16 : t^3                                       |
|                                                |
|o16 = 1                                         |
|                                                |
|o16 : St                                        |
+------------------------------------------------+
|i17 : St.rootOfUnity                            |
|                                                |
|o17 = t                                         |
|                                                |
|o17 : St                                        |
+------------------------------------------------+
|i18 : D1 = (ZZdfactorization {a,a,a})**St       |
|                                                |
|        1       1       1       1               |
|o18 = St  <-- St  <-- St  <-- St                |
|                                                |
|      0       1       2       0                 |
|                                                |
|o18 : ZZdFactorization                          |
+------------------------------------------------+
|i19 : D2 = (ZZdfactorization {b,b,b})**St       |
|                                                |
|        1       1       1       1               |
|o19 = St  <-- St  <-- St  <-- St                |
|                                                |
|      0       1       2       0                 |
|                                                |
|o19 : ZZdFactorization                          |
+------------------------------------------------+
|i20 : D12 = D1**D2                              |
|                                                |
|        3       3       3       3               |
|o20 = St  <-- St  <-- St  <-- St                |
|                                                |
|      0       1       2       0                 |
|                                                |
|o20 : ZZdFactorization                          |
+------------------------------------------------+
|i21 : diffs = D12.dd                            |
|                                                |
|            3                       3           |
|o21 = 2 : St  <------------------ St  : 0       |
|                 | b a  0     |                 |
|                 | 0 bt a     |                 |
|                 | a 0  -bt-b |                 |
|                                                |
|            3                       3           |
|      0 : St  <------------------ St  : 1       |
|                 | b a  0     |                 |
|                 | 0 bt a     |                 |
|                 | a 0  -bt-b |                 |
|                                                |
|            3                       3           |
|      1 : St  <------------------ St  : 2       |
|                 | b a  0     |                 |
|                 | 0 bt a     |                 |
|                 | a 0  -bt-b |                 |
|                                                |
|o21 : ZZdFactorizationMap                       |
+------------------------------------------------+
|i22 : diffs^3                                   |
|                                                |
|            3                              3    |
|o22 = 0 : St  <------------------------- St  : 0|
|                 | a3+b3 0     0     |          |
|                 | 0     a3+b3 0     |          |
|                 | 0     0     a3+b3 |          |
|                                                |
|            3                              3    |
|      1 : St  <------------------------- St  : 1|
|                 | a3+b3 0     0     |          |
|                 | 0     a3+b3 0     |          |
|                 | 0     0     a3+b3 |          |
|                                                |
|            3                              3    |
|      2 : St  <------------------------- St  : 2|
|                 | a3+b3 0     0     |          |
|                 | 0     a3+b3 0     |          |
|                 | 0     0     a3+b3 |          |
|                                                |
|o22 : ZZdFactorizationMap                       |
+------------------------------------------------+
|i23 : potential D1                              |
|                                                |
|       3                                        |
|o23 = a                                         |
|                                                |
|o23 : St                                        |
+------------------------------------------------+
|i24 : potential D2                              |
|                                                |
|       3                                        |
|o24 = b                                         |
|                                                |
|o24 : St                                        |
+------------------------------------------------+
|i25 : potential D12                             |
|                                                |
|       3    3                                   |
|o25 = a  + b                                    |
|                                                |
|o25 : St                                        |
+------------------------------------------------+

If one of the arguments is a module, it is considered as a ZZ/d-graded
factorization concentrated in homological degree 0.

+-----------------------------------------------------------------------------+
|i26 : Cabc ** (S^1/(a,b,c))                                                  |
|                                                                             |
|o26 = cokernel | a b c 0 0 0 0 0 0 0 0 0 | <-- cokernel | a b c 0 0 0 0 0 0 0|
|               | 0 0 0 a b c 0 0 0 0 0 0 |              | 0 0 0 a b c 0 0 0 0|
|               | 0 0 0 0 0 0 a b c 0 0 0 |              | 0 0 0 0 0 0 a b c 0|
|               | 0 0 0 0 0 0 0 0 0 a b c |              | 0 0 0 0 0 0 0 0 0 a|
|                                                                             |
|      0                                        1                             |
|                                                                             |
|o26 : ZZdFactorization                                                       |
|-----------------------------------------------------------------------------|
|0 0 | <-- cokernel | a b c 0 0 0 0 0 0 0 0 0 |                               |
|0 0 |              | 0 0 0 a b c 0 0 0 0 0 0 |                               |
|0 0 |              | 0 0 0 0 0 0 a b c 0 0 0 |                               |
|b c |              | 0 0 0 0 0 0 0 0 0 a b c |                               |
|                                                                             |
|          0                                                                  |
+-----------------------------------------------------------------------------+
|i27 : isdFactorization oo                                                    |
|                                                                             |
|o27 = (true, 0)                                                              |
|                                                                             |
|o27 : Sequence                                                               |
+-----------------------------------------------------------------------------+
|i28 : S^2 ** Cabc                                                            |
|                                                                             |
|       8      8      8                                                       |
|o28 = S  <-- S  <-- S                                                        |
|                                                                             |
|      0      1      0                                                        |
|                                                                             |
|o28 : ZZdFactorization                                                       |
+-----------------------------------------------------------------------------+

If one of the arguments is a complex, the function will automatically
Fold, the complex and then take the tensor product. Since we are
tensoring with a complex, the potential will remain unchanged.

+-------------------------------+
|i29 : K = koszulComplex vars S;|
+-------------------------------+
|i30 : KCa = K**Ca              |
|                               |
|       8      8      8         |
|o30 = S  <-- S  <-- S          |
|                               |
|      0      1      0          |
|                               |
|o30 : ZZdFactorization         |
+-------------------------------+
|i31 : assert isWellDefined KCa |
+-------------------------------+
|i32 : potential KCa            |
|                               |
|       2                       |
|o32 = a                        |
|                               |
|o32 : S                        |
+-------------------------------+

Because the tensor product can be regarded as the totalization of a
bifactorization, each term of the tensor product comes with pairs of indices,
labelling the summands.

+------------------------------+
|i33 : indices Cabc_1          |
|                              |
|o33 = {{0, 1}, {1, 0}}        |
|                              |
|o33 : List                    |
+------------------------------+
|i34 : components Cabc_1       |
|                              |
|        2   2                 |
|o34 = {S , S }                |
|                              |
|o34 : List                    |
+------------------------------+
|i35 : Cabc_1_[{1,0}]          |
|                              |
|o35 = | 0 0 |                 |
|      | 0 0 |                 |
|      | 1 0 |                 |
|      | 0 1 |                 |
|                              |
|              4      2        |
|o35 : Matrix S  <-- S         |
+------------------------------+
|i36 : indices Cabc_2          |
|                              |
|o36 = {{0, 0}, {1, 1}}        |
|                              |
|o36 : List                    |
+------------------------------+
|i37 : components Cabc_2       |
|                              |
|        2   2                 |
|o37 = {S , S }                |
|                              |
|o37 : List                    |
+------------------------------+
|i38 : indices D12_0           |
|                              |
|o38 = {{0, 0}, {1, 2}, {2, 1}}|
|                              |
|o38 : List                    |
+------------------------------+
|i39 : indices D12_1           |
|                              |
|o39 = {{0, 1}, {1, 0}, {2, 2}}|
|                              |
|o39 : List                    |
+------------------------------+
|i40 : indices D12_2           |
|                              |
|o40 = {{0, 2}, {1, 1}, {2, 0}}|
|                              |
|o40 : List                    |
+------------------------------+

Note in the above how the ZZ/d-graded tensor product differs from the standard
tensor product of complexes. Since the indices are taken modulo the period, we
see that both $\{ 0, 0 \}$ and $\{ 1, 1 \}$ are indices in degree $0$ (and
likewise the indices for $D12$ are taken modulo $3$).

See also
========

  * indices (Macaulay2Doc) -- indices of a polynomial; also
    components for a direct sum
  * components (Macaulay2Doc) -- list the components of a
    direct sum
  * directSum (Macaulay2Doc) -- direct sum of modules or maps

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

  * "Complex ** ZZdFactorization"
  * "Module ** ZZdFactorization"
  * "ZZdFactorization ** Complex"
  * "ZZdFactorization ** Module"
  * ZZdFactorization ** ZZdFactorization
    -- tensor product of ZZ/d-graded factorizations
-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:1402:0.

ZZdFactorization == ZZdFactorization -- whether two ZZ/d-graded factorizations are equal
****************************************************************************************

  * Operator: == (Macaulay2Doc),
  * Usage:
        C == D
        C == 0
  * Inputs:
      * C, a ZZ/d graded factorization,
      * D, a ZZ/d graded factorization,
  * Outputs:
      * a Boolean value (Macaulay2Doc), that is true when C and
        D are equal

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

Two factorizations are equal if the corresponding objects and corresponding
maps at each index are equal.

+--------------------------------------------------------------+
|i1 : S = ZZ/101[a..c]/(a^2+b^2+c^2)                           |
|                                                              |
|o1 = S                                                        |
|                                                              |
|o1 : QuotientRing                                             |
+--------------------------------------------------------------+
|i2 : C = tailMF coker vars S                                  |
|                                                              |
|       ZZ       4       ZZ       4       ZZ       4           |
|o2 = (---[a..c])  <-- (---[a..c])  <-- (---[a..c])            |
|      101              101              101                   |
|                                                              |
|     0                1                0                      |
|                                                              |
|o2 : ZZdFactorization                                         |
+--------------------------------------------------------------+
|i3 : C.dd                                                     |
|                                                              |
|           ZZ       4                           ZZ       4    |
|o3 = 1 : (---[a..c])  <---------------------- (---[a..c])  : 0|
|          101            {3} | a  -b c  0 |    101            |
|                         {3} | b  a  0  c |                   |
|                         {3} | -c 0  a  b |                   |
|                         {3} | 0  -c -b a |                   |
|                                                              |
|           ZZ       4                           ZZ       4    |
|     0 : (---[a..c])  <---------------------- (---[a..c])  : 1|
|          101            {2} | a  b -c 0  |    101            |
|                         {2} | -b a 0  -c |                   |
|                         {2} | c  0 a  -b |                   |
|                         {2} | 0  c b  a  |                   |
|                                                              |
|o3 : ZZdFactorizationMap                                      |
+--------------------------------------------------------------+
|i4 : D = C[3][-3]                                             |
|                                                              |
|       ZZ       4       ZZ       4       ZZ       4           |
|o4 = (---[a..c])  <-- (---[a..c])  <-- (---[a..c])            |
|      101              101              101                   |
|                                                              |
|     0                1                0                      |
|                                                              |
|o4 : ZZdFactorization                                         |
+--------------------------------------------------------------+
|i5 : C === D                                                  |
|                                                              |
|o5 = false                                                    |
+--------------------------------------------------------------+
|i6 : C == D                                                   |
|                                                              |
|o6 = true                                                     |
+--------------------------------------------------------------+

Both the maps and the objects must be equal.

+---------------------------------------------------+
|i7 : E = ZZdfactorization {0*id_(C_0), 0*id_(C_1)} |
|                                                   |
|       ZZ       4       ZZ       4       ZZ       4|
|o7 = (---[a..c])  <-- (---[a..c])  <-- (---[a..c]) |
|      101              101              101        |
|                                                   |
|     0                1                0           |
|                                                   |
|o7 : ZZdFactorization                              |
+---------------------------------------------------+
|i8 : dd^E                                          |
|                                                   |
|           ZZ       4          ZZ       4          |
|o8 = 1 : (---[a..c])  <----- (---[a..c])  : 0      |
|          101            0    101                  |
|                                                   |
|           ZZ       4          ZZ       4          |
|     0 : (---[a..c])  <----- (---[a..c])  : 1      |
|          101            0    101                  |
|                                                   |
|o8 : ZZdFactorizationMap                           |
+---------------------------------------------------+
|i9 : C == E                                        |
|                                                   |
|o9 = false                                         |
+---------------------------------------------------+
|i10 : E == 0                                       |
|                                                   |
|o10 = false                                        |
+---------------------------------------------------+
|i11 : dd^E == 0                                    |
|                                                   |
|o11 = true                                         |
+---------------------------------------------------+

A complex is equal to zero if all the objects and maps are zero. This could
require computation to determine if something that is superficially not zero is
in fact zero.

+-----------------------------------------------------------------------------+
|i12 : f = id_C                                                               |
|                                                                             |
|            ZZ       4                        ZZ       4                     |
|o12 = 0 : (---[a..c])  <------------------- (---[a..c])  : 0                 |
|           101            {2} | 1 0 0 0 |    101                             |
|                          {2} | 0 1 0 0 |                                    |
|                          {2} | 0 0 1 0 |                                    |
|                          {2} | 0 0 0 1 |                                    |
|                                                                             |
|            ZZ       4                        ZZ       4                     |
|      1 : (---[a..c])  <------------------- (---[a..c])  : 1                 |
|           101            {3} | 1 0 0 0 |    101                             |
|                          {3} | 0 1 0 0 |                                    |
|                          {3} | 0 0 1 0 |                                    |
|                          {3} | 0 0 0 1 |                                    |
|                                                                             |
|o12 : ZZdFactorizationMap                                                    |
+-----------------------------------------------------------------------------+
|i13 : D = coker f                                                            |
|                                                                             |
|o13 = cokernel {2} | 1 0 0 0 | <-- cokernel {3} | 1 0 0 0 | <-- cokernel {2} |
|               {2} | 0 1 0 0 |              {3} | 0 1 0 0 |              {2} |
|               {2} | 0 0 1 0 |              {3} | 0 0 1 0 |              {2} |
|               {2} | 0 0 0 1 |              {3} | 0 0 0 1 |              {2} |
|                                                                             |
|      0                            1                            0            |
|                                                                             |
|o13 : ZZdFactorization                                                       |
|-----------------------------------------------------------------------------|
|| 1 0 0 0 |                                                                  |
|| 0 1 0 0 |                                                                  |
|| 0 0 1 0 |                                                                  |
|| 0 0 0 1 |                                                                  |
+-----------------------------------------------------------------------------+
|i14 : D == 0                                                                 |
|                                                                             |
|o14 = true                                                                   |
+-----------------------------------------------------------------------------+

Testing for equality is not the same testing for isomorphism. In particular,
different presentations of a factorization need not be equal.

+----------------------------------------------------+
|i15 : use ambient S                                 |
|                                                    |
|       ZZ                                           |
|o15 = ---[a..c]                                     |
|      101                                           |
|                                                    |
|o15 : PolynomialRing                                |
+----------------------------------------------------+
|i16 : K = koszulMF({a,b,c}, a^2+b^2+c^2)            |
|                                                    |
|        ZZ       4       ZZ       4       ZZ       4|
|o16 = (---[a..c])  <-- (---[a..c])  <-- (---[a..c]) |
|       101              101              101        |
|                                                    |
|      0                1                0           |
|                                                    |
|o16 : ZZdFactorization                              |
+----------------------------------------------------+
|i17 : C == K                                        |
|                                                    |
|o17 = false                                         |
+----------------------------------------------------+

The matrix factorizations $C$ and $K$ above are isomorphic, however.

See also
========

  * Making ZZdFactorizations -- Information
    about the basic constructors

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

  * "ZZ == ZZdFactorization"
  * "ZZdFactorization == ZZ"
  * ZZdFactorization == ZZdFactorization
    -- whether two ZZ/d-graded factorizations are equal
-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:876:0.

ZZdFactorization _ Array -- the canonical inclusion or projection map of a direct sum
*************************************************************************************

  * Operator: _ (Macaulay2Doc),
  * Usage:
        i = C_[name]
        p = C^[name]
  * Inputs:
      * C, a ZZ/d graded factorization,
      * name, an array (Macaulay2Doc),
  * Outputs:
      * a map of ZZ/d-graded factorizations, i is
        the canonical inclusion and p is the canonical projection

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

The direct sum is an n-ary operator with projection and inclusion maps from
each component satisfying appropriate identities.

One can access these maps as follows.

+----------------------------------------+
|i1 : S = ZZ/101[a,b,c];                 |
+----------------------------------------+
|i2 : f = a^3+b^3+c^3;                   |
+----------------------------------------+
|i3 : C1 = randomTailMF(f, 2, 4, 4)      |
|                                        |
|      4      4      4                   |
|o3 = S  <-- S  <-- S                    |
|                                        |
|     0      1      0                    |
|                                        |
|o3 : ZZdFactorization                   |
+----------------------------------------+
|i4 : C2 = randomTailMF(f, 2, 4, 4)      |
|                                        |
|      4      4      4                   |
|o4 = S  <-- S  <-- S                    |
|                                        |
|     0      1      0                    |
|                                        |
|o4 : ZZdFactorization                   |
+----------------------------------------+
|i5 : D = C1 ++ C2                       |
|                                        |
|      8      8      8                   |
|o5 = S  <-- S  <-- S                    |
|                                        |
|     0      1      0                    |
|                                        |
|o5 : ZZdFactorization                   |
+----------------------------------------+
|i6 : isdFactorization D                 |
|                                        |
|             3    3    3                |
|o6 = (true, a  + b  + c )               |
|                                        |
|o6 : Sequence                           |
+----------------------------------------+
|i7 : D_[0]                              |
|                                        |
|          8                       4     |
|o7 = 0 : S  <------------------- S  : 0 |
|               {3} | 1 0 0 0 |          |
|               {3} | 0 1 0 0 |          |
|               {3} | 0 0 1 0 |          |
|               {4} | 0 0 0 1 |          |
|               {3} | 0 0 0 0 |          |
|               {3} | 0 0 0 0 |          |
|               {3} | 0 0 0 0 |          |
|               {4} | 0 0 0 0 |          |
|                                        |
|          8                       4     |
|     1 : S  <------------------- S  : 1 |
|               {4} | 1 0 0 0 |          |
|               {5} | 0 1 0 0 |          |
|               {5} | 0 0 1 0 |          |
|               {5} | 0 0 0 1 |          |
|               {4} | 0 0 0 0 |          |
|               {5} | 0 0 0 0 |          |
|               {5} | 0 0 0 0 |          |
|               {5} | 0 0 0 0 |          |
|                                        |
|o7 : ZZdFactorizationMap                |
+----------------------------------------+
|i8 : D_[1]                              |
|                                        |
|          8                       4     |
|o8 = 0 : S  <------------------- S  : 0 |
|               {3} | 0 0 0 0 |          |
|               {3} | 0 0 0 0 |          |
|               {3} | 0 0 0 0 |          |
|               {4} | 0 0 0 0 |          |
|               {3} | 1 0 0 0 |          |
|               {3} | 0 1 0 0 |          |
|               {3} | 0 0 1 0 |          |
|               {4} | 0 0 0 1 |          |
|                                        |
|          8                       4     |
|     1 : S  <------------------- S  : 1 |
|               {4} | 0 0 0 0 |          |
|               {5} | 0 0 0 0 |          |
|               {5} | 0 0 0 0 |          |
|               {5} | 0 0 0 0 |          |
|               {4} | 1 0 0 0 |          |
|               {5} | 0 1 0 0 |          |
|               {5} | 0 0 1 0 |          |
|               {5} | 0 0 0 1 |          |
|                                        |
|o8 : ZZdFactorizationMap                |
+----------------------------------------+
|i9 : D^[0] * D_[0] == 1                 |
|                                        |
|o9 = true                               |
+----------------------------------------+
|i10 : D^[1] * D_[1] == 1                |
|                                        |
|o10 = true                              |
+----------------------------------------+
|i11 : D^[0] * D_[1] == 0                |
|                                        |
|o11 = true                              |
+----------------------------------------+
|i12 : D^[1] * D_[0] == 0                |
|                                        |
|o12 = true                              |
+----------------------------------------+
|i13 : D_[0] * D^[0] + D_[1] * D^[1] == 1|
|                                        |
|o13 = true                              |
+----------------------------------------+

The default names for the components are the non-negative integers.  However,
one can choose any name.

+----------------------------------------------------------------+
|i14 : E = (cheese => C1) ++ (crackers => C2)                    |
|                                                                |
|       8      8      8                                          |
|o14 = S  <-- S  <-- S                                           |
|                                                                |
|      0      1      0                                           |
|                                                                |
|o14 : ZZdFactorization                                          |
+----------------------------------------------------------------+
|i15 : E_[cheese]                                                |
|                                                                |
|           8                       4                            |
|o15 = 0 : S  <------------------- S  : 0                        |
|                {3} | 1 0 0 0 |                                 |
|                {3} | 0 1 0 0 |                                 |
|                {3} | 0 0 1 0 |                                 |
|                {4} | 0 0 0 1 |                                 |
|                {3} | 0 0 0 0 |                                 |
|                {3} | 0 0 0 0 |                                 |
|                {3} | 0 0 0 0 |                                 |
|                {4} | 0 0 0 0 |                                 |
|                                                                |
|           8                       4                            |
|      1 : S  <------------------- S  : 1                        |
|                {4} | 1 0 0 0 |                                 |
|                {5} | 0 1 0 0 |                                 |
|                {5} | 0 0 1 0 |                                 |
|                {5} | 0 0 0 1 |                                 |
|                {4} | 0 0 0 0 |                                 |
|                {5} | 0 0 0 0 |                                 |
|                {5} | 0 0 0 0 |                                 |
|                {5} | 0 0 0 0 |                                 |
|                                                                |
|o15 : ZZdFactorizationMap                                       |
+----------------------------------------------------------------+
|i16 : E_[crackers]                                              |
|                                                                |
|           8                       4                            |
|o16 = 0 : S  <------------------- S  : 0                        |
|                {3} | 0 0 0 0 |                                 |
|                {3} | 0 0 0 0 |                                 |
|                {3} | 0 0 0 0 |                                 |
|                {4} | 0 0 0 0 |                                 |
|                {3} | 1 0 0 0 |                                 |
|                {3} | 0 1 0 0 |                                 |
|                {3} | 0 0 1 0 |                                 |
|                {4} | 0 0 0 1 |                                 |
|                                                                |
|           8                       4                            |
|      1 : S  <------------------- S  : 1                        |
|                {4} | 0 0 0 0 |                                 |
|                {5} | 0 0 0 0 |                                 |
|                {5} | 0 0 0 0 |                                 |
|                {5} | 0 0 0 0 |                                 |
|                {4} | 1 0 0 0 |                                 |
|                {5} | 0 1 0 0 |                                 |
|                {5} | 0 0 1 0 |                                 |
|                {5} | 0 0 0 1 |                                 |
|                                                                |
|o16 : ZZdFactorizationMap                                       |
+----------------------------------------------------------------+
|i17 : E^[cheese] * E_[cheese] == 1                              |
|                                                                |
|o17 = true                                                      |
+----------------------------------------------------------------+
|i18 : E^[crackers] * E_[crackers] == 1                          |
|                                                                |
|o18 = true                                                      |
+----------------------------------------------------------------+
|i19 : E^[cheese] * E_[crackers] == 0                            |
|                                                                |
|o19 = true                                                      |
+----------------------------------------------------------------+
|i20 : E^[crackers] * E_[cheese] == 0                            |
|                                                                |
|o20 = true                                                      |
+----------------------------------------------------------------+
|i21 : E_[cheese] * E^[cheese] + E_[crackers] * E^[crackers] == 1|
|                                                                |
|o21 = true                                                      |
+----------------------------------------------------------------+

One can also access inclusion and projection maps of sub-direct sums.

+-----------------------------------------------------------------------------+
|i22 : F = directSum(C1, C2, randomTailMF(f))                                 |
|                                                                             |
|       23      23      23                                                    |
|o22 = S   <-- S   <-- S                                                      |
|                                                                             |
|      0       1       0                                                      |
|                                                                             |
|o22 : ZZdFactorization                                                       |
+-----------------------------------------------------------------------------+
|i23 : F^[0,1]                                                                |
|                                                                             |
|           8                                                             23  |
|o23 = 0 : S  <--------------------------------------------------------- S   :|
|                {3} | 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |        |
|                {3} | 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |        |
|                {3} | 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |        |
|                {4} | 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |        |
|                {3} | 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |        |
|                {3} | 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |        |
|                {3} | 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |        |
|                {4} | 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |        |
|                                                                             |
|           8                                                             23  |
|      1 : S  <--------------------------------------------------------- S   :|
|                {4} | 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |        |
|                {5} | 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |        |
|                {5} | 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |        |
|                {5} | 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |        |
|                {4} | 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |        |
|                {5} | 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |        |
|                {5} | 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |        |
|                {5} | 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |        |
|                                                                             |
|o23 : ZZdFactorizationMap                                                    |
|-----------------------------------------------------------------------------|
|0                                                                            |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|1                                                                            |
+-----------------------------------------------------------------------------+
|i24 : F_[0,2]                                                                |
|                                                                             |
|           23                                                     19         |
|o24 = 0 : S   <------------------------------------------------- S   : 0     |
|                 {3} | 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |               |
|                 {3} | 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |               |
|                 {3} | 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |               |
|                 {4} | 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |               |
|                 {3} | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |               |
|                 {3} | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |               |
|                 {3} | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |               |
|                 {4} | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |               |
|                 {7} | 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |               |
|                 {7} | 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 |               |
|                 {7} | 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 |               |
|                 {7} | 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 |               |
|                 {7} | 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 |               |
|                 {7} | 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 |               |
|                 {8} | 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 |               |
|                 {8} | 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 |               |
|                 {8} | 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 |               |
|                 {8} | 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 |               |
|                 {8} | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 |               |
|                 {8} | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 |               |
|                 {8} | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 |               |
|                 {8} | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 |               |
|                 {8} | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 |               |
|                                                                             |
|           23                                                     19         |
|      1 : S   <------------------------------------------------- S   : 1     |
|                 {4} | 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |               |
|                 {5} | 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |               |
|                 {5} | 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |               |
|                 {5} | 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |               |
|                 {4} | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |               |
|                 {5} | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |               |
|                 {5} | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |               |
|                 {5} | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |               |
|                 {9} | 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |               |
|                 {9} | 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 |               |
|                 {9} | 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 |               |
|                 {9} | 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 |               |
|                 {9} | 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 |               |
|                 {9} | 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 |               |
|                 {9} | 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 |               |
|                 {9} | 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 |               |
|                 {9} | 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 |               |
|                 {9} | 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 |               |
|                 {9} | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 |               |
|                 {9} | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 |               |
|                 {9} | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 |               |
|                 {9} | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 |               |
|                 {9} | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 |               |
|                                                                             |
|o24 : ZZdFactorizationMap                                                    |
+-----------------------------------------------------------------------------+

See also
========

  * directSum(Complex) (Complexes) -- direct sum
    of complexes
  * components(Complex) (Complexes) -- list the
    components of a direct sum
  * indices (Macaulay2Doc) -- indices of a polynomial; also
    components for a direct sum

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

  * ZZdFactorization _ Array -- the
    canonical inclusion or projection map of a direct sum
-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:1256:0.

ZZdFactorization _ ZZ -- access individual object in a ZZ/d-graded factorization
********************************************************************************

  * Operator: _ (Macaulay2Doc),
  * Usage:
        C_i
        C^i
  * Inputs:
      * C, a ZZ/d graded factorization,
      * i, an integer (Macaulay2Doc), either the homological or
        cohomological index
  * Outputs:
      * a module (Macaulay2Doc), the i-th object

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

ZZ/d-graded factorizations can be either homologically or cohomologically
graded.  Subscripts refer to homological indices, and superscripts refer to
cohomological indices.

In this package homological indices are used by default.  We always have the
equation $C^i = C_{-i}$.

+---------------------------------------------------+
|i1 : S = ZZ/101[x_1..x_3]                          |
|                                                   |
|o1 = S                                             |
|                                                   |
|o1 : PolynomialRing                                |
+---------------------------------------------------+
|i2 : C = koszulMF({x_1,x_2,x_3}, x_1^2+x_2^2+x_3^2)|
|                                                   |
|      4      4      4                              |
|o2 = S  <-- S  <-- S                               |
|                                                   |
|     0      1      0                               |
|                                                   |
|o2 : ZZdFactorization                              |
+---------------------------------------------------+
|i3 : C_2                                           |
|                                                   |
|      4                                            |
|o3 = S                                             |
|                                                   |
|o3 : S-module, free                                |
+---------------------------------------------------+
|i4 : C^(-2)                                        |
|                                                   |
|      4                                            |
|o4 = S                                             |
|                                                   |
|o4 : S-module, free                                |
+---------------------------------------------------+
|i5 : C_2 == C^(-2)                                 |
|                                                   |
|o5 = true                                          |
+---------------------------------------------------+

Indices that are outside of the period are taken modulo the period.

+-------------------+
|i6 : C_-7          |
|                   |
|      4            |
|o6 = S             |
|                   |
|o6 : S-module, free|
+-------------------+

See also
========

  * Making ZZdFactorizations -- Information
    about the basic constructors

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

  * ZZdFactorization _ ZZ -- access individual
    object in a ZZ/d-graded factorization
-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:820:0.

ZZdFactorization Array -- shift a ZZ/d-graded factorization or map of ZZ/d-graded factorizations
************************************************************************************************

  * Operator: SPACE (Macaulay2Doc),
  * Usage:
        D = C[i]
        g = f[i]
  * Inputs:
      * C, a ZZ/d graded factorization, or f, a
        ZZdFactorizationMap,
      * an array (Macaulay2Doc), [i], where i is an integer
  * Outputs:
      * D, a ZZ/d graded factorization, or g, a
        ZZdFactorizationMap.

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

The shifted factorization $D$ is defined by $D_j = C_{i+j}$ for all $j$ and the
$j$th differential is rescaled by $t^i$, where $t$ is some primitive root of
unity. Note that a factorization of period > 2 must have a root of unity
adjoined in order to define the shift.

The shifted complex map $g$ is defined by $g_j = f_{i+j}$ for all $j$.

The shift defines a natural automorphism on the category of ZZ/d-graded
factorizations. For factorizations with period greater than $2$, the shift is
not necessarily the same as the suspension functor; see TO (suspension,
ZZdFactorization) to see how these functors differ.

+-----------------------------------------------------------------------------+
|i1 : R = QQ[a..d]/(c^2-b*d+a^2);                                             |
+-----------------------------------------------------------------------------+
|i2 : m = ideal vars R                                                        |
|                                                                             |
|o2 = ideal (a, b, c, d)                                                      |
|                                                                             |
|o2 : Ideal of R                                                              |
+-----------------------------------------------------------------------------+
|i3 : C = tailMF (m^2)                                                        |
|                                                                             |
|               24               24               24                          |
|o3 = (QQ[a..d])   <-- (QQ[a..d])   <-- (QQ[a..d])                            |
|                                                                             |
|     0                1                0                                     |
|                                                                             |
|o3 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i4 : dd^C_3                                                                  |
|                                                                             |
|o4 = {5} | a  0  0  d  0  d  0  0  0  0  0  c  0  0  0  0  0  0  0  0  0  0  |
|     {5} | 0  a  0  0  0  0  0  d  0  0  0  0  0  c  d  0  0  0  0  0  0  0  |
|     {5} | 0  0  a  0  0  0  0  0  d  0  0  0  0  0  c  d  0  0  0  0  0  0  |
|     {5} | 0  0  0  a  0  0  0  0  0  d  0  0  0  0  0  c  0  0  0  0  0  0  |
|     {5} | 0  0  0  0  -a 0  b  0  d  0  0  0  0  0  0  0  c  d  0  b  0  0  |
|     {5} | -b 0  0  0  0  -a 0  0  0  d  0  0  0  0  0  0  0  c  0  0  0  0  |
|     {5} | 0  0  d  0  0  0  -a 0  0  0  0  0  0  0  0  0  0  0  b  0  c  d  |
|     {5} | 0  -b 0  d  0  0  0  -a 0  0  0  0  0  0  0  0  0  0  0  0  0  c  |
|     {5} | 0  0  -b 0  0  0  0  0  -a 0  0  0  0  0  0  0  0  0  0  0  0  0  |
|     {5} | 0  0  0  -b 0  0  0  0  0  -a 0  0  0  0  0  0  0  0  0  0  0  0  |
|     {5} | -d 0  0  0  0  0  -c 0  0  0  -a 0  0  0  d  0  -d 0  0  -c 0  0  |
|     {5} | c  0  0  0  0  0  0  0  0  0  0  -a 0  0  0  d  0  -d 0  0  0  0  |
|     {5} | 0  -d 0  0  0  0  0  0  0  0  0  0  -a 0  0  0  0  0  -c 0  -d 0  |
|     {5} | 0  c  -d 0  0  0  0  0  0  0  0  0  0  -a 0  0  0  0  0  0  0  -d |
|     {5} | 0  0  c  -d 0  0  0  0  0  0  0  0  0  0  -a 0  0  0  0  0  0  0  |
|     {5} | 0  0  0  c  0  0  0  0  0  0  0  0  0  0  0  -a 0  0  0  0  0  0  |
|     {5} | 0  0  0  0  c  -d 0  0  0  0  b  0  0  0  0  0  a  0  0  0  0  0  |
|     {5} | 0  0  0  0  0  c  0  0  0  0  0  b  0  0  0  0  0  a  0  0  0  0  |
|     {5} | 0  0  0  0  0  0  -d 0  0  0  0  0  -c -d 0  0  0  0  a  0  0  0  |
|     {5} | 0  0  0  0  -d 0  0  0  0  0  -c -d 0  0  0  0  0  0  b  a  c  d  |
|     {5} | 0  0  0  0  0  0  c  -d 0  0  0  0  b  0  -d 0  0  0  0  0  a  0  |
|     {5} | 0  0  0  0  0  0  0  c  -d 0  0  0  0  b  0  -d 0  0  0  0  0  a  |
|     {5} | 0  0  0  0  0  0  0  0  c  -d 0  0  0  0  b  0  0  0  0  0  0  0  |
|     {5} | 0  0  0  0  0  0  0  0  0  c  0  0  0  0  0  b  0  0  0  0  0  0  |
|     ------------------------------------------------------------------------|
|     0  0  |                                                                 |
|     0  0  |                                                                 |
|     0  0  |                                                                 |
|     0  0  |                                                                 |
|     0  0  |                                                                 |
|     0  0  |                                                                 |
|     0  0  |                                                                 |
|     d  0  |                                                                 |
|     c  d  |                                                                 |
|     0  c  |                                                                 |
|     0  0  |                                                                 |
|     0  0  |                                                                 |
|     0  0  |                                                                 |
|     0  0  |                                                                 |
|     -d 0  |                                                                 |
|     0  -d |                                                                 |
|     d  0  |                                                                 |
|     0  d  |                                                                 |
|     0  0  |                                                                 |
|     0  0  |                                                                 |
|     0  0  |                                                                 |
|     0  0  |                                                                 |
|     a  0  |                                                                 |
|     0  a  |                                                                 |
|                                                                             |
|                      24               24                                    |
|o4 : Matrix (QQ[a..d])   <-- (QQ[a..d])                                      |
+-----------------------------------------------------------------------------+
|i5 : D = C[1]                                                                |
|                                                                             |
|               24               24               24                          |
|o5 = (QQ[a..d])   <-- (QQ[a..d])   <-- (QQ[a..d])                            |
|                                                                             |
|     0                1                0                                     |
|                                                                             |
|o5 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i6 : assert isWellDefined D                                                  |
+-----------------------------------------------------------------------------+
|i7 : assert(dd^D_2 == -dd^C_3)                                               |
+-----------------------------------------------------------------------------+
|i8 : Q = ZZ/101[a..c];                                                       |
+-----------------------------------------------------------------------------+
|i9 : K = linearMF(a^3 + b^3 + c^3, t)                                        |
|                                                                             |
|     /   Q[t]   \9     /   Q[t]   \9     /   Q[t]   \9     /   Q[t]   \9     |
|o9 = |----------|  <-- |----------|  <-- |----------|  <-- |----------|      |
|     | 2        |      | 2        |      | 2        |      | 2        |      |
|     \t  + t + 1/      \t  + t + 1/      \t  + t + 1/      \t  + t + 1/      |
|                                                                             |
|     0                 1                 2                 0                 |
|                                                                             |
|o9 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i10 : K.dd                                                                   |
|                                                                             |
|          /   Q[t]   \9                                                      |
|o10 = 2 : |----------|  <----------------------------------------------------|
|          | 2        |     {0, 3} | c 0  0     b  a  0     0     0     0     |
|          \t  + t + 1/     {0, 3} | 0 c  0     0  bt a     0     0     0     |
|                           {0, 3} | 0 0  c     a  0  -bt-b 0     0     0     |
|                           {0, 3} | 0 0  0     ct 0  0     b     a     0     |
|                           {0, 3} | 0 0  0     0  ct 0     0     bt    a     |
|                           {0, 3} | 0 0  0     0  0  ct    a     0     -bt-b |
|                           {0, 3} | b a  0     0  0  0     -ct-c 0     0     |
|                           {0, 3} | 0 bt a     0  0  0     0     -ct-c 0     |
|                           {0, 3} | a 0  -bt-b 0  0  0     0     0     -ct-c |
|                                                                             |
|          /   Q[t]   \9                                                      |
|      0 : |----------|  <----------------------------------------------------|
|          | 2        |     {0, 3} | c 0  0     b  a  0     0     0     0     |
|          \t  + t + 1/     {0, 3} | 0 c  0     0  bt a     0     0     0     |
|                           {0, 3} | 0 0  c     a  0  -bt-b 0     0     0     |
|                           {0, 3} | 0 0  0     ct 0  0     b     a     0     |
|                           {0, 3} | 0 0  0     0  ct 0     0     bt    a     |
|                           {0, 3} | 0 0  0     0  0  ct    a     0     -bt-b |
|                           {0, 3} | b a  0     0  0  0     -ct-c 0     0     |
|                           {0, 3} | 0 bt a     0  0  0     0     -ct-c 0     |
|                           {0, 3} | a 0  -bt-b 0  0  0     0     0     -ct-c |
|                                                                             |
|          /   Q[t]   \9                                                      |
|      1 : |----------|  <----------------------------------------------------|
|          | 2        |     {0, 3} | c 0  0     b  a  0     0     0     0     |
|          \t  + t + 1/     {0, 3} | 0 c  0     0  bt a     0     0     0     |
|                           {0, 3} | 0 0  c     a  0  -bt-b 0     0     0     |
|                           {0, 3} | 0 0  0     ct 0  0     b     a     0     |
|                           {0, 3} | 0 0  0     0  ct 0     0     bt    a     |
|                           {0, 3} | 0 0  0     0  0  ct    a     0     -bt-b |
|                           {0, 3} | b a  0     0  0  0     -ct-c 0     0     |
|                           {0, 3} | 0 bt a     0  0  0     0     -ct-c 0     |
|                           {0, 3} | a 0  -bt-b 0  0  0     0     0     -ct-c |
|                                                                             |
|o10 : ZZdFactorizationMap                                                    |
|-----------------------------------------------------------------------------|
|    /   Q[t]   \9                                                            |
|--- |----------|  : 0                                                        |
||   | 2        |                                                             |
||   \t  + t + 1/                                                             |
||                                                                            |
||                                                                            |
||                                                                            |
||                                                                            |
||                                                                            |
||                                                                            |
||                                                                            |
|                                                                             |
|    /   Q[t]   \9                                                            |
|--- |----------|  : 1                                                        |
||   | 2        |                                                             |
||   \t  + t + 1/                                                             |
||                                                                            |
||                                                                            |
||                                                                            |
||                                                                            |
||                                                                            |
||                                                                            |
||                                                                            |
|                                                                             |
|    /   Q[t]   \9                                                            |
|--- |----------|  : 2                                                        |
||   | 2        |                                                             |
||   \t  + t + 1/                                                             |
||                                                                            |
||                                                                            |
||                                                                            |
||                                                                            |
||                                                                            |
||                                                                            |
||                                                                            |
+-----------------------------------------------------------------------------+
|i11 : (K[1]).dd                                                              |
|                                                                             |
|          /   Q[t]   \9                                                      |
|o11 = 2 : |----------|  <----------------------------------------------------|
|          | 2        |     {0, 3} | ct 0     0  bt    at    0     0  0     0 |
|          \t  + t + 1/     {0, 3} | 0  ct    0  0     -bt-b at    0  0     0 |
|                           {0, 3} | 0  0     ct at    0     b     0  0     0 |
|                           {0, 3} | 0  0     0  -ct-c 0     0     bt at    0 |
|                           {0, 3} | 0  0     0  0     -ct-c 0     0  -bt-b at|
|                           {0, 3} | 0  0     0  0     0     -ct-c at 0     b |
|                           {0, 3} | bt at    0  0     0     0     c  0     0 |
|                           {0, 3} | 0  -bt-b at 0     0     0     0  c     0 |
|                           {0, 3} | at 0     b  0     0     0     0  0     c |
|                                                                             |
|          /   Q[t]   \9                                                      |
|      0 : |----------|  <----------------------------------------------------|
|          | 2        |     {0, 3} | ct 0     0  bt    at    0     0  0     0 |
|          \t  + t + 1/     {0, 3} | 0  ct    0  0     -bt-b at    0  0     0 |
|                           {0, 3} | 0  0     ct at    0     b     0  0     0 |
|                           {0, 3} | 0  0     0  -ct-c 0     0     bt at    0 |
|                           {0, 3} | 0  0     0  0     -ct-c 0     0  -bt-b at|
|                           {0, 3} | 0  0     0  0     0     -ct-c at 0     b |
|                           {0, 3} | bt at    0  0     0     0     c  0     0 |
|                           {0, 3} | 0  -bt-b at 0     0     0     0  c     0 |
|                           {0, 3} | at 0     b  0     0     0     0  0     c |
|                                                                             |
|          /   Q[t]   \9                                                      |
|      1 : |----------|  <----------------------------------------------------|
|          | 2        |     {0, 3} | ct 0     0  bt    at    0     0  0     0 |
|          \t  + t + 1/     {0, 3} | 0  ct    0  0     -bt-b at    0  0     0 |
|                           {0, 3} | 0  0     ct at    0     b     0  0     0 |
|                           {0, 3} | 0  0     0  -ct-c 0     0     bt at    0 |
|                           {0, 3} | 0  0     0  0     -ct-c 0     0  -bt-b at|
|                           {0, 3} | 0  0     0  0     0     -ct-c at 0     b |
|                           {0, 3} | bt at    0  0     0     0     c  0     0 |
|                           {0, 3} | 0  -bt-b at 0     0     0     0  c     0 |
|                           {0, 3} | at 0     b  0     0     0     0  0     c |
|                                                                             |
|o11 : ZZdFactorizationMap                                                    |
|-----------------------------------------------------------------------------|
|     /   Q[t]   \9                                                           |
|---- |----------|  : 0                                                       |
| |   | 2        |                                                            |
| |   \t  + t + 1/                                                            |
| |                                                                           |
| |                                                                           |
| |                                                                           |
| |                                                                           |
| |                                                                           |
| |                                                                           |
| |                                                                           |
|                                                                             |
|     /   Q[t]   \9                                                           |
|---- |----------|  : 1                                                       |
| |   | 2        |                                                            |
| |   \t  + t + 1/                                                            |
| |                                                                           |
| |                                                                           |
| |                                                                           |
| |                                                                           |
| |                                                                           |
| |                                                                           |
| |                                                                           |
|                                                                             |
|     /   Q[t]   \9                                                           |
|---- |----------|  : 2                                                       |
| |   | 2        |                                                            |
| |   \t  + t + 1/                                                            |
| |                                                                           |
| |                                                                           |
| |                                                                           |
| |                                                                           |
| |                                                                           |
| |                                                                           |
| |                                                                           |
+-----------------------------------------------------------------------------+
|i12 : isWellDefined (K[1])                                                   |
|                                                                             |
|o12 = true                                                                   |
+-----------------------------------------------------------------------------+
|i13 : potential (K[2])                                                       |
|                                                                             |
|       3    3    3                                                           |
|o13 = a  + b  + c                                                            |
|                                                                             |
|         Q[t]                                                                |
|o13 : ----------                                                             |
|       2                                                                     |
|      t  + t + 1                                                             |
+-----------------------------------------------------------------------------+
|i14 : assert(K[3] == K)                                                      |
+-----------------------------------------------------------------------------+

In order to shift the factorization by one step, and not change the
differential, one can do the following.

+----------------------------------------------------+
|i15 : E = ZZdfactorization(C, Base => -1)           |
|                                                    |
|                24               24               24|
|o15 = (QQ[a..d])   <-- (QQ[a..d])   <-- (QQ[a..d])  |
|                                                    |
|      0                1                0           |
|                                                    |
|o15 : ZZdFactorization                              |
+----------------------------------------------------+
|i16 : assert isWellDefined E                        |
+----------------------------------------------------+
|i17 : assert(dd^E_2 == dd^C_3)                      |
+----------------------------------------------------+

The shift operator is functorial, as illustrated below.

+-----------------------------------------------------------------------------+
|i18 : i = id_E[1]                                                            |
|                                                                             |
|                    24                                                       |
|o18 = 0 : (QQ[a..d])   <-----------------------------------------------------|
|                          {5} | 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                          {5} | 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                          {5} | 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                          {5} | 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                          {5} | 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                          {5} | 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                          {5} | 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                          {5} | 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                          {5} | 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                          {5} | 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                          {5} | 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0|
|                          {5} | 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0|
|                          {5} | 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0|
|                          {5} | 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0|
|                          {5} | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0|
|                          {5} | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0|
|                          {5} | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0|
|                          {5} | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0|
|                          {5} | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0|
|                          {5} | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0|
|                          {5} | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0|
|                          {5} | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0|
|                          {5} | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1|
|                          {5} | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                                                                             |
|                    24                                                       |
|      1 : (QQ[a..d])   <-----------------------------------------------------|
|                          {6} | 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                          {6} | 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                          {6} | 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                          {6} | 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                          {6} | 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                          {6} | 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                          {6} | 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                          {6} | 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                          {6} | 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                          {6} | 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                          {6} | 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0|
|                          {6} | 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0|
|                          {6} | 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0|
|                          {6} | 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0|
|                          {6} | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0|
|                          {6} | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0|
|                          {6} | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0|
|                          {6} | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0|
|                          {6} | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0|
|                          {6} | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0|
|                          {6} | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0|
|                          {6} | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0|
|                          {6} | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1|
|                          {6} | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                                                                             |
|o18 : ZZdFactorizationMap                                                    |
|-----------------------------------------------------------------------------|
|                 24                                                          |
|------ (QQ[a..d])   : 0                                                      |
| 0 |                                                                         |
| 0 |                                                                         |
| 0 |                                                                         |
| 0 |                                                                         |
| 0 |                                                                         |
| 0 |                                                                         |
| 0 |                                                                         |
| 0 |                                                                         |
| 0 |                                                                         |
| 0 |                                                                         |
| 0 |                                                                         |
| 0 |                                                                         |
| 0 |                                                                         |
| 0 |                                                                         |
| 0 |                                                                         |
| 0 |                                                                         |
| 0 |                                                                         |
| 0 |                                                                         |
| 0 |                                                                         |
| 0 |                                                                         |
| 0 |                                                                         |
| 0 |                                                                         |
| 0 |                                                                         |
| 1 |                                                                         |
|                                                                             |
|                 24                                                          |
|------ (QQ[a..d])   : 1                                                      |
| 0 |                                                                         |
| 0 |                                                                         |
| 0 |                                                                         |
| 0 |                                                                         |
| 0 |                                                                         |
| 0 |                                                                         |
| 0 |                                                                         |
| 0 |                                                                         |
| 0 |                                                                         |
| 0 |                                                                         |
| 0 |                                                                         |
| 0 |                                                                         |
| 0 |                                                                         |
| 0 |                                                                         |
| 0 |                                                                         |
| 0 |                                                                         |
| 0 |                                                                         |
| 0 |                                                                         |
| 0 |                                                                         |
| 0 |                                                                         |
| 0 |                                                                         |
| 0 |                                                                         |
| 0 |                                                                         |
| 1 |                                                                         |
+-----------------------------------------------------------------------------+
|i19 : not(id_E == i)                                                         |
|                                                                             |
|o19 = true                                                                   |
+-----------------------------------------------------------------------------+
|i20 : i^2 == id_E                                                            |
|                                                                             |
|o20 = false                                                                  |
+-----------------------------------------------------------------------------+
|i21 : dd^E[1]                                                                |
|                                                                             |
|                    24                                                       |
|o21 = 1 : (QQ[a..d])   <-----------------------------------------------------|
|                          {6} | a  0  0  -d 0  d  0  0  0  0  0  c  0  0  0  |
|                          {6} | 0  a  0  0  0  0  0  d  0  0  0  0  0  c  d  |
|                          {6} | 0  0  a  0  0  0  0  0  d  0  0  0  0  0  c  |
|                          {6} | 0  0  0  a  0  0  0  0  0  d  0  0  0  0  0  |
|                          {6} | 0  0  0  0  -a 0  -b 0  -d 0  0  0  0  0  0  |
|                          {6} | -b 0  0  0  0  -a 0  0  0  -d 0  0  0  0  0  |
|                          {6} | 0  0  d  0  0  0  -a 0  0  0  0  0  0  0  0  |
|                          {6} | 0  -b 0  d  0  0  0  -a 0  0  0  0  0  0  0  |
|                          {6} | 0  0  -b 0  0  0  0  0  -a 0  0  0  0  0  0  |
|                          {6} | 0  0  0  -b 0  0  0  0  0  -a 0  0  0  0  0  |
|                          {6} | -d 0  0  0  0  0  c  0  0  0  -a 0  0  0  -d |
|                          {6} | c  0  0  0  0  0  0  0  0  0  0  -a 0  0  0  |
|                          {6} | 0  -d 0  0  0  0  0  0  0  0  0  0  -a 0  0  |
|                          {6} | 0  c  -d 0  0  0  0  0  0  0  0  0  0  -a 0  |
|                          {6} | 0  0  c  -d 0  0  0  0  0  0  0  0  0  0  -a |
|                          {6} | 0  0  0  c  0  0  0  0  0  0  0  0  0  0  0  |
|                          {6} | 0  0  0  0  c  -d 0  0  0  0  b  0  0  0  0  |
|                          {6} | 0  0  0  0  0  c  0  0  0  0  0  b  0  0  0  |
|                          {6} | 0  0  0  0  0  0  -d 0  0  0  0  0  -c -d 0  |
|                          {6} | 0  0  0  0  -d 0  0  0  0  0  -c -d 0  0  0  |
|                          {6} | 0  0  0  0  0  0  c  -d 0  0  0  0  b  0  -d |
|                          {6} | 0  0  0  0  0  0  0  c  -d 0  0  0  0  b  0  |
|                          {6} | 0  0  0  0  0  0  0  0  c  -d 0  0  0  0  b  |
|                          {6} | 0  0  0  0  0  0  0  0  0  c  0  0  0  0  0  |
|                                                                             |
|                    24                                                       |
|      0 : (QQ[a..d])   <-----------------------------------------------------|
|                          {5} | a  0  0  d  0  d  0  0  0  0  0  c  0  0  0  |
|                          {5} | 0  a  0  0  0  0  0  d  0  0  0  0  0  c  d  |
|                          {5} | 0  0  a  0  0  0  0  0  d  0  0  0  0  0  c  |
|                          {5} | 0  0  0  a  0  0  0  0  0  d  0  0  0  0  0  |
|                          {5} | 0  0  0  0  -a 0  b  0  d  0  0  0  0  0  0  |
|                          {5} | -b 0  0  0  0  -a 0  0  0  d  0  0  0  0  0  |
|                          {5} | 0  0  d  0  0  0  -a 0  0  0  0  0  0  0  0  |
|                          {5} | 0  -b 0  d  0  0  0  -a 0  0  0  0  0  0  0  |
|                          {5} | 0  0  -b 0  0  0  0  0  -a 0  0  0  0  0  0  |
|                          {5} | 0  0  0  -b 0  0  0  0  0  -a 0  0  0  0  0  |
|                          {5} | -d 0  0  0  0  0  -c 0  0  0  -a 0  0  0  d  |
|                          {5} | c  0  0  0  0  0  0  0  0  0  0  -a 0  0  0  |
|                          {5} | 0  -d 0  0  0  0  0  0  0  0  0  0  -a 0  0  |
|                          {5} | 0  c  -d 0  0  0  0  0  0  0  0  0  0  -a 0  |
|                          {5} | 0  0  c  -d 0  0  0  0  0  0  0  0  0  0  -a |
|                          {5} | 0  0  0  c  0  0  0  0  0  0  0  0  0  0  0  |
|                          {5} | 0  0  0  0  c  -d 0  0  0  0  b  0  0  0  0  |
|                          {5} | 0  0  0  0  0  c  0  0  0  0  0  b  0  0  0  |
|                          {5} | 0  0  0  0  0  0  -d 0  0  0  0  0  -c -d 0  |
|                          {5} | 0  0  0  0  -d 0  0  0  0  0  -c -d 0  0  0  |
|                          {5} | 0  0  0  0  0  0  c  -d 0  0  0  0  b  0  -d |
|                          {5} | 0  0  0  0  0  0  0  c  -d 0  0  0  0  b  0  |
|                          {5} | 0  0  0  0  0  0  0  0  c  -d 0  0  0  0  b  |
|                          {5} | 0  0  0  0  0  0  0  0  0  c  0  0  0  0  0  |
|                                                                             |
|o21 : ZZdFactorizationMap                                                    |
|-----------------------------------------------------------------------------|
|                                         24                                  |
|------------------------------ (QQ[a..d])   : 0                              |
|0  0  0  0  0  0  0  0  0  |                                                 |
|0  0  0  0  0  0  0  0  0  |                                                 |
|d  0  0  0  0  0  0  0  0  |                                                 |
|c  0  0  0  0  0  0  0  0  |                                                 |
|0  c  d  0  b  0  0  0  0  |                                                 |
|0  0  c  0  0  0  0  0  0  |                                                 |
|0  0  0  b  0  c  d  0  0  |                                                 |
|0  0  0  0  0  0  c  d  0  |                                                 |
|0  0  0  0  0  0  0  c  d  |                                                 |
|0  0  0  0  0  0  0  0  c  |                                                 |
|0  -d 0  0  -c 0  0  0  0  |                                                 |
|-d 0  -d 0  0  0  0  0  0  |                                                 |
|0  0  0  -c 0  -d 0  0  0  |                                                 |
|0  0  0  0  0  0  -d 0  0  |                                                 |
|0  0  0  0  0  0  0  -d 0  |                                                 |
|-a 0  0  0  0  0  0  0  -d |                                                 |
|0  a  0  0  0  0  0  -d 0  |                                                 |
|0  0  a  0  0  0  0  0  -d |                                                 |
|0  0  0  a  0  0  0  0  0  |                                                 |
|0  0  0  -b a  -c -d 0  0  |                                                 |
|0  0  0  0  0  a  0  0  0  |                                                 |
|-d 0  0  0  0  0  a  0  0  |                                                 |
|0  0  0  0  0  0  0  a  0  |                                                 |
|b  0  0  0  0  0  0  0  a  |                                                 |
|                                                                             |
|                                         24                                  |
|------------------------------ (QQ[a..d])   : 1                              |
|0  0  0  0  0  0  0  0  0  |                                                 |
|0  0  0  0  0  0  0  0  0  |                                                 |
|d  0  0  0  0  0  0  0  0  |                                                 |
|c  0  0  0  0  0  0  0  0  |                                                 |
|0  c  d  0  b  0  0  0  0  |                                                 |
|0  0  c  0  0  0  0  0  0  |                                                 |
|0  0  0  b  0  c  d  0  0  |                                                 |
|0  0  0  0  0  0  c  d  0  |                                                 |
|0  0  0  0  0  0  0  c  d  |                                                 |
|0  0  0  0  0  0  0  0  c  |                                                 |
|0  -d 0  0  -c 0  0  0  0  |                                                 |
|d  0  -d 0  0  0  0  0  0  |                                                 |
|0  0  0  -c 0  -d 0  0  0  |                                                 |
|0  0  0  0  0  0  -d 0  0  |                                                 |
|0  0  0  0  0  0  0  -d 0  |                                                 |
|-a 0  0  0  0  0  0  0  -d |                                                 |
|0  a  0  0  0  0  0  d  0  |                                                 |
|0  0  a  0  0  0  0  0  d  |                                                 |
|0  0  0  a  0  0  0  0  0  |                                                 |
|0  0  0  b  a  c  d  0  0  |                                                 |
|0  0  0  0  0  a  0  0  0  |                                                 |
|-d 0  0  0  0  0  a  0  0  |                                                 |
|0  0  0  0  0  0  0  a  0  |                                                 |
|b  0  0  0  0  0  0  0  a  |                                                 |
+-----------------------------------------------------------------------------+
|i22 : isdFactorization(E[1])                                                 |
|                                                                             |
|              2    2                                                         |
|o22 = (true, a  + c  - b*d)                                                  |
|                                                                             |
|o22 : Sequence                                                               |
+-----------------------------------------------------------------------------+

See also
========

  * period -- the period of a ZZ/d-graded factorization or map
  * ZZdfactorization(ZZdFactorization)
    -- make a ZZ/d-graded factorization
    with shifted base; used for permuting the modules without adding signs

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

  * ZZdFactorization Array -- shift a
    ZZ/d-graded factorization or map of ZZ/d-graded factorizations
  * "ZZdFactorizationMap Array"
-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:991:0.

ZZdfactorization(HashTable) -- make a ZZ/d-graded factorization
***************************************************************

  * Function: ZZdfactorization,
  * Usage:
        ZZdfactorization H
  * Inputs:
      * H, a hash table (Macaulay2Doc), each key is an integer
        indexing a differential, and the value at that key is the map
  * Optional inputs (Macaulay2Doc),:
      * Base (missing documentation) => an integer (Macaulay2Doc),
        default value 0, ignored when the input is a hash table
  * Outputs:
      * a ZZ/d graded factorization,

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

A ZZ/d-graded factorization is a sequence of objects $C_i$, connected by maps
$dd^C_i : C_i \rightarrow C_{i-1}$ such that the composition of any d
consecutive maps is equal to a fixed scalar multiple of the identity.

In practice, a ZZdFactorization may be visualized as a sequence of R-module
maps:

$$F_0 \leftarrow F_1 \leftarrow \cdots \leftarrow F_{d-1}$$

with the caveat that $d^F_0 : F_0 \to F_{d-1}$, since one should count degree
modulo d.

+------------------------------------------------------+
|i1 : S = ZZ/101[a..d]                                 |
|                                                      |
|o1 = S                                                |
|                                                      |
|o1 : PolynomialRing                                   |
+------------------------------------------------------+
|i2 : F1 = map(S^2,S^2,matrix {{d, b}, {a, c}})        |
|                                                      |
|o2 = | d b |                                          |
|     | a c |                                          |
|                                                      |
|             2      2                                 |
|o2 : Matrix S  <-- S                                  |
+------------------------------------------------------+
|i3 : F2 = map(source F1,S^2,matrix {{-c, b}, {a, -d}})|
|                                                      |
|o3 = | -c b  |                                        |
|     | a  -d |                                        |
|                                                      |
|             2      2                                 |
|o3 : Matrix S  <-- S                                  |
+------------------------------------------------------+
|i4 : C = ZZdfactorization hashTable{1 => F1, 2 => F2} |
|                                                      |
|      2      2      2                                 |
|o4 = S  <-- S  <-- S                                  |
|                                                      |
|     0      1      0                                  |
|                                                      |
|o4 : ZZdFactorization                                 |
+------------------------------------------------------+
|i5 : C.dd                                             |
|                                                      |
|          2                 2                         |
|o5 = 1 : S  <------------- S  : 0                     |
|               | -c b  |                              |
|               | a  -d |                              |
|                                                      |
|          2               2                           |
|     0 : S  <----------- S  : 1                       |
|               | d b |                                |
|               | a c |                                |
|                                                      |
|o5 : ZZdFactorizationMap                              |
+------------------------------------------------------+
|i6 : isWellDefined C                                  |
|                                                      |
|o6 = true                                             |
+------------------------------------------------------+
|i7 : isdFactorization C                               |
|                                                      |
|o7 = (true, a*b - c*d)                                |
|                                                      |
|o7 : Sequence                                         |
+------------------------------------------------------+
|i8 : C.dd^2                                           |
|                                                      |
|          2                       2                   |
|o8 = 0 : S  <------------------- S  : 0               |
|               | ab-cd 0     |                        |
|               | 0     ab-cd |                        |
|                                                      |
|          2                       2                   |
|     1 : S  <------------------- S  : 1               |
|               | ab-cd 0     |                        |
|               | 0     ab-cd |                        |
|                                                      |
|o8 : ZZdFactorizationMap                              |
+------------------------------------------------------+

This is the primary constructor used by all of the more user friendly methods
for constructing a ZZ/d-graded factorization.

Caveat
======

This constructor minimizes computation and does very little error checking. To
verify that a complex is well constructed, use
isWellDefined(ZZdFactorization).

See also
========

  * Making ZZdFactorizations -- Information
    about the basic constructors
  * isWellDefined(ZZdFactorization),
    -- whether a ZZ/d-graded factorization is well-defined
  * ZZdfactorization(List) -- make a ZZ/d-graded
    factorization
  * ZZdfactorization(Module,ZZ), --
    convert a module/ring/ideal into a ZZ/d-graded factorization for specified
    period d

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

  * ZZdfactorization(HashTable) -- make
    a ZZ/d-graded factorization
-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:540:0.

ZZdfactorization(Module,ZZ) -- convert a module/ring/ideal into a ZZ/d-graded factorization for specified period d
******************************************************************************************************************

  * Function: ZZdfactorization,
  * Usage:
        ZZdfactorization(M, d)
  * Inputs:
      * M, a module (Macaulay2Doc),
      * d, an integer (Macaulay2Doc), specifies the period of the
        resulting factorization
  * Optional inputs (Macaulay2Doc),:
      * Base (missing documentation) => an integer (Macaulay2Doc),
        default value 0, the index of the target of the first map in the
        differential.
  * Outputs:
      * a ZZ/d graded factorization,

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

A ZZ/d-graded factorization is a sequence of objects $C_i$, connected by maps
$dd^C_i : C_i \rightarrow C_{i-1}$ such that the composition of any d
consecutive maps is equal to a fixed scalar multiple of the identity.

In practice, a ZZdFactorization may be visualized as a sequence of R-module
maps:

$$F_0 \leftarrow F_1 \leftarrow \cdots \leftarrow F_{d-1}$$

with the caveat that $d^F_0 : F_0 \to F_{d-1}$, since one should count degree
modulo d.

Sometimes the user may wish to view a module as a ZZ/d-graded factorization
with zeros in all other spots. This can be accomplished with the following
syntax:

+----------------------------------------------------------+
|i1 : S = ZZ/101[a..c]                                     |
|                                                          |
|o1 = S                                                    |
|                                                          |
|o1 : PolynomialRing                                       |
+----------------------------------------------------------+
|i2 : M = coker vars S                                     |
|                                                          |
|o2 = cokernel | a b c |                                   |
|                                                          |
|                            1                             |
|o2 : S-module, quotient of S                              |
+----------------------------------------------------------+
|i3 : C1 = ZZdfactorization(M, 2)                          |
|                                                          |
|o3 = cokernel | a b c | <-- 0 <-- cokernel | a b c |      |
|                                                          |
|     0                      1     0                       |
|                                                          |
|o3 : ZZdFactorization                                     |
+----------------------------------------------------------+
|i4 : isWellDefined C1                                     |
|                                                          |
|o4 = true                                                 |
+----------------------------------------------------------+
|i5 : isZZdComplex C1                                      |
|                                                          |
|o5 = true                                                 |
+----------------------------------------------------------+
|i6 : C2 = ZZdfactorization(M, 3)                          |
|                                                          |
|o6 = cokernel | a b c | <-- 0 <-- 0 <-- cokernel | a b c ||
|                                                          |
|     0                      1     2     0                 |
|                                                          |
|o6 : ZZdFactorization                                     |
+----------------------------------------------------------+
|i7 : C2'= ZZdfactorization(M, 3, Base => 1)               |
|                                                          |
|o7 = 0 <-- cokernel | a b c | <-- 0 <-- 0                 |
|                                                          |
|     0     1                      2     0                 |
|                                                          |
|o7 : ZZdFactorization                                     |
+----------------------------------------------------------+
|i8 : C2'' = ZZdfactorization(M, 3, Base => 2)             |
|                                                          |
|o8 = 0 <-- 0 <-- cokernel | a b c | <-- 0                 |
|                                                          |
|     0     1     2                      0                 |
|                                                          |
|o8 : ZZdFactorization                                     |
+----------------------------------------------------------+

To start a factorization at a base different from zero, use the optional
argument Base.

Caveat
======

This constructor minimizes computation and does very little error checking. To
verify that a factorization is well constructed, use
isWellDefined(ZZdFactorization).

See also
========

  * Making ZZdFactorizations -- Information
    about the basic constructors
  * isWellDefined(ZZdFactorization),
    -- whether a ZZ/d-graded factorization is well-defined
  * ZZdfactorization(HashTable) -- make
    a ZZ/d-graded factorization
  * ZZdFactorization Array -- shift a
    ZZ/d-graded factorization or map of ZZ/d-graded factorizations

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

  * "ZZdfactorization(Ideal,ZZ)"
  * ZZdfactorization(Module,ZZ), --
    convert a module/ring/ideal into a ZZ/d-graded factorization for specified
    period d
  * "ZZdfactorization(Ring,ZZ)"
-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:730:0.

ZZdfactorization(ZZdFactorization) -- make a ZZ/d-graded factorization with shifted base; used for permuting the modules without adding signs
*********************************************************************************************************************************************

  * Function: ZZdfactorization,
  * Usage:
        ZZdfactorization X
  * Inputs:
      * X, a ZZ/d graded factorization, specifies maps
  * Optional inputs (Macaulay2Doc),:
      * Base (missing documentation) => an integer (Macaulay2Doc),
        default value 0, the index of the target of the first map in the
        differential.
  * Outputs:
      * a ZZ/d graded factorization,

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

A ZZ/d-graded factorization is a sequence of objects $C_i$, connected by maps
$dd^C_i : C_i \rightarrow C_{i-1}$ such that the composition of any d
consecutive maps is equal to a fixed scalar multiple of the identity.

In practice, a ZZdFactorization may be visualized as a sequence of R-module
maps:

$$F_0 \leftarrow F_1 \leftarrow \cdots \leftarrow F_{d-1}$$

with the caveat that $d^F_0 : F_0 \to F_{d-1}$, since one should count degree
modulo d.

If one wants to shift the differentials of a factorization without having to
redefine or add signs, this can be done as follows:

+-------------------------------------------+
|i1 : S = ZZ/101[a..d]                      |
|                                           |
|o1 = S                                     |
|                                           |
|o1 : PolynomialRing                        |
+-------------------------------------------+
|i2 : C1 = ZZdfactorization {a,b}           |
|                                           |
|      1      1      1                      |
|o2 = S  <-- S  <-- S                       |
|                                           |
|     0      1      0                       |
|                                           |
|o2 : ZZdFactorization                      |
+-------------------------------------------+
|i3 : C1.dd                                 |
|                                           |
|          1             1                  |
|o3 = 1 : S  <--------- S  : 0              |
|               | b |                       |
|                                           |
|          1             1                  |
|     0 : S  <--------- S  : 1              |
|               | a |                       |
|                                           |
|o3 : ZZdFactorizationMap                   |
+-------------------------------------------+
|i4 : C1' = ZZdfactorization(C1, Base => 1) |
|                                           |
|      1      1      1                      |
|o4 = S  <-- S  <-- S                       |
|                                           |
|     0      1      0                       |
|                                           |
|o4 : ZZdFactorization                      |
+-------------------------------------------+
|i5 : C1'.dd                                |
|                                           |
|          1             1                  |
|o5 = 1 : S  <--------- S  : 0              |
|               | a |                       |
|                                           |
|          1             1                  |
|     0 : S  <--------- S  : 1              |
|               | b |                       |
|                                           |
|o5 : ZZdFactorizationMap                   |
+-------------------------------------------+
|i6 : C2 = ZZdfactorization {a,b,c}         |
|                                           |
|      1      1      1      1               |
|o6 = S  <-- S  <-- S  <-- S                |
|                                           |
|     0      1      2      0                |
|                                           |
|o6 : ZZdFactorization                      |
+-------------------------------------------+
|i7 : C2.dd                                 |
|                                           |
|          1             1                  |
|o7 = 2 : S  <--------- S  : 0              |
|               | c |                       |
|                                           |
|          1             1                  |
|     0 : S  <--------- S  : 1              |
|               | a |                       |
|                                           |
|          1             1                  |
|     1 : S  <--------- S  : 2              |
|               | b |                       |
|                                           |
|o7 : ZZdFactorizationMap                   |
+-------------------------------------------+
|i8 : C2' = ZZdfactorization(C2, Base => 2) |
|                                           |
|      1      1      1      1               |
|o8 = S  <-- S  <-- S  <-- S                |
|                                           |
|     0      1      2      0                |
|                                           |
|o8 : ZZdFactorization                      |
+-------------------------------------------+
|i9 : C2'.dd                                |
|                                           |
|          1             1                  |
|o9 = 2 : S  <--------- S  : 0              |
|               | a |                       |
|                                           |
|          1             1                  |
|     0 : S  <--------- S  : 1              |
|               | b |                       |
|                                           |
|          1             1                  |
|     1 : S  <--------- S  : 2              |
|               | c |                       |
|                                           |
|o9 : ZZdFactorizationMap                   |
+-------------------------------------------+
|i10 : C3 = ZZdfactorization {a,b,c,d}      |
|                                           |
|       1      1      1      1      1       |
|o10 = S  <-- S  <-- S  <-- S  <-- S        |
|                                           |
|      0      1      2      3      0        |
|                                           |
|o10 : ZZdFactorization                     |
+-------------------------------------------+
|i11 : C3.dd                                |
|                                           |
|           1             1                 |
|o11 = 3 : S  <--------- S  : 0             |
|                | d |                      |
|                                           |
|           1             1                 |
|      0 : S  <--------- S  : 1             |
|                | a |                      |
|                                           |
|           1             1                 |
|      1 : S  <--------- S  : 2             |
|                | b |                      |
|                                           |
|           1             1                 |
|      2 : S  <--------- S  : 3             |
|                | c |                      |
|                                           |
|o11 : ZZdFactorizationMap                  |
+-------------------------------------------+
|i12 : C3' = ZZdfactorization(C3, Base => 3)|
|                                           |
|       1      1      1      1      1       |
|o12 = S  <-- S  <-- S  <-- S  <-- S        |
|                                           |
|      0      1      2      3      0        |
|                                           |
|o12 : ZZdFactorization                     |
+-------------------------------------------+
|i13 : C3'.dd                               |
|                                           |
|           1             1                 |
|o13 = 3 : S  <--------- S  : 0             |
|                | a |                      |
|                                           |
|           1             1                 |
|      0 : S  <--------- S  : 1             |
|                | b |                      |
|                                           |
|           1             1                 |
|      1 : S  <--------- S  : 2             |
|                | c |                      |
|                                           |
|           1             1                 |
|      2 : S  <--------- S  : 3             |
|                | d |                      |
|                                           |
|o13 : ZZdFactorizationMap                  |
+-------------------------------------------+

Caveat
======

This constructor minimizes computation and does very little error checking. To
verify that a factorization is well constructed, use
isWellDefined(ZZdFactorization).

See also
========

  * Making ZZdFactorizations -- Information
    about the basic constructors
  * isWellDefined(ZZdFactorization),
    -- whether a ZZ/d-graded factorization is well-defined
  * ZZdfactorization(HashTable) -- make
    a ZZ/d-graded factorization
  * ZZdFactorization Array -- shift a
    ZZ/d-graded factorization or map of ZZ/d-graded factorizations

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

  * ZZdfactorization(ZZdFactorization)
    -- make a ZZ/d-graded factorization
    with shifted base; used for permuting the modules without adding signs
-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:674:0.

ZZdFactorizationMap -- the class of all maps between ZZ/d-graded factorizations
*******************************************************************************

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

A map of ZZ/d-graded factorizations $f \colon C \rightarrow D$ of degree $d$ is
a sequence of maps $f_i \colon C_i \rightarrow D_{d+i}$. No relationship
between the maps $f_i$ and and the differentials of either $C$ or $D$ is
assumed.

The set of all maps from $C$ to $D$ form the another factorization $\Hom(C,D)$
where $\Hom(C,D)_d$ consists of the maps of degree $d$; this is a factorization
of the differential of the respective potentials.

The usual algebraic operations are available: addition, subtraction, scalar
multiplication, and composition. The identity map from a factorization to
itself can be produced with id (Macaulay2Doc). An attempt to add
(subtract, or compare) a ring element to a factorization map will result in the
ring element being multiplied by the appropriate identity map.

See also
========

  * Making maps between ZZ/d-graded factorizations
    -- information about the basic constructors
  * ZZdFactorization -- the class of all ZZ/d-graded
    factorizations

Functions and methods returning a map of ZZ/d-graded factorizations:
====================================================================

  * "Number + ZZdFactorizationMap" -- see arithmetic with ZZ/d-graded factorization maps,
    --
    perform arithmetic operations on ZZ/d-graded factorization maps
  * "Number - ZZdFactorizationMap" -- see arithmetic with ZZ/d-graded factorization maps,
    --
    perform arithmetic operations on ZZ/d-graded factorization maps
  * "RingElement + ZZdFactorizationMap" -- see arithmetic with ZZ/d-graded factorization maps,
    -- perform arithmetic operations on ZZ/d-graded factorization maps
  * "RingElement - ZZdFactorizationMap" -- see arithmetic with ZZ/d-graded factorization maps,
    -- perform arithmetic operations on ZZ/d-graded factorization maps
  * "ZZdFactorizationMap + Number" -- see arithmetic with ZZ/d-graded factorization maps,
    --
    perform arithmetic operations on ZZ/d-graded factorization maps
  * "ZZdFactorizationMap + RingElement" -- see arithmetic with ZZ/d-graded factorization maps,
    -- perform arithmetic operations on ZZ/d-graded factorization maps
  * "ZZdFactorizationMap - Number" -- see arithmetic with ZZ/d-graded factorization maps,
    --
    perform arithmetic operations on ZZ/d-graded factorization maps
  * "ZZdFactorizationMap - RingElement" -- see arithmetic with ZZ/d-graded factorization maps,
    -- perform arithmetic operations on ZZ/d-graded factorization maps
  * "ZZdFactorizationMap - ZZdFactorizationMap" -- see arithmetic with ZZ/d-graded factorization maps,
    -- perform arithmetic operations on ZZ/d-graded factorization maps
  * "Complex ** ZZdFactorizationMap" -- see ComplexMap ** ZZdFactorizationMap,
    -- the map of
    ZZ/d-graded factorizations between tensor factorizations, obtained by first
    folding the relevant complex map
  * ComplexMap ** ZZdFactorizationMap
    -- the map of ZZ/d-graded factorizations between
    tensor factorizations, obtained by first folding the relevant complex map
  * "ZZdFactorizationMap ** Complex" -- see ComplexMap ** ZZdFactorizationMap,
    -- the map of
    ZZ/d-graded factorizations between tensor factorizations, obtained by first
    folding the relevant complex map
  * "ZZdFactorizationMap ** ComplexMap" -- see ComplexMap ** ZZdFactorizationMap,
    -- the map of
    ZZ/d-graded factorizations between tensor factorizations, obtained by first
    folding the relevant complex map
  * "Symbol ^ ZZdFactorization" -- see differential of a ZZ/d-graded factorization,
    -- get the maps
    between the terms in a ZZ/d-graded factorization
  * dual(ZZdFactorizationMap) -- the dual
    of a map of ZZ/d-graded factorizations
  * dual(ZZdFactorizationMap,RingElement)
    -- the dual of a map of
    ZZ/d-graded factorizations
  * "dual(ZZdFactorizationMap,Symbol)" -- see
    dual(ZZdFactorizationMap,RingElement),
    -- the dual of a map of
    ZZ/d-graded factorizations
  * extend(ZZdFactorization,ZZdFactorization,Matrix) (missing documentation)
  * extend(ZZdFactorization,ZZdFactorization,Matrix,Sequence) (missing
    documentation)
  * HH ZZdFactorizationMap -- induced map on
    homology or cohomology
  * Hom(ComplexMap,ZZdFactorizationMap)
    -- the map of factorizations
    between Hom factorizations formed by first folding the relevant complex map
  * "Hom(ComplexMap,ZZdFactorizationMap,RingElement)" -- see
    Hom(ComplexMap,ZZdFactorizationMap),
    -- the map of factorizations
    between Hom factorizations formed by first folding the relevant complex map
  * "Hom(ComplexMap,ZZdFactorizationMap,Symbol)" -- see
    Hom(ComplexMap,ZZdFactorizationMap),
    -- the map of factorizations
    between Hom factorizations formed by first folding the relevant complex map
  * "Hom(ZZdFactorizationMap,ComplexMap)" -- see
    Hom(ComplexMap,ZZdFactorizationMap),
    -- the map of factorizations
    between Hom factorizations formed by first folding the relevant complex map
  * "Hom(ZZdFactorizationMap,ComplexMap,RingElement)" -- see
    Hom(ComplexMap,ZZdFactorizationMap),
    -- the map of factorizations
    between Hom factorizations formed by first folding the relevant complex map
  * "Hom(ZZdFactorizationMap,ComplexMap,Symbol)" -- see
    Hom(ComplexMap,ZZdFactorizationMap),
    -- the map of factorizations
    between Hom factorizations formed by first folding the relevant complex map
  * "Hom(Ring,ZZdFactorization)" -- see
    Hom(ZZdFactorization,ZZdFactorization),
    -- the ZZ/d-graded
    homomorphism factorization between two ZZ/d-graded factorizations
  * "Hom(Matrix,ZZdFactorization)" -- see
    Hom(ZZdFactorizationMap,ZZdFactorizationMap),
    -- the map of
    factorizations between Hom complexes
  * "Hom(Matrix,ZZdFactorizationMap)" -- see
    Hom(ZZdFactorizationMap,ZZdFactorizationMap),
    -- the map of
    factorizations between Hom complexes
  * "Hom(Module,ZZdFactorizationMap)" -- see
    Hom(ZZdFactorizationMap,ZZdFactorizationMap),
    -- the map of
    factorizations between Hom complexes
  * "Hom(Ring,ZZdFactorizationMap)" -- see
    Hom(ZZdFactorizationMap,ZZdFactorizationMap),
    -- the map of
    factorizations between Hom complexes
  * "Hom(ZZdFactorization,Matrix)" -- see
    Hom(ZZdFactorizationMap,ZZdFactorizationMap),
    -- the map of
    factorizations between Hom complexes
  * "Hom(ZZdFactorization,ZZdFactorizationMap)" -- see
    Hom(ZZdFactorizationMap,ZZdFactorizationMap),
    -- the map of
    factorizations between Hom complexes
  * "Hom(ZZdFactorizationMap,Matrix)" -- see
    Hom(ZZdFactorizationMap,ZZdFactorizationMap),
    -- the map of
    factorizations between Hom complexes
  * "Hom(ZZdFactorizationMap,Module)" -- see
    Hom(ZZdFactorizationMap,ZZdFactorizationMap),
    -- the map of
    factorizations between Hom complexes
  * "Hom(ZZdFactorizationMap,Ring)" -- see
    Hom(ZZdFactorizationMap,ZZdFactorizationMap),
    -- the map of
    factorizations between Hom complexes
  * "Hom(ZZdFactorizationMap,ZZdFactorization)" -- see
    Hom(ZZdFactorizationMap,ZZdFactorizationMap),
    -- the map of
    factorizations between Hom complexes
  * Hom(ZZdFactorizationMap,ZZdFactorizationMap)
    -- the map of
    factorizations between Hom complexes
  * "Hom(ZZdFactorization,Matrix,RingElement)" -- see
    Hom(ZZdFactorizationMap,ZZdFactorizationMap,Symbol),
    -- the map of
    factorizations between Hom complexes
  * "Hom(ZZdFactorization,Matrix,Symbol)" -- see
    Hom(ZZdFactorizationMap,ZZdFactorizationMap,Symbol),
    -- the map of
    factorizations between Hom complexes
  * "Hom(ZZdFactorization,ZZdFactorizationMap,RingElement)" -- see
    Hom(ZZdFactorizationMap,ZZdFactorizationMap,Symbol),
    -- the map of
    factorizations between Hom complexes
  * "Hom(ZZdFactorization,ZZdFactorizationMap,Symbol)" -- see
    Hom(ZZdFactorizationMap,ZZdFactorizationMap,Symbol),
    -- the map of
    factorizations between Hom complexes
  * "Hom(ZZdFactorizationMap,Matrix,RingElement)" -- see
    Hom(ZZdFactorizationMap,ZZdFactorizationMap,Symbol),
    -- the map of
    factorizations between Hom complexes
  * "Hom(ZZdFactorizationMap,Matrix,Symbol)" -- see
    Hom(ZZdFactorizationMap,ZZdFactorizationMap,Symbol),
    -- the map of
    factorizations between Hom complexes
  * "Hom(ZZdFactorizationMap,Module,RingElement)" -- see
    Hom(ZZdFactorizationMap,ZZdFactorizationMap,Symbol),
    -- the map of
    factorizations between Hom complexes
  * "Hom(ZZdFactorizationMap,Module,Symbol)" -- see
    Hom(ZZdFactorizationMap,ZZdFactorizationMap,Symbol),
    -- the map of
    factorizations between Hom complexes
  * "Hom(ZZdFactorizationMap,Ring,RingElement)" -- see
    Hom(ZZdFactorizationMap,ZZdFactorizationMap,Symbol),
    -- the map of
    factorizations between Hom complexes
  * "Hom(ZZdFactorizationMap,Ring,Symbol)" -- see
    Hom(ZZdFactorizationMap,ZZdFactorizationMap,Symbol),
    -- the map of
    factorizations between Hom complexes
  * "Hom(ZZdFactorizationMap,ZZdFactorization,RingElement)" -- see
    Hom(ZZdFactorizationMap,ZZdFactorizationMap,Symbol),
    -- the map of
    factorizations between Hom complexes
  * "Hom(ZZdFactorizationMap,ZZdFactorization,Symbol)" -- see
    Hom(ZZdFactorizationMap,ZZdFactorizationMap,Symbol),
    -- the map of
    factorizations between Hom complexes
  * "Hom(ZZdFactorizationMap,ZZdFactorizationMap,RingElement)" -- see
    Hom(ZZdFactorizationMap,ZZdFactorizationMap,Symbol),
    -- the map of
    factorizations between Hom complexes
  * Hom(ZZdFactorizationMap,ZZdFactorizationMap,Symbol)
    -- the map of
    factorizations between Hom complexes
  * homomorphism'(ZZdFactorizationMap)
    -- get the element of Hom from a
    map of factorizations
  * homomorphism(ZZ,Matrix,ZZdFactorization)
    -- get the homomorphism
    from an element of Hom
  * homomorphism(ZZdFactorizationMap)
    -- get the homomorphism from an
    element of Hom
  * inducedMap(ZZdFactorization,ZZdFactorization)
    -- make the map of
    ZZ/d-graded factorizations induced at each term by the identity map
  * inducedMap(ZZdFactorization,ZZdFactorization,ZZdFactorizationMap) (missing
    documentation)
  * "injectiveCover(ZZdFactorization)" -- see injectiveCover,
    -- Constructs the injective hull of a d-fold matrix
    factorization
  * map(ZZdFactorization,ZZdFactorization,Function) (missing documentation)
  * map(ZZdFactorization,ZZdFactorization,HashTable)
    -- make a map of
    ZZ/d-graded factorizations
  * map(ZZdFactorization,ZZdFactorization,List) (missing documentation)
  * map(ZZdFactorization,ZZdFactorization,ZZ)
    -- make the zero map or
    identity between ZZ/d-graded factorizations
  * map(ZZdFactorization,ZZdFactorization,ZZdFactorizationMap)
    -- make
    a new map of ZZ/d-graded factorizations from an existing one (for inducing
    maps)
  * "minimalPresentation(ZZdFactorizationMap)" -- see
    minimalPresentation(ZZdFactorization),
    -- minimal presentation of all
    terms in a ZZ/d-graded factorization
  * "prune(ZZdFactorizationMap)" -- see
    minimalPresentation(ZZdFactorization),
    -- minimal presentation of all
    terms in a ZZ/d-graded factorization
  * nullHomotopy(ZZdFactorizationMap)
    -- a map which is a candidate for
    being a null homotopy
  * "projectiveCover(ZZdFactorization)" -- see projectiveCover,
    -- Constructs the projective cover of a d-fold matrix
    factorization
  * "randomFactorizationMap(ZZdFactorization,ZZdFactorization)" -- see
    randomFactorizationMap, -- a random map of
    ZZ/d-graded factorizations
  * "Ring ** ZZdFactorizationMap" -- see RingMap ** ZZdFactorizationMap,
    -- tensor a map of ZZ/d-graded
    factorizations along a ring map
  * RingMap ** ZZdFactorizationMap,
    -- tensor a map of ZZ/d-graded factorizations along a ring map
  * "tensor(RingMap,ZZdFactorizationMap)" -- see RingMap ** ZZdFactorizationMap,
    -- tensor a map of
    ZZ/d-graded factorizations along a ring map
  * "tensor(ZZdFactorizationMap,RingMap)" -- see RingMap ** ZZdFactorizationMap,
    -- tensor a map of
    ZZ/d-graded factorizations along a ring map
  * "ZZdFactorizationMap ** Ring" -- see RingMap ** ZZdFactorizationMap,
    -- tensor a map of ZZ/d-graded
    factorizations along a ring map
  * "ZZdFactorizationMap ** RingMap" -- see RingMap ** ZZdFactorizationMap,
    -- tensor a map of
    ZZ/d-graded factorizations along a ring map
  * RingMap ZZdFactorizationMap -- apply a
    ring map to a map of ZZ/d-graded factorizations
  * tensor(ZZdFactorizationMap,ZZdFactorizationMap,RingElement) (missing
    documentation)
  * tensor(ZZdFactorizationMap,ZZdFactorizationMap,Symbol) (missing
    documentation)
  * tensorAssociativity(ZZdFactorization,ZZdFactorization, ZZdFactorization)
    -- make the canonical isomorphism
    arising from associativity
  * tensorCommutativity(ZZdFactorization,ZZdFactorization)
    -- make the
    canonical isomorphism arising from commutativity of the tensor product
    operation
  * "Matrix ** ZZdFactorization" -- see ZZdFactorization ** Matrix,
    -- create the tensor product of a
    ZZ/d-graded factorization and a map of modules
  * ZZdFactorization ** Matrix -- create
    the tensor product of a ZZ/d-graded factorization and a map of modules
  * "ZZdFactorization ^ Array" -- see ZZdFactorization _ Array,
    -- the canonical inclusion or projection map of
    a direct sum
  * ZZdFactorization _ Array -- the
    canonical inclusion or projection map of a direct sum
  * "ZZdFactorizationMap Array" -- see ZZdFactorization Array,
    -- shift a ZZ/d-graded factorization or map of
    ZZ/d-graded factorizations
  * "Module ** ZZdFactorizationMap" -- see ZZdFactorizationMap ** ZZdFactorizationMap,
    -- the
    map of ZZ/d-graded factorizations between tensor factorizations
  * "tensor(ZZdFactorizationMap,ZZdFactorizationMap)" -- see
    ZZdFactorizationMap ** ZZdFactorizationMap,
    -- the map of ZZ/d-graded factorizations between
    tensor factorizations
  * "ZZdFactorization ** ZZdFactorizationMap" -- see ZZdFactorizationMap ** ZZdFactorizationMap,
    --
    the map of ZZ/d-graded factorizations between tensor factorizations
  * "ZZdFactorizationMap ** Module" -- see ZZdFactorizationMap ** ZZdFactorizationMap,
    -- the
    map of ZZ/d-graded factorizations between tensor factorizations
  * "ZZdFactorizationMap ** ZZdFactorization" -- see ZZdFactorizationMap ** ZZdFactorizationMap,
    --
    the map of ZZ/d-graded factorizations between tensor factorizations
  * ZZdFactorizationMap ** ZZdFactorizationMap
    -- the map of ZZ/d-graded factorizations
    between tensor factorizations
  * ZZdFactorizationMap ++ ZZdFactorizationMap
    -- direct sum of ZZ/d-graded factorization maps
  * ZZdFactorizationMap ^ Array -- the
    composition with the canonical inclusion or projection map
  * "ZZdFactorizationMap _ Array" -- see ZZdFactorizationMap ^ Array,
    -- the composition with the canonical
    inclusion or projection map
  * ZZdFactorizationMap ^ ZZ -- the n-fold
    composition
  * ZZdFactorizationMap | ZZdFactorizationMap
    -- join or concatenate maps horizontally
  * ZZdFactorizationMap || ZZdFactorizationMap
    -- join or concatenate maps vertically

Methods that use a map of ZZ/d-graded factorizations:
=====================================================

  * "adjoinRoot(ZZdFactorizationMap,RingElement)" -- see adjoinRoot,
    -- Adjoin a root of unity to the underlying object input
  * "adjoinRoot(ZZdFactorizationMap,Symbol)" -- see adjoinRoot,
    -- Adjoin a root of unity to the underlying object input
  * "- ZZdFactorizationMap" -- see arithmetic with ZZ/d-graded factorization maps,
    --
    perform arithmetic operations on ZZ/d-graded factorization maps
  * "Number * ZZdFactorizationMap" -- see arithmetic with ZZ/d-graded factorization maps,
    --
    perform arithmetic operations on ZZ/d-graded factorization maps
  * "RingElement * ZZdFactorizationMap" -- see arithmetic with ZZ/d-graded factorization maps,
    -- perform arithmetic operations on ZZ/d-graded factorization maps
  * "ZZdFactorizationMap * Number" -- see arithmetic with ZZ/d-graded factorization maps,
    --
    perform arithmetic operations on ZZ/d-graded factorization maps
  * "ZZdFactorizationMap * RingElement" -- see arithmetic with ZZ/d-graded factorization maps,
    -- perform arithmetic operations on ZZ/d-graded factorization maps
  * "ZZdFactorizationMap + ZZdFactorizationMap" -- see arithmetic with ZZ/d-graded factorization maps,
    -- perform arithmetic operations on ZZ/d-graded factorization maps
  * coimage(ZZdFactorizationMap), --
    make the coimage of a map of ZZ/d-graded factorizations
  * cokernel(ZZdFactorizationMap), --
    make the cokernel of a map of ZZ/d-graded factorizations
  * components(ZZdFactorizationMap),
    -- list the components of a direct sum
  * cone(ZZdFactorizationMap) -- make the
    mapping cone of a morphism of ZZ/d-graded factorizations
  * degree(ZZdFactorizationMap) -- get
    the degree of a map of ZZ/d-graded factorizations
  * expression(ZZdFactorizationMap) (missing documentation)
  * "HH^ZZ ZZdFactorizationMap" -- see HH ZZdFactorizationMap,
    -- induced map on homology or cohomology
  * "HH_ZZ ZZdFactorizationMap" -- see HH ZZdFactorizationMap,
    -- induced map on homology or cohomology
  * image(ZZdFactorizationMap) -- make
    the image of a map of ZZ/d-graded factorizations
  * isCommutative(ZZdFactorizationMap)
    -- whether a ZZ/d-graded
    factorization map commutes with the differentials
  * isFactorizationMorphism(ZZdFactorizationMap)
    -- whether a
    ZZdFactorizationMap is a morphism of factorizations
  * isHomogeneous(ZZdFactorizationMap)
    -- whether a map of ZZ/d-graded
    factorizations is homogeneous
  * isNullHomotopic(ZZdFactorizationMap)
    -- whether a map of ZZ/d-graded
    factorizations is null-homotopic
  * isNullHomotopyOf(ZZdFactorizationMap,ZZdFactorizationMap)
    -- whether
    the first map of ZZ/d-graded factorizations is a null homotopy for the
    second
  * isQuasiIsomorphism(ZZdFactorizationMap)
    -- whether a map of
    ZZ/d-graded factorizations is a quasi-isomorphism
  * isShortExactSequence(ZZdFactorizationMap,ZZdFactorizationMap),
    --
    whether a pair of ZZ/d-graded factorization maps forms a short exact
    sequence
  * isWellDefined(ZZdFactorizationMap)
    -- whether a map of ZZ/d-graded
    factorizations is well-defined
  * kernel(ZZdFactorizationMap) -- make
    the kernel of a map of ZZ/d-graded factorizations
  * net(ZZdFactorizationMap) (missing documentation)
  * "period(ZZdFactorizationMap)" -- see period, -- the period of
    a ZZ/d-graded factorization or map
  * "ring(ZZdFactorizationMap)" -- see ring(ZZdFactorization),
    -- access the ring of a ZZ/d-graded
    factorization or a factorization map
  * source(ZZdFactorizationMap) -- get
    the source of a map of ZZ/d-graded factorizations
  * "suspension(ZZdFactorizationMap)" -- see suspension, --
    Constructs the suspension of a d-fold factorization
  * target(ZZdFactorizationMap) -- get
    the target of a map of ZZ/d-graded factorizations
  * "unfold(ZZdFactorizationMap,List)" -- see unfold, -- Converts
    a factorization into a complex
  * "unfold(ZZdFactorizationMap,ZZ)" -- see unfold, -- Converts a
    factorization into a complex
  * ZZdFactorizationMap * ZZdFactorizationMap
    -- composition of homomorphisms of ZZ/d-graded
    factorizations
  * "directSum(ZZdFactorizationMap)" -- see ZZdFactorizationMap ++ ZZdFactorizationMap,
    -- direct
    sum of ZZ/d-graded factorization maps
  * "RingElement == ZZdFactorizationMap" -- see ZZdFactorizationMap == ZZdFactorizationMap,
    -- whether
    two ZZ/d-graded factorization maps are equal
  * "ZZ == ZZdFactorizationMap" -- see ZZdFactorizationMap == ZZdFactorizationMap,
    -- whether
    two ZZ/d-graded factorization maps are equal
  * "ZZdFactorizationMap == RingElement" -- see ZZdFactorizationMap == ZZdFactorizationMap,
    -- whether
    two ZZ/d-graded factorization maps are equal
  * "ZZdFactorizationMap == ZZ" -- see ZZdFactorizationMap == ZZdFactorizationMap,
    -- whether
    two ZZ/d-graded factorization maps are equal
  * ZZdFactorizationMap == ZZdFactorizationMap
    -- whether two ZZ/d-graded factorization maps are
    equal
  * ZZdFactorizationMap _ ZZ -- access
    individual matrices in a ZZ/d-graded factorization map

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

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

-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:2349:0.

ZZdFactorizationMap * ZZdFactorizationMap -- composition of homomorphisms of ZZ/d-graded factorizations
*******************************************************************************************************

  * Operator: * (Macaulay2Doc),
  * Usage:
        f = h * g
  * Inputs:
      * h, a map of ZZ/d-graded factorizations, if
        a ring element or integer, then we multiply the ring element by the
        appropriate identity map
      * g, a map of ZZ/d-graded factorizations,
  * Outputs:
      * f, a map of ZZ/d-graded factorizations, the
        composition of $g$ followed by $h$

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

If $g_i : C_i \rightarrow D_{d+i}$, and $h_j : D_j \rightarrow E_{e+j}$, then
the composition corresponds to $f_i := h_{d+i} * g_i : C_i \rightarrow
E_{i+d+e}$.  In particular, the degree of the composition $f$ is the sum of the
degrees of $g$ and $h$.

+---------------------------------------------------------------+
|i1 : R = ZZ/101[a..d]                                          |
|                                                               |
|o1 = R                                                         |
|                                                               |
|o1 : PolynomialRing                                            |
+---------------------------------------------------------------+
|i2 : C = koszulMF({a,b,c}, a^3 + b^3 + c^3)                    |
|                                                               |
|      4      4      4                                          |
|o2 = R  <-- R  <-- R                                           |
|                                                               |
|     0      1      0                                           |
|                                                               |
|o2 : ZZdFactorization                                          |
+---------------------------------------------------------------+
|i3 : 3 * dd^C                                                  |
|                                                               |
|          4                            4                       |
|o3 = 1 : R  <------------------------ R  : 0                   |
|               | 3c2 0   3b  3a   |                            |
|               | 0   3c2 3a2 -3b2 |                            |
|               | 3b2 3a  -3c 0    |                            |
|               | 3a2 -3b 0   -3c  |                            |
|                                                               |
|          4                             4                      |
|     0 : R  <------------------------- R  : 1                  |
|               | 3c  0   3b   3a   |                           |
|               | 0   3c  3a2  -3b2 |                           |
|               | 3b2 3a  -3c2 0    |                           |
|               | 3a2 -3b 0    -3c2 |                           |
|                                                               |
|o3 : ZZdFactorizationMap                                       |
+---------------------------------------------------------------+
|i4 : 0 * dd^C                                                  |
|                                                               |
|o4 = 0                                                         |
|                                                               |
|o4 : ZZdFactorizationMap                                       |
+---------------------------------------------------------------+
|i5 : dd^C * dd^C                                               |
|                                                               |
|          4                                               4    |
|o5 = 0 : R  <------------------------------------------- R  : 0|
|               | a3+b3+c3 0        0        0        |         |
|               | 0        a3+b3+c3 0        0        |         |
|               | 0        0        a3+b3+c3 0        |         |
|               | 0        0        0        a3+b3+c3 |         |
|                                                               |
|          4                                               4    |
|     1 : R  <------------------------------------------- R  : 1|
|               | a3+b3+c3 0        0        0        |         |
|               | 0        a3+b3+c3 0        0        |         |
|               | 0        0        a3+b3+c3 0        |         |
|               | 0        0        0        a3+b3+c3 |         |
|                                                               |
|o5 : ZZdFactorizationMap                                       |
+---------------------------------------------------------------+

See also
========

  * Making maps between factorizations
    -- information about the basic constructors
  * arithmetic with ZZ/d-graded factorization maps
    -- perform arithmetic operations on
    ZZ/d-graded factorization maps

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

  * ZZdFactorizationMap * ZZdFactorizationMap
    -- composition of homomorphisms of ZZ/d-graded
    factorizations
-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:3082:0.

ZZdFactorizationMap ** ZZdFactorizationMap -- the map of ZZ/d-graded factorizations between tensor factorizations
*****************************************************************************************************************

  * Operator: ** (Macaulay2Doc),
  * Usage:
        h = f ** g
        h = tensor(f, g)
  * Inputs:
      * f, a map of ZZ/d-graded factorizations,
      * g, a map of ZZ/d-graded factorizations,
  * Outputs:
      * h, a map of ZZ/d-graded factorizations,

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

The maps $f : C \to D$ and $g : E \to F$ of ZZ/d-graded factorizations induce
the map $h = f \otimes g : C \otimes E \to D \otimes F$ defined by $c \otimes e
\mapsto f(c) \otimes g(e)$.

+-----------------------------------------------------------------------------+
|i1 : S = ZZ/101[a,b];                                                        |
+-----------------------------------------------------------------------------+
|i2 : R = S/(a^3+b^3);                                                        |
+-----------------------------------------------------------------------------+
|i3 : m = ideal vars R                                                        |
|                                                                             |
|o3 = ideal (a, b)                                                            |
|                                                                             |
|o3 : Ideal of R                                                              |
+-----------------------------------------------------------------------------+
|i4 : C = tailMF m                                                            |
|                                                                             |
|      2      2      2                                                        |
|o4 = S  <-- S  <-- S                                                         |
|                                                                             |
|     0      1      0                                                         |
|                                                                             |
|o4 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i5 : D = tailMF (m^2)                                                        |
|                                                                             |
|      3      3      3                                                        |
|o5 = S  <-- S  <-- S                                                         |
|                                                                             |
|     0      1      0                                                         |
|                                                                             |
|o5 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i6 : f = randomFactorizationMap(C,D)                                         |
|                                                                             |
|          2                                         3                        |
|o6 = 0 : S  <------------------------------------- S  : 0                    |
|               {2} | 24a-36b -29a+19b -10a-29b |                             |
|               {3} | -30     19       -8       |                             |
|                                                                             |
|          2                                          3                       |
|     1 : S  <-------------------------------------- S  : 1                   |
|               {4} | -22a-29b -16a+39b 19a-47b  |                            |
|               {4} | -24a-38b 21a+34b  -39a-18b |                            |
|                                                                             |
|o6 : ZZdFactorizationMap                                                     |
+-----------------------------------------------------------------------------+
|i7 : E = (dual C)                                                            |
|                                                                             |
|      2      2      2                                                        |
|o7 = S  <-- S  <-- S                                                         |
|                                                                             |
|     0      1      0                                                         |
|                                                                             |
|o7 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i8 : F = (dual D)                                                            |
|                                                                             |
|      3      3      3                                                        |
|o8 = S  <-- S  <-- S                                                         |
|                                                                             |
|     0      1      0                                                         |
|                                                                             |
|o8 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i9 : g = randomFactorizationMap(F,E)                                         |
|                                                                             |
|          3                            2                                     |
|o9 = 0 : S  <------------------------ S  : 0                                 |
|               {-3} | -13a-43b 2  |                                          |
|               {-3} | -15a-28b 16 |                                          |
|               {-3} | -47a+38b 22 |                                          |
|                                                                             |
|          3                                 2                                |
|     1 : S  <----------------------------- S  : 1                            |
|               {-5} | 45a-34b  -16a+7b |                                     |
|               {-5} | -48a-47b 15a-23b |                                     |
|               {-5} | 47a+19b  39a+43b |                                     |
|                                                                             |
|o9 : ZZdFactorizationMap                                                     |
+-----------------------------------------------------------------------------+
|i10 : h = f ** g                                                             |
|                                                                             |
|           12                                                                |
|o10 = 0 : S   <--------------------------------------------------------------|
|                 {-1} | -9a2+42ab+33b2  48a+29b  -27a2-10ab-9b2 43a+38b  29a2|
|                 {-1} | 44a2-31ab-2b2   -20a+30b 31a2+22ab-27b2 41a+b    49a2|
|                 {-1} | -17a2-22ab+46b2 23a+16b  50a2+25ab+15b2 -32a+14b -35a|
|                 {0}  | -14a-23b        41       -45a-9b        38       3a+4|
|                 {0}  | 46a+32b         25       18a-27b        1        19a+|
|                 {0}  | -4a-29b         47       16a+15b        14       -28a|
|                 {-1} | 0               0        0              0        0   |
|                 {-1} | 0               0        0              0        0   |
|                 {-1} | 0               0        0              0        0   |
|                 {-1} | 0               0        0              0        0   |
|                 {-1} | 0               0        0              0        0   |
|                 {-1} | 0               0        0              0        0   |
|                                                                             |
|           12                                                                |
|      1 : S   <--------------------------------------------------------------|
|                 {-3} | -31a2-12ab+12b2 20a2+37ab-50b2  8a2+23ab-40b2   -41a2|
|                 {-3} | -41a2-6ab-25b2  -44a2+19ab+20b2 -22a2+47ab+16b2 -31a2|
|                 {-3} | 17a2-24ab+23b2  27a2+32ab-33b2  -50a2+39ab-43b2 -20a2|
|                 {-2} | -37a+10b        -25a-8b         47a-40b         -a+32|
|                 {-2} | 26a-4b          -46a-17b        -3a+16b         -18a-|
|                 {-2} | 4a+36b          42a+23b         -16a-43b        34a+9|
|                 {1}  | 0               0               0               0    |
|                 {1}  | 0               0               0               0    |
|                 {1}  | 0               0               0               0    |
|                 {1}  | 0               0               0               0    |
|                 {1}  | 0               0               0               0    |
|                 {1}  | 0               0               0               0    |
|                                                                             |
|o10 : ZZdFactorizationMap                                                    |
|-----------------------------------------------------------------------------|
|                                                                             |
|-----------------------------------------------------------------------------|
|-ab+35b2   -20a+43b 0               0               0               0        |
|+8ab+4b2   42a+41b  0               0               0               0        |
|2-27ab+9b2 -18a-32b 0               0               0               0        |
|1b         -16      0               0               0               0        |
|22b        -27      0               0               0               0        |
|-b         26       0               0               0               0        |
|           0        20a2+49ab-24b2  49a2+7ab-b2     -13a2-24ab-13b2 -47a2-29a|
|           0        46a2+2ab+50b2   -27a2-30ab-40b2 -40a2-9ab-15b2  -38a2+44a|
|           0        -24a2+37ab-46b2 -50a2+44ab-35b2 -45a2+14ab+34b2 -18a2+25a|
|           0        31a2+15ab-21b2  -20a2+36ab+37b2 36a2+8ab-45b2   -33a2+7ab|
|           0        41a2+23ab-32b2  44a2-18ab-35b2  2a2+7ab+18b2    12a2+27ab|
|           0        -17a2-20ab-15b2 -27a2+11ab-18b2 -23a2-23ab+40b2 11a2+7ab+|
|                                                                             |
|                                                                             |
|-----------------------------------------------------------------------------|
|-2ab+32b2  -46a2+45ab-24b2 -42a2-10ab-b2  0               0        0         |
|+43ab-33b2 -25a2+44ab+50b2 -49a2-3ab-40b2 0               0        0         |
|-ab+9b2    35a2-38ab-46b2  14a2-46ab-35b2 0               0        0         |
|b          44a-31b         27a+45b        0               0        0         |
|33b        -20a-28b        -19a-18b       0               0        0         |
|b          28a+50b         -9a-41b        0               0        0         |
|           0               0              -17a2+10ab+35b2 -44a+43b 6a2-21ab+4|
|           0               0              27a2+41ab+4b2   -49a+41b 38a2-36ab+|
|           0               0              24a2+22ab+9b2   21a-32b  45a2-17ab-|
|           0               0              9a2+11ab+18b2   -48a+25b 30a2-32ab-|
|           0               0              -44a2+30ab-47b2 20a-2b   -12a2+13ab|
|           0               0              17a2-35ab-30b2  -23a-28b 23a2+8ab-2|
|-----------------------------------------------------------------------------|
|                                            12                               |
|------------------------------------------ S   : 0                           |
|       0               0               |                                     |
|       0               0               |                                     |
|       0               0               |                                     |
|       0               0               |                                     |
|       0               0               |                                     |
|       0               0               |                                     |
|b-30b2 47a2-34ab-18b2  -a2-24ab-26b2   |                                     |
|b+12b2 -3a2+50ab-13b2  -18a2-31ab-30b2 |                                     |
|b-40b2 -16a2-30ab+16b2 34a2-6ab-b2     |                                     |
|+36b2  -38a2+11ab+6b2  18a2+15ab-25b2  |                                     |
|+26b2  -47a2-30ab+38b2 21a2+21ab+10b2  |                                     |
|48b2   -15a2+29ab-39b2 -6a2+45ab+34b2  |                                     |
|                                                                             |
|                                            12                               |
|------------------------------------------ S   : 1                           |
|      0        0              0        |                                     |
|      0        0              0        |                                     |
|      0        0              0        |                                     |
|      0        0              0        |                                     |
|      0        0              0        |                                     |
|      0        0              0        |                                     |
|0b2   -32a-23b -45a2-4ab+b2   38a+7b   |                                     |
|19b2  47a+18b  18a2-29ab+3b2  a-45b    |                                     |
|33b2  -49a+50b 16a2+2ab+32b2  14a-24b  |                                     |
|48b2  42a-33b  2a2-8ab-34b2   23a-36b  |                                     |
|-43b2 33a+39b  -21a2+49ab-b2  -18a+15b |                                     |
|1b2   -43a+41b 15a2-30ab+23b2 -50a+8b  |                                     |
+-----------------------------------------------------------------------------+
|i11 : assert isWellDefined h                                                 |
+-----------------------------------------------------------------------------+
|i12 : assert(source h === D ** E)                                            |
+-----------------------------------------------------------------------------+
|i13 : assert(target h === C ** F)                                            |
+-----------------------------------------------------------------------------+

If one argument is a ZZdFactorization or Module, then the identity map of the
corresponding factorization is used.

+-----------------------------------------------------------------------------+
|i14 : fE = f ** E                                                            |
|                                                                             |
|           8                                                                 |
|o14 = 0 : S  <---------------------------------------------------------------|
|                {0}  | 24a-36b 0       -29a+19b 0        -10a-29b 0        0 |
|                {-1} | 0       24a-36b 0        -29a+19b 0        -10a-29b 0 |
|                {1}  | -30     0       19       0        -8       0        0 |
|                {0}  | 0       -30     0        19       0        -8       0 |
|                {0}  | 0       0       0        0        0        0        -2|
|                {0}  | 0       0       0        0        0        0        0 |
|                {0}  | 0       0       0        0        0        0        -2|
|                {0}  | 0       0       0        0        0        0        0 |
|                                                                             |
|           8                                                                 |
|      1 : S  <---------------------------------------------------------------|
|                {-2} | 24a-36b 0       -29a+19b 0        -10a-29b 0        0 |
|                {-2} | 0       24a-36b 0        -29a+19b 0        -10a-29b 0 |
|                {-1} | -30     0       19       0        -8       0        0 |
|                {-1} | 0       -30     0        19       0        -8       0 |
|                {2}  | 0       0       0        0        0        0        -2|
|                {1}  | 0       0       0        0        0        0        0 |
|                {2}  | 0       0       0        0        0        0        -2|
|                {1}  | 0       0       0        0        0        0        0 |
|                                                                             |
|o14 : ZZdFactorizationMap                                                    |
|-----------------------------------------------------------------------------|
|                                                         12                  |
|------------------------------------------------------- S   : 0              |
|       0        0        0        0        0        |                        |
|       0        0        0        0        0        |                        |
|       0        0        0        0        0        |                        |
|       0        0        0        0        0        |                        |
|2a-29b 0        -16a+39b 0        19a-47b  0        |                        |
|       -22a-29b 0        -16a+39b 0        19a-47b  |                        |
|4a-38b 0        21a+34b  0        -39a-18b 0        |                        |
|       -24a-38b 0        21a+34b  0        -39a-18b |                        |
|                                                                             |
|                                                         12                  |
|------------------------------------------------------- S   : 1              |
|       0        0        0        0        0        |                        |
|       0        0        0        0        0        |                        |
|       0        0        0        0        0        |                        |
|       0        0        0        0        0        |                        |
|2a-29b 0        -16a+39b 0        19a-47b  0        |                        |
|       -22a-29b 0        -16a+39b 0        19a-47b  |                        |
|4a-38b 0        21a+34b  0        -39a-18b 0        |                        |
|       -24a-38b 0        21a+34b  0        -39a-18b |                        |
+-----------------------------------------------------------------------------+
|i15 : assert(fE === f ** id_E)                                               |
+-----------------------------------------------------------------------------+
|i16 : k = coker vars S                                                       |
|                                                                             |
|o16 = cokernel | a b |                                                       |
|                                                                             |
|                             1                                               |
|o16 : S-module, quotient of S                                                |
+-----------------------------------------------------------------------------+
|i17 : gk = g ** k                                                            |
|                                                                             |
|o17 = 0 : cokernel {-3} | a b 0 0 0 0 | <----------------- cokernel {-2} | a |
|                   {-3} | 0 0 a b 0 0 |    {-3} | 0 2  |            {-3} | 0 |
|                   {-3} | 0 0 0 0 a b |    {-3} | 0 16 |                     |
|                                           {-3} | 0 22 |                     |
|                                                                             |
|      1 : cokernel {-5} | a b 0 0 0 0 | <----- cokernel {-4} | a b 0 0 | : 1 |
|                   {-5} | 0 0 a b 0 0 |    0            {-4} | 0 0 a b |     |
|                   {-5} | 0 0 0 0 a b |                                      |
|                                                                             |
|o17 : ZZdFactorizationMap                                                    |
|-----------------------------------------------------------------------------|
|b 0 0 | : 0                                                                  |
|0 a b |                                                                      |
+-----------------------------------------------------------------------------+
|i18 : assert(gk == g ** id_(complex k))                                      |
+-----------------------------------------------------------------------------+

This routine is functorial.

+-------------------------------------------------------------------------+
|i19 : use S;                                                             |
+-------------------------------------------------------------------------+
|i20 : D' = randomTailMF(a^3+b^3)                                         |
|                                                                         |
|       10      10      10                                                |
|o20 = S   <-- S   <-- S                                                  |
|                                                                         |
|      0       1       0                                                  |
|                                                                         |
|o20 : ZZdFactorization                                                   |
+-------------------------------------------------------------------------+
|i21 : f' = randomFactorizationMap(D, D',InternalDegree => 3)             |
|                                                                         |
|           3                                                       10    |
|o21 = 0 : S  <--------------------------------------------------- S   : 0|
|                {3} | -16 -18 23  44  19  -28 6   28  5   -28 |          |
|                {3} | -46 27  -37 -39 0   47  -9  -29 -37 42  |          |
|                {3} | 12  -21 -23 20  -47 -28 -33 26  -33 44  |          |
|                                                                         |
|           3                                           10                |
|      1 : S  <--------------------------------------- S   : 1            |
|                {5} | 0 0 0 0 0 30 5   -29 12 -2  |                      |
|                {5} | 0 0 0 0 0 4  -20 15  3  20  |                      |
|                {5} | 0 0 0 0 0 22 -13 -4  9  -26 |                      |
|                                                                         |
|o21 : ZZdFactorizationMap                                                |
+-------------------------------------------------------------------------+
|i22 : (f * f') ** g == (f ** g) * (f' ** id_E)                           |
|                                                                         |
|o22 = true                                                               |
+-------------------------------------------------------------------------+
|i23 : (f * f') ** g == (f ** id_F) * (f' ** g)                           |
|                                                                         |
|o23 = true                                                               |
+-------------------------------------------------------------------------+

See also
========

  * ZZdFactorization ** ZZdFactorization
    -- tensor product of ZZ/d-graded factorizations
  * randomFactorizationMap(ZZdFactorization,ZZdFactorization)
    -- a random map of ZZ/d-graded factorizations
  * Hom(ZZdFactorization,ZZdFactorization)
    -- the ZZ/d-graded
    homomorphism factorization between two ZZ/d-graded factorizations

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

  * "Module ** ZZdFactorizationMap"
  * "ZZdFactorization ** ZZdFactorizationMap"
  * "ZZdFactorizationMap ** Module"
  * "ZZdFactorizationMap ** ZZdFactorization"
  * ZZdFactorizationMap ** ZZdFactorizationMap
    -- the map of ZZ/d-graded factorizations
    between tensor factorizations
-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:3866:0.

ZZdFactorizationMap ++ ZZdFactorizationMap -- direct sum of ZZ/d-graded factorization maps
******************************************************************************************

  * Operator: ++ (Macaulay2Doc),
  * Usage:
        h = f ++ g
        h = directSum(f,g,...)
        h = directSum(name1 => f, name2 => g, ...)
  * Inputs:
      * f, a map of ZZ/d-graded factorizations,
      * g, a map of ZZ/d-graded factorizations,
  * Outputs:
      * h, a map of ZZ/d-graded factorizations,
        that is the direct sum of the input ZZ/d-graded factorization maps

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

The direct sum of two ZZ/d-graded factorization maps is a a ZZ/d-graded
factorization map from the direct sum of the sources to the direct sum of the
targets.

First, we define some non-trivial maps of ZZ/d-graded factorizations.

+----------------------------------------------------------------------------+
|i1 : S = ZZ/101[a,b];                                                       |
+----------------------------------------------------------------------------+
|i2 : R = S/(a^3+b^3);                                                       |
+----------------------------------------------------------------------------+
|i3 : m = ideal vars R                                                       |
|                                                                            |
|o3 = ideal (a, b)                                                           |
|                                                                            |
|o3 : Ideal of R                                                             |
+----------------------------------------------------------------------------+
|i4 : use S;                                                                 |
+----------------------------------------------------------------------------+
|i5 : C1 = tailMF m                                                          |
|                                                                            |
|      2      2      2                                                       |
|o5 = S  <-- S  <-- S                                                        |
|                                                                            |
|     0      1      0                                                        |
|                                                                            |
|o5 : ZZdFactorization                                                       |
+----------------------------------------------------------------------------+
|i6 : C2 = randomTailMF(a^3+b^3, 3, 5, 2)                                    |
|                                                                            |
|      5      5      5                                                       |
|o6 = S  <-- S  <-- S                                                        |
|                                                                            |
|     0      1      0                                                        |
|                                                                            |
|o6 : ZZdFactorization                                                       |
+----------------------------------------------------------------------------+
|i7 : D1 = randomTailMF(a^3+b^3, 2, 4, 2)                                    |
|                                                                            |
|      4      4      4                                                       |
|o7 = S  <-- S  <-- S                                                        |
|                                                                            |
|     0      1      0                                                        |
|                                                                            |
|o7 : ZZdFactorization                                                       |
+----------------------------------------------------------------------------+
|i8 : D2 = tailMF (m^2)                                                      |
|                                                                            |
|      3      3      3                                                       |
|o8 = S  <-- S  <-- S                                                        |
|                                                                            |
|     0      1      0                                                        |
|                                                                            |
|o8 : ZZdFactorization                                                       |
+----------------------------------------------------------------------------+
|i9 : f = randomFactorizationMap(D1, C1, Cycle => true)                      |
|                                                                            |
|          4                                                  2              |
|o9 = 0 : S  <---------------------------------------------- S  : 0          |
|               | 21a2-6ab+32b2   15a3-35a2b+16ab2-47b3  |                   |
|               | 2a2-24ab-32b2   32a3-24a2b+5ab2+13b3   |                   |
|               | -42a2-24ab+30b2 39a3+17a2b+8ab2-18b3   |                   |
|               | -10a2-9ab-18b2  -20a3-15a2b+44ab2+22b3 |                   |
|                                                                            |
|          4                                                            2    |
|     1 : S  <-------------------------------------------------------- S  : 1|
|               {1} | -21a3-9a2b+5ab2+13b3  -15a3+35a2b+37ab2+32b3 |         |
|               {1} | 42a3-15a2b+44ab2+22b3 -39a3-17a2b+31ab2+18b3 |         |
|               {2} | 2a2+29ab-47b2         32a2-9ab-32b2          |         |
|               {2} | -10a2+30ab-18b2       -20a2+24ab-30b2        |         |
|                                                                            |
|o9 : ZZdFactorizationMap                                                    |
+----------------------------------------------------------------------------+
|i10 : g = randomFactorizationMap(D2, C2, Cycle => true, InternalDegree => 4)|
|                                                                            |
|           3                                                        5       |
|o10 = 0 : S  <---------------------------------------------------- S  : 0   |
|                {3} | 46a-4b  -41a-9b 6a      43a+b    3a+12b  |            |
|                {3} | 10a+10b -7a-11b -8a+38b -21a+b   39a+29b |            |
|                {3} | -30a-3b 33a-49b 32a+41b -40a-31b 48a-29b |            |
|                                                                            |
|           3                                                     5          |
|      1 : S  <------------------------------------------------- S  : 1      |
|                {5} | 36  -9a+12b  20a-39b 21a+23b -41a-25b |               |
|                {5} | 44  -45a+47b 41a-7b  32a+41b -33a-19b |               |
|                {5} | -39 -3a-33b  21a-15b 39a+7b  17a-20b  |               |
|                                                                            |
|o10 : ZZdFactorizationMap                                                   |
+----------------------------------------------------------------------------+
+-----------------------------------------------------------------------------+
|i11 : h = f ++ g                                                             |
|                                                                             |
|           7                                                                 |
|o11 = 0 : S  <---------------------------------------------------------------|
|                {0} | 21a2-6ab+32b2   15a3-35a2b+16ab2-47b3  0       0       |
|                {0} | 2a2-24ab-32b2   32a3-24a2b+5ab2+13b3   0       0       |
|                {0} | -42a2-24ab+30b2 39a3+17a2b+8ab2-18b3   0       0       |
|                {0} | -10a2-9ab-18b2  -20a3-15a2b+44ab2+22b3 0       0       |
|                {3} | 0               0                      46a-4b  -41a-9b |
|                {3} | 0               0                      10a+10b -7a-11b |
|                {3} | 0               0                      -30a-3b 33a-49b |
|                                                                             |
|           7                                                                 |
|      1 : S  <---------------------------------------------------------------|
|                {1} | -21a3-9a2b+5ab2+13b3  -15a3+35a2b+37ab2+32b3 0   0     |
|                {1} | 42a3-15a2b+44ab2+22b3 -39a3-17a2b+31ab2+18b3 0   0     |
|                {2} | 2a2+29ab-47b2         32a2-9ab-32b2          0   0     |
|                {2} | -10a2+30ab-18b2       -20a2+24ab-30b2        0   0     |
|                {5} | 0                     0                      36  -9a+12|
|                {5} | 0                     0                      44  -45a+4|
|                {5} | 0                     0                      -39 -3a-33|
|                                                                             |
|o11 : ZZdFactorizationMap                                                    |
|-----------------------------------------------------------------------------|
|                              7                                              |
|---------------------------- S  : 0                                          |
|0       0        0       |                                                   |
|0       0        0       |                                                   |
|0       0        0       |                                                   |
|0       0        0       |                                                   |
|6a      43a+b    3a+12b  |                                                   |
|-8a+38b -21a+b   39a+29b |                                                   |
|32a+41b -40a-31b 48a-29b |                                                   |
|                                                                             |
|                                 7                                           |
|------------------------------- S  : 1                                       |
|   0       0       0        |                                                |
|   0       0       0        |                                                |
|   0       0       0        |                                                |
|   0       0       0        |                                                |
|b  20a-39b 21a+23b -41a-25b |                                                |
|7b 41a-7b  32a+41b -33a-19b |                                                |
|b  21a-15b 39a+7b  17a-20b  |                                                |
+-----------------------------------------------------------------------------+
|i12 : assert isWellDefined h                                                 |
+-----------------------------------------------------------------------------+
|i13 : assert(h == map(D1 ++ D2, C1 ++ C2, {{f,0},{0,g}}))                    |
+-----------------------------------------------------------------------------+

The direct sum of any sequence of factorization maps can be computed as
follows.

+-----------------------------------------------------------------------------+
|i14 : directSum(f, g, f[2])                                                  |
|                                                                             |
|           11                                                                |
|o14 = 0 : S   <--------------------------------------------------------------|
|                 {0} | 21a2-6ab+32b2   15a3-35a2b+16ab2-47b3  0       0      |
|                 {0} | 2a2-24ab-32b2   32a3-24a2b+5ab2+13b3   0       0      |
|                 {0} | -42a2-24ab+30b2 39a3+17a2b+8ab2-18b3   0       0      |
|                 {0} | -10a2-9ab-18b2  -20a3-15a2b+44ab2+22b3 0       0      |
|                 {3} | 0               0                      46a-4b  -41a-9b|
|                 {3} | 0               0                      10a+10b -7a-11b|
|                 {3} | 0               0                      -30a-3b 33a-49b|
|                 {0} | 0               0                      0       0      |
|                 {0} | 0               0                      0       0      |
|                 {0} | 0               0                      0       0      |
|                 {0} | 0               0                      0       0      |
|                                                                             |
|           11                                                                |
|      1 : S   <--------------------------------------------------------------|
|                 {1} | -21a3-9a2b+5ab2+13b3  -15a3+35a2b+37ab2+32b3 0   0    |
|                 {1} | 42a3-15a2b+44ab2+22b3 -39a3-17a2b+31ab2+18b3 0   0    |
|                 {2} | 2a2+29ab-47b2         32a2-9ab-32b2          0   0    |
|                 {2} | -10a2+30ab-18b2       -20a2+24ab-30b2        0   0    |
|                 {5} | 0                     0                      36  -9a+1|
|                 {5} | 0                     0                      44  -45a+|
|                 {5} | 0                     0                      -39 -3a-3|
|                 {1} | 0                     0                      0   0    |
|                 {1} | 0                     0                      0   0    |
|                 {2} | 0                     0                      0   0    |
|                 {2} | 0                     0                      0   0    |
|                                                                             |
|o14 : ZZdFactorizationMap                                                    |
|-----------------------------------------------------------------------------|
|                                                                      9      |
|-------------------------------------------------------------------- S  : 0  |
| 0       0        0       0               0                      |           |
| 0       0        0       0               0                      |           |
| 0       0        0       0               0                      |           |
| 0       0        0       0               0                      |           |
| 6a      43a+b    3a+12b  0               0                      |           |
| -8a+38b -21a+b   39a+29b 0               0                      |           |
| 32a+41b -40a-31b 48a-29b 0               0                      |           |
| 0       0        0       21a2-6ab+32b2   15a3-35a2b+16ab2-47b3  |           |
| 0       0        0       2a2-24ab-32b2   32a3-24a2b+5ab2+13b3   |           |
| 0       0        0       -42a2-24ab+30b2 39a3+17a2b+8ab2-18b3   |           |
| 0       0        0       -10a2-9ab-18b2  -20a3-15a2b+44ab2+22b3 |           |
|                                                                             |
|                                                                             |
|-----------------------------------------------------------------------------|
|    0       0       0        0                     0                      |  |
|    0       0       0        0                     0                      |  |
|    0       0       0        0                     0                      |  |
|    0       0       0        0                     0                      |  |
|2b  20a-39b 21a+23b -41a-25b 0                     0                      |  |
|47b 41a-7b  32a+41b -33a-19b 0                     0                      |  |
|3b  21a-15b 39a+7b  17a-20b  0                     0                      |  |
|    0       0       0        -21a3-9a2b+5ab2+13b3  -15a3+35a2b+37ab2+32b3 |  |
|    0       0       0        42a3-15a2b+44ab2+22b3 -39a3-17a2b+31ab2+18b3 |  |
|    0       0       0        2a2+29ab-47b2         32a2-9ab-32b2          |  |
|    0       0       0        -10a2+30ab-18b2       -20a2+24ab-30b2        |  |
|-----------------------------------------------------------------------------|
| 9                                                                           |
|S  : 1                                                                       |
+-----------------------------------------------------------------------------+
|i15 : h2 = directSum(peanut => f, butter => g, jelly => f[2])                |
|                                                                             |
|           11                                                                |
|o15 = 0 : S   <--------------------------------------------------------------|
|                 {0} | 21a2-6ab+32b2   15a3-35a2b+16ab2-47b3  0       0      |
|                 {0} | 2a2-24ab-32b2   32a3-24a2b+5ab2+13b3   0       0      |
|                 {0} | -42a2-24ab+30b2 39a3+17a2b+8ab2-18b3   0       0      |
|                 {0} | -10a2-9ab-18b2  -20a3-15a2b+44ab2+22b3 0       0      |
|                 {3} | 0               0                      46a-4b  -41a-9b|
|                 {3} | 0               0                      10a+10b -7a-11b|
|                 {3} | 0               0                      -30a-3b 33a-49b|
|                 {0} | 0               0                      0       0      |
|                 {0} | 0               0                      0       0      |
|                 {0} | 0               0                      0       0      |
|                 {0} | 0               0                      0       0      |
|                                                                             |
|           11                                                                |
|      1 : S   <--------------------------------------------------------------|
|                 {1} | -21a3-9a2b+5ab2+13b3  -15a3+35a2b+37ab2+32b3 0   0    |
|                 {1} | 42a3-15a2b+44ab2+22b3 -39a3-17a2b+31ab2+18b3 0   0    |
|                 {2} | 2a2+29ab-47b2         32a2-9ab-32b2          0   0    |
|                 {2} | -10a2+30ab-18b2       -20a2+24ab-30b2        0   0    |
|                 {5} | 0                     0                      36  -9a+1|
|                 {5} | 0                     0                      44  -45a+|
|                 {5} | 0                     0                      -39 -3a-3|
|                 {1} | 0                     0                      0   0    |
|                 {1} | 0                     0                      0   0    |
|                 {2} | 0                     0                      0   0    |
|                 {2} | 0                     0                      0   0    |
|                                                                             |
|o15 : ZZdFactorizationMap                                                    |
|-----------------------------------------------------------------------------|
|                                                                      9      |
|-------------------------------------------------------------------- S  : 0  |
| 0       0        0       0               0                      |           |
| 0       0        0       0               0                      |           |
| 0       0        0       0               0                      |           |
| 0       0        0       0               0                      |           |
| 6a      43a+b    3a+12b  0               0                      |           |
| -8a+38b -21a+b   39a+29b 0               0                      |           |
| 32a+41b -40a-31b 48a-29b 0               0                      |           |
| 0       0        0       21a2-6ab+32b2   15a3-35a2b+16ab2-47b3  |           |
| 0       0        0       2a2-24ab-32b2   32a3-24a2b+5ab2+13b3   |           |
| 0       0        0       -42a2-24ab+30b2 39a3+17a2b+8ab2-18b3   |           |
| 0       0        0       -10a2-9ab-18b2  -20a3-15a2b+44ab2+22b3 |           |
|                                                                             |
|                                                                             |
|-----------------------------------------------------------------------------|
|    0       0       0        0                     0                      |  |
|    0       0       0        0                     0                      |  |
|    0       0       0        0                     0                      |  |
|    0       0       0        0                     0                      |  |
|2b  20a-39b 21a+23b -41a-25b 0                     0                      |  |
|47b 41a-7b  32a+41b -33a-19b 0                     0                      |  |
|3b  21a-15b 39a+7b  17a-20b  0                     0                      |  |
|    0       0       0        -21a3-9a2b+5ab2+13b3  -15a3+35a2b+37ab2+32b3 |  |
|    0       0       0        42a3-15a2b+44ab2+22b3 -39a3-17a2b+31ab2+18b3 |  |
|    0       0       0        2a2+29ab-47b2         32a2-9ab-32b2          |  |
|    0       0       0        -10a2+30ab-18b2       -20a2+24ab-30b2        |  |
|-----------------------------------------------------------------------------|
| 9                                                                           |
|S  : 1                                                                       |
+-----------------------------------------------------------------------------+
|i16 : h2_[butter,jelly]                                                      |
|                                                                             |
|           11                                                                |
|o16 = 0 : S   <--------------------------------------------------------------|
|                 {0} | 0       0       0       0        0       0            |
|                 {0} | 0       0       0       0        0       0            |
|                 {0} | 0       0       0       0        0       0            |
|                 {0} | 0       0       0       0        0       0            |
|                 {3} | 46a-4b  -41a-9b 6a      43a+b    3a+12b  0            |
|                 {3} | 10a+10b -7a-11b -8a+38b -21a+b   39a+29b 0            |
|                 {3} | -30a-3b 33a-49b 32a+41b -40a-31b 48a-29b 0            |
|                 {0} | 0       0       0       0        0       21a2-6ab+32b2|
|                 {0} | 0       0       0       0        0       2a2-24ab-32b2|
|                 {0} | 0       0       0       0        0       -42a2-24ab+30|
|                 {0} | 0       0       0       0        0       -10a2-9ab-18b|
|                                                                             |
|           11                                                                |
|      1 : S   <--------------------------------------------------------------|
|                 {1} | 0   0        0       0       0        0               |
|                 {1} | 0   0        0       0       0        0               |
|                 {2} | 0   0        0       0       0        0               |
|                 {2} | 0   0        0       0       0        0               |
|                 {5} | 36  -9a+12b  20a-39b 21a+23b -41a-25b 0               |
|                 {5} | 44  -45a+47b 41a-7b  32a+41b -33a-19b 0               |
|                 {5} | -39 -3a-33b  21a-15b 39a+7b  17a-20b  0               |
|                 {1} | 0   0        0       0       0        -21a3-9a2b+5ab2+|
|                 {1} | 0   0        0       0       0        42a3-15a2b+44ab2|
|                 {2} | 0   0        0       0       0        2a2+29ab-47b2   |
|                 {2} | 0   0        0       0       0        -10a2+30ab-18b2 |
|                                                                             |
|o16 : ZZdFactorizationMap                                                    |
|-----------------------------------------------------------------------------|
|                               7                                             |
|----------------------------- S  : 0                                         |
|   0                      |                                                  |
|   0                      |                                                  |
|   0                      |                                                  |
|   0                      |                                                  |
|   0                      |                                                  |
|   0                      |                                                  |
|   0                      |                                                  |
|   15a3-35a2b+16ab2-47b3  |                                                  |
|   32a3-24a2b+5ab2+13b3   |                                                  |
|b2 39a3+17a2b+8ab2-18b3   |                                                  |
|2  -20a3-15a2b+44ab2+22b3 |                                                  |
|                                                                             |
|                                  7                                          |
|-------------------------------- S  : 1                                      |
|      0                      |                                               |
|      0                      |                                               |
|      0                      |                                               |
|      0                      |                                               |
|      0                      |                                               |
|      0                      |                                               |
|      0                      |                                               |
|13b3  -15a3+35a2b+37ab2+32b3 |                                               |
|+22b3 -39a3-17a2b+31ab2+18b3 |                                               |
|      32a2-9ab-32b2          |                                               |
|      -20a2+24ab-30b2        |                                               |
+-----------------------------------------------------------------------------+
|i17 : assert(source oo == C2 ++ C1[2])                                       |
+-----------------------------------------------------------------------------+

One can easily obtain the compositions with canonical injections and
surjections.

+--------------------+
|i18 : h_[0]^[0] == f|
|                    |
|o18 = true          |
+--------------------+
|i19 : h_[1]^[1] == g|
|                    |
|o19 = true          |
+--------------------+
|i20 : h_[0]^[1] == 0|
|                    |
|o20 = true          |
+--------------------+
|i21 : h_[1]^[0] == 0|
|                    |
|o21 = true          |
+--------------------+
+---------------------------------+
|i22 : h_[0] == h * (C1 ++ C2)_[0]|
|                                 |
|o22 = true                       |
+---------------------------------+
|i23 : h_[1] == h * (C1 ++ C2)_[1]|
|                                 |
|o23 = true                       |
+---------------------------------+
|i24 : h^[0] == (D1 ++ D2)^[0] * h|
|                                 |
|o24 = true                       |
+---------------------------------+
|i25 : h^[1] == (D1 ++ D2)^[1] * h|
|                                 |
|o25 = true                       |
+---------------------------------+

See also
========

  * ZZdFactorization ++ ZZdFactorization
    -- direct sum of ZZ/d-graded
    factorizations
  * ZZdFactorizationMap ** ZZdFactorizationMap
    -- the map of ZZ/d-graded factorizations
    between tensor factorizations
  * Hom(ZZdFactorizationMap,ZZdFactorizationMap)
    -- the map of
    factorizations between Hom complexes
  * ZZdFactorizationMap _ Array -- the
    composition with the canonical inclusion or projection map

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

  * ZZdFactorizationMap ++ ZZdFactorizationMap
    -- direct sum of ZZ/d-graded factorization maps
-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:4271:0.

ZZdFactorizationMap == ZZdFactorizationMap -- whether two ZZ/d-graded factorization maps are equal
**************************************************************************************************

  * Operator: == (Macaulay2Doc),
  * Usage:
        f == g
        f == 0
        f == 1
        f == r
  * Inputs:
      * f, a map of ZZ/d-graded factorizations, or
        0, or 1.
      * g, a map of ZZ/d-graded factorizations, or
        0, or 1, or any RingElement.
  * Outputs:
      * a Boolean value (Macaulay2Doc), that is true when f and
        g are equal, or when f is equal to the 0 map, the identity map, or a
        scalar multiple of the identity map.

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

Two ZZ/d-graded factorization maps are equal if they have the same source, the
same target, and $f_i = g_i$ for all $i$.

+---------------------------------------+
|i1 : S = ZZ/101[a,b,c];                |
+---------------------------------------+
|i2 : R = S/(a^2+b^2+c^2);              |
+---------------------------------------+
|i3 : m = ideal vars R                  |
|                                       |
|o3 = ideal (a, b, c)                   |
|                                       |
|o3 : Ideal of R                        |
+---------------------------------------+
|i4 : C = tailMF m                      |
|                                       |
|      4      4      4                  |
|o4 = S  <-- S  <-- S                   |
|                                       |
|     0      1      0                   |
|                                       |
|o4 : ZZdFactorization                  |
+---------------------------------------+
|i5 : D = tailMF (m^2)                  |
|                                       |
|      8      8      8                  |
|o5 = S  <-- S  <-- S                   |
|                                       |
|     0      1      0                   |
|                                       |
|o5 : ZZdFactorization                  |
+---------------------------------------+
|i6 : f = id_C                          |
|                                       |
|          4                       4    |
|o6 = 0 : S  <------------------- S  : 0|
|               {3} | 1 0 0 0 |         |
|               {3} | 0 1 0 0 |         |
|               {3} | 0 0 1 0 |         |
|               {3} | 0 0 0 1 |         |
|                                       |
|          4                       4    |
|     1 : S  <------------------- S  : 1|
|               {4} | 1 0 0 0 |         |
|               {4} | 0 1 0 0 |         |
|               {4} | 0 0 1 0 |         |
|               {4} | 0 0 0 1 |         |
|                                       |
|o6 : ZZdFactorizationMap               |
+---------------------------------------+
|i7 : assert(f == 1)                    |
+---------------------------------------+
|i8 : f === id_C[-1][1]                 |
|                                       |
|o8 = false                             |
+---------------------------------------+
|i9 : f == id_C[-1][1]                  |
|                                       |
|o9 = true                              |
+---------------------------------------+

A factorization map is equal to zero if all the maps are zero. This could
require computation to determine if something that is superficially not zero is
in fact zero.

+---------------------------+
|i10 : assert(0 * id_C == 0)|
+---------------------------+
+----------------------------------------------------+
|i11 : use S;                                        |
+----------------------------------------------------+
|i12 : E = koszulMF({a,b,c}, a^3 + b^3 + c^3)        |
|                                                    |
|       4      4      4                              |
|o12 = S  <-- S  <-- S                               |
|                                                    |
|      0      1      0                               |
|                                                    |
|o12 : ZZdFactorization                              |
+----------------------------------------------------+
|i13 : g = randomFactorizationMap(E, E)              |
|                                                    |
|           4                           4            |
|o13 = 0 : S  <----------------------- S  : 0        |
|                | 24  19  -8  -38 |                 |
|                | -36 19  -22 -16 |                 |
|                | -30 -10 -29 39  |                 |
|                | -29 -29 -24 21  |                 |
|                                                    |
|           4                           4            |
|      1 : S  <----------------------- S  : 1        |
|                | 34  -18 -28 16  |                 |
|                | 19  -13 -47 22  |                 |
|                | -47 -43 38  45  |                 |
|                | -39 -15 2   -34 |                 |
|                                                    |
|o13 : ZZdFactorizationMap                           |
+----------------------------------------------------+
|i14 : h = inducedMap(coker g, target g)             |
|                                                    |
|                                               4    |
|o14 = 0 : cokernel | 24  19  -8  -38 | <----- S  : 0|
|                   | -36 19  -22 -16 |    0         |
|                   | -30 -10 -29 39  |              |
|                   | -29 -29 -24 21  |              |
|                                                    |
|                                               4    |
|      1 : cokernel | 34  -18 -28 16  | <----- S  : 1|
|                   | 19  -13 -47 22  |    0         |
|                   | -47 -43 38  45  |              |
|                   | -39 -15 2   -34 |              |
|                                                    |
|o14 : ZZdFactorizationMap                           |
+----------------------------------------------------+
|i15 : assert(prune h == 0)                          |
+----------------------------------------------------+

Testing whether a map is equal to 1 is a shorthand for determining if the
complex map is the identity. Although the matrices may appear to be the
identity, the map is not the identity when the source and target are not equal.

+-----------------------------------------------------------------------------+
|i16 : g = randomFactorizationMap(C, C, InternalDegree=>1, Cycle=>true)       |
|                                                                             |
|           4                                                                 |
|o16 = 0 : S  <-------------------------------------------------------------  |
|                {3} | 8a-17b+36c   26a+36b-45c  8a-24b-39c -19a-50b-30c |    |
|                {3} | 47b+14c      39a-33b-39c  49a-45b-7c 15a+25b-29c  |    |
|                {3} | -21a-23b+17c -11a+42b-24c 42a+5b-11c -48a-11b+48c |    |
|                {3} | 8a-16b-4c    a+49b+2c     2a-43b-47c 43a-6b+35c   |    |
|                                                                             |
|           4                                                                 |
|      1 : S  <-------------------------------------------------------------  |
|                {4} | 42a-33b+35c 21a-25b+2c  -11a+45b-4c  -48a-47b+47c |    |
|                {4} | -8a-49b-29c 8a-6b-39c   -26a-43b+14c 19a-16b+7c   |    |
|                {4} | 49a-42b-30c -11b-45c    39a+5b+36c   15a-23b+39c  |    |
|                {4} | 2a-36b-48c  -8a-50b+24c a-24b-17c    43a-17b-11c  |    |
|                                                                             |
|o16 : ZZdFactorizationMap                                                    |
|-----------------------------------------------------------------------------|
| 4                                                                           |
|S  : 0                                                                       |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
| 4                                                                           |
|S  : 1                                                                       |
+-----------------------------------------------------------------------------+
|i17 : h = inducedMap(coker g, target g)                                      |
|                                                                             |
|                                                                             |
|o17 = 0 : cokernel {3} | 8a-17b+36c   26a+36b-45c  8a-24b-39c -19a-50b-30c | |
|                   {3} | 47b+14c      39a-33b-39c  49a-45b-7c 15a+25b-29c  | |
|                   {3} | -21a-23b+17c -11a+42b-24c 42a+5b-11c -48a-11b+48c | |
|                   {3} | 8a-16b-4c    a+49b+2c     2a-43b-47c 43a-6b+35c   | |
|                                                                             |
|                                                                             |
|                                                                             |
|      1 : cokernel {4} | 42a-33b+35c 21a-25b+2c  -11a+45b-4c  -48a-47b+47c | |
|                   {4} | -8a-49b-29c 8a-6b-39c   -26a-43b+14c 19a-16b+7c   | |
|                   {4} | 49a-42b-30c -11b-45c    39a+5b+36c   15a-23b+39c  | |
|                   {4} | 2a-36b-48c  -8a-50b+24c a-24b-17c    43a-17b-11c  | |
|                                                                             |
|                                                                             |
|o17 : ZZdFactorizationMap                                                    |
|-----------------------------------------------------------------------------|
|                      4                                                      |
|<------------------- S  : 0                                                  |
|   {3} | 1 0 0 0 |                                                           |
|   {3} | 0 1 0 0 |                                                           |
|   {3} | 0 0 1 0 |                                                           |
|   {3} | 0 0 0 1 |                                                           |
|                                                                             |
|                      4                                                      |
|<------------------- S  : 1                                                  |
|   {4} | 1 0 0 0 |                                                           |
|   {4} | 0 1 0 0 |                                                           |
|   {4} | 0 0 1 0 |                                                           |
|   {4} | 0 0 0 1 |                                                           |
+-----------------------------------------------------------------------------+
|i18 : assert(h != 1)                                                         |
+-----------------------------------------------------------------------------+

Testing for equality is not the same testing for isomorphism. In particular,
different presentations of a complex need not be equal.

+-----------------------------------------------------------------------------+
|i19 : D = prune image g                                                      |
|                                                                             |
|       4      4      4                                                       |
|o19 = S  <-- S  <-- S                                                        |
|                                                                             |
|      0      1      0                                                        |
|                                                                             |
|o19 : ZZdFactorization                                                       |
+-----------------------------------------------------------------------------+
|i20 : p = D.cache.pruningMap                                                 |
|                                                                             |
|                                                                             |
|o20 = 0 : image {3} | 8a-17b+36c   26a+36b-45c  8a-24b-39c -19a-50b-30c |    |
|                {3} | 47b+14c      39a-33b-39c  49a-45b-7c 15a+25b-29c  |    |
|                {3} | -21a-23b+17c -11a+42b-24c 42a+5b-11c -48a-11b+48c |    |
|                {3} | 8a-16b-4c    a+49b+2c     2a-43b-47c 43a-6b+35c   |    |
|                                                                             |
|                                                                             |
|                                                                             |
|      1 : image {4} | 42a-33b+35c 21a-25b+2c  -11a+45b-4c  -48a-47b+47c |    |
|                {4} | -8a-49b-29c 8a-6b-39c   -26a-43b+14c 19a-16b+7c   |    |
|                {4} | 49a-42b-30c -11b-45c    39a+5b+36c   15a-23b+39c  |    |
|                {4} | 2a-36b-48c  -8a-50b+24c a-24b-17c    43a-17b-11c  |    |
|                                                                             |
|                                                                             |
|o20 : ZZdFactorizationMap                                                    |
|-----------------------------------------------------------------------------|
|                      4                                                      |
|<------------------- S  : 0                                                  |
|   {4} | 1 0 0 0 |                                                           |
|   {4} | 0 1 0 0 |                                                           |
|   {4} | 0 0 1 0 |                                                           |
|   {4} | 0 0 0 1 |                                                           |
|                                                                             |
|                      4                                                      |
|<------------------- S  : 1                                                  |
|   {5} | 1 0 0 0 |                                                           |
|   {5} | 0 1 0 0 |                                                           |
|   {5} | 0 0 1 0 |                                                           |
|   {5} | 0 0 0 1 |                                                           |
+-----------------------------------------------------------------------------+
|i21 : p == 1                                                                 |
|                                                                             |
|o21 = false                                                                  |
+-----------------------------------------------------------------------------+
|i22 : assert(coker p == 0 and ker p == 0)                                    |
+-----------------------------------------------------------------------------+
|i23 : assert(prune p == 1)                                                   |
+-----------------------------------------------------------------------------+

See also
========

  * ZZdFactorization == ZZdFactorization
    -- whether two ZZ/d-graded factorizations are equal
  * ZZdFactorizationMap Array -- shift a
    ZZ/d-graded factorization or map of ZZ/d-graded factorizations
  * randomFactorizationMap -- a random map of
    ZZ/d-graded factorizations
  * prune(ZZdFactorization),
    -- minimal presentation of all terms in a ZZ/d-graded factorization

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

  * "RingElement == ZZdFactorizationMap"
  * "ZZ == ZZdFactorizationMap"
  * "ZZdFactorizationMap == RingElement"
  * "ZZdFactorizationMap == ZZ"
  * ZZdFactorizationMap == ZZdFactorizationMap
    -- whether two ZZ/d-graded factorization maps are
    equal
-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:3211:0.

ZZdFactorizationMap ^ Array -- the composition with the canonical inclusion or projection map
*********************************************************************************************

  * Operator: ^ (Macaulay2Doc),
  * Usage:
        i = f_[name]
        p = f^[name]
  * Inputs:
      * f, a map of ZZ/d-graded factorizations,
      * name, an array (Macaulay2Doc),
  * Outputs:
      * a map of ZZ/d-graded factorizations, i is
        the composition of f with the canonical inclusion and p is the
        composition of the canonical projection with f

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

The direct sum is an n-ary operator with projection and inclusion maps from
each component satisfying appropriate identities.

One can access these maps as follows.  First, we define some non-trivial maps
of chain complexes.

+----------------------------------------------------------------------------+
|i1 : S = ZZ/101[a,b];                                                       |
+----------------------------------------------------------------------------+
|i2 : R = S/(a^3+b^3);                                                       |
+----------------------------------------------------------------------------+
|i3 : m = ideal vars R                                                       |
|                                                                            |
|o3 = ideal (a, b)                                                           |
|                                                                            |
|o3 : Ideal of R                                                             |
+----------------------------------------------------------------------------+
|i4 : use S;                                                                 |
+----------------------------------------------------------------------------+
|i5 : C1 = tailMF m                                                          |
|                                                                            |
|      2      2      2                                                       |
|o5 = S  <-- S  <-- S                                                        |
|                                                                            |
|     0      1      0                                                        |
|                                                                            |
|o5 : ZZdFactorization                                                       |
+----------------------------------------------------------------------------+
|i6 : C2 = randomTailMF(a^3+b^3, 3, 5, 2)                                    |
|                                                                            |
|      5      5      5                                                       |
|o6 = S  <-- S  <-- S                                                        |
|                                                                            |
|     0      1      0                                                        |
|                                                                            |
|o6 : ZZdFactorization                                                       |
+----------------------------------------------------------------------------+
|i7 : D1 = randomTailMF(a^3+b^3, 2, 4, 2)                                    |
|                                                                            |
|      4      4      4                                                       |
|o7 = S  <-- S  <-- S                                                        |
|                                                                            |
|     0      1      0                                                        |
|                                                                            |
|o7 : ZZdFactorization                                                       |
+----------------------------------------------------------------------------+
|i8 : D2 = tailMF (m^2)                                                      |
|                                                                            |
|      3      3      3                                                       |
|o8 = S  <-- S  <-- S                                                        |
|                                                                            |
|     0      1      0                                                        |
|                                                                            |
|o8 : ZZdFactorization                                                       |
+----------------------------------------------------------------------------+
|i9 : f = randomFactorizationMap(D1, C1, Cycle => true)                      |
|                                                                            |
|          4                                                  2              |
|o9 = 0 : S  <---------------------------------------------- S  : 0          |
|               | 21a2-6ab+32b2   15a3-35a2b+16ab2-47b3  |                   |
|               | 2a2-24ab-32b2   32a3-24a2b+5ab2+13b3   |                   |
|               | -42a2-24ab+30b2 39a3+17a2b+8ab2-18b3   |                   |
|               | -10a2-9ab-18b2  -20a3-15a2b+44ab2+22b3 |                   |
|                                                                            |
|          4                                                            2    |
|     1 : S  <-------------------------------------------------------- S  : 1|
|               {1} | -21a3-9a2b+5ab2+13b3  -15a3+35a2b+37ab2+32b3 |         |
|               {1} | 42a3-15a2b+44ab2+22b3 -39a3-17a2b+31ab2+18b3 |         |
|               {2} | 2a2+29ab-47b2         32a2-9ab-32b2          |         |
|               {2} | -10a2+30ab-18b2       -20a2+24ab-30b2        |         |
|                                                                            |
|o9 : ZZdFactorizationMap                                                    |
+----------------------------------------------------------------------------+
|i10 : g = randomFactorizationMap(D2, C2, Cycle => true, InternalDegree => 4)|
|                                                                            |
|           3                                                        5       |
|o10 = 0 : S  <---------------------------------------------------- S  : 0   |
|                {3} | 46a-4b  -41a-9b 6a      43a+b    3a+12b  |            |
|                {3} | 10a+10b -7a-11b -8a+38b -21a+b   39a+29b |            |
|                {3} | -30a-3b 33a-49b 32a+41b -40a-31b 48a-29b |            |
|                                                                            |
|           3                                                     5          |
|      1 : S  <------------------------------------------------- S  : 1      |
|                {5} | 36  -9a+12b  20a-39b 21a+23b -41a-25b |               |
|                {5} | 44  -45a+47b 41a-7b  32a+41b -33a-19b |               |
|                {5} | -39 -3a-33b  21a-15b 39a+7b  17a-20b  |               |
|                                                                            |
|o10 : ZZdFactorizationMap                                                   |
+----------------------------------------------------------------------------+
+-----------------------------------------------------------------------------+
|i11 : h = f ++ g                                                             |
|                                                                             |
|           7                                                                 |
|o11 = 0 : S  <---------------------------------------------------------------|
|                {0} | 21a2-6ab+32b2   15a3-35a2b+16ab2-47b3  0       0       |
|                {0} | 2a2-24ab-32b2   32a3-24a2b+5ab2+13b3   0       0       |
|                {0} | -42a2-24ab+30b2 39a3+17a2b+8ab2-18b3   0       0       |
|                {0} | -10a2-9ab-18b2  -20a3-15a2b+44ab2+22b3 0       0       |
|                {3} | 0               0                      46a-4b  -41a-9b |
|                {3} | 0               0                      10a+10b -7a-11b |
|                {3} | 0               0                      -30a-3b 33a-49b |
|                                                                             |
|           7                                                                 |
|      1 : S  <---------------------------------------------------------------|
|                {1} | -21a3-9a2b+5ab2+13b3  -15a3+35a2b+37ab2+32b3 0   0     |
|                {1} | 42a3-15a2b+44ab2+22b3 -39a3-17a2b+31ab2+18b3 0   0     |
|                {2} | 2a2+29ab-47b2         32a2-9ab-32b2          0   0     |
|                {2} | -10a2+30ab-18b2       -20a2+24ab-30b2        0   0     |
|                {5} | 0                     0                      36  -9a+12|
|                {5} | 0                     0                      44  -45a+4|
|                {5} | 0                     0                      -39 -3a-33|
|                                                                             |
|o11 : ZZdFactorizationMap                                                    |
|-----------------------------------------------------------------------------|
|                              7                                              |
|---------------------------- S  : 0                                          |
|0       0        0       |                                                   |
|0       0        0       |                                                   |
|0       0        0       |                                                   |
|0       0        0       |                                                   |
|6a      43a+b    3a+12b  |                                                   |
|-8a+38b -21a+b   39a+29b |                                                   |
|32a+41b -40a-31b 48a-29b |                                                   |
|                                                                             |
|                                 7                                           |
|------------------------------- S  : 1                                       |
|   0       0       0        |                                                |
|   0       0       0        |                                                |
|   0       0       0        |                                                |
|   0       0       0        |                                                |
|b  20a-39b 21a+23b -41a-25b |                                                |
|7b 41a-7b  32a+41b -33a-19b |                                                |
|b  21a-15b 39a+7b  17a-20b  |                                                |
+-----------------------------------------------------------------------------+

The four basic maps are the inclusion from each summand of the source and the
projection to each summand of the target.

+---------------------------------+
|i12 : h_[0] == h * (C1 ++ C2)_[0]|
|                                 |
|o12 = true                       |
+---------------------------------+
|i13 : h_[1] == h * (C1 ++ C2)_[1]|
|                                 |
|o13 = true                       |
+---------------------------------+
|i14 : h^[0] == (D1 ++ D2)^[0] * h|
|                                 |
|o14 = true                       |
+---------------------------------+
|i15 : h^[1] == (D1 ++ D2)^[1] * h|
|                                 |
|o15 = true                       |
+---------------------------------+

These can be combined to obtain the blocks of the map of chain complexes.

+---------------------------------------------------------+
|i16 : h_[0]^[0] == f                                     |
|                                                         |
|o16 = true                                               |
+---------------------------------------------------------+
|i17 : h_[1]^[1] == g                                     |
|                                                         |
|o17 = true                                               |
+---------------------------------------------------------+
|i18 : h_[0]^[1] == 0                                     |
|                                                         |
|o18 = true                                               |
+---------------------------------------------------------+
|i19 : h_[1]^[0] == 0                                     |
|                                                         |
|o19 = true                                               |
+---------------------------------------------------------+
|i20 : assert(h == map(D1 ++ D2, C1 ++ C2, {{f,0},{0,g}}))|
+---------------------------------------------------------+

The default names for the components are the non-negative integers.  However,
one can choose any name.

+-----------------------------------------------------------------------------+
|i21 : h = (chicken => f) ++ (nuggets => g)                                   |
|                                                                             |
|           7                                                                 |
|o21 = 0 : S  <---------------------------------------------------------------|
|                {0} | 21a2-6ab+32b2   15a3-35a2b+16ab2-47b3  0       0       |
|                {0} | 2a2-24ab-32b2   32a3-24a2b+5ab2+13b3   0       0       |
|                {0} | -42a2-24ab+30b2 39a3+17a2b+8ab2-18b3   0       0       |
|                {0} | -10a2-9ab-18b2  -20a3-15a2b+44ab2+22b3 0       0       |
|                {3} | 0               0                      46a-4b  -41a-9b |
|                {3} | 0               0                      10a+10b -7a-11b |
|                {3} | 0               0                      -30a-3b 33a-49b |
|                                                                             |
|           7                                                                 |
|      1 : S  <---------------------------------------------------------------|
|                {1} | -21a3-9a2b+5ab2+13b3  -15a3+35a2b+37ab2+32b3 0   0     |
|                {1} | 42a3-15a2b+44ab2+22b3 -39a3-17a2b+31ab2+18b3 0   0     |
|                {2} | 2a2+29ab-47b2         32a2-9ab-32b2          0   0     |
|                {2} | -10a2+30ab-18b2       -20a2+24ab-30b2        0   0     |
|                {5} | 0                     0                      36  -9a+12|
|                {5} | 0                     0                      44  -45a+4|
|                {5} | 0                     0                      -39 -3a-33|
|                                                                             |
|o21 : ZZdFactorizationMap                                                    |
|-----------------------------------------------------------------------------|
|                              7                                              |
|---------------------------- S  : 0                                          |
|0       0        0       |                                                   |
|0       0        0       |                                                   |
|0       0        0       |                                                   |
|0       0        0       |                                                   |
|6a      43a+b    3a+12b  |                                                   |
|-8a+38b -21a+b   39a+29b |                                                   |
|32a+41b -40a-31b 48a-29b |                                                   |
|                                                                             |
|                                 7                                           |
|------------------------------- S  : 1                                       |
|   0       0       0        |                                                |
|   0       0       0        |                                                |
|   0       0       0        |                                                |
|   0       0       0        |                                                |
|b  20a-39b 21a+23b -41a-25b |                                                |
|7b 41a-7b  32a+41b -33a-19b |                                                |
|b  21a-15b 39a+7b  17a-20b  |                                                |
+-----------------------------------------------------------------------------+
|i22 : h_[chicken]^[chicken] == f                                             |
|                                                                             |
|o22 = true                                                                   |
+-----------------------------------------------------------------------------+
|i23 : h_[nuggets]^[nuggets] == g                                             |
|                                                                             |
|o23 = true                                                                   |
+-----------------------------------------------------------------------------+

See also
========

  * ZZdFactorization ++ ZZdFactorization
    -- direct sum of ZZ/d-graded
    factorizations
  * ZZdFactorization ^ Array -- the
    canonical inclusion or projection map of a direct sum
  * ZZdFactorization _ Array -- the
    canonical inclusion or projection map of a direct sum
  * directSum(ZZdFactorization), --
    direct sum of ZZ/d-graded factorizations
  * components(ZZdFactorization), --
    list the components of a direct sum
  * indices (Macaulay2Doc) -- indices of a polynomial; also
    components for a direct sum

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

  * ZZdFactorizationMap ^ Array -- the
    composition with the canonical inclusion or projection map
-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:4556:0.

ZZdFactorizationMap ^ ZZ -- the n-fold composition
**************************************************

  * Operator: ^ (Macaulay2Doc),
  * Usage:
        f^n
  * Inputs:
      * f, a map of ZZ/d-graded factorizations,
        whose source and target are the same ZZ/d-graded factorization
      * n, an integer (Macaulay2Doc),
  * Outputs:
      * a map of ZZ/d-graded factorizations, the
        composition of $f$ with itself $n$ times.

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

A ZZ/d-graded factorization map $f : C \to C$ can be composed with itself. This
method produces these new maps of ZZ/d-graded factorizations.

The differential on a ZZ/d-graded factorization should compose with itself d
times to give a scalar multiple of the identity map.

+-----------------------------------------------------------------------------+
|i1 : S = ZZ/101[a..c];                                                       |
+-----------------------------------------------------------------------------+
|i2 : C = koszulMF({a,b,c}, a^3 + b^3 + c^3)                                  |
|                                                                             |
|      4      4      4                                                        |
|o2 = S  <-- S  <-- S                                                         |
|                                                                             |
|     0      1      0                                                         |
|                                                                             |
|o2 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i3 : f = dd^C                                                                |
|                                                                             |
|          4                        4                                         |
|o3 = 1 : S  <-------------------- S  : 0                                     |
|               | c2 0  b  a   |                                              |
|               | 0  c2 a2 -b2 |                                              |
|               | b2 a  -c 0   |                                              |
|               | a2 -b 0  -c  |                                              |
|                                                                             |
|          4                         4                                        |
|     0 : S  <--------------------- S  : 1                                    |
|               | c  0  b   a   |                                             |
|               | 0  c  a2  -b2 |                                             |
|               | b2 a  -c2 0   |                                             |
|               | a2 -b 0   -c2 |                                             |
|                                                                             |
|o3 : ZZdFactorizationMap                                                     |
+-----------------------------------------------------------------------------+
|i4 : f^2                                                                     |
|                                                                             |
|          4                                               4                  |
|o4 = 0 : S  <------------------------------------------- S  : 0              |
|               | a3+b3+c3 0        0        0        |                       |
|               | 0        a3+b3+c3 0        0        |                       |
|               | 0        0        a3+b3+c3 0        |                       |
|               | 0        0        0        a3+b3+c3 |                       |
|                                                                             |
|          4                                               4                  |
|     1 : S  <------------------------------------------- S  : 1              |
|               | a3+b3+c3 0        0        0        |                       |
|               | 0        a3+b3+c3 0        0        |                       |
|               | 0        0        a3+b3+c3 0        |                       |
|               | 0        0        0        a3+b3+c3 |                       |
|                                                                             |
|o4 : ZZdFactorizationMap                                                     |
+-----------------------------------------------------------------------------+
|i5 : assert(source f == target f)                                            |
+-----------------------------------------------------------------------------+
|i6 : assert(degree f == -1)                                                  |
+-----------------------------------------------------------------------------+
|i7 : assert(degree f^2 == -2)                                                |
+-----------------------------------------------------------------------------+
|i8 : K' = linearMF(a^3+b^3+c^3, t)                                           |
|                                                                             |
|     /   S[t]   \9     /   S[t]   \9     /   S[t]   \9     /   S[t]   \9     |
|o8 = |----------|  <-- |----------|  <-- |----------|  <-- |----------|      |
|     | 2        |      | 2        |      | 2        |      | 2        |      |
|     \t  + t + 1/      \t  + t + 1/      \t  + t + 1/      \t  + t + 1/      |
|                                                                             |
|     0                 1                 2                 0                 |
|                                                                             |
|o8 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i9 : g = K'.dd                                                               |
|                                                                             |
|         /   S[t]   \9                                                       |
|o9 = 2 : |----------|  <-----------------------------------------------------|
|         | 2        |     {0, 3} | c 0  0     b  a  0     0     0     0     ||
|         \t  + t + 1/     {0, 3} | 0 c  0     0  bt a     0     0     0     ||
|                          {0, 3} | 0 0  c     a  0  -bt-b 0     0     0     ||
|                          {0, 3} | 0 0  0     ct 0  0     b     a     0     ||
|                          {0, 3} | 0 0  0     0  ct 0     0     bt    a     ||
|                          {0, 3} | 0 0  0     0  0  ct    a     0     -bt-b ||
|                          {0, 3} | b a  0     0  0  0     -ct-c 0     0     ||
|                          {0, 3} | 0 bt a     0  0  0     0     -ct-c 0     ||
|                          {0, 3} | a 0  -bt-b 0  0  0     0     0     -ct-c ||
|                                                                             |
|         /   S[t]   \9                                                       |
|     0 : |----------|  <-----------------------------------------------------|
|         | 2        |     {0, 3} | c 0  0     b  a  0     0     0     0     ||
|         \t  + t + 1/     {0, 3} | 0 c  0     0  bt a     0     0     0     ||
|                          {0, 3} | 0 0  c     a  0  -bt-b 0     0     0     ||
|                          {0, 3} | 0 0  0     ct 0  0     b     a     0     ||
|                          {0, 3} | 0 0  0     0  ct 0     0     bt    a     ||
|                          {0, 3} | 0 0  0     0  0  ct    a     0     -bt-b ||
|                          {0, 3} | b a  0     0  0  0     -ct-c 0     0     ||
|                          {0, 3} | 0 bt a     0  0  0     0     -ct-c 0     ||
|                          {0, 3} | a 0  -bt-b 0  0  0     0     0     -ct-c ||
|                                                                             |
|         /   S[t]   \9                                                       |
|     1 : |----------|  <-----------------------------------------------------|
|         | 2        |     {0, 3} | c 0  0     b  a  0     0     0     0     ||
|         \t  + t + 1/     {0, 3} | 0 c  0     0  bt a     0     0     0     ||
|                          {0, 3} | 0 0  c     a  0  -bt-b 0     0     0     ||
|                          {0, 3} | 0 0  0     ct 0  0     b     a     0     ||
|                          {0, 3} | 0 0  0     0  ct 0     0     bt    a     ||
|                          {0, 3} | 0 0  0     0  0  ct    a     0     -bt-b ||
|                          {0, 3} | b a  0     0  0  0     -ct-c 0     0     ||
|                          {0, 3} | 0 bt a     0  0  0     0     -ct-c 0     ||
|                          {0, 3} | a 0  -bt-b 0  0  0     0     0     -ct-c ||
|                                                                             |
|o9 : ZZdFactorizationMap                                                     |
|-----------------------------------------------------------------------------|
|   /   S[t]   \9                                                             |
|-- |----------|  : 0                                                         |
|   | 2        |                                                              |
|   \t  + t + 1/                                                              |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|   /   S[t]   \9                                                             |
|-- |----------|  : 1                                                         |
|   | 2        |                                                              |
|   \t  + t + 1/                                                              |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|   /   S[t]   \9                                                             |
|-- |----------|  : 2                                                         |
|   | 2        |                                                              |
|   \t  + t + 1/                                                              |
+-----------------------------------------------------------------------------+
|i10 : g^3                                                                    |
|                                                                             |
|          /   S[t]   \9                                                      |
|o10 = 0 : |----------|  <----------------------------------------------------|
|          | 2        |     {0, 3} | a3+b3+c3 0        0        0        0    |
|          \t  + t + 1/     {0, 3} | 0        a3+b3+c3 0        0        0    |
|                           {0, 3} | 0        0        a3+b3+c3 0        0    |
|                           {0, 3} | 0        0        0        a3+b3+c3 0    |
|                           {0, 3} | 0        0        0        0        a3+b3|
|                           {0, 3} | 0        0        0        0        0    |
|                           {0, 3} | 0        0        0        0        0    |
|                           {0, 3} | 0        0        0        0        0    |
|                           {0, 3} | 0        0        0        0        0    |
|                                                                             |
|          /   S[t]   \9                                                      |
|      1 : |----------|  <----------------------------------------------------|
|          | 2        |     {0, 3} | a3+b3+c3 0        0        0        0    |
|          \t  + t + 1/     {0, 3} | 0        a3+b3+c3 0        0        0    |
|                           {0, 3} | 0        0        a3+b3+c3 0        0    |
|                           {0, 3} | 0        0        0        a3+b3+c3 0    |
|                           {0, 3} | 0        0        0        0        a3+b3|
|                           {0, 3} | 0        0        0        0        0    |
|                           {0, 3} | 0        0        0        0        0    |
|                           {0, 3} | 0        0        0        0        0    |
|                           {0, 3} | 0        0        0        0        0    |
|                                                                             |
|          /   S[t]   \9                                                      |
|      2 : |----------|  <----------------------------------------------------|
|          | 2        |     {0, 3} | a3+b3+c3 0        0        0        0    |
|          \t  + t + 1/     {0, 3} | 0        a3+b3+c3 0        0        0    |
|                           {0, 3} | 0        0        a3+b3+c3 0        0    |
|                           {0, 3} | 0        0        0        a3+b3+c3 0    |
|                           {0, 3} | 0        0        0        0        a3+b3|
|                           {0, 3} | 0        0        0        0        0    |
|                           {0, 3} | 0        0        0        0        0    |
|                           {0, 3} | 0        0        0        0        0    |
|                           {0, 3} | 0        0        0        0        0    |
|                                                                             |
|o10 : ZZdFactorizationMap                                                    |
|-----------------------------------------------------------------------------|
|                                            /   S[t]   \9                    |
|------------------------------------------- |----------|  : 0                |
|    0        0        0        0        |   | 2        |                     |
|    0        0        0        0        |   \t  + t + 1/                     |
|    0        0        0        0        |                                    |
|    0        0        0        0        |                                    |
|+c3 0        0        0        0        |                                    |
|    a3+b3+c3 0        0        0        |                                    |
|    0        a3+b3+c3 0        0        |                                    |
|    0        0        a3+b3+c3 0        |                                    |
|    0        0        0        a3+b3+c3 |                                    |
|                                                                             |
|                                            /   S[t]   \9                    |
|------------------------------------------- |----------|  : 1                |
|    0        0        0        0        |   | 2        |                     |
|    0        0        0        0        |   \t  + t + 1/                     |
|    0        0        0        0        |                                    |
|    0        0        0        0        |                                    |
|+c3 0        0        0        0        |                                    |
|    a3+b3+c3 0        0        0        |                                    |
|    0        a3+b3+c3 0        0        |                                    |
|    0        0        a3+b3+c3 0        |                                    |
|    0        0        0        a3+b3+c3 |                                    |
|                                                                             |
|                                            /   S[t]   \9                    |
|------------------------------------------- |----------|  : 2                |
|    0        0        0        0        |   | 2        |                     |
|    0        0        0        0        |   \t  + t + 1/                     |
|    0        0        0        0        |                                    |
|    0        0        0        0        |                                    |
|+c3 0        0        0        0        |                                    |
|    a3+b3+c3 0        0        0        |                                    |
|    0        a3+b3+c3 0        0        |                                    |
|    0        0        a3+b3+c3 0        |                                    |
|    0        0        0        a3+b3+c3 |                                    |
+-----------------------------------------------------------------------------+
+----------------------------------------------------+
|i11 : g = randomFactorizationMap(C, C, Degree => -1)|
|                                                    |
|           4                           4            |
|o11 = 1 : S  <----------------------- S  : 0        |
|                | 24  19  -8  -38 |                 |
|                | -36 19  -22 -16 |                 |
|                | -30 -10 -29 39  |                 |
|                | -29 -29 -24 21  |                 |
|                                                    |
|           4                           4            |
|      0 : S  <----------------------- S  : 1        |
|                | 34  -18 -28 16  |                 |
|                | 19  -13 -47 22  |                 |
|                | -47 -43 38  45  |                 |
|                | -39 -15 2   -34 |                 |
|                                                    |
|o11 : ZZdFactorizationMap                           |
+----------------------------------------------------+
|i12 : g^2                                           |
|                                                    |
|           4                          4             |
|o12 = 0 : S  <---------------------- S  : 0         |
|                | 22  19 47  -43 |                  |
|                | -21 47 -41 34  |                  |
|                | -5  39 49  -48 |                  |
|                | 25  41 -14 -25 |                  |
|                                                    |
|           4                          4             |
|      1 : S  <---------------------- S  : 1         |
|                | 5   33  -26 17 |                  |
|                | -13 -29 -46 2  |                  |
|                | 46  19  -17 2  |                  |
|                | -16 0   -8  33 |                  |
|                                                    |
|o12 : ZZdFactorizationMap                           |
+----------------------------------------------------+
|i13 : g^3                                           |
|                                                    |
|           4                           4            |
|o13 = 1 : S  <----------------------- S  : 0        |
|                | 27  -16 -16 39  |                 |
|                | 34  8   8   14  |                 |
|                | -37 34  -38 -47 |                 |
|                | 10  31  -28 -21 |                 |
|                                                    |
|           4                          4             |
|      0 : S  <---------------------- S  : 1         |
|                | -29 1  -11 4   |                  |
|                | -28 10 20  20  |                  |
|                | 39  14 -28 -31 |                  |
|                | 30  -6 23  7   |                  |
|                                                    |
|o13 : ZZdFactorizationMap                           |
+----------------------------------------------------+

The zero-th power returns the identity map

+-----------------+
|i14 : f^0 == id_C|
|                 |
|o14 = true       |
+-----------------+
|i15 : g^0 == id_C|
|                 |
|o15 = true       |
+-----------------+

When $n$ is negative, the result is the $n$-fold power of the inverse complex
map, if it exists.

+--------------------------------------------+
|i16 : h = randomFactorizationMap(C, C)      |
|                                            |
|           4                          4     |
|o16 = 0 : S  <---------------------- S  : 0 |
|                | -48 -16 39  48 |          |
|                | -47 7   43  36 |          |
|                | 47  15  -17 35 |          |
|                | 19  -23 -11 11 |          |
|                                            |
|           4                           4    |
|      1 : S  <----------------------- S  : 1|
|                | -38 46  22  2   |         |
|                | 33  -28 -47 29  |         |
|                | 40  1   -23 -47 |         |
|                | 11  -3  -7  15  |         |
|                                            |
|o16 : ZZdFactorizationMap                   |
+--------------------------------------------+
|i17 : h^-1                                  |
|                                            |
|           4                           4    |
|o17 = 0 : S  <----------------------- S  : 0|
|                | 6   33  45  44  |         |
|                | -18 -12 5   -45 |         |
|                | -42 10  -26 -33 |         |
|                | 11  -17 -29 -1  |         |
|                                            |
|           4                           4    |
|      1 : S  <----------------------- S  : 1|
|                | 42  -12 4   -17 |         |
|                | 29  3   -21 39  |         |
|                | 48  32  -7  31  |         |
|                | -43 -43 30  -46 |         |
|                                            |
|o17 : ZZdFactorizationMap                   |
+--------------------------------------------+
|i18 : assert(h * h^-1 == id_C)              |
+--------------------------------------------+
|i19 : h^-4                                  |
|                                            |
|           4                          4     |
|o19 = 0 : S  <---------------------- S  : 0 |
|                | -26 19  5   14 |          |
|                | -33 15  -9  -2 |          |
|                | 3   -21 -47 20 |          |
|                | 31  20  29  49 |          |
|                                            |
|           4                          4     |
|      1 : S  <---------------------- S  : 1 |
|                | -11 44 -29 -40 |          |
|                | 37  30 37  -10 |          |
|                | 13  35 -35 40  |          |
|                | 43  -2 -32 -12 |          |
|                                            |
|o19 : ZZdFactorizationMap                   |
+--------------------------------------------+
|i20 : assert(h^-4 * h^4 == id_C)            |
+--------------------------------------------+

See also
========

  * Matrix ^ ZZ (Macaulay2Doc) -- power
  * ZZdFactorization ^ ZZ -- access individual
    object in a ZZ/d-graded factorization

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

  * ZZdFactorizationMap ^ ZZ -- the n-fold
    composition
-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:3137:0.

ZZdFactorizationMap _ ZZ -- access individual matrices in a ZZ/d-graded factorization map
*****************************************************************************************

  * Operator: _ (Macaulay2Doc),
  * Usage:
        f_i
  * Inputs:
      * f, a map of ZZ/d-graded factorizations,
      * i, an integer (Macaulay2Doc), the homological index
  * Outputs:
      * a matrix (Macaulay2Doc), the i-th map

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

A ZZ/d-graded factorization map $f : C \to D$ of degree $d$ is a sequence of
maps $f_i : C_i \to D_{i+d}$. This method allows one to access the individual
$f_i$.

+-----------------------------------------------------------------------------+
|i1 : S = ZZ/101[a,b,c]                                                       |
|                                                                             |
|o1 = S                                                                       |
|                                                                             |
|o1 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i2 : R = S/(a^2+b^2+c^2);                                                    |
+-----------------------------------------------------------------------------+
|i3 : m = ideal vars R                                                        |
|                                                                             |
|o3 = ideal (a, b, c)                                                         |
|                                                                             |
|o3 : Ideal of R                                                              |
+-----------------------------------------------------------------------------+
|i4 : C = tailMF m                                                            |
|                                                                             |
|      4      4      4                                                        |
|o4 = S  <-- S  <-- S                                                         |
|                                                                             |
|     0      1      0                                                         |
|                                                                             |
|o4 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i5 : D = tailMF (m^2)                                                        |
|                                                                             |
|      8      8      8                                                        |
|o5 = S  <-- S  <-- S                                                         |
|                                                                             |
|     0      1      0                                                         |
|                                                                             |
|o5 : ZZdFactorization                                                        |
+-----------------------------------------------------------------------------+
|i6 : f = randomFactorizationMap(C, D, Cycle=>true, InternalDegree => 1)      |
|                                                                             |
|          4                                                                  |
|o6 = 0 : S  <----------------------------------------------------------------|
|               {3} | 18a2+ab-13b2-31ac-34bc+34c2   50a2+32ab-13b2+29ac-23bc-3|
|               {3} | 40a2+12ab-16b2+44ac-29bc+49c2 4a2+35ab+29b2+33ac+39bc-11|
|               {3} | 39a2-16ab-27b2+5ac-2bc+16c2   19a2+23ab+21b2+3ac-20bc+4c|
|               {3} | -26a2+41ab-43b2+48ac-50bc-6c2 -42a2-20ab-22b2+24ac+6bc+7|
|                                                                             |
|          4                                                                  |
|     1 : S  <----------------------------------------------------------------|
|               {4} | 8a2+22ab+44b2+23ac+37bc+35c2  -39a2-36ab+38b2-48ac+30bc+|
|               {4} | 36a2-39ab+11b2-13ac+40bc+2c2  18a2+28ab+48b2+15ac-46bc+8|
|               {4} | -50a2-2ab+26b2-3ac+20bc+14c2  -40a2-19ab+18b2+4ac+31bc+4|
|               {4} | -12a2+28ab-38b2+19ac-7bc+18c2 26a2+30ab-5b2+20ac-22bc+7c|
|                                                                             |
|o6 : ZZdFactorizationMap                                                     |
|-----------------------------------------------------------------------------|
|                                                                             |
|-----------------------------------------------------------------------------|
|9c2 -30a2+15ab+36b2+26ac+8bc+33c2  6a2+33ab+38b2-22ac+38bc+4c2   -36a2+33ab+5|
|c2  -43a2+6ab-2b2+47ac+46bc-22c2   -30a2-46ab+44b2-38ac-15bc+8c2 -50a2-40ab-4|
|2   25a2-45ab-23b2+28ac+28bc-3c2   17a2-50ab-26b2+36ac-7c2       8a2-11ab-8b2|
|c2  -27a2+14ab-47b2+23ac-45bc-47c2 -6a2+21ab-11b2-49ac-44bc+29c2 -12a2-43ab+4|
|                                                                             |
|                                                                             |
|-----------------------------------------------------------------------------|
|29c2 -19a2+5ab-22b2-34ac-8bc+5c2   -25a2-26ab-18b2+14ac-16bc+33c2 17a2-12ab+4|
|c2   50a2-37ab-22b2-41ac+19bc+32c2 -30a2-14ab-12b2-43ac+11bc      -6a2-3ab+45|
|c2   -4a2+9ab+33b2+41ac-46bc-50c2  43a2-47ab-47b2+11ac-26bc+12c2  -30a2+22ab-|
|2    42a2+24ab-49b2+15ac-16bc+18c2 27a2-ab+21b2+11ac+22bc+18c2    -6a2+15ab+5|
|-----------------------------------------------------------------------------|
|                                                                             |
|-----------------------------------------------------------------------------|
|0b2-39ac+29bc-16c2 -a2-31ab-5b2-17ac-2bc+14c2   10a2+33ab-49b2+17ac+44bc+28c2|
|2b2-7ac+36bc+3c2   32a2+38ab-38b2-24ac-34bc+2c2 -38a2-44ab+22b2-26ac+28bc-3c2|
|+20ac-11bc-35c2    9a2-8ab+18b2+12ac-18c2       24a2+8ab+33b2+40ac-21bc+17c2 |
|5b2-ac-10bc-5c2    -12a2-20ab+48b2+6bc+35c2     -47a2-7ab-22b2+44ac-5bc+38c2 |
|                                                                             |
|                                                                             |
|-----------------------------------------------------------------------------|
|2b2+3ac+4bc-6c2    9a2-ab+16b2+32ac+13bc+5c2     24a2-36ab-29b2-30ac+19bc+19c|
|b2-31ac-26bc+49c2  a2+ab-43b2+21ac+11bc-3c2      -10a2-29ab-22b2-8ac-29bc-24c|
|8b2+17ac-34bc+34c2 32a2-14ab-27b2+28ac+3bc+16c2  -38a2-16ab+21b2+39ac+34bc+19|
|0b2-6ac+34bc-16c2  -12a2-47ab-13b2-3ac-11bc-35c2 -47a2-39ab-13b2-18ac-43bc-15|
|-----------------------------------------------------------------------------|
|                                     8                                       |
|----------------------------------- S  : 0                                   |
| -45a2+47ab+21b2+20ac-31bc+16c2 |                                            |
| -16a2-23ab+18b2+37ac+8bc+20c2  |                                            |
| -28a2+13ab-47b2+19ac+20bc+2c2  |                                            |
| -17a2-40ab-12b2+11ac-49bc+c2   |                                            |
|                                                                             |
|                                       8                                     |
|------------------------------------- S  : 1                                 |
|2  -28a2-47ab+2b2+38ac+16bc+22c2  |                                          |
|2  45a2-34ab-47b2-48ac+47bc+19c2  |                                          |
|c2 -16a2+7ab-23b2+15ac+39bc+43c2  |                                          |
|c2 -17a2-11ab+36b2+48ac+35bc+11c2 |                                          |
+-----------------------------------------------------------------------------+
|i7 : f_1                                                                     |
|                                                                             |
|o7 = {4} | 8a2+22ab+44b2+23ac+37bc+35c2  -39a2-36ab+38b2-48ac+30bc+29c2      |
|     {4} | 36a2-39ab+11b2-13ac+40bc+2c2  18a2+28ab+48b2+15ac-46bc+8c2        |
|     {4} | -50a2-2ab+26b2-3ac+20bc+14c2  -40a2-19ab+18b2+4ac+31bc+4c2        |
|     {4} | -12a2+28ab-38b2+19ac-7bc+18c2 26a2+30ab-5b2+20ac-22bc+7c2         |
|     ------------------------------------------------------------------------|
|     -19a2+5ab-22b2-34ac-8bc+5c2   -25a2-26ab-18b2+14ac-16bc+33c2            |
|     50a2-37ab-22b2-41ac+19bc+32c2 -30a2-14ab-12b2-43ac+11bc                 |
|     -4a2+9ab+33b2+41ac-46bc-50c2  43a2-47ab-47b2+11ac-26bc+12c2             |
|     42a2+24ab-49b2+15ac-16bc+18c2 27a2-ab+21b2+11ac+22bc+18c2               |
|     ------------------------------------------------------------------------|
|     17a2-12ab+42b2+3ac+4bc-6c2    9a2-ab+16b2+32ac+13bc+5c2                 |
|     -6a2-3ab+45b2-31ac-26bc+49c2  a2+ab-43b2+21ac+11bc-3c2                  |
|     -30a2+22ab-8b2+17ac-34bc+34c2 32a2-14ab-27b2+28ac+3bc+16c2              |
|     -6a2+15ab+50b2-6ac+34bc-16c2  -12a2-47ab-13b2-3ac-11bc-35c2             |
|     ------------------------------------------------------------------------|
|     24a2-36ab-29b2-30ac+19bc+19c2  -28a2-47ab+2b2+38ac+16bc+22c2  |         |
|     -10a2-29ab-22b2-8ac-29bc-24c2  45a2-34ab-47b2-48ac+47bc+19c2  |         |
|     -38a2-16ab+21b2+39ac+34bc+19c2 -16a2+7ab-23b2+15ac+39bc+43c2  |         |
|     -47a2-39ab-13b2-18ac-43bc-15c2 -17a2-11ab+36b2+48ac+35bc+11c2 |         |
|                                                                             |
|             4      8                                                        |
|o7 : Matrix S  <-- S                                                         |
+-----------------------------------------------------------------------------+
|i8 : f_0                                                                     |
|                                                                             |
|o8 = {3} | 18a2+ab-13b2-31ac-34bc+34c2   50a2+32ab-13b2+29ac-23bc-39c2       |
|     {3} | 40a2+12ab-16b2+44ac-29bc+49c2 4a2+35ab+29b2+33ac+39bc-11c2        |
|     {3} | 39a2-16ab-27b2+5ac-2bc+16c2   19a2+23ab+21b2+3ac-20bc+4c2         |
|     {3} | -26a2+41ab-43b2+48ac-50bc-6c2 -42a2-20ab-22b2+24ac+6bc+7c2        |
|     ------------------------------------------------------------------------|
|     -30a2+15ab+36b2+26ac+8bc+33c2  6a2+33ab+38b2-22ac+38bc+4c2              |
|     -43a2+6ab-2b2+47ac+46bc-22c2   -30a2-46ab+44b2-38ac-15bc+8c2            |
|     25a2-45ab-23b2+28ac+28bc-3c2   17a2-50ab-26b2+36ac-7c2                  |
|     -27a2+14ab-47b2+23ac-45bc-47c2 -6a2+21ab-11b2-49ac-44bc+29c2            |
|     ------------------------------------------------------------------------|
|     -36a2+33ab+50b2-39ac+29bc-16c2 -a2-31ab-5b2-17ac-2bc+14c2               |
|     -50a2-40ab-42b2-7ac+36bc+3c2   32a2+38ab-38b2-24ac-34bc+2c2             |
|     8a2-11ab-8b2+20ac-11bc-35c2    9a2-8ab+18b2+12ac-18c2                   |
|     -12a2-43ab+45b2-ac-10bc-5c2    -12a2-20ab+48b2+6bc+35c2                 |
|     ------------------------------------------------------------------------|
|     10a2+33ab-49b2+17ac+44bc+28c2 -45a2+47ab+21b2+20ac-31bc+16c2 |          |
|     -38a2-44ab+22b2-26ac+28bc-3c2 -16a2-23ab+18b2+37ac+8bc+20c2  |          |
|     24a2+8ab+33b2+40ac-21bc+17c2  -28a2+13ab-47b2+19ac+20bc+2c2  |          |
|     -47a2-7ab-22b2+44ac-5bc+38c2  -17a2-40ab-12b2+11ac-49bc+c2   |          |
|                                                                             |
|             4      8                                                        |
|o8 : Matrix S  <-- S                                                         |
+-----------------------------------------------------------------------------+

Indices that are outside of the period are taken modulo the period.

+-----------------------------------------------------------------------------+
|i9 : period f                                                                |
|                                                                             |
|o9 = 2                                                                       |
+-----------------------------------------------------------------------------+
|i10 : f_-1                                                                   |
|                                                                             |
|o10 = {4} | 8a2+22ab+44b2+23ac+37bc+35c2  -39a2-36ab+38b2-48ac+30bc+29c2     |
|      {4} | 36a2-39ab+11b2-13ac+40bc+2c2  18a2+28ab+48b2+15ac-46bc+8c2       |
|      {4} | -50a2-2ab+26b2-3ac+20bc+14c2  -40a2-19ab+18b2+4ac+31bc+4c2       |
|      {4} | -12a2+28ab-38b2+19ac-7bc+18c2 26a2+30ab-5b2+20ac-22bc+7c2        |
|      -----------------------------------------------------------------------|
|      -19a2+5ab-22b2-34ac-8bc+5c2   -25a2-26ab-18b2+14ac-16bc+33c2           |
|      50a2-37ab-22b2-41ac+19bc+32c2 -30a2-14ab-12b2-43ac+11bc                |
|      -4a2+9ab+33b2+41ac-46bc-50c2  43a2-47ab-47b2+11ac-26bc+12c2            |
|      42a2+24ab-49b2+15ac-16bc+18c2 27a2-ab+21b2+11ac+22bc+18c2              |
|      -----------------------------------------------------------------------|
|      17a2-12ab+42b2+3ac+4bc-6c2    9a2-ab+16b2+32ac+13bc+5c2                |
|      -6a2-3ab+45b2-31ac-26bc+49c2  a2+ab-43b2+21ac+11bc-3c2                 |
|      -30a2+22ab-8b2+17ac-34bc+34c2 32a2-14ab-27b2+28ac+3bc+16c2             |
|      -6a2+15ab+50b2-6ac+34bc-16c2  -12a2-47ab-13b2-3ac-11bc-35c2            |
|      -----------------------------------------------------------------------|
|      24a2-36ab-29b2-30ac+19bc+19c2  -28a2-47ab+2b2+38ac+16bc+22c2  |        |
|      -10a2-29ab-22b2-8ac-29bc-24c2  45a2-34ab-47b2-48ac+47bc+19c2  |        |
|      -38a2-16ab+21b2+39ac+34bc+19c2 -16a2+7ab-23b2+15ac+39bc+43c2  |        |
|      -47a2-39ab-13b2-18ac-43bc-15c2 -17a2-11ab+36b2+48ac+35bc+11c2 |        |
|                                                                             |
|              4      8                                                       |
|o10 : Matrix S  <-- S                                                        |
+-----------------------------------------------------------------------------+
|i11 : f_3                                                                    |
|                                                                             |
|o11 = {4} | 8a2+22ab+44b2+23ac+37bc+35c2  -39a2-36ab+38b2-48ac+30bc+29c2     |
|      {4} | 36a2-39ab+11b2-13ac+40bc+2c2  18a2+28ab+48b2+15ac-46bc+8c2       |
|      {4} | -50a2-2ab+26b2-3ac+20bc+14c2  -40a2-19ab+18b2+4ac+31bc+4c2       |
|      {4} | -12a2+28ab-38b2+19ac-7bc+18c2 26a2+30ab-5b2+20ac-22bc+7c2        |
|      -----------------------------------------------------------------------|
|      -19a2+5ab-22b2-34ac-8bc+5c2   -25a2-26ab-18b2+14ac-16bc+33c2           |
|      50a2-37ab-22b2-41ac+19bc+32c2 -30a2-14ab-12b2-43ac+11bc                |
|      -4a2+9ab+33b2+41ac-46bc-50c2  43a2-47ab-47b2+11ac-26bc+12c2            |
|      42a2+24ab-49b2+15ac-16bc+18c2 27a2-ab+21b2+11ac+22bc+18c2              |
|      -----------------------------------------------------------------------|
|      17a2-12ab+42b2+3ac+4bc-6c2    9a2-ab+16b2+32ac+13bc+5c2                |
|      -6a2-3ab+45b2-31ac-26bc+49c2  a2+ab-43b2+21ac+11bc-3c2                 |
|      -30a2+22ab-8b2+17ac-34bc+34c2 32a2-14ab-27b2+28ac+3bc+16c2             |
|      -6a2+15ab+50b2-6ac+34bc-16c2  -12a2-47ab-13b2-3ac-11bc-35c2            |
|      -----------------------------------------------------------------------|
|      24a2-36ab-29b2-30ac+19bc+19c2  -28a2-47ab+2b2+38ac+16bc+22c2  |        |
|      -10a2-29ab-22b2-8ac-29bc-24c2  45a2-34ab-47b2-48ac+47bc+19c2  |        |
|      -38a2-16ab+21b2+39ac+34bc+19c2 -16a2+7ab-23b2+15ac+39bc+43c2  |        |
|      -47a2-39ab-13b2-18ac-43bc-15c2 -17a2-11ab+36b2+48ac+35bc+11c2 |        |
|                                                                             |
|              4      8                                                       |
|o11 : Matrix S  <-- S                                                        |
+-----------------------------------------------------------------------------+
|i12 : f_4                                                                    |
|                                                                             |
|o12 = {3} | 18a2+ab-13b2-31ac-34bc+34c2   50a2+32ab-13b2+29ac-23bc-39c2      |
|      {3} | 40a2+12ab-16b2+44ac-29bc+49c2 4a2+35ab+29b2+33ac+39bc-11c2       |
|      {3} | 39a2-16ab-27b2+5ac-2bc+16c2   19a2+23ab+21b2+3ac-20bc+4c2        |
|      {3} | -26a2+41ab-43b2+48ac-50bc-6c2 -42a2-20ab-22b2+24ac+6bc+7c2       |
|      -----------------------------------------------------------------------|
|      -30a2+15ab+36b2+26ac+8bc+33c2  6a2+33ab+38b2-22ac+38bc+4c2             |
|      -43a2+6ab-2b2+47ac+46bc-22c2   -30a2-46ab+44b2-38ac-15bc+8c2           |
|      25a2-45ab-23b2+28ac+28bc-3c2   17a2-50ab-26b2+36ac-7c2                 |
|      -27a2+14ab-47b2+23ac-45bc-47c2 -6a2+21ab-11b2-49ac-44bc+29c2           |
|      -----------------------------------------------------------------------|
|      -36a2+33ab+50b2-39ac+29bc-16c2 -a2-31ab-5b2-17ac-2bc+14c2              |
|      -50a2-40ab-42b2-7ac+36bc+3c2   32a2+38ab-38b2-24ac-34bc+2c2            |
|      8a2-11ab-8b2+20ac-11bc-35c2    9a2-8ab+18b2+12ac-18c2                  |
|      -12a2-43ab+45b2-ac-10bc-5c2    -12a2-20ab+48b2+6bc+35c2                |
|      -----------------------------------------------------------------------|
|      10a2+33ab-49b2+17ac+44bc+28c2 -45a2+47ab+21b2+20ac-31bc+16c2 |         |
|      -38a2-44ab+22b2-26ac+28bc-3c2 -16a2-23ab+18b2+37ac+8bc+20c2  |         |
|      24a2+8ab+33b2+40ac-21bc+17c2  -28a2+13ab-47b2+19ac+20bc+2c2  |         |
|      -47a2-7ab-22b2+44ac-5bc+38c2  -17a2-40ab-12b2+11ac-49bc+c2   |         |
|                                                                             |
|              4      8                                                       |
|o12 : Matrix S  <-- S                                                        |
+-----------------------------------------------------------------------------+

See also
========

  * ZZdFactorization _ ZZ -- access individual
    object in a ZZ/d-graded factorization
  * period(ZZdFactorizationMap) -- the period of a ZZ/d-graded
    factorization or map

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

  * ZZdFactorizationMap _ ZZ -- access
    individual matrices in a ZZ/d-graded factorization map
-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:3000:0.

ZZdFactorizationMap | ZZdFactorizationMap -- join or concatenate maps horizontally
**********************************************************************************

  * Operator: | (Macaulay2Doc),
  * Usage:
        f | g
  * Inputs:
      * f, a map of ZZ/d-graded factorizations,
      * g, a map of ZZ/d-graded factorizations,
  * Outputs:
      * a map of ZZ/d-graded factorizations,

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

Given ZZ/d-graded factorization maps with the same target, this method
constructs the associated map from the direct sum of the sources to the target.

First, we define some non-trivial maps of factorizations.

+-----------------------------------------------------------+
|i1 : S = ZZ/101[a,b];                                      |
+-----------------------------------------------------------+
|i2 : R = S/(a^3+b^3);                                      |
+-----------------------------------------------------------+
|i3 : m = ideal vars R                                      |
|                                                           |
|o3 = ideal (a, b)                                          |
|                                                           |
|o3 : Ideal of R                                            |
+-----------------------------------------------------------+
|i4 : use S;                                                |
+-----------------------------------------------------------+
|i5 : C1 = tailMF m                                         |
|                                                           |
|      2      2      2                                      |
|o5 = S  <-- S  <-- S                                       |
|                                                           |
|     0      1      0                                       |
|                                                           |
|o5 : ZZdFactorization                                      |
+-----------------------------------------------------------+
|i6 : C2 = randomTailMF(a^3+b^3, 2, 4, 2)                   |
|                                                           |
|      4      4      4                                      |
|o6 = S  <-- S  <-- S                                       |
|                                                           |
|     0      1      0                                       |
|                                                           |
|o6 : ZZdFactorization                                      |
+-----------------------------------------------------------+
|i7 : D = tailMF (m^2)                                      |
|                                                           |
|      3      3      3                                      |
|o7 = S  <-- S  <-- S                                       |
|                                                           |
|     0      1      0                                       |
|                                                           |
|o7 : ZZdFactorization                                      |
+-----------------------------------------------------------+
|i8 : f = randomFactorizationMap(D, C1, InternalDegree => 1)|
|                                                           |
|          3                            2                   |
|o8 = 0 : S  <------------------------ S  : 0               |
|               {3} | -13 -28a-47b |                        |
|               {3} | -43 38a+2b   |                        |
|               {3} | -15 16a+22b  |                        |
|                                                           |
|          3                       2                        |
|     1 : S  <------------------- S  : 1                    |
|               {5} | 45  -47 |                             |
|               {5} | -34 47  |                             |
|               {5} | -48 19  |                             |
|                                                           |
|o8 : ZZdFactorizationMap                                   |
+-----------------------------------------------------------+
|i9 : g = randomFactorizationMap(D, C2, InternalDegree => 3)|
|                                                           |
|          3                              4                 |
|o9 = 0 : S  <-------------------------- S  : 0             |
|               {3} | -16 -23 -17 36 |                      |
|               {3} | 7   39  -11 35 |                      |
|               {3} | 15  43  48  11 |                      |
|                                                           |
|          3                           4                    |
|     1 : S  <----------------------- S  : 1                |
|               {5} | 0 0 -38 11  |                         |
|               {5} | 0 0 33  46  |                         |
|               {5} | 0 0 40  -28 |                         |
|                                                           |
|o9 : ZZdFactorizationMap                                   |
+-----------------------------------------------------------+
+------------------------------------------------------------+
|i10 : h = f|g                                               |
|                                                            |
|           3                                           6    |
|o10 = 0 : S  <--------------------------------------- S  : 0|
|                {3} | -13 -28a-47b -16 -23 -17 36 |         |
|                {3} | -43 38a+2b   7   39  -11 35 |         |
|                {3} | -15 16a+22b  15  43  48  11 |         |
|                                                            |
|           3                                   6            |
|      1 : S  <------------------------------- S  : 1        |
|                {5} | 45  -47 0 0 -38 11  |                 |
|                {5} | -34 47  0 0 33  46  |                 |
|                {5} | -48 19  0 0 40  -28 |                 |
|                                                            |
|o10 : ZZdFactorizationMap                                   |
+------------------------------------------------------------+
|i11 : assert isWellDefined h                                |
+------------------------------------------------------------+
|i12 : assert(source h === source f ++ source g)             |
+------------------------------------------------------------+
|i13 : assert(target h === target f)                         |
+------------------------------------------------------------+

See also
========

  * ZZdFactorization ++ ZZdFactorization
    -- direct sum of ZZ/d-graded
    factorizations
  * ZZdFactorizationMap ++ ZZdFactorizationMap
    -- direct sum of ZZ/d-graded factorization maps
  * ZZdFactorizationMap || ZZdFactorizationMap
    -- join or concatenate maps vertically
  * Matrix | Matrix (Macaulay2Doc) -- join matrices
    horizontally
  * map(ZZdFactorization,ZZdFactorization,List) (missing documentation)

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

  * ZZdFactorizationMap | ZZdFactorizationMap
    -- join or concatenate maps horizontally
-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:4160:0.

ZZdFactorizationMap || ZZdFactorizationMap -- join or concatenate maps vertically
*********************************************************************************

  * Operator: || (Macaulay2Doc),
  * Usage:
        f || g
  * Inputs:
      * f, a map of ZZ/d-graded factorizations,
      * g, a map of ZZ/d-graded factorizations,
  * Outputs:
      * a map of ZZ/d-graded factorizations,

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

Given ZZ/d-graded factorization maps with the same source, this method
constructs the associated map from the source to the direct sum of the targets.

First, we define some non-trivial maps of factorizations.

+---------------------------------------------------------------------------+
|i1 : S = ZZ/101[a,b];                                                      |
+---------------------------------------------------------------------------+
|i2 : R = S/(a^3+b^3);                                                      |
+---------------------------------------------------------------------------+
|i3 : m = ideal vars R                                                      |
|                                                                           |
|o3 = ideal (a, b)                                                          |
|                                                                           |
|o3 : Ideal of R                                                            |
+---------------------------------------------------------------------------+
|i4 : use S;                                                                |
+---------------------------------------------------------------------------+
|i5 : C = tailMF m                                                          |
|                                                                           |
|      2      2      2                                                      |
|o5 = S  <-- S  <-- S                                                       |
|                                                                           |
|     0      1      0                                                       |
|                                                                           |
|o5 : ZZdFactorization                                                      |
+---------------------------------------------------------------------------+
|i6 : D1 = randomTailMF(a^3+b^3, 2, 4, 2)                                   |
|                                                                           |
|      4      4      4                                                      |
|o6 = S  <-- S  <-- S                                                       |
|                                                                           |
|     0      1      0                                                       |
|                                                                           |
|o6 : ZZdFactorization                                                      |
+---------------------------------------------------------------------------+
|i7 : D2 = tailMF (m^2)                                                     |
|                                                                           |
|      3      3      3                                                      |
|o7 = S  <-- S  <-- S                                                       |
|                                                                           |
|     0      1      0                                                       |
|                                                                           |
|o7 : ZZdFactorization                                                      |
+---------------------------------------------------------------------------+
|i8 : f = randomFactorizationMap(D1, C)                                     |
|                                                                           |
|          4                                                  2             |
|o8 = 0 : S  <---------------------------------------------- S  : 0         |
|               | -13a2-43ab-15b2 -47a3+47a2b+19ab2-16b3 |                  |
|               | -28a2-47ab+38b2 7a3+15a2b-23ab2+39b3   |                  |
|               | 2a2+16ab+22b2   43a3-17a2b-11ab2+48b3  |                  |
|               | 45a2-34ab-48b2  36a3+35a2b+11ab2-38b3  |                  |
|                                                                           |
|          4                                                           2    |
|     1 : S  <------------------------------------------------------- S  : 1|
|               {1} | 33a3+40a2b+11ab2+46b3 15a3-37a2b-13ab2-10b3 |         |
|               {1} | -28a3+a2b-3ab2+22b3   30a3-18a2b+39ab2+27b3 |         |
|               {2} | -47a2-23ab-7b2        -22a2+32ab-9b2        |         |
|               {2} | 2a2+29ab-47b2         -32a2-20ab+24b2       |         |
|                                                                           |
|o8 : ZZdFactorizationMap                                                   |
+---------------------------------------------------------------------------+
|i9 : g = randomFactorizationMap(D2, C, InternalDegree => 2)                |
|                                                                           |
|          3                                        2                       |
|o9 = 0 : S  <------------------------------------ S  : 0                   |
|               {3} | -30a-48b -49a2-33ab-19b2 |                            |
|               {3} | -15a+39b 17a2-20ab+44b2  |                            |
|               {3} | 33b      -39a2+36ab+9b2  |                            |
|                                                                           |
|          3                               2                                |
|     1 : S  <--------------------------- S  : 1                            |
|               {5} | -39a+4b -11a-8b |                                     |
|               {5} | 13a-26b 43a-8b  |                                     |
|               {5} | 22a-49b 36a-3b  |                                     |
|                                                                           |
|o9 : ZZdFactorizationMap                                                   |
+---------------------------------------------------------------------------+
+----------------------------------------------------------------------------+
|i10 : h = f||g                                                              |
|                                                                            |
|           7                                                      2         |
|o10 = 0 : S  <-------------------------------------------------- S  : 0     |
|                {0} | -13a2-43ab-15b2 -47a3+47a2b+19ab2-16b3 |              |
|                {0} | -28a2-47ab+38b2 7a3+15a2b-23ab2+39b3   |              |
|                {0} | 2a2+16ab+22b2   43a3-17a2b-11ab2+48b3  |              |
|                {0} | 45a2-34ab-48b2  36a3+35a2b+11ab2-38b3  |              |
|                {3} | -30a-48b        -49a2-33ab-19b2        |              |
|                {3} | -15a+39b        17a2-20ab+44b2         |              |
|                {3} | 33b             -39a2+36ab+9b2         |              |
|                                                                            |
|           7                                                           2    |
|      1 : S  <------------------------------------------------------- S  : 1|
|                {1} | 33a3+40a2b+11ab2+46b3 15a3-37a2b-13ab2-10b3 |         |
|                {1} | -28a3+a2b-3ab2+22b3   30a3-18a2b+39ab2+27b3 |         |
|                {2} | -47a2-23ab-7b2        -22a2+32ab-9b2        |         |
|                {2} | 2a2+29ab-47b2         -32a2-20ab+24b2       |         |
|                {5} | -39a+4b               -11a-8b               |         |
|                {5} | 13a-26b               43a-8b                |         |
|                {5} | 22a-49b               36a-3b                |         |
|                                                                            |
|o10 : ZZdFactorizationMap                                                   |
+----------------------------------------------------------------------------+
|i11 : assert isWellDefined h                                                |
+----------------------------------------------------------------------------+
|i12 : assert(target h === target f ++ target g)                             |
+----------------------------------------------------------------------------+
|i13 : assert(source h === source f)                                         |
+----------------------------------------------------------------------------+

See also
========

  * ZZdFactorization ++ ZZdFactorization
    -- direct sum of ZZ/d-graded
    factorizations
  * ZZdFactorizationMap ++ ZZdFactorizationMap
    -- direct sum of ZZ/d-graded factorization maps
  * ZZdFactorizationMap | ZZdFactorizationMap
    -- join or concatenate maps horizontally
  * Matrix || Matrix (Macaulay2Doc) -- join matrices
    vertically
  * map(ZZdFactorization,ZZdFactorization,List) (missing documentation)

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

  * ZZdFactorizationMap || ZZdFactorizationMap
    -- join or concatenate maps vertically
-------------------------------------------------------------------------------

The source of this document is in
MatrixFactorizations/MatrixFactorizationsDOC.m2:4204:0.