Throughout, BdAāā(x,Ī“) denotes the open ball in (A,dAā), so that BdAāā(x,Ī“)={yāA:d(x,y)<Ī“} because dAā agrees with d on A. We use the order arithmetic of Elementary Order Arithmetic in an Ordered Field and the fact that the order ⤠of R is a total order, hence reflexive, antisymmetric and comparing any two elements. We write sāt for s+(āt).
Step 0: complements. Let yāA and cāR. The conditions u(y)<c and cā¤u(y) cannot both hold, since together with antisymmetry they would give u(y)=c, contradicting u(y)ī =c. If u(y)<c fails, then either u(y)ā¤c fails, in which case comparability gives cā¤u(y), or u(y)ā¤c holds and u(y)=c, in which case cā¤u(y) by reflexivity. Hence exactly one of the two conditions holds, and
Acā¤uā=AāAu<cā,Auā¤cā=AāAc<uā,
the second identity following in the same way.
Claim 1, necessity. Suppose u is upper semicontinuous on A, and let cāR and xāAu<cā. From u(x)<c, claim 1 of Elementary Order Arithmetic in an Ordered Field, applied by adding āu(x), gives 0<cāu(x). Applying the defining condition of upper semicontinuity at x with ε=cāu(x) produces Ī“ with 0<Ī“ such that every yāA with d(x,y)<Ī“ satisfies
u(y)<u(x)+(cāu(x))=c.
Thus BdAāā(x,Ī“)āAu<cā. As x was arbitrary, Au<cā is open in (A,dAā).
Claim 1, sufficiency. Suppose Au<cā is open in (A,dAā) for every cāR. Let xāA and let ε satisfy 0<ε. Put c=u(x)+ε; adding u(x) to 0<ε gives u(x)<c by claim 1 of Elementary Order Arithmetic in an Ordered Field, so xāAu<cā. By openness there is Ī“ with 0<Ī“ and BdAāā(x,Ī“)āAu<cā, that is, every yāA with d(x,y)<Ī“ satisfies u(y)<u(x)+ε. Hence u is upper semicontinuous at x relative to A, and, x being arbitrary, on A.
Claim 2, necessity. Suppose u is lower semicontinuous on A, and let cāR and xāAc<uā. From c<u(x), adding āc gives 0<u(x)āc. Applying the defining condition of lower semicontinuity at x with ε=u(x)āc produces Ī“ with 0<Ī“ such that every yāA with d(x,y)<Ī“ satisfies
c=u(x)ā(u(x)āc)<u(y).
Thus BdAāā(x,Ī“)āAc<uā, so Ac<uā is open in (A,dAā).
Claim 2, sufficiency. Let xāA and 0<ε. Put c=u(x)āε; adding u(x) to āε<0, which holds by claim 4 of Elementary Order Arithmetic in an Ordered Field, gives c<u(x), so xāAc<uā. By openness there is Ī“ with 0<Ī“ and BdAāā(x,Ī“)āAc<uā, that is, every yāA with d(x,y)<Ī“ satisfies u(x)āε<u(y). Hence u is lower semicontinuous at x relative to A, and on A.
Claim 3. Suppose u is upper semicontinuous on A and let cāR. By claim 1 the set Au<cā is open in (A,dAā), hence belongs to the topology of A, and by Step 0 the set Acā¤uā is its complement relative to A. By the definition of a closed subset, Acā¤uā is closed in A. The lower semicontinuous case is identical, using claim 2 and the second identity of Step 0.