Well-definedness of a random variable $V\circ p$, P.86 of GTM 261 (Probability and Stochastics) The included screen-shot is P.86 of the book "Probability and Stochastic", Graduate Texts in Mathematics 261, written by Erhan Cinlar. I have a question regarding the well-definedness of $V\circ p$ (the last line of the page). The problem persists even if we work on two random variables $X_1, X_2$. I wonder whether there is a gap in the textbook or do I misunderstand something?
Well-definedness of $V\circ p$ seems problematic because it relies on the actual factorization, as shown in the following counter-example:
Let $(\Omega,\mathcal{F},P)=([0,1],\mathcal{B}([0,1]),\lambda)$, where
$\lambda$ is the usual Lebesgue measure. Let $(E,\mathcal{E})=(\mathbb{R},\mathcal{B}(\mathbb{R}))$.
Let $X_{1}:\Omega\rightarrow E$ and $X_{2}:\Omega\rightarrow E$
be defined by $X_{1}(\omega)=0$ and $X_{2}(\omega)=1$. Obviously
$\sigma(X_{1})=\sigma(X_{2})=\{\emptyset,\Omega\}$, and hence $\sigma\{X_{1},X_{2}\}=\{\emptyset,\Omega\}$.
Let $V:\Omega\rightarrow\mathbb{R}$ be defined by $V(\omega)=10$
. Clearly, $V$ is $\sigma\{X_{1},X_{2}\}/\mathcal{B}(\mathbb{R})$-measurable.
Observe that $V$ has more than one factorizations over $(X_{1},X_{2})$,
namely, $V=f(X_{1},X_{2})=g(X_{1},X_{2})$, where $f:\mathbb{R}^{2}\rightarrow\mathbb{R}$
and $g:\mathbb{R}^{2}\rightarrow\mathbb{R}$ are defined by $f(x,y)=\begin{cases}
10, & \mbox{if }(x,y)=(0,1)\\
0, & \mbox{otherwise}
\end{cases},$ $g(x,y)=10$. Note that $f, g$ are $\mathcal{E}\otimes\mathcal{E}/\mathcal{B}(\mathbb{R})$-measurable.
Let $p:\{1,2\}\rightarrow\{1,2\}$ be a permutation defined by $p(1)=2$
and $p(2)=1$. If we follow the definition of the book, we will end
up with: $V\circ p=f(X_{2},X_{1})=0$ and $V\circ p=g(X_{2},X_{1})=10$,
which seems contradictory. That is, just given a $\mathcal{F}_{\infty}$-measurable
random variable $V$ and a permutation $p$, we cannot define $V\circ p$.

 A: Yes, there is indeed a problem. The usual Hewitt-Savage-0-1-law would use the space $E^\infty$ endowed with an independent product measure such that all marginal distributions coincide. This is exactly what you get as the ditribution of i.i.d. random variables $X=(X_1,X_2,\ldots)$ with values in $E^\infty$. For random-variables defined on $E^\infty$, there is no issue in how one takes permutations.
A: Finally, I have time to rewrite the whole section about Hewitt-Savage 0-1 law for the book GTM 261, P.86-87 (and make it self-contained to ease reading). I hope that I have fixed the problem.

