avewright/proofwiki-math huggingface dataset:
Theorem: Equivalence of Definitions of Everywhere Dense

{{TFAE|def = Everywhere Dense}}
Let $T = \struct {S, \tau}$ be a topological space.
Let $H \subseteq S$ be a subset.

Proof:
=== $(1)$ implies $(2)$ ===
Let $H$ be a subset of $S$ which is everywhere dense in $T$ by definition $1$.
Then by definition:
:$H^- = S$
where $H^-$ is the closure of $H$.
{{AimForCont}} there exists $U \in \tau$ such that $U \cap H = \O$.
Let $x \in S$ such that $x \in U$.
Thus $U$ is an open set of $T$ which does not contain an element of $H$ which is distinct from $x$.
Indeed, $U$ is an open set of $T$ which does not contain any elements of $H$ at all.
Hence, by definition, $x$ is not a limit point of $H$.
By definition, the closure of $H$ is the union of $H$ with its limit points.
But $x$ is not in $H$, nor is it a limit point of $H$.
That is:
:$x \notin H^-$
So $H^- \ne S$.
But this contradicts our definition of everywhere dense in $T$ by definition $1$.
Hence our assertion that there exists $U \in \tau$ such that $U \cap H = \O$ must be false.
So, by Proof by Contradiction:
:$\forall U \in \tau: H \cap U \ne \O$
Thus $H$ is a subset of $S$ which is everywhere dense in $T$ by definition $2$.
{{qed|lemma}}
Theorem: Closure of Open Ball may not equal Closed Ball of Same Radius

Let $M = \struct {A, d}$ be a metric space.
Let $x \in A$.
Let $\map {B_\epsilon} x$ be the open $\epsilon$-ball of $x$ of radius $\epsilon$ for some $\epsilon \in \R_{>0}$.
Let $\map { {B_\epsilon}^-} x$ be the closed $\epsilon$-ball of $x$ of radius $\epsilon$.
Then it is not necessarily the case that:
:$\map \cl {\map {B_\epsilon} x} = \map { {B_\epsilon}^-} x$
where $\cl$ denotes closure.

Proof:
Proof by Counterexample:
Let $M = \struct {A, d}$ be the standard discrete metric space on a set $A$.
From Closure of Open $1$-Ball in Standard Discrete Metric Space we have that:
:$\map \cl {\map {B_1} x} = \set x$
but:
{{begin-eqn}}
{{eqn | l = \map { {B_1}^-} x
      | r = \set {y \in A: \map d {x, y} \le 1}
      | c = {{Defof|Closed Ball of Metric Space}}
}}
{{eqn | r = A
      | c = 
}}
{{end-eqn}}
Hence the result.
{{qed}}
Theorem: Set in Standard Discrete Metric Space has no Limit Points

Let $M = \struct {S, d}$ be the standard discrete metric space on a set $A$.
Let $H \subseteq S$ be a subset of $S$.
Then $H$ has no limit points.

Proof:
By definition of the standard discrete metric:
:$\map d {x, y} = \begin {cases} 0 & : x = y \\ 1 & : x \ne y \end {cases}$
Let $\alpha \in S$.
By definition, $\alpha$ is a limit point of $H$ {{iff}} ''every'' deleted $\epsilon$-neighborhood $\map {B_\epsilon} \alpha \setminus \set \alpha$ of $\alpha$ contains a point in $A$:
:$\forall \epsilon \in \R_{>0}: \paren {\map {B_\epsilon} \alpha \setminus \set \alpha} \cap H \ne \O$
Let $\map {B_1} \alpha$ be the open $1$-ball of $\alpha$ in $M$.
Thus:
{{begin-eqn}}
{{eqn | l = \map {B_1} \alpha
      | r = \set {y \in S: \map d {\alpha, y} < 1}
      | c = 
}}
{{eqn | r = \set \alpha
      | c = 
}}
{{eqn | ll= \leadsto
      | l = \map {B_1} \alpha \setminus \set \alpha
      | r = \O
      | c = 
}}
{{eqn | ll= \leadsto
      | l = \paren {\map {B_1} \alpha \setminus \set \alpha} \cap H
      | r = \O
      | c = Intersection with Empty Set
}}
{{end-eqn}}
So there exists a deleted $\epsilon$-neighborhood $\map {B_\epsilon} \alpha \setminus \set \alpha$ of $\alpha$ containing no points of $H$.
Hence $\alpha$ is not a limit point of $H$
As $\alpha$ is arbitrary, the result follows.
{{qed}}
Category:Standard Discrete Metric
Category:Examples of Limit Points
bs5du9yjzjaqh199km9zvty90kvp9fv
Theorem: Closure of Open 1-Ball in Standard Discrete Metric Space

