This is AssociativeAlgebras.info, produced by Macaulay2, version 1.21

AssociativeAlgebras -- Noncommutative algebra computations
**********************************************************

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

This code is in active development.  Currently 2-sided Groebner bases (up to
some degree) are implemented, and most features of NCAlgebra,
are available.  The package NCAlgebra uses curly braces to
define non-commutative rings whereas this package uses angle bar lists.

This package implements natively (i.e., in the Macaulay2 engine)
non-commutative rings (associative algebras), their (2-sided) Groebner bases,
bases, and a number of other features.

+-----------------------------------------------------------------------------+
|i1 : R = ZZ/32003<|a,b,c|>                                                   |
|                                                                             |
|o1 = R                                                                       |
|                                                                             |
|o1 : FreeAlgebra                                                             |
+-----------------------------------------------------------------------------+
|i2 : I = ideal(2*a*b + 3*b*a + 5*c^2,                                        |
|         2*b*c + 3*c*b + 5*a^2,                                              |
|         2*c*a + 3*a*c + 5*b^2)                                              |
|                                                                             |
|                            2    2                         2                 |
|o2 = ideal (2a*b + 3b*a + 5c , 5a  + 2b*c + 3c*b, 3a*c + 5b  + 2c*a)         |
|                                                                             |
|o2 : Ideal of R                                                              |
+-----------------------------------------------------------------------------+
|i3 : gbI = NCGB(I, 6);                                                       |
|Using numthreads = 0                                                         |
|                                                                             |
|             1       13                                                      |
|o3 : Matrix R  <--- R                                                        |
+-----------------------------------------------------------------------------+
|i4 : netList (ideal gbI)_*                                                   |
|                                                                             |
|     +-----------------------------------------------------------------------|
|     |                       2                                               |
|o4 = |a*b - 16000b*a - 15999c                                                |
|     +-----------------------------------------------------------------------|
|     | 2                                                                     |
|     |a  + 6401b*c - 6400c*b                                                 |
|     +-----------------------------------------------------------------------|
|     |            2                                                          |
|     |a*c - 10666b  - 10667c*a                                               |
|     +-----------------------------------------------------------------------|
|     | 2                         2         2                                 |
|     |b c + 13552b*c*b + 10667c*b  + 12138c a                                |
|     +-----------------------------------------------------------------------|
|     | 2           2                    2                                    |
|     |b a - 8487b*c  - 8961c*b*c + 5658c b                                   |
|     +-----------------------------------------------------------------------|
|     | 4                         3             2        2            3       |
|     |b  + 13781b*c*b*a - 7709b*c  - 11562c*b*c  + 2217c b*c - 12677c b      |
|     +-----------------------------------------------------------------------|
|     |     2           2           3                      2           4      |
|     |b*c*b  - 14216b*c a - 7130c*b  + 14570c*b*c*a - 938c b*a + 2648c       |
|     +-----------------------------------------------------------------------|
|     |                    2              4                             3     |
|     |b*c*b*c*a - 10377b*c b*a - 12227b*c  + 7414c*b*c*b*a + 13359c*b*c  + 17|
|     +-----------------------------------------------------------------------|
|     |                    2 2           3         2 3        2            3  |
|     |b*c*b*c*b + 12415b*c b  - 12892b*c a + 3317c b  - 6253c b*c*a - 449c b*|
|     +-----------------------------------------------------------------------|
|     |       2           2            3                         2         2  |
|     |b*c*b*c  - 10224b*c b*c + 437b*c b + 24c*b*c*b*c + 35c*b*c b + 2451c b*|
|     +-----------------------------------------------------------------------|
|     |   2   2          3             4              2               3       |
|     |b*c b*c  - 1629b*c b*c + 7434b*c b + 12905c*b*c b*c + 7093c*b*c b + 127|
|     +-----------------------------------------------------------------------|
|     |   2 3          3            5             2                4        2 |
|     |b*c b  - 3116b*c b*a - 869b*c  - 12458c*b*c b*a - 15666c*b*c  - 6767c b|
|     +-----------------------------------------------------------------------|
|     |   2                3             5            2               4       |
|     |b*c b*c*a + 13268b*c b*a + 3067b*c  + 7496c*b*c b*a + 8969c*b*c  - 4451|
|     +-----------------------------------------------------------------------|
|-----------------------------------------------------------------------------|
|-------------------------------------------------------------+               |
|                                                             |               |
|                                                             |               |
|-------------------------------------------------------------+               |
|                                                             |               |
|                                                             |               |
|-------------------------------------------------------------+               |
|                                                             |               |
|                                                             |               |
|-------------------------------------------------------------+               |
|                                                             |               |
|                                                             |               |
|-------------------------------------------------------------+               |
|                                                             |               |
|                                                             |               |
|-------------------------------------------------------------+               |
|                                                             |               |
|                                                             |               |
|-------------------------------------------------------------+               |
|                                                             |               |
|                                                             |               |
|-------------------------------------------------------------+               |
|   2   2         3          4                                |               |
|31c b*c  + 11348c b*c - 431c b                               |               |
|-------------------------------------------------------------+               |
|         5                                                   |               |
|a - 4931c                                                    |               |
|-------------------------------------------------------------+               |
|          3 2         4                                      |               |
|c*b - 413c b  + 10924c a                                     |               |
|-------------------------------------------------------------+               |
|   2               2   2         3             4 2         5 |               |
|17c b*c*b*c - 9457c b*c b + 2889c b*c*b + 3746c b  - 12788c a|               |
|-------------------------------------------------------------+               |
|              2   3        3   2        4            5       |               |
|*c*b*a - 9927c b*c  + 3248c b*c  - 5349c b*c + 11498c b      |               |
|-------------------------------------------------------------+               |
| 2                2   3         3   2        4           5   |               |
|c b*c*b*a + 14180c b*c  + 13165c b*c  - 8289c b*c - 3102c b  |               |
|-------------------------------------------------------------+               |
+-----------------------------------------------------------------------------+
|i5 : A = R/I -- only uses the Groebner basis already constructed, so only    |
|                                                                             |
|o5 = A                                                                       |
|                                                                             |
|o5 : FreeAlgebraQuotient                                                     |
|-----------------------------------------------------------------------------|
|valid in degrees <= 6                                                        |
+-----------------------------------------------------------------------------+
|i6 : ncBasis(3, A)                                                           |
|                                                                             |
|o6 = | b3 bca bcb bc2 cba cb2 cbc c2a c2b c3 |                               |
|                                                                             |
|             1       10                                                      |
|o6 : Matrix A  <--- A                                                        |
+-----------------------------------------------------------------------------+

Caveat
======

Not yet fully functional.  This package is a current work in progress.  The
interface will change (even basic things like Groebner bases and the basis
command still need to be hooked into the Macaulay2 groebnerBasis, basis
commands), and more functionality is expected to be added.

See also
========

  * Defining a noncommutative ring
  * Basic operations on noncommutative algebras
  * NCGB -- Compute a two-sided Groebner basis of an ideal to a
    specified degree
  * ncBasis -- Returns a basis of an noncommutative ring in
    specified degrees.

