Nested quantifiers basics some one please help me to understand the fundamental basic concept of nested quantifier implication questions.
here is as example did in our class room, which i couldn't understand until now.    
$$\exists y\in S\,\exists x\in S\,p(x,y)\implies\forall x\in S\,\exists y\in S\,p(x,y)\;,$$
where $S$ is a non empty subset.
proof:
assume: $\exists y\in S\,\exists x\in S\,p(x,y)$
Let $y_1\in S$ and $x\in S$ be such that $p(x,y_1)$.
$\qquad$Let $x\in S$,
$\qquad\qquad p(x,y_1)$,
$\qquad\qquad\qquad$Let $y=y_1$,
$\qquad\qquad\qquad\qquad p(x,y_1)$
$\qquad\qquad\qquad\exists y\in S\, p(x,y)$,
$\qquad\qquad\forall x\in S\,\exists y\in S p(x,y)$
$\qquad\forall x\in S\,\exists y\in S p(x,y)\qquad\qquad$           // Hence proved
 A: The implication
$$\exists y\in S\,\exists x\in S\,p(x,y)\implies\forall x\in S\,\exists y\in S\,p(x,y)\tag{1}$$
is not valid. Suppose that $S=\Bbb N$, the set of non-negative integers, and $p(x,y)$ is $x+y=0$. The lefthand side of the implication $(1)$ is true: $0\in\Bbb N$, and $p(0,0)$ is true, since $0+0=0$. However, the righthand side of the implication is false, as may be seen by taking $x=1$, for instance: there is no non-negative integer $y$ such that $1+y=0$. (Indeed, we may take $x$ to be any member of $\Bbb N$ except $0$, and there will be no $y\in\Bbb N$ such that $x+y=0$.)
I’m afraid that I can’t make enough sense of your attempted proof to say for sure just what’s wrong with it. I suspect, though, that the big error is in the line $\forall x\,\exists y\in S\,p(x,y)$. You cannot legitimately introduce that universal quantifier, because the $x$ with which you started was not an arbitrary element of $S$: like $y_1$, it was a specific element of $S$ whose existence was ensured by the $\exists S$ on the lefthand side of $(1)$. If you’re using subscripts to indicate specific elements, you should have started with $p(x_1,y_1)$, not $p(x,y_1)$.
