Is it true that in the Riesz representation theorem
$\mu(F)=\sup\{\Lambda(f): f\in C_c, 0\leq f \leq 1, \operatorname{supp} f \subset F \}$
for every compact (or closed) subset $F$?
(It is known that it holds if $F$ is open, and that $\mu(F)=\inf\{\Lambda(f): f\in C_c, 0\leq f \leq 1, f(x)=1 \ for \ x \in F \}$ if $F$ is compact.) I think it may be true, because in "Abstract harmonic analysis", vol.I., by E. Hewitt and K. Ross (if I well understood) the measure in the representation theorem is defined for closed subsets just in such a way (chap.11, (def. 11.20, th. 11.17 (i), def.11.11).
Thanks
Not in general. Consider the example $\Lambda(f)=f(x)$ for some non-isolated point $x$, and $F=\{x\}$. More generally, if there are compact sets with positive measure and dense complement, that equality will not hold. Even for Lebesgue measure these exist, fat Cantor sets being one type of example.