Let $M = \struct {A, d}$ be the standard discrete metric space on a set $A$.
Let $x \in A$.
Let $\map {B_1} x$ be the open $1$-ball of $x$ in $M$.
Then:
:$\map \cl {\map {B_1} x} = \set x$
while:
:$\set {y \in A: \map d {x, y} \le 1} = A$

Proof:
By definition of the standard discrete metric:
:$\map d {x, y} = \begin {cases}
0 & : x = y  \\ 
1 & : x \ne y
\end {cases}$
That is:
:$\forall \tuple {x, y} \in A: \map d {x, y} \le 1$
Thus:
:$\set {y \in A: \map d {x, y} \le 1} = A$
From Open Ball in Standard Discrete Metric Space:
:$\map {B_1} x = \set x$
Let $y \in A: y \ne x$.
By definition of closure:
:$\map \cl {\map {B_1} x} = \paren {\map {B_1} x}^i \cup \paren {\map {B_1} x}'$
where:
:$\paren {\map {B_1} x}^i$ denotes the set of isolated points of $\map {B_1} x$
:$\paren {\map {B_1} x}'$ denotes the set of limit points of $\map {B_1} x$.
But:
:from Point in Standard Discrete Metric Space is Isolated, all points in $\map {B_1} x$ are isolated:
::$\paren {\map {B_1} x}^i = \map {B_1} x$
:from Set in Standard Discrete Metric Space has no Limit Points, $\map {B_1} x$ has no limit points:
::$\paren {\map {B_1} x}' = \O$
Hence:
{{begin-eqn}}
{{eqn | l = \map \cl {\map {B_1} x}
      | r = \map {B_1} x \cup \O
      | c = 
}}
{{eqn | r = \map {B_1} x
      | c = Union with Empty Set
}}
{{eqn | r = \set x
      | c = 
}}
{{end-eqn}}
{{qed}}
Theorem: Point in Standard Discrete Metric Space is Isolated

Let $M = \struct {S, d}$ be the standard discrete metric space on a set $A$.
Let $H \subseteq S$ be a subset of $S$.
Let $\alpha \in H$.
The $\alpha$ is an isolated point of $H$.

Proof:
By definition of the standard discrete metric:
:$\map d {x, y} = \begin {cases} 0 & : x = y  \\ 1 & : x \ne y \end {cases}$
Let $\alpha \in H$.
Let $\map {B_1} \alpha$ be the open $1$-ball of $\alpha$ in $M$.
Thus:
{{begin-eqn}}
{{eqn | l = \map {B_1} \alpha \cap H
      | r = \set {y \in H: \map d {\alpha, y} < 1}
      | c = 
}}
{{eqn | r = \set \alpha
      | c = 
}}
{{end-eqn}}
Hence the result by definition of isolated point.
{{qed}}
Category:Standard Discrete Metric
Category:Isolated Points
cpqd4l5gjdhx6atdzd43ftlh3l61jva
Theorem: Interior of Set of Rational Numbers in Real Numbers is Empty

Let $\struct {\R, \tau_d}$ be the real number line with the usual (Euclidean) topology.
Let $\Q$ be the subspace of rational numbers.
Then the interior of $\Q$ in $\R$ is the empty set $\O$.

