In an example I am asked to analyse the logical form of the statement $$\{n^2 + n + 1 : n \in \mathbb{N}\} \subset \{2n + 1 : n \in \mathbb{N}\}$$
My solution is $$\forall x[\exists n\in\mathbb{N}(x = n^2 + n +1) \implies \exists n \in \mathbb{N}(x = 2n+1)] $$
I get this by re-expressing $\{n^2 + n + 1: n \in \mathbb{N}\}$ as $\{x: \exists n \in \mathbb{N} (x = n^2 +n +1)\}$ (and similarly for the other set), and then using the definition of the subset.
However the solution given by the book seems to be the much more sensible:$$\forall n \in \mathbb{N}\exists m\in \mathbb{N}(n^2+n+1=2m+1)$$
I understand the solution in the book, and if I were to write it based on the meaning of statement I think that is how I would do it. However in my own solution, I was trying to follow the precise rules for manipulating the expressions, and to express it in terms of unbounded quantifiers first.
What I can't do is show how the two statements are equivalent. When I think about the meaning, I believe my solution is correct, but I can't seem to manipulate my statement to turn it into the book's solution. I can only intuitively understand the book's solution.
My question is how to show that these two statements are equivalent? In general, I have a hard time with statements of this form; I am not sure how to show step by step the elimination of the existential quantifiers from the equality statement. Is this just a trivial step? Is there a rule of inference to go from my solution to the book's?