Write C=C([a,b],Y). By The Space of Continuous Maps on a Closed Interval and Its Weighted Uniform Distance (i), the elements of C are exactly the maps [a,b]→Y continuous on [a,b], and by The Space of Continuous Maps on a Closed Interval and Its Weighted Uniform Distance (ii), dw is a map C×C→R. Throughout, The Space of Continuous Maps on a Closed Interval and Its Weighted Uniform Distance (iii) is used in the form: for u,v∈C, w(t)dY(u(t),v(t))≤dw(u,v) for every t∈[a,b], with equality at some t0∈[a,b].
The metric ((i)). Let x,y,z∈C.
Nonnegative. a∈[a,b] by Basic Facts about Intervals of the Real Line (v), w(a)>0 and dY(x(a),y(a))≥0 by Metric Space (ii); so 0≤w(a)dY(x(a),y(a))≤dw(x,y).
Zero. If x=y, take t0 with dw(x,x)=w(t0)dY(x(t0),x(t0)); this is 0, as dY(x(t0),x(t0))=0 by Metric Space (iii). Conversely, let dw(x,y)=0 and t∈[a,b]. Then 0≤w(t)dY(x(t),y(t))≤dw(x,y)=0, so w(t)dY(x(t),y(t))=0; as w(t)>0, dY(x(t),y(t))=0, and x(t)=y(t) by Metric Space (iii). Hence x=y (Values, Restriction and Equality of a Map, and the Map u↦t(u) as a Defined Set Symbol (iv)).
Symmetric. Take t0 with dw(x,y)=w(t0)dY(x(t0),y(t0)). By Metric Space (iv) this equals w(t0)dY(y(t0),x(t0))≤dw(y,x). Exchanging x and y gives dw(y,x)≤dw(x,y), so dw(x,y)=dw(y,x).
Triangle. Take t0 with dw(x,z)=w(t0)dY(x(t0),z(t0)). By Metric Space (v) and w(t0)>0,
dw(x,z)≤w(t0)dY(x(t0),y(t0))+w(t0)dY(y(t0),z(t0))≤dw(x,y)+dw(y,z).
So dw is a metric on C by Metric Space (i), and (C,dw) is a metric space by Metric Space (vi).
Nonempty ((ii)). Let c∈Y and let h:[a,b]→Y be the map with h(s)=c for every s∈[a,b], which exists by Values, Restriction and Equality of a Map, and the Map u↦t(u) as a Defined Set Symbol (v). For all s,t∈[a,b], dY(h(s),h(t))=dY(c,c)=0 by Metric Space (iii). So for every t∈[a,b] and every real ε>0, δ=1 has the property required in Continuous Map Between Metric Spaces (i); hence h is continuous on [a,b] by Continuous Map Between Metric Spaces (ii), and h∈C.
Completeness ((iii)). Let (Y,dY) be complete, and let (xk)k∈N be a Cauchy sequence in (C,dw).
Step 1: bounds for the weight. By Extreme Value Theorem on a Closed Real Interval (ii) applied to w, there are p,q∈[a,b] with w(p)≤w(t)≤w(q) for every t∈[a,b]. Put m=w(p) and M=w(q); then m>0 and M>0. For u,v∈C and t∈[a,b], dY(u(t),v(t))≥0 by Metric Space (ii), so mdY(u(t),v(t))≤w(t)dY(u(t),v(t))≤dw(u,v), that is,
dY(u(t),v(t))≤dw(u,v)/m.(1)
Step 2: the pointwise limit. As C⊆Y[a,b], the set of maps from [a,b] to Y, (xk) is a sequence in Y[a,b]. Let t∈[a,b]. By Sections of a Sequence of Maps into a Metric Space, and the Map of Their Limits (i), with [a,b] for its D, the map k↦xk(t) is a sequence (xk(t))k in Y. It is a Cauchy sequence in (Y,dY): given a real ε>0, the Cauchy property of (xk) applied to mε>0 gives N∈N with dw(xk,xl)<mε for all k,l∈N with k,l≥N, and then dY(xk(t),xl(t))<ε by (1). As (Y,dY) is complete, (xk(t))k is convergent in (Y,dY) by Complete Metric Space (i). By Sections of a Sequence of Maps into a Metric Space, and the Map of Their Limits (ii), with [a,b] for its D and S, there is exactly one map x:[a,b]→Y such that (xk(t))k converges to x(t) in (Y,dY) for every t∈[a,b], and x(t) is the limit limk→∞xk(t).
Step 3: the convergence is uniform. We show: for every real ε>0 there is N∈N with
dY(xk(t),x(t))<εfor all k∈N with k≥N and all t∈[a,b].(2)
The choices are made in this order. First ε is given. (Here and in Steps 4 and 5, the quotients mε/2, ε/2, ε/3 and ε/(2M) are real numbers, positive as m,M>0, and are computed in the type Real of The Real Numbers as a Type (i), by Differences, Quotients and Absolute Values of Real Numbers, Read in the Type Real (ii).) Then the Cauchy property of (xk) applied to mε/2>0 gives N∈N with dw(xk,xl)<mε/2 for all k,l≥N, so that, by (1), dY(xk(t),xl(t))<ε/2 for all k,l≥N and all t∈[a,b]; this N does not depend on t. Now let k≥N and t∈[a,b]. By Step 2 and Convergent Sequence in a Metric Space (i) there is N′∈N, depending on t, with dY(xl(t),x(t))<ε/2 for all l≥N′. Let l be the larger of N and N′, which exists by Arithmetic and Order of the Natural Numbers (vii); then l∈N, N≤l and N′≤l by Arithmetic and Order of the Natural Numbers (vi). By Metric Space (v),
dY(xk(t),x(t))≤dY(xk(t),xl(t))+dY(xl(t),x(t))<ε/2+ε/2=ε.
Step 4: the limit is continuous. Let t∈[a,b] and let a real ε>0 be given. First, (2) applied to ε/3 gives N∈N, and, with k=N (as N≤N by Arithmetic and Order of the Natural Numbers (vi)), dY(xN(s),x(s))<ε/3 for every s∈[a,b]. Then, as xN∈C is continuous on [a,b], it is continuous at t relative to [a,b] by Continuous Map Between Metric Spaces (ii), and Continuous Map Between Metric Spaces (i) gives a real δ>0 with dY(xN(s),xN(t))<ε/3 for every s∈[a,b] with dR(t,s)<δ. For such s, by Metric Space (v) applied twice and Metric Space (iv),
dY(x(s),x(t))≤dY(xN(s),x(s))+dY(xN(s),xN(t))+dY(xN(t),x(t))<ε.
So x is continuous at t relative to [a,b]; as t was arbitrary, x is continuous on [a,b] by Continuous Map Between Metric Spaces (ii), and x∈C.
Step 5: convergence in dw. Let a real ε>0 be given, and let N be given by (2) for ε/(2M). Let k≥N. For every t∈[a,b], as w(t)≤M and dY(xk(t),x(t))≥0,
w(t)dY(xk(t),x(t))≤MdY(xk(t),x(t))≤M⋅2Mε=2ε.
Taking t0 with dw(xk,x)=w(t0)dY(xk(t0),x(t0)) gives dw(xk,x)≤ε/2<ε. Hence (xk) converges to x in (C,dw) by Convergent Sequence in a Metric Space (i), and is convergent by Convergent Sequence in a Metric Space (ii).
As (xk) was an arbitrary Cauchy sequence in the metric space (C,dw) of (i), (C,dw) is complete by Complete Metric Space (i).