Reading the definition of a diagram in category theory (a functor $D:J\to C$ from an index category to our category of interest), I found that a conmutative diagram is a diagram where the index category is a poset, then conmutativity is obtained by the uniqueness of a morphisim between objects of a poset.
But this makes me wonder about diagrams that have two different parallel arrows between two objects, like in the definition of a mononorphism $a\rightrightarrows b \to c$, one says that if both compositions are equal then the whole diagram commutes. How can one define the functor from a poset $J$ to represent both arrows from $a$ to $b$ in $C$ if there is at most one arrow between their preimages?
I thougt about having two different objects $x,y\in J$ mapping to the same object $b$, but then it does not necessarily follow that both arrows are equal in $C$ as they are different elements of the poset.
You probably know from algebra that you can often present structures in terms of generators and relations. For example you can build a group \begin{align} G = \langle a,b\mid a^2=b, a^3 = 1\rangle \end{align} such that for any other group $H$ the group homomorphisms $f:G\to H$ are in bijection with pairs of elements $f(a),f(b)\in H$ which satisfy the equations $(fa)^2=fb$ and $(fa)^3 = 1_H$. Similarly you can form the commutative ring \begin{align} \mathbb Z[x,y,z]/(xy-2z,x^2 ) \end{align} such that ring morphisms out of that ring into another ring $R$ are in bijection with elements $x,y,z\in R$ which satisfy the equations $xy=2z$ and $x^2=0$. We can do something similar in category theory.
The underlying non-algebraic structure of a category is a directed graph and not a set. There is a forgetful functor $U:Cat\to Graph$ from the category of categories and functors to the category of graphs. That functor has a left adjoint $F$ which turns a directed graph into the free category generated by that graph. When $J$ is a directed graph, then we build $FJ$ as follows. The objects in $FJ$ are the vertices of $J$. When $v$ and $w$ are two vertices then morphisms from $v$ to $w$ are strings $e_n...e_1$ of edges in $J$ such that the domain of $e_1$ is $v$ and the codomain of $e_n$ is $w$ and the codomain of each $e_i$ is the domain of $e_{i+1}$.
The identities are the empty strings and composition is given by concatination. There is an alternative more conceptual way to construct $FJ$ which is very similar to the construction of free objects in algebra: When you want to build the free group on two generators $G = \langle a,b\rangle$ for example, then you build up all its elements by starting with $a$ and $b$ and adding new elements for all the algebraic operations which $G$ must have. There must be an element $1_G$, there must be an element $(ab)b$ and an element $(a^{-1}(ba))a$ and so on. Next you take that set of formal expressions and impose all the relations, and only those, which are necessary to turn $G$ into a group. you identitfy $a(a^{-1}b)$ with $b$ for example, and $1_G(ba)$ with $ba$. Once you do this you end up with a group $G$, and that group has a unique morphism $I:G\to H$ into any other group $H$ with two elements $a,b\in H$, because all the expressions $(ab(a^{-1}))$ and so on have an interpretation in $H$, and all identifications which you made on the formal expressions in $G$ must also hold in $H$.
You can build $FJ$ in a similar way. For each vertex there must be an identity $1_v$. When $e:v\to w$ and $e':W\to z$ are two edges, then there must be a morphism $e'e$ and so on. Finally you make the least amount of identifications which are necessary to turn the whole thing into a category.
We can now construct categories $\langle J,E\rangle$ presented by a directed graph and equations. As an example, let us do the category generated by two objects $v,w$ two morphisms $a:v\to w$ and $b:w \to v$ and an equation $ab=1$. We start by freely adding symbols for all the composites, identities etc. that $\langle J,E\rangle$ must have. There is $1_v$, there is $1_w$, there are composites $(((a((ba)b))a)(1_vb))$ and so on. Then we impose the least amount of equations such that $ab = 1_w$ and $\langle J ,E\rangle $ is a category. This is all completely formal, and the resulting category $\langle J,E\rangle$ will have the universal property that functors $f:\langle J,E\rangle\to C$ are in bijection with data $v,w\in C_0$, $a\in C_1(v,w)$ and $b\in C_1(w,v)$ such that $ab=1_w$ holds.
For a general presentation it is very hard to find out anything concrete about $\langle J,E\rangle$. After all, the degenerate case where $J$ has a single vertex and the equations $E$ contain the conditions that all arrows be invertible is actually exactly the construction of the group presented by generators and relations, and the problem if such a group is trivial or not is famously uncomputable (there is no algorithm to solve it). Hence, there is also no algorithm which can tell us if the category $\langle J,E\rangle$ is contractibel for example, has a finite amount of morphisms or similar questions. But in special cases you can compute the category $\langle J,E\rangle$.
Can you for example compute $\langle J,E\rangle$ when $J$ has a single vertex $\ast$, and arrow $a:\ast \to \ast$ and the equations in $E$ are $a^n=1$ and $a^m = 1$ for two natural numbers $n,m\in \mathbb N$? The functors $\langle J,E\rangle \to C$ will be in one to one correspondence with endomorphisms $a$ in $C$ which satisfy $a^n=a^m=1$.
This construction allows you to express arbitrary diagrams with arbitrary equations between them in terms of functors.