Throughout, α, β, ε and δ denote real numbers, semicontinuity of Φ and Ψ is relative to K in the metric space (X,d), and we use freely that 2=1+1 satisfies 0<2: indeed 0≤1 by claim 1 of Elementary Arithmetic in an Ordered Field and 0=1 in a field, so 0<1, and adding 1 gives 1<2 by claim 1 of Elementary Order Arithmetic in an Ordered Field. Hence 2−1 exists and 0<2−1 by claim 7 of Elementary Order Arithmetic in an Ordered Field, and 2−1+2−1=2⋅2−1=1.
Proof of claim 1. Fix α with 0<α. Since Ψ is lower semicontinuous on K and 0≤α, claim 3 of Sums and Nonnegative Multiples of Semicontinuous Functions shows that αΨ is lower semicontinuous on K. By claim 1 of Semicontinuity Under Negation and Characterization of Continuity the function −(αΨ) is upper semicontinuous on K. As Φ is upper semicontinuous on K, claim 1 of Sums and Nonnegative Multiples of Semicontinuous Functions shows that Φ+(−(αΨ)) is upper semicontinuous on K; its value at x∈K is Φ(x)−αΨ(x), so it is exactly Φ−αΨ.
Since K is nonempty and compact in X, claim 1 of Semicontinuous Functions Attain Their Extrema on a Compact Set provides x∈K with Φ(y)−αΨ(y)≤Φ(x)−αΨ(x) for every y∈K. If x′∈K has the same property, then taking y=x′ in the inequality for x and y=x in the inequality for x′ gives both Φ(x′)−αΨ(x′)≤Φ(x)−αΨ(x) and the reverse inequality, so the two values coincide by antisymmetry of the total order of R. Thus Mα is well defined.
Proof of claim 2. Let 0<β≤α and let x be a maximiser at level α. From β≤α and 0≤Ψ(x), claim 5 of Elementary Arithmetic in an Ordered Field gives βΨ(x)≤αΨ(x); claim 4 of Elementary Order Arithmetic in an Ordered Field turns this into −αΨ(x)≤−βΨ(x), and adding Φ(x) (claim 3 of Elementary Arithmetic in an Ordered Field) yields
Mα=Φ(x)−αΨ(x)≤Φ(x)−βΨ(x)≤Mβ,
the last inequality because x∈K and Mβ is the maximum value of Φ−βΨ on K.
Next let z∈Z and 0<α. Then Ψ(z)=0, so αΨ(z)=0 by claim 1 of Zero Products and Elementary Identities in a Field; since the additive inverse of 0 is 0 and 0 is the additive identity of the field, Φ(z)−αΨ(z)=Φ(z). As z∈K, this gives Φ(z)≤Mα.
Put S={Mα:α∈R, 0<α}. It is nonempty, containing M1. Fix z0∈Z, which exists because Z is nonempty; the previous paragraph shows that Φ(z0)≤Mα for every α with 0<α, so Φ(z0) is a lower bound of S. By Existence of the Infimum of a Nonempty Subset of R Bounded Below the greatest lower bound M=infS exists in R. For an arbitrary z∈Z the number Φ(z) is likewise a lower bound of S, so Φ(z)≤M because M is the greatest lower bound.
Proof of claim 3. Let 0<ε. By claim 4 of Approximation Property of the Supremum and the Infimum in R applied to S there is an element of S strictly below M+ε; that is, there is α0 with 0<α0 and Mα0<M+ε. Let α0≤α. Claim 2 gives Mα≤Mα0, and claim 2 of Elementary Order Arithmetic in an Ordered Field then gives Mα<M+ε. Finally M≤Mα because M is a lower bound of S.
Proof of claim 4. We first prove the final assertion. Let 0<α and let x be a maximiser at level α. From 0<α and 0≤Ψ(x), claim 5 of Elementary Arithmetic in an Ordered Field gives 0≤αΨ(x); claim 4 of Elementary Order Arithmetic in an Ordered Field gives −αΨ(x)≤0, and adding Φ(x) gives Φ(x)−αΨ(x)≤Φ(x). Since M≤Mα=Φ(x)−αΨ(x), transitivity gives M≤Φ(x).
Now let 0<ε and put ε′=ε⋅2−1, so that 0<ε′≤ε by claims 8 and 5 of Elementary Order Arithmetic in an Ordered Field. By claim 3 there is α1 with 0<α1 such that
M≤Mβ<M+ε′for every β with α1≤β.
Put α0=2α1+2. From 0<α1 and 0<2 we get 0<2α1 by claim 5 of Elementary Order Arithmetic in an Ordered Field, hence 2≤2α1+2 by claim 3 of Elementary Arithmetic in an Ordered Field, and 1<2 gives 1≤α0.
Let α0≤α and let x be a maximiser at level α. Put β=α⋅2−1. Multiplying α0≤α by the nonnegative number 2−1 (claim 5 of Elementary Arithmetic in an Ordered Field) gives α1+1=α0⋅2−1≤β, and α1≤α1+1, so α1≤β and therefore M≤Mβ<M+ε′. Also M≤Mα by claim 3 applied with the same α1, or directly because M is a lower bound of S.
Because 2−1+2−1=1 we have β+β=α, so
Mα=Φ(x)−αΨ(x)=(Φ(x)−βΨ(x))−βΨ(x)≤Mβ−βΨ(x),
using x∈K for the last step. Adding βΨ(x)−Mα to both sides gives βΨ(x)≤Mβ−Mα. From M≤Mα we get −Mα≤−M, hence Mβ−Mα≤Mβ−M<ε′. Therefore βΨ(x)<ε′, and multiplying by the positive number 2 (claim 10 of Elementary Order Arithmetic in an Ordered Field) gives
αΨ(x)=2βΨ(x)<2ε′=ε.
That 0≤αΨ(x) was shown above. Since 1≤α0≤α and 0≤Ψ(x), claim 5 of Elementary Arithmetic in an Ordered Field gives Ψ(x)=1⋅Ψ(x)≤αΨ(x)<ε, and 0≤Ψ(x) holds by hypothesis.
Finally, adding αΨ(x) to Mα=Φ(x)−αΨ(x) gives Φ(x)=Mα+αΨ(x). Combining Mα<M+ε′ with αΨ(x)<ε and ε′≤ε gives Φ(x)<M+ε′+ε≤M+2ε, while M≤Φ(x) was proved above.
Proof of claim 5. The terms of (xk)k∈N lie in K, which is nonempty and compact in X, so by Every Sequence in a Compact Subset of a Metric Space Has a Cluster Point There the sequence has a cluster point in (X,d) lying in K.
Let x^∈K be any cluster point of (xk)k∈N.
Step (a): Ψ(x^)=0. Let 0<ε. Since Ψ is lower semicontinuous at x^ relative to K, there is δ with 0<δ such that every y∈K with d(x^,y)<δ satisfies Ψ(x^)−ε<Ψ(y). By claim 4 there is α0 with 1≤α0 such that Ψ(x)<ε for every α with α0≤α and every maximiser x at level α. By the hypothesis on (αk)k∈N, applied with R=α0, there is N∈N with α0<αk for every k with N≤k. Applying Cluster Point of a Sequence in a Metric Space with the radius δ and this N produces k∈N with N≤k and d(xk,x^)<δ; by the symmetry axiom of Metric Space also d(x^,xk)<δ. For this k we have α0≤αk, so Ψ(xk)<ε, while xk∈K gives Ψ(x^)−ε<Ψ(xk). Hence Ψ(x^)−ε<ε, that is Ψ(x^)<2ε.
Suppose 0<Ψ(x^). Applying the previous paragraph with ε=Ψ(x^)⋅4−1, which is positive by claims 7 and 5 of Elementary Order Arithmetic in an Ordered Field, gives Ψ(x^)<2ε=Ψ(x^)⋅2−1, contradicting claim 8 of Elementary Order Arithmetic in an Ordered Field. Hence Ψ(x^)≤0, and with the standing hypothesis 0≤Ψ(x^) we conclude Ψ(x^)=0, so x^∈Z.
Step (b): Φ(x^)=M. Since x^∈Z, claim 2 gives Φ(x^)≤M. For the reverse inequality, let 0<ε. Since Φ is upper semicontinuous at x^ relative to K, there is δ with 0<δ such that every y∈K with d(x^,y)<δ satisfies Φ(y)<Φ(x^)+ε. Applying Cluster Point of a Sequence in a Metric Space with the radius δ and with N any element of N produces k∈N with d(xk,x^)<δ, hence d(x^,xk)<δ. By the final assertion of claim 4 applied at level αk we have M≤Φ(xk), and therefore
M≤Φ(xk)<Φ(x^)+ε.
Suppose Φ(x^)<M. Applying the previous sentence with ε=(M−Φ(x^))⋅2−1, which is positive, gives M<Φ(x^)+(M−Φ(x^))⋅2−1; but adding −Φ(x^) to both sides turns this into M−Φ(x^)<(M−Φ(x^))⋅2−1, contradicting claim 8 of Elementary Order Arithmetic in an Ordered Field. Hence M≤Φ(x^), and antisymmetry gives Φ(x^)=M.
Finally, x^∈Z by step (a), and claim 2 gives Φ(z)≤M=Φ(x^) for every z∈Z, so Φ attains a maximum over Z at x^ with value M. ■