On Weierstrass extreme value theorem

We show that suitable restatements of the classical Weierstrass extreme value theorem give necessary and sufficient conditions for the existence of a global minimum and of both a global minimum and a global maximum.


Introduction
The classical Weierstrass extreme value theorem asserts that a real-valued continuous function f on a compact topological space attains a global minimum and a global maximum. In fact a stronger statement says that if f is lower semicontinuous (but not necessarily continuous) then f attains a global minimum (though not necessarily a global maximum). The classical result easily follows from the latter statement by applying it to f and to − f, since lower semicontinuity of these two functions is equivalent to continuity of f. An immediate but generally neglected observation is that the conclusion of this theorem, that is, the existence of a global minimum, does not refer to any specific topology; consequently, one is free to consider the most convenient topology (other than any "natural" topology in the problem under consideration) to investigate the existence of a global minimum (see, e.g., [1,Thm. 1.1]). The aim of this note is to point out that, under this formulation, the Weierstrass extreme value theorem provides a necessary and sufficient condition for the existence of a global minimum.
Similarly, we will show that another suitable restatement provides a necessary and sufficient condition for the existence of both a global minimum and a global maximum. All this will be done in the next section, in which with no extra effort we will prove the results in the more general setting of functions taking values in a totally ordered set C.
We will endow C with its order topology (see, e.g., [2]), namely, the one having as a subbase all the sets of the types (c, +∞) : is open for every c ∈ C.

Results
Theorem 1 Let X be a nonempty set, C be a totally ordered set, endowed with the order topology, and f : X −→ C. The following statements are equivalent: (1) X is compact in the coarsest topology that makes f lower semicontinuous.
(2) There exists a topology on X which makes X compact and f lower semicontinuous.
(3) f has a global minimum.
Proof Implication (1) ⇒ (2) is obvious. Implication Obviously, the topology thus defined makes f lower semicontinuous and is the coarsest with this property. We will now prove that X is compact in this topology. Let O be an open cover of X, and take a global minimum x ∈ X of f. One has x ∈ U for some U ∈ O. Then either U = X or U = i∈I { f c i } for some family {c i } i∈I of elements of C. In the latter case, since x ∈ U = i∈I { f c i }, it turns out that U = X too. Thus O admits the open cover {X } , which shows that X is compact.
It is worth observing that the coarsest topology T that makes f lower semicontinuous is very peculiar. If f (X ) is finite then the cardinality of T is that of f (X ) plus 1, since in this case the open sets are X and { f f (x)}, (x ∈ X ). On the other hand, in the general case the boundary of every nonempty open set coincides with its complement. Consequently, every closed set different from X has an empty interior. Therefore, every nonempty set different from X has a nonempty boundary; in other words, X is connected. In fact, it is easy to see that every set is connected.
As an easy illustrative example, consider the case when f : R −→ R is the characteristic function of the set of irrational numbers, that is, f (x) = 0 if x is rational and f (x) = 1 otherwise. The coarsest topology that makes f lower semicontinuous has exactly three open sets: ∅, R and the set of irrational numbers. This is in sharp contrast with the standard topology of the real line, with respect to which f has no lower semicontinuity property and has a very strange topological structure.
We also want to point out that the standard textbook version of Weierstrass extreme value theorem, namely, the one stating that a real-valued continuous function f on a compact topological space attains both a global minimum and a global maximum, does not admit a restatement of the type of Theorem 1. Consider, for instance, the set X := 1 n : n = 1, 2, 3, . . . ∪ {−1} and the function f : X −→ R defined by f (x) := x, which attains a global minimum at x := −1 and a global maximum at x := 1. Clearly, the only topology on X under which f is continuous is the discrete one, but X is not compact under this topology.
In spite of the preceding example, a suitable reformulation of the classical version of Weierstrass theorem allows for a restatement similar to Theorem 1: Theorem 2 Let X be a nonempty set, C be a totally ordered set, endowed with the order topology, and f : X −→ C. The following statements are equivalent: (3) f has a global minimum and a global maximum.