I'm trying to prove that the dimension of the projective space $\mathbb P^n$ is $n$. I've seeing some books saying that since the $\{U_i\}$ ($U_i$ homeomorphic to $\mathbb A^n$) is an open cover of $\mathbb P^n$, we have $\dim \mathbb P^n=\sup\dim U_i=\dim \mathbb A^n=n$.
I didn't understand what the open cover of a topological space has to do with its dimension.
I need a clarification at this point.
Thanks a lot.