Let $A \subseteq \mathbb{R}$ be a Lebesgue measurable set.
I am supposed to prove that $\lambda (A) = \sup\{\lambda (K) : K$ is a compact subset of $A \}$, using the fact that $\lambda (A) = \inf\{\lambda (U) : A$ is a subset of an open set $U \}$.
I can see how it would work if we working with $K$ closed, but can't see it for $K$ compact.
Any help would be appreciated.
Hint: If you can prove it for $K$ closed, you can then extend it to the compact case. Let's say you have some sequence of sets $\{C_n\}$ such that $C_n$ is a closed subset of $A$ for all $n$ and $\lambda(C_n) \rightarrow \lambda(A)$. Let $K_n = C_n \bigcap [-n,n]$.