# Conway base 13 function

The Conway base 13 function is a function created by British mathematician John H. Conway as a counterexample to the converse of the intermediate value theorem. In other words, even though Conway's function f is not continuous, if f(a) < f(b) and an arbitrary value x is chosen such that f(a) < x < f(b), a point c lying between a and b can always be found such that f(c) = x. In fact, this function is even stronger than this: it takes on every real value in each interval on the real line.

## The Conway base 13 function

### Purpose

The Conway base 13 function was created as part of a "produce" activity: in this case, the challenge was to produce a simple-to-understand function which takes on every real value in every interval, that is, it is an everywhere surjective function. It is thus discontinuous at every point.

### Definition

The Conway base 13 function is a function $f:\mathbb {R} \to \mathbb {R}$ defined as follows. Write the argument $x$ value as a tridecimal (a "decimal" in base 13) using 13 symbols as 'digits': 0, 1, ..., 9, A, B, C; there should be no trailing C recurring. There may be a leading sign, and somewhere there will be a tridecimal point to separate the integer part from the fractional part; these should both be ignored in the sequel. These "digits" can be thought of as having the values 0 to 12, respectively; Conway originally used the digits "+", "-" and "." instead of A, B, C, and underlined all of the base 13 'digits' to clearly distinguish them from the usual base 10 digits and symbols.

• If from some point onwards, the tridecimal expansion of $x$ is of the form $Ax_{1}x_{2}\dots x_{n}Cy_{1}y_{2}\dots$ where all the digits $x_{i}$ and $y_{j}$ are in $\{0,\dots ,9\}$ , then $f(x)=x_{1}\dots x_{n}.y_{1}y_{2}\dots$ in usual base 10 notation.
• Similarly, if the tridecimal expansion of $x$ ends with $Bx_{1}x_{2}\dots x_{n}Cy_{1}y_{2}\dots$ , then $f(x)=-x_{1}\dots x_{n}.y_{1}y_{2}\dots$ .
• Otherwise, $f(x)=0$ .

For example,

$f(12345A3C14.159\dots _{13})=f(A3.C14159\dots _{13})=3.14159\dots$ ,
$f(B1C234_{13})=-1.234$ ,
and $f(1C234A567_{13})=0$ .

### Properties

The function $f$ defined in this way satisfies the conclusion of the intermediate value theorem but is continuous nowhere. That is, on any closed interval $[a,b]$ of the real line, $f$ takes on every value between $f(a)$ and $f(b)$ . More strongly, $f$ takes as its value every real number somewhere within every open interval $(a,b)$ .

To prove this, let $c\in (a,b)$ and $r$ be any real number. Then $c$ can have the tail end of its tridecimal representation modified to be either $Ar$ or $Br$ depending on the sign of $r$ (replacing the decimal dot with a $C$ ), giving a new number $c'$ . By introducing this modification sufficiently far along the tridecimal representation of $c$ , the new number $c'$ will still lie in the interval $(a,b)$ and will satisfy $f(c')=r$ .

Thus $f$ satisfies a property stronger than the conclusion of the intermediate value theorem. Moreover, if $f$ were continuous at some point, $f$ would be locally bounded at this point, which is not the case. Thus $f$ is a spectacular counterexample to the converse of the intermediate value theorem.