Manifolds with Boundary and Maximal Atlas I was reading Tu's An Introduction to Manifolds and learned about the notion of manifolds with boundary. But there was a point which was not clear to me.
Here are the definitions(I will use the word smooth to mean that it is $C^{\infty}$): 


*

*Given two subsets $S\subset \mathbb{R}^n, T\subset \mathbb{R}^m$, we say that a map $f:S\rightarrow T$ is smooth at a point $p$ if there is a neighborhood $U$ of $p$ in $\mathbb {R}^n$ and a smooth map $\tilde{f}:U\rightarrow \mathbb{R}^m$ that agrees with $f$ on $U\cap S$. If $f$ is smooth at every point in $S$, we say that $f$ is smooth on $S$. If $f$ is bijective, smooth on $S$, and has a smooth inverse, then $f$ is called a diffeomorphism.

*A topological space $M$ is said to be locally $\mathcal{H}^n$ if every point in $M$ has a neighborhood that is homeomorphic to an open set of the upper half plane $\mathcal{H}^n:=\{(x^{1},\dots,x^{n})\in\mathbb{R}^{n}\mid x^{n}\geq0\}$. If $M$ is alocally $\mathcal{H}^n$, second countable, Hausdorff space, $M$ is called a topological $n$-manifold with boundary.

*A chart $(U,\phi)$ on a topological $n$-manifold with boundary $M$ is a pair of an open set $U$ of $M$ and a homeomorphism $\phi: U\rightarrow\phi (U)\subset \mathcal{H}^n$. A collection $\{(U,\phi)\}$ of charts on $M$ is called a $C^\infty $ atlas if the collection covers $M$ and for any two charts $(U,\phi)$ and $(V,\psi)$ in it, the transition map
$$\psi \circ \phi ^{-1}:\phi (U\cap V)\rightarrow \psi (U\cap V)$$
is a diffeomorphism. A $C^{\infty}$ atlas $\mathfrak{U}$ is said to be maximal if there is no other $C^{\infty}$ atlas properly containing $\mathfrak{U}$. 

*A topological manifold with boundary together with a maximal $C^{\infty}$ atlas is called a $C^\infty$ manifold with boundary.
It is the last part that I am stuck with. For manifolds without boundary, we can prove that every atlas is contained in a unique maximal atlas. I figure that the situation is the same for manifolds with boundary, but I am having trouble proving it because of the somewhat complicated definition of smooth maps between two arbitrary subsets of Euclidean spaces. So my question is: 
Given an atlas on a topological $n$-manifold with boundary, can we prove that the atlas is contained in a unique maximal atlas? If so, why?
 A: The answer is positive. The maximal atlas containing an arbitrary atlas is obtained by adding all the charts that are compatible with the atlas. As pointed out by Gnampfissimo in the comment, the crux of the problem lies in showing that if two charts, say $(V_1,\psi_1 )$ and $(V_2,\psi_2 )$, are compatible with an atlas $\mathfrak{U}$, then $(V_1,\psi_1 )$ and $(V_2,\psi_2 )$ are compatible with each other. So let us try to prove this.
Let $p\in V_1\cap V_2$. We would like to show that $\psi_2\circ\psi_1^{-1}:\psi_1(V_1\cap V_2)\rightarrow\psi_2(V_1\cap V_2)$ is smooth at $\psi_1(p)$. To prove this, choose a chart $(U,\phi )$ in $\mathfrak{U}$ that contains $p$. Then both $\phi\circ\psi_1^{-1}:\psi_1(U\cap V_1)\rightarrow\phi(U\cap V_1)$ and $\psi_2\circ\phi^{-1}:\phi(U\cap V_2)\rightarrow \psi_2(U\cap V_2)$ are smooth. So there are 


*

*neighborhoods $O_1$, $O_2$ of $\psi_1(p)$ and $\phi(p)$, respectively, in $\mathbb{R}^n$,

*a smooth map $f:O_1\rightarrow\mathbb{R}^n$ that agrees with $\phi\circ\psi_1^{-1}$ on $O_1\cap\psi_1(U\cap V_1)$, and

*a smooth map $g:O_2\rightarrow\mathbb{R}^n$ that agrees with $\psi_2\circ\phi^{-1}$ on $O_2\cap\phi(U\cap V_2)$.


By taking the intersection of $O_1$ with $f^{-1}(O_2)$ if necessary, we may assume here that $O_1$ satisfies $f(O_1)\subset O_2$. Then $g\circ f:O_1\rightarrow \mathbb{R}^n$ is a smooth map from a neighborhood of $\psi_1(p)$ to $\mathbb{R}^{n}$. So if we can show that $g\circ f$ agrees with $\psi_2\circ\psi_1^{-1}$ on $O_1\cap\psi_1(V_1\cap V_2)$, then we can say that $\psi_2\circ\psi_1^{-1}:\psi_1(V_1\cap V_2)\rightarrow\psi_2(V_1\cap V_2)$ is smooth at $\psi_1(p)$, and we are done.
For sure, $g\circ f$ agrees with $\psi_2\circ\psi_1^{-1}$ on $O_1\cap\psi_1(U\cap V_1\cap V_2)$. But what about on the set $\{O_1\cap \psi_1(V_1\cap V_2)\}- \{O_1\cap \psi_1(U\cap V_1\cap V_2)\}$? We have no information whatsoever about the behavior of $g\circ f$ on this set. What to do?
Here's a way to proceed: Since $\psi_1(U\cap V_1 \cap V_2)$ is open in $\psi_1(V_1\cap V_2)$, there is an open set $A$ in $\mathbb{R}^n$ such that $A\cap \psi_1(V_1\cap V_2)=\psi_1(U\cap V_1 \cap V_2)$. 
Then we have $$(O_1\cap A)\cap \psi_1(U\cap V_1\cap V_2)=(O_1\cap A)\cap \psi_1 (V_1\cap V_2),$$
so the replacement of $O_1$ by $O_1\cap A$ fixes everything.
