Borel functions of infinitely many variables Let $\mathbb{N} = \{1, 2, 3, ...\}$. I have two related questions:

*

*[Main question]: Suppose I have a "Borel-measurable function $f:\mathbb{R}^{\mathbb{N}}\rightarrow\mathbb{R}$"  and I have a sequence of Borel-measurable functions $g_i:\mathbb{R}\rightarrow\mathbb{R}$ for $i \in \{1, 2, 3, ...\}$. Can I conclude that the function $h:\mathbb{R}\rightarrow\mathbb{R}$ given by
$$ h(x) = f(g_1(x), g_2(x), g_3(x), ...)$$
is Borel-measurable? This could be viewed as a composition  $h(x)=f(v(x))$ where  $v:\mathbb{R}\rightarrow\mathbb{R}^{\mathbb{N}}$ is defined by $v(x) = (g_1(x), g_2(x), g_3(x), ...)$.


*[More basic question]: What should I be careful about when defining a "Borel-measurable function $f:\mathbb{R}^{\mathbb{N}}\rightarrow\mathbb{R}$"?  I would like to know about any subtle issues, caveats, or pitfalls associated with functions of infinitely many variables.  Is there only one Borel sigma-algebra on $\mathbb{R}^{\mathbb{N}}$ that everyone uses, or are there some choices? What does an "open subset of $\mathbb{R}^{\mathbb{N}}$" look like?
Any descriptions and/or references are welcome.

Edits: After some web searching, perhaps I can define the "open subsets of $\mathbb{R}^{\mathbb{N}}$" to be those sets of the form $$A \times \mathbb{R}\times \mathbb{R} \times \mathbb{R} \times...$$ for some positive integer $k$ and some open set $A \subseteq \mathbb{R}^k$.  Then define the "Borel sigma algebra for  $\mathbb{R}^{\mathbb{N}}$" as the sigma algebra generated by these. That the function $v:\mathbb{R}\rightarrow\mathbb{R}^{\mathbb{N}}$ ensures $v^{-1}(B)$ is a Borel-subset of $\mathbb{R}$ for every $B$ in this "sigma algebra of $\mathbb{R}^{\mathbb{N}}$" then follows (I believe) by an argument similar to that used at the following link, which I found to be very helpful: Show that inverse image of a Lebesgue measurable function is Lebesgue-measurable
I'm not sure about this, and I am still worried a bit about boundedness issues, and about issues of whether this is a "significantly rich" sigma algebra.  It seems very specific and perhaps others could be used. Here is a test-case example: What if I define
$$f(x_1, x_2, x_3, ... ) = \limsup_{n\rightarrow\infty} \arctan(x_n)$$
then can I say $f$ is Borel-measurable? It seems so, because I can say for any $y \in \mathbb{R}$ that
$$ \{x \in \mathbb{R}^{\mathbb{N}} : f(x_1, x_2, x_3, ...) \leq y\} = \cap_{k=1}^{\infty} \cup_{n=1}^{\infty}\cap_{m\geq n} \{\arctan(x_m) \leq y + 1/k\}$$
and since $\{\arctan(x_m) \leq y + 1/k\} = \{\arctan(x_m)> y+1/k\}^c$ is a complement of an open subset of my "Borel sigma algebra of $\mathbb{R}^{\mathbb{N}}$" then this is indeed a sequence of countable complements, unions, and intersections of open subsets in the sigma algebra. This seems reasonable to me right now, but I am not confident in these conclusions and some validation and further illumination of caveats or pitfalls are welcome.
 A: Often the Borel sigma algebra associated to $\mathbb{R}^\mathbb{N}$ is the one generated by the cylinder sets. I.e., the $\sigma$-algebra put on $\mathbb{R}^\mathbb{N}$ is the smallest $\sigma$-algebra containing sets of the form $\{ x \in \mathbb{R}^\mathbb{N} \; : \; x_{i_1} \in B_1,...,x_{i_k} \in B_k \}$, where $B_j$ are Borel subsets of $\mathbb{R}$. With this $\sigma$-algebra your function $f$ is clearly measurable since all the coordinate maps $g_i$ are measurable. Probably there are alternative $\sigma$-algebras that could be put on $\mathbb{R}^\mathbb{N}$ for which you will have problem, but no examples are coming to mind at present. I would have rather posted this as a comment, but it was too long...
