internal and external definition of equivalence relation In a category $\mathcal{C}$, a relation on an object $A$ of $\mathcal{C}$ is a triple $\langle R,r_1,r_2\rangle$, where $R$ is an object of $\mathcal{C}$ and $r_1,r_2:R\rightrightarrows A$ two morphisms such that $\langle r_1,r_2\rangle$ is a monomorphic pair of arrows. Now consider this two definitions of equivalence relation. I want to prove that they are equivalent:
$\bf{set\  theoretical\  def.}$ A relation $\langle R,r_1,r_2\rangle$ on $A$ is an equivalence relation when for every object $X$, the set:
$$R_X:=\left\{(r_1\circ x,r_2\circ x)|\  x:X\longrightarrow R\right\}\subseteq\mathcal{C}(X,A)\times\mathcal{C}(X,A)$$
is an equivalence relation on $\mathcal{C}(X,A)$ (in the usual set theoretical sense).
$\bf{internal\ def.\ }$ $\langle R,r_1,r_2\rangle$ is an equivalence relation when there exist morphisms:
$\rho:A\longrightarrow R$ which is a section both of $r_1$ and $r_2: r_1\circ\rho=r_2\circ\rho=1_A$
$\sigma:R\longrightarrow R$ which interchanges $r_1$ and $r_2$,namely: $r_1\circ\sigma=r_2$ and $r_2\circ\sigma=r_1$
$\tau :R\times_A R\longrightarrow R$ such that $r_1\circ\tau=r_1\circ q_1$ and $r_2\circ\tau=r_2\circ q_2$
where $(R\times_A R, q_1,q_2)$ is the pull-back of $r_1$ and $r_2$
I've been able to prove very easily that reflexivity and symmetry are equivalent in the two definitions, but I have no idea how to prove the same for transitivity. Can you help?

I am going to assume that your pullback square is, such that $r_1q_2 = r_2q_1$ (and not $r_1q_1 = r_2q_2$)
Suppose $R_X$ is transitive for all objects $X$. Since $q_1,q_2$ are morphisms $R\times_AR\to R$ we have $(r_1q_1,r_2q_1), (r_1q_2,r_2q_2) \in R_{R\times_A R}$.
Then $(r_1q_1,r_2q_2)\in R_{R\times_A R}$, because $r_2q_1 = r_1q_2$ and $R_{R\times_A R}$ is transitive. Hence, there is a morphism $\tau : R\times_A R \to R$ with $r_1q_1 = r_1\tau$ and $r_2q_2 = r_2\tau$.
Conversely, suppose we are given a $\tau : R\times_A R \to R$ with $r_1q_1 = r_1\tau$ and $r_2q_2 = r_2\tau$. Let $X$ be some object and $(r_1x,r_2x),(r_1y,r_2y)\in R_X$, such that $r_2x = r_1y$. Then, since $q_1,q_2$ is a pullback of $r_2,r_1$, there is a unique morphism $u : X \to R\times_A R$, such that $q_1u = x$ and $q_2u = y$. Therefore $r_1x = r_1q_1u = r_1(\tau u)$ and $r_2y = r_2q_2u =r_2(\tau u)$, so $(r_1x,r_2y)\in R_X$, hence $R$ is transitive. 
