0
$\begingroup$

Let $I\in R$ be a nonemplty set. Show that $I$ is an interval iff any continuous function $f:I\rightarrow \{0,1\}$ is constant.

I've no idea how to handle this problem. Thanks in advance to anyone who comes up with a step - solution.

PS: I've asked a similar problem to this, but the community pointed out that the "problem" consisted of a contradiction. Indeed, due to my mistake, the question was asked wrongfully. Thanks to the people who pointed that out!

  • 0
    For reference, the mis-asked question is [this one](http://math.stackexchange.com/questions/2124836/show-that-i-is-an-interval-iff-any-function-fi-rightarrow-0-1-is-contin).2017-02-02

2 Answers 2

1

If $I$ is an interval, any $f: I \to \{0,1\}$ must be constant, since IVT tells us that if $f(a)=0<1=f(b)\implies f(c)=1/2$ for $c \in (a,b)$. This is a contradiction.

On the other hand, suppose that every continuous $f:I \to \{0,1\}$ is constant. If $I$ is disconnected, there exist nonempty disjoint open sets $A,B$ so that $A \cup B=I$. But then just set $f(A)=0$ and $f(B)=1$. This function will be continuous, a contradiction.

  • 0
    May I ask what a "disconnected" interval is? Also, what theorem is IVT?2017-02-02
1

Sketch of proof:

First, suppose that $I$ is an interval. Use the intermediate value theorem to show that if $f$ is continuous, it must be constant.

Now, suppose that $I$ isn't an interval. Then $I$ is the union of at least two disjoint intervals (whose closures don't intersect). Define $f$ to be $0$ on one of these pieces and $1$ on the other. Why can the resulting $f$ be continuous?

Alternatively: if $I$ isn't an interval, it contains $a b \end{cases} $$ why is this function continuous?