# Does “ All continuous functions are bounded ” or “ All continuous functions attain a maximum ” or together imply the domain is compact?

Let $(X,d)$ be an infinite metric space satisfying H1 or H2 or both.

H1: (All continuous functions on X to $\mathbb{R}$ are bounded.)
If $f: X\to\mathbb{R}$ is continuous on $X$, then $f(x)$ is bounded.

H2: (All continuous functions on $X$ to $\mathbb{R}$ attain a maximum.)
If $f: X\to\mathbb{R}$ is continuous on $X$, then there exists at least one point $p \in X$ such that $f(p) \geq f(x)$ for every $x \in X.$

Question
Does H1 only or does H2 only imply $X$ is compact? Do H1 and H2 together imply $X$ is compact?

Note:
I know " If $X$ is compact then all continuous functions on $X$ to $\mathbb{R}$ are bounded " and " If $X$ is compact then all continuous functions on $X$ to $\mathbb{R}$ attain a maximum ". I am just curious about whether or not the converse still hold.

• You mean "converse" not "contrapositive." – saulspatz Jul 25 '18 at 15:20
• – Wraith1995 Jul 25 '18 at 15:20
• For metric spaces, each of H1 and H2 implies compactness. Here is H1. For general topological spaces (even locally compact Hausdorff spaces), this is not the case, $\omega_1$ (the first uncountable ordinal) is an example of a locally compact Hausdorff space with H1 and H2 that isn't compact. – Daniel Fischer Jul 25 '18 at 15:33
• Thank you @Wraith1995 :-) – user561154 Jul 25 '18 at 15:35
• Thank you @DanielFischer :-) – user561154 Jul 25 '18 at 15:36

Properties H1 and H2 are defined for arbitrary toplogical spaces $X$. If $X$ satisfies H1, it is called pseudocompact. See https://en.wikipedia.org/wiki/Pseudocompact_space.

Clearly H2 implies H1. The converse holds for Tychonoff-spaces (= completely regular spaces). See Theorem 27 in

Hewitt, Edwin. "Rings of real-valued continuous functions. I." Transactions of the American Mathematical Society 64.1 (1948): 45-99

Theorem 30 in this paper states that a normal space is pseudocompact if and only if it is compact.

• It's not clear to me that H2 implies H1. Couldn't $f$ be only bounded above? Would you be willing to clarify that? – Todd Wilcox Jul 25 '18 at 18:18
• @ToddWilcox The function $-f$ is continuous as well, hence attains its maximum, which is (minus) minimum for $f$. – A.Γ. Jul 25 '18 at 18:27
• @A.Γ. Are we taking it as given that $X$ is compact? If $X$ is not compact then it seems that H2 does not imply H1. For example, if $X=\mathbb{R}$ and $f$ is a parabola opening downwards, then it has a maximum and no minimum. Ohhh. .Ohh.. I see. All continuous functions. So if $f$ is continuous then $-f$ is also continuous and must have a maximum. My brain is apparently not responding to caffeine today. – Todd Wilcox Jul 25 '18 at 18:33
• @ToddWilcox If $f$ is continuous, then also $\lvert f \rvert$ is continuous and must attain a maximum. Thus $f$ is bounded. – Paul Frost Jul 25 '18 at 18:53

H1 $\Longrightarrow (X$ is compact).

Suppose $X$ is not compact. Then there is a sequence $x_n \in X$ with no subsequence that converges in $X$. (For a metric space, "compact" and "sequentially compact" are equivalent.) Taking a subsequence, we may assume WLOG that all $x_n$ are distinct. The set $E= \{x_n : n \in \mathbb N\}$ is closed in $X$. The set $E$ has the discrete topology. The unbounded function $x_n \mapsto n$ is therefore continuous on $E$. A continuous real-valued function on a closed subset of a metric space extends to a continuous real-valued function on the whole space. That will be an unbounded continuous function on $X$.

As noted, H2 $\Longrightarrow$ H1 is easy, so we also get H2 $\Longrightarrow (X$ is compact).

[I would guess this was known for metric spaces long before Hewitt's great paper in 1948; and the substance of Hewitt's paper was exploring what happens in non-meric spaces.]

• I agree with your guess concerning metric spaces. In fact, proofs are fairly simple in this case. However, Hewitt identified pseudocompactness as a property interesting in its own right and clarified its status among the large variety of compactness concepts. – Paul Frost Jul 26 '18 at 14:18