Proof:
Consider the set of set of irrational numbers $\R \setminus \Q$.
By definition:
:$\R \setminus \Q = \relcomp \R \Q$
where $\relcomp \R \Q$ denotes the relative complement of $\Q$ in $\R$.
We have that Irrationals are Everywhere Dense in Reals.
Hence by definition of everywhere dense, the closure of $\R \setminus \Q$ in $\R$ is $\R$ itself.
By Relative Complement with Self is Empty Set:
:$\relcomp \R \R = \O$
The result follows from Interior equals Complement of Closure of Complement.
{{qed}}
Theorem: Equivalence of Definitions of Nowhere Dense

Let $T = \struct {S, \tau}$ be a topological space.
Let $H \subseteq S$.
{{TFAE|def = Nowhere Dense}}

Proof:
=== $(1)$ implies $(2)$ ===
Let $H$ be nowhere dense in $T$ by definition $1$.
Then by definition:
:$\paren {H^-}^\circ = \O$
Hence by definition of interior:
:the union of all subsets of $H$ which are open in $T$.
But this union is empty.
Hence all subsets of $H$ which are open in $T$ must themselves be empty.
Thus $H$ is nowhere dense in $T$ by definition $2$.
{{qed|lemma}}
Theorem: Exponential Distribution in terms of Beta Distribution

Let $\sequence {X_n}$ be a sequence of independent random variables with:
:$X_n \sim \BetaDist 1 n$
for each natural number $n$, where $\BetaDist 1 n$ denotes the beta distribution with parameters $1$ and $n$. 
Then: 
:$n X_n \xrightarrow d X$
with:
:$X \sim \Exponential 1$
where: 
:$\Exponential 1$ denotes the exponential distribution with parameter $1$,
:$\xrightarrow d$ denotes convergence in distribution.

Proof:
We aim to show that for each real $x > 0$, we have: 
:$\ds \lim_{n \mathop \to \infty} \map \Pr {X_n \le x} = \map \Pr {X \le x}$
From the definition of the exponential distribution, we have: 
:$\map \Pr {X \le x} = 1 - e^{-x}$
Note that, from the definition of the beta distribution:
:$0 \le X_n \le 1$
So, if $n \le x$, we have: 
:$\map \Pr {X_n \le x} = 1$
Take $n \ge x$. 
Then, we have: 
{{begin-eqn}}
{{eqn	| l = \map \Pr {n X_n \le x}
	| r = \map \Pr {X_n \le \frac x n}
}}
{{eqn	| r = \int_0^{\frac x n} \frac {t^{1 - 1} \paren {1 - t}^{n - 1} } {\map \Beta {1, n} } \rd t
	| c = {{Defof|Beta Distribution}}
}}
{{eqn	| r = \int_0^{\frac x n} \frac {\paren {1 - t}^{n - 1} } {\frac {\map \Gamma 1 \map \Gamma n} {\map \Gamma {n + 1} } } \rd t
	| c = {{Defof|Beta Function/Definition 3|Beta Function}}
}}
{{eqn	| r = \int_0^{\frac x n} \frac {\paren {1 - t}^{n - 1} } {\frac {\map \Gamma n} {n \map \Gamma n} } \rd t
	| c = Gamma Difference Equation
}}
{{eqn	| r = \int_0^{\frac x n} n \paren {1 - t}^{n - 1} \rd t
}}
{{eqn	| r = \intlimits {-\paren {1 - t}^n} 0 {\frac x n}
	| c = Primitive of Power
}}
{{eqn	| r = 1 - \paren {1 - \frac x n}^n
}}
{{end-eqn}}
From the definition of the exponential function as a sequence, we have:
:$\ds \lim_{n \mathop \to \infty} \paren {1 - \frac x n}^n = e^{-x}$
so:
:$\ds \lim_{n \mathop \to \infty} \paren {1 - \paren {1 - \frac x n}^n} = 1 - e^{-x} = \map \Pr {X \le x}$
That is: 
:$\ds \lim_{n \mathop \to \infty} \map \Pr {X_n \le x} = \map \Pr {X \le x}$
as required.
{{qed}}
Category:Exponential Distribution
Category:Beta Distribution
m7qgxfofcwb9bt4t73h66funaekihxa
Theorem: Topologies on Doubleton

