First, before addressing the problem as stated, I think the crucial point is that as long as $\displaystyle D\neq\varnothing$, you may use the following theorems (which are really the same theorem in disguise):
- $\displaystyle \neg(\forall z Q(z))\iff\exists z(\neg Q(z))$
- $\displaystyle \neg(\exists z Q(z))\iff\forall z(\neg Q(z))$
So for example in your first problem, you use theorem 2 followed by theorem 1 (written with judicious use of parentheses).
$\displaystyle \neg(\exists x\forall y P(x,y))\iff\forall x(\neg(\forall y P(x,y)))\iff\forall x\exists y (\neg P(x,y))$.
Unfortunately, what you assume ($\displaystyle \neg(\exists x\forall y P(x,y))$) does not imply anything about the statement you are given to evaluate ($\displaystyle \forall x\exists y P(x,y)$). This most likely means that your question is mis-worded. This can be seen further by specifying two examples for P which exhibit opposite behavior.
Let $\displaystyle D=\mathbb{R}$. Let $\displaystyle P_1(x,y)=(x<y)$. Then it is clear that your assumption holds: the statement “there exists an x such that for all y, x is less than y” is false. Again, this is the same thing as asserting $\displaystyle \neg(\exists x\forall y P_1(x,y))$. Now, one may evaluate the statement “for all x, there exists a y such that x < y” as being true. Thus, $\displaystyle \forall x\exists y P_1(x,y)$ is true.
Now, with the same D, let $\displaystyle P_2(x,y)=(y^2=-1)$. Then it is clear that your assumption holds: the statement “there exists an x such that for all y, y-squared is -1” is false. Again, this is the same thing as asserting $\displaystyle \neg(\exists x\forall y P_2(x,y))$. Now, one may evaluate the statement “for all x, there exists a y such y-squared is -1” as being false. Thus, $\displaystyle \forall x\exists y P_2(x,y)$ is false.
So question 1 as given has no correct answer (your assumption tells you nothing about the truth or falsehood of the statement you wish to evaluate).
You can do similar analysis to show that question 2 is also mis-worded. You may, however, be able to show the converse using the following theorem (assuming a non-empty domain): $\displaystyle \forall zQ(z)\implies\exists zQ(z)$