Alternative definition of the sign of a permutation and its equivalence I have seen that one can define the sign $\varepsilon (\sigma)$ or $\mathrm{sgn}(\sigma)$  of a permutation $\sigma \in S_n$ with the formula
$$\varepsilon(\sigma):=\prod_{1\leq i<j\leq n}\frac{\sigma(j)-\sigma(i)}{j-i}. \tag 1$$
The main definition is probably the following:
$$\varepsilon(\sigma)=\begin{cases}
+1, & \text{if $\sigma$ can be written as a product of even number of transpositions}, \\
-1, & \text{if $\sigma$ can be written as a product of odd number of transpositions}.
\end{cases} \tag 2$$
I've also seen that the sign can be defined via the Vandermonde polynomial. That is,
$$\varepsilon(\sigma)=\frac{P(X_{\sigma(1)},\dots,X_{\sigma(n)})}{P(X_1,\dots,X_n)}=\prod_{1\leq i<j\leq n}\frac{X_{\sigma(j)}-X_{\sigma(i)}}{X_j-X_i}.\tag 3$$
My question is, how these three definitions are equivalent. Any reference is also welcomed.
Thanks.
Update: There is another one definition:
$$\varepsilon(\sigma):=(-1)^{N(\sigma)},\tag 4$$
where $N(\sigma)$ is the number of inversions in $σ$.
 A: The third definition is the general version of the first definition because we can take $X_i=i$ for $i=1,\dots,n$.
The following is the idea of proof that second and third definitions are equivalent. A detailed proof can be found in pages 107-110 Abstract Algebra 2nd by Dummit and Foote.
(1) Using third definition, show that for $\alpha,\beta\in S_n$, $\varepsilon(\alpha\beta)=\varepsilon(\alpha)\varepsilon(\beta)$.
(2) Show that $\varepsilon((12))=-1$.
(3) By using the fact that all transpositions are conjugate, conclude that $\varepsilon(\tau)=-1$ for all transpositions $\tau$.
Use all these information to deduce that third definition is equivalent to the second.
In fact, there is another way to define sign of a permutation,  that is $$\varepsilon(\sigma):=(-1)^{N(\sigma)}$$
where $N(\sigma)$ is the number of inversions in $\sigma$. You can find more explanation in here.
A: Show that $\prod_{1 \leq i < j \leq n} (\sigma(j) - \sigma(i)) = (-1)^{N(\sigma)} \prod_{1 \leq i < j \leq n} (j - i)$.
The idea is that the factors in both products $\prod_{1 \leq i < j \leq n} (\sigma(j)-\sigma(i))$ and $\prod_{1 \leq i < j \leq n} (j-i)$ are the same, up to signs. You get a minus sign in a factor precisely when you have an inversion.
With the same proof, you see that $\prod_{1 \leq i < j \leq n} (X_{\sigma(j)} - X_{\sigma(i)}) = (-1)^{N(\sigma)} \prod_{1 \leq i < j \leq n} (X_j - X_i)$.
(Here $N(\sigma)$ is the number of inversions of $\sigma$, i.e. the number of pairs $(i,j)$ such that $1 \leq i < j \leq n$ and $\sigma(j) > \sigma(i)$.)
