documentation:master:tropical

# Differences

This shows you the differences between two versions of the page.

 documentation:master:tropical [2020/05/19 04:53] documentation:master:tropical [2020/06/02 04:40] (current) Line 1: Line 1: + ====== application tropical ====== + This application concentrates on [[.:​tropical:​Hypersurface |tropical hypersurfaces]] and [[.:​tropical:​Polytope |tropical polytopes]]. It provides the functionality for the computation of basic properties. Visualization and various constructions are possible. + + imports from: + * application [[.:​common|common]] + * application [[.:​graph|graph]] + uses: + * application [[.:​fan|fan]] + * application [[.:​group|group]] + * application [[.:​ideal|ideal]] + * application [[.:​matroid|matroid]] + * application [[.:​polytope|polytope]] + * application [[.:​topaz|topaz]] + + ===== Objects ===== + ** ''​[[.:​tropical:​CovectorLattice |CovectorLattice]]'':​\\ ​ + ** ''​[[.:​tropical:​Cycle |Cycle]]'':​\\ ​ A tropical cycle is a weighted, balanced, pure polyhedral complex. It is given as a polyhedral complex in tropical projective coordinates. To be precise: Each row of ''​[[.:​fan:​PolyhedralComplex#​VERTICES |VERTICES]]''​ and ''​[[.:​fan:​PolyhedralFan#​LINEALITY_SPACE |LINEALITY_SPACE]]''​ has a leading 1 or 0, depending on whether it is a vertex or a ray. The remaining n coordinates are interpreted as an element of R<​sup>​n​ modulo (1,..,1). IMPORTANT NOTE: VERTICES are assumed to be normalized such that the first coordinate (i.e. column index 1) is 0. If your input is not of that form, use ''​[[.:​tropical:​Cycle#​PROJECTIVE_VERTICES |PROJECTIVE_VERTICES]]''​. Note that there is a convenience method ''​[[.:​tropical#​thomog |thomog]]'',​ which converts affine coordinates into projective coordinates. + ** ''​[[.:​tropical:​Hypersurface |Hypersurface]]'':​\\ ​ Tropical hypersurface in the tropical projective torus R^d/R1. This is a special instance of a Cycle: It is the tropical locus of a homogeneous polynomial over the tropical numbers. Note: Homogeneity of the ''​[[.:​tropical:​Hypersurface#​MONOMIALS |MONOMIALS]]''​ is never checked. + ** ''​[[.:​tropical:​LinesInCubic |LinesInCubic]]'':​\\ ​ This represents the result of the method ''​[[.:​tropical#​lines_in_cubic |lines_in_cubic]]''​. It contains: The tropical polynomial representing the surface, the surface itself as a Cycle and  lists of lines and families of different types, each starting with LIST_... ​ The object also has methods, starting with array_... that return the corresponding LIST_... as a perl array. The different (lists of) lines can be visualized nicely with ''​[[.:​tropical#​visualize_in_surface |visualize_in_surface]]''​. + ** ''​[[.:​tropical:​MatroidRingCycle |MatroidRingCycle]]'':​\\ ​ A matroid ring cycle is a tropical cycle which lies in the intersection ring of matroids fans. I.e. it is a linear combination of matroids fans (of the same dimension). Cycle sum and intersection are implemented through the combinatorics of the underlying matroids. Note that the set of loopfree nested matroids is a basis for this ring (e.g. as a Z-module). ​ Hence every MatroidRingCycle is represented as a linear combination of nested matroids. The nested matroids are encoded via their maximal transversal presentations in  ''​[[.:​tropical:​MatroidRingCycle#​NESTED_PRESENTATIONS |NESTED_PRESENTATIONS]]''​. The corresponding coefficients are found in ''​[[.:​tropical:​MatroidRingCycle#​NESTED_COEFFICIENTS |NESTED_COEFFICIENTS]]''​. + ** ''​[[.:​tropical:​Morphism |Morphism]]'':​\\ ​ A morphism is a function between cycles which is locally affine linear and respects the lattices. It is defined by a ''​[[.:​tropical:​Morphism#​DOMAIN |DOMAIN]]'',​ which is a cycle, and values on this domain, ''​[[.:​tropical:​Morphism#​VERTEX_VALUES |VERTEX_VALUES]]''​ and ''​[[.:​tropical:​Morphism#​LINEALITY_VALUES |LINEALITY_VALUES]]'',​ much like ''​[[.:​tropical:​TropicalRationalFunction |TropicalRationalFunction]]''​. Alternatively,​ it can be defined as a global affine linear function by giving a matrix and a  translation vector. + ** ''​[[.:​tropical:​Patchwork |Patchwork]]'':​\\ ​ This encodes a patchworking structure on a hypersurface. + ** ''​[[.:​tropical:​Polytope |Polytope]]'':​\\ ​ A tropical polytope is the tropical convex hull of finitely many points or the finite intersection of tropical halfspaces in a tropical projective space. Many combinatorial properties depend on ''​[[.:​tropical:​Polytope#​POINTS |POINTS]]''​. Note: ''​[[.:​tropical:​Polytope#​VERTICES |VERTICES]]''​ are used for ''​[[.:​tropical:​Polytope#​POINTS |POINTS]]''​ if the tropical polytope is initialized by INEQUALITIES. ​ + ** ''​[[.:​tropical:​RationalCurve |RationalCurve]]'':​\\ ​ An n-marked rational curve, identified by its ''​[[.:​tropical:​RationalCurve#​SETS |SETS]]'',​ i.e. its partitions of {1,...,n} and its ''​[[.:​tropical:​Hypersurface#​COEFFICIENTS |COEFFICIENTS]]'',​ i.e. the lengths of the corresponding edges. + ** ''​[[.:​tropical:​TropicalRationalFunction |TropicalRationalFunction]]'':​\\ ​ A rational function on a polyhedral complex. It can be described by giving its ''​[[.:​tropical:​TropicalRationalFunction#​DOMAIN |DOMAIN]]'',​ a Cycle, and values on this domain - which are encoded in the properties ''​[[.:​tropical:​TropicalRationalFunction#​VERTEX_VALUES |VERTEX_VALUES]]''​ and  ''​[[.:​tropical:​TropicalRationalFunction#​LINEALITY_VALUES |LINEALITY_VALUES]]''​. Alternatively,​ it can be defined by a tropical quotient of homogeneous tropical polynomials of the  same degree i.e. by giving ''​[[.:​tropical:​TropicalRationalFunction#​NUMERATOR |NUMERATOR]]''​ and ''​[[.:​tropical:​TropicalRationalFunction#​DENOMINATOR |DENOMINATOR]]''​. ​ A ''​[[.:​tropical:​TropicalRationalFunction#​DOMAIN |DOMAIN]]''​ can be defined additionally (though one should take care that both functions are actually piecewise affine linear on the cells), otherwise it will be computed as the common refinement of the domains of affine linearity of the two polynomials. + ** ''​[[.:​tropical:​VoronoiDiagram |VoronoiDiagram]]'':​\\ ​ Voronoi diagram with respect to the tropical metric in the tropical projective torus. Its combinatorics is controlled by a ''​[[.:​tropical:​VoronoiDiagram#​POLYTROPE_PARTITION |POLYTROPE_PARTITION]]''​. See P. Criado, M. Joswig, P. Santos: Tropical bisectors and Voronoi diagrams, arXiv:​1906.10950 + + ===== Functions ===== + + ==== Abstract rational curves ==== + These functions deal with abstract rational n-marked curves. + ---- + {{anchor:​insert_leaves:​}} + ?  **''​insert_leaves([[.:​tropical:​RationalCurve |RationalCurve]] curve, [[.:​common#​Vector |Vector]]<​[[.:​common#​Int |Int]]> nodes)''​** + :: Takes a RationalCurve and a list of node indices. Then inserts additional ​ leaves (starting from N_LEAVES+1) at these nodes and returns the resulting ​ RationalCurve object + ? Parameters: + :: ''​[[.:​tropical:​RationalCurve |RationalCurve]]''​ ''​curve'':​ A RationalCurve object + :: ''​[[.:​common#​Vector |Vector]]<​[[.:​common#​Int |Int]]>''​ ''​nodes'':​ A list of node indices of the curve + ? from extension: + : [[:​external_software|bundled:​atint]] + + + ---- + {{anchor:​matroid_coordinates_from_curve:​}} + ?  **''​matroid_coordinates_from_curve<​Addition>​([[.:​tropical:​RationalCurve |RationalCurve]] r)''​** + :: Takes a rational curve and converts it into the corresponding matroid coordinates in the moduli space of rational curves (including the leading 0 for a ray!) + ? Type Parameters: + :: ''​Addition'':​ Min or Max, i.e. which coordinates to use. + ? Parameters: + :: ''​[[.:​tropical:​RationalCurve |RationalCurve]]''​ ''​r'':​ A rational n-marked curve + ? Returns: + :''​[[.:​common#​Vector |Vector]]<​[[.:​common#​Rational |Rational]]>''​ + ? from extension: + : [[:​external_software|bundled:​atint]] + + + ---- + {{anchor:​rational_curve_from_cone:​}} + ?  **''​rational_curve_from_cone([[.:​tropical:​Cycle |Cycle]]<​Addition>​ X, [[.:​common#​Int |Int]] n_leaves, [[.:​common#​Int |Int]] coneIndex)''​** + :: This takes a weighted complex X that is supposed to be of the form M_0,n x Y for some Y (It assumes that M_0,n occupies the first  coordinates) and an index of a maximal cone of that complex. It then computes a rational curve corresponding to an interior point of that cone (ignoring the second component Y) + ? Parameters: + :: ''​[[.:​tropical:​Cycle |Cycle]]<​Addition>''​ ''​X'':​ A weighted complex of the form M_0,n x Y + :: ''​[[.:​common#​Int |Int]]''​ ''​n_leaves'':​ The n in M_0,n. Needed to determine the dimension of the M_0,n component + :: ''​[[.:​common#​Int |Int]]''​ ''​coneIndex'':​ The index of the maximal cone + ? Returns: + :''​[[.:​tropical:​RationalCurve |RationalCurve]]''​ + ? from extension: + : [[:​external_software|bundled:​atint]] + + + ---- + {{anchor:​rational_curve_from_matroid_coordinates:​}} + ?  **''​rational_curve_from_matroid_coordinates<​Addition>​([[.:​common#​Vector |Vector]]<​[[.:​common#​Rational |Rational]]>​ v)''​** + :: Takes a vector from $Q^{(n-1) over 2}$ that lies in $M_{0,n}$ (in its matroid coordinates) ​ and computes the corresponding rational curve. In the isomorphism of the metric curve space and the moduli coordinates the last leaf is considered as the special leaf + ? Type Parameters: + :: ''​Addition'':​ Min or Max (i.e. what are the matroid coordinates using) + ? Parameters: + :: ''​[[.:​common#​Vector |Vector]]<​[[.:​common#​Rational |Rational]]>''​ ''​v'':​ A vector in the moduli space (WITH leading coordinate). + ? Returns: + :''​[[.:​tropical:​RationalCurve |RationalCurve]]''​ + ? from extension: + : [[:​external_software|bundled:​atint]] + + + ---- + {{anchor:​rational_curve_from_metric:​}} + ?  **''​rational_curve_from_metric([[.:​common#​Vector |Vector]]<​[[.:​common#​Rational |Rational]]>​ v)''​** + :: Takes a vector from Q^(n over 2) that describes an n-marked rational abstract curve as a distance vector between its leaves. It then computes the  curve corresponding to this vector. + ? Parameters: + :: ''​[[.:​common#​Vector |Vector]]<​[[.:​common#​Rational |Rational]]>''​ ''​v'':​ A vector of length (n over 2). Its entries are  interpreted as the distances d(i,j) ordered lexicographically according to i,j. However, they need not be positive, as long as v is equivalent to a proper ​ metric modulo leaf lengths. + ? Returns: + :''​[[.:​tropical:​RationalCurve |RationalCurve]]''​ + ? from extension: + : [[:​external_software|bundled:​atint]] + + + ---- + {{anchor:​rational_curve_from_rays:​}} + ?  **''​rational_curve_from_rays<​Addition>​([[.:​common#​Matrix |Matrix]]<​[[.:​common#​Rational |Rational]]>​ rays)''​** + :: This takes a matrix of rays of a given cone that is supposed to lie in a moduli space M_0,n and computes the rational curve corresponding to an interior point. More precisely, if there are k vertices in  homogeneous coordinates,​ it computes 1/k * (sum of these vertices), then it adds each directional ray. It then returns the curve corresponding to this point + ? Type Parameters: + :: ''​Addition'':​ Min or Max, where the coordinates live. + ? Parameters: + :: ''​[[.:​common#​Matrix |Matrix]]<​[[.:​common#​Rational |Rational]]>''​ ''​rays'':​ The rays of the cone, in tropical homogeneous coordinates. + ? Returns: + :''​[[.:​tropical:​RationalCurve |RationalCurve]]''​ + ? from extension: + : [[:​external_software|bundled:​atint]] + + + ---- + {{anchor:​rational_curve_immersion:​}} + ?  **''​rational_curve_immersion<​Addition>​([[.:​common#​Matrix |Matrix]]<​[[.:​common#​Rational |Rational]]>​ delta, [[.:​tropical:​RationalCurve |RationalCurve]] type)''​** + :: This function creates an embedding of a rational tropical curve using a given abstract curve and degree + ? Type Parameters: + :: ''​Addition'':​ Min or Max + ? Parameters: + :: ''​[[.:​common#​Matrix |Matrix]]<​[[.:​common#​Rational |Rational]]>''​ ''​delta'':​ The degree of the curve in tropical projectve ​ coordinates without leading coordinate. The number of rows should correspond to the number of leaves of type and the number of columns is the dimension of the space in which the curve should be realized + :: ''​[[.:​tropical:​RationalCurve |RationalCurve]]''​ ''​type'':​ An abstract rational curve + ? Returns: + :''​[[.:​tropical:​Cycle |Cycle]]<​Addition>''​ + ? from extension: + : [[:​external_software|bundled:​atint]] + + + ---- + {{anchor:​rational_curve_list_from_matroid_coordinates:​}} + ?  **''​rational_curve_list_from_matroid_coordinates<​Addition>​([[.:​common#​Matrix |Matrix]]<​[[.:​common#​Rational |Rational]]>​ m)''​** + :: Takes a matrix whose rows are elements in the moduli space M_0,n in matroid ​ coordinates. Returns a list, where the i-th element is the curve corr. to  the i-th row in the matrix + ? Type Parameters: + :: ''​Addition'':​ Mir or Max (i.e. what are the matroid coordinates using + ? Parameters: + :: ''​[[.:​common#​Matrix |Matrix]]<​[[.:​common#​Rational |Rational]]>''​ ''​m'':​ A list of vectors in the moduli space (with leading coordinate). + ? Returns: + :''​[[.:​tropical:​RationalCurve |RationalCurve]]''​ + ? from extension: + : [[:​external_software|bundled:​atint]] + + + ---- + {{anchor:​rational_curve_list_from_metric:​}} + ?  **''​rational_curve_list_from_metric([[.:​common#​Matrix |Matrix]]<​[[.:​common#​Rational |Rational]]>​ m)''​** + :: Takes a matrix whose rows are metrics of rational n-marked curves. Returns a list, where the i-th element is the curve corr. to  the i-th row in the matrix + ? Parameters: + :: ''​[[.:​common#​Matrix |Matrix]]<​[[.:​common#​Rational |Rational]]>''​ ''​m''​ + ? Returns: + :''​[[.:​tropical:​RationalCurve |RationalCurve]]''​ + ? from extension: + : [[:​external_software|bundled:​atint]] + + + ---- + {{anchor:​sum_curves:​}} + ?  **''​sum_curves([[.:​tropical:​RationalCurve |RationalCurve]] An, [[.:​common#​Vector |Vector]]<​[[.:​common#​Rational |Rational]]>​ v)''​** + :: This function takes a vector of coefficients a_i and a list of RationalCurves c_i and computes sum(a_i * c_i). In particular, it also checks, whether the result lies in M_0,n. If not, it returns undef + ? Parameters: + :: ''​[[.:​tropical:​RationalCurve |RationalCurve]]''​ ''​An'':​ arbitrary list of RationalCurve objects + :: ''​[[.:​common#​Vector |Vector]]<​[[.:​common#​Rational |Rational]]>''​ ''​v'':​ A list of coefficients. Superfluous coefficients are ignored, missing ones replaced by +1(!) + ? Returns: + :''​[[.:​tropical:​RationalCurve |RationalCurve]]''​ + ? from extension: + : [[:​external_software|bundled:​atint]] + + + ---- + {{anchor:​testfourpointcondition:​}} + ?  **''​testFourPointCondition([[.:​common#​Vector |Vector]]<​[[.:​common#​Rational |Rational]]>​ v)''​** + :: Takes a metric vector in Q^{(n over 2)} and checks whether it fulfills ​ the four-point condition, i.e. whether it lies in M_0,n. More precisely ​ it only needs to be equivalent to such a vector + ? Parameters: + :: ''​[[.:​common#​Vector |Vector]]<​[[.:​common#​Rational |Rational]]>''​ ''​v'':​ The vector to be checked + ? Returns: + :''​[[.:​common#​Int |Int]]''​ + ? from extension: + : [[:​external_software|bundled:​atint]] + + + ---- + + ==== Affine and projective coordinates ==== + These functions deal with affine and projective coordinates,​ conversion between those  and properties like dimension that change in projective space. + ---- + {{anchor:​morphism_from_affine:​}} + ?  **''​morphism_from_affine<​Addition>​([[.:​common#​Matrix |Matrix]]<​[[.:​common#​Rational |Rational]]>​ A, [[.:​common#​Vector |Vector]]<​[[.:​common#​Rational |Rational]]>​ v, [[.:​common#​Int |Int]] domain_chart,​ [[.:​common#​Int |Int]] target_chart)''​** + :: Takes a representation of a morphism on affine coordinates and converts it to projective ones. + ? Type Parameters: + :: ''​Addition'':​ Min or Max + ? Parameters: + :: ''​[[.:​common#​Matrix |Matrix]]<​[[.:​common#​Rational |Rational]]>''​ ''​A'':​ . The matrix of the morphism x |-> Ax + v in affine coordinates. + :: ''​[[.:​common#​Vector |Vector]]<​[[.:​common#​Rational |Rational]]>''​ ''​v'':​ . The translate of the morphism x |-> Ax + v in affine coordinates. + :: ''​[[.:​common#​Int |Int]]''​ ''​domain_chart'':​ Which coordinate index of the homogenized domain is shifted to zero to identify it with the domain of the affine function. 0 by default. + :: ''​[[.:​common#​Int |Int]]''​ ''​target_chart'':​ Which coordinate of the homogenized target space is shifted to zero to identify it with the target of the affine function. 0 by default. + ? Returns: + :''​[[.:​tropical:​Morphism |Morphism]]''​ + ? from extension: + : [[:​external_software|bundled:​atint]] + + + ---- + {{anchor:​rational_fct_from_affine_denominator:​}} + ?  **''​rational_fct_from_affine_denominator([[.:​common#​Polynomial |Polynomial]]<​[[.:​common#​TropicalNumber |TropicalNumber]]<​Addition%%>>​%% p, [[.:​common#​Int |Int]] chart)''​** + :: This takes a tropical polynomial p defined on tropical affine coordinates and turns it into  the rational function (1/p) on tropical homogeneous coordinates + ? Parameters: + :: ''​[[.:​common#​Polynomial |Polynomial]]<​[[.:​common#​TropicalNumber |TropicalNumber]]<​Addition%%>>​%%''​ ''​p'':​ A polynomial on affine coordinates. + :: ''​[[.:​common#​Int |Int]]''​ ''​chart'':​ The index of the homogenizing coordinate. 0 by default. + ? Returns: + :''​[[.:​tropical:​TropicalRationalFunction |TropicalRationalFunction]]''​ + ? from extension: + : [[:​external_software|bundled:​atint]] + ?  **''​rational_fct_from_affine_denominator([[.:​common#​String |String]] p, [[.:​common#​Int |Int]] chart)''​** + :: Same as ''​[[.:​tropical#​rational_fct_from_affine_denominator |rational_fct_from_affine_denominator]]''​(Polynomial),​ except that it takes a string which it converts to a tropical polynomial using ''​[[.:​common#​toTropicalPolynomial |toTropicalPolynomial]]''​. + ? Parameters: + :: ''​[[.:​common#​String |String]]''​ ''​p'':​ A string that will be converted to a tropical polynomial + :: ''​[[.:​common#​Int |Int]]''​ ''​chart'':​ The index of the homogenizing coordinate. 0 by default. + ? Returns: + :''​[[.:​tropical:​TropicalRationalFunction |TropicalRationalFunction]]''​ + ? from extension: + : [[:​external_software|bundled:​atint]] + + + ---- + {{anchor:​rational_fct_from_affine_numerator:​}} + ?  **''​rational_fct_from_affine_numerator([[.:​common#​Polynomial |Polynomial]]<​[[.:​common#​TropicalNumber |TropicalNumber]]<​Addition%%>>​%% p, [[.:​common#​Int |Int]] chart)''​** + :: This takes a tropical polynomial defined on tropical affine coordinates and turns it into  a rational function on tropical homogeneous coordinates + ? Parameters: + :: ''​[[.:​common#​Polynomial |Polynomial]]<​[[.:​common#​TropicalNumber |TropicalNumber]]<​Addition%%>>​%%''​ ''​p'':​ A polynomial on affine coordinates. + :: ''​[[.:​common#​Int |Int]]''​ ''​chart'':​ The index of the homogenizing coordinate. 0 by default. + ? Returns: + :''​[[.:​tropical:​TropicalRationalFunction |TropicalRationalFunction]]''​ + ? from extension: + : [[:​external_software|bundled:​atint]] + ?  **''​rational_fct_from_affine_numerator([[.:​common#​String |String]] p, [[.:​common#​Int |Int]] chart)''​** + :: Same as ''​[[.:​tropical#​rational_fct_from_affine_numerator |rational_fct_from_affine_numerator]]''​(Polynomial),​ except that it takes a string which it converts to a tropical polynomial using ''​[[.:​common#​toTropicalPolynomial |toTropicalPolynomial]]''​. + ? Parameters: + :: ''​[[.:​common#​String |String]]''​ ''​p'':​ A string that will be converted to a tropical polynomial + :: ''​[[.:​common#​Int |Int]]''​ ''​chart'':​ The index of the homogenizing coordinate. 0 by default. + ? Returns: + :''​[[.:​tropical:​TropicalRationalFunction |TropicalRationalFunction]]''​ + ? from extension: + : [[:​external_software|bundled:​atint]] + + + ---- + {{anchor:​tdehomog:​}} + ?  **''​tdehomog([[.:​common#​Matrix |Matrix]]<​[[.:​common#​Rational |Rational]]>​ A, [[.:​common#​Int |Int]] chart, [[.:​common#​Bool |Bool]] has_leading_coordinate)''​** + :: This is the inverse operation of thomog. It assumes a list of rays and vertices is given in tropical projective coordinates and returns a conversion into affine coordinates. + ? Parameters: + :: ''​[[.:​common#​Matrix |Matrix]]<​[[.:​common#​Rational |Rational]]>''​ ''​A'':​ The matrix. Can also be given as an anonymous array. + :: ''​[[.:​common#​Int |Int]]''​ ''​chart'':​ Optional. Indicates which coordinate should be shifted to 0. If there is a leading coordinate, the first column of the matrix ​ will remain untouched and the subsequent ones are numbered from 0. The default value for this is 0. + :: ''​[[.:​common#​Bool |Bool]]''​ ''​has_leading_coordinate'':​ Whether the matrix has a leading 1/0 to indicate whether a row is a vertex or a ray. In that case, this coordinate is not touched. This is true by default. + ? Returns: + :''​[[.:​common#​Matrix |Matrix]]<​[[.:​common#​Rational |Rational]]>''​ + ? Example: + :: Dehomogenize vector with leading coordinate by shifting entry at index 0 to 0 and forgetting it. + :: > print tdehomog([[1,​3,​5,​8]]);​ + 1 2 5 + ​ + ? Example: + :: Dehomogenize vector without leading coordinate by shifting entry at index 2 to 0 and forgetting it. + :: > print tdehomog([[2,​3,​4,​5]],​ 2, 0); + -2 -1 1 + ​ + + + ---- + {{anchor:​thomog:​}} + ?  **''​thomog([[.:​common#​Matrix |Matrix]]<​[[.:​common#​Rational |Rational]]>​ A, [[.:​common#​Int |Int]] chart, [[.:​common#​Bool |Bool]] has_leading_coordinate)''​** + :: Converts tropical affine to tropical projective coordinates. It takes a matrix of row vectors in R<​sup>​n-1​ and identifies the latter with R<​sup>​n​ mod (1,..,1) by assuming a certain coordinate has been set to 0. I.e. it will return the matrix with a 0 column inserted at the position indicated by chart + ? Parameters: + :: ''​[[.:​common#​Matrix |Matrix]]<​[[.:​common#​Rational |Rational]]>''​ ''​A'':​ The matrix. Can also be given as an anonymous perl array reference. + :: ''​[[.:​common#​Int |Int]]''​ ''​chart'':​ Optional. Indicates, which coordinate of R<​sup>​n​ mod (1,..,1) should be set to 0 to identify it with R<​sup>​n-1​. Note that if there is a leading coordinate, ​ the first column is supposed to contain the 1/​0-coordinate indicating whether a row is a vertex or a ray and the remaining coordinates are then labelled 0,..,n-1. This option is 0 by default. + :: ''​[[.:​common#​Bool |Bool]]''​ ''​has_leading_coordinate'':​ Optional. Whether the matrix has a leading 1/0 to indicate whether a row is a vertex or a ray. In that case, this coordinate is not touched. This is true by default. + ? Returns: + :''​[[.:​common#​Matrix |Matrix]]<​[[.:​common#​Rational |Rational]]>''​ + ? Example: + :: Homogenize vectors with leading coordinate by inserting a 0-entry at index 0. + :: > print thomog([[1,​3,​4],​[0,​5,​6]]);​ + 1 0 3 4 + 0 0 5 6 + ​ + ? Example: + :: Homogenize a vector without leading coordinate by inserting a 0-entry at index 2. + :: > print thomog([[2,​3,​4]],​ 2, 0); + 2 3 0 4 + ​ + + + ---- + + ==== Basic polyhedral operations ==== + These functions provide basic functionality related to polyhedral geometry, but not necessarily to tropical geometry + ---- + {{anchor:​affine_transform:​}} + ?  **''​affine_transform([[.:​tropical:​Cycle |Cycle]]<​Addition>​ C, [[.:​common#​Matrix |Matrix]]<​[[.:​common#​Rational |Rational]]>​ M, [[.:​common#​Vector |Vector]]<​[[.:​common#​Rational |Rational]]>​ T)''​** + :: Computes the affine transform of a cycle under an affine linear map. This function assumes that the map is a lattice isomorphism on the cycle, i.e. no push-forward computations are performed, in particular the weights remain unchanged + ? Parameters: + :: ''​[[.:​tropical:​Cycle |Cycle]]<​Addition>''​ ''​C'':​ a tropical cycle + :: ''​[[.:​common#​Matrix |Matrix]]<​[[.:​common#​Rational |Rational]]>''​ ''​M'':​ The transformation matrix. Should be given in tropical projective coordinates and be homogeneous,​ i.e. the sum over all rows should be the same. + :: ''​[[.:​common#​Vector |Vector]]<​[[.:​common#​Rational |Rational]]>''​ ''​T'':​ The translate. Optional and zero vector by default. Should be given in tropical projective coordinates (but without leading coordinate for vertices or rays). If you only want to shift a cycle, use ''​[[.:​tropical#​shift_cycle |shift_cycle]]''​. + ? Returns: + :''​[[.:​tropical:​Cycle |Cycle]]<​Addition>''​ + ? from extension: + : [[:​external_software|bundled:​atint]] + ?  **''​affine_transform([[.:​tropical:​Cycle |Cycle]]<​Addition>​ C, [[.:​tropical:​Morphism |Morphism]]<​Addition>​ M)''​** + :: Computes the affine transform of a cycle under an affine linear map. This function assumes that the map is a lattice isomorphism on the cycle, i.e. no push-forward computations are performed, in particular the weights remain unchanged + ? Parameters: + :: ''​[[.:​tropical:​Cycle |Cycle]]<​Addition>''​ ''​C'':​ a tropical cycle + :: ''​[[.:​tropical:​Morphism |Morphism]]<​Addition>''​ ''​M'':​ A morphism. Should be defined via ''​[[.:​tropical:​Morphism#​MATRIX |MATRIX]]''​ and ''​[[.:​tropical:​Morphism#​TRANSLATE |TRANSLATE]]'',​ though its ''​[[.:​tropical:​TropicalRationalFunction#​DOMAIN |DOMAIN]]''​ will be ignored. + ? Returns: + :''​[[.:​tropical:​Cycle |Cycle]]<​Addition>''​ + ? from extension: + : [[:​external_software|bundled:​atint]] + + + ---- + {{anchor:​cartesian_product:​}} + ?  **''​cartesian_product([[.:​tropical:​Cycle |Cycle]] cycles)''​** + :: Computes the cartesian product of a set of cycles. If any of them has weights, so will the product (all non-weighted cycles will be treated as if they had constant weight 1) + ? Parameters: + :: ''​[[.:​tropical:​Cycle |Cycle]]''​ ''​cycles'':​ a list of Cycles + ? Returns: + :''​[[.:​tropical:​Cycle |Cycle]]''​ + ? from extension: + : [[:​external_software|bundled:​atint]] + + + ---- + {{anchor:​check_cycle_equality:​}} + ?  **''​check_cycle_equality([[.:​tropical:​Cycle |Cycle]]<​Addition>​ X, [[.:​tropical:​Cycle |Cycle]]<​Addition>​ Y, [[.:​common#​Bool |Bool]] check_weights)''​** + :: This takes two pure-dimensional polyhedral complexes and checks if they are equal i.e. if they have the same lineality space, the same rays (modulo lineality space) and the same cones. Optionally, it can also check if the weights are equal + ? Parameters: + :: ''​[[.:​tropical:​Cycle |Cycle]]<​Addition>''​ ''​X'':​ A weighted complex + :: ''​[[.:​tropical:​Cycle |Cycle]]<​Addition>''​ ''​Y'':​ A weighted complex + :: ''​[[.:​common#​Bool |Bool]]''​ ''​check_weights'':​ Whether the algorithm should check for equality of weights. ​ This parameter is optional and true by default + ? Returns: + :''​[[.:​common#​Bool |Bool]]''​ + ? from extension: + : [[:​external_software|bundled:​atint]] + + + ---- + {{anchor:​coarsen:​}} + ?  **''​coarsen([[.:​tropical:​Cycle |Cycle]]<​Addition>​ complex, [[.:​common#​Bool |Bool]] testFan)''​** + :: Takes a tropical variety on which a coarsest polyhedral structure exists and computes this structure. + ? Parameters: + :: ''​[[.:​tropical:​Cycle |Cycle]]<​Addition>''​ ''​complex'':​ A tropical variety which has a unique ​ coarsest polyhedral structre ​ + :: ''​[[.:​common#​Bool |Bool]]''​ ''​testFan'':​ (Optional, FALSE by default). Whether the algorithm should perform some consistency ​ checks on the result. If true, it will check the following: ​ + - That equivalence classes of cones have convex support + - That all equivalence classes have the same lineality space + .. If any condition is violated, the algorithm throws an exception Note that it does not check whether equivalence classes form a fan This can be done via ''​[[.:​fan#​check_fan |check_fan]]''​ afterwards, but it is potentially slow. + ? Returns: + :''​[[.:​tropical:​Cycle |Cycle]]<​Addition>''​ + ? from extension: + : [[:​external_software|bundled:​atint]] + + + ---- + {{anchor:​contains_point:​}} + ?  **''​contains_point([[.:​tropical:​Cycle |Cycle]] A, [[.:​common#​Vector |Vector]]<​[[.:​common#​Rational |Rational]]>​ point)''​** + :: Takes a weighted complex and a point and computed whether that point lies in  the complex + ? Parameters: + :: ''​[[.:​tropical:​Cycle |Cycle]]''​ ''​A'':​ weighted complex + :: ''​[[.:​common#​Vector |Vector]]<​[[.:​common#​Rational |Rational]]>''​ ''​point'':​ An arbitrary vector in the same ambient dimension as complex. Given in tropical projective coordinates with leading coordinate. + ? Returns: + :''​[[.:​common#​Bool |Bool]]''​ + ? from extension: + : [[:​external_software|bundled:​atint]] + + + ---- + {{anchor:​fan_decomposition:​}} + ?  **''​fan_decomposition([[.:​tropical:​Cycle |Cycle]]<​Addition>​ C)''​** + :: This computes the local fans at all (nonfar) vertices of a tropical cycle + ? Parameters: + :: ''​[[.:​tropical:​Cycle |Cycle]]<​Addition>''​ ''​C'':​ A tropical cycle + ? Returns: + :''​[[.:​tropical:​Cycle |Cycle]]<​Addition>''​ + ? from extension: + : [[:​external_software|bundled:​atint]] + + + ---- + {{anchor:​insert_rays:​}} + ?  **''​insert_rays([[.:​tropical:​Cycle |Cycle]]<​Addition>​ F, [[.:​common#​Matrix |Matrix]]<​[[.:​common#​Rational |Rational]]>​ R)''​** + :: Takes a cycle and a list of rays/​vertices in tropical projective coordinates with leading coordinate and triangulates the fan such that it contains these rays + ? Parameters: + :: ''​[[.:​tropical:​Cycle |Cycle]]<​Addition>''​ ''​F'':​ A cycle (not necessarily weighted). + :: ''​[[.:​common#​Matrix |Matrix]]<​[[.:​common#​Rational |Rational]]>''​ ''​R'':​ A list of normalized vertices or rays Note that the function will NOT subdivide the lineality space, i.e. rays that are  equal to an existing ray modulo lineality space will be ignored. + ? Returns: + :''​[[.:​tropical:​Cycle |Cycle]]<​Addition>''​ + ? from extension: + : [[:​external_software|bundled:​atint]] + + + ---- + {{anchor:​intersect_container:​}} + ?  **''​intersect_container([[.:​tropical:​Cycle |Cycle]] cycle, [[.:​tropical:​Cycle |Cycle]] container, [[.:​common#​Bool |Bool]] forceLatticeComputation)''​** + :: Takes two Cycles and computes the intersection of both. The function relies on the fact that the second cycle contains the first cycle to  compute the refinement correctly The function copies ''​[[.:​tropical:​Cycle#​WEIGHTS |WEIGHTS]]'',​ ''​[[.:​tropical:​Cycle#​LATTICE_BASES |LATTICE_BASES]]''​ and ''​[[.:​tropical:​Cycle#​LATTICE_GENERATORS |LATTICE_GENERATORS]]''​ in the obvious manner if they exist. + ? Parameters: + :: ''​[[.:​tropical:​Cycle |Cycle]]''​ ''​cycle'':​ An arbitrary Cycle + :: ''​[[.:​tropical:​Cycle |Cycle]]''​ ''​container'':​ A cycle containing the first one (as a set) Doesn'​t need to have any weights and its tropical addition is irrelevant. + :: ''​[[.:​common#​Bool |Bool]]''​ ''​forceLatticeComputation'':​ Whether the properties ''​[[.:​tropical:​Cycle#​LATTICE_BASES |LATTICE_BASES]]''​ and ''​[[.:​tropical:​Cycle#​LATTICE_GENERATORS |LATTICE_GENERATORS]]''​ of cycle should be computed before refining. False by default. + ? Returns: + :''​[[.:​tropical:​Cycle |Cycle]]''​ + ? from extension: + : [[:​external_software|bundled:​atint]] + + + ---- + {{anchor:​recession_fan:​}} + ?  **''​recession_fan([[.:​tropical:​Cycle |Cycle]] complex)''​** + :: Computes the recession fan of a tropical variety. WARNING: This is a highly experimental function. If it works at all, it is likely to take a very long time for larger objects. + ? Parameters: + :: ''​[[.:​tropical:​Cycle |Cycle]]''​ ''​complex'':​ A tropical variety + ? Returns: + :''​[[.:​tropical:​Cycle |Cycle]]''​ + ? from extension: + : [[:​external_software|bundled:​atint]] + + + ---- + {{anchor:​set_theoretic_intersection:​}} + ?  **''​set_theoretic_intersection([[.:​tropical:​Cycle |Cycle]] A, [[.:​tropical:​Cycle |Cycle]] B)''​** + :: Computes the set-theoretic intersection of two cycles and returns it as a polyhedral complex. The cycles need not use the same tropical addition + ? Parameters: + :: ''​[[.:​tropical:​Cycle |Cycle]]''​ ''​A''​ + :: ''​[[.:​tropical:​Cycle |Cycle]]''​ ''​B''​ + ? Returns: + :''​[[.:​fan:​PolyhedralComplex |PolyhedralComplex]]''​ + ? from extension: + : [[:​external_software|bundled:​atint]] + + + ---- + {{anchor:​shift_cycle:​}} + ?  **''​shift_cycle([[.:​tropical:​Cycle |Cycle]]<​Addition>​ C, [[.:​common#​Vector |Vector]]<​[[.:​common#​Rational |Rational]]>​ T)''​** + :: Computes the shift of a tropical cycle by a given vector + ? Parameters: + :: ''​[[.:​tropical:​Cycle |Cycle]]<​Addition>''​ ''​C'':​ a tropical cycle + :: ''​[[.:​common#​Vector |Vector]]<​[[.:​common#​Rational |Rational]]>''​ ''​T'':​ The translate. Optional and zero vector by default. Should be given in tropical projective coordinates (but without leading coordinate for vertices or rays). + ? Returns: + :''​[[.:​tropical:​Cycle |Cycle]]<​Addition>''​ + ? from extension: + : [[:​external_software|bundled:​atint]] + + + ---- + {{anchor:​skeleton_complex:​}} + ?  **''​skeleton_complex([[.:​tropical:​Cycle |Cycle]]<​Addition>​ C, [[.:​common#​Int |Int]] k, [[.:​common#​Bool |Bool]] preserveRays)''​** + :: Takes a polyhedral complex and computes the k-skeleton. Will return an empty cycle, ​ if k is larger then the dimension of the given complex or smaller than 0. + ? Parameters: + :: ''​[[.:​tropical:​Cycle |Cycle]]<​Addition>''​ ''​C'':​ A polyhedral complex. + :: ''​[[.:​common#​Int |Int]]''​ ''​k'':​ The dimension of the skeleton that should be computed + :: ''​[[.:​common#​Bool |Bool]]''​ ''​preserveRays'':​ When true, the function assumes that all rays of the fan remain in the k-skeleton, so it just copies the VERTICES, instead of computing an irredundant list. By default, this property is false. + ? Returns: + :''​[[.:​tropical:​Cycle |Cycle]]<​Addition>''​ + ? from extension: + : [[:​external_software|bundled:​atint]] + + + ---- + {{anchor:​triangulate_cycle:​}} + ?  **''​triangulate_cycle([[.:​tropical:​Cycle |Cycle]]<​Addition>​ F)''​** + :: Takes a cycle and computes a triangulation + ? Parameters: + :: ''​[[.:​tropical:​Cycle |Cycle]]<​Addition>''​ ''​F'':​ A cycle (not necessarily weighted) + ? Returns: + :''​[[.:​tropical:​Cycle |Cycle]]<​Addition>''​ + ? from extension: + : [[:​external_software|bundled:​atint]] + + + ---- + + ==== Conversion of tropical addition ==== + These functions deal with the conversion of tropical objects between Min and Max. + ---- + {{anchor:​dual_addition_version:​}} + ?  **''​dual_addition_version([[.:​tropical:​Polytope |Polytope]]<​Addition,​Scalar>​ polytope, [[.:​common#​Bool |Bool]] strong_conversion)''​** + :: This function takes a tropical polytope and returns a tropical polytope that uses the opposite tropical addition. By default, the signs of the ''​[[.:​tropical:​Polytope#​POINTS |POINTS]]''​ are inverted. + ? Parameters: + :: ''​[[.:​tropical:​Polytope |Polytope]]<​Addition,​Scalar>''​ ''​polytope''​ + :: ''​[[.:​common#​Bool |Bool]]''​ ''​strong_conversion'':​ This is optional and TRUE by default. It indicates, whether the signs of the vertices should be inverted. + ? Returns: + :''​[[.:​tropical:​Polytope |Polytope]]''​ + ?  **''​dual_addition_version([[.:​common#​TropicalNumber |TropicalNumber]]<​Addition,​Scalar>​ number, [[.:​common#​Bool |Bool]] strong_conversion)''​** + :: This function takes a tropical number and returns a tropical number that  uses the opposite tropical addition. By default, the sign is inverted. + ? Parameters: + :: ''​[[.:​common#​TropicalNumber |TropicalNumber]]<​Addition,​Scalar>''​ ''​number''​ + :: ''​[[.:​common#​Bool |Bool]]''​ ''​strong_conversion'':​ This is optional and TRUE by default. It indicates, whether the sign of the number should be inverted. + ? Returns: + :''​[[.:​common#​TropicalNumber |TropicalNumber]]''​ + ?  **''​dual_addition_version([[.:​common#​Vector |Vector]]<​[[.:​common#​TropicalNumber |TropicalNumber]]<​Addition,​Scalar%%>>​%% vector, [[.:​common#​Bool |Bool]] strong_conversion)''​** + :: This function takes a vector of tropical numbers and returns a vector that  uses the opposite tropical addition. By default, the signs of the entries are inverted. + ? Parameters: + :: ''​[[.:​common#​Vector |Vector]]<​[[.:​common#​TropicalNumber |TropicalNumber]]<​Addition,​Scalar%%>>​%%''​ ''​vector''​ + :: ''​[[.:​common#​Bool |Bool]]''​ ''​strong_conversion'':​ This is optional and TRUE by default. It indicates, whether the signs of the entries should be inverted. + ? Returns: + :''​[[.:​common#​Vector |Vector]]<​[[.:​common#​TropicalNumber |TropicalNumber]]>''​ + ?  **''​dual_addition_version([[.:​common#​Matrix |Matrix]]<​[[.:​common#​TropicalNumber |TropicalNumber]]<​Addition,​Scalar%%>>​%% matrix, [[.:​common#​Bool |Bool]] strong_conversion)''​** + :: This function takes a matrix of tropical numbers and returns a matrix that  uses the opposite tropical addition. By default, the signs of the entries are inverted. + ? Parameters: + :: ''​[[.:​common#​Matrix |Matrix]]<​[[.:​common#​TropicalNumber |TropicalNumber]]<​Addition,​Scalar%%>>​%%''​ ''​matrix''​ + :: ''​[[.:​common#​Bool |Bool]]''​ ''​strong_conversion'':​ This is optional and TRUE by default. It indicates, whether the signs of the entries should be inverted. + ? Returns: + :''​[[.:​common#​Matrix |Matrix]]<​[[.:​common#​TropicalNumber |TropicalNumber]]>''​ + ?  **''​dual_addition_version([[.:​common#​Polynomial |Polynomial]]<​[[.:​common#​TropicalNumber |TropicalNumber]]<​Addition,​Scalar%%>>​%% polynomial, [[.:​common#​Bool |Bool]] strong_conversion)''​** + :: This function takes a tropical polynomial and returns a tropical polynomial that  uses the opposite tropical addition. By default, the signs of the coefficients are inverted. + ? Parameters: + :: ''​[[.:​common#​Polynomial |Polynomial]]<​[[.:​common#​TropicalNumber |TropicalNumber]]<​Addition,​Scalar%%>>​%%''​ ''​polynomial''​ + :: ''​[[.:​common#​Bool |Bool]]''​ ''​strong_conversion'':​ This is optional and TRUE by default. It indicates, whether the signs of the coefficients should be inverted. + ? Returns: + :''​[[.:​common#​Polynomial |Polynomial]]<​[[.:​common#​TropicalNumber |TropicalNumber]]>''​ + ?  **''​dual_addition_version([[.:​tropical:​Cycle |Cycle]]<​Addition>​ cycle, [[.:​common#​Bool |Bool]] strong_conversion)''​** + :: This function takes a tropical cycle and returns a tropical cycle that  uses the opposite tropical addition. By default, the signs of the vertices are inverted. + ? Parameters: + :: ''​[[.:​tropical:​Cycle |Cycle]]<​Addition>''​ ''​cycle''​ + :: ''​[[.:​common#​Bool |Bool]]''​ ''​strong_conversion'':​ This is optional and TRUE by default. It indicates, whether the signs of the vertices should be inverted. + ? Returns: + :''​[[.:​tropical:​Cycle |Cycle]]''​ + ? Example: + :: This first creates the standard tropical min-line with apex (0:1:1) in the 3-torus, and then computes from it the corresponding max-cycle - in this case the standard max-line with apex (0:-1:-1), and assigns it to the variable $new_cycle. + :: >$cycle = new Hypersurface<​Min>​(POLYNOMIAL=>​toTropicalPolynomial("​min(a,​b-1,​c-1)"​));​ + > $new_cycle = dual_addition_version($cycle);​ + ​ + ?  **''​dual_addition_version([[.:​tropical:​MatroidRingCycle |MatroidRingCycle]]<​Addition>​ M)''​** + :: Takes a MatroidRingCycle and converts it to the dual tropical addition + ? Parameters: + :: ''​[[.:​tropical:​MatroidRingCycle |MatroidRingCycle]]<​Addition>''​ ''​M''​ + ? Returns: + :''​[[.:​tropical:​MatroidRingCycle |MatroidRingCycle]]''​ + ? from extension: + : [[:​external_software|bundled:​atint]] + + + ---- + + ==== Creation function for specific morphisms and functions ==== + These functions create specific morphisms and functions. + ---- + {{anchor:​projection_map:​}} + ?  **''​projection_map<​Addition>​([[.:​common#​Int |Int]] n, [[.:​common#​Set |Set]]<​[[.:​common#​Int |Int]]> s)''​** + :: This creates a linear projection from the projective torus of dimension n to a given set of coordinates. ​ + ? Type Parameters: + :: ''​Addition'':​ Min or Max + ? Parameters: + :: ''​[[.:​common#​Int |Int]]''​ ''​n'':​ The dimension of the projective torus which is the domain of the projection. + :: ''​[[.:​common#​Set |Set]]<​[[.:​common#​Int |Int]]>''​ ''​s'':​ The set of coordinaes to which the map should project. Should be a subset of (0,..,n) + ? Returns: + :''​[[.:​tropical:​Morphism |Morphism]]<​Addition>''​ + ? from extension: + : [[:​external_software|bundled:​atint]] + ?  **''​projection_map([[.:​common#​Int |Int]] n, [[.:​common#​Int |Int]] m)''​** + :: This computes the projection from a projective torus of given dimension to a projective torus of lower dimension which lives on the first coordinates + ? Parameters: + :: ''​[[.:​common#​Int |Int]]''​ ''​n'':​ The dimension of the larger torus + :: ''​[[.:​common#​Int |Int]]''​ ''​m'':​ The dimension of the smaller torus + ? Returns: + :''​[[.:​tropical:​Morphism |Morphism]]''​ + ? from extension: + : [[:​external_software|bundled:​atint]] + + + ---- + + ==== Creation functions for specific cycles ==== + These functions are special +++ for creating special tropical cycles. + ---- + {{anchor:​affine_linear_space:​}} + ?  **''​affine_linear_space<​Addition>​([[.:​common#​Matrix |Matrix]]<​[[.:​common#​Rational |Rational]]>​ lineality, [[.:​common#​Vector |Vector]]<​[[.:​common#​Rational |Rational]]>​ translate, [[.:​common#​Integer |Integer]] weight)''​** + :: This creates a true affine linear space. + ? Type Parameters: + :: ''​Addition'':​ Min or Max + ? Parameters: + :: ''​[[.:​common#​Matrix |Matrix]]<​[[.:​common#​Rational |Rational]]>''​ ''​lineality'':​ (Row) generators of the lineality space, in tropical homogeneous coordinates,​ but without the leading zero + :: ''​[[.:​common#​Vector |Vector]]<​[[.:​common#​Rational |Rational]]>''​ ''​translate'':​ Optional. The vertex of the space. By default this is the origin + :: ''​[[.:​common#​Integer |Integer]]''​ ''​weight'':​ Optional. The weight of the space. By default, this is 1. + ? Returns: + :''​[[.:​tropical:​Cycle |Cycle]]<​Addition>''​ + ? from extension: + : [[:​external_software|bundled:​atint]] + + + ---- + {{anchor:​cross_variety:​}} + ?  **''​cross_variety<​Addition>​([[.:​common#​Int |Int]] n, [[.:​common#​Int |Int]] k, [[.:​common#​Rational |Rational]] h, [[.:​common#​Integer |Integer]] weight)''​** + :: This creates the k-skeleton of the tropical variety dual to the cross polytope + ? Type Parameters: + :: ''​Addition'':​ Min or Max + ? Parameters: + :: ''​[[.:​common#​Int |Int]]''​ ''​n'':​ The (projective) ambient dimension + :: ''​[[.:​common#​Int |Int]]''​ ''​k'':​ The (projective) dimension of the variety. + :: ''​[[.:​common#​Rational |Rational]]''​ ''​h'':​ Optional, 1 by default. It is a nonnegative number, describing the  height of the one interior lattice point of the cross polytope. ​ + :: ''​[[.:​common#​Integer |Integer]]''​ ''​weight'':​ Optional, 1 by default. The (global) weight of the variety + ? Returns: + :''​[[.:​tropical:​Cycle |Cycle]]<​Addition>''​ + ? from extension: + : [[:​external_software|bundled:​atint]] + + + ---- + {{anchor:​empty_cycle:​}} + ?  **''​empty_cycle<​Addition>​([[.:​common#​Int |Int]] ambient_dim)''​** + :: Creates the empty cycle in a given ambient dimension (i.e. it will set the property ''​[[.:​tropical:​Cycle#​PROJECTIVE_AMBIENT_DIM |PROJECTIVE_AMBIENT_DIM]]''​. + ? Type Parameters: + :: ''​Addition'':​ Max or Min + ? Parameters: + :: ''​[[.:​common#​Int |Int]]''​ ''​ambient_dim'':​ The ambient dimension + ? Returns: + :''​[[.:​tropical:​Cycle |Cycle]]''​ + ? from extension: + : [[:​external_software|bundled:​atint]] + + + ---- + {{anchor:​halfspace_subdivision:​}} + ?  **''​halfspace_subdivision<​Addition>​([[.:​common#​Rational |Rational]] a, [[.:​common#​Vector |Vector]]<​[[.:​common#​Rational |Rational]]>​ g, [[.:​common#​Integer |Integer]] w)''​** + :: Creates a subdivision of the tropical projective torus along an affine hyperplane into two halfspaces. This hyperplane is defined by an equation gx = a + ? Type Parameters: + :: ''​Addition'':​ Max or Min + ? Parameters: + :: ''​[[.:​common#​Rational |Rational]]''​ ''​a'':​ The constant coefficient of the equation + :: ''​[[.:​common#​Vector |Vector]]<​[[.:​common#​Rational |Rational]]>''​ ''​g'':​ The linear coefficients of the equation Note that the equation must be homogeneous in the sense that (1,..1) is in its kernel, i.e. all entries of g add up to 0. + :: ''​[[.:​common#​Integer |Integer]]''​ ''​w'':​ The (constant) weight this cycle should have + ? Returns: + :''​[[.:​tropical:​Cycle |Cycle]]''​ + ? from extension: + : [[:​external_software|bundled:​atint]] + + + ---- + {{anchor:​matroid_ring_cycle:​}} + ?  **''​matroid_ring_cycle<​Addition>​([[.:​matroid:​Matroid |Matroid]] M, [[.:​common#​Int |Int]] scale)''​** + :: This creates the cycle corresponding to a given matroid. It automatically computes its representation in the basis of nested matroids. This is equivalent to using the constructor of MatroidRingCycle. + ? Type Parameters: + :: ''​Addition'':​ The tropical addition. Either Min or Max. + ? Parameters: + :: ''​[[.:​matroid:​Matroid |Matroid]]''​ ''​M'':​ A matroid + :: ''​[[.:​common#​Int |Int]]''​ ''​scale'':​ An optional linear coefficient. The resulting cycle will be scale*B(M) in the ring of matroids. + ? Returns: + :''​[[.:​tropical:​MatroidRingCycle |MatroidRingCycle]]<​Addition>''​ + ? from extension: + : [[:​external_software|bundled:​atint]] + ? Example: + :: Computes the matroid ring cycle of the uniform matroid of rank 2 on 3 elements in two equivalent ways: + :: > $r = matroid_ring_cycle<​Max>​(matroid::​uniform_matroid(2,​3));​ + >$s = new MatroidRingCycle<​Max>​(matroid::​uniform_matroid(2,​3));​ + ​ + + + ---- + {{anchor:​orthant_subdivision:​}} + ?  **''​orthant_subdivision<​Addition>​([[.:​common#​Vector |Vector]]<​[[.:​common#​Rational |Rational]]>​ point, [[.:​common#​Int |Int]] chart, [[.:​common#​Integer |Integer]] weight)''​** + :: Creates the orthant subdivision around a given point on a given chart, i.e. the corresponding affine chart of this cycle consists of all 2^n fulldimensional orthants + ? Type Parameters: + :: ''​Addition'':​ Min or Max + ? Parameters: + :: ''​[[.:​common#​Vector |Vector]]<​[[.:​common#​Rational |Rational]]>''​ ''​point'':​ The vertex of the subdivision. Should be given in tropical homogeneous coordinates with leading coordinate. + :: ''​[[.:​common#​Int |Int]]''​ ''​chart'':​ On which chart the cones should be orthants, 0 by default. + :: ''​[[.:​common#​Integer |Integer]]''​ ''​weight'':​ The constant weight of the cycle, 1 by default. + ? from extension: + : [[:​external_software|bundled:​atint]] + + + ---- + {{anchor:​point_collection:​}} + ?  **''​point_collection<​Addition>​([[.:​common#​Matrix |Matrix]]<​[[.:​common#​Rational |Rational]]>​ points, [[.:​common#​Vector |Vector]]<​[[.:​common#​Integer |Integer]]>​ weights)''​** + :: Creates a cycle consisting of a collection of points with given weights + ? Type Parameters: + :: ''​Addition'':​ Max or Min + ? Parameters: + :: ''​[[.:​common#​Matrix |Matrix]]<​[[.:​common#​Rational |Rational]]>''​ ''​points'':​ The points, in tropical homogeneous coordinates (though not with leading ones for vertices). + :: ''​[[.:​common#​Vector |Vector]]<​[[.:​common#​Integer |Integer]]>''​ ''​weights'':​ The list of weights for the points + ? Returns: + :''​[[.:​tropical:​Cycle |Cycle]]''​ + ? from extension: + : [[:​external_software|bundled:​atint]] + + + ---- + {{anchor:​projective_torus:​}} + ?  **''​projective_torus<​Addition>​([[.:​common#​Int |Int]] n, [[.:​common#​Integer |Integer]] w)''​** + :: Creates the tropical projective torus of a given dimension. In less fancy words, the cycle is the complete complex of given (tropical projective) dimension n, i.e. R<​sup>​n​ + ? Type Parameters: + :: ''​Addition'':​ Max or Min. + ? Parameters: + :: ''​[[.:​common#​Int |Int]]''​ ''​n'':​ The tropical projective dimension. + :: ''​[[.:​common#​Integer |Integer]]''​ ''​w'':​ The weight of the cycle. Optional and 1 by default. + ? Returns: + :''​[[.:​tropical:​Cycle |Cycle]]''​ + ? from extension: + : [[:​external_software|bundled:​atint]] + + + ---- + {{anchor:​uniform_linear_space:​}} + ?  **''​uniform_linear_space<​Addition>​([[.:​common#​Int |Int]] n, [[.:​common#​Int |Int]] k, [[.:​common#​Integer |Integer]] weight)''​** + :: Creates the linear space of the uniform matroid of rank k+1 on n+1 variables. + ? Type Parameters: + :: ''​Addition'':​ A The tropical addition (min or max) + ? Parameters: + :: ''​[[.:​common#​Int |Int]]''​ ''​n'':​ The ambient (projective) dimension. + :: ''​[[.:​common#​Int |Int]]''​ ''​k'':​ The (projective dimension of the fan. + :: ''​[[.:​common#​Integer |Integer]]''​ ''​weight'':​ The global weight of the cycle. 1 by default. + ? Returns: + :''​[[.:​tropical:​Cycle |Cycle]]''​ + ? from extension: + : [[:​external_software|bundled:​atint]] + + + ---- + + ==== Degeneracy tests ==== + These functions test cycles for degeneracy, i.e. whether a cycle is the empty cycle + ---- + {{anchor:​is_empty:​}} + ?  **''​is_empty''​** + :: This tests wheter a cycle is the empty cycle. + ? from extension: + : [[:​external_software|bundled:​atint]] + + + ---- + + ==== Divisor computation ==== + These functions deal with the computation of divisors + ---- + {{anchor:​divisor:​}} + ?  **''​divisor([[.:​tropical:​Cycle |Cycle]] C, [[.:​tropical:​TropicalRationalFunction |TropicalRationalFunction]] F)''​** + :: This function computes the divisor of one or more rational functions on a tropical cycle. + ? Parameters: + :: ''​[[.:​tropical:​Cycle |Cycle]]''​ ''​C'':​ A tropical cycle + :: ''​[[.:​tropical:​TropicalRationalFunction |TropicalRationalFunction]]''​ ''​F'':​ An arbitrary list of rational functions (r_1,​...r_n). The ''​[[.:​tropical:​TropicalRationalFunction#​DOMAIN |DOMAIN]]''​ of r_i should contain the support of r_{i-1} * ... * r_1 * C. Note that using the ^-operator on these rational functions is allowed and will result in applying the corresponding function several times. + ? Returns: + :''​[[.:​tropical:​Cycle |Cycle]]''​ + ? from extension: + : [[:​external_software|bundled:​atint]] + + + ---- + {{anchor:​divisor_nr:​}} + ?  **''​divisor_nr([[.:​tropical:​Cycle |Cycle]] C, [[.:​tropical:​TropicalRationalFunction |TropicalRationalFunction]] F)''​** + :: This function computes the divisor of one or more rational functions on a tropical cycle. It should only be called, if the ''​[[.:​tropical:​TropicalRationalFunction#​DOMAIN |DOMAIN]]''​ of all occuring cycles is the cycle itself. ​ This function will be faster than ''​[[.:​tropical#​divisor |divisor]]'',​ since it computes no refinements. + ? Parameters: + :: ''​[[.:​tropical:​Cycle |Cycle]]''​ ''​C'':​ A tropical cycle + :: ''​[[.:​tropical:​TropicalRationalFunction |TropicalRationalFunction]]''​ ''​F'':​ An arbitrary list of rational functions (r_1,​...r_n). The ''​[[.:​tropical:​TropicalRationalFunction#​DOMAIN |DOMAIN]]''​ of each function should be equal (in terms of ''​[[.:​fan:​PolyhedralComplex#​VERTICES |VERTICES]]''​ and ''​[[.:​fan:​PolyhedralComplex#​MAXIMAL_POLYTOPES |MAXIMAL_POLYTOPES]]''​) to the cycle. Note that using the ^-operator on these rational functions is allowed and will result in  applying the corresponding function several times. + ? Returns: + :''​[[.:​tropical:​Cycle |Cycle]]''​ + ? from extension: + : [[:​external_software|bundled:​atint]] + + + ---- + {{anchor:​piecewise_divisor:​}} + ?  **''​piecewise_divisor([[.:​tropical:​Cycle |Cycle]]<​Addition>​ F, [[.:​common#​IncidenceMatrix |IncidenceMatrix]] cones, [[.:​common#​Vector |Vector]]<​[[.:​common#​Integer |Integer]]>​ coefficients)''​** + :: Computes a divisor of a linear sum of certain piecewise polynomials on a simplicial fan. + ? Parameters: + :: ''​[[.:​tropical:​Cycle |Cycle]]<​Addition>''​ ''​F'':​ A simplicial fan without lineality space in non-homogeneous coordinates + :: ''​[[.:​common#​IncidenceMatrix |IncidenceMatrix]]''​ ''​cones'':​ A list of cones of F (not maximal, but all of the same  dimension). Each cone t corresponds to a piecewise polynomial psi_t, defined by  subsequently applying the rational functions that are 1 one exactly one ray of t and  0 elsewhere. ​ Note that cones should refer to indices in ''​[[.:​tropical:​Cycle#​SEPARATED_VERTICES |SEPARATED_VERTICES]]'',​ which may have a different order + :: ''​[[.:​common#​Vector |Vector]]<​[[.:​common#​Integer |Integer]]>''​ ''​coefficients'':​ A list of coefficients a_t corresponding to the  cones. ​ + ? Returns: + :''​[[.:​tropical:​Cycle |Cycle]]<​Addition>''​ + ? from extension: + : [[:​external_software|bundled:​atint]] + + + ---- + + ==== Hurwitz cycles ==== + These functions deal with the creation and study of tropical Hurwitz cycles. + ---- + {{anchor:​hurwitz_cycle:​}} + ?  **''​hurwitz_cycle<​Addition>​([[.:​common#​Int |Int]] k, [[.:​common#​Vector |Vector]]<​[[.:​common#​Int |Int]]> degree, [[.:​common#​Vector |Vector]]<​[[.:​common#​Rational |Rational]]>​ points)''​** + :: This function computes the Hurwitz cycle H_k(x), x = (x_1,​...,​x_n) + ? Type Parameters: + :: ''​Addition'':​ Min or Max, where the coordinates live. + ? Parameters: + :: ''​[[.:​common#​Int |Int]]''​ ''​k'':​ The dimension of the Hurwitz cycle, i.e. the number of moving vertices + :: ''​[[.:​common#​Vector |Vector]]<​[[.:​common#​Int |Int]]>''​ ''​degree'':​ The degree x. Should add up to 0 + :: ''​[[.:​common#​Vector |Vector]]<​[[.:​common#​Rational |Rational]]>''​ ''​points'':​ Optional. Should have length n-3-k. Gives the images of  the fixed vertices (besides 0). If not given all fixed vertices are mapped to 0 and the function computes the recession fan of H_k(x) + ? Options: + : + :: ''​[[.:​common#​Bool |Bool]]''​ ''​Verbose'':​ If true, the function outputs some progress information. True by default. + ? Returns: + :''​[[.:​tropical:​Cycle |Cycle]]<​Addition>''​ + ? from extension: + : [[:​external_software|bundled:​atint]] + + + ---- + {{anchor:​hurwitz_marked_cycle:​}} + ?  **''​hurwitz_marked_cycle<​Addition>​([[.:​common#​Int |Int]] k, [[.:​common#​Vector |Vector]]<​[[.:​common#​Int |Int]]> degree, [[.:​common#​Vector |Vector]]<​[[.:​common#​Rational |Rational]]>​ pullback_points)''​** + :: Computes the marked k-dimensional tropical Hurwitz cycle H_k(degree) + ? Type Parameters: + :: ''​Addition'':​ Min or Max + ? Parameters: + :: ''​[[.:​common#​Int |Int]]''​ ''​k'':​ The dimension of the Hurwitz cycle + :: ''​[[.:​common#​Vector |Vector]]<​[[.:​common#​Int |Int]]>''​ ''​degree'':​ The degree of the covering. The sum over all entries should ​ be 0 and if n := degree.dim, then 0 <= k <= n-3 + :: ''​[[.:​common#​Vector |Vector]]<​[[.:​common#​Rational |Rational]]>''​ ''​pullback_points'':​ The points p_i that should be pulled back to  determine the Hurwitz cycle (in addition to 0). Should have length n-3-k. If it is not given, ​ all p_i are by default equal to 0 (same for missing points) + ? Returns: + :''​[[.:​tropical:​Cycle |Cycle]]<​Addition>''​ + ? from extension: + : [[:​external_software|bundled:​atint]] + + + ---- + {{anchor:​hurwitz_pair:​}} + ?  **''​hurwitz_pair<​Addition>​([[.:​common#​Int |Int]] k, [[.:​common#​Vector |Vector]]<​[[.:​common#​Int |Int]]> degree, [[.:​common#​Vector |Vector]]<​[[.:​common#​Rational |Rational]]>​ points)''​** + :: This function computes hurwitz_subdivision and hurwitz_cycle at the same time,  returning the result in an array + ? Type Parameters: + :: ''​Addition'':​ Min or Max, where the coordinates live. + ? Parameters: + :: ''​[[.:​common#​Int |Int]]''​ ''​k'':​ The dimension of the Hurwitz cycle, i.e. the number of moving vertices + :: ''​[[.:​common#​Vector |Vector]]<​[[.:​common#​Int |Int]]>''​ ''​degree'':​ The degree x. Should add up to 0 + :: ''​[[.:​common#​Vector |Vector]]<​[[.:​common#​Rational |Rational]]>''​ ''​points'':​ Optional. Should have length n-3-k. Gives the images of  the fixed vertices (besides 0). If not given all fixed vertices are mapped to 0 and the function computes the subdivision of M_0,n containing the recession fan of H_k(x) + ? Options: + : + :: ''​[[.:​common#​Bool |Bool]]''​ ''​Verbose'':​ If true, the function outputs some progress information. True by default. + ? Returns: + :''​[[.:​common#​List |List]]''​ + ? from extension: + : [[:​external_software|bundled:​atint]] + + + ---- + {{anchor:​hurwitz_pair_local:​}} + ?  **''​hurwitz_pair_local<​Addition>​([[.:​common#​Int |Int]] k, [[.:​common#​Vector |Vector]]<​[[.:​common#​Int |Int]]> degree, [[.:​tropical:​RationalCurve |RationalCurve]] local_curve)''​** + :: Does the same as hurwitz_pair,​ except that no points are given and the user can give a  RationalCurve object representing a ray. If given, the computation will be performed locally around the ray. + ? Type Parameters: + :: ''​Addition'':​ Min or Max, where the coordinates live. + ? Parameters: + :: ''​[[.:​common#​Int |Int]]''​ ''​k''​ + :: ''​[[.:​common#​Vector |Vector]]<​[[.:​common#​Int |Int]]>''​ ''​degree''​ + :: ''​[[.:​tropical:​RationalCurve |RationalCurve]]''​ ''​local_curve''​ + ? Options: + : + :: ''​[[.:​common#​Bool |Bool]]''​ ''​Verbose'':​ If true, the function outputs some progress information. True by default. + ? from extension: + : [[:​external_software|bundled:​atint]] + + + ---- + {{anchor:​hurwitz_subdivision:​}} + ?  **''​hurwitz_subdivision<​Addition>​([[.:​common#​Int |Int]] k, [[.:​common#​Vector |Vector]]<​[[.:​common#​Int |Int]]> degree, [[.:​common#​Vector |Vector]]<​[[.:​common#​Rational |Rational]]>​ points)''​** + :: This function computes a subdivision of M_0,n containing the Hurwitz cycle H_k(x), x = (x_1,​...,​x_n) as a subfan. If k = n-4, this subdivision is the unique coarsest subdivision fulfilling this property + ? Type Parameters: + :: ''​Addition'':​ Min or Max, where the coordinates live. + ? Parameters: + :: ''​[[.:​common#​Int |Int]]''​ ''​k'':​ The dimension of the Hurwitz cycle, i.e. the number of moving vertices + :: ''​[[.:​common#​Vector |Vector]]<​[[.:​common#​Int |Int]]>''​ ''​degree'':​ The degree x. Should add up to 0 + :: ''​[[.:​common#​Vector |Vector]]<​[[.:​common#​Rational |Rational]]>''​ ''​points'':​ Optional. Should have length n-3-k. Gives the images of  the fixed vertices (besides the first one, which always goes to 0) as elements of R. If not given, all fixed vertices are mapped to 0 and the function computes the subdivision of M_0,n containing the recession fan of H_k(x) + ? Options: + : + :: ''​[[.:​common#​Bool |Bool]]''​ ''​Verbose'':​ If true, the function outputs some progress information. True by default. + ? Returns: + :''​[[.:​tropical:​Cycle |Cycle]]''​ + ? from extension: + : [[:​external_software|bundled:​atint]] + + + ---- + + ==== Intersection theory ==== + These are general functions related to intersection theory. + ---- + {{anchor:​degree:​}} + ?  **''​degree([[.:​tropical:​Cycle |Cycle]] A)''​** + :: Computes the degree of a tropical variety as the total weight of the 0-dimensional intersection product obtained by intersecting with the complementary uniform linear space. + ? Parameters: + :: ''​[[.:​tropical:​Cycle |Cycle]]''​ ''​A'':​ tropical cycle + ? Returns: + :''​[[.:​common#​Integer |Integer]]''​ + ? from extension: + : [[:​external_software|bundled:​atint]] + + + ---- + {{anchor:​intersect:​}} + ?  **''​intersect([[.:​tropical:​Cycle |Cycle]] X, [[.:​tropical:​Cycle |Cycle]] Y)''​** + :: Computes the intersection product of two tropical cycles in the projective torus Use ''​[[.:​tropical#​intersect_check_transversality |intersect_check_transversality]]''​ to check for transversal intersections + ? Parameters: + :: ''​[[.:​tropical:​Cycle |Cycle]]''​ ''​X'':​ A tropical cycle + :: ''​[[.:​tropical:​Cycle |Cycle]]''​ ''​Y'':​ A tropical cycle, living in the same ambient space as X + ? Returns: + :''​[[.:​tropical:​Cycle |Cycle]]''​ + ? from extension: + : [[:​external_software|bundled:​atint]] + + + ---- + {{anchor:​intersect_check_transversality:​}} + ?  **''​intersect_check_transversality([[.:​tropical:​Cycle |Cycle]] X, [[.:​tropical:​Cycle |Cycle]] Y, [[.:​common#​Bool |Bool]] ensure_transversality)''​** + :: Computes the intersection product of two tropical cycles in R^n and tests whether the intersection is transversal (in the sense that the cycles intersect set-theoretically in the right dimension). + ? Parameters: + :: ''​[[.:​tropical:​Cycle |Cycle]]''​ ''​X'':​ A tropical cycle + :: ''​[[.:​tropical:​Cycle |Cycle]]''​ ''​Y'':​ A tropical cycle, living in the same space as X + :: ''​[[.:​common#​Bool |Bool]]''​ ''​ensure_transversality'':​ Whether non-transversal intersections should not be computed. Optional and false by default. If true, returns the zero cycle if it detects a non-transversal intersection + ? Returns: + :''​[[.:​common#​List |List]]''​ + ? from extension: + : [[:​external_software|bundled:​atint]] + + + ---- + {{anchor:​intersect_in_smooth_surface:​}} + ?  **''​intersect_in_smooth_surface([[.:​tropical:​Cycle |Cycle]]<​Addition>​ surface, [[.:​tropical:​Cycle |Cycle]]<​Addition>​ A, [[.:​tropical:​Cycle |Cycle]]<​Addition>​ B)''​** + :: Computes the intersection product of two cycles in a smooth surface + ? Parameters: + :: ''​[[.:​tropical:​Cycle |Cycle]]<​Addition>''​ ''​surface'':​ A smooth surface + :: ''​[[.:​tropical:​Cycle |Cycle]]<​Addition>''​ ''​A'':​ any cycle in the surface + :: ''​[[.:​tropical:​Cycle |Cycle]]<​Addition>''​ ''​B'':​ any cycle in the surface + ? Returns: + :''​[[.:​tropical:​Cycle |Cycle]]<​Addition>''​ + ? from extension: + : [[:​external_software|bundled:​atint]] + + + ---- + {{anchor:​point_functions:​}} + ?  **''​point_functions<​Addition>​([[.:​common#​Vector |Vector]]<​[[.:​common#​Rational |Rational]]>​ A)''​** + :: Constructs a list of rational functions that cut out a single point in the projective torus + ? Type Parameters: + :: ''​Addition'':​ Min or Max. Determines the type of the rational functions. + ? Parameters: + :: ''​[[.:​common#​Vector |Vector]]<​[[.:​common#​Rational |Rational]]>''​ ''​A'':​ point in the projective torus, given in tropical homogeneous coordinates,​ but without leading coordinate. + ? Returns: + :''​[[.:​tropical:​TropicalRationalFunction |TropicalRationalFunction]]''​ + ? from extension: + : [[:​external_software|bundled:​atint]] + + + ---- + {{anchor:​pullback:​}} + ?  **''​pullback([[.:​tropical:​Morphism |Morphism]] m, [[.:​tropical:​TropicalRationalFunction |TropicalRationalFunction]] r)''​** + :: This computes the pullback of a rational function via a morphism Due to the implementation of composition of maps, the ''​[[.:​tropical:​Morphism#​DOMAIN |DOMAIN]]''​ of the rational function need not be contained in the image of the morphism The pullback will be defined in the preimage of the domain. + ? Parameters: + :: ''​[[.:​tropical:​Morphism |Morphism]]''​ ''​m'':​ A morphism. + :: ''​[[.:​tropical:​TropicalRationalFunction |TropicalRationalFunction]]''​ ''​r'':​ A rational function. + ? Returns: + :''​[[.:​tropical:​TropicalRationalFunction |TropicalRationalFunction]]''​ + ? from extension: + : [[:​external_software|bundled:​atint]] + + + ---- + + ==== Inverse problems ==== + These functions deal with finding rational functions to given divisors. + ---- + {{anchor:​cutting_functions:​}} + ?  **''​cutting_functions([[.:​tropical:​Cycle |Cycle]]<​Addition>​ F, [[.:​common#​Vector |Vector]]<​[[.:​common#​Integer |Integer]]>​ weight_aim)''​** + :: Takes a weighted complex and a list of desired weights on its codimension one faces and computes all possible rational functions on (this subdivision of ) the complex + ? Parameters: + :: ''​[[.:​tropical:​Cycle |Cycle]]<​Addition>''​ ''​F'':​ A tropical variety, assumed to be simplicial. + :: ''​[[.:​common#​Vector |Vector]]<​[[.:​common#​Integer |Integer]]>''​ ''​weight_aim'':​ A list of weights, whose length should be equal to the number of ''​[[.:​tropical:​Cycle#​CODIMENSION_ONE_POLYTOPES |CODIMENSION_ONE_POLYTOPES]]''​. Gives the desired weight on each  codimension one face + ? Returns: + :''​[[.:​common#​Matrix |Matrix]]<​[[.:​common#​Rational |Rational]]>''​ + ? from extension: + : [[:​external_software|bundled:​atint]] + + + ---- + {{anchor:​simplicial_diagonal_system:​}} + ?  **''​simplicial_diagonal_system([[.:​tropical:​Cycle |Cycle]]<​Addition>​ fan)''​** + :: This function computes the inhomogeneous version of simplicial_piecewise_system in the sense that it computes the result of the above mentioned function (i.e.  which coefficients for the piecewise polynomials yield the zero divisor) and adds another column at the end where only the entries corresponding to the  diagonal cones are 1, the rest is zero. This can be seen as asking for a  solution to the system that cuts out the diagonal (all solutions whose last entry is 1) + ? Parameters: + :: ''​[[.:​tropical:​Cycle |Cycle]]<​Addition>''​ ''​fan'':​ . A simplicial fan without lineality space. + ? Returns: + :''​[[.:​common#​Matrix |Matrix]]<​[[.:​common#​Rational |Rational]]>''​ + ? from extension: + : [[:​external_software|bundled:​atint]] + + + ---- + {{anchor:​simplicial_piecewise_system:​}} + ?  **''​simplicial_piecewise_system([[.:​tropical:​Cycle |Cycle]]<​Addition>​ F)''​** + :: This function takes a d-dimensional simplicial fan F and computes the linear system ​ defined in the following way: For each d-dimensional cone t in the diagonal subdivision of FxF, let psi_t be the  piecewise polynomial defined by subsequently applying the rational functions that  are 1 one exactly one ray of t and 0 elsewhere. Now for which coefficients a_t is sum_t a_t psi_t * (FxF) = 0? + ? Parameters: + :: ''​[[.:​tropical:​Cycle |Cycle]]<​Addition>''​ ''​F'':​ A simplicial fan without lineality space + ? Returns: + :''​[[.:​common#​Matrix |Matrix]]<​[[.:​common#​Rational |Rational]]>''​ + ? from extension: + : [[:​external_software|bundled:​atint]] + + + ---- + {{anchor:​simplicial_with_diagonal:​}} + ?  **''​simplicial_with_diagonal([[.:​tropical:​Cycle |Cycle]]<​Addition>​ F)''​** + :: This function takes a simplicial fan F (without ​ lineality space) and computes the coarsest subdivision of F x F containing all  diagonal rays (r,r) + ? Parameters: + :: ''​[[.:​tropical:​Cycle |Cycle]]<​Addition>''​ ''​F'':​ A simplicial fan without lineality space. + ? Returns: + :''​[[.:​tropical:​Cycle |Cycle]]<​Addition>''​ + ? from extension: + : [[:​external_software|bundled:​atint]] + + + ---- + + ==== Lattices ==== + These functions deal with lattices (meaning free abelian, finitely generated groups). + ---- + {{anchor:​lattice_index:​}} + ?  **''​lattice_index([[.:​common#​Matrix |Matrix]]<​[[.:​common#​Integer |Integer]]>​ m)''​** + :: This computes the index of a lattice in its saturation. + ? Parameters: + :: ''​[[.:​common#​Matrix |Matrix]]<​[[.:​common#​Integer |Integer]]>''​ ''​m'':​ A list of (row) generators of the lattice. + ? Returns: + :''​[[.:​common#​Integer |Integer]]''​ + ? from extension: + : [[:​external_software|bundled:​atint]] + + + ---- + {{anchor:​randominteger:​}} + ?  **''​randomInteger([[.:​common#​Int |Int]] max_arg, [[.:​common#​Int |Int]] n)''​** + :: Returns n random integers in the range 0.. (max_arg-1),​inclusive Note that this algorithm is not optimal for real randomness: If you change the range parameter and then change it back, you will usually get the exact same sequence as the first time + ? Parameters: + :: ''​[[.:​common#​Int |Int]]''​ ''​max_arg'':​ The upper bound for the random integers + :: ''​[[.:​common#​Int |Int]]''​ ''​n'':​ The number of integers to be created + ? Returns: + :''​[[.:​common#​Vector |Vector]]<​[[.:​common#​Integer |Integer]]>''​ + ? from extension: + : [[:​external_software|bundled:​atint]] + + + ---- + + ==== Lines in surfaces ==== + These functions deal with the computation and representation of (families of) lines in surfaces. + ---- + {{anchor:​lines_in_cubic:​}} + ?  **''​lines_in_cubic([[.:​common#​Polynomial |Polynomial]]<​[[.:​common#​TropicalNumber |TropicalNumber]]<​Addition%%>>​%% p)''​** + :: This takes either: + - A homogeneous polynomial of degree 3 in 4 variables or + - A polynomial of degree 3 in 3 variables + .. and computes the corresponding cubic and finds all tropical lines and families thereof in the cubic. The result is returned as a ''​[[.:​tropical:​LinesInCubic |LinesInCubic]]''​ object. Note that the function has some heuristics for recognizing families, but might still return a single family as split up into two. + ? Parameters: + :: ''​[[.:​common#​Polynomial |Polynomial]]<​[[.:​common#​TropicalNumber |TropicalNumber]]<​Addition%%>>​%%''​ ''​p'':​ A homogeneous tropical polynomial of degree 3 in four variables. + ? Returns: + :''​[[.:​tropical:​LinesInCubic |LinesInCubic]]<​Addition>''​ + ? from extension: + : [[:​external_software|bundled:​atint]] + + + ---- + + ==== Local computations ==== + These functions are used for doing computations locally around a specified part of a Cycle, given via a nontrivial ''​[[.:​tropical:​Cycle#​LOCAL_RESTRICTION |LOCAL_RESTRICTION]]''​. + ---- + {{anchor:​local_codim_one:​}} + ?  **''​local_codim_one([[.:​tropical:​Cycle |Cycle]]<​Addition>​ complex, [[.:​common#​Int |Int]] face)''​** + :: This takes a weighted complex and an index of one of its codimension one faces (The index is in CODIMENSION_ONE_POLYTOPES) and computes the complex locally restricted to that face + ? Parameters: + :: ''​[[.:​tropical:​Cycle |Cycle]]<​Addition>''​ ''​complex'':​ An arbitrary weighted complex + :: ''​[[.:​common#​Int |Int]]''​ ''​face'':​ An index of a face in CODIMENSION_ONE_POLYTOPES + ? Returns: + :''​[[.:​tropical:​Cycle |Cycle]]<​Addition>''​ + ? from extension: + : [[:​external_software|bundled:​atint]] + + + ---- + {{anchor:​local_point:​}} + ?  **''​local_point([[.:​tropical:​Cycle |Cycle]]<​Addition>​ complex, [[.:​common#​Vector |Vector]]<​[[.:​common#​Rational |Rational]]>​ v)''​** + :: This takes a weighted complex and an arbitrary vertex in homogeneous ​ coordinates (including the leading coordinate) that is supposed to lie  in the support of the complex. It then refines the complex such that the vertex is a cell in the polyhedral ​ structure and returns the complex localized at this vertex + ? Parameters: + :: ''​[[.:​tropical:​Cycle |Cycle]]<​Addition>''​ ''​complex'':​ An arbitrary weighted complex + :: ''​[[.:​common#​Vector |Vector]]<​[[.:​common#​Rational |Rational]]>''​ ''​v'':​ A vertex in homogeneous coordinates and with leading coordinate. It should lie in the support of the complex (otherwise an error is thrown) + ? Returns: + :''​[[.:​tropical:​Cycle |Cycle]]<​Addition>''​ + ? from extension: + : [[:​external_software|bundled:​atint]] + + + ---- + {{anchor:​local_restrict:​}} + ?  **''​local_restrict([[.:​tropical:​Cycle |Cycle]]<​Addition>​ complex, [[.:​common#​IncidenceMatrix |IncidenceMatrix]] cones)''​** + :: This takes a tropical variety and an IncidenceMatrix describing a set of cones (not necessarily maximal ones) of this variety. It will then create a variety that contains all compatible maximal cones and is locally restricted to the given cone set. + ? Parameters: + :: ''​[[.:​tropical:​Cycle |Cycle]]<​Addition>''​ ''​complex'':​ An arbitrary weighted complex + :: ''​[[.:​common#​IncidenceMatrix |IncidenceMatrix]]''​ ''​cones'':​ A set of cones, indices refer to VERTICES + ? Returns: + :''​[[.:​tropical:​Cycle |Cycle]]<​Addition>''​ + ? from extension: + : [[:​external_software|bundled:​atint]] + + + ---- + {{anchor:​local_vertex:​}} + ?  **''​local_vertex([[.:​tropical:​Cycle |Cycle]]<​Addition>​ complex, [[.:​common#​Int |Int]] ray)''​** + :: This takes a weighted complex and an index of one of its vertices ​ (the index is to be understood in VERTICES) It then localizes the variety at this vertex. The index should never correspond to a far vertex in a complex, since this would not be a cone + ? Parameters: + :: ''​[[.:​tropical:​Cycle |Cycle]]<​Addition>''​ ''​complex'':​ An arbitrary weighted complex + :: ''​[[.:​common#​Int |Int]]''​ ''​ray'':​ The index of a ray/vertex in RAYS + ? Returns: + :''​[[.:​tropical:​Cycle |Cycle]]<​Addition>''​ + ? from extension: + : [[:​external_software|bundled:​atint]] + + + ---- + {{anchor:​star_at_point:​}} + ?  **''​star_at_point([[.:​tropical:​Cycle |Cycle]]<​Addition>​ C, [[.:​common#​Vector |Vector]]<​[[.:​common#​Rational |Rational]]>​ v)''​** + :: Computes the Star of a tropical cycle at an arbitrary point in its support + ? Parameters: + :: ''​[[.:​tropical:​Cycle |Cycle]]<​Addition>''​ ''​C'':​ a tropical cycle + :: ''​[[.:​common#​Vector |Vector]]<​[[.:​common#​Rational |Rational]]>''​ ''​v'':​ A point, given in tropical projective coordinates with leading coordinate and which should lie in the support of C + ? Returns: + :''​[[.:​tropical:​Cycle |Cycle]]<​Addition>''​ + ? from extension: + : [[:​external_software|bundled:​atint]] + + + ---- + {{anchor:​star_at_vertex:​}} + ?  **''​star_at_vertex([[.:​tropical:​Cycle |Cycle]]<​Addition>​ C, [[.:​common#​Int |Int]] i)''​** + :: Computes the Star of a tropical cycle at one of its vertices. + ? Parameters: + :: ''​[[.:​tropical:​Cycle |Cycle]]<​Addition>''​ ''​C'':​ a tropical cycle + :: ''​[[.:​common#​Int |Int]]''​ ''​i'':​ The index of a vertex in ''​[[.:​tropical:​Polytope#​VERTICES |VERTICES]]'',​ which should not be a ray + ? Returns: + :''​[[.:​tropical:​Cycle |Cycle]]<​Addition>''​ + ? from extension: + : [[:​external_software|bundled:​atint]] + + + ---- + + ==== Matroid ring cycle arithmetics ==== + These functions deal with the arithmetics of ''​[[.:​tropical:​MatroidRingCycle |MatroidRingCycle]]''​ objects. + ---- + {{anchor:​matroid_ring_linear_space:​}} + ?  **''​matroid_ring_linear_space([[.:​tropical:​MatroidRingCycle |MatroidRingCycle]] L)''​** + :: Given a list of MatroidRingCycle objects (of the same rank r, on the same ground set), computes a matrix that represents the linear space spanned by these cycles in the rank r graded part of the matroid ring. Rows correspond to the cycles, columns ​ correspond to the set of all the nested matroid occuring in  all basis presentations of the cycles. Entries are linear coefficients. + ? Parameters: + :: ''​[[.:​tropical:​MatroidRingCycle |MatroidRingCycle]]''​ ''​L'':​ A list of matroid ring cycles. + ? Returns: + :''​[[.:​common#​Matrix |Matrix]]<​[[.:​common#​Rational |Rational]]>''​ + ? from extension: + : [[:​external_software|bundled:​atint]] + ? Example: + :: The following computes 4 cycles of matroids of rank 2 on 4 elements. It then computes the corresponding linear space representation,​ which shows  immediately that M1 + M2 = M3 + M4 + :: > $m1 = new matroid::​Matroid(N_ELEMENTS=>​4,​BASES=>​[[0,​1],​[0,​2],​[1,​3],​[2,​3]]);​ + >$m2 = matroid::​uniform_matroid(2,​4);​ + > $m3 = new matroid::​Matroid(N_ELEMENTS=>​4,​BASES=>​[[0,​1],​[0,​2],​[0,​3],​[1,​3],​[2,​3]]);​ + >$m4 = new matroid::​Matroid(N_ELEMENTS=>​4,​BASES=>​[[0,​1],​[0,​2],​[1,​2],​[1,​3],​[2,​3]]);​ + > @r = map { matroid_ring_cycle<​Min>​($_)} ($m1,​$m2,​$m3,​$m4);​ + > print matroid_ring_linear_space(@r);​ + 1 1 -1 + 0 0 1 + 0 1 0 + 1 0 0 + ​ + + + ---- + {{anchor:​matroid_ring_product:​}} + ? **''​matroid_ring_product([[.:​tropical:​MatroidRingCycle |MatroidRingCycle]] A, [[.:​tropical:​MatroidRingCycle |MatroidRingCycle]] B)''​** + :: Computes the product of two matroid ring cycles. + ? Parameters: + :: ''​[[.:​tropical:​MatroidRingCycle |MatroidRingCycle]]''​ ''​A''​ + :: ''​[[.:​tropical:​MatroidRingCycle |MatroidRingCycle]]''​ ''​B''​ + ? Returns: + :''​[[.:​tropical:​MatroidRingCycle |MatroidRingCycle]]''​ + ? from extension: + : [[:​external_software|bundled:​atint]] + + + ---- + {{anchor:​matroid_ring_sum:​}} + ? **''​matroid_ring_sum([[.:​tropical:​MatroidRingCycle |MatroidRingCycle]] A, [[.:​tropical:​MatroidRingCycle |MatroidRingCycle]] B)''​** + :: Computes the sum of two matroid ring cycles + ? Parameters: + :: ''​[[.:​tropical:​MatroidRingCycle |MatroidRingCycle]]''​ ''​A''​ + :: ''​[[.:​tropical:​MatroidRingCycle |MatroidRingCycle]]''​ ''​B''​ + ? Returns: + :''​[[.:​tropical:​MatroidRingCycle |MatroidRingCycle]]''​ + ? from extension: + : [[:​external_software|bundled:​atint]] + + + ---- + {{anchor:​zero_in_matroid_ring:​}} + ? **''​zero_in_matroid_ring<​Addition>​([[.:​common#​Int |Int]] n)''​** + :: Constructs the zero element of the matroid ring. + ? Type Parameters: + :: ''​Addition'':​ The tropical Addition, either Min or Max. + ? Parameters: + :: ''​[[.:​common#​Int |Int]]''​ ''​n'':​ The size of the ground set. + ? Returns: + :''​[[.:​tropical:​MatroidRingCycle |MatroidRingCycle]]''​ + ? from extension: + : [[:​external_software|bundled:​atint]] + ? Example: + :: Computes the zero element of the matroid ring on 17 elements. + :: >$z = zero_in_matroid_ring<​Max>​(17);​ + > print $z->​RANK;​ + 0 + ​ + + + ---- + + ==== Matroids ==== + These functions deal with matroids and matroidal fans. + ---- + {{anchor:​is_smooth:​}} + ? **''​is_smooth([[.:​tropical:​Cycle |Cycle]]<​Addition>​ a)''​** + ::Takes a weighted fan and returns if it is smooth ​ (i.e. isomorphic to a Bergman fan B(M)/L for some matroid M) or not. The algorithm works for fans of dimension 0,1,2 and codimension 0,1! For other dimensions the algorithm ​ could give an answer but it is not guaranteed. ​ + ? Parameters: + :: ''​[[.:​tropical:​Cycle |Cycle]]<​Addition>''​ ''​a'':​ tropical fan F + ? Returns: + :''​[[.:​common#​List |List]]''​ + ? from extension: + : [[:​external_software|bundled:​atint]] + + + ---- + {{anchor:​matroid_fan:​}} + ? **''​matroid_fan<​Addition>​([[.:​matroid:​Matroid |Matroid]] m)''​** + :: Uses an algorithm by Felipe RincÃ³n to compute the matroidal fan of a given matroid. If you have a matrix at hand that represents this matroid, it is recommended to call this function with that matrix as an argument - it is significantly faster. + ? Type Parameters: + :: ''​Addition'':​ Min or Max - determines the coordinates. + ? Parameters: + :: ''​[[.:​matroid:​Matroid |Matroid]]''​ ''​m'':​ A matroid + ? Returns: + :''​[[.:​tropical:​Cycle |Cycle]]''​ + ? from extension: + : [[:​external_software|bundled:​atint]] + ? **''​matroid_fan<​Addition>​([[.:​common#​Matrix |Matrix]]<​[[.:​common#​Rational |Rational]]>​ m)''​** + :: Uses an algorithm by Felipe RincÃ³n to compute the bergman fan of the column matroid of the given matrix. Calling the function in this manner is significantly faster than calling it on the matroid. + ? Type Parameters: + :: ''​Addition'':​ Min or Max - determines the coordinates. + ? Parameters: + :: ''​[[.:​common#​Matrix |Matrix]]<​[[.:​common#​Rational |Rational]]>''​ ''​m'':​ A matrix, whose column matroid is considered. + ? Returns: + :''​[[.:​tropical:​Cycle |Cycle]]''​ + ? from extension: + : [[:​external_software|bundled:​atint]] + + + ---- + {{anchor:​matroid_fan_from_flats:​}} + ? **''​matroid_fan_from_flats<​Addition>​([[.:​matroid:​Matroid |Matroid]] A)''​** + :: Computes the fan of a matroid in its chains-of-flats subdivision. Note that this is potentially very slow for large matroids. + ? Type Parameters: + :: ''​Addition'':​ Min or max, determines the matroid fan coordinates. + ? Parameters: + :: ''​[[.:​matroid:​Matroid |Matroid]]''​ ''​A'':​ matroid. Should be loopfree. + ? Returns: + :''​[[.:​tropical:​Cycle |Cycle]]<​Addition>''​ + ? from extension: + : [[:​external_software|bundled:​atint]] + + + ---- + {{anchor:​matroid_from_fan:​}} + ? **''​matroid_from_fan([[.:​tropical:​Cycle |Cycle]]<​Addition>​ A)''​** + :: Takes the bergman fan of a matroid and reconstructs the corresponding matroid The fan has to be given in its actual matroid coordinates,​ not as an isomorphic transform. The actual subdivision is not relevant. + ? Parameters: + :: ''​[[.:​tropical:​Cycle |Cycle]]<​Addition>''​ ''​A'':​ tropical cycle, the Bergman fan of a matroid + ? Returns: + :''​[[.:​matroid:​Matroid |Matroid]]''​ + ? from extension: + : [[:​external_software|bundled:​atint]] + + + ---- + + ==== Moduli of rational curves ==== + These functions deal with moduli spaces of abstract or parametrized rational curves. + ---- + {{anchor:​count_mn_cones:​}} + ? **''​count_mn_cones([[.:​common#​Int |Int]] n, [[.:​common#​Int |Int]] k)''​** + :: Computes the number of k-dimensional cones of the tropical moduli space M_0,n + ? Parameters: + :: ''​[[.:​common#​Int |Int]]''​ ''​n'':​ The number of leaves. Should be >= 3 + :: ''​[[.:​common#​Int |Int]]''​ ''​k'':​ The number of bounded edges. This argument is optional and n-3 by default + ? Returns: + :''​[[.:​common#​Integer |Integer]]''​ + ? from extension: + : [[:​external_software|bundled:​atint]] + + + ---- + {{anchor:​count_mn_rays:​}} + ? **''​count_mn_rays([[.:​common#​Int |Int]] n)''​** + :: Computes the number of rays of the tropical moduli space M_0,n + ? Parameters: + :: ''​[[.:​common#​Int |Int]]''​ ''​n'':​ The number of leaves. Should be >= 3 + ? Returns: + :''​[[.:​common#​Integer |Integer]]''​ + ? from extension: + : [[:​external_software|bundled:​atint]] + + + ---- + {{anchor:​evaluation_map:​}} + ? **''​evaluation_map<​Addition>​([[.:​common#​Int |Int]] n, [[.:​common#​Matrix |Matrix]]<​[[.:​common#​Rational |Rational]]>​ Delta, [[.:​common#​Int |Int]] i)''​** + :: This creates the i-th evaluation function on$ M_{0,​n}^{(lab)}(R^r,​Delta) $(which is actually realized as$ M_{0,​(n+|Delta|)} \times R^r $) and can be created via ''​[[.:​tropical#​space_of_stable_maps |space_of_stable_maps]]''​). + ? Type Parameters: + :: ''​Addition'':​ Min or Max + ? Parameters: + :: ''​[[.:​common#​Int |Int]]''​ ''​n'':​ The number of marked (contracted) points + :: ''​[[.:​common#​Matrix |Matrix]]<​[[.:​common#​Rational |Rational]]>''​ ''​Delta'':​ The directions of the unbounded edges (given as row vectors ​ in tropical projective coordinates without leading coordinate, i.e. have r+1 columns) + :: ''​[[.:​common#​Int |Int]]''​ ''​i'':​ The index of the marked point that should be evaluated. Should lie in between 1 and n Note that the i-th marked point is realized as the$ (|Delta|+i) $-th leaf in$ M_{0,​n+|Delta|} $and that the$ R^r $- coordinate is interpreted as the position of the n-th leaf. In particular, ev_n is just the projection to the R^r-coordinates + ? Returns: + :''​[[.:​tropical:​Morphism |Morphism]]<​Addition>''​ + ? from extension: + : [[:​external_software|bundled:​atint]] + ? **''​evaluation_map<​Addition>​([[.:​common#​Int |Int]] n, [[.:​common#​Int |Int]] r, [[.:​common#​Int |Int]] d, [[.:​common#​Int |Int]] i)''​** + :: This creates the i-th evaluation function on$ M_{0,​n}^{(lab)}(R^r,​d) $(which is actually realized as$ M_{0,​n+d(r+1)} \times R^r $) This is the same as calling the function evaluation_map(Int,​Int,​Matrix<​Rational>,​Int) with the standard d-fold degree as matrix (i.e. each (inverted) unit vector of$ R^{r+1} $occuring d times). + ? Type Parameters: + :: ''​Addition'':​ Min or Max + ? Parameters: + :: ''​[[.:​common#​Int |Int]]''​ ''​n'':​ The number of marked (contracted) points + :: ''​[[.:​common#​Int |Int]]''​ ''​r'':​ The dimension of the target space + :: ''​[[.:​common#​Int |Int]]''​ ''​d'':​ The degree of the embedding. The direction matrix will be the standard d-fold directions, i.e. each unit vector (inverted for Max), occuring d times. + :: ''​[[.:​common#​Int |Int]]''​ ''​i'':​ The index of the marked point that should be evaluated. i should lie in between 1 and n + ? Returns: + :''​[[.:​tropical:​Morphism |Morphism]]<​Addition>''​ + ? from extension: + : [[:​external_software|bundled:​atint]] + + + ---- + {{anchor:​forgetful_map:​}} + ? **''​forgetful_map<​Addition>​([[.:​common#​Int |Int]] n, [[.:​common#​Set |Set]]<​[[.:​common#​Int |Int]]> S)''​** + :: This computes the forgetful map from the moduli space$ M_{0,n} $to$ M_{0,n-|S|} $+ ? Type Parameters: + :: ''​Addition'':​ Min or Max + ? Parameters: + :: ''​[[.:​common#​Int |Int]]''​ ''​n'':​ The number of leaves in the moduli space$ M_{0,n} $+ :: ''​[[.:​common#​Set |Set]]<​[[.:​common#​Int |Int]]>''​ ''​S'':​ The set of leaves to be forgotten. Should be a subset of (1,..,n) + ? Returns: + :''​[[.:​tropical:​Morphism |Morphism]]''​ + ? from extension: + : [[:​external_software|bundled:​atint]] + + + ---- + {{anchor:​local_m0n:​}} + ? **''​local_m0n<​Addition>​([[.:​tropical:​RationalCurve |RationalCurve]] R ...)''​** + :: Computes the moduli space M_0,n locally around a given list of combinatorial types. More precisely: It computes the weighted complex consisting of all maximal cones containing any of the given combinatorial types and localizes ​ at these types This should only be used for curves of small codimension. What the function ​ actually does, is that it combinatorially computes the cartesian products ​ of M_0,​v'​s,​ where v runs over the possible valences of vertices in the curves For max(v) <= 8 this should terminate in a reasonable time (depending on the number of curves) The coordinates are the same that would be produced by the function ​ ''​[[.:​tropical#​m0n |m0n]]''​ + ? Type Parameters: + :: ''​Addition'':​ Min or Max, determines the coordinates + ? Parameters: + :: ''​[[.:​tropical:​RationalCurve |RationalCurve]]''​ ''​R ...'':​ A list of rational curves (preferrably in the same M_0,n) + ? Returns: + :''​[[.:​tropical:​Cycle |Cycle]]<​Addition>''​ + ? from extension: + : [[:​external_software|bundled:​atint]] + + + ---- + {{anchor:​m0n:​}} + ? **''​m0n<​Addition>​([[.:​common#​Int |Int]] n)''​** + :: Creates the moduli space of abstract rational n-marked curves. Its coordinates are given as the coordinates of the bergman fan of the matroid of the complete graph on n-1 nodes (but not computed as such) The isomorphism to the space of curve metrics is obtained by choosing the last leaf as special leaf + ? Type Parameters: + :: ''​Addition'':​ Min or Max + ? Parameters: + :: ''​[[.:​common#​Int |Int]]''​ ''​n'':​ The number of leaves. Should be at least 3 + ? Returns: + :''​[[.:​tropical:​Cycle |Cycle]]''​ + ? from extension: + : [[:​external_software|bundled:​atint]] + + + ---- + {{anchor:​psi_class:​}} + ? **''​psi_class<​Addition>​([[.:​common#​Int |Int]] n, [[.:​common#​Int |Int]] i)''​** + :: Computes the i-th psi class in the moduli space of n-marked rational tropical curves M_0,n + ? Type Parameters: + :: ''​Addition'':​ Min or Max + ? Parameters: + :: ''​[[.:​common#​Int |Int]]''​ ''​n'':​ The number of leaves in M_0,n + :: ''​[[.:​common#​Int |Int]]''​ ''​i'':​ The leaf for which we want to compute the psi class ( in 1,..,n ) + ? Returns: + :''​[[.:​tropical:​Cycle |Cycle]]''​ + ? from extension: + : [[:​external_software|bundled:​atint]] + + + ---- + {{anchor:​psi_product:​}} + ? **''​psi_product<​Addition>​([[.:​common#​Int |Int]] n, [[.:​common#​Vector |Vector]]<​[[.:​common#​Int |Int]]> exponents)''​** + :: Computes a product of psi classes psi_1^k_1 * ... * psi_n^k_n on the moduli space of rational n-marked tropical curves M_0,n + ? Type Parameters: + :: ''​Addition'':​ Min or Max + ? Parameters: + :: ''​[[.:​common#​Int |Int]]''​ ''​n'':​ The number of leaves in M_0,n + :: ''​[[.:​common#​Vector |Vector]]<​[[.:​common#​Int |Int]]>''​ ''​exponents'':​ The exponents of the psi classes k_1,..,k_n. If the vector does not have length n or if some entries are negative, an error is thrown + ? Returns: + :''​[[.:​tropical:​Cycle |Cycle]]''​ + ? from extension: + : [[:​external_software|bundled:​atint]] + + + ---- + {{anchor:​space_of_stable_maps:​}} + ? **''​space_of_stable_maps<​Addition>​([[.:​common#​Int |Int]] n, [[.:​common#​Int |Int]] d, [[.:​common#​Int |Int]] r)''​** + :: Creates the moduli space of stable maps of rational n-marked curves into a projective torus. It is given as the cartesian product of M_{0,n+d} and R^r, where n is the number of contracted leaves, d the number of non-contracted leaves and r is the dimension of the target torus. The R^r - coordinate is interpreted as the image of the last (n-th) contracted leaf. Due to the implementation of ''​[[.:​tropical#​cartesian_product |cartesian_product]]'',​ the projective coordinates are non-canonical:​ Both M_{0,n+d} and R^r are dehomogenized after the first coordinate, then the product is taken and homogenized after the first coordinate again. Note that functions in a-tint will usually treat this space in such a way that the first d leaves are the non-contracted ones and the remaining n leaves are the contracted ones. + ? Type Parameters: + :: ''​Addition'':​ Min or Max. Determines the coordinates. + ? Parameters: + :: ''​[[.:​common#​Int |Int]]''​ ''​n'':​ The number of contracted leaves + :: ''​[[.:​common#​Int |Int]]''​ ''​d'':​ The number of non-contracted leaves + :: ''​[[.:​common#​Int |Int]]''​ ''​r'':​ The dimension of the target space for the stable maps. + ? Returns: + :''​[[.:​tropical:​Cycle |Cycle]]''​ + ? from extension: + : [[:​external_software|bundled:​atint]] + + + ---- + + ==== Morphisms ==== + These are general functions that deal with morphisms and their arithmetic. + ---- + {{anchor:​add_morphisms:​}} + ? **''​add_morphisms([[.:​tropical:​Morphism |Morphism]] f, [[.:​tropical:​Morphism |Morphism]] g)''​** + :: Computes the sum of two morphisms. Both ''​[[.:​tropical:​Morphism#​DOMAIN |DOMAIN]]''​s should have the same support and the target spaces should have the same ambient dimension The domain of the result will be the common refinement of the two domains. + ? Parameters: + :: ''​[[.:​tropical:​Morphism |Morphism]]''​ ''​f''​ + :: ''​[[.:​tropical:​Morphism |Morphism]]''​ ''​g''​ + ? Returns: + :''​[[.:​tropical:​Morphism |Morphism]]''​ + ? from extension: + : [[:​external_software|bundled:​atint]] + + + ---- + + ==== Producing a tropical hypersurface ==== + These functions produce a [[.:​tropical:​Hypersurface |tropical hypersurface]] from other objects. + ---- + {{anchor:​hyperplane:​}} + ? **''​hyperplane<​Addition>​([[.:​common#​Vector |Vector]]<​[[.:​common#​TropicalNumber |TropicalNumber]]<​Addition%%>>​%% coeffs)''​** + :: Create a tropical hyperplane as object of type Hypersurface. + ? Type Parameters: + :: ''​Addition'':​ ''​[[.:​common#​Min |Min]]''​ or ''​[[.:​common#​Max |Max]]''​ + ? Parameters: + :: ''​[[.:​common#​Vector |Vector]]<​[[.:​common#​TropicalNumber |TropicalNumber]]<​Addition%%>>​%%''​ ''​coeffs'':​ coefficients of the tropical linear form (can also be specified as anonymous array). + ? Returns: + :''​[[.:​tropical:​Hypersurface |Hypersurface]]<​Addition>''​ + + + ---- + {{anchor:​points2hypersurface:​}} + ? **''​points2hypersurface([[.:​common#​Matrix |Matrix]]<​[[.:​common#​TropicalNumber |TropicalNumber]]<​Addition%%>>​%% points)''​** + :: Constructs a tropical hypersurface defined by the linear hyperplanes associated to the given points. Min-tropical points give rise to Max-tropical linear forms, and vice versa, and this method produces the hypersurface associated to the (tropical) product of these linear forms, that is, the union of the respective associated hyperplanes. + ? Parameters: + :: ''​[[.:​common#​Matrix |Matrix]]<​[[.:​common#​TropicalNumber |TropicalNumber]]<​Addition%%>>​%%''​ ''​points''​ + ? Returns: + :''​[[.:​tropical:​Hypersurface |Hypersurface]]''​ + ? Example: + :: This produces the union of two (generic) Max-hyperplanes,​ and assigns it to$H. + :: > $points = new Matrix<​TropicalNumber<​Min>>​([[0,​1,​0],​[0,​0,​1]]);​ + >$H = points2hypersurface($points);​ + ​ + + + ---- + + ==== Producing a tropical polytope ==== + These functions produce an object of type ''​[[.:​tropical:​Polytope |Polytope]]''​ from other objects. + ---- + {{anchor:​cyclic:​}} + ? **''​cyclic<​Addition>​([[.:​common#​Int |Int]] d, [[.:​common#​Int |Int]] n)''​** + :: Produces a tropical cyclic //​d//​-polytope with //n// vertices. Cf. + > Josephine Yu & Florian Block, arXiv: math.MG/​0503279. + ? Type Parameters: + :: ''​Addition'':​ Min or Max. + ? Parameters: + :: ''​[[.:​common#​Int |Int]]''​ ''​d'':​ the dimension + :: ''​[[.:​common#​Int |Int]]''​ ''​n'':​ the number of generators + ? Returns: + :''​[[.:​tropical:​Polytope |Polytope]]<​Addition>''​ + ? Example: + :: >$c = cyclic<​Min>​(3,​4);​ + > print $c->​VERTICES;​ + 0 0 0 0 + 0 1 2 3 + 0 2 4 6 + 0 3 6 9 + ​ + + + ---- + {{anchor:​hypersimplex:​}} + ? **''​hypersimplex<​Addition>​([[.:​common#​Int |Int]] d, [[.:​common#​Int |Int]] k)''​** + :: Produce the tropical hypersimplex Î”(//​k//,//​d//​). Cf. + > M. Joswig math/​0312068v3,​ Ex. 2.10. + .. The value of //k// defaults to 1, yielding a tropical standard simplex. + ? Type Parameters: + :: ''​Addition'':​ Max or Min + ? Parameters: + :: ''​[[.:​common#​Int |Int]]''​ ''​d'':​ the dimension + :: ''​[[.:​common#​Int |Int]]''​ ''​k'':​ the number of +/-1 entries + ? Returns: + :''​[[.:​tropical:​Polytope |Polytope]]<​Addition>''​ + ? Example: + :: >$h = hypersimplex<​Min>​(2,​1);​ + > print $h->​VERTICES;​ + 0 1 1 + 0 -1 0 + 0 0 -1 + ​ + + + ---- + {{anchor:​matroid_polytope:​}} + ? **''​matroid_polytope<​Addition,​ Scalar>​([[.:​matroid:​Matroid |Matroid]] m, Scalar v)''​** + :: Produce the tropical matroid polytope from a matroid //m//. Each vertex corresponds to a basis of the matroid, the non-bases coordinates get value 0, the bases coordinates get value //v//, default is -orientation. + ? Type Parameters: + :: ''​Addition'':​ Min or Max + :: ''​Scalar'':​ coordinate type + ? Parameters: + :: ''​[[.:​matroid:​Matroid |Matroid]]''​ ''​m''​ + :: ''​Scalar''​ ''​v'':​ value for the bases + ? Returns: + :''​[[.:​tropical:​Polytope |Polytope]]<​Addition,​Scalar>''​ + ? Example: + :: >$m = new matroid::​Matroid(VECTORS=>​[[1,​0,​0],​[1,​0,​1],​[1,​1,​0],​[1,​0,​2]]);​ + > $P = matroid_polytope<​Min>​($m);​ + > print $P->​VERTICES;​ + 0 0 0 1 + 0 1 0 0 + 0 -1 -1 -1 + ​ + + + ---- + {{anchor:​minkowski_sum:​}} + ? **''​minkowski_sum([[.:​common#​TropicalNumber |TropicalNumber]]<​Addition,​Scalar>​ lambda, [[.:​tropical:​Polytope |Polytope]]<​Addition,​Scalar>​ P, [[.:​common#​TropicalNumber |TropicalNumber]]<​Addition,​Scalar>​ mu, [[.:​tropical:​Polytope |Polytope]]<​Addition,​Scalar>​ Q)''​** + :: Produces the tropical polytope (//lambda// $\otimes$ //P//) $\oplus$ (//mu// $\otimes$ //Q//), where $\otimes$ and $\oplus$ are tropical scalar multiplication and tropical addition, respectively. + ? Parameters: + :: ''​[[.:​common#​TropicalNumber |TropicalNumber]]<​Addition,​Scalar>''​ ''​lambda''​ + :: ''​[[.:​tropical:​Polytope |Polytope]]<​Addition,​Scalar>''​ ''​P''​ + :: ''​[[.:​common#​TropicalNumber |TropicalNumber]]<​Addition,​Scalar>''​ ''​mu''​ + :: ''​[[.:​tropical:​Polytope |Polytope]]<​Addition,​Scalar>''​ ''​Q''​ + ? Returns: + :''​[[.:​tropical:​Polytope |Polytope]]<​Addition,​Scalar>''​ + ? Example: + :: Create two tropical polytopes as tropical convex hulls of the given POINTS, and assign their tropical minkowsky sum to the variable$s. + :: > $p1 = new Polytope<​Min>​(POINTS=>​[[0,​2,​0],​[0,​1,​1],​[0,​0,​2]]);​ + >$p2 = new Polytope<​Min>​(POINTS=>​[[0,​-1,​-1],​[0,​1,​1],​[0,​0,​-2]]);​ + > $s = minkowski_sum(0,​$p1, 0, $p2); + ​ + + + ---- + + ==== Tropical covector decomposition ==== + These functions deal with covectors of subdivision of tropical point configurations. + ---- + {{anchor:​coarse_covectors:​}} + ? **''​coarse_covectors([[.:​common#​Matrix |Matrix]]<​[[.:​common#​TropicalNumber |TropicalNumber]]<​Addition,​Scalar%%>>​%% points, [[.:​common#​Matrix |Matrix]]<​[[.:​common#​TropicalNumber |TropicalNumber]]<​Addition,​Scalar%%>>​%% generators)''​** + :: This computes the coarse covector of a list of points relative to a list of generators. + ? Parameters: + :: ''​[[.:​common#​Matrix |Matrix]]<​[[.:​common#​TropicalNumber |TropicalNumber]]<​Addition,​Scalar%%>>​%%''​ ''​points''​ + :: ''​[[.:​common#​Matrix |Matrix]]<​[[.:​common#​TropicalNumber |TropicalNumber]]<​Addition,​Scalar%%>>​%%''​ ''​generators''​ + ? Returns: + :''​[[.:​common#​Matrix |Matrix]]<​[[.:​common#​Int |Int]]>''​ + ? Example: + :: >$generators = new Matrix<​TropicalNumber<​Max>>​([[0,​1,​0],​[0,​0,​1],​[0,"​-inf",​2]]);​ + > $points = new Matrix<​TropicalNumber<​Max>>​([[0,​1,​1]]);​ + > print coarse_covectors($points,​ $generators);​ + 2 1 2 + ​ + + + ---- + {{anchor:​coarse_covectors_of_scalar_vertices:​}} + ? **''​coarse_covectors_of_scalar_vertices([[.:​common#​Matrix |Matrix]]<​Scalar>​ points, [[.:​common#​Matrix |Matrix]]<​[[.:​common#​TropicalNumber |TropicalNumber]]<​Addition,​Scalar%%>>​%% generators)''​** + :: Computes the coarse covectors of a list of scalar points, as described in ''​[[.:​tropical#​covectors_of_scalar_vertices |covectors_of_scalar_vertices]]''​ + ? Parameters: + :: ''​[[.:​common#​Matrix |Matrix]]<​Scalar>''​ ''​points''​ + :: ''​[[.:​common#​Matrix |Matrix]]<​[[.:​common#​TropicalNumber |TropicalNumber]]<​Addition,​Scalar%%>>​%%''​ ''​generators''​ + ? Returns: + :''​[[.:​common#​Matrix |Matrix]]<​[[.:​common#​Int |Int]]>''​ + ? Example: + :: >$generators = new Matrix<​TropicalNumber<​Max>>​([[0,​1,​0],​[0,​0,​1],​[0,"​-inf",​2]]);​ + > $points = new Matrix([[1,​0,​1,​1]]);​ + > print coarse_covectors_of_scalar_vertices($points,​ $generators);​ + 2 1 2 + ​ + + + ---- + {{anchor:​covectors:​}} + ? **''​covectors([[.:​common#​Matrix |Matrix]]<​[[.:​common#​TropicalNumber |TropicalNumber]]<​Addition,​Scalar%%>>​%% points, [[.:​common#​Matrix |Matrix]]<​[[.:​common#​TropicalNumber |TropicalNumber]]<​Addition,​Scalar%%>>​%% generators)''​** + :: This computes the (fine) covector of a list of points relative to a list of generators. + ? Parameters: + :: ''​[[.:​common#​Matrix |Matrix]]<​[[.:​common#​TropicalNumber |TropicalNumber]]<​Addition,​Scalar%%>>​%%''​ ''​points''​ + :: ''​[[.:​common#​Matrix |Matrix]]<​[[.:​common#​TropicalNumber |TropicalNumber]]<​Addition,​Scalar%%>>​%%''​ ''​generators''​ + ? Returns: + :''​[[.:​common#​Array |Array]]<​[[.:​common#​IncidenceMatrix |IncidenceMatrix]]>''​ + ? Example: + :: >$generators = new Matrix<​TropicalNumber<​Max>>​([[0,​1,​0],​[0,​0,​1],​[0,"​-inf",​2]]);​ + > $points = new Matrix<​TropicalNumber<​Max>>​([[0,​1,​1]]);​ + > print covectors($points,​ $generators);​ + <​{0 1} + {0} + {1 2} + > + ​ + + + ---- + {{anchor:​covectors_of_scalar_vertices:​}} + ? **''​covectors_of_scalar_vertices([[.:​common#​Matrix |Matrix]]<​Scalar>​ points, [[.:​common#​Matrix |Matrix]]<​[[.:​common#​TropicalNumber |TropicalNumber]]<​Addition,​Scalar%%>>​%% generators)''​** + :: This computes the (fine) covector of a list of points relative to a list of generators. The points are scalar points and they are supposed to be normalized in the following sense: + - All bounded vertices have a leading 1 + - All unbounded vertices have a leading 0 and all nonzero entries are either +1 or -1. + .. (but not both) Furthermore,​ the points make up a polyhedral complex - in particular, every maximal cell has a bounded vertex. For the bounded vertices, covectors are computed as usual. For unbounded vertices, the nonzero entries are replaced by tropical zero, the complementary entries are copied from a bounded vertex sharing a cell and then the covector is computed. + ? Parameters: + :: ''​[[.:​common#​Matrix |Matrix]]<​Scalar>''​ ''​points''​ + :: ''​[[.:​common#​Matrix |Matrix]]<​[[.:​common#​TropicalNumber |TropicalNumber]]<​Addition,​Scalar%%>>​%%''​ ''​generators''​ + ? Returns: + :''​[[.:​common#​Array |Array]]<​[[.:​common#​IncidenceMatrix |IncidenceMatrix]]>''​ + ? Example: + :: >$generators = new Matrix<​TropicalNumber<​Max>>​([[0,​1,​0],​[0,​0,​1],​[0,"​-inf",​2]]);​ + > $points = new Matrix([[1,​0,​1,​1]]);​ + > print covectors_of_scalar_vertices($points,​ $generators);​ + <​{0 1} + {0} + {1 2} + > + ​ + + + ---- + + ==== Tropical linear spaces ==== + These functions deal with tropical linear spaces associated to valuated matroids. + ---- + {{anchor:​linear_space:​}} + ? **''​linear_space([[.:​matroid:​ValuatedMatroid |ValuatedMatroid]]<​Addition,​[[.:​common#​Rational |Rational]]>​ A)''​** + :: This computes the tropical linear space (with the coarsest structure) associated to a valuated matroid. If you have a trivial valuation, it is highly recommended,​ you use ''​[[.:​tropical#​matroid_fan |matroid_fan]]''​ instead. + ? Parameters: + :: ''​[[.:​matroid:​ValuatedMatroid |ValuatedMatroid]]<​Addition,​[[.:​common#​Rational |Rational]]>''​ ''​A'':​ valuated matroid, whose value group must be the rationals. + ? Returns: + :''​[[.:​tropical:​Cycle |Cycle]]<​Addition>''​ + + + ---- + + ==== Tropical operations ==== + These functions deal with general tropical arithmetic. + ---- + {{anchor:​cramer:​}} + ? **''​cramer([[.:​common#​Matrix |Matrix]]<​[[.:​common#​TropicalNumber |TropicalNumber]]>​ matrix)''​** + :: The __solution vector__ of an unsigned tropical matrix equation. For more details and background see Akian, Gaubert & Guterman: Tropical Cramer determinants revisited. Tropical and idempotent mathematics and applications,​ Contemp. Math., 616, AMS, 2014 + ? Parameters: + :: ''​[[.:​common#​Matrix |Matrix]]<​[[.:​common#​TropicalNumber |TropicalNumber]]>''​ ''​matrix''​ + ? Returns: + :''​[[.:​common#​Vector |Vector]]<​[[.:​common#​TropicalNumber |TropicalNumber]]>''​ + ? Example: + :: > print cramer(new Matrix<​TropicalNumber<​Min>>​([[0,​1,​0],​[0,​4,​1]]));​ + 2 0 1 + ​ + + + ---- + {{anchor:​intersection_extremals:​}} + ? **''​intersection_extremals([[.:​common#​Matrix |Matrix]]<​[[.:​common#​TropicalNumber |TropicalNumber]]>​ G, [[.:​common#​Vector |Vector]]<​[[.:​common#​TropicalNumber |TropicalNumber]]>​ a, [[.:​common#​Vector |Vector]]<​[[.:​common#​TropicalNumber |TropicalNumber]]>​ b)''​** + :: This computes the __extremal generators__ of a tropical cone given by generators //G// intersected with one inequality //a//x ~ //b//x. Here, ~ is <= for min and >= for max. + ? Parameters: + :: ''​[[.:​common#​Matrix |Matrix]]<​[[.:​common#​TropicalNumber |TropicalNumber]]>''​ ''​G''​ + :: ''​[[.:​common#​Vector |Vector]]<​[[.:​common#​TropicalNumber |TropicalNumber]]>''​ ''​a''​ + :: ''​[[.:​common#​Vector |Vector]]<​[[.:​common#​TropicalNumber |TropicalNumber]]>''​ ''​b''​ + ? Returns: + :''​[[.:​common#​Matrix |Matrix]]<​[[.:​common#​TropicalNumber |TropicalNumber]]>''​ + ? Example: + :: >$G = new Matrix<​TropicalNumber<​Min>>​([[0,​0,​2],​[0,​4,​0],​[0,​3,​1]]);​ + > $a = new Vector<​TropicalNumber<​Min>>​(['​inf','​inf',​-2]);​ + >$b = new Vector<​TropicalNumber<​Min>>​([0,​-1,'​inf'​]);​ + > print intersection_extremals($G,​$a,​$b);​ + 0 0 1 + 0 4 0 + 0 3 1 + ​ + + + ---- + {{anchor:​is_contained:​}} + ? **''​is_contained([[.:​common#​Matrix |Matrix]]<​[[.:​common#​TropicalNumber |TropicalNumber]]>​ apices, [[.:​common#​Array |Array]]<​[[.:​common#​Set |Set]]<​[[.:​common#​Int |Int]]%%>>​%% sectors)''​** + :: Check if a point is contained in all tropical halfspaces given by their apices and the infeasible sectors ​ + ? Parameters: + :: ''​[[.:​common#​Matrix |Matrix]]<​[[.:​common#​TropicalNumber |TropicalNumber]]>''​ ''​apices''​ + :: ''​[[.:​common#​Array |Array]]<​[[.:​common#​Set |Set]]<​[[.:​common#​Int |Int]]%%>>​%%''​ ''​sectors''​ + ? Returns: + :''​[[.:​common#​Bool |Bool]]''​ + + + ---- + {{anchor:​matrixpair2apexset:​}} + ? **''​matrixPair2apexSet([[.:​common#​Matrix |Matrix]]<​[[.:​common#​TropicalNumber |TropicalNumber]]>​ G, [[.:​common#​Matrix |Matrix]]<​[[.:​common#​TropicalNumber |TropicalNumber]]>​ A)''​** + :: Reformulate the description of an inequality system given by two matrices to the description by apices and infeasible sectors ​ + ? Parameters: + :: ''​[[.:​common#​Matrix |Matrix]]<​[[.:​common#​TropicalNumber |TropicalNumber]]>''​ ''​G''​ + :: ''​[[.:​common#​Matrix |Matrix]]<​[[.:​common#​TropicalNumber |TropicalNumber]]>''​ ''​A''​ + ? Returns: + :''​[[.:​common#​Pair |Pair]]<​[[.:​common#​Matrix |Matrix]]<​[[.:​common#​TropicalNumber |TropicalNumber]]>,​[[.:​common#​Array |Array]]<​[[.:​common#​Set |Set]]<​[[.:​common#​Int |Int]]%%>>​%%>''​ + + + ---- + {{anchor:​monomial_cone_lattice:​}} + ? **''​monomial_cone_lattice([[.:​common#​Matrix |Matrix]] M)''​** + :: computes the VIF of a monomial tropical cone given by generators ​ + ? Parameters: + :: ''​[[.:​common#​Matrix |Matrix]]''​ ''​M'':​ the exponent vectors of the generators. ​ + ? Returns: + :''​[[.:​graph:​Lattice |Lattice]]<​[[.:​graph#​BasicDecoration |BasicDecoration]],​[[.:​graph#​Nonsequential |Nonsequential]]>''​ + + + ---- + {{anchor:​monomial_dual_description:​}} + ? **''​monomial_dual_description([[.:​common#​Matrix |Matrix]] monomial_generators)''​** + :: compute the dual description of a monomial tropical cone. + ? Parameters: + :: ''​[[.:​common#​Matrix |Matrix]]''​ ''​monomial_generators''​ + ? Returns: + :''​[[.:​common#​Pair |Pair]]''​ + + + ---- + {{anchor:​nearest_point:​}} + ? **''​nearest_point([[.:​tropical:​Polytope |Polytope]]<​Addition,​Scalar>​ C, [[.:​common#​Vector |Vector]]<​[[.:​common#​TropicalNumber |TropicalNumber]]<​Addition,​Scalar%%>>​%% x)''​** + :: Compute the projection of a point //x// in tropical projective space onto a tropical cone //C//. Cf. + > Develin & Sturmfels math.MG/​0308254v2,​ Proposition 9. + ? Parameters: + :: ''​[[.:​tropical:​Polytope |Polytope]]<​Addition,​Scalar>''​ ''​C''​ + :: ''​[[.:​common#​Vector |Vector]]<​[[.:​common#​TropicalNumber |TropicalNumber]]<​Addition,​Scalar%%>>​%%''​ ''​x''​ + ? Returns: + :''​[[.:​common#​Vector |Vector]]<​[[.:​common#​TropicalNumber |TropicalNumber]]<​Addition,​Scalar%%>>​%%''​ + ? Example: + :: Note that the output is not homogenized,​ e.g. here (1,2,1) represents the point (0,1,0). + :: >$C = new Polytope<​Min>​(POINTS=>​[[0,​0,​0],​[0,​2,​0],​[0,​1,​2]]);​ + > $x = new Vector<​TropicalNumber<​Min>>​([0,​2,​1]);​ + > print nearest_point($C,​ $x); + 1 2 1 + ​ + + + ---- + {{anchor:​norm:​}} + ? **''​norm([[.:​common#​Vector |Vector]]<​[[.:​common#​TropicalNumber |TropicalNumber]]<​Addition,​Scalar%%>>​%% v)''​** + :: The __tropical norm__ of a vector //v// in tropical projective space is the difference between the maximal and minimal coordinate in any coordinate representation of the vector. + ? Parameters: + :: ''​[[.:​common#​Vector |Vector]]<​[[.:​common#​TropicalNumber |TropicalNumber]]<​Addition,​Scalar%%>>​%%''​ ''​v''​ + ? Returns: + :''​Scalar''​ + ? Example: + :: >$v = new Vector<​TropicalNumber<​Min>>​([1,​-2,​3]);​ + > print norm($v); + 5 + ​ + ? Example: + :: >$w = new Vector<​TropicalNumber<​Min>>​([0,'​inf',​3]);​ + > print norm($w); + inf + ​ + + + ---- + {{anchor:​optimal_permutations:​}} + ? **''​optimal_permutations([[.:​common#​Matrix |Matrix]]<​[[.:​common#​TropicalNumber |TropicalNumber]]>​ matrix)''​** + :: All __tropically optimal permutations__ of a matrix (i.e. those yielding the tropical determinant). + ? Parameters: + :: ''​[[.:​common#​Matrix |Matrix]]<​[[.:​common#​TropicalNumber |TropicalNumber]]>''​ ''​matrix''​ + ? Returns: + :''​[[.:​common#​Set |Set]]<​[[.:​common#​Array |Array]]<​[[.:​common#​Int |Int]]%%>>​%%''​ + ? Example: + :: > print optimal_permutations(new Matrix<​TropicalNumber<​Min>>​([-1,​-1,​2],​[0,​-2,​-2],​[0,​2,​0]));​ + ​{<​0 1 2> <1 2 0>} + ​ + + + ---- + {{anchor:​principal_solution:​}} + ? **''​principal_solution([[.:​common#​Matrix |Matrix]]<​[[.:​common#​TropicalNumber |TropicalNumber]]>​ A, [[.:​common#​Vector |Vector]]<​[[.:​common#​TropicalNumber |TropicalNumber]]>​ b)''​** + :: Compute the solution of the tropical equation //A// * //x// = //b//. If there is no solution, the return value is '​near'​ a solution. ​ Cf. Butkovic '​Max-linear systems: theory and algorithms'​ (MR2681232), ​ Theorem 3.1.1 + ? Parameters: + :: ''​[[.:​common#​Matrix |Matrix]]<​[[.:​common#​TropicalNumber |TropicalNumber]]>''​ ''​A''​ + :: ''​[[.:​common#​Vector |Vector]]<​[[.:​common#​TropicalNumber |TropicalNumber]]>''​ ''​b''​ + ? Returns: + :''​[[.:​common#​Vector |Vector]]<​[[.:​common#​TropicalNumber |TropicalNumber]]>''​ + ? Example: + :: >$A = new Matrix<​TropicalNumber<​Min>>​([[1,​2],​[3,​4]]);​ + > $b = new Vector<​TropicalNumber<​Min>>​([5,​6]);​ + > print principal_solution($A,​ $b); + 4 3 + ​ + + + ---- + {{anchor:​second_tdet_and_perm:​}} + ? **''​second_tdet_and_perm([[.:​common#​Matrix |Matrix]]<​[[.:​common#​TropicalNumber |TropicalNumber]]>​ matrix)''​** + :: The __second tropical optimum__ of a matrix and one corresponding permutation. + ? Parameters: + :: ''​[[.:​common#​Matrix |Matrix]]<​[[.:​common#​TropicalNumber |TropicalNumber]]>''​ ''​matrix''​ + ? Returns: + :''​[[.:​common#​Pair |Pair]]<​[[.:​common#​TropicalNumber |TropicalNumber]],​[[.:​common#​Array |Array]]<​[[.:​common#​Int |Int]]%%>>​%%''​ + ? Example: + :: > print second_tdet_and_perm(new Matrix<​TropicalNumber<​Min>>​([[1,​0,​0],​[0,​1,​0],​[0,​0,​1]]));​ + 0 <1 2 0> + ​ + + + ---- + {{anchor:​stregular:​}} + ? **''​stregular([[.:​common#​Matrix |Matrix]]<​[[.:​common#​TropicalNumber |TropicalNumber]]>​ matrix)''​** + :: __Signed tropical regularity__ of a matrix Returns, whether all optimal permutations have the same sign. + ? Parameters: + :: ''​[[.:​common#​Matrix |Matrix]]<​[[.:​common#​TropicalNumber |TropicalNumber]]>''​ ''​matrix''​ + ? Returns: + :''​[[.:​common#​Bool |Bool]]''​ + ? Example: + :: A regular matrix is also sign-regular + :: > print stregular(new Matrix<​TropicalNumber<​Min>>​([0,​-1,​2],​[0,​-2,​-2],​[0,​2,​0]));​ + true + ​ + ? Example: + :: A sign-singular matrix + :: > print stregular(new Matrix<​TropicalNumber<​Min>>​([0,​1,​0],​[1,​0,​1],​[0,​1,​0]));​ + false + ​ + + + ---- + {{anchor:​subcramer:​}} + ? **''​subcramer([[.:​common#​Matrix |Matrix]]<​[[.:​common#​TropicalNumber |TropicalNumber]]<​Addition,​Scalar%%>>​%% m, [[.:​common#​Set |Set]]<​[[.:​common#​Int |Int]]> J, [[.:​common#​Set |Set]]<​[[.:​common#​Int |Int]]> I)''​** + :: computes Cramer bracket |I| = |J| + 1 is required. + ? Parameters: + :: ''​[[.:​common#​Matrix |Matrix]]<​[[.:​common#​TropicalNumber |TropicalNumber]]<​Addition,​Scalar%%>>​%%''​ ''​m''​ + :: ''​[[.:​common#​Set |Set]]<​[[.:​common#​Int |Int]]>''​ ''​J''​ + :: ''​[[.:​common#​Set |Set]]<​[[.:​common#​Int |Int]]>''​ ''​I''​ + ? Returns: + :''​[[.:​common#​Vector |Vector]]<​[[.:​common#​TropicalNumber |TropicalNumber]]<​Addition,​Scalar%%>>​%%''​ + + + ---- + {{anchor:​tdet:​}} + ? **''​tdet([[.:​common#​Matrix |Matrix]]<​[[.:​common#​TropicalNumber |TropicalNumber]]>​ matrix)''​** + :: The __tropical determinant__ of a matrix. See also ''​[[.:​tropical#​tdet_and_perm |tdet_and_perm]]''​ and ''​[[.:​tropical#​second_tdet_and_perm |second_tdet_and_perm]]''​. + ? Parameters: + :: ''​[[.:​common#​Matrix |Matrix]]<​[[.:​common#​TropicalNumber |TropicalNumber]]>''​ ''​matrix''​ + ? Returns: + :''​[[.:​common#​TropicalNumber |TropicalNumber]]''​ + ? Example: + :: > print tdet(new Matrix<​TropicalNumber<​Max>>​([[1,​0,​0],​[0,​1,​0],​[0,​0,​1]]));​ + 3 + ​ + + + ---- + {{anchor:​tdet_and_perm:​}} + ? **''​tdet_and_perm([[.:​common#​Matrix |Matrix]]<​[[.:​common#​TropicalNumber |TropicalNumber]]>​ matrix)''​** + :: The __tropical determinant__ of a matrix and one optimal permutation. + ? Parameters: + :: ''​[[.:​common#​Matrix |Matrix]]<​[[.:​common#​TropicalNumber |TropicalNumber]]>''​ ''​matrix''​ + ? Returns: + :''​[[.:​common#​Pair |Pair]]<​[[.:​common#​TropicalNumber |TropicalNumber]],​[[.:​common#​Array |Array]]<​[[.:​common#​Int |Int]]%%>>​%%''​ + ? Example: + :: > print tdet_and_perm(new Matrix<​TropicalNumber<​Min>>​([[1,​0,​0],​[0,​1,​0],​[0,​0,​1]]));​ + 0 <2 0 1> + ​ + + + ---- + {{anchor:​tdet_and_perms:​}} + ? **''​tdet_and_perms([[.:​common#​Matrix |Matrix]]<​[[.:​common#​TropicalNumber |TropicalNumber]]>​ matrix)''​** + :: The __tropical determinant__ of a matrix and all optimal permutations. + ? Parameters: + :: ''​[[.:​common#​Matrix |Matrix]]<​[[.:​common#​TropicalNumber |TropicalNumber]]>''​ ''​matrix''​ + ? Returns: + :''​[[.:​common#​Pair |Pair]]<​[[.:​common#​TropicalNumber |TropicalNumber]],​[[.:​common#​Set |Set]]<​[[.:​common#​Array |Array]]<​[[.:​common#​Int |Int]]%%>>​%%>''​ + + + ---- + {{anchor:​tdiam:​}} + ? **''​tdiam([[.:​common#​Matrix |Matrix]]<​[[.:​common#​TropicalNumber |TropicalNumber]]<​Addition,​Scalar%%>>​%% matrix)''​** + :: Tropical diameter of a simplex, defined by the columns of a matrix. This is the maximum over the pairwise tropical distances. The same for Min and Max. + ? Parameters: + :: ''​[[.:​common#​Matrix |Matrix]]<​[[.:​common#​TropicalNumber |TropicalNumber]]<​Addition,​Scalar%%>>​%%''​ ''​matrix''​ + ? Returns: + :''​Scalar''​ + ? Example: + :: > print tdiam(new Matrix<​TropicalNumber<​Max>>​([[1,​0,​0],​[0,​1,​0],​[0,​0,​1]]));​ + 2 + ​ + + + ---- + {{anchor:​tdist:​}} + ? **''​tdist([[.:​common#​Vector |Vector]]<​[[.:​common#​TropicalNumber |TropicalNumber]]<​Addition,​Scalar%%>>​%% v, [[.:​common#​Vector |Vector]]<​[[.:​common#​TropicalNumber |TropicalNumber]]<​Addition,​Scalar%%>>​%% w)''​** + :: Tropical distance function. This is a metric on the tropical projective torus. The same for Min and Max. + ? Parameters: + :: ''​[[.:​common#​Vector |Vector]]<​[[.:​common#​TropicalNumber |TropicalNumber]]<​Addition,​Scalar%%>>​%%''​ ''​v''​ + :: ''​[[.:​common#​Vector |Vector]]<​[[.:​common#​TropicalNumber |TropicalNumber]]<​Addition,​Scalar%%>>​%%''​ ''​w''​ + ? Returns: + :''​Scalar''​ + ? Example: + :: >$v=new Vector<​TropicalNumber<​Min>>​([1,​0]);​ + > $w=new Vector<​TropicalNumber<​Min>>​([0,​1]);​ + > print tdist($v,​$w);​ + 2 + ​ + + + ---- + {{anchor:​tregular:​}} + ? **''​tregular([[.:​common#​Matrix |Matrix]]<​[[.:​common#​TropicalNumber |TropicalNumber]]>​ matrix)''​** + :: __Tropical regularity__ of a matrix + ? Parameters: + :: ''​[[.:​common#​Matrix |Matrix]]<​[[.:​common#​TropicalNumber |TropicalNumber]]>''​ ''​matrix''​ + ? Returns: + :''​[[.:​common#​Bool |Bool]]''​ + ? Example: + :: A tropically regular matrix + :: > print tregular(new Matrix<​TropicalNumber<​Min>>​([0,​-1,​2],​[0,​-2,​-2],​[0,​2,​0]));​ + true + ​ + ? Example: + :: A tropically singular matrix + :: > print tregular(new Matrix<​TropicalNumber<​Min>>​([-1,​-1,​2],​[0,​-2,​-2],​[0,​2,​0]));​ + false + ​ + + + ---- + {{anchor:​trop_witness:​}} + ? **''​trop_witness<​Addition,​ Scalar>​([[.:​common#​Matrix |Matrix]]<​[[.:​common#​TropicalNumber |TropicalNumber]]<​Addition,​Scalar%%>>​%% m, [[.:​common#​Array |Array]]<​[[.:​common#​Int ​ |Int ]]> t, [[.:​common#​Int |Int]] start)''​** + :: checks feasibility of tropical inequality system + ? Type Parameters: + :: ''​Addition''​ + :: ''​Scalar''​ + ? Parameters: + :: ''​[[.:​common#​Matrix |Matrix]]<​[[.:​common#​TropicalNumber |TropicalNumber]]<​Addition,​Scalar%%>>​%%''​ ''​m''​ + :: ''​[[.:​common#​Array |Array]]<​[[.:​common#​Int ​ |Int ]]>''​ ''​t''​ + :: ''​[[.:​common#​Int |Int]]''​ ''​start''​ + ? Returns: + :''​[[.:​common#​Vector |Vector]]<​[[.:​common#​TropicalNumber |TropicalNumber]]<​Addition,​Scalar%%>>​%%''​ + ? **''​trop_witness<​Addition,​ Scalar>​([[.:​common#​Matrix |Matrix]]<​[[.:​common#​TropicalNumber |TropicalNumber]]<​Addition,​Scalar%%>>​%% m, [[.:​common#​Array |Array]]<​[[.:​common#​Int ​ |Int ]]> t, [[.:​common#​Int |Int]] start)''​** + :: checks feasibility of tropical inequality system + ? Type Parameters: + :: ''​Addition''​ + :: ''​Scalar''​ + ? Parameters: + :: ''​[[.:​common#​Matrix |Matrix]]<​[[.:​common#​TropicalNumber |TropicalNumber]]<​Addition,​Scalar%%>>​%%''​ ''​m''​ + :: ''​[[.:​common#​Array |Array]]<​[[.:​common#​Int ​ |Int ]]>''​ ''​t''​ + :: ''​[[.:​common#​Int |Int]]''​ ''​start''​ + ? Returns: + :''​[[.:​common#​Vector |Vector]]<​[[.:​common#​TropicalNumber |TropicalNumber]]<​Addition,​Scalar%%>>​%%''​ + + + ---- + {{anchor:​tsgn:​}} + ? **''​tsgn([[.:​common#​Matrix |Matrix]]<​[[.:​common#​TropicalNumber |TropicalNumber]]>​ matrix)''​** + :: The __sign__ of a tropical determinant. Returns the sign of the unique optimal permutation if the matrix is tropically regular, otherwise 0. + ? Parameters: + :: ''​[[.:​common#​Matrix |Matrix]]<​[[.:​common#​TropicalNumber |TropicalNumber]]>''​ ''​matrix''​ + ? Returns: + :''​[[.:​common#​Int |Int]]''​ + + + ---- + + ==== Visualization ==== + These functions are for visualization. + ---- + {{anchor:​visualize_in_surface:​}} + ? **''​visualize_in_surface''​** + :: This visualizes a surface in R^3 and an arbitrary list of (possibly non-pure) Cycle objects. A common bounding box is computed for all objects and a random color is chosen for each object (except the surface) + ? from extension: + : [[:​external_software|bundled:​atint]] + + + ---- + + ==== Weight space ==== + These functions deal with the weight space of a cycle, i.e. the space of weights that make it balanced and related properties. + ---- + {{anchor:​decomposition_polytope:​}} + ? **''​decomposition_polytope([[.:​tropical:​Cycle |Cycle]] A)''​** + :: Computes the possible positive decompositions into irreducible subvarieties of the same weight positivity signature (i.e. the weight on a cone has to have the same sign as in the cycle) To be precise, it computes the irreducible varieties as rays of the weight cone (where the corresponding orthant is taken such that the weight vector of X lies in that orthant). It then computes the polytope of all positive linear combinations ​ of those irreducible varieties that produce the original weight vector. + ? Parameters: + :: ''​[[.:​tropical:​Cycle |Cycle]]''​ ''​A'':​ weighted complex + ? Returns: + :''​[[.:​polytope:​Polytope |Polytope]]''​ + ? from extension: + : [[:​external_software|bundled:​atint]] + + + ---- + {{anchor:​weight_cone:​}} + ? **''​weight_cone([[.:​tropical:​Cycle |Cycle]] X, [[.:​common#​Set |Set]]<​[[.:​common#​Int |Int]]> negative)''​** + :: Takes a polyhedral complex and computes a weight cone, i.e. intersects the ''​[[.:​tropical:​Cycle#​WEIGHT_SPACE |WEIGHT_SPACE]]''​ with a chosen orthant (by default the positive orthant) + ? Parameters: + :: ''​[[.:​tropical:​Cycle |Cycle]]''​ ''​X'':​ A polyhedral complex + :: ''​[[.:​common#​Set |Set]]<​[[.:​common#​Int |Int]]>''​ ''​negative'':​ A subset of the coordinates {0,..,N-1}, where N is the number of maximal cells of X. Determines the orthant to intersect the weight space with: All coordinates in the set are negative, the others positive If the set is not given, it is empty by default (i.e. we take the positive orthant) + ? from extension: + : [[:​external_software|bundled:​atint]] + + + ---- + + ==== Weights and lattices ==== + These functions relate to the weights of a tropical cycle. + ---- + {{anchor:​is_balanced:​}} + ? **''​is_balanced([[.:​tropical:​Cycle |Cycle]] C)''​** + :: This computes whether a given cycle is balanced. Note that, while cycles are per definition balanced polyhedral complexes, polymake allows the creation of Cycle objects which are not balanced. + ? Parameters: + :: ''​[[.:​tropical:​Cycle |Cycle]]''​ ''​C'':​ The cycle for which to check balancing. + ? Returns: + :''​[[.:​common#​Bool |Bool]]''​ + ? Example: + :: >$x = new Cycle<​Max>​(PROJECTIVE_VERTICES=>​[[1,​0,​0,​0],​[0,​-1,​0,​0],​[0,​0,​-1,​0],​[0,​0,​0,​-1]],​MAXIMAL_POLYTOPES=>​[[0,​1],​[0,​2],​[0,​3]],​WEIGHTS=>​[1,​1,​1]);​ + > print is_balanced($x);​ + true + ​ + + + ---- + + ==== gfan ==== + These functions are wrappers for gfan functions. + ---- + {{anchor:​gfan_tropicalbruteforce:​}} + ? **''​gfan_tropicalbruteforce([[.:​ideal:​Ideal |Ideal]] I)''​** + :: Calls gfan_tropicalbruteforce for a homogeneous ideal. If the ideal contains a monomial, gfan will return an empty object. We do not catch this for you. + ? Parameters: + :: ''​[[.:​ideal:​Ideal |Ideal]]''​ ''​I'':​ homogeneous ideal + ? Returns: + :''​[[.:​fan:​PolyhedralFan |PolyhedralFan]]''​ + + + ---- + {{anchor:​gfan_tropicalhypersurface:​}} + ? **''​gfan_tropicalhypersurface([[.:​common#​Polynomial |Polynomial]]<​[[.:​common#​Rational |Rational]]>​ p)''​** + :: Calls gfan_tropicalhypersurface for a single polynomial. If the polynomial is a monomial, gfan will return an empty object and the xslt parsing fails. We do not catch this for you. + ? Parameters: + :: ''​[[.:​common#​Polynomial |Polynomial]]<​[[.:​common#​Rational |Rational]]>''​ ''​p'':​ homogeneous polynomial + ? Returns: + :''​[[.:​tropical:​Cycle |Cycle]]<​[[.:​common#​Max |Max]]>''​ + + + ---- + {{anchor:​gfan_tropicalintersection:​}} + ? **''​gfan_tropicalintersection([[.:​ideal:​Ideal |Ideal]] I)''​** + :: Calls gfan_tropicalintersection for a homogeneous ideal. + ? Parameters: + :: ''​[[.:​ideal:​Ideal |Ideal]]''​ ''​I'':​ homogeneous ideal + ? Returns: + :''​[[.:​tropical:​Cycle |Cycle]]<​[[.:​common#​Max |Max]]>''​ + + + ---- + {{anchor:​gfan_tropicalvariety_of_prime:​}} + ? **''​gfan_tropicalvariety_of_prime([[.:​ideal:​Ideal |Ideal]] I)''​** + :: Calls gfan_tropicalstartingcone | gfan_tropicaltraverse for a homogeneous prime ideal. If the ideal contains a monomial, gfan will return an empty object and the xslt parsing fails. We do not catch this for you. + ? Parameters: + :: ''​[[.:​ideal:​Ideal |Ideal]]''​ ''​I'':​ homogeneous prime ideal + ? Returns: + :''​[[.:​tropical:​Cycle |Cycle]]<​[[.:​common#​Max |Max]]>''​ + + + ---- + + ==== Other ==== + ​Special purpose functions. + ---- + {{anchor:​lifted_pluecker:​}} + ? **''​lifted_pluecker([[.:​common#​Matrix |Matrix]]<​[[.:​common#​TropicalNumber |TropicalNumber]]<​Addition%%>>​%% V)''​** + :: Compute the tropical Pluecker vector from a matrix representing points in the tropical torus. This can be used to lift regular subdivisions of a product of simplices to a matroid decomposition of hypersimplices. + ? Parameters: + :: ''​[[.:​common#​Matrix |Matrix]]<​[[.:​common#​TropicalNumber |TropicalNumber]]<​Addition%%>>​%%''​ ''​V''​ + ? Returns: + :''​[[.:​common#​Vector |Vector]]<​[[.:​common#​TropicalNumber |TropicalNumber]]<​Addition%%>>​%%''​ + + + ---- + {{anchor:​points_in_pseudovertices:​}} + ? **''​points_in_pseudovertices([[.:​common#​Matrix |Matrix]]<​[[.:​common#​TropicalNumber |TropicalNumber]]<​Addition,​Scalar%%>>​%% points, [[.:​common#​Matrix |Matrix]]<​Scalar>​ pseudovertices)''​** + :: This function takes a Matrix of tropical vectors in projective coordinates ​ (e.g. the ''​[[.:​tropical:​Polytope#​POINTS |POINTS]]''​ of a ''​[[.:​tropical:​Polytope |Polytope]]''​) and a Matrix of Scalar vectors in extended tropical projective coordinates (e.g. the ''​[[.:​tropical:​Polytope#​PSEUDOVERTICES |PSEUDOVERTICES]]''​ of a tropical ''​[[.:​tropical:​Polytope |Polytope]]''​). It returns the set of row indices of the second matrix such that the corresponding row starts with a 1 and the remaining vector occurs in the first matrix. + ? Parameters: + :: ''​[[.:​common#​Matrix |Matrix]]<​[[.:​common#​TropicalNumber |TropicalNumber]]<​Addition,​Scalar%%>>​%%''​ ''​points''​ + :: ''​[[.:​common#​Matrix |Matrix]]<​Scalar>''​ ''​pseudovertices''​ + ? Returns: + :''​[[.:​common#​Set |Set]]<​[[.:​common#​Int |Int]]>''​ + + + ---- + + ==== no category ==== + {{anchor:​gudkov_curve:​}} + ? **''​gudkov_curve()''​** + :: This returns a Hypersurface object, and a unique attached ''​[[.:​tropical:​Hypersurface#​PATCHWORK |PATCHWORK]]''​ property which represents an M-curve of degree 6 with Gudkov'​s configuration. + ? Returns: + :''​[[.:​tropical:​Hypersurface |Hypersurface]]<​[[.:​common#​Min |Min]]>''​ + ? Example: + :: >$h = gudkov_curve;​ + > $p =$h->​PATCHWORK;​ + > print $p->​BETTI_NUMBERS_Z2;​ + 11 11 + ​ + :: >$p->​realize("​uniform"​)->​VISUAL;​ + ​ + + + ---- + {{anchor:​harnack_curve:​}} + ?  **''​harnack_curve([[.:​common#​Int |Int]] d)''​** + :: This returns a Hypersurface object, and a unique attached ''​[[.:​tropical:​Hypersurface#​PATCHWORK |PATCHWORK]]''​ property which represents an M-curve of given degree with Harnack'​s configuration. + ? Parameters: + :: ''​[[.:​common#​Int |Int]]''​ ''​d'':​ the degree of the curve + ? Returns: + :''​[[.:​tropical:​Hypersurface |Hypersurface]]<​[[.:​common#​Min |Min]]>''​ + ? Example: + :: Create a Harnack curve of degree 6: + :: > $h = harnack_curve(6);​ + >$p = $h->​PATCHWORK;​ + > print$p->​BETTI_NUMBERS_Z2;​ + 11 11 + ​ + :: > $p->​realize("​uniform"​)->​VISUAL;​ + ​ + + + ---- + {{anchor:​ragsdale_counterexample:​}} + ? **''​ragsdale_counterexample()''​** + :: This returns a Hypersurface object, and a unique attached ''​[[.:​tropical:​Hypersurface#​PATCHWORK |PATCHWORK]]''​ property which represents a curve of degree 10 that is a counterexample to Ragsdale'​s conjecture. + ? Returns: + :''​[[.:​tropical:​Hypersurface |Hypersurface]]<​[[.:​common#​Min |Min]]>''​ + ? Example: + :: >$h = ragsdale_counterexample;​ + > $p =$h->​PATCHWORK;​ + > \$p->​realize("​uniform"​)->​VISUAL;​ + ​ + + + ---- + + ===== Small Object Types ===== + + ==== no category ==== + {{anchor:​covectordecoration:​}} + ?  **''​CovectorDecoration''​** + ::​UNDOCUMENTED + + + ----