Where did I go wrong? Analyze the logical form of $\{n^2+n+1 | n \in \mathbb{N}\} \subseteq \{2n+1 | n \in \mathbb{N}\}$ This question is taken from Velleman's $\textit{How to Prove it}$. It is in the exercises section of 2.3, Question 1c:
$\{n^2+n+1 | n \in \mathbb{N}\} \subseteq \{2n+1 | n \in \mathbb{N}\}$
My work is as follows,
The statement is equivalent to $\forall x(x \in \{n^2+n+1 | n \in \mathbb{N}\} \to x \in \{2n+1 | n \in \mathbb{N}\})$ (definition of a subset)
$x \in \{n^2+n+1 | n \in \mathbb{N}\} \equiv \exists n \in \mathbb{N}(x=n^2+n+1)$
and
$x \in \{2n+1 | n \in \mathbb{N}\} \equiv \exists n \in \mathbb{N}(x = 2n+1)$
so the final expression ends up as,
$\forall x (\exists n \in \mathbb{N}(x=n^2+n+1) \to \exists n \in \mathbb{N}(x=2n+1))$
The solution provided is $\forall n \in \mathbb{N} \: \exists m \in \mathbb{N}(n^2+n+1=2m+1)$ which makes perfect sense to me looking at it in retrospect.
I guess the overarching concern that I have is the methodology involved in solving the question - my approach was to break the statement down into smaller parts and then to rewrite after interpreting each individual segment (not an unreasonable strategy IMO, that seems to be what Velleman has been advocating up to this point). Was that approach incorrectly applied in this situation? Or did I make a technical error that I am just not aware of?
Thanks in advance for any help/insight that can be given!
 A: Hint
$$x=n(n+1)+1$$
This is definitely odd.
A: There is no error. Your solution is correct too. Two things, however:


*

*Although what you wrote is correct, it is always a good idea not to use the same symbol ($n$, in your case) for two different purposes. So, I would have written$$\forall x (\exists n \in \mathbb{N}(x=n^2+n+1) \to \exists m \in \mathbb{N}(x=2m+1))$$

*The provided solution is also correct, but shorter and easier to understand because there is no need to use the symbol $x$. It's as if you had written “for every number, if it belongs to the first set, then it also belongs to the second one” and the proposed solution was “every element of the first set belongs to the second one”.

A: Your solution is correct, but if you want to understand the methodology Velleman uses to arrive at the formula $\forall n\in\mathbb N\ \exists m\in\mathbb N\left(n^2+n+1=2m+1\right)$, consider problem #2 from example 2.3.1: "Analyze the logical form of the statement $\{x_{i}\ \vert \ i\in I\} \subseteq A.$"

$Solution$
By the definition of subset we must say that every element of $\{x_{i}\ \vert \ i\in I\}$ is also an element of $A$, so we could start by writing $\forall x\left(x\in\{x_{i}\ \vert\ i\in I\}\rightarrow x\in A \right)$. Filling in the meaning of $x\in\{x_{i}\ \vert\ i\in I\}$, which we worked out earlier, we would end up with $\forall x\left(\exists i\in I(x = x_{i})\rightarrow x\in A \right)$. But since the elements of $\{x_{i}\ \vert \ i\in I\}$are just the $x_{i}$'s, for all $i\in I$ , perhaps an easier way of saying that every element of $\{x_{i}\ \vert \ i\in I\}$ is an element of $A$ would be $\forall i\in I(x_{i}\in A)$. The two answers we have given are equivalent.

So if $A$ is any set and $B$ is an indexed family defined by $B = \{x_{i}\ \vert\ i\in I\}$, the logical form of the statement $B\subseteq A$ could be expressed as $\forall i\in I(x_{i}\in A)$. Since the sets in the original statement are indexed sets, it follows that $\{n^2+n+1\ \vert\ n\in\mathbb N\}\subseteq \{2n+1\ \vert\ n\in\mathbb N\}$ means the same thing as $\forall n\in\mathbb N((n^2+n+1)\in\{2n+1\ \vert\ n\in\mathbb N\})$. From $\forall n\in\mathbb N((n^2+n+1)\in\{2n+1\ \vert\ n\in\mathbb N\})$ we can now derive the following logical equivalence:
\begin{align}
\forall n\in\mathbb N((n^2+n+1)\in\{2n+1\ \vert\ n\in\mathbb N\}) & \equiv \forall n\in \mathbb N((n^2+n+1)\in\{2m+1\ \vert\ m\in\mathbb N\})  \\
& \equiv \forall n\in \mathbb N(\exists m\in\mathbb N(n^2+n+1 = 2m+1)) \\
& \equiv \forall n\in \mathbb N\ \exists m\in\mathbb N(n^2+n+1 = 2m+1)
\end{align}
