This is Tropical.info, produced by Macaulay2, version 1.25.11

Tropical -- the main M2 package for tropical computations
*********************************************************

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

This is the main M2 package for all tropical computations. This uses Anders
Jensen's package gfan, Michael Joswig's package Polymake, and also internal M2
computations.

The package defaults to using the min convention for tropical geometry. To
switch to the max convention, reload the package using the command
loadPackage("Tropical",Configuration=>{"tropicalMax"=>true});

The main command is tropicalVariety.

To use the Polymake commands see the Polymake interface instructions.

Contributors
============

The following people have also contributed to the package:

  * Kalina Mincheva (see https://users.math.yale.edu/~km995/ )
  * Alejandro Vargas de Leon (see
    http://www.math.unibe.ch/ueber_uns/personen/vargas_de_leon_alejandro/index_
    ger.html )
  * Charles Wang (see http://www.math.harvard.edu/~cmwang/ )
  * Yelena Mandelshtam (see https://math.berkeley.edu/~yelena/ )
  * Alessio Borzì (see https://alessioborzi.github.io/ )
  * Timothy Xu (see https://www.linkedin.com/in/timothyxu/ )
  * Ahmed Umer Ashraf (see https://publish.uwo.ca/~aashra9/ )

Authors
=======

  * Carlos Amendola (see  ) <carlos.amendola@tum.de>
  * Kathlen Kohn (see  ) <kathlen.korn@gmail.com>
  * Sara Lamboglia (see  ) <lamboglia@math.uni-frankfurt.de>
  * Diane Maclagan (see http://homepages.warwick.ac.uk/staff/D.Maclagan/ )
    <D.Maclagan@warwick.ac.uk>
  * Ben Smith (see  ) <benjamin.smith-3@manchester.ac.uk>
  * Jeff Sommars (see http://homepages.math.uic.edu/~sommars )
    <sommars1@uic.edu>
  * Paolo Tripoli (see https://sites.google.com/view/paolotripoli/home )
    <paolo.tripoli@nottingham.ac.uk>
  * Magdalena Zajaczkowska (see  ) <Magdalena.A.Zajaczkowska@gmail.com>

Version
=======

This documentation describes version 1.0 of Tropical, released July 2019.

Citation
========

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

+-----------------------------------------------------------------------------+
|@misc{TropicalSource,                                                        |
|  title = {{Tropical: computations in tropical geometry. Version~1.0}},      |
|  author = {Carlos Amendola and Kathlen Kohn and Sara Lamboglia and Diane    |
|  howpublished = {A \emph{Macaulay2} package available at                    |
|    \url{https://github.com/Macaulay2/M2/tree/stable/M2/Macaulay2/packages   |
|}                                                                            |
|-----------------------------------------------------------------------------|
|Maclagan and Ben Smith and Jeff Sommars and Paolo Tripoli and Magdalena      |
|                                                                             |
|}}                                                                           |
|-----------------------------------------------------------------------------|
|Zajaczkowska},                                                               |
+-----------------------------------------------------------------------------+

Exports
=======

  * Types
      * TropicalCycle -- a Type for working with tropical
        cycles
  * Functions and commands
      * BergmanFan -- the Bergman fan of a matroid
      * isBalanced -- checks whether a tropical cycle is
        balanced
      * isTropicalBasis -- checks if a list of
        polynomials is a tropical basis for the ideal they generate
      * multiplicities -- returns the list of
        multiplicities on maximal cones in a tropical cycle
      * stableIntersection -- computes the stable
        intersection of two tropical varieties
      * tropicalCycle -- constructs a TropicalCycle from
        a Fan and a list with multiplicities
      * tropicalPrevariety -- the intersection of
        the tropical hypersurfaces
      * tropicalVariety -- the tropical variety
        associated to an ideal
      * visualizeHypersurface -- visualize the
        tropical hypersurface of the given polynomial
  * Methods
      * ambDim(TropicalCycle) -- computes the
        dimension of the ambient space of a tropical cycle
      * cones(ZZ,TropicalCycle), --
        computes the cones of a tropical cycle
      * dim(TropicalCycle) -- computes the
        dimension of a tropical cycle
      * fan(TropicalCycle) -- outputs the fan
        associated to the tropical cycle
      * fVector(TropicalCycle) -- computes
        the fVector of  a  tropical cycle
      * "isBalanced(TropicalCycle)" -- see isBalanced, --
        checks whether a tropical cycle is balanced
      * isPure(TropicalCycle) -- checks
        whether  a tropical cycle is pure
      * isSimplicial(TropicalCycle), --
        checks whether a tropical cycle is simplicial
      * "isTropicalBasis(List)" -- see isTropicalBasis,
        -- checks if a list of polynomials is a tropical basis for the ideal
        they generate
      * linealitySpace(TropicalCycle),
        -- computes the lineality space of a  tropical cycle
      * maxCones(TropicalCycle) -- computes
        the maximal cone of a tropical cycle
      * "multiplicities(TropicalCycle)" -- see multiplicities,
        -- returns the list of multiplicities on maximal cones
        in a tropical cycle
      * rays(TropicalCycle) -- computes the
        rays of a tropical cycle
      * "stableIntersection(TropicalCycle,TropicalCycle)" -- see
        stableIntersection, -- computes the stable
        intersection of two tropical varieties
      * star(TropicalCycle,Polyhedron) (missing documentation)
      * "tropicalCycle(Fan,List)" -- see tropicalCycle, --
        constructs a TropicalCycle from a Fan and a list with multiplicities
      * "tropicalPrevariety(List)" -- see tropicalPrevariety,
        -- the intersection of the tropical hypersurfaces
      * "tropicalPrevariety(List,List)" -- see tropicalPrevariety,
        -- the intersection of the tropical hypersurfaces
      * "tropicalVariety(Ideal)" -- see tropicalVariety,
        -- the tropical variety associated to an ideal
      * "visualizeHypersurface(RingElement)" -- see
        visualizeHypersurface, -- visualize the tropical
        hypersurface of the given polynomial
  * Symbols
      * ComputeMultiplicities -- option to
        compute the multiplicities in case they ideal is not prime
      * IsHomogeneous -- option to declare if the input
        ideal is homogeneous
      * Prime -- option to declare if the input ideal is prime
      * Symmetry -- option to declare if the input ideal has
        symmetries
      * "Valuation" -- see visualizeHypersurface,
        -- visualize the tropical hypersurface of the given polynomial

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

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

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

The source of this document is in Tropical.m2:837:0.

ambDim(TropicalCycle) -- computes the dimension of the ambient space of a tropical cycle
****************************************************************************************

  * Function: ambDim (Polyhedra),
  * Usage:
        ambDim(T)
  * Inputs:
      * T, a tropical cycle,
  * Outputs:
      * n, an integer (Macaulay2Doc), the dimension of the
        tropicalCycle T

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

This function computes the dimension of the space where the tropical cycle is
contained.

+-------------------------------------+
|i1 : QQ[x,y,z]                       |
|                                     |
|o1 = QQ[x..z]                        |
|                                     |
|o1 : PolynomialRing                  |
+-------------------------------------+
|i2 : T=tropicalVariety(ideal(x+y+z));|
+-------------------------------------+
|i3 : ambDim T                        |
|                                     |
|o3 = 3                               |
+-------------------------------------+

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

  * ambDim(TropicalCycle) -- computes the
    dimension of the ambient space of a tropical cycle
-------------------------------------------------------------------------------

The source of this document is in Tropical.m2:1451:0.

BergmanFan -- the Bergman fan of a matroid
******************************************

  * Usage:
        BergmanFan(M)
  * Inputs:
      * M, a matroid (Matroids),
  * Outputs:
      * T, a tropical cycle,

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

Computes the Bergman fan of a matroid, with the fine fan structure.  This uses
the Matroids package; the input should be a matroid in the sense of that
package.  The output is a tropical cycle T whose underlying fan is the fine fan
structure in the sense of Ardila-Klivans on the Bergman fan of the matroid.
This has underlying simplicial complex the order complex of the lattice of
flats of the matroid M.

If the ground set of the matroid has size n, then the fan given is in R^n, so
there is always a lineality space of dimension at least one.

+---------------------------+
|i1 : M=uniformMatroid(2,3);|
+---------------------------+
|i2 : T=BergmanFan(M);      |
+---------------------------+
|i3 : rays T                |
|                           |
|o3 = | 0 0  0 |            |
|     | 1 -1 0 |            |
|     | 0 -1 1 |            |
|                           |
|              3       3    |
|o3 : Matrix ZZ  <-- ZZ     |
+---------------------------+
|i4 : maxCones T            |
|                           |
|o4 = {{2}, {0}, {1}}       |
|                           |
|o4 : List                  |
+---------------------------+
|i5 : linealitySpace T      |
|                           |
|o5 = | 1 |                 |
|     | 1 |                 |
|     | 1 |                 |
|                           |
|              3       1    |
|o5 : Matrix ZZ  <-- ZZ     |
+---------------------------+

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

The object BergmanFan, is a function closure (Macaulay2Doc).

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

The source of this document is in Tropical.m2:1567:0.

ComputeMultiplicities -- option to compute the multiplicities in case they ideal is not prime
*********************************************************************************************

  * Usage:
        tropicalVariety(I,ComputeMultiplicities=>true)

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

This option allows to compute the multiplicities in case the ideal I is not
prime. In fact the output of gfan does not include them and hence they are
computed separately by this package. By default the ideal is assumed to be
prime.

+-------------------------------------------------------------------+
|i1 : QQ[x,y,z];                                                    |
+-------------------------------------------------------------------+
|i2 : I=ideal(x^2-y^2);                                             |
|                                                                   |
|o2 : Ideal of QQ[x..z]                                             |
+-------------------------------------------------------------------+
|i3 : isPrime I                                                     |
|                                                                   |
|o3 = false                                                         |
+-------------------------------------------------------------------+
|i4 : T=tropicalVariety(I,Prime=>false,ComputeMultiplicities=>true);|
+-------------------------------------------------------------------+
|i5 : rays T                                                        |
|                                                                   |
|o5 = 0                                                             |
|                                                                   |
|              3                                                    |
|o5 : Matrix ZZ  <-- 0                                              |
+-------------------------------------------------------------------+
|i6 : maxCones T                                                    |
|                                                                   |
|o6 = {{}}                                                          |
|                                                                   |
|o6 : List                                                          |
+-------------------------------------------------------------------+
|i7 : multiplicities T                                              |
|                                                                   |
|o7 = {2}                                                           |
|                                                                   |
|o7 : List                                                          |
+-------------------------------------------------------------------+

Functions with optional argument named ComputeMultiplicities:
=============================================================

  * "tropicalVariety(...,ComputeMultiplicities=>...)" -- see
    tropicalVariety, -- the tropical variety associated to an
    ideal

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

The object ComputeMultiplicities, is a
symbol (Macaulay2Doc).

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

The source of this document is in Tropical.m2:1185:0.

cones(ZZ,TropicalCycle) -- computes the cones of a tropical cycle
*****************************************************************

  * Function: cones (Polyhedra),
  * Usage:
        cones(k,T)
  * Inputs:
      * k, an integer (Macaulay2Doc),
      * T, a tropical cycle,
  * Outputs:
      * L, a list (Macaulay2Doc), the cones of codimension k in T

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

This function computes the cone of codimension k of the fan associated to the
tropical cycle T.

+-----------------------------------------------------------------------------+
|i1 : QQ[x,y,z,w,t]                                                           |
|                                                                             |
|o1 = QQ[x..z, w, t]                                                          |
|                                                                             |
|o1 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i2 : I=ideal(x^2-y*z+w^2,w^3-y^3*x+z^3,t-w+x);                               |
|                                                                             |
|o2 : Ideal of QQ[x..z, w, t]                                                 |
+-----------------------------------------------------------------------------+
|i3 : T=tropicalVariety I;                                                    |
+-----------------------------------------------------------------------------+
|i4 : cones(2,T)                                                              |
|                                                                             |
|o4 = {{0, 1}, {0, 2}, {0, 3}, {0, 6}, {1, 4}, {1, 5}, {2, 4}, {2, 5}, {3, 4},|
|     ------------------------------------------------------------------------|
|     {3, 5}, {4, 6}, {5, 6}}                                                 |
|                                                                             |
|o4 : List                                                                    |
+-----------------------------------------------------------------------------+

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

  * cones(ZZ,TropicalCycle) -- computes
    the cones of a tropical cycle
-------------------------------------------------------------------------------

The source of this document is in Tropical.m2:1476:0.

dim(TropicalCycle) -- computes the dimension of a tropical cycle
****************************************************************

  * Function: dim (Macaulay2Doc),
  * Usage:
        dim(T)
  * Inputs:
      * T, a tropical cycle,
  * Outputs:
      * k, an integer (Macaulay2Doc), the dimension of the tropical
        cycle T

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

This function computes the dimension of the fan associated to the tropical
cycle T.

+----------------------------------------+
|i1 : QQ[x,y,z,w]                        |
|                                        |
|o1 = QQ[x..z, w]                        |
|                                        |
|o1 : PolynomialRing                     |
+----------------------------------------+
|i2 : I=ideal(x^2-y*z+w^2,w^3-y^3*x+z^3);|
|                                        |
|o2 : Ideal of QQ[x..z, w]               |
+----------------------------------------+
|i3 : T=tropicalVariety I;               |
+----------------------------------------+
|i4 : dim T                              |
|                                        |
|o4 = 2                                  |
+----------------------------------------+

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

  * dim(TropicalCycle) -- computes the dimension
    of a tropical cycle
-------------------------------------------------------------------------------

The source of this document is in Tropical.m2:1403:0.

fan(TropicalCycle) -- outputs the fan associated to the tropical cycle
**********************************************************************

  * Function: fan (Polyhedra),
  * Usage:
        fan(T)
  * Inputs:
      * T, a tropical cycle,
  * Outputs:
      * F, an instance of the type Fan (Polyhedra), the fan
        associated to the tropical cycle T

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

This function outputs the fan associated to the tropical cycle T.

+-----------------------------------------------------+
|i1 : QQ[x,y,z]                                       |
|                                                     |
|o1 = QQ[x..z]                                        |
|                                                     |
|o1 : PolynomialRing                                  |
+-----------------------------------------------------+
|i2 : T=tropicalVariety (ideal(x+3*y+3));             |
+-----------------------------------------------------+
|i3 : fan T                                           |
|                                                     |
|o3 = Fan{...1...}                                    |
|                                                     |
|o3 : Fan                                             |
+-----------------------------------------------------+
|i4 : peek o3#cache                                   |
|                                                     |
|o4 = CacheTable{computedDimension => 2              }|
|                computedFVector => {0, 1, 3}         |
|                computedLinealityBasis => | 0 |      |
|                                          | 0 |      |
|                                          | 1 |      |
|                generatingObjects => {{0}, {1}, {2}} |
|                inputCones => {{2}, {0}, {1}}        |
|                inputRays => | 3 0 -3 |              |
|                             | 0 3 -3 |              |
|                             | 1 1 -2 |              |
|                pure => true                         |
|                rays => | -3 3 0 |                   |
|                        | -3 0 3 |                   |
|                        | -2 1 1 |                   |
|                simplicial => true                   |
+-----------------------------------------------------+

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

  * fan(TropicalCycle) -- outputs the fan
    associated to the tropical cycle
-------------------------------------------------------------------------------

The source of this document is in Tropical.m2:1282:0.

fVector(TropicalCycle) -- computes the fVector of  a  tropical cycle
********************************************************************

  * Function: fVector (Polyhedra),
  * Usage:
        fVector(T)
  * Inputs:
      * T, a tropical cycle,
  * Outputs:
      * L, a list (Macaulay2Doc), the fVector of the fan associated
        to the  tropical cycle T

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

This function computes the fVector of the fan associated to the tropical cycle
T.

+----------------------------------------+
|i1 : QQ[x,y,z]                          |
|                                        |
|o1 = QQ[x..z]                           |
|                                        |
|o1 : PolynomialRing                     |
+----------------------------------------+
|i2 : T=tropicalVariety (ideal(x+3*y+3));|
+----------------------------------------+
|i3 : fVector T                          |
|                                        |
|o3 = {0, 1, 3}                          |
|                                        |
|o3 : List                               |
+----------------------------------------+

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

  * fVector(TropicalCycle) -- computes the
    fVector of  a  tropical cycle
-------------------------------------------------------------------------------

The source of this document is in Tropical.m2:1427:0.

isBalanced -- checks whether a tropical cycle is balanced
*********************************************************

  * Usage:
        isBalanced T
  * Inputs:
      * T, a tropical cycle,
  * Outputs:
      * B, a Boolean value (Macaulay2Doc),

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

This function checks if a tropical cycle is balanced.

+-----------------------------------------------------------------------------+
|i1 : QQ[x,y,z]                                                               |
|                                                                             |
|o1 = QQ[x..z]                                                                |
|                                                                             |
|o1 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i2 : V = tropicalVariety(ideal(x+y+z))                                       |
|                                                                             |
|o2 = V                                                                       |
|                                                                             |
|o2 : TropicalCycle                                                           |
+-----------------------------------------------------------------------------+
|i3 : isBalanced V                                                            |
|                                                                             |
|o3 = true                                                                    |
+-----------------------------------------------------------------------------+
|i4 : F = fan {posHull matrix {{1},{0},{0}}, posHull matrix {{0},{1},{0}},    |
|                                                                             |
|o4 = F                                                                       |
|                                                                             |
|o4 : Fan                                                                     |
|-----------------------------------------------------------------------------|
|posHull matrix {{0},{0},{1}}, posHull matrix {{-1},{-1},{-1}}}               |
+-----------------------------------------------------------------------------+
|i5 : mult = {1,2,-3,1}                                                       |
|                                                                             |
|o5 = {1, 2, -3, 1}                                                           |
|                                                                             |
|o5 : List                                                                    |
+-----------------------------------------------------------------------------+
|i6 : isBalanced (tropicalCycle(F, mult))                                     |
|                                                                             |
|o6 = false                                                                   |
+-----------------------------------------------------------------------------+

Ways to use isBalanced:
=======================

  * "isBalanced(TropicalCycle)"

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

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

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

The source of this document is in Tropical.m2:951:0.

IsHomogeneous -- option to declare if the input ideal is homogeneous
********************************************************************

  * Usage:
        tropicalVariety(I,IsHomogeneous=>true)

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

If the option is used than homogeneity of the ideal is not tested. By default
the ideal is always assumed not homogeneous and a test is performed before
applying the function tropicalVariety.

+-----------------------------------------------+
|i1 : QQ[x,y];                                  |
+-----------------------------------------------+
|i2 : I=ideal(x+y+1);                           |
|                                               |
|o2 : Ideal of QQ[x..y]                         |
+-----------------------------------------------+
|i3 : T=tropicalVariety (I,IsHomogeneous=>false)|
|                                               |
|o3 = T                                         |
|                                               |
|o3 : TropicalCycle                             |
+-----------------------------------------------+

Functions with optional argument named IsHomogeneous:
=====================================================

  * "tropicalVariety(...,IsHomogeneous=>...)" -- see tropicalVariety,
    -- the tropical variety associated to an ideal

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

The object IsHomogeneous, is a symbol (Macaulay2Doc).

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

The source of this document is in Tropical.m2:1226:0.

isPure(TropicalCycle) -- checks whether  a tropical cycle is pure
*****************************************************************

  * Function: isPure (Polyhedra),
  * Usage:
        isPure(T)
  * Inputs:
      * T, a tropical cycle,
  * Outputs:
      * B, a Boolean value (Macaulay2Doc),

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

This function checks whether the fan associated to the tropical cycle is pure,
i.e. if the maximal cones have all the same dimension.

+-------------------------------------------------------------------------+
|i1 : F=fan ({posHull(matrix{{1,2,3},{0,2,0}}),posHull(matrix{{0},{1}})});|
+-------------------------------------------------------------------------+
|i2 : T=tropicalCycle (F,{1,2});                                          |
+-------------------------------------------------------------------------+
|i3 : isPure T                                                            |
|                                                                         |
|o3 = false                                                               |
+-------------------------------------------------------------------------+

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

  * isPure(TropicalCycle) -- checks whether
    a tropical cycle is pure
-------------------------------------------------------------------------------

The source of this document is in Tropical.m2:1330:0.

isSimplicial(TropicalCycle) -- checks whether a tropical cycle is simplicial
****************************************************************************

  * Function: isSimplicial (Polyhedra),
  * Usage:
        isSimplicial(T)
  * Inputs:
      * T, a tropical cycle,
  * Outputs:
      * B, a Boolean value (Macaulay2Doc),

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

This function checks if the fan associated to the tropical cycle T is
simplicial, i.e. if for each cone the rays generating  it are linearly
independent.

+-------------------------------------------------------------------------+
|i1 : F=fan ({posHull(matrix{{1,2,3},{0,2,0}}),posHull(matrix{{0},{1}})});|
+-------------------------------------------------------------------------+
|i2 : T=tropicalCycle (F,{1,2});                                          |
+-------------------------------------------------------------------------+
|i3 : isSimplicial T                                                      |
|                                                                         |
|o3 = true                                                                |
+-------------------------------------------------------------------------+

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

  * isSimplicial(TropicalCycle), --
    checks whether a tropical cycle is simplicial
-------------------------------------------------------------------------------

The source of this document is in Tropical.m2:1354:0.

isTropicalBasis -- checks if a list of polynomials is a tropical basis for the ideal they generate
**************************************************************************************************

  * Usage:
        isTropicalBasis(L)
        isTropicalBasis(L,Strategy=>S)
  * Inputs:
      * L, a list (Macaulay2Doc), of polynomials
  * Optional inputs (Macaulay2Doc),:
      * Strategy => a string (Macaulay2Doc), default value
        "gfan", Strategy (currently only "gfan")
  * Outputs:
      * F, a Boolean value (Macaulay2Doc), whether the list of
        polynomials is a tropical basis for the ideal it generates

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

This method checks if the intersection of the tropical hypersurfaces associated
to the polynomials in the list equals the tropicalization of the variety
corresponding to the ideal they generate.

+----------------------------------------------------------------------+
|i1 : QQ[x,y,z]                                                        |
|                                                                      |
|o1 = QQ[x..z]                                                         |
|                                                                      |
|o1 : PolynomialRing                                                   |
+----------------------------------------------------------------------+
|i2 : isTropicalBasis({x+y+z,2*x+3*y-z})                               |
|                                                                      |
|o2 = false                                                            |
+----------------------------------------------------------------------+
|i3 : isTropicalBasis(flatten entries gens Grassmannian (1,4,QQ[a..l]))|
|                                                                      |
|o3 = true                                                             |
+----------------------------------------------------------------------+

Ways to use isTropicalBasis:
============================

  * "isTropicalBasis(List)"

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

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

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

The source of this document is in Tropical.m2:1142:0.

linealitySpace(TropicalCycle) -- computes the lineality space of a  tropical cycle
**********************************************************************************

  * Function: linealitySpace (Polyhedra),
  * Usage:
        linealitySpace(T)
  * Inputs:
      * T, a tropical cycle,
  * Outputs:
      * M, a matrix (Macaulay2Doc),

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

This function computes the lineality space of the fan associated to the
tropical cycle T. The generators of the lineality space are the columns of the
output  matrix

+-------------------------+
|i1 : QQ[x,y,z];          |
+-------------------------+
|i2 : I=ideal(x-y);       |
|                         |
|o2 : Ideal of QQ[x..z]   |
+-------------------------+
|i3 : T=tropicalVariety I;|
+-------------------------+
|i4 : L=linealitySpace T  |
|                         |
|o4 = | 1 0 |             |
|     | 1 0 |             |
|     | 0 1 |             |
|                         |
|              3       2  |
|o4 : Matrix ZZ  <-- ZZ   |
+-------------------------+

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

  * linealitySpace(TropicalCycle), --
    computes the lineality space of a  tropical cycle
-------------------------------------------------------------------------------

The source of this document is in Tropical.m2:1502:0.

maxCones(TropicalCycle) -- computes the maximal cone of a tropical cycle
************************************************************************

  * Function: maxCones (Polyhedra),
  * Usage:
        maxCones(T)
  * Inputs:
      * T, a tropical cycle,
  * Outputs:
      * L, a list (Macaulay2Doc),

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

This function computes the maximal cones of the fan associated to the tropical
cycle.

+-----------------------------------------------------------------------------+
|i1 : QQ[x,y,z,w]                                                             |
|                                                                             |
|o1 = QQ[x..z, w]                                                             |
|                                                                             |
|o1 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i2 : I=ideal(x^2-y*z+w^2,w^3-x*y^3+z^3);                                     |
|                                                                             |
|o2 : Ideal of QQ[x..z, w]                                                    |
+-----------------------------------------------------------------------------+
|i3 : T=tropicalVariety I;                                                    |
+-----------------------------------------------------------------------------+
|i4 : maxCones T                                                              |
|                                                                             |
|o4 = {{0, 1}, {0, 2}, {0, 5}, {1, 3}, {2, 3}, {1, 4}, {2, 4}, {3, 5}, {4, 5}}|
|                                                                             |
|o4 : List                                                                    |
+-----------------------------------------------------------------------------+

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

  * maxCones(TropicalCycle) -- computes the
    maximal cone of a tropical cycle
-------------------------------------------------------------------------------

The source of this document is in Tropical.m2:1307:0.

multiplicities -- returns the list of multiplicities on maximal cones in a tropical cycle
*****************************************************************************************

  * Usage:
        multiplicities(T)
  * Inputs:
      * T, a tropical cycle,
  * Outputs:
      * L, a list (Macaulay2Doc),

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

This method returns the list of multiplicities on maximal cones in a tropical
cycle.

+---------------------------------------+
|i1 : QQ[x,y,z]                         |
|                                       |
|o1 = QQ[x..z]                          |
|                                       |
|o1 : PolynomialRing                    |
+---------------------------------------+
|i2 : V = tropicalVariety(ideal(x+y+z));|
+---------------------------------------+
|i3 : multiplicities V                  |
|                                       |
|o3 = {1, 1, 1}                         |
|                                       |
|o3 : List                              |
+---------------------------------------+

Ways to use multiplicities:
===========================

  * "multiplicities(TropicalCycle)"

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

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

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

The source of this document is in Tropical.m2:1164:0.

Polymake interface instructions -- instructions for loading Polymake with this package.
***************************************************************************************

The software program Polymake is not distributed with Macaulay2, so to use the
Polymake commands the user needs to install Polymake on their own machine, and
tell Macaulay2 where to find it.  This is done with the Configuration option
"polymakeCommand".  The default is that this is empty, which means that
Polymake options will not be used.  To tell the package where your copy of
Polymake is installed, use either
loadPackage("Tropical",Configuration=>\{"polymakeCommand"=>"YOUR COMMAND"\}),
or edit the init-Tropical.m2 file (created after you install the package) by
changing "polymakeCommand" => "", into "polymakeCommand" => "YOUR COMMAND"

On a Mac, the default value for YOUR COMMAND is
/Applications/polymake.app/Contents/MacOS/polymake.start and the
init-Tropical.m2 file is usually in ~/Library/Application Support/Macaulay2.

On Unix, the default value for YOUR COMMAND is /usr/bin/polymake and the
init-Tropical.m2 file is usually in ~/.Macaulay2. If polymake is installed in a
nonstandard location, you can find YOUR COMMAND with the terminal command
"which polymake".

This package should work with Polymake versions > 3.2, and has been tested up
to 4.2.

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

The source of this document is in Tropical.m2:1534:0.

Prime -- option to declare if the input ideal is prime
******************************************************

  * Usage:
        tropicalVariety(I,Prime=>false)

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

By default the ideal is assumed to be prime. If the ideal is not prime then the
internal  procedure to compute the tropicalization is different. It is used
gfan_tropicalbrute force instead of gfan_tropicaltraverse.

+--------------------------------------+
|i1 : QQ[x,y,z];                       |
+--------------------------------------+
|i2 : I=ideal(x^2+y^2-2*x*y);          |
|                                      |
|o2 : Ideal of QQ[x..z]                |
+--------------------------------------+
|i3 : isPrime I                        |
|                                      |
|o3 = false                            |
+--------------------------------------+
|i4 : T=tropicalVariety(I,Prime=>false)|
|                                      |
|o4 = T                                |
|                                      |
|o4 : TropicalCycle                    |
+--------------------------------------+

Functions with optional argument named Prime:
=============================================

  * "tropicalVariety(...,Prime=>...)" -- see tropicalVariety,
    -- the tropical variety associated to an ideal

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

The object Prime, is a symbol (Macaulay2Doc).

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

The source of this document is in Tropical.m2:1204:0.

rays(TropicalCycle) -- computes the rays of a tropical cycle
************************************************************

  * Function: rays (Macaulay2Doc),
  * Usage:
        rays(T)
  * Inputs:
      * T, a tropical cycle,
  * Outputs:
      * M, a matrix (Macaulay2Doc),

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

This function computes the rays of the fan associated to the tropical cycle.
These are the columns of the output matrix.

+----------------------------------------+
|i1 : QQ[x,y,z,w]                        |
|                                        |
|o1 = QQ[x..z, w]                        |
|                                        |
|o1 : PolynomialRing                     |
+----------------------------------------+
|i2 : I=ideal(x^2-y*z+w^2,w^3-x*y^3+z^3);|
|                                        |
|o2 : Ideal of QQ[x..z, w]               |
+----------------------------------------+
|i3 : T=tropicalVariety I;               |
+----------------------------------------+
|i4 : rays T                             |
|                                        |
|o4 = | -6 -3 0  1 3 6 |                 |
|     | -5 -2 -1 1 2 5 |                 |
|     | -7 -3 -1 1 4 7 |                 |
|     | -6 -3 -1 1 3 7 |                 |
|                                        |
|              4       6                 |
|o4 : Matrix ZZ  <-- ZZ                  |
+----------------------------------------+

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

  * rays(TropicalCycle) -- computes the rays of
    a tropical cycle
-------------------------------------------------------------------------------

The source of this document is in Tropical.m2:1379:0.

stableIntersection -- computes the stable intersection of two tropical varieties
********************************************************************************

  * Usage:
        stableIntersection(F,G)
        stableIntersection(L,Strategy=>S)
  * Inputs:
      * F, a tropical cycle, a tropical cycle
      * G, a tropical cycle, another tropical cycle
  * Optional inputs (Macaulay2Doc),:
      * Strategy => a string (Macaulay2Doc), default value
        "gfan", Strategy ("atint" (polymake) or "gfan")
  * Outputs:
      * T, a tropical cycle, a tropical cycle

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

This computes the stable intersection of two tropical cycles.  For details on
the definition of stable intersection, see, for example, Section 3.6 of
TROPICALBOOK. If a recent enough version of polymake is installed, the Strategy
"atint" is default. Otherwise "gfan" will be used, which only computes the fan
of the stable intersection without multiplicities.

+------------------------------------------------------+
|i1 : QQ[x,y,z];                                       |
+------------------------------------------------------+
|i2 : I = ideal(x^2+y^2+z^2-1);                        |
|                                                      |
|o2 : Ideal of QQ[x..z]                                |
+------------------------------------------------------+
|i3 : T1 = tropicalVariety(I);                         |
+------------------------------------------------------+
|i4 : J = ideal(x*y+y*z+x*z+1);                        |
|                                                      |
|o4 : Ideal of QQ[x..z]                                |
+------------------------------------------------------+
|i5 : T2 = tropicalVariety(J);                         |
+------------------------------------------------------+
|i6 : V = tropicalVariety(I+J);                        |
+------------------------------------------------------+
|i7 : W2 =  stableIntersection(T1,T2,Strategy=>"gfan");|
+------------------------------------------------------+
|i8 : V#"Fan" == W2                                    |
|                                                      |
|o8 = true                                             |
+------------------------------------------------------+

Ways to use stableIntersection:
===============================

  * "stableIntersection(TropicalCycle,TropicalCycle)"

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

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

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

The source of this document is in Tropical.m2:1114:0.

Symmetry -- option to declare if the input ideal has symmetries
***************************************************************

  * Usage:
        tropicalVariety(I,Symmetry=>{{..},{..}})

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

If the option is used, the specified symmetries are used in the calculation of
the tropical variety. For an ideal I of a polynomial ring R = KK[x_0 .. x_N],
each symmetry is a permutation encoded in a list \{s_0, s_1, ..., s_N\} of
numbers from 0 to N which records that swapping the variable x_j with the
variable x_{s_j} in R leaves the ideal I fixed. Exploiting symmetries reduces
the number of computations needed. The length of each symmetry equals the
number of generators of R, otherwise an error is raised.

+--------------------------------------------------------+
|i1 : QQ[x_0,x_1,x_2];                                   |
+--------------------------------------------------------+
|i2 : I=ideal(x_0+x_1+x_2+1);                            |
|                                                        |
|o2 : Ideal of QQ[x ..x ]                                |
|                  0   2                                 |
+--------------------------------------------------------+
|i3 : T=tropicalVariety (I,Symmetry=>{{1,0,2}, {2,1,0} })|
|                                                        |
|o3 = T                                                  |
|                                                        |
|o3 : TropicalCycle                                      |
+--------------------------------------------------------+

Functions with optional argument named Symmetry:
================================================

  * "tropicalVariety(...,Symmetry=>...)" -- see tropicalVariety,
    -- the tropical variety associated to an ideal

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

The object Symmetry, is a symbol (Macaulay2Doc).

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

The source of this document is in Tropical.m2:1255:0.

TropicalCycle -- a Type for working with tropical cycles
********************************************************

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

This is the main type for tropical cycles. A TropicalCycle consists of a Fan
with an extra HashKey Multiplicities, which is the list of multiplicities on
the maximal cones listed in the order that the maximal cones appear in the
MaxCones list. A TropicalCycle is saved as a hash table which contains the Fan
and the Multiplicities.

Functions and methods returning a tropical cycle:
=================================================

  * stableIntersection -- computes the stable
    intersection of two tropical varieties
  * tropicalCycle -- constructs a TropicalCycle from a
    Fan and a list with multiplicities
  * tropicalVariety -- the tropical variety associated
    to an ideal

Methods that use a tropical cycle:
==================================

  * ambDim(TropicalCycle) -- computes the
    dimension of the ambient space of a tropical cycle
  * cones(ZZ,TropicalCycle) -- computes
    the cones of a tropical cycle
  * dim(TropicalCycle) -- computes the dimension
    of a tropical cycle
  * fan(TropicalCycle) -- outputs the fan
    associated to the tropical cycle
  * fVector(TropicalCycle) -- computes the
    fVector of  a  tropical cycle
  * "isBalanced(TropicalCycle)" -- see isBalanced, -- checks
    whether a tropical cycle is balanced
  * isPure(TropicalCycle) -- checks whether
    a tropical cycle is pure
  * isSimplicial(TropicalCycle), --
    checks whether a tropical cycle is simplicial
  * linealitySpace(TropicalCycle), --
    computes the lineality space of a  tropical cycle
  * maxCones(TropicalCycle) -- computes the
    maximal cone of a tropical cycle
  * "multiplicities(TropicalCycle)" -- see multiplicities,
    -- returns the list of multiplicities on maximal cones in a
    tropical cycle
  * rays(TropicalCycle) -- computes the rays of
    a tropical cycle
  * "stableIntersection(TropicalCycle,TropicalCycle)" -- see
    stableIntersection, -- computes the stable intersection
    of two tropical varieties
  * star(TropicalCycle,Polyhedron) (missing documentation)

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

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

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

The source of this document is in Tropical.m2:897:0.

tropicalCycle -- constructs a TropicalCycle from a Fan and a list with multiplicities
*************************************************************************************

  * Usage:
        tropicalCycle(F,mult)
  * Inputs:
      * F, an instance of the type Fan (Polyhedra), mult:List
  * Outputs:
      * T, a tropical cycle,

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

This function creates a tropical cycle from a fan and a list of multiplicities.
The multiplicities must be given in the same order as the maximal cones appear
in the MaximalCones list.

+-----------------------------------------------------------------------------+
|i1 : F = fan {posHull matrix {{1},{0},{0}}, posHull matrix {{0},{1},{0}},    |
|                                                                             |
|o1 = F                                                                       |
|                                                                             |
|o1 : Fan                                                                     |
|-----------------------------------------------------------------------------|
|posHull matrix {{0},{0},{1}}, posHull matrix {{-1},{-1},{-1}}}               |
+-----------------------------------------------------------------------------+
|i2 : mult = {1,2,-3,1}                                                       |
|                                                                             |
|o2 = {1, 2, -3, 1}                                                           |
|                                                                             |
|o2 : List                                                                    |
+-----------------------------------------------------------------------------+
|i3 : tropicalCycle(F, mult)                                                  |
|                                                                             |
|o3 = TropicalCycle{...2...}                                                  |
|                                                                             |
|o3 : TropicalCycle                                                           |
+-----------------------------------------------------------------------------+

Ways to use tropicalCycle:
==========================

  * "tropicalCycle(Fan,List)"

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

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

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

The source of this document is in Tropical.m2:926:0.

tropicalPrevariety -- the intersection of the tropical hypersurfaces
********************************************************************

  * Usage:
        tropicalPrevariety(L)
        tropicalPrevariaty(L,LS)
        tropicalPrevariety(L,Strategy=>S)
        tropicalPrevariety(L,LS,Strategy=>S)
  * Inputs:
      * L, a list (Macaulay2Doc), of polynomials
      * LS, a list (Macaulay2Doc), of Symmetries (optional)
  * Optional inputs (Macaulay2Doc),:
      * Strategy => a string (Macaulay2Doc), default value
        "gfan", Strategy (currently only "gfan")
  * Outputs:
      * F, an instance of the type Fan (Polyhedra), the intersection
        of the tropical hypersurfaces of polynomials in L

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

This method intersects the tropical hypersurfaces coming from the
tropicalizations of the polynomials in the list L. If there are symmetries that
leave the specified polynomials fixed, they can  be specified by passing a list
with the symmetries as second argument, with the same format as the option
Symmetry.

+-----------------------------------------------------------------------------+
|i1 : QQ[x_1,x_2,x_3,x_4]                                                     |
|                                                                             |
|o1 = QQ[x ..x ]                                                              |
|         1   4                                                               |
|                                                                             |
|o1 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i2 : L={x_1+x_2+x_3+x_4,x_1*x_2+x_2*x_3+x_3*x_4+x_4*x_1,x_1*x_2*x_3+x_2*x_3*x|
|                                                                             |
|o2 = {x  + x  + x  + x , x x  + x x  + x x  + x x , x x x  + x x x  + x x x  |
|       1    2    3    4   1 2    2 3    1 4    3 4   1 2 3    1 2 4    1 3 4 |
|     ------------------------------------------------------------------------|
|     + x x x , x x x x  - 1}                                                 |
|        2 3 4   1 2 3 4                                                      |
|                                                                             |
|o2 : List                                                                    |
|-----------------------------------------------------------------------------|
|_4+x_3*x_4*x_1+x_4*x_1*x_2,x_1*x_2*x_3*x_4-1}                                |
+-----------------------------------------------------------------------------+
|i3 : tropicalPrevariety L                                                    |
|                                                                             |
|o3 = Fan{...1...}                                                            |
|                                                                             |
|o3 : Fan                                                                     |
+-----------------------------------------------------------------------------+
|i4 : QQ[x_0,x_1]                                                             |
|                                                                             |
|o4 = QQ[x ..x ]                                                              |
|         0   1                                                               |
|                                                                             |
|o4 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i5 : tropicalPrevariety({x_0+x_1+1}, {{1,0}})                                |
|                                                                             |
|o5 = Fan{...1...}                                                            |
|                                                                             |
|o5 : Fan                                                                     |
+-----------------------------------------------------------------------------+
|i6 : QQ[x_0,x_1]                                                             |
|                                                                             |
|o6 = QQ[x ..x ]                                                              |
|         0   1                                                               |
|                                                                             |
|o6 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i7 : tropicalPrevariety({x_0+x_1+1,x_0+x_1},Strategy => "gfan")              |
|                                                                             |
|o7 = Fan{...1...}                                                            |
|                                                                             |
|o7 : Fan                                                                     |
+-----------------------------------------------------------------------------+

Ways to use tropicalPrevariety:
===============================

  * "tropicalPrevariety(List)"
  * "tropicalPrevariety(List,List)"

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

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

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

The source of this document is in Tropical.m2:992:0.

tropicalVariety -- the tropical variety associated to an ideal
**************************************************************

  * Usage:
        tropicalVariety(I)
        tropicalVariety(I,ComputeMultiplicities=>true)
        tropicalVariety(I,Prime=>true)
        tropicalVariety(I,IsHomogeneous=>false)
        tropicalVariety(I,Symmetry=>{{...},{...}})
  * Inputs:
      * I, an ideal (Macaulay2Doc), of polynomials
  * Optional inputs (Macaulay2Doc),:
      * IsHomogeneous => a Boolean value (Macaulay2Doc), default
        value false, that ensures whether the ideal is already homogeneous
      * ComputeMultiplicities => a Boolean value (Macaulay2Doc),
        default value true, that confirms whether the multiplicities will be
        computed
      * Prime => a Boolean value (Macaulay2Doc), default value
        true, that ensures whether the ideal is already prime
      * Symmetry => a list (Macaulay2Doc), default value {}, that
        records the symmetries of the ideal
  * Outputs:
      * F, a tropical cycle,

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

This method takes an ideal and computes the tropical variety associated to it.
By default the ideal is assumed to be prime.  If this is not the case the
default answer will not necessarily give the correct answer.  In this case use
the optional argument Prime=>false.  By default the tropicalVariety command
computes multiplicities but setting computeMultiplicities=>false turns this
off.  This only saves time if Prime is set to false.  The ideal I is not
assumed to be homogeneous.  The optional argument IsHomogeneous=>true allows
the user to assert that the ideal is homogeneous. If there are symmetries of
the ring corresponding to I that leave I fixed, they can be specified with the
option Symmetry.

+-----------------------------------------------------------------------------+
|i1 : QQ[x,y];                                                                |
+-----------------------------------------------------------------------------+
|i2 : I=ideal(x+y+1);                                                         |
|                                                                             |
|o2 : Ideal of QQ[x..y]                                                       |
+-----------------------------------------------------------------------------+
|i3 : T=tropicalVariety(I);                                                   |
+-----------------------------------------------------------------------------+
|i4 : rays(T)                                                                 |
|                                                                             |
|o4 = | 1 -1 0 |                                                              |
|     | 0 -1 1 |                                                              |
|                                                                             |
|              2       3                                                      |
|o4 : Matrix ZZ  <-- ZZ                                                       |
+-----------------------------------------------------------------------------+
|i5 : maxCones(T)                                                             |
|                                                                             |
|o5 = {{1}, {0}, {2}}                                                         |
|                                                                             |
|o5 : List                                                                    |
+-----------------------------------------------------------------------------+
|i6 : linealitySpace T                                                        |
|                                                                             |
|o6 = 0                                                                       |
|                                                                             |
|              2                                                              |
|o6 : Matrix ZZ  <-- 0                                                        |
+-----------------------------------------------------------------------------+
|i7 : Polyhedra$fVector fan T                                                 |
|                                                                             |
|o7 = {1, 3}                                                                  |
|                                                                             |
|o7 : List                                                                    |
+-----------------------------------------------------------------------------+
|i8 : multiplicities(T)                                                       |
|                                                                             |
|o8 = {1, 1, 1}                                                               |
|                                                                             |
|o8 : List                                                                    |
+-----------------------------------------------------------------------------+
|i9 : QQ[x,y,z,w];                                                            |
+-----------------------------------------------------------------------------+
|i10 : I = ideal(w+x+y+z)                                                     |
|                                                                             |
|o10 = ideal(x + y + z + w)                                                   |
|                                                                             |
|o10 : Ideal of QQ[x..z, w]                                                   |
+-----------------------------------------------------------------------------+
|i11 : T = tropicalVariety(I, IsHomogeneous=>true,                            |
|                                                                             |
|o11 = T                                                                      |
|                                                                             |
|o11 : TropicalCycle                                                          |
|-----------------------------------------------------------------------------|
|Symmetry=>{{1,0,2,3},{2,1,0,3},{3,1,2,0}})                                   |
+-----------------------------------------------------------------------------+
|i12 : rays(T)                                                                |
|                                                                             |
|o12 = | 3  -1 -1 -1 |                                                        |
|      | -1 3  -1 -1 |                                                        |
|      | -1 -1 3  -1 |                                                        |
|      | -1 -1 -1 3  |                                                        |
|                                                                             |
|               4       4                                                     |
|o12 : Matrix ZZ  <-- ZZ                                                      |
+-----------------------------------------------------------------------------+
|i13 : maxCones(T)                                                            |
|                                                                             |
|o13 = {{0, 1}, {0, 2}, {0, 3}, {1, 2}, {1, 3}, {2, 3}}                       |
|                                                                             |
|o13 : List                                                                   |
+-----------------------------------------------------------------------------+
|i14 : I=intersect(ideal(x+y+z+w),ideal(x-y,y-z));                            |
|                                                                             |
|o14 : Ideal of QQ[x..z, w]                                                   |
+-----------------------------------------------------------------------------+
|i15 : T= tropicalVariety(I,Prime=>false);                                    |
+-----------------------------------------------------------------------------+
|i16 : rays(T)                                                                |
|                                                                             |
|o16 = | 1  3  1  -1 1  -1 -1 -1 |                                            |
|      | 1  -1 1  3  -1 1  -1 -1 |                                            |
|      | 1  -1 -1 -1 1  1  3  -1 |                                            |
|      | -3 -1 -1 -1 -1 -1 -1 3  |                                            |
|                                                                             |
|               4       8                                                     |
|o16 : Matrix ZZ  <-- ZZ                                                      |
+-----------------------------------------------------------------------------+
|i17 : maxCones(T)                                                            |
|                                                                             |
|o17 = {{0}, {1, 2}, {1, 4}, {1, 7}, {2, 3}, {4, 6}, {3, 5}, {3, 7}, {5, 6},  |
|      -----------------------------------------------------------------------|
|      {6, 7}}                                                                |
|                                                                             |
|o17 : List                                                                   |
+-----------------------------------------------------------------------------+
|i18 : multiplicities(T)                                                      |
|                                                                             |
|o18 = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1}                                         |
|                                                                             |
|o18 : List                                                                   |
+-----------------------------------------------------------------------------+
|i19 : linealitySpace T                                                       |
|                                                                             |
|o19 = | 1 |                                                                  |
|      | 1 |                                                                  |
|      | 1 |                                                                  |
|      | 1 |                                                                  |
|                                                                             |
|               4       1                                                     |
|o19 : Matrix ZZ  <-- ZZ                                                      |
+-----------------------------------------------------------------------------+
|i20 : QQ[x,y,z,w];                                                           |
+-----------------------------------------------------------------------------+
|i21 : I=intersect(ideal(x+y+z+1),ideal(x^2-y*z));                            |
|                                                                             |
|o21 : Ideal of QQ[x..z, w]                                                   |
+-----------------------------------------------------------------------------+
|i22 : T= tropicalVariety(I,Prime=>false,ComputeMultiplicities=>false);       |
+-----------------------------------------------------------------------------+
|i23 : rays(T)                                                                |
|                                                                             |
|o23 = | -4 4 0 0 4 4 |                                                       |
|      | -4 0 4 0 8 0 |                                                       |
|      | -4 0 0 4 0 8 |                                                       |
|      | -3 1 1 1 3 3 |                                                       |
|                                                                             |
|               4       6                                                     |
|o23 : Matrix ZZ  <-- ZZ                                                      |
+-----------------------------------------------------------------------------+
|i24 : maxCones(T)                                                            |
|                                                                             |
|o24 = {{0, 1}, {0, 2}, {0, 3}, {0, 4}, {0, 5}, {2, 3}, {1, 4}, {1, 5}, {2,   |
|      -----------------------------------------------------------------------|
|      4}, {3, 5}, {4, 5}}                                                    |
|                                                                             |
|o24 : List                                                                   |
+-----------------------------------------------------------------------------+
|i25 : linealitySpace T                                                       |
|                                                                             |
|o25 = | 0 |                                                                  |
|      | 0 |                                                                  |
|      | 0 |                                                                  |
|      | 1 |                                                                  |
|                                                                             |
|               4       1                                                     |
|o25 : Matrix ZZ  <-- ZZ                                                      |
+-----------------------------------------------------------------------------+
|i26 : multiplicities(T)                                                      |
|                                                                             |
|o26 = {{}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}}                           |
|                                                                             |
|o26 : List                                                                   |
+-----------------------------------------------------------------------------+

Ways to use tropicalVariety:
============================

  * "tropicalVariety(Ideal)"

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

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

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

The source of this document is in Tropical.m2:1068:0.

visualizeHypersurface -- visualize the tropical hypersurface of the given polynomial
************************************************************************************

  * Usage:
        visualizeHypersurface(polyn)
        visualizeHypersurface(Valuation=>p,polyn)
        visualizeHypersurface(Valuation=>t,polyn)
  * Inputs:
      * polyn, a ring element (Macaulay2Doc), polynomial
  * Optional inputs (Macaulay2Doc),:
      * Valuation (missing documentation) => a number (Macaulay2Doc),
        default value null, use p-adic coefficients with
        given p
      * Valuation (missing documentation) => a ring element (Macaulay2Doc),
        default value null, use coefficients in
        R[t] with given t

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

This function wraps the Polymake visualization for a tropical hypersurface
given an input polynomial. The input should be entered as a homogeneous
polynomial. Running this method opens an image in a new browser window. The
coefficients can be interpreted as p-adic coefficients or as polynomials via
the option Valuation. Examples are commented out
because they open a new browser window.

+--------------------------------------------------------------------+
|i1 : R=ZZ[x,y,z]                                                    |
|                                                                    |
|o1 = R                                                              |
|                                                                    |
|o1 : PolynomialRing                                                 |
+--------------------------------------------------------------------+
|i2 : f=2*x*y+x*z+y*z+z^2                                            |
|                                                                    |
|                         2                                          |
|o2 = 2x*y + x*z + y*z + z                                           |
|                                                                    |
|o2 : R                                                              |
+--------------------------------------------------------------------+
|i3 : f=2*x^2+x*y+2*y^2+x*z+y*z+2*z^2                                |
|                                                                    |
|       2           2                 2                              |
|o3 = 2x  + x*y + 2y  + x*z + y*z + 2z                               |
|                                                                    |
|o3 : R                                                              |
+--------------------------------------------------------------------+
|i4 : R=ZZ[w,x,y,z]                                                  |
|                                                                    |
|o4 = R                                                              |
|                                                                    |
|o4 : PolynomialRing                                                 |
+--------------------------------------------------------------------+
|i5 : f=8*x^2+8*y^2+8*z^2+8*w^2+2*x*y+2*x*z+2*y*z+2*x*w+2*y*w+2*z*w  |
|                                                                    |
|       2            2                   2                          2|
|o5 = 8w  + 2w*x + 8x  + 2w*y + 2x*y + 8y  + 2w*z + 2x*z + 2y*z + 8z |
|                                                                    |
|o5 : R                                                              |
+--------------------------------------------------------------------+

Ways to use visualizeHypersurface:
==================================

  * "visualizeHypersurface(RingElement)"

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

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

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

The source of this document is in Tropical.m2:879:0.