Let $(\Omega,\mathcal{F},P)$ be a probability space and $(E,\mathcal{E})$
a measurable space. For each $n\in\mathbb{N},$ let $X_{n}:\Omega\rightarrow E$
be a measurable map. Let $E^{\infty}=\prod_{n\in\mathbb{N}}E$ and
let $\mathcal{E}^{\infty}=\otimes_{n\in\mathbb{N}}\mathcal{E}$ be
the product $\sigma$-algebra. Let $X:\Omega\rightarrow E^{\infty}$
be defined by $X(\omega)(n)=X_{n}(\omega)$. We also denote $X=(X_{1},X_{2},\ldots)$.
Given a bijection $p:\mathbb{N}\rightarrow\mathbb{N}$, it induces
a map $\tilde{p}:E^{\infty}\rightarrow E^{\infty}$
by $\tilde{p}(x)=x\circ p$. That is, if we denote $x=(x_{1},x_{2},\ldots)$,
then $\tilde{p}(x)=(x_{p(1)},x_{p(2)},\ldots)$. For each $n\in\mathbb{N}$,
let $\pi_{n}:E^{\infty}\rightarrow E$ be the canonical projection
onto the $n$-th coordinate space, i.e., $\pi_{n}(x)=x(n)$. Observe
that $\pi_{n}\circ\tilde{p}=\pi_{p(n)}$, which is $\mathcal{E}^{\infty}/\mathcal{E}$-measurable.
By universal property of product $\sigma$-algebra, $\tilde{p}$ is
$\mathcal{E}^{\infty}/\mathcal{E}^{\infty}$-measurable. Note that
for $x\in E^{\infty}$, bijection $p:\mathbb{N}\rightarrow\mathbb{N}$,
$\tilde{p}\left(x\circ p^{-1}\right)=(x\circ p^{-1})\circ p=x$, so
$\tilde{p}^{-1}(x)=x\circ p^{-1}=\widetilde{p^{-1}}(x)$. That is,
$\tilde{p}^{-1}=\widetilde{p^{-1}}$. It follows that $\tilde{p}^{-1}$
is also $\mathcal{E}^{\infty}/\mathcal{E}^{\infty}$-measurable. Given
a map $f:E^{\infty}\rightarrow\mathbb{R}$ and a bijection $p:\mathbb{N}\rightarrow\mathbb{N}$,
we say that $f$ is invariant under $p$ if $f\circ\tilde{p}=f$.
We say that $p:\mathbb{N}\rightarrow\mathbb{N}$ is a finite permutation
if $p$ is a bijection and $\{n\in\mathbb{N}\mid p(n)\neq n\}$ is
a finite subset of $\mathbb{N}$. We say that $f:E^{\infty}\rightarrow\mathbb{R}$
is permutation invariant if $f$ is invariant under each finite permutation
$p$.

Proposition 1:
Let $\mathcal{E}_{p}^{\infty}=\{A\in\mathcal{E}^{\infty}\mid1_{A}\mbox{ is permutation invariant}\},$
then $\mathcal{E}_{p}^{\infty}$ is a $\sigma$-algebra.
Proof:
Clearly $E^{\infty}\in\mathcal{E}_{p}^{\infty}$. Let $p$ be an arbitrary
finite permutation. Let $A\in\mathcal{E}_{p}^{\infty}$, then
\begin{eqnarray*}
1_{A^{c}}\circ\tilde{p} & = & (1-1_{A})\circ\tilde{p}\\
 & = & 1\circ\tilde{p}-1_{A}\circ\tilde{p}\\
 & = & 1-1_{A}\\
 & = & 1_{A^{c}}.
\end{eqnarray*}
Therefore $A^{c}\in\mathcal{E}_{p}^{\infty}$. Let $A_{1},A_{2},\ldots\in\mathcal{E}_{p}^{\infty}$.
Let $A=\cap_{n}A_{n}$. We have that
\begin{eqnarray*}
1_{A}\circ\tilde{p} & = & \left(\prod_{n=1}^{\infty}1_{A_{n}}\right)\circ\tilde{p}\\
 & = & \prod_{n=1}^{\infty}\left(1_{A_{n}}\circ\tilde{p}\right)\\
 & = & \prod_{n=1}^{\infty}1_{A_{n}}\\
 & = & 1_{A}.
\end{eqnarray*}

Let $\mathcal{F}_{p}=\{X^{-1}(A)\mid A\in\mathcal{E}_{p}^{\infty}\}$,
known as the $\sigma$-algebra of events invariant under finite permutation.
Let $\mathcal{F}_{t}$ be the tail $\sigma$-algebra associated with
$(X_{n})$, defined by $\mathcal{F}_{t}=\cap_{n}\vee_{k>n}\sigma(X_{k})$.

