Quivers
Information class, Quivers

A quiver Q is a set derived from a labeled directed multigraph with loops \Gamma. An element of Q is called a *path*, and falls into one of three classes. The first class is the set of *vertices* of \Gamma. The second class is the set of *walks* in \Gamma of length at least one, each of which is represented by the corresponding sequence of *arrows* in \Gamma. The third class is the singleton set containing the distinguished *zero path*, usually denoted 0. An associative multiplication is defined on Q.

This chapter describes the functions in `QPA` that deal with paths and quivers. The functions for constructing paths in Section are normally not useful in isolation; typically, they are invoked by the functions for constructing quivers in Section .

is the info class for functions dealing with quivers.
Constructing Quivers
Arguments: First construction: N -- number of vertices, arrows -- a list of arrows to specify the graph \Gamma. Second construction: vertices -- a list of vertex names, arrows -- a list of arrows. Third construction: takes an adjacency matrix for the graph \Gamma.

a quiver, which is an object from the category .
In the first and third constructions, the vertices are named `v1, v2, ...'. In the second construction, unique vertex names are given as strings in the list that is the first parameter. Each arrow is a list consisting of a source vertex and a target vertex, followed optionally by an arrow name as a string.

Vertices and arrows are referenced as record components using the dot (`.') operator.
gap> q1 := Quiver(["u","v"],[["u","u","a"],["u","v","b"], > ["v","u","c"],["v","v","d"]]); <quiver with 2 vertices and 4 arrows> gap> VerticesOfQuiver(q1); [ u, v ] gap> ArrowsOfQuiver(q1); [ a, b, c, d ] gap> q2 := Quiver(2,[[1,1],[2,1],[1,2]]); <quiver with 2 vertices and 3 arrows> gap> ArrowsOfQuiver(q2); [ a1, a2, a3 ] gap> VerticesOfQuiver(q2); [ v1, v2 ] gap> q3 := Quiver(2,[[1,1,"a"],[2,1,"b"],[1,2,"c"]]); <quiver with 2 vertices and 3 arrows> gap> ArrowsOfQuiver(q3); [ a, b, c ] gap> q4 := Quiver([[1,1],[2,1]]); <quiver with 2 vertices and 5 arrows> gap> VerticesOfQuiver(q4); [ v1, v2 ] gap> ArrowsOfQuiver(q4); [ a1, a2, a3, a4, a5 ] gap> SourceOfPath(q4.a2); v1 gap> TargetOfPath(q4.a2); v2
Arguments: Delta, n, orientation -- a character (A,D,E), a positive integer, and a list giving the orientation.
a Dynkin quiver of type Delta ("A", "D", or "E") with index n and orientation of the arrows given by the list orientation.
If Delta is equal to "A" with index n, then the list orientation is of the form ["r", "l", "l", ...,"r", "l"] of length n-1, where "l" or "r" in coordinate i means that the arrow a_i is oriented to the left or to the right, respectively. The vertices and the arrows are named as in the following diagram \xymatrix{1\ar@{-}[r]^-{a_1} & 2\ar@{-}[r]^-{a_2} & \ar@{--}[r] & \ar@{-}[r]^-{a_{n-2}} & n - 1 \ar@{-}[r]^-{a_{n-1}} & n }

If Delta is equal to "D" with index n and n greater or equal to 4, then the list orientation is of the form ["r", "l", "l", ...,"r", "l"] of length n-1, where "l" or "r" in coordinate i means that the arrow a_i is oriented to the left or to the right, respectively. The vertices and the arrows are named as in the following diagram \xymatrix{1\ar@{-}[dr]^-{a_1} & & & & & \\ & 3\ar@{-}[r]^{a_3} & \ar@{--}[r] & \ar@{-}[r]^-{a_{n-2}} & n - 1 \ar@{-}[r]^-{a_{n-1}} & n \\ 2\ar@{-}[ur]_-{a_2} & & & & & }

