Order arithmetic is that of Elementary Order Arithmetic in an Ordered Field, absolute values have the properties of Properties of the Absolute Value in an Ordered Field, and 2=1+1. Note that dR(f(z),f(x))=∣f(z)−f(x)∣ throughout.
If K is empty, take θ=1, which is positive by claim 6 of Elementary Order Arithmetic in an Ordered Field; the assertion holds vacuously. So assume K is nonempty.
Let η∈R with 0<η and put η′=η⋅2−1, so that 0<η′ and η′+η′=η by claim 8 of Elementary Order Arithmetic in an Ordered Field.
Step 1 (a cover indexed by pairs). For x∈K let
Gx={τ∈R:0<τ, and every z∈Ω with d(x,z)<τ satisfies ∣f(z)−f(x)∣<η′}.
Since x∈K⊆Ω and f is continuous at x relative to Ω, that definition applied with η′ provides an element of Gx; hence Gx is nonempty.
Let I={(x,τ):x∈K and τ∈Gx}, and for i=(x,τ)∈I put Wi=Bd(x,τ⋅2−1), the open ball of centre x and radius τ⋅2−1, which is positive by claim 8 of Elementary Order Arithmetic in an Ordered Field. Then (Wi)i∈I is a family of subsets of X, each Wi is open in (X,d) by Open Ball in a Metric Space is Open, and every x∈K lies in W(x,τ) for any τ∈Gx, because d(x,x)=0<τ⋅2−1 by condition 2 of Metric Space. Hence (Wi)i∈I is an open cover of K in X.
Step 2 (a finite subcover and a uniform radius). Since K is compact in X, Compact Subset Criterion via Open Covers in the Ambient Space provides a finite subset J⊆I with K⊆⋃j∈JWj. As K is nonempty and a union indexed by the empty set is empty, J is nonempty. By Finite Set the set J therefore has n elements for some natural number n; fix a bijection β:[n]→J from the initial segment [n] onto J, and for k∈[n] write β(k)=(wk,τk).
Let c be the n-tuple in R with components ck=−(τk⋅2−1). By Greatest Element of a Finite Family in a Totally Ordered Set, applied to the totally ordered set R, there is j∈[n] with ck≤cj for every k∈[n]; by claim 4 of Elementary Order Arithmetic in an Ordered Field this says
τj⋅2−1≤τk⋅2−1for every k∈[n].
Put θ=τj⋅2−1; then 0<θ by claim 8 of Elementary Order Arithmetic in an Ordered Field, and θ≤τ⋅2−1 for every pair (w,τ)∈J, since β is onto J.
Step 3 (the estimate). Let x∈K and let z∈Ω satisfy d(x,z)<θ. By Step 2 there is j∈J with x∈Wj; write j=(w,τ), so that w∈K, τ∈Gw and d(w,x)<τ⋅2−1.
By condition 4 of Metric Space and claims 3 and 2 of Elementary Order Arithmetic in an Ordered Field,
d(w,z)≤d(w,x)+d(x,z)<τ⋅2−1+θ≤τ⋅2−1+τ⋅2−1=τ,
the last equality by claim 8 of Elementary Order Arithmetic in an Ordered Field. Since z∈Ω and τ∈Gw, this gives ∣f(z)−f(w)∣<η′.
Likewise d(w,x)<τ⋅2−1<τ by claim 8, so d(w,x)<τ by claim 2 of Elementary Order Arithmetic in an Ordered Field; and x∈K⊆Ω, so ∣f(x)−f(w)∣<η′.
Finally, by claims 5 and 2 of Properties of the Absolute Value in an Ordered Field and claim 3 of Elementary Order Arithmetic in an Ordered Field,
∣f(z)−f(x)∣=(f(z)−f(w))+(f(w)−f(x))≤∣f(z)−f(w)∣+∣f(w)−f(x)∣<η′+η′=η.
Since x∈K and z∈Ω with d(x,z)<θ were arbitrary, θ has the required property. ■