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

RealRoots -- Package for exploring, counting and locating real solutions to polynomial systems
**********************************************************************************************

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

The purpose of this package is to provide general tools for elimination and
solving systems of polynomial equations.

Authors
=======

  * Jordy Lopez Garcia (see https://www.github.com/jordylopez27 )
    <jordy.lopez@tamu.edu>
  * Kelly Maluccio (see https://www.github.com/kmaluccio )
    <keleburke@aggienetwork.com>
  * Frank Sottile (see https://www.math.tamu.edu/~frank.sottile/ )
    <sottile@tamu.edu>
  * Thomas Yahl (see https://www.github.com/tjyahl ) <thomasjyahl@tamu.edu>

Version
=======

This documentation describes version 0.1 of RealRoots.

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

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

Exports
=======

  * Functions and commands
      * BudanFourierBound -- a bound for the number
        of real roots of a univariate polynomial with rational coefficients
      * characteristicPolynomial -- the
        characteristic polynomial of a matrix or the characteristic polynomial
        of the regular representation of a polynomial
      * HurwitzMatrix -- a specified principle submatrix
        of the Hurwitz matrix of a univariate polynomial
      * isHurwitzStable -- determines whether or not a
        rational univariate polynomial is Hurwitz stable
      * minimalPolynomial -- the minimal polynomial
        of an element of an Artinian ring
      * rationalUnivariateRepresentation
        -- the rational univariate
        representation of a zero-dimensional ideal
      * realRootIsolation -- a list that isolates the
        real roots of a rational univariate polynomial
      * regularRepresentation -- the regular
        representation of a rational polynomial
      * SturmCount -- the number of real roots of a rational
        univariate polynomial
      * SturmSequence -- the Sturm sequence of a rational
        univariate polynomial
      * SylvesterCount -- the difference in variations
        of the Sylvester sequence of two rational univariate polynomials
      * SylvesterSequence -- the Sylvester sequence
        of two rational univariate polynomials
      * traceCount -- the number of real points of the
        spectrum of an Artinian ring (of characteristic 0)
      * traceForm -- the trace quadratic form of a rational
        polynomial in an Artinian ring
      * univariateEliminant -- the univariate
        eliminant of an element of an Artinian ring
      * variations -- the number of sign changes of an
        ordered list of numbers
  * Methods
      * "BudanFourierBound(RingElement)" -- see BudanFourierBound,
        -- a bound for the number of real roots of a
        univariate polynomial with rational coefficients
      * "BudanFourierBound(RingElement,InfiniteNumber,InfiniteNumber)" -- see
        BudanFourierBound, -- a bound for the number
        of real roots of a univariate polynomial with rational coefficients
      * "BudanFourierBound(RingElement,InfiniteNumber,QQ)" -- see
        BudanFourierBound, -- a bound for the number of real
        roots of a univariate polynomial with rational coefficients
      * "BudanFourierBound(RingElement,InfiniteNumber,RR)" -- see
        BudanFourierBound, -- a bound for the number of real
        roots of a univariate polynomial with rational coefficients
      * "BudanFourierBound(RingElement,InfiniteNumber,ZZ)" -- see
        BudanFourierBound, -- a bound for the number of real
        roots of a univariate polynomial with rational coefficients
      * "BudanFourierBound(RingElement,QQ,InfiniteNumber)" -- see
        BudanFourierBound, -- a bound for the number of real
        roots of a univariate polynomial with rational coefficients
      * "BudanFourierBound(RingElement,QQ,QQ)" -- see BudanFourierBound,
        -- a bound for the number of real roots of a
        univariate polynomial with rational coefficients
      * "BudanFourierBound(RingElement,QQ,RR)" -- see BudanFourierBound,
        -- a bound for the number of real roots of a
        univariate polynomial with rational coefficients
      * "BudanFourierBound(RingElement,QQ,ZZ)" -- see BudanFourierBound,
        -- a bound for the number of real roots of a
        univariate polynomial with rational coefficients
      * "BudanFourierBound(RingElement,RR,InfiniteNumber)" -- see
        BudanFourierBound, -- a bound for the number of real
        roots of a univariate polynomial with rational coefficients
      * "BudanFourierBound(RingElement,RR,QQ)" -- see BudanFourierBound,
        -- a bound for the number of real roots of a
        univariate polynomial with rational coefficients
      * "BudanFourierBound(RingElement,RR,RR)" -- see BudanFourierBound,
        -- a bound for the number of real roots of a
        univariate polynomial with rational coefficients
      * "BudanFourierBound(RingElement,RR,ZZ)" -- see BudanFourierBound,
        -- a bound for the number of real roots of a
        univariate polynomial with rational coefficients
      * "BudanFourierBound(RingElement,ZZ,InfiniteNumber)" -- see
        BudanFourierBound, -- a bound for the number of real
        roots of a univariate polynomial with rational coefficients
      * "BudanFourierBound(RingElement,ZZ,QQ)" -- see BudanFourierBound,
        -- a bound for the number of real roots of a
        univariate polynomial with rational coefficients
      * "BudanFourierBound(RingElement,ZZ,RR)" -- see BudanFourierBound,
        -- a bound for the number of real roots of a
        univariate polynomial with rational coefficients
      * "BudanFourierBound(RingElement,ZZ,ZZ)" -- see BudanFourierBound,
        -- a bound for the number of real roots of a
        univariate polynomial with rational coefficients
      * "characteristicPolynomial(Matrix)" -- see
        characteristicPolynomial, -- the
        characteristic polynomial of a matrix or the characteristic polynomial
        of the regular representation of a polynomial
      * "characteristicPolynomial(RingElement)" -- see
        characteristicPolynomial, -- the
        characteristic polynomial of a matrix or the characteristic polynomial
        of the regular representation of a polynomial
      * "characteristicPolynomial(RingElement,Ideal)" -- see
        characteristicPolynomial, -- the
        characteristic polynomial of a matrix or the characteristic polynomial
        of the regular representation of a polynomial
      * "HurwitzMatrix(RingElement)" -- see HurwitzMatrix,
        -- a specified principle submatrix of the Hurwitz matrix of a
        univariate polynomial
      * "HurwitzMatrix(RingElement,ZZ)" -- see HurwitzMatrix,
        -- a specified principle submatrix of the Hurwitz matrix
        of a univariate polynomial
      * "isHurwitzStable(RingElement)" -- see isHurwitzStable,
        -- determines whether or not a rational univariate
        polynomial is Hurwitz stable
      * "minimalPolynomial(RingElement)" -- see minimalPolynomial,
        -- the minimal polynomial of an element of an
        Artinian ring
      * "minimalPolynomial(RingElement,Ideal)" -- see minimalPolynomial,
        -- the minimal polynomial of an element of an
        Artinian ring
      * "rationalUnivariateRepresentation(Ideal)" -- see
        rationalUnivariateRepresentation, --
        the rational univariate representation of a zero-dimensional ideal
      * "realRootIsolation(RingElement,QQ)" -- see realRootIsolation,
        -- a list that isolates the real roots of a rational
        univariate polynomial
      * "realRootIsolation(RingElement,RR)" -- see realRootIsolation,
        -- a list that isolates the real roots of a rational
        univariate polynomial
      * "realRootIsolation(RingElement,ZZ)" -- see realRootIsolation,
        -- a list that isolates the real roots of a rational
        univariate polynomial
      * "regularRepresentation(RingElement)" -- see
        regularRepresentation, -- the regular
        representation of a rational polynomial
      * "regularRepresentation(RingElement,Ideal)" -- see
        regularRepresentation, -- the regular
        representation of a rational polynomial
      * "SturmCount(RingElement)" -- see SturmCount, -- the
        number of real roots of a rational univariate polynomial
      * "SturmCount(RingElement,InfiniteNumber,InfiniteNumber)" -- see
        SturmCount, -- the number of real roots of a rational
        univariate polynomial
      * "SturmCount(RingElement,InfiniteNumber,QQ)" -- see SturmCount,
        -- the number of real roots of a rational univariate
        polynomial
      * "SturmCount(RingElement,InfiniteNumber,RR)" -- see SturmCount,
        -- the number of real roots of a rational univariate
        polynomial
      * "SturmCount(RingElement,InfiniteNumber,ZZ)" -- see SturmCount,
        -- the number of real roots of a rational univariate
        polynomial
      * "SturmCount(RingElement,QQ,InfiniteNumber)" -- see SturmCount,
        -- the number of real roots of a rational univariate
        polynomial
      * "SturmCount(RingElement,QQ,QQ)" -- see SturmCount, --
        the number of real roots of a rational univariate polynomial
      * "SturmCount(RingElement,QQ,RR)" -- see SturmCount, --
        the number of real roots of a rational univariate polynomial
      * "SturmCount(RingElement,QQ,ZZ)" -- see SturmCount, --
        the number of real roots of a rational univariate polynomial
      * "SturmCount(RingElement,RR,InfiniteNumber)" -- see SturmCount,
        -- the number of real roots of a rational univariate
        polynomial
      * "SturmCount(RingElement,RR,QQ)" -- see SturmCount, --
        the number of real roots of a rational univariate polynomial
      * "SturmCount(RingElement,RR,RR)" -- see SturmCount, --
        the number of real roots of a rational univariate polynomial
      * "SturmCount(RingElement,RR,ZZ)" -- see SturmCount, --
        the number of real roots of a rational univariate polynomial
      * "SturmCount(RingElement,ZZ,InfiniteNumber)" -- see SturmCount,
        -- the number of real roots of a rational univariate
        polynomial
      * "SturmCount(RingElement,ZZ,QQ)" -- see SturmCount, --
        the number of real roots of a rational univariate polynomial
      * "SturmCount(RingElement,ZZ,RR)" -- see SturmCount, --
        the number of real roots of a rational univariate polynomial
      * "SturmCount(RingElement,ZZ,ZZ)" -- see SturmCount, --
        the number of real roots of a rational univariate polynomial
      * "SturmSequence(RingElement)" -- see SturmSequence,
        -- the Sturm sequence of a rational univariate polynomial
      * "SylvesterCount(RingElement,RingElement)" -- see SylvesterCount,
        -- the difference in variations of the Sylvester
        sequence of two rational univariate polynomials
      * "SylvesterCount(RingElement,RingElement,InfiniteNumber,InfiniteNumber)"
        -- see SylvesterCount, -- the difference in
        variations of the Sylvester sequence of two rational univariate
        polynomials
      * "SylvesterCount(RingElement,RingElement,InfiniteNumber,QQ)" -- see
        SylvesterCount, -- the difference in variations
        of the Sylvester sequence of two rational univariate polynomials
      * "SylvesterCount(RingElement,RingElement,InfiniteNumber,RR)" -- see
        SylvesterCount, -- the difference in variations
        of the Sylvester sequence of two rational univariate polynomials
      * "SylvesterCount(RingElement,RingElement,InfiniteNumber,ZZ)" -- see
        SylvesterCount, -- the difference in variations
        of the Sylvester sequence of two rational univariate polynomials
      * "SylvesterCount(RingElement,RingElement,QQ,InfiniteNumber)" -- see
        SylvesterCount, -- the difference in variations
        of the Sylvester sequence of two rational univariate polynomials
      * "SylvesterCount(RingElement,RingElement,QQ,QQ)" -- see
        SylvesterCount, -- the difference in variations of the
        Sylvester sequence of two rational univariate polynomials
      * "SylvesterCount(RingElement,RingElement,QQ,RR)" -- see
        SylvesterCount, -- the difference in variations of the
        Sylvester sequence of two rational univariate polynomials
      * "SylvesterCount(RingElement,RingElement,QQ,ZZ)" -- see
        SylvesterCount, -- the difference in variations of the
        Sylvester sequence of two rational univariate polynomials
      * "SylvesterCount(RingElement,RingElement,RR,InfiniteNumber)" -- see
        SylvesterCount, -- the difference in variations
        of the Sylvester sequence of two rational univariate polynomials
      * "SylvesterCount(RingElement,RingElement,RR,QQ)" -- see
        SylvesterCount, -- the difference in variations of the
        Sylvester sequence of two rational univariate polynomials
      * "SylvesterCount(RingElement,RingElement,RR,RR)" -- see
        SylvesterCount, -- the difference in variations of the
        Sylvester sequence of two rational univariate polynomials
      * "SylvesterCount(RingElement,RingElement,RR,ZZ)" -- see
        SylvesterCount, -- the difference in variations of the
        Sylvester sequence of two rational univariate polynomials
      * "SylvesterCount(RingElement,RingElement,ZZ,InfiniteNumber)" -- see
        SylvesterCount, -- the difference in variations
        of the Sylvester sequence of two rational univariate polynomials
      * "SylvesterCount(RingElement,RingElement,ZZ,QQ)" -- see
        SylvesterCount, -- the difference in variations of the
        Sylvester sequence of two rational univariate polynomials
      * "SylvesterCount(RingElement,RingElement,ZZ,RR)" -- see
        SylvesterCount, -- the difference in variations of the
        Sylvester sequence of two rational univariate polynomials
      * "SylvesterCount(RingElement,RingElement,ZZ,ZZ)" -- see
        SylvesterCount, -- the difference in variations of the
        Sylvester sequence of two rational univariate polynomials
      * "SylvesterSequence(RingElement,RingElement)" -- see
        SylvesterSequence, -- the Sylvester sequence of two
        rational univariate polynomials
      * "traceCount(Ideal)" -- see traceCount, -- the number
        of real points of the spectrum of an Artinian ring (of characteristic
        0)
      * "traceCount(List)" -- see traceCount, -- the number
        of real points of the spectrum of an Artinian ring (of characteristic
        0)
      * "traceCount(QuotientRing)" -- see traceCount, -- the
        number of real points of the spectrum of an Artinian ring (of
        characteristic 0)
      * "traceCount(RingElement)" -- see traceCount, -- the
        number of real points of the spectrum of an Artinian ring (of
        characteristic 0)
      * "traceForm(RingElement)" -- see traceForm, -- the
        trace quadratic form of a rational polynomial in an Artinian ring
      * "traceForm(RingElement,Ideal)" -- see traceForm, --
        the trace quadratic form of a rational polynomial in an Artinian ring
      * "univariateEliminant(RingElement)" -- see univariateEliminant,
        -- the univariate eliminant of an element of an
        Artinian ring
      * "univariateEliminant(RingElement,Ideal)" -- see
        univariateEliminant, -- the univariate eliminant
        of an element of an Artinian ring
      * "variations(List)" -- see variations, -- the number
        of sign changes of an ordered list of numbers
  * Symbols
      * Multiplicity

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

The object RealRoots, is a package (Macaulay2Doc).

BudanFourierBound -- a bound for the number of real roots of a univariate polynomial with rational coefficients
***************************************************************************************************************

Synopsis
========

  * Usage:
        BudanFourierBound(f, a, b)
        BudanFourierBound(f)
  * Inputs:
      * f, a ring element (Macaulay2Doc), a univariate
        polynomial with rational coefficients, where ring f is not necessarily
        univariate
      * a, a real number (Macaulay2Doc), (optional) the lower bound
        of the interval
      * a, an infinite number (Macaulay2Doc), (optional)
        the lower bound of the interval
      * b, a real number (Macaulay2Doc), (optional) the upper bound
        of the interval
      * b, an infinite number (Macaulay2Doc), (optional)
        the upper bound of the interval
  * Outputs:
      * an integer (Macaulay2Doc), the bound for the number of real
        roots of a rational univariate polynomial f in the interval (a,b]

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

This computes the bound from the Budan Fourier Theorem for the number of real
roots of a rational univariate polynomial f in the interval(a,b], counted with
multiplicity. If the interval is not specified, it computes such bound on
$(-\infty, \infty)$. Moreover, ring f is allowed to be multivariate.

+----------------------------------------------------------+
|i1 : R = QQ[t]                                            |
|                                                          |
|o1 = R                                                    |
|                                                          |
|o1 : PolynomialRing                                       |
+----------------------------------------------------------+
|i2 : f = 45 - 39*t - 34*t^2 + 38*t^3 - 11*t^4 + t^5       |
|                                                          |
|      5      4      3      2                              |
|o2 = t  - 11t  + 38t  - 34t  - 39t + 45                   |
|                                                          |
|o2 : R                                                    |
+----------------------------------------------------------+
|i3 : BudanFourierBound(f)                                 |
|                                                          |
|o3 = 5                                                    |
+----------------------------------------------------------+
|i4 : g = (t + 5)*(t + 3)*(t + 1)*(t - 1)^2*(t - 4)*(t - 6)|
|                                                          |
|      7     6      5      4       3       2               |
|o4 = t  - 3t  - 40t  + 86t  + 357t  - 443t  - 318t + 360  |
|                                                          |
|o4 : R                                                    |
+----------------------------------------------------------+
|i5 : BudanFourierBound(g,-6,infinity)                     |
|                                                          |
|o5 = 7                                                    |
+----------------------------------------------------------+
|i6 : BudanFourierBound(g,-1,5)                            |
|                                                          |
|o6 = 3                                                    |
+----------------------------------------------------------+

We also provide examples when the interval includes $-\infty$ or $\infty$.

+--------------------------------------------+
|i7 : BudanFourierBound(g,-infinity,0)       |
|                                            |
|o7 = 3                                      |
+--------------------------------------------+
|i8 : BudanFourierBound(g,3,infinity)        |
|                                            |
|o8 = 2                                      |
+--------------------------------------------+
|i9 : BudanFourierBound(g,-infinity,infinity)|
|                                            |
|o9 = 7                                      |
+--------------------------------------------+

Ways to use BudanFourierBound :
===============================

  * "BudanFourierBound(RingElement)"
  * "BudanFourierBound(RingElement,InfiniteNumber,InfiniteNumber)"
  * "BudanFourierBound(RingElement,InfiniteNumber,QQ)"
  * "BudanFourierBound(RingElement,InfiniteNumber,RR)"
  * "BudanFourierBound(RingElement,InfiniteNumber,ZZ)"
  * "BudanFourierBound(RingElement,QQ,InfiniteNumber)"
  * "BudanFourierBound(RingElement,QQ,QQ)"
  * "BudanFourierBound(RingElement,QQ,RR)"
  * "BudanFourierBound(RingElement,QQ,ZZ)"
  * "BudanFourierBound(RingElement,RR,InfiniteNumber)"
  * "BudanFourierBound(RingElement,RR,QQ)"
  * "BudanFourierBound(RingElement,RR,RR)"
  * "BudanFourierBound(RingElement,RR,ZZ)"
  * "BudanFourierBound(RingElement,ZZ,InfiniteNumber)"
  * "BudanFourierBound(RingElement,ZZ,QQ)"
  * "BudanFourierBound(RingElement,ZZ,RR)"
  * "BudanFourierBound(RingElement,ZZ,ZZ)"

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

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

characteristicPolynomial -- the characteristic polynomial of a matrix or the characteristic polynomial of the regular representation of a polynomial
****************************************************************************************************************************************************

Synopsis
========

  * Usage:
        characteristicPolynomial(M)
        characteristicPolynomial(f)
        characteristicPolynomial(g,I)
  * Inputs:
      * M, a matrix (Macaulay2Doc), a square matrix
      * f, a ring element (Macaulay2Doc), an element of an
        Artinian ring
      * g, a ring element (Macaulay2Doc), a polynomial
      * I, an ideal (Macaulay2Doc), a zero-dimensional ideal
  * Optional inputs (Macaulay2Doc),:
      * Variable => ..., default value "Z"
  * Outputs:
      * a ring element (Macaulay2Doc), the desired
        characteristic polynomial. See description.

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

This computes the characteristic polynomial of the matrix M, or the
characteristic polynomial of the regular representation of f on the Artinian
ring ring f, or the characteristic polynomial of the regular representation of
g on the Artinian ring (ring g)/I.

+--------------------------------+
|i1 : R = QQ[x,y]                |
|                                |
|o1 = R                          |
|                                |
|o1 : PolynomialRing             |
+--------------------------------+
|i2 : M = matrix{{2,1},{1,-1}}   |
|                                |
|o2 = | 2 1  |                   |
|     | 1 -1 |                   |
|                                |
|              2        2        |
|o2 : Matrix ZZ  <--- ZZ         |
+--------------------------------+
|i3 : characteristicPolynomial(M)|
|                                |
|      2                         |
|o3 = Z  - Z - 3                 |
|                                |
|o3 : ZZ[Z]                      |
+--------------------------------+

We can also change the variable name, as we show below.

+------------------------------------------------+
|i4 : characteristicPolynomial(M,Variable => "x")|
|                                                |
|      2                                         |
|o4 = x  - x - 3                                 |
|                                                |
|o4 : ZZ[x]                                      |
+------------------------------------------------+

We show the last two methods.

+-----------------------------------------------+
|i5 : I = ideal(y^2 - x^2 - 1,x - y^2 + 4*y - 2)|
|                                               |
|               2    2         2                |
|o5 = ideal (- x  + y  - 1, - y  + x + 4y - 2)  |
|                                               |
|o5 : Ideal of R                                |
+-----------------------------------------------+
|i6 : characteristicPolynomial(y,I)             |
|                                               |
|      4     3      2                           |
|o6 = Z  - 8Z  + 19Z  - 16Z + 5                 |
|                                               |
|o6 : QQ[Z]                                     |
+-----------------------------------------------+
|i7 : S = R/I                                   |
|                                               |
|o7 = S                                         |
|                                               |
|o7 : QuotientRing                              |
+-----------------------------------------------+
|i8 : characteristicPolynomial(y)               |
|                                               |
|      4     3      2                           |
|o8 = Z  - 8Z  + 19Z  - 16Z + 5                 |
|                                               |
|o8 : QQ[Z]                                     |
+-----------------------------------------------+

Ways to use characteristicPolynomial :
======================================

  * "characteristicPolynomial(Matrix)"
  * "characteristicPolynomial(RingElement)"
  * "characteristicPolynomial(RingElement,Ideal)"

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

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

HurwitzMatrix -- a specified principle submatrix of the Hurwitz matrix of a univariate polynomial
*************************************************************************************************

Synopsis
========

  * Usage:
        HurwitzMatrix(f,k)
  * Inputs:
      * f, a ring element (Macaulay2Doc), a rational
        univariate polynomial of degree n
      * k, an integer (Macaulay2Doc), a nonnegative integer that
        determines the dimensions of a square submatrix of the $n\times n$
        Hurwitz matrix of f.
  * Outputs:
      * a matrix (Macaulay2Doc), the $k\times k$ submatrix
        $H_{k}$ generated by the corresponding leading principal minor of the
        $n\times n$ Hurwitz matrix $H$ of f.

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

This computes the $k\times k$ submatrix $H_{k}$ of the corresponding leading
principal minor of the $n\times n$ Hurwitz matrix $H$ of a rational univariate
polynomial f of degree n with positive leading coefficient and degree at least
1. The polynomial, however, is not necessarily from a univariate polynomial
ring.

+--------------------------------+
|i1 : R = QQ[x]                  |
|                                |
|o1 = R                          |
|                                |
|o1 : PolynomialRing             |
+--------------------------------+
|i2 : f = 3*x^4 - 7*x^3 + 5*x - 7|
|                                |
|       4     3                  |
|o2 = 3x  - 7x  + 5x - 7         |
|                                |
|o2 : R                          |
+--------------------------------+
|i3 : HurwitzMatrix(f)           |
|                                |
|o3 = | -7 5  0  0  |            |
|     | 3  0  -7 0  |            |
|     | 0  -7 5  0  |            |
|     | 0  3  0  -7 |            |
|                                |
|              4        4        |
|o3 : Matrix QQ  <--- QQ         |
+--------------------------------+
|i4 : HurwitzMatrix(f,4)         |
|                                |
|o4 = | -7 5  0  0  |            |
|     | 3  0  -7 0  |            |
|     | 0  -7 5  0  |            |
|     | 0  3  0  -7 |            |
|                                |
|              4        4        |
|o4 : Matrix QQ  <--- QQ         |
+--------------------------------+
|i5 : HurwitzMatrix(f,3)         |
|                                |
|o5 = | -7 5  0  |               |
|     | 3  0  -7 |               |
|     | 0  -7 5  |               |
|                                |
|              3        3        |
|o5 : Matrix QQ  <--- QQ         |
+--------------------------------+

We can also use mutliple variables to represent unknown coefficients. Note that
we create another ring S so that x and y are not considered variables in the
same ring and so confuse the monomials $x$ or $y$ with $xy$.

+--------------------------------+
|i6 : S = R[y]                   |
|                                |
|o6 = S                          |
|                                |
|o6 : PolynomialRing             |
+--------------------------------+
|i7 : g = y^3 + 2*y^2 + y - x + 1|
|                                |
|      3     2                   |
|o7 = y  + 2y  + y - x + 1       |
|                                |
|o7 : S                          |
+--------------------------------+
|i8 : HurwitzMatrix(g,3)         |
|                                |
|o8 = | 2 -x+1 0    |            |
|     | 1 1    0    |            |
|     | 0 2    -x+1 |            |
|                                |
|             3       3          |
|o8 : Matrix R  <--- R           |
+--------------------------------+
|i9 : HurwitzMatrix(g,2)         |
|                                |
|o9 = | 2 -x+1 |                 |
|     | 1 1    |                 |
|                                |
|             2       2          |
|o9 : Matrix R  <--- R           |
+--------------------------------+
|i10 : HurwitzMatrix(g,1)        |
|                                |
|o10 = | 2 |                     |
|                                |
|              1       1         |
|o10 : Matrix R  <--- R          |
+--------------------------------+

See also
========

  * isHurwitzStable -- determines whether or not a
    rational univariate polynomial is Hurwitz stable

Ways to use HurwitzMatrix :
===========================

  * "HurwitzMatrix(RingElement)"
  * "HurwitzMatrix(RingElement,ZZ)"

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

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

isHurwitzStable -- determines whether or not a rational univariate polynomial is Hurwitz stable
***********************************************************************************************

Synopsis
========

  * Usage:
        isHurwitzStable(f)
  * Inputs:
      * f, a ring element (Macaulay2Doc), a rational
        univariate polynomial
  * Outputs:
      * a Boolean value (Macaulay2Doc), the Hurwitz stability of
        a rational univariate polynomial f

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

Recall that a univariate polynomial is Hurwitz stable if all its roots have
negative real parts. This method determines the Hurwitz stability of a rational
univariate polynomial fwith positive leading coefficient and degree at least 1.
The polynomial, however, is not necessarily from a univariate polynomial ring.

+---------------------------------+
|i1 : R = QQ[x]                   |
|                                 |
|o1 = R                           |
|                                 |
|o1 : PolynomialRing              |
+---------------------------------+
|i2 : f = 3*x^4 - 7*x^3 + 5*x - 7 |
|                                 |
|       4     3                   |
|o2 = 3x  - 7x  + 5x - 7          |
|                                 |
|o2 : R                           |
+---------------------------------+
|i3 : g = x^2 + 10*x + 21         |
|                                 |
|      2                          |
|o3 = x  + 10x + 21               |
|                                 |
|o3 : R                           |
+---------------------------------+
|i4 : isHurwitzStable(f)          |
|                                 |
|o4 = false                       |
+---------------------------------+
|i5 : isHurwitzStable(g)          |
|                                 |
|o5 = true                        |
+---------------------------------+

See also
========

  * HurwitzMatrix -- a specified principle submatrix of
    the Hurwitz matrix of a univariate polynomial

Ways to use isHurwitzStable :
=============================

  * "isHurwitzStable(RingElement)"

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

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

minimalPolynomial -- the minimal polynomial of an element of an Artinian ring
*****************************************************************************

Synopsis
========

  * Usage:
        minimalPolynomial(f)
        minimalPolynomial(g,I)
  * Inputs:
      * f, a ring element (Macaulay2Doc), an element of an
        Artinian ring
      * g, a ring element (Macaulay2Doc), a polynomial
      * I, an ideal (Macaulay2Doc), a zero-dimensional ideal
  * Optional inputs (Macaulay2Doc),:
      * Strategy => ..., default value 0, set method for computing the minimal
        polynomial
  * Outputs:
      * a ring element (Macaulay2Doc), the desired minimal
        polynomial. See description

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

This computes the minimal polynomial of a ring element f in the Artinian ring
ring f, or the minimal polynomial of a polynomial g in the Artinian ring (ring
g)/I. When f is a variable in ring f, this is the eliminant with respect to
that variable.

+-----------------------------------------------+
|i1 : R = QQ[x,y]                               |
|                                               |
|o1 = R                                         |
|                                               |
|o1 : PolynomialRing                            |
+-----------------------------------------------+
|i2 : I = ideal(y^2 - x^2 - 1,x - y^2 + 4*y - 2)|
|                                               |
|               2    2         2                |
|o2 = ideal (- x  + y  - 1, - y  + x + 4y - 2)  |
|                                               |
|o2 : Ideal of R                                |
+-----------------------------------------------+
|i3 : minimalPolynomial(y,I)                    |
|                                               |
|      4     3      2                           |
|o3 = Z  - 8Z  + 19Z  - 16Z + 5                 |
|                                               |
|o3 : QQ[Z]                                     |
+-----------------------------------------------+
|i4 : S = R/I                                   |
|                                               |
|o4 = S                                         |
|                                               |
|o4 : QuotientRing                              |
+-----------------------------------------------+
|i5 : minimalPolynomial(y)                      |
|                                               |
|      4     3      2                           |
|o5 = Z  - 8Z  + 19Z  - 16Z + 5                 |
|                                               |
|o5 : QQ[Z]                                     |
+-----------------------------------------------+

We provide two examples to compute minimal polynomials given by Strategy => 0
(computes the kernel of $k[T]\to$ ring f by sending $T$ to f) and Strategy => 1
(a minimal linear combination of powers of the input).

+---------------------------------------+
|i6 : minimalPolynomial(x,Strategy => 0)|
|                                       |
|      4     3     2                    |
|o6 = Z  - 2Z  - 9Z  - 6Z - 7           |
|                                       |
|o6 : QQ[Z]                             |
+---------------------------------------+
|i7 : minimalPolynomial(x,Strategy => 1)|
|                                       |
|      4     3     2                    |
|o7 = Z  - 2Z  - 9Z  - 6Z - 7           |
|                                       |
|o7 : QQ[Z]                             |
+---------------------------------------+

Ways to use minimalPolynomial :
===============================

  * "minimalPolynomial(RingElement)"
  * "minimalPolynomial(RingElement,Ideal)"

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

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

Multiplicity
************

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

This is a symbol for counting roots with multiplicity.

Functions with optional argument named Multiplicity :
=====================================================

  * "SturmCount(...,Multiplicity=>...)" -- see Multiplicity(RealRoots),
  * "SylvesterCount(...,Multiplicity=>...)" -- see
    Multiplicity(RealRoots),

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

The object Multiplicity, is a symbol (Macaulay2Doc).

Multiplicity(RealRoots)
***********************

This is an optional input for counting roots with multiplicity.

rationalUnivariateRepresentation -- the rational univariate representation of a zero-dimensional ideal
******************************************************************************************************

Synopsis
========

  * Usage:
        rationalUnivariateRepresentation(I)
  * Inputs:
      * I, an ideal (Macaulay2Doc), a zero-dimensional ideal
  * Outputs:
      * a list (Macaulay2Doc), the rational univariate
        representation of I

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

This computes the rational univariate representation of a zero-dimensional
ideal.

+-----------------------------------------------+
|i1 : R = QQ[x,y]                               |
|                                               |
|o1 = R                                         |
|                                               |
|o1 : PolynomialRing                            |
+-----------------------------------------------+
|i2 : I = ideal(x*y - 1,2*x - y + 3)            |
|                                               |
|o2 = ideal (x*y - 1, 2x - y + 3)               |
|                                               |
|o2 : Ideal of R                                |
+-----------------------------------------------+
|i3 : rationalUnivariateRepresentation(I)       |
|2                                              |
|                                               |
|              2   3        - 3Z + 15  6Z + 21  |
|o3 = (x + y, Z  - -Z - 9, {---------, -------})|
|                  2          4Z - 3    4Z - 3  |
|                                               |
|o3 : Sequence                                  |
+-----------------------------------------------+

Ways to use rationalUnivariateRepresentation :
==============================================

  * "rationalUnivariateRepresentation(Ideal)"

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

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

realRootIsolation -- a list that isolates the real roots of a rational univariate polynomial
********************************************************************************************

Synopsis
========

  * Usage:
        realRootIsolation(f,r)
  * Inputs:
      * f, a ring element (Macaulay2Doc), a rational
        univariate polynomial
      * r, a real number (Macaulay2Doc), a positive rational number
  * Outputs:
      * a list (Macaulay2Doc), of intervals that contain all the
        real roots of f

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

This method uses a Sturm sequence and a bisection method to isolate real
solutions of f in intervals of length at most r.

+------------------------------------------------------+
|i1 : R = QQ[t]                                        |
|                                                      |
|o1 = R                                                |
|                                                      |
|o1 : PolynomialRing                                   |
+------------------------------------------------------+
|i2 : f = 45 - 39*t - 34*t^2 + 38*t^3 - 11*t^4 + t^5   |
|                                                      |
|      5      4      3      2                          |
|o2 = t  - 11t  + 38t  - 34t  - 39t + 45               |
|                                                      |
|o2 : R                                                |
+------------------------------------------------------+
|i3 : realRootIsolation(f,1/2)                         |
|                                                      |
|         69    23    23  69    23  207    299  161    |
|o3 = {{- --, - --}, {--, --}, {--, ---}, {---, ---}}  |
|         64    32    32  64     8   64     64   32    |
|                                                      |
|o3 : List                                             |
+------------------------------------------------------+
|i4 : realRootIsolation(f,.2)                          |
|                                                      |
|         69    115    115  69    23  391    621  161  |
|o4 = {{- --, - ---}, {---, --}, {--, ---}, {---, ---}}|
|         64    128    128  64     8  128    128   32  |
|                                                      |
|o4 : List                                             |
+------------------------------------------------------+

See also
========

  * SturmSequence -- the Sturm sequence of a rational
    univariate polynomial

Ways to use realRootIsolation :
===============================

  * "realRootIsolation(RingElement,QQ)"
  * "realRootIsolation(RingElement,RR)"
  * "realRootIsolation(RingElement,ZZ)"

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

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

regularRepresentation -- the regular representation of a rational polynomial
****************************************************************************

Synopsis
========

  * Usage:
        regularRepresentation(f)
        regularRepresentation(g,I)
  * Inputs:
      * f, a ring element (Macaulay2Doc), an element of an
        Artinian ring
      * g, a ring element (Macaulay2Doc), a rational
        polynomial
      * I, an ideal (Macaulay2Doc), a zero-dimensional ideal in
        the same ring as g
  * Outputs:
      * a matrix (Macaulay2Doc), the standard basis of ring f
        (resp. (ring g)/I)
      * a matrix (Macaulay2Doc), the matrix of the linear map
        defined by multiplication by f (resp. g) in ring f (resp. (ring g)/I)

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

This command gives the matrix of the linear map defined by multiplication by f
(resp. g) in terms of the standard basis of the finite-dimensional vector space
ring f (resp. (ring g)/I).

+-----------------------------------------------+
|i1 : R = QQ[x,y]                               |
|                                               |
|o1 = R                                         |
|                                               |
|o1 : PolynomialRing                            |
+-----------------------------------------------+
|i2 : I = ideal(y^2 - x^2 - 1,x - y^2 + 4*y - 2)|
|                                               |
|               2    2         2                |
|o2 = ideal (- x  + y  - 1, - y  + x + 4y - 2)  |
|                                               |
|o2 : Ideal of R                                |
+-----------------------------------------------+
|i3 : regularRepresentation(y,I)                |
|                                               |
|o3 = (| 1 x xy y |, | 0 0 -3 -2 |)             |
|                    | 0 0 -1 1  |              |
|                    | 0 1 4  0  |              |
|                    | 1 0 4  4  |              |
|                                               |
|o3 : Sequence                                  |
+-----------------------------------------------+
|i4 : S = R/I                                   |
|                                               |
|o4 = S                                         |
|                                               |
|o4 : QuotientRing                              |
+-----------------------------------------------+
|i5 : regularRepresentation(y)                  |
|                                               |
|o5 = (| 1 x xy y |, | 0 0 -3 -2 |)             |
|                    | 0 0 -1 1  |              |
|                    | 0 1 4  0  |              |
|                    | 1 0 4  4  |              |
|                                               |
|o5 : Sequence                                  |
+-----------------------------------------------+

Ways to use regularRepresentation :
===================================

  * "regularRepresentation(RingElement)"
  * "regularRepresentation(RingElement,Ideal)"

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

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

SturmCount -- the number of real roots of a rational univariate polynomial
**************************************************************************

Synopsis
========

  * Usage:
        SturmCount(f,a,b)
        SturmCount(f)
  * Inputs:
      * f, a ring element (Macaulay2Doc), a rational
        univariate polynomial
      * a, a real number (Macaulay2Doc), a lower bound of the
        interval
      * b, a real number (Macaulay2Doc), an upper bound of the
        interval
  * Optional inputs (Macaulay2Doc),:
      * Multiplicity, => ..., default value
        false, option for computing roots with multiplicity
  * Outputs:
      * an integer (Macaulay2Doc), the number of real roots of f in
        the interval $(a,b]$

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

This computes the difference in variation of the Sturm sequence of f on the
interval $(a,b]$. If a and b are not specified, the interval will be taken from
$-\infty$ to $\infty$. If the coefficients of f are inexact, then the
computations may be unreliable.

+------------------------------------------+
|i1 : R = QQ[t]                            |
|                                          |
|o1 = R                                    |
|                                          |
|o1 : PolynomialRing                       |
+------------------------------------------+
|i2 : f = (t - 5)*(t - 3)^2*(t - 1)*(t + 1)|
|                                          |
|      5      4      3      2              |
|o2 = t  - 11t  + 38t  - 34t  - 39t + 45   |
|                                          |
|o2 : R                                    |
+------------------------------------------+
|i3 : roots f                              |
|                                          |
|o3 = {-1, 1, 3, 3, 5}                     |
|                                          |
|o3 : List                                 |
+------------------------------------------+
|i4 : SturmCount(f)                        |
|                                          |
|o4 = 4                                    |
+------------------------------------------+
|i5 : SturmCount(f,0,5)                    |
|                                          |
|o5 = 3                                    |
+------------------------------------------+
|i6 : SturmCount(f,-2,2)                   |
|                                          |
|o6 = 2                                    |
+------------------------------------------+
|i7 : SturmCount(f,-1,5)                   |
|                                          |
|o7 = 3                                    |
+------------------------------------------+

In the above example, multiplicity is not counted. To include it, make the
multiplicity option true.

+------------------------------------------+
|i8 : SturmCount(f,Multiplicity=>true)     |
|                                          |
|o8 = 5                                    |
+------------------------------------------+
|i9 : SturmCount(f,0,5,Multiplicity=>true) |
|                                          |
|o9 = 4                                    |
+------------------------------------------+
|i10 : SturmCount(f,0,3,Multiplicity=>true)|
|                                          |
|o10 = 3                                   |
+------------------------------------------+

If a is an InfiniteNumber, then the lower bound will be $-\infty$, and if b is
an InfiniteNumber, then the upper bound is $\infty$.

+--------------------------------------+
|i11 : SturmCount(f,-infinity, 0)      |
|                                      |
|o11 = 1                               |
+--------------------------------------+
|i12 : SturmCount(f,0,infinity)        |
|                                      |
|o12 = 3                               |
+--------------------------------------+
|i13 : SturmCount(f,-infinity,infinity)|
|                                      |
|o13 = 4                               |
+--------------------------------------+

See also
========

  * SturmSequence -- the Sturm sequence of a rational
    univariate polynomial

Ways to use SturmCount :
========================

  * "SturmCount(RingElement)"
  * "SturmCount(RingElement,InfiniteNumber,InfiniteNumber)"
  * "SturmCount(RingElement,InfiniteNumber,QQ)"
  * "SturmCount(RingElement,InfiniteNumber,RR)"
  * "SturmCount(RingElement,InfiniteNumber,ZZ)"
  * "SturmCount(RingElement,QQ,InfiniteNumber)"
  * "SturmCount(RingElement,QQ,QQ)"
  * "SturmCount(RingElement,QQ,RR)"
  * "SturmCount(RingElement,QQ,ZZ)"
  * "SturmCount(RingElement,RR,InfiniteNumber)"
  * "SturmCount(RingElement,RR,QQ)"
  * "SturmCount(RingElement,RR,RR)"
  * "SturmCount(RingElement,RR,ZZ)"
  * "SturmCount(RingElement,ZZ,InfiniteNumber)"
  * "SturmCount(RingElement,ZZ,QQ)"
  * "SturmCount(RingElement,ZZ,RR)"
  * "SturmCount(RingElement,ZZ,ZZ)"

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

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

SturmSequence -- the Sturm sequence of a rational univariate polynomial
***********************************************************************

Synopsis
========

  * Usage:
        SturmSequence(f)
  * Inputs:
      * f, a ring element (Macaulay2Doc), a rational
        univariate polynomial
  * Outputs:
      * a list (Macaulay2Doc), the Sturm sequence of f

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

This computes the Sturm sequence of the square-free part of a univariate
polynomial f.

+-----------------------------------------------------------------------------+
|i1 : R = QQ[t]                                                               |
|                                                                             |
|o1 = R                                                                       |
|                                                                             |
|o1 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i2 : f = 45 - 39*t - 34*t^2 + 38*t^3 - 11*t^4 + t^5                          |
|                                                                             |
|      5      4      3      2                                                 |
|o2 = t  - 11t  + 38t  - 34t  - 39t + 45                                      |
|                                                                             |
|o2 : R                                                                       |
+-----------------------------------------------------------------------------+
|i3 : roots f                                                                 |
|                                                                             |
|o3 = {-1, 1, 3, 3, 5}                                                        |
|                                                                             |
|o3 : List                                                                    |
+-----------------------------------------------------------------------------+
|i4 : SturmSequence(f)                                                        |
|                                                                             |
|       4     3      2              3      2             104 2   432    232   |
|o4 = {t  - 8t  + 14t  + 8t - 15, 5t  - 29t  + 27t + 13, ---t  - ---t + ---,  |
|                                                         25      25     25   |
|     ------------------------------------------------------------------------|
|     3100    5300  194688                                                    |
|     ----t - ----, ------, 0}                                                |
|      169     169   24025                                                    |
|                                                                             |
|o4 : List                                                                    |
+-----------------------------------------------------------------------------+

See also
========

  * SturmCount -- the number of real roots of a rational
    univariate polynomial

Ways to use SturmSequence :
===========================

  * "SturmSequence(RingElement)"

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

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

SylvesterCount -- the difference in variations of the Sylvester sequence of two rational univariate polynomials
***************************************************************************************************************

Synopsis
========

  * Usage:
        SylvesterCount(f,g,a,b)
        SylvesterCount(f,g)
  * Inputs:
      * f, a ring element (Macaulay2Doc), a rational
        univariate polynomial
      * g, a ring element (Macaulay2Doc), a rational
        univariate polynomial
      * a, a real number (Macaulay2Doc), (optional) the lower bound
        of the interval
      * b, a real number (Macaulay2Doc), (optional) the upper bound
        of the interval
  * Optional inputs (Macaulay2Doc),:
      * Multiplicity, => ..., default value
        false, option for computing roots with multiplicity
  * Outputs:
      * an integer (Macaulay2Doc), the difference between the number
        of roots of f in the interval $(a,b]$ where g is positive and where g
        is negative

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

This computes the difference in variations of the Sylvester sequence of f and
f'g on the interval $(a,b]$.

+--------------------------------+
|i1 : R = QQ[t]                  |
|                                |
|o1 = R                          |
|                                |
|o1 : PolynomialRing             |
+--------------------------------+
|i2 : f = (t - 2)*(t - 1)*(t + 3)|
|                                |
|      3                         |
|o2 = t  - 7t + 6                |
|                                |
|o2 : R                          |
+--------------------------------+
|i3 : g = t + 1                  |
|                                |
|o3 = t + 1                      |
|                                |
|o3 : R                          |
+--------------------------------+
|i4 : a = -5                     |
|                                |
|o4 = -5                         |
+--------------------------------+
|i5 : b = 4                      |
|                                |
|o5 = 4                          |
+--------------------------------+
|i6 : SylvesterCount(f,g,a,b)    |
|                                |
|o6 = 1                          |
+--------------------------------+

See also
========

  * SylvesterSequence -- the Sylvester sequence of
    two rational univariate polynomials

Ways to use SylvesterCount :
============================

  * "SylvesterCount(RingElement,RingElement)"
  * "SylvesterCount(RingElement,RingElement,InfiniteNumber,InfiniteNumber)"
  * "SylvesterCount(RingElement,RingElement,InfiniteNumber,QQ)"
  * "SylvesterCount(RingElement,RingElement,InfiniteNumber,RR)"
  * "SylvesterCount(RingElement,RingElement,InfiniteNumber,ZZ)"
  * "SylvesterCount(RingElement,RingElement,QQ,InfiniteNumber)"
  * "SylvesterCount(RingElement,RingElement,QQ,QQ)"
  * "SylvesterCount(RingElement,RingElement,QQ,RR)"
  * "SylvesterCount(RingElement,RingElement,QQ,ZZ)"
  * "SylvesterCount(RingElement,RingElement,RR,InfiniteNumber)"
  * "SylvesterCount(RingElement,RingElement,RR,QQ)"
  * "SylvesterCount(RingElement,RingElement,RR,RR)"
  * "SylvesterCount(RingElement,RingElement,RR,ZZ)"
  * "SylvesterCount(RingElement,RingElement,ZZ,InfiniteNumber)"
  * "SylvesterCount(RingElement,RingElement,ZZ,QQ)"
  * "SylvesterCount(RingElement,RingElement,ZZ,RR)"
  * "SylvesterCount(RingElement,RingElement,ZZ,ZZ)"

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

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

SylvesterSequence -- the Sylvester sequence of two rational univariate polynomials
**********************************************************************************

Synopsis
========

  * Usage:
        SylvesterSequence(f,g)
  * Inputs:
      * f, a ring element (Macaulay2Doc), a rational
        univariate polynomial
      * g, a ring element (Macaulay2Doc), a rational
        univariate polynomial in the same variable as f
  * Outputs:
      * a list (Macaulay2Doc), the Sylvester sequence of f and g

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

This computes the Sylvester sequence of two rational univariate polynomials f
and g in the same ring.

+---------------------------+
|i1 : R = QQ[t]             |
|                           |
|o1 = R                     |
|                           |
|o1 : PolynomialRing        |
+---------------------------+
|i2 : f = (t + 1)*(t + 2)   |
|                           |
|      2                    |
|o2 = t  + 3t + 2           |
|                           |
|o2 : R                     |
+---------------------------+
|i3 : g = t + 2             |
|                           |
|o3 = t + 2                 |
|                           |
|o3 : R                     |
+---------------------------+
|i4 : SylvesterSequence(f,g)|
|                           |
|o4 = {t + 1, 1, 0}         |
|                           |
|o4 : List                  |
+---------------------------+

See also
========

  * SylvesterCount -- the difference in variations of
    the Sylvester sequence of two rational univariate polynomials

Ways to use SylvesterSequence :
===============================

  * "SylvesterSequence(RingElement,RingElement)"

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

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

traceCount -- the number of real points of the spectrum of an Artinian ring (of characteristic 0)
*************************************************************************************************

Synopsis
========

  * Usage:
        numRealTrace(R)
  * Inputs:
      * S, a quotient ring (Macaulay2Doc), an Artinian ring
      * f, a ring element (Macaulay2Doc), a rational
        univariate polynomial
      * I, an ideal (Macaulay2Doc), the ideal generated by f
      * l, a list (Macaulay2Doc), a system of rational univariate
        polynomials
  * Outputs:
      * an integer (Macaulay2Doc), the number of real points of SpecR

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

This computes the number of real points of SpecR, where R is an Artinian ring
with characteristic zero

+---------------------------------------------+
|i1 : R = QQ[x,y]                             |
|                                             |
|o1 = R                                       |
|                                             |
|o1 : PolynomialRing                          |
+---------------------------------------------+
|i2 : F = {y^2 - x^2 - 1,x - y^2 + 4*y - 2}   |
|                                             |
|         2    2         2                    |
|o2 = {- x  + y  - 1, - y  + x + 4y - 2}      |
|                                             |
|o2 : List                                    |
+---------------------------------------------+
|i3 : I = ideal F                             |
|                                             |
|               2    2         2              |
|o3 = ideal (- x  + y  - 1, - y  + x + 4y - 2)|
|                                             |
|o3 : Ideal of R                              |
+---------------------------------------------+
|i4 : S = R/I                                 |
|                                             |
|o4 = S                                       |
|                                             |
|o4 : QuotientRing                            |
+---------------------------------------------+
|i5 : traceCount(S)                           |
|                                             |
|o5 = 2                                       |
+---------------------------------------------+
+--------------------------------------------------------+
|i6 : R = QQ[x,y]                                        |
|                                                        |
|o6 = R                                                  |
|                                                        |
|o6 : PolynomialRing                                     |
+--------------------------------------------------------+
|i7 : I = ideal(1 - x^2*y + 2*x*y^2, y - 2*x - x*y + x^2)|
|                                                        |
|               2        2       2                       |
|o7 = ideal (- x y + 2x*y  + 1, x  - x*y - 2x + y)       |
|                                                        |
|o7 : Ideal of R                                         |
+--------------------------------------------------------+
|i8 : traceCount(I)                                      |
|                                                        |
|o8 = 3                                                  |
+--------------------------------------------------------+

See also
========

  * traceForm -- the trace quadratic form of a rational
    polynomial in an Artinian ring

Ways to use traceCount :
========================

  * "traceCount(Ideal)"
  * "traceCount(List)"
  * "traceCount(QuotientRing)"
  * "traceCount(RingElement)"

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

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

traceForm -- the trace quadratic form of a rational polynomial in an Artinian ring
**********************************************************************************

Synopsis
========

  * Usage:
        traceForm(f)
        traceForm(f,I),
  * Inputs:
      * f, a ring element (Macaulay2Doc), a rational
        polynomial in an Artinian Ring
      * I, an ideal (Macaulay2Doc), the ideal generated by f
  * Outputs:
      * a matrix (Macaulay2Doc), a symmetric matrix representing
        the trace quadratic form of f in the standard basis of the Artinian
        ring

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

This computes the trace quadratic form of a polynomial f in an Artinian ring.

+---------------------------------------------+
|i1 : R = QQ[x,y]                             |
|                                             |
|o1 = R                                       |
|                                             |
|o1 : PolynomialRing                          |
+---------------------------------------------+
|i2 : F = {y^2 - x^2 - 1, x - y^2 + 4*y - 2}  |
|                                             |
|         2    2         2                    |
|o2 = {- x  + y  - 1, - y  + x + 4y - 2}      |
|                                             |
|o2 : List                                    |
+---------------------------------------------+
|i3 : I = ideal F                             |
|                                             |
|               2    2         2              |
|o3 = ideal (- x  + y  - 1, - y  + x + 4y - 2)|
|                                             |
|o3 : Ideal of R                              |
+---------------------------------------------+
|i4 : S = R/I                                 |
|                                             |
|o4 = S                                       |
|                                             |
|o4 : QuotientRing                            |
+---------------------------------------------+
|i5 : f = y^2 - x^2 - x*y + 4                 |
|                                             |
|o5 = - x*y + 5                               |
|                                             |
|o5 : S                                       |
+---------------------------------------------+
|i6 : traceForm(f)                            |
|                                             |
|o6 = | 4    -86   -340  -42   |              |
|     | -86  -266  -1262 -340  |              |
|     | -340 -1262 -5884 -1454 |              |
|     | -42  -340  -1454 -262  |              |
|                                             |
|              4        4                     |
|o6 : Matrix QQ  <--- QQ                      |
+---------------------------------------------+

See also
========

  * traceCount -- the number of real points of the spectrum
    of an Artinian ring (of characteristic 0)

Ways to use traceForm :
=======================

  * "traceForm(RingElement)"
  * "traceForm(RingElement,Ideal)"

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

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

univariateEliminant -- the univariate eliminant of an element of an Artinian ring
*********************************************************************************

Synopsis
========

  * Usage:
        univariateEliminant(f)
        univariateEliminant(g,I)
  * Inputs:
      * f, a ring element (Macaulay2Doc), an element of an
        Artinian ring
      * g, a ring element (Macaulay2Doc), a polynomial
      * I, an ideal (Macaulay2Doc), a zero-dimensional ideal
  * Optional inputs (Macaulay2Doc),:
      * Strategy => ..., default value 0, set method for computing the
        univariate eliminant
  * Outputs:
      * a ring element (Macaulay2Doc), the desired
        univariate polynomial. See description

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

This computes the univariate eliminant of a ring element f in the Artinian ring
ring f, or the univariate eliminant of a polynomial g in the Artinian ring
(ring g)/I. When f is a variable in ring f, this is the eliminant with respect
to that variable. This is computed by finding the minimal polynomial of the
corresponding multiplication matrix.

+-----------------------------------------------+
|i1 : R = QQ[x,y]                               |
|                                               |
|o1 = R                                         |
|                                               |
|o1 : PolynomialRing                            |
+-----------------------------------------------+
|i2 : I = ideal(y^2 - x^2 - 1,x - y^2 + 4*y - 2)|
|                                               |
|               2    2         2                |
|o2 = ideal (- x  + y  - 1, - y  + x + 4y - 2)  |
|                                               |
|o2 : Ideal of R                                |
+-----------------------------------------------+
|i3 : univariateEliminant(y,I)                  |
|                                               |
|      4     3      2                           |
|o3 = Z  - 8Z  + 19Z  - 16Z + 5                 |
|                                               |
|o3 : QQ[Z]                                     |
+-----------------------------------------------+
|i4 : S = R/I                                   |
|                                               |
|o4 = S                                         |
|                                               |
|o4 : QuotientRing                              |
+-----------------------------------------------+
|i5 : univariateEliminant(y)                    |
|                                               |
|      4     3      2                           |
|o5 = Z  - 8Z  + 19Z  - 16Z + 5                 |
|                                               |
|o5 : QQ[Z]                                     |
+-----------------------------------------------+

We provide two examples to compute minimal polynomials given by Strategy => 0
(computes the kernel of $k[T]\to$ ring f by sending $T$ to f) and Strategy => 1
(a minimal linear combination of powers of the input).

+-----------------------------------------+
|i6 : univariateEliminant(x,Strategy => 0)|
|                                         |
|      4     3     2                      |
|o6 = Z  - 2Z  - 9Z  - 6Z - 7             |
|                                         |
|o6 : QQ[Z]                               |
+-----------------------------------------+
|i7 : univariateEliminant(x,Strategy => 1)|
|                                         |
|      4     3     2                      |
|o7 = Z  - 2Z  - 9Z  - 6Z - 7             |
|                                         |
|o7 : QQ[Z]                               |
+-----------------------------------------+

See also
========

  * minimalPolynomial -- the minimal polynomial of an
    element of an Artinian ring

Ways to use univariateEliminant :
=================================

  * "univariateEliminant(RingElement)"
  * "univariateEliminant(RingElement,Ideal)"

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

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

variations -- the number of sign changes of an ordered list of numbers
**********************************************************************

Synopsis
========

  * Usage:
        variations(l)
  * Inputs:
      * l, a list (Macaulay2Doc),  of ordered numbers
  * Outputs:
      * an integer (Macaulay2Doc), the number of sign changes in the
        ordered list l

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

This computes the number of sign changes in the ordered list l.

+----------------------------------------------------+
|i1 : L = for i to 10 list random(-50,50)            |
|                                                    |
|o1 = {-26, 15, 21, 22, -31, -31, 41, 22, 43, 29, 22}|
|                                                    |
|o1 : List                                           |
+----------------------------------------------------+
|i2 : variations(L)                                  |
|                                                    |
|o2 = 3                                              |
+----------------------------------------------------+

Ways to use variations :
========================

  * "variations(List)"

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

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