Let (X,d) be a metric space.
a) If p∈X, show that f:X→R defined by f(x):=d(x,p) is continuous.
b) Define a metric on X×X as in Exercise 7.1.6 part b, and show that g:X×X→R defined by g(x,y):=d(x,y) is continuous.
c) Show that if K1 and K2 are compact subsets of X, then there exists a p∈K1 and q∈K2 such that d(p,q) is minimal, that is, d(p,q)=inf{d(x,y):x∈K1,y∈K2}.