# Disproving a function is a step function.

The function $f:[0,1] \to \mathbb{R}$ where $f(x) := 0$ if$x \notin \mathbb{Q}$ and $f(p/q) : = \frac{1}{q} , q > 0, p,q$ coprime. How would you show that this is not a step function? Thanks!

-
How do you define "step function"? –  martini Mar 22 '12 at 13:05
Is $f$ constant on any interval? Does $f$ take on only finitely many values? –  David Mitra Mar 22 '12 at 13:07
@DavidMitra Ahh sorry, I thought of a simple function. –  AD. Mar 22 '12 at 13:12
add comment

## 1 Answer

This is known as Thomae's function. It is discontinuous at every rational number, and so is not continuous on any nontrivial interval -- which ought to contradict whatever definition of "step function" you're working with.

-
add comment