topology, basis, my professor said...can someone clarify? My professor wrote this: 
"To study some topological property, we can always, without loss of generality, only focus on a basis for the topology."
Can someone explain this, and maybe give a simple example?  I try an example below:
If you want to prove some function $f\colon X \to Y$ is continuous, you don't have to take an arbitrary open set in $Y$ and show that its pre-image is open in $X$.  Instead, you can take a basis element of $Y$'s topology and show its pre-image is open in $X$.
Thanks
 A: Sure. The key idea here is that any open set can be written as a union of elements of your basis.
Let's take not just any open set in $Y$, but a basis element $B$. It's enough to show that $f^{-1}(B)$ is open for any such $B$. Then if $U=\bigcup B_i$ is any open set, $f^{-1}(U)=\bigcup f^{-1}(B_i)$ is a union of open sets, hence open.
Another example: A set is compact if any cover by basis elements has a finite subcover.
A: The idea here is that taking unions is often a harmless procedure that can commute with different operations. If we can prove that some property holds on the basis for a topology, we can sometimes extend it to all open sets by taking unions.
In your example, suppose that $B$ is a basic open set, and $f^{-1}(B)$ is open in $X$. Since every open set $U$ can be written as a union $\bigcup_{i} B_{i}$ of open sets, then
$$f^{-1}(U) = f^{-1}(\bigcup_{i} B_{i}) = \bigcup_{i} f^{-1}(B_{i})$$
Since each $f^{-1}(B_{i})$ is open in $X$, their union $\bigcup_{i} f^{-1}(B_{i})$ is also open in $X$, so that $f$ is continuous.
