Typically we think of a metric as a notion of distance between elements of set subject to the following constraints...
$$ d(x, y) ≥ 0,\quad d(x, x) = 0,\quad d(x, y) = d(y, x),\quad d(x, z) ≤ d(x, y) + d(y, z) $$
I want to know if there is an equivalent for distance between subsets of a known metric space? For example, if we partition integers between 1 and 20 into blocks of 5 and label these A, B, C and D, can we say that these labels are also metrics given a sensible method to compare them? E.g. $$ d(A,B) = \Big|\sum(1,2,3,4,5) - \sum(6,7,8,9,10)\Big| = 25,\\ d(A,A) = \sum(1,2,3,4,5) - \sum(1,2,3,4,5) = 0, \mathrm{etc}. $$
I'm sure there must be a solid definition of this somewhere with appropriate constraints on the sets. What I am particularly interested in is whether the concept of a metric distance is transitive from pairwise comparisons of elements to pairwise comparisons of subsets the metric space elements are taken from rather than an answer like "if you define a reasonable distance measure you can always call it a metric".