# Function on a Compact Set

Suppose X is compact and that f:X→ℝ, with the usual metric. In addition suppose that {x: f(x)>a} is open for every a ∈ ℝ. I need to show that there is always an x ∈ X such that f(x) equals the supremum of the range of f, or I need to provide a counter example.

For what it's worth we also know that f is bounded below and that there exists a y ∈ X such that f(y) equals the infimum of the range of f. ( these were the first two parts of the problem which I have already successfully proven ).

I literally can't think of any kind of compact metric space which satisfies these requirements, it must be pretty far out there. My approach to the first two parts was by contradiction: assuming the negation of the consequent and then finding an open cover which had no finite sub-cover, hence showing X wasn't compact. But this doesn't seem to work for this last part, and I can't find a good approach to it. Thanks.

Dick
Homework Helper
The metric space X doesn't have to be at all unusual. Just pick X=[0,1]. Now try and think of a function f where supremum is not achieved on X, but still satisfies your f(x)>a condition. It's really not hard. f doesn't even have to be exotic. It just has to be discontinuous.

I don't see how this can possibly be the case. The function f is bounded below, thus we can just pick any a ∈ ℝ below the infimum and we will end up with the set [0,1], which is clearly not open. Remember the set {x: f(x)>a} is a set in X, not in the range.

Dick