Authors
=======

  * Frank Moore (see https://math.wfu.edu/moore ) <moorewf@wfu.edu>
  * Mike Stillman (see http://www.math.cornell.edu/~mike )
    <mike@math.cornell.edu>

Version
=======

This documentation describes version 0.8 of AssociativeAlgebras.

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

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

Exports
=======

  * Types
      * Derivation -- Derivation defined on a noncommutative
        algebra
      * FreeAlgebra -- Type of a free algebra
      * "FreeAlgebraQuotient" -- see FreeAlgebra / Ideal,
        -- Type of a noncommutative ring
  * Functions and commands
      * centralElements -- Finds central elements in a
        given degree
      * "derivation" -- see Derivation, -- Derivation defined
        on a noncommutative algebra
      * endomorphismRingIdeal -- Find the
        relations of an endomorphism ring
      * extAlgebra -- Compute the Ext algebra of a ring
      * fourDimSklyanin -- Defines a four-dimensional
        Sklyanin with given parameters
      * freeAlgebra -- Create a FreeAlgebra
      * freeProduct -- Define the free product of two
        algebras
      * homogDual -- Computes the dual of a pure homogeneous
        ideal
      * isCentral -- Determines if an element is central
      * isLeftRegular -- Determines if a given
        (homogeneous) element is regular in a given degree
      * "isRightRegular" -- see isLeftRegular, --
        Determines if a given (homogeneous) element is regular in a given
        degree
      * leftMultiplicationMap -- Computes a
        matrix for left or right multiplication by a homogeneous element
      * "rightMultiplicationMap" -- see leftMultiplicationMap,
        -- Computes a matrix for left or right
        multiplication by a homogeneous element
      * leftQuadraticMatrix -- Factors the
        quadratic ideal on the left or on the right.
      * "rightQuadraticMatrix" -- see leftQuadraticMatrix,
        -- Factors the quadratic ideal on the left or on
        the right.
      * lineSchemeFourDim -- Compute the line scheme
        of a four-dimensional AS regular algebra
      * ncBasis -- Returns a basis of an noncommutative ring in
        specified degrees.
      * NCGB -- Compute a two-sided Groebner basis of an ideal to
        a specified degree
      * ncGraphIdeal -- Compute the graph ideal of a ring
        map between noncommutative rings.
      * ncHilbertSeries -- Computes the Hilbert series
        of a noncommutative ring
      * ncKernel -- Compute the graph ideal of a ring map
        between noncommutative rings.
      * ncMatrixMult -- Correctly multiplies matrices from
        noncommutative rings.
      * NCReductionTwoSided -- Reduces the entries
        of an Matrix with respect to an ideal
      * normalAutomorphism -- Computes the
        automorphism determined by a normal homogeneous element
      * normalElements -- Finds normal elements
      * oppositeRing -- Creates the opposite ring of a
        noncommutative ring
      * oreExtension -- Creates an Ore extension of a
        noncommutative ring
      * oreIdeal -- Creates the defining ideal of an Ore
        extension of a noncommutative ring
      * pointScheme -- Compute the point scheme of the
        quadratic algebra B
      * qTensorProduct -- Define the (q-)commuting
        tensor product
      * quadraticClosure -- Creates the subideal
        generated by quadratic elements of a given ideal
      * rightKernel -- Right kernel of a matrix
      * skewPolynomialRing -- Defines a skew
        polynomial ring via a skewing matrix
      * threeDimSklyanin -- Defines a
        three-dimensional Sklyanin with given parameters
      * toCommRing -- Compute the abelianization of a Ring
        and returns a Ring.
      * toFreeAlgebraQuotient -- Converts a Ring
        to a noncommutative ring
      * toRationalFunction -- Attempt to find a
        rational function representation.
  * Methods
      * "centralElements(Ring,ZZ)" -- see centralElements,
        -- Finds central elements in a given degree
      * "Derivation RingElement" -- see Derivation, --
        Derivation defined on a noncommutative algebra
      * "Derivation ZZ" -- see Derivation, -- Derivation
        defined on a noncommutative algebra
      * "derivation(FreeAlgebra,List)" -- see Derivation, --
        Derivation defined on a noncommutative algebra
      * "derivation(FreeAlgebra,List,RingMap)" -- see Derivation,
        -- Derivation defined on a noncommutative algebra
      * "derivation(FreeAlgebraQuotient,List)" -- see Derivation,
        -- Derivation defined on a noncommutative algebra
      * "derivation(FreeAlgebraQuotient,List,RingMap)" -- see Derivation,
        -- Derivation defined on a noncommutative algebra
      * "endomorphismRingIdeal(Module,Symbol)" -- see
        endomorphismRingIdeal, -- Find the relations of
        an endomorphism ring
      * "extAlgebra(Ring,Symbol)" -- see extAlgebra, --
        Compute the Ext algebra of a ring
      * "fourDimSklyanin(Ring,List)" -- see fourDimSklyanin,
        -- Defines a four-dimensional Sklyanin with given
        parameters
      * "fourDimSklyanin(Ring,List,List)" -- see fourDimSklyanin,
        -- Defines a four-dimensional Sklyanin with given
        parameters
      * "freeAlgebra(Ring,BasicList)" -- see freeAlgebra, --
        Create a FreeAlgebra
      * FreeAlgebra / Ideal -- Type of a
        noncommutative ring
      * "freeProduct(Ring,Ring)" -- see freeProduct, --
        Define the free product of two algebras
      * "homogDual(FreeAlgebra)" -- see homogDual, -- Computes
        the dual of a pure homogeneous ideal
      * "homogDual(FreeAlgebraQuotient)" -- see homogDual, --
        Computes the dual of a pure homogeneous ideal
      * "homogDual(Ideal)" -- see homogDual, -- Computes the
        dual of a pure homogeneous ideal
      * "isCentral(RingElement)" -- see isCentral, --
        Determines if an element is central
      * "isLeftRegular(RingElement,ZZ)" -- see isLeftRegular,
        -- Determines if a given (homogeneous) element is
        regular in a given degree
      * "isRightRegular(RingElement,ZZ)" -- see isLeftRegular,
        -- Determines if a given (homogeneous) element is
        regular in a given degree
      * isNormal(RingElement) -- Determines
        if an element of a noncommutative ring is normal
      * "leftMultiplicationMap(RingElement,List,List)" -- see
        leftMultiplicationMap, -- Computes a matrix for
        left or right multiplication by a homogeneous element
      * "leftMultiplicationMap(RingElement,ZZ)" -- see
        leftMultiplicationMap, -- Computes a matrix for
        left or right multiplication by a homogeneous element
      * "leftMultiplicationMap(RingElement,ZZ,ZZ)" -- see
        leftMultiplicationMap, -- Computes a matrix for
        left or right multiplication by a homogeneous element
      * "rightMultiplicationMap(RingElement,List,List)" -- see
        leftMultiplicationMap, -- Computes a matrix for
        left or right multiplication by a homogeneous element
      * "rightMultiplicationMap(RingElement,ZZ)" -- see
        leftMultiplicationMap, -- Computes a matrix for
        left or right multiplication by a homogeneous element
      * "rightMultiplicationMap(RingElement,ZZ,ZZ)" -- see
        leftMultiplicationMap, -- Computes a matrix for
        left or right multiplication by a homogeneous element
      * "leftQuadraticMatrix(Ideal)" -- see leftQuadraticMatrix,
        -- Factors the quadratic ideal on the left or on
        the right.
      * "leftQuadraticMatrix(List)" -- see leftQuadraticMatrix,
        -- Factors the quadratic ideal on the left or on
        the right.
      * "rightQuadraticMatrix(Ideal)" -- see leftQuadraticMatrix,
        -- Factors the quadratic ideal on the left or on
        the right.
      * "rightQuadraticMatrix(List)" -- see leftQuadraticMatrix,
        -- Factors the quadratic ideal on the left or on
        the right.
      * "lineSchemeFourDim(FreeAlgebraQuotient,Symbol)" -- see
        lineSchemeFourDim, -- Compute the line scheme of a
        four-dimensional AS regular algebra
      * "ncBasis(InfiniteNumber,InfiniteNumber,Ring)" -- see ncBasis,
        -- Returns a basis of an noncommutative ring in specified
        degrees.
      * "ncBasis(InfiniteNumber,List,Ring)" -- see ncBasis, --
        Returns a basis of an noncommutative ring in specified degrees.
      * "ncBasis(InfiniteNumber,ZZ,Ring)" -- see ncBasis, --
        Returns a basis of an noncommutative ring in specified degrees.
      * "ncBasis(List,InfiniteNumber,Ring)" -- see ncBasis, --
        Returns a basis of an noncommutative ring in specified degrees.
      * "ncBasis(List,List,Ring)" -- see ncBasis, -- Returns a
        basis of an noncommutative ring in specified degrees.
      * "ncBasis(List,Ring)" -- see ncBasis, -- Returns a basis
        of an noncommutative ring in specified degrees.
      * "ncBasis(Ring)" -- see ncBasis, -- Returns a basis of an
        noncommutative ring in specified degrees.
      * "ncBasis(ZZ,InfiniteNumber,Ring)" -- see ncBasis, --
        Returns a basis of an noncommutative ring in specified degrees.
      * "ncBasis(ZZ,Ring)" -- see ncBasis, -- Returns a basis of
        an noncommutative ring in specified degrees.
      * "ncBasis(ZZ,ZZ,Ring)" -- see ncBasis, -- Returns a basis
        of an noncommutative ring in specified degrees.
      * "NCGB(Ideal)" -- see NCGB, -- Compute a two-sided Groebner
        basis of an ideal to a specified degree
      * "NCGB(Ideal,ZZ)" -- see NCGB, -- Compute a two-sided
        Groebner basis of an ideal to a specified degree
      * "ncGraphIdeal(RingMap)" -- see ncGraphIdeal, --
        Compute the graph ideal of a ring map between noncommutative rings.
      * "ncHilbertSeries(FreeAlgebra)" -- see ncHilbertSeries,
        -- Computes the Hilbert series of a noncommutative
        ring
      * "ncHilbertSeries(FreeAlgebraQuotient)" -- see ncHilbertSeries,
        -- Computes the Hilbert series of a noncommutative
        ring
      * "ncKernel(RingMap)" -- see ncKernel, -- Compute the
        graph ideal of a ring map between noncommutative rings.
      * "ncMatrixMult(Matrix,Matrix)" -- see ncMatrixMult,
        -- Correctly multiplies matrices from noncommutative rings.
      * "NCReductionTwoSided(Matrix,Ideal)" -- see NCReductionTwoSided,
        -- Reduces the entries of an Matrix with respect
        to an ideal
      * "NCReductionTwoSided(Matrix,List)" -- see NCReductionTwoSided,
        -- Reduces the entries of an Matrix with respect
        to an ideal
      * "NCReductionTwoSided(Matrix,Matrix)" -- see NCReductionTwoSided,
        -- Reduces the entries of an Matrix with respect
        to an ideal
      * "NCReductionTwoSided(RingElement,Ideal)" -- see
        NCReductionTwoSided, -- Reduces the entries of an
        Matrix with respect to an ideal
      * "NCReductionTwoSided(RingElement,List)" -- see
        NCReductionTwoSided, -- Reduces the entries of an
        Matrix with respect to an ideal
      * "NCReductionTwoSided(RingElement,Matrix)" -- see
        NCReductionTwoSided, -- Reduces the entries of an
        Matrix with respect to an ideal
      * "normalAutomorphism(RingElement)" -- see normalAutomorphism,
        -- Computes the automorphism determined by a normal
        homogeneous element
      * "normalElements(FreeAlgebraQuotient,ZZ,Symbol)" -- see
        normalElements, -- Finds normal elements
      * normalElements(RingMap,ZZ), --
        Finds elements normalized by a ring map
      * "oppositeRing(FreeAlgebra)" -- see oppositeRing, --
        Creates the opposite ring of a noncommutative ring
      * "oppositeRing(FreeAlgebraQuotient)" -- see oppositeRing,
        -- Creates the opposite ring of a noncommutative ring
      * "oreExtension(Ring,RingMap,Derivation,RingElement)" -- see
        oreExtension, -- Creates an Ore extension of a
        noncommutative ring
      * "oreExtension(Ring,RingMap,Derivation,Symbol)" -- see
        oreExtension, -- Creates an Ore extension of a
        noncommutative ring
      * "oreExtension(Ring,RingMap,RingElement)" -- see oreExtension,
        -- Creates an Ore extension of a noncommutative ring
      * "oreExtension(Ring,RingMap,Symbol)" -- see oreExtension,
        -- Creates an Ore extension of a noncommutative ring
      * "oreIdeal(Ring,RingMap,Derivation,RingElement)" -- see oreIdeal,
        -- Creates the defining ideal of an Ore extension of a
        noncommutative ring
      * "oreIdeal(Ring,RingMap,Derivation,Symbol)" -- see oreIdeal,
        -- Creates the defining ideal of an Ore extension of a
        noncommutative ring
      * "oreIdeal(Ring,RingMap,RingElement)" -- see oreIdeal,
        -- Creates the defining ideal of an Ore extension of a noncommutative
        ring
      * "oreIdeal(Ring,RingMap,Symbol)" -- see oreIdeal, --
        Creates the defining ideal of an Ore extension of a noncommutative ring
      * "pointScheme(FreeAlgebraQuotient,Symbol)" -- see pointScheme,
        -- Compute the point scheme of the quadratic algebra B
      * "FreeAlgebra ** FreeAlgebra" -- see qTensorProduct,
        -- Define the (q-)commuting tensor product
      * "FreeAlgebra ** FreeAlgebraQuotient" -- see qTensorProduct,
        -- Define the (q-)commuting tensor product
      * "FreeAlgebraQuotient ** FreeAlgebra" -- see qTensorProduct,
        -- Define the (q-)commuting tensor product
      * "FreeAlgebraQuotient ** FreeAlgebraQuotient" -- see
        qTensorProduct, -- Define the (q-)commuting tensor
        product
      * "qTensorProduct(Ring,Ring,QQ)" -- see qTensorProduct,
        -- Define the (q-)commuting tensor product
      * "qTensorProduct(Ring,Ring,RingElement)" -- see qTensorProduct,
        -- Define the (q-)commuting tensor product
      * "qTensorProduct(Ring,Ring,ZZ)" -- see qTensorProduct,
        -- Define the (q-)commuting tensor product
      * "quadraticClosure(FreeAlgebra)" -- see quadraticClosure,
        -- Creates the subideal generated by quadratic
        elements of a given ideal
      * "quadraticClosure(FreeAlgebraQuotient)" -- see quadraticClosure,
        -- Creates the subideal generated by quadratic
        elements of a given ideal
      * "quadraticClosure(Ideal)" -- see quadraticClosure,
        -- Creates the subideal generated by quadratic
        elements of a given ideal
      * "rightKernel(Matrix)" -- see rightKernel, -- Right
        kernel of a matrix
      * "skewPolynomialRing(Ring,Matrix,List)" -- see skewPolynomialRing,
        -- Defines a skew polynomial ring via a skewing
        matrix
      * "skewPolynomialRing(Ring,QQ,List)" -- see
        skewPolynomialRing(Ring,RingElement,List),
        -- Defines a skew
        polynomial ring via a scaling factor
      * skewPolynomialRing(Ring,RingElement,List)
        -- Defines a skew
        polynomial ring via a scaling factor
      * "skewPolynomialRing(Ring,ZZ,List)" -- see
        skewPolynomialRing(Ring,RingElement,List),
        -- Defines a skew
        polynomial ring via a scaling factor
      * "threeDimSklyanin(Ring,List)" -- see threeDimSklyanin,
        -- Defines a three-dimensional Sklyanin with given
        parameters
      * "threeDimSklyanin(Ring,List,List)" -- see threeDimSklyanin,
        -- Defines a three-dimensional Sklyanin with given
        parameters
      * "toCommRing(FreeAlgebra)" -- see toCommRing, --
        Compute the abelianization of a Ring and returns a Ring.
      * "toCommRing(FreeAlgebraQuotient)" -- see toCommRing,
        -- Compute the abelianization of a Ring and returns a Ring.
      * "toFreeAlgebraQuotient(Ring)" -- see toFreeAlgebraQuotient,
        -- Converts a Ring to a noncommutative ring
      * "toRationalFunction(List)" -- see toRationalFunction,
        -- Attempt to find a rational function
        representation.
  * Symbols
      * "UseVariables" -- see freeAlgebra, -- Create a
        FreeAlgebra

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

The object AssociativeAlgebras, is a package (Macaulay2Doc).

Basic operations on noncommutative algebras
*******************************************

The AssociativeAlgebras package contains a number of methods for studying
noncommutative rings - primarily graded rings. The following three extended
examples highlight the capabilities of the package.

Our first example concerns a three-dimensional Sklyanin algebra. This example
is a PI-ring. We define the ring as a quotient of the tensor algebra on three
generators by the two-sided ideal generated by the three elements listed.

+------------------------+
|i1 : A = QQ<|x,y,z|>    |
|                        |
|o1 = A                  |
|                        |
|o1 : FreeAlgebra        |
+------------------------+
|i2 : f = y*z + z*y - x^2|
|                        |
|        2               |
|o2 = - x  + y*z + z*y   |
|                        |
|o2 : A                  |
+------------------------+
|i3 : g = x*z + z*x - y^2|
|                        |
|            2           |
|o3 = x*z - y  + z*x     |
|                        |
|o3 : A                  |
+------------------------+
|i4 : h = z^2 - x*y - y*x|
|                        |
|                    2   |
|o4 = - x*y - y*x + z    |
|                        |
|o4 : A                  |
+------------------------+
|i5 : B = A/ideal{f,g,h} |
|Using numthreads = 0    |
|                        |
|o5 = B                  |
|                        |
|o5 : FreeAlgebraQuotient|
+------------------------+

It is known that this algebra has a unique (up to rescaling) central element of
degree 3. We can verify this claim computationally using centralElements,
and check that the element is regular to a given degree. See
isLeftRegular.

+----------------------------------------------+
|i6 : centralElements(B,3)                     |
|                                              |
|o6 = | y2x y3 yzx yzy zyx zy2 zyz z2x z2y z3 ||
|                                              |
|             1       10                       |
|o6 : Matrix B  <--- B                         |
+----------------------------------------------+
|i7 : j = z^3+y*z*x-z*y*x-y^3                  |
|                                              |
|        3                    3                |
|o7 = - y  + y*z*x - z*y*x + z                 |
|                                              |
|o7 : B                                        |
+----------------------------------------------+
|i8 : isCentral j                              |
|                                              |
|o8 = true                                     |
+----------------------------------------------+
|i9 : apply(5,i->isLeftRegular(j,i+1))         |
|Using numthreads = 0                          |
|Using numthreads = 0                          |
|Using numthreads = 0                          |
|Using numthreads = 0                          |
|                                              |
|o9 = {true, true, true, true, true}           |
|                                              |
|o9 : List                                     |
+----------------------------------------------+

In fact, we can see that j is (up to scaling) the only normal element of degree
3. See the discussion above for interpreting the output of
normalElements.

+---------------------------------------------------------------------+
|i10 : normalElements(B,3,n)                                          |
|                                                                     |
|         2    3                          2          2    2    3      |
|o10 = ({y x, y , y*z*x, y*z*y, z*y*x, z*y , z*y*z, z x, z y, z }, {})|
|                                                                     |
|o10 : Sequence                                                       |
+---------------------------------------------------------------------+
|i11 : ncBasis(3,B)                                                   |
|                                                                     |
|o11 = | y2x y3 yzx yzy zyx zy2 zyz z2x z2y z3 |                      |
|                                                                     |
|              1       10                                             |
|o11 : Matrix B  <--- B                                               |
+---------------------------------------------------------------------+

The user can create noncommutative rings in ways other than specifying a
presentation. For our second example, consider a skew polynomial ring on four
generators, where generators skew-commute (but are not nilpotent). See
skewPolynomialRing, for more details.

+--------------------------------------------------+
|i12 : C = skewPolynomialRing(QQ,(-1)_QQ,{x,y,z,w})|
|Using numthreads = 0                              |
|                                                  |
|o12 = C                                           |
|                                                  |
|o12 : FreeAlgebraQuotient                         |
+--------------------------------------------------+

Let us briefly note that the user can also define a skew polynomial ring with
coefficients in a commutative ring.

+-------------------------------------------+
|i13 : R = QQ[q]/ideal{q^4+q^3+q^2+q+1}     |
|                                           |
|o13 = R                                    |
|                                           |
|o13 : QuotientRing                         |
+-------------------------------------------+
|i14 : B = skewPolynomialRing(R,q,{x,y,z,w})|
|Using numthreads = 0                       |
|Using GC ring in VectorArithmetic.         |
|                                           |
|o14 = B                                    |
|                                           |
|o14 : FreeAlgebraQuotient                  |
+-------------------------------------------+
|i15 : x*y == q*y*x                         |
|                                           |
|o15 = true                                 |
+-------------------------------------------+

Returning to the main example, we can define a graded Ore extension of C by
specifying an automorphism. The function map (Macaulay2Doc), is used
to define a ring map. Note that ring maps are linear and multiplicative by
definition but are not assumed to be  well-defined.

+--------------------------------+
|i16 : use C                     |
|                                |
|o16 = C                         |
|                                |
|o16 : FreeAlgebraQuotient       |
+--------------------------------+
|i17 : sigma = map(C,C,{y,z,w,x})|
|                                |
|o17 = map (C, C, {y, z, w, x})  |
|                                |
|o17 : RingMap C <--- C          |
+--------------------------------+

We form the Ore extension of C by sigma. See oreExtension.

+---------------------------------+
|i18 : D = oreExtension(C,sigma,a)|
|Using numthreads = 0             |
|                                 |
|o18 = D                          |
|                                 |
|o18 : FreeAlgebraQuotient        |
+---------------------------------+

The new generator a is normal and regular in D. Regularity (on the left or
right) can be checked one homogeneous degree at a time. See
isLeftRegular. Thus a determines a graded automorphism f:D->D
via a*r=f(r)*a.

+---------------------------------------+
|i19 : isNormal a                       |
|                                       |
|o19 = true                             |
+---------------------------------------+
|i20 : apply(5,i-> isLeftRegular(a,i+1))|
|Using numthreads = 0                   |
|Using numthreads = 0                   |
|                                       |
|o20 = {true, true, true, true, true}   |
|                                       |
|o20 : List                             |
+---------------------------------------+
|i21 : sigmaD = normalAutomorphism a    |
|                                       |
|o21 = map (D, D, {x, y, z, w, a})      |
|                                       |
|o21 : RingMap D <--- D                 |
+---------------------------------------+

Given an automorphism, one can check to see which elements it normalizes in any
given degree.

+------------------------------------------------------+
|i22 : normalElements(sigmaD,1)                        |
|                                                      |
|o22 = | x y z w a |                                   |
|                                                      |
|              1       5                               |
|o22 : Matrix D  <--- D                                |
+------------------------------------------------------+
|i23 : normalElements(sigmaD,2)                        |
|                                                      |
|o23 = | x2 yx y2 zx zy z2 wx wy wz w2 ax ay az aw a2 ||
|                                                      |
|              1       15                              |
|o23 : Matrix D  <--- D                                |
+------------------------------------------------------+

One can check for the presence of normal elements more generally. In our
example, since a is normal, a^2 will also be normal. It is the only normal
monomial of degree 2. A complete description of the normal elements in a given
degree is given by normalElements.

+-----------------------------------------------------------------------------+
|i24 : normalElements(D,2,P)                                                  |
|                                                                             |
|         2        2             2                  2                         |
|o24 = ({x , y*x, y , z*x, z*y, z , w*x, w*y, w*z, w , a*x, a*y, a*z, a*w,    |
|      -----------------------------------------------------------------------|
|       2                                                                     |
|      a }, {})                                                               |
|                                                                             |
|o24 : Sequence                                                               |
+-----------------------------------------------------------------------------+

Each component of the "normal variety" is a set of polynomial equations which
must be satisfied by the coefficients of the monomial basis for an element
expressed in that basis to be normal. In this case, the basis of D in degree 2
is

+------------------------------------------------------+
|i25 : ncBasis(2,D)                                    |
|                                                      |
|o25 = | x2 yx y2 zx zy z2 wx wy wz w2 ax ay az aw a2 ||
|                                                      |
|              1       15                              |
|o25 : Matrix D  <--- D                                |
+------------------------------------------------------+

The output of normalElements tells us that in order for a degree 2 element of D
to be normal, it must be an expression in powers of the generators, and that
the coefficients of these powers must satisfy the six nontrivial equations
listed.

+--------------------------------+
|i26 : isNormal (x^2+z^2-y^2-w^2)|
|                                |
|o26 = true                      |
+--------------------------------+

Of course, one has been able to define (graded) commutative algebras in
Macaulay2 for a long time.  Specifying graded commutativity is usually done
with the SkewCommutative (Macaulay2Doc), option when
creating the ring.  The user can convert such rings (and their quotients) to a
FreeAlgebraQuotient, by using the command
toFreeAlgebraQuotient,:

+--------------------------------------------------+
|i27 : E' = QQ[x,y,z,w,SkewCommutative=>true]      |
|                                                  |
|o27 = E'                                          |
|                                                  |
|o27 : PolynomialRing, 4 skew commutative variables|
+--------------------------------------------------+
|i28 : E = toFreeAlgebraQuotient E'                |
|Using numthreads = 0                              |
|                                                  |
|o28 = E                                           |
|                                                  |
|o28 : FreeAlgebraQuotient                         |
+--------------------------------------------------+
|i29 : f = map(E,C,gens E)                         |
|                                                  |
|o29 = map (E, C, {x, y, z, w})                    |
|                                                  |
|o29 : RingMap E <--- C                            |
+--------------------------------------------------+
|i30 : use C                                       |
|                                                  |
|o30 = C                                           |
|                                                  |
|o30 : FreeAlgebraQuotient                         |
+--------------------------------------------------+
|i31 : f x^2                                       |
|                                                  |
|o31 = 0                                           |
|                                                  |
|o31 : E                                           |
+--------------------------------------------------+
|i32 : use E                                       |
|                                                  |
|o32 = E                                           |
|                                                  |
|o32 : FreeAlgebraQuotient                         |
+--------------------------------------------------+
|i33 : x^2 == 0                                    |
|                                                  |
|o33 = true                                        |
+--------------------------------------------------+

centralElements -- Finds central elements in a given degree
***********************************************************

Synopsis
========

  * Usage:
        centralElements(A,n)
  * Inputs:
      * A, a ring (Macaulay2Doc),
      * n, an integer (Macaulay2Doc), the homogeneous degree in which
        to compute central elements
  * Outputs:
      * a matrix (Macaulay2Doc),

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

If the given noncommutative ring has central elements of the specified degree,
this method returns a basis for the space of central elements in that degree.

+----------------------------------------------+
|i1 : B = threeDimSklyanin(QQ,{1,1,-1},{x,y,z})|
|Using numthreads = 0                          |
|                                              |
|o1 = B                                        |
|                                              |
|o1 : FreeAlgebraQuotient                      |
+----------------------------------------------+
|i2 : centralElements(B,2)                     |
|                                              |
|o2 = | yx y2 yz zx zy z2 |                    |
|                                              |
|             1       6                        |
|o2 : Matrix B  <--- B                         |
+----------------------------------------------+
|i3 : centralElements(B,3)                     |
|                                              |
|o3 = | y2x y3 yzx yzy zyx zy2 zyz z2x z2y z3 ||
|                                              |
|             1       10                       |
|o3 : Matrix B  <--- B                         |
+----------------------------------------------+

Ways to use centralElements :
=============================

  * "centralElements(Ring,ZZ)"

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

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

Defining a noncommutative ring
******************************

A noncommutative ring is a Ring (Macaulay2Doc), of subclass
FreeAlgebra, or FreeAlgebraQuotient.

In addition to defining a ring as a quotient of a FreeAlgebra,
some common ways to create noncommutative rings include
skewPolynomialRing, and oreExtension.

Let's consider a three dimensional Sklyanin algebra.  We first define the free
algebra on the variables x,y,z:

+--------------------+
|i1 : A = QQ<|x,y,z|>|
|                    |
|o1 = A              |
|                    |
|o1 : FreeAlgebra    |
+--------------------+

Then input the defining relations, and put them in an ideal:

+---------------------------------------------------------------+
|i2 : f = y*z + z*y - x^2                                       |
|                                                               |
|        2                                                      |
|o2 = - x  + y*z + z*y                                          |
|                                                               |
|o2 : A                                                         |
+---------------------------------------------------------------+
|i3 : g = x*z + z*x - y^2                                       |
|                                                               |
|            2                                                  |
|o3 = x*z - y  + z*x                                            |
|                                                               |
|o3 : A                                                         |
+---------------------------------------------------------------+
|i4 : h = z^2 - x*y - y*x                                       |
|                                                               |
|                    2                                          |
|o4 = - x*y - y*x + z                                           |
|                                                               |
|o4 : A                                                         |
+---------------------------------------------------------------+
|i5 : I = ideal{f,g,h}                                          |
|                                                               |
|               2                     2                       2 |
|o5 = ideal (- x  + y*z + z*y, x*z - y  + z*x, - x*y - y*x + z )|
|                                                               |
|o5 : Ideal of A                                                |
+---------------------------------------------------------------+

Next, we will define the quotient ring (as well as try a few functions on this
new ring). Note that when the quotient ring is defined, Macaulay2 computes the
Groebner basis of I (out to a certain degree, should the Groebner basis be
infinite).

+------------------------+
|i6 : B=A/I              |
|Using numthreads = 0    |
|                        |
|o6 = B                  |
|                        |
|o6 : FreeAlgebraQuotient|
+------------------------+
|i7 : generators B       |
|                        |
|o7 = {x, y, z}          |
|                        |
|o7 : List               |
+------------------------+
|i8 : numgens B          |
|                        |
|o8 = 3                  |
+------------------------+
|i9 : isCommutative B    |
|                        |
|o9 = false              |
+------------------------+
|i10 : coefficientRing B |
|                        |
|o10 = QQ                |
|                        |
|o10 : Ring              |
+------------------------+

As we can see, $x$ is now an element of the quotient $B$.

+-------+
|i11 : x|
|       |
|o11 = x|
|       |
|o11 : B|
+-------+

If we define a new ring containing x, x is now part of that new ring.  For
example, we can use the following command to define the (-1)-skew polynomial
ring on the variables x,y,z,w:

+--------------------------------------------------+
|i12 : C = skewPolynomialRing(QQ,(-1)_QQ,{x,y,z,w})|
|Using numthreads = 0                              |
|                                                  |
|o12 = C                                           |
|                                                  |
|o12 : FreeAlgebraQuotient                         |
+--------------------------------------------------+
|i13 : x                                           |
|                                                  |
|o13 = x                                           |
|                                                  |
|o13 : C                                           |
+--------------------------------------------------+

We can 'go back' to B using the command use(Ring) (Macaulay2Doc).

+-------------------------+
|i14 : use B              |
|                         |
|o14 = B                  |
|                         |
|o14 : FreeAlgebraQuotient|
+-------------------------+
|i15 : x                  |
|                         |
|o15 = x                  |
|                         |
|o15 : B                  |
+-------------------------+
|i16 : use C              |
|                         |
|o16 = C                  |
|                         |
|o16 : FreeAlgebraQuotient|
+-------------------------+

We can also create an Ore extension.  First define a RingMap (Macaulay2Doc),
with map (Macaulay2Doc).

+--------------------------------+
|i17 : sigma = map(C,C,{y,z,w,x})|
|                                |
|o17 = map (C, C, {y, z, w, x})  |
|                                |
|o17 : RingMap C <--- C          |
+--------------------------------+

Then call the command oreExtension.

+---------------------------------+
|i18 : D = oreExtension(C,sigma,a)|
|Using numthreads = 0             |
|                                 |
|o18 = D                          |
|                                 |
|o18 : FreeAlgebraQuotient        |
+---------------------------------+
|i19 : generators D               |
|                                 |
|o19 = {x, y, z, w, a}            |
|                                 |
|o19 : List                       |
+---------------------------------+
|i20 : numgens D                  |
|                                 |
|o20 = 5                          |
+---------------------------------+

See also
========

  * Basic operations on noncommutative algebras

Derivation -- Derivation defined on a noncommutative algebra
************************************************************

Synopsis
========

  * Usage:
        delta = derivation(A,output,sigma)
  * Inputs:
      * A, a free algebra, or a FreeAlgebraQuotient.
      * output, a list (Macaulay2Doc),
      * sigma, a ring map (Macaulay2Doc),
  * Outputs:
      * delta, an instance of the type Derivation,

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

This function returns a Derivation object, which may be used to perform
computations with (twisted) derivations in a noncommutative algebra.  A linear
map $\delta : A \to A$ is called a $\sigma$-derivation provided for all $x,y
\in A$, one has $\delta(xy) = \delta(x)y + \sigma(x)\delta(y)$. Such maps are
useful in defining many noncommutative algebras, including Ore extensions.

Below we give a simple example of a twisted derivation that is used to define
the subalgebras appearing in Fomin and Procesi's work to describe
Fomin-Kirillov algebras.

+---------------------------------------------------+
|i1 : A = QQ<|x,y|>                                 |
|                                                   |
|o1 = A                                             |
|                                                   |
|o1 : FreeAlgebra                                   |
+---------------------------------------------------+
|i2 : sigma = map(A,A,{y,x})                        |
|                                                   |
|o2 = map (A, A, {y, x})                            |
|                                                   |
|o2 : RingMap A <--- A                              |
+---------------------------------------------------+
|i3 : delta = derivation(A,{-x*y,y*x},sigma)        |
|                                                   |
|o3 = Derivation{generators => HashTable{x => -x*y}}|
|                                        y => y*x   |
|                homomorphism => map (A, A, {y, x}) |
|                imageCache => MutableHashTable{}   |
|                matrix => | -xy yx |               |
|                source => A                        |
|                                                   |
|o3 : Derivation                                    |
+---------------------------------------------------+
|i4 : delta y^2                                     |
|                                                   |
|o4 = x*y*x + y*x*y                                 |
|                                                   |
|o4 : A                                             |
+---------------------------------------------------+

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

  * "Derivation RingElement"
  * "Derivation ZZ"
  * "oreExtension(Ring,RingMap,Derivation,RingElement)" -- see
    oreExtension, -- Creates an Ore extension of a noncommutative
    ring
  * "oreExtension(Ring,RingMap,Derivation,Symbol)" -- see oreExtension,
    -- Creates an Ore extension of a noncommutative ring
  * "oreIdeal(Ring,RingMap,Derivation,RingElement)" -- see oreIdeal,
    -- Creates the defining ideal of an Ore extension of a
    noncommutative ring
  * "oreIdeal(Ring,RingMap,Derivation,Symbol)" -- see oreIdeal,
    -- Creates the defining ideal of an Ore extension of a noncommutative ring

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

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

endomorphismRingIdeal -- Find the relations of an endomorphism ring
*******************************************************************

Synopsis
========

  * Usage:
        I = endomorphismRingIdeal(M,X)
  * Inputs:
      * M, a module (Macaulay2Doc),
      * X, a symbol (Macaulay2Doc), the base name for the indexed
        variables serving as generators for the output ring
  * Outputs:
      * I, an ideal (Macaulay2Doc), in a FreeAlgebra with
        variables with base name X

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

This method computes the multiplication table of the endomorphism ring of a
module $M$ over a commutative ring $R$, and returns this information as an
ideal.  Since Groebner bases do not (yet!) work for a FreeAlgebra with
coefficients in a commutative ring, minimizing these generators and relations
must be performed by the user.  This will be fixed in a future release.

+-----------------------------------------------------------------------------+
|i1 : Q = QQ[a,b,c]                                                           |
|                                                                             |
|o1 = Q                                                                       |
|                                                                             |
|o1 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i2 : R = Q/ideal{a*b-c^2}                                                    |
|                                                                             |
|o2 = R                                                                       |
|                                                                             |
|o2 : QuotientRing                                                            |
+-----------------------------------------------------------------------------+
|i3 : kRes = res(coker vars R, LengthLimit=>7)                                |
|                                                                             |
|      1      3      4      4      4      4      4      4                     |
|o3 = R  <-- R  <-- R  <-- R  <-- R  <-- R  <-- R  <-- R                      |
|                                                                             |
|     0      1      2      3      4      5      6      7                      |
|                                                                             |
|o3 : ChainComplex                                                            |
+-----------------------------------------------------------------------------+
|i4 : M = coker kRes.dd_5                                                     |
|                                                                             |
|o4 = cokernel {4} | 0  -a 0  -c |                                            |
|              {4} | -b 0  -c 0  |                                            |
|              {4} | c  0  a  0  |                                            |
|              {4} | 0  c  0  b  |                                            |
|                                                                             |
|                            4                                                |
|o4 : R-module, quotient of R                                                 |
+-----------------------------------------------------------------------------+
|i5 : I = endomorphismRingIdeal(M,X)                                          |
|Using numthreads = 0                                                         |
|Using GC ring in VectorArithmetic.                                           |
|Using numthreads = 0                                                         |
|Using GC ring in VectorArithmetic.                                           |
|Using numthreads = 0                                                         |
|Using GC ring in VectorArithmetic.                                           |
|                                                                             |
|             2                                     2                         |
|o5 = ideal (X , X X  - X , X X  - X , X X , X X , X  - X , X X  - X , X X ,  |
|             0   0 1    0   0 2    3   0 3   1 0   1    1   1 2    2   1 3   |
|     ------------------------------------------------------------------------|
|                       2                                     2               |
|     X X  - X , X X , X , X X  - X , X X  - X , X X , X X , X  - X , - X  -  |
|      2 0    1   2 1   2   2 3    2   3 0    0   3 1   3 2   3    3     1    |
|     ------------------------------------------------------------------------|
|     X  + 1)                                                                 |
|      3                                                                      |
|                                                                             |
|o5 : Ideal of R <|X , X , X , X |>                                           |
|                   0   1   2   3                                             |
+-----------------------------------------------------------------------------+

The endomorphisms corresponding to the variables chosen are cached in the ideal
returned by this method, and can be accessed using the key
"EndomorphismRingIdealGens".

+-------------------------------------------------------------------------+
|i6 : maps = I.cache#"EndomorphismRingIdealGens"                          |
|                                                                         |
|o6 = {{4} | 0 0 1 0 |, {4} | 0 0 0 0 |, {4} | 0 0 0 0 |, {4} | 1 0 0 0 |}|
|      {4} | 0 0 0 0 |  {4} | 0 1 0 0 |  {4} | 0 0 0 1 |  {4} | 0 0 0 0 | |
|      {4} | 0 0 0 0 |  {4} | 0 0 1 0 |  {4} | 1 0 0 0 |  {4} | 0 0 0 0 | |
|      {4} | 0 1 0 0 |  {4} | 0 0 0 0 |  {4} | 0 0 0 0 |  {4} | 0 0 0 1 | |
|                                                                         |
|o6 : List                                                                |
+-------------------------------------------------------------------------+
|i7 : assert(maps_0*maps_2 == maps_3)                                     |
+-------------------------------------------------------------------------+

Ways to use endomorphismRingIdeal :
===================================

  * "endomorphismRingIdeal(Module,Symbol)"

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

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

extAlgebra -- Compute the Ext algebra of a ring
***********************************************

Synopsis
========

  * Usage:
        extAlgebra(R,z)
  * Inputs:
      * R, a ring (Macaulay2Doc),
      * z, a symbol (Macaulay2Doc),
  * Optional inputs (Macaulay2Doc),:
      * DegreeLimit => ..., default value (5,10)
  * Outputs:
      * a quotient of a free algebra,

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

This command uses the functions yonedaMap (Complexes),
and yonedaMap' (Complexes),
to compute a presentation of the Yoneda
Ext algebra of the residue field of a commutative graded ring R.  Since this
algebra is not finitely generated or finitely presented in general, one may
(and should) provide degree bound information as an optional input.

+-----------------------------------------------------------------------------+
|i1 : R = QQ[x,y]/ideal(x^4,x^3*y,x*y^3)                                      |
|                                                                             |
|o1 = R                                                                       |
|                                                                             |
|o1 : QuotientRing                                                            |
+-----------------------------------------------------------------------------+
|i2 : ER = extAlgebra(R,z,DegreeLimit=>(5,10));                               |
|Using numthreads = 0                                                         |
|Using numthreads = 0                                                         |
|Using numthreads = 0                                                         |
|Using numthreads = 0                                                         |
|Using numthreads = 0                                                         |
|Using numthreads = 0                                                         |
+-----------------------------------------------------------------------------+
|i3 : degrees ER                                                              |
|                                                                             |
|o3 = {{1}, {1}, {2}, {2}, {2}, {3}}                                          |
|                                                                             |
|o3 : List                                                                    |
+-----------------------------------------------------------------------------+
|i4 : ideal ER                                                                |
|                                                                             |
|             2                2                                              |
|o4 = ideal (z , z z  + z z , z , - z z  + z z , - z z  - z z  + z z  + z z , |
|             1   1 2    2 1   2     1 3    3 1     1 4    2 3    3 2    4 1  |
|     ------------------------------------------------------------------------|
|     - z z  + z z , - z z  + z z , - z z  + z z , z z  + z z , z z  + z z )  |
|        2 4    4 2     1 5    5 1     2 5    5 2   1 6    6 1   2 6    6 2   |
|                                                                             |
|o4 : Ideal of QQ <|z , z , z , z , z , z |>                                  |
|                    1   2   3   4   5   6                                    |
+-----------------------------------------------------------------------------+

Notice that the optional argument DegreeLimit is a pair $(m,n)$ where $m$ is
the maximum degree of a generator or relation of the Ext algebra, and $n$ is
the maximum degree that the Groebner basis of the defining ideal of the Ext
algebra is computed.

The chain maps representing those elements of Ext chosen as generators are
stored in the cache of the returned algebra:

+-----------------------------------------------------------------------------+
|i5 : ER.cache#"extMaps"#(z_4)                                                |
|                                                                             |
|          1                   4                                              |
|o5 = 0 : R  <--------------- R  : 2                                          |
|               | 0 0 1 0 |                                                   |
|                                                                             |
|          2                               8                                  |
|     1 : R  <--------------------------- R  : 3                              |
|               {1} | 0 0 0 1 0 0 0 0 |                                       |
|               {1} | 0 0 1 0 0 0 0 0 |                                       |
|                                                                             |
|          4                                                  16              |
|     2 : R  <---------------------------------------------- R   : 4          |
|               {2} | 0 -1 0 0 0 0 0 0 y2 0 0 x2 0 0 0 0 |                    |
|               {4} | 0 0  0 0 0 0 0 0 1  0 0 0  0 0 0 0 |                    |
|               {4} | 0 0  0 0 0 0 0 0 0  0 0 1  0 0 0 0 |                    |
|               {4} | 0 0  0 0 0 0 0 0 0  0 0 0  0 0 1 0 |                    |
|                                                                             |
|          8                                                                  |
|     3 : R  <----------------------------------------------------------------|
|               {5} | 0 0 0 0 0 0 0 1 0 0 0  0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|               {5} | 0 0 0 1 0 0 0 0 0 0 0  0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|               {5} | 0 0 0 0 0 0 0 0 0 0 0  0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0|
|               {5} | 0 0 0 0 0 0 0 0 0 0 0  0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0|
|               {5} | 0 0 0 0 0 0 0 0 0 0 0  0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0|
|               {5} | 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0|
|               {5} | 0 0 0 0 0 0 0 0 0 0 0  0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0|
|               {6} | 0 0 0 0 0 0 0 0 0 0 0  0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
|                                                                             |
|o5 : ComplexMap                                                              |
|-----------------------------------------------------------------------------|
|               32                                                            |
|------------- R   : 5                                                        |
| 0 0 0  0 |                                                                  |
| 0 0 0  0 |                                                                  |
| 0 0 0  0 |                                                                  |
| 0 0 0  0 |                                                                  |
| 0 0 0  0 |                                                                  |
| 0 0 0  0 |                                                                  |
| 0 0 0  0 |                                                                  |
| 0 0 -1 0 |                                                                  |
+-----------------------------------------------------------------------------+

If $R$ is a complete intersection, for any pair of finitely generated modules
$M$ and $N$ over $R$, the total Ext module $\text{Ext}_R(M,N)$ is a finitely
generated module over the central polynomial subalgebra of elements of
homological degree two. The existing function Ext(Module,Module) (Macaulay2Doc),
computes this module structure, but not
the algebra structure.  Currently, the method used in this package does not use
this functionality, as it is not clear how to extract the algebra structure
from the current implementation (but this may change in the future).

Ways to use extAlgebra :
========================

  * "extAlgebra(Ring,Symbol)"

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

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

fourDimSklyanin -- Defines a four-dimensional Sklyanin with given parameters
****************************************************************************

Synopsis
========

  * Usage:
        fourDimSklyanin(R,params,varList)
  * Inputs:
      * R, a ring (Macaulay2Doc),
      * params, a list (Macaulay2Doc),
      * varList, a list (Macaulay2Doc),
  * Optional inputs (Macaulay2Doc),:
      * DegreeLimit => an integer (Macaulay2Doc), default value 6
  * Outputs:
      * a quotient of a free algebra,

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

This method constructs a four dimensional Sklyanin algebra with parameters from
the params list, and variables from varList (see here (see
https://www.math.washington.edu/~smith/Research/Skly-survey.pdf )). If either
list is not the appropriate length, then an error is thrown.  The generic such
algebra has a fairly complicated Groebner basis, so the optional parameter
DegreeLimit may be provided to limit the maximum of a generator of a Groebner
basis found.  This value has been defaulted to 6.  If only one list is
provided, it is used for the variable names, and a random choice for each
parameter (satisfying the nondegeneracy condition given below) is chosen.

In order to not get a degenerate example, one should ensure that the parameters
provided satisfy \alpha + \beta + \gamma + \alpha\beta\gamma = 0. This method
does not check this condition, since the degenerate examples are of interest as
well.  If no parameters are provided, however a generic choice of \alpha,\beta
and \gamma satisfying the equation above are selected.

+--------------------------------------------+
|i1 : C = fourDimSklyanin(ZZ/32003,{a,b,c,d})|
|Using numthreads = 0                        |
|                                            |
|o1 = C                                      |
|                                            |
|o1 : FreeAlgebraQuotient                    |
+--------------------------------------------+

In all nondegenerate cases, there is are two central elements of degree two
which form a regular sequence on the four dimensional Sklyanin (this was proven
by Paul Smith and Toby Stafford in a paper in Compositio).

+--------------------------------------+
|i2 : centralElements(C,2)             |
|                                      |
|o2 = | a2 b2 ca cb c2 cd da db dc d2 ||
|                                      |
|             1       10               |
|o2 : Matrix C  <--- C                 |
+--------------------------------------+

These algebras also all AS-regular and as such have the same Hilbert series as
a commutative polynomial algebra in four variables, as we can see here:

+-----------------------------------------------+
|i3 : apply(8, i -> numgens source ncBasis(i,C))|
|Using numthreads = 0                           |
|                                               |
|o3 = {1, 4, 10, 20, 35, 56, 84, 120}           |
|                                               |
|o3 : List                                      |
+-----------------------------------------------+
|i4 : apply(8, i -> binomial(i+3,3))            |
|                                               |
|o4 = {1, 4, 10, 20, 35, 56, 84, 120}           |
|                                               |
|o4 : List                                      |
+-----------------------------------------------+

Ways to use fourDimSklyanin :
=============================

  * "fourDimSklyanin(Ring,List)"
  * "fourDimSklyanin(Ring,List,List)"

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

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

FreeAlgebra -- Type of a free algebra
*************************************

Synopsis
========

  * Usage:
        A = QQ<|x,y|>

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

This is the type of a free algebra over a commutative ring R (i.e. a tensor
algebra over R).

+------------------+
|i1 : A = QQ<|x,y|>|
|                  |
|o1 = A            |
|                  |
|o1 : FreeAlgebra  |
+------------------+

Functions and methods returning a free algebra :
================================================

  * "freeAlgebra(Ring,BasicList)" -- see freeAlgebra, --
    Create a FreeAlgebra

Methods that use a free algebra :
=================================

  * "derivation(FreeAlgebra,List)" -- see Derivation, --
    Derivation defined on a noncommutative algebra
  * "derivation(FreeAlgebra,List,RingMap)" -- see Derivation,
    -- Derivation defined on a noncommutative algebra
  * FreeAlgebra / Ideal -- Type of a noncommutative
    ring
  * "homogDual(FreeAlgebra)" -- see homogDual, -- Computes the
    dual of a pure homogeneous ideal
  * "ncHilbertSeries(FreeAlgebra)" -- see ncHilbertSeries,
    -- Computes the Hilbert series of a noncommutative ring
  * "oppositeRing(FreeAlgebra)" -- see oppositeRing, --
    Creates the opposite ring of a noncommutative ring
  * "FreeAlgebra ** FreeAlgebra" -- see qTensorProduct,
    -- Define the (q-)commuting tensor product
  * "FreeAlgebra ** FreeAlgebraQuotient" -- see qTensorProduct,
    -- Define the (q-)commuting tensor product
  * "FreeAlgebraQuotient ** FreeAlgebra" -- see qTensorProduct,
    -- Define the (q-)commuting tensor product
  * "quadraticClosure(FreeAlgebra)" -- see quadraticClosure,
    -- Creates the subideal generated by quadratic elements
    of a given ideal
  * "toCommRing(FreeAlgebra)" -- see toCommRing, -- Compute
    the abelianization of a Ring and returns a Ring.

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

The object FreeAlgebra, is a type (Macaulay2Doc),
with ancestor classes EngineRing (Macaulay2Doc),
< Ring (Macaulay2Doc) < Type (Macaulay2Doc)
< MutableHashTable (Macaulay2Doc) <
HashTable (Macaulay2Doc) < Thing (Macaulay2Doc).

freeAlgebra -- Create a FreeAlgebra
***********************************

Synopsis
========

  * Usage:
        A = freeAlgebra(R,xs)
  * Inputs:
      * R, a ring (Macaulay2Doc),
      * xs, a basic list (Macaulay2Doc), containing the
        variables, and any options
  * Outputs:
      * A, a free algebra,

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

This function creates a free algebra over $R$ with variables from the BasicList
xs.  Options are also passed as part of the BasicList. The variables are not in
scope after a call to this function by default. If you wish to have them in
scope, one may use (Macaulay2Doc), the return value, or pass the
option true to UseVariables.

+--------------------------------+
|i1 : A = freeAlgebra(QQ,{x,y,z})|
|                                |
|o1 = A                          |
|                                |
|o1 : FreeAlgebra                |
+--------------------------------+
|i2 : use A                      |
|                                |
|o2 = A                          |
|                                |
|o2 : FreeAlgebra                |
+--------------------------------+
|i3 : assert(x == A_0)           |
+--------------------------------+

Other options are Degrees (Macaulay2Doc), DegreeRank (Macaulay2Doc),
see Weights (Macaulay2Doc), and
Heft (Macaulay2Doc), which use the same syntax and play the same role as
in the case of a commutative polynomial ring.

In particular, to create noncommutative elimination orders, one must use
Weights (Macaulay2Doc), that are chosen accordingly.  The following
example is the graph ideal of the ring homomorphism from $\mathbb{Q}\langle
a,b,c\rangle$ to $\mathbb{Q}\langle x,y\rangle$ satisfying $a \mapsto xyx$, $b
\mapsto yxy$ and $c \mapsto xy$.

+-----------------------------------------------------------------------------+
|i4 : B = freeAlgebra(QQ,{x,y,a,b,c,Weights=>{1,1,0,0,0},Degrees=>{1,1,3,3,2  |
|                                                                             |
|o4 = B                                                                       |
|                                                                             |
|o4 : FreeAlgebra                                                             |
|-----------------------------------------------------------------------------|
|}})                                                                          |
+-----------------------------------------------------------------------------+
|i5 : I = ideal {a - x*y*x, b - y*x*y, c - x*y}                               |
|                                                                             |
|o5 = ideal (- x*y*x + a, - y*x*y + b, - x*y + c)                             |
|                                                                             |
|o5 : Ideal of B                                                              |
+-----------------------------------------------------------------------------+
|i6 : Igb = NCGB(I,10)                                                        |
|Using numthreads = 0                                                         |
|                                                                             |
|o6 = | xy-c cx-a yc-b ay-c2 ya-bx xb-c2 c3-ab abx-c2a abc-cab |              |
|                                                                             |
|             1       9                                                       |
|o6 : Matrix B  <--- B                                                        |
+-----------------------------------------------------------------------------+

This general construction is automated in ncGraphIdeal, and
ncKernel.

Ways to use freeAlgebra :
=========================

  * "freeAlgebra(Ring,BasicList)"

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

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

FreeAlgebra / Ideal -- Type of a noncommutative ring
****************************************************

Synopsis
========

  * Operator: / (Macaulay2Doc),

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

This is the type of a quotient of a tensor algebra by a two-sided ideal.

At this point, one cannot define quotients of quotients.

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

  * FreeAlgebra / Ideal -- Type of a noncommutative
    ring

freeProduct -- Define the free product of two algebras
******************************************************

Synopsis
========

  * Usage:
        C = freeProduct(A,B)
  * Inputs:
      * A, a ring (Macaulay2Doc),
      * B, a ring (Macaulay2Doc),
  * Outputs:
      * C, a quotient of a free algebra, or
        FreeAlgebra,

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

This function returns the free product of the algebras A and B.

+------------------------------------------------+
|i1 : A = QQ<|x,y,z|>                            |
|                                                |
|o1 = A                                          |
|                                                |
|o1 : FreeAlgebra                                |
+------------------------------------------------+
|i2 : B = skewPolynomialRing(QQ,(-1)_QQ, {a,b,c})|
|Using numthreads = 0                            |
|                                                |
|o2 = B                                          |
|                                                |
|o2 : FreeAlgebraQuotient                        |
+------------------------------------------------+
|i3 : C = freeProduct(A,B)                       |
|Using numthreads = 0                            |
|                                                |
|o3 = C                                          |
|                                                |
|o3 : FreeAlgebraQuotient                        |
+------------------------------------------------+

Ways to use freeProduct :
=========================

  * "freeProduct(Ring,Ring)"

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

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

homogDual -- Computes the dual of a pure homogeneous ideal
**********************************************************

Synopsis
========

  * Usage:
        homogDual I
  * Inputs:
      * I, an ideal (Macaulay2Doc), or a
        FreeAlgebraQuotient.
  * Outputs:
      * an ideal (Macaulay2Doc), or an FreeAlgebraQuotient,

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

The homogeneous dual of a pure (i.e. generators all in the same degree) ideal I
in a FreeAlgebra A is generated by the orthogonal complement to the generators
of I under the natural pairing on the generating subspace of A and its linear
dual. Though technically the dual ideal belongs to the tensor algebra on the
dual space of generators, this method returns the dual ideal in the same
FreeAlgebra

If the input is a FreeAlgebraQuotient ring, the method is applied to the
defining ideal of the quotient and the corresponding quotient ring is returned.

Commonly used in conjunction with quadraticClosure.

+------------------------------------------------------+
|i1 : A = QQ<|x,y,z|>                                  |
|                                                      |
|o1 = A                                                |
|                                                      |
|o1 : FreeAlgebra                                      |
+------------------------------------------------------+
|i2 : I = ideal{x*z-z*x, y*z, x*y^2-y^2*x, x^3*y-y*x^3}|
|                                                      |
|                               2    2    3       3    |
|o2 = ideal (x*z - z*x, y*z, x*y  - y x, x y - y*x )   |
|                                                      |
|o2 : Ideal of A                                       |
+------------------------------------------------------+
|i3 : J = quadraticClosure I                           |
|                                                      |
|o3 = ideal (x*z - z*x, y*z)                           |
|                                                      |
|o3 : Ideal of A                                       |
+------------------------------------------------------+
|i4 : J' = homogDual J                                 |
|Using numthreads = 0                                  |
|                                                      |
|             2             2                   2      |
|o4 = ideal (x , x*y, y*x, y , x*z + z*x, z*y, z )     |
|                                                      |
|o4 : Ideal of A                                       |
+------------------------------------------------------+

See also
========

  * quadraticClosure -- Creates the subideal generated
    by quadratic elements of a given ideal

Ways to use homogDual :
=======================

  * "homogDual(FreeAlgebra)"
  * "homogDual(FreeAlgebraQuotient)"
  * "homogDual(Ideal)"

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

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

isCentral -- Determines if an element is central
************************************************

Synopsis
========

  * Usage:
        isCentral x or isCentral(x,ncgb)
  * Inputs:
      * x, a ring element (Macaulay2Doc),
  * Outputs:
      * a Boolean value (Macaulay2Doc),

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

This method checks to see if a given noncommutative ring element is central.

+----------------------------------------------+
|i1 : B = threeDimSklyanin(QQ,{1,1,-1},{x,y,z})|
|Using numthreads = 0                          |
|                                              |
|o1 = B                                        |
|                                              |
|o1 : FreeAlgebraQuotient                      |
+----------------------------------------------+
|i2 : g = z^3 + y*z*x - z*y*x - y^3            |
|                                              |
|        3                    3                |
|o2 = - y  + y*z*x - z*y*x + z                 |
|                                              |
|o2 : B                                        |
+----------------------------------------------+
|i3 : h = x^2 + y^2 + z^2                      |
|                                              |
|      2                2                      |
|o3 = y  + y*z + z*y + z                       |
|                                              |
|o3 : B                                        |
+----------------------------------------------+
|i4 : isCentral h                              |
|                                              |
|o4 = true                                     |
+----------------------------------------------+
|i5 : isCentral g                              |
|                                              |
|o5 = true                                     |
+----------------------------------------------+

See also
========

  * centralElements -- Finds central elements in a
    given degree

Ways to use isCentral :
=======================

  * "isCentral(RingElement)"

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

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

isLeftRegular -- Determines if a given (homogeneous) element is regular in a given degree
*****************************************************************************************

Synopsis
========

  * Usage:
        isLeftRegular(x,n) or isRightRegular(x,n)
  * Inputs:
      * x, a ring element (Macaulay2Doc),
      * n, an integer (Macaulay2Doc), the degree in which regularity
        is checked.
  * Outputs:
      * a Boolean value (Macaulay2Doc),

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

Given an element x in an noncommutative ring, isLeftRegular returns true if
a*x=0 implies a=0 for all a in the specified homogeneous degree n. Likewise
isRightRegular returns true if x*a=0 implies a=0 for all elements a of degree
n. The method calls leftMultiplicationMap, or
rightMultiplicationMap, as appropriate and checks
the kernel in the specified degree.

+----------------------------------------------+
|i1 : B = threeDimSklyanin(QQ,{1,1,-1},{x,y,z})|
|Using numthreads = 0                          |
|                                              |
|o1 = B                                        |
|                                              |
|o1 : FreeAlgebraQuotient                      |
+----------------------------------------------+
|i2 : g = z^3 + y*z*x - z*y*x - y^3            |
|                                              |
|        3                    3                |
|o2 = - y  + y*z*x - z*y*x + z                 |
|                                              |
|o2 : B                                        |
+----------------------------------------------+
|i3 : isLeftRegular(g,6)                       |
|Using numthreads = 0                          |
|                                              |
|o3 = true                                     |
+----------------------------------------------+
|i4 : C = QQ<|x,y|>                            |
|                                              |
|o4 = C                                        |
|                                              |
|o4 : FreeAlgebra                              |
+----------------------------------------------+
|i5 : D = C/ideal{x^2+x*y,y^2}                 |
|Using numthreads = 0                          |
|                                              |
|o5 = D                                        |
|                                              |
|o5 : FreeAlgebraQuotient                      |
+----------------------------------------------+
|i6 : isLeftRegular(x,1)                       |
|                                              |
|o6 = false                                    |
+----------------------------------------------+
|i7 : isRightRegular(x,1)                      |
|                                              |
|o7 = false                                    |
+----------------------------------------------+

See also
========

  * leftMultiplicationMap -- Computes a matrix
    for left or right multiplication by a homogeneous element
  * rightMultiplicationMap -- Computes a matrix
    for left or right multiplication by a homogeneous element

Ways to use isLeftRegular :
===========================

  * "isLeftRegular(RingElement,ZZ)"

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

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

isNormal(RingElement) -- Determines if an element of a noncommutative ring is normal
************************************************************************************

Synopsis
========

  * Function: isNormal (IntegralClosure),
  * Usage:
        isNormal x
  * Inputs:
      * x, a ring element (Macaulay2Doc),
  * Outputs:
      * a Boolean value (Macaulay2Doc),

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

Given an element x in a noncommutative ring R, this method returns true if
Rx=xR.

+--------------------------------------------+
|i1 : A = QQ<|a,b,c|>                        |
|                                            |
|o1 = A                                      |
|                                            |
|o1 : FreeAlgebra                            |
+--------------------------------------------+
|i2 : I = ideal {a*b+b*a,a*c+c*a,b*c+c*b}    |
|                                            |
|o2 = ideal (a*b + b*a, a*c + c*a, b*c + c*b)|
|                                            |
|o2 : Ideal of A                             |
+--------------------------------------------+
|i3 : B = A/I                                |
|Using numthreads = 0                        |
|                                            |
|o3 = B                                      |
|                                            |
|o3 : FreeAlgebraQuotient                    |
+--------------------------------------------+
|i4 : sigma = map(B,B,{b,c,a})               |
|                                            |
|o4 = map (B, B, {b, c, a})                  |
|                                            |
|o4 : RingMap B <--- B                       |
+--------------------------------------------+
|i5 : C = oreExtension(B,sigma,w)            |
|Using numthreads = 0                        |
|                                            |
|o5 = C                                      |
|                                            |
|o5 : FreeAlgebraQuotient                    |
+--------------------------------------------+
|i6 : isCentral w                            |
|                                            |
|o6 = false                                  |
+--------------------------------------------+
|i7 : isNormal w                             |
|                                            |
|o7 = true                                   |
+--------------------------------------------+

See also
========

  * isCentral -- Determines if an element is central
  * normalElements -- Finds normal elements

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

  * isNormal(RingElement) -- Determines if an
    element of a noncommutative ring is normal

leftMultiplicationMap -- Computes a matrix for left or right multiplication by a homogeneous element
****************************************************************************************************

Synopsis
========

  * Usage:
        leftMultiplicationMap(r,n) or leftMultiplicationMap(r,n,m) or leftMultiplicationMap(r,fromBasis,toBasis)
  * Inputs:
      * r, a ring element (Macaulay2Doc),
      * n, an integer (Macaulay2Doc), the homogeneous degree for the
        source of the map
      * m, an integer (Macaulay2Doc), the homogeneous degree for the
        target of the map
      * fromBasis, a list (Macaulay2Doc), a list of monomials of
        the same homogeneous degree
      * toBasis, a list (Macaulay2Doc), a list of monomials of
        homogeneous degree deg(r) larger than the degree of the toBasis
  * Outputs:
      * a matrix (Macaulay2Doc),

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

These methods return a matrix over the coefficient ring of the noncommutative
ring to which r belongs. The matrix represents left or right multiplication by
r. Most commonly, the user will enter the ring element (required to be
homogeneous) and a degree n. The result is the matrix of the map A_n -> A_n+d
where d is the degree of r. The matrix is computed relative to the monomial
basis obtain using ncBasis(ZZ,Ring).

Alternatively, the user can enter sets of independent monomials to serve as a
basis for the domain and co-domain of the maps. The method left or right
multiplies r by the fromBasis and converts to coordinates via
coefficients (Macaulay2Doc), and the toBasis.

+----------------------------------------------+
|i1 : B = threeDimSklyanin(QQ,{1,1,-1},{x,y,z})|
|Using numthreads = 0                          |
|                                              |
|o1 = B                                        |
|                                              |
|o1 : FreeAlgebraQuotient                      |
+----------------------------------------------+
|i2 : L = leftMultiplicationMap(x,2)           |
|                                              |
|o2 = | 0  1 0  1  0  0 |                      |
|     | 0  0 -1 0  1  0 |                      |
|     | 0  0 1  0  0  0 |                      |
|     | -1 0 0  0  0  0 |                      |
|     | 0  0 0  0  1  0 |                      |
|     | -1 0 0  0  0  0 |                      |
|     | 0  0 0  -1 0  0 |                      |
|     | 1  0 0  0  0  1 |                      |
|     | 0  0 0  -1 0  0 |                      |
|     | 0  0 1  0  -1 0 |                      |
|                                              |
|              10        6                     |
|o2 : Matrix QQ   <--- QQ                      |
+----------------------------------------------+
|i3 : kernel L                                 |
|                                              |
|o3 = image 0                                  |
|                                              |
|                               6              |
|o3 : QQ-module, submodule of QQ               |
+----------------------------------------------+
|i4 : isRightRegular(x,2)                      |
|                                              |
|o4 = true                                     |
+----------------------------------------------+

If the element is not regular, you can use these methods to compute the
annihilators in particular degrees.

+-----------------------------------+
|i5 : C = QQ<|x,y|>                 |
|                                   |
|o5 = C                             |
|                                   |
|o5 : FreeAlgebra                   |
+-----------------------------------+
|i6 : D = C/ideal{x^2+x*y,y^2}      |
|Using numthreads = 0               |
|                                   |
|o6 = D                             |
|                                   |
|o6 : FreeAlgebraQuotient           |
+-----------------------------------+
|i7 : isRightRegular(x,1)           |
|                                   |
|o7 = false                         |
+-----------------------------------+
|i8 : L = leftMultiplicationMap(x,1)|
|                                   |
|o8 = | -1 1 |                      |
|     | 0  0 |                      |
|                                   |
|              2        2           |
|o8 : Matrix QQ  <--- QQ            |
+-----------------------------------+
|i9 : M=matrix gens kernel L        |
|                                   |
|o9 = | 1 |                         |
|     | 1 |                         |
|                                   |
|              2        1           |
|o9 : Matrix QQ  <--- QQ            |
+-----------------------------------+
|i10 : ncBasis(1,D)*M               |
|                                   |
|o10 = | x+y |                      |
|                                   |
|              1       1            |
|o10 : Matrix D  <--- D             |
+-----------------------------------+

Ways to use leftMultiplicationMap :
===================================

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

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

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

leftQuadraticMatrix -- Factors the quadratic ideal on the left or on the right.
*******************************************************************************

Synopsis
========

  * Usage:
        M = leftQuadraticMatrix I
  * Inputs:
      * I, an ideal (Macaulay2Doc), or List (Macaulay2Doc),
  * Outputs:
      * M, a matrix (Macaulay2Doc),

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

This function expresses the generators of the quadratic ideal I as a product of
a row or column vector of the variables times a matrix with linear entries.

+-----------------------------------------------------------------------------+
|i1 : R = ZZ/32003 <|x_4,x_1,x_2,x_3|>                                        |
|                                                                             |
|o1 = R                                                                       |
|                                                                             |
|o1 : FreeAlgebra                                                             |
+-----------------------------------------------------------------------------+
|i2 : I = ideal {x_3^2 - x_1*x_2, x_4^2 - x_2*x_1, x_1*x_3 - x_2*x_4,         |
|                x_3*x_1 - x_2*x_3, x_1*x_4 - x_4*x_2, x_4*x_1 - x_3*x_2}     |
|                                                                             |
|                      2   2                                                  |
|o2 = ideal (- x x  + x , x  - x x , x x  - x x , - x x  + x x , - x x  +     |
|               1 2    3   4    2 1   1 3    2 4     2 3    3 1     4 2       |
|     ------------------------------------------------------------------------|
|     x x , x x  - x x )                                                      |
|      1 4   4 1    3 2                                                       |
|                                                                             |
|o2 : Ideal of R                                                              |
+-----------------------------------------------------------------------------+
|i3 : lQ = leftQuadraticMatrix I                                              |
|                                                                             |
|o3 = | 0    0    -x_1 x_3  |                                                 |
|     | x_4  -x_2 0    0    |                                                 |
|     | -x_2 0    0    x_1  |                                                 |
|     | 0    x_3  0    -x_2 |                                                 |
|     | x_1  0    -x_4 0    |                                                 |
|     | 0    x_4  -x_3 0    |                                                 |
|                                                                             |
|             6       4                                                       |
|o3 : Matrix R  <--- R                                                        |
+-----------------------------------------------------------------------------+
|i4 : rQ = rightQuadraticMatrix I                                             |
|                                                                             |
|o4 = | 0    x_4  0    0    -x_2 x_1  |                                       |
|     | -x_2 0    x_3  0    x_4  0    |                                       |
|     | 0    -x_1 -x_4 -x_3 0    0    |                                       |
|     | x_3  0    0    x_1  0    -x_2 |                                       |
|                                                                             |
|             4       6                                                       |
|o4 : Matrix R  <--- R                                                        |
+-----------------------------------------------------------------------------+
|i5 : d = matrix {{x_4,x_1,x_2,x_3}}                                          |
|                                                                             |
|o5 = | x_4 x_1 x_2 x_3 |                                                     |
|                                                                             |
|             1       4                                                       |
|o5 : Matrix R  <--- R                                                        |
+-----------------------------------------------------------------------------+
|i6 : e = matrix transpose {{x_4,x_1,x_2,x_3}}                                |
|                                                                             |
|o6 = | x_4 |                                                                 |
|     | x_1 |                                                                 |
|     | x_2 |                                                                 |
|     | x_3 |                                                                 |
|                                                                             |
|             4       1                                                       |
|o6 : Matrix R  <--- R                                                        |
+-----------------------------------------------------------------------------+
|i7 : NCReductionTwoSided(ncMatrixMult(d,rQ),I)                               |
|                                                                             |
|o7 = 0                                                                       |
|                                                                             |
|             1       6                                                       |
|o7 : Matrix R  <--- R                                                        |
+-----------------------------------------------------------------------------+
|i8 : NCReductionTwoSided(ncMatrixMult(lQ,e),I)                               |
|                                                                             |
|o8 = 0                                                                       |
|                                                                             |
|             6       1                                                       |
|o8 : Matrix R  <--- R                                                        |
+-----------------------------------------------------------------------------+

We can perform these products over the quotient to verify that the composite is
zero there.

+--------------------------------------+
|i9 : S = R/I                          |
|Using numthreads = 0                  |
|                                      |
|o9 = S                                |
|                                      |
|o9 : FreeAlgebraQuotient              |
+--------------------------------------+
|i10 : (lQS,dS) = (sub(lQ,S),sub(d,S));|
+--------------------------------------+
|i11 : (rQS,eS) = (sub(rQ,S),sub(e,S));|
+--------------------------------------+
|i12 : ncMatrixMult(dS,rQS)            |
|                                      |
|o12 = 0                               |
|                                      |
|              1       6               |
|o12 : Matrix S  <--- S                |
+--------------------------------------+
|i13 : ncMatrixMult(lQS,eS)            |
|                                      |
|o13 = 0                               |
|                                      |
|              6       1               |
|o13 : Matrix S  <--- S                |
+--------------------------------------+

Ways to use leftQuadraticMatrix :
=================================

  * "leftQuadraticMatrix(Ideal)"
  * "leftQuadraticMatrix(List)"

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

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

lineSchemeFourDim -- Compute the line scheme of a four-dimensional AS regular algebra
*************************************************************************************

Synopsis
========

  * Usage:
        L = lineSchemeFourDim B
  * Inputs:
      * B, a quotient of a free algebra,
  * Outputs:
      * L, an ideal (Macaulay2Doc),

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

This method computes the scheme that parametrizes the set of line modules over
an AS-regular algebra B due to Shelton and Vancliff. More precisely, it
computes the image of this scheme under the Plücker embedding.

As a first example, we see that the line scheme of the commutative polynomial
ring is just the image of the Grassmannian Gr(4,2) in $\mathbb{P}^5$:

+------------------------------------------------------+
|i1 : S = skewPolynomialRing(QQ,1_QQ,{x_1,x_2,x_3,x_4})|
|Using numthreads = 0                                  |
|                                                      |
|o1 = S                                                |
|                                                      |
|o1 : FreeAlgebraQuotient                              |
+------------------------------------------------------+
|i2 : L = lineSchemeFourDim(S,M);                      |
|Using numthreads = 0                                  |
|Using numthreads = 0                                  |
|                                                      |
|o2 : Ideal of QQ[M   ..M   , M   ..M   , M   ]        |
|                  1,2   1,4   2,3   2,4   3,4         |
+------------------------------------------------------+
|i3 : netList minimalPrimes L                          |
|                                                      |
|     +-------------------------------------+          |
|o3 = |ideal(M   M    - M   M    + M   M   )|          |
|     |       1,4 2,3    1,3 2,4    1,2 3,4 |          |
|     +-------------------------------------+          |
+------------------------------------------------------+

Next, we compute the line scheme of a (-1)-skew polynomial ring. We see that it
is a union of four planes and three quadric surfaces.

+---------------------------------------------------------+
|i4 : S = skewPolynomialRing(QQ,(-1)_QQ,{x_1,x_2,x_3,x_4})|
|Using numthreads = 0                                     |
|                                                         |
|o4 = S                                                   |
|                                                         |
|o4 : FreeAlgebraQuotient                                 |
+---------------------------------------------------------+
|i5 : L = lineSchemeFourDim(S,M);                         |
|Using numthreads = 0                                     |
|Using numthreads = 0                                     |
|                                                         |
|o5 : Ideal of QQ[M   ..M   , M   ..M   , M   ]           |
|                  1,2   1,4   2,3   2,4   3,4            |
+---------------------------------------------------------+
|i6 : netList minimalPrimes L                             |
|                                                         |
|     +---------------------------------------+           |
|o6 = |ideal (M   , M   , M   )               |           |
|     |        3,4   2,4   1,4                |           |
|     +---------------------------------------+           |
|     |ideal (M   , M   , M   )               |           |
|     |        3,4   2,3   1,3                |           |
|     +---------------------------------------+           |
|     |ideal (M   , M   , M   M    - M   M   )|           |
|     |        3,4   1,2   1,4 2,3    1,3 2,4 |           |
|     +---------------------------------------+           |
|     |ideal (M   , M   , M   )               |           |
|     |        2,4   2,3   1,2                |           |
|     +---------------------------------------+           |
|     |ideal (M   , M   , M   M    + M   M   )|           |
|     |        2,4   1,3   1,4 2,3    1,2 3,4 |           |
|     +---------------------------------------+           |
|     |ideal (M   , M   , M   M    - M   M   )|           |
|     |        2,3   1,4   1,3 2,4    1,2 3,4 |           |
|     +---------------------------------------+           |
|     |ideal (M   , M   , M   )               |           |
|     |        1,4   1,3   1,2                |           |
|     +---------------------------------------+           |
+---------------------------------------------------------+

Finally, we consider the following AS-regular algebra of dimension four. Its
line scheme is dimension one and degree 20, and is a union of 10 conics.

+-----------------------------------------------------------------------------+
|i7 : R = QQ <|x_4,x_1,x_2,x_3|>                                              |
|                                                                             |
|o7 = R                                                                       |
|                                                                             |
|o7 : FreeAlgebra                                                             |
+-----------------------------------------------------------------------------+
|i8 : I = ideal {x_3^2 - x_1*x_2, x_4^2 - x_2*x_1, x_1*x_3 - x_2*x_4, x_3*x_1 |
|                                                                             |
|                      2   2                                                  |
|o8 = ideal (- x x  + x , x  - x x , x x  - x x , - x x  + x x , - x x  +     |
|               1 2    3   4    2 1   1 3    2 4     2 3    3 1     4 2       |
|     ------------------------------------------------------------------------|
|     x x , x x  - x x )                                                      |
|      1 4   4 1    3 2                                                       |
|                                                                             |
|o8 : Ideal of R                                                              |
|-----------------------------------------------------------------------------|
|- x_2*x_3, x_1*x_4 - x_4*x_2, x_4*x_1 - x_3*x_2}                             |
+-----------------------------------------------------------------------------+
|i9 : Igb = NCGB(I, 10);                                                      |
|Using numthreads = 0                                                         |
|                                                                             |
|             1       9                                                       |
|o9 : Matrix R  <--- R                                                        |
+-----------------------------------------------------------------------------+
|i10 : S = R/I                                                                |
|                                                                             |
|o10 = S                                                                      |
|                                                                             |
|o10 : FreeAlgebraQuotient                                                    |
+-----------------------------------------------------------------------------+
|i11 : L = lineSchemeFourDim(S,M);                                            |
|Using numthreads = 0                                                         |
|Using numthreads = 0                                                         |
|                                                                             |
|o11 : Ideal of QQ[M   ..M   , M   ..M   , M   ]                              |
|                   1,2   1,4   2,3   2,4   3,4                               |
+-----------------------------------------------------------------------------+
|i12 : netList minimalPrimes L                                                |
|                                                                             |
|      +-----------------------------------------------------------------+    |
|      |                                 2                               |    |
|o12 = |ideal (M   , M    - M   , M   , M    - M   M   )                 |    |
|      |        3,4   1,4    2,3   1,2   2,3    1,3 2,4                  |    |
|      +-----------------------------------------------------------------+    |
|      |                                 2                               |    |
|      |ideal (M   , M    + M   , M   , M    + M   M   )                 |    |
|      |        3,4   1,4    2,3   1,2   2,3    1,3 2,4                  |    |
|      +-----------------------------------------------------------------+    |
|      |                                            2                    |    |
|      |ideal (M   , M   , M    - M   , M   M    + M   )                 |    |
|      |        2,4   1,3   1,2    3,4   1,4 2,3    3,4                  |    |
|      +-----------------------------------------------------------------+    |
|      |                                            2                    |    |
|      |ideal (M   , M   , M    + M   , M   M    - M   )                 |    |
|      |        2,4   1,3   1,2    3,4   1,4 2,3    3,4                  |    |
|      +-----------------------------------------------------------------+    |
|      |                                 2                               |    |
|      |ideal (M   , M   , M    - M   , M    - M   M   )                 |    |
|      |        2,3   1,4   1,3    2,4   2,4    1,2 3,4                  |    |
|      +-----------------------------------------------------------------+    |
|      |                                 2                               |    |
|      |ideal (M   , M   , M    + M   , M    + M   M   )                 |    |
|      |        2,3   1,4   1,3    2,4   2,4    1,2 3,4                  |    |
|      +-----------------------------------------------------------------+    |
|      |                                               2      2      2   |    |
|      |ideal (M    - M   , M    - M   , M    + M   , M    - M    - M   )|    |
|      |        1,4    2,3   1,3    2,4   1,2    3,4   2,3    2,4    3,4 |    |
|      +-----------------------------------------------------------------+    |
|      |                                               2      2      2   |    |
|      |ideal (M    - M   , M    + M   , M    - M   , M    + M    + M   )|    |
|      |        1,4    2,3   1,3    2,4   1,2    3,4   2,3    2,4    3,4 |    |
|      +-----------------------------------------------------------------+    |
|      |                                               2      2      2   |    |
|      |ideal (M    + M   , M    - M   , M    - M   , M    + M    - M   )|    |
|      |        1,4    2,3   1,3    2,4   1,2    3,4   2,3    2,4    3,4 |    |
|      +-----------------------------------------------------------------+    |
|      |                                               2      2      2   |    |
|      |ideal (M    + M   , M    + M   , M    + M   , M    - M    + M   )|    |
|      |        1,4    2,3   1,3    2,4   1,2    3,4   2,3    2,4    3,4 |    |
|      +-----------------------------------------------------------------+    |
+-----------------------------------------------------------------------------+

Ways to use lineSchemeFourDim :
===============================

  * "lineSchemeFourDim(FreeAlgebraQuotient,Symbol)"

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

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

ncBasis -- Returns a basis of an noncommutative ring in specified degrees.
**************************************************************************

Synopsis
========

  * Usage:
        bas = ncBasis(d,e,B)
  * Inputs:
      * d, an integer (Macaulay2Doc), or List (Macaulay2Doc),
        or InfiniteNumber (Macaulay2Doc),
      * e, an integer (Macaulay2Doc), or List (Macaulay2Doc),
        or InfiniteNumber (Macaulay2Doc),
      * B, a ring (Macaulay2Doc),
  * Optional inputs (Macaulay2Doc),:
      * Limit => ..., default value infinity
  * Outputs:
      * bas, a matrix (Macaulay2Doc),

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

This command returns a basis (or minimal generating set, if the ground ring is
not a field), of a graded noncommutative ring.

+---------------------------------------------------------------------------+
|i1 : A = QQ<|x,y,z|>                                                       |
|                                                                           |
|o1 = A                                                                     |
|                                                                           |
|o1 : FreeAlgebra                                                           |
+---------------------------------------------------------------------------+
|i2 : p = y*z + z*y - x^2                                                   |
|                                                                           |
|        2                                                                  |
|o2 = - x  + y*z + z*y                                                      |
|                                                                           |
|o2 : A                                                                     |
+---------------------------------------------------------------------------+
|i3 : q = x*z + z*x - y^2                                                   |
|                                                                           |
|            2                                                              |
|o3 = x*z - y  + z*x                                                        |
|                                                                           |
|o3 : A                                                                     |
+---------------------------------------------------------------------------+
|i4 : r = z^2 - x*y - y*x                                                   |
|                                                                           |
|                    2                                                      |
|o4 = - x*y - y*x + z                                                       |
|                                                                           |
|o4 : A                                                                     |
+---------------------------------------------------------------------------+
|i5 : I = ideal{p,q,r}                                                      |
|                                                                           |
|               2                     2                       2             |
|o5 = ideal (- x  + y*z + z*y, x*z - y  + z*x, - x*y - y*x + z )            |
|                                                                           |
|o5 : Ideal of A                                                            |
+---------------------------------------------------------------------------+
|i6 : B = A/I                                                               |
|Using numthreads = 0                                                       |
|                                                                           |
|o6 = B                                                                     |
|                                                                           |
|o6 : FreeAlgebraQuotient                                                   |
+---------------------------------------------------------------------------+
|i7 : bas = ncBasis(4,B)                                                    |
|                                                                           |
|o7 = | y3x y4 yzyx yzy2 yzyz zy2x zy3 zyzx zyzy z2yx z2y2 z2yz z3x z3y z4 ||
|                                                                           |
|             1       15                                                    |
|o7 : Matrix B  <--- B                                                      |
+---------------------------------------------------------------------------+

Ways to use ncBasis :
=====================

  * "ncBasis(InfiniteNumber,InfiniteNumber,Ring)"
  * "ncBasis(InfiniteNumber,List,Ring)"
  * "ncBasis(InfiniteNumber,ZZ,Ring)"
  * "ncBasis(List,InfiniteNumber,Ring)"
  * "ncBasis(List,List,Ring)"
  * "ncBasis(List,Ring)"
  * "ncBasis(Ring)"
  * "ncBasis(ZZ,InfiniteNumber,Ring)"
  * "ncBasis(ZZ,Ring)"
  * "ncBasis(ZZ,ZZ,Ring)"

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

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

NCGB -- Compute a two-sided Groebner basis of an ideal to a specified degree
****************************************************************************

Synopsis
========

  * Usage:
        Igb = NCGB(I,n)
  * Inputs:
      * I, an ideal (Macaulay2Doc),
      * n, an integer (Macaulay2Doc),
  * Optional inputs (Macaulay2Doc),:
      * Strategy => ..., default value "F4"
  * Outputs:
      * Igb, a matrix (Macaulay2Doc),

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

This method performs a two-sided Groebner basis calculation of the ideal $I$ to
the degree $n$ given.  Possible strategies are "Naive", "F4" and "F4Parallel".
If no integer is given, the Groebner basis is computed to twice the maximal
degree of a generator.  As usual, one must take care not to provide too high of
a degree here, as Groebner bases may be infinite in the noncommutative case.

The current state of the algorithm requires the FreeAlgebra to be defined over
a field, and the "F4" or "F4Parallel" strategies require the base ring to be
either QQ, ZZ/p or GF(q).

+----------------------------------------------------------------+
|i1 : A = QQ<|x,y,z|>                                            |
|                                                                |
|o1 = A                                                          |
|                                                                |
|o1 : FreeAlgebra                                                |
+----------------------------------------------------------------+
|i2 : I = ideal { x*y + y*x - 2*z^2,                             |
|                 y*z + z*y - 2*x^2,                             |
|                 z*x + x*z - 2*y^2}                             |
|                                                                |
|                          2      2                      2       |
|o2 = ideal (x*y + y*x - 2z , - 2x  + y*z + z*y, x*z - 2y  + z*x)|
|                                                                |
|o2 : Ideal of A                                                 |
+----------------------------------------------------------------+
|i3 : Igb = NCGB(I,10)                                           |
|Using numthreads = 0                                            |
|                                                                |
|o3 = | xy+yx-2z2 x2-1/2yz-1/2zy xz-2y2+zx y2z-zy2 yz2-z2y |     |
|                                                                |
|             1       5                                          |
|o3 : Matrix A  <--- A                                           |
+----------------------------------------------------------------+

Ways to use NCGB :
==================

  * "NCGB(Ideal)"
  * "NCGB(Ideal,ZZ)"

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

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

ncGraphIdeal -- Compute the graph ideal of a ring map between noncommutative rings.
***********************************************************************************

Synopsis
========

  * Usage:
        I = ncGraphIdeal f
  * Inputs:
      * f, a ring map (Macaulay2Doc),
  * Outputs:
      * I, an ideal (Macaulay2Doc),

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

This function creates the graph ideal of a ring map between noncommutative
rings.  It creates the free product of the source and target, and forms the
ideal generated by $v - f(v)$ for all variables $v$ in the source.

+----------------------------------------------------------------------------+
|i1 : A = QQ<|a,b,c|>                                                        |
|                                                                            |
|o1 = A                                                                      |
|                                                                            |
|o1 : FreeAlgebra                                                            |
+----------------------------------------------------------------------------+
|i2 : B = QQ<|x,y|>                                                          |
|                                                                            |
|o2 = B                                                                      |
|                                                                            |
|o2 : FreeAlgebra                                                            |
+----------------------------------------------------------------------------+
|i3 : f = map(B,A,{x*y*x,y*x*y,x*y})                                         |
|                                                                            |
|o3 = map (B, A, {x*y*x, y*x*y, x*y})                                        |
|                                                                            |
|o3 : RingMap B <--- A                                                       |
+----------------------------------------------------------------------------+
|i4 : I = ncGraphIdeal f                                                     |
|                                                                            |
|o4 = ideal (- x*y*x + a, - y*x*y + b, - x*y + c)                            |
|                                                                            |
|o4 : Ideal of QQ <|x, y, a, b, c|>                                          |
+----------------------------------------------------------------------------+
|i5 : Igb = NCGB(I,10)                                                       |
|Warning:  Parallel F4 Algorithm not available over current coefficient ring.|
|Converting to Naive algorithm.                                              |
|                                                                            |
|o5 = | xy-c cx-a yc-b |                                                     |
|                                                                            |
|                                  1                            3            |
|o5 : Matrix (QQ <|x, y, a, b, c|>)  <--- (QQ <|x, y, a, b, c|>)             |
+----------------------------------------------------------------------------+

Those generators of the Groebner basis that involve only the variables in the
domain are a Groebner basis of the kernel of the ring map.

Ways to use ncGraphIdeal :
==========================

  * "ncGraphIdeal(RingMap)"

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

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

ncHilbertSeries -- Computes the Hilbert series of a noncommutative ring
***********************************************************************

Synopsis
========

  * Usage:
        hseries = ncHilbertSeries(A)
  * Inputs:
      * A, a quotient of a free algebra, or
        FreeAlgebra,
  * Optional inputs (Macaulay2Doc),:
      * Order => ..., default value 20
  * Outputs:
      * an expression (Macaulay2Doc), or RingElement (Macaulay2Doc),

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

This method computes the Hilbert series of a graded noncommutative ring.  If
the ring is defined over a field (and potentially not standard graded), then a
basis is computed and the generating function of the degrees of that basis is
returned.  The degree to which one computes the Hilbert series is controlled
with the Order option.  The output is returned as either an expression (if a
rational representation can be found using toRationalFunction)
or as an element of the degreesRing (Macaulay2Doc),
of the input.

+----------------------------------------------+
|i1 : A = QQ<|x,y,z|>                          |
|                                              |
|o1 = A                                        |
|                                              |
|o1 : FreeAlgebra                              |
+----------------------------------------------+
|i2 : ncHilbertSeries(A,Order=>10)             |
|                                              |
|        1                                     |
|o2 = ------                                   |
|     1 - 3T                                   |
|                                              |
|o2 : Expression of class Divide               |
+----------------------------------------------+
|i3 : A = QQ<|x,y,z,Degrees=>{1,2,3}|>         |
|                                              |
|o3 = A                                        |
|                                              |
|o3 : FreeAlgebra                              |
+----------------------------------------------+
|i4 : ncHilbertSeries(A,Order=>10)             |
|                                              |
|             1                                |
|o4 = -----------------                        |
|               2    3                         |
|     1 - (T + T  + T )                        |
|                                              |
|o4 : Expression of class Divide               |
+----------------------------------------------+
|i5 : B = threeDimSklyanin(QQ,{1,1,-1},{x,y,z})|
|Using numthreads = 0                          |
|                                              |
|o5 = B                                        |
|                                              |
|o5 : FreeAlgebraQuotient                      |
+----------------------------------------------+
|i6 : ncHilbertSeries(B,Order=>10)             |
|Using numthreads = 0                          |
|Using numthreads = 0                          |
|Using numthreads = 0                          |
|Using numthreads = 0                          |
|                                              |
|         1                                    |
|o6 = --------                                 |
|            3                                 |
|     (1 - T)                                  |
|                                              |
|o6 : Expression of class Divide               |
+----------------------------------------------+

Ways to use ncHilbertSeries :
=============================

  * "ncHilbertSeries(FreeAlgebra)"
  * "ncHilbertSeries(FreeAlgebraQuotient)"

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

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

ncKernel -- Compute the graph ideal of a ring map between noncommutative rings.
*******************************************************************************

Synopsis
========

  * Usage:
        I = ncKernel f
  * Inputs:
      * f, a ring map (Macaulay2Doc),
  * Optional inputs (Macaulay2Doc),:
      * DegreeLimit => ..., default value 10
      * Strategy => ..., default value "F4"
  * Outputs:
      * I, an ideal (Macaulay2Doc),

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

This function computes (a Groebner basis of) the kernel of a ring map between
noncommutative rings.

+----------------------------------------------------------------------------+
|i1 : A = QQ<|a,b,c|>                                                        |
|                                                                            |
|o1 = A                                                                      |
|                                                                            |
|o1 : FreeAlgebra                                                            |
+----------------------------------------------------------------------------+
|i2 : B = QQ<|x,y|>                                                          |
|                                                                            |
|o2 = B                                                                      |
|                                                                            |
|o2 : FreeAlgebra                                                            |
+----------------------------------------------------------------------------+
|i3 : f = map(B,A,{x*y*x,y*x*y,x*y})                                         |
|                                                                            |
|o3 = map (B, A, {x*y*x, y*x*y, x*y})                                        |
|                                                                            |
|o3 : RingMap B <--- A                                                       |
+----------------------------------------------------------------------------+
|i4 : K = ncKernel f                                                         |
|Warning:  Parallel F4 Algorithm not available over current coefficient ring.|
|Converting to Naive algorithm.                                              |
|                                                                            |
|o4 = ideal 0                                                                |
|                                                                            |
|o4 : Ideal of A                                                             |
+----------------------------------------------------------------------------+

The generators returned by this function are in fact a Groebner basis of the
kernel, so it may not be a minimal generating set.

The DegreeLimit (Macaulay2Doc), and Strategy (Macaulay2Doc),
options are forwarded on to the call to the Groebner
basis routine NCGB.

Ways to use ncKernel :
======================

  * "ncKernel(RingMap)"

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

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

ncMatrixMult -- Correctly multiplies matrices from noncommutative rings.
************************************************************************

Synopsis
========

  * Usage:
        L = ncMatrixMult(M,N)
  * Inputs:
      * M, a matrix (Macaulay2Doc),
      * N, a matrix (Macaulay2Doc),
  * Outputs:
      * L, a matrix (Macaulay2Doc),

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

This function is provided as a temporary band-aid for matrix multiplication
over a noncommutative ring, as well as a reminder that it must be repaired
eventually.

+------------------------------------------------+
|i1 : A = QQ<|x,y|>                              |
|                                                |
|o1 = A                                          |
|                                                |
|o1 : FreeAlgebra                                |
+------------------------------------------------+
|i2 : M = matrix {{x}}                           |
|                                                |
|o2 = | x |                                      |
|                                                |
|             1       1                          |
|o2 : Matrix A  <--- A                           |
+------------------------------------------------+
|i3 : N = matrix {{y}}                           |
|                                                |
|o3 = | y |                                      |
|                                                |
|             1       1                          |
|o3 : Matrix A  <--- A                           |
+------------------------------------------------+
|i4 : M*N                                        |
|                                                |
|o4 = | yx |                                     |
|                                                |
|             1       1                          |
|o4 : Matrix A  <--- A                           |
+------------------------------------------------+
|i5 : assert(ncMatrixMult(M,N) == matrix {{x*y}})|
+------------------------------------------------+

Ways to use ncMatrixMult :
==========================

  * "ncMatrixMult(Matrix,Matrix)"

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

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

NCReductionTwoSided -- Reduces the entries of an Matrix with respect to an ideal
********************************************************************************

Synopsis
========

  * Usage:
        L = NCReductionTwoSided(M,I)
  * Inputs:
      * M, a matrix (Macaulay2Doc),
      * I, an ideal (Macaulay2Doc),
  * Outputs:
      * L, a matrix (Macaulay2Doc),

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

This command reduces the entries of a RingElement or Matrix with respect to an
Ideal or a single row matrix.  A Groebner basis is not computed for the input
ideal.  If one wishes to use this function for normal forms, one must first
call NCGB, and pass the result to this function.

+---------------------------------------------------------------+
|i1 : A = QQ<|x,y,z|>                                           |
|                                                               |
|o1 = A                                                         |
|                                                               |
|o1 : FreeAlgebra                                               |
+---------------------------------------------------------------+
|i2 : f = y*z + z*y - x^2                                       |
|                                                               |
|        2                                                      |
|o2 = - x  + y*z + z*y                                          |
|                                                               |
|o2 : A                                                         |
+---------------------------------------------------------------+
|i3 : g = x*z + z*x - y^2                                       |
|                                                               |
|            2                                                  |
|o3 = x*z - y  + z*x                                            |
|                                                               |
|o3 : A                                                         |
+---------------------------------------------------------------+
|i4 : h = z^2 - x*y - y*x                                       |
|                                                               |
|                    2                                          |
|o4 = - x*y - y*x + z                                           |
|                                                               |
|o4 : A                                                         |
+---------------------------------------------------------------+
|i5 : I = ideal {f,g,h}                                         |
|                                                               |
|               2                     2                       2 |
|o5 = ideal (- x  + y*z + z*y, x*z - y  + z*x, - x*y - y*x + z )|
|                                                               |
|o5 : Ideal of A                                                |
+---------------------------------------------------------------+
|i6 : Igb = NCGB(I,10)                                          |
|Using numthreads = 0                                           |
|                                                               |
|o6 = | x2-yz-zy xz-y2+zx xy+yx-z2 yz2-z2y y2z-zy2 |            |
|                                                               |
|             1       5                                         |
|o6 : Matrix A  <--- A                                          |
+---------------------------------------------------------------+
|i7 : NCReductionTwoSided(x^4,I)                                |
|                                                               |
|                  2       2                                    |
|o7 = y*z*y*z + y*z y + z*y z + z*y*z*y                         |
|                                                               |
|o7 : A                                                         |
+---------------------------------------------------------------+
|i8 : NCReductionTwoSided(x^4,Igb)                              |
|                                                               |
|                           2 2                                 |
|o8 = y*z*y*z + z*y*z*y + 2z y                                  |
|                                                               |
|o8 : A                                                         |
+---------------------------------------------------------------+

Ways to use NCReductionTwoSided :
=================================

  * "NCReductionTwoSided(Matrix,Ideal)"
  * "NCReductionTwoSided(Matrix,List)"
  * "NCReductionTwoSided(Matrix,Matrix)"
  * "NCReductionTwoSided(RingElement,Ideal)"
  * "NCReductionTwoSided(RingElement,List)"
  * "NCReductionTwoSided(RingElement,Matrix)"

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

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

normalAutomorphism -- Computes the automorphism determined by a normal homogeneous element
******************************************************************************************

Synopsis
========

  * Usage:
        normalAutomorphism x
  * Inputs:
      * x, a ring element (Macaulay2Doc), a homogeneous
        normal element
  * Outputs:
      * a ring map (Macaulay2Doc),

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

Let x be a homogeneous element in a noncommutative ring R. If x is normal then
x determines a graded ring automorphism f of R by x*a = f(x)*a.  This method
returns this automorphism as a RingMap.

+--------------------------------------------+
|i1 : A = QQ<|a,b,c|>                        |
|                                            |
|o1 = A                                      |
|                                            |
|o1 : FreeAlgebra                            |
+--------------------------------------------+
|i2 : I = ideal {a*b+b*a,a*c+c*a,b*c+c*b}    |
|                                            |
|o2 = ideal (a*b + b*a, a*c + c*a, b*c + c*b)|
|                                            |
|o2 : Ideal of A                             |
+--------------------------------------------+
|i3 : B = A/I                                |
|Using numthreads = 0                        |
|                                            |
|o3 = B                                      |
|                                            |
|o3 : FreeAlgebraQuotient                    |
+--------------------------------------------+
|i4 : sigma = map(B,B,{b,c,a})               |
|                                            |
|o4 = map (B, B, {b, c, a})                  |
|                                            |
|o4 : RingMap B <--- B                       |
+--------------------------------------------+
|i5 : C = oreExtension(B,sigma,w)            |
|Using numthreads = 0                        |
|                                            |
|o5 = C                                      |
|                                            |
|o5 : FreeAlgebraQuotient                    |
+--------------------------------------------+

By construction, w is normal, and the normalizing automorphism is sigma
extended to C sending w to itself.  It follows that therefore w^2 is also
normal whose automorphism is the square of sigma extended to C in a similar
way.  We verify these facts with the following commands:

+---------------------------------+
|i6 : isNormal w^2                |
|                                 |
|o6 = true                        |
+---------------------------------+
|i7 : phi = normalAutomorphism w^2|
|                                 |
|o7 = map (C, C, {a, b, c, w})    |
|                                 |
|o7 : RingMap C <--- C            |
+---------------------------------+
|i8 : matrix phi                  |
|                                 |
|o8 = | a b c w |                 |
|                                 |
|             1       4           |
|o8 : Matrix C  <--- C            |
+---------------------------------+
|i9 : matrix (sigma * sigma)      |
|                                 |
|o9 = | c a b |                   |
|                                 |
|             1       3           |
|o9 : Matrix B  <--- B            |
+---------------------------------+

See also
========

  * normalElements -- Finds normal elements

Ways to use normalAutomorphism :
================================

  * "normalAutomorphism(RingElement)"

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

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

normalElements -- Finds normal elements
***************************************

Synopsis
========

  * Usage:
        normalElements(A,n,x)
  * Inputs:
      * A, a quotient of a free algebra,
      * n, an integer (Macaulay2Doc),
      * x, a symbol (Macaulay2Doc),
  * Outputs:
      * a list (Macaulay2Doc),

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

Let b_1,...,b_n be a monomial basis for a noncommutative Ring A in degree d. We
assume A is generated by elements a_1,...,a_k of degree 1. A homogeneous
element r in A is normal if a_i*r is in the span of the r*a_j for all i.

Using the input symbols x and y, we define the "normal variety" to be the set
of common solutions to the equations x_j*a_i*b_j =
y_j1*b_j*a_1+...+y_jk*b_j*a_k for all i and j. Saturating the ideal at each x_i
we extract polynomial equations the x_i must satisfy for the element
x_1*b_1+...+x_n*b_n to be normal in A.

Before computing the normal variety, this method checks for normal monomials in
degree n. These are returned first to reduce the complexity of the problem.
Then the method computes the variety and returns its components. The equations
the method returns are given in terms of the indexed variable x. The indices
are basis monomials in degree n.

The following example is a 3-dimensional Sklyanin algebra.

+----------------------------------------------+
|i1 : B = threeDimSklyanin(QQ,{1,1,-1},{x,y,z})|
|Using numthreads = 0                          |
|                                              |
|o1 = B                                        |
|                                              |
|o1 : FreeAlgebraQuotient                      |
+----------------------------------------------+
|i2 : ncBasis(2,B)                             |
|                                              |
|o2 = | yx y2 yz zx zy z2 |                    |
|                                              |
|             1       6                        |
|o2 : Matrix B  <--- B                         |
+----------------------------------------------+
|i3 : normalElements(B,2,r)                    |
|                                              |
|             2                  2             |
|o3 = ({y*x, y , y*z, z*x, z*y, z }, {})       |
|                                              |
|o3 : Sequence                                 |
+----------------------------------------------+

The normal elements in degree 2 are x^2, y^2 and z^2. The basis calculation
shows y^2 and z^2 are normal forms in B. The normalElements method first checks
all basis monomials using isNormal (IntegralClosure). In this
case it finds y^2 and z^2 are normal and returns this information. However, x^2
is not a normal form expression. The normal form of x^2 is y*z+z*y. In the
second phase of the calculation, the method returns generators of the ideal
describing the normal elements (excluding the normal monomials). We see the
coefficients of basis monomials z*x and y*x must be 0 and the coefficients of
y*z and z*y must be equal. These equations identify x^2 = y*z+z*y as a normal
element of degree 2.

+--------------------------------------------------------------------+
|i4 : normalElements(B,3,t)                                          |
|                                                                    |
|        2    3                          2          2    2    3      |
|o4 = ({y x, y , y*z*x, y*z*y, z*y*x, z*y , z*y*z, z x, z y, z }, {})|
|                                                                    |
|o4 : Sequence                                                       |
+--------------------------------------------------------------------+
|i5 : g = -y^3-z*y*x+y*z*x+z^3                                       |
|                                                                    |
|        3                    3                                      |
|o5 = - y  + y*z*x - z*y*x + z                                       |
|                                                                    |
|o5 : B                                                              |
+--------------------------------------------------------------------+
|i6 : isCentral g                                                    |
|                                                                    |
|o6 = true                                                           |
+--------------------------------------------------------------------+

In degree 3, there are no normal monomials, so the first part of the return
value is the empty list.  The second coordinate of the return value is a single
matrix whose entries determine the equations that show that the only normal
element of degree 3 (up to scaling) is the central element g.

Ways to use normalElements :
============================

  * "normalElements(FreeAlgebraQuotient,ZZ,Symbol)"
  * normalElements(RingMap,ZZ), --
    Finds elements normalized by a ring map

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

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

normalElements(RingMap,ZZ) -- Finds elements normalized by a ring map
*********************************************************************

Synopsis
========

  * Function: normalElements,
  * Usage:
        normalElements(f,n)
  * Inputs:
      * f, a ring map (Macaulay2Doc),
      * n, an integer (Macaulay2Doc), a homogeneous degree in which
        to search for normal elements
  * Outputs:
      * a matrix (Macaulay2Doc),

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

A normal element x in a non-commutative ring R determines an automorphism f of
R by a*x=x*f(a). Conversely, given a ring endomorphism, we may ask if any x
satisfy the above equation for all a.

Given a ring map f and a degree n, this method returns solutions to the
equations a*x=x*f(a) for all generators a of R.

+-------------------------------------------------+
|i1 : B = skewPolynomialRing(QQ,(-1)_QQ,{x,y,z,w})|
|Using numthreads = 0                             |
|                                                 |
|o1 = B                                           |
|                                                 |
|o1 : FreeAlgebraQuotient                         |
+-------------------------------------------------+
|i2 : sigma = map(B,B,{y,z,w,x})                  |
|                                                 |
|o2 = map (B, B, {y, z, w, x})                    |
|                                                 |
|o2 : RingMap B <--- B                            |
+-------------------------------------------------+
|i3 : C = oreExtension(B,sigma,a)                 |
|Using numthreads = 0                             |
|                                                 |
|o3 = C                                           |
|                                                 |
|o3 : FreeAlgebraQuotient                         |
+-------------------------------------------------+
|i4 : sigmaC = map(C,C,{y,z,w,x,a})               |
|                                                 |
|o4 = map (C, C, {y, z, w, x, a})                 |
|                                                 |
|o4 : RingMap C <--- C                            |
+-------------------------------------------------+
|i5 : normalElements(sigmaC,1)                    |
|                                                 |
|o5 = 0                                           |
|                                                 |
|              1                                  |
|o5 : Matrix QQ  <--- 0                           |
+-------------------------------------------------+
|i6 : normalElements(sigmaC,2)                    |
|                                                 |
|o6 = 0                                           |
|                                                 |
|              1                                  |
|o6 : Matrix QQ  <--- 0                           |
+-------------------------------------------------+
|i7 : normalElements(sigmaC * sigmaC,2)           |
|                                                 |
|o7 = 0                                           |
|                                                 |
|              1                                  |
|o7 : Matrix QQ  <--- 0                           |
+-------------------------------------------------+
|i8 : normalElements(sigmaC * sigmaC * sigmaC, 3) |
|                                                 |
|o8 = 0                                           |
|                                                 |
|              1                                  |
|o8 : Matrix QQ  <--- 0                           |
+-------------------------------------------------+

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

  * normalElements(RingMap,ZZ), --
    Finds elements normalized by a ring map

oppositeRing -- Creates the opposite ring of a noncommutative ring
******************************************************************

Synopsis
========

  * Usage:
        Aop = oppositeRing A
  * Inputs:
      * A, a quotient of a free algebra, or
        FreeAlgebra,
  * Outputs:
      * Aop, a quotient of a free algebra, or
        FreeAlgebra,

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

Given a noncommutative ring A, this creates a noncommutative ring whose
defining ideal is generated by the "opposites" - elements whose noncommutative
monomial terms have been reversed - of the generators of the defining ideal of
A.

+------------------------------------------+
|i1 : R = QQ[q]/ideal{q^4+q^3+q^2+q+1}     |
|                                          |
|o1 = R                                    |
|                                          |
|o1 : QuotientRing                         |
+------------------------------------------+
|i2 : A = skewPolynomialRing(R,q,{x,y,z,w})|
|Using numthreads = 0                      |
|Using GC ring in VectorArithmetic.        |
|                                          |
|o2 = A                                    |
|                                          |
|o2 : FreeAlgebraQuotient                  |
+------------------------------------------+
|i3 : x*y == q*y*x                         |
|                                          |
|o3 = true                                 |
+------------------------------------------+
|i4 : Aop = oppositeRing A                 |
|Using numthreads = 0                      |
|Using GC ring in VectorArithmetic.        |
|                                          |
|o4 = Aop                                  |
|                                          |
|o4 : FreeAlgebraQuotient                  |
+------------------------------------------+
|i5 : y*x == q*x*y                         |
|                                          |
|o5 = true                                 |
+------------------------------------------+

See also
========

  * skewPolynomialRing -- Defines a skew polynomial
    ring via a skewing matrix

Ways to use oppositeRing :
==========================

  * "oppositeRing(FreeAlgebra)"
  * "oppositeRing(FreeAlgebraQuotient)"

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

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

oreExtension -- Creates an Ore extension of a noncommutative ring
*****************************************************************

Synopsis
========

  * Usage:
        oreExtension(A,sigma,delta,x) or oreExtension(A,sigma,x)
  * Inputs:
      * A, a ring (Macaulay2Doc),
      * sigma, a ring map (Macaulay2Doc),
      * delta, an instance of the type Derivation,
      * x, a ring element (Macaulay2Doc), or a Symbol (Macaulay2Doc),
  * Optional inputs (Macaulay2Doc),:
      * Degree => ..., default value 1
  * Outputs:
      * a quotient ring (Macaulay2Doc),

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

This method calls oreIdeal, and returns the associated Ore
extension as an FreeAlgebraQuotient.

+-------------------------------------------------+
|i1 : B = skewPolynomialRing(QQ,(-1)_QQ,{x,y,z,w})|
|Using numthreads = 0                             |
|                                                 |
|o1 = B                                           |
|                                                 |
|o1 : FreeAlgebraQuotient                         |
+-------------------------------------------------+
|i2 : sigma = map(B,B,{y,z,w,x})                  |
|                                                 |
|o2 = map (B, B, {y, z, w, x})                    |
|                                                 |
|o2 : RingMap B <--- B                            |
+-------------------------------------------------+
|i3 : C = oreExtension(B,sigma,a)                 |
|Using numthreads = 0                             |
|                                                 |
|o3 = C                                           |
|                                                 |
|o3 : FreeAlgebraQuotient                         |
+-------------------------------------------------+

One may define the Weyl algebra as an Ore extension using the identity
endomorphism and the usual polynomial derivative as the derivation.

+----------------------------------------------------------------------------+
|i4 : B = toFreeAlgebraQuotient(QQ[x])                                       |
|                                                                            |
|o4 = B                                                                      |
|                                                                            |
|o4 : FreeAlgebra                                                            |
+----------------------------------------------------------------------------+
|i5 : sigma = map(B,B,{x})                                                   |
|                                                                            |
|o5 = map (B, B, {x})                                                        |
|                                                                            |
|o5 : RingMap B <--- B                                                       |
+----------------------------------------------------------------------------+
|i6 : delta = derivation(B,{1_B})                                            |
|                                                                            |
|o6 = Derivation{generators => HashTable{x => 1} }                           |
|                homomorphism => map (B, B, {x})                             |
|                imageCache => MutableHashTable{}                            |
|                matrix => | 1 |                                             |
|                source => B                                                 |
|                                                                            |
|o6 : Derivation                                                             |
+----------------------------------------------------------------------------+
|i7 : C = oreExtension(B,sigma,delta,dx)                                     |
|Warning:  Parallel F4 Algorithm not available over current coefficient ring.|
|Converting to Naive algorithm.                                              |
|                                                                            |
|o7 = C                                                                      |
|                                                                            |
|o7 : FreeAlgebraQuotient                                                    |
+----------------------------------------------------------------------------+

Of course, if one wants to perform extensive calculations with classical Weyl
Algebras, one should use the WeylAlgebra (Macaulay2Doc),
option when creating a polynomial ring.

In order to get the most out of the AssociativeAlgebras package, rings often
need to be graded.  To obtain such a ring from this construction, the
derivation must increase the degree by one.

See also
========

  * oreIdeal -- Creates the defining ideal of an Ore extension
    of a noncommutative ring

Ways to use oreExtension :
==========================

  * "oreExtension(Ring,RingMap,Derivation,RingElement)"
  * "oreExtension(Ring,RingMap,Derivation,Symbol)"
  * "oreExtension(Ring,RingMap,RingElement)"
  * "oreExtension(Ring,RingMap,Symbol)"

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

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

oreIdeal -- Creates the defining ideal of an Ore extension of a noncommutative ring
***********************************************************************************

Synopsis
========

  * Usage:
        oreIdeal(A,sigma,delta,x) or oreIdeal(A,sigma,x)
  * Inputs:
      * A, a ring (Macaulay2Doc),
      * sigma, a ring map (Macaulay2Doc),
      * delta, an instance of the type Derivation,
      * x, a ring element (Macaulay2Doc), or a Symbol (Macaulay2Doc),
  * Optional inputs (Macaulay2Doc),:
      * Degree => ..., default value 1
  * Outputs:
      * an ideal (Macaulay2Doc),

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

Given a ring A, an Ore extension of A by x is the quotient of the free
extension A<x> by the relations x*a - sigma(a)*x-delta(a) where sigma is an
automorphism of A and delta is a sigma-derivation. This method returns the
defining ideal (in the appropriate tensor algebra) of an Ore extension of A by
x. The current version assumes the sigma-derivation delta is 0, but this is to
be fixed soon.

+-----------------------------------------------------------------------------+
|i1 : B = skewPolynomialRing(QQ,(-1)_QQ,{x,y,z,w})                            |
|Using numthreads = 0                                                         |
|                                                                             |
|o1 = B                                                                       |
|                                                                             |
|o1 : FreeAlgebraQuotient                                                     |
+-----------------------------------------------------------------------------+
|i2 : sigma = map(B,B,{y,z,w,x})                                              |
|                                                                             |
|o2 = map (B, B, {y, z, w, x})                                                |
|                                                                             |
|o2 : RingMap B <--- B                                                        |
+-----------------------------------------------------------------------------+
|i3 : C = oreIdeal(B,sigma,a)                                                 |
|                                                                             |
|o3 = ideal (x*y + y*x, x*z + z*x, y*z + z*y, x*w + w*x, y*w + w*y, z*w + w*z,|
|     ------------------------------------------------------------------------|
|     - y*a + a*x, - z*a + a*y, - w*a + a*z, - x*a + a*w)                     |
|                                                                             |
|o3 : Ideal of QQ <|x, y, z, w, a|>                                           |
+-----------------------------------------------------------------------------+

See also
========

  * oreExtension -- Creates an Ore extension of a
    noncommutative ring

Ways to use oreIdeal :
======================

  * "oreIdeal(Ring,RingMap,Derivation,RingElement)"
  * "oreIdeal(Ring,RingMap,Derivation,Symbol)"
  * "oreIdeal(Ring,RingMap,RingElement)"
  * "oreIdeal(Ring,RingMap,Symbol)"

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

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

pointScheme -- Compute the point scheme of the quadratic algebra B
******************************************************************

Synopsis
========

  * Usage:
        I = pointScheme B
  * Inputs:
      * B, a quotient of a free algebra,
  * Outputs:
      * I, an ideal (Macaulay2Doc),

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

This method computes the ideal defining the point scheme of the (assumed to be
Artin-Schelter regular) algebra B.  This amounts to computing the ideal of
maximal minors of the left quadratic matrix corresponding to the generators of
the defining ideal of B.

The point scheme parametrizes the point modules over the algebra B. A $B$-point
module is a module $M$ that is generated in degree zero and whose Hilbert
function is one for every nonnegative integer. In the commutative case, the
point scheme of a graded ring $R$ generated in degree one is simply
$\operatorname{Proj}(R)$, so this object serves as a way to introduce geometry
in a noncommutative context.

A straightforward calculation shows that a skew commutative polynomial ring in
two variables still has point scheme given by $\mathbb{P}^1$, for example:

+-------------------------------------------------+
|i1 : S = skewPolynomialRing(QQ,(-1)_QQ,{x_1,x_2})|
|Using numthreads = 0                             |
|                                                 |
|o1 = S                                           |
|                                                 |
|o1 : FreeAlgebraQuotient                         |
+-------------------------------------------------+
|i2 : P = pointScheme(S,a)                        |
|                                                 |
|o2 = ideal ()                                    |
|                                                 |
|o2 : Ideal of QQ[a ..a ]                         |
|                  1   2                          |
+-------------------------------------------------+

In higher variables, one gets smaller point schemes, however.  Indeed, the
point scheme of the skew polynomial ring in four variables is a two-dimensional
reducible scheme given by a union of six lines.

+-----------------------------------------------------------------------------+
|i3 : S = skewPolynomialRing(QQ,(-1)_QQ,{x_1..x_4})                           |
|Using numthreads = 0                                                         |
|                                                                             |
|o3 = S                                                                       |
|                                                                             |
|o3 : FreeAlgebraQuotient                                                     |
+-----------------------------------------------------------------------------+
|i4 : P = pointScheme(S,a)                                                    |
|                                                                             |
|               2           2      2          2           2    2              |
|o4 = ideal (-2a a a , -2a a a , 2a a a , 2a a a , -2a a a , 2a a a ,         |
|               1 2 3     1 2 3    1 2 4    1 2 4     1 2 3    1 3 4          |
|     ------------------------------------------------------------------------|
|          2       2           2          2        2        2                 |
|     -2a a a , -2a a a , -2a a a , 2a a a , 2a a a , 2a a a )                |
|        1 3 4     2 3 4     2 3 4    1 2 4    1 3 4    2 3 4                 |
|                                                                             |
|o4 : Ideal of QQ[a ..a ]                                                     |
|                  1   4                                                      |
+-----------------------------------------------------------------------------+
|i5 : netList minimalPrimes P                                                 |
|                                                                             |
|     +--------------+                                                        |
|o5 = |ideal (a , a )|                                                        |
|     |        4   3 |                                                        |
|     +--------------+                                                        |
|     |ideal (a , a )|                                                        |
|     |        4   2 |                                                        |
|     +--------------+                                                        |
|     |ideal (a , a )|                                                        |
|     |        4   1 |                                                        |
|     +--------------+                                                        |
|     |ideal (a , a )|                                                        |
|     |        3   2 |                                                        |
|     +--------------+                                                        |
|     |ideal (a , a )|                                                        |
|     |        3   1 |                                                        |
|     +--------------+                                                        |
|     |ideal (a , a )|                                                        |
|     |        2   1 |                                                        |
|     +--------------+                                                        |
+-----------------------------------------------------------------------------+

Three-dimensional Sklyanin algebras were shown by Artin-Tate-Van den Bergh to
generically have point scheme given by a smooth elliptic curve, a defining
equation of which we may obtain using this method.

+-----------------------------------------------------------------------------+
|i6 : S = threeDimSklyanin (frac(QQ[a,b,c]),{a,b,c},{x,y,z}, DegreeLimit => 3)|
|Using numthreads = 0                                                         |
|Using GC ring in VectorArithmetic.                                           |
|                                                                             |
|o6 = S                                                                       |
|                                                                             |
|o6 : FreeAlgebraQuotient                                                     |
+-----------------------------------------------------------------------------+
|i7 : P = pointScheme(S,X)                                                    |
|                                                                             |
|                    3          3     3    3    3                 3           |
|o7 = ideal(- a*b*c*X  - a*b*c*X  + (a  + b  + c )X X X  - a*b*c*X )          |
|                    1          2                  1 2 3          3           |
|                                                                             |
|o7 : Ideal of frac(QQ[a..c])[X ..X ]                                         |
|                              1   3                                          |
+-----------------------------------------------------------------------------+

The genericity condition $(3abc)^3 \neq (a^3 + b^3 + c^3)^3$ is somewhat
visible here.  Some non-generic Sklyanin algebras are still AS-regular:

+------------------------------------------------+
|i8 : S = threeDimSklyanin (QQ,{1,1,-2},{x,y,z}) |
|Using numthreads = 0                            |
|                                                |
|o8 = S                                          |
|                                                |
|o8 : FreeAlgebraQuotient                        |
+------------------------------------------------+
|i9 : P = pointScheme(S,X)                       |
|                                                |
|             3     3               3            |
|o9 = ideal(2X  + 2X  - 6X X X  + 2X )           |
|             1     2     1 2 3     3            |
|                                                |
|o9 : Ideal of QQ[X ..X ]                        |
|                  1   3                         |
+------------------------------------------------+
|i10 : netList minimalPrimes P                   |
|                                                |
|      +----------------------------------------+|
|o10 = |ideal(X  + X  + X )                     ||
|      |       1    2    3                      ||
|      +----------------------------------------+|
|      |       2           2                  2 ||
|      |ideal(X  - X X  + X  - X X  - X X  + X )||
|      |       1    1 2    2    1 3    2 3    3 ||
|      +----------------------------------------+|
+------------------------------------------------+

But as you can see, the point scheme is not a smooth elliptic curve.  In fact,
if we add a cube root of unity to the base ring, we can see that it is a union
of three lines (although M2 has trouble detecting this outright):

+-----------------------------------------------------------------------------+
|i11 : R = QQ[zz,X_1,X_2,X_3]                                                 |
|                                                                             |
|o11 = R                                                                      |
|                                                                             |
|o11 : PolynomialRing                                                         |
+-----------------------------------------------------------------------------+
|i12 : PP = sub(P,R) + ideal {zz^2 + zz + 1}                                  |
|                                                                             |
|               3     3               3    2                                  |
|o12 = ideal (2X  + 2X  - 6X X X  + 2X , zz  + zz + 1)                        |
|               1     2     1 2 3     3                                       |
|                                                                             |
|o12 : Ideal of R                                                             |
+-----------------------------------------------------------------------------+
|i13 : minPP = minimalPrimes PP; netList minPP                                |
|                                                                             |
|      +----------------------------------------------------------------------|
|      |                       2                                              |
|o14 = |ideal (X  + X  + X , zz  + zz + 1)                                    |
|      |        1    2    3                                                   |
|      +----------------------------------------------------------------------|
|      |                                 2           2                  2     |
|      |ideal (zz*X  - zz*X  - X  + X , X  - X X  + X  - X X  - X X  + X , zz*|
|      |           2       3    1    2   1    1 2    2    1 3    2 3    3     |
|      +----------------------------------------------------------------------|
|      |                                 2           2                  2     |
|      |ideal (zz*X  - zz*X  + X  - X , X  - X X  + X  - X X  - X X  + X , zz*|
|      |           2       3    1    3   1    1 2    2    1 3    2 3    3     |
|      +----------------------------------------------------------------------|
|-----------------------------------------------------------------------------|
|-----------------------------------+                                         |
|                                   |                                         |
|                                   |                                         |
|                                   |                                         |
|-----------------------------------+                                         |
|                        2          |                                         |
|X  - zz*X  + X  - X , zz  + zz + 1)|                                         |
| 1       3    2    3               |                                         |
|-----------------------------------+                                         |
|                        2          |                                         |
|X  - zz*X  + X  - X , zz  + zz + 1)|                                         |
| 1       3    1    2               |                                         |
|-----------------------------------+                                         |
+-----------------------------------------------------------------------------+
|i15 : minPP / degree                                                         |
|                                                                             |
|o15 = {2, 2, 2}                                                              |
|                                                                             |
|o15 : List                                                                   |
+-----------------------------------------------------------------------------+

Indeed, this Sklyanin algebra is isomorphic to a skew polynomial algebra in
three variables if the base field contains a cube root of unity.

Ways to use pointScheme :
=========================

  * "pointScheme(FreeAlgebraQuotient,Symbol)"

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

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

qTensorProduct -- Define the (q-)commuting tensor product
*********************************************************

Synopsis
========

  * Usage:
        C = qTensorProduct(A,B,q)
  * Inputs:
      * A, a ring (Macaulay2Doc),
      * B, a ring (Macaulay2Doc),
      * q, a ring element (Macaulay2Doc),
  * Outputs:
      * C, a quotient of a free algebra,

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

This function returns the algebra that contains A and B as a subalgebra, with
the commutation law on the images of A and B given by a*b = q*b*a for all a in
A and b in B. In the case of A ** B, q = 1.

+--------------------------------------------------------------------------+
|i1 : A = QQ<|x,y|>                                                        |
|                                                                          |
|o1 = A                                                                    |
|                                                                          |
|o1 : FreeAlgebra                                                          |
+--------------------------------------------------------------------------+
|i2 : B = skewPolynomialRing(QQ,(-1)_QQ, {a,b})                            |
|Using numthreads = 0                                                      |
|                                                                          |
|o2 = B                                                                    |
|                                                                          |
|o2 : FreeAlgebraQuotient                                                  |
+--------------------------------------------------------------------------+
|i3 : C = qTensorProduct(A,B,-1_QQ)                                        |
|Using numthreads = 0                                                      |
|Using numthreads = 0                                                      |
|                                                                          |
|o3 = C                                                                    |
|                                                                          |
|o3 : FreeAlgebraQuotient                                                  |
+--------------------------------------------------------------------------+
|i4 : ideal C                                                              |
|                                                                          |
|o4 = ideal (a*b + b*a, x*a + a*x, x*b + b*x, y*a + a*y, y*b + b*y)        |
|                                                                          |
|o4 : Ideal of QQ <|x, y, a, b|>                                           |
+--------------------------------------------------------------------------+
|i5 : D = A ** B                                                           |
|Using numthreads = 0                                                      |
|Using numthreads = 0                                                      |
|                                                                          |
|o5 = D                                                                    |
|                                                                          |
|o5 : FreeAlgebraQuotient                                                  |
+--------------------------------------------------------------------------+
|i6 : ideal D                                                              |
|                                                                          |
|o6 = ideal (a*b + b*a, - x*a + a*x, - x*b + b*x, - y*a + a*y, - y*b + b*y)|
|                                                                          |
|o6 : Ideal of QQ <|x, y, a, b|>                                           |
+--------------------------------------------------------------------------+

Ways to use qTensorProduct :
============================

  * "qTensorProduct(Ring,Ring,QQ)"
  * "qTensorProduct(Ring,Ring,RingElement)"
  * "qTensorProduct(Ring,Ring,ZZ)"

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

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

quadraticClosure -- Creates the subideal generated by quadratic elements of a given ideal
*****************************************************************************************

Synopsis
========

  * Usage:
        quadraticClosure I
  * Inputs:
      * I, an ideal (Macaulay2Doc),
  * Outputs:
      * an ideal (Macaulay2Doc), the quadratic closure of I

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

The quadratic closure of an ideal in a FreeAlgebra is the ideal generated by
the generators of I of degree at most 2.  Commonly used with homogDual,
in the case where the ideal generators are homogeneous of degree
greater than 1.

If the input is an FreeAlgebraQuotient, the method is applied to the defining
ideal of the quotient ring and the corresponding quotient ring is returned. At
the moment, quotients of quotients are not implemented, and the ambient ring of
the input FreeAlgebraQuotient is assumed to be a FreeAlgebra.

This method is commonly used in conjunction with homogDual.

+------------------------------------------------------+
|i1 : A = QQ<|x,y,z|>                                  |
|                                                      |
|o1 = A                                                |
|                                                      |
|o1 : FreeAlgebra                                      |
+------------------------------------------------------+
|i2 : I = ideal{x*z-z*x, y*z, x*y^2-y^2*x, x^3*y-y*x^3}|
|                                                      |
|                               2    2    3       3    |
|o2 = ideal (x*z - z*x, y*z, x*y  - y x, x y - y*x )   |
|                                                      |
|o2 : Ideal of A                                       |
+------------------------------------------------------+
|i3 : J = quadraticClosure I                           |
|                                                      |
|o3 = ideal (x*z - z*x, y*z)                           |
|                                                      |
|o3 : Ideal of A                                       |
+------------------------------------------------------+

See also
========

  * homogDual -- Computes the dual of a pure homogeneous
    ideal

Ways to use quadraticClosure :
==============================

  * "quadraticClosure(FreeAlgebra)"
  * "quadraticClosure(FreeAlgebraQuotient)"
  * "quadraticClosure(Ideal)"

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

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

rightKernel -- Right kernel of a matrix
***************************************

Synopsis
========

  * Usage:
        K = rightKernel M
  * Inputs:
      * M, a matrix (Macaulay2Doc),
  * Optional inputs (Macaulay2Doc),:
      * DegreeLimit => ..., default value 10
  * Outputs:
      * N, a matrix (Macaulay2Doc),

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

This function computes a minimal generating set of the kernel (up to a
specified degree) of a map defined by the matrix $M$, which must be a
homogeneous matrix defined over a noncommutative ring.  At the moment, this is
done by computing two Groebner bases; one to compute the kernel, and another to
compute the minimal generators of the kernel.

This (rather slow) way of doing this will be replaced with a version of Anick's
resolution for modules that will be implemented in the future.  We offer this
version in the meantime, since it is still quite useful for investigations.

+----------------------------------------------------------------+
|i1 : A = fourDimSklyanin(ZZ/32003, {a,b,c,d}, DegreeLimit => 10)|
|Using numthreads = 0                                            |
|                                                                |
|o1 = A                                                          |
|                                                                |
|o1 : FreeAlgebraQuotient                                        |
+----------------------------------------------------------------+
|i2 : k = vars A                                                 |
|                                                                |
|o2 = | a b c d |                                                |
|                                                                |
|             1       4                                          |
|o2 : Matrix A  <--- A                                           |
+----------------------------------------------------------------+
|i3 : d1 = rightKernel(k, DegreeLimit => 10)                     |
|Using numthreads = 0                                            |
|Using numthreads = 0                                            |
|                                                                |
|o3 = {1} | 3145c 6051d  -4786b -6050d 3144c -4785b |            |
|     {1} | 3146d -6050c 4785a  6049c  3145d 4786a  |            |
|     {1} | a     b      d      0      0     0      |            |
|     {1} | 0     0      0      a      b     c      |            |
|                                                                |
|             4       6                                          |
|o3 : Matrix A  <--- A                                           |
+----------------------------------------------------------------+
|i4 : d2 = rightKernel(d1, DegreeLimit => 10)                    |
|Using numthreads = 0                                            |
|Using numthreads = 0                                            |
|                                                                |
|o4 = {2} | -4785b -3145d -4026c 0      |                        |
|     {2} | 4786a  -479c  6050d  0      |                        |
|     {2} | c      3624a  10076b 0      |                        |
|     {2} | 0      3145c  6051d  -4786b |                        |
|     {2} | 0      3146d  -6050c 4785a  |                        |
|     {2} | 0      a      b      d      |                        |
|                                                                |
|             6       4                                          |
|o4 : Matrix A  <--- A                                           |
+----------------------------------------------------------------+
|i5 : d3 = rightKernel(d2, DegreeLimit => 10)                    |
|Using numthreads = 0                                            |
|Using numthreads = 0                                            |
|                                                                |
|o5 = {3} | -d     |                                             |
|     {3} | -4785b |                                             |
|     {3} | 4786a  |                                             |
|     {3} | c      |                                             |
|                                                                |
|             4       1                                          |
|o5 : Matrix A  <--- A                                           |
+----------------------------------------------------------------+
|i6 : d4 = rightKernel(d3, DegreeLimit => 10)                    |
|Using numthreads = 0                                            |
|                                                                |
|o6 = 0                                                          |
|                                                                |
|             1                                                  |
|o6 : Matrix A  <--- 0                                           |
+----------------------------------------------------------------+

As a warning, note that matrix multiplication over noncommutative rings
currently takes place in the opposite ring as a result of existing code over
the exterior and Weyl algebras.  As a result, one should check computations
coming from rightKernel with ncMatrixMult, until this is
fixed.

+-----------------------------------------------------------------+
|i7 : d1*d2                                                       |
|                                                                 |
|o7 = {1} | 5340cb+82da    -7248cd-2dc 0           2851ca+2409db ||
|     {1} | -2409ca-5194db 0           11851cd-2dc 2261cb-5340da ||
|     {1} | 2cd            -958cb      -8052ca     0             ||
|     {1} | 0              6292db      12102da     2dc           ||
|                                                                 |
|             4       4                                           |
|o7 : Matrix A  <--- A                                            |
+-----------------------------------------------------------------+
|i8 : ncMatrixMult(d1,d2)                                         |
|                                                                 |
|o8 = 0                                                           |
|                                                                 |
|             4       4                                           |
|o8 : Matrix A  <--- A                                            |
+-----------------------------------------------------------------+

Ways to use rightKernel :
=========================

  * "rightKernel(Matrix)"

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

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

skewPolynomialRing -- Defines a skew polynomial ring via a skewing matrix
*************************************************************************

Synopsis
========

  * Usage:
        B = skewPolynomialRing(R,M,L)
  * Inputs:
      * R, a ring (Macaulay2Doc),
      * M, a matrix (Macaulay2Doc),
      * L, a list (Macaulay2Doc),
  * Outputs:
      * B, a quotient of a free algebra,

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

This method constructs a skew polynomial ring with coefficients in the ring R
and generators from the list L. A valid input matrix is a square matrix over R
with at least #L rows such that M_{ij} = M_{ji}^{(-1)} and M_{ii}=1. The
relations of the resulting ring have the form g_i*g_j - M_{ij}*g_j*g_i.

+--------------------------------------------------------+
|i1 : R = QQ[q]/ideal{q^4+q^3+q^2+q+1}                   |
|                                                        |
|o1 = R                                                  |
|                                                        |
|o1 : QuotientRing                                       |
+--------------------------------------------------------+
|i2 : M = matrix{{1,q,q},{q^4,1,1},{q^4,1,1}}            |
|                                                        |
|o2 = | 1          q q |                                 |
|     | -q3-q2-q-1 1 1 |                                 |
|     | -q3-q2-q-1 1 1 |                                 |
|                                                        |
|             3       3                                  |
|o2 : Matrix R  <--- R                                   |
+--------------------------------------------------------+
|i3 : B = skewPolynomialRing(R,M,{x,y,z})                |
|Using numthreads = 0                                    |
|Using GC ring in VectorArithmetic.                      |
|                                                        |
|o3 = B                                                  |
|                                                        |
|o3 : FreeAlgebraQuotient                                |
+--------------------------------------------------------+
|i4 : x*y == q^4*y*x                                     |
|                                                        |
|o4 = true                                               |
+--------------------------------------------------------+
|i5 : N = matrix{{1,1,1,1},{1,1,1,1},{1,1,1,1},{1,1,1,1}}|
|                                                        |
|o5 = | 1 1 1 1 |                                        |
|     | 1 1 1 1 |                                        |
|     | 1 1 1 1 |                                        |
|     | 1 1 1 1 |                                        |
|                                                        |
|              4        4                                |
|o5 : Matrix ZZ  <--- ZZ                                 |
+--------------------------------------------------------+
|i6 : C = skewPolynomialRing(QQ,promote(N,QQ), {a,b,c,d})|
|Using numthreads = 0                                    |
|                                                        |
|o6 = C                                                  |
|                                                        |
|o6 : FreeAlgebraQuotient                                |
+--------------------------------------------------------+
|i7 : isCommutative C                                    |
|                                                        |
|o7 = false                                              |
+--------------------------------------------------------+
|i8 : isCommutative B                                    |
|                                                        |
|o8 = false                                              |
+--------------------------------------------------------+
|i9 : Bop = oppositeRing B                               |
|Using numthreads = 0                                    |
|Using GC ring in VectorArithmetic.                      |
|                                                        |
|o9 = Bop                                                |
|                                                        |
|o9 : FreeAlgebraQuotient                                |
+--------------------------------------------------------+
|i10 : y*x == q^4*x*y                                    |
|                                                        |
|o10 = true                                              |
+--------------------------------------------------------+

See also
========

  * oppositeRing -- Creates the opposite ring of a
    noncommutative ring

Ways to use skewPolynomialRing :
================================

  * "skewPolynomialRing(Ring,Matrix,List)"
  * "skewPolynomialRing(Ring,QQ,List)" -- see
    skewPolynomialRing(Ring,RingElement,List),
    -- Defines a skew
    polynomial ring via a scaling factor
  * skewPolynomialRing(Ring,RingElement,List)
    -- Defines a skew
    polynomial ring via a scaling factor
  * "skewPolynomialRing(Ring,ZZ,List)" -- see
    skewPolynomialRing(Ring,RingElement,List),
    -- Defines a skew
    polynomial ring via a scaling factor

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

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

skewPolynomialRing(Ring,RingElement,List) -- Defines a skew polynomial ring via a scaling factor
************************************************************************************************

Synopsis
========

  * Function: skewPolynomialRing,
  * Usage:
        skewPolynomialRing(R,f,L)
  * Inputs:
      * R, a ring (Macaulay2Doc),
      * f, a ring element (Macaulay2Doc), or an integer or a
        rational number
      * L, a list (Macaulay2Doc),
  * Outputs:
      * a quotient of a free algebra,

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

This method constructs a skew polynomial ring with coefficient ring R and
generators elements of L. The relations all have the form a*b - f*b*a where a
and b are in L. If R is a Bergman coefficient ring, an NCGroebnerBasis is
computed for B.

+-----------------------------------------------------+
|i1 : R = QQ[q]/ideal{q^4+q^3+q^2+q+1}                |
|                                                     |
|o1 = R                                               |
|                                                     |
|o1 : QuotientRing                                    |
+-----------------------------------------------------+
|i2 : A = skewPolynomialRing(R,promote(2,R),{x,y,z,w})|
|Using numthreads = 0                                 |
|Using GC ring in VectorArithmetic.                   |
|                                                     |
|o2 = A                                               |
|                                                     |
|o2 : FreeAlgebraQuotient                             |
+-----------------------------------------------------+
|i3 : x*y == 2*y*x                                    |
|                                                     |
|o3 = true                                            |
+-----------------------------------------------------+
|i4 : B = skewPolynomialRing(R,q,{x,y,z,w})           |
|Using numthreads = 0                                 |
|Using GC ring in VectorArithmetic.                   |
|                                                     |
|o4 = B                                               |
|                                                     |
|o4 : FreeAlgebraQuotient                             |
+-----------------------------------------------------+
|i5 : x*y == q*y*x                                    |
|                                                     |
|o5 = true                                            |
+-----------------------------------------------------+
|i6 : Bop = oppositeRing B                            |
|Using numthreads = 0                                 |
|Using GC ring in VectorArithmetic.                   |
|                                                     |
|o6 = Bop                                             |
|                                                     |
|o6 : FreeAlgebraQuotient                             |
+-----------------------------------------------------+
|i7 : y*x == q*x*y                                    |
|                                                     |
|o7 = true                                            |
+-----------------------------------------------------+
|i8 : C = skewPolynomialRing(QQ,2_QQ, {x,y,z,w})      |
|Using numthreads = 0                                 |
|                                                     |
|o8 = C                                               |
|                                                     |
|o8 : FreeAlgebraQuotient                             |
+-----------------------------------------------------+
|i9 : x*y == 2*y*x                                    |
|                                                     |
|o9 = true                                            |
+-----------------------------------------------------+
|i10 : D = skewPolynomialRing(QQ,1_QQ, {x,y,z,w})     |
|Using numthreads = 0                                 |
|                                                     |
|o10 = D                                              |
|                                                     |
|o10 : FreeAlgebraQuotient                            |
+-----------------------------------------------------+
|i11 : isCommutative C                                |
|                                                     |
|o11 = false                                          |
+-----------------------------------------------------+
|i12 : isCommutative D                                |
|                                                     |
|o12 = false                                          |
+-----------------------------------------------------+
|i13 : Cop = oppositeRing C                           |
|Using numthreads = 0                                 |
|                                                     |
|o13 = Cop                                            |
|                                                     |
|o13 : FreeAlgebraQuotient                            |
+-----------------------------------------------------+
|i14 : y*x == 2*x*y                                   |
|                                                     |
|o14 = true                                           |
+-----------------------------------------------------+

See also
========

  * oppositeRing -- Creates the opposite ring of a
    noncommutative ring
  * skewPolynomialRing -- Defines a skew polynomial
    ring via a skewing matrix

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

  * "skewPolynomialRing(Ring,QQ,List)"
  * skewPolynomialRing(Ring,RingElement,List)
    -- Defines a skew
    polynomial ring via a scaling factor
  * "skewPolynomialRing(Ring,ZZ,List)"

threeDimSklyanin -- Defines a three-dimensional Sklyanin with given parameters
******************************************************************************

Synopsis
========

  * Usage:
        threeDimSklyanin(R,params,varList)
  * Inputs:
      * R, a ring (Macaulay2Doc),
      * params, a list (Macaulay2Doc),
      * varList, a list (Macaulay2Doc),
  * Optional inputs (Macaulay2Doc),:
      * DegreeLimit => an integer (Macaulay2Doc), default value 6
  * Outputs:
      * a ring (Macaulay2Doc),

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

This method constructs a three dimensional Sklyanin algebra with parameters
from the params list, and variables from varList (see here (see
http:///arxiv.org//abs//1107.2953 )). If either list is not length three, then
an error is thrown.  The generic such algebra does not have a  finite Groebner
basis, so the optional parameter DegreeLimit has been defaulted to 6.  If only
one list is provided, it is used for the variable names, and a random choice
for each parameter is chosen.

The following example is a PI algebra, and has a finite Groebner basis.

+----------------------------------------------------+
|i1 : B = threeDimSklyanin(ZZ/101,{1,1,-1},{x,y,z})  |
|Using numthreads = 0                                |
|                                                    |
|o1 = B                                              |
|                                                    |
|o1 : FreeAlgebraQuotient                            |
+----------------------------------------------------+
|i2 : NCGB(ideal B,5)                                |
|                                                    |
|o2 = | x2-yz-zy xz-y2+zx xy+yx-z2 yz2-z2y y2z-zy2 | |
|                                                    |
|              ZZ            1        ZZ            5|
|o2 : Matrix (---<|x, y, z|>)  <--- (---<|x, y, z|>) |
|             101                    101             |
+----------------------------------------------------+

This is not generically true, however:

+-----------------------------------------------------------------------------+
|i3 : C = threeDimSklyanin(ZZ/101,{2,3,5},{a,b,c})                            |
|Using numthreads = 0                                                         |
|                                                                             |
|o3 = C                                                                       |
|                                                                             |
|o3 : FreeAlgebraQuotient                                                     |
+-----------------------------------------------------------------------------+
|i4 : NCGB(ideal C,5)                                                         |
|                                                                             |
|o4 = | a2-40bc+41cb ac-32b2-33ca ab-49ba-48c2 b2a-25bc2+16cbc-17c2b          |
|     ------------------------------------------------------------------------|
|     b2c-41bcb+33cb2-32c2a bcb2+48bc2a-15cb3+39cbca-3c2ba-18c4               |
|     ------------------------------------------------------------------------|
|     b4-24bcba+15bc3+24cbc2-14c2bc-22c3b                                     |
|     ------------------------------------------------------------------------|
|     bcbc2-41bc2bc+27bc3b-38cbcbc+43cbc2b-8c2bcb+36c3b2-21c4a                |
|     ------------------------------------------------------------------------|
|     bcbcb-20bc2b2+42c2b3+11c2bca+15c3ba-30c5                                |
|     ------------------------------------------------------------------------|
|     bcbca-35bc2ba+10bc4+32cbcba+46cbc3+37c2bc2-19c3bc+28c4b                 |
|     ------------------------------------------------------------------------|
|     bc2b3-12bc3ba-2cbc2ba-37cbc4+26c2bcba+50c2bc3+40c3bc2+3c4bc-11c5b       |
|     ------------------------------------------------------------------------|
|     bc2bca-29bc3ba+48bc5+2cbc2ba+37cbc4+21c2bcba-14c2bc3-39c3bc2-12c4bc-    |
|     ------------------------------------------------------------------------|
|     41c5b bc2bc2+5bc3bc+33bc4b-12cbc3b+33c2bcbc-40c2bc2b+33c3bcb+6c4b2+42c5a|
|     ------------------------------------------------------------------------|
|     |                                                                       |
|                                                                             |
|              ZZ            1        ZZ            13                        |
|o4 : Matrix (---<|a, b, c|>)  <--- (---<|a, b, c|>)                          |
|             101                    101                                      |
+-----------------------------------------------------------------------------+

In all cases, there is a degree three central regular element (a formula for
which is given in the paper referenced above).

+----------------------------------------------+
|i5 : centralElements(B,3)                     |
|                                              |
|o5 = | y2x y3 yzx yzy zyx zy2 zyz z2x z2y z3 ||
|                                              |
|             1       10                       |
|o5 : Matrix B  <--- B                         |
+----------------------------------------------+
|i6 : centralElements(C,3)                     |
|                                              |
|o6 = | b3 bca bcb bc2 cba cb2 cbc c2a c2b c3 ||
|                                              |
|             1       10                       |
|o6 : Matrix C  <--- C                         |
+----------------------------------------------+

These algebras also all AS-regular and as such have the same Hilbert series as
a commutative polynomial algebra in three variables, as we can see here:

+-----------------------------------------------+
|i7 : apply(8, i -> numgens source ncBasis(i,C))|
|Using numthreads = 0                           |
|                                               |
|o7 = {1, 3, 6, 10, 15, 21, 28, 36}             |
|                                               |
|o7 : List                                      |
+-----------------------------------------------+
|i8 : apply(8, i -> binomial(i+2,2))            |
|                                               |
|o8 = {1, 3, 6, 10, 15, 21, 28, 36}             |
|                                               |
|o8 : List                                      |
+-----------------------------------------------+

Ways to use threeDimSklyanin :
==============================

  * "threeDimSklyanin(Ring,List)"
  * "threeDimSklyanin(Ring,List,List)"

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

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

toCommRing -- Compute the abelianization of a Ring and returns a Ring.
**********************************************************************

Synopsis
========

  * Usage:
        S = toCommRing R
  * Inputs:
      * R, a quotient of a free algebra, or
        FreeAlgebra,
  * Optional inputs (Macaulay2Doc),:
      * SkewCommutative => a Boolean value (Macaulay2Doc),
        default value false
  * Outputs:
      * S, a ring (Macaulay2Doc),

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

This method takes a noncommutative ring and returns the quotient of a
commutative polynomial ring (or an exterior algebra, if SkewCommutative=>true)
on the same generators by the defining relations of the input ring.

+-------------------------------------------------+
|i1 : A = skewPolynomialRing(QQ,(-1)_QQ,{w,x,y,z})|
|Using numthreads = 0                             |
|                                                 |
|o1 = A                                           |
|                                                 |
|o1 : FreeAlgebraQuotient                         |
+-------------------------------------------------+
|i2 : x*y-y*x                                     |
|                                                 |
|o2 = -2y*x                                       |
|                                                 |
|o2 : A                                           |
+-------------------------------------------------+
|i3 : w^2                                         |
|                                                 |
|      2                                          |
|o3 = w                                           |
|                                                 |
|o3 : A                                           |
+-------------------------------------------------+
|i4 : B = toCommRing(A)                           |
|                                                 |
|o4 = B                                           |
|                                                 |
|o4 : QuotientRing                                |
+-------------------------------------------------+
|i5 : x*y                                         |
|                                                 |
|o5 = 0                                           |
|                                                 |
|o5 : B                                           |
+-------------------------------------------------+
|i6 : w^2                                         |
|                                                 |
|      2                                          |
|o6 = w                                           |
|                                                 |
|o6 : B                                           |
+-------------------------------------------------+
|i7 : C = toCommRing(A,SkewCommutative=>true)     |
|                                                 |
|o7 = C                                           |
|                                                 |
|o7 : PolynomialRing, 4 skew commutative variables|
+-------------------------------------------------+
|i8 : x*y-y*x                                     |
|                                                 |
|o8 = 2x*y                                        |
|                                                 |
|o8 : C                                           |
+-------------------------------------------------+
|i9 : w^2                                         |
|                                                 |
|o9 = 0                                           |
|                                                 |
|o9 : C                                           |
+-------------------------------------------------+

See also
========

  * toFreeAlgebraQuotient -- Converts a Ring to a
    noncommutative ring

Ways to use toCommRing :
========================

  * "toCommRing(FreeAlgebra)"
  * "toCommRing(FreeAlgebraQuotient)"

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

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

toFreeAlgebraQuotient -- Converts a Ring to a noncommutative ring
*****************************************************************

Synopsis
========

  * Usage:
        S = toFreeAlgebraQuotient R
  * Inputs:
      * R, a ring (Macaulay2Doc),
  * Outputs:
      * S, a quotient of a free algebra,

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

This function converts commutative rings and quotients of exterior algebras
(i.e. quotients of PolynomialRing (Macaulay2Doc)) to a
ring of type FreeAlgebraQuotient.

+-----------------------------------------------------------------------------+
|i1 : R = QQ[a,b,c,d, SkewCommutative=>{2,3}]                                 |
|                                                                             |
|o1 = R                                                                       |
|                                                                             |
|o1 : PolynomialRing, 2 skew commutative variables                            |
+-----------------------------------------------------------------------------+
|i2 : I = ideal(a*d-b*c)                                                      |
|                                                                             |
|o2 = ideal(- b*c + a*d)                                                      |
|                                                                             |
|o2 : Ideal of R                                                              |
+-----------------------------------------------------------------------------+
|i3 : S = R/I                                                                 |
|                                                                             |
|o3 = S                                                                       |
|                                                                             |
|o3 : QuotientRing                                                            |
+-----------------------------------------------------------------------------+
|i4 : S' = toFreeAlgebraQuotient(S)                                           |
|Using numthreads = 0                                                         |
|                                                                             |
|o4 = S'                                                                      |
|                                                                             |
|o4 : FreeAlgebraQuotient                                                     |
+-----------------------------------------------------------------------------+
|i5 : ideal S'                                                                |
|                                                                             |
|                                                                             |
|o5 = ideal (a*b - b*a, a*c - c*a, b*c - c*b, a*d - d*a, b*d - d*b, c*d + d*c,|
|     ------------------------------------------------------------------------|
|      2   2                                                                  |
|     c , d , - c*b + d*a)                                                    |
|                                                                             |
|o5 : Ideal of QQ <|a, b, c, d|>                                              |
+-----------------------------------------------------------------------------+

See also
========

  * toCommRing -- Compute the abelianization of a Ring and
    returns a Ring.

Ways to use toFreeAlgebraQuotient :
===================================

  * "toFreeAlgebraQuotient(Ring)"

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

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

toRationalFunction -- Attempt to find a rational function representation.
*************************************************************************

Synopsis
========

  * Usage:
        output = toRationalFunction coeffs
  * Inputs:
      * coeffs, a list (Macaulay2Doc),
  * Outputs:
      * output, a sequence (Macaulay2Doc),

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

This function attempts to find a rational function representation of the
(ordinary) generating function given by the list of integers input in coeffs.
The return value is an ordered triple, given by the numerator of the rational
function, the denominator of the rational function, and an expression
representing the quotient of these two items.

If no rational representation could be found, null is returned.

+-------------------------------------------------------+
|i1 : toRationalFunction {1,3,6,10,15,21}               |
+-------------------------------------------------------+
|i2 : toRationalFunction {1,3,6,10,15,21,28}            |
|                                                       |
|                    2    3      1                      |
|o2 = (1, 1 - 3T + 3T  - T , --------)                  |
|                                   3                   |
|                            (1 - T)                    |
|                                                       |
|o2 : Sequence                                          |
+-------------------------------------------------------+
|i3 : toRationalFunction apply(10, i -> binomial(i+3,3))|
|                                                       |
|                    2     3    4      1                |
|o3 = (1, 1 - 4T + 6T  - 4T  + T , --------)            |
|                                         4             |
|                                  (1 - T)              |
|                                                       |
|o3 : Sequence                                          |
+-------------------------------------------------------+

This method is used in the ncHilbertSeries, method, but
may also be used to find rational expressions of Poincare series:

+-------------------------------------------------+
|i4 : A = QQ[x,y]/ideal{x^2,x*y}                  |
|                                                 |
|o4 = A                                           |
|                                                 |
|o4 : QuotientRing                                |
+-------------------------------------------------+
|i5 : kRes = res(coker vars A, LengthLimit => 10);|
+-------------------------------------------------+
|i6 : kBetti = apply(10, i -> numcols kRes.dd_i)  |
|                                                 |
|o6 = {1, 2, 3, 5, 8, 13, 21, 34, 55, 89}         |
|                                                 |
|o6 : List                                        |
+-------------------------------------------------+
|i7 : toRationalFunction kBetti                   |
|                                                 |
|                      2      1 + T               |
|o7 = (1 + T, 1 - T - T , ------------)           |
|                                   2             |
|                         (1 - T - T )            |
|                                                 |
|o7 : Sequence                                    |
+-------------------------------------------------+

Ways to use toRationalFunction :
================================

  * "toRationalFunction(List)"

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

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