thesis: metric spaces