uniqueness of the smooth structure on a manifold obtained by gluing I've just read a proof that 
If $M$, $N$ are smooth manifolds with boundary and $f: \partial M\rightarrow \partial N$ is a diffeomorphism then $M \cup_f N$ has a smooth manifold structure such that the obvious maps $M \rightarrow M \cup_f N$ and $N \rightarrow M \cup_f N$ are smooth imbeddings. 
The proof I read uses collar neighborhoods of the two boundaries to identify a neighborhood of the common boundary in the new manifold with a product of the common boundary and an interval.
This left me wondering about the uniqueness of the smooth structure.  At first I thought it must be unique and I tried to show that the identity map is smooth but I couldn't show smoothness at points on the common boundary.  Then the thought of a decomposition of an exotic sphere into hemispheres made me think perhaps uniqueness isn't guaranteed. But then I wasn't sure whether the hemispheres were still $smooth$ submanifolds when you change to the exotic smooth structure.  Can anyone help me out by telling me whether we always have uniqueness and if so is it easy to see that the identity map will be smooth at points in the common boundary of M and N?  Thanks very much for your time.
 A: I will try to answer your question in the case where $M,N,\partial M,\partial N$ are assumed to be compact. This additional assumption can be removed.
A smooth manifold triad is a triple $(W;V_0,V_1)$ consisting of a compact smooth $n$-dimensional manifold $W$ with boundary and two smooth compact $(n-1)$-dimensional manifolds $V_0$, $V_1$ without boundary such that $\partial W= V_0\cup V_1$ and $V_0\cap V_1=\emptyset$.
Now suppose that $(W;V_0,V_1)$, $(W';V'_1,V'_2)$ are two smooth manifold triads and $h:V_1\to V'_1$ is a diffeomorphism. The basic statement, which is made precise in the following theorem, is that one can form a well defined smooth manifold triad $(W\cup_h W';V_0,V_2')$.

Theorem: In the above situation there exists a smooth manifold structure $\mathcal{S}$  on $W\cup_h W'$ such that both inclusion maps $W\hookrightarrow W\cup_h W'$, $W'\hookrightarrow W\cup_h W'$ are diffeomorphisms onto their images.
  Moreover the structure $\mathcal{S}$ is unique up to a diffeomorphism leaving $V_0$, $h(V_1)=V_1'$ and $V_2'$ fixed.

Your question is a special case of this situation namely $M=W$, $N=W'$, $\partial M=V_1$, $\partial N=V_1'$ and $V_0=V_2'=\emptyset$.
So the smooth structure is unique up to a diffeomorphism that leaves $f(\partial M)=\partial N$ fixed.
The theorem I quoted is theorem 1.4 from Milnor's "Lectures on the $h$-cobordism theorem".