A: Here are some retrospective thoughts:  Let $\Omega$ be a nonempty set and let $\mathcal{F}$ be a sigma algebra on $\Omega$.
Preliminary lemma: Let $V$ be a nonempty set. Let $f:\Omega \rightarrow V$ be a function.  Let $\mathcal{C}$ be a collection of sets in $V$. Then
$$ \left(f^{-1}(B) \in \mathcal{F} \quad \forall B \in \mathcal{C}\right) \implies \left(f^{-1}(B) \in \mathcal{F} \quad \forall B \in \sigma(\mathcal{C})\right)$$
Proof: The proof is similar to the hint given in the answer here:
Show that inverse image of a Lebesgue measurable function is Lebesgue-measurable

Now define $\mathbb{B}(\mathbb{R}^{\mathbb{N}})$ as in the LostStatistician18 answer: Define $\mathcal{C}_{\mathbb{N}}$ as the collection of cylinder sets and define $\mathbb{B}(\mathbb{R}^{\mathbb{N}}) = \sigma(\mathcal{C}_{\mathbb{N}})$.
Lemma: If $g_i:\Omega\rightarrow\mathbb{R}$ are Borel measurable functions for all $i \in \{1, 2, 3, ...\}$ then the function $v:\Omega\rightarrow\mathbb{R}^{\mathbb{N}}$ given by
$$ v(\omega) = (g_1(\omega), g_2(\omega), g_3(\omega),...)$$
is Borel measurable, that is,  $v^{-1}(B) \in \mathcal{F}$ for all $B \in \mathcal{B}(\mathbb{R}^{\mathbb{N}})$.
Proof: Since $\mathcal{B}(\mathbb{R}^{\mathbb{N}})=\sigma(\mathcal{C}_{\mathbb{N}})$, by the preliminary lemma it suffices to show that
$$ v^{-1}(B) \in \mathcal{F} \quad \forall B \in \mathcal{C}_{\mathbb{N}}$$
Fix a set $B \in \mathcal{C}_{\mathbb{N}}$. Then there is a positive integer $k$ such that
$$ B = B_1 \times B_2 \times... \times B_k \times \mathbb{R} \times \mathbb{R} \times \mathbb{R} \times ...$$
for some Borel subsets $B_i\subseteq \mathbb{R}$ for $i \in \{1, ..., k\}$.
Then
$$ v^{-1}(B) = \cap_{i=1}^k \{\omega \in \Omega: g_i(\omega) \in B_i\}$$
This is a finite intersection of sets in $\mathcal{F}$ and so it is in $\mathcal{F}$. $\Box$
That the function $h(\omega) = f(v(\omega))$ is Borel measurable follows by a basic fact about compositions of Borel measurable functions $f$ and $v$.
A: Let us discuss in the most general setting.

*

*Product $\sigma$-algebra strucfacture: In the following, we explain
the definition of product $\sigma$-algebra, in the most general setting.
Let $\Lambda$ be an index set (which may be uncountable). Let $\{(X_{i},\mathcal{F}_{i})\mid i\in\Lambda\}$
be a family of measurable spaces, with $X_{i}\neq\emptyset$. Let
$X=\prod_{i\in\Lambda}X_{i}$ be the Cartesian product. Formally,
$X=\{f\mid f:\Lambda\rightarrow\cup_{i\in\Lambda}X_{i}\mbox{ such that }f(i)\in X_{i}\}$.
By the Axiom of Choice, $X$ is non-empty. For each $i\in\Lambda$,
let $\pi_{i}:X\rightarrow X_{i}$ be the canonical projection onto
the $i$-th coordinate. That is, if $x\in X$, then $\pi_{i}(x)=x(i)$.
(Sometime, we also write $x(i)=x_{i}$) The product $\sigma$-algebra
$\mathcal{F}$ on $X$ is defined as the smallest $\sigma$-algebra such that
for each $i\in\Lambda$, $\pi_{i}$ is $\mathcal{F}/\mathcal{F}_{i}$-measurable.
More explicitly, let $\mathcal{C}=\{\pi_{i}^{-1}(A)\mid i\in\Lambda\mbox{ and }A\in\mathcal{F}_{i}\}$,
then $\mathcal{F}$ is defined by $\mathcal{F}=\sigma(\mathcal{C})$.
We denote $\mathcal{F}$ by $\mathcal{F}=\otimes_{i\in\Lambda}\mathcal{F}_{i}$.
The product $\sigma$-algebra has the following important universal
property: Let $(Y,\mathcal{M})$ be a measurable space. Let $f:Y\rightarrow X$
be a map. Then $f$ is $\mathcal{M}/\mathcal{F}$-measurable iff for
each $i\in\Lambda$, $\pi_{i}\circ f$ is $\mathcal{M}/\mathcal{F}_{i}$-measrable.


