Equivalence of Definitions of Continuous Mapping between Topological Spaces/Everywhere

Theorem
Let $T_1 = \left({S_1, \tau_1}\right)$ and $T_2 = \left({S_2, \tau_2}\right)$ be topological spaces.

Let $f: S_1 \to S_2$ be a mapping from $S_1$ to $S_2$.

Definition by Open Sets
Let $\left({A_1, \tau_1}\right)$ and $\left({A_2, \tau_2}\right)$ be topological spaces.

Let $f: A_1 \to A_2$ be a mapping.

Then $f$ is $\left({\tau_1, \tau_2}\right)$-continuous at every point in $A_1$ iff:
 * $U \in \tau_2 \implies f^{-1} \left({U}\right) \in \tau_1$

where $f^{-1} \left({U}\right)$ denotes the preimage of $U$ under $f$.

Sufficient Condition
Suppose that:
 * $U \in \tau_2 \implies f^{-1} \left({U}\right) \in \tau_1$

Let $x \in A_1$.

Let $N \subseteq A_2$ be a neighborhood of $f \left({x}\right)$.

By the definition of a neighborhood, there exists a $U \in \tau_2$ such that $U \subseteq N$.

Now, $f^{-1} \left({U}\right)$ is a neighborhood of $x$.

Then $f \left({ f^{-1} \left({U}\right) }\right) = U \subseteq N$, as desired.

Necessary Condition
Now, suppose that $f$ is continuous at every point in $A_1$.

We wish to show that:
 * $U \in \tau_2 \implies f^{-1} \left({U}\right) \in \tau_1$

So, let $U \in \tau_2$.

Assume that $f^{-1} \left({U}\right)$ is non-empty, otherwise $f^{-1} \left({U}\right) = \varnothing \in \tau_1$ by Empty Set is Element of Topology.

Let $x \in f^{-1} \left({U}\right)$.

By the definition of continuity at a point, there exists a neighborhood $N$ of $x$ such that $f \left({N}\right) \subseteq U$.

By the definition of a neighborhood, there exists a $X \in \tau_1$ such that $x \in X \subseteq N$.

This gives $f \left({X}\right) \subseteq f \left({N}\right) \subseteq U$.

Let $\mathcal C = \left\{ {X \in \tau_1 : f \left({X}\right) \subseteq U} \right\}$.

Let $\displaystyle S = \bigcup \mathcal C$.

From the above argument, $f^{-1} \left({U}\right) \subseteq S$.

It follows directly from the definition of $S$ (and the definition of $\mathcal C$) that $S \subseteq f^{-1} \left({U}\right)$.

Hence $S = f^{-1} \left({U}\right)$.

By definition, $S$ is the union of open sets (of $A_1$). Hence $S$ is open by the definition of a topology.