Please tell if my proof works for the following problem:
Let $X$ be a metric space and $K$(Compact), $C$(Closed) $⊂X$ such that $K∩C=∅.$Show that $d(K,C)>0.$
SOLUTION: $d_C:X\to\mathbb R$ is continuous $\implies d_C:K\to\mathbb R$ is continuous where $K$ is compact$\implies\exists~k\in K$ such that $$d_C(k)=\inf_{~x~\in K}d_C(x)=\inf_{x\in K} d_C(x)=\inf_{x~\in K}\inf_{c~\in C}d(x,c)=\inf_{x\in K,~c~\in C}d(x,c)=d(K, C)$$If possible let $d(K,C)=0\implies d_C(k)=0\implies k\in\overline C=C!\\\text{Hence the result follows}.$