If Delta is equal to "E" with index n and n in [6,7,8], then the list orientation is of the form ["r", "l", "l", ...,"r", "l","d"] of length n-1, where "l" or "r" in the n - 2 first coordinates and at coordinate i means that the arrow a_i is oriented to the left or to the right, respectively, and the last orientation parameter is "d" or "u" indicating if the arrow a_{n-1} is oriented down or up. The vertices and the arrows are named as in the following diagram \xymatrix{ & & n\ar@{-}[d]^{a_{n-1}} & & & & & \\ 1\ar@{-}[r]^{a_1} & 2\ar@{-}[r]^{a_2} & 3\ar@{-}[r]^-{a_3} & \ar@{--}[r] &\ar@{-}[r] & n - 2 \ar@{-}[r]^-{a_{n-2}} & n - 1}
a copy of quiver whose elements are ordered by ordering. The default ordering of a quiver is length left lexicographic. See Section for more information.
Categories and Properties of Quivers
true when object is a quiver.
true when quiver is a quiver with no oriented cycles.
true when quiver is a quiver with no unoriented cycles. Note: an oriented cycle is also an unoriented cycle!
true when quiver is a connected quiver (i.e. each pair of vertices is connected by an unoriented path in quiver).
true when quiver is a tree as a graph (i.e. it is connected and contains no unoriented cycles).
gap> q1 := Quiver(2,[[1,2]]); <quiver with 2 vertices and 1 arrows> gap> IsQuiver("v1"); false gap> IsQuiver(q1); true gap> IsAcyclicQuiver(q1); IsUAcyclicQuiver(q1); true true gap> IsConnectedQuiver(q1); IsTreeQuiver(q1); true true gap> q2 := Quiver(["u","v"],[["u","v"],["v","u"]]); <quiver with 2 vertices and 2 arrows> gap> IsAcyclicQuiver(q2); IsUAcyclicQuiver(q2); false false gap> IsConnectedQuiver(q2); IsTreeQuiver(q2); true false gap> q3 := Quiver(["u","v"],[["u","v"],["u","v"]]); <quiver with 2 vertices and 2 arrows> gap> IsAcyclicQuiver(q3); IsUAcyclicQuiver(q3); true false gap> IsConnectedQuiver(q3); IsTreeQuiver(q3); true false gap> q4 := Quiver(2, []); <quiver with 2 vertices and 0 arrows> gap> IsAcyclicQuiver(q4); IsUAcyclicQuiver(q4); true true gap> IsConnectedQuiver(q4); IsTreeQuiver(q4); false false
true when quiver is a Dynkin quiver (more precisely, when underlying undirected graph of quiver is a Dynkin diagram).
This function prints an additional information. If it returns true, it prints the Dynkin type of quiver, i.e. A_n, D_m, E_6, E_7 or E_8. Moreover, in case quiver is not connected or contains an unoriented cycle, the function also prints a respective info.
gap> q1 := Quiver(4,[[1,4],[4,2],[3,4]]); <quiver with 4 vertices and 3 arrows> gap> IsDynkinQuiver(q1); D_4 true gap> q2 := Quiver(2,[[1,2],[1,2]]); <quiver with 2 vertices and 2 arrows> gap> IsDynkinQuiver(q2); Quiver contains an (un)oriented cycle. false gap> q3 := Quiver(5,[[1,5],[2,5],[3,5],[4,5]]); <quiver with 5 vertices and 4 arrows>
Orderings of paths in a quiver

The only supported ordering on the paths in a quiver is length left lexicographic ordering. The reason for this is that `QPA` does not have its own functions for computing Groebner basis. Instead they are computed using the &GAP;-package `GBNP`. The interface with this package, which is provided by the `QPA`, only supports the length left lexicographic ordering, even though `GBNP` supports more orderings.

For constructing a quiver, there are three different methods. TODO: Explain how the vertices and arrows are ordered.

Attributes and Operations for Quivers
Arguments: Q -- a quiver, and element -- a vertex or an arrow.

