I was thinking how to say that two sets of prime numbers are close to each other, and came up with this.
Consider a set X, a subset of the positive integers {1, 2, 3, ...}. Define the size of X to be sum 2^{-x} over all x in X. Clearly, 0 <= size(X) <= 1.
Now consider P, a subset of the prime numbers {2, 3, 5, ..}. Define the span of P to be {n : n = product of primes in P}. For example, let P = {2}, then the span of P is the powers of 2. Note that we include 1 in the span of any non-empty P. If P is the empty set, the span of P is also empty.
Now we can define a distance between two subsets P and Q of the prime numbers. It is the size of the span of the symmetric difference of P and Q. So, if we write the symmetric difference of P and Q as delta(P, Q) = {p: prime such that p in P and not in Q or p in Q and not in P}. Then, symbolically, d(P, Q) = size(span(delta(P, Q))).
For example, if P and Q form a disjoint partition of the prime numbers, then d(P, Q) = 1.
I claim that this defines a metric on the set of subsets of the prime numbers. Clearly, d(P, P) = 0 for any subset P of the prime numbers, and symmetry is clear. It takes a few moments to convince yourself that it satisfies the triangle inequality: d(P, R) <= d(P, Q) + d(Q, R) for any subsets P, Q, and R of the prime numbers. Clearly it is a bounded metric too.
Is it of any interest? Has this already been defined and is it called something?
My hope is that this may find use as follows. Suppose that there is a set of objects such that for each object in the set there is a set of associated prime numbers, and suppose that each object is uniquely determined by its set of associated primes. Then the metric defined above can be used to construct a metric on this set.
For example, consider the set G of Galois extensions of Q. Each extension K/Q in G has an associated set of its unramified primes, say U(K). Define an equivalence relation ~ on G by saying that two extensions are equivalent if they have the same set of unramified primes. Consider the set of equivalence classe, H = G/~, and for an extension K/Q denote its equivalence class by K/~. Then there is a metric e on H defined by e(K/~, L/~) = d(U(K), U(L)).
Any pointers would be welcomed! Thanks, Martin