Let $g$ be defined on $\mathbb R$ by $g(1):=0$, and $g(x):=2$ if $x \neq 1$, and let $f(x):=x + 1$ for all $x\in \mathbb R$. Show that $\lim_{x\to 0}g \circ f \neq g( f(0))$. Why doesn’t this contradict Theorem 5.2.6?
5.2.6 Theorem Let $A, B \subset \mathbb R$ and let $f : A \to \mathbb R$ and $g : B \to \mathbb R$ be functions such that
$f (A) \subset B$. If $f$ is continuous at a point $c\in A$ and $g$ is continuous at $b=f(c)\in B$, then the
composition $g \circ f : A \to \mathbb R$ is continuous at $c$.