This notebook is part of the Introduction to manifolds in SageMath by Andrzej Chrzeszczyk (Jan Kochanowski University of Kielce, Poland).

A **topology** on a set $S$ is a collection $\mathscr{T}$ of subsets containing both
the empty set ∅ and the set $S$ such that $\mathscr{T}$ is closed under arbitrary unions and finite
intersections, i.e.,

(i) if $U_a ∈ \mathscr{T}$ for all $a$ in an index set $A$, then
$\bigcup_{a∈A}U_a ∈ \mathscr{T}$,

(ii) if $U_1, . . . ,U_n ∈ \mathscr{T}$, then
$\bigcap_{i=1}^n U_i ∈ \mathscr{T}.$

The elements of $\mathscr{T}$ are called open sets. The set $S$ with a topology will be called a **topological space**.

If $A$ is a subset of a topological space $S$, then the **subspace topology** on $A$ is defined as
$\mathscr{T}_A = \{U ∩ A |\ \ U ∈ \mathscr{T}\}.$

A **neighborhood** of a
point $p$ in $S$ is an open set $U$ containing $p$.

A subcollection $\mathcal{B}$ of a topology $\mathscr{T}$ on a topological space $S$ is a basis for the topology $\mathscr{T}$ if given an open set $U$ and point $p\in U$, there is an open set
$B ∈ \mathcal{B}$ such that $p ∈ B ⊂U$. We also say that $\mathcal{B}$ generates the topology $\mathscr{T}$ or that $\mathcal{B}$
is a **basis for the topological space** $S$. A collection $\mathcal{B}$ of open sets of $S$ is a basis if and only if every open
set in $S$ is a union of sets in $\mathcal{B}$.

If $X,Y$ are topological spaces a function $f : X →Y$ is **continuous**
if and only if the inverse image of any open set is open.

A continuous bijection $f : X →Y$ whose inverse is also continuous is called a
**homeomorphism**.

A **topological manifold** $M$ of dimension $n$ is a topological space with the following properties:

(i) $M$ is **Hausdorff**, that is, for each pair $p_1,p_2$ of distinct points of $M$ there exist neighborhoods $V_1,V_2$ of $p_1$ and $p_2$, respectively such that $V_1∩V_2=∅$.

(ii) Each point $p∈M$ possesses a neighborhood $V$ **homeomorphic to an open subset $U$ of $R^n$**.

(iii) $M$ satisfies the **second countability axiom**, that is, $M$ has a countable basis for its topology.

For an $n$-dimensional topological manifold
each pair $(U, φ)$, where $U$ is an open subset of $M$ and
$φ : U → φ(U ) ⊂ R^n$ is a homeomorphism of $U$ to an open subset of $R^n$ is called a **coordinate map, chart or coordinate system** and $U$ is a **coordinate neighborhood**.

For $p\in U,\ $ $φ( p)$ belongs to $R^n$, and therefore consists of $n$ real numbers that depend on $p$. Thus $φ( p)$ is of the form

$$ φ( p) = (x^1 ( p), x^2 ( p), . . . , x^n ( p)).$$A map $\phi=(\phi^1,\ldots,\phi^m)\ $ from an open subset $U\subset R^n$ to $R^m$ is **smooth** on $U$ or belongs to $C^\infty(U)$ if all partial derivatives $$\frac{\partial^{\alpha_1+\ldots+\alpha_n} \phi^k}
{\partial (x^1)^{\alpha_1}\ldots\partial (x^n)^{\alpha_n}}, \quad \text{where }\ \alpha_i \ \text{denote non-negative integers}
$$
are continuous on $U$.

When two coordinate neighborhoods overlap, we have formulas for the associated coordinate change. The idea to obtain smooth manifolds is to choose a subcollection of coordinate neighborhoods so that the coordinate changes are smooth maps.

An $n$-dimensional $C^\infty$ or **smooth manifold** is a topological manifold of dimension $n$ and a family of coordinate charts $φ_α : U_α → R^n$
defined on open sets $U_α ⊂ M$, such that:

(i) the coordinate neighborhoods $U_\alpha$ cover $M$,

(ii) for each pair of indices $α, β$ such that $W := U_α \cap U_β \not= ∅,$ the overlap maps (transitions)

$φ_β ◦ φ_α^{-1} : φ_α (W ) → φ_β (W ),$

$φ_α ◦ φ_β^{-1} : φ_β (W ) → φ_α (W ),$

are $C^\infty$,

(iii) the family $A = \{(U_α , φ_α )\}$ is **maximal** with respect to (i) and (ii), meaning that if $φ_0 : U_0 → R^n$ is a chart such that $φ_0 ◦ φ^{-1}$ and
$φ\circ φ_0^{-1}$ are $C^\infty$
for all $φ \in A$, then $(U_0 , φ_0 )$ is in $A$.

Any family $A = \{(U_α , φ_α )\}$ that satisfies (i) and (ii) is called a $C^∞$-**atlas** for $M$.
If $A$ also satisfies (iii) it is called a **maximal atlas** or a **differentiable** or **smooth structure**.

Given any atlas $A = \{(U_α , φ_α )\}$ on $M$,
there is a unique maximal atlas $\bar{A}$ containing it. In fact, we can take the set $\bar{A}$ of all maps that satisfy (ii) with every coordinate neighborhoods on $A$.
Clearly $A ⊂ \bar{A}$, and one can easily check that $\bar{A}$ satisfies (i) and (ii). Also, by construction, $\bar{A}$ is maximal with respect to (i) and (ii). **Two atlases are said to
be equivalent** if they define the same differentiable structure.

By $C^\infty(M)$ we shall denote the family of **smooth functions** on a smooth manifold $M$, i.e., functions $f$, such that $f\circ\phi^{-1}$ is smooth on $\phi(U)\subset R^n$ for every coordinate chart $(U,\phi)$.

If $M$, $N$ are smooth manifolds, then a map $\psi: M\to N$ is **smooth** if for every pair of charts $(U, φ)$ on $M$ and
$(V, χ )$ on $N$, the map $χ ◦ ψ ◦ φ^{−1}$ is smooth on
$φ(\psi^{-1}(V)\cap U)\subset R^n.$

Take a look at the notebook Examples of charts. Cartesian and spherical coordinates.