A counterexample to the going down theorem I will appreciate any enlightenment on the following which must be an exercise in a certain textbook. (I don't recognize where it comes from.)
I understand that the going down property does not hold since $R$ is not integrally closed (in fact, it is not a UFD), but I have no idea how to show that $q$ is such a counterexample.

Let $k$ be a field, $A = k[X, Y]$ be a polynomial ring, $R = \lbrace f \in A \colon f(0, 0) = f (1, 1) \rbrace \subset A$ be a subring.
  Define $q = (X)\cap R$, $p = (X - 1, Y - 1) \cap R$, $P = (X - 1, Y - 1)$.
  Show that there is no $Q \in \operatorname{Spec} A$, $Q\subset P$ that goes down to $q$. 

 A: We show that there is not a prime $Q\subset P$ such that $Q\cap R=q$.
Let us compute $p,q$. The prime $q=(X)\cap R=\{Xh\mid h(1,1)=0,h(X,Y)\in k[X,Y]\}$, the prime $p=P\cap R=\{g(X,Y)\mid g(0,0)=g(1,1)=0, g\in k[X,Y]\}$.
Now it is clear $q\subset p$ and not equal $p$, since $X-Y\in p\setminus q$. 
We are ready to show our statement. Suppose there is a prime ideal $Q\subset P$ such that $Q\cap R=q$, then $Q\neq P,0$. Thus $Q$ must be a principal ideal $(f)$ with an irreducible polynomial $f$ such that $f(1,1)=0$. But in this case, $(f)\cap R=\{fh\mid f(0,0)h(0,0)=0,h\in k[X,Y]\}$. We may find an irreducible polynomial $g\in k[X,Y]$ such that $g(1,1)=0$ but $(g)\neq (f)$, then $Xg(X,Y)\in q$ but $Xg(X,Y)\notin (f)$. We are done.
A: I'll show that the existence of   $Q\in Spec(A)$  satisfying  $Q\subsetneq P$ and $q= Q\cap R$ leads to a contradiction.    
We have  $X\cdot (X-1)\in q $ , so   $X\cdot (X-1)\in Q$.
Hence we  have $(X-1)\in Q$  (since  $X\notin Q$ because   $X\notin P$).
But this  forces $Q=(X-1)A$, since $(X-1)A\subset Q\subsetneq P=(X-1,Y)$.
But then $(X-1)Y\in Q\cap R \setminus q$  : contradiction . 
Edit
As wxu remarks in his comment, $q$ as defined by eltonjohn is not included in $p$. 
The above answer remains correct (I am sure of that, because else wxu would have noticed!),  but it is not a counterexample to Going Down.
I advise users to read  wxu's post: he modified eltonjohn's question precisely in order to give such a counterexample.