Let $S = \set {a, b}$ be a doubleton.
Then there exist $4$ possible different topologies on $S$:
{{begin-eqn}}
{{eqn | l = \tau_a
      | r = \set {\O, \set {a, b} }
      | c = Indiscrete topology on doubleton
}}
{{eqn | l = \tau_b
      | r = \set {\O, \set a, \set {a, b} }
      | c = Sierpiński topology
}}
{{eqn | l = \tau_c
      | r = \set {\O, \set b, \set {a, b} }
      | c = Sierpiński topology
}}
{{eqn | l = \tau_d
      | r = \set {\O, \set a, \set b, \set {a, b} }
      | c = Discrete topology on doubleton
}}
{{end-eqn}}

Proof:
The power set of $S$ is the set:
:$\powerset S = \set {\O, \set a, \set b, \set {a, b} }$
Because all topologies on $S$ are subsets of $\powerset S$, one of the following must hold:
{{begin-eqn}}
{{eqn | l = \tau_1
      | r = \O
      | c = 
}}
{{eqn | l = \tau_2
      | r = \set \O
      | c = 
}}
{{eqn | l = \tau_3
      | r = \set {\set a}
      | c = 
}}
{{eqn | l = \tau_4
      | r = \set {\set b}
      | c = 
}}
{{eqn | l = \tau_5
      | r = \set {\O, \set a}
      | c = 
}}
{{eqn | l = \tau_6
      | r = \set {\O, \set b}
      | c = 
}}
{{eqn | l = \tau_7
      | r = \set {\set a, \set b}
      | c = 
}}
{{eqn | l = \tau_8
      | r = \set {\O, \set a, \set b}
      | c = 
}}
{{eqn | l = \tau_9
      | r = \set {\set a, \set {a, b} }
      | c = 
}}
{{eqn | l = \tau_{10}
      | r = \set {\set b, \set {a, b} }
      | c = 
}}
{{eqn | l = \tau_{11}
      | r = \set {\set a, \set b, \set {a, b} }
      | c = 
}}
{{eqn | l = \tau_{12}
      | r = \set {\set {a, b} }
      | c = 
}}
{{eqn | l = \tau_{13}
      | r = \set {\O, \set {a, b} }
      | c = 
}}
{{eqn | l = \tau_{14}
      | r = \set {\O, \set a, \set {a, b} }
      | c = 
}}
{{eqn | l = \tau_{15}
      | r = \set {\O, \set b, \set {a, b} }
      | c = 
}}
{{eqn | l = \tau_{16}
      | r = \set {\O, \set a, \set b, \set {a, b} }
      | c = 
}}
{{end-eqn}}
By definition of a topology, $S$ itself must be an element of the topology.
Thus $\tau_1$ up to $\tau_8$ are not topologies on $S$. 
By Empty Set is Element of Topology, for $\tau$ to be a topology for $S$, it is necessary that $\O \in \tau$. 
Therefore $\tau_9$ up to $\tau_{12}$ are also not topologies on $S$.
By Indiscrete Topology is Topology, $\tau_{13}$ is a topology on $S$.
By Discrete Topology is Topology, $\tau_{16}$ is a topology on $S$.
It is then seen by inspection that $\tau_{14}$ and $\tau_{15}$ are particular point topologies
Indeed, they are Sierpiński topologies.
By Particular Point Topology is Topology, both $\tau_{14}$ and $\tau_{15}$ are topologies.
Hence the result.
The topologies can be assigned arbitrary labels.
{{qed}}
Theorem: Topologies on Set with 3 Elements

