Suppose $X$ and $Y$ are topological spaces and $U \subseteq X \times Y$.
Now, I managed to prove that whenever $U$ is open all "slices" along $Y$ are also open:
\begin{equation} U \; \text{is open} \implies \forall \, x \in X : \left \{ y \in Y : \left( x, y \right) \in U \right \} \; \text{is open} \end{equation}
Obviously the same applies to slices along $X$.
Does the converse hold? That is, suppose that for a given set $U \subseteq X \times Y$ all slices along $X$ and $Y$ are open, can we conclude that $U$ is open?
My gut feeling tells me, that we need something like Hausdorffness to ensure that we have sufficiently "small" open sets, but I fail to prove it (or disprove it for that matter).
My idea so far is quite simple. If $U$ is empty then all is well, so suppose there is an element $\left( x, y \right) \in U$.
We can then look at the neighbourhood filters $\mathcal{F}_x$ and $\mathcal{F}_y$ of $x$ and $y$ respectively. Then the statement is equivalent to the existence of some $A \in \mathcal{F}_x$, $B \in \mathcal{F}_y$ such that
\begin{equation} A \times B \subseteq U \end{equation}
This seems to me impossible to prove without further assumptions... What assumptions are necessary and sufficient? Uniform topology comes to mind as it assures some symmetry between openness in $X$ and $Y$ directions.