Basic question about proofs with the goal $\exists x P(x)$
Solution 1:
"we assume $y$ and assign to it the value $−2x$" probably does not mean what you are thinking. We do not assume $y$ -- $y$ is not a proposition so we are not able to assume it. We don't assume the proposition $[y]$, either. What we are doing is saying, "You know, if $y$ were set to this special value, $y = -2x$, then this all works."
So we assume "$y = -2x$". This isn't automatic. We have had to do some behind-the-scenes algebra to find out what special value of $y$ makes all this work. That algebra is not shown. You just start from the correct choice of the value of $y$. So we assume $y = -2x$, that is, we assume the proposition "$[y = -2x]$" (is true).
That assumption has consequences. In particular, you should be able to derive $$ [y = -2x] \rightarrow [y+2x = 0] $$ along $$ y + 2x = (-2x) + 2x = 0 \text{.} $$ This requires some use of algebra, there is no way to perform this addition using just logic -- you have to know algebraic facts about additive inverses.
So you obtain $[y = -2x] \rightarrow [y+2x = 0]$. This allows you to deduce $\exists y [y+2x=0]$, because you actually know what specialization of $y$ makes this true, namely $y = -2x$.
Your line 3 looks a little odd. What we actually have is $$ \left( [y = -2x] \rightarrow [y+2x = 0] \right) \rightarrow \exists y[y+2x = 0] \text{.} $$ That is, "since the specialization $y = -2x$ makes $y + 2x = 0$, we conclude there exists a $y$ such that $y+2x = 0$." That $y$ is $-2x$.
How does one write this out? Note we have produced a conditional statement: "if $y$ is $-2x$, then $y+2x = 0$." This will be a sub-proof.
... blah blah blah ...
Let $y = -2x$. Observe $y+2x = (-2x)+2x = 0$. So we deduce $\exists y [y+2x = 0]$.
... blah blah blah ...
What's the form of the argument?
- Let $y = \{\text{a value that works}\}$. We find that value using algebra in this example.
- Observe that the expression in the predicate that has been existentially quantified is made true by the assignment of the variable $y$ to the value in the prior step.
- Conclude there exists a value of $y$ that makes the existentially quantified predicate true. (Namely, the one you exhibited in the first step.)
It occurs to me that there could be a little confusion caused by the two distinct uses of "$y$" in the statement of the proof form, $$ \left( [y = -2x] \rightarrow [y+2x = 0] \right) \rightarrow \exists y[y+2x = 0] \text{.} $$ On the right-hand side, the variable $y$ is bound by the existential quantifier; it has syntactic scope only until the end of the quantified clause. We could just replace it with another variable and get a semantically equivalent statement: $$ \left( [y = -2x] \rightarrow [y+2x = 0] \right) \rightarrow \exists z[z+2x = 0] \text{.} $$ This is still a valid inference.
On the left-hand side, $x$ and $y$ appear unquantified, so they are free (antonym of bound) variables. Free variables are implicitly universally quantified at the largest enclosing scope. If we make that quantification explicit, we need to change the bound variable on the right-hand side to maintain syntactic validity. (That is, it is a syntax error to have a statement with $y$ bound twice in nested clauses. $y$ can be bound in two disjoint clauses, but one should bear in mind that the two $y$s need not have the same value.) So, with the implicit quantifications, $$ \forall x \forall y \left( \left( [y = -2x] \rightarrow [y+2x = 0] \right) \rightarrow \exists z[z+2x = 0] \right) \text{.} $$
I discuss this because in comments, you proposed $$ \left( [y = -2x] \rightarrow [y+2x = 0] \right) \rightarrow \left( [y = -2x] \rightarrow \exists z[z+2x = 0] \right) \text{.} $$ This is much weaker that the proof form described above and the reason why has to do with the unbound use of $y$ and $x$ in the parenthesized implication on the right. The parenthesized implication on the left says:
If, in some proof, you have the fact "$y = -2x$" already established, then you may deduce the fact "$y + 2x = 0$".
This requires that the state of the implicitly universally quantified variables in your context must contain or imply that $y = -2x$ in order to obtain the consequent. Likewise, the parenthesized implication on the right says:
(Assuming the antecedent, the left-hand parenthesized implication, is already established,) if in some proof, you have the fact "$y = -2x$" already established, then you may deduce the fact "$\exists z [z + 2x = 0]$".
This right-hand implication does not make the plain assertion "$\exists z [z + 2x = 0]$ is true". It makes the much weaker assertion "the state of the implicitly universally quantified variables $x$ and $y$ in your context must contain or imply that $y = -2x$ and then you may infer $\exists z [z + 2x = 0]$ is true".
But "$\exists z [z + 2x = 0]$" should be independent of the free variable $y$. (Equivalently, "$\exists y [y + 2x = 0]$" should be independent of the free variable $y$, since the free variable $y$ is not mentioned in this quantified clause.)
The version you produced is weaker because it only asserts the existentially quantified result in (free variable) contexts where $y = -2x$. But $\exists z [z+2x = 0]$ should be true in any context (in which the material has the relation $[y = -2x] \leftrightarrow [y+2x=0]$), regardless of the values of the unbound variables $x$ and $y$.