I want to characterize the compact sets in the space of real functions $\mathbb{R}^\mathbb{R}$ (with the product topology).
After doing some checks for different set, I came with the following guess:
$C\subseteq \mathbb{R}^\mathbb{R}$ compact iff C is a closed subset of a product of compact sets (i.e closed subsets of $(C(x))_{x\in \mathbb{R}}$ where for any $x$, $C(x)\subseteq \mathbb {R}$ is compact).
Clearly this is a sufficient condition for compactness using Tikhnov's theorem and the fact that a closed subset of compact space is compact.
Is this condition necessary?
Yep! The product topology makes projections continuous. If $C$ is compact then every one of its projections $\pi_x(C)$ is compact, and $C\subset\prod\pi_x(C)$.