*For your problem: Let $\Lambda$ be an index set. Let $\{(X_{i},\mathcal{F}_{i})\mid i\in\Lambda\}$
be a family of measurable spaces, with $X_{i}\neq\emptyset$. Let
$X=\prod_{i\in\Lambda}X_{i}$ and $\mathcal{F}=\otimes_{i\in\Lambda}\mathcal{F}_{i}$.
Let $(Y,\mathcal{M})$ be a measurable space. For each $i\in\Lambda$,
let $g_{i}:Y\rightarrow X_{i}$ be a $\mathcal{M}/\mathcal{F}_{i}$-measurable
map. Define $\theta:Y\rightarrow X$ by $\theta(y)(i)=g_{i}(y)$.
Then $\theta$ is $\mathcal{M}/\mathcal{F}$-measurable. Note that
if $\Lambda$ is finite or countable, say $\Lambda=\{1,2,\ldots,n\}$,
$\theta$ is just $\theta=(g_{1},g_{2},\ldots,g_{n})$. (For, $\theta(y)=(g_{1}(y),\ldots,g_{n}(y))$,
so its $i$-th coordinate is $g_{i}(y)$)
Measurability of $\theta$ can be proved easily. For, let $\pi_{i}:X\rightarrow X_{i}$
be the canonical projection, then $\pi_{i}\circ\theta=g_{i}$ which
is $\mathcal{M}/\mathcal{F}_{i}$-measurable. By universal property
of product $\sigma$-algebra, it follows that $\theta$ is $\mathcal{M}/\mathcal{F}$-measurable.
Finally, if $f:X\rightarrow\mathbb{R}$ is $\mathcal{F}/\mathcal{B}(\mathbb{R})$
measurable, then obviously $f\circ\theta$ is $\mathcal{M}/\mathcal{\mathcal{B}}(\mathbb{R})$-measurable.

For your case, $\Lambda=\mathbb{N}$, $(X_{i},\mathcal{F}_{i})=(\mathbb{R},\mathcal{B}(\mathbb{R}))$,
$(Y,\mathcal{M})=(\mathbb{R},\mathcal{B}(\mathbb{R}))$. $\theta$
is just the $\theta=(g_{1},g_{2},\ldots)$. That is, for $x\in\mathbb{R}$,
$\theta(x)=(g_{1}(x),g_{2}(x),\ldots)$. Your $h$ is simply $h=f\circ \theta$.

Remark:

*

*By a measurable cylinder, it is a subset of $X$ of the form:
$\cap_{i\in\Lambda'} \pi_i^{-1}(A_i)$, where $\Lambda' \subseteq \Lambda$ is a countable subset of $\Lambda$, $A_i \in \mathcal{F}_i$.
That is, it is a set of the form $\prod_i A_i$, where $A_i\in\mathcal{F}_i$ and $A_i = X_i$ except at most countably many $i$.
One must be cautious if $\Lambda$ is uncountable.


*Let $X,Y$ be topological spaces. Let $\mathcal{B}(X)$ and $\mathcal{B}(Y)$ be the Borel $\sigma$-algebras on $X$ and $Y$ repsectively, i.e., they are $\sigma$-algebras generated by the topologies of $X$ and $Y$. Equip $X\times Y$ with the product topology, then it makes sense to talk about the $\sigma$-algebra generated by the product topology. We denote that $\sigma$-albegra by $\mathcal{B}(X\times Y)$ and call it the Borel $\sigma$-algebra. On the other hand, we can also talk about product $\sigma$-algebra $\mathcal{B}(X)\otimes \mathcal{B}(Y)$. In general, we have $\mathcal{B}(X)\otimes \mathcal{B}(Y)\subseteq \mathcal{B}(X\times Y)$, and the containment can be proper. On the other hand, if $X$ and $Y$ are second countable topological spaces, then $\mathcal{B}(X)\otimes \mathcal{B}(Y) = \mathcal{B}(X\times Y)$.
