Let $A=\displaystyle\prod_{i\in[0,1]}\left(0,1\right)$ and $X=\displaystyle\prod_{i\in[0,1]}\mathbb{R}$. Is $A$ open in $X$ with respect to the product topology on $X$? Here is what I did:
By definition of the cartesian product we have that $\displaystyle\prod_{i\in[0,1]}\mathbb{R}=\{f:[0,1]\longrightarrow\mathbb{R},x\to f_{x}\}$ and $(f_{x})_{x\in[0,1]}$ is an element of $X$. Let $p_{j}:X\longrightarrow \mathbb{R}, p_{j}((f_{x})_{x\in[0,1]})=f_{j}$ where $j\in[0,1]$. The product topology on $X$ is generated by arbitrary unions of finite intersections of preimages of $p_{j}$, i.e. $\mathcal{B}=\bigg\{\displaystyle\bigcap_{k=1}^{n}\,p_{i_{k}}^{-1}(U_{i_{k}}): U_{i_{k}}\subset\mathbb{R}\text{ open}\bigg\}$ is a basis for the product topology. Now, assume that $A$ is open, which means that for all $(f_{x})_{x\in[0,1]}\in A$ there exists a basis element $B$, such that $(f_{x})_{x\in[0,1]}\in B\subset A$. We can write $B=\displaystyle\bigcap_{k=1}^{n}\,p_{i_{k}}^{-1}(U_{i_{k}})$ for $ U_{i_{k}}\subset\mathbb{R}$ open. Without loss of generality, we can assume that $ U_{i_{k}}=\left(a_{i_{k}},b_{i_{k}}\right)$ for $a_{i_{k}}<b_{i_{k}}$ and note that $f_{i_{k}}\in\left(a_{i_{k}},b_{i_{k}}\right)\subset \left(0,1\right)$ for all $k$. By definition of the preimage of $p_{j}$ we can compute that $$p_{i_{k}}^{-1}(\left(a_{i_{k}},b_{i_{k}}\right))=\left(a_{i_{k}},b_{i_{k}}\right)\times\displaystyle\prod_{i\in[0,1]\setminus i_{k}}\mathbb{R}\,,\text{ so }$$ $$B=\displaystyle\bigcap_{k=1}^{n}\,p_{i_{k}}^{-1}(U_{i_{k}})=\left(a_{i_{1}},b_{i_{1}}\right)\times\ldots\times\left(a_{i_{n}},b_{i_{n}}\right)\displaystyle\prod_{i\in[0,1]\setminus\{i_{1},\ldots i_{n}\}}\mathbb{R}.$$ Since $B\subset A$, being an element of $B$ implies being an element of $A$, but here is (in my opinion) a contradiction: let $g_{x}=f_{x}$ for all $x\in [0,1]\setminus\{i_{n}+1\}$ and $g_{i_{n}+1}>1$. Clearly, $g=(g_{x})_{x\in[0,1]}\in B$, but $g$ does not belong to $A$, by definition.
Is this proof correct? I'm thankful for any kind of help.
Your title is a bit misleading, since you actually prove that $A$ is not open in the product topology. Your proof is basically correct, though there is one error towards the end. When you choose the index at which $g$ is outside $(0,1)$, you can’t use $i_n+1$: that isn’t in $[0,1]$ unless $i_n$ just happens to be $0$. What you want (and may have intended) is to choose a new index in $[0,1]\setminus\{i_1,\ldots,i_n\}$ and label it $i_{n+1}$. It should be explicitly stated that $i_{n+1}\in[0,1]\setminus\{i_1,\ldots,i_n\}$, since that is crucial to the construction of $g$. Finally, it’s just a little neater if you give $g_{i_{n+1}}$ a specific value, though of course any value not in $(0,1)$ will do what you need; I’d probably set $g_{i_{n+1}}=0$ just as a matter of simplicity, but the specific choice isn’t important.