Continuity Test for Real-Valued Functions

Theorem
Let $\struct{S, \tau}$ be a topological space.

Let $f: S \to \R$ be a real-valued function.

Let $x \in S$.

Then $f$ is continuous at $x$ :
 * $\forall \epsilon \in \R_{>0} : \exists U \in \tau : x \in U : \map {f^\to} U \subseteq \openint {\map f x - \epsilon} {\map f x + \epsilon}$

Necessary Condition
Let $f$ be continuous at $x$.

Then by definition:
 * For every neighborhood $N$ of $\map f x$ in $\R$, there exists a neighborhood $M$ of $x$ in $S$ such that $\map {f^\to} M \subseteq N$.

From:
 * Open Ball in Real Number Line is Open Interval
 * Open Ball is Open Set
 * Set is Open iff Neighborhood of all its Points

then:
 * For every $\epsilon \in \R_{>0}$, there exists a neighborhood $M$ of $x$ in $S$ such that $\map {f^\to} M \subseteq \openint {\map f x - \epsilon} {\map f x + \epsilon}$

By definition of a neighborhood in $\struct{S, \tau}$:
 * for all neighborhoods $M$ there exists $U \in \tau$ such that $z \in U \subseteq M$

Thus


 * For every $\epsilon \in \R_{>0}$, there exists $U \in \tau$ with $x \in U$ such that $\map {f^\to} U \subseteq \openint {\map f x - \epsilon} {\map f x + \epsilon}$

Sufficient Condition
Let $f$ satisfy:
 * $\forall \epsilon \in \R_{>0} : \exists U \in \tau : x \in U : \map {f^\to} U \subseteq \openint {\map f x - \epsilon} {\map f x + \epsilon}$

Let $N$ be a neighborhood of $\map f x$.