Proposition 2:
Using the above notation, we have that $\mathcal{F}_{t}\subseteq\mathcal{F}_{p}$.
Proof:
For each $n\in\mathbb{N}$, let $\tilde{X}_{n}:\Omega\rightarrow\prod_{k>n}E$
be defined by $\tilde{X}_{n}=(X_{n+1},X_{n+2},\ldots)$. Let $\tilde{\pi}_{n}:E^{\infty}\rightarrow\prod_{k>n}E$
be the canonical projection, defined by $\tilde{\pi}_{n}(x)=(x_{n+1},x_{n+2},\ldots)$.
Note that $\tilde{X}_{n}=\tilde{\pi}_{n}\circ X$. Let $A\in\mathcal{F}_{t}$.
For each $n\in\mathbb{N},$ since $A\in\sigma\{X_{n+1},X_{n+1},\ldots\}$,
there exists $\tilde{B}_{n}\in\otimes_{k>n}\mathcal{E}$ such that
$A=\tilde{X_{n}}^{-1}(\tilde{B}_{n})$. Define $B_{n}=(\prod_{k=1}^{n}E)\times\tilde{B}_{n}$,
then $B_{n}\in\mathcal{E}^{\infty}$. We have that $A=X^{-1}(B_{n})$.
Let $B=\cup_{n\in\mathbb{N}}\cap_{k>n}B_{k}\in\mathcal{E}^{\infty},$
then $X^{-1}(B)=\cup_{n}\cap_{k>n}X^{-1}(B_{n})=A$. We go to show
that $B\in\mathcal{E}_{p}^{\infty}$. Let $p:\mathbb{N}\rightarrow\mathbb{N}$
be a finite permutation. Choose $n\in\mathbb{N}$ such that $p(k)=k$
for all $k>n$. Let $x\in E^{\infty}.$ Consider two cases. Case 1:
$x\in B$. Choose $n_{1}\geq n$ such that $x\in B_{k}$ whenever
$k>n_{1}$. Let $k>n_{1}$ be arbitrary, then $x\in B_{k}\Rightarrow(x_{k+1},x_{k+2},\ldots)\in\tilde{B}_{k}$.
Note that $\tilde{p}(x)=(x_{p(1)},x_{p(2)},\ldots,x_{p(n)},x_{n+1},x_{n+2},\ldots)$.
It follows that $\tilde{\pi}_{k}(\tilde{p}(x))=(x_{k+1},x_{k+2},\ldots)\in\tilde{B}_{k}$
and hence $\tilde{p}(x)\in B_{k}$. That is, $\tilde{p}(x)\in B$.
Therefore $1_{B}\circ\tilde{p}(x)=1_{B}(x)=1$. Case 2: $x\notin B$.
We prove by contradiction that $1_{B}(\tilde{p}(x))=0$. Suppose the
contrary that $\tilde{p}(x)\in B$. Choose $n_{2}\geq n$ such that
$\tilde{p}(x)\in B_{k}$ whenever $k>n_{2}$. Since $\tilde{p}(x)=(x_{p(1)},x_{p(2)},\ldots,x_{p(n)},x_{n+1},x_{n+2},\ldots)$,
it follows that for any $k>n_{2}$, $\tilde{p}(x)\in B_{k}\Rightarrow(x_{k+1},x_{k+2},\ldots)\in\tilde{B}_{k}\Rightarrow x\in B_{k}$.
Hence, $x\in B$, which is a contradiction. This shows that $1_{B}\circ\tilde{p}=1_{B}$
and hence $B\in\mathcal{E}_{p}^{\infty}$. Therefore $A\in\mathcal{F}_{p}$.

From now on, we consider the case that $(E,\mathcal{E})=(\mathbb{R},\mathcal{B}(\mathbb{R}))$. Kolmogorov Zero-One Law states that if $X_{1},X_{2},\ldots$ are independent, then $P(A)=0$ or $P(A)=1$ whenever $A\in\mathcal{F}_{t}$. If $X_{1},X_{2},\ldots$ are independent and identically distributed (iid), the theorem can
be strengthen that $P(A)=0$ or $P(A)=1$ whenever $A\in\mathcal{F}_{p}$.
This is known as Hewitt-Savage Zero-One Law. Before proving the Hewitt-Savage
Zero-One Law, we need a lemma.

