show that $X$ is homeomorphic to the $n$ dimensional (real) projective space. Let $D^n=\{(x_1,...,x_n)\in\mathbb{R}^n: \Sigma_{i=1}^{n}x_i^2\leq 1\}$. 


*

*Let $X=D^n\times\{0\}\cup D^n\times\{1\}$ and let $Y$ be the quotient of $X$ obtained by identifying $(x,0)$ and $(x,1)$ for all $x\in\partial D^n$. Show that $Y$ is homeomorphic to $S^n$


Attempt: WLOG, we may assume that $S^n$ is the unit sphere centered at $(0,...,0,\frac{1}{2})\in\mathbb{R}^{n+1}$. Consider the map $\phi : S^n\to Y$ defined by 
$$\phi (x_1,...,x_n,x_{n+1})=\left\{ \begin{array}{ll}
(x_1,...,x_n,0) & \textrm{if $x_{n+1}<\frac{1}{2}$}\\
(x_1,...,x_n,1) & \textrm{if $x_{n+1}\geq \frac{1}{2}$}
\end{array} \right.$$
Since $S^n$ is compact and $\phi$ is a continuous bijection, $\phi$ is a homeomorphism.   


*

*Let $X$ be the quotient of $D^n$ obtained by identifying $x$ and $-x$ for all $x\in \partial D^n$. Using the previous part, show that $X$ is homeomorphic to the $n$ dimensional (real) projective space $\mathbb{P}^n$ .


Can anyone check my attempt? I know the hypothesis of the last part is the definition of $\mathbb{P}^n$. So I cannot prove the last part. 
 A: The $\phi$ you defined has codomain $X,$ not $Y.$ You want to take the composition of this map with the quotient map $X \to Y.$ Also, in order to conclude that $\phi$ is a homeomorphism you need to show that $Y$ is Hausdorff. This is easy enough; I'll let you fill in the details. (Alternatively, you could construct the inverse directly by mapping the disks to their respective hemispheres; then compactness of the domain and separatedness of the codomain come for free and you don't even have to construct your map $\phi$. This is Andrew's approach.)
Now for the second part. Let us take as definition $P^n = S^n/(\mathbb{Z}/2).$ There is the projection map $p:S^n \to P^n.$ Let $i:D^n \to S^n$ be the inclusion into the closed upper hemisphere. (In other words, it is the composition $D^n \cong D^n \times \{ 1 \} \hookrightarrow D^n \times \{0\} \cup D^n \times \{1\} \to Y \cong S^n.$) Then since $pi:D^n \to P^n$ respects the $\mathbb{Z}/2$-action on the boundary $\partial D^n$ there is an induced continuous map $\psi:D^n/(\mathbb{Z}/2) \to P^n$ which, as you can easily verify, is bijective. Since the domain is compact and the codomain is Hausdorff, our $\psi$ is a homeomorphism.
A: Rather than constructing the map $\phi$ (whose continuity along the equator $\{x_{n+1} = \frac{1}{2}\}$ must be checked), it may be more natural to define the (obviously continuous) map $f:X \to S^{n}$ by
$$
f(x, 0) = \left(x, -\sqrt{1 - |x|^{2}}\right),\quad
f(x, 1) = \left(x, \sqrt{1 - |x|^{2}}\right),\qquad x \in D^{n},
$$
i.e., to take a hemispherical graph over each disk, and to notice that $f$ factors through $Y$, defining a continuous bijection from the compact space $Y$ to $S^{n}$.
For the second part, you might then define an involution of $X$ by
$$
(x, t) \mapsto (-x, 1 - t)
$$
and observe that the induced map on $S^{n}$ is the antipodal map, while the induced map on the image of $D^{n} \times \{0\}$ in $Y$ identifies antipodal boundary points.
