Let $\phi,\psi: Y \rightarrow X$ be two morphisms between prevarieties. Prove that $\{ y \in Y| \phi(y)=\psi(y) \}$ is locally closed in $Y$ 
Let $\phi,\psi: Y \rightarrow X$ be two morphisms between prevarieties. Prove that $\{ y \in Y| \phi(y)=\psi(y) \}$ is locally closed in $Y$.

In order to prove this, I denote the set $\{ y \in Y| \phi(y)= \psi(y) \}$ as $Z$, and define a map $f: Y \rightarrow X \times X, y \mapsto (\phi(y),\psi(y))$, then $Z$ is the inverse image of $\Delta(X) =\{ (x,x)| x \in X \} \subseteq X \times X$.
Is the map $f$ a morphism between $Y$ and $X \times X$? Is $\Delta(X)$ constructible in $X \times X$? If both of the questions have affirmative answers, the problem is settled.
Thank you very much.
 A: Yes, the set $Ker(\phi,\psi)=\lbrace y\in Y|\phi (y)= \psi (y)     \rbrace $ is a locally closed subset of $Y$.
 Moreover it is closed if $X$ is a variety, that is if $X$ a separated prevariety.
And, yes: your map  $f: Y \rightarrow X \times X, y \mapsto (\phi(y),\psi(y))$ is a morphism and $\Delta(X) \subset X \times X$ is locally closed and so certainly constructible.
This is proved in Mumford's The Red Book of Varieties and Schemes (II, §6,  Proposition 4,  page 118).
If $X$ is not separated, however, the subset of coincidence $Ker(\phi,\psi)$ need not be closed:  
An example of non-closedness of the coincidence set     Consider the notorious non-separated prevariety $X$ equal to  the affine line $\mathbb A^1$ with two origins $O_1,O_2$, so that you have the open covering $X=U_1\cup U_2$ with $U_1=X\setminus \lbrace O_2 \rbrace, U_2=X\setminus \lbrace O_1 \rbrace$. There are obvious morphisms $\phi_1,\phi_2 :Y=\mathbb A^1 \to X$ with respective  image $U_1,U_2$. Their set of coincidence is $Ker(\phi_1,\phi_2)=\mathbb A^1\setminus \lbrace O   \rbrace$, which is not closed in $\mathbb A^1$.
Edit: Reminder on "locally closed" As an answer to the question in ShinyaSakai's comment, and since the notion "locally closed" is not so well-known, let us recall that given a topological space $T$ and a subspace $S\subset T$, the following are equivalent: 
a) $S$ is the intersection $S=C\cap O $ of a closed subset $C$ and an open subset $O$ of $T$.
b) $S$ is relatively open in its closure $\bar S$.
c) Every point $s\in S$ has an open neighbourhood $U\subset T$ such that $S\cap U$ is closed in $U$.
Such a subset $S$ is said to be locally closed in $T$, which is quite reasonable in view of condition c).   
Caveat In c), beware that the condition is to hold only  for points $s\in S$: if  it holds  for all $t\in T$, the subset $S$ will be closed in $T$ ("closedness can be checked on an open covering"). 