Lemma 3:
Let $X_{1},X_{2},\ldots$ be independent and identically distributed
random variables. For any permutation $p:\mathbb{N}\rightarrow\mathbb{N}$,
$X$ and $\tilde{p}\circ X$ are identically distributed. Moreover,
for any $\mu$-integrable function $f:\mathbb{R}^{\infty}\rightarrow\mathbb{R}$,
we have that $\int f\circ\tilde{p}\,d\mu=\int f\,d\mu$, where $\mu$
is the distribution of $X$.
Proof:
Let $p:\mathbb{N}\rightarrow\mathbb{N}$ be a permutation. Let $\mu$
and $\nu$ be the distributions of $X$ and $\tilde{p}\circ X$. Let $\mathcal{C}=\{\prod_{k=1}^{\infty}A_{k}\mid A_{k}\in\mathcal{B}(\mathbb{R})\}.$
Note that $\mathcal{C}$ is a $\pi$-class and $\sigma(\mathcal{C})=\mathcal{B}^{\infty}$.
Let $\mathcal{L}=\{C\in\mathcal{B}^{\infty}\mid\mu(C)=\nu(C)\},$
then $\mathcal{L}$ is a $\lambda$-class. We go to show that $\mathcal{C}\subseteq\mathcal{L}$.
Let $C=\prod_{k=1}^{\infty}A_{k}\in\mathcal{C}$. We have that
\begin{eqnarray*}
 &  & \mu(C)\\
 & = & P\left(X^{-1}(C)\right)\\
 & = & P\left(\cap_{k=1}^{\infty}X_{k}^{-1}(A_{k})\right)\\
 & = & \prod_{k=1}^{\infty}P\left(X_{k}^{-1}(A_{k})\right)\\
 & = & \prod_{k=1}^{\infty}P\left(X_{p(k)}^{-1}(A_{k})\right)\\
 & = & P\left(\cap_{k=1}^{\infty}X_{p(k)}^{-1}(A_{k})\right)\\
 & = & P\left((\tilde{p}\circ X)^{-1}(C)\right)\\
 & = & \nu(C).
\end{eqnarray*}
Therefore $\mathcal{C}\subseteq\mathcal{L}$. By Dynkin's $\pi$-$\lambda$
Theorem, we have $\sigma(\mathcal{C})\subseteq\mathcal{L}$ and hence
$\mathcal{L}=\mathcal{B}^{\infty}$. That is, $\mu=\nu$.
Let $C\in\mathcal{B}^{\infty}$, then
\begin{eqnarray*}
\int1_{C}\circ\tilde{p}\,d\mu & = & \int(1_{C}\circ\tilde{p})(X)\,dP\\
 & = & \int1_{C}(\tilde{p}\circ X)\,dP\\
 & = & \nu(C)\\
 & = & \mu(C)\\
 & = & \int1_{C}d\mu.
\end{eqnarray*}
By linearly, it follows that $\int f\circ\tilde{p}\,d\mu=\int f\,d\mu$
for all simple functions $f$. If $f:\mathbb{R}^{\infty}\rightarrow\mathbb{R}$
is non-negative measurable, we can choose a sequence $(f_{n})$ of
simple functions such that $0\leq f_{1}\leq f_{2}\leq\ldots\leq f$
and $f_{n}\rightarrow f$ pointwisely. By Monotone Convergence Theorem,
we have that
\begin{eqnarray*}
\int f\circ\tilde{p}\,d\mu & = & \lim_{n}\int f_{n}\circ\tilde{p}\,d\mu\\
 & = & \lim_{n}\int f_{n}\,d\mu\\
 & = & \int f\,d\mu.
\end{eqnarray*}
Finally, if $f$ is $\mu$-integrable, we write $f=f^{+}-f^{-}$,
where $f^{+}=\max(f,0)$ and $f^{-}=\max(-f,0)$, then $\int f^{+}\circ\tilde{p}\,d\mu=\int f^{+}\,d\mu<\infty$.
Similarly, $\int f^{-}\circ\tilde{p}\,d\mu=\int f^{-}\,d\mu<\infty$.
Observe that $(f\circ\tilde{p})^{+}=f^{+}\circ\tilde{p}$ and $(f\circ\tilde{p})^{-}=f^{-}\circ\tilde{p}$,
so $f\circ\tilde{p}$ is also $\mu$-integrable. Moreover, $\int f\circ\tilde{p}\,d\mu=\int f^{+}\circ\tilde{p}\,d\mu-\int f^{-}\circ\tilde{p}\,d\mu=\int f^{+}\,d\mu-\int f^{-}\,d\mu=\int f\,d\mu$.

