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

DGAlgebras -- Data types and basic functions on differential graded (DG) Algebras.
**********************************************************************************

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

This package is used to define and manipulate DG algebras.

Author
======

  * Frank Moore (see http://www.math.wfu.edu/Faculty/Moore.html )
    <moorewf@wfu.edu>

Version
=======

This documentation describes version 1.1.0 of DGAlgebras.

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

The source code from which this documentation is derived is in the file
DGAlgebras.m2 (see common/share/Macaulay2/DGAlgebras.m2 ).

Exports
=======

  * Types
      * DGAlgebra -- The class of all DGAlgebras
      * DGAlgebraMap -- The class of all DG Algebra maps
  * Functions and commands
      * acyclicClosure -- Compute theae acyclic closure
        of a DGAlgebra.
      * adjoinVariables -- Adjoins variables to make
        the specified cycles boundaries.
      * deviations -- Computes the deviations of the input
        ring, complex, or power series.
      * deviationsToPoincare -- Computes the power
        series corresponding to a set of deviations.
      * dgAlgebraMap -- Define a DG algebra map between DG
        algebras.
      * dgAlgebraMultMap -- Returns the chain map
        corresponding to multiplication by a cycle.
      * expandGeomSeries -- Expand a geometric series
        to a specified degree.
      * "findNaryTrivialMasseyOperation" -- see
        findTrivialMasseyOperation, -- Finds a
        trivial Massey operation on a set of generators of H(A)
      * findTrivialMasseyOperation -- Finds
        a trivial Massey operation on a set of generators of H(A)
      * freeDGAlgebra -- Constructs a DGAlgebra
      * getBasis -- Get a basis for a particular homological
        degree of a DG algebra.
      * getBoundaryPreimage -- Attempt to find a
        preimage of a boundary under the differential of a DGAlgebra.
      * getDegNModule -- Compute a presentation of M_i as
        an R-module
      * getGenerators -- Returns a list of cycles whose
        images generate HH(A) as an algebra
      * homologyAlgebra -- Compute the homology algebra
        of a DGAlgebra.
      * homologyClass -- Computes the element of the
        homology algebra corresponding to a cycle in a DGAlgebra.
      * homologyModule -- Compute the homology of a
        DGModule as a module over a DGAlgebra.
      * isAcyclic -- Determines if a DGAlgebra is acyclic.
      * isGolod -- Determines if a ring is Golod
      * isGolodHomomorphism -- Determines if the
        canonical map from the ambient ring is Golod
      * isHomologyAlgebraTrivial -- Determines
        if the homology algebra of a DGAlgebra is trivial
      * killCycles -- Adjoins variables to make non-bounding
        cycles boundaries in the lowest positive degree with nontrivial
        homology.
      * koszulComplexDGA -- Returns the Koszul complex
        as a DGAlgebra
      * liftToDGMap -- Lift a ring homomorphism in degree
        zero to a DG algebra morphism
      * masseyTripleProduct -- Computes the Massey
        triple product of a set of cycles or homology classes
      * maxDegree -- Computes the maximum homological degree
        of a DGAlgebra
      * setDiff -- Sets the differential of a DGAlgebra
        manually.
      * toComplex -- Converts a DGAlgebra to a ChainComplex
      * toComplexMap -- Construct the ChainComplexMap
        associated to a DGAlgebraMap
      * torAlgebra -- Computes the Tor algebra of a ring
      * torMap -- Compute the map of Tor algebras associated to
        a RingMap.
      * zerothHomology -- Compute the zeroth homology of
        the DGAlgebra A as a ring.
  * Methods
      * "acyclicClosure(DGAlgebra)" -- see acyclicClosure,
        -- Compute theae acyclic closure of a DGAlgebra.
      * acyclicClosure(Ring) -- Compute the
        acyclic closure of the residue field of a ring up to a certain degree
      * "adjoinVariables(DGAlgebra,List)" -- see adjoinVariables,
        -- Adjoins variables to make the specified cycles
        boundaries.
      * "deviations(ChainComplex)" -- see deviations, --
        Computes the deviations of the input ring, complex, or power series.
      * "deviations(Ring)" -- see deviations, -- Computes the
        deviations of the input ring, complex, or power series.
      * "deviations(RingElement,List)" -- see deviations, --
        Computes the deviations of the input ring, complex, or power series.
      * "deviationsToPoincare(HashTable)" -- see deviationsToPoincare,
        -- Computes the power series corresponding to a
        set of deviations.
      * DGAlgebra ** DGAlgebra -- Tensor
        product of a DGAlgebra and another ring.
      * DGAlgebra ** Ring -- Tensor product of a
        DGAlgebra and another ring.
      * "dgAlgebraMap(DGAlgebra,DGAlgebra,Matrix)" -- see dgAlgebraMap,
        -- Define a DG algebra map between DG algebras.
      * "isWellDefined(DGAlgebraMap)" -- see dgAlgebraMap,
        -- Define a DG algebra map between DG algebras.
      * "dgAlgebraMultMap(DGAlgebra,RingElement)" -- see
        dgAlgebraMultMap, -- Returns the chain map
        corresponding to multiplication by a cycle.
      * diff(DGAlgebra,RingElement),
        -- Computes the differential of a ring element in a DGAlgebra
      * "expandGeomSeries(List,ZZ)" -- see expandGeomSeries,
        -- Expand a geometric series to a specified degree.
      * "expandGeomSeries(RingElement,ZZ)" -- see expandGeomSeries,
        -- Expand a geometric series to a specified degree.
      * "findNaryTrivialMasseyOperation(DGAlgebra,List,HashTable,ZZ)" -- see
        findTrivialMasseyOperation, -- Finds
        a trivial Massey operation on a set of generators of H(A)
      * "findTrivialMasseyOperation(DGAlgebra)" -- see
        findTrivialMasseyOperation, -- Finds a
        trivial Massey operation on a set of generators of H(A)
      * "freeDGAlgebra(Ring,List)" -- see freeDGAlgebra,
        -- Constructs a DGAlgebra
      * "getBasis(ZZ,DGAlgebra)" -- see getBasis, -- Get a
        basis for a particular homological degree of a DG algebra.
      * getBasis(ZZ,Ring) -- Get a basis for a
        degree of a ring.
      * "getBoundaryPreimage(DGAlgebra,List)" -- see getBoundaryPreimage,
        -- Attempt to find a preimage of a boundary under
        the differential of a DGAlgebra.
      * "getBoundaryPreimage(DGAlgebra,RingElement)" -- see
        getBoundaryPreimage, -- Attempt to find a preimage
        of a boundary under the differential of a DGAlgebra.
      * "getDegNModule(ZZ,Ring,Ring)" -- see getDegNModule,
        -- Compute a presentation of M_i as an R-module
      * "getGenerators(DGAlgebra)" -- see getGenerators,
        -- Returns a list of cycles whose images generate HH(A) as an algebra
      * HH DGAlgebra -- Compute the homology algebra of a
        DGAlgebra.
      * HH DGAlgebraMap -- Computes the homomorphism in
        homology associated to a DGAlgebraMap.
      * HH_ZZ DGAlgebra -- Computes the homology of a
        DG algebra as a module
      * "homologyAlgebra(DGAlgebra)" -- see homologyAlgebra,
        -- Compute the homology algebra of a DGAlgebra.
      * "homologyClass(DGAlgebra,RingElement)" -- see homologyClass,
        -- Computes the element of the homology algebra
        corresponding to a cycle in a DGAlgebra.
      * "homologyModule(DGAlgebra,Module)" -- see homologyModule,
        -- Compute the homology of a DGModule as a module over
        a DGAlgebra.
      * "isAcyclic(DGAlgebra)" -- see isAcyclic, -- Determines
        if a DGAlgebra is acyclic.
      * "isGolod(Ring)" -- see isGolod, -- Determines if a ring
        is Golod
      * "isGolodHomomorphism(QuotientRing)" -- see isGolodHomomorphism,
        -- Determines if the canonical map from the
        ambient ring is Golod
      * isHomogeneous(DGAlgebra), --
        Determine if the DGAlgebra respects the gradings of the ring it is
        defined over.
      * "isHomologyAlgebraTrivial(DGAlgebra)" -- see
        isHomologyAlgebraTrivial, -- Determines if
        the homology algebra of a DGAlgebra is trivial
      * "killCycles(DGAlgebra)" -- see killCycles, -- Adjoins
        variables to make non-bounding cycles boundaries in the lowest positive
        degree with nontrivial homology.
      * "koszulComplexDGA(Ring)" -- see koszulComplexDGA,
        -- Returns the Koszul complex as a DGAlgebra
      * koszulComplexDGA(Ideal) -- Returns
        the Koszul complex as a DGAlgebra
      * koszulComplexDGA(List) -- Define the
        Koszul complex on a list of elements as a DGAlgebra
      * "liftToDGMap(DGAlgebra,DGAlgebra,RingMap)" -- see liftToDGMap,
        -- Lift a ring homomorphism in degree zero to a DG algebra
        morphism
      * "masseyTripleProduct(DGAlgebra,RingElement,RingElement,RingElement)" --
        see masseyTripleProduct, -- Computes the
        Massey triple product of a set of cycles or homology classes
      * masseyTripleProduct(DGAlgebra,ZZ,ZZ,ZZ)
        -- Computes the
        matrix representing all triple Massey operations.
      * "maxDegree(DGAlgebra)" -- see maxDegree, -- Computes
        the maximum homological degree of a DGAlgebra
      * net(DGAlgebra) -- Outputs the pertinent
        information about a DGAlgebra
      * net(DGAlgebraMap) -- Outputs the
        pertinent information about a DGAlgebraMap
      * "setDiff(DGAlgebra,List)" -- see setDiff, -- Sets the
        differential of a DGAlgebra manually.
      * source(DGAlgebraMap) -- Outputs the
        source of a DGAlgebraMap
      * target(DGAlgebraMap) -- Outputs the
        target of a DGAlgebraMap
      * "toComplex(DGAlgebra)" -- see toComplex, -- Converts a
        DGAlgebra to a ChainComplex
      * toComplex(DGAlgebra,ZZ), --
        Converts a DGAlgebra to a ChainComplex
      * "toComplexMap(DGAlgebraMap)" -- see toComplexMap,
        -- Construct the ChainComplexMap associated to a DGAlgebraMap
      * "toComplexMap(DGAlgebraMap,ZZ)" -- see toComplexMap,
        -- Construct the ChainComplexMap associated to a
        DGAlgebraMap
      * "torAlgebra(Ring)" -- see torAlgebra, -- Computes the
        Tor algebra of a ring
      * torAlgebra(Ring,Ring) -- Computes
        Tor_R(S,k) up to a specified generating and relating degree.
      * "torMap(RingMap)" -- see torMap, -- Compute the map of
        Tor algebras associated to a RingMap.
      * "zerothHomology(DGAlgebra)" -- see zerothHomology,
        -- Compute the zeroth homology of the DGAlgebra A as a
        ring.
  * Symbols
      * AssertWellDefined -- Option to check whether
        the lifted map on DGAlgebras is well defined.
      * cycles -- Cycles chosen when computing the homology
        algebra of a DGAlgebra
      * "ringMap" -- see DGAlgebraMap, -- The class of all
        DG Algebra maps
      * EndDegree -- Option to specify the degree to stop
        computing killing cycles and acyclic closure
      * GenDegreeLimit -- Option to specify the maximum
        degree to look for generators
      * natural -- The underlying algebra of a DGAlgebra.
      * RelDegreeLimit -- Option to specify the maximum
        degree to look for relations
      * "InitializeComplex" -- see setDiff, -- Sets the
        differential of a DGAlgebra manually.
      * "InitializeDegreeZeroHomology" -- see setDiff, -- Sets
        the differential of a DGAlgebra manually.
      * StartDegree -- Option to specify the degree to
        start computing the acyclic closure and killing cycles
      * TMOLimit -- Option to specify the maximum arity of the
        trivial Massey operation

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

The object DGAlgebras, is a package (Macaulay2Doc).

Basic operations on DG Algebras -- Outlines some basic operations on DG Algebras
********************************************************************************

There are several ways to define a DGAlgebra.  One can start by defining one
'from scratch'.  One does this by specifying the ring over which the DGAlgebra
is defined and the degrees of the generators.  The name of the generators of
the DGAlgebra by default is $T_i$, but one may change this by specifying the
optional (string) argument 'Variable'.

+---------------------------------------------------+
|i1 : R = ZZ/101[a,b,c,d]/ideal{a^3,b^3,c^3,d^3}    |
|                                                   |
|o1 = R                                             |
|                                                   |
|o1 : QuotientRing                                  |
+---------------------------------------------------+
|i2 : A = freeDGAlgebra(R,{{1,1},{1,1},{1,1},{1,1}})|
|                                                   |
|o2 = {Ring => R                      }             |
|      Underlying algebra => R[T ..T ]              |
|                               1   4               |
|      Differential => null                         |
|                                                   |
|o2 : DGAlgebra                                     |
+---------------------------------------------------+

The command freeDGAlgebra only defines the underlying algebra of A, and not the
differential.  To set the differential of A, one uses the command setDiff.

+--------------------------------------+
|i3 : setDiff(A, gens R)               |
|                                      |
|o3 = {Ring => R                      }|
|      Underlying algebra => R[T ..T ] |
|                               1   4  |
|      Differential => {a, b, c, d}    |
|                                      |
|o3 : DGAlgebra                        |
+--------------------------------------+

Note that the above is the (graded) Koszul complex on a set of generators of R.
A much easier way to define this is to use the function koszulComplexDGA.

+-------------------------------------------+
|i4 : B = koszulComplexDGA(R, Variable=>"S")|
|                                           |
|o4 = {Ring => R                      }     |
|      Underlying algebra => R[S ..S ]      |
|                               1   4       |
|      Differential => {a, b, c, d}         |
|                                           |
|o4 : DGAlgebra                             |
+-------------------------------------------+

One can compute the homology algebra of a DGAlgebra using the homology (or HH)
command.

+-----------------------------------------------------------------------------+
|i5 : HB = HH B                                                               |
|Finding easy relations           :      -- used 0.0396389 seconds            |
|                                                                             |
|o5 = HB                                                                      |
|                                                                             |
|o5 : PolynomialRing, 4 skew commutative variables                            |
+-----------------------------------------------------------------------------+
|i6 : describe HB                                                             |
|                                                                             |
|      ZZ                                                                     |
|o6 = ---[X ..X , Degrees => {4:{1}}, Heft => {1, 0}, MonomialOrder =>        |
|     101  1   4                {3}                                           |
|                                                                             |
|-----------------------------------------------------------------------------|
|{MonomialSize => 32}, DegreeRank => 2, SkewCommutative => {0, 1, 2, 3}]      |
|{GRevLex => {4:1}  }                                                         |
|{Position => Up    }                                                         |
+-----------------------------------------------------------------------------+
|i7 : degrees HB                                                              |
|                                                                             |
|o7 = {{1, 3}, {1, 3}, {1, 3}, {1, 3}}                                        |
|                                                                             |
|o7 : List                                                                    |
+-----------------------------------------------------------------------------+

Note that since R is a complete intersection, its Koszul homology algebra is an
exterior algebra, which is a free graded commutative algebra.  Note that the
internal degree is preserved in the computation of the homology algebra of B.

One can also adjoin variables to kill cycles in homology.  The command
killCycles looks for the first positive degree nonzero homology (say i), and
adjoins variables in homological degree i+1 that differentiate to a minimal
generating set of this homology, so that the resulting DGAlgebra now only has
homology in degree greater than i (note of course this could introduce new
homology in higher degrees). The command adjoinVariables allows finer control
over this procedure.  See adjoinVariables, for an
example.

+-----------------------------------------------------------------+
|i8 : HB.cache.cycles                                             |
|                                                                 |
|       2     2     2     2                                       |
|o8 = {a S , b S , c S , d S }                                    |
|         1     2     3     4                                     |
|                                                                 |
|o8 : List                                                        |
+-----------------------------------------------------------------+
|i9 : C = adjoinVariables(B,{first HB.cache.cycles})              |
|                                                                 |
|o9 = {Ring => R                         }                        |
|      Underlying algebra => R[T ..T ]                            |
|                               1   5                             |
|                                    2                            |
|      Differential => {a, b, c, d, a T }                         |
|                                      1                          |
|                                                                 |
|o9 : DGAlgebra                                                   |
+-----------------------------------------------------------------+
|i10 : homologyAlgebra(C,GenDegreeLimit=>4,RelDegreeLimit=>4)     |
|Finding easy relations           :      -- used 0.0294167 seconds|
|                                                                 |
|       ZZ                                                        |
|o10 = ---[X ..X ]                                                |
|      101  1   3                                                 |
|                                                                 |
|o10 : PolynomialRing, 3 skew commutative variables               |
+-----------------------------------------------------------------+
|i11 : C = killCycles(B)                                          |
|                                                                 |
|o11 = {Ring => R                                           }     |
|       Underlying algebra => R[T ..T ]                           |
|                                1   8                            |
|                                     2     2     2     2         |
|       Differential => {a, b, c, d, a T , b T , c T , d T }      |
|                                       1     2     3     4       |
|                                                                 |
|o11 : DGAlgebra                                                  |
+-----------------------------------------------------------------+
|i12 : homologyAlgebra(C,GenDegreeLimit=>4,RelDegreeLimit=>4)     |
|                                                                 |
|       ZZ                                                        |
|o12 = ---                                                        |
|      101                                                        |
|                                                                 |
|o12 : QuotientRing                                               |
+-----------------------------------------------------------------+

Again, note that since R is a complete intersection, once we adjoin the
variables in homological degree two to kill the cycles in degree one, we obtain
a minimal DG Algebra resolution of the residue field of R.  Also, note that
since C has generators in even degree, one must specify the optional arguments
GenDegreeLimit and RelDegreeLimit to specify the max degree of the computation.
To do this, one uses the homologyAlgebra command rather than the HH command.

This computation could have also been done with the command acyclicClosure.
The command acyclicClosure performs the command killCycles sequentially to
ensure that the result has homology in higher and higher degrees, thereby
computing (part of) a minimal DG Algebra resolution of the residue field.
acyclicClosure has an optional argument EndDegree that allows the user to
specify the maximum homological degree with which to perform this adjunction of
variables.  The default value of this is 3, since if there are any variables of
degree 3 that need to be added, then each subsequent homological degree will
require some variables to be adjoined (Halperin's rigidity theorem).

+-----------------------------------------------------------------------------+
|i13 : D = acyclicClosure R                                                   |
|                                                                             |
|o13 = {Ring => R                                           }                 |
|       Underlying algebra => R[T ..T ]                                       |
|                                1   8                                        |
|                                     2     2     2     2                     |
|       Differential => {a, b, c, d, a T , b T , c T , d T }                  |
|                                       1     2     3     4                   |
|                                                                             |
|o13 : DGAlgebra                                                              |
+-----------------------------------------------------------------------------+
|i14 : R' = ZZ/101[x,y,z]/ideal{x^2,y^2,z^2,x*y*z}                            |
|                                                                             |
|o14 = R'                                                                     |
|                                                                             |
|o14 : QuotientRing                                                           |
+-----------------------------------------------------------------------------+
|i15 : E = acyclicClosure(R',EndDegree=>5)                                    |
|                                                                             |
|o15 = {Ring => R'                                                            |
|       Underlying algebra => R'[T ..T  ]                                     |
|                                 1   56                                      |
|                                                                             |
|       Differential => {x, y, z, x*T , y*T , z*T , y*z*T , y*z*T , -y*z*T T ,|
|                                    1     2     3       1       4        1 3 |
|                                                                             |
|o15 : DGAlgebra                                                              |
|-----------------------------------------------------------------------------|
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|-y*z*T T , -y*z*T T , -y*z*T T , y*z*T T , y*z*T T , y*z*T T , -y*z*T T T ,  |
|      1 2        1 5        1 6       3 4       2 4       1 4        1 2 3   |
|-----------------------------------------------------------------------------|
|                                                                             |
|                                                                             |
|                                                                             |
|      2                                                                      |
|-y*z*T , -y*z*T T , -y*z*T T , y*z*T T T , y*z*T T T , y*z*T T T ,           |
|      4        4 5        4 6       1 3 5       1 2 5       1 3 6            |
|-----------------------------------------------------------------------------|
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|y*z*T T T , -y*z*T T T , -y*z*T T T , -y*z*T T T , -y*z*T T , y*z*T T T ,    |
|     1 2 6        2 3 4        1 3 4        1 2 4        4 7       1 3 7     |
|-----------------------------------------------------------------------------|
|                                                                             |
|                                                                             |
|                                                                             |
|                   2                     2          2          2          2  |
|y*z*T T T , y*z*T T , y*z*T T T , y*z*T T , -y*z*T T , -y*z*T T , -y*z*T T , |
|     1 2 7       1 5       1 5 6       1 6        3 4        2 4        1 4  |
|-----------------------------------------------------------------------------|
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|-y*z*T T T , -y*z*T T T , -y*z*T T T , -y*z*T T T , -y*z*T T T , -y*z*T T T ,|
|      3 4 5        2 4 5        1 4 5        3 4 6        2 4 6        1 4 6 |
|-----------------------------------------------------------------------------|
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|y*z*T T T T , y*z*T T T T , -y*z*T T T T , y*z*T T , -y*z*T T T ,            |
|     1 2 3 5       1 2 3 6        1 2 3 4       4 8        1 3 8             |
|-----------------------------------------------------------------------------|
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|-y*z*T T T , -y*z*T T T , - y*z*T T T T  - y*z*T T T , -y*z*T T T  ,         |
|      1 3 9        1 2 8         1 2 3 7        1 2 9        1 2 10          |
|-----------------------------------------------------------------------------|
|                                                                            }|
|                                                                             |
|                                                                             |
|                                                                             |
|y*z*T T T , y*z*T T T , -y*z*T T T , -y*z*T T T , -y*z*T T T , y*z*T T T T } |
|     1 5 7       1 6 7        3 4 7        2 4 7        1 4 7       1 2 3 7  |
+-----------------------------------------------------------------------------+
|i16 : tally degrees E.natural                                                |
|                                                                             |
|o16 = Tally{{1, 1} => 3 }                                                    |
|            {2, 2} => 3                                                      |
|            {2, 3} => 1                                                      |
|            {3, 4} => 3                                                      |
|            {4, 5} => 6                                                      |
|            {5, 6} => 10                                                     |
|            {5, 7} => 3                                                      |
|            {6, 7} => 15                                                     |
|            {6, 8} => 12                                                     |
|                                                                             |
|o16 : Tally                                                                  |
+-----------------------------------------------------------------------------+

As you can see, since R' is not a complete intersection, the acyclic closure of
E requires infinitely many variables; we display the degrees of the first 6
here. The tally that is displayed gives the deviations of the ring R.  One can
compute the deviations directly from any minimal free resolution of the residue
field of R', so that using the one provided by res coker vars R is faster.  To
do this, use the command deviations.

+-----------------------------------+
|i17 : deviations(R,DegreeLimit=>6) |
|                                   |
|o17 = HashTable{(1, {1}) => 4}     |
|                (2, {3}) => 4      |
|                                   |
|o17 : HashTable                    |
+-----------------------------------+
|i18 : deviations(R',DegreeLimit=>6)|
|                                   |
|o18 = HashTable{(1, {1}) => 3 }    |
|                (2, {2}) => 3      |
|                (2, {3}) => 1      |
|                (3, {4}) => 3      |
|                (4, {5}) => 6      |
|                (5, {6}) => 10     |
|                (5, {7}) => 3      |
|                (6, {7}) => 15     |
|                (6, {8}) => 12     |
|                                   |
|o18 : HashTable                    |
+-----------------------------------+

As a brief warning, the command poincareN (Macaulay2Doc), which
is used in deviations, uses the symbols S and T internally,
and may cause problems accessing such rings with the user interface.

The Koszul complex as a DG Algebra -- an example
************************************************

The Koszul complex on a sequence of elements $f_1,\dots,f_r$ is a complex of
R-modules whose underlying graded R-module is the exterior algebra on R^r
generated in homological degree one.  This algebra structure also respects the
boundary map of the complex in the sense that it satisfies the Liebniz rule.
That is, $d(ab) = d(a)b + (-1)^{deg a}ad(b)$.  When one speaks of 'the' Koszul
complex of a ring, one means the Koszul complex on a minimal set of generators
of the maximal ideal of R.

+-----------------------------------------------+
|i1 : R = ZZ/101[a,b,c,d]/ideal{a^3,b^3,c^3,d^3}|
|                                               |
|o1 = R                                         |
|                                               |
|o1 : QuotientRing                              |
+-----------------------------------------------+
|i2 : KR = koszulComplexDGA R                   |
|                                               |
|o2 = {Ring => R                      }         |
|      Underlying algebra => R[T ..T ]          |
|                               1   4           |
|      Differential => {a, b, c, d}             |
|                                               |
|o2 : DGAlgebra                                 |
+-----------------------------------------------+

One can specify the name of the variable to easily handle multiple Koszul
complexes at once.

+---------------------------------------------------------+
|i3 : S = ZZ/101[x,y,z]/ideal{x^3,y^3,z^3,x^2*y^2,y^2*z^2}|
|                                                         |
|o3 = S                                                   |
|                                                         |
|o3 : QuotientRing                                        |
+---------------------------------------------------------+
|i4 : KS = koszulComplexDGA(S,Variable=>"U")              |
|                                                         |
|o4 = {Ring => S                      }                   |
|      Underlying algebra => S[U ..U ]                    |
|                               1   3                     |
|      Differential => {x, y, z}                          |
|                                                         |
|o4 : DGAlgebra                                           |
+---------------------------------------------------------+

To obtain the chain complex associated to the Koszul complex, one may use
toComplex.  One can also obtain this complex directly without using the
DGAlgebras package by using the command koszul (Macaulay2Doc).

+-------------------------------------------------------------------------+
|i5 : cxKR = toComplex KR                                                 |
|                                                                         |
|      1      4      6      4      1                                      |
|o5 = R  <-- R  <-- R  <-- R  <-- R                                       |
|                                                                         |
|     0      1      2      3      4                                       |
|                                                                         |
|o5 : ChainComplex                                                        |
+-------------------------------------------------------------------------+
|i6 : prune HH cxKR                                                       |
|                                                                         |
|o6 = 0 : cokernel | d c b a |                                            |
|                                                                         |
|     1 : cokernel {3} | d c b a 0 0 0 0 0 0 0 0 0 0 0 0 |                |
|                  {3} | 0 0 0 0 d c b a 0 0 0 0 0 0 0 0 |                |
|                  {3} | 0 0 0 0 0 0 0 0 d c b a 0 0 0 0 |                |
|                  {3} | 0 0 0 0 0 0 0 0 0 0 0 0 d c b a |                |
|                                                                         |
|     2 : cokernel {6} | d c b a 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 d c b a 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 d c b a 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 d c b a 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 d c b a 0 0 0 0 ||
|                  {6} | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 d c b a ||
|                                                                         |
|     3 : cokernel {9} | d c b a 0 0 0 0 0 0 0 0 0 0 0 0 |                |
|                  {9} | 0 0 0 0 d c b a 0 0 0 0 0 0 0 0 |                |
|                  {9} | 0 0 0 0 0 0 0 0 d c b a 0 0 0 0 |                |
|                  {9} | 0 0 0 0 0 0 0 0 0 0 0 0 d c b a |                |
|                                                                         |
|     4 : cokernel {12} | d c b a |                                       |
|                                                                         |
|o6 : GradedModule                                                        |
+-------------------------------------------------------------------------+

Since the Koszul complex is a DG algebra, its homology is itself an algebra.
One can obtain this algebra using the command homology, homologyAlgebra, or HH
(all commands work).  This algebra structure can detect whether or not the ring
is a complete intersection or Gorenstein.

+-----------------------------------------------------------------------------+
|i7 : HKR = HH KR                                                             |
|Finding easy relations           :      -- used 0.0415067 seconds            |
|                                                                             |
|o7 = HKR                                                                     |
|                                                                             |
|o7 : PolynomialRing, 4 skew commutative variables                            |
+-----------------------------------------------------------------------------+
|i8 : ideal HKR                                                               |
|                                                                             |
|o8 = ideal ()                                                                |
|                                                                             |
|o8 : Ideal of HKR                                                            |
+-----------------------------------------------------------------------------+
|i9 : R' = ZZ/101[a,b,c,d]/ideal{a^3,b^3,c^3,d^3,a*c,a*d,b*c,b*d,a^2*b^2-c^2*d|
|                                                                             |
|o9 = R'                                                                      |
|                                                                             |
|o9 : QuotientRing                                                            |
|-----------------------------------------------------------------------------|
|^2}                                                                          |
+-----------------------------------------------------------------------------+
|i10 : HKR' = HH koszulComplexDGA R'                                          |
|Finding easy relations           :      -- used 1.46572 seconds              |
|                                                                             |
|o10 = HKR'                                                                   |
|                                                                             |
|o10 : QuotientRing                                                           |
+-----------------------------------------------------------------------------+
|i11 : numgens HKR'                                                           |
|                                                                             |
|o11 = 34                                                                     |
+-----------------------------------------------------------------------------+
|i12 : ann ideal gens HKR'                                                    |
|                                                                             |
|o12 = ideal(X X  )                                                           |
|             4 34                                                            |
|                                                                             |
|o12 : Ideal of HKR'                                                          |
+-----------------------------------------------------------------------------+

Note that since the socle of HKR' is one dimensional, HKR' has Poincare
duality, and hence R' is Gorenstein.

One can also consider the Koszul complex of an ideal, or a sequence of
elements.

+-----------------------------------------------------------------------------+
|i13 : Q = ambient R                                                          |
|                                                                             |
|o13 = Q                                                                      |
|                                                                             |
|o13 : PolynomialRing                                                         |
+-----------------------------------------------------------------------------+
|i14 : I = ideal {a^3,b^3,c^3,d^3}                                            |
|                                                                             |
|              3   3   3   3                                                  |
|o14 = ideal (a , b , c , d )                                                 |
|                                                                             |
|o14 : Ideal of Q                                                             |
+-----------------------------------------------------------------------------+
|i15 : KI = koszulComplexDGA I                                                |
|                                                                             |
|o15 = {Ring => Q                       }                                     |
|       Underlying algebra => Q[T ..T ]                                       |
|                                1   4                                        |
|                         3   3   3   3                                       |
|       Differential => {a , b , c , d }                                      |
|                                                                             |
|o15 : DGAlgebra                                                              |
+-----------------------------------------------------------------------------+
|i16 : HKI = HH KI                                                            |
|                                                                             |
|o16 = HKI                                                                    |
|                                                                             |
|o16 : QuotientRing                                                           |
+-----------------------------------------------------------------------------+
|i17 : describe HKI                                                           |
|                                                                             |
|              Q                                                              |
|o17 = ----------------                                                       |
|        3   3   3   3                                                        |
|      (d , c , b , a )                                                       |
+-----------------------------------------------------------------------------+
|i18 : use Q                                                                  |
|                                                                             |
|o18 = Q                                                                      |
|                                                                             |
|o18 : PolynomialRing                                                         |
+-----------------------------------------------------------------------------+
|i19 : I' = I + ideal{a^2*b^2*c^2*d^2}                                        |
|                                                                             |
|              3   3   3   3   2 2 2 2                                        |
|o19 = ideal (a , b , c , d , a b c d )                                       |
|                                                                             |
|o19 : Ideal of Q                                                             |
+-----------------------------------------------------------------------------+
|i20 : KI' = koszulComplexDGA I'                                              |
|                                                                             |
|o20 = {Ring => Q                                 }                           |
|       Underlying algebra => Q[T ..T ]                                       |
|                                1   5                                        |
|                         3   3   3   3   2 2 2 2                             |
|       Differential => {a , b , c , d , a b c d }                            |
|                                                                             |
|o20 : DGAlgebra                                                              |
+-----------------------------------------------------------------------------+
|i21 : HKI' = HH KI'                                                          |
|                                                                             |
|o21 = HKI'                                                                   |
|                                                                             |
|o21 : QuotientRing                                                           |
+-----------------------------------------------------------------------------+
|i22 : describe HKI'                                                          |
|                                                                             |
|                                                                       Q     |
|                                                          -------------------|
|                                                            3   3   3   3   2|
|                                                          (d , c , b , a , a |
|o22 = -----------------------------------------------------------------------|
|        2                  2                               2                 |
|      (a X , a*X  - b*X , b X , b*X  - c*X , a*X  - c*X , c X , c*X  - d*X , |
|          4     3      4     3     2      3     2      4     2     1      2  |
|-----------------------------------------------------------------------------|
|-------[X ..X ]                                                              |
| 2 2 2   1   4                                                               |
|b c d )                                                                      |
|-------------------------------------------------------------------          |
|                           2                                                 |
|b*X  - d*X , a*X  - d*X , d X , X X , X X , X X , X X , X X , X X )          |
|   1      3     1      4     1   3 4   2 4   1 4   2 3   1 3   1 2           |
+-----------------------------------------------------------------------------+
|i23 : HKI'.cache.cycles                                                      |
|                                                                             |
|        2 2 2            2 2 2            2 2 2            2 2 2             |
|o23 = {a b c T  - d*T , a b d T  - c*T , a c d T  - b*T , b c d T  - a*T }   |
|              4      5         3      5         2      5         1      5    |
|                                                                             |
|o23 : List                                                                   |
+-----------------------------------------------------------------------------+

Note that since I is a Q-regular sequence, the Koszul complex is acyclic, and
that both homology algebras are algebras over the zeroth homology of the Koszul
complex.

Basic operations on DG Algebra Maps -- Outlines some basic operations on DGAlgebraMaps
**************************************************************************************

An algebra map between the underlying graded algebras that satisfies the
Leibniz rule is a morphism of DG algebras.  Such objects are created using the
DGAlgebraMap class.  As with DGAlgebras, one can define a DGAlgebraMap 'from
scratch' using dgAlgebraMap.

+------------------------------------------------------+
|i1 : R = ZZ/101[a,b,c]/ideal{a^3+b^3+c^3,a*b*c}       |
|                                                      |
|o1 = R                                                |
|                                                      |
|o1 : QuotientRing                                     |
+------------------------------------------------------+
|i2 : K1 = koszulComplexDGA(ideal vars R,Variable=>"Y")|
|                                                      |
|o2 = {Ring => R                      }                |
|      Underlying algebra => R[Y ..Y ]                 |
|                               1   3                  |
|      Differential => {a, b, c}                       |
|                                                      |
|o2 : DGAlgebra                                        |
+------------------------------------------------------+
|i3 : K2 = koszulComplexDGA(ideal {b,c},Variable=>"T") |
|                                                      |
|o3 = {Ring => R                      }                |
|      Underlying algebra => R[T ..T ]                 |
|                               1   2                  |
|      Differential => {b, c}                          |
|                                                      |
|o3 : DGAlgebra                                        |
+------------------------------------------------------+
|i4 : f = dgAlgebraMap(K2,K1,matrix{{0,T_1,T_2}})      |
|                                                      |
|o4 = map (R[T ..T ], R[Y ..Y ], {0, T , T , a, b, c}) |
|             1   2      1   3        1   2            |
|                                                      |
|o4 : DGAlgebraMap                                     |
+------------------------------------------------------+

Once we define the DGAlgebraMap, it is a good idea to check to see if it indeed
satisfies the Leibniz rule.  This can be checked by using isWellDefined.

+--------------------+
|i5 : isWellDefined f|
|                    |
|o5 = false          |
+--------------------+

Oops!  Let's try that again.

+--------------------------------------------------+
|i6 : g = dgAlgebraMap(K1,K2,matrix{{Y_2,Y_3}})    |
|                                                  |
|o6 = map (R[Y ..Y ], R[T ..T ], {Y , Y , a, b, c})|
|             1   3      1   2     2   3           |
|                                                  |
|o6 : DGAlgebraMap                                 |
+--------------------------------------------------+
|i7 : isWellDefined g                              |
|                                                  |
|o7 = true                                         |
+--------------------------------------------------+

One can lift a ring homomorphism in degree zero to a map of DGAlgebras (up to a
specified degree) using liftToDGMap.  This is helpful in some of the internal
functions of the DGAlgebras package, such as computing the map induced on Tor
algebras by a RingMap.

+-----------------------------------------------------------------------------+
|i8 : R = ZZ/101[a,b,c]/ideal{a^3,b^3,c^3}                                    |
|                                                                             |
|o8 = R                                                                       |
|                                                                             |
|o8 : QuotientRing                                                            |
+-----------------------------------------------------------------------------+
|i9 : S = R/ideal{a^2*b^2*c^2}                                                |
|                                                                             |
|o9 = S                                                                       |
|                                                                             |
|o9 : QuotientRing                                                            |
+-----------------------------------------------------------------------------+
|i10 : f = map(S,R)                                                           |
|                                                                             |
|o10 = map (S, R, {a, b, c})                                                  |
|                                                                             |
|o10 : RingMap S <--- R                                                       |
+-----------------------------------------------------------------------------+
|i11 : A = acyclicClosure(R,EndDegree=>3)                                     |
|                                                                             |
|o11 = {Ring => R                                  }                          |
|       Underlying algebra => R[T ..T ]                                       |
|                                1   6                                        |
|                                  2     2     2                              |
|       Differential => {a, b, c, a T , b T , c T }                           |
|                                    1     2     3                            |
|                                                                             |
|o11 : DGAlgebra                                                              |
+-----------------------------------------------------------------------------+
|i12 : B = acyclicClosure(S,EndDegree=>3)                                     |
|                                                                             |
|o12 = {Ring => S                                                             |
|       Underlying algebra => S[T ..T  ]                                      |
|                                1   16                                       |
|                                  2     2     2       2 2     2 2      2 2   |
|       Differential => {a, b, c, a T , b T , c T , a*b c T , b c T , -a b T ,|
|                                    1     2     3         1       4        6 |
|                                                                             |
|o12 : DGAlgebra                                                              |
|-----------------------------------------------------------------------------|
|                                                                }            |
|                                                                             |
|                                                                             |
|  2 2     2 2        2 2       2 2        2       2       2                  |
|-a c T , b c T T , -a c T T , b c T T , -a T T , c T T , b T T }             |
|      5       3 4        3 5       2 4      1 7     3 7     2 7              |
+-----------------------------------------------------------------------------+
|i13 : phi = liftToDGMap(B,A,f)                                               |
|                                                                             |
|o13 = map (S[T ..T  ], R[T ..T ], {T , T , T , T , T , T , a, b, c})         |
|              1   16      1   6     1   2   3   4   5   6                    |
|                                                                             |
|o13 : DGAlgebraMap                                                           |
+-----------------------------------------------------------------------------+

Once one has a DGAlgebraMap, one can also obtain the underlying map of
complexes via toComplexMap.

+-----------------------------------------------------------------------------+
|i14 : cmPhi = toComplexMap(phi,EndDegree=>3)                                 |
|                                                                             |
|                                          1                                  |
|o14 = 0 : cokernel | a2b2c2 | <--------- R  : 0                              |
|                                 | 1 |                                       |
|                                                                             |
|                                                                    3        |
|      1 : cokernel {1} | a2b2c2 0      0      | <----------------- R  : 1    |
|                   {1} | 0      a2b2c2 0      |    {1} | 1 0 0 |             |
|                   {1} | 0      0      a2b2c2 |    {1} | 0 1 0 |             |
|                                                   {1} | 0 0 1 |             |
|                                                                             |
|                                                                             |
|      2 : cokernel {2} | a2b2c2 0      0      0      0      0      0         |
|                   {2} | 0      a2b2c2 0      0      0      0      0         |
|                   {2} | 0      0      a2b2c2 0      0      0      0         |
|                   {3} | 0      0      0      a2b2c2 0      0      0         |
|                   {3} | 0      0      0      0      a2b2c2 0      0         |
|                   {3} | 0      0      0      0      0      a2b2c2 0         |
|                   {6} | 0      0      0      0      0      0      a2b2c2    |
|                                                                             |
|                                                                             |
|                                                                             |
|      3 : cokernel {3} | a2b2c2 0      0      0      0      0      0         |
|                   {4} | 0      a2b2c2 0      0      0      0      0         |
|                   {4} | 0      0      a2b2c2 0      0      0      0         |
|                   {4} | 0      0      0      a2b2c2 0      0      0         |
|                   {4} | 0      0      0      0      a2b2c2 0      0         |
|                   {4} | 0      0      0      0      0      a2b2c2 0         |
|                   {4} | 0      0      0      0      0      0      a2b2c2    |
|                   {4} | 0      0      0      0      0      0      0         |
|                   {4} | 0      0      0      0      0      0      0         |
|                   {4} | 0      0      0      0      0      0      0         |
|                   {7} | 0      0      0      0      0      0      0         |
|                   {7} | 0      0      0      0      0      0      0         |
|                   {7} | 0      0      0      0      0      0      0         |
|                   {7} | 0      0      0      0      0      0      0         |
|                   {7} | 0      0      0      0      0      0      0         |
|                   {7} | 0      0      0      0      0      0      0         |
|                                                                             |
|                                                                             |
|o14 : ChainComplexMap                                                        |
|-----------------------------------------------------------------------------|
|                            6                                                |
|| <----------------------- R  : 2                                            |
||    {2} | 1 0 0 0 0 0 |                                                     |
||    {2} | 0 1 0 0 0 0 |                                                     |
||    {2} | 0 0 1 0 0 0 |                                                     |
||    {3} | 0 0 0 1 0 0 |                                                     |
||    {3} | 0 0 0 0 1 0 |                                                     |
||    {3} | 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      0      |             |
|0      0      0      0      0      0      0      0      0      |             |
|0      0      0      0      0      0      0      0      0      |             |
|0      0      0      0      0      0      0      0      0      |             |
|0      0      0      0      0      0      0      0      0      |             |
|0      0      0      0      0      0      0      0      0      |             |
|a2b2c2 0      0      0      0      0      0      0      0      |             |
|0      a2b2c2 0      0      0      0      0      0      0      |             |
|0      0      a2b2c2 0      0      0      0      0      0      |             |
|0      0      0      a2b2c2 0      0      0      0      0      |             |
|0      0      0      0      a2b2c2 0      0      0      0      |             |
|0      0      0      0      0      a2b2c2 0      0      0      |             |
|0      0      0      0      0      0      a2b2c2 0      0      |             |
|0      0      0      0      0      0      0      a2b2c2 0      |             |
|0      0      0      0      0      0      0      0      a2b2c2 |             |
|                                                                             |
|-----------------------------------------------------------------------------|
|                                  10                                         |
|<------------------------------- R   : 3                                     |
|   {3} | 1 0 0 0 0 0 0 0 0 0 |                                               |
|   {4} | 0 1 0 0 0 0 0 0 0 0 |                                               |
|   {4} | 0 0 1 0 0 0 0 0 0 0 |                                               |
|   {4} | 0 0 0 1 0 0 0 0 0 0 |                                               |
|   {4} | 0 0 0 0 1 0 0 0 0 0 |                                               |
|   {4} | 0 0 0 0 0 1 0 0 0 0 |                                               |
|   {4} | 0 0 0 0 0 0 1 0 0 0 |                                               |
|   {4} | 0 0 0 0 0 0 0 1 0 0 |                                               |
|   {4} | 0 0 0 0 0 0 0 0 1 0 |                                               |
|   {4} | 0 0 0 0 0 0 0 0 0 1 |                                               |
|   {7} | 0 0 0 0 0 0 0 0 0 0 |                                               |
|   {7} | 0 0 0 0 0 0 0 0 0 0 |                                               |
|   {7} | 0 0 0 0 0 0 0 0 0 0 |                                               |
|   {7} | 0 0 0 0 0 0 0 0 0 0 |                                               |
|   {7} | 0 0 0 0 0 0 0 0 0 0 |                                               |
|   {7} | 0 0 0 0 0 0 0 0 0 0 |                                               |
+-----------------------------------------------------------------------------+

There are also some auxiliary commands associated with DGAlgebraMaps

+-----------------------------------------------------------------------------+
|i15 : source phi                                                             |
|                                                                             |
|o15 = {Ring => R                                  }                          |
|       Underlying algebra => R[T ..T ]                                       |
|                                1   6                                        |
|                                  2     2     2                              |
|       Differential => {a, b, c, a T , b T , c T }                           |
|                                    1     2     3                            |
|                                                                             |
|o15 : DGAlgebra                                                              |
+-----------------------------------------------------------------------------+
|i16 : target phi                                                             |
|                                                                             |
|o16 = {Ring => S                                                             |
|       Underlying algebra => S[T ..T  ]                                      |
|                                1   16                                       |
|                                  2     2     2       2 2     2 2      2 2   |
|       Differential => {a, b, c, a T , b T , c T , a*b c T , b c T , -a b T ,|
|                                    1     2     3         1       4        6 |
|                                                                             |
|o16 : DGAlgebra                                                              |
|-----------------------------------------------------------------------------|
|                                                                }            |
|                                                                             |
|                                                                             |
|  2 2     2 2        2 2       2 2        2       2       2                  |
|-a c T , b c T T , -a c T T , b c T T , -a T T , c T T , b T T }             |
|      5       3 4        3 5       2 4      1 7     3 7     2 7              |
+-----------------------------------------------------------------------------+

One can also obtain the map on homology induced by a DGAlgebra map.

+-----------------------------------------------------------------+
|i17 : HHg = HH g                                                 |
|Finding easy relations           :      -- used 0.0285829 seconds|
|                                                                 |
|                          ZZ                                     |
|                         ---[a..c]                               |
|            ZZ           101                                     |
|o17 = map (---[X ..X ], ----------[X ], {X , 0, 0, 0})           |
|           101  1   2           3   1     1                      |
|                        (c, b, a )                               |
|                                                                 |
|                                 ZZ                              |
|                                ---[a..c]                        |
|               ZZ               101                              |
|o17 : RingMap ---[X ..X ] <--- ----------[X ]                    |
|              101  1   2               3   1                     |
|                               (c, b, a )                        |
+-----------------------------------------------------------------+
|i18 : matrix HHg                                                 |
|                                                                 |
|o18 = | X_1 0 0 0 |                                              |
|                                                                 |
|               ZZ         1        ZZ         4                  |
|o18 : Matrix (---[X ..X ])  <--- (---[X ..X ])                   |
|              101  1   2          101  1   2                     |
+-----------------------------------------------------------------+

acyclicClosure -- Compute theae acyclic closure of a DGAlgebra.
***************************************************************

Synopsis
========

  * Usage:
        B = acyclicClosure(A)
  * Inputs:
      * A, an instance of the type DGAlgebra,
  * Optional inputs (Macaulay2Doc),:
      * EndDegree,
        => ..., default value -1, Option to specify the degree to stop
        computing the acyclic closure
      * StartDegree,
        => ..., default value 1, Option to specify the degree to start
        computing the acyclic closure
  * Outputs:
      * B, an instance of the type DGAlgebra, The acyclic
        closure of the DG Algebra A up to homological degree provided in the
        EndDegree option (default value is 3).

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

+---------------------------------------------------------------------+
|i1 : R = ZZ/101[a,b,c]/ideal{a^3,b^3,c^3}                            |
|                                                                     |
|o1 = R                                                               |
|                                                                     |
|o1 : QuotientRing                                                    |
+---------------------------------------------------------------------+
|i2 : A = koszulComplexDGA(R);                                        |
+---------------------------------------------------------------------+
|i3 : B = acyclicClosure(A,EndDegree=>3)                              |
|                                                                     |
|o3 = {Ring => R                                  }                   |
|      Underlying algebra => R[T ..T ]                                |
|                               1   6                                 |
|                                 2     2     2                       |
|      Differential => {a, b, c, a T , b T , c T }                    |
|                                   1     2     3                     |
|                                                                     |
|o3 : DGAlgebra                                                       |
+---------------------------------------------------------------------+
|i4 : toComplex(B,8)                                                  |
|                                                                     |
|      1      3      6      10      15      21      28      36      45|
|o4 = R  <-- R  <-- R  <-- R   <-- R   <-- R   <-- R   <-- R   <-- R  |
|                                                                     |
|     0      1      2      3       4       5       6       7       8  |
|                                                                     |
|o4 : ChainComplex                                                    |
+---------------------------------------------------------------------+
|i5 : B.diff                                                          |
|                                                                     |
|                                           2     2     2             |
|o5 = map (R[T ..T ], R[T ..T ], {a, b, c, a T , b T , c T , a, b, c})|
|             1   6      1   6                1     2     3           |
|                                                                     |
|o5 : RingMap R[T ..T ] <--- R[T ..T ]                                |
|                1   6          1   6                                 |
+---------------------------------------------------------------------+

See also
========

  * acyclicClosure(Ring) -- Compute the
    acyclic closure of the residue field of a ring up to a certain degree

Ways to use acyclicClosure :
============================

  * "acyclicClosure(DGAlgebra)"
  * acyclicClosure(Ring) -- Compute the
    acyclic closure of the residue field of a ring up to a certain degree

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

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

acyclicClosure(...,EndDegree=>...) -- Option to specify the degree to stop computing the acyclic closure
********************************************************************************************************

Synopsis
========

  * Usage:
        acyclicClosure(...,EndDegree=>n)

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

  * Default value: -1
  * Function: acyclicClosure, -- Compute theae acyclic
    closure of a DGAlgebra.
  * Option key: EndDegree, -- Option to specify the degree to
    stop computing killing cycles and acyclic closure

Functions with optional argument named EndDegree :
==================================================

  * acyclicClosure(...,EndDegree=>...)
    -- Option to specify
    the degree to stop computing the acyclic closure
  * isAcyclic(...,EndDegree=>...)
    -- Option to specify the
    degree to finish checking acyclicity
  * killCycles(...,EndDegree=>...)
    -- Option to specify the
    degree to stop looking for cycles
  * "liftToDGMap(...,EndDegree=>...)" -- see liftToDGMap, --
    Lift a ring homomorphism in degree zero to a DG algebra morphism
  * "toComplexMap(...,EndDegree=>...)" -- see toComplexMap,
    -- Construct the ChainComplexMap associated to a DGAlgebraMap

acyclicClosure(...,StartDegree=>...) -- Option to specify the degree to start computing the acyclic closure
***********************************************************************************************************

Synopsis
========

  * Usage:
        acyclicClosure(...,StartDegree=>n)

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

  * Default value: 1
  * Function: acyclicClosure, -- Compute theae acyclic
    closure of a DGAlgebra.
  * Option key: StartDegree, -- Option to specify the degree
    to start computing the acyclic closure and killing cycles

Functions with optional argument named StartDegree :
====================================================

  * acyclicClosure(...,StartDegree=>...)
    -- Option to
    specify the degree to start computing the acyclic closure
  * getGenerators(...,StartDegree=>...)
    -- Option to specify
    the degree to start finding generators of HH(DGAlgebra)
  * killCycles(...,StartDegree=>...)
    -- Option to specify
    the degree to start looking for cycles

acyclicClosure(Ring) -- Compute the acyclic closure of the residue field of a ring up to a certain degree
*********************************************************************************************************

Synopsis
========

  * Function: acyclicClosure,
  * Usage:
        A = acyclicClosure(R)
  * Inputs:
      * R, a ring (Macaulay2Doc),
  * Optional inputs (Macaulay2Doc),:
      * EndDegree,
        => ..., default value -1, Option to specify the degree to stop
        computing the acyclic closure
      * StartDegree,
        => ..., default value 1, Option to specify the degree to start
        computing the acyclic closure
  * Outputs:
      * A, an instance of the type DGAlgebra, The acyclic
        closure of the ring R up to homological degree provided in the
        EndDegree option (default value is 3).

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

This package always chooses the Koszul complex on a generating set for the
maximal ideal as a starting point, and then computes from there, using the
function acyclicClosure(DGAlgebra).

+-----------------------------------------------------------------------------+
|i1 : R = ZZ/101[a,b,c,d]/ideal{a^3,b^3,c^4-d^3}                              |
|                                                                             |
|o1 = R                                                                       |
|                                                                             |
|o1 : QuotientRing                                                            |
+-----------------------------------------------------------------------------+
|i2 : A = acyclicClosure(R,EndDegree=>3)                                      |
|                                                                             |
|o2 = {Ring => R                                            }                 |
|      Underlying algebra => R[T ..T ]                                        |
|                               1   7                                         |
|                                    2     2     3      2                     |
|      Differential => {a, b, c, d, a T , b T , c T  - d T }                  |
|                                      1     2     3      4                   |
|                                                                             |
|o2 : DGAlgebra                                                               |
+-----------------------------------------------------------------------------+
|i3 : A.diff                                                                  |
|                                                                             |
|                                              2     2     3      2           |
|o3 = map (R[T ..T ], R[T ..T ], {a, b, c, d, a T , b T , c T  - d T , a, b,  |
|             1   7      1   7                   1     2     3      4         |
|                                                                             |
|o3 : RingMap R[T ..T ] <--- R[T ..T ]                                        |
|                1   7          1   7                                         |
|-----------------------------------------------------------------------------|
|c, d})                                                                       |
+-----------------------------------------------------------------------------+

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

  * acyclicClosure(Ring) -- Compute the
    acyclic closure of the residue field of a ring up to a certain degree

adjoinVariables -- Adjoins variables to make the specified cycles boundaries.
*****************************************************************************

Synopsis
========

  * Usage:
        B = adjoinVariables(A,cycleList)
  * Inputs:
      * A, an instance of the type DGAlgebra,
      * cycleList, a list (Macaulay2Doc),
  * Outputs:
      * B, an instance of the type DGAlgebra,

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

+---------------------------------------------------------------+
|i1 : R = ZZ/101[a,b,c,d]/ideal{a^3,b^3,c^3-d^4}                |
|                                                               |
|o1 = R                                                         |
|                                                               |
|o1 : QuotientRing                                              |
+---------------------------------------------------------------+
|i2 : A = koszulComplexDGA(R)                                   |
|                                                               |
|o2 = {Ring => R                      }                         |
|      Underlying algebra => R[T ..T ]                          |
|                               1   4                           |
|      Differential => {a, b, c, d}                             |
|                                                               |
|o2 : DGAlgebra                                                 |
+---------------------------------------------------------------+
|i3 : A.diff                                                    |
|                                                               |
|o3 = map (R[T ..T ], R[T ..T ], {a, b, c, d, a, b, c, d})      |
|             1   4      1   4                                  |
|                                                               |
|o3 : RingMap R[T ..T ] <--- R[T ..T ]                          |
|                1   4          1   4                           |
+---------------------------------------------------------------+
|i4 : prune homology(1,A)                                       |
|                                                               |
|o4 = cokernel | d c b a 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 d c b a |                      |
|                                                               |
|                            3                                  |
|o4 : R-module, quotient of R                                   |
+---------------------------------------------------------------+
|i5 : B = adjoinVariables(A,{a^2*T_1})                          |
|                                                               |
|o5 = {Ring => R                         }                      |
|      Underlying algebra => R[T ..T ]                          |
|                               1   5                           |
|                                    2                          |
|      Differential => {a, b, c, d, a T }                       |
|                                      1                        |
|                                                               |
|o5 : DGAlgebra                                                 |
+---------------------------------------------------------------+
|i6 : B.diff                                                    |
|                                                               |
|                                              2                |
|o6 = map (R[T ..T ], R[T ..T ], {a, b, c, d, a T , a, b, c, d})|
|             1   5      1   5                   1              |
|                                                               |
|o6 : RingMap R[T ..T ] <--- R[T ..T ]                          |
|                1   5          1   5                           |
+---------------------------------------------------------------+
|i7 : prune homology(1,B)                                       |
|                                                               |
|o7 = cokernel | d c b a 0 0 0 0 |                              |
|              | 0 0 0 0 d c b a |                              |
|                                                               |
|                            2                                  |
|o7 : R-module, quotient of R                                   |
+---------------------------------------------------------------+

Ways to use adjoinVariables :
=============================

  * "adjoinVariables(DGAlgebra,List)"

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

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

AssertWellDefined -- Option to check whether the lifted map on DGAlgebras is well defined.
******************************************************************************************

Synopsis
========

  * Usage:
        liftToDGMap(...,AssertWellDefined=>true)

Functions with optional argument named AssertWellDefined :
==========================================================

  * "toComplexMap(...,AssertWellDefined=>...)" -- see toComplexMap,
    -- Construct the ChainComplexMap associated to a DGAlgebraMap

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

The object AssertWellDefined, is a symbol (Macaulay2Doc).

cycles -- Cycles chosen when computing the homology algebra of a DGAlgebra
**************************************************************************

Synopsis
========

  * Usage:
        A.cycles

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

+-----------------------------------------------------------------+
|i1 : R = ZZ/101[a,b,c,d]/ideal{a^3,b^4,c^5,d^6}                  |
|                                                                 |
|o1 = R                                                           |
|                                                                 |
|o1 : QuotientRing                                                |
+-----------------------------------------------------------------+
|i2 : A = koszulComplexDGA(R)                                     |
|                                                                 |
|o2 = {Ring => R                      }                           |
|      Underlying algebra => R[T ..T ]                            |
|                               1   4                             |
|      Differential => {a, b, c, d}                               |
|                                                                 |
|o2 : DGAlgebra                                                   |
+-----------------------------------------------------------------+
|i3 : apply(maxDegree A + 1, i -> numgens prune homology(i,A))    |
|                                                                 |
|o3 = {1, 4, 6, 4, 1}                                             |
|                                                                 |
|o3 : List                                                        |
+-----------------------------------------------------------------+
|i4 : HA = homologyAlgebra(A)                                     |
|Finding easy relations           :      -- used 0.0907012 seconds|
|                                                                 |
|o4 = HA                                                          |
|                                                                 |
|o4 : PolynomialRing, 4 skew commutative variables                |
+-----------------------------------------------------------------+
|i5 : numgens HA                                                  |
|                                                                 |
|o5 = 4                                                           |
+-----------------------------------------------------------------+
|i6 : HA.cache.cycles                                             |
|                                                                 |
|       2     3     4     5                                       |
|o6 = {a T , b T , c T , d T }                                    |
|         1     2     3     4                                     |
|                                                                 |
|o6 : List                                                        |
+-----------------------------------------------------------------+

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

The object cycles, is a symbol (Macaulay2Doc).

deviations -- Computes the deviations of the input ring, complex, or power series.
**********************************************************************************

Synopsis
========

  * Usage:
        devTally = deviations(R)
  * Inputs:
      * R, a ring (Macaulay2Doc),
  * Optional inputs (Macaulay2Doc),:
      * DegreeLimit,
        => ..., default value 3, Option to specify the maximum degree to look
        for generators when computing the deviations
  * Outputs:
      * devTally, a tally (Macaulay2Doc),

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

This command computes the deviations of a Ring (Macaulay2Doc), a
ChainComplex (Macaulay2Doc), or a power series in the form
of a RingElement (Macaulay2Doc). The deviations are the same
as the degrees of the generators of the acyclic closure of R, or the degrees of
the generators of the Tor algebra of R.  This function takes an option called
Limit (default value 3) that specifies the largest deviation to compute.

+-----------------------------------------------------------------------------+
|i1 : R = ZZ/101[a,b,c,d]/ideal {a^3,b^3,c^3,d^3}                             |
|                                                                             |
|o1 = R                                                                       |
|                                                                             |
|o1 : QuotientRing                                                            |
+-----------------------------------------------------------------------------+
|i2 : deviations(R)                                                           |
|                                                                             |
|o2 = HashTable{(1, {1}) => 4}                                                |
|               (2, {3}) => 4                                                 |
|                                                                             |
|o2 : HashTable                                                               |
+-----------------------------------------------------------------------------+
|i3 : deviations(R,DegreeLimit=>4)                                            |
|                                                                             |
|o3 = HashTable{(1, {1}) => 4}                                                |
|               (2, {3}) => 4                                                 |
|                                                                             |
|o3 : HashTable                                                               |
+-----------------------------------------------------------------------------+
|i4 : S = R/ideal{a^2*b^2*c^2*d^2}                                            |
|                                                                             |
|o4 = S                                                                       |
|                                                                             |
|o4 : QuotientRing                                                            |
+-----------------------------------------------------------------------------+
|i5 : deviations(S,DegreeLimit=>4)                                            |
|                                                                             |
|o5 = HashTable{(1, {1}) => 4 }                                               |
|               (2, {3}) => 4                                                 |
|               (2, {8}) => 1                                                 |
|               (3, {9}) => 4                                                 |
|               (4, {10}) => 6                                                |
|               (4, {11}) => 4                                                |
|                                                                             |
|o5 : HashTable                                                               |
+-----------------------------------------------------------------------------+
|i6 : T = ZZ/101[a,b]/ideal {a^2-b^3}                                         |
|                                                                             |
|o6 = T                                                                       |
|                                                                             |
|o6 : QuotientRing                                                            |
+-----------------------------------------------------------------------------+
|i7 : deviations(T,DegreeLimit=>4)                                            |
|warning: clearing value of symbol T to allow access to subscripted           |
|       : debug with expression   debug 6944   or with command line           |
|                                                                             |
|o7 = HashTable{1 => 2}                                                       |
|               2 => 1                                                        |
|                                                                             |
|o7 : HashTable                                                               |
|-----------------------------------------------------------------------------|
|variables based on it                                                        |
|option   --debug 6944                                                        |
+-----------------------------------------------------------------------------+

Note that the deviations of T are not graded, since T is not graded.  When
calling deviations on a ChainComplex, the zeroth free module must be cyclic,
and this is checked.  The same goes for the case of a RingElement.

+-----------------------------------------------------------------------------+
|i8 : R = ZZ/101[a,b,c,d]/ideal {a^3,b^3,c^3,d^3}                             |
|                                                                             |
|o8 = R                                                                       |
|                                                                             |
|o8 : QuotientRing                                                            |
+-----------------------------------------------------------------------------+
|i9 : A = degreesRing R                                                       |
|                                                                             |
|o9 = A                                                                       |
|                                                                             |
|o9 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i10 : kRes = res coker vars R                                                |
|                                                                             |
|       1      4      10      20      35      56                              |
|o10 = R  <-- R  <-- R   <-- R   <-- R   <-- R                                |
|                                                                             |
|      0      1      2       3       4       5                                |
|                                                                             |
|o10 : ChainComplex                                                           |
+-----------------------------------------------------------------------------+
|i11 : pSeries = poincareN kRes                                               |
|warning: clearing value of symbol T to allow access to subscripted variables |
|       : debug with expression   debug 6944   or with command line option   -|
|                                                                             |
|                    2 2     2 3     3 3      3 4    4 4      4 5      4 6    |
|o11 = 1 + 4S*T  + 6S T  + 4S T  + 4S T  + 16S T  + S T  + 24S T  + 10S T  +  |
|              0       0       0       0        0      0        0        0    |
|      -----------------------------------------------------------------------|
|         5 6      5 7                                                        |
|      16S T  + 40S T                                                         |
|           0        0                                                        |
|                                                                             |
|o11 : ZZ[S, T ]                                                              |
|             0                                                               |
|-----------------------------------------------------------------------------|
|based on it                                                                  |
|-debug 6944                                                                  |
+-----------------------------------------------------------------------------+
|i12 : devA = deviations(R,DegreeLimit=>5)                                    |
|                                                                             |
|o12 = HashTable{(1, {1}) => 4}                                               |
|                (2, {3}) => 4                                                |
|                                                                             |
|o12 : HashTable                                                              |
+-----------------------------------------------------------------------------+
|i13 : devB = deviations(kRes,DegreeLimit=>5)                                 |
|                                                                             |
|o13 = HashTable{(1, {1}) => 4}                                               |
|                (2, {3}) => 4                                                |
|                                                                             |
|o13 : HashTable                                                              |
+-----------------------------------------------------------------------------+
|i14 : devC = deviations(pSeries,degrees R, DegreeLimit=>5)                   |
|                                                                             |
|o14 = HashTable{(1, {1}) => 4}                                               |
|                (2, {3}) => 4                                                |
|                                                                             |
|o14 : HashTable                                                              |
+-----------------------------------------------------------------------------+
|i15 : devA === devB and devB === devC                                        |
|                                                                             |
|o15 = true                                                                   |
+-----------------------------------------------------------------------------+

Ways to use deviations :
========================

  * "deviations(ChainComplex)"
  * "deviations(Ring)"
  * "deviations(RingElement,List)"

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

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

deviations(...,DegreeLimit=>...) -- Option to specify the maximum degree to look for generators when computing the deviations
*****************************************************************************************************************************

Synopsis
========

  * Usage:
        deviations(...,DegreeLimit=>n)

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

  * Default value: 3
  * Function: deviations, -- Computes the deviations of the
    input ring, complex, or power series.
  * Option key: DegreeLimit (Macaulay2Doc), -- an optional
    argument

Functions with optional argument named DegreeLimit :
====================================================

  * deviations(...,DegreeLimit=>...)
    -- Option to specify
    the maximum degree to look for generators when computing the deviations
  * "deviationsToPoincare(...,DegreeLimit=>...)" -- see
    deviationsToPoincare, -- Computes the power series
    corresponding to a set of deviations.
  * "gb(...,DegreeLimit=>...)" -- see gb (Macaulay2Doc), -- compute a
    Gröbner basis
  * getGenerators(...,DegreeLimit=>...)
    -- Option to specify
    the degree to stop finding generators of HH(DGAlgebra)
  * "intersectInP(...,DegreeLimit=>...)" -- see
    intersectInP(...,BasisElementLimit=>...) (ReesAlgebra),
    --
    Option for intersectInP
  * "minimalBetti(...,DegreeLimit=>...)" -- see minimalBetti (Macaulay2Doc),
    -- minimal betti numbers of (the mininimal free
    resolution of) a homogeneous ideal or module
  * "pushForward(...,DegreeLimit=>...)" -- see
    pushForward(RingMap,Module) (Macaulay2Doc),
  * quotient(...,DegreeLimit=>...) (Saturation)
  * "saturate(...,DegreeLimit=>...)" -- see
    quotient(...,DegreeLimit=>...) (Saturation),
  * "analyticSpread(...,DegreeLimit=>...)" -- see
    reesIdeal(...,DegreeLimit=>...) (ReesAlgebra),
    -- Bound
    the degrees considered in the saturation step. Defaults to infinity
  * "distinguished(...,DegreeLimit=>...)" -- see
    reesIdeal(...,DegreeLimit=>...) (ReesAlgebra),
    -- Bound
    the degrees considered in the saturation step. Defaults to infinity
  * "isLinearType(...,DegreeLimit=>...)" -- see
    reesIdeal(...,DegreeLimit=>...) (ReesAlgebra),
    -- Bound
    the degrees considered in the saturation step. Defaults to infinity
  * "isReduction(...,DegreeLimit=>...)" -- see
    reesIdeal(...,DegreeLimit=>...) (ReesAlgebra),
    -- Bound
    the degrees considered in the saturation step. Defaults to infinity
  * "minimalReduction(...,DegreeLimit=>...)" -- see
    reesIdeal(...,DegreeLimit=>...) (ReesAlgebra),
    -- Bound
    the degrees considered in the saturation step. Defaults to infinity
  * "multiplicity(...,DegreeLimit=>...)" -- see
    reesIdeal(...,DegreeLimit=>...) (ReesAlgebra),
    -- Bound
    the degrees considered in the saturation step. Defaults to infinity
  * "normalCone(...,DegreeLimit=>...)" -- see
    reesIdeal(...,DegreeLimit=>...) (ReesAlgebra),
    -- Bound
    the degrees considered in the saturation step. Defaults to infinity
  * "reesAlgebra(...,DegreeLimit=>...)" -- see
    reesIdeal(...,DegreeLimit=>...) (ReesAlgebra),
    -- Bound
    the degrees considered in the saturation step. Defaults to infinity
  * reesIdeal(...,DegreeLimit=>...) (ReesAlgebra)
    -- Bound
    the degrees considered in the saturation step. Defaults to infinity
  * "specialFiber(...,DegreeLimit=>...)" -- see
    reesIdeal(...,DegreeLimit=>...) (ReesAlgebra),
    -- Bound
    the degrees considered in the saturation step. Defaults to infinity
  * "specialFiberIdeal(...,DegreeLimit=>...)" -- see
    reesIdeal(...,DegreeLimit=>...) (ReesAlgebra),
    -- Bound
    the degrees considered in the saturation step. Defaults to infinity
  * resolution(...,DegreeLimit=>...) (Macaulay2Doc),
    --
    compute only up to this degree
  * "syz(...,DegreeLimit=>...)" -- see syz(Matrix) (Macaulay2Doc),
    -- compute the syzygy matrix

deviationsToPoincare -- Computes the power series corresponding to a set of deviations.
***************************************************************************************

Synopsis
========

  * Usage:
        pSeries = deviationsToPoincare(devHash)
  * Inputs:
      * devHash, a hash table (Macaulay2Doc), HashTable of the
        same form as the output from deviations,
  * Optional inputs (Macaulay2Doc),:
      * DegreeLimit => ..., default value 0
  * Outputs:
      * pSeries, a ring element (Macaulay2Doc),

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

This command takes a HashTable of the same form output from deviations,
and produces the Poincare series corresponding to it. The
(key,value) pairs must be of the form homologicalDegree=>number or
(homologicalDegree,internalDegree)=>number. Because

+-----------------------------------------------------------------------------+
|i1 : R = ZZ/101[a,b,c]/ideal{a^3,b^3,c^3}                                    |
|                                                                             |
|o1 = R                                                                       |
|                                                                             |
|o1 : QuotientRing                                                            |
+-----------------------------------------------------------------------------+
|i2 : RDevs = deviations(R,DegreeLimit=>6)                                    |
|                                                                             |
|o2 = HashTable{(1, {1}) => 3}                                                |
|               (2, {3}) => 3                                                 |
|                                                                             |
|o2 : HashTable                                                               |
+-----------------------------------------------------------------------------+
|i3 : devPSeries = deviationsToPoincare(RDevs,DegreeLimit=>6)                 |
|                                                                             |
|        6 9      6 8      5 7     5 6     4 6     4 5     3 4    3 3     2 3 |
|o3 = 10S T  + 18S T  + 18S T  + 3S T  + 6S T  + 9S T  + 9S T  + S T  + 3S T  |
|          0        0        0       0       0       0       0      0       0 |
|     ------------------------------------------------------------------------|
|         2 2                                                                 |
|     + 3S T  + 3S*T  + 1                                                     |
|           0       0                                                         |
|                                                                             |
|     ZZ[S, T ]                                                               |
|            0                                                                |
|o3 : ---------                                                               |
|          7                                                                  |
|         S                                                                   |
+-----------------------------------------------------------------------------+
|i4 : pSeries = poincareN (res(coker vars R, LengthLimit=>6))                 |
|                                                                             |
|                   2 2     2 3    3 3     3 4     4 5     4 6     5 6        |
|o4 = 1 + 3S*T  + 3S T  + 3S T  + S T  + 9S T  + 9S T  + 6S T  + 3S T  +      |
|             0       0       0      0       0       0       0       0        |
|     ------------------------------------------------------------------------|
|        5 7      6 8      6 9                                                |
|     18S T  + 18S T  + 10S T                                                 |
|          0        0        0                                                |
|                                                                             |
|o4 : ZZ[S, T ]                                                               |
|            0                                                                |
+-----------------------------------------------------------------------------+
|i5 : substitute(devPSeries,ring pSeries) == pSeries                          |
|                                                                             |
|o5 = true                                                                    |
+-----------------------------------------------------------------------------+

Ways to use deviationsToPoincare :
==================================

  * "deviationsToPoincare(HashTable)"

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

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

DGAlgebra -- The class of all DGAlgebras
****************************************

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

Some common ways to create DGAlgebras include koszulComplexDGA,
see freeDGAlgebra, setDiff,
and acyclicClosure.

See also
========

  * Basic operations on DG Algebras, --
    Outlines some basic operations on DG Algebras

Functions and methods returning an object of class DGAlgebra :
==============================================================

  * acyclicClosure -- Compute theae acyclic closure of a
    DGAlgebra.
  * adjoinVariables -- Adjoins variables to make the
    specified cycles boundaries.
  * freeDGAlgebra -- Constructs a DGAlgebra
  * killCycles -- Adjoins variables to make non-bounding
    cycles boundaries in the lowest positive degree with nontrivial homology.
  * koszulComplexDGA -- Returns the Koszul complex as
    a DGAlgebra
  * setDiff -- Sets the differential of a DGAlgebra manually.

Methods that use an object of class DGAlgebra :
===============================================

  * "acyclicClosure(DGAlgebra)" -- see acyclicClosure, --
    Compute theae acyclic closure of a DGAlgebra.
  * "adjoinVariables(DGAlgebra,List)" -- see adjoinVariables,
    -- Adjoins variables to make the specified cycles
    boundaries.
  * DGAlgebra ** DGAlgebra -- Tensor product
    of a DGAlgebra and another ring.
  * DGAlgebra ** Ring -- Tensor product of a
    DGAlgebra and another ring.
  * "dgAlgebraMap(DGAlgebra,DGAlgebra,Matrix)" -- see dgAlgebraMap,
    -- Define a DG algebra map between DG algebras.
  * "dgAlgebraMultMap(DGAlgebra,RingElement)" -- see dgAlgebraMultMap,
    -- Returns the chain map corresponding to multiplication
    by a cycle.
  * diff(DGAlgebra,RingElement), --
    Computes the differential of a ring element in a DGAlgebra
  * "findNaryTrivialMasseyOperation(DGAlgebra,List,HashTable,ZZ)" -- see
    findTrivialMasseyOperation, -- Finds a trivial
    Massey operation on a set of generators of H(A)
  * "findTrivialMasseyOperation(DGAlgebra)" -- see
    findTrivialMasseyOperation, -- Finds a trivial
    Massey operation on a set of generators of H(A)
  * "getBasis(ZZ,DGAlgebra)" -- see getBasis, -- Get a basis
    for a particular homological degree of a DG algebra.
  * "getBoundaryPreimage(DGAlgebra,List)" -- see getBoundaryPreimage,
    -- Attempt to find a preimage of a boundary under the
    differential of a DGAlgebra.
  * "getBoundaryPreimage(DGAlgebra,RingElement)" -- see
    getBoundaryPreimage, -- Attempt to find a preimage of
    a boundary under the differential of a DGAlgebra.
  * "getGenerators(DGAlgebra)" -- see getGenerators, --
    Returns a list of cycles whose images generate HH(A) as an algebra
  * HH DGAlgebra -- Compute the homology algebra of a
    DGAlgebra.
  * HH_ZZ DGAlgebra -- Computes the homology of a DG
    algebra as a module
  * "homologyAlgebra(DGAlgebra)" -- see homologyAlgebra,
    -- Compute the homology algebra of a DGAlgebra.
  * "homologyClass(DGAlgebra,RingElement)" -- see homologyClass,
    -- Computes the element of the homology algebra
    corresponding to a cycle in a DGAlgebra.
  * "homologyModule(DGAlgebra,Module)" -- see homologyModule,
    -- Compute the homology of a DGModule as a module over a
    DGAlgebra.
  * "isAcyclic(DGAlgebra)" -- see isAcyclic, -- Determines if
    a DGAlgebra is acyclic.
  * isHomogeneous(DGAlgebra) -- Determine
    if the DGAlgebra respects the gradings of the ring it is defined over.
  * "isHomologyAlgebraTrivial(DGAlgebra)" -- see
    isHomologyAlgebraTrivial, -- Determines if the
    homology algebra of a DGAlgebra is trivial
  * "killCycles(DGAlgebra)" -- see killCycles, -- Adjoins
    variables to make non-bounding cycles boundaries in the lowest positive
    degree with nontrivial homology.
  * "liftToDGMap(DGAlgebra,DGAlgebra,RingMap)" -- see liftToDGMap,
    -- Lift a ring homomorphism in degree zero to a DG algebra
    morphism
  * "masseyTripleProduct(DGAlgebra,RingElement,RingElement,RingElement)" -- see
    masseyTripleProduct, -- Computes the Massey
    triple product of a set of cycles or homology classes
  * masseyTripleProduct(DGAlgebra,ZZ,ZZ,ZZ)
    -- Computes the matrix
    representing all triple Massey operations.
  * "maxDegree(DGAlgebra)" -- see maxDegree, -- Computes the
    maximum homological degree of a DGAlgebra
  * net(DGAlgebra) -- Outputs the pertinent
    information about a DGAlgebra
  * "setDiff(DGAlgebra,List)" -- see setDiff, -- Sets the
    differential of a DGAlgebra manually.
  * "toComplex(DGAlgebra)" -- see toComplex, -- Converts a
    DGAlgebra to a ChainComplex
  * toComplex(DGAlgebra,ZZ) -- Converts a
    DGAlgebra to a ChainComplex
  * "zerothHomology(DGAlgebra)" -- see zerothHomology, --
    Compute the zeroth homology of the DGAlgebra A as a ring.

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

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

DGAlgebra ** DGAlgebra -- Tensor product of a DGAlgebra and another ring.
*************************************************************************

Synopsis
========

  * Operator: ** (Macaulay2Doc),
  * Usage:
        C = A ** B
  * Inputs:
      * A, an instance of the type DGAlgebra,
      * B, an instance of the type DGAlgebra,
  * Outputs:
      * C, an instance of the type DGAlgebra,

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

Tensor product of a pair of DGAlgebras.

+-------------------------------------------------+
|i1 : R = ZZ/101[a,b,c,d]                         |
|                                                 |
|o1 = R                                           |
|                                                 |
|o1 : PolynomialRing                              |
+-------------------------------------------------+
|i2 : A = koszulComplexDGA({a,b})                 |
|                                                 |
|o2 = {Ring => R                      }           |
|      Underlying algebra => R[T ..T ]            |
|                               1   2             |
|      Differential => {a, b}                     |
|                                                 |
|o2 : DGAlgebra                                   |
+-------------------------------------------------+
|i3 : B = koszulComplexDGA({c,d})                 |
|                                                 |
|o3 = {Ring => R                      }           |
|      Underlying algebra => R[T ..T ]            |
|                               1   2             |
|      Differential => {c, d}                     |
|                                                 |
|o3 : DGAlgebra                                   |
+-------------------------------------------------+
|i4 : C = A ** B                                  |
|                                                 |
|o4 = {Ring => R                      }           |
|      Underlying algebra => R[T ..T ]            |
|                               1   4             |
|      Differential => {a, b, c, d}               |
|                                                 |
|o4 : DGAlgebra                                   |
+-------------------------------------------------+
|i5 : Cdd = toComplex C                           |
|                                                 |
|      1      4      6      4      1              |
|o5 = R  <-- R  <-- R  <-- R  <-- R               |
|                                                 |
|     0      1      2      3      4               |
|                                                 |
|o5 : ChainComplex                                |
+-------------------------------------------------+
|i6 : Cdd.dd                                      |
|                                                 |
|          1                   4                  |
|o6 = 0 : R  <--------------- R  : 1              |
|               | a b c d |                       |
|                                                 |
|          4                                 6    |
|     1 : R  <----------------------------- R  : 2|
|               {1} | -b -c 0  -d 0  0  |         |
|               {1} | a  0  -c 0  -d 0  |         |
|               {1} | 0  a  b  0  0  -d |         |
|               {1} | 0  0  0  a  b  c  |         |
|                                                 |
|          6                           4          |
|     2 : R  <----------------------- R  : 3      |
|               {2} | c  d  0  0  |               |
|               {2} | -b 0  d  0  |               |
|               {2} | a  0  0  d  |               |
|               {2} | 0  -b -c 0  |               |
|               {2} | 0  a  0  -c |               |
|               {2} | 0  0  a  b  |               |
|                                                 |
|          4                  1                   |
|     3 : R  <-------------- R  : 4               |
|               {3} | -d |                        |
|               {3} | c  |                        |
|               {3} | -b |                        |
|               {3} | a  |                        |
|                                                 |
|o6 : ChainComplexMap                             |
+-------------------------------------------------+

Caveat
======

Currently, the tensor product function does not create a block order on the
variables from A and B.

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

  * DGAlgebra ** DGAlgebra -- Tensor product
    of a DGAlgebra and another ring.

DGAlgebra ** Ring -- Tensor product of a DGAlgebra and another ring.
********************************************************************

Synopsis
========

  * Operator: ** (Macaulay2Doc),
  * Usage:
        B = A ** S
  * Inputs:
      * A, an instance of the type DGAlgebra,
      * R, a ring (Macaulay2Doc),
  * Outputs:
      * B, an instance of the type DGAlgebra,

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

Tensor product of a DGAlgebra and another ring (typically a quotient of
A.ring).

+-------------------------------------------------+
|i1 : R = ZZ/101[a,b,c,d]                         |
|                                                 |
|o1 = R                                           |
|                                                 |
|o1 : PolynomialRing                              |
+-------------------------------------------------+
|i2 : A = koszulComplexDGA(R)                     |
|                                                 |
|o2 = {Ring => R                      }           |
|      Underlying algebra => R[T ..T ]            |
|                               1   4             |
|      Differential => {a, b, c, d}               |
|                                                 |
|o2 : DGAlgebra                                   |
+-------------------------------------------------+
|i3 : S = R/ideal{a^3,a*b*c}                      |
|                                                 |
|o3 = S                                           |
|                                                 |
|o3 : QuotientRing                                |
+-------------------------------------------------+
|i4 : B = A ** S                                  |
|                                                 |
|o4 = {Ring => S                      }           |
|      Underlying algebra => S[T ..T ]            |
|                               1   4             |
|      Differential => {a, b, c, d}               |
|                                                 |
|o4 : DGAlgebra                                   |
+-------------------------------------------------+
|i5 : Bdd = toComplex B                           |
|                                                 |
|      1      4      6      4      1              |
|o5 = S  <-- S  <-- S  <-- S  <-- S               |
|                                                 |
|     0      1      2      3      4               |
|                                                 |
|o5 : ChainComplex                                |
+-------------------------------------------------+
|i6 : Bdd.dd                                      |
|                                                 |
|          1                   4                  |
|o6 = 0 : S  <--------------- S  : 1              |
|               | a b c d |                       |
|                                                 |
|          4                                 6    |
|     1 : S  <----------------------------- S  : 2|
|               {1} | -b -c 0  -d 0  0  |         |
|               {1} | a  0  -c 0  -d 0  |         |
|               {1} | 0  a  b  0  0  -d |         |
|               {1} | 0  0  0  a  b  c  |         |
|                                                 |
|          6                           4          |
|     2 : S  <----------------------- S  : 3      |
|               {2} | c  d  0  0  |               |
|               {2} | -b 0  d  0  |               |
|               {2} | a  0  0  d  |               |
|               {2} | 0  -b -c 0  |               |
|               {2} | 0  a  0  -c |               |
|               {2} | 0  0  a  b  |               |
|                                                 |
|          4                  1                   |
|     3 : S  <-------------- S  : 4               |
|               {3} | -d |                        |
|               {3} | c  |                        |
|               {3} | -b |                        |
|               {3} | a  |                        |
|                                                 |
|o6 : ChainComplexMap                             |
+-------------------------------------------------+

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

  * DGAlgebra ** Ring -- Tensor product of a
    DGAlgebra and another ring.

DGAlgebraMap -- The class of all DG Algebra maps
************************************************

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

A common way to create a DGAlgebraMap is via liftToDGMap.

Functions and methods returning an object of class DGAlgebraMap :
=================================================================

  * dgAlgebraMap -- Define a DG algebra map between DG
    algebras.
  * liftToDGMap -- Lift a ring homomorphism in degree zero
    to a DG algebra morphism

Methods that use an object of class DGAlgebraMap :
==================================================

  * "isWellDefined(DGAlgebraMap)" -- see dgAlgebraMap, --
    Define a DG algebra map between DG algebras.
  * HH DGAlgebraMap -- Computes the homomorphism in
    homology associated to a DGAlgebraMap.
  * net(DGAlgebraMap) -- Outputs the pertinent
    information about a DGAlgebraMap
  * source(DGAlgebraMap) -- Outputs the source
    of a DGAlgebraMap
  * target(DGAlgebraMap) -- Outputs the target
    of a DGAlgebraMap
  * "toComplexMap(DGAlgebraMap)" -- see toComplexMap, --
    Construct the ChainComplexMap associated to a DGAlgebraMap
  * "toComplexMap(DGAlgebraMap,ZZ)" -- see toComplexMap, --
    Construct the ChainComplexMap associated to a DGAlgebraMap

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

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

dgAlgebraMap -- Define a DG algebra map between DG algebras.
************************************************************

Synopsis
========

  * Usage:
        phi = dgAlgebraMap(B,A,M)
  * Inputs:
      * A, an instance of the type DGAlgebra, Source
      * B, an instance of the type DGAlgebra, Target
      * M, a matrix (Macaulay2Doc), A matrix representing where
        the generators of A should be mapped to (akin to ringMap)
  * Outputs:
      * phi, an instance of the type DGAlgebraMap,

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

+------------------------------------------------------+
|i1 : R = ZZ/101[a,b,c]/ideal{a^3+b^3+c^3,a*b*c}       |
|                                                      |
|o1 = R                                                |
|                                                      |
|o1 : QuotientRing                                     |
+------------------------------------------------------+
|i2 : K1 = koszulComplexDGA(ideal vars R,Variable=>"Y")|
|                                                      |
|o2 = {Ring => R                      }                |
|      Underlying algebra => R[Y ..Y ]                 |
|                               1   3                  |
|      Differential => {a, b, c}                       |
|                                                      |
|o2 : DGAlgebra                                        |
+------------------------------------------------------+
|i3 : K2 = koszulComplexDGA(ideal {b,c},Variable=>"T") |
|                                                      |
|o3 = {Ring => R                      }                |
|      Underlying algebra => R[T ..T ]                 |
|                               1   2                  |
|      Differential => {b, c}                          |
|                                                      |
|o3 : DGAlgebra                                        |
+------------------------------------------------------+
|i4 : g = dgAlgebraMap(K1,K2,matrix{{Y_2,Y_3}})        |
|                                                      |
|o4 = map (R[Y ..Y ], R[T ..T ], {Y , Y , a, b, c})    |
|             1   3      1   2     2   3               |
|                                                      |
|o4 : DGAlgebraMap                                     |
+------------------------------------------------------+
|i5 : isWellDefined g                                  |
|                                                      |
|o5 = true                                             |
+------------------------------------------------------+

The function does not check that the DG algebra map is well defined, however.

+-----------------------------------------------------+
|i6 : f = dgAlgebraMap(K2,K1,matrix{{0,T_1,T_2}})     |
|                                                     |
|o6 = map (R[T ..T ], R[Y ..Y ], {0, T , T , a, b, c})|
|             1   2      1   3        1   2           |
|                                                     |
|o6 : DGAlgebraMap                                    |
+-----------------------------------------------------+
|i7 : isWellDefined f                                 |
|                                                     |
|o7 = false                                           |
+-----------------------------------------------------+

Ways to use dgAlgebraMap :
==========================

  * "dgAlgebraMap(DGAlgebra,DGAlgebra,Matrix)"

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

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

dgAlgebraMultMap -- Returns the chain map corresponding to multiplication by a cycle.
*************************************************************************************

Synopsis
========

  * Usage:
        phi = dgAlgebraMultMap(A,z)
  * Inputs:
      * A, an instance of the type DGAlgebra,
      * z, a ring element (Macaulay2Doc),
  * Outputs:
      * phi, a chain complex map (Macaulay2Doc),

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

If A is a DGAlgebra, and z is a cycle of A, then left multiplication of A by z
gives a chain map from A to A.  This command converts A to a complex using
toComplex, and constructs a ChainComplexMap (Macaulay2Doc),
that represents left multiplication by z. This
command is used to determine the module structure that is computed in
homologyModule.

+---------------------------------------+
|i1 : R = QQ[x,y,z]/ideal{x^3,y^3,z^3}  |
|                                       |
|o1 = R                                 |
|                                       |
|o1 : QuotientRing                      |
+---------------------------------------+
|i2 : KR = koszulComplexDGA R           |
|                                       |
|o2 = {Ring => R                      } |
|      Underlying algebra => R[T ..T ]  |
|                               1   3   |
|      Differential => {x, y, z}        |
|                                       |
|o2 : DGAlgebra                         |
+---------------------------------------+
|i3 : z1 = x^2*T_1                      |
|                                       |
|      2                                |
|o3 = x T                               |
|        1                              |
|                                       |
|o3 : R[T ..T ]                         |
|        1   3                          |
+---------------------------------------+
|i4 : phi = dgAlgebraMultMap(KR,z1)     |
|                                       |
|          3                  1         |
|o4 = 1 : R  <-------------- R  : 0     |
|               {1} | x2 |              |
|               {1} | 0  |              |
|               {1} | 0  |              |
|                                       |
|          3                       3    |
|     2 : R  <------------------- R  : 1|
|               {2} | 0 x2 0  |         |
|               {2} | 0 0  x2 |         |
|               {2} | 0 0  0  |         |
|                                       |
|          1                      3     |
|     3 : R  <------------------ R  : 2 |
|               {3} | 0 0 x2 |          |
|                                       |
|o4 : ChainComplexMap                   |
+---------------------------------------+

As you can see, the degree of phi is the homological degree of z:

+---------------------------------+
|i5 : degree phi == first degree z|
|                                 |
|o5 = true                        |
+---------------------------------+

Care is also taken to ensure the resulting map is homogeneous if R and z are:

+----------------------+
|i6 : isHomogeneous phi|
|                      |
|o6 = true             |
+----------------------+

One may then view the action of multiplication by the homology class of z upon
taking the induced map in homology:

+-------------------------------------------------+
|i7 : Hphi = prune HH(phi); (Hphi#0,Hphi#1,Hphi#2)|
|                                                 |
|o8 = ({3} | 1 |, {6} | 0 1 0 |, {9} | 0 0 1 |)   |
|      {3} | 0 |  {6} | 0 0 1 |                   |
|      {3} | 0 |  {6} | 0 0 0 |                   |
|                                                 |
|o8 : Sequence                                    |
+-------------------------------------------------+

Ways to use dgAlgebraMultMap :
==============================

  * "dgAlgebraMultMap(DGAlgebra,RingElement)"

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

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

diff(DGAlgebra,RingElement) -- Computes the differential of a ring element in a DGAlgebra
*****************************************************************************************

Synopsis
========

  * Function: diff (Macaulay2Doc),
  * Usage:
        b = diff(A,a)
  * Inputs:
      * A, an instance of the type DGAlgebra,
      * a, a ring element (Macaulay2Doc),
  * Outputs:
      * b, a ring element (Macaulay2Doc),

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

  * diff(DGAlgebra,RingElement), --
    Computes the differential of a ring element in a DGAlgebra

EndDegree -- Option to specify the degree to stop computing killing cycles and acyclic closure
**********************************************************************************************

Synopsis
========

  * Usage:
        killCycles(...,StartDegree=>n)

Functions with optional argument named EndDegree :
==================================================

  * acyclicClosure(...,EndDegree=>...)
    -- Option to specify
    the degree to stop computing the acyclic closure
  * isAcyclic(...,EndDegree=>...)
    -- Option to specify the
    degree to finish checking acyclicity
  * killCycles(...,EndDegree=>...)
    -- Option to specify the
    degree to stop looking for cycles
  * "liftToDGMap(...,EndDegree=>...)" -- see liftToDGMap, --
    Lift a ring homomorphism in degree zero to a DG algebra morphism
  * "toComplexMap(...,EndDegree=>...)" -- see toComplexMap,
    -- Construct the ChainComplexMap associated to a DGAlgebraMap

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

The object EndDegree, is a symbol (Macaulay2Doc).

expandGeomSeries -- Expand a geometric series to a specified degree.
********************************************************************

Synopsis
========

  * Usage:
        pSeries = expandGeomSeries(f,n)
  * Inputs:
      * f, a ring element (Macaulay2Doc), Ratio of the
        geometric series to be expanded.
      * n, an integer (Macaulay2Doc), Degree which to expand the
        geometric series.
  * Outputs:
      * pSeries, a ring element (Macaulay2Doc), Power series
        representation of the geometric series.

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

If the user supplies a list instead of a RingElement as the first argument, the
return value is the product of all the each of the geometric series expanded to
degree n obtained by calling expandGeomSeries on each element of the list.

+-----------------------------------------------------------------------------+
|i1 : A = ZZ[S,T_0,T_1]                                                       |
|                                                                             |
|o1 = A                                                                       |
|                                                                             |
|o1 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i2 : f = expandGeomSeries(S^2*T_0^8,10)                                      |
|                                                                             |
|      10 40    8 32    6 24    4 16    2 8                                   |
|o2 = S  T   + S T   + S T   + S T   + S T  + 1                               |
|         0       0       0       0       0                                   |
|                                                                             |
|o2 : A                                                                       |
+-----------------------------------------------------------------------------+
|i3 : g = expandGeomSeries(S^4*T_1^15,10)                                     |
|                                                                             |
|      8 30    4 15                                                           |
|o3 = S T   + S T   + 1                                                       |
|        1       1                                                            |
|                                                                             |
|o3 : A                                                                       |
+-----------------------------------------------------------------------------+
|i4 : h = expandGeomSeries({S^2*T_0^8,S^4*T_1^15},10)                         |
|                                                                             |
|      10 40    10 24 15    10 8 30    8 32    8 16 15    8 30    6 24        |
|o4 = S  T   + S  T  T   + S  T T   + S T   + S T  T   + S T   + S T   +      |
|         0        0  1        0 1       0       0  1       1       0         |
|     ------------------------------------------------------------------------|
|      6 8 15    4 16    4 15    2 8                                          |
|     S T T   + S T   + S T   + S T  + 1                                      |
|        0 1       0       1       0                                          |
|                                                                             |
|o4 : A                                                                       |
+-----------------------------------------------------------------------------+
|i5 : B = A/(first gens A)^11                                                 |
|                                                                             |
|o5 = B                                                                       |
|                                                                             |
|o5 : QuotientRing                                                            |
+-----------------------------------------------------------------------------+
|i6 : substitute(f*g,B) == h                                                  |
|                                                                             |
|o6 = true                                                                    |
+-----------------------------------------------------------------------------+

Ways to use expandGeomSeries :
==============================

  * "expandGeomSeries(List,ZZ)"
  * "expandGeomSeries(RingElement,ZZ)"

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

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

findTrivialMasseyOperation -- Finds a trivial Massey operation on a set of generators of H(A)
*********************************************************************************************

Synopsis
========

  * Usage:
        tmo = findTrivialMasseyOperation(A)
  * Inputs:
      * A, an instance of the type DGAlgebra,
  * Optional inputs (Macaulay2Doc),:
      * GenDegreeLimit,
        => ..., default value infinity, Option
        to specify the maximum degree to look for generators
      * TMOLimit,
        => ..., default value infinity, Option to specify the maximum
        arity of a trivial Massey operation, if one exists.
  * Outputs:
      * seq, a sequence (Macaulay2Doc), A sequence seq whose
        first entry reports whether a trivial Massey operation has been found,
        and the second entry is a hash table with keys given by monomials in a
        generating set of the positive degree homology of A and values the
        element that bounds the Massey product corresponding to that monomial.

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

This function the element that bounds all potentially nonzero Massey products
(before taking homology class). The maximum degree of a generating cycle is
specified in the option GenDegreeLimit, if needed.

Golod rings are defined by being those rings whose Koszul complex K^R has a
trivial Massey operation. Also, the existence of a trivial Massey operation on
a DG algebra A forces the multiplication on H(A) to be trivial.  An example of
a ring R such that H(K^R) has trivial multiplication, yet K^R does not admit a
trivial Massey operation is unknown.  Such an example cannot be monomially
defined, by a result of Jollenbeck and Berglund.

This is an example of a Golod ring.  It is Golod since it is the
Stanley-Reisner ideal of a flag complex whose 1-skeleton is chordal
[Jollenbeck-Berglund].

+-----------------------------------------------------------------------------+
|i1 : Q = ZZ/101[x_1..x_6]                                                    |
|                                                                             |
|o1 = Q                                                                       |
|                                                                             |
|o1 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i2 : I = ideal (x_3*x_5,x_4*x_5,x_1*x_6,x_3*x_6,x_4*x_6)                     |
|                                                                             |
|o2 = ideal (x x , x x , x x , x x , x x )                                    |
|             3 5   4 5   1 6   3 6   4 6                                     |
|                                                                             |
|o2 : Ideal of Q                                                              |
+-----------------------------------------------------------------------------+
|i3 : R = Q/I                                                                 |
|                                                                             |
|o3 = R                                                                       |
|                                                                             |
|o3 : QuotientRing                                                            |
+-----------------------------------------------------------------------------+
|i4 : A = koszulComplexDGA(R)                                                 |
|                                                                             |
|o4 = {Ring => R                               }                              |
|      Underlying algebra => R[T ..T ]                                        |
|                               1   6                                         |
|      Differential => {x , x , x , x , x , x }                               |
|                        1   2   3   4   5   6                                |
|                                                                             |
|o4 : DGAlgebra                                                               |
+-----------------------------------------------------------------------------+
|i5 : isHomologyAlgebraTrivial(A,GenDegreeLimit=>3)                           |
|                                                                             |
|o5 = true                                                                    |
+-----------------------------------------------------------------------------+
|i6 : cycleList = getGenerators(A)                                            |
|                                                                             |
|o6 = {x T , x T , x T , x T , x T , -x T T , -x T T , -x T T , -x T T , -    |
|       5 4   5 3   6 4   6 3   6 1    5 3 4    6 1 3    6 3 4    6 1 4       |
|     ------------------------------------------------------------------------|
|     x T T  + x T T , - x T T  + x T T , x T T T , x T T T  - x T T T }      |
|      6 4 5    5 4 6     6 3 5    5 3 6   6 1 3 4   6 3 4 5    5 3 4 6       |
|                                                                             |
|o6 : List                                                                    |
+-----------------------------------------------------------------------------+
|i7 : (hasTMO, tmoSoFar) = findTrivialMasseyOperation(A)                      |
|                                                                             |
|o7 = (true, HashTable{{0, 1} => -x T T T         })                          |
|                                  5 3 4 5                                    |
|                      {0, 3, 4} => x T T T T T                               |
|                                    6 1 3 4 5 6                              |
|                      {0, 3} => -x T T T                                     |
|                                  6 3 4 5                                    |
|                      {0, 4, 3} => -x T T T T T                              |
|                                     6 1 3 4 5 6                             |
|                      {0, 4} => -x T T T                                     |
|                                  6 1 4 5                                    |
|                      {0, 6} => x T T T T                                    |
|                                 6 1 3 4 5                                   |
|                      {0, 10} => -x T T T T                                  |
|                                   5 3 4 5 6                                 |
|                      {0} => x T                                             |
|                              5 4                                            |
|                      {1, 0} => x T T T                                      |
|                                 5 3 4 5                                     |
|                      {1, 2, 4} => -x T T T T T                              |
|                                     6 1 3 4 5 6                             |
|                      {1, 2} => x T T T                                      |
|                                 6 3 4 5                                     |
|                      {1, 4, 2} => x T T T T T                               |
|                                    6 1 3 4 5 6                              |
|                      {1, 4} => -x T T T                                     |
|                                  6 1 3 5                                    |
|                      {1, 8} => -x T T T T                                   |
|                                  6 1 3 4 5                                  |
|                      {1, 9} => x T T T T                                    |
|                                 5 3 4 5 6                                   |
|                      {1} => x T                                             |
|                              5 3                                            |
|                      {2, 1} => -x T T T                                     |
|                                  6 3 4 5                                    |
|                      {2, 3} => -x T T T                                     |
|                                  6 3 4 6                                    |
|                      {2, 4, 1} => x T T T T T                               |
|                                    6 1 3 4 5 6                              |
|                      {2, 4} => -x T T T                                     |
|                                  6 1 4 6                                    |
|                      {2, 6} => x T T T T                                    |
|                                 6 1 3 4 6                                   |
|                      {2, 10} => -x T T T T                                  |
|                                   6 3 4 5 6                                 |
|                      {2} => x T                                             |
|                              6 4                                            |
|                      {3, 0} => x T T T                                      |
|                                 6 3 4 5                                     |
|                      {3, 2} => x T T T                                      |
|                                 6 3 4 6                                     |
|                      {3, 4, 0} => -x T T T T T                              |
|                                     6 1 3 4 5 6                             |
|                      {3, 4} => -x T T T                                     |
|                                  6 1 3 6                                    |
|                      {3, 8} => -x T T T T                                   |
|                                  6 1 3 4 6                                  |
|                      {3, 9} => x T T T T                                    |
|                                 6 3 4 5 6                                   |
|                      {3} => x T                                             |
|                              6 3                                            |
|                      {4, 0} => x T T T                                      |
|                                 6 1 4 5                                     |
|                      {4, 1} => x T T T                                      |
|                                 6 1 3 5                                     |
|                      {4, 2, 1} => -x T T T T T                              |
|                                     6 1 3 4 5 6                             |
|                      {4, 2} => x T T T                                      |
|                                 6 1 4 6                                     |
|                      {4, 3, 0} => x T T T T T                               |
|                                    6 1 3 4 5 6                              |
|                      {4, 3} => x T T T                                      |
|                                 6 1 3 6                                     |
|                      {4, 5} => x T T T T                                    |
|                                 6 1 3 4 5                                   |
|                      {4, 7} => x T T T T                                    |
|                                 6 1 3 4 6                                   |
|                      {4, 9} => x T T T T                                    |
|                                 6 1 4 5 6                                   |
|                      {4, 10} => x T T T T                                   |
|                                  6 1 3 5 6                                  |
|                      {4, 12} => x T T T T T                                 |
|                                  6 1 3 4 5 6                                |
|                      {4} => x T                                             |
|                              6 1                                            |
|                      {5, 4} => -x T T T T                                   |
|                                  6 1 3 4 5                                  |
|                      {5} => -x T T                                          |
|                               5 3 4                                         |
|                      {6, 0} => -x T T T T                                   |
|                                  6 1 3 4 5                                  |
|                      {6, 2} => -x T T T T                                   |
|                                  6 1 3 4 6                                  |
|                      {6, 9} => -x T T T T T                                 |
|                                  6 1 3 4 5 6                                |
|                      {6} => -x T T                                          |
|                               6 1 3                                         |
|                      {7, 4} => -x T T T T                                   |
|                                  6 1 3 4 6                                  |
|                      {7} => -x T T                                          |
|                               6 3 4                                         |
|                      {8, 1} => x T T T T                                    |
|                                 6 1 3 4 5                                   |
|                      {8, 3} => x T T T T                                    |
|                                 6 1 3 4 6                                   |
|                      {8, 10} => x T T T T T                                 |
|                                  6 1 3 4 5 6                                |
|                      {8} => -x T T                                          |
|                               6 1 4                                         |
|                      {9, 1} => -x T T T T                                   |
|                                  5 3 4 5 6                                  |
|                      {9, 3} => -x T T T T                                   |
|                                  6 3 4 5 6                                  |
|                      {9, 4} => -x T T T T                                   |
|                                  6 1 4 5 6                                  |
|                      {9, 6} => -x T T T T T                                 |
|                                  6 1 3 4 5 6                                |
|                      {9} => - x T T  + x T T                                |
|                                6 4 5    5 4 6                               |
|                      {10, 0} => x T T T T                                   |
|                                  5 3 4 5 6                                  |
|                      {10, 2} => x T T T T                                   |
|                                  6 3 4 5 6                                  |
|                      {10, 4} => -x T T T T                                  |
|                                   6 1 3 5 6                                 |
|                      {10, 8} => x T T T T T                                 |
|                                  6 1 3 4 5 6                                |
|                      {10} => - x T T  + x T T                               |
|                                 6 3 5    5 3 6                              |
|                      {11} => x T T T                                        |
|                               6 1 3 4                                       |
|                      {12, 4} => -x T T T T T                                |
|                                   6 1 3 4 5 6                               |
|                      {12} => x T T T  - x T T T                             |
|                               6 3 4 5    5 3 4 6                            |
|                                                                             |
|o7 : Sequence                                                                |
+-----------------------------------------------------------------------------+
|i8 : assert(hasTMO)                                                          |
+-----------------------------------------------------------------------------+

Below is an example of a Teter ring (Artinian Gorenstein ring modulo its
socle), and the computation in Avramov and Levin's paper shows that H(A) does
not have trivial multiplication, hence no trivial Massey operation can exist.

+-----------------------------------------------------------------------------+
|i9 : Q = ZZ/101[x,y,z]                                                       |
|                                                                             |
|o9 = Q                                                                       |
|                                                                             |
|o9 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i10 : I = ideal (x^3,y^3,z^3,x^2*y^2*z^2)                                    |
|                                                                             |
|              3   3   3   2 2 2                                              |
|o10 = ideal (x , y , z , x y z )                                             |
|                                                                             |
|o10 : Ideal of Q                                                             |
+-----------------------------------------------------------------------------+
|i11 : R = Q/I                                                                |
|                                                                             |
|o11 = R                                                                      |
|                                                                             |
|o11 : QuotientRing                                                           |
+-----------------------------------------------------------------------------+
|i12 : A = koszulComplexDGA(R)                                                |
|                                                                             |
|o12 = {Ring => R                      }                                      |
|       Underlying algebra => R[T ..T ]                                       |
|                                1   3                                        |
|       Differential => {x, y, z}                                             |
|                                                                             |
|o12 : DGAlgebra                                                              |
+-----------------------------------------------------------------------------+
|i13 : isHomologyAlgebraTrivial(A)                                            |
|                                                                             |
|o13 = false                                                                  |
+-----------------------------------------------------------------------------+
|i14 : cycleList = getGenerators(A)                                           |
|                                                                             |
|        2     2     2       2 2       2 2       2   2         2 2            |
|o14 = {x T , y T , z T , x*y z T , x*y z T T , x y*z T T , x*y z T T ,       |
|          1     2     3         1         1 2         1 2         1 3        |
|      -----------------------------------------------------------------------|
|         2 2         2   2         2 2                                       |
|      x*y z T T T , x y*z T T T , x y z*T T T }                              |
|             1 2 3         1 2 3         1 2 3                               |
|                                                                             |
|o14 : List                                                                   |
+-----------------------------------------------------------------------------+
|i15 : assert(not first findTrivialMasseyOperation(A))                        |
+-----------------------------------------------------------------------------+

The related function findNaryTrivialMasseyOperation,
find only the nth order trivial Massey operations.

Ways to use findTrivialMasseyOperation :
========================================

  * "findTrivialMasseyOperation(DGAlgebra)"

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

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

findTrivialMasseyOperation(...,GenDegreeLimit=>...) -- Option to specify the maximum degree to look for generators
******************************************************************************************************************

Synopsis
========

  * Usage:
        findTrivialMasseyOperation(...,GenDegreeLimit=>n)

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

  * Default value: infinity (Macaulay2Doc),
  * Function: findTrivialMasseyOperation, --
    Finds a trivial Massey operation on a set of generators of H(A)
  * Option key: GenDegreeLimit, -- Option to specify the
    maximum degree to look for generators

Functions with optional argument named GenDegreeLimit :
=======================================================

  * findTrivialMasseyOperation(...,GenDegreeLimit=>...),
    --
    Option to specify the maximum degree to look for generators
  * homologyAlgebra(...,GenDegreeLimit=>...)
    -- Option to
    specify the maximum degree to look for generators
  * isGolodHomomorphism(...,GenDegreeLimit=>...)
    -- Option
    to specify the maximum degree to look for generators
  * isHomologyAlgebraTrivial(...,GenDegreeLimit=>...),
    --
    Option to specify the maximum degree to look for generators
  * torAlgebra(...,GenDegreeLimit=>...)
    -- Option to specify
    the maximum degree to look for generators
  * "torMap(...,GenDegreeLimit=>...)" -- see torMap, -- Compute
    the map of Tor algebras associated to a RingMap.

findTrivialMasseyOperation(...,TMOLimit=>...) -- Option to specify the maximum arity of a trivial Massey operation, if one exists.
**********************************************************************************************************************************

Synopsis
========

  * Usage:
        findTrivialMasseyOperation(...,TMOLimit=>n)

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

  * Default value: infinity (Macaulay2Doc),
  * Function: findTrivialMasseyOperation, --
    Finds a trivial Massey operation on a set of generators of H(A)
  * Option key: TMOLimit, -- Option to specify the maximum
    arity of the trivial Massey operation

Functions with optional argument named TMOLimit :
=================================================

  * findTrivialMasseyOperation(...,TMOLimit=>...)
    -- Option
    to specify the maximum arity of a trivial Massey operation, if one exists.
  * isGolodHomomorphism(...,TMOLimit=>...)
    -- Option to
    specify the maximum degree to look for generators when computing the
    deviations

freeDGAlgebra -- Constructs a DGAlgebra
***************************************

Synopsis
========

  * Usage:
        A = freeDGAlgebra(R,degreeList)
  * Inputs:
      * R, a ring (Macaulay2Doc), The ring over which the DGAlgebra
        is defined
      * degreeList, a list (Macaulay2Doc), A list of degrees of the
        algebra generators of R.
  * Optional inputs (Macaulay2Doc),:
      * Variable => ..., default value "T"
  * Outputs:
      * A, an instance of the type DGAlgebra,

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

This function returns a DGAlgebra, A whose underlying algebra
is a graded commutative polynomial ring in a number of variables equal to the
number of the degrees input.  The current version of this package does not
handle algebras A whose underlying algebra is not a polynomial ring.

+----------------------------------------------------------+
|i1 : R = ZZ/101[x,y,z]                                    |
|                                                          |
|o1 = R                                                    |
|                                                          |
|o1 : PolynomialRing                                       |
+----------------------------------------------------------+
|i2 : A = freeDGAlgebra(R,{{1},{1},{1},{3}})               |
|                                                          |
|o2 = {Ring => R                      }                    |
|      Underlying algebra => R[T ..T ]                     |
|                               1   4                      |
|      Differential => null                                |
|                                                          |
|o2 : DGAlgebra                                            |
+----------------------------------------------------------+
|i3 : A.natural                                            |
|                                                          |
|o3 = R[T ..T ]                                            |
|        1   4                                             |
|                                                          |
|o3 : PolynomialRing, 4 skew commutative variables         |
+----------------------------------------------------------+
|i4 : setDiff(A,{x,y,z,x*T_2*T_3-y*T_1*T_3+z*T_1*T_2})     |
|                                                          |
|o4 = {Ring => R                                          }|
|      Underlying algebra => R[T ..T ]                     |
|                               1   4                      |
|      Differential => {x, y, z, z*T T  - y*T T  + x*T T } |
|                                   1 2      1 3      2 3  |
|                                                          |
|o4 : DGAlgebra                                            |
+----------------------------------------------------------+

The resulting DGAlgebra, will not be graded since the
differential given does not respect the grading due to the degrees assigned in
the definition.

+----------------------------------------------------------+
|i5 : isHomogeneous(A)                                     |
|                                                          |
|o5 = false                                                |
+----------------------------------------------------------+
|i6 : Add = toComplex A                                    |
|                                                          |
|      1      3      3      2      3      3      1         |
|o6 = R  <-- R  <-- R  <-- R  <-- R  <-- R  <-- R          |
|                                                          |
|     0      1      2      3      4      5      6          |
|                                                          |
|o6 : ChainComplex                                         |
+----------------------------------------------------------+
|i7 : B = freeDGAlgebra(R,{{1,1},{1,1},{1,1},{3,3}})       |
|                                                          |
|o7 = {Ring => R                      }                    |
|      Underlying algebra => R[T ..T ]                     |
|                               1   4                      |
|      Differential => null                                |
|                                                          |
|o7 : DGAlgebra                                            |
+----------------------------------------------------------+
|i8 : B.natural                                            |
|                                                          |
|o8 = R[T ..T ]                                            |
|        1   4                                             |
|                                                          |
|o8 : PolynomialRing, 4 skew commutative variables         |
+----------------------------------------------------------+
|i9 : setDiff(B,{x,y,z,x*T_2*T_3-y*T_1*T_3+z*T_1*T_2})     |
|                                                          |
|o9 = {Ring => R                                          }|
|      Underlying algebra => R[T ..T ]                     |
|                               1   4                      |
|      Differential => {x, y, z, z*T T  - y*T T  + x*T T } |
|                                   1 2      1 3      2 3  |
|                                                          |
|o9 : DGAlgebra                                            |
+----------------------------------------------------------+

The result of the above declaration will be graded.

+--------------------------------------------------+
|i10 : isHomogeneous(B)                            |
|                                                  |
|o10 = true                                        |
+--------------------------------------------------+
|i11 : Bdd = toComplex B                           |
|                                                  |
|       1      3      3      2      3      3      1|
|o11 = R  <-- R  <-- R  <-- R  <-- R  <-- R  <-- R |
|                                                  |
|      0      1      2      3      4      5      6 |
|                                                  |
|o11 : ChainComplex                                |
+--------------------------------------------------+

Note that the differential is not passed into the constructor.  The reason for
this (at the moment) is that Macaulay2 does not know what ring the
differentials are defined over until after the underlying algebra is
constructed, so the differential is set later with setDiff.  Many DG algebras
that one encounters in commutative algebra have been implemented, however, and
do not need to be defined 'by hand'. For example, if one wants to work with the
Koszul complex as a DG algebra, then one should see the command
koszulComplexDGA. Also, if one wishes to specify the name of
the variables used, specify the Variable option; see the example in
dgAlgebraMap.

Caveat
======

There is currently a bug handling DG algebras that have no monomials in some
degree, but some monomials in a later degree; for example if one replaces the 3
in the above example with a 5.

Ways to use freeDGAlgebra :
===========================

  * "freeDGAlgebra(Ring,List)"

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

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

GenDegreeLimit -- Option to specify the maximum degree to look for generators
*****************************************************************************

Synopsis
========

  * Usage:
        homologyAlgebra(...,GenDegreeLimit=>n)

Functions with optional argument named GenDegreeLimit :
=======================================================

  * findTrivialMasseyOperation(...,GenDegreeLimit=>...),
    --
    Option to specify the maximum degree to look for generators
  * homologyAlgebra(...,GenDegreeLimit=>...)
    -- Option to
    specify the maximum degree to look for generators
  * isGolodHomomorphism(...,GenDegreeLimit=>...)
    -- Option
    to specify the maximum degree to look for generators
  * isHomologyAlgebraTrivial(...,GenDegreeLimit=>...),
    --
    Option to specify the maximum degree to look for generators
  * torAlgebra(...,GenDegreeLimit=>...)
    -- Option to specify
    the maximum degree to look for generators
  * "torMap(...,GenDegreeLimit=>...)" -- see torMap, -- Compute
    the map of Tor algebras associated to a RingMap.

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

The object GenDegreeLimit, is a symbol (Macaulay2Doc).

getBasis -- Get a basis for a particular homological degree of a DG algebra.
****************************************************************************

Synopsis
========

  * Usage:
        M = getBasis(n,A)
  * Inputs:
      * n, an integer (Macaulay2Doc),
      * A, an instance of the type DGAlgebra,
  * Optional inputs (Macaulay2Doc),:
      * Limit, => ...,
        default value -1, Option to specify the maximum number of basis
        elements to return
  * Outputs:
      * M, a matrix (Macaulay2Doc), The basis of the desired
        homological degree of the DG Algebra.

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

This function is to allow for the retrieval of a basis of a particular
homological degree of a DGAlgebra, when the underlying algebra
A.natural is multigraded.  In the code, the homological grading is always the
first integer in the degree tuple, and so this function returns a matrix
consisting of all monomials in homological degree n.

+------------------------------------------------+
|i1 : R = ZZ/101[a..d, Degrees=>{1,1,1,2}]       |
|                                                |
|o1 = R                                          |
|                                                |
|o1 : PolynomialRing                             |
+------------------------------------------------+
|i2 : A =  koszulComplexDGA(R)                   |
|                                                |
|o2 = {Ring => R                      }          |
|      Underlying algebra => R[T ..T ]           |
|                               1   4            |
|      Differential => {a, b, c, d}              |
|                                                |
|o2 : DGAlgebra                                  |
+------------------------------------------------+
|i3 : getBasis(3,A)                              |
|                                                |
|o3 = | T_1T_2T_3 T_1T_2T_4 T_1T_3T_4 T_2T_3T_4 ||
|                                                |
|                       1                 4      |
|o3 : Matrix (R[T ..T ])  <--- (R[T ..T ])       |
|                1   4             1   4         |
+------------------------------------------------+

Ways to use getBasis :
======================

  * "getBasis(ZZ,DGAlgebra)"
  * getBasis(ZZ,Ring) -- Get a basis for a
    degree of a ring.

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

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

getBasis(...,Limit=>...) -- Option to specify the maximum number of basis elements to return
********************************************************************************************

Synopsis
========

  * Usage:
        getBasis(...,Limit=>n)

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

  * Default value: -1
  * Function: getBasis, -- Get a basis for a particular
    homological degree of a DG algebra.
  * Option key: Limit (Macaulay2Doc), -- an optional argument

Functions with optional argument named Limit :
==============================================

  * "basis(...,Limit=>...)" -- see basis (Macaulay2Doc), -- basis
    or generating set of all or part of a ring, ideal or module
  * getBasis(...,Limit=>...),
    -- Option to specify the maximum number of basis elements to return
  * hermite(...,Limit=>...) (missing documentation)
  * icFracP(...,Limit=>...) (IntegralClosure)
    -- Limits the
    number of computed intermediate modules.
  * "independentSets(...,Limit=>...)" -- see independentSets (Macaulay2Doc),
    -- some size-maximal independent subsets of
    variables modulo an ideal
  * integralClosure(...,Limit=>...) (IntegralClosure)
    -- do a
    partial integral closure
  * kernelLLL(...,Limit=>...) (missing documentation)
  * LLL(...,Limit=>...) (missing documentation)
  * "minors(...,Limit=>...)" -- see minors(ZZ,Matrix) (Macaulay2Doc),
    -- ideal generated by minors
  * "oeis(...,Limit=>...)" -- see oeis (OnlineLookup), -- OEIS
    lookup
  * "simpleDocFrob(...,Limit=>...)" -- see simpleDocFrob (SimpleDoc),
    -- a sample documentation node

getBasis(ZZ,Ring) -- Get a basis for a degree of a ring.
********************************************************

Synopsis
========

  * Function: getBasis,
  * Usage:
        M = getBasis(n,R)
  * Inputs:
      * n, an integer (Macaulay2Doc),
      * R, a ring (Macaulay2Doc),
  * Optional inputs (Macaulay2Doc),:
      * Limit, => ...,
        default value -1, Option to specify the maximum number of basis
        elements to return
  * Outputs:
      * M, a matrix (Macaulay2Doc), The basis of the desired
        degree

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

This function was not meant for general use, but it fixes the first degree in
the degree tuple of the ring R, and finds a basis of that 'slice' of the ring.
It does this by using a cached version of the ring that forgets all other
degrees.  A Ring object in Macaulay2 will not have this cached ring by default,
but the rings used internally in the DGAlgebras package will.

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

  * getBasis(ZZ,Ring) -- Get a basis for a
    degree of a ring.

getBoundaryPreimage -- Attempt to find a preimage of a boundary under the differential of a DGAlgebra.
******************************************************************************************************

Synopsis
========

  * Usage:
        (lifted,myLift) = getBoundaryPreimage(A,z)
  * Inputs:
      * A, an instance of the type DGAlgebra,
      * z, a ring element (Macaulay2Doc),
  * Outputs:
      * seq, a sequence (Macaulay2Doc),

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

The first element in the return value is a boolean value indicating whether the
lift was possible.  If true, the second coordinate of the return value is the
lift. If false, then the second coordinate of the return value is the reduction
of the input modulo the image.

+-----------------------------------------------------------------------------+
|i1 : Q = QQ[x_1,x_2,y_1,y_2,z]                                               |
|                                                                             |
|o1 = Q                                                                       |
|                                                                             |
|o1 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i2 : I = ideal (x_1*x_2^2,y_1*y_2^2,z^3,x_1*x_2*y_1*y_2,y_2^2*z^2,x_2^2*z^2,x|
|                                                                             |
|               2     2   3             2 2   2 2          2 2                |
|o2 = ideal (x x , y y , z , x x y y , y z , x z , x y z, x y z)              |
|             1 2   1 2       1 2 1 2   2     2     1 1    2 2                |
|                                                                             |
|o2 : Ideal of Q                                                              |
|-----------------------------------------------------------------------------|
|_1*y_1*z,x_2^2*y_2^2*z)                                                      |
+-----------------------------------------------------------------------------+
|i3 : R = Q/I                                                                 |
|                                                                             |
|o3 = R                                                                       |
|                                                                             |
|o3 : QuotientRing                                                            |
+-----------------------------------------------------------------------------+
|i4 : KR = koszulComplexDGA R                                                 |
|                                                                             |
|o4 = {Ring => R                          }                                   |
|      Underlying algebra => R[T ..T ]                                        |
|                               1   5                                         |
|      Differential => {x , x , y , y , z}                                    |
|                        1   2   1   2                                        |
|                                                                             |
|o4 : DGAlgebra                                                               |
+-----------------------------------------------------------------------------+

The following are cycles:

+------------------------------------------+
|i5 : z1 = z^2*T_5                         |
|                                          |
|      2                                   |
|o5 = z T                                  |
|        5                                 |
|                                          |
|o5 : R[T ..T ]                            |
|        1   5                             |
+------------------------------------------+
|i6 : z2 = y_2^2*T_3                       |
|                                          |
|      2                                   |
|o6 = y T                                  |
|      2 3                                 |
|                                          |
|o6 : R[T ..T ]                            |
|        1   5                             |
+------------------------------------------+
|i7 : z3 = x_2^2*T_1                       |
|                                          |
|      2                                   |
|o7 = x T                                  |
|      2 1                                 |
|                                          |
|o7 : R[T ..T ]                            |
|        1   5                             |
+------------------------------------------+
|i8 : {diff(KR,z1),diff(KR,z1),diff(KR,z1)}|
|                                          |
|o8 = {0, 0, 0}                            |
|                                          |
|o8 : List                                 |
+------------------------------------------+

and z1*z2, z2*z3 vanish in homology:

+-------------------------------------------------------+
|i9 : (lifted12,lift12) = getBoundaryPreimage(KR,z1*z2) |
|                                                       |
|o9 = (true, 0)                                         |
|                                                       |
|o9 : Sequence                                          |
+-------------------------------------------------------+
|i10 : (lifted23,lift23) = getBoundaryPreimage(KR,z2*z3)|
|                                                       |
|                2                                      |
|o10 = (true, x y T T T  - x x y T T T )                |
|              2 2 1 2 3    1 2 2 2 3 4                 |
|                                                       |
|o10 : Sequence                                         |
+-------------------------------------------------------+

We can check that the differential of the lift is the supposed boundary:

+------------------------------+
|i11 : diff(KR,lift23) == z2*z3|
|                              |
|o11 = true                    |
+------------------------------+

Ways to use getBoundaryPreimage :
=================================

  * "getBoundaryPreimage(DGAlgebra,List)"
  * "getBoundaryPreimage(DGAlgebra,RingElement)"

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

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

getDegNModule -- Compute a presentation of M_i as an R-module
*************************************************************

Synopsis
========

  * Usage:
        M' = getDegNModule(N,R,M)
        M' = getDegNModule(N,R,A)
  * Inputs:
      * N, an integer (Macaulay2Doc),
      * R, a ring (Macaulay2Doc),
      * M, a module (Macaulay2Doc), M is a Module over a ring A,
        and A must be a graded R-algebra with A_0 = R
      * A, a ring (Macaulay2Doc), A must be a graded R-algebra, and
        A_0 = R
  * Outputs:
      * M', a module (Macaulay2Doc), M_N as an R = A_0-module

Ways to use getDegNModule :
===========================

  * "getDegNModule(ZZ,Ring,Ring)"

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

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

getGenerators -- Returns a list of cycles whose images generate HH(A) as an algebra
***********************************************************************************

Synopsis
========

  * Usage:
        cycleList = getGenerators(A)
  * Inputs:
      * A, an instance of the type DGAlgebra,
  * Optional inputs (Macaulay2Doc),:
      * DegreeLimit,
        => ..., default value -1, Option to specify the degree to stop
        finding generators of HH(DGAlgebra)
      * StartDegree,
        => ..., default value 1, Option to specify the degree to start
        finding generators of HH(DGAlgebra)
      * Verbosity,
        => ..., default value 0, Option to specify the maximum degree to look
        for generators when computing the deviations
  * Outputs:
      * cycleList, a list (Macaulay2Doc),

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

This version of the function should only be used if all algebra generators of A
are in odd homological degree, provided in the EndDegree option.

+-----------------------------------------------------+
|i1 : R = ZZ/101[a,b,c]/ideal{a^3,b^3,c^3,a^2*b^2*c^2}|
|                                                     |
|o1 = R                                               |
|                                                     |
|o1 : QuotientRing                                    |
+-----------------------------------------------------+
|i2 : A = koszulComplexDGA(R)                         |
|                                                     |
|o2 = {Ring => R                      }               |
|      Underlying algebra => R[T ..T ]                |
|                               1   3                 |
|      Differential => {a, b, c}                      |
|                                                     |
|o2 : DGAlgebra                                       |
+-----------------------------------------------------+
|i3 : netList getGenerators(A)                        |
|                                                     |
|     +------------+                                  |
|     | 2          |                                  |
|o3 = |a T         |                                  |
|     |   1        |                                  |
|     +------------+                                  |
|     | 2          |                                  |
|     |b T         |                                  |
|     |   2        |                                  |
|     +------------+                                  |
|     | 2          |                                  |
|     |c T         |                                  |
|     |   3        |                                  |
|     +------------+                                  |
|     |   2 2      |                                  |
|     |a*b c T     |                                  |
|     |       1    |                                  |
|     +------------+                                  |
|     |   2 2      |                                  |
|     |a*b c T T   |                                  |
|     |       1 2  |                                  |
|     +------------+                                  |
|     | 2   2      |                                  |
|     |a b*c T T   |                                  |
|     |       1 2  |                                  |
|     +------------+                                  |
|     |   2 2      |                                  |
|     |a*b c T T   |                                  |
|     |       1 3  |                                  |
|     +------------+                                  |
|     |   2 2      |                                  |
|     |a*b c T T T |                                  |
|     |       1 2 3|                                  |
|     +------------+                                  |
|     | 2   2      |                                  |
|     |a b*c T T T |                                  |
|     |       1 2 3|                                  |
|     +------------+                                  |
|     | 2 2        |                                  |
|     |a b c*T T T |                                  |
|     |       1 2 3|                                  |
|     +------------+                                  |
+-----------------------------------------------------+

Ways to use getGenerators :
===========================

  * "getGenerators(DGAlgebra)"

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

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

getGenerators(...,DegreeLimit=>...) -- Option to specify the degree to stop finding generators of HH(DGAlgebra)
***************************************************************************************************************

Synopsis
========

  * Usage:
        getGenerators(...,DegreeLimit=>n)

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

  * Default value: -1
  * Function: getGenerators, -- Returns a list of cycles
    whose images generate HH(A) as an algebra
  * Option key: DegreeLimit (Macaulay2Doc), -- an optional
    argument

Functions with optional argument named DegreeLimit :
====================================================

  * deviations(...,DegreeLimit=>...)
    -- Option to specify
    the maximum degree to look for generators when computing the deviations
  * "deviationsToPoincare(...,DegreeLimit=>...)" -- see
    deviationsToPoincare, -- Computes the power series
    corresponding to a set of deviations.
  * "gb(...,DegreeLimit=>...)" -- see gb (Macaulay2Doc), -- compute a
    Gröbner basis
  * getGenerators(...,DegreeLimit=>...)
    -- Option to specify
    the degree to stop finding generators of HH(DGAlgebra)
  * "intersectInP(...,DegreeLimit=>...)" -- see
    intersectInP(...,BasisElementLimit=>...) (ReesAlgebra),
    --
    Option for intersectInP
  * "minimalBetti(...,DegreeLimit=>...)" -- see minimalBetti (Macaulay2Doc),
    -- minimal betti numbers of (the mininimal free
    resolution of) a homogeneous ideal or module
  * "pushForward(...,DegreeLimit=>...)" -- see
    pushForward(RingMap,Module) (Macaulay2Doc),
  * quotient(...,DegreeLimit=>...) (Saturation)
  * "saturate(...,DegreeLimit=>...)" -- see
    quotient(...,DegreeLimit=>...) (Saturation),
  * "analyticSpread(...,DegreeLimit=>...)" -- see
    reesIdeal(...,DegreeLimit=>...) (ReesAlgebra),
    -- Bound
    the degrees considered in the saturation step. Defaults to infinity
  * "distinguished(...,DegreeLimit=>...)" -- see
    reesIdeal(...,DegreeLimit=>...) (ReesAlgebra),
    -- Bound
    the degrees considered in the saturation step. Defaults to infinity
  * "isLinearType(...,DegreeLimit=>...)" -- see
    reesIdeal(...,DegreeLimit=>...) (ReesAlgebra),
    -- Bound
    the degrees considered in the saturation step. Defaults to infinity
  * "isReduction(...,DegreeLimit=>...)" -- see
    reesIdeal(...,DegreeLimit=>...) (ReesAlgebra),
    -- Bound
    the degrees considered in the saturation step. Defaults to infinity
  * "minimalReduction(...,DegreeLimit=>...)" -- see
    reesIdeal(...,DegreeLimit=>...) (ReesAlgebra),
    -- Bound
    the degrees considered in the saturation step. Defaults to infinity
  * "multiplicity(...,DegreeLimit=>...)" -- see
    reesIdeal(...,DegreeLimit=>...) (ReesAlgebra),
    -- Bound
    the degrees considered in the saturation step. Defaults to infinity
  * "normalCone(...,DegreeLimit=>...)" -- see
    reesIdeal(...,DegreeLimit=>...) (ReesAlgebra),
    -- Bound
    the degrees considered in the saturation step. Defaults to infinity
  * "reesAlgebra(...,DegreeLimit=>...)" -- see
    reesIdeal(...,DegreeLimit=>...) (ReesAlgebra),
    -- Bound
    the degrees considered in the saturation step. Defaults to infinity
  * reesIdeal(...,DegreeLimit=>...) (ReesAlgebra)
    -- Bound
    the degrees considered in the saturation step. Defaults to infinity
  * "specialFiber(...,DegreeLimit=>...)" -- see
    reesIdeal(...,DegreeLimit=>...) (ReesAlgebra),
    -- Bound
    the degrees considered in the saturation step. Defaults to infinity
  * "specialFiberIdeal(...,DegreeLimit=>...)" -- see
    reesIdeal(...,DegreeLimit=>...) (ReesAlgebra),
    -- Bound
    the degrees considered in the saturation step. Defaults to infinity
  * resolution(...,DegreeLimit=>...) (Macaulay2Doc),
    --
    compute only up to this degree
  * "syz(...,DegreeLimit=>...)" -- see syz(Matrix) (Macaulay2Doc),
    -- compute the syzygy matrix

getGenerators(...,StartDegree=>...) -- Option to specify the degree to start finding generators of HH(DGAlgebra)
****************************************************************************************************************

Synopsis
========

  * Usage:
        getGenerators(...,StartDegree=>n)

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

  * Default value: 1
  * Function: getGenerators, -- Returns a list of cycles
    whose images generate HH(A) as an algebra
  * Option key: StartDegree, -- Option to specify the degree
    to start computing the acyclic closure and killing cycles

Functions with optional argument named StartDegree :
====================================================

  * acyclicClosure(...,StartDegree=>...)
    -- Option to
    specify the degree to start computing the acyclic closure
  * getGenerators(...,StartDegree=>...)
    -- Option to specify
    the degree to start finding generators of HH(DGAlgebra)
  * killCycles(...,StartDegree=>...)
    -- Option to specify
    the degree to start looking for cycles

getGenerators(...,Verbosity=>...) -- Option to specify the maximum degree to look for generators when computing the deviations
******************************************************************************************************************************

Synopsis
========

  * Usage:
        getGenerators(...,Verbosity=>n)

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

  * Default value: 0
  * Function: getGenerators, -- Returns a list of cycles
    whose images generate HH(A) as an algebra
  * Option key: Verbosity (Macaulay2Doc), -- an optional
    argument

Functions with optional argument named Verbosity :
==================================================

  * getGenerators(...,Verbosity=>...)
    -- Option to specify
    the maximum degree to look for generators when computing the deviations
  * homologyAlgebra(...,Verbosity=>...)
    -- Option to specify
    the maximum degree to look for generators when computing the deviations
  * icFracP(...,Verbosity=>...) (IntegralClosure)
    -- Prints
    out the conductor element and the number of intermediate modules it
    computed.
  * "idealizer(...,Verbosity=>...)" -- see idealizer (IntegralClosure),
    -- compute Hom(I,I) as a quotient ring
  * integralClosure(...,Verbosity=>...) (IntegralClosure),
    --
    display a certain amount of detail about the computation
  * "isPrime(Ideal,Verbosity=>...)" -- see isPrime(Ideal) (MinimalPrimes),
    -- whether an ideal is prime
  * "makeS2(...,Verbosity=>...)" -- see makeS2 (IntegralClosure),
    -- compute the S2ification of a reduced ring
  * "decompose(Ideal,Verbosity=>...)" -- see minimalPrimes (MinimalPrimes),
    -- minimal primes of an ideal
  * "minimalPrimes(...,Verbosity=>...)" -- see minimalPrimes (MinimalPrimes),
    -- minimal primes of an ideal
  * "ringFromFractions(...,Verbosity=>...)" -- see ringFromFractions (IntegralClosure),
    -- find presentation for f.g. ring

HH DGAlgebra -- Compute the homology algebra of a DGAlgebra.
************************************************************

Synopsis
========

  * Function: homology (Macaulay2Doc),
  * Usage:
        HA = homology(A)
  * Inputs:
      * A, an instance of the type DGAlgebra,
  * Outputs:
      * HA, a ring (Macaulay2Doc),

See also
========

  * homologyAlgebra(DGAlgebra) -- Compute the homology
    algebra of a DGAlgebra.

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

  * HH DGAlgebra -- Compute the homology algebra of a
    DGAlgebra.

HH DGAlgebraMap -- Computes the homomorphism in homology associated to a DGAlgebraMap.
**************************************************************************************

Synopsis
========

  * Function: homology (Macaulay2Doc),
  * Usage:
        homologyPhi = homology(phi,n)
  * Inputs:
      * phi, an instance of the type DGAlgebraMap,
  * Outputs:
      * homologyPhi, a ring map (Macaulay2Doc), The map on
        homology defined by phi.

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

+-----------------------------------------------------------------+
|i1 : R = ZZ/101[a,b,c]/ideal{a^3+b^3+c^3,a*b*c}                  |
|                                                                 |
|o1 = R                                                           |
|                                                                 |
|o1 : QuotientRing                                                |
+-----------------------------------------------------------------+
|i2 : K1 = koszulComplexDGA(ideal vars R,Variable=>"Y")           |
|                                                                 |
|o2 = {Ring => R                      }                           |
|      Underlying algebra => R[Y ..Y ]                            |
|                               1   3                             |
|      Differential => {a, b, c}                                  |
|                                                                 |
|o2 : DGAlgebra                                                   |
+-----------------------------------------------------------------+
|i3 : K2 = koszulComplexDGA(ideal {b,c},Variable=>"T")            |
|                                                                 |
|o3 = {Ring => R                      }                           |
|      Underlying algebra => R[T ..T ]                            |
|                               1   2                             |
|      Differential => {b, c}                                     |
|                                                                 |
|o3 : DGAlgebra                                                   |
+-----------------------------------------------------------------+
|i4 : f = dgAlgebraMap(K2,K1,matrix{{0,T_1,T_2}})                 |
|                                                                 |
|o4 = map (R[T ..T ], R[Y ..Y ], {0, T , T , a, b, c})            |
|             1   2      1   3        1   2                       |
|                                                                 |
|o4 : DGAlgebraMap                                                |
+-----------------------------------------------------------------+
|i5 : g = dgAlgebraMap(K1,K2,matrix{{Y_2,Y_3}})                   |
|                                                                 |
|o5 = map (R[Y ..Y ], R[T ..T ], {Y , Y , a, b, c})               |
|             1   3      1   2     2   3                          |
|                                                                 |
|o5 : DGAlgebraMap                                                |
+-----------------------------------------------------------------+
|i6 : toComplexMap g                                              |
|                                                                 |
|          1             1                                        |
|o6 = 0 : R  <--------- R  : 0                                    |
|               | 1 |                                             |
|                                                                 |
|          3                   2                                  |
|     1 : R  <--------------- R  : 1                              |
|               {1} | 0 0 |                                       |
|               {1} | 1 0 |                                       |
|               {1} | 0 1 |                                       |
|                                                                 |
|          3                 1                                    |
|     2 : R  <------------- R  : 2                                |
|               {2} | 0 |                                         |
|               {2} | 0 |                                         |
|               {2} | 1 |                                         |
|                                                                 |
|o6 : ChainComplexMap                                             |
+-----------------------------------------------------------------+
|i7 : HHg = HH g                                                  |
|Finding easy relations           :      -- used 0.0323195 seconds|
|                                                                 |
|                         ZZ                                      |
|                        ---[a..c]                                |
|           ZZ           101                                      |
|o7 = map (---[X ..X ], ----------[X ], {X , 0, 0, 0})            |
|          101  1   2           3   1     1                       |
|                       (c, b, a )                                |
|                                                                 |
|                                ZZ                               |
|                               ---[a..c]                         |
|              ZZ               101                               |
|o7 : RingMap ---[X ..X ] <--- ----------[X ]                     |
|             101  1   2               3   1                      |
|                              (c, b, a )                         |
+-----------------------------------------------------------------+

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

  * HH DGAlgebraMap -- Computes the homomorphism in
    homology associated to a DGAlgebraMap.

HH_ZZ DGAlgebra -- Computes the homology of a DG algebra as a module
********************************************************************

Synopsis
========

  * Function: homology (Macaulay2Doc),
  * Usage:
        H = homology(n,A)
  * Inputs:
      * n, an integer (Macaulay2Doc),
      * A, an instance of the type DGAlgebra,
  * Outputs:
      * H, a module (Macaulay2Doc), The nth homology of A.

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

+---------------------------------------------------------+
|i1 : R = ZZ/32003[x,y,z]                                 |
|                                                         |
|o1 = R                                                   |
|                                                         |
|o1 : PolynomialRing                                      |
+---------------------------------------------------------+
|i2 : A = koszulComplexDGA(R)                             |
|                                                         |
|o2 = {Ring => R                      }                   |
|      Underlying algebra => R[T ..T ]                    |
|                               1   3                     |
|      Differential => {x, y, z}                          |
|                                                         |
|o2 : DGAlgebra                                           |
+---------------------------------------------------------+
|i3 : apply(numgens R+1, i -> numgens prune homology(i,A))|
|                                                         |
|o3 = {1, 0, 0, 0}                                        |
|                                                         |
|o3 : List                                                |
+---------------------------------------------------------+

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

  * HH_ZZ DGAlgebra -- Computes the homology of a DG
    algebra as a module

homologyAlgebra -- Compute the homology algebra of a DGAlgebra.
***************************************************************

Synopsis
========

  * Usage:
        HA = homologyAlgebra(A)
  * Inputs:
      * A, an instance of the type DGAlgebra,
  * Optional inputs (Macaulay2Doc),:
      * GenDegreeLimit,
        => ..., default value infinity, Option to specify the
        maximum degree to look for generators
      * RelDegreeLimit,
        => ..., default value infinity, Option to specify the
        maximum degree to look for relations
      * Verbosity,
        => ..., default value 0, Option to specify the maximum degree to look
        for generators when computing the deviations
  * Outputs:
      * HA, a ring (Macaulay2Doc),

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

+-----------------------------------------------------------------+
|i1 : R = ZZ/101[a,b,c,d]/ideal{a^4,b^4,c^4,d^4}                  |
|                                                                 |
|o1 = R                                                           |
|                                                                 |
|o1 : QuotientRing                                                |
+-----------------------------------------------------------------+
|i2 : A = koszulComplexDGA(R)                                     |
|                                                                 |
|o2 = {Ring => R                      }                           |
|      Underlying algebra => R[T ..T ]                            |
|                               1   4                             |
|      Differential => {a, b, c, d}                               |
|                                                                 |
|o2 : DGAlgebra                                                   |
+-----------------------------------------------------------------+
|i3 : apply(maxDegree A + 1, i -> numgens prune homology(i,A))    |
|                                                                 |
|o3 = {1, 4, 6, 4, 1}                                             |
|                                                                 |
|o3 : List                                                        |
+-----------------------------------------------------------------+
|i4 : HA = homologyAlgebra(A)                                     |
|Finding easy relations           :      -- used 0.0952782 seconds|
|                                                                 |
|o4 = HA                                                          |
|                                                                 |
|o4 : PolynomialRing, 4 skew commutative variables                |
+-----------------------------------------------------------------+

Note that HA is a graded commutative polynomial ring (i.e. an exterior algebra)
since R is a complete intersection.

+-----------------------------------------------------------------------------+
|i5 : R = ZZ/101[a,b,c,d]/ideal{a^4,b^4,c^4,d^4,a^3*b^3*c^3*d^3}              |
|                                                                             |
|o5 = R                                                                       |
|                                                                             |
|o5 : QuotientRing                                                            |
+-----------------------------------------------------------------------------+
|i6 : A = koszulComplexDGA(R)                                                 |
|                                                                             |
|o6 = {Ring => R                      }                                       |
|      Underlying algebra => R[T ..T ]                                        |
|                               1   4                                         |
|      Differential => {a, b, c, d}                                           |
|                                                                             |
|o6 : DGAlgebra                                                               |
+-----------------------------------------------------------------------------+
|i7 : apply(maxDegree A + 1, i -> numgens prune homology(i,A))                |
|                                                                             |
|o7 = {1, 5, 10, 10, 4}                                                       |
|                                                                             |
|o7 : List                                                                    |
+-----------------------------------------------------------------------------+
|i8 : HA = homologyAlgebra(A)                                                 |
|Finding easy relations           :      -- used 0.217924 seconds             |
|                                                                             |
|o8 = HA                                                                      |
|                                                                             |
|o8 : QuotientRing                                                            |
+-----------------------------------------------------------------------------+
|i9 : numgens HA                                                              |
|                                                                             |
|o9 = 19                                                                      |
+-----------------------------------------------------------------------------+
|i10 : HA.cache.cycles                                                        |
|                                                                             |
|        3     3     3     3     2 3 3 3     2 3 3 3       3 2 3 3            |
|o10 = {a T , b T , c T , d T , a b c d T , a b c d T T , a b c d T T ,       |
|          1     2     3     4           1           1 2           1 2        |
|      -----------------------------------------------------------------------|
|       2 3 3 3       2 3 3 3       2 3 3 3         3 2 3 3                   |
|      a b c d T T , a b c d T T , a b c d T T T , a b c d T T T ,            |
|               1 3           1 4           1 2 3           1 2 3             |
|      -----------------------------------------------------------------------|
|       3 3 2 3         2 3 3 3         3 2 3 3         2 3 3 3               |
|      a b c d T T T , a b c d T T T , a b c d T T T , a b c d T T T ,        |
|               1 2 3           1 2 4           1 2 4           1 3 4         |
|      -----------------------------------------------------------------------|
|       2 3 3 3           3 2 3 3           3 3 2 3           3 3 3 2         |
|      a b c d T T T T , a b c d T T T T , a b c d T T T T , a b c d T T T T }|
|               1 2 3 4           1 2 3 4           1 2 3 4           1 2 3 4 |
|                                                                             |
|o10 : List                                                                   |
+-----------------------------------------------------------------------------+
+-----------------------------------------------------------------------------+
|i11 : Q = ZZ/101[x,y,z]                                                      |
|                                                                             |
|o11 = Q                                                                      |
|                                                                             |
|o11 : PolynomialRing                                                         |
+-----------------------------------------------------------------------------+
|i12 : I = ideal{y^3,z*x^2,y*(z^2+y*x),z^3+2*x*y*z,x*(z^2+y*x),z*y^2,x^3,z*(z^|
|                                                                             |
|              3   2      2      2            3   2       2   2    3          |
|o12 = ideal (y , x z, x*y  + y*z , 2x*y*z + z , x y + x*z , y z, x , 2x*y*z +|
|      -----------------------------------------------------------------------|
|       3                                                                     |
|      z )                                                                    |
|                                                                             |
|o12 : Ideal of Q                                                             |
|-----------------------------------------------------------------------------|
|2+2*x*y)}                                                                    |
+-----------------------------------------------------------------------------+
|i13 : R = Q/I                                                                |
|                                                                             |
|o13 = R                                                                      |
|                                                                             |
|o13 : QuotientRing                                                           |
+-----------------------------------------------------------------------------+
|i14 : A = koszulComplexDGA(R)                                                |
|                                                                             |
|o14 = {Ring => R                      }                                      |
|       Underlying algebra => R[T ..T ]                                       |
|                                1   3                                        |
|       Differential => {x, y, z}                                             |
|                                                                             |
|o14 : DGAlgebra                                                              |
+-----------------------------------------------------------------------------+
|i15 : apply(maxDegree A + 1, i -> numgens prune homology(i,A))               |
|                                                                             |
|o15 = {1, 7, 7, 1}                                                           |
|                                                                             |
|o15 : List                                                                   |
+-----------------------------------------------------------------------------+
|i16 : HA = homologyAlgebra(A)                                                |
|Finding easy relations           :      -- used 0.126476 seconds             |
|                                                                             |
|o16 = HA                                                                     |
|                                                                             |
|o16 : QuotientRing                                                           |
+-----------------------------------------------------------------------------+

One can check that HA has Poincare duality since R is Gorenstein.

If your DGAlgebra has generators in even degrees, then one must specify the
options GenDegreeLimit and RelDegreeLimit.

+------------------------------------------------------------------+
|i17 : R = ZZ/101[a,b,c,d]                                         |
|                                                                  |
|o17 = R                                                           |
|                                                                  |
|o17 : PolynomialRing                                              |
+------------------------------------------------------------------+
|i18 : S = R/ideal{a^4,b^4,c^4,d^4}                                |
|                                                                  |
|o18 = S                                                           |
|                                                                  |
|o18 : QuotientRing                                                |
+------------------------------------------------------------------+
|i19 : A = acyclicClosure(R,EndDegree=>3)                          |
|                                                                  |
|o19 = {Ring => R                      }                           |
|       Underlying algebra => R[T ..T ]                            |
|                                1   4                             |
|       Differential => {a, b, c, d}                               |
|                                                                  |
|o19 : DGAlgebra                                                   |
+------------------------------------------------------------------+
|i20 : B = A ** S                                                  |
|                                                                  |
|o20 = {Ring => S                      }                           |
|       Underlying algebra => S[T ..T ]                            |
|                                1   4                             |
|       Differential => {a, b, c, d}                               |
|                                                                  |
|o20 : DGAlgebra                                                   |
+------------------------------------------------------------------+
|i21 : HB = homologyAlgebra(B,GenDegreeLimit=>7,RelDegreeLimit=>14)|
|Finding easy relations           :      -- used 0.0455811 seconds |
|                                                                  |
|o21 = HB                                                          |
|                                                                  |
|o21 : PolynomialRing, 4 skew commutative variables                |
+------------------------------------------------------------------+

Ways to use homologyAlgebra :
=============================

  * "homologyAlgebra(DGAlgebra)"

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

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

homologyAlgebra(...,GenDegreeLimit=>...) -- Option to specify the maximum degree to look for generators
*******************************************************************************************************

Synopsis
========

  * Usage:
        homologyAlgebra(...,GenDegreeLimit=>n)

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

  * Default value: infinity (Macaulay2Doc),
  * Function: homologyAlgebra, -- Compute the homology
    algebra of a DGAlgebra.
  * Option key: GenDegreeLimit, -- Option to specify the
    maximum degree to look for generators

Functions with optional argument named GenDegreeLimit :
=======================================================

  * findTrivialMasseyOperation(...,GenDegreeLimit=>...),
    --
    Option to specify the maximum degree to look for generators
  * homologyAlgebra(...,GenDegreeLimit=>...)
    -- Option to
    specify the maximum degree to look for generators
  * isGolodHomomorphism(...,GenDegreeLimit=>...)
    -- Option
    to specify the maximum degree to look for generators
  * isHomologyAlgebraTrivial(...,GenDegreeLimit=>...),
    --
    Option to specify the maximum degree to look for generators
  * torAlgebra(...,GenDegreeLimit=>...)
    -- Option to specify
    the maximum degree to look for generators
  * "torMap(...,GenDegreeLimit=>...)" -- see torMap, -- Compute
    the map of Tor algebras associated to a RingMap.

homologyAlgebra(...,RelDegreeLimit=>...) -- Option to specify the maximum degree to look for relations
******************************************************************************************************

Synopsis
========

  * Usage:
        homologyAlgebra(...,RelDegreeLimit=>n)

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

  * Default value: infinity (Macaulay2Doc),
  * Function: homologyAlgebra, -- Compute the homology
    algebra of a DGAlgebra.
  * Option key: RelDegreeLimit, -- Option to specify the
    maximum degree to look for relations

Functions with optional argument named RelDegreeLimit :
=======================================================

  * homologyAlgebra(...,RelDegreeLimit=>...)
    -- Option to
    specify the maximum degree to look for relations
  * torAlgebra(...,RelDegreeLimit=>...)
    -- Option to specify
    the maximum degree to look for relations

homologyAlgebra(...,Verbosity=>...) -- Option to specify the maximum degree to look for generators when computing the deviations
********************************************************************************************************************************

Synopsis
========

  * Usage:
        homologyAlgebra(...,DegreeLimit=>n)

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

  * Default value: 0
  * Function: homologyAlgebra, -- Compute the homology
    algebra of a DGAlgebra.
  * Option key: Verbosity (Macaulay2Doc), -- an optional
    argument

Functions with optional argument named Verbosity :
==================================================

  * getGenerators(...,Verbosity=>...)
    -- Option to specify
    the maximum degree to look for generators when computing the deviations
  * homologyAlgebra(...,Verbosity=>...)
    -- Option to specify
    the maximum degree to look for generators when computing the deviations
  * icFracP(...,Verbosity=>...) (IntegralClosure)
    -- Prints
    out the conductor element and the number of intermediate modules it
    computed.
  * "idealizer(...,Verbosity=>...)" -- see idealizer (IntegralClosure),
    -- compute Hom(I,I) as a quotient ring
  * integralClosure(...,Verbosity=>...) (IntegralClosure),
    --
    display a certain amount of detail about the computation
  * "isPrime(Ideal,Verbosity=>...)" -- see isPrime(Ideal) (MinimalPrimes),
    -- whether an ideal is prime
  * "makeS2(...,Verbosity=>...)" -- see makeS2 (IntegralClosure),
    -- compute the S2ification of a reduced ring
  * "decompose(Ideal,Verbosity=>...)" -- see minimalPrimes (MinimalPrimes),
    -- minimal primes of an ideal
  * "minimalPrimes(...,Verbosity=>...)" -- see minimalPrimes (MinimalPrimes),
    -- minimal primes of an ideal
  * "ringFromFractions(...,Verbosity=>...)" -- see ringFromFractions (IntegralClosure),
    -- find presentation for f.g. ring

homologyClass -- Computes the element of the homology algebra corresponding to a cycle in a DGAlgebra.
******************************************************************************************************

Synopsis
========

  * Usage:
        h = homologyClass(A,z)
  * Inputs:
      * A, an instance of the type DGAlgebra,
      * z, a ring element (Macaulay2Doc),
  * Outputs:
      * h, a ring element (Macaulay2Doc),

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

This function computes the element in the homology algebra of a cycle in a
DGAlgebra. In order to do this, the homologyAlgebra,
is retrieved (or computed, if it hasn't been already).

+-----------------------------------------------------------------+
|i1 : Q = QQ[x,y,z]                                               |
|                                                                 |
|o1 = Q                                                           |
|                                                                 |
|o1 : PolynomialRing                                              |
+-----------------------------------------------------------------+
|i2 : I = ideal (x^3,y^3,z^3)                                     |
|                                                                 |
|             3   3   3                                           |
|o2 = ideal (x , y , z )                                          |
|                                                                 |
|o2 : Ideal of Q                                                  |
+-----------------------------------------------------------------+
|i3 : R = Q/I                                                     |
|                                                                 |
|o3 = R                                                           |
|                                                                 |
|o3 : QuotientRing                                                |
+-----------------------------------------------------------------+
|i4 : KR = koszulComplexDGA R                                     |
|                                                                 |
|o4 = {Ring => R                      }                           |
|      Underlying algebra => R[T ..T ]                            |
|                               1   3                             |
|      Differential => {x, y, z}                                  |
|                                                                 |
|o4 : DGAlgebra                                                   |
+-----------------------------------------------------------------+
|i5 : z1 = x^2*T_1                                                |
|                                                                 |
|      2                                                          |
|o5 = x T                                                         |
|        1                                                        |
|                                                                 |
|o5 : R[T ..T ]                                                   |
|        1   3                                                    |
+-----------------------------------------------------------------+
|i6 : z2 = y^2*T_2                                                |
|                                                                 |
|      2                                                          |
|o6 = y T                                                         |
|        2                                                        |
|                                                                 |
|o6 : R[T ..T ]                                                   |
|        1   3                                                    |
+-----------------------------------------------------------------+
|i7 : H = HH(KR)                                                  |
|Finding easy relations           :      -- used 0.0365621 seconds|
|                                                                 |
|o7 = H                                                           |
|                                                                 |
|o7 : PolynomialRing, 3 skew commutative variables                |
+-----------------------------------------------------------------+
|i8 : homologyClass(KR,z1*z2)                                     |
|                                                                 |
|o8 = X X                                                         |
|      1 2                                                        |
|                                                                 |
|o8 : H                                                           |
+-----------------------------------------------------------------+

Ways to use homologyClass :
===========================

  * "homologyClass(DGAlgebra,RingElement)"

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

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

homologyModule -- Compute the homology of a DGModule as a module over a DGAlgebra.
**********************************************************************************

Synopsis
========

  * Usage:
        HM = homologyModule(A,M)
  * Inputs:
      * A, an instance of the type DGAlgebra,
      * M, a module (Macaulay2Doc),
  * Outputs:
      * HM, a module (Macaulay2Doc),

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

Given a DGAlgebra A over a ring R, and an R-module M, A ** M carries the
structure of a left DG module over A.  It follows that H(A ** M) is a module
over H(A). Although DGModules have yet to be implemented as objects in
Macaulay2 in their own right, the current infrastructure (with a little extra
work) allows us to determine the module structure of this type of DG module as
a module over the homology algebra of A.

Currently, this code will only work on DGAlgebras that are finite over their
ring of definition, such as Koszul complexes.  (Truncations of) module
structures in case of non-finite DGAlgebras may be made available in a future
update.

For an example, we will compute the module structure of the Koszul homology of
the canonical module over the Koszul homology algebra.

+------------------------------------------------------------------------+
|i1 : Q = QQ[x,y,z,w]                                                    |
|                                                                        |
|o1 = Q                                                                  |
|                                                                        |
|o1 : PolynomialRing                                                     |
+------------------------------------------------------------------------+
|i2 : I = ideal (w^2, y*w+z*w, x*w, y*z+z^2, y^2+z*w, x*y+x*z, x^2+z*w)  |
|                                                                        |
|             2                         2   2                    2       |
|o2 = ideal (w , y*w + z*w, x*w, y*z + z , y  + z*w, x*y + x*z, x  + z*w)|
|                                                                        |
|o2 : Ideal of Q                                                         |
+------------------------------------------------------------------------+
|i3 : R = Q/I                                                            |
|                                                                        |
|o3 = R                                                                  |
|                                                                        |
|o3 : QuotientRing                                                       |
+------------------------------------------------------------------------+
|i4 : KR = koszulComplexDGA R                                            |
|                                                                        |
|o4 = {Ring => R                      }                                  |
|      Underlying algebra => R[T ..T ]                                   |
|                               1   4                                    |
|      Differential => {x, y, z, w}                                      |
|                                                                        |
|o4 : DGAlgebra                                                          |
+------------------------------------------------------------------------+
|i5 : cxKR = toComplex KR                                                |
|                                                                        |
|      1      4      6      4      1                                     |
|o5 = R  <-- R  <-- R  <-- R  <-- R                                      |
|                                                                        |
|     0      1      2      3      4                                      |
|                                                                        |
|o5 : ChainComplex                                                       |
+------------------------------------------------------------------------+
|i6 : HKR = HH(KR)                                                       |
|Finding easy relations           :      -- used 0.241329 seconds        |
|                                                                        |
|o6 = HKR                                                                |
|                                                                        |
|o6 : QuotientRing                                                       |
+------------------------------------------------------------------------+

The following is the graded canonical module of R:

+--------------------------------------------------------+
|i7 : degList = first entries vars Q / degree / first    |
|                                                        |
|o7 = {1, 1, 1, 1}                                       |
|                                                        |
|o7 : List                                               |
+--------------------------------------------------------+
|i8 : M = Ext^4(Q^1/I,Q^{-(sum degList)}) ** R           |
|                                                        |
|o8 = cokernel {-2} | w x z 0   0 0  0   0 -zw 0     0  ||
|              {-2} | 0 0 w y+z 0 x  0   w 0   z2+zw 0  ||
|              {-2} | 0 0 0 0   w -z y+z x 0   0     z2 ||
|                                                        |
|                            3                           |
|o8 : R-module, quotient of R                            |
+--------------------------------------------------------+

We obtain the Koszul homology module using the following command:

+--------------------------------+
|i9 : HKM = homologyModule(KR,M);|
+--------------------------------+

One may notice the duality of HKR and HKM by considering their Hilbert series:

+-------------------------------------------------------------------------+
|i10 : hsHKR = value numerator reduceHilbert hilbertSeries HKR            |
|                                                                         |
|              2     2 4     2 3     3 5     3 4     4 6                  |
|o10 = 1 + 7T T  + 6T T  + 8T T  + 8T T  + 3T T  + 3T T                   |
|            0 1     0 1     0 1     0 1     0 1     0 1                  |
|                                                                         |
|o10 : ZZ[T ..T ]                                                         |
|          0   1                                                          |
+-------------------------------------------------------------------------+
|i11 : hsHKM = value numerator reduceHilbert hilbertSeries HKM            |
|                                                                         |
|        -2             -1     2       2     3 2    4 4                   |
|o11 = 3T   + 3T  + 8T T   + 8T T  + 6T  + 7T T  + T T                    |
|        1      0     0 1      0 1     0     0 1    0 1                   |
|                                                                         |
|o11 : ZZ[T ..T ]                                                         |
|          0   1                                                          |
+-------------------------------------------------------------------------+
|i12 : AA = ring hsHKR                                                    |
|                                                                         |
|o12 = AA                                                                 |
|                                                                         |
|o12 : PolynomialRing                                                     |
+-------------------------------------------------------------------------+
|i13 : e = numgens Q                                                      |
|                                                                         |
|o13 = 4                                                                  |
+-------------------------------------------------------------------------+
|i14 : hsHKR == T_0^e*T_1^e*sub(hsHKM, {T_0 => T_0^(-1), T_1 => T_1^(-1)})|
|                                                                         |
|o14 = true                                                               |
+-------------------------------------------------------------------------+

Ways to use homologyModule :
============================

  * "homologyModule(DGAlgebra,Module)"

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

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

isAcyclic -- Determines if a DGAlgebra is acyclic.
**************************************************

Synopsis
========

  * Usage:
        isAcyc = isAcyclic(A)
  * Inputs:
      * A, an instance of the type DGAlgebra,
  * Optional inputs (Macaulay2Doc),:
      * EndDegree, =>
        ..., default value -1, Option to specify the degree to finish checking
        acyclicity
  * Outputs:
      * isAcyc, a Boolean value (Macaulay2Doc),

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

This function determines if the DGAlgebra is acyclic.

+-----------------------------------------------+
|i1 : R = ZZ/101[a,b,c,d]/ideal{a^4+b^4+c^4+d^4}|
|                                               |
|o1 = R                                         |
|                                               |
|o1 : QuotientRing                              |
+-----------------------------------------------+
|i2 : isAcyclic(koszulComplexDGA R)             |
|                                               |
|o2 = false                                     |
+-----------------------------------------------+
+----------------------------------+
|i3 : Q = ZZ/101[a,b,c,d]          |
|                                  |
|o3 = Q                            |
|                                  |
|o3 : PolynomialRing               |
+----------------------------------+
|i4 : I = ideal {a^4,b^4,c^4,d^4}  |
|                                  |
|             4   4   4   4        |
|o4 = ideal (a , b , c , d )       |
|                                  |
|o4 : Ideal of Q                   |
+----------------------------------+
|i5 : isAcyclic(koszulComplexDGA I)|
|                                  |
|o5 = true                         |
+----------------------------------+

Ways to use isAcyclic :
=======================

  * "isAcyclic(DGAlgebra)"

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

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

isAcyclic(...,EndDegree=>...) -- Option to specify the degree to finish checking acyclicity
*******************************************************************************************

Synopsis
========

  * Usage:
        isAcyclic(...,EndDegree=>n)

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

  * Default value: -1
  * Function: isAcyclic, -- Determines if a DGAlgebra is
    acyclic.
  * Option key: EndDegree, -- Option to specify the degree to
    stop computing killing cycles and acyclic closure

Functions with optional argument named EndDegree :
==================================================

  * acyclicClosure(...,EndDegree=>...)
    -- Option to specify
    the degree to stop computing the acyclic closure
  * isAcyclic(...,EndDegree=>...)
    -- Option to specify the
    degree to finish checking acyclicity
  * killCycles(...,EndDegree=>...)
    -- Option to specify the
    degree to stop looking for cycles
  * "liftToDGMap(...,EndDegree=>...)" -- see liftToDGMap, --
    Lift a ring homomorphism in degree zero to a DG algebra morphism
  * "toComplexMap(...,EndDegree=>...)" -- see toComplexMap,
    -- Construct the ChainComplexMap associated to a DGAlgebraMap

isGolod -- Determines if a ring is Golod
****************************************

Synopsis
========

  * Usage:
        isGol = isGolod(R)
  * Inputs:
      * R, a ring (Macaulay2Doc),
  * Outputs:
      * isGol, a Boolean value (Macaulay2Doc),

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

This function determines if the Koszul complex of a ring R admits a trivial
Massey operation.  If one exists, then R is Golod.

+-----------------------------------------------+
|i1 : R = ZZ/101[a,b,c,d]/ideal{a^4+b^4+c^4+d^4}|
|                                               |
|o1 = R                                         |
|                                               |
|o1 : QuotientRing                              |
+-----------------------------------------------+
|i2 : isGolod(R)                                |
|                                               |
|o2 = true                                      |
+-----------------------------------------------+

Hypersurfaces are Golod, but

+-----------------------------------------------+
|i3 : R = ZZ/101[a,b,c,d]/ideal{a^4,b^4,c^4,d^4}|
|                                               |
|o3 = R                                         |
|                                               |
|o3 : QuotientRing                              |
+-----------------------------------------------+
|i4 : isGolod(R)                                |
|                                               |
|o4 = false                                     |
+-----------------------------------------------+

complete intersections of higher codimension are not.  Here is another example:

+---------------------------+
|i5 : Q = ZZ/101[a,b,c,d]   |
|                           |
|o5 = Q                     |
|                           |
|o5 : PolynomialRing        |
+---------------------------+
|i6 : R = Q/(ideal vars Q)^2|
|                           |
|o6 = R                     |
|                           |
|o6 : QuotientRing          |
+---------------------------+
|i7 : isGolod(R)            |
|                           |
|o7 = true                  |
+---------------------------+

The above is a (CM) ring minimal of minimal multiplicity, hence Golod.  The
next example was found by Lukas Katthan, and appears in his arXiv paper
1511.04883.  It is the first known example of an algebra that is not Golod, but
whose Koszul complex has a trivial homology product.

+-----------------------------------------------------------------------------+
|i8 : Q = ZZ/101[x_1,x_2,y_1,y_2,z,w]                                         |
|                                                                             |
|o8 = Q                                                                       |
|                                                                             |
|o8 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i9 : I = ideal {x_1*x_2^2,z^2*w,y_1*y_2^2,x_2^2*z*w,y_2^2*z^2,x_1*x_2*y_1*y_2|
|                                                                             |
|               2   2      2   2      2 2             2 2                     |
|o9 = ideal (x x , z w, y y , x z*w, y z , x x y y , x y z, x y z)            |
|             1 2        1 2   2      2     1 2 1 2   2 2    1 1              |
|                                                                             |
|o9 : Ideal of Q                                                              |
|-----------------------------------------------------------------------------|
|,x_2^2*y_2^2*z,x_1*y_1*z}                                                    |
+-----------------------------------------------------------------------------+
|i10 : R = Q/I                                                                |
|                                                                             |
|o10 = R                                                                      |
|                                                                             |
|o10 : QuotientRing                                                           |
+-----------------------------------------------------------------------------+
|i11 : isHomologyAlgebraTrivial koszulComplexDGA R                            |
|                                                                             |
|o11 = true                                                                   |
+-----------------------------------------------------------------------------+
|i12 : isGolod R                                                              |
|                                                                             |
|o12 = false                                                                  |
+-----------------------------------------------------------------------------+

Note that since the Koszul complex is zero in homological degree beyond the
embedding dimension, there are only finitely many Massey products that one
needs to check to verify that a ring is Golod.

Ways to use isGolod :
=====================

  * "isGolod(Ring)"

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

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

isGolodHomomorphism -- Determines if the canonical map from the ambient ring is Golod
*************************************************************************************

Synopsis
========

  * Usage:
        isGol = isGolodHomomorphism(R)
  * Inputs:
      * R, a quotient ring (Macaulay2Doc),
  * Optional inputs (Macaulay2Doc),:
      * GenDegreeLimit,
        => ..., default value infinity, Option to specify the
        maximum degree to look for generators
      * TMOLimit,
        => ..., default value infinity, Option to specify the maximum
        degree to look for generators when computing the deviations
  * Outputs:
      * isGol, a Boolean value (Macaulay2Doc),

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

This function determines if the canonical map from ambient R --> R is Golod.
It does this by computing an acyclic closure of ambient R (which is a
DGAlgebra), then tensors this with R, and determines if this DG
Algebra has a trivial Massey operation up to a certain homological degree
provided by the option GenDegreeLimit.

+-----------------------------------------------+
|i1 : R = ZZ/101[a,b,c,d]/ideal{a^4+b^4+c^4+d^4}|
|                                               |
|o1 = R                                         |
|                                               |
|o1 : QuotientRing                              |
+-----------------------------------------------+
|i2 : isGolodHomomorphism(R,GenDegreeLimit=>5)  |
|                                               |
|o2 = true                                      |
+-----------------------------------------------+

If R is a Golod ring, then ambient R $\rightarrow$ R is a Golod homomorphism.

+---------------------------------------------------------+
|i3 : Q = ZZ/101[a,b,c,d]/ideal{a^4,b^4,c^4,d^4}          |
|                                                         |
|o3 = Q                                                   |
|                                                         |
|o3 : QuotientRing                                        |
+---------------------------------------------------------+
|i4 : R = Q/ideal (a^3*b^3*c^3*d^3)                       |
|                                                         |
|o4 = R                                                   |
|                                                         |
|o4 : QuotientRing                                        |
+---------------------------------------------------------+
|i5 : isGolodHomomorphism(R,GenDegreeLimit=>5,TMOLimit=>3)|
|                                                         |
|o5 = true                                                |
+---------------------------------------------------------+

The map from Q to R is Golod by a result of Avramov and Levin; we can only find
the trivial Massey operations out to a given degree.

Ways to use isGolodHomomorphism :
=================================

  * "isGolodHomomorphism(QuotientRing)"

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

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

isGolodHomomorphism(...,GenDegreeLimit=>...) -- Option to specify the maximum degree to look for generators
***********************************************************************************************************

Synopsis
========

  * Usage:
        isGolodHomomorphism(...,GenDegreeLimit=>n)

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

  * Default value: infinity (Macaulay2Doc),
  * Function: isGolodHomomorphism, -- Determines if
    the canonical map from the ambient ring is Golod
  * Option key: GenDegreeLimit, -- Option to specify the
    maximum degree to look for generators

Functions with optional argument named GenDegreeLimit :
=======================================================

  * findTrivialMasseyOperation(...,GenDegreeLimit=>...),
    --
    Option to specify the maximum degree to look for generators
  * homologyAlgebra(...,GenDegreeLimit=>...)
    -- Option to
    specify the maximum degree to look for generators
  * isGolodHomomorphism(...,GenDegreeLimit=>...)
    -- Option
    to specify the maximum degree to look for generators
  * isHomologyAlgebraTrivial(...,GenDegreeLimit=>...),
    --
    Option to specify the maximum degree to look for generators
  * torAlgebra(...,GenDegreeLimit=>...)
    -- Option to specify
    the maximum degree to look for generators
  * "torMap(...,GenDegreeLimit=>...)" -- see torMap, -- Compute
    the map of Tor algebras associated to a RingMap.

isGolodHomomorphism(...,TMOLimit=>...) -- Option to specify the maximum degree to look for generators when computing the deviations
***********************************************************************************************************************************

Synopsis
========

  * Usage:
        isGolodHomomorphism(...,DegreeLimit=>n)

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

  * Default value: infinity (Macaulay2Doc),
  * Function: isGolodHomomorphism, -- Determines if
    the canonical map from the ambient ring is Golod
  * Option key: TMOLimit, -- Option to specify the maximum
    arity of the trivial Massey operation

Functions with optional argument named TMOLimit :
=================================================

  * findTrivialMasseyOperation(...,TMOLimit=>...)
    -- Option
    to specify the maximum arity of a trivial Massey operation, if one exists.
  * isGolodHomomorphism(...,TMOLimit=>...)
    -- Option to
    specify the maximum degree to look for generators when computing the
    deviations

isHomogeneous(DGAlgebra) -- Determine if the DGAlgebra respects the gradings of the ring it is defined over.
************************************************************************************************************

Synopsis
========

  * Function: isHomogeneous (Macaulay2Doc),
  * Usage:
        isHom = isHomogeneous(A)
  * Inputs:
      * A, an instance of the type DGAlgebra,
  * Outputs:
      * isHom, a Boolean value (Macaulay2Doc), Whether or not
        the DGA respects the grading

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

+----------------------------------------------------------+
|i1 : R = ZZ/101[x,y,z]                                    |
|                                                          |
|o1 = R                                                    |
|                                                          |
|o1 : PolynomialRing                                       |
+----------------------------------------------------------+
|i2 : A = freeDGAlgebra(R,{{1},{1},{1},{3}})               |
|                                                          |
|o2 = {Ring => R                      }                    |
|      Underlying algebra => R[T ..T ]                     |
|                               1   4                      |
|      Differential => null                                |
|                                                          |
|o2 : DGAlgebra                                            |
+----------------------------------------------------------+
|i3 : setDiff(A,{x,y,z,x*T_2*T_3-y*T_1*T_3+z*T_1*T_2})     |
|                                                          |
|o3 = {Ring => R                                          }|
|      Underlying algebra => R[T ..T ]                     |
|                               1   4                      |
|      Differential => {x, y, z, z*T T  - y*T T  + x*T T } |
|                                   1 2      1 3      2 3  |
|                                                          |
|o3 : DGAlgebra                                            |
+----------------------------------------------------------+
|i4 : isHomogeneous A                                      |
|                                                          |
|o4 = false                                                |
+----------------------------------------------------------+
|i5 : B = freeDGAlgebra(R,{{1,1},{1,1},{1,1},{3,3}})       |
|                                                          |
|o5 = {Ring => R                      }                    |
|      Underlying algebra => R[T ..T ]                     |
|                               1   4                      |
|      Differential => null                                |
|                                                          |
|o5 : DGAlgebra                                            |
+----------------------------------------------------------+
|i6 : setDiff(B,{x,y,z,x*T_2*T_3-y*T_1*T_3+z*T_1*T_2})     |
|                                                          |
|o6 = {Ring => R                                          }|
|      Underlying algebra => R[T ..T ]                     |
|                               1   4                      |
|      Differential => {x, y, z, z*T T  - y*T T  + x*T T } |
|                                   1 2      1 3      2 3  |
|                                                          |
|o6 : DGAlgebra                                            |
+----------------------------------------------------------+
|i7 : isHomogeneous B                                      |
|                                                          |
|o7 = true                                                 |
+----------------------------------------------------------+

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

  * isHomogeneous(DGAlgebra) -- Determine
    if the DGAlgebra respects the gradings of the ring it is defined over.

isHomologyAlgebraTrivial -- Determines if the homology algebra of a DGAlgebra is trivial
****************************************************************************************

Synopsis
========

  * Usage:
        isTriv = isHomologyAlgebraTrivial(A)
  * Inputs:
      * A, an instance of the type DGAlgebra,
  * Optional inputs (Macaulay2Doc),:
      * GenDegreeLimit,
        => ..., default value infinity, Option
        to specify the maximum degree to look for generators
  * Outputs:
      * isTriv, a Boolean value (Macaulay2Doc),

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

This function computes the homology algebra of the DGAlgebra A and determines
if the multiplication on H(A) is trivial.

+-----------------------------------------------------------+
|i1 : R = ZZ/101[a,b,c,d]/ideal{a^4,b^4,c^4,d^4}            |
|                                                           |
|o1 = R                                                     |
|                                                           |
|o1 : QuotientRing                                          |
+-----------------------------------------------------------+
|i2 : S = R/ideal{a^3*b^3*c^3*d^3}                          |
|                                                           |
|o2 = S                                                     |
|                                                           |
|o2 : QuotientRing                                          |
+-----------------------------------------------------------+
|i3 : A = acyclicClosure(R,EndDegree=>3)                    |
|                                                           |
|o3 = {Ring => R                                           }|
|      Underlying algebra => R[T ..T ]                      |
|                               1   8                       |
|                                    3     3     3     3    |
|      Differential => {a, b, c, d, a T , b T , c T , d T } |
|                                      1     2     3     4  |
|                                                           |
|o3 : DGAlgebra                                             |
+-----------------------------------------------------------+
|i4 : B = A ** S                                            |
|                                                           |
|o4 = {Ring => S                                           }|
|      Underlying algebra => S[T ..T ]                      |
|                               1   8                       |
|                                    3     3     3     3    |
|      Differential => {a, b, c, d, a T , b T , c T , d T } |
|                                      1     2     3     4  |
|                                                           |
|o4 : DGAlgebra                                             |
+-----------------------------------------------------------+
|i5 : isHomologyAlgebraTrivial(B,GenDegreeLimit=>6)         |
|                                                           |
|o5 = true                                                  |
+-----------------------------------------------------------+

The command returns true since R --> S is Golod.  Notice we also used the
option GenDegreeLimit here.

+-----------------------------------------------+
|i6 : R = ZZ/101[a,b,c,d]/ideal{a^4,b^4,c^4,d^4}|
|                                               |
|o6 = R                                         |
|                                               |
|o6 : QuotientRing                              |
+-----------------------------------------------+
|i7 : A = koszulComplexDGA(R)                   |
|                                               |
|o7 = {Ring => R                      }         |
|      Underlying algebra => R[T ..T ]          |
|                               1   4           |
|      Differential => {a, b, c, d}             |
|                                               |
|o7 : DGAlgebra                                 |
+-----------------------------------------------+
|i8 : isHomologyAlgebraTrivial(A)               |
|                                               |
|o8 = false                                     |
+-----------------------------------------------+

The command returns false, since R is Gorenstein, and so HA has Poincare
Duality, hence the multiplication is far from trivial.

Ways to use isHomologyAlgebraTrivial :
======================================

  * "isHomologyAlgebraTrivial(DGAlgebra)"

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

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

isHomologyAlgebraTrivial(...,GenDegreeLimit=>...) -- Option to specify the maximum degree to look for generators
****************************************************************************************************************

Synopsis
========

  * Usage:
        isHomologyAlgebraTrivial(...,GenDegreeLimit=>n)

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

  * Default value: infinity (Macaulay2Doc),
  * Function: isHomologyAlgebraTrivial, --
    Determines if the homology algebra of a DGAlgebra is trivial
  * Option key: GenDegreeLimit, -- Option to specify the
    maximum degree to look for generators

Functions with optional argument named GenDegreeLimit :
=======================================================

  * findTrivialMasseyOperation(...,GenDegreeLimit=>...),
    --
    Option to specify the maximum degree to look for generators
  * homologyAlgebra(...,GenDegreeLimit=>...)
    -- Option to
    specify the maximum degree to look for generators
  * isGolodHomomorphism(...,GenDegreeLimit=>...)
    -- Option
    to specify the maximum degree to look for generators
  * isHomologyAlgebraTrivial(...,GenDegreeLimit=>...),
    --
    Option to specify the maximum degree to look for generators
  * torAlgebra(...,GenDegreeLimit=>...)
    -- Option to specify
    the maximum degree to look for generators
  * "torMap(...,GenDegreeLimit=>...)" -- see torMap, -- Compute
    the map of Tor algebras associated to a RingMap.

killCycles -- Adjoins variables to make non-bounding cycles boundaries in the lowest positive degree with nontrivial homology.
******************************************************************************************************************************

Synopsis
========

  * Usage:
        B = killCycles(A)
  * Inputs:
      * A, an instance of the type DGAlgebra,
  * Optional inputs (Macaulay2Doc),:
      * EndDegree, =>
        ..., default value -1, Option to specify the degree to stop looking for
        cycles
      * StartDegree,
        => ..., default value 1, Option to specify the degree to start looking
        for cycles
  * Outputs:
      * B, an instance of the type DGAlgebra,

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

+-----------------------------------------------------------------------------+
|i1 : R = ZZ/101[a,b,c,d]/ideal{a^3,b^3,c^3-d^4}                              |
|                                                                             |
|o1 = R                                                                       |
|                                                                             |
|o1 : QuotientRing                                                            |
+-----------------------------------------------------------------------------+
|i2 : A = koszulComplexDGA(R)                                                 |
|                                                                             |
|o2 = {Ring => R                      }                                       |
|      Underlying algebra => R[T ..T ]                                        |
|                               1   4                                         |
|      Differential => {a, b, c, d}                                           |
|                                                                             |
|o2 : DGAlgebra                                                               |
+-----------------------------------------------------------------------------+
|i3 : A.diff                                                                  |
|                                                                             |
|o3 = map (R[T ..T ], R[T ..T ], {a, b, c, d, a, b, c, d})                    |
|             1   4      1   4                                                |
|                                                                             |
|o3 : RingMap R[T ..T ] <--- R[T ..T ]                                        |
|                1   4          1   4                                         |
+-----------------------------------------------------------------------------+
|i4 : B = killCycles(A)                                                       |
|                                                                             |
|o4 = {Ring => R                                              }               |
|      Underlying algebra => R[T ..T ]                                        |
|                               1   7                                         |
|                                    2     2       2      3                   |
|      Differential => {a, b, c, d, a T , b T , - c T  + d T }                |
|                                      1     2       3      4                 |
|                                                                             |
|o4 : DGAlgebra                                                               |
+-----------------------------------------------------------------------------+
|i5 : B.diff                                                                  |
|                                                                             |
|                                              2     2       2      3         |
|o5 = map (R[T ..T ], R[T ..T ], {a, b, c, d, a T , b T , - c T  + d T , a, b,|
|             1   7      1   7                   1     2       3      4       |
|                                                                             |
|o5 : RingMap R[T ..T ] <--- R[T ..T ]                                        |
|                1   7          1   7                                         |
|-----------------------------------------------------------------------------|
|c, d})                                                                       |
+-----------------------------------------------------------------------------+

Ways to use killCycles :
========================

  * "killCycles(DGAlgebra)"

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

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

killCycles(...,EndDegree=>...) -- Option to specify the degree to stop looking for cycles
*****************************************************************************************

Synopsis
========

  * Usage:
        killCycles(...,EndDegree=>n)

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

  * Default value: -1
  * Function: killCycles, -- Adjoins variables to make
    non-bounding cycles boundaries in the lowest positive degree with
    nontrivial homology.
  * Option key: EndDegree, -- Option to specify the degree to
    stop computing killing cycles and acyclic closure

Functions with optional argument named EndDegree :
==================================================

  * acyclicClosure(...,EndDegree=>...)
    -- Option to specify
    the degree to stop computing the acyclic closure
  * isAcyclic(...,EndDegree=>...)
    -- Option to specify the
    degree to finish checking acyclicity
  * killCycles(...,EndDegree=>...)
    -- Option to specify the
    degree to stop looking for cycles
  * "liftToDGMap(...,EndDegree=>...)" -- see liftToDGMap, --
    Lift a ring homomorphism in degree zero to a DG algebra morphism
  * "toComplexMap(...,EndDegree=>...)" -- see toComplexMap,
    -- Construct the ChainComplexMap associated to a DGAlgebraMap

killCycles(...,StartDegree=>...) -- Option to specify the degree to start looking for cycles
********************************************************************************************

Synopsis
========

  * Usage:
        killCycles(...,StartDegree=>n)

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

  * Default value: 1
  * Function: killCycles, -- Adjoins variables to make
    non-bounding cycles boundaries in the lowest positive degree with
    nontrivial homology.
  * Option key: StartDegree, -- Option to specify the degree
    to start computing the acyclic closure and killing cycles

Functions with optional argument named StartDegree :
====================================================

  * acyclicClosure(...,StartDegree=>...)
    -- Option to
    specify the degree to start computing the acyclic closure
  * getGenerators(...,StartDegree=>...)
    -- Option to specify
    the degree to start finding generators of HH(DGAlgebra)
  * killCycles(...,StartDegree=>...)
    -- Option to specify
    the degree to start looking for cycles

koszulComplexDGA -- Returns the Koszul complex as a DGAlgebra
*************************************************************

Synopsis
========

  * Usage:
        A = koszulComplexDGA(R)
  * Inputs:
      * R, a ring (Macaulay2Doc), Returns the Koszul complex on
        ideal vars R.
  * Optional inputs (Macaulay2Doc),:
      * Variable => ..., default value "T"
  * Outputs:
      * A, an instance of the type DGAlgebra,

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

To construct the Koszul complex of a minimal set of generators as a
DGAlgebra, one uses

+--------------------------------------------------------------+
|i1 : R = ZZ/101[a,b,c]/ideal{a^3,b^3,c^3}                     |
|                                                              |
|o1 = R                                                        |
|                                                              |
|o1 : QuotientRing                                             |
+--------------------------------------------------------------+
|i2 : A = koszulComplexDGA(R)                                  |
|                                                              |
|o2 = {Ring => R                      }                        |
|      Underlying algebra => R[T ..T ]                         |
|                               1   3                          |
|      Differential => {a, b, c}                               |
|                                                              |
|o2 : DGAlgebra                                                |
+--------------------------------------------------------------+
|i3 : complexA = toComplex A                                   |
|                                                              |
|      1      3      3      1                                  |
|o3 = R  <-- R  <-- R  <-- R                                   |
|                                                              |
|     0      1      2      3                                   |
|                                                              |
|o3 : ChainComplex                                             |
+--------------------------------------------------------------+
|i4 : complexA.dd                                              |
|                                                              |
|          1                 3                                 |
|o4 = 0 : R  <------------- R  : 1                             |
|               | a b c |                                      |
|                                                              |
|          3                        3                          |
|     1 : R  <-------------------- R  : 2                      |
|               {1} | -b -c 0  |                               |
|               {1} | a  0  -c |                               |
|               {1} | 0  a  b  |                               |
|                                                              |
|          3                  1                                |
|     2 : R  <-------------- R  : 3                            |
|               {2} | c  |                                     |
|               {2} | -b |                                     |
|               {2} | a  |                                     |
|                                                              |
|o4 : ChainComplexMap                                          |
+--------------------------------------------------------------+
|i5 : ranks = apply(4, i -> numgens prune HH_i(complexA))      |
|                                                              |
|o5 = {1, 3, 3, 1}                                             |
|                                                              |
|o5 : List                                                     |
+--------------------------------------------------------------+
|i6 : ranks == apply(4, i -> numgens prune HH_i(koszul vars R))|
|                                                              |
|o6 = true                                                     |
+--------------------------------------------------------------+

One can also compute the homology of A directly with HH_ZZ DGAlgebra.
One may also specify the name of the variable using the
Variable option.

Ways to use koszulComplexDGA :
==============================

  * "koszulComplexDGA(Ring)"
  * koszulComplexDGA(Ideal) -- Returns the
    Koszul complex as a DGAlgebra
  * koszulComplexDGA(List) -- Define the
    Koszul complex on a list of elements as a DGAlgebra

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

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

koszulComplexDGA(Ideal) -- Returns the Koszul complex as a DGAlgebra
********************************************************************

Synopsis
========

  * Function: koszulComplexDGA,
  * Usage:
        A = koszulComplexDGA(I)
  * Inputs:
      * I, an ideal (Macaulay2Doc), An ideal of a ring R
  * Optional inputs (Macaulay2Doc),:
      * Variable, => ..., default value "T", Returns
        the Koszul complex as a DGAlgebra
  * Outputs:
      * A, an instance of the type DGAlgebra,

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

To construct the Koszul complex on the set of generators of I as a
DGAlgebra, one uses

+-------------------------------------------------------------------+
|i1 : R = ZZ/101[a,b,c]                                             |
|                                                                   |
|o1 = R                                                             |
|                                                                   |
|o1 : PolynomialRing                                                |
+-------------------------------------------------------------------+
|i2 : I = ideal{a^3,b^3,c^3,a^2*b^2*c^2}                            |
|                                                                   |
|             3   3   3   2 2 2                                     |
|o2 = ideal (a , b , c , a b c )                                    |
|                                                                   |
|o2 : Ideal of R                                                    |
+-------------------------------------------------------------------+
|i3 : A = koszulComplexDGA(I)                                       |
|                                                                   |
|o3 = {Ring => R                           }                        |
|      Underlying algebra => R[T ..T ]                              |
|                               1   4                               |
|                        3   3   3   2 2 2                          |
|      Differential => {a , b , c , a b c }                         |
|                                                                   |
|o3 : DGAlgebra                                                     |
+-------------------------------------------------------------------+
|i4 : complexA = toComplex A                                        |
|                                                                   |
|      1      4      6      4      1                                |
|o4 = R  <-- R  <-- R  <-- R  <-- R                                 |
|                                                                   |
|     0      1      2      3      4                                 |
|                                                                   |
|o4 : ChainComplex                                                  |
+-------------------------------------------------------------------+
|i5 : complexA.dd                                                   |
|                                                                   |
|          1                           4                            |
|o5 = 0 : R  <----------------------- R  : 1                        |
|               | a3 b3 c3 a2b2c2 |                                 |
|                                                                   |
|          4                                                   6    |
|     1 : R  <----------------------------------------------- R  : 2|
|               {3} | -b3 -c3 0   -a2b2c2 0       0       |         |
|               {3} | a3  0   -c3 0       -a2b2c2 0       |         |
|               {3} | 0   a3  b3  0       0       -a2b2c2 |         |
|               {6} | 0   0   0   a3      b3      c3      |         |
|                                                                   |
|          6                                        4               |
|     2 : R  <------------------------------------ R  : 3           |
|               {6} | c3  a2b2c2 0      0      |                    |
|               {6} | -b3 0      a2b2c2 0      |                    |
|               {6} | a3  0      0      a2b2c2 |                    |
|               {9} | 0   -b3    -c3    0      |                    |
|               {9} | 0   a3     0      -c3    |                    |
|               {9} | 0   0      a3     b3     |                    |
|                                                                   |
|          4                        1                               |
|     3 : R  <-------------------- R  : 4                           |
|               {9}  | -a2b2c2 |                                    |
|               {12} | c3      |                                    |
|               {12} | -b3     |                                    |
|               {12} | a3      |                                    |
|                                                                   |
|o5 : ChainComplexMap                                               |
+-------------------------------------------------------------------+
|i6 : ranks = apply(4, i -> numgens prune HH_i(complexA))           |
|                                                                   |
|o6 = {1, 3, 0, 0}                                                  |
|                                                                   |
|o6 : List                                                          |
+-------------------------------------------------------------------+
|i7 : ranks == apply(4, i -> numgens prune HH_i(koszul gens I))     |
|                                                                   |
|o7 = true                                                          |
+-------------------------------------------------------------------+

One can also compute the homology of A directly with HH_ZZ DGAlgebra.

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

  * koszulComplexDGA(Ideal) -- Returns the
    Koszul complex as a DGAlgebra

koszulComplexDGA(List) -- Define the Koszul complex on a list of elements as a DGAlgebra
****************************************************************************************

Synopsis
========

  * Function: koszulComplexDGA,
  * Usage:
        A = koszulComplexDGA(diffList)
  * Inputs:
      * diffList, a list (Macaulay2Doc), A List of RingElements.
        The resulting DGAlgebra will be defined over the ring of these
        elements.
  * Optional inputs (Macaulay2Doc),:
      * Variable, => ..., default value "T", Returns
        the Koszul complex as a DGAlgebra
  * Outputs:
      * A, an instance of the type DGAlgebra,

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

  * koszulComplexDGA(List) -- Define the
    Koszul complex on a list of elements as a DGAlgebra

liftToDGMap -- Lift a ring homomorphism in degree zero to a DG algebra morphism
*******************************************************************************

Synopsis
========

  * Usage:
        phiTilde = liftToDGMap(B,A,phi)
  * Inputs:
      * B, an instance of the type DGAlgebra, Target
      * A, an instance of the type DGAlgebra, Source
      * phi, a ring map (Macaulay2Doc), Map from A in degree
        zero to B in degree zero
  * Optional inputs (Macaulay2Doc),:
      * EndDegree => ..., default value -1
  * Outputs:
      * phiTilde, an instance of the type DGAlgebraMap,
        DGAlgebraMap lifting phi to a map of DGAlgebras.

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

In order for phiTilde to be defined, phi of the image of the differential of A
in degree 1 must lie in the image of the differential of B in degree 1.  At
present, this condition is not checked.

+-----------------------------------------------------------------------------+
|i1 : R = ZZ/101[a,b,c]/ideal{a^3,b^3,c^3}                                    |
|                                                                             |
|o1 = R                                                                       |
|                                                                             |
|o1 : QuotientRing                                                            |
+-----------------------------------------------------------------------------+
|i2 : S = R/ideal{a^2*b^2*c^2}                                                |
|                                                                             |
|o2 = S                                                                       |
|                                                                             |
|o2 : QuotientRing                                                            |
+-----------------------------------------------------------------------------+
|i3 : f = map(S,R)                                                            |
|                                                                             |
|o3 = map (S, R, {a, b, c})                                                   |
|                                                                             |
|o3 : RingMap S <--- R                                                        |
+-----------------------------------------------------------------------------+
|i4 : A = acyclicClosure(R,EndDegree=>3)                                      |
|                                                                             |
|o4 = {Ring => R                                  }                           |
|      Underlying algebra => R[T ..T ]                                        |
|                               1   6                                         |
|                                 2     2     2                               |
|      Differential => {a, b, c, a T , b T , c T }                            |
|                                   1     2     3                             |
|                                                                             |
|o4 : DGAlgebra                                                               |
+-----------------------------------------------------------------------------+
|i5 : B = acyclicClosure(S,EndDegree=>3)                                      |
|                                                                             |
|o5 = {Ring => S                                                              |
|      Underlying algebra => S[T ..T  ]                                       |
|                               1   16                                        |
|                                 2     2     2       2 2     2 2      2 2    |
|      Differential => {a, b, c, a T , b T , c T , a*b c T , b c T , -a b T , |
|                                   1     2     3         1       4        6  |
|                                                                             |
|o5 : DGAlgebra                                                               |
|-----------------------------------------------------------------------------|
|                                                                }            |
|                                                                             |
|                                                                             |
|  2 2     2 2        2 2       2 2        2       2       2                  |
|-a c T , b c T T , -a c T T , b c T T , -a T T , c T T , b T T }             |
|      5       3 4        3 5       2 4      1 7     3 7     2 7              |
+-----------------------------------------------------------------------------+
|i6 : phi = liftToDGMap(B,A,f)                                                |
|                                                                             |
|o6 = map (S[T ..T  ], R[T ..T ], {T , T , T , T , T , T , a, b, c})          |
|             1   16      1   6     1   2   3   4   5   6                     |
|                                                                             |
|o6 : DGAlgebraMap                                                            |
+-----------------------------------------------------------------------------+
|i7 : toComplexMap(phi,EndDegree=>3)                                          |
|                                                                             |
|                                         1                                   |
|o7 = 0 : cokernel | a2b2c2 | <--------- R  : 0                               |
|                                | 1 |                                        |
|                                                                             |
|                                                                   3         |
|     1 : cokernel {1} | a2b2c2 0      0      | <----------------- R  : 1     |
|                  {1} | 0      a2b2c2 0      |    {1} | 1 0 0 |              |
|                  {1} | 0      0      a2b2c2 |    {1} | 0 1 0 |              |
|                                                  {1} | 0 0 1 |              |
|                                                                             |
|                                                                             |
|     2 : cokernel {2} | a2b2c2 0      0      0      0      0      0          |
|                  {2} | 0      a2b2c2 0      0      0      0      0          |
|                  {2} | 0      0      a2b2c2 0      0      0      0          |
|                  {3} | 0      0      0      a2b2c2 0      0      0          |
|                  {3} | 0      0      0      0      a2b2c2 0      0          |
|                  {3} | 0      0      0      0      0      a2b2c2 0          |
|                  {6} | 0      0      0      0      0      0      a2b2c2     |
|                                                                             |
|                                                                             |
|                                                                             |
|     3 : cokernel {3} | a2b2c2 0      0      0      0      0      0          |
|                  {4} | 0      a2b2c2 0      0      0      0      0          |
|                  {4} | 0      0      a2b2c2 0      0      0      0          |
|                  {4} | 0      0      0      a2b2c2 0      0      0          |
|                  {4} | 0      0      0      0      a2b2c2 0      0          |
|                  {4} | 0      0      0      0      0      a2b2c2 0          |
|                  {4} | 0      0      0      0      0      0      a2b2c2     |
|                  {4} | 0      0      0      0      0      0      0          |
|                  {4} | 0      0      0      0      0      0      0          |
|                  {4} | 0      0      0      0      0      0      0          |
|                  {7} | 0      0      0      0      0      0      0          |
|                  {7} | 0      0      0      0      0      0      0          |
|                  {7} | 0      0      0      0      0      0      0          |
|                  {7} | 0      0      0      0      0      0      0          |
|                  {7} | 0      0      0      0      0      0      0          |
|                  {7} | 0      0      0      0      0      0      0          |
|                                                                             |
|                                                                             |
|o7 : ChainComplexMap                                                         |
|-----------------------------------------------------------------------------|
|                            6                                                |
|| <----------------------- R  : 2                                            |
||    {2} | 1 0 0 0 0 0 |                                                     |
||    {2} | 0 1 0 0 0 0 |                                                     |
||    {2} | 0 0 1 0 0 0 |                                                     |
||    {3} | 0 0 0 1 0 0 |                                                     |
||    {3} | 0 0 0 0 1 0 |                                                     |
||    {3} | 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      0      |             |
|0      0      0      0      0      0      0      0      0      |             |
|0      0      0      0      0      0      0      0      0      |             |
|0      0      0      0      0      0      0      0      0      |             |
|0      0      0      0      0      0      0      0      0      |             |
|0      0      0      0      0      0      0      0      0      |             |
|a2b2c2 0      0      0      0      0      0      0      0      |             |
|0      a2b2c2 0      0      0      0      0      0      0      |             |
|0      0      a2b2c2 0      0      0      0      0      0      |             |
|0      0      0      a2b2c2 0      0      0      0      0      |             |
|0      0      0      0      a2b2c2 0      0      0      0      |             |
|0      0      0      0      0      a2b2c2 0      0      0      |             |
|0      0      0      0      0      0      a2b2c2 0      0      |             |
|0      0      0      0      0      0      0      a2b2c2 0      |             |
|0      0      0      0      0      0      0      0      a2b2c2 |             |
|                                                                             |
|-----------------------------------------------------------------------------|
|                                  10                                         |
|<------------------------------- R   : 3                                     |
|   {3} | 1 0 0 0 0 0 0 0 0 0 |                                               |
|   {4} | 0 1 0 0 0 0 0 0 0 0 |                                               |
|   {4} | 0 0 1 0 0 0 0 0 0 0 |                                               |
|   {4} | 0 0 0 1 0 0 0 0 0 0 |                                               |
|   {4} | 0 0 0 0 1 0 0 0 0 0 |                                               |
|   {4} | 0 0 0 0 0 1 0 0 0 0 |                                               |
|   {4} | 0 0 0 0 0 0 1 0 0 0 |                                               |
|   {4} | 0 0 0 0 0 0 0 1 0 0 |                                               |
|   {4} | 0 0 0 0 0 0 0 0 1 0 |                                               |
|   {4} | 0 0 0 0 0 0 0 0 0 1 |                                               |
|   {7} | 0 0 0 0 0 0 0 0 0 0 |                                               |
|   {7} | 0 0 0 0 0 0 0 0 0 0 |                                               |
|   {7} | 0 0 0 0 0 0 0 0 0 0 |                                               |
|   {7} | 0 0 0 0 0 0 0 0 0 0 |                                               |
|   {7} | 0 0 0 0 0 0 0 0 0 0 |                                               |
|   {7} | 0 0 0 0 0 0 0 0 0 0 |                                               |
+-----------------------------------------------------------------------------+

Ways to use liftToDGMap :
=========================

  * "liftToDGMap(DGAlgebra,DGAlgebra,RingMap)"

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

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

masseyTripleProduct -- Computes the Massey triple product of a set of cycles or homology classes
************************************************************************************************

Synopsis
========

  * Usage:
        h = masseyTripleProduct(A,h1,h2,h3)
  * Inputs:
      * A, an instance of the type DGAlgebra,
      * h1, a ring element (Macaulay2Doc),
      * h2, a ring element (Macaulay2Doc),
      * h3, a ring element (Macaulay2Doc),
  * Outputs:
      * h, a ring element (Macaulay2Doc), The return value
        is either the homology class of the Massey triple product defined by
        the inputs or a cycle representing the homology class.

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

These functions compute the Massey triple product of either three homology
classes or three cycles that represent nonzero homology classes for which the
Massey triple product is defined.

For an example, we return to an example due to Lukas Katthan which was
discussed in isGolod. First, we define the algebra:

+-----------------------------------------------------------------------------+
|i1 : Q = QQ[x_1,x_2,y_1,y_2,z]                                               |
|                                                                             |
|o1 = Q                                                                       |
|                                                                             |
|o1 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i2 : I = ideal (x_1*x_2^2,y_1*y_2^2,z^3,x_1*x_2*y_1*y_2,y_2^2*z^2,x_2^2*z^2,x|
|                                                                             |
|               2     2   3             2 2   2 2          2 2                |
|o2 = ideal (x x , y y , z , x x y y , y z , x z , x y z, x y z)              |
|             1 2   1 2       1 2 1 2   2     2     1 1    2 2                |
|                                                                             |
|o2 : Ideal of Q                                                              |
|-----------------------------------------------------------------------------|
|_1*y_1*z,x_2^2*y_2^2*z)                                                      |
+-----------------------------------------------------------------------------+
|i3 : R = Q/I                                                                 |
|                                                                             |
|o3 = R                                                                       |
|                                                                             |
|o3 : QuotientRing                                                            |
+-----------------------------------------------------------------------------+
|i4 : KR = koszulComplexDGA R                                                 |
|                                                                             |
|o4 = {Ring => R                          }                                   |
|      Underlying algebra => R[T ..T ]                                        |
|                               1   5                                         |
|      Differential => {x , x , y , y , z}                                    |
|                        1   2   1   2                                        |
|                                                                             |
|o4 : DGAlgebra                                                               |
+-----------------------------------------------------------------------------+

The following are cycles:

+-------------------+
|i5 : z1 = z^2*T_5  |
|                   |
|      2            |
|o5 = z T           |
|        5          |
|                   |
|o5 : R[T ..T ]     |
|        1   5      |
+-------------------+
|i6 : z2 = y_2^2*T_3|
|                   |
|      2            |
|o6 = y T           |
|      2 3          |
|                   |
|o6 : R[T ..T ]     |
|        1   5      |
+-------------------+
|i7 : z3 = x_2^2*T_1|
|                   |
|      2            |
|o7 = x T           |
|      2 1          |
|                   |
|o7 : R[T ..T ]     |
|        1   5      |
+-------------------+

and z1*z2, z2*z3 vanish in homology:

+------------------------------------------------------+
|i8 : (lifted12,lift12) = getBoundaryPreimage(KR,z1*z2)|
|                                                      |
|o8 = (true, 0)                                        |
|                                                      |
|o8 : Sequence                                         |
+------------------------------------------------------+
|i9 : (lifted23,lift23) = getBoundaryPreimage(KR,z2*z3)|
|                                                      |
|               2                                      |
|o9 = (true, x y T T T  - x x y T T T )                |
|             2 2 1 2 3    1 2 2 2 3 4                 |
|                                                      |
|o9 : Sequence                                         |
+------------------------------------------------------+

Note that the first return value of getBoundaryPreimage,
indicates that the inputs are indeed boundaries, and the
second value is the lift of the boundary along the differential.

Given cycles z1,z2,z3 such that z1*z2 and z2*z3 are boundaries, the Massey
triple product of the homology classes represented by z1,z2 and z3 is the
homology class of lift12*z3 + z1*lift23.  To see this, we compute and check:

+---------------------------------------------------------------+
|i10 : z123 = masseyTripleProduct(KR,z1,z2,z3)                  |
|Finding easy relations           :      -- used 1.33468 seconds|
|                                                               |
|             2                                                 |
|o10 = x x y z T T T T                                          |
|       1 2 2   2 3 4 5                                         |
|                                                               |
|o10 : R[T ..T ]                                                |
|         1   5                                                 |
+---------------------------------------------------------------+
|i11 : z123 == lift12*z3 + z1*lift23                            |
|                                                               |
|o11 = true                                                     |
+---------------------------------------------------------------+

One may also compute Massey triple products directly on elements of the
homology algebra itself, as is seen with the command masseyTripleProduct:

+---------------------------------------------+
|i12 : H = HH(KR)                             |
|                                             |
|o12 = H                                      |
|                                             |
|o12 : QuotientRing                           |
+---------------------------------------------+
|i13 : h1 = homologyClass(KR,z1)              |
|                                             |
|o13 = X                                      |
|       4                                     |
|                                             |
|o13 : H                                      |
+---------------------------------------------+
|i14 : h2 = homologyClass(KR,z2)              |
|                                             |
|o14 = X                                      |
|       3                                     |
|                                             |
|o14 : H                                      |
+---------------------------------------------+
|i15 : h3 = homologyClass(KR,z3)              |
|                                             |
|o15 = X                                      |
|       2                                     |
|                                             |
|o15 : H                                      |
+---------------------------------------------+
|i16 : h123 = masseyTripleProduct(KR,h1,h2,h3)|
|                                             |
|o16 = -X                                     |
|        31                                   |
|                                             |
|o16 : H                                      |
+---------------------------------------------+
|i17 : h123 == homologyClass(KR,z123)         |
|                                             |
|o17 = true                                   |
+---------------------------------------------+

Ways to use masseyTripleProduct :
=================================

  * "masseyTripleProduct(DGAlgebra,RingElement,RingElement,RingElement)"
  * masseyTripleProduct(DGAlgebra,ZZ,ZZ,ZZ)
    -- Computes the matrix
    representing all triple Massey operations.

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

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

masseyTripleProduct(DGAlgebra,ZZ,ZZ,ZZ) -- Computes the matrix representing all triple Massey operations.
*********************************************************************************************************

Synopsis
========

  * Function: masseyTripleProduct,
  * Usage:
        mat = masseyTripleProduct(A,l,m,n)
  * Inputs:
      * A, an instance of the type DGAlgebra,
      * l, an integer (Macaulay2Doc),
      * m, an integer (Macaulay2Doc),
      * n, an integer (Macaulay2Doc),
  * Outputs:
      * mat, a matrix (Macaulay2Doc),

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

Given a triple of homology classes h1,h2,h3, such that h1h2 = h2h3 = 0, the
Massey triple product of h1,h2 and h3 may be defined as in
masseyTripleProduct.  This command computes a basis of
the homology algebra of A in degrees l,m and n respectively, and expresses the
triple Massey operation of each triple, provided it is defined.  If a triple
product is not defined (i.e. if either h1h2 or h2h3 is not zero) then the
triple product is reported as zero in the matrix.

The following example appears in "On the Hopf algebra of a Local Ring" by
Avramov as an example of a nonvanishing Massey operation which an algebra
generator:

+-----------------------------------------------------------------------------+
|i1 : Q = QQ[t_1,t_2,t_3,t_4]                                                 |
|                                                                             |
|o1 = Q                                                                       |
|                                                                             |
|o1 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i2 : I = ideal (t_1^3,t_2^3,t_3^3-t_1*t_2^2,t_1^2*t_3^2,t_1*t_2*t_3^2,t_2^2*t|
|                                                                             |
|             3   3       2    3   2 2       2   2     2                      |
|o2 = ideal (t , t , - t t  + t , t t , t t t , t t , t )                     |
|             1   2     1 2    3   1 3   1 2 3   2 4   4                      |
|                                                                             |
|o2 : Ideal of Q                                                              |
|-----------------------------------------------------------------------------|
|_4,t_4^2)                                                                    |
+-----------------------------------------------------------------------------+
|i3 : R = Q/I                                                                 |
|                                                                             |
|o3 = R                                                                       |
|                                                                             |
|o3 : QuotientRing                                                            |
+-----------------------------------------------------------------------------+
|i4 : KR = koszulComplexDGA R                                                 |
|                                                                             |
|o4 = {Ring => R                       }                                      |
|      Underlying algebra => R[T ..T ]                                        |
|                               1   4                                         |
|      Differential => {t , t , t , t }                                       |
|                        1   2   3   4                                        |
|                                                                             |
|o4 : DGAlgebra                                                               |
+-----------------------------------------------------------------------------+
|i5 : H = HH(KR)                                                              |
|Finding easy relations           :      -- used 0.392682 seconds             |
|                                                                             |
|o5 = H                                                                       |
|                                                                             |
|o5 : QuotientRing                                                            |
+-----------------------------------------------------------------------------+
|i6 : masseys = masseyTripleProduct(KR,1,1,1);                                |
|                                                                             |
|              5        343                                                   |
|o6 : Matrix QQ  <--- QQ                                                      |
+-----------------------------------------------------------------------------+
|i7 : rank masseys                                                            |
|                                                                             |
|o7 = 1                                                                       |
+-----------------------------------------------------------------------------+

As you can see, this command is useful to determine the number of linearly
independent elements that arise as triple Massey products.

For example, the following Massey triple product is nonvanishing and is an
algebra generator:

+----------------------------------------+
|i8 : masseyTripleProduct(KR,X_2,X_4,X_1)|
|                                        |
|o8 = X                                  |
|      21                                |
|                                        |
|o8 : H                                  |
+----------------------------------------+

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

  * masseyTripleProduct(DGAlgebra,ZZ,ZZ,ZZ)
    -- Computes the matrix
    representing all triple Massey operations.

maxDegree -- Computes the maximum homological degree of a DGAlgebra
*******************************************************************

Synopsis
========

  * Usage:
        mDegree = maxDegree(A)
  * Inputs:
      * A, an instance of the type DGAlgebra,
  * Outputs:
      * mDegree, an integer (Macaulay2Doc), The maximum degree of the
        DGAlgebra A (this can be infinite).

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

Note that if the DGAlgebra A has any generators of even degree, then maxDegree
returns infinity.

+-----------------------------------------------------------+
|i1 : R = ZZ/101[a,b,c,d]/ideal{a^3,b^3,c^3,d^3}            |
|                                                           |
|o1 = R                                                     |
|                                                           |
|o1 : QuotientRing                                          |
+-----------------------------------------------------------+
|i2 : A = koszulComplexDGA(R)                               |
|                                                           |
|o2 = {Ring => R                      }                     |
|      Underlying algebra => R[T ..T ]                      |
|                               1   4                       |
|      Differential => {a, b, c, d}                         |
|                                                           |
|o2 : DGAlgebra                                             |
+-----------------------------------------------------------+
|i3 : B = acyclicClosure(A,EndDegree=>3)                    |
|                                                           |
|o3 = {Ring => R                                           }|
|      Underlying algebra => R[T ..T ]                      |
|                               1   8                       |
|                                    2     2     2     2    |
|      Differential => {a, b, c, d, a T , b T , c T , d T } |
|                                      1     2     3     4  |
|                                                           |
|o3 : DGAlgebra                                             |
+-----------------------------------------------------------+
|i4 : maxDegree(A)                                          |
|                                                           |
|o4 = 4                                                     |
+-----------------------------------------------------------+
|i5 : maxDegree(B)                                          |
|                                                           |
|o5 = infinity                                              |
|                                                           |
|o5 : InfiniteNumber                                        |
+-----------------------------------------------------------+

Ways to use maxDegree :
=======================

  * "maxDegree(DGAlgebra)"

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

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

natural -- The underlying algebra of a DGAlgebra.
*************************************************

Synopsis
========

  * Usage:
        Anat = A.natural

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

+-------------------------------------------------+
|i1 : R = ZZ/101[a,b,c,d]                         |
|                                                 |
|o1 = R                                           |
|                                                 |
|o1 : PolynomialRing                              |
+-------------------------------------------------+
|i2 : A = koszulComplexDGA(R)                     |
|                                                 |
|o2 = {Ring => R                      }           |
|      Underlying algebra => R[T ..T ]            |
|                               1   4             |
|      Differential => {a, b, c, d}               |
|                                                 |
|o2 : DGAlgebra                                   |
+-------------------------------------------------+
|i3 : A.natural                                   |
|                                                 |
|o3 = R[T ..T ]                                   |
|        1   4                                    |
|                                                 |
|o3 : PolynomialRing, 4 skew commutative variables|
+-------------------------------------------------+

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

The object natural, is a symbol (Macaulay2Doc).

net(DGAlgebra) -- Outputs the pertinent information about a DGAlgebra
*********************************************************************

Synopsis
========

  * Function: net (Macaulay2Doc),
  * Usage:
        net A
  * Inputs:
      * A, an instance of the type DGAlgebra,
  * Outputs:
      * a net (Macaulay2Doc),

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

  * net(DGAlgebra) -- Outputs the pertinent
    information about a DGAlgebra

net(DGAlgebraMap) -- Outputs the pertinent information about a DGAlgebraMap
***************************************************************************

Synopsis
========

  * Function: net (Macaulay2Doc),
  * Usage:
        net phi
  * Inputs:
      * phi, an instance of the type DGAlgebraMap,
  * Outputs:
      * a net (Macaulay2Doc),

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

  * net(DGAlgebraMap) -- Outputs the pertinent
    information about a DGAlgebraMap

RelDegreeLimit -- Option to specify the maximum degree to look for relations
****************************************************************************

Synopsis
========

  * Usage:
        homologyAlgebra(...,RelDegreeLimit=>n)

Functions with optional argument named RelDegreeLimit :
=======================================================

  * homologyAlgebra(...,RelDegreeLimit=>...)
    -- Option to
    specify the maximum degree to look for relations
  * torAlgebra(...,RelDegreeLimit=>...)
    -- Option to specify
    the maximum degree to look for relations

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

The object RelDegreeLimit, is a symbol (Macaulay2Doc).

setDiff -- Sets the differential of a DGAlgebra manually.
*********************************************************

Synopsis
========

  * Usage:
        d = setDiff(A,diffList)
  * Inputs:
      * A, an instance of the type DGAlgebra,
      * A, a list (Macaulay2Doc),
  * Optional inputs (Macaulay2Doc),:
      * InitializeComplex => ..., default value true
      * InitializeDegreeZeroHomology => ..., default value true
  * Outputs:
      * A, an instance of the type DGAlgebra, The DGAlgebra
        with the differential now set.

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

+----------------------------------------------------------+
|i1 : R = ZZ/101[x,y,z]                                    |
|                                                          |
|o1 = R                                                    |
|                                                          |
|o1 : PolynomialRing                                       |
+----------------------------------------------------------+
|i2 : A = freeDGAlgebra(R,{{1},{1},{1},{3}})               |
|                                                          |
|o2 = {Ring => R                      }                    |
|      Underlying algebra => R[T ..T ]                     |
|                               1   4                      |
|      Differential => null                                |
|                                                          |
|o2 : DGAlgebra                                            |
+----------------------------------------------------------+
|i3 : setDiff(A,{x,y,z,x*T_2*T_3-y*T_1*T_3+z*T_1*T_2})     |
|                                                          |
|o3 = {Ring => R                                          }|
|      Underlying algebra => R[T ..T ]                     |
|                               1   4                      |
|      Differential => {x, y, z, z*T T  - y*T T  + x*T T } |
|                                   1 2      1 3      2 3  |
|                                                          |
|o3 : DGAlgebra                                            |
+----------------------------------------------------------+
|i4 : Add = toComplex A                                    |
|                                                          |
|      1      3      3      2      3      3      1         |
|o4 = R  <-- R  <-- R  <-- R  <-- R  <-- R  <-- R          |
|                                                          |
|     0      1      2      3      4      5      6          |
|                                                          |
|o4 : ChainComplex                                         |
+----------------------------------------------------------+
|i5 : Add.dd                                               |
|                                                          |
|          1                 3                             |
|o5 = 0 : R  <------------- R  : 1                         |
|               | x y z |                                  |
|                                                          |
|          3                    3                          |
|     1 : R  <---------------- R  : 2                      |
|               | -y -z 0  |                               |
|               | x  0  -z |                               |
|               | 0  x  y  |                               |
|                                                          |
|          3                 2                             |
|     2 : R  <------------- R  : 3                         |
|               | z  z  |                                  |
|               | -y -y |                                  |
|               | x  x  |                                  |
|                                                          |
|          2                    3                          |
|     3 : R  <---------------- R  : 4                      |
|               | -x -y -z |                               |
|               | x  y  z  |                               |
|                                                          |
|          3                    3                          |
|     4 : R  <---------------- R  : 5                      |
|               | -y -z 0  |                               |
|               | x  0  -z |                               |
|               | 0  x  y  |                               |
|                                                          |
|          3              1                                |
|     5 : R  <---------- R  : 6                            |
|               | z  |                                     |
|               | -y |                                     |
|               | x  |                                     |
|                                                          |
|o5 : ChainComplexMap                                      |
+----------------------------------------------------------+

There are two options that are available for this function, and both are
designed to bypass certain initializations that take place by default.

The option InitializeComplex specifies whether or not to compute all
differentials of the complex(up to the sum of the degrees of the odd degree
generators) before returning from setDiff.  This is useful if your DGAlgebra
has a large number of generators in odd degrees, and you are only interested in
computing the homology in low degrees.  The default value of this option is
true.

The option InitializeDegreeZeroHomology specifies whether or not to define the
quotient ring H_0(A).  This is used when computing HH(A) as a DGAlgebra.  This
involves computing a Grobner basis of the image of the first differential of A,
and as such, may want to be avoided if there are a large number of DGAlgebra
generators in degree 1.  The default value of this options is true.

Ways to use setDiff :
=====================

  * "setDiff(DGAlgebra,List)"

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

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

source(DGAlgebraMap) -- Outputs the source of a DGAlgebraMap
************************************************************

Synopsis
========

  * Function: source (Macaulay2Doc),
  * Usage:
        source phi
  * Inputs:
      * phi, an instance of the type DGAlgebraMap,

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

  * source(DGAlgebraMap) -- Outputs the source
    of a DGAlgebraMap

StartDegree -- Option to specify the degree to start computing the acyclic closure and killing cycles
*****************************************************************************************************

Synopsis
========

  * Usage:
        acyclicClosure(...,StartDegree=>n)

Functions with optional argument named StartDegree :
====================================================

  * acyclicClosure(...,StartDegree=>...)
    -- Option to
    specify the degree to start computing the acyclic closure
  * getGenerators(...,StartDegree=>...)
    -- Option to specify
    the degree to start finding generators of HH(DGAlgebra)
  * killCycles(...,StartDegree=>...)
    -- Option to specify
    the degree to start looking for cycles

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

The object StartDegree, is a symbol (Macaulay2Doc).

target(DGAlgebraMap) -- Outputs the target of a DGAlgebraMap
************************************************************

Synopsis
========

  * Function: target (Macaulay2Doc),
  * Usage:
        target phi
  * Inputs:
      * phi, an instance of the type DGAlgebraMap,

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

  * target(DGAlgebraMap) -- Outputs the target
    of a DGAlgebraMap

TMOLimit -- Option to specify the maximum arity of the trivial Massey operation
*******************************************************************************

Synopsis
========

  * Usage:
        findTrivialMasseyOperation(...,TMOLimit=>n)

Functions with optional argument named TMOLimit :
=================================================

  * findTrivialMasseyOperation(...,TMOLimit=>...)
    -- Option
    to specify the maximum arity of a trivial Massey operation, if one exists.
  * isGolodHomomorphism(...,TMOLimit=>...)
    -- Option to
    specify the maximum degree to look for generators when computing the
    deviations

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

The object TMOLimit, is a symbol (Macaulay2Doc).

toComplex -- Converts a DGAlgebra to a ChainComplex
***************************************************

Synopsis
========

  * Usage:
        C = toComplex A or C = toComplex(A,n)
  * Inputs:
      * A, an instance of the type DGAlgebra,
  * Outputs:
      * C, a chain complex (Macaulay2Doc), The DG algebra A
        as a ChainComplex

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

+-----------------------------------------------------------------------------+
|i1 : R = ZZ/101[x_1..x_10]                                                   |
|                                                                             |
|o1 = R                                                                       |
|                                                                             |
|o1 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i2 : A = koszulComplexDGA(R)                                                 |
|                                                                             |
|o2 = {Ring => R                                                }             |
|      Underlying algebra => R[T ..T  ]                                       |
|                               1   10                                        |
|      Differential => {x , x , x , x , x , x , x , x , x , x  }              |
|                        1   2   3   4   5   6   7   8   9   10               |
|                                                                             |
|o2 : DGAlgebra                                                               |
+-----------------------------------------------------------------------------+
|i3 : C = toComplex A                                                         |
|                                                                             |
|      1      10      45      120      210      252      210      120      45 |
|o3 = R  <-- R   <-- R   <-- R    <-- R    <-- R    <-- R    <-- R    <-- R   |
|                                                                             |
|     0      1       2       3        4        5        6        7        8   |
|                                                                             |
|o3 : ChainComplex                                                            |
|-----------------------------------------------------------------------------|
|     10      1                                                               |
|<-- R   <-- R                                                                |
|                                                                             |
|    9       10                                                               |
+-----------------------------------------------------------------------------+

Warning:  The term order that the internal command koszul uses to order the
monomials is not GRevLex, and so the differentials used in koszul and
koszulComplexDGA will not match up exactly.  Also, this command will only
execute if all of the variables of the DGAlgebra, A are of odd
homological degree.  Otherwise, you need to use the function
toComplex(DGAlgebra,ZZ).

Ways to use toComplex :
=======================

  * "toComplex(DGAlgebra)"
  * toComplex(DGAlgebra,ZZ) -- Converts a
    DGAlgebra to a ChainComplex

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

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

toComplex(DGAlgebra,ZZ) -- Converts a DGAlgebra to a ChainComplex
*****************************************************************

Synopsis
========

  * Function: toComplex,
  * Usage:
        C = toComplex A or C = toComplex(A,n)
  * Inputs:
      * A, an instance of the type DGAlgebra,
      * n, an integer (Macaulay2Doc),
  * Outputs:
      * C, a chain complex (Macaulay2Doc), The DG algebra A
        as a ChainComplex

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

+-----------------------------------------------------------+
|i1 : R = ZZ/101[a,b,c,d]/ideal{a^3,b^3,c^3,d^3}            |
|                                                           |
|o1 = R                                                     |
|                                                           |
|o1 : QuotientRing                                          |
+-----------------------------------------------------------+
|i2 : A = acyclicClosure(R,EndDegree=>3)                    |
|                                                           |
|o2 = {Ring => R                                           }|
|      Underlying algebra => R[T ..T ]                      |
|                               1   8                       |
|                                    2     2     2     2    |
|      Differential => {a, b, c, d, a T , b T , c T , d T } |
|                                      1     2     3     4  |
|                                                           |
|o2 : DGAlgebra                                             |
+-----------------------------------------------------------+

The above will be a resolution of the residue field over R, since R is a
complete intersection.

+-----------------------------------------------------------------------------+
|i3 : C = toComplex(A, 10)                                                    |
|                                                                             |
|      1      4      10      20      35      56      84      120      165     |
|o3 = R  <-- R  <-- R   <-- R   <-- R   <-- R   <-- R   <-- R    <-- R    <-- |
|                                                                             |
|     0      1      2       3       4       5       6       7        8        |
|                                                                             |
|o3 : ChainComplex                                                            |
|-----------------------------------------------------------------------------|
| 220      286                                                                |
|R    <-- R                                                                   |
|                                                                             |
|9        10                                                                  |
+-----------------------------------------------------------------------------+
|i4 : apply(10, i -> prune HH_i(C))                                           |
|                                                                             |
|o4 = {cokernel | d c b a |, 0, 0, 0, 0, 0, 0, 0, 0, 0}                       |
|                                                                             |
|o4 : List                                                                    |
+-----------------------------------------------------------------------------+

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

  * toComplex(DGAlgebra,ZZ) -- Converts a
    DGAlgebra to a ChainComplex

toComplexMap -- Construct the ChainComplexMap associated to a DGAlgebraMap
**************************************************************************

Synopsis
========

  * Usage:
        psi = toComplexMap phi
  * Inputs:
      * phi, an instance of the type DGAlgebraMap,
  * Optional inputs (Macaulay2Doc),:
      * AssertWellDefined => ..., default value true
      * EndDegree => ..., default value -1
  * Outputs:
      * psi, a chain complex map (Macaulay2Doc),

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

+------------------------------------------------------+
|i1 : R = ZZ/101[a,b,c]/ideal{a^3+b^3+c^3,a*b*c}       |
|                                                      |
|o1 = R                                                |
|                                                      |
|o1 : QuotientRing                                     |
+------------------------------------------------------+
|i2 : K1 = koszulComplexDGA(ideal vars R,Variable=>"Y")|
|                                                      |
|o2 = {Ring => R                      }                |
|      Underlying algebra => R[Y ..Y ]                 |
|                               1   3                  |
|      Differential => {a, b, c}                       |
|                                                      |
|o2 : DGAlgebra                                        |
+------------------------------------------------------+
|i3 : K2 = koszulComplexDGA(ideal {b,c},Variable=>"T") |
|                                                      |
|o3 = {Ring => R                      }                |
|      Underlying algebra => R[T ..T ]                 |
|                               1   2                  |
|      Differential => {b, c}                          |
|                                                      |
|o3 : DGAlgebra                                        |
+------------------------------------------------------+
|i4 : g = dgAlgebraMap(K1,K2,matrix{{Y_2,Y_3}})        |
|                                                      |
|o4 = map (R[Y ..Y ], R[T ..T ], {Y , Y , a, b, c})    |
|             1   3      1   2     2   3               |
|                                                      |
|o4 : DGAlgebraMap                                     |
+------------------------------------------------------+
|i5 : g' = toComplexMap g                              |
|                                                      |
|          1             1                             |
|o5 = 0 : R  <--------- R  : 0                         |
|               | 1 |                                  |
|                                                      |
|          3                   2                       |
|     1 : R  <--------------- R  : 1                   |
|               {1} | 0 0 |                            |
|               {1} | 1 0 |                            |
|               {1} | 0 1 |                            |
|                                                      |
|          3                 1                         |
|     2 : R  <------------- R  : 2                     |
|               {2} | 0 |                              |
|               {2} | 0 |                              |
|               {2} | 1 |                              |
|                                                      |
|o5 : ChainComplexMap                                  |
+------------------------------------------------------+

The option EndDegree, must be specified if the source of phi
has any algebra generators of even degree.  The option AssertWellDefined,
is used if one wishes to assert that the result of this
computation is indeed a chain map.  One can construct just the nth map in the
chain map by providing the second ZZ (Macaulay2Doc), parameter.

This function also works when working over different rings, such as the case
when the DGAlgebraMap, is produced via liftToDGMap,
and in the next example.  In this case, the target module is
produced via pushForward (Macaulay2Doc).

+-----------------------------------------------------------------------------+
|i6 : R = ZZ/101[a,b,c]/ideal{a^3,b^3,c^3}                                    |
|                                                                             |
|o6 = R                                                                       |
|                                                                             |
|o6 : QuotientRing                                                            |
+-----------------------------------------------------------------------------+
|i7 : S = R/ideal{a^2*b^2*c^2}                                                |
|                                                                             |
|o7 = S                                                                       |
|                                                                             |
|o7 : QuotientRing                                                            |
+-----------------------------------------------------------------------------+
|i8 : f = map(S,R)                                                            |
|                                                                             |
|o8 = map (S, R, {a, b, c})                                                   |
|                                                                             |
|o8 : RingMap S <--- R                                                        |
+-----------------------------------------------------------------------------+
|i9 : A = acyclicClosure(R,EndDegree=>3)                                      |
|                                                                             |
|o9 = {Ring => R                                  }                           |
|      Underlying algebra => R[T ..T ]                                        |
|                               1   6                                         |
|                                 2     2     2                               |
|      Differential => {a, b, c, a T , b T , c T }                            |
|                                   1     2     3                             |
|                                                                             |
|o9 : DGAlgebra                                                               |
+-----------------------------------------------------------------------------+
|i10 : B = acyclicClosure(S,EndDegree=>3)                                     |
|                                                                             |
|o10 = {Ring => S                                                             |
|       Underlying algebra => S[T ..T  ]                                      |
|                                1   16                                       |
|                                  2     2     2       2 2     2 2      2 2   |
|       Differential => {a, b, c, a T , b T , c T , a*b c T , b c T , -a b T ,|
|                                    1     2     3         1       4        6 |
|                                                                             |
|o10 : DGAlgebra                                                              |
|-----------------------------------------------------------------------------|
|                                                                }            |
|                                                                             |
|                                                                             |
|  2 2     2 2        2 2       2 2        2       2       2                  |
|-a c T , b c T T , -a c T T , b c T T , -a T T , c T T , b T T }             |
|      5       3 4        3 5       2 4      1 7     3 7     2 7              |
+-----------------------------------------------------------------------------+
|i11 : phi = liftToDGMap(B,A,f)                                               |
|                                                                             |
|o11 = map (S[T ..T  ], R[T ..T ], {T , T , T , T , T , T , a, b, c})         |
|              1   16      1   6     1   2   3   4   5   6                    |
|                                                                             |
|o11 : DGAlgebraMap                                                           |
+-----------------------------------------------------------------------------+
|i12 : toComplexMap(phi,EndDegree=>3)                                         |
|                                                                             |
|                                          1                                  |
|o12 = 0 : cokernel | a2b2c2 | <--------- R  : 0                              |
|                                 | 1 |                                       |
|                                                                             |
|                                                                    3        |
|      1 : cokernel {1} | a2b2c2 0      0      | <----------------- R  : 1    |
|                   {1} | 0      a2b2c2 0      |    {1} | 1 0 0 |             |
|                   {1} | 0      0      a2b2c2 |    {1} | 0 1 0 |             |
|                                                   {1} | 0 0 1 |             |
|                                                                             |
|                                                                             |
|      2 : cokernel {2} | a2b2c2 0      0      0      0      0      0         |
|                   {2} | 0      a2b2c2 0      0      0      0      0         |
|                   {2} | 0      0      a2b2c2 0      0      0      0         |
|                   {3} | 0      0      0      a2b2c2 0      0      0         |
|                   {3} | 0      0      0      0      a2b2c2 0      0         |
|                   {3} | 0      0      0      0      0      a2b2c2 0         |
|                   {6} | 0      0      0      0      0      0      a2b2c2    |
|                                                                             |
|                                                                             |
|                                                                             |
|      3 : cokernel {3} | a2b2c2 0      0      0      0      0      0         |
|                   {4} | 0      a2b2c2 0      0      0      0      0         |
|                   {4} | 0      0      a2b2c2 0      0      0      0         |
|                   {4} | 0      0      0      a2b2c2 0      0      0         |
|                   {4} | 0      0      0      0      a2b2c2 0      0         |
|                   {4} | 0      0      0      0      0      a2b2c2 0         |
|                   {4} | 0      0      0      0      0      0      a2b2c2    |
|                   {4} | 0      0      0      0      0      0      0         |
|                   {4} | 0      0      0      0      0      0      0         |
|                   {4} | 0      0      0      0      0      0      0         |
|                   {7} | 0      0      0      0      0      0      0         |
|                   {7} | 0      0      0      0      0      0      0         |
|                   {7} | 0      0      0      0      0      0      0         |
|                   {7} | 0      0      0      0      0      0      0         |
|                   {7} | 0      0      0      0      0      0      0         |
|                   {7} | 0      0      0      0      0      0      0         |
|                                                                             |
|                                                                             |
|o12 : ChainComplexMap                                                        |
|-----------------------------------------------------------------------------|
|                            6                                                |
|| <----------------------- R  : 2                                            |
||    {2} | 1 0 0 0 0 0 |                                                     |
||    {2} | 0 1 0 0 0 0 |                                                     |
||    {2} | 0 0 1 0 0 0 |                                                     |
||    {3} | 0 0 0 1 0 0 |                                                     |
||    {3} | 0 0 0 0 1 0 |                                                     |
||    {3} | 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      0      |             |
|0      0      0      0      0      0      0      0      0      |             |
|0      0      0      0      0      0      0      0      0      |             |
|0      0      0      0      0      0      0      0      0      |             |
|0      0      0      0      0      0      0      0      0      |             |
|0      0      0      0      0      0      0      0      0      |             |
|a2b2c2 0      0      0      0      0      0      0      0      |             |
|0      a2b2c2 0      0      0      0      0      0      0      |             |
|0      0      a2b2c2 0      0      0      0      0      0      |             |
|0      0      0      a2b2c2 0      0      0      0      0      |             |
|0      0      0      0      a2b2c2 0      0      0      0      |             |
|0      0      0      0      0      a2b2c2 0      0      0      |             |
|0      0      0      0      0      0      a2b2c2 0      0      |             |
|0      0      0      0      0      0      0      a2b2c2 0      |             |
|0      0      0      0      0      0      0      0      a2b2c2 |             |
|                                                                             |
|-----------------------------------------------------------------------------|
|                                  10                                         |
|<------------------------------- R   : 3                                     |
|   {3} | 1 0 0 0 0 0 0 0 0 0 |                                               |
|   {4} | 0 1 0 0 0 0 0 0 0 0 |                                               |
|   {4} | 0 0 1 0 0 0 0 0 0 0 |                                               |
|   {4} | 0 0 0 1 0 0 0 0 0 0 |                                               |
|   {4} | 0 0 0 0 1 0 0 0 0 0 |                                               |
|   {4} | 0 0 0 0 0 1 0 0 0 0 |                                               |
|   {4} | 0 0 0 0 0 0 1 0 0 0 |                                               |
|   {4} | 0 0 0 0 0 0 0 1 0 0 |                                               |
|   {4} | 0 0 0 0 0 0 0 0 1 0 |                                               |
|   {4} | 0 0 0 0 0 0 0 0 0 1 |                                               |
|   {7} | 0 0 0 0 0 0 0 0 0 0 |                                               |
|   {7} | 0 0 0 0 0 0 0 0 0 0 |                                               |
|   {7} | 0 0 0 0 0 0 0 0 0 0 |                                               |
|   {7} | 0 0 0 0 0 0 0 0 0 0 |                                               |
|   {7} | 0 0 0 0 0 0 0 0 0 0 |                                               |
|   {7} | 0 0 0 0 0 0 0 0 0 0 |                                               |
+-----------------------------------------------------------------------------+

Ways to use toComplexMap :
==========================

  * "toComplexMap(DGAlgebraMap)"
  * "toComplexMap(DGAlgebraMap,ZZ)"

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

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

torAlgebra -- Computes the Tor algebra of a ring
************************************************

Synopsis
========

  * Usage:
        torR = torAlgebra(R)
  * Inputs:
      * R, a ring (Macaulay2Doc),
  * Optional inputs (Macaulay2Doc),:
      * GenDegreeLimit,
        => ..., default value infinity, Option to specify the maximum
        degree to look for generators
      * RelDegreeLimit,
        => ..., default value infinity, Option to specify the maximum
        degree to look for relations
  * Outputs:
      * torR, a ring (Macaulay2Doc),

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

+-------------------------------------------------+
|i1 : R = ZZ/101[a,b,c,d]                         |
|                                                 |
|o1 = R                                           |
|                                                 |
|o1 : PolynomialRing                              |
+-------------------------------------------------+
|i2 : TorR = torAlgebra(R)                        |
|                                                 |
|o2 = TorR                                        |
|                                                 |
|o2 : PolynomialRing, 4 skew commutative variables|
+-------------------------------------------------+
|i3 : S = R/ideal{a^3,b^3,c^3,d^5}                |
|                                                 |
|o3 = S                                           |
|                                                 |
|o3 : QuotientRing                                |
+-------------------------------------------------+
|i4 : TorS = torAlgebra(S)                        |
|                                                 |
|o4 = TorS                                        |
|                                                 |
|o4 : PolynomialRing, 4 skew commutative variables|
+-------------------------------------------------+

The above example calculates the Tor algebra of R and S up to degree 3, by
default.  One can also specify the maximum degree to compute generators of the
Tor algebra by specifying the GenDegreeLimit option.

+---------------------------------------------------------------+
|i5 : R = ZZ/101[a,b,c,d]/ideal{a^3,b^3,c^3,d^3,a^2*b^2*c^3*d^2}|
|                                                               |
|o5 = R                                                         |
|                                                               |
|o5 : QuotientRing                                              |
+---------------------------------------------------------------+
|i6 : TorR = torAlgebra(R,GenDegreeLimit=>5)                    |
|                                                               |
|o6 = TorR                                                      |
|                                                               |
|o6 : PolynomialRing, 4 skew commutative variables              |
+---------------------------------------------------------------+

Ways to use torAlgebra :
========================

  * "torAlgebra(Ring)"
  * torAlgebra(Ring,Ring) -- Computes
    Tor_R(S,k) up to a specified generating and relating degree.

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

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

torAlgebra(...,GenDegreeLimit=>...) -- Option to specify the maximum degree to look for generators
**************************************************************************************************

Synopsis
========

  * Usage:
        torAlgebra(...,GenDegreeLimit=>n)

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

  * Default value: infinity (Macaulay2Doc),
  * Function: torAlgebra, -- Computes the Tor algebra of a
    ring
  * Option key: GenDegreeLimit, -- Option to specify the
    maximum degree to look for generators

Functions with optional argument named GenDegreeLimit :
=======================================================

  * findTrivialMasseyOperation(...,GenDegreeLimit=>...),
    --
    Option to specify the maximum degree to look for generators
  * homologyAlgebra(...,GenDegreeLimit=>...)
    -- Option to
    specify the maximum degree to look for generators
  * isGolodHomomorphism(...,GenDegreeLimit=>...)
    -- Option
    to specify the maximum degree to look for generators
  * isHomologyAlgebraTrivial(...,GenDegreeLimit=>...),
    --
    Option to specify the maximum degree to look for generators
  * torAlgebra(...,GenDegreeLimit=>...)
    -- Option to specify
    the maximum degree to look for generators
  * "torMap(...,GenDegreeLimit=>...)" -- see torMap, -- Compute
    the map of Tor algebras associated to a RingMap.

torAlgebra(...,RelDegreeLimit=>...) -- Option to specify the maximum degree to look for relations
*************************************************************************************************

Synopsis
========

  * Usage:
        torAlgebra(...,RelDegreeLimit=>n)

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

  * Default value: infinity (Macaulay2Doc),
  * Function: torAlgebra, -- Computes the Tor algebra of a
    ring
  * Option key: RelDegreeLimit, -- Option to specify the
    maximum degree to look for relations

Functions with optional argument named RelDegreeLimit :
=======================================================

  * homologyAlgebra(...,RelDegreeLimit=>...)
    -- Option to
    specify the maximum degree to look for relations
  * torAlgebra(...,RelDegreeLimit=>...)
    -- Option to specify
    the maximum degree to look for relations

torAlgebra(Ring,Ring) -- Computes Tor_R(S,k) up to a specified generating and relating degree.
**********************************************************************************************

Synopsis
========

  * Function: torAlgebra,
  * Usage:
        TorRS = torAlgebra(R,S,GenDegreeLimit=>m,RelDegreeLimit=>n)
  * Inputs:
      * R, a ring (Macaulay2Doc),
      * S, a ring (Macaulay2Doc),
  * Optional inputs (Macaulay2Doc),:
      * GenDegreeLimit,
        => ..., default value infinity, Option to specify the maximum
        degree to look for generators
      * RelDegreeLimit,
        => ..., default value infinity, Option to specify the maximum
        degree to look for relations
  * Outputs:
      * TorRS, a ring (Macaulay2Doc),

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

+----------------------------------------------------------------------+
|i1 : R = ZZ/101[a,b,c,d]/ideal{a^4,b^4,c^4,d^4}                       |
|                                                                      |
|o1 = R                                                                |
|                                                                      |
|o1 : QuotientRing                                                     |
+----------------------------------------------------------------------+
|i2 : M = coker matrix {{a^3*b^3*c^3*d^3}};                            |
+----------------------------------------------------------------------+
|i3 : S = R/ideal{a^3*b^3*c^3*d^3}                                     |
|                                                                      |
|o3 = S                                                                |
|                                                                      |
|o3 : QuotientRing                                                     |
+----------------------------------------------------------------------+
|i4 : HB = torAlgebra(R,S,GenDegreeLimit=>4,RelDegreeLimit=>8)         |
|Finding easy relations           :      -- used 1.0648 seconds        |
|                                                                      |
|o4 = HB                                                               |
|                                                                      |
|o4 : QuotientRing                                                     |
+----------------------------------------------------------------------+
|i5 : numgens HB                                                       |
|                                                                      |
|o5 = 35                                                               |
+----------------------------------------------------------------------+
|i6 : apply(5,i -> #(flatten entries getBasis(i,HB)))                  |
|                                                                      |
|o6 = {1, 1, 4, 10, 20}                                                |
|                                                                      |
|o6 : List                                                             |
+----------------------------------------------------------------------+
|i7 : Mres = res(M, LengthLimit=>8)                                    |
|                                                                      |
|      1      1      4      10      20      35      56      84      120|
|o7 = R  <-- R  <-- R  <-- R   <-- R   <-- R   <-- R   <-- R   <-- R   |
|                                                                      |
|     0      1      2      3       4       5       6       7       8   |
|                                                                      |
|o7 : ChainComplex                                                     |
+----------------------------------------------------------------------+

Note that in this example, $Tor_*^R(S,k)$ has trivial multiplication, since the
map from R to S is a Golod homomorphism by a theorem of Levin and Avramov.

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

  * torAlgebra(Ring,Ring) -- Computes
    Tor_R(S,k) up to a specified generating and relating degree.

torMap -- Compute the map of Tor algebras associated to a RingMap.
******************************************************************

Synopsis
========

  * Usage:
        torPhi = torMap(phi)
  * Inputs:
      * phi, a ring map (Macaulay2Doc),
  * Optional inputs (Macaulay2Doc),:
      * GenDegreeLimit => ..., default value 3
  * Outputs:
      * torPhi, a ring map (Macaulay2Doc),

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

The functor Tor_R(M,N) is also functorial in the ring argument.  Therefore, a
ring map phi from A to B induces an algebra map from the Tor algebra of A to
the Tor algebra of B.

+---------------------------------------------------------------------------+
|i1 : R = ZZ/101[a,b,c]/ideal{a^3,b^3,c^3,a^2*b^2*c^2}                      |
|                                                                           |
|o1 = R                                                                     |
|                                                                           |
|o1 : QuotientRing                                                          |
+---------------------------------------------------------------------------+
|i2 : S = R/ideal{a*b^2*c^2,a^2*b*c^2,a^2*b^2*c}                            |
|                                                                           |
|o2 = S                                                                     |
|                                                                           |
|o2 : QuotientRing                                                          |
+---------------------------------------------------------------------------+
|i3 : f = map(S,R)                                                          |
|                                                                           |
|o3 = map (S, R, {a, b, c})                                                 |
|                                                                           |
|o3 : RingMap S <--- R                                                      |
+---------------------------------------------------------------------------+
|i4 : fTor = torMap(f,GenDegreeLimit=>3)                                    |
|                                                                           |
|           ZZ            ZZ                                                |
|o4 = map (---[X ..X  ], ---[X ..X  ], {X , X , X , X , X , X , 0, 0, 0, 0})|
|          101  1   17   101  1   10     1   2   3   4   5   6              |
|                                                                           |
|              ZZ                ZZ                                         |
|o4 : RingMap ---[X ..X  ] <--- ---[X ..X  ]                                |
|             101  1   17       101  1   10                                 |
+---------------------------------------------------------------------------+
|i5 : matrix fTor                                                           |
|                                                                           |
|o5 = | X_1 X_2 X_3 X_4 X_5 X_6 0 0 0 0 |                                   |
|                                                                           |
|              ZZ          1        ZZ          10                          |
|o5 : Matrix (---[X ..X  ])  <--- (---[X ..X  ])                            |
|             101  1   17          101  1   17                              |
+---------------------------------------------------------------------------+

In the following example, the map on Tor is surjective, which means that the
ring homomorphism is large (Dress-Kramer).

+-----------------------------------------------------------------------------+
|i6 : R = ZZ/101[a,b,c,d]/ideal{a^3,b^3,c^3,d^3,a*c,a*d,b*c,b*d}              |
|                                                                             |
|o6 = R                                                                       |
|                                                                             |
|o6 : QuotientRing                                                            |
+-----------------------------------------------------------------------------+
|i7 : S = ZZ/101[a,b]/ideal{a^3,b^3}                                          |
|                                                                             |
|o7 = S                                                                       |
|                                                                             |
|o7 : QuotientRing                                                            |
+-----------------------------------------------------------------------------+
|i8 : f = map(S,R,matrix{{a,b,0,0}})                                          |
|                                                                             |
|o8 = map (S, R, {a, b, 0, 0})                                                |
|                                                                             |
|o8 : RingMap S <--- R                                                        |
+-----------------------------------------------------------------------------+
|i9 : fTor = torMap(f,GenDegreeLimit=>4)                                      |
|                                                                             |
|           ZZ           ZZ                                                   |
|o9 = map (---[X ..X ], ---[X ..X  ], {X , X , 0, 0, 0, 0, 0, 0, X , X , 0, 0,|
|          101  1   4   101  1   55     1   2                     3   4       |
|                                                                             |
|              ZZ               ZZ                                            |
|o9 : RingMap ---[X ..X ] <--- ---[X ..X  ]                                   |
|             101  1   4       101  1   55                                    |
|-----------------------------------------------------------------------------|
|0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,|
|-----------------------------------------------------------------------------|
|0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0})                          |
+-----------------------------------------------------------------------------+
|i10 : matrix fTor                                                            |
|                                                                             |
|o10 = | X_1 X_2 0 0 0 0 0 0 X_3 X_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 |                      |
|                                                                             |
|               ZZ         1        ZZ         55                             |
|o10 : Matrix (---[X ..X ])  <--- (---[X ..X ])                               |
|              101  1   4          101  1   4                                 |
+-----------------------------------------------------------------------------+

Ways to use torMap :
====================

  * "torMap(RingMap)"

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

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

zerothHomology -- Compute the zeroth homology of the DGAlgebra A as a ring.
***************************************************************************

Synopsis
========

  * Usage:
        HA0 = zerothHomology A
  * Inputs:
      * A, an instance of the type DGAlgebra,
  * Outputs:
      * HA0, a ring (Macaulay2Doc), HH_0(A) as a ring.

Ways to use zerothHomology :
============================

  * "zerothHomology(DGAlgebra)"

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

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