I am reading "Topology 2nd Edition" by James R. Munkres.
The definition of a cartesian product of an indexed family of sets is here:src)
Definition. Let $\{A_{\alpha}\}_{\alpha \in J}$ be an indexed family of sets; let $X = \bigcup_{\alpha \in J} A_{\alpha}$. The cartesian product of this indexed family, denoted by $$ \prod_{\alpha \in J} A_{\alpha} $$ is defined to be the set of all $J$-tuples $(x_{\alpha})_{\alpha \in J}$ of elements of $X$ such that $x_{\alpha} \in A_{\alpha}$ for each $\alpha \in J$. That is, it is the set of all functions $$ \mathbf{x} \, : \, J \to \bigcup_{\alpha \in J} A_{\alpha} $$ such that $\mathbf{x}(\alpha) \in A_{\alpha}$ for each $\alpha \in J$.
The following problem (Problem 9 on p.51) is from "Introduction to Set Theory and Topology" (in Japanese) by Kazuo Matsuzaka:
Prove that$$\left (\prod \limits _{\lambda \in \Lambda}A_\lambda \right )\cap \left (\prod \limits _{\lambda \in \Lambda}B_\lambda \right )=\prod \limits _{\lambda \in \Lambda}(A_\lambda \cap B_\lambda ).$$
Let $A_\lambda :=\mathbb{N}$.
Let $B_\lambda :=\mathbb{Z}$.
The codomain of elements of $\displaystyle \prod \limits _{\lambda \in \Lambda}A_\lambda$ is $\mathbb{N}$.
The codomain of elements of $\displaystyle \prod \limits _{\lambda \in \Lambda}B_\lambda$ is $\mathbb{Z}$.
The codomain of elements of $\displaystyle \prod \limits _{\lambda \in \Lambda}(A_\lambda \cap B_\lambda )$ is $\mathbb{N}$.
Then, $\displaystyle \left (\prod \limits _{\lambda \in \Lambda}A_\lambda \right )\cap \left (\prod \limits _{\lambda \in \Lambda}B_\lambda \right )=\varnothing$ since the codomain of elements of $\displaystyle \prod \limits _{\lambda \in \Lambda}A_\lambda$ and the codomain of elements of $\displaystyle \prod \limits _{\lambda \in \Lambda}B_\lambda$ are not the same.
Let $a$ be a function from $\Lambda$ to $\mathbb{N}$ such that $a(\lambda ):=1$ for any $\lambda \in \Lambda$.
Then, $\displaystyle a\in \prod \limits _{\lambda \in \Lambda}(A_\lambda \cap B_\lambda )$.
So, $\displaystyle \prod \limits _{\lambda \in \Lambda}(A_\lambda \cap B_\lambda )\neq \varnothing$.
But intuitively, I think $\displaystyle \left (\prod \limits _{\lambda \in \Lambda}A_\lambda \right )\cap \left (\prod \limits _{\lambda \in \Lambda}B_\lambda \right )=\prod \limits _{\lambda \in \Lambda}(A_\lambda \cap B_\lambda )$ holds.
What is the answer to this problem?