This is ThinSincereQuivers.info, produced by Macaulay2, version 1.24.11

ThinSincereQuivers -- creating and manipulating Toric Quivers
*************************************************************

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

ThinSincereQuivers is a package for creating and manipulating toric quivers.

For further details in the theory, we suggest the following articles and the
references within them:

  * Lutz Hille, Quivers, cones and polytopes,  (see
    https://doi.org/10.1016/S0024-3795(02)00406-8 ) Linear algebra and its
    applications 365 (2003): 215-237.
  * Mátyás Domokos and  Dániel Joó, On the equations and classification of
    toric quiver varieties (see https://arxiv.org/abs/1402.5096v1 ),
    Proceedings. Section A, Mathematics-The Royal Society of Edinburgh 146.2
    (2016): 265.

Menu
====

  * Creating toric quivers
  * Creating subquiver representations

Authors
=======

  * Mary Barker (see https://github.com/marybarker ) <marybarker@wustl.edu>
  * Patricio Gallardo (see http://patriciogallardo.com/ ) <pgallard@ucr.edu>

Version
=======

This documentation describes version 0.0 of ThinSincereQuivers.

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

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

Exports
=======

  * Types
      * ToricQuiver -- the ToricQuiver datatype
  * Functions and commands
      * allSpanningTrees -- find the spanning trees of
        the underlying graph
      * basisForFlowPolytope -- compute the
        necessary basis vectors for the hyperplane of a flow polytope
      * bipartiteQuiver -- make a toric quiver on
        underlying bipartite graph
      * chainQuiver -- make a toric quiver on underlying
        graph in the form of a chain
      * coneSystem -- compute the chamber decomposition of
        weights
      * flowPolytopeVertices -- generate the
        polytope associated to a toric quiver
      * getWeights -- image of the flow on the vertices
      * incInverse -- compute a flow in the preimage for a
        given weight
      * isAcyclic -- whether a toric quiver has no cycles
      * isClosedUnderArrows -- whether a subquiver
        closed under arrows
      * isSemistable -- whether a subquiver is semistable
        with respect to a given weight
      * isStable -- whether a subquiver is semistable with
        respect to a given weight
      * isTight -- determine if toric quiver is tight
      * isWellDefined -- determine if toric quiver is
        correctly constructed
      * makeTight -- return a tight quiver with the same flow
        polytope
      * maxCodimensionUnstable -- compute the
        maximal codimension of the unstable loci of a quiver
      * maximalNonstableSubquivers -- return
        the maximal subquivers that are semistable
      * maximalUnstableSubquivers -- return
        the maximal subquivers that are unstable
      * mergeOnArrow -- join two quivers together by
        identifying an arrow from each
      * mergeOnVertex -- join two quivers together by
        identifying a vertex from each
      * potentialWalls -- lists the potential walls in
        the weight chamber decomposition for a given quiver
      * primitiveArrows -- list the primitive arrows in
        a quiver
      * quiverEdges -- return the graph edges associated to
        the toric quiver
      * quiverFlow -- return the flow attribute associated
        to the toric quiver
      * quiverIncidenceMatrix -- return the graph
        incidence matrix attribute associated to the toric quiver
      * quiverVertices -- return the vertices of the
        toric quiver
      * quiverWeights -- return the weight attribute
        associated to the toric quiver
      * referenceThetas -- return a weight for all
        polytopes associated to a toric quiver
      * samePolytope -- whether two weights produce the
        same flow polytope
      * stableTrees -- return the spanning trees that are
        stable
      * subquivers -- return all possible subquivers of a
        given quiver
      * threeVertexQuiver -- make a toric quiver on
        underlying graph with three vertices and a specified number of edges
        between each
      * toricQuiver -- the toricQuiver constructor
      * wallType -- get the type of a wall for a given quiver
  * Methods
      * "basisForFlowPolytope(List,ToricQuiver)" -- see
        basisForFlowPolytope, -- compute the necessary
        basis vectors for the hyperplane of a flow polytope
      * "basisForFlowPolytope(ToricQuiver)" -- see basisForFlowPolytope,
        -- compute the necessary basis vectors for the
        hyperplane of a flow polytope
      * "flowPolytopeVertices(List,ToricQuiver)" -- see
        flowPolytopeVertices, -- generate the polytope
        associated to a toric quiver
      * "flowPolytopeVertices(ToricQuiver)" -- see flowPolytopeVertices,
        -- generate the polytope associated to a toric
        quiver
      * "getWeights(Matrix)" -- see getWeights, -- image of
        the flow on the vertices
      * "getWeights(ToricQuiver)" -- see getWeights, -- image
        of the flow on the vertices
      * "incInverse(List,ToricQuiver)" -- see incInverse, --
        compute a flow in the preimage for a given weight
      * "isAcyclic(Matrix)" -- see isAcyclic, -- whether a
        toric quiver has no cycles
      * "isAcyclic(ToricQuiver)" -- see isAcyclic, -- whether
        a toric quiver has no cycles
      * "isClosedUnderArrows(List,Matrix)" -- see isClosedUnderArrows,
        -- whether a subquiver closed under arrows
      * "isClosedUnderArrows(List,ToricQuiver)" -- see
        isClosedUnderArrows, -- whether a subquiver closed
        under arrows
      * "isClosedUnderArrows(Matrix,List)" -- see isClosedUnderArrows,
        -- whether a subquiver closed under arrows
      * "isClosedUnderArrows(Matrix,ToricQuiver)" -- see
        isClosedUnderArrows, -- whether a subquiver closed
        under arrows
      * "isClosedUnderArrows(ToricQuiver,ToricQuiver)" -- see
        isClosedUnderArrows, -- whether a subquiver closed
        under arrows
      * "isSemistable(List,ToricQuiver)" -- see isSemistable,
        -- whether a subquiver is semistable with respect to a
        given weight
      * "isSemistable(ToricQuiver,ToricQuiver)" -- see isSemistable,
        -- whether a subquiver is semistable with respect to a
        given weight
      * "isStable(List,ToricQuiver)" -- see isStable, --
        whether a subquiver is semistable with respect to a given weight
      * "isStable(ToricQuiver,ToricQuiver)" -- see isStable, --
        whether a subquiver is semistable with respect to a given weight
      * "isTight(List,ToricQuiver)" -- see isTight, -- determine
        if toric quiver is tight
      * "isTight(ToricQuiver)" -- see isTight, -- determine if
        toric quiver is tight
      * "isTight(ToricQuiver,List)" -- see isTight, -- determine
        if toric quiver is tight
      * "isWellDefined(ToricQuiver)" -- see isWellDefined,
        -- determine if toric quiver is correctly constructed
      * "maxCodimensionUnstable(ToricQuiver)" -- see
        maxCodimensionUnstable, -- compute the maximal
        codimension of the unstable loci of a quiver
      * "mergeOnArrow(Matrix,ZZ,Matrix,ZZ)" -- see mergeOnArrow,
        -- join two quivers together by identifying an arrow from
        each
      * "mergeOnArrow(Matrix,ZZ,ToricQuiver,ZZ)" -- see mergeOnArrow,
        -- join two quivers together by identifying an arrow from
        each
      * "mergeOnArrow(ToricQuiver,ZZ,Matrix,ZZ)" -- see mergeOnArrow,
        -- join two quivers together by identifying an arrow from
        each
      * "mergeOnArrow(ToricQuiver,ZZ,ToricQuiver,ZZ)" -- see
        mergeOnArrow, -- join two quivers together by identifying
        an arrow from each
      * "mergeOnVertex(Matrix,ZZ,Matrix,ZZ)" -- see mergeOnVertex,
        -- join two quivers together by identifying a vertex
        from each
      * "mergeOnVertex(Matrix,ZZ,ToricQuiver,ZZ)" -- see mergeOnVertex,
        -- join two quivers together by identifying a vertex
        from each
      * "mergeOnVertex(ToricQuiver,ZZ,Matrix,ZZ)" -- see mergeOnVertex,
        -- join two quivers together by identifying a vertex
        from each
      * "mergeOnVertex(ToricQuiver,ZZ,ToricQuiver,ZZ)" -- see
        mergeOnVertex, -- join two quivers together by
        identifying a vertex from each
      * "potentialWalls(Matrix)" -- see potentialWalls,
        -- lists the potential walls in the weight chamber decomposition for a
        given quiver
      * "potentialWalls(ToricQuiver)" -- see potentialWalls,
        -- lists the potential walls in the weight chamber
        decomposition for a given quiver
      * "quiverEdges(ToricQuiver)" -- see quiverEdges, --
        return the graph edges associated to the toric quiver
      * "quiverFlow(ToricQuiver)" -- see quiverFlow, --
        return the flow attribute associated to the toric quiver
      * "quiverIncidenceMatrix(ToricQuiver)" -- see
        quiverIncidenceMatrix, -- return the graph
        incidence matrix attribute associated to the toric quiver
      * "quiverVertices(ToricQuiver)" -- see quiverVertices,
        -- return the vertices of the toric quiver
      * "quiverWeights(ToricQuiver)" -- see quiverWeights,
        -- return the weight attribute associated to the toric quiver
      * "referenceThetas(List)" -- see referenceThetas,
        -- return a weight for all polytopes associated to a toric quiver
      * "samePolytope(List,List,ToricQuiver)" -- see samePolytope,
        -- whether two weights produce the same flow polytope
      * "subquivers(Matrix)" -- see subquivers, -- return all
        possible subquivers of a given quiver
      * "subquivers(ToricQuiver)" -- see subquivers, --
        return all possible subquivers of a given quiver
      * "threeVertexQuiver(List)" -- see threeVertexQuiver,
        -- make a toric quiver on underlying graph with
        three vertices and a specified number of edges between each
      * "toricQuiver(Graph)" -- see toricQuiver, -- the
        toricQuiver constructor
      * "toricQuiver(Graph,List)" -- see toricQuiver, -- the
        toricQuiver constructor
      * "toricQuiver(List)" -- see toricQuiver, -- the
        toricQuiver constructor
      * "toricQuiver(List,List)" -- see toricQuiver, -- the
        toricQuiver constructor
      * "toricQuiver(Matrix)" -- see toricQuiver, -- the
        toricQuiver constructor
      * "toricQuiver(Matrix,List)" -- see toricQuiver, --
        the toricQuiver constructor
      * "toricQuiver(ToricQuiver)" -- see toricQuiver, --
        the toricQuiver constructor
      * "toricQuiver(ToricQuiver,List)" -- see toricQuiver,
        -- the toricQuiver constructor
      * ToricQuiver == ToricQuiver, --
        whether two toric quivers are equal.
      * ToricQuiver ^ List -- taking a subquiver by
        indexing
      * ToricQuiver _ List -- taking a subquiver
        by indexing
      * "wallType(List,Matrix)" -- see wallType, -- get the
        type of a wall for a given quiver
      * "wallType(List,ToricQuiver)" -- see wallType, -- get
        the type of a wall for a given quiver
  * Symbols
      * AsSubquiver
      * Flow
      * ReturnSingletons

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

The object ThinSincereQuivers, is a package (Macaulay2Doc).

ToricQuiver -- the ToricQuiver datatype
***************************************

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

The ToricQuiver data type is a type of Hash Table with the following keys:

  * IncidenceMatrix:matrix representation of the connected graph underlying the
    quiver
  * flow:              list of integers representing the flow associated to
    each edge of the quiver
  * Q0:                the list of vertices
  * Q1:                the list of edges
  * weights:           the values on each vertex induced by the flow

See also
========

  * toricQuiver -- the toricQuiver constructor
  * bipartiteQuiver -- make a toric quiver on
    underlying bipartite graph
  * threeVertexQuiver -- make a toric quiver on
    underlying graph with three vertices and a specified number of edges
    between each
  * chainQuiver -- make a toric quiver on underlying graph
    in the form of a chain

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

  * "mergeOnArrow(Matrix,ZZ,Matrix,ZZ)" -- see mergeOnArrow,
    -- join two quivers together by identifying an arrow from
    each
  * "mergeOnArrow(Matrix,ZZ,ToricQuiver,ZZ)" -- see mergeOnArrow,
    -- join two quivers together by identifying an arrow from
    each
  * "mergeOnArrow(ToricQuiver,ZZ,Matrix,ZZ)" -- see mergeOnArrow,
    -- join two quivers together by identifying an arrow from
    each
  * "mergeOnArrow(ToricQuiver,ZZ,ToricQuiver,ZZ)" -- see mergeOnArrow,
    -- join two quivers together by identifying an arrow from
    each
  * "mergeOnVertex(Matrix,ZZ,Matrix,ZZ)" -- see mergeOnVertex,
    -- join two quivers together by identifying a vertex from
    each
  * "mergeOnVertex(Matrix,ZZ,ToricQuiver,ZZ)" -- see mergeOnVertex,
    -- join two quivers together by identifying a vertex from
    each
  * "mergeOnVertex(ToricQuiver,ZZ,Matrix,ZZ)" -- see mergeOnVertex,
    -- join two quivers together by identifying a vertex from
    each
  * "mergeOnVertex(ToricQuiver,ZZ,ToricQuiver,ZZ)" -- see mergeOnVertex,
    -- join two quivers together by identifying a vertex from
    each
  * "threeVertexQuiver(List)" -- see threeVertexQuiver,
    -- make a toric quiver on underlying graph with three
    vertices and a specified number of edges between each
  * "toricQuiver(Graph)" -- see toricQuiver, -- the
    toricQuiver constructor
  * "toricQuiver(Graph,List)" -- see toricQuiver, -- the
    toricQuiver constructor
  * "toricQuiver(List)" -- see toricQuiver, -- the
    toricQuiver constructor
  * "toricQuiver(List,List)" -- see toricQuiver, -- the
    toricQuiver constructor
  * "toricQuiver(Matrix)" -- see toricQuiver, -- the
    toricQuiver constructor
  * "toricQuiver(Matrix,List)" -- see toricQuiver, -- the
    toricQuiver constructor
  * "toricQuiver(ToricQuiver)" -- see toricQuiver, -- the
    toricQuiver constructor
  * "toricQuiver(ToricQuiver,List)" -- see toricQuiver, --
    the toricQuiver constructor
  * ToricQuiver ^ List -- taking a subquiver by
    indexing
  * ToricQuiver _ List -- taking a subquiver by
    indexing

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

  * "basisForFlowPolytope(List,ToricQuiver)" -- see basisForFlowPolytope,
    -- compute the necessary basis vectors for the
    hyperplane of a flow polytope
  * "basisForFlowPolytope(ToricQuiver)" -- see basisForFlowPolytope,
    -- compute the necessary basis vectors for the
    hyperplane of a flow polytope
  * "flowPolytopeVertices(List,ToricQuiver)" -- see flowPolytopeVertices,
    -- generate the polytope associated to a toric quiver
  * "flowPolytopeVertices(ToricQuiver)" -- see flowPolytopeVertices,
    -- generate the polytope associated to a toric quiver
  * "getWeights(ToricQuiver)" -- see getWeights, -- image of
    the flow on the vertices
  * "incInverse(List,ToricQuiver)" -- see incInverse, --
    compute a flow in the preimage for a given weight
  * "isAcyclic(ToricQuiver)" -- see isAcyclic, -- whether a
    toric quiver has no cycles
  * "isClosedUnderArrows(List,ToricQuiver)" -- see isClosedUnderArrows,
    -- whether a subquiver closed under arrows
  * "isClosedUnderArrows(Matrix,ToricQuiver)" -- see isClosedUnderArrows,
    -- whether a subquiver closed under arrows
  * "isClosedUnderArrows(ToricQuiver,ToricQuiver)" -- see
    isClosedUnderArrows, -- whether a subquiver closed
    under arrows
  * "isSemistable(List,ToricQuiver)" -- see isSemistable,
    -- whether a subquiver is semistable with respect to a given weight
  * "isSemistable(ToricQuiver,ToricQuiver)" -- see isSemistable,
    -- whether a subquiver is semistable with respect to a given
    weight
  * "isStable(List,ToricQuiver)" -- see isStable, -- whether a
    subquiver is semistable with respect to a given weight
  * "isStable(ToricQuiver,ToricQuiver)" -- see isStable, --
    whether a subquiver is semistable with respect to a given weight
  * "isTight(List,ToricQuiver)" -- see isTight, -- determine if
    toric quiver is tight
  * "isTight(ToricQuiver)" -- see isTight, -- determine if toric
    quiver is tight
  * "isTight(ToricQuiver,List)" -- see isTight, -- determine if
    toric quiver is tight
  * "isWellDefined(ToricQuiver)" -- see isWellDefined, --
    determine if toric quiver is correctly constructed
  * "maxCodimensionUnstable(ToricQuiver)" -- see maxCodimensionUnstable,
    -- compute the maximal codimension of the unstable
    loci of a quiver
  * "potentialWalls(ToricQuiver)" -- see potentialWalls,
    -- lists the potential walls in the weight chamber decomposition for a
    given quiver
  * "quiverEdges(ToricQuiver)" -- see quiverEdges, -- return
    the graph edges associated to the toric quiver
  * "quiverFlow(ToricQuiver)" -- see quiverFlow, -- return
    the flow attribute associated to the toric quiver
  * "quiverIncidenceMatrix(ToricQuiver)" -- see quiverIncidenceMatrix,
    -- return the graph incidence matrix attribute
    associated to the toric quiver
  * "quiverVertices(ToricQuiver)" -- see quiverVertices,
    -- return the vertices of the toric quiver
  * "quiverWeights(ToricQuiver)" -- see quiverWeights, --
    return the weight attribute associated to the toric quiver
  * "samePolytope(List,List,ToricQuiver)" -- see samePolytope,
    -- whether two weights produce the same flow polytope
  * "subquivers(ToricQuiver)" -- see subquivers, -- return
    all possible subquivers of a given quiver
  * ToricQuiver == ToricQuiver -- whether
    two toric quivers are equal.
  * "wallType(List,ToricQuiver)" -- see wallType, -- get the
    type of a wall for a given quiver

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

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

Creating toric quivers
**********************

toric quivers are represented as a type of HashTable with the following keys:

  * IncidenceMatrix: weighted incidence matrix giving the vertex-edge
    connectivity structure of $Q$
  * Q0: list of vertices
  * Q1: list of edges
  * flow: list of integers giving the flow on each edge
  * weights: induced weights on vertices given by the image of the flow

One can generate the quiver Q associated to the bipartite graph K_{2,3} with a
random flow w as follows:

+------------------------------------------------------------------------+
|i1 : Q0 = {{0,2},{0,3},{0,4},{1,2},{1,3},{1,4}}                         |
|                                                                        |
|o1 = {{0, 2}, {0, 3}, {0, 4}, {1, 2}, {1, 3}, {1, 4}}                   |
|                                                                        |
|o1 : List                                                               |
+------------------------------------------------------------------------+
|i2 : Q = toricQuiver(Q0, Flow => "Random")                              |
|                                                                        |
|o2 = ToricQuiver{flow => {8, 1, 3, 7, 8, 3}                            }|
|                 IncidenceMatrix => | -1 -1 -1 0  0  0  |               |
|                                    | 0  0  0  -1 -1 -1 |               |
|                                    | 1  0  0  1  0  0  |               |
|                                    | 0  1  0  0  1  0  |               |
|                                    | 0  0  1  0  0  1  |               |
|                 Q0 => {0, 1, 2, 3, 4}                                  |
|                 Q1 => {{0, 2}, {0, 3}, {0, 4}, {1, 2}, {1, 3}, {1, 4}} |
|                 synonym => toric quiver                                |
|                 weights => {-12, -18, 15, 9, 6}                        |
|                                                                        |
|o2 : ToricQuiver                                                        |
+------------------------------------------------------------------------+

Alternatively, one can construct a toric quiver using any of the following
constructions:

create a toric quiver from matrix

+----------------------------------------------------------------+
|i3 : Q = toricQuiver matrix({{-1,-1,-1,-1},{1,1,0,0},{0,0,1,1}})|
|                                                                |
|o3 = ToricQuiver{flow => {1, 1, 1, 1}                  }        |
|                 IncidenceMatrix => | -1 -1 -1 -1 |             |
|                                    | 1  1  0  0  |             |
|                                    | 0  0  1  1  |             |
|                 Q0 => {0, 1, 2}                                |
|                 Q1 => {{0, 1}, {0, 1}, {0, 2}, {0, 2}}         |
|                 synonym => toric quiver                        |
|                 weights => {-4, 2, 2}                          |
|                                                                |
|o3 : ToricQuiver                                                |
+----------------------------------------------------------------+

create a toric quiver from matrix with specified flow

+-----------------------------------------------------------------------------+
|i4 : Q = toricQuiver(matrix({{-1,-1,-1,-1},{1,1,0,0},{0,0,1,1}}), {3, 1, 0,  |
|                                                                             |
|o4 = ToricQuiver{flow => {3, 1, 0, 5}                  }                     |
|                 IncidenceMatrix => | -1 -1 -1 -1 |                          |
|                                    | 1  1  0  0  |                          |
|                                    | 0  0  1  1  |                          |
|                 Q0 => {0, 1, 2}                                             |
|                 Q1 => {{0, 1}, {0, 1}, {0, 2}, {0, 2}}                      |
|                 synonym => toric quiver                                     |
|                 weights => {-9, 4, 5}                                       |
|                                                                             |
|o4 : ToricQuiver                                                             |
|-----------------------------------------------------------------------------|
|5})                                                                          |
+-----------------------------------------------------------------------------+

create a toric quiver from a list of edges

+--------------------------------------------------------+
|i5 : Q = toricQuiver {{0,1},{0,1},{0,2},{0,2}}          |
|                                                        |
|o5 = ToricQuiver{flow => {1, 1, 1, 1}                  }|
|                 IncidenceMatrix => | -1 -1 -1 -1 |     |
|                                    | 1  1  0  0  |     |
|                                    | 0  0  1  1  |     |
|                 Q0 => {0, 1, 2}                        |
|                 Q1 => {{0, 1}, {0, 1}, {0, 2}, {0, 2}} |
|                 synonym => toric quiver                |
|                 weights => {-4, 2, 2}                  |
|                                                        |
|o5 : ToricQuiver                                        |
+--------------------------------------------------------+

create a toric quiver from a list of edges and a flow

+-----------------------------------------------------------+
|i6 : Q = toricQuiver ({{0,1},{0,1},{0,2},{0,2}}, {1,2,3,4})|
|                                                           |
|o6 = ToricQuiver{flow => {1, 2, 3, 4}                  }   |
|                 IncidenceMatrix => | -1 -1 -1 -1 |        |
|                                    | 1  1  0  0  |        |
|                                    | 0  0  1  1  |        |
|                 Q0 => {0, 1, 2}                           |
|                 Q1 => {{0, 1}, {0, 1}, {0, 2}, {0, 2}}    |
|                 synonym => toric quiver                   |
|                 weights => {-10, 3, 7}                    |
|                                                           |
|o6 : ToricQuiver                                           |
+-----------------------------------------------------------+

create a toric quiver from a matrix with keyword flow

+-----------------------------------------------------------------------------+
|i7 : Q = toricQuiver(matrix({{-1,-1,-1,-1},{1,1,0,0},{0,0,1,1}}), Flow =>    |
|                                                                             |
|o7 = ToricQuiver{flow => {1, 1, 1, 1}                  }                     |
|                 IncidenceMatrix => | -1 -1 -1 -1 |                          |
|                                    | 1  1  0  0  |                          |
|                                    | 0  0  1  1  |                          |
|                 Q0 => {0, 1, 2}                                             |
|                 Q1 => {{0, 1}, {0, 1}, {0, 2}, {0, 2}}                      |
|                 synonym => toric quiver                                     |
|                 weights => {-4, 2, 2}                                       |
|                                                                             |
|o7 : ToricQuiver                                                             |
|-----------------------------------------------------------------------------|
|"Canonical")                                                                 |
+-----------------------------------------------------------------------------+

create a toric quiver from a matrix with random flow

+-----------------------------------------------------------------------------+
|i8 : Q = toricQuiver(matrix({{-1,-1,-1,-1},{0,0,1,1},{1,1,0,0}}), Flow =>    |
|                                                                             |
|o8 = ToricQuiver{flow => {8, 8, 3, 7}                  }                     |
|                 IncidenceMatrix => | -1 -1 -1 -1 |                          |
|                                    | 1  1  0  0  |                          |
|                                    | 0  0  1  1  |                          |
|                 Q0 => {0, 1, 2}                                             |
|                 Q1 => {{0, 1}, {0, 1}, {0, 2}, {0, 2}}                      |
|                 synonym => toric quiver                                     |
|                 weights => {-26, 16, 10}                                    |
|                                                                             |
|o8 : ToricQuiver                                                             |
|-----------------------------------------------------------------------------|
|"Random")                                                                    |
+-----------------------------------------------------------------------------+

create a toric quiver copied from another one

+--------------------------------------------------------+
|i9 : R = toricQuiver(Q)                                 |
|                                                        |
|o9 = ToricQuiver{flow => {8, 8, 3, 7}                  }|
|                 IncidenceMatrix => | -1 -1 -1 -1 |     |
|                                    | 1  1  0  0  |     |
|                                    | 0  0  1  1  |     |
|                 Q0 => {0, 1, 2}                        |
|                 Q1 => {{0, 1}, {0, 1}, {0, 2}, {0, 2}} |
|                 synonym => toric quiver                |
|                 weights => {-26, 16, 10}               |
|                                                        |
|o9 : ToricQuiver                                        |
+--------------------------------------------------------+

create a toric quiver copied from another, but with alternative flow

+---------------------------------------------------------+
|i10 : R = toricQuiver(Q, {1,2,3,4})                      |
|                                                         |
|o10 = ToricQuiver{flow => {1, 2, 3, 4}                  }|
|                  IncidenceMatrix => | -1 -1 -1 -1 |     |
|                                     | 1  1  0  0  |     |
|                                     | 0  0  1  1  |     |
|                  Q0 => {0, 1, 2}                        |
|                  Q1 => {{0, 1}, {0, 1}, {0, 2}, {0, 2}} |
|                  synonym => toric quiver                |
|                  weights => {-10, 3, 7}                 |
|                                                         |
|o10 : ToricQuiver                                        |
+---------------------------------------------------------+

Creating subquiver representations
**********************************

A subquiver is a subgraph of a quiver. Specifically, it is formed by selecting
a subset $I$ of the arrows from the original quiver, ensuring that the tails
and heads of the chosen arrows align with the selected vertices. In this
context, there are two ways to approach a subquiver. One approach is to recall
the original quiver and represent the subquiver as a subset of its arrows and
vertices, denoted as $Q^I$. The flow of the resultant quiver will be zero along
the arrows not in $I$. Alternatively, we can disregard the original quiver and
focus solely on the arrows and vertices of the new subquiver, represented as
$Q_I$. The weight of the new quiver $Q_I$ is derived from the flows of the
original quiver $Q$.

The two methods corresponding to these ideas are referenced in the examples
below.

+------------------------------------------------------------------------+
|i1 : Q = bipartiteQuiver(2, 3)                                          |
|                                                                        |
|o1 = ToricQuiver{flow => {1, 1, 1, 1, 1, 1}                            }|
|                 IncidenceMatrix => | -1 -1 -1 0  0  0  |               |
|                                    | 0  0  0  -1 -1 -1 |               |
|                                    | 1  0  0  1  0  0  |               |
|                                    | 0  1  0  0  1  0  |               |
|                                    | 0  0  1  0  0  1  |               |
|                 Q0 => {0, 1, 2, 3, 4}                                  |
|                 Q1 => {{0, 2}, {0, 3}, {0, 4}, {1, 2}, {1, 3}, {1, 4}} |
|                 synonym => toric quiver                                |
|                 weights => {-3, -3, 2, 2, 2}                           |
|                                                                        |
|o1 : ToricQuiver                                                        |
+------------------------------------------------------------------------+
|i2 : Q_{0,1,3}                                                          |
|                                                                        |
|o2 = ToricQuiver{flow => {1, 1, 1}              }                       |
|                 IncidenceMatrix => | -1 -1 0  |                        |
|                                    | 0  0  -1 |                        |
|                                    | 1  0  1  |                        |
|                                    | 0  1  0  |                        |
|                 Q0 => {0, 1, 2, 3}                                     |
|                 Q1 => {{0, 2}, {0, 3}, {1, 2}}                         |
|                 synonym => toric quiver                                |
|                 weights => {-2, -1, 2, 1}                              |
|                                                                        |
|o2 : ToricQuiver                                                        |
+------------------------------------------------------------------------+
|i3 : Q^{0,1,3}                                                          |
|                                                                        |
|o3 = ToricQuiver{flow => {1, 1, 0, 1, 0, 0}                            }|
|                 IncidenceMatrix => | -1 -1 -1 0  0  0  |               |
|                                    | 0  0  0  -1 -1 -1 |               |
|                                    | 1  0  0  1  0  0  |               |
|                                    | 0  1  0  0  1  0  |               |
|                                    | 0  0  1  0  0  1  |               |
|                 Q0 => {0, 1, 2, 3, 4}                                  |
|                 Q1 => {{0, 2}, {0, 3}, {0, 4}, {1, 2}, {1, 3}, {1, 4}} |
|                 synonym => toric quiver                                |
|                 weights => {-2, -1, 2, 1, 0}                           |
|                                                                        |
|o3 : ToricQuiver                                                        |
+------------------------------------------------------------------------+

See also
========

  * ToricQuiver ^ List -- taking a subquiver by
    indexing
  * ToricQuiver _ List -- taking a subquiver by
    indexing

toricQuiver -- the toricQuiver constructor
******************************************

Synopsis
========

  * Usage:
        Q = toricQuiver E
        Q = toricQuiver (E, F)
        Q = toricQuiver M
        Q = toricQuiver (M, F)
        Q = toricQuiver G
        Q = toricQuiver (G, F)
        Q = toricQuiver T
        Q = toricQuiver (T, F)
  * Inputs:
      * E, a list (Macaulay2Doc), of pairs (V1, V2) giving the
        edges of the quiver in terms of the vertices
      * F, a list (Macaulay2Doc), the flow on the quiver given as a
        list of integers
      * G, a graph (Graphs),
      * M, a matrix (Macaulay2Doc), of integers giving the
        connectivity structure of the quiver
      * T, an instance of the type ToricQuiver,
  * Optional inputs (Macaulay2Doc),:
      * Flow => a string (Macaulay2Doc), default value "Default",
        that specifies the flow for the polytope. options are Default, which
        takes the flow from values in the matrix, Canonical, which sets the
        flow to 1 for each edge, and Random, which assigns a random integer
        between 0 and 100 to each edge
  * Outputs:
      * Q, an instance of the type ToricQuiver,

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

A toric quiver is a directed graph Q=(Q_0, Q_1)  where Q_0 is the set of
vertices associated to Q and Q_1 is the set of arrows. Also included in $Q$ is
a flow, which associates an integer value to each edge. The canonical flow
gives a weight of 1 to each edge.

the ToricQuiver data type is stored as a hash table with the following keys:

  * IncidenceMatrix:matrix representation of the connected graph underlying the
    quiver
  * flow:              list of integers representing the flow associated to
    each edge of the quiver
  * Q0:                the list of vertices
  * Q1:                the list of edges
  * weights:           the values on each vertex induced by the flow

+-----------------------------------------------------------------------------+
|i1 : Q = toricQuiver matrix({{-1,-1,-1,-1},{1,1,0,0},{0,0,1,1}})             |
|                                                                             |
|o1 = ToricQuiver{flow => {1, 1, 1, 1}                  }                     |
|                 IncidenceMatrix => | -1 -1 -1 -1 |                          |
|                                    | 1  1  0  0  |                          |
|                                    | 0  0  1  1  |                          |
|                 Q0 => {0, 1, 2}                                             |
|                 Q1 => {{0, 1}, {0, 1}, {0, 2}, {0, 2}}                      |
|                 synonym => toric quiver                                     |
|                 weights => {-4, 2, 2}                                       |
|                                                                             |
|o1 : ToricQuiver                                                             |
+-----------------------------------------------------------------------------+
|i2 : Q = toricQuiver(matrix({{-1,-1,-1,-1},{1,1,0,0},{0,0,1,1}}), {3, 1, 0,  |
|                                                                             |
|o2 = ToricQuiver{flow => {3, 1, 0, 5}                  }                     |
|                 IncidenceMatrix => | -1 -1 -1 -1 |                          |
|                                    | 1  1  0  0  |                          |
|                                    | 0  0  1  1  |                          |
|                 Q0 => {0, 1, 2}                                             |
|                 Q1 => {{0, 1}, {0, 1}, {0, 2}, {0, 2}}                      |
|                 synonym => toric quiver                                     |
|                 weights => {-9, 4, 5}                                       |
|                                                                             |
|o2 : ToricQuiver                                                             |
|-----------------------------------------------------------------------------|
|5})                                                                          |
+-----------------------------------------------------------------------------+
|i3 : Q = toricQuiver {{0,1},{0,1},{0,2},{0,2}}                               |
|                                                                             |
|o3 = ToricQuiver{flow => {1, 1, 1, 1}                  }                     |
|                 IncidenceMatrix => | -1 -1 -1 -1 |                          |
|                                    | 1  1  0  0  |                          |
|                                    | 0  0  1  1  |                          |
|                 Q0 => {0, 1, 2}                                             |
|                 Q1 => {{0, 1}, {0, 1}, {0, 2}, {0, 2}}                      |
|                 synonym => toric quiver                                     |
|                 weights => {-4, 2, 2}                                       |
|                                                                             |
|o3 : ToricQuiver                                                             |
+-----------------------------------------------------------------------------+
|i4 : Q = toricQuiver ({{0,1},{0,1},{0,2},{0,2}}, {1,2,3,4})                  |
|                                                                             |
|o4 = ToricQuiver{flow => {1, 2, 3, 4}                  }                     |
|                 IncidenceMatrix => | -1 -1 -1 -1 |                          |
|                                    | 1  1  0  0  |                          |
|                                    | 0  0  1  1  |                          |
|                 Q0 => {0, 1, 2}                                             |
|                 Q1 => {{0, 1}, {0, 1}, {0, 2}, {0, 2}}                      |
|                 synonym => toric quiver                                     |
|                 weights => {-10, 3, 7}                                      |
|                                                                             |
|o4 : ToricQuiver                                                             |
+-----------------------------------------------------------------------------+
|i5 : Q = toricQuiver(matrix({{-1,-1,-1,-1},{1,1,0,0},{0,0,1,1}}), Flow =>    |
|                                                                             |
|o5 = ToricQuiver{flow => {1, 1, 1, 1}                  }                     |
|                 IncidenceMatrix => | -1 -1 -1 -1 |                          |
|                                    | 1  1  0  0  |                          |
|                                    | 0  0  1  1  |                          |
|                 Q0 => {0, 1, 2}                                             |
|                 Q1 => {{0, 1}, {0, 1}, {0, 2}, {0, 2}}                      |
|                 synonym => toric quiver                                     |
|                 weights => {-4, 2, 2}                                       |
|                                                                             |
|o5 : ToricQuiver                                                             |
|-----------------------------------------------------------------------------|
|"Canonical")                                                                 |
+-----------------------------------------------------------------------------+
|i6 : Q = toricQuiver(matrix({{-1,-1,-1,-1},{0,0,1,1},{1,1,0,0}}), Flow =>    |
|                                                                             |
|o6 = ToricQuiver{flow => {3, 7, 8, 1}                  }                     |
|                 IncidenceMatrix => | -1 -1 -1 -1 |                          |
|                                    | 1  1  0  0  |                          |
|                                    | 0  0  1  1  |                          |
|                 Q0 => {0, 1, 2}                                             |
|                 Q1 => {{0, 1}, {0, 1}, {0, 2}, {0, 2}}                      |
|                 synonym => toric quiver                                     |
|                 weights => {-19, 10, 9}                                     |
|                                                                             |
|o6 : ToricQuiver                                                             |
|-----------------------------------------------------------------------------|
|"Random")                                                                    |
+-----------------------------------------------------------------------------+
|i7 : R = toricQuiver(Q)                                                      |
|                                                                             |
|o7 = ToricQuiver{flow => {3, 7, 8, 1}                  }                     |
|                 IncidenceMatrix => | -1 -1 -1 -1 |                          |
|                                    | 1  1  0  0  |                          |
|                                    | 0  0  1  1  |                          |
|                 Q0 => {0, 1, 2}                                             |
|                 Q1 => {{0, 1}, {0, 1}, {0, 2}, {0, 2}}                      |
|                 synonym => toric quiver                                     |
|                 weights => {-19, 10, 9}                                     |
|                                                                             |
|o7 : ToricQuiver                                                             |
+-----------------------------------------------------------------------------+
|i8 : R = toricQuiver(Q, {1,2,3,4})                                           |
|                                                                             |
|o8 = ToricQuiver{flow => {1, 2, 3, 4}                  }                     |
|                 IncidenceMatrix => | -1 -1 -1 -1 |                          |
|                                    | 1  1  0  0  |                          |
|                                    | 0  0  1  1  |                          |
|                 Q0 => {0, 1, 2}                                             |
|                 Q1 => {{0, 1}, {0, 1}, {0, 2}, {0, 2}}                      |
|                 synonym => toric quiver                                     |
|                 weights => {-10, 3, 7}                                      |
|                                                                             |
|o8 : ToricQuiver                                                             |
+-----------------------------------------------------------------------------+

See also
========

  * bipartiteQuiver -- make a toric quiver on
    underlying bipartite graph

Ways to use toricQuiver:
========================

  * "toricQuiver(Graph)"
  * "toricQuiver(Graph,List)"
  * "toricQuiver(List)"
  * "toricQuiver(List,List)"
  * "toricQuiver(Matrix)"
  * "toricQuiver(Matrix,List)"
  * "toricQuiver(ToricQuiver)"
  * "toricQuiver(ToricQuiver,List)"

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

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

ToricQuiver _ List -- taking a subquiver by indexing
****************************************************

Synopsis
========

  * Operator: _ (Macaulay2Doc),
  * Usage:
        Q_L
  * Inputs:
      * Q, an instance of the type ToricQuiver,
      * L, a list (Macaulay2Doc), of integers specifying which
        arrows to subset
  * Outputs:
      * S, an instance of the type ToricQuiver, the
        subquiver in question

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

This method returns a the subquiver of the quiver Q that is made up of the
arrows in the list L. Note that this method re-orders the subquiver labels to
create a standalone quiver. To retain the original quiver labels on the
subquiver, see the SeeAlso.

+------------------------------------------------------------------------+
|i1 : Q = bipartiteQuiver(2, 3)                                          |
|                                                                        |
|o1 = ToricQuiver{flow => {1, 1, 1, 1, 1, 1}                            }|
|                 IncidenceMatrix => | -1 -1 -1 0  0  0  |               |
|                                    | 0  0  0  -1 -1 -1 |               |
|                                    | 1  0  0  1  0  0  |               |
|                                    | 0  1  0  0  1  0  |               |
|                                    | 0  0  1  0  0  1  |               |
|                 Q0 => {0, 1, 2, 3, 4}                                  |
|                 Q1 => {{0, 2}, {0, 3}, {0, 4}, {1, 2}, {1, 3}, {1, 4}} |
|                 synonym => toric quiver                                |
|                 weights => {-3, -3, 2, 2, 2}                           |
|                                                                        |
|o1 : ToricQuiver                                                        |
+------------------------------------------------------------------------+
|i2 : Q_{0,1,3}                                                          |
|                                                                        |
|o2 = ToricQuiver{flow => {1, 1, 1}              }                       |
|                 IncidenceMatrix => | -1 -1 0  |                        |
|                                    | 0  0  -1 |                        |
|                                    | 1  0  1  |                        |
|                                    | 0  1  0  |                        |
|                 Q0 => {0, 1, 2, 3}                                     |
|                 Q1 => {{0, 2}, {0, 3}, {1, 2}}                         |
|                 synonym => toric quiver                                |
|                 weights => {-2, -1, 2, 1}                              |
|                                                                        |
|o2 : ToricQuiver                                                        |
+------------------------------------------------------------------------+

See also
========

  * ToricQuiver ^ List -- taking a subquiver by
    indexing

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

  * ToricQuiver _ List -- taking a subquiver by
    indexing

ToricQuiver ^ List -- taking a subquiver by indexing
****************************************************

Synopsis
========

  * Operator: ^ (Macaulay2Doc),
  * Usage:
        Q^L
  * Inputs:
      * Q, an instance of the type ToricQuiver,
      * L, a list (Macaulay2Doc), of integers specifying which
        arrows to subset
  * Outputs:
      * S, an instance of the type ToricQuiver, the
        subquiver in question

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

This method returns a the subquiver of the quiver Q that is made up of the
arrows in the list L.

+------------------------------------------------------------------------+
|i1 : Q = bipartiteQuiver(2, 3)                                          |
|                                                                        |
|o1 = ToricQuiver{flow => {1, 1, 1, 1, 1, 1}                            }|
|                 IncidenceMatrix => | -1 -1 -1 0  0  0  |               |
|                                    | 0  0  0  -1 -1 -1 |               |
|                                    | 1  0  0  1  0  0  |               |
|                                    | 0  1  0  0  1  0  |               |
|                                    | 0  0  1  0  0  1  |               |
|                 Q0 => {0, 1, 2, 3, 4}                                  |
|                 Q1 => {{0, 2}, {0, 3}, {0, 4}, {1, 2}, {1, 3}, {1, 4}} |
|                 synonym => toric quiver                                |
|                 weights => {-3, -3, 2, 2, 2}                           |
|                                                                        |
|o1 : ToricQuiver                                                        |
+------------------------------------------------------------------------+
|i2 : Q^{0,1,3}                                                          |
|                                                                        |
|o2 = ToricQuiver{flow => {1, 1, 0, 1, 0, 0}                            }|
|                 IncidenceMatrix => | -1 -1 -1 0  0  0  |               |
|                                    | 0  0  0  -1 -1 -1 |               |
|                                    | 1  0  0  1  0  0  |               |
|                                    | 0  1  0  0  1  0  |               |
|                                    | 0  0  1  0  0  1  |               |
|                 Q0 => {0, 1, 2, 3, 4}                                  |
|                 Q1 => {{0, 2}, {0, 3}, {0, 4}, {1, 2}, {1, 3}, {1, 4}} |
|                 synonym => toric quiver                                |
|                 weights => {-2, -1, 2, 1, 0}                           |
|                                                                        |
|o2 : ToricQuiver                                                        |
+------------------------------------------------------------------------+

See also
========

  * ToricQuiver _ List -- taking a subquiver by
    indexing

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

  * ToricQuiver ^ List -- taking a subquiver by
    indexing

ToricQuiver == ToricQuiver -- whether two toric quivers are equal.
******************************************************************

Synopsis
========

  * Operator: == (Macaulay2Doc),
  * Usage:
        Q1 == Q2
  * Inputs:
      * Q1, an instance of the type ToricQuiver,
      * Q2, an instance of the type ToricQuiver,
  * Outputs:
      * B, a Boolean value (Macaulay2Doc),

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

This method takes two toric quivers and returns the boolean of the statement Q1
is equal to Q2.

+------------------------------------------------------------------------+
|i1 : Q = bipartiteQuiver(2, 3)                                          |
|                                                                        |
|o1 = ToricQuiver{flow => {1, 1, 1, 1, 1, 1}                            }|
|                 IncidenceMatrix => | -1 -1 -1 0  0  0  |               |
|                                    | 0  0  0  -1 -1 -1 |               |
|                                    | 1  0  0  1  0  0  |               |
|                                    | 0  1  0  0  1  0  |               |
|                                    | 0  0  1  0  0  1  |               |
|                 Q0 => {0, 1, 2, 3, 4}                                  |
|                 Q1 => {{0, 2}, {0, 3}, {0, 4}, {1, 2}, {1, 3}, {1, 4}} |
|                 synonym => toric quiver                                |
|                 weights => {-3, -3, 2, 2, 2}                           |
|                                                                        |
|o1 : ToricQuiver                                                        |
+------------------------------------------------------------------------+
|i2 : R = bipartiteQuiver(2, 2)                                          |
|                                                                        |
|o2 = ToricQuiver{flow => {1, 1, 1, 1}                  }                |
|                 IncidenceMatrix => | -1 -1 0  0  |                     |
|                                    | 0  0  -1 -1 |                     |
|                                    | 1  0  1  0  |                     |
|                                    | 0  1  0  1  |                     |
|                 Q0 => {0, 1, 2, 3}                                     |
|                 Q1 => {{0, 2}, {0, 3}, {1, 2}, {1, 3}}                 |
|                 synonym => toric quiver                                |
|                 weights => {-2, -2, 2, 2}                              |
|                                                                        |
|o2 : ToricQuiver                                                        |
+------------------------------------------------------------------------+
|i3 : Q == R                                                             |
|                                                                        |
|o3 = false                                                              |
+------------------------------------------------------------------------+
+--------------------------------------------------------+
|i4 : Q = toricQuiver {{0, 2}, {0, 3}, {1, 2}, {1, 3}}   |
|                                                        |
|o4 = ToricQuiver{flow => {1, 1, 1, 1}                  }|
|                 IncidenceMatrix => | -1 -1 0  0  |     |
|                                    | 0  0  -1 -1 |     |
|                                    | 1  0  1  0  |     |
|                                    | 0  1  0  1  |     |
|                 Q0 => {0, 1, 2, 3}                     |
|                 Q1 => {{0, 2}, {0, 3}, {1, 2}, {1, 3}} |
|                 synonym => toric quiver                |
|                 weights => {-2, -2, 2, 2}              |
|                                                        |
|o4 : ToricQuiver                                        |
+--------------------------------------------------------+
|i5 : R = bipartiteQuiver(2, 2)                          |
|                                                        |
|o5 = ToricQuiver{flow => {1, 1, 1, 1}                  }|
|                 IncidenceMatrix => | -1 -1 0  0  |     |
|                                    | 0  0  -1 -1 |     |
|                                    | 1  0  1  0  |     |
|                                    | 0  1  0  1  |     |
|                 Q0 => {0, 1, 2, 3}                     |
|                 Q1 => {{0, 2}, {0, 3}, {1, 2}, {1, 3}} |
|                 synonym => toric quiver                |
|                 weights => {-2, -2, 2, 2}              |
|                                                        |
|o5 : ToricQuiver                                        |
+--------------------------------------------------------+
|i6 : Q == R                                             |
|                                                        |
|o6 = true                                               |
+--------------------------------------------------------+

See also
========

  * toricQuiver -- the toricQuiver constructor

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

  * ToricQuiver == ToricQuiver -- whether
    two toric quivers are equal.

bipartiteQuiver -- make a toric quiver on underlying bipartite graph
********************************************************************

Synopsis
========

  * Usage:
        bipartiteQuiver (N, M)
  * Inputs:
      * N, an integer (Macaulay2Doc), number of vertices that are
        sources
      * M, an integer (Macaulay2Doc), number of vertices that are
        sinks
  * Optional inputs (Macaulay2Doc),:
      * Flow => ..., default value "Canonical", specify what form of flow to
        use. This input can be either a string with values Canonical or Random,
        or else a list of integer values.
  * Outputs:
      * Q, an instance of the type ToricQuiver,

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

This function creates the unique toric quiver whose underlying graph is the
complete bipartite graph with N source vertices and M sink vertices.

+------------------------------------------------------------------------+
|i1 : Q = bipartiteQuiver (2, 3)                                         |
|                                                                        |
|o1 = ToricQuiver{flow => {1, 1, 1, 1, 1, 1}                            }|
|                 IncidenceMatrix => | -1 -1 -1 0  0  0  |               |
|                                    | 0  0  0  -1 -1 -1 |               |
|                                    | 1  0  0  1  0  0  |               |
|                                    | 0  1  0  0  1  0  |               |
|                                    | 0  0  1  0  0  1  |               |
|                 Q0 => {0, 1, 2, 3, 4}                                  |
|                 Q1 => {{0, 2}, {0, 3}, {0, 4}, {1, 2}, {1, 3}, {1, 4}} |
|                 synonym => toric quiver                                |
|                 weights => {-3, -3, 2, 2, 2}                           |
|                                                                        |
|o1 : ToricQuiver                                                        |
+------------------------------------------------------------------------+
|i2 : Q = bipartiteQuiver (2, 3, Flow => "Random")                       |
|                                                                        |
|o2 = ToricQuiver{flow => {8, 1, 3, 7, 8, 3}                            }|
|                 IncidenceMatrix => | -1 -1 -1 0  0  0  |               |
|                                    | 0  0  0  -1 -1 -1 |               |
|                                    | 1  0  0  1  0  0  |               |
|                                    | 0  1  0  0  1  0  |               |
|                                    | 0  0  1  0  0  1  |               |
|                 Q0 => {0, 1, 2, 3, 4}                                  |
|                 Q1 => {{0, 2}, {0, 3}, {0, 4}, {1, 2}, {1, 3}, {1, 4}} |
|                 synonym => toric quiver                                |
|                 weights => {-12, -18, 15, 9, 6}                        |
|                                                                        |
|o2 : ToricQuiver                                                        |
+------------------------------------------------------------------------+
|i3 : Q = bipartiteQuiver (2, 3, Flow => {1, 2, 1, 3, 1, 4})             |
|                                                                        |
|o3 = ToricQuiver{flow => {1, 2, 1, 3, 1, 4}                            }|
|                 IncidenceMatrix => | -1 -1 -1 0  0  0  |               |
|                                    | 0  0  0  -1 -1 -1 |               |
|                                    | 1  0  0  1  0  0  |               |
|                                    | 0  1  0  0  1  0  |               |
|                                    | 0  0  1  0  0  1  |               |
|                 Q0 => {0, 1, 2, 3, 4}                                  |
|                 Q1 => {{0, 2}, {0, 3}, {0, 4}, {1, 2}, {1, 3}, {1, 4}} |
|                 synonym => toric quiver                                |
|                 weights => {-4, -8, 4, 3, 5}                           |
|                                                                        |
|o3 : ToricQuiver                                                        |
+------------------------------------------------------------------------+

See also
========

  * toricQuiver -- the toricQuiver constructor

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

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

chainQuiver -- make a toric quiver on underlying graph in the form of a chain
*****************************************************************************

Synopsis
========

  * Usage:
        chainQuiver E
  * Inputs:
      * E, a list (Macaulay2Doc), number of edges linking each
        vertex to the next
  * Optional inputs (Macaulay2Doc),:
      * Flow => ..., default value "Canonical", specify what form of flow to
        use. This input can be either a string with values Canonical or Random,
        or else a list of integer values.
  * Outputs:
      * Q, an instance of the type ToricQuiver,

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

A chain quiver is a quiver where each vertex N is connected to its predecessor
vertex N - 1 by arrows pointing from N - 1 to N, and connected to its successor
vertex N + 1 by arrows pointing to N + 1. This results in a quiver in the shape
of a chain, where each pair of vertices along the chain is connected by a
variable number of edges.

+------------------------------------------------------------------------+
|i1 : Q = chainQuiver {1,2,3}                                            |
|                                                                        |
|o1 = ToricQuiver{flow => {1, 1, 1, 1, 1, 1}                            }|
|                 IncidenceMatrix => | -1 0  0  0  0  0  |               |
|                                    | 1  -1 -1 0  0  0  |               |
|                                    | 0  1  1  -1 -1 -1 |               |
|                                    | 0  0  0  1  1  1  |               |
|                 Q0 => {0, 1, 2, 3}                                     |
|                 Q1 => {{0, 1}, {1, 2}, {1, 2}, {2, 3}, {2, 3}, {2, 3}} |
|                 synonym => toric quiver                                |
|                 weights => {-1, -1, -1, 3}                             |
|                                                                        |
|o1 : ToricQuiver                                                        |
+------------------------------------------------------------------------+
|i2 : Q = chainQuiver ({1,2,3}, Flow => "Random")                        |
|                                                                        |
|o2 = ToricQuiver{flow => {8, 1, 3, 7, 8, 3}                            }|
|                 IncidenceMatrix => | -1 0  0  0  0  0  |               |
|                                    | 1  -1 -1 0  0  0  |               |
|                                    | 0  1  1  -1 -1 -1 |               |
|                                    | 0  0  0  1  1  1  |               |
|                 Q0 => {0, 1, 2, 3}                                     |
|                 Q1 => {{0, 1}, {1, 2}, {1, 2}, {2, 3}, {2, 3}, {2, 3}} |
|                 synonym => toric quiver                                |
|                 weights => {-8, 4, -14, 18}                            |
|                                                                        |
|o2 : ToricQuiver                                                        |
+------------------------------------------------------------------------+
|i3 : Q = chainQuiver ({1,2,3}, Flow => {1, 2, 1, 3, 1, 4})              |
|                                                                        |
|o3 = ToricQuiver{flow => {1, 2, 1, 3, 1, 4}                            }|
|                 IncidenceMatrix => | -1 0  0  0  0  0  |               |
|                                    | 1  -1 -1 0  0  0  |               |
|                                    | 0  1  1  -1 -1 -1 |               |
|                                    | 0  0  0  1  1  1  |               |
|                 Q0 => {0, 1, 2, 3}                                     |
|                 Q1 => {{0, 1}, {1, 2}, {1, 2}, {2, 3}, {2, 3}, {2, 3}} |
|                 synonym => toric quiver                                |
|                 weights => {-1, -2, -5, 8}                             |
|                                                                        |
|o3 : ToricQuiver                                                        |
+------------------------------------------------------------------------+

See also
========

  * toricQuiver -- the toricQuiver constructor

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

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

threeVertexQuiver -- make a toric quiver on underlying graph with three vertices and a specified number of edges between each
*****************************************************************************************************************************

Synopsis
========

  * Usage:
        threeVertexQuiver E
  * Inputs:
      * E, a list (Macaulay2Doc), number of edges between each pair
        of vertices
  * Optional inputs (Macaulay2Doc),:
      * Flow => ..., default value "Canonical", specify what form of flow to
        use. This input can be either a string with values Canonical or Random,
        or else a list of integer values.
  * Outputs:
      * Q, an instance of the type ToricQuiver,

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

This method can be used to create any quiver in the  family of quivers that can
be built by defining three vertices and any nonzero number of edges joining
each pair of edges

+------------------------------------------------------------------------+
|i1 : Q = threeVertexQuiver {1,2,3}                                      |
|                                                                        |
|o1 = ToricQuiver{flow => {1, 1, 1, 1, 1, 1}                            }|
|                 IncidenceMatrix => | -1 -1 -1 -1 0  0  |               |
|                                    | 1  0  0  0  -1 -1 |               |
|                                    | 0  1  1  1  1  1  |               |
|                 Q0 => {0, 1, 2}                                        |
|                 Q1 => {{0, 1}, {0, 2}, {0, 2}, {0, 2}, {1, 2}, {1, 2}} |
|                 synonym => toric quiver                                |
|                 weights => {-4, -1, 5}                                 |
|                                                                        |
|o1 : ToricQuiver                                                        |
+------------------------------------------------------------------------+
|i2 : Q = threeVertexQuiver ({1,2,3}, Flow => "Random")                  |
|                                                                        |
|o2 = ToricQuiver{flow => {8, 1, 3, 7, 8, 3}                            }|
|                 IncidenceMatrix => | -1 -1 -1 -1 0  0  |               |
|                                    | 1  0  0  0  -1 -1 |               |
|                                    | 0  1  1  1  1  1  |               |
|                 Q0 => {0, 1, 2}                                        |
|                 Q1 => {{0, 1}, {0, 2}, {0, 2}, {0, 2}, {1, 2}, {1, 2}} |
|                 synonym => toric quiver                                |
|                 weights => {-19, -3, 22}                               |
|                                                                        |
|o2 : ToricQuiver                                                        |
+------------------------------------------------------------------------+
|i3 : Q = threeVertexQuiver ({1,2,3}, Flow => {1, 2, 1, 3, 1, 4})        |
|                                                                        |
|o3 = ToricQuiver{flow => {1, 2, 1, 3, 1, 4}                            }|
|                 IncidenceMatrix => | -1 -1 -1 -1 0  0  |               |
|                                    | 1  0  0  0  -1 -1 |               |
|                                    | 0  1  1  1  1  1  |               |
|                 Q0 => {0, 1, 2}                                        |
|                 Q1 => {{0, 1}, {0, 2}, {0, 2}, {0, 2}, {1, 2}, {1, 2}} |
|                 synonym => toric quiver                                |
|                 weights => {-7, -4, 11}                                |
|                                                                        |
|o3 : ToricQuiver                                                        |
+------------------------------------------------------------------------+

See also
========

  * toricQuiver -- the toricQuiver constructor

Ways to use threeVertexQuiver:
==============================

  * "threeVertexQuiver(List)"

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

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

allSpanningTrees -- find the spanning trees of the underlying graph
*******************************************************************

Synopsis
========

  * Usage:
        allSpanningTrees Q
  * Inputs:
      * Q, an instance of the type ToricQuiver,
  * Outputs:
      * L, a list (Macaulay2Doc),

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

This method returns all of the spanning trees of the underlying graph of the
quiver Q. Trees are represented as lists of arrow indices.

The algorithm is a brute force one, which takes all size N - 1 subsets of the
quiver arrows, where N is the number of vertices in the quiver, and checks if
the result is a connected graph.

+-----------------------------------------------------------------------------+
|i1 : Q = bipartiteQuiver(2, 3)                                               |
|                                                                             |
|o1 = ToricQuiver{flow => {1, 1, 1, 1, 1, 1}                            }     |
|                 IncidenceMatrix => | -1 -1 -1 0  0  0  |                    |
|                                    | 0  0  0  -1 -1 -1 |                    |
|                                    | 1  0  0  1  0  0  |                    |
|                                    | 0  1  0  0  1  0  |                    |
|                                    | 0  0  1  0  0  1  |                    |
|                 Q0 => {0, 1, 2, 3, 4}                                       |
|                 Q1 => {{0, 2}, {0, 3}, {0, 4}, {1, 2}, {1, 3}, {1, 4}}      |
|                 synonym => toric quiver                                     |
|                 weights => {-3, -3, 2, 2, 2}                                |
|                                                                             |
|o1 : ToricQuiver                                                             |
+-----------------------------------------------------------------------------+
|i2 : allSpanningTrees(Q)                                                     |
|                                                                             |
|o2 = {{2, 3, 4, 5}, {1, 3, 4, 5}, {0, 3, 4, 5}, {0, 2, 4, 5}, {0, 1, 4, 5},  |
|     ------------------------------------------------------------------------|
|     {1, 2, 3, 5}, {0, 1, 3, 5}, {0, 1, 2, 5}, {1, 2, 3, 4}, {0, 2, 3, 4},   |
|     ------------------------------------------------------------------------|
|     {0, 1, 2, 4}, {0, 1, 2, 3}}                                             |
|                                                                             |
|o2 : List                                                                    |
+-----------------------------------------------------------------------------+

See also
========

  * toricQuiver -- the toricQuiver constructor

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

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

basisForFlowPolytope -- compute the necessary basis vectors for the hyperplane of a flow polytope
*************************************************************************************************

Synopsis
========

  * Usage:
        basisForFlowPolytope Q
        basisForFlowPolytope (T, Q)
  * Inputs:
      * Q, an instance of the type ToricQuiver,
      * T, a list (Macaulay2Doc), of edges comprising the spanning
        tree to use to generate the basis.
  * Outputs:
      * B, a matrix (Macaulay2Doc), whose rows are the basis
        vectors.

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

For a generic weight, theta, in $C(Q)$, the flow polytope has the same
dimension as the kernel of the inc map, which is $|Q_0| - |Q_1| + 1$. Moreover,
given a spanning tree of the quiver, there exists a natural basis for the
kernel of the inc map constructed from the combinatorics of the quiver, see
Dániel Joó, Toric Quiver Varieties, Ph.D thesis, 2015. (see
https://www.etd.ceu.edu/2015/joo_daniel.pdf ) Therefore, we can translate the
flow polytope to this kernel and express the polytope on such basis. With
basisForFlowPolytope Q, we calculate the basis for inc map from a spanning tree
of it. If none is provided, then one is randomly chosen.

+----------------------------------------------+
|i1 : basisForFlowPolytope bipartiteQuiver(2,3)|
|                                              |
|o1 = | -1 0  |                                |
|     | 0  -1 |                                |
|     | 1  1  |                                |
|     | 1  0  |                                |
|     | 0  1  |                                |
|     | -1 -1 |                                |
|                                              |
|              6       2                       |
|o1 : Matrix ZZ  <-- ZZ                        |
+----------------------------------------------+
+------------------------------------------------------------+
|i2 : basisForFlowPolytope ({0,1,4,5},  bipartiteQuiver(2,3))|
|                                                            |
|o2 = | 0  1  |                                              |
|     | 1  -1 |                                              |
|     | -1 0  |                                              |
|     | 0  -1 |                                              |
|     | -1 1  |                                              |
|     | 1  0  |                                              |
|                                                            |
|              6       2                                     |
|o2 : Matrix ZZ  <-- ZZ                                      |
+------------------------------------------------------------+

See also
========

  * flowPolytopeVertices -- generate the polytope
    associated to a toric quiver

Ways to use basisForFlowPolytope:
=================================

  * "basisForFlowPolytope(List,ToricQuiver)"
  * "basisForFlowPolytope(ToricQuiver)"

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

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

coneSystem -- compute the chamber decomposition of weights
**********************************************************

Synopsis
========

  * Usage:
        coneSystem Q
  * Inputs:
      * Q, an instance of the type ToricQuiver,
  * Outputs:
      * L, a list (Macaulay2Doc), of Cones

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

The set of weights th for which the polytope (Q,th) is nonempty lies in a fan
CQ. This fan is partitioned into cones by the walls of the toric quiver Q, and
for each partition there exists a unique flow polytope. For a detailed
discussion see Lutz Hille "Quivers, cones and polytopes", Linear algebra and
its applications 365 (2003): 215-237. (see
https://doi.org/10.1016/S0024-3795(02)00406-8 )

+-----------------------------------------------------------------------------+
|i1 : Q = toricQuiver {{0,1},{0,2},{0,3},{1,2},{1,3},{2,3}};                  |
+-----------------------------------------------------------------------------+
|i2 : CS = coneSystem Q                                                       |
|                                                                             |
|o2 = {Cone{...1...}, Cone{...1...}, Cone{...1...}, Cone{...1...},            |
|     ------------------------------------------------------------------------|
|     Cone{...1...}, Cone{...1...}, Cone{...1...}}                            |
|                                                                             |
|o2 : List                                                                    |
+-----------------------------------------------------------------------------+

See also
========

  * flowPolytopeVertices -- generate the polytope
    associated to a toric quiver

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

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

flowPolytopeVertices -- generate the polytope associated to a toric quiver
**************************************************************************

Synopsis
========

  * Usage:
        flowPolytopeVertices Q
        flowPolytopeVertices(W, Q)
  * Inputs:
      * Q, an instance of the type ToricQuiver,
      * W, a list (Macaulay2Doc), of integer values specifying a
        weight on the vertices
  * Optional inputs (Macaulay2Doc),:
      * Format => a string (Macaulay2Doc), default value
        "SimplifiedBasis", specifying what basis to use. The default value
        SimplifiedBasis returns the polytope in a basis giving the minimal
        degree necessary for polytope dimension.
  * Outputs:
      * Depending on the option for Format, this method returns a Matrix or
        List of Lists giving the coordinates of the vertices defining the flow
        polytope. If the flow polytope does not exist for the given weight.
        Then, it returns an empty list.

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

Associated with every acyclic toric quiver and weight pair is a flow polytope.
This polytope can be translated to the kernel of the inc map, so it is full
dimensional. By default, the output lists the vertices within this vector
space. To obtain the presentation in the original fiber, use Format =>
"FullBasis".

+---------------------------------------------------------+
|i1 : flowPolytopeVertices(bipartiteQuiver(2, 3))         |
|                                                         |
|o1 = {{-1, 1}, {-1, 0}, {1, -1}, {0, -1}, {1, 0}, {0, 1}}|
|                                                         |
|o1 : List                                                |
+---------------------------------------------------------+

We can vary the weight of the quiver to define the flow polytope

+---------------------------------------------------------------+
|i2 : flowPolytopeVertices({-3,-3,2,2,2}, bipartiteQuiver(2, 3))|
|                                                               |
|o2 = {{-1, 1}, {-1, 0}, {1, -1}, {0, -1}, {1, 0}, {0, 1}}      |
|                                                               |
|o2 : List                                                      |
+---------------------------------------------------------------+

The user can also recover the polytope $\Delta(Q,\theta)$ within the inverse of
the corresponding inc map, that is within $inc^{-1}(\theta)$.

+-----------------------------------------------------------------------------+
|i3 : flowPolytopeVertices( bipartiteQuiver(2, 3), Format => "FullBasis")     |
|                                                                             |
|o3 = {{2, 0, 1, 0, 2, 1}, {2, 1, 0, 0, 1, 2}, {0, 2, 1, 2, 0, 1}, {1, 2, 0,  |
|     ------------------------------------------------------------------------|
|     1, 0, 2}, {0, 1, 2, 2, 1, 0}, {1, 0, 2, 1, 2, 0}}                       |
|                                                                             |
|o3 : List                                                                    |
+-----------------------------------------------------------------------------+

See also
========

  * basisForFlowPolytope -- compute the necessary
    basis vectors for the hyperplane of a flow polytope

Ways to use flowPolytopeVertices:
=================================

  * "flowPolytopeVertices(List,ToricQuiver)"
  * "flowPolytopeVertices(ToricQuiver)"

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

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

incInverse -- compute a flow in the preimage for a given weight
***************************************************************

Synopsis
========

  * Usage:
        incInverse(W, Q)
  * Inputs:
      * W, a list (Macaulay2Doc), of integers, specifying the
        weight on each vertex
      * Q, an instance of the type ToricQuiver,
  * Outputs:
      * F, a list (Macaulay2Doc), giving a flow in the preimage of
        the input weight.

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

Every integral flow induces a weight on the vertices $Q_0$ as follows: Let $a
\in Q_1$ be an arrow. The symbol  $a^{+} \in Q_0$ denotes its head and the
symbol $a^{-} \in Q_0$ denotes its tail. The so called incidence map generates
a weight from the flow $\mathbf{w}$ by $$ \text{inc}(\mathbf{w})(i) :=
\sum_{a\in Q_1 \atop a^{+} = i} \mathbf{w}(a) - \sum_{a\in Q_1 \atop a^{-} = i}
\mathbf{w}(a) \quad \text{ for all } i \in Q_0. $$ The function incInverse
calculates a vector in the preimage of such a map.

+-------------------------------------------+
|i1 : Q = toricQuiver(bipartiteQuiver(2,3));|
+-------------------------------------------+
|i2 : th = {-5,-1,2,2,2};                   |
+-------------------------------------------+
|i3 : incInverse(th, Q)                     |
|                                           |
|o3 = {1, 2, 2, 1, 0, 0}                    |
|                                           |
|o3 : List                                  |
+-------------------------------------------+

See also
========

  * toricQuiver -- the toricQuiver constructor
  * getWeights -- image of the flow on the vertices

Ways to use incInverse:
=======================

  * "incInverse(List,ToricQuiver)"

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

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

isAcyclic -- whether a toric quiver has no cycles
*************************************************

Synopsis
========

  * Usage:
        isAcyclic M
        isAcyclic Q
  * Inputs:
      * Q, an instance of the type ToricQuiver,
  * Outputs:
      * a Boolean value (Macaulay2Doc),

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

This method determines whether a quiver is free from oriented cycles.

+------------------------------------+
|i1 : isAcyclic bipartiteQuiver(2, 3)|
|                                    |
|o1 = true                           |
+------------------------------------+
+-----------------------------------------------------------------------------+
|i2 : isAcyclic toricQuiver matrix({{-1, 1, -1, -1}, {1, -1, 0, 0}, {0, 0, 1, |
|                                                                             |
|o2 = false                                                                   |
|-----------------------------------------------------------------------------|
|1}})                                                                         |
+-----------------------------------------------------------------------------+

See also
========

  * toricQuiver -- the toricQuiver constructor

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

  * "isAcyclic(Matrix)"
  * "isAcyclic(ToricQuiver)"

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

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

isClosedUnderArrows -- whether a subquiver closed under arrows
**************************************************************

Synopsis
========

  * Usage:
        isClosedUnderArrows (M, V)
        isClosedUnderArrows (V, M)
        isClosedUnderArrows (V, Q)
        isClosedUnderArrows (M, Q)
        isClosedUnderArrows (SQ, Q)
  * Inputs:
      * M, a matrix (Macaulay2Doc), incidence matrix of subquiver
        or quiver to check
      * Q, an instance of the type ToricQuiver,
      * SQ, an instance of the type ToricQuiver, subquiver
        of Q to check
      * V, a list (Macaulay2Doc), set of vertices corresponding to
        the subquiver
  * Outputs:
      * a Boolean value (Macaulay2Doc), true if the subquiver is
        closed under arrows with respect to the quiver, and false otherwise.

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

checks that a set of vertices is closed under arrows with respect to the
toricQuiver Q. That is, for any $v\in V$, then any arrow in $Q_1$ with tail $v$
must have head in $V$ as well. Note that this does not require that $V\subset
Q_0$.

Note also that the attribute closed under arrows relates to the underlying
graph. Arrows with flow of 0 (which occur in cases where using the quiver
subset form: Q^S rather than Q_S) are considered as valid arrows.

+-----------------------------------------------------------+
|i1 : isClosedUnderArrows ({0, 2, 3}, bipartiteQuiver(2, 3))|
|                                                           |
|o1 = false                                                 |
+-----------------------------------------------------------+
|i2 : isClosedUnderArrows ({2, 3, 4}, bipartiteQuiver(2, 3))|
|                                                           |
|o2 = true                                                  |
+-----------------------------------------------------------+
+------------------------------------------------------------------------+
|i3 : Q = threeVertexQuiver {1, 2, 3}                                    |
|                                                                        |
|o3 = ToricQuiver{flow => {1, 1, 1, 1, 1, 1}                            }|
|                 IncidenceMatrix => | -1 -1 -1 -1 0  0  |               |
|                                    | 1  0  0  0  -1 -1 |               |
|                                    | 0  1  1  1  1  1  |               |
|                 Q0 => {0, 1, 2}                                        |
|                 Q1 => {{0, 1}, {0, 2}, {0, 2}, {0, 2}, {1, 2}, {1, 2}} |
|                 synonym => toric quiver                                |
|                 weights => {-4, -1, 5}                                 |
|                                                                        |
|o3 : ToricQuiver                                                        |
+------------------------------------------------------------------------+
|i4 : SQ = Q_{0,1}                                                       |
|                                                                        |
|o4 = ToricQuiver{flow => {1, 1}              }                          |
|                 IncidenceMatrix => | -1 -1 |                           |
|                                    | 1  0  |                           |
|                                    | 0  1  |                           |
|                 Q0 => {0, 1, 2}                                        |
|                 Q1 => {{0, 1}, {0, 2}}                                 |
|                 synonym => toric quiver                                |
|                 weights => {-2, 1, 1}                                  |
|                                                                        |
|o4 : ToricQuiver                                                        |
+------------------------------------------------------------------------+
|i5 : isClosedUnderArrows (SQ, Q)                                        |
|                                                                        |
|o5 = true                                                               |
+------------------------------------------------------------------------+
+------------------------------------------------------------------------+
|i6 : Q = threeVertexQuiver {1, 2, 3}                                    |
|                                                                        |
|o6 = ToricQuiver{flow => {1, 1, 1, 1, 1, 1}                            }|
|                 IncidenceMatrix => | -1 -1 -1 -1 0  0  |               |
|                                    | 1  0  0  0  -1 -1 |               |
|                                    | 0  1  1  1  1  1  |               |
|                 Q0 => {0, 1, 2}                                        |
|                 Q1 => {{0, 1}, {0, 2}, {0, 2}, {0, 2}, {1, 2}, {1, 2}} |
|                 synonym => toric quiver                                |
|                 weights => {-4, -1, 5}                                 |
|                                                                        |
|o6 : ToricQuiver                                                        |
+------------------------------------------------------------------------+
|i7 : SQ = Q^{0,1}                                                       |
|                                                                        |
|o7 = ToricQuiver{flow => {1, 1, 0, 0, 0, 0}                            }|
|                 IncidenceMatrix => | -1 -1 -1 -1 0  0  |               |
|                                    | 1  0  0  0  -1 -1 |               |
|                                    | 0  1  1  1  1  1  |               |
|                 Q0 => {0, 1, 2}                                        |
|                 Q1 => {{0, 1}, {0, 2}, {0, 2}, {0, 2}, {1, 2}, {1, 2}} |
|                 synonym => toric quiver                                |
|                 weights => {-2, 1, 1}                                  |
|                                                                        |
|o7 : ToricQuiver                                                        |
+------------------------------------------------------------------------+
|i8 : isClosedUnderArrows (SQ, Q)                                        |
|                                                                        |
|o8 = true                                                               |
+------------------------------------------------------------------------+

See also
========

  * toricQuiver -- the toricQuiver constructor

Ways to use isClosedUnderArrows:
================================

  * "isClosedUnderArrows(List,Matrix)"
  * "isClosedUnderArrows(List,ToricQuiver)"
  * "isClosedUnderArrows(Matrix,List)"
  * "isClosedUnderArrows(Matrix,ToricQuiver)"
  * "isClosedUnderArrows(ToricQuiver,ToricQuiver)"

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

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

isSemistable -- whether a subquiver is semistable with respect to a given weight
********************************************************************************

Synopsis
========

  * Usage:
        isSemistable (L, Q)
        isSemistable (sQ, Q)
  * Inputs:
      * L, a list (Macaulay2Doc), of the indices of arrows in Q
        that make up the subquiver in question
      * Q, an instance of the type ToricQuiver,
      * SQ, an instance of the type ToricQuiver, A
        subquiver of the quiver Q
  * Outputs:
      * a Boolean value (Macaulay2Doc), true if the subquiver is
        semistable, and false otherwise.

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

This function determines if a given subquiver is semistable with respect to the
weight saved on Q. A subquiver SQ of the quiver Q is semistable if for every
subset V of the vertices of Q that is also SQ-successor closed, the sum of the
weights associated to V is nonnegative.

+-------------------------------------------------+
|i1 : isSemistable ({0, 1}, bipartiteQuiver(2, 3))|
|                                                 |
|o1 = false                                       |
+-------------------------------------------------+
+----------------------------------------------------------+
|i2 : isSemistable ({0, 1, 3, 4, 5}, bipartiteQuiver(2, 3))|
|                                                          |
|o2 = true                                                 |
+----------------------------------------------------------+
+------------------------------------------------------------------------+
|i3 : Q = bipartiteQuiver(2, 3);                                         |
+------------------------------------------------------------------------+
|i4 : S = first(subquivers(Q, Format => "quiver", AsSubquiver => true))  |
|                                                                        |
|o4 = ToricQuiver{flow => {1, 0, 0, 0, 0, 0}                            }|
|                 IncidenceMatrix => | -1 -1 -1 0  0  0  |               |
|                                    | 0  0  0  -1 -1 -1 |               |
|                                    | 1  0  0  1  0  0  |               |
|                                    | 0  1  0  0  1  0  |               |
|                                    | 0  0  1  0  0  1  |               |
|                 Q0 => {0, 1, 2, 3, 4}                                  |
|                 Q1 => {{0, 2}, {0, 3}, {0, 4}, {1, 2}, {1, 3}, {1, 4}} |
|                 synonym => toric quiver                                |
|                 weights => {-1, 0, 1, 0, 0}                            |
|                                                                        |
|o4 : ToricQuiver                                                        |
+------------------------------------------------------------------------+
|i5 : isSemistable (S, Q)                                                |
|                                                                        |
|o5 = false                                                              |
+------------------------------------------------------------------------+

Ways to use isSemistable:
=========================

  * "isSemistable(List,ToricQuiver)"
  * "isSemistable(ToricQuiver,ToricQuiver)"

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

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

isStable -- whether a subquiver is semistable with respect to a given weight
****************************************************************************

Synopsis
========

  * Usage:
        isStable (L, Q)
        isStable (SQ, Q)
  * Inputs:
      * L, a list (Macaulay2Doc), of the indices of arrows in Q
        that make up the subquiver in question
      * Q, an instance of the type ToricQuiver,
      * SQ, an instance of the type ToricQuiver, A
        subquiver of the quiver Q
  * Outputs:
      * a Boolean value (Macaulay2Doc), true if the subquiver is
        stable, and false otherwise.

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

This function determines if a given subquiver is stable with respect to the
weight saved on Q. A subquiver SQ of the quiver Q is stable if for every subset
V of the vertices of Q that is also SQ-successor closed, the sum of the weights
associated to V is positive.

+-------------------------------+
|i1 : Q = bipartiteQuiver(2, 3);|
+-------------------------------+
|i2 : P = Q^{0,1,4,5};          |
+-------------------------------+
|i3 : isStable(P, Q)            |
|                               |
|o3 = true                      |
+-------------------------------+
+---------------------------------------------+
|i4 : isStable ({0, 1}, bipartiteQuiver(2, 3))|
|                                             |
|o4 = false                                   |
+---------------------------------------------+
+------------------------------------------------------------------------+
|i5 : Q = bipartiteQuiver(2, 3)                                          |
|                                                                        |
|o5 = ToricQuiver{flow => {1, 1, 1, 1, 1, 1}                            }|
|                 IncidenceMatrix => | -1 -1 -1 0  0  0  |               |
|                                    | 0  0  0  -1 -1 -1 |               |
|                                    | 1  0  0  1  0  0  |               |
|                                    | 0  1  0  0  1  0  |               |
|                                    | 0  0  1  0  0  1  |               |
|                 Q0 => {0, 1, 2, 3, 4}                                  |
|                 Q1 => {{0, 2}, {0, 3}, {0, 4}, {1, 2}, {1, 3}, {1, 4}} |
|                 synonym => toric quiver                                |
|                 weights => {-3, -3, 2, 2, 2}                           |
|                                                                        |
|o5 : ToricQuiver                                                        |
+------------------------------------------------------------------------+
|i6 : S = first(subquivers(Q, Format => "quiver", AsSubquiver => true))  |
|                                                                        |
|o6 = ToricQuiver{flow => {1, 0, 0, 0, 0, 0}                            }|
|                 IncidenceMatrix => | -1 -1 -1 0  0  0  |               |
|                                    | 0  0  0  -1 -1 -1 |               |
|                                    | 1  0  0  1  0  0  |               |
|                                    | 0  1  0  0  1  0  |               |
|                                    | 0  0  1  0  0  1  |               |
|                 Q0 => {0, 1, 2, 3, 4}                                  |
|                 Q1 => {{0, 2}, {0, 3}, {0, 4}, {1, 2}, {1, 3}, {1, 4}} |
|                 synonym => toric quiver                                |
|                 weights => {-1, 0, 1, 0, 0}                            |
|                                                                        |
|o6 : ToricQuiver                                                        |
+------------------------------------------------------------------------+
|i7 : isStable (S, Q)                                                    |
|                                                                        |
|o7 = false                                                              |
+------------------------------------------------------------------------+

Ways to use isStable:
=====================

  * "isStable(List,ToricQuiver)"
  * "isStable(ToricQuiver,ToricQuiver)"

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

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

isTight -- determine if toric quiver is tight
*********************************************

Synopsis
========

  * Usage:
        isTight Q
        isTight(Q, W)
        isTight(W, Q)
        isTight(W, Q, Format => "Flow")
        isTight(W, Q, Format => "Weight")
  * Inputs:
      * Q, an instance of the type ToricQuiver,
      * W, a list (Macaulay2Doc),
  * Optional inputs (Macaulay2Doc),:
      * Format => ..., default value "Flow", specify whether input W is a flow
        (integer values associated to each arrow) or the image of the flow
        under the map weights (integer values associated to each vertex).
  * Outputs:
      * a Boolean value (Macaulay2Doc), true if the toric quiver
        is tight with respect to the specified flow, and false otherwise

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

A toric quiver $Q$ is tight with respect to a given flow if there is no maximal
unstable subquiver of codimension 1. That is, every unstable subquiver of $Q$
has at most $|Q_1|-2$ arrows. This method determines if a toric quiver $Q$ is
tight with respect to the vertex weights induced by its flow.

+----------------------------------+
|i1 : isTight bipartiteQuiver(2, 3)|
|                                  |
|o1 = true                         |
+----------------------------------+
+----------------------------------------------------+
|i2 : isTight bipartiteQuiver(2, 3, Flow => "Random")|
|                                                    |
|o2 = false                                          |
+----------------------------------------------------+
+---------------------------------------------------+
|i3 : isTight (bipartiteQuiver(2, 3), {2,1,2,3,2,3})|
|                                                   |
|o3 = true                                          |
+---------------------------------------------------+
+---------------------------------------------------+
|i4 : isTight ({0,0,0,0,0,1}, bipartiteQuiver(2, 3))|
|                                                   |
|o4 = false                                         |
+---------------------------------------------------+

Ways to use isTight:
====================

  * "isTight(List,ToricQuiver)"
  * "isTight(ToricQuiver)"
  * "isTight(ToricQuiver,List)"

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

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

isWellDefined -- determine if toric quiver is correctly constructed
*******************************************************************

Synopsis
========

  * Usage:
        isWellDefined Q
  * Inputs:
      * Q, an instance of the type ToricQuiver,
  * Outputs:
      * a Boolean value (Macaulay2Doc), true if the vertices and
        edges of the toric quiver agree, and if the flow for the quiver is a
        preimage for the weight. Otherwise, false.

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

This method checks that the various attributes associated to the given toric
quiver are in the correct dimension. It also checks that the weights for the
quiver are induced by the flow, and that the vertices and edges are constructed
without gaps or missing data.

+----------------------------------------------------+
|i1 : isTight bipartiteQuiver(2, 3, Flow => "Random")|
|                                                    |
|o1 = false                                          |
+----------------------------------------------------+

Ways to use isWellDefined:
==========================

  * "isWellDefined(ToricQuiver)"

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

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

makeTight -- return a tight quiver with the same flow polytope
**************************************************************

Synopsis
========

  * Usage:
        makeTight(W, Q)
  * Inputs:
      * W, a list (Macaulay2Doc), of values corresponding to a
        weight on each arrow of Q
      * Q, an instance of the type ToricQuiver,
  * Outputs:
      * Q, an instance of the type ToricQuiver, that is
        tight with respect to the flow on the input, and which has the same
        flow polytope as the input.

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

Let $\theta$ be an integral weight assigned to the vertices of a quiver $Q$.
The quiver $Q$ is called $\theta$-tight if for every arrow $\alpha$, the
subquiver $Q\setminus \alpha$ is $\theta$-stable. Every quiver can be tightened
by contraction of certain arrows in Q and changing the weight accordingly, see
Section 4 at Altmann, Klaus, and Duco van Straten. "Smoothing of quiver
varieties." manuscripta mathematica 129 (2009): 211-230. (see
https://link.springer.com/article/10.1007/s00229-009-0255-6 )

+------------------------------------------------------------------------+
|i1 : Q = bipartiteQuiver(2,3)                                           |
|                                                                        |
|o1 = ToricQuiver{flow => {1, 1, 1, 1, 1, 1}                            }|
|                 IncidenceMatrix => | -1 -1 -1 0  0  0  |               |
|                                    | 0  0  0  -1 -1 -1 |               |
|                                    | 1  0  0  1  0  0  |               |
|                                    | 0  1  0  0  1  0  |               |
|                                    | 0  0  1  0  0  1  |               |
|                 Q0 => {0, 1, 2, 3, 4}                                  |
|                 Q1 => {{0, 2}, {0, 3}, {0, 4}, {1, 2}, {1, 3}, {1, 4}} |
|                 synonym => toric quiver                                |
|                 weights => {-3, -3, 2, 2, 2}                           |
|                                                                        |
|o1 : ToricQuiver                                                        |
+------------------------------------------------------------------------+
|i2 : w = {-5,-1,2,2,2}                                                  |
|                                                                        |
|o2 = {-5, -1, 2, 2, 2}                                                  |
|                                                                        |
|o2 : List                                                               |
+------------------------------------------------------------------------+
|i3 : makeTight(w, Q)                                                    |
|                                                                        |
|o3 = ToricQuiver{flow => {0, -1, 1, 1}                 }                |
|                 IncidenceMatrix => | -1 1  1  0  |                     |
|                                    | 0  -1 -1 -1 |                     |
|                                    | 1  0  0  1  |                     |
|                 Q0 => {0, 1, 2}                                        |
|                 Q1 => {{0, 2}, {1, 0}, {1, 0}, {1, 2}}                 |
|                 synonym => toric quiver                                |
|                 weights => {0, -1, 1}                                  |
|                                                                        |
|o3 : ToricQuiver                                                        |
+------------------------------------------------------------------------+

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

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

maxCodimensionUnstable -- compute the maximal codimension of the unstable loci of a quiver
******************************************************************************************

Synopsis
========

  * Usage:
        maxCodimensionUnstable Q
  * Inputs:
      * Q, an instance of the type ToricQuiver,
  * Outputs:
      * an integer (Macaulay2Doc),

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

It computes the maximal codimension of the unstable loci a given quiver Q

+-------------------------------------------------+
|i1 : maxCodimensionUnstable bipartiteQuiver(2, 3)|
|                                                 |
|o1 = 6                                           |
+-------------------------------------------------+

We note that this value can range from $|Q_1|$, as is the case with the quiver
associated with the projective space, to 1 when the quiver is not tight.

+------------------------------------------------------------+
|i2 : maxCodimensionUnstable toricQuiver({{0,1},{0,1},{0,1}})|
|                                                            |
|o2 = 3                                                      |
+------------------------------------------------------------+

Ways to use maxCodimensionUnstable:
===================================

  * "maxCodimensionUnstable(ToricQuiver)"

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

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

maximalNonstableSubquivers -- return the maximal subquivers that are semistable
*******************************************************************************

Synopsis
========

  * Usage:
        maximalNonstableSubquivers Q
  * Inputs:
      * Q, an instance of the type ToricQuiver,
  * Optional inputs (Macaulay2Doc),:
      * ReturnSingletons => a Boolean value (Macaulay2Doc),
        default value false, Whether or not to return singleton vertices
        subquivers
      * Format => a string (Macaulay2Doc), default value "list",
        format for representing the subquivers
  * Outputs:
      * L, a hash table (Macaulay2Doc), consisting of two
        keys: Nonsingletons and Singletons

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

This method takes all of the possible subquivers of a given quiver Q and
returns those that are not stable, and which are maximal with respect to the
weight on the quiver Q.

Subquivers are represented by lists of arrows, except in the case of subquivers
that consist of singleton vertices.

+-----------------------------------------------------------------------------+
|i1 : maximalNonstableSubquivers bipartiteQuiver (2, 3)                       |
|                                                                             |
|o1 = HashTable{NonSingletons => {{0, 1, 2, 3}, {0, 1, 2, 4}, {0, 1, 2, 5},   |
|                                                                             |
|o1 : HashTable                                                               |
|-----------------------------------------------------------------------------|
|{0, 3, 4, 5}, {1, 3, 4, 5}, {2, 3, 4, 5}}}                                   |
+-----------------------------------------------------------------------------+

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

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

maximalUnstableSubquivers -- return the maximal subquivers that are unstable
****************************************************************************

Synopsis
========

  * Usage:
        maximalUnstableSubquivers Q
  * Inputs:
      * Q, an instance of the type ToricQuiver,
  * Optional inputs (Macaulay2Doc),:
      * ReturnSingletons => a Boolean value (Macaulay2Doc),
        default value false, Whether or not to return singleton vertices
        subquivers
      * Format => a string (Macaulay2Doc), default value "list",
        format for representing the subquivers
  * Outputs:
      * L, a hash table (Macaulay2Doc), consisting of two
        keys: Nonsingletons and Singletons

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

This method takes all of the possible subquivers of a given quiver Q and
returns those that are both unstable and maximal with respect to the weight on
the quiver Q.

Subquivers are represented by lists of arrows, except in the case of subquivers
that consist of singleton vertices.

+-----------------------------------------------------------------------------+
|i1 : maximalUnstableSubquivers bipartiteQuiver (2, 3)                        |
|                                                                             |
|o1 = HashTable{NonSingletons => {{0, 1, 2, 3}, {0, 1, 2, 4}, {0, 1, 2, 5},   |
|                                                                             |
|o1 : HashTable                                                               |
|-----------------------------------------------------------------------------|
|{0, 3, 4, 5}, {1, 3, 4, 5}, {2, 3, 4, 5}}}                                   |
+-----------------------------------------------------------------------------+

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

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

mergeOnArrow -- join two quivers together by identifying an arrow from each
***************************************************************************

Synopsis
========

  * Usage:
        mergeOnArrow (Q1, A1, Q2, A2)
        mergeOnArrow (Q1, A1, M2, A2)
        mergeOnArrow (M1, A1, M2, A2)
        mergeOnArrow (M1, A1, Q2, A2)
  * Inputs:
      * A1, an integer (Macaulay2Doc),
      * A2, an integer (Macaulay2Doc),
      * M1, a matrix (Macaulay2Doc),
      * M2, a matrix (Macaulay2Doc),
      * Q1, an instance of the type ToricQuiver,
      * Q2, an instance of the type ToricQuiver,
  * Outputs:
      * an instance of the type ToricQuiver, obtained by
        merging the two provided quivers together at the specified arrows

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

This method creates a new quiver from joining two toricQuivers together by
identifying arrow $A1$ in $Q1$ with arrow $A2$ in $Q2$. The input matrices must
correspond to valid graphs, and the integers must correspond to arrows in each
of the provided quiver objects.

+-----------------------------------------------------------------------------+
|i1 : mergeOnArrow (bipartiteQuiver (2, 3), 0, bipartiteQuiver (2, 3), 0)     |
|                                                                             |
|o1 = ToricQuiver{flow => {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}                   |
|                 IncidenceMatrix => | 1  0  0  1  0  0  0  0  0  0  0  |     |
|                                    | -1 -1 -1 0  0  0  0  0  0  0  0  |     |
|                                    | 0  1  0  0  1  0  0  0  0  0  0  |     |
|                                    | 0  0  0  -1 -1 -1 -1 -1 0  0  0  |     |
|                                    | 0  0  1  0  0  1  0  0  1  0  0  |     |
|                                    | 0  0  0  0  0  0  1  0  0  1  0  |     |
|                                    | 0  0  0  0  0  0  0  0  -1 -1 -1 |     |
|                                    | 0  0  0  0  0  0  0  1  0  0  1  |     |
|                 Q0 => {0, 1, 2, 3, 4, 5, 6, 7}                              |
|                 Q1 => {{1, 0}, {1, 2}, {1, 4}, {3, 0}, {3, 2}, {3, 4}, {3,  |
|                 synonym => toric quiver                                     |
|                 weights => {2, -3, 2, -5, 3, 2, -3, 2}                      |
|                                                                             |
|o1 : ToricQuiver                                                             |
|-----------------------------------------------------------------------------|
|                                   }                                         |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|5}, {3, 7}, {6, 4}, {6, 5}, {6, 7}}                                          |
+-----------------------------------------------------------------------------+
+-----------------------------------------------------------------------------+
|i2 : mergeOnArrow (bipartiteQuiver (2, 3), 0, matrix({{-1,-1,-1,-1},{1,1,0,0 |
|                                                                             |
|o2 = ToricQuiver{flow => {1, 1, 1, 1, 1, 1, 1, 1, 1}                         |
|                 IncidenceMatrix => | 1  0  0  1  0  0  0  0  0  |           |
|                                    | -1 -1 -1 0  0  0  0  0  0  |           |
|                                    | 0  1  0  0  1  0  0  0  0  |           |
|                                    | 0  0  0  -1 -1 -1 -1 -1 -1 |           |
|                                    | 0  0  1  0  0  1  1  0  0  |           |
|                                    | 0  0  0  0  0  0  0  1  1  |           |
|                 Q0 => {0, 1, 2, 3, 4, 5}                                    |
|                 Q1 => {{1, 0}, {1, 2}, {1, 4}, {3, 0}, {3, 2}, {3, 4}, {3,  |
|                 synonym => toric quiver                                     |
|                 weights => {2, -3, 2, -6, 3, 2}                             |
|                                                                             |
|o2 : ToricQuiver                                                             |
|-----------------------------------------------------------------------------|
|},{0,0,1,1}}), 0)                                                            |
|                                                                             |
|                   }                                                         |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|4}, {3, 5}, {3, 5}}                                                          |
+-----------------------------------------------------------------------------+
+-----------------------------------------------------------------------------+
|i3 : mergeOnArrow (matrix ({{-1,-1,-1,-1},{1,1,0,0},{0,0,1,1}}), 0,          |
|                                                                             |
|o3 = ToricQuiver{flow => {1, 1, 1, 1, 1, 1, 1, 1, 1}                         |
|                 IncidenceMatrix => | 1  1  0  0  0  0  0  0  0  |           |
|                                    | -1 -1 -1 -1 -1 -1 0  0  0  |           |
|                                    | 0  0  1  1  0  0  1  0  0  |           |
|                                    | 0  0  0  0  1  0  0  1  0  |           |
|                                    | 0  0  0  0  0  0  -1 -1 -1 |           |
|                                    | 0  0  0  0  0  1  0  0  1  |           |
|                 Q0 => {0, 1, 2, 3, 4, 5}                                    |
|                 Q1 => {{1, 0}, {1, 0}, {1, 2}, {1, 2}, {1, 3}, {1,          |
|                 synonym => toric quiver                                     |
|                 weights => {2, -6, 3, 2, -3, 2}                             |
|                                                                             |
|o3 : ToricQuiver                                                             |
|-----------------------------------------------------------------------------|
|bipartiteQuiver (2, 3), 0)                                                   |
|                                                                             |
|                           }                                                 |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|5}, {4, 2}, {4, 3}, {4, 5}}                                                  |
+-----------------------------------------------------------------------------+

Ways to use mergeOnArrow:
=========================

  * "mergeOnArrow(Matrix,ZZ,Matrix,ZZ)"
  * "mergeOnArrow(Matrix,ZZ,ToricQuiver,ZZ)"
  * "mergeOnArrow(ToricQuiver,ZZ,Matrix,ZZ)"
  * "mergeOnArrow(ToricQuiver,ZZ,ToricQuiver,ZZ)"

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

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

mergeOnVertex -- join two quivers together by identifying a vertex from each
****************************************************************************

Synopsis
========

  * Usage:
        mergeOnVertex (Q1, V1, Q2, V2)
        mergeOnVertex (Q1, V1, M2, V2)
        mergeOnVertex (M1, V1, M2, V2)
        mergeOnVertex (M1, V1, Q2, V2)
  * Inputs:
      * M1, a matrix (Macaulay2Doc),
      * M2, a matrix (Macaulay2Doc),
      * Q1, an instance of the type ToricQuiver,
      * Q2, an instance of the type ToricQuiver,
      * V1, an integer (Macaulay2Doc),
      * V2, an integer (Macaulay2Doc),
  * Outputs:
      * an instance of the type ToricQuiver, obtained by
        merging the two provided quivers together at the specified vertices

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

This method creates a new quiver from joining two toricQuivers together by
identifying vertex $V1$ in $Q1$ with vertex $V2$ in $Q2$. The input matrices
must correspond to valid graphs, and the integers must correspond to vertices
in each of the provided quiver objects.

+-----------------------------------------------------------------------------+
|i1 : mergeOnVertex (bipartiteQuiver (2, 3), 1, bipartiteQuiver (2, 3), 0)    |
|                                                                             |
|o1 = ToricQuiver{flow => {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}                |
|                 IncidenceMatrix => | -1 -1 -1 0  0  0  0  0  0  0  0  0  |  |
|                                    | 1  0  0  1  0  0  0  0  0  0  0  0  |  |
|                                    | 0  1  0  0  1  0  0  0  0  0  0  0  |  |
|                                    | 0  0  1  0  0  1  0  0  0  0  0  0  |  |
|                                    | 0  0  0  -1 -1 -1 -1 -1 -1 0  0  0  |  |
|                                    | 0  0  0  0  0  0  0  0  0  -1 -1 -1 |  |
|                                    | 0  0  0  0  0  0  1  0  0  1  0  0  |  |
|                                    | 0  0  0  0  0  0  0  1  0  0  1  0  |  |
|                                    | 0  0  0  0  0  0  0  0  1  0  0  1  |  |
|                 Q0 => {0, 1, 2, 3, 4, 5, 6, 7, 8}                           |
|                 Q1 => {{0, 1}, {0, 2}, {0, 3}, {4, 1}, {4, 2}, {4, 3}, {4,  |
|                 synonym => toric quiver                                     |
|                 weights => {-3, 2, 2, 2, -6, -3, 2, 2, 2}                   |
|                                                                             |
|o1 : ToricQuiver                                                             |
|-----------------------------------------------------------------------------|
|                                           }                                 |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|6}, {4, 7}, {4, 8}, {5, 6}, {5, 7}, {5, 8}}                                  |
+-----------------------------------------------------------------------------+
+-----------------------------------------------------------------------------+
|i2 : mergeOnVertex (bipartiteQuiver (2, 3), 1, matrix({{-1,-1,-1,-1},{1,1,0,0|
|                                                                             |
|o2 = ToricQuiver{flow => {1, 1, 1, 1, 1, 1, 1, 1, 1, 1}                      |
|                 IncidenceMatrix => | -1 -1 -1 0  0  0  0  0  0  0  |        |
|                                    | 1  0  0  1  0  0  0  0  0  0  |        |
|                                    | 0  1  0  0  1  0  0  0  0  0  |        |
|                                    | 0  0  1  0  0  1  0  0  0  0  |        |
|                                    | 0  0  0  -1 -1 -1 -1 -1 -1 -1 |        |
|                                    | 0  0  0  0  0  0  1  1  0  0  |        |
|                                    | 0  0  0  0  0  0  0  0  1  1  |        |
|                 Q0 => {0, 1, 2, 3, 4, 5, 6}                                 |
|                 Q1 => {{0, 1}, {0, 2}, {0, 3}, {4, 1}, {4, 2}, {4, 3}, {4, 5|
|                 synonym => toric quiver                                     |
|                 weights => {-3, 2, 2, 2, -7, 2, 2}                          |
|                                                                             |
|o2 : ToricQuiver                                                             |
|-----------------------------------------------------------------------------|
|},{0,0,1,1}}), 0)                                                            |
|                                                                             |
|                          }                                                  |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|}, {4, 5}, {4, 6}, {4, 6}}                                                   |
+-----------------------------------------------------------------------------+
|i3 : mergeOnVertex (matrix({{-1,-1,-1,-1},{1,1,0,0},{0,0,1,1}}), 1,          |
|                                                                             |
|o3 = ToricQuiver{flow => {1, 1, 1, 1, 1, 1, 1, 1, 1, 1}                      |
|                 IncidenceMatrix => | -1 -1 -1 -1 0  0  0  0  0  0           |
|                                    | 1  1  0  0  0  0  0  0  0  0           |
|                                    | 0  0  1  1  -1 -1 -1 0  0  0           |
|                                    | 0  0  0  0  0  0  0  -1 -1 -1          |
|                                    | 0  0  0  0  1  0  0  1  0  0           |
|                                    | 0  0  0  0  0  1  0  0  1  0           |
|                                    | 0  0  0  0  0  0  1  0  0  1           |
|                 Q0 => {0, 1, 2, 3, 4, 5, 6}                                 |
|                 Q1 => {{0, 1}, {0, 1}, {0, 2}, {0, 2}, {2, 4}, {2,          |
|                 synonym => toric quiver                                     |
|                 weights => {-4, 2, -1, -3, 2, 2, 2}                         |
|                                                                             |
|o3 : ToricQuiver                                                             |
|-----------------------------------------------------------------------------|
|bipartiteQuiver (2, 3), 0)                                                   |
|                                                                             |
|                                   }                                         |
||                                                                            |
||                                                                            |
||                                                                            |
||                                                                            |
||                                                                            |
||                                                                            |
||                                                                            |
|                                                                             |
|5}, {2, 6}, {3, 4}, {3, 5}, {3, 6}}                                          |
+-----------------------------------------------------------------------------+

Ways to use mergeOnVertex:
==========================

  * "mergeOnVertex(Matrix,ZZ,Matrix,ZZ)"
  * "mergeOnVertex(Matrix,ZZ,ToricQuiver,ZZ)"
  * "mergeOnVertex(ToricQuiver,ZZ,Matrix,ZZ)"
  * "mergeOnVertex(ToricQuiver,ZZ,ToricQuiver,ZZ)"

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

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

potentialWalls -- lists the potential walls in the weight chamber decomposition for a given quiver
**************************************************************************************************

Synopsis
========

  * Usage:
        potentialWalls Q
        potentialWalls M
  * Inputs:
      * Q, an instance of the type ToricQuiver,
  * Outputs:
      * a list (Macaulay2Doc), of potential walls for he cone
        system associated to the toric quiver

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

Every wall can be represented uniquely by a partition of the vertices Q0 of Q
into two sets Qplus and Qminus. As a partition can be expressed in terms of
only one of the subsets, only one of the two sets Qplus and Qminus is used in
every case. Thus we denote the wall W by the subset of vertices Qplus used for
defining it.

This method is written to compute the potential walls based on the incidence
matrix, in the case of a flow of all unit values, or based on the entire quiver
if the flow is nontrivial.

+-----------------------------------------------------------------------------+
|i1 : potentialWalls toricQuiver {{0,1},{0,2},{0,3},{1,2},{1,3},{2,3}}        |
|                                                                             |
|o1 = {Wall{Qplus => {1, 2, 3}}, Wall{Qplus => {0, 2, 3}}, Wall{Qplus =>      |
|           WallType => (0, 3)        WallType => (1, 2)        WallType      |
|     ------------------------------------------------------------------------|
|     {0, 1, 3}}, Wall{Qplus => {0, 1, 2}}, Wall{Qplus => {2, 3}   },         |
|     => (2, 1)        WallType => (3, 0)        WallType => (0, 4)           |
|     ------------------------------------------------------------------------|
|     Wall{Qplus => {1, 3}   }, Wall{Qplus => {0, 3}   }}                     |
|          WallType => (1, 3)        WallType => (2, 2)                       |
|                                                                             |
|o1 : List                                                                    |
+-----------------------------------------------------------------------------+
+-----------------------------------+
|i2 : potentialWalls chainQuiver {1}|
|                                   |
|o2 = {Wall{Qplus => {1}      }}    |
|           WallType => (0, 1)      |
|                                   |
|o2 : List                          |
+-----------------------------------+

Ways to use potentialWalls:
===========================

  * "potentialWalls(Matrix)"
  * "potentialWalls(ToricQuiver)"

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

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

primitiveArrows -- list the primitive arrows in a quiver
********************************************************

Synopsis
========

  * Usage:
        primitiveArrows Q
  * Inputs:
      * Q, an instance of the type ToricQuiver,
  * Outputs:
      * L, a list (Macaulay2Doc), of arrow indices corresponding to
        the primitive arrows in Q

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

This method returns a list of the arrows in the provided quiver that are
primitive. An arrow a=(v0,v1) in the quiver Q is primitive if there exists an
oriented non-empty path from v0 to v1 in Q that is distinct from a. Thus, if
the arrow a is primitive, then removing it from the quiver results in a quiver
that still contains a path between its endpoints v0 and v1.

+----------------------------------------------------------------------+
|i1 : primitiveArrows toricQuiver {{0,1},{0,2},{0,3},{1,2},{1,3},{2,3}}|
|                                                                      |
|o1 = {0, 3, 5}                                                        |
|                                                                      |
|o1 : List                                                             |
+----------------------------------------------------------------------+

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

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

quiverIncidenceMatrix -- return the graph incidence matrix attribute associated to the toric quiver
***************************************************************************************************

Synopsis
========

  * Usage:
        quiverIncidenceMatrix Q
  * Inputs:
      * Q, an instance of the type ToricQuiver,
  * Outputs:
      * M, a matrix (Macaulay2Doc), that is the incidence matrix
        for the graph of the toric quiver

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

This method returns the incidence matrix that is stored in the quiver.

+-------------------------------+
|i1 : Q = bipartiteQuiver(2, 3);|
+-------------------------------+
|i2 : quiverIncidenceMatrix Q   |
|                               |
|o2 = | -1 -1 -1 0  0  0  |     |
|     | 0  0  0  -1 -1 -1 |     |
|     | 1  0  0  1  0  0  |     |
|     | 0  1  0  0  1  0  |     |
|     | 0  0  1  0  0  1  |     |
|                               |
|              5       6        |
|o2 : Matrix ZZ  <-- ZZ         |
+-------------------------------+

See also
========

  * ToricQuiver -- the ToricQuiver datatype

Ways to use quiverIncidenceMatrix:
==================================

  * "quiverIncidenceMatrix(ToricQuiver)"

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

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

quiverEdges -- return the graph edges associated to the toric quiver
********************************************************************

Synopsis
========

  * Usage:
        quiverEdges Q
  * Inputs:
      * Q, an instance of the type ToricQuiver,
  * Outputs:
      * E, a list (Macaulay2Doc), of edges, each of which is a pair
        of vertices.

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

This method returns the list of edges that are in the graph of the provided
toric quiver.

+-----------------------------------------------------+
|i1 : Q = bipartiteQuiver(2, 3);                      |
+-----------------------------------------------------+
|i2 : quiverEdges Q                                   |
|                                                     |
|o2 = {{0, 2}, {0, 3}, {0, 4}, {1, 2}, {1, 3}, {1, 4}}|
|                                                     |
|o2 : List                                            |
+-----------------------------------------------------+

See also
========

  * ToricQuiver -- the ToricQuiver datatype

Ways to use quiverEdges:
========================

  * "quiverEdges(ToricQuiver)"

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

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

quiverFlow -- return the flow attribute associated to the toric quiver
**********************************************************************

Synopsis
========

  * Usage:
        quiverFlow Q
  * Inputs:
      * Q, an instance of the type ToricQuiver,
  * Outputs:
      * F, a list (Macaulay2Doc), the flow for the toric quiver

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

This method returns the flow of the provided toric quiver, which is a list of
numeric values.

+----------------------------------------------------------+
|i1 : Q = bipartiteQuiver(2, 3, Flow=> {1, 2, 3, 4, 5, 6});|
+----------------------------------------------------------+
|i2 : quiverFlow Q                                         |
|                                                          |
|o2 = {1, 2, 3, 4, 5, 6}                                   |
|                                                          |
|o2 : List                                                 |
+----------------------------------------------------------+

See also
========

  * ToricQuiver -- the ToricQuiver datatype
  * incInverse -- compute a flow in the preimage for a given
    weight

Ways to use quiverFlow:
=======================

  * "quiverFlow(ToricQuiver)"

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

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

quiverVertices -- return the vertices of the toric quiver
*********************************************************

Synopsis
========

  * Usage:
        quiverVertices Q
  * Inputs:
      * Q, an instance of the type ToricQuiver,
  * Outputs:
      * V, a list (Macaulay2Doc), of the vertices in the quiver

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

This method returns the vertices that are in the provided toric quiver.

+-------------------------------+
|i1 : Q = bipartiteQuiver(2, 3);|
+-------------------------------+
|i2 : quiverVertices Q          |
|                               |
|o2 = {0, 1, 2, 3, 4}           |
|                               |
|o2 : List                      |
+-------------------------------+

See also
========

  * ToricQuiver -- the ToricQuiver datatype

Ways to use quiverVertices:
===========================

  * "quiverVertices(ToricQuiver)"

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

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

quiverWeights -- return the weight attribute associated to the toric quiver
***************************************************************************

Synopsis
========

  * Usage:
        quiverWeights Q
  * Inputs:
      * Q, an instance of the type ToricQuiver,
  * Outputs:
      * W, a list (Macaulay2Doc), of the weights induced by the
        flow on the quiver

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

This method returns the weights of the provided toric quiver. The weights are
the image of the quiver flow under the inc map, which is defined as $$
\text{inc}(\mathbf{w})(i) := \sum_{a\in Q_1 \atop a^{+} = i} \mathbf{w}(a) -
\sum_{a\in Q_1 \atop a^{-} = i} \mathbf{w}(a) \quad \text{ for all } i \in Q_0.
$$ where for any arrow $a\in Q_1$, we denote its head as $a^{+} \in Q_0$ and
its tail as $a^{-} \in Q_0$.

+-------------------------------+
|i1 : Q = bipartiteQuiver(2, 3);|
+-------------------------------+
|i2 : quiverWeights Q           |
|                               |
|o2 = {-3, -3, 2, 2, 2}         |
|                               |
|o2 : List                      |
+-------------------------------+

See also
========

  * ToricQuiver -- the ToricQuiver datatype
  * incInverse -- compute a flow in the preimage for a given
    weight

Ways to use quiverWeights:
==========================

  * "quiverWeights(ToricQuiver)"

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

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

referenceThetas -- return a weight for all polytopes associated to a toric quiver
*********************************************************************************

Synopsis
========

  * Usage:
        referenceThetas QCS
  * Inputs:
      * QCS, a list (Macaulay2Doc), of cones comprising the chamber
        decomposition for weights
  * Outputs:
      * L, a list (Macaulay2Doc), of weights

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

This method uses the interiorVector method for a Cone from the Polyhedra
package to generate a single internal point for each of the cones in the input
list QCS.

+-----------------------------------------------------------------------------+
|i1 : Q = toricQuiver {{0,1},{0,2},{0,3},{1,2},{1,3},{2,3}};                  |
+-----------------------------------------------------------------------------+
|i2 : CS = coneSystem Q;                                                      |
+-----------------------------------------------------------------------------+
|i3 : referenceThetas CS                                                      |
|                                                                             |
|o3 = {{-1, -1, -1, 3}, {-2, 1, -1, 2}, {-3, 1, 1, 1}, {-2, -2, 1, 3}, {-3,   |
|     ------------------------------------------------------------------------|
|     -1, 2, 2}, {-1, -3, 2, 2}, {-2, -2, 3, 1}}                              |
|                                                                             |
|o3 : List                                                                    |
+-----------------------------------------------------------------------------+

Ways to use referenceThetas:
============================

  * "referenceThetas(List)"

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

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

samePolytope -- whether two weights produce the same flow polytope
******************************************************************

Synopsis
========

  * Usage:
        samePolytope(Th1, Th2, TQ)
  * Inputs:
      * Th1, a list (Macaulay2Doc),
      * Th1, a list (Macaulay2Doc),
      * TQ, an instance of the type ToricQuiver,
  * Outputs:
      * B, a Boolean value (Macaulay2Doc), whether the two
        weights correspond to the same polytope

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

This function returns either a boolean value of true or else a string
describing why the outcome cannot be determined. It requires that polytopes be
smooth and that the set of stable trees for both weights be nonempty. This is
computed by calculating the flow polytope for the toric quiver with each of the
two weights and comparing the resulting polytopes. The polytopes are considered
equal if they are isomorphic, using the areIsomorphic method in the
LatticePolytopes package.

+------------------------------------------------------------+
|i1 : Q = toricQuiver({{0,1},{0,2},{0,3},{1,2},{1,3},{2,3}});|
+------------------------------------------------------------+
|i2 : samePolytope({-3,2,-1,2},{-2,1,-2,3}, Q)               |
|                                                            |
|o2 = true                                                   |
+------------------------------------------------------------+

Caveat
======

This operation is computationally expensive, and may not perform well for
quivers whose chamber systems are comprised of many subchambers.

See also
========

  * toricQuiver -- the toricQuiver constructor
  * flowPolytopeVertices -- generate the polytope
    associated to a toric quiver

Ways to use samePolytope:
=========================

  * "samePolytope(List,List,ToricQuiver)"

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

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

stableTrees -- return the spanning trees that are stable
********************************************************

Synopsis
========

  * Usage:
        stableTrees(th, Q)
  * Inputs:
      * th, a list (Macaulay2Doc), of weights corresponding to each
        vertex
      * Q, an instance of the type ToricQuiver,
  * Outputs:
      * L, a list (Macaulay2Doc), of lists, each representing the
        arrows that comprise a spanning tree that is stable with respect to the
        weight th

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

+-----------------------------------------------------------------------------+
|i1 : Q = bipartiteQuiver(2,3);                                               |
+-----------------------------------------------------------------------------+
|i2 : th = {-3,-3,2,2,2};                                                     |
+-----------------------------------------------------------------------------+
|i3 : stableTrees(th, Q)                                                      |
|                                                                             |
|o3 = {{0, 2, 4, 5}, {0, 1, 4, 5}, {1, 2, 3, 5}, {0, 1, 3, 5}, {1, 2, 3, 4},  |
|     ------------------------------------------------------------------------|
|     {0, 2, 3, 4}}                                                           |
|                                                                             |
|o3 : List                                                                    |
+-----------------------------------------------------------------------------+

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

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

subquivers -- return all possible subquivers of a given quiver
**************************************************************

Synopsis
========

  * Usage:
        subquivers M
        subquivers Q
  * Inputs:
      * M, a matrix (Macaulay2Doc),
      * Q, an instance of the type ToricQuiver,
  * Optional inputs (Macaulay2Doc),:
      * Format => a string (Macaulay2Doc), default value
        "quiver", options include quiver, which returns a list of quivers, and
        list, which returns a list of arrows for each subquiver
      * AsSubquiver => a Boolean value (Macaulay2Doc), default
        value false, if Format is specified as quiver, then applying
        AsSubquiver = true insures that the matrix representation of the
        subquiver is the same size as the matrix original quiver
  * Outputs:
      * L, a list (Macaulay2Doc), of either quiver objects, or
        arrow indices

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

A subquiver is a subgraph of a quiver. Specifically, it is formed by selecting
a subset of the arrows from the original quiver, ensuring that the tails and
heads of the chosen arrows correspond to the selected vertices. There are
several ways to represent a subquiver:

  * Using a list of arrow indices to indicate the selected arrows.
  * Selecting a subset of rows and columns from the original incidence matrix.
    Here, we leverage the fact that columns in the incidence matrix correspond
    to arrows in the quiver.

subquivers Q list all possible subquivers of Q.

+-----------------------------------------------------------------------------+
|i1 : Q = chainQuiver {2}                                                     |
|                                                                             |
|o1 = ToricQuiver{flow => {1, 1}              }                               |
|                 IncidenceMatrix => | -1 -1 |                                |
|                                    | 1  1  |                                |
|                 Q0 => {0, 1}                                                |
|                 Q1 => {{0, 1}, {0, 1}}                                      |
|                 synonym => toric quiver                                     |
|                 weights => {-2, 2}                                          |
|                                                                             |
|o1 : ToricQuiver                                                             |
+-----------------------------------------------------------------------------+
|i2 : subquivers Q                                                            |
|                                                                             |
|o2 = {ToricQuiver{flow => {1}              },                                |
|                  IncidenceMatrix => | -1 |                                  |
|                                     | 1  |                                  |
|                  Q0 => {0, 1}                                               |
|                  Q1 => {{0, 1}}                                             |
|                  synonym => toric quiver                                    |
|                  weights => {-1, 1}                                         |
|     ------------------------------------------------------------------------|
|     ToricQuiver{flow => {1}              }}                                 |
|                 IncidenceMatrix => | -1 |                                   |
|                                    | 1  |                                   |
|                 Q0 => {0, 1}                                                |
|                 Q1 => {{0, 1}}                                              |
|                 synonym => toric quiver                                     |
|                 weights => {-1, 1}                                          |
|                                                                             |
|o2 : List                                                                    |
+-----------------------------------------------------------------------------+
|i3 : subquivers(Q, Format => "list")                                         |
|                                                                             |
|o3 = {{0}, {1}}                                                              |
|                                                                             |
|o3 : List                                                                    |
+-----------------------------------------------------------------------------+
+-----------------------------------------------------------------------------+
|i4 : subquivers bipartiteQuiver(2, 2)                                        |
|                                                                             |
|o4 = {ToricQuiver{flow => {1}              },                                |
|                  IncidenceMatrix => | -1 |                                  |
|                                     | 1  |                                  |
|                  Q0 => {0, 1}                                               |
|                  Q1 => {{0, 1}}                                             |
|                  synonym => toric quiver                                    |
|                  weights => {-1, 1}                                         |
|                                                                             |
|                                                                             |
|     ------------------------------------------------------------------------|
|     ToricQuiver{flow => {1}              },                                 |
|                 IncidenceMatrix => | -1 |                                   |
|                                    | 1  |                                   |
|                 Q0 => {0, 1}                                                |
|                 Q1 => {{0, 1}}                                              |
|                 synonym => toric quiver                                     |
|                 weights => {-1, 1}                                          |
|                                                                             |
|                                                                             |
|     ------------------------------------------------------------------------|
|     ToricQuiver{flow => {1}              },                                 |
|                 IncidenceMatrix => | -1 |                                   |
|                                    | 1  |                                   |
|                 Q0 => {0, 1}                                                |
|                 Q1 => {{0, 1}}                                              |
|                 synonym => toric quiver                                     |
|                 weights => {-1, 1}                                          |
|                                                                             |
|                                                                             |
|     ------------------------------------------------------------------------|
|     ToricQuiver{flow => {1}              },                                 |
|                 IncidenceMatrix => | -1 |                                   |
|                                    | 1  |                                   |
|                 Q0 => {0, 1}                                                |
|                 Q1 => {{0, 1}}                                              |
|                 synonym => toric quiver                                     |
|                 weights => {-1, 1}                                          |
|                                                                             |
|                                                                             |
|     ------------------------------------------------------------------------|
|     ToricQuiver{flow => {1, 1}              },                              |
|                 IncidenceMatrix => | -1 -1 |                                |
|                                    | 1  0  |                                |
|                                    | 0  1  |                                |
|                 Q0 => {0, 1, 2}                                             |
|                 Q1 => {{0, 1}, {0, 2}}                                      |
|                 synonym => toric quiver                                     |
|                 weights => {-2, 1, 1}                                       |
|                                                                             |
|     ------------------------------------------------------------------------|
|     ToricQuiver{flow => {1, 1}              },                              |
|                 IncidenceMatrix => | -1 0  |                                |
|                                    | 0  -1 |                                |
|                                    | 1  1  |                                |
|                 Q0 => {0, 1, 2}                                             |
|                 Q1 => {{0, 2}, {1, 2}}                                      |
|                 synonym => toric quiver                                     |
|                 weights => {-1, -1, 2}                                      |
|                                                                             |
|     ------------------------------------------------------------------------|
|     ToricQuiver{flow => {1, 1}              },                              |
|                 IncidenceMatrix => | -1 0  |                                |
|                                    | 0  -1 |                                |
|                                    | 0  1  |                                |
|                                    | 1  0  |                                |
|                 Q0 => {0, 1, 2, 3}                                          |
|                 Q1 => {{0, 3}, {1, 2}}                                      |
|                 synonym => toric quiver                                     |
|                 weights => {-1, -1, 1, 1}                                   |
|     ------------------------------------------------------------------------|
|     ToricQuiver{flow => {1, 1}              },                              |
|                 IncidenceMatrix => | -1 0  |                                |
|                                    | 0  -1 |                                |
|                                    | 1  0  |                                |
|                                    | 0  1  |                                |
|                 Q0 => {0, 1, 2, 3}                                          |
|                 Q1 => {{0, 2}, {1, 3}}                                      |
|                 synonym => toric quiver                                     |
|                 weights => {-1, -1, 1, 1}                                   |
|     ------------------------------------------------------------------------|
|     ToricQuiver{flow => {1, 1}              },                              |
|                 IncidenceMatrix => | -1 0  |                                |
|                                    | 0  -1 |                                |
|                                    | 1  1  |                                |
|                 Q0 => {0, 1, 2}                                             |
|                 Q1 => {{0, 2}, {1, 2}}                                      |
|                 synonym => toric quiver                                     |
|                 weights => {-1, -1, 2}                                      |
|                                                                             |
|     ------------------------------------------------------------------------|
|     ToricQuiver{flow => {1, 1}              },                              |
|                 IncidenceMatrix => | -1 -1 |                                |
|                                    | 1  0  |                                |
|                                    | 0  1  |                                |
|                 Q0 => {0, 1, 2}                                             |
|                 Q1 => {{0, 1}, {0, 2}}                                      |
|                 synonym => toric quiver                                     |
|                 weights => {-2, 1, 1}                                       |
|                                                                             |
|     ------------------------------------------------------------------------|
|     ToricQuiver{flow => {1, 1, 1}              },                           |
|                 IncidenceMatrix => | -1 -1 0  |                             |
|                                    | 0  0  -1 |                             |
|                                    | 1  0  1  |                             |
|                                    | 0  1  0  |                             |
|                 Q0 => {0, 1, 2, 3}                                          |
|                 Q1 => {{0, 2}, {0, 3}, {1, 2}}                              |
|                 synonym => toric quiver                                     |
|                 weights => {-2, -1, 2, 1}                                   |
|     ------------------------------------------------------------------------|
|     ToricQuiver{flow => {1, 1, 1}              },                           |
|                 IncidenceMatrix => | -1 -1 0  |                             |
|                                    | 0  0  -1 |                             |
|                                    | 1  0  0  |                             |
|                                    | 0  1  1  |                             |
|                 Q0 => {0, 1, 2, 3}                                          |
|                 Q1 => {{0, 2}, {0, 3}, {1, 3}}                              |
|                 synonym => toric quiver                                     |
|                 weights => {-2, -1, 1, 2}                                   |
|     ------------------------------------------------------------------------|
|     ToricQuiver{flow => {1, 1, 1}              },                           |
|                 IncidenceMatrix => | -1 0  0  |                             |
|                                    | 0  -1 -1 |                             |
|                                    | 1  1  0  |                             |
|                                    | 0  0  1  |                             |
|                 Q0 => {0, 1, 2, 3}                                          |
|                 Q1 => {{0, 2}, {1, 2}, {1, 3}}                              |
|                 synonym => toric quiver                                     |
|                 weights => {-1, -2, 2, 1}                                   |
|     ------------------------------------------------------------------------|
|     ToricQuiver{flow => {1, 1, 1}              }}                           |
|                 IncidenceMatrix => | -1 0  0  |                             |
|                                    | 0  -1 -1 |                             |
|                                    | 0  1  0  |                             |
|                                    | 1  0  1  |                             |
|                 Q0 => {0, 1, 2, 3}                                          |
|                 Q1 => {{0, 3}, {1, 2}, {1, 3}}                              |
|                 synonym => toric quiver                                     |
|                 weights => {-1, -2, 1, 2}                                   |
|                                                                             |
|o4 : List                                                                    |
+-----------------------------------------------------------------------------+
|i5 : subquivers(bipartiteQuiver(2, 2), Format => "list")                     |
|                                                                             |
|o5 = {{0}, {1}, {2}, {3}, {0, 1}, {0, 2}, {1, 2}, {0, 3}, {1, 3}, {2, 3}, {0,|
|     ------------------------------------------------------------------------|
|     1, 2}, {0, 1, 3}, {0, 2, 3}, {1, 2, 3}}                                 |
|                                                                             |
|o5 : List                                                                    |
+-----------------------------------------------------------------------------+
|i6 : subquivers(bipartiteQuiver(2, 2), Format => "quiver", AsSubquiver => tru|
|                                                                             |
|o6 = {ToricQuiver{flow => {1, 0, 0, 0}                  },                   |
|                  IncidenceMatrix => | -1 -1 0  0  |                         |
|                                     | 0  0  -1 -1 |                         |
|                                     | 1  0  1  0  |                         |
|                                     | 0  1  0  1  |                         |
|                  Q0 => {0, 1, 2, 3}                                         |
|                  Q1 => {{0, 2}, {0, 3}, {1, 2}, {1, 3}}                     |
|                  synonym => toric quiver                                    |
|                  weights => {-1, 0, 1, 0}                                   |
|     ------------------------------------------------------------------------|
|     ToricQuiver{flow => {0, 1, 0, 0}                  },                    |
|                 IncidenceMatrix => | -1 -1 0  0  |                          |
|                                    | 0  0  -1 -1 |                          |
|                                    | 1  0  1  0  |                          |
|                                    | 0  1  0  1  |                          |
|                 Q0 => {0, 1, 2, 3}                                          |
|                 Q1 => {{0, 2}, {0, 3}, {1, 2}, {1, 3}}                      |
|                 synonym => toric quiver                                     |
|                 weights => {-1, 0, 0, 1}                                    |
|     ------------------------------------------------------------------------|
|     ToricQuiver{flow => {0, 0, 1, 0}                  },                    |
|                 IncidenceMatrix => | -1 -1 0  0  |                          |
|                                    | 0  0  -1 -1 |                          |
|                                    | 1  0  1  0  |                          |
|                                    | 0  1  0  1  |                          |
|                 Q0 => {0, 1, 2, 3}                                          |
|                 Q1 => {{0, 2}, {0, 3}, {1, 2}, {1, 3}}                      |
|                 synonym => toric quiver                                     |
|                 weights => {0, -1, 1, 0}                                    |
|     ------------------------------------------------------------------------|
|     ToricQuiver{flow => {0, 0, 0, 1}                  },                    |
|                 IncidenceMatrix => | -1 -1 0  0  |                          |
|                                    | 0  0  -1 -1 |                          |
|                                    | 1  0  1  0  |                          |
|                                    | 0  1  0  1  |                          |
|                 Q0 => {0, 1, 2, 3}                                          |
|                 Q1 => {{0, 2}, {0, 3}, {1, 2}, {1, 3}}                      |
|                 synonym => toric quiver                                     |
|                 weights => {0, -1, 0, 1}                                    |
|     ------------------------------------------------------------------------|
|     ToricQuiver{flow => {1, 1, 0, 0}                  },                    |
|                 IncidenceMatrix => | -1 -1 0  0  |                          |
|                                    | 0  0  -1 -1 |                          |
|                                    | 1  0  1  0  |                          |
|                                    | 0  1  0  1  |                          |
|                 Q0 => {0, 1, 2, 3}                                          |
|                 Q1 => {{0, 2}, {0, 3}, {1, 2}, {1, 3}}                      |
|                 synonym => toric quiver                                     |
|                 weights => {-2, 0, 1, 1}                                    |
|     ------------------------------------------------------------------------|
|     ToricQuiver{flow => {1, 0, 1, 0}                  },                    |
|                 IncidenceMatrix => | -1 -1 0  0  |                          |
|                                    | 0  0  -1 -1 |                          |
|                                    | 1  0  1  0  |                          |
|                                    | 0  1  0  1  |                          |
|                 Q0 => {0, 1, 2, 3}                                          |
|                 Q1 => {{0, 2}, {0, 3}, {1, 2}, {1, 3}}                      |
|                 synonym => toric quiver                                     |
|                 weights => {-1, -1, 2, 0}                                   |
|     ------------------------------------------------------------------------|
|     ToricQuiver{flow => {0, 1, 1, 0}                  },                    |
|                 IncidenceMatrix => | -1 -1 0  0  |                          |
|                                    | 0  0  -1 -1 |                          |
|                                    | 1  0  1  0  |                          |
|                                    | 0  1  0  1  |                          |
|                 Q0 => {0, 1, 2, 3}                                          |
|                 Q1 => {{0, 2}, {0, 3}, {1, 2}, {1, 3}}                      |
|                 synonym => toric quiver                                     |
|                 weights => {-1, -1, 1, 1}                                   |
|     ------------------------------------------------------------------------|
|     ToricQuiver{flow => {1, 0, 0, 1}                  },                    |
|                 IncidenceMatrix => | -1 -1 0  0  |                          |
|                                    | 0  0  -1 -1 |                          |
|                                    | 1  0  1  0  |                          |
|                                    | 0  1  0  1  |                          |
|                 Q0 => {0, 1, 2, 3}                                          |
|                 Q1 => {{0, 2}, {0, 3}, {1, 2}, {1, 3}}                      |
|                 synonym => toric quiver                                     |
|                 weights => {-1, -1, 1, 1}                                   |
|     ------------------------------------------------------------------------|
|     ToricQuiver{flow => {0, 1, 0, 1}                  },                    |
|                 IncidenceMatrix => | -1 -1 0  0  |                          |
|                                    | 0  0  -1 -1 |                          |
|                                    | 1  0  1  0  |                          |
|                                    | 0  1  0  1  |                          |
|                 Q0 => {0, 1, 2, 3}                                          |
|                 Q1 => {{0, 2}, {0, 3}, {1, 2}, {1, 3}}                      |
|                 synonym => toric quiver                                     |
|                 weights => {-1, -1, 0, 2}                                   |
|     ------------------------------------------------------------------------|
|     ToricQuiver{flow => {0, 0, 1, 1}                  },                    |
|                 IncidenceMatrix => | -1 -1 0  0  |                          |
|                                    | 0  0  -1 -1 |                          |
|                                    | 1  0  1  0  |                          |
|                                    | 0  1  0  1  |                          |
|                 Q0 => {0, 1, 2, 3}                                          |
|                 Q1 => {{0, 2}, {0, 3}, {1, 2}, {1, 3}}                      |
|                 synonym => toric quiver                                     |
|                 weights => {0, -2, 1, 1}                                    |
|     ------------------------------------------------------------------------|
|     ToricQuiver{flow => {1, 1, 1, 0}                  },                    |
|                 IncidenceMatrix => | -1 -1 0  0  |                          |
|                                    | 0  0  -1 -1 |                          |
|                                    | 1  0  1  0  |                          |
|                                    | 0  1  0  1  |                          |
|                 Q0 => {0, 1, 2, 3}                                          |
|                 Q1 => {{0, 2}, {0, 3}, {1, 2}, {1, 3}}                      |
|                 synonym => toric quiver                                     |
|                 weights => {-2, -1, 2, 1}                                   |
|     ------------------------------------------------------------------------|
|     ToricQuiver{flow => {1, 1, 0, 1}                  },                    |
|                 IncidenceMatrix => | -1 -1 0  0  |                          |
|                                    | 0  0  -1 -1 |                          |
|                                    | 1  0  1  0  |                          |
|                                    | 0  1  0  1  |                          |
|                 Q0 => {0, 1, 2, 3}                                          |
|                 Q1 => {{0, 2}, {0, 3}, {1, 2}, {1, 3}}                      |
|                 synonym => toric quiver                                     |
|                 weights => {-2, -1, 1, 2}                                   |
|     ------------------------------------------------------------------------|
|     ToricQuiver{flow => {1, 0, 1, 1}                  },                    |
|                 IncidenceMatrix => | -1 -1 0  0  |                          |
|                                    | 0  0  -1 -1 |                          |
|                                    | 1  0  1  0  |                          |
|                                    | 0  1  0  1  |                          |
|                 Q0 => {0, 1, 2, 3}                                          |
|                 Q1 => {{0, 2}, {0, 3}, {1, 2}, {1, 3}}                      |
|                 synonym => toric quiver                                     |
|                 weights => {-1, -2, 2, 1}                                   |
|     ------------------------------------------------------------------------|
|     ToricQuiver{flow => {0, 1, 1, 1}                  }}                    |
|                 IncidenceMatrix => | -1 -1 0  0  |                          |
|                                    | 0  0  -1 -1 |                          |
|                                    | 1  0  1  0  |                          |
|                                    | 0  1  0  1  |                          |
|                 Q0 => {0, 1, 2, 3}                                          |
|                 Q1 => {{0, 2}, {0, 3}, {1, 2}, {1, 3}}                      |
|                 synonym => toric quiver                                     |
|                 weights => {-1, -2, 1, 2}                                   |
|                                                                             |
|o6 : List                                                                    |
|-----------------------------------------------------------------------------|
|e)                                                                           |
+-----------------------------------------------------------------------------+

See also
========

  * AsSubquiver

Ways to use subquivers:
=======================

  * "subquivers(Matrix)"
  * "subquivers(ToricQuiver)"

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

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

wallType -- get the type of a wall for a given quiver
*****************************************************

Synopsis
========

  * Usage:
        wallType (Qplus, Q)
        wallType (Qplus, M)
  * Inputs:
      * Q, an instance of the type ToricQuiver,
      * M, a matrix (Macaulay2Doc),
      * Qplus, a list (Macaulay2Doc),
  * Outputs:
      * WT, a sequence (Macaulay2Doc), having two nonnegative
        integer entries

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

Every wall can be represented uniquely by a partition of the vertices Q0 of Q
into two sets Qplus and Qminus. We denote the wall W by the subset of vertices
Qplus used for defining it.

The type of the wall is defined as (t+,t-) where t^+ is the number of arrows
starting Qplus and ending in Qminus, and t- is the number of arrows starting
Qminus and ending in Qplus.

This method is written to compute the wall type based on the incidence matrix,
in the case of a trivial flow, or the entire quiver.

+---------------------------------------------+
|i1 : wallType({0,2,3}, bipartiteQuiver(2, 3))|
|                                             |
|o1 = (1, 2)                                  |
|                                             |
|o1 : Sequence                                |
+---------------------------------------------+
+--------------------------------------------------------------------+
|i2 : wallType({0,2,3}, quiverIncidenceMatrix(bipartiteQuiver(2, 3)))|
|                                                                    |
|o2 = (1, 2)                                                         |
|                                                                    |
|o2 : Sequence                                                       |
+--------------------------------------------------------------------+
+--------------------------------------------+
|i3 : wallType({1,2,3}, chainQuiver({2,3,4}))|
|                                            |
|o3 = (0, 2)                                 |
|                                            |
|o3 : Sequence                               |
+--------------------------------------------+

Ways to use wallType:
=====================

  * "wallType(List,Matrix)"
  * "wallType(List,ToricQuiver)"

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

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

getWeights -- image of the flow on the vertices
***********************************************

Synopsis
========

  * Usage:
        getWeights M
        getWeights Q
  * Inputs:
      * M, a matrix (Macaulay2Doc),
      * Q, an instance of the type ToricQuiver,
  * Outputs:
      * L, a list (Macaulay2Doc), of integers, corresponding to the
        image of the flow of the provided toric quiver under the $Inc$ map

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

This method returns the weight of the quiver. This vector is the image of its
flow under the $inc$ map, which is defined as $$ \text{inc}(\mathbf{w})(i) :=
\sum_{a\in Q_1 \atop a^{+} = i} \mathbf{w}(a) - \sum_{a\in Q_1 \atop a^{-} = i}
\mathbf{w}(a) \quad \text{ for all } i \in Q_0. $$ where for any arrow $a\in
Q_1$, we denote its head as $a^{+} \in Q_0$ and its tail as $a^{-} \in Q_0$.

+------------------------------------------------------------------------+
|i1 : Q = bipartiteQuiver(2, 3, Flow => "Random")                        |
|                                                                        |
|o1 = ToricQuiver{flow => {8, 1, 3, 7, 8, 3}                            }|
|                 IncidenceMatrix => | -1 -1 -1 0  0  0  |               |
|                                    | 0  0  0  -1 -1 -1 |               |
|                                    | 1  0  0  1  0  0  |               |
|                                    | 0  1  0  0  1  0  |               |
|                                    | 0  0  1  0  0  1  |               |
|                 Q0 => {0, 1, 2, 3, 4}                                  |
|                 Q1 => {{0, 2}, {0, 3}, {0, 4}, {1, 2}, {1, 3}, {1, 4}} |
|                 synonym => toric quiver                                |
|                 weights => {-12, -18, 15, 9, 6}                        |
|                                                                        |
|o1 : ToricQuiver                                                        |
+------------------------------------------------------------------------+
|i2 : getWeights Q                                                       |
|                                                                        |
|o2 = {-12, -18, 15, 9, 6}                                               |
|                                                                        |
|o2 : List                                                               |
+------------------------------------------------------------------------+

See also
========

  * incInverse -- compute a flow in the preimage for a given
    weight

Ways to use getWeights:
=======================

  * "getWeights(Matrix)"
  * "getWeights(ToricQuiver)"

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

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

AsSubquiver
***********

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

option for subquiver representation. Applying AsSubquiver = true insures that
the matrix representation of the subquiver is the same size as the matrix
original quiver. If false, then the subquiver is returned as a standalone
quiver represented by only the vertices and arrows comprising the subquiver.

+-----------------------------------------------------------------------------+
|i1 : subquivers(bipartiteQuiver(2, 2), Format => "quiver", AsSubquiver => tru|
|                                                                             |
|o1 = {ToricQuiver{flow => {1, 0, 0, 0}                  },                   |
|                  IncidenceMatrix => | -1 -1 0  0  |                         |
|                                     | 0  0  -1 -1 |                         |
|                                     | 1  0  1  0  |                         |
|                                     | 0  1  0  1  |                         |
|                  Q0 => {0, 1, 2, 3}                                         |
|                  Q1 => {{0, 2}, {0, 3}, {1, 2}, {1, 3}}                     |
|                  synonym => toric quiver                                    |
|                  weights => {-1, 0, 1, 0}                                   |
|     ------------------------------------------------------------------------|
|     ToricQuiver{flow => {0, 1, 0, 0}                  },                    |
|                 IncidenceMatrix => | -1 -1 0  0  |                          |
|                                    | 0  0  -1 -1 |                          |
|                                    | 1  0  1  0  |                          |
|                                    | 0  1  0  1  |                          |
|                 Q0 => {0, 1, 2, 3}                                          |
|                 Q1 => {{0, 2}, {0, 3}, {1, 2}, {1, 3}}                      |
|                 synonym => toric quiver                                     |
|                 weights => {-1, 0, 0, 1}                                    |
|     ------------------------------------------------------------------------|
|     ToricQuiver{flow => {0, 0, 1, 0}                  },                    |
|                 IncidenceMatrix => | -1 -1 0  0  |                          |
|                                    | 0  0  -1 -1 |                          |
|                                    | 1  0  1  0  |                          |
|                                    | 0  1  0  1  |                          |
|                 Q0 => {0, 1, 2, 3}                                          |
|                 Q1 => {{0, 2}, {0, 3}, {1, 2}, {1, 3}}                      |
|                 synonym => toric quiver                                     |
|                 weights => {0, -1, 1, 0}                                    |
|     ------------------------------------------------------------------------|
|     ToricQuiver{flow => {0, 0, 0, 1}                  },                    |
|                 IncidenceMatrix => | -1 -1 0  0  |                          |
|                                    | 0  0  -1 -1 |                          |
|                                    | 1  0  1  0  |                          |
|                                    | 0  1  0  1  |                          |
|                 Q0 => {0, 1, 2, 3}                                          |
|                 Q1 => {{0, 2}, {0, 3}, {1, 2}, {1, 3}}                      |
|                 synonym => toric quiver                                     |
|                 weights => {0, -1, 0, 1}                                    |
|     ------------------------------------------------------------------------|
|     ToricQuiver{flow => {1, 1, 0, 0}                  },                    |
|                 IncidenceMatrix => | -1 -1 0  0  |                          |
|                                    | 0  0  -1 -1 |                          |
|                                    | 1  0  1  0  |                          |
|                                    | 0  1  0  1  |                          |
|                 Q0 => {0, 1, 2, 3}                                          |
|                 Q1 => {{0, 2}, {0, 3}, {1, 2}, {1, 3}}                      |
|                 synonym => toric quiver                                     |
|                 weights => {-2, 0, 1, 1}                                    |
|     ------------------------------------------------------------------------|
|     ToricQuiver{flow => {1, 0, 1, 0}                  },                    |
|                 IncidenceMatrix => | -1 -1 0  0  |                          |
|                                    | 0  0  -1 -1 |                          |
|                                    | 1  0  1  0  |                          |
|                                    | 0  1  0  1  |                          |
|                 Q0 => {0, 1, 2, 3}                                          |
|                 Q1 => {{0, 2}, {0, 3}, {1, 2}, {1, 3}}                      |
|                 synonym => toric quiver                                     |
|                 weights => {-1, -1, 2, 0}                                   |
|     ------------------------------------------------------------------------|
|     ToricQuiver{flow => {0, 1, 1, 0}                  },                    |
|                 IncidenceMatrix => | -1 -1 0  0  |                          |
|                                    | 0  0  -1 -1 |                          |
|                                    | 1  0  1  0  |                          |
|                                    | 0  1  0  1  |                          |
|                 Q0 => {0, 1, 2, 3}                                          |
|                 Q1 => {{0, 2}, {0, 3}, {1, 2}, {1, 3}}                      |
|                 synonym => toric quiver                                     |
|                 weights => {-1, -1, 1, 1}                                   |
|     ------------------------------------------------------------------------|
|     ToricQuiver{flow => {1, 0, 0, 1}                  },                    |
|                 IncidenceMatrix => | -1 -1 0  0  |                          |
|                                    | 0  0  -1 -1 |                          |
|                                    | 1  0  1  0  |                          |
|                                    | 0  1  0  1  |                          |
|                 Q0 => {0, 1, 2, 3}                                          |
|                 Q1 => {{0, 2}, {0, 3}, {1, 2}, {1, 3}}                      |
|                 synonym => toric quiver                                     |
|                 weights => {-1, -1, 1, 1}                                   |
|     ------------------------------------------------------------------------|
|     ToricQuiver{flow => {0, 1, 0, 1}                  },                    |
|                 IncidenceMatrix => | -1 -1 0  0  |                          |
|                                    | 0  0  -1 -1 |                          |
|                                    | 1  0  1  0  |                          |
|                                    | 0  1  0  1  |                          |
|                 Q0 => {0, 1, 2, 3}                                          |
|                 Q1 => {{0, 2}, {0, 3}, {1, 2}, {1, 3}}                      |
|                 synonym => toric quiver                                     |
|                 weights => {-1, -1, 0, 2}                                   |
|     ------------------------------------------------------------------------|
|     ToricQuiver{flow => {0, 0, 1, 1}                  },                    |
|                 IncidenceMatrix => | -1 -1 0  0  |                          |
|                                    | 0  0  -1 -1 |                          |
|                                    | 1  0  1  0  |                          |
|                                    | 0  1  0  1  |                          |
|                 Q0 => {0, 1, 2, 3}                                          |
|                 Q1 => {{0, 2}, {0, 3}, {1, 2}, {1, 3}}                      |
|                 synonym => toric quiver                                     |
|                 weights => {0, -2, 1, 1}                                    |
|     ------------------------------------------------------------------------|
|     ToricQuiver{flow => {1, 1, 1, 0}                  },                    |
|                 IncidenceMatrix => | -1 -1 0  0  |                          |
|                                    | 0  0  -1 -1 |                          |
|                                    | 1  0  1  0  |                          |
|                                    | 0  1  0  1  |                          |
|                 Q0 => {0, 1, 2, 3}                                          |
|                 Q1 => {{0, 2}, {0, 3}, {1, 2}, {1, 3}}                      |
|                 synonym => toric quiver                                     |
|                 weights => {-2, -1, 2, 1}                                   |
|     ------------------------------------------------------------------------|
|     ToricQuiver{flow => {1, 1, 0, 1}                  },                    |
|                 IncidenceMatrix => | -1 -1 0  0  |                          |
|                                    | 0  0  -1 -1 |                          |
|                                    | 1  0  1  0  |                          |
|                                    | 0  1  0  1  |                          |
|                 Q0 => {0, 1, 2, 3}                                          |
|                 Q1 => {{0, 2}, {0, 3}, {1, 2}, {1, 3}}                      |
|                 synonym => toric quiver                                     |
|                 weights => {-2, -1, 1, 2}                                   |
|     ------------------------------------------------------------------------|
|     ToricQuiver{flow => {1, 0, 1, 1}                  },                    |
|                 IncidenceMatrix => | -1 -1 0  0  |                          |
|                                    | 0  0  -1 -1 |                          |
|                                    | 1  0  1  0  |                          |
|                                    | 0  1  0  1  |                          |
|                 Q0 => {0, 1, 2, 3}                                          |
|                 Q1 => {{0, 2}, {0, 3}, {1, 2}, {1, 3}}                      |
|                 synonym => toric quiver                                     |
|                 weights => {-1, -2, 2, 1}                                   |
|     ------------------------------------------------------------------------|
|     ToricQuiver{flow => {0, 1, 1, 1}                  }}                    |
|                 IncidenceMatrix => | -1 -1 0  0  |                          |
|                                    | 0  0  -1 -1 |                          |
|                                    | 1  0  1  0  |                          |
|                                    | 0  1  0  1  |                          |
|                 Q0 => {0, 1, 2, 3}                                          |
|                 Q1 => {{0, 2}, {0, 3}, {1, 2}, {1, 3}}                      |
|                 synonym => toric quiver                                     |
|                 weights => {-1, -2, 1, 2}                                   |
|                                                                             |
|o1 : List                                                                    |
|-----------------------------------------------------------------------------|
|e)                                                                           |
+-----------------------------------------------------------------------------+
|i2 : subquivers(bipartiteQuiver(2, 2), Format => "quiver", AsSubquiver => fal|
|                                                                             |
|o2 = {ToricQuiver{flow => {1}              },                                |
|                  IncidenceMatrix => | -1 |                                  |
|                                     | 1  |                                  |
|                  Q0 => {0, 1}                                               |
|                  Q1 => {{0, 1}}                                             |
|                  synonym => toric quiver                                    |
|                  weights => {-1, 1}                                         |
|                                                                             |
|                                                                             |
|     ------------------------------------------------------------------------|
|     ToricQuiver{flow => {1}              },                                 |
|                 IncidenceMatrix => | -1 |                                   |
|                                    | 1  |                                   |
|                 Q0 => {0, 1}                                                |
|                 Q1 => {{0, 1}}                                              |
|                 synonym => toric quiver                                     |
|                 weights => {-1, 1}                                          |
|                                                                             |
|                                                                             |
|     ------------------------------------------------------------------------|
|     ToricQuiver{flow => {1}              },                                 |
|                 IncidenceMatrix => | -1 |                                   |
|                                    | 1  |                                   |
|                 Q0 => {0, 1}                                                |
|                 Q1 => {{0, 1}}                                              |
|                 synonym => toric quiver                                     |
|                 weights => {-1, 1}                                          |
|                                                                             |
|                                                                             |
|     ------------------------------------------------------------------------|
|     ToricQuiver{flow => {1}              },                                 |
|                 IncidenceMatrix => | -1 |                                   |
|                                    | 1  |                                   |
|                 Q0 => {0, 1}                                                |
|                 Q1 => {{0, 1}}                                              |
|                 synonym => toric quiver                                     |
|                 weights => {-1, 1}                                          |
|                                                                             |
|                                                                             |
|     ------------------------------------------------------------------------|
|     ToricQuiver{flow => {1, 1}              },                              |
|                 IncidenceMatrix => | -1 -1 |                                |
|                                    | 1  0  |                                |
|                                    | 0  1  |                                |
|                 Q0 => {0, 1, 2}                                             |
|                 Q1 => {{0, 1}, {0, 2}}                                      |
|                 synonym => toric quiver                                     |
|                 weights => {-2, 1, 1}                                       |
|                                                                             |
|     ------------------------------------------------------------------------|
|     ToricQuiver{flow => {1, 1}              },                              |
|                 IncidenceMatrix => | -1 0  |                                |
|                                    | 0  -1 |                                |
|                                    | 1  1  |                                |
|                 Q0 => {0, 1, 2}                                             |
|                 Q1 => {{0, 2}, {1, 2}}                                      |
|                 synonym => toric quiver                                     |
|                 weights => {-1, -1, 2}                                      |
|                                                                             |
|     ------------------------------------------------------------------------|
|     ToricQuiver{flow => {1, 1}              },                              |
|                 IncidenceMatrix => | -1 0  |                                |
|                                    | 0  -1 |                                |
|                                    | 0  1  |                                |
|                                    | 1  0  |                                |
|                 Q0 => {0, 1, 2, 3}                                          |
|                 Q1 => {{0, 3}, {1, 2}}                                      |
|                 synonym => toric quiver                                     |
|                 weights => {-1, -1, 1, 1}                                   |
|     ------------------------------------------------------------------------|
|     ToricQuiver{flow => {1, 1}              },                              |
|                 IncidenceMatrix => | -1 0  |                                |
|                                    | 0  -1 |                                |
|                                    | 1  0  |                                |
|                                    | 0  1  |                                |
|                 Q0 => {0, 1, 2, 3}                                          |
|                 Q1 => {{0, 2}, {1, 3}}                                      |
|                 synonym => toric quiver                                     |
|                 weights => {-1, -1, 1, 1}                                   |
|     ------------------------------------------------------------------------|
|     ToricQuiver{flow => {1, 1}              },                              |
|                 IncidenceMatrix => | -1 0  |                                |
|                                    | 0  -1 |                                |
|                                    | 1  1  |                                |
|                 Q0 => {0, 1, 2}                                             |
|                 Q1 => {{0, 2}, {1, 2}}                                      |
|                 synonym => toric quiver                                     |
|                 weights => {-1, -1, 2}                                      |
|                                                                             |
|     ------------------------------------------------------------------------|
|     ToricQuiver{flow => {1, 1}              },                              |
|                 IncidenceMatrix => | -1 -1 |                                |
|                                    | 1  0  |                                |
|                                    | 0  1  |                                |
|                 Q0 => {0, 1, 2}                                             |
|                 Q1 => {{0, 1}, {0, 2}}                                      |
|                 synonym => toric quiver                                     |
|                 weights => {-2, 1, 1}                                       |
|                                                                             |
|     ------------------------------------------------------------------------|
|     ToricQuiver{flow => {1, 1, 1}              },                           |
|                 IncidenceMatrix => | -1 -1 0  |                             |
|                                    | 0  0  -1 |                             |
|                                    | 1  0  1  |                             |
|                                    | 0  1  0  |                             |
|                 Q0 => {0, 1, 2, 3}                                          |
|                 Q1 => {{0, 2}, {0, 3}, {1, 2}}                              |
|                 synonym => toric quiver                                     |
|                 weights => {-2, -1, 2, 1}                                   |
|     ------------------------------------------------------------------------|
|     ToricQuiver{flow => {1, 1, 1}              },                           |
|                 IncidenceMatrix => | -1 -1 0  |                             |
|                                    | 0  0  -1 |                             |
|                                    | 1  0  0  |                             |
|                                    | 0  1  1  |                             |
|                 Q0 => {0, 1, 2, 3}                                          |
|                 Q1 => {{0, 2}, {0, 3}, {1, 3}}                              |
|                 synonym => toric quiver                                     |
|                 weights => {-2, -1, 1, 2}                                   |
|     ------------------------------------------------------------------------|
|     ToricQuiver{flow => {1, 1, 1}              },                           |
|                 IncidenceMatrix => | -1 0  0  |                             |
|                                    | 0  -1 -1 |                             |
|                                    | 1  1  0  |                             |
|                                    | 0  0  1  |                             |
|                 Q0 => {0, 1, 2, 3}                                          |
|                 Q1 => {{0, 2}, {1, 2}, {1, 3}}                              |
|                 synonym => toric quiver                                     |
|                 weights => {-1, -2, 2, 1}                                   |
|     ------------------------------------------------------------------------|
|     ToricQuiver{flow => {1, 1, 1}              }}                           |
|                 IncidenceMatrix => | -1 0  0  |                             |
|                                    | 0  -1 -1 |                             |
|                                    | 0  1  0  |                             |
|                                    | 1  0  1  |                             |
|                 Q0 => {0, 1, 2, 3}                                          |
|                 Q1 => {{0, 3}, {1, 2}, {1, 3}}                              |
|                 synonym => toric quiver                                     |
|                 weights => {-1, -2, 1, 2}                                   |
|                                                                             |
|o2 : List                                                                    |
|-----------------------------------------------------------------------------|
|se)                                                                          |
+-----------------------------------------------------------------------------+

See also
========

  * subquivers -- return all possible subquivers of a given
    quiver

Functions with optional argument named AsSubquiver:
===================================================

  * "subquivers(...,AsSubquiver=>...)" -- see subquivers, --
    return all possible subquivers of a given quiver

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

The object AsSubquiver, is a symbol (Macaulay2Doc).

Flow
****

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

optional argument that can be a string with values Canonical, which assigns a
value of 1 to each edge, or Random, which assigns random integer values.

+-----------------------------------------------------------------------------+
|i1 : Q = toricQuiver(matrix({{-1,-1,-1,-1},{1,1,0,0},{0,0,1,1}}), Flow =>    |
|                                                                             |
|o1 = ToricQuiver{flow => {1, 1, 1, 1}                  }                     |
|                 IncidenceMatrix => | -1 -1 -1 -1 |                          |
|                                    | 1  1  0  0  |                          |
|                                    | 0  0  1  1  |                          |
|                 Q0 => {0, 1, 2}                                             |
|                 Q1 => {{0, 1}, {0, 1}, {0, 2}, {0, 2}}                      |
|                 synonym => toric quiver                                     |
|                 weights => {-4, 2, 2}                                       |
|                                                                             |
|o1 : ToricQuiver                                                             |
|-----------------------------------------------------------------------------|
|"Canonical")                                                                 |
+-----------------------------------------------------------------------------+
|i2 : Q = toricQuiver(matrix({{-1,-1,-1,-1},{0,0,1,1},{1,1,0,0}}), Flow =>    |
|                                                                             |
|o2 = ToricQuiver{flow => {3, 7, 8, 1}                  }                     |
|                 IncidenceMatrix => | -1 -1 -1 -1 |                          |
|                                    | 1  1  0  0  |                          |
|                                    | 0  0  1  1  |                          |
|                 Q0 => {0, 1, 2}                                             |
|                 Q1 => {{0, 1}, {0, 1}, {0, 2}, {0, 2}}                      |
|                 synonym => toric quiver                                     |
|                 weights => {-19, 10, 9}                                     |
|                                                                             |
|o2 : ToricQuiver                                                             |
|-----------------------------------------------------------------------------|
|"Random")                                                                    |
+-----------------------------------------------------------------------------+
|i3 : Q = bipartiteQuiver(2, 3, Flow => "Random")                             |
|                                                                             |
|o3 = ToricQuiver{flow => {8, 3, 3, 7, 8, 8}                            }     |
|                 IncidenceMatrix => | -1 -1 -1 0  0  0  |                    |
|                                    | 0  0  0  -1 -1 -1 |                    |
|                                    | 1  0  0  1  0  0  |                    |
|                                    | 0  1  0  0  1  0  |                    |
|                                    | 0  0  1  0  0  1  |                    |
|                 Q0 => {0, 1, 2, 3, 4}                                       |
|                 Q1 => {{0, 2}, {0, 3}, {0, 4}, {1, 2}, {1, 3}, {1, 4}}      |
|                 synonym => toric quiver                                     |
|                 weights => {-14, -23, 15, 11, 11}                           |
|                                                                             |
|o3 : ToricQuiver                                                             |
+-----------------------------------------------------------------------------+

See also
========

  * toricQuiver -- the toricQuiver constructor

Functions with optional argument named Flow:
============================================

  * "bipartiteQuiver(...,Flow=>...)" -- see bipartiteQuiver,
    -- make a toric quiver on underlying bipartite graph
  * "chainQuiver(...,Flow=>...)" -- see chainQuiver, -- make
    a toric quiver on underlying graph in the form of a chain
  * "threeVertexQuiver(...,Flow=>...)" -- see threeVertexQuiver,
    -- make a toric quiver on underlying graph with three
    vertices and a specified number of edges between each
  * "toricQuiver(...,Flow=>...)" -- see toricQuiver, -- the
    toricQuiver constructor

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

The object Flow, is a symbol (Macaulay2Doc).

ReturnSingletons
****************

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

This is an optional argument for the function maximalNonstableSubquivers, which
allows the user to consider single vertices as subquivers. For most
computations, these subquivers are trivial, and are ignored.

+-----------------------------------------------------------------------------+
|i1 : maximalNonstableSubquivers(bipartiteQuiver (2, 3), ReturnSingletons =>  |
|                                                                             |
|o1 = HashTable{NonSingletons => {{0, 1, 2, 3}, {0, 1, 2, 4}, {0, 1, 2, 5}, { |
|               Singletons => {{0}, {1}}                                      |
|                                                                             |
|o1 : HashTable                                                               |
|-----------------------------------------------------------------------------|
|true)                                                                        |
|                                                                             |
|0, 3, 4, 5}, {1, 3, 4, 5}, {2, 3, 4, 5}}}                                    |
+-----------------------------------------------------------------------------+
|i2 : maximalNonstableSubquivers(bipartiteQuiver (2, 3), ReturnSingletons =>  |
|                                                                             |
|o2 = HashTable{NonSingletons => {{0, 1, 2, 3}, {0, 1, 2, 4}, {0, 1, 2, 5}, { |
|                                                                             |
|o2 : HashTable                                                               |
|-----------------------------------------------------------------------------|
|false)                                                                       |
|                                                                             |
|0, 3, 4, 5}, {1, 3, 4, 5}, {2, 3, 4, 5}}}                                    |
+-----------------------------------------------------------------------------+

See also
========

  * maximalNonstableSubquivers -- return the
    maximal subquivers that are semistable

Functions with optional argument named ReturnSingletons:
========================================================

  * "maximalNonstableSubquivers(...,ReturnSingletons=>...)" -- see
    maximalNonstableSubquivers, -- return the
    maximal subquivers that are semistable
  * "maximalUnstableSubquivers(...,ReturnSingletons=>...)" -- see
    maximalUnstableSubquivers, -- return the maximal
    subquivers that are unstable

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

The object ReturnSingletons, is a symbol (Macaulay2Doc).