Theorem 4: (Hewitt-Savage Zero-One Law) Using the above notation, if $X_{1},X_{2},\ldots$
are independent and identically distributed, then $P(A)=0$ or $P(A)=1$
whenever $A\in\mathcal{F}_{p}$.
Proof:
Let $A\in\mathcal{F}_{p}$, then there exists $B\in\mathcal{B}_{p}^{\infty}$
such that $A=X^{-1}(B)$. Note that $1_{A}=1_{B}(X)$ and for any
finite permutation $p:\mathbb{N}\rightarrow\mathbb{N}$, $1_{B}\circ\tilde{p}=1_{B}$.
Let $\mathcal{F}_{n}=\sigma\{X_{1},X_{2},\ldots,X_{n}\}$. By Proposition
4.9, there exists a sequence of random variables $(V_{n})$, $V_{n}:\Omega\rightarrow[0,1]$,
such that $V_{n}$ is $\mathcal{F}_{n}$-measurable and $\int|V_{n}-1_{A}|\,dP\rightarrow0$
as $n\rightarrow\infty$. In particular, $\int V_{n}\,dP\rightarrow P(A)$.
Let $\pi_{n}':\mathbb{R}^{\infty}\rightarrow\mathbb{R}^{n}$ be the
canonical projection onto the first $n$ coordinates. Choose a Borel
function $f_{n}':\mathbb{R}^{n}\rightarrow[0,1]$ such that $V_{n}=f_{n}'(X_{1},X_{2},\ldots,X_{n})$.
Define $f_{n}:\mathbb{R}^{\infty}\rightarrow[0,1]$ by $f_{n}=f_{n}'\circ\pi_{n}'$,
then $V_{n}=f_{n}(X)$. Let $\mu$ be the distribution of $X$. For
any finite permutation $p:\mathbb{N}\rightarrow\mathbb{N}$, by Lemma
3, we have
\begin{eqnarray*}
 &  & \int|V_{n}-1_{A}|\,dP\\
 & = & \int|(f_{n}-1_{B})(X)|\,dP\\
 & = & \int|f_{n}-1_{B}|\,d\mu\\
 & = & \int|(f_{n}-1_{B})\circ\tilde{p}|\,d\mu\\
 & = & \int|f_{n}\circ\tilde{p}-1_{B}\circ\tilde{p}|\,d\mu\\
 & = & \int|f_{n}\circ\tilde{p}-1_{B}|\,d\mu.
\end{eqnarray*}
For each $n$, define a finite permutation $p_{n}:\mathbb{N}\rightarrow\mathbb{N}$
by
$$
p_{n}(k)=\begin{cases}
k+n, & \mbox{if }k\leq n\\
k-n, & \mbox{if }n<k\leq2n\\
k, & \mbox{if }k>2n
\end{cases}.
$$
Define $\hat{V}_{n}=f_{n}'(X_{n+1},X_{n+2},\ldots,X_{2n})$. Note
that $V_{n}$ and $\hat{V}_{n}$ are independent. Moreover, since
$(X_{1},\ldots,X_{n})$ and $(X_{n+1},\ldots,X_{n+1})$ are identically
distributed, we conclude that $V_{n}$ and $\hat{V}_{n}$ are iid.
In particular, $E\left[V_{n}\hat{V}_{n}\right]=E\left[V_{n}\right]E\left[\hat{V}_{n}\right]=E^{2}\left[V_{n}\right]$.
From the above, we have
\begin{eqnarray*}
 &  & \int|V_{n}-1_{A}|\,dP\\
 & = & \int|f_{n}\circ\tilde{p}_{n}-1_{B}|\,d\mu\\
 & = & \int|f_{n}\circ\tilde{p}_{n}(X)-1_{B}(X)|\,dP\\
 & = & \int|f_{n}'(X_{n+1},X_{n+2},\ldots,X_{2n})-1_{A}|\,dP\\
 & = & \int|\hat{V}_{n}-1_{A}|\,dP.
\end{eqnarray*}
Finally, we have
\begin{eqnarray*}
 &  & \left|\int1_{A}\,dP-\left(\int V_{n}\,dP\right)^{2}\right|\\
 & = & \left|\int1_{A}\,dP-\int V_{n}\hat{V}_{n}\,dP\right|\\
 & \leq & \left|\int1_{A}\,dP-\int1_{A}V_{n}\,dP\right|+\left|\int1_{A}V_{n}\,dP-\int V_{n}\hat{V}_{n}\,dP\right|\\
 & \leq & \int\left|1_{A}-V_{n}\right|\,dP+\int|V_{n}|\cdot\left|1_{A}-\hat{V}_{n}\right|\,dP\\
 & \leq & 2\int|1_{A}-V_{n}|\,dP\\
 & \rightarrow & 0
\end{eqnarray*}
(note that $|V_{n}|\leq1$). Therefore, $P(A)=\lim_{n\rightarrow\infty}\left(\int V_{n}\,dP\right)^{2}=\left(\lim_{n\rightarrow\infty}\int V_{n}\,dP\right)^{2}=P(A)^{2}.$
It follows that $P(A)=0$ or $P(A)=1$.
