Throughout, R denotes the real numbers, an ordered field with order β€ and additive identity 0; for real s,t we write s<t to mean sβ€t and sξ =t. For xβX and a real number r>0, Bdβ(x,r) denotes the open ball in (X,d) with center x and radius r, and XβA denotes the complement of A relative to X. By the definition of a closed subset, A is closed in (X,Tdβ) precisely when XβAβTdβ, that is, precisely when XβA is open in (X,d).
Necessity. Assume XβA is open in (X,d). Let (xmβ)mβNβ be a sequence in X with xmββA for every mβN, and let xβX be such that (xmβ)mβNβ converges to x in (X,d). Suppose, for contradiction, that xβ/A. Then xβXβA, so by the definition of openness there is a real number r>0 with
Bdβ(x,r)βXβA.
Applying the definition of convergence with Ξ΅=r produces NβN such that d(xmβ,x)<r for every mβN with mβ₯N. The order on N is reflexive by Properties of the Order on the Natural Numbers, so Nβ₯N and therefore d(xNβ,x)<r. Condition 3 in the definition of a metric gives d(x,xNβ)=d(xNβ,x), hence d(x,xNβ)<r and so xNββBdβ(x,r). Consequently xNββXβA, that is, xNββ/A, contradicting xNββA. Therefore xβA, as required.
Sufficiency. We prove the contrapositive: assuming A is not closed, we exhibit a sequence with all terms in A that converges in (X,d) to a point outside A.
So assume XβA is not open in (X,d). Negating the definition of openness, there is a point xβXβA such that for every real number r>0 the inclusion Bdβ(x,r)βXβA fails, that is, there exists yβBdβ(x,r) with yβ/XβA. Since yβX and yβ/XβA, such a y lies in A. Hence
Bdβ(x,r)β©Aξ =β
forΒ everyΒ realΒ numberΒ r>0.
By Existence of a Sequence of Positive Real Numbers with Limit Zero there is a sequence (hkβ)kβNβ of real numbers with 0<hkβ for every kβN and with limit 0. For each kβN put
Akβ=Bdβ(x,hkβ)β©A,
which is a subset of X, nonempty by the previous paragraph applied to r=hkβ. Thus (Akβ)kβNβ is a family of subsets of X with every member nonempty, so Axiom of Countable Choice yields a sequence (ykβ)kβNβ in X with ykββAkβ for every kβN. In particular, for every kβN we have ykββA and, by the definition of the open ball, d(x,ykβ)<hkβ.
We claim (ykβ)kβNβ converges to x in (X,d). Let Ξ΅ be a real number with Ξ΅>0. Since (hkβ)kβNβ has limit 0, there is NβN such that β£hkββ0β£<Ξ΅ for every kβN with kβ₯N, the absolute value being that of the ordered field R. By Additive Cancellation and Elementary Additive Identities in a Field we have hkββ0=hkβ, so β£hkββ£<Ξ΅ for every such k. Statement 3 of Properties of the Absolute Value in an Ordered Field gives hkββ€β£hkββ£, and mixed transitivity, statement 2 of Elementary Order Arithmetic in an Ordered Field, then gives hkβ<Ξ΅.
Fix kβN with kβ₯N. Condition 3 in the definition of a metric gives d(ykβ,x)=d(x,ykβ), so d(ykβ,x)<hkβ. Since hkβ<Ξ΅ we have in particular hkββ€Ξ΅, and mixed transitivity again gives d(ykβ,x)<Ξ΅. As Ξ΅>0 was arbitrary, (ykβ)kβNβ converges to x in (X,d).
Every term of (ykβ)kβNβ lies in A, the sequence converges to x, and xβXβA so xβ/A. Hence the stated sequential condition fails, which proves the contrapositive and completes the proof.