Let (X,d) be a metric space, equipped with the collection of its subsets that are open in (X,d), a topology by Metric Open Sets Form a Topology, and let K⊆X be nonempty and compact in X. Let R be the set of real numbers with the addition, multiplication and order ≤ of its ordered field structure; for s,t∈R write s<t to mean that s≤t and s=t, and write s−t for s+(−t). Equip X×X with the product metric dX×X obtained from d and d, a metric by claim 1 of The Product Metric is a Metric; by A Product of Compact Subsets is Compact in the Product Metric the set K×K is compact in X×X.
Let u:K→R be upper semicontinuous on K, let v:K→R be lower semicontinuous on K, and let ψ:K×K→R be lower semicontinuous on K×K, with respect to the metric dX×X, and such that 0≤ψ(x,y) for every (x,y)∈K×K, with ψ(x,y)=0 if and only if x=y.
For α∈R with 0<α let Φα:K×K→R be the function
Φα(x,y)=u(x)−v(y)−αψ(x,y).
Then the following hold.
1. (Attainment) The function u−v:K→R with (u−v)(x)=u(x)−v(x) is upper semicontinuous on K, and there is exactly one M∈R such that M=(u−v)(xM) for some xM∈K and (u−v)(x)≤M for every x∈K. For each α with 0<α, the function Φα is upper semicontinuous on K×K, and there is exactly one Mα∈R such that Mα=Φα(p) for some p∈K×K and Φα(q)≤Mα for every q∈K×K.
In claims 2 to 6, M and Mα denote these values, and for each α with 0<α we let (xα,yα) be any point of K×K with Φα(xα,yα)=Mα; the claims hold for every such choice.
2. (Ordering) M≤Mα for every α with 0<α, and Mβ≤Mα whenever 0<α and α≤β.
3. (Convergence) For every ε∈R with 0<ε there is α0∈R with 0<α0 such that every α with α0≤α satisfies Mα≤M+ε.
4. (Vanishing penalty) M≤u(xα)−v(yα) for every α with 0<α; and for every ε∈R with 0<ε there is α1∈R with 0<α1 such that every α with α1≤α satisfies
αψ(xα,yα)≤εandu(xα)−v(yα)≤M+ε.
5. (Vanishing distance) For every η∈R with 0<η there is α2∈R with 0<α2 such that every α with α2≤α satisfies d(xα,yα)<η.
6. (Cluster points) Let x^∈K be a point with the following property: for all δ,β∈R with 0<δ and 0<β there is α with β≤α and d(x^,xα)<δ. Then u(x^)−v(x^)=M.