I have been solving this problem from Velleman's How to prove book:
$\{n^2 + n + 1 | n \in \mathbb{N} \} \subseteq \{2n + 1 | n \in \mathbb{N} \}$
This is my solution so far:
$\forall x (x \in \left\{n^2 + n + 1 \mid n \in \mathbb{N} \right\}) \implies (x \in \left\{2n + 1 \mid n \in \mathbb{N} \right\})$ $\forall x (\exists n \in \mathbb{N} (x = n^2 + n + 1)) \implies (\exists n \in \mathbb{N} (x=2n+1)) $
But the answer given in the book is:
$\forall n \in \mathbb{N}\exists m \in \mathbb{N}(n^2 + n + 1 = 2m + 1)$
I'm not able to understand how that answer is correct ?
We may add some condiderations :
(i) from an "intuitive" point of view, it is easy to convince inself that the number $n^2 + n +1$, for all $n$ is odd; thus, it must be obviously true that :
(ii) the defining condition for set inclusion is :
in our example, this is :
Note : having rewritten the defining condition in explicit form (i.e. without the set-builder "operator" $\{ n | \varphi(n) \}$), we can verify that the variables $n,m$ are bound. Thus, it does not matter what variable we use, and using the same variable in both formulae can be misleading, because there is no "link" between the two.
(iii) now we can "formalize" the above facts with a single first-order formula expressing the condition for inclusion :
We can use some logical laws to transform the last formula.
We have that :
Thus, applying it to (*) [$n$ is not free in $\exists m (x = 2m+1)$], we get the equivalent formula :
Now we use :
Applying it to the above formula [$m$ is not free in $(x = n^2+n+1)$] we have :
which is again equivalent to (*).
The last transformation is licensed by identity laws :
Applying it to : $(x = n^2+n+1) \rightarrow ((x = 2m+1) \rightarrow (n^2+n+1 = 2m+1))$ we can get the final transformation of (*) :