I'm reading Set Theory by Thomas Jech.
An n-ary relation $R$ is a set of $n$-tuples. $R$ is a relation on $X$ if $R \subset X^n$.
I tried to conclude that a relation $R$ on a set $X$ is a set using Separation Schema
$$\forall X \forall p \exists Y \forall u (u \in Y \leftrightarrow u \in X \land \varphi(u, p))$$
Although it will be trivial when $X$ is a finite set(by enumerating each of the tuples), I think it's difficult to construct such a formula $\varphi(u,p)$ according to $R \subset X^n$ when $X$ is an infinite set.
Appreciate your help in advance, thanks.