I've been trying to get practice with contrapositives. Where did I go wrong with this proof attempt (I'm concerned because I didn't use compact/closed)....
The question:
Let $A, B \subset (X, \rho)$ a metric space. If $A$ is compact and $B$ is closed, and $$ d(A,B) = \inf\{\rho(x,y): x\in A, y\in B\} $$ show that: $$ A \cap B = \emptyset \iff d(A,B) > 0. $$
My attempt:
To show $\implies$, consider the contrapositive. Let $d(A,B) \leq 0$. Since $d$ is nonnegative, we have $d(A,B) = 0$, thus for $x\in A, y\in B$, we have $\rho(x,y) = 0 \implies x = y \implies x\in A \cap B \neq \emptyset$. To show $\impliedby$, consider the contrapositve. Let $A \cap B \neq \emptyset$. Then $\exists x\in A \cap B$ which means $\rho(x,x) = 0 \implies d(A,B) = 0 \leq 0$.