Function Repository Resource:

AbstractQuiver

Source Notebook

Make an abstract model of a quiver (i.e. a directed multigraph) that forms the basis of an abstract category

Contributed by: Jonathan Gorard

ResourceFunction["AbstractQuiver"][ob,arr,eqob,eqarr]

makes an abstract quiver using the list of objects ob, the list or association of arrows arr, the list of object equivalences eqob and the list of arrow equivalences eqarr.

ResourceFunction["AbstractQuiver"][gr,]

makes an abstract quiver based on the directed graph gr.

ResourceFunction["AbstractQuiver"][assoc]

makes an abstract quiver using the association of objects, arrows, object equivalences and arrow equivalences assoc.

ResourceFunction["AbstractQuiver"][ResourceFunction["AbstractQuiver"][],eqob,eqarr]

makes a new abstract quiver from an old quiver by imposing new object equivalences eqob and new arrow equivalences eqarr.

Details

A quiver is a directed multigraph (i.e. a multiset of directed edges) that forms the underlying structure of an abstract category. In a quiver, the composition and identity properties of morphisms/arrows do not necessarily hold (hence the term "quiver", meaning "a collection of arrows").
An abstract presentation of a quiver can be given in terms of a collection of objects, a collection of arrows and a collection of relations on objects and arrows (effectively specifying which objects and arrows may be treated as equivalent).
ResourceFunction["AbstractQuiver"] supports the specification of abstract quivers either by four lists/associations (a list of objects ob, a list/association of arrows arr, a list of object equivalences eqob and a list of arrow equivalences eqarr); by a directed graph gr (along with possible additional equivalences between objects and arrows); or by an explicit association of the form <|"Objects"ob,"Arrows"arr,"ObjectEquivalences"eqob,"ArrowEquivalences"eqarr|>.
When specifying an abstract quiver by a collection of lists/associations, ResourceFunction["AbstractQuiver"] allows one to omit the list of objects, the list of object equivalences or the list of arrow equivalences (or some combination of the above). When the object list is omitted, it is automatically populated from the list/association of arrows. When lists of either object equivalences or arrow equivalences are omitted, they are assumed to be empty (corresponding to a "free" quiver).
The association arr of arrows should be of the form <|arr1DirectedEdge[ob1,ob2],|>, where arr1 is the name of the arrow, ob1 is the source object and ob2 is the target object.
If the function succeeds in constructing the specified abstract quiver, it will return an ResourceFunction["AbstractQuiver"] expression.
In ResourceFunction["AbstractQuiver"], the following properties are supported:
"Objects"list of objects in the abstract quiver
"ObjectCount"number of objects in the abstract quiver
"ArrowAssociation"association of arrow names/edges in the abstract quiver
"ArrowNames"list of names of arrows in the abstract quiver
"ArrowEdges"list of directed edges associated to arrows in the abstract quiver
"ArrowCount"number of arrows in the abstract quiver
"ObjectEquivalences"list of equivalences between objects in the abstract quiver
"ObjectEquivalenceCount"number of equivalences between objects in the abstract quiver
"ArrowEquivalences"list of equivalences between arrows in the abstract quiver
"ArrowEquivalenceCount"number of equivalences between arrows in the abstract quiver
"ReducedObjects"list of objects in the abstract quiver modulo the list of object equivalences
"ReducedObjectCount"number of objects in the abstract quiver modulo the list of object equivalences
"ReducedArrowAssociation"association of arrow names/edges in the abstract quiver modulo the lists of arrow/object equivalences
"ReducedArrowNames"list of names of arrows in the abstract quiver modulo the list of arrow equivalences
"ReducedArrowEdges"list of directed edges associated to arrows in the abstract quiver modulo the lists of arrow/object equivalences
"ReducedArrowCount"number of arrows in the abstract quiver modulo the list of arrow equivalences
"SimpleArrowAssociation"association of arrow names/edges in the abstract quiver with self-loops and multiedges removed
"SimpleArrowNames"list of names of arrows in the abstract quiver with self-loops and multiedges removed
"SimpleArrowEdges"list of directed edges associated to arrows in the abstract quiver with self-loops and multiedges removed
"SimpleArrowCount"number of arrows in the abstract quiver with self-loops and multiedges removed
"ReducedSimpleArrowAssociation"association of arrow names/edges in the abstract quiver with self-loops and multiedges removed, modulo the lists of arrow/object equivalences
"ReducedSimpleArrowNames"list of names of arrows in the abstract quiver with self-loops and multiedges removed, modulo the list of arrow equivalences
"ReducedSimpleArrowEdges"list of directed edges associated to arrows in the abstract quiver with self-loops and multiedges removed, modulo the lists of arrow/object equivalences
"ReducedSimpleArrowCount"number of arrows in the abstract quiver with self-loops and multiedges removed, modulo the list of arrow equivalences
"DualQuiver"dual quiver (i.e. the abstract quiver obtained by swapping the source and target objects of all the arrows)
"FullLabeledGraph"directed graph form of the abstract quiver with labels on the arrows
"FullUnlabeledGraph"directed graph form of the abstract quiver with no labels on the arrows
"ReducedLabeledGraph"directed graph form of the abstract quiver, modulo the lists of arrow/object equivalences, with labels on the arrows
"ReducedUnlabeledGraph"directed graph form of the abstract quiver, modulo the lists of arrow/object equivalences, with no labels on the arrows
"SimpleLabeledGraph"directed graph form of the abstract quiver, with self-loops and multiedges removed, with labels on the arrows
"SimpleUnlabeledGraph"directed graph form of the abstract quiver, with self-loops and multiedges removed, with no labels on the arrows
"ReducedSimpleLabeledGraph"directed graph form of the abstract quiver, with self-loops and multiedges removed, modulo the lists of arrow/object equivalences, with labels on the arrows
"ReducedSimpleUnlabeledGraph"directed graph form of the abstract quiver, with self-loops and multiedges removed, modulo the lists of arrow/object equivalences, with no labels on the arrows
"AssociationForm"abstract quiver represented as an association of objects, arrows, object equivalences and arrow equivalences
"Properties"list of properties