Let $S = \set {a, b, c}$ be a set with $3$ elements.
Then there exist $29$ possible different topologies on $S$.

Proof:
The power set of $S$ is the set:
:$\powerset S = \set {\O, \set a, \set b, \set c, \set {a, b}, \set {a, c}, \set {b, c}, \set {a, b, c} }$
A topology on $S$ is a subset of $\powerset S$.
Thus the set of all topologies on $S$ is a subset of the power set of $\powerset S$.
From Cardinality of Power Set of Finite Set:
:$\card {\powerset {\powerset S} } = 256$
Half of the subsets of $\powerset {\powerset S}$ do not contain $\O$ and so are not topologies on $S$.
Half of the remaining subsets of $\powerset {\powerset S}$ do not contain $S$ itself, and so are also not topologies on $S$.
We are left with $64$ subsets of $\powerset {\powerset S}$ to investigate.
In the following, they will be numbered arbitrarily.
First we have the discrete topology and indiscrete topology on $S$:
{{begin-eqn}}
{{eqn | l = \tau_1
      | r = \set {\O, S}
}}
{{eqn | l = \tau_2
      | r = \set {\O, \set a, \set b, \set c, \set {a, b}, \set {a, c}, \set {b, c}, S}
}}
{{end-eqn}}
{{qed|lemma}}
From here, we investigate topologies according to the number of its singletons.
Before doing that, note that a topology on $S$ with either $3$ singletons or $3$ doubletons is the discrete topology.
Hence in the below we need only investigate topologies with $0$, $1$ and $2$ singletons and doubletons.
Theorem: Mapping from Unit Circle defines Periodic Function

Let $\SS$ denote the unit circle whose center is at the origin of the Cartesian plane $\R^2$.
Let $p: \R \to \SS$ be the mapping defined as:
:$\forall x \in \R: \map p x = \tuple {\cos x, \sin x}$
Let $f': \SS \to \R$ be a real-valued function.
Then the composition $f' \circ p$ defines a periodic real function whose period is $2 \pi$.

