I'm not sure that my definition of indexed set product is valid. While I'm studying set theory, I saw the definition of indexed set product in Wikipedia.
The definition looks complicated to me, so I tried to define simpler. The definition is below.
$$\prod_{i\in\mathcal{I}} X_i:=\left\{\bigcup_{i\in\mathcal{I}}\left\{\left\{x_i,i\right\}\right\} \;\middle|\; x_i\in X_i\right\}$$
As I'm a beginner and have no colleague, I'm not sure. Is the definition correct?
Reference.
Hausdorff's definition - wikipeida
 A: Let $I$ be a set and let $X_{i}$ be a set for each $i\in I$. 
What can serve as product for these sets is a set $X$ together with functions
(projections) $p_{i}:X\rightarrow X_{i}$ for $i\in I$ in
such a way that there is a one-to-one correspondence between so-called
'sources' of functions $\left\{ g_{i}:Y\rightarrow X_{i}\right\} _{i\in I}$
and functions $g:Y\rightarrow X$. The fact that it is more convenient to handle with a function instead of a source of functions is an important motivation for constructing products.
For a source  $\left\{ g_{i}:Y\rightarrow X_{i}\right\} _{i\in I}$ a unique
function $g:Y\rightarrow X$ must exist such that $g_{i}=p_{i}\circ g$ for each $i\in I$ and conversely
every function $g:Y\rightarrow X$ induces source $\left\{ p_{i}\circ g:Y\rightarrow X_{i}\right\} _{i\in I}$.
How to construct such a product? 
In special case $I=\left\{ 1,2\right\} $
we can do with $X=\left\{ \left(x_{1},x_{2}\right)\mid x_{1}\in X_{1},x_{2}\in X_{2}\right\} $
and projections $p_{i}:X\rightarrow X_{i}$ prescribed by $\left(x_{1},x_{2}\right)\mapsto x_{i}$
for $i=1,2$. 
More generally we mostly choose for a set $X$ whose
elements are exactly the functions $f:I\rightarrow\cup_{i\in I}X_{i}$
that satisfy the condition that $f\left(i\right)\in X_{i}$ for each
$i\in I$. Projections $p_{i}:X\rightarrow X_{i}$ are here the functions
prescribed by $f\mapsto f\left(i\right)$. 
If we deal with a source
of functions $\left\{ g_{i}:Y\rightarrow X_{i}\right\} _{i\in I}$
then for every $y\in Y$ there is a unique function $f_{y}:I\rightarrow\cup_{i\in I}X_{i}$
that is determined by the condition $f_{y}\left(i\right)=g_{i}\left(y\right)\in X_i$
for $i\in I$. This $f_{y}$ is an element of $X$ which allows us to define $g:Y\rightarrow X$ by the prescription $y\mapsto f_{y}$.
We have: $$p_{i}\circ g\left(y\right)=p_{i}\left(g\left(y\right)\right)=p_{i}\left(f_{y}\right)=f_{y}\left(i\right)=g_{i}\left(y\right)$$
This for each $y\in Y$ and each $i\in I$, showing that indeed $p_{i}\circ g=g_{i}$
for each $i\in I$.
If we give a description of this set $X$ then we come to: $$X=\left\{ f\in\left(\cup_{i\in I}X_{i}\right)^{I}\mid\forall i\in I\; f\left(i\right)\in X_{i}\right\}$$ Here
$\left(\cup_{i\in I}X_{i}\right)^{I}$ is a notation for the set of
all functions $I\rightarrow\cup_{i\in I}X_{i}$. 
Normally set  $X$ is denoted as $\prod_{i\in I}X_{i}$. Essential (and often forgotten) is the fact that:
a product is not just a set, but a set accompanied by projections.
A: It looks more complicated to me. Your unions are precisely the functions $\mathcal I\to\bigcup X_i$, just written in a less intuitive way. When you write $\{x_i\}_{\mathcal I} $, that's nothing but a function,  which you would see more clearly if you wrote $x(i) $ instead of $x_i$ (I'm not suggesting you actually do it, but it might help you see it).