Examples

Basic Examples (3) 

Construct a simple abstract quiver from an association of arrows:

In[1]:=
quiver = ResourceFunction[
  "AbstractQuiver"][<|f -> {X, Y}, g -> {Y, Z}, h -> {X, Z}|>]
Out[1]=

Show the full directed graph with labels on the arrows:

In[2]:=
quiver["FullLabeledGraph"]
Out[2]=

Show the full directed graph without labels on the arrows:

In[3]:=
quiver["FullUnlabeledGraph"]
Out[3]=

Show the association of arrows:

In[4]:=
quiver["ArrowAssociation"]
Out[4]=

Show the list of directed edges:

In[5]:=
quiver["ArrowEdges"]
Out[5]=

Show the list of objects:

In[6]:=
quiver["Objects"]
Out[6]=

Construct an abstract quiver containing self-loops and multiedges from a list of objects and a list of arrows:

In[7]:=
quiver = ResourceFunction[
  "AbstractQuiver"][{X, Y, Z, W}, {{X, Y}, {Y, Z}, {Z, W}, {W, W}, {X, Y}, {X, Z}, {W, W}, {Y, Z}}]
Out[7]=

Show the full directed graph with labels on the arrows:

In[8]:=
quiver["FullLabeledGraph"]
Out[8]=

Show the full labeled graph without labels on the arrows:

In[9]:=
quiver["FullUnlabeledGraph"]
Out[9]=

Show the association of arrows:

In[10]:=
quiver["ArrowAssociation"]
Out[10]=

Show the simple directed graph with all self-loops and multiedges removed and with labels on the arrows:

In[11]:=
quiver["SimpleLabeledGraph"]
Out[11]=

Show the simple directed graph but without labels on the arrows:

In[12]:=
quiver["SimpleUnlabeledGraph"]
Out[12]=

Show the association of arrows, with all self-loops and multiedges removed:

In[13]:=
quiver["SimpleArrowAssociation"]
Out[13]=

Compute the dual quiver (obtained by swapping the source and target objects of each arrow):

In[14]:=
dual = quiver["DualQuiver"]
Out[14]=
In[15]:=
dual["FullLabeledGraph"]
Out[15]=
In[16]:=
dual["SimpleLabeledGraph"]
Out[16]=

Construct an abstract quiver from an association of arrows, with an equivalence imposed between objects Z and W:

In[17]:=
quiver = ResourceFunction[
  "AbstractQuiver"][<|f -> {X, Y}, g -> {Y, Z}, h -> {Z, W}, i -> {Y, Z}, j -> {Z, Z}, k -> {X, W}, l -> {Y, W}|>, {Z == W}]
Out[17]=

Show the full directed graph with labels on the arrows:

In[18]:=
quiver["FullLabeledGraph"]
Out[18]=

Show the full directed graph without labels on the arrows:

In[19]:=
quiver["FullUnlabeledGraph"]
Out[19]=

Show the reduced directed graph, with all equivalences between objects and arrows imposed and with labels on the arrows:

In[20]:=
quiver["ReducedLabeledGraph"]
Out[20]=

Show the reduced directed graph without labels on the arrows:

In[21]:=
quiver["ReducedUnlabeledGraph"]
Out[21]=

Show the association of arrows, with all equivalences between objects and arrows imposed:

In[22]:=
quiver["ReducedArrowAssociation"]
Out[22]=

Construct the same abstract quiver, but with an additional equivalence imposed between arrows g, i and l:

In[23]:=
quiver2 = ResourceFunction[
  "AbstractQuiver"][<|f -> {X, Y}, g -> {Y, Z}, h -> {Z, W}, i -> {Y, Z}, j -> {Z, Z}, k -> {X, W}, l -> {Y, W}|>, {Z == W}, {g == i, i == l}]
Out[23]=

Show the reduced directed graph, with all equivalences between objects and arrows imposed and with labels on the arrows:

In[24]:=
quiver2["ReducedLabeledGraph"]
Out[24]=

Show the reduced directed graph without labels on the arrows:

In[25]:=
quiver2["ReducedUnlabeledGraph"]
Out[25]=

Show the association of arrows, with all equivalences between objects and arrows imposed:

In[26]:=
quiver2["ReducedArrowAssociation"]
Out[26]=

Show the list of equivalences between objects:

In[27]:=
quiver2["ObjectEquivalences"]
Out[27]=

Show the list of equivalences between arrows:

In[28]:=
quiver2["ArrowEquivalences"]
Out[28]=

Show the association form of the abstract quiver:

In[29]:=
quiver2["AssociationForm"]
Out[29]=

Scope (3) 

Abstract quivers can be constructed directly from directed graph objects (with automatically selected arrow names):

In[30]:=
graph = Graph[{a -> b, b -> c, a -> c, c -> d, a -> d}]
Out[30]=
In[31]:=
quiver = ResourceFunction["AbstractQuiver"][graph]
Out[31]=
In[32]:=
quiver["FullLabeledGraph"]
Out[32]=

Additional arguments can be used to specify equivalences between objects and arrows:

In[33]:=
quiver2 = ResourceFunction["AbstractQuiver"][graph, {a == b}, {}]
Out[33]=
In[34]:=
quiver2["ReducedLabeledGraph"]
Out[34]=

Abstract quivers can be constructed from lists of arrows (with automatically selected arrow names):

In[35]:=
quiver = ResourceFunction[
  "AbstractQuiver"][{X -> Y, Y -> Z, X -> Z, X -> Y}]
Out[35]=
In[36]:=
quiver["FullLabeledGraph"]
Out[36]=

From associations of arrows (with explicitly provided arrow names):

In[37]:=
quiver2 = ResourceFunction[
  "AbstractQuiver"][<|f -> {X, Y}, g -> {Y, Z}, h -> {X, Z}, i -> {X, Y}|>]