Proof:
Let $f := f' \circ p$ denote the composition of $f$ with $p$.
We have:
{{begin-eqn}}
{{eqn | q = \forall x \in \R
      | l = \map f {x + 2 \pi}
      | r = \map {f'} {\map p {x + 2 \pi} }
      | c = {{Defof|Composition of Mappings}}
}}
{{eqn | r = \map {f'} {\map \cos {x + 2 \pi}, \map \sin {x + 2 \pi} }
      | c = Definition of $p$
}}
{{eqn | r = \map {f'} {\cos x, \sin x}
      | c = Cosine of Angle plus Full Angle, Sine of Angle plus Full Angle
}}
{{eqn | r = \map {f'} {\map p x}
      | c = Definition of $p$
}}
{{eqn | r = \map f x
      | c = {{Defof|Composition of Mappings}}
}}
{{end-eqn}}
Hence the result.
{{qed}}
Theorem: Periodic Function as Mapping from Unit Circle

Let $\SS$ denote the unit circle whose center is at the origin of the Cartesian plane $\R^2$.
Let $p: \R \to \SS$ be the mapping defined as:
:$\forall x \in \R: \map p x = \tuple {\cos x, \sin x}$
Let $f: \R \to \R$ be a periodic real function whose period is $2 \pi$.
Then there exists a well-defined real-valued function $f': \SS \to \R$ such that:
:$f = f' \circ p$
where $f' \circ p$ denotes the composition of $f'$ with $p$.

Proof:
Let $f': \SS \to \R$ be defined as:
:$\forall \tuple {x, y} \in \SS: \map {f'} {x, y} = \map f x$
Consider the inverse $p^{-1}: \SS \to \R$ of $p$:
:$\forall \tuple {x', y'} \in \SS: p^{-1} \sqbrk {x', y'} = \set {x \in \R: \cos x = x', \sin x = y'}$
Let $\RR$ be the equivalence relation on $\R$ induced by $p$:
:$\forall \tuple {x, y} \in \R \times \R: \tuple {x, y} \in \RR \iff \map p x = \map p y$
That is:
{{begin-eqn}}
{{eqn | q = \forall \tuple {x, y} \in \R \times \R
      | l = \tuple {x, y} \in \RR
      | o = \iff
      | r = \map p x = \map p y
      | c = 
}}
{{eqn | ll= \leadsto
      | l = \tuple {x, y} \in \RR
      | o = \iff
      | r = \tuple {\cos x, \sin x} = \tuple {\cos y, \sin y}
      | c = 
}}
{{eqn | ll= \leadsto
      | l = \tuple {x, y} \in \RR
      | o = \iff
      | r = x = y + 2 k \pi
      | c = 
}}
{{end-eqn}}
Let $f'$ be defined as:
:$f' = f \circ p^{-1}$
Then by the Quotient Theorem for Sets:
:$f'$ is well-defined {{iff}} $f$ is periodic with period $2 \pi$.
It follows from Conditions for Commutative Diagram on Quotient Mappings between Mappings that $f$ and $f'$ are related by the commutative diagram:
::<nowiki>$\begin{xy} \xymatrix@L+2mu@+1em{
 \R \ar[r]^*{p}
     \ar@{-->}[rd]_*{f := f' \circ p}
&
 \SS \ar[d]^*{f'}
\\ &
 \R
}\end{xy}$</nowiki>
{{qed}}
Theorem: Periodic Function is Continuous iff Mapping from Unit Circle is Continuous

Let $f: \R \to \R$ be a periodic real function whose period is $2 \pi$.
Let $\SS$ denote the unit circle whose center is at the origin of the Cartesian plane $\R^2$.
Let $p: \R \to \SS$ be the mapping defined as:
:$\forall x \in \R: \map p x = \tuple {\cos x, \sin x}$
Let $f': \SS \to \R$ be the well-defined real-valued function such that:
:$f = f' \circ p$
where $f' \circ p$ denotes the composition of $f'$ with $p$.
Then $f$ is continuous {{iff}} $f'$ is continuous.

Proof:
The existence and well-definedness of $f'$ are demonstrated in Periodic Function as Mapping from Unit Circle.
Theorem: Set of 2-Dimensional Indefinite Real Orthogonal Matrices is not Compact in Normed Real Square Matrix Vector Space

Let $\struct {\R^{2 \times2}, \norm {\, \cdot \,}_\infty}$ be the normed real matrix vector space.
Let $\map O {1, 1} := \set {\mathbf R \in \R^{2 \times2} : \mathbf R^\intercal \mathbf J_{1,1} \mathbf R = \mathbf J_{1,1}}$ be the indefinite orthogonal group of degree $\paren {1, 1}$ over real numbers where:
:<nowiki>$\mathbf J_{1, 1} := \begin{bmatrix}
1 & 0\\
0 & -1 \\
\end{bmatrix}$</nowiki>
Then $\map O {1, 1}$ is not a compact set in $\struct {\R^{2 \times 2}, \norm {\, \cdot \,}_\infty}$.

Proof:
Let:
:<nowiki>$\begin{bmatrix}
\map \cosh t& \map \sinh t\\
\map \sinh t & \map \cosh t \\
\end{bmatrix} := \map {\mathbf R} t$</nowiki>
We have that:
{{begin-eqn}}
{{eqn | l = \map {\mathbf R^\intercal} t \mathbf J_{1,1} \map {\mathbf R} t
      | r = <nowiki>\begin{bmatrix}
\map \cosh t & \map \sinh t \\
\map \sinh t & \map \cosh t \\
\end{bmatrix}
\begin{bmatrix}
1 & 0 \\
0 & -1 \\
\end{bmatrix} 
\begin{bmatrix}
\map \cosh t & \map \sinh t \\
\map \sinh t & \map \cosh t \\
\end{bmatrix}</nowiki>
}}
{{eqn | r = <nowiki>\begin{bmatrix}
\map {\cosh^2} t - \map {\sinh^2} t& 0 \\
0 & \map {\sinh^2} t - \map {\cosh^2} t \\
\end{bmatrix}</nowiki>
}}
{{eqn | r = <nowiki>\begin{bmatrix}
1 & 0 \\
0 & -1 \\
\end{bmatrix}</nowiki>
      | c = Difference of Squares of Hyperbolic Cosine and Sine
}}
{{end-eqn}}
Hence, $\map {\mathbf R} t \in \map O {1, 1}$.
From difference of squares of hyperbolic cosine and sine:
{{begin-eqn}}
{{eqn | l = \size {\map \cosh t}
      | r = \sqrt {\map {\sinh^2} t + 1}
}}
{{eqn | o = >
      | r = \size {\map \sinh t}
}}
{{end-eqn}}
The set of matrix elements constitutes a finite subset of the set of real numbers which is ordered.
By Finite Non-Empty Subset of Ordered Set has Maximal and Minimal Elements, there is a maximal element.
Consider the supremum norm of $\map {\mathbf R} t$:
{{begin-eqn}}
{{eqn | l = \norm {\map {\mathbf R} t}_\infty
      | r = <nowiki>\max_{
            \begin {split}
               & 1 \mathop \le i \mathop \le 2\\
               & 1 \mathop \le j \mathop \le 2
            \end {split} }
            \size {\map {r_{i j} } t}</nowiki>
      | c = {{defof|Supremum Norm}}
}}
{{eqn | r = \size {\map \cosh t}
}}
{{end-eqn}}
Furthermore:
:$\ds \lim_{t \mathop \to \infty} \map \cosh t = \infty$
Hence, $\map O {1, 1}$ is not bounded.
By the Heine-Borel theorem, $\map O {1, 1}$ is not compact in $\struct {\R^{2 \times 2}, \norm {\, \cdot \,}_\infty}$.
{{qed}}
Theorem: Real-Valued Mapping is Continuous if Inverse Images of Unbounded Open Intervals are Open

Let $T = \struct {S, \tau}$ be a topological space.
Let the real number line $\R$ be considered as a topology under the usual (Euclidean) topology.
Let $f: T \to \R$ be a real-valued function on $T$.
Then:
:$f$ is continuous
{{iff}}:
:for all $a \in \R$: $f^{-1} \openint \gets a$ and $f^{-1} \openint a \to$ are open in $T$.

Proof:
=== Sufficient Condition ===
Let $f$ be a continuous mapping.
From {{Corollary|Open Real Interval is Open Set}}, both $\openint \gets a$ and $\openint a \to$ are open in $\R$.
Then by definition of continuous mapping, $f^{-1} \openint \gets a$ and $f^{-1} \openint a \to$ are both open in $T$.
{{qed|lemma}}
=== Necessary Condition ===
Let $f$ be such that:
:for all $a \in \R$: $f^{-1} \openint \gets a$ and $f^{-1} \openint a \to$ are open in $T$.
Let $a, b \in \R$ be arbitrary.
From Sub-Basis for Real Number Line:
:$\set {\openint \gets a, \openint b \to: a, b \in \R}$ is a sub-basis for $\R$.
Hence:
:$\forall a, b \in \R: \openint \gets a \cap \openint b \to$ is open in $T$.
Let $A = \openint \gets a$ and $B = \openint b \to$.
From Preimage of Intersection under Mapping:
:$f^{-1} \sqbrk {A \cap B} = f^{-1} \sqbrk A \cap f^{-1} \sqbrk B$
We have been given that $T$ is a topological space.
By assertion:
:$f^{-1} \sqbrk A$ and $f^{-1} \sqbrk B$ are open in $T$.
Then:
:$f^{-1} \sqbrk A \cap f^{-1} \sqbrk B$ is open in $T$.
That is:
:$f^{-1} \sqbrk {A \cap B}$ is open in $T$.
But:
:$A \cap B = \openint a b$
Hence:
:$f^{-1} \openint a b$ is open in $T$.
$a$ and $b$ are arbitrary.
Hence the preimage of an open real interval is open in $T$.
Let $\family {U_i}_{i \mathop \in I}$ be a family of open intervals of $\R$.
Then from Preimage of Union under Mapping: Family of Sets:
:$\ds f^{-1} \sqbrk {\bigcup_{i \mathop \in I} U_i} = \bigcup_{i \mathop \in I} f^{-1} \sqbrk {U_i}$
where:
:$\ds \bigcup_{i \mathop \in I} U_i$ denotes the union of $\family {U_i}_{i \mathop \in I}$
:$f^{-1} \sqbrk {U_i}$ denotes the preimage of $U_i$ under $f$.
Each of $U_i$ is an open interval in $\R$.
Hence from above each of $f^{-1} \sqbrk {U_i}$ is open in $T$.
As $T$ is a topological space:
:$\ds f^{-1} \sqbrk {\bigcup_{i \mathop \in I} U_i}$ is open in $T$.
From Open Sets in Real Number Line, the  open sets of $\R$ are:
:open intervals
:countable unions of pairwise disjoint open intervals.
It has been shown that all subsets of $\R$ of this form have preimages under $f$ which are open in $T$.
That is:
:$f$ is a continuous mapping.
{{qed}}
Theorem: Real-Valued Mapping is Continuous if Inverse Images of Unbounded Open Intervals are Open

Let $T = \struct {S, \tau}$ be a topological space.
Let the real number line $\R$ be considered as a topology under the usual (Euclidean) topology.
Let $f: T \to \R$ be a real-valued function on $T$.
Then:
:$f$ is continuous
{{iff}}:
:for all $a \in \R$: $f^{-1} \openint \gets a$ and $f^{-1} \openint a \to$ are open in $T$.

Proof:
From Sub-Basis for Real Number Line:
:$\set {\openint \gets a, \openint b \to: a, b \in \R}$ is a sub-basis for $\R$.
The result follows from Continuity Test using Sub-Basis.
{{qed}}
Theorem: Open Balls on Rational Centers form Basis for Usual Topology on Plane

Let $\R^2$ be the real number plane with the usual (Euclidean) topology.
Let $S$ be the set defined as:
:$S = \set {\tuple {x, y} \in \R^2: x, y \in \Q}$
That is, let $S$ be the set of all points in $\R^2$ whose coordinates are rational numbers.
Let $\BB$ denote the set defined as:
:$\BB = \set {\map {B_q} s: s \in S, q \in \Q}$
That is, let $\BB$ be the set of all open $q$-balls with centers in $S$ and rational radius.
Then $\BB$ forms a basis for $\R^2$.

Proof:
Let $d: \R^2 \times \R^2 \to \R$ be the usual (Euclidean) metric on $\R^2$.
Let $U$ be an open set of $\R^2$.
Let $z = \tuple {x, y} \in U$.
Then by definition of open set:
:$\exists \epsilon \in \R_{>0}: \map {B_\epsilon} z \subseteq U$
By Rationals are Everywhere Dense in Topological Space of Reals:
:$\exists \tuple {x', y'}$ such that:
::$\size {x - x'} < \dfrac \epsilon 5$
::$\size {y - y'} < \dfrac \epsilon 5$
Let $s = \tuple {x', y'}$.
Then:
:$\map d {z, s} < \dfrac {e \sqrt 2} 5 < \dfrac \epsilon 3$
Let $q \in \Q$ such that:
:$\dfrac \epsilon 3 < q \le \dfrac {2 \epsilon} 3$
Then:
:$z \in \map {B_q} s \subseteq \map {B_\epsilon} z \subseteq U$
As $z$ is arbitrary, it follows that $U$ is the union of open balls with centers in $S$ and rational radius.
Hence the result.
{{qed}}