Let N denote the natural numbers, and write Ο(E) for the Ο-algebra generated by E. By the symmetry axiom of a metric we have Bdβ(q,s)={yβX:d(y,q)<s} for every qβX and every real s>0, and we use this identification without further comment.
Claim 1.
Countability. The set Q>0β is a subset of Q, which is countable by claim 2 of The Integers and the Rational Numbers are Countable; hence Q>0β is countable by claim 3 of Basic Properties of Countable Sets. Since D is countable, the set DΓQ>0β is countable by claim 1 of Products and Powers of Countable Sets. The map sending (q,s)βDΓQ>0β to Bdβ(q,s) is, by the description of E in the statement, a surjection onto E; so E is countable by claim 4 of Basic Properties of Countable Sets.
Basis property. Let UβTdβ and let V be the union of those members of E that are contained in U, the union of an empty family being empty. Every such member is a subset of U, so VβU.
For the reverse inclusion let xβU. Since U is open in (X,d) there is a real number r>0 with Bdβ(x,r)βU. By claim 8 of Elementary Order Arithmetic in an Ordered Field there is a real number h with 0<h and h+h=r. By claim 1 of The Rational Numbers are Dense in the Real Numbers, applied to the pair 0<h, there is sβQ with 0<s<h; thus sβQ>0β. Since D is dense in X for Tdβ, the closure of D in X is X and so contains x; by Characterization of the Closure in a Metric Space by Open Balls, condition 1 there implies condition 3, so there is qβD with d(x,q)<s. In particular xβBdβ(q,s), and Bdβ(q,s) is a member of E.
We check that Bdβ(q,s)βU. Let wβBdβ(q,s), so that d(q,w)<s. Adding the inequalities d(x,q)<s and d(q,w)<s by claim 3 of Elementary Order Arithmetic in an Ordered Field gives d(x,q)+d(q,w)<s+s. The triangle inequality for d gives d(x,w)β€d(x,q)+d(q,w), so claim 2 of Elementary Order Arithmetic in an Ordered Field yields d(x,w)<s+s. Adding the inequality s<h to itself, again by claim 3 there, gives s+s<h+h=r; since s+s<r implies s+sβ€r, a second application of claim 2 gives d(x,w)<r. Hence wβBdβ(x,r)βU.
So Bdβ(q,s) is a member of E contained in U, whence xβBdβ(q,s)βV. As xβU was arbitrary, UβV, and therefore U=V.
Claim 2. By Open Ball in a Metric Space is Open every member of E is open in (X,d), so EβTdβ. By claim 2 of Intersections of Sigma-Algebras and Minimality of the Generated Sigma-Algebra, B(X,d) is a Ο-algebra on X containing Tdβ, hence containing E; by the minimality assertion of that same claim, Ο(E)βB(X,d).
For the reverse inclusion, let UβTdβ and let EUβ be the family of those members of E that are contained in U, so that U is the union of EUβ by claim 1. Being a subfamily of the countable family E, EUβ is countable by claim 3 of Basic Properties of Countable Sets. By claim 2 of Intersections of Sigma-Algebras and Minimality of the Generated Sigma-Algebra the family Ο(E) is a Ο-algebra on X containing E.
If EUβ has no members then U is empty; since XβΟ(E) and Ο(E) is closed under complements relative to X by the Ο-algebra axioms, the set XβX, which is empty, lies in Ο(E), so UβΟ(E). Otherwise EUβ is nonempty and countable, so by the definition of a countable set there is a sequence (Emβ)mβNβ whose set of terms is EUβ; then U is the union of the sets Emβ over mβN. Each Emβ belongs to E and hence to Ο(E), so UβΟ(E) by the third Ο-algebra axiom.
Thus TdββΟ(E). Since B(X,d) is by definition the Ο-algebra generated by Tdβ, minimality gives B(X,d)βΟ(E). The two inclusions give Ο(E)=B(X,d).
Claim 3. Suppose first that Y is measurable with respect to F and B(X,d). Let qβD and sβQ>0β. As in claim 2, Bdβ(q,s) is open in (X,d) and hence belongs to B(X,d), and
Yβ1(Bdβ(q,s))={ΟβΞ©:d(Y(Ο),q)<s}.
By measurability this set belongs to F.
Conversely, suppose that {ΟβΞ©:d(Y(Ο),q)<s}βF for every qβD and every sβQ>0β. Let G be the family of those subsets BβX with Yβ1(B)βF. Then G is a Ο-algebra on X: first, Yβ1(X)=Ξ©βF, so XβG; second, if BβG then Yβ1(XβB)=Ξ©βYβ1(B), which lies in F; third, if (Bmβ)mβNβ is a sequence in G then the preimage of the union of the Bmβ is the union of the sets Yβ1(Bmβ), which lies in F. By the displayed hypothesis, Yβ1(Bdβ(q,s))βF for all qβD and sβQ>0β, that is, EβG. Minimality (claim 2 of Intersections of Sigma-Algebras and Minimality of the Generated Sigma-Algebra) gives Ο(E)βG, and claim 2 above gives B(X,d)βG. Thus Yβ1(B)βF for every BβB(X,d), that is, Y is measurable.
For the final assertion, let dRβ be the absolute-value metric on R, given by dRβ(a,b)=β£aβbβ£, and assume that for every qβD the map gqβ:Ξ©βR, gqβ(Ο)=d(Y(Ο),q), is measurable with respect to F and B(R). Fix qβD and sβQ>0β and set H={tβR:t<s}.
We check that H is open in (R,dRβ). Let t0ββH, so t0β<s. By claim 1 of Elementary Order Arithmetic in an Ordered Field, adding βt0β to both sides gives t0ββt0β<sβt0β, and t0ββt0β=0 by claim 3 of Additive Cancellation and Elementary Additive Identities in a Field, so the real number r0β=sβt0β satisfies 0<r0β. Let tβBdRββ(t0β,r0β), that is β£t0ββtβ£<r0β. By claim 3 of Properties of the Absolute Value in an Ordered Field we have tβt0ββ€β£tβt0ββ£, and β£tβt0ββ£=β£t0ββtβ£ by claim 2 there, so tβt0ββ€β£t0ββtβ£; since β£t0ββtβ£<r0β, claim 2 of Elementary Order Arithmetic in an Ordered Field gives tβt0β<r0β=sβt0β. Adding t0β to both sides, again by claim 1 of that lemma, and simplifying with claim 3 of Additive Cancellation and Elementary Additive Identities in a Field, gives t<s, so tβH. Hence BdRββ(t0β,r0β)βH, and H is open in (R,dRβ).
Therefore H belongs to the Borel Ο-algebra of the metric space (R,dRβ), which equals B(R) by claim 2 of Borel Measurability and Bounded Integration on a Metric Space. Consequently
gqβ1β(H)={ΟβΞ©:d(Y(Ο),q)<s}βF.
Since qβD and sβQ>0β were arbitrary, the criterion proved above applies and Y is measurable with respect to F and B(X,d).
Claim 4. By claim 3 of Coordinatewise Convergence, Sequential Compactness and Density in a Product Metric Space the set DΓDβ² is countable and dense in XΓXβ² for the topology of subsets open in (XΓXβ²,dXΓXβ²β), and it is nonempty because D and Dβ² are nonempty. Hence ((XΓXβ²,dXΓXβ²β),DΓDβ²) is a separable metric datum, which is the first assertion of claim 4. Since claims 1, 2 and 3 are asserted for every separable metric datum, they apply to it, and we use them for it below.
Let (q,qβ²)βDΓDβ² and sβQ>0β. By the definition of the product metric,
dXΓXβ²β(Z(Ο),(q,qβ²))=max{d(Y(Ο),q),Β dβ²(Yβ²(Ο),qβ²)}.
By the definition of the maximum of two elements of a totally ordered set, this maximum is one of the two numbers and each of the two numbers is at most the maximum. Hence the maximum is less than s if and only if both numbers are less than s: if both are less than s then so is the maximum, being one of them; and if the maximum is less than s then each number is less than s by claim 2 of Elementary Order Arithmetic in an Ordered Field. Therefore
{ΟβΞ©:dXΓXβ²β(Z(Ο),(q,qβ²))<s}={ΟβΞ©:d(Y(Ο),q)<s}β©{ΟβΞ©:dβ²(Yβ²(Ο),qβ²)<s}.
Applying claim 3 to Y with the dense set D, and to Yβ² with the dense set Dβ², in the direction from measurability to the displayed condition, both sets on the right belong to F; hence so does their intersection, a Ο-algebra being closed under intersections of two of its members as recorded with the Ο-algebra axioms.
Since (q,qβ²)βDΓDβ² and sβQ>0β were arbitrary, claim 3 applied to (XΓXβ²,dXΓXβ²β) with the dense set DΓDβ², in the direction from the condition to measurability, shows that Z is measurable with respect to F and B(XΓXβ²,dXΓXβ²β).