The operation allows access to generators of the quiver. If you have named your vertices and arrows then the access looks like `Q.name of element'. If you have not named the elements of the quiver, then the default names are v1, v2, ... and a1, a2, ... in the order they are created.
a list of paths that are vertices in quiver.
a list of paths that are arrows in quiver.
the adjacency matrix of quiver.
a list of the vertices and the arrows in quiver.
the number of vertices in quiver.
the number of arrows in quiver.
the ordering used to order elements in quiver. See Section for more information.
the opposite quiver of quiver, where the vertices are labelled "name in original quiver" + "_op" and the arrows are labelled "name in orginal quiver" + "_op".
This attribute contains the opposite quiver of a quiver, that is, a quiver which is the same except that every arrow goes in the opposite direction.

The operation takes a path in a quiver to the corresponding path in the opposite quiver.

The opposite of the opposite of a quiver Q is isomorphic to Q. In QPA, we regard these two quivers to be the same, so the call `OppositeQuiver(OppositeQuiver(Q))` returns the object `Q`.
gap> q1 := Quiver(["u","v"],[["u","u","a"],["u","v","b"], > ["v","u","c"],["v","v","d"]]); <quiver with 2 vertices and 4 arrows> gap> q1.a; a gap> q1.v; v gap> VerticesOfQuiver(q1); [ u, v ] gap> ArrowsOfQuiver(q1); [ a, b, c, d ] gap> AdjacencyMatrixOfQuiver(q1); [ [ 1, 1 ], [ 1, 1 ] ] gap> GeneratorsOfQuiver(q1); [ u, v, a, b, c, d ] gap> NumberOfVertices(q1); 2 gap> NumberOfArrows(q1); 4 gap> OrderingOfQuiver(q1); <length left lexicographic ordering> gap> q1_op := OppositeQuiver(q1); <quiver with 2 vertices and 4 arrows> gap> VerticesOfQuiver(q1_op); [ u_op, v_op ] gap> ArrowsOfQuiver(q1_op); [ a_op, b_op, c_op, d_op ]
This function returns a quiver which is a full subquiver of a quiver induced by the list of its vertices.
The names of vertices and arrows in resulting (sub)quiver remain the same as in original one. The function checks if list consists of vertices of quiver.
This function returns a list of quivers which are all connected components of a quiver.
The names of vertices and arrows in resulting (sub)quiver remain the same as in original one. The function sets the property to true for all the components.
gap> Q := Quiver(6, [ [1,2],[1,1],[3,2],[4,5],[4,5] ]); <quiver with 6 vertices and 5 arrows> gap> VerticesOfQuiver(Q); [ v1, v2, v3, v4, v5, v6 ] gap> FullSubquiver(Q, [Q.v1, Q.v2]); <quiver with 2 vertices and 2 arrows> gap> ConnectedComponentsOfQuiver(Q); [ <quiver with 3 vertices and 3 arrows>, <quiver with 2 vertices and 2 arrows>, <quiver with 1 vertices and 0 arrows> ]
Arguments: quiver -- a quiver.
the separated quiver of quiver.
The vertices in the separated quiver are labelled v and v' for each vertex v in quiver, and for each arrow a\colon v \to w in quiver the arrow v\to w' is labelled a.

Categories and Properties of Paths
All path objects are in this category.
All vertices are in this category.
All arrows are in this category.
is true when object is the zero path.
gap> q1 := Quiver(["u","v"],[["u","u","a"],["u","v","b"], > ["v","u","c"],["v","v","d"]]); <quiver with 2 vertices and 4 arrows> gap> IsPath(q1.b); true gap> IsPath(q1.u); true gap> IsQuiverVertex(q1.c); false gap> IsZeroPath(q1.d); false
Attributes and Operations of Paths
the source (first) vertex of path.
the target (last) vertex of path.
the length of path.
a list of the arrows that constitute path in order.
Arguments: p and q -- two paths in the same quiver.
the multiplication of the paths. If the paths are not in the same quiver an error is returned. If the target of p differs from the source of q, then the result is the zero path. Otherwise, if either path is a vertex, then the result is the other path. Finally, if both are paths of length at least 1, then the result is the concatenation of the walks of the two paths.
gap> q1 := Quiver(["u","v"],[["u","u","a"],["u","v","b"], > ["v","u","c"],["v","v","d"]]); <quiver with 2 vertices and 4 arrows> gap> SourceOfPath(q1.v); v gap> p1:=q1.a*q1.b*q1.d*q1.d; a*b*d^2 gap> TargetOfPath(p1); v gap> p2:=q1.b*q1.b; 0 gap> WalkOfPath(p1); [ a, b, d, d ] gap> WalkOfPath(q1.a); [ a ] gap> LengthOfPath(p1); 4 gap> LengthOfPath(q1.v); 0
Arguments: p and q -- two paths in the same quiver.
true if the two paths are equal. Two paths are equal if they have the same source and the same target and if they have the same walks.
Arguments: p and q -- two paths in the same quiver.
a comparison of the two paths with respect to the ordering of the quiver.
Attributes of Vertices
a list of arrows having vertex as target. Only meaningful if vertex is in a quiver.
a list of arrows having vertex as source.
the number of arrows having vertex as target. Only meaningful if vertex is in a quiver.
the number of arrows having vertex as source.
a list of neighbors of vertex, that is, vertices that are targets of arrows having vertex as source.
gap> q1 := Quiver(["u","v"],[["u","u","a"],["u","v","b"], > ["v","u","c"],["v","v","d"]]); <quiver with 2 vertices and 4 arrows> gap> OutgoingArrowsOfVertex(q1.u); [ a, b ] gap> InDegreeOfVertex(q1.u); 2 gap> NeighborsOfVertex(q1.v); [ u, v ]