Is $\sum Y_j$ a measurable $\sigma(X_1,...,X_n)$ function? Let $X_n=\left(\sum^n_{i=1} Y_i\right)^2$, and I would like to know if $\sum^n_{i=1} Y_i$ is measurable in $\sigma(X_1,...,X_n)$.

If not, why? I tend to think that it's not. But I can't think of a justification for it...

Any help would be appreciated.
(Following copper.hat comment)

There are sets which are not Lebesgue measurable. Let $A$ be such a set.

Define a function $f(x)= \begin{cases} 
      1, &amp; x\in A \\
      -1, &amp; x\in A^c 
   \end{cases}
$. Clearly, f is not Lebesgue measurable. However, $f^2$ and $|f|$ are measurable.
In this way, we could have $(\sum Y_n)^2$ measurable, but not $\sum Y_n$
Let $(\Omega, \mathscr F, \mathbb P)$ be a probability space.

Consider $Y$, a mapping from $\Omega \to \mathbb R$ s.t. $X := Y^2 \in m\mathscr F$.

Let $\omega \in \Omega$. If we know $X(\omega)$, we don't necessarily know $Y(\omega)$. For example if $X(\omega) = 25$, then $Y(\omega)$ could be 5 or -5.

So $\{Y = 5\} \cup \{Y = -5\} = \{X = 25\} \in \mathscr F$.

It need not follow that either $\{Y = 5\}$ or $\{Y = -5\}  \in \mathscr F$.

Hence we cannot conclude that $Y \in m\mathscr F$.