How to prove that a set of functions is compact? This is a simple question (I'm an undergraduate math student).
Let me define the set of functions
$$
\mathcal{U}=\left\lbrace u:[0,1]\rightarrow [0,1] \mid u\; \text{is Lebesgue measurable}\right\rbrace $$
I just want to know if the above set of functions is compact and why.
I also want to understand it means for $\mathcal{U}$ to be compact. 
Thanks in advance.
 A: In order to check whether this set of functions is compact you have to put a topology on the set. A topology is a "description of what open sets are", and a topological space (i.e., a set equipped with a topology) is compact if every open cover admits a finite subcover. Being compact strongly depends on the topology you choose. This poses a problem in this situation because there is no obvious choice for a topology. But there are some candidates I have encountered.

A good candidate is the topology induced by the $L^1$-norm. To do this, we first need to consider a quotient of $\mathcal U$, namely the set $\mathcal V = \mathcal U / \sim$, where $f \sim g$ if $\{f \neq g\}$ has Lebesgue measure zero. Then, $\mathcal V$ has a famous metric, namely the metric induced by the $L^1$-norm on $L^1([0,1])$ (of which $\mathcal V$ is a subset) given by
$$\Vert f \Vert = \int_0^1 |f(x)|\,dx.$$
This metric induces a topology on $\mathcal V$, which in turn induces a topology on $\mathcal U$. It turns out that if $\mathcal U$ were compact (with respect to this reasonable topology), then so would be $\mathcal V$. We will now show that $\mathcal V$ is not compact, so $\mathcal U$ will not be (with respect to this topology).
This can be done, e.g., by constructing a sequence $(f_n)_{n \in \mathbb N} \subset \mathcal V$ that has no convergent subsequence. One possible such sequence is the following. Divide $[0,1]$ up into $2^n$ pieces of equal length. Then let $f_n$ be $0$ on the first, third, $\dots,$ $2^n-1$-st piece, and let $f_n$ be $1$ on the second, fourth, $\dots,$ $2^n$-th piece. This sequence has no convergent subsequence since
$$\Vert f_n - f_m \Vert = \int_0^1 |f_n(x) - f_m(x)|\,dx = 1$$
whenever $m \neq n$ (you might want to draw some pictures to see this). Thus, $\mathcal V$ is not compact (with respect to this topology).

Another candidate for a topology on $\mathcal U$ is the pointwise topology, induced by the metric 
$$d(f,g) = \sup_{x \in [0,1]}|f(x)-g(x)|.$$
It turns out that this topology is actually finer than the topology discussed above, so with respect to this topology, $\mathcal U$ is also not compact.

Finally, there are some stupid things you can do in order for $\mathcal U$ to be compact. E.g., you could put the trivial topology on $\mathcal U$ ($\emptyset$ and $\mathcal U$ are the only open sets), in which case $\mathcal U$ will be compact. I cannot think of any other reasonable non-pathological topology on $\mathcal U$ that makes it compact.

As a final remark: There are much more reasonable ways to topologize function spaces if you restrict to continuous functions. One example is the Compact-Open Topology on spaces of continuous functions, which has very nice properties.
