I am given two stone spaces $S_n$ and $S'_n$ for some n. A stone space in model theory context is a space where the elements are complete types taking n inputs (i.e. if $\phi(x) \in p$ is a complete type, $p\in S_1$.)
I'm told L is the language of $S_n$ and $L\subseteq L'$ and $T \subseteq T'$, L' is the language of $S'_n$, T, T' complete.
I'm asked to prove a function $f: S'_n \rightarrow S_n$, $f(p) = p \cap \{L formulas\}$ is continuous. Continuous in the sense that for every open set V of $S_n$, $f^{-1}(V)$ is also open.
My problem is that I don't understand how this function can possibly be 1-1. This is essentially all I need to prove continuity, but why is it 1-1? I've spun this around in my head so many times.
Why can't there be complete types p, q of $S'_n$ such that there is a complete type r of $S_n$ where $r\subseteq p, q$?
A basic open set in $S_n$ has the form $[\varphi] = \{p\in S_n\mid \varphi\in p\}$, for some $L$-formula $\varphi$ in $n$ free variables. Then: \begin{align*} f^{-1}([\varphi]) &= \{p\in S'_n\mid f(p)\in [\varphi]\}\\ &= \{p\in S'_n\mid \varphi\in f(p)\}\\ &= \{p\in S'_n\mid \varphi\in p\} \end{align*}
The last step is because restricting $p$ to $L$ does not affect whether the $L$-formula $\varphi$ is in $p$. The last set is exactly $[\varphi]$ in the space $S'_n$, which is again a basic open set. We have checked that the preimage of every basic open set is open, so $f$ is continuous.
As Mark Kamsma pointed out in the comments, a restriction map $f$ is usually not one-to-one. But as I pointed out in the comments, being one-to-one has nothing at all to do with continuity.