Out[37]=
In[38]:=
quiver2["FullLabeledGraph"]
Out[38]=

With explicit lists of objects specified:

In[39]:=
quiver3 = ResourceFunction[
  "AbstractQuiver"][{X, Y, Z, W}, <|f -> {X, Y}, g -> {Y, Z}, h -> {X, Z}, i -> {X, Y}|>]
Out[39]=
In[40]:=
quiver3["FullLabeledGraph"]
Out[40]=

Lists of object equivalences and arrow equivalences can be specified for any abstract quiver:

In[41]:=
quiver3 = ResourceFunction[
  "AbstractQuiver"][{X, Y, Z, W}, <|f -> {X, Y}, g -> {Y, Z}, h -> {X, Z}, i -> {X, Y}|>, {Y == Z}, {f == h}]
Out[41]=
In[42]:=
quiver3["ReducedLabeledGraph"]
Out[42]=

New object equivalences and arrow equivalences can be added to any existing quiver:

In[43]:=
quiver4 = ResourceFunction["AbstractQuiver"][quiver3, {W == Z}, {h == i}]
Out[43]=
In[44]:=
quiver4["ReducedLabeledGraph"]
Out[44]=

From an explicit association:

In[45]:=
quiver5 = ResourceFunction[
  "AbstractQuiver"][<|"Objects" -> {X, Y, Z}, "Arrows" -> <|f -> {X, Y}, g -> {Y, Z}, h -> {X, Z}, i -> {Y, Z}|>,
    "ObjectEquivalences" -> {}, "ArrowEquivalences" -> {}|>]
Out[45]=
In[46]:=
quiver5["FullLabeledGraph"]
Out[46]=

Construct an abstract quiver from an association of arrows with additional object and arrow equivalences:

In[47]:=
quiver = ResourceFunction[
  "AbstractQuiver"][<|f -> {X, Y}, g -> {Y, Z}, h -> {Z, W}, i -> {X, Z}, j -> {Y, W}, k -> {Z, Z}, l -> {Y, Y}, m -> {X, Y}, o -> {X, Z}|>, {W == Z}, {i == o, g == j}]
Out[47]=

Show the list of properties:

In[48]:=
quiver["Properties"]
Out[48]=

Show the list of objects in the abstract quiver:

In[49]:=
quiver["Objects"]
Out[49]=

Show the number of objects in the abstract quiver:

In[50]:=
quiver["ObjectCount"]
Out[50]=

Show the association of arrows in the abstract quiver:

In[51]:=
quiver["ArrowAssociation"]
Out[51]=

Show the list of names of arrows in the abstract quiver:

In[52]:=
quiver["ArrowNames"]
Out[52]=

Show the list of directed edges corresponding to arrows in the abstract quiver:

In[53]:=
quiver["ArrowEdges"]
Out[53]=

Show the number of arrows in the abstract quiver:

In[54]:=
quiver["ArrowCount"]
Out[54]=

Show the list of equivalences between objects in the abstract quiver:

In[55]:=
quiver["ObjectEquivalences"]
Out[55]=

Show the number of equivalences between objects in the abstract quiver:

In[56]:=
quiver["ObjectEquivalenceCount"]
Out[56]=

Show the list of equivalences between arrows in the abstract quiver:

In[57]:=
quiver["ArrowEquivalences"]
Out[57]=

Show the number of equivalences between arrows in the abstract quiver:

In[58]:=
quiver["ArrowEquivalenceCount"]
Out[58]=

Show the list of reduced objects (modded out by all object equivalences) in the abstract quiver:

In[59]:=
quiver["ReducedObjects"]
Out[59]=

Show the number of reduced objects (modded out by all object equivalences) in the abstract quiver:

In[60]:=
quiver["ReducedObjectCount"]
Out[60]=

Show the association of reduced arrows (modded out by all object and arrow equivalences) in the abstract quiver:

In[61]:=
quiver["ReducedArrowAssociation"]
Out[61]=

Show the list of names of reduced arrows (modded out by all arrow equivalences) in the abstract quiver:

In[62]:=
quiver["ReducedArrowNames"]
Out[62]=

Show the list of directed edges corresponding to reduced arrows (modded out by all object and arrow equivalences) in the abstract quiver:

In[63]:=
quiver["ReducedArrowEdges"]
Out[63]=

Show the number of reduced arrows (modded out by all object and arrow equivalences) in the abstract quiver:

In[64]:=
quiver["ReducedArrowCount"]
Out[64]=

Show the association of simple arrows (with all self-loops and multiedges removed) in the abstract quiver:

In[65]:=
quiver["SimpleArrowAssociation"]
Out[65]=

Show the list of names of simple arrows (with all self-loops and multiedges removed) in the abstract quiver:

In[66]:=
quiver["SimpleArrowNames"]
Out[66]=

Show the list of directed edges corresponding to simple arrows (with all self-loops and multiedges removed) in the abstract quiver:

In[67]:=
quiver["SimpleArrowEdges"]
Out[67]=

Show the number of simple arrows (with all self-loops and multiedges removed) in the abstract quiver:

In[68]:=
quiver["SimpleArrowCount"]
Out[68]=

Show the association of reduced simple arrows (with all self-loops and multiedges removed, plus all object and arrow equivalences modded out) in the abstract quiver:

In[69]:=
quiver["ReducedSimpleArrowAssociation"]
Out[69]=

Show the list of names of reduced simple arrows (with all self-loops and multiedges removed, plus all object and arrow equivalences modded out) in the abstract quiver:

In[70]:=
quiver["ReducedSimpleArrowNames"]
Out[70]=

Show the list of directed edges corresponding to reduced simple arrows (with all self-loops and multiedges removed, plus all object and arrow equivalences modded out) in the abstract quiver:

In[71]:=
quiver["ReducedSimpleArrowEdges"]
Out[71]=

Show the number of reduced simple arrows (with all self-loops and multiedges removed, plus all object and arrow equivalences modded out) in the abstract quiver:

In[72]:=
quiver["ReducedSimpleArrowCount"]
Out[72]=

Compute the dual quiver (obtained by swapping the source and target objects of each arrow):

In[73]:=
dual = quiver["DualQuiver"]
Out[73]=

Show the full directed graph with labels on the arrows of the abstract quiver:

In[74]:=
quiver["FullLabeledGraph"]
Out[74]=

Show the full directed graph without labels on the arrows of the abstract quiver:

In[75]:=
quiver["FullUnlabeledGraph"]
Out[75]=

Show the reduced directed graph, with all equivalences between objects and arrows imposed and with labels on the arrows of the abstract quiver:

In[76]:=
quiver["ReducedLabeledGraph"]
Out[76]=

Show the reduced directed graph, with all equivalences between objects and arrows imposed and without labels on the arrows of the abstract quiver:

In[77]:=
quiver["ReducedUnlabeledGraph"]
Out[77]=

Show the simple directed graph, with all self-loops and multiedges removed and with labels on the arrows of the abstract quiver:

In[78]:=
quiver["SimpleLabeledGraph"]
Out[78]=

Show the simple directed graph, with all self-loops and multiedges removed and without labels on the arrows of the abstract quiver:

In[79]:=
quiver["SimpleUnlabeledGraph"]
Out[79]=

Show the reduced simple directed graph, with all self-loops and multiedges removed, plus all object and arrow equivalences modded out and with labels on the arrows of the abstract quiver:

In[80]:=
quiver["ReducedSimpleLabeledGraph"]
Out[80]=

Show the reduced simple directed graph, with all self-loops and multiedges removed, plus all object and arrow equivalences modded out and without labels on the arrows of the abstract quiver:

In[81]:=
quiver["ReducedSimpleUnlabeledGraph"]
Out[81]=

Show the explicit association form of the quiver:

In[82]:=
quiver["AssociationForm"]
Out[82]=

Publisher

Jonathan Gorard

Version History

  • 1.0.0 – 28 March 2022

Source Metadata

Related Resources

License Information