Each result cited is universally quantified over the data in its own statement.
Step 0 (two facts used repeatedly). First, for every xβX there is a sequence in S converging to x in (X,d): since S is dense, the closure of S in (X,Tdβ) is X, so x belongs to that closure, and Sequential Characterization of the Closure in a Metric Space supplies the sequence. Secondly, if a sequence (amβ)mβNβ of real numbers converges to a and cβR satisfies amββ€c for every mβN, then aβ€c: otherwise Ξ·=aβc is positive, and convergence gives an m with β£amββaβ£<Ξ·, hence amβ>aβΞ·=c by claim 9 of Properties of the Absolute Value in an Ordered Field, contradicting amββ€c.
Claim 2. Let g1β,g2β be as stated and let xβX. By Step 0 choose a sequence (xmβ)mβNβ in S converging to x. By Continuity Between Metric Spaces is Equivalent to Sequential Continuity the sequences (g1β(xmβ))mβNβ and (g2β(xmβ))mβNβ converge to g1β(x) and to g2β(x) respectively. These are the same sequence of real numbers, because g1β and g2β agree on S and every xmβ lies in S; since limits are unique by The Real Numbers: Standing Notation and Background Β§sequences, g1β(x)=g2β(x).
Claim 1. Let f:SβR be uniformly continuous on S, let xβX and let (xmβ)mβNβ be a sequence in S converging to x.
(i) The sequence (f(xmβ))mβNβ converges. Let Ξ΅βR be positive. By uniform continuity of f on S there is a positive Ο such that all a,bβS with d(a,b)<Ο satisfy β£f(a)βf(b)β£<Ξ΅. By convergence there is NβN with d(xmβ,x)<2Οβ for every m with Nβ€m, and then d(xmβ,xnβ)β€d(xmβ,x)+d(x,xnβ)<Ο for all such m,n, whence β£f(xmβ)βf(xnβ)β£<Ξ΅. Thus (f(xmβ))mβNβ is a Cauchy sequence, and it converges by The Real Numbers: Standing Notation and Background Β§sequences.
(ii) The limit does not depend on the sequence. Let (ymβ)mβNβ be a sequence in S converging to x, let a be the limit of (f(xmβ))mβNβ and b that of (f(ymβ))mβNβ, and let Ξ΅ be positive. With Ο as in (i) there is N such that d(xmβ,x)<2Οβ and d(ymβ,x)<2Οβ, hence d(xmβ,ymβ)<Ο and β£f(xmβ)βf(ymβ)β£<Ξ΅, for every m with Nβ€m; enlarging N we may also assume β£f(xNβ)βaβ£<Ξ΅ and β£f(yNβ)βbβ£<Ξ΅. Then, by the triangle inequality of claim 5 of Properties of the Absolute Value in an Ordered Field,
β£aβbβ£β€β£aβf(xNβ)β£+β£f(xNβ)βf(yNβ)β£+β£f(yNβ)βbβ£<3Ξ΅.
As Ξ΅ was an arbitrary positive real and 3Ξ΅ ranges over all positive reals with it, Comparison of Real Numbers with Arbitrary Positive Slack gives β£aβbβ£β€0, and since 0β€β£aβbβ£ we get a=b.
By (i) and (ii), for each xβX there is exactly one real number L such that (f(xmβ))mβNβ converges to L for every sequence (xmβ)mβNβ in S converging to x: such an L exists because at least one such sequence exists by Step 0 and (ii) identifies the limits of all of them, and it is unique for the same reason. Let g:XβR be the function whose value at x is that number.
(iii) g agrees with f on S. For xβS the sequence all of whose terms are x lies in S and converges to x in (X,d), because d(x,x)=0 is smaller than every positive real, and the sequence of its values, all equal to f(x), converges to f(x) by Constant Sequences and Index-Shifted Sequences of Real Numbers Β§constant; hence g(x)=f(x) by the definition of g.
(iv) g is uniformly continuous, hence continuous, on X. Let Ξ΅ be positive and choose a positive Ο such that all a,bβS with d(a,b)<Ο satisfy β£f(a)βf(b)β£<2Ξ΅β. Let x,yβX satisfy d(x,y)<3Οβ and choose sequences (xmβ)mβNβ and (ymβ)mβNβ in S converging to x and to y. There is N with d(xmβ,x)<3Οβ and d(ymβ,y)<3Οβ for every m with Nβ€m, so that d(xmβ,ymβ)β€d(xmβ,x)+d(x,y)+d(y,ymβ)<Ο and hence β£f(xmβ)βf(ymβ)β£β€2Ξ΅β for all such m. Replacing the two sequences by the subsequences with terms xm+Nβ and ym+Nβ, which converge to the same limits by A Subsequence of a Convergent Sequence Has the Same Limit, we may assume that this bound holds for every mβN. The sequences (f(xmβ))mβNβ and (f(ymβ))mβNβ converge to g(x) and g(y) by the definition of g, so by claim 3 of Arithmetic of Limits of Real Sequences and claim 4 of Order Properties of Limits of Real Sequences the sequence with terms β£f(xmβ)βf(ymβ)β£ converges to β£g(x)βg(y)β£. By Step 0, β£g(x)βg(y)β£β€2Ξ΅β<Ξ΅. Thus the condition of Uniformly Continuous Map Between Metric Spaces holds with 3Οβ, so g is uniformly continuous on X; taking, for a given point and a given Ξ΅, the same number 3Οβ shows that g is continuous on X.
Claim 3. Let g, Ξ΅ and ΞΈ be as stated and let x,yβX satisfy d(x,y)<ΞΈ; put ΞΌ=ΞΈβd(x,y), a positive real. Choose sequences (xmβ)mβNβ and (ymβ)mβNβ in S converging to x and to y, and N with d(xmβ,x)<2ΞΌβ and d(ymβ,y)<2ΞΌβ for Nβ€m. For such m,
d(xmβ,ymβ)β€d(xmβ,x)+d(x,y)+d(y,ymβ)<d(x,y)+ΞΌ=ΞΈ,
so d(xmβ,ymβ)β€ΞΈ and the hypothesis gives β£g(xmβ)βg(ymβ)β£β€Ξ΅, both points lying in S. Passing to the subsequences with terms xm+Nβ, ym+Nβ as in (iv), this holds for every index. By Continuity Between Metric Spaces is Equivalent to Sequential Continuity the sequences (g(xmβ))mβNβ and (g(ymβ))mβNβ converge to g(x) and g(y), so by claim 3 of Arithmetic of Limits of Real Sequences and claim 4 of Order Properties of Limits of Real Sequences the sequence with terms β£g(xmβ)βg(ymβ)β£ converges to β£g(x)βg(y)β£; Step 0 gives β£g(x)βg(y)β£β€Ξ΅.
Claim 4. Let g and C be as stated and let xβX. Choose a sequence (xmβ)mβNβ in S converging to x. Then β£g(xmβ)β£β€C for every m, the points xmβ lying in S, and by Continuity Between Metric Spaces is Equivalent to Sequential Continuity and claim 4 of Order Properties of Limits of Real Sequences the sequence with terms β£g(xmβ)β£ converges to β£g(x)β£. By Step 0, β£g(x)β£β€C.