I need to prove the following predicate logic sequent using natural deduction:
$\exists y \forall x (P(x) \rightarrow x = y) \vdash \forall x \forall y (P(x) \land P(y) \rightarrow x = y)$
This is my half-finished proof. I hope I'm on the right track but there is something about box packing/unpacking I don't understand yet:
- $\exists y \forall x (P(x) \rightarrow x = y) \quad\mathrm{Premise}$
- $y_0: \forall x P(x) \rightarrow x = y_0) \quad\mathrm{Assumption}$
- $x_0: P(x_0) \rightarrow x_0 = y_0 \quad \forall x e2$
- $P(x_0) \land P(y_0) \quad \mathrm{Assumption}$
- $P(x_0) \quad \land e_1 4$
- $x_0 = y_0 \quad \rightarrow e 3, 5$
- $P(x_0) \land P(y_0) \rightarrow x_0 = y_0 \quad \rightarrow i 4-6$
- $\forall x (P(x) \land P(y_0) \rightarrow x = y_0 \quad \forall x i 3-7$
Then I can't go further because I can't use universal reintroduction on the $y$ variable.
Edit: I managed to finish it with the help from the answer!
- $\exists y \forall x (P(x) \rightarrow x = y) \quad\mathrm{Premise}$
- $z: \forall x P(x) \rightarrow x = z) \quad\mathrm{Assumption}$
- $a: P(a) \rightarrow a = z \quad \forall x e2$
- $b: P(b) \rightarrow b = z \quad \forall x e2$
- $P(a) \land P(b) \quad \mathrm{Assumption}$
- $P(a)\quad \land e_1 5$
- $P(b)\quad \land e_2 5$
- $a = z \quad \rightarrow e3,6$
- $b = z \quad \rightarrow e4,7$
- $b = b \quad =i$
- $z = b \quad =e 9,10$
- $a = b \quad =e 8,11$
- $P(a) \land P(b) \rightarrow a = b \quad \rightarrow i 5-12$
- $\forall y (P(a) \land P(y) \rightarrow a = y) \quad \forall y i 4-13$
- $\forall x \forall y (P(x) \land P(y) \rightarrow x = y) \quad \forall x i 3-14$
- $\forall x \forall y (P(x) \land P(y) \rightarrow x = y) \quad \exists z e 1,2-15$
You almost have it. Do pretty much as you had, except use universal elimination twice, then conclude that the two arbitrary variables must be equal whenever they both make the predicate true, since they would both then equal the same witness.
$$\begin{array}{r|l:l}1&\exists y\forall x~(P(x)\to x=y)\\ 2&\quad\forall x~(P(x)\to x=c) & 1,\exists \text{Elimination }[y\backslash c]\\[0ex] 3 & \qquad P(a)\to a=c & 2,\forall\text{Elimination }[x\backslash a]\\[0ex] 4 & \qquad\quad P(b)\to b=c & 2,\forall\text{Elimination }[x\backslash b] \\[0ex] 5 & \qquad\qquad P(a)\wedge P(b) & \text{Assumption} \\[-1ex] 6 & \qquad\qquad\vdots & \\[-1ex] 7 & \qquad\qquad\vdots & \\[-1ex] 8 &\qquad\qquad\vdots & \\[-1ex] 9 & \qquad\qquad\vdots & \\[0ex] 10 & \qquad\qquad a=b & ~,~,=\text{Elimination}\\[0ex] 11 & \qquad\quad (P(a)\wedge P(b))\to(a=b) & 5,10,\to\text{Introduction}\\[-1ex] \vdots\end{array}$$
Well, you can fill in the missing details.