I'm currently reading the proof of the q-expansion principle in Katz'73 paper "p-adic properties of modular schemes and modular forms" . The principle itself is a Corollary (1.6.2) of Theorem 1.6.1, which states that the expansion map is injective and the proof of which I'm actually talking about.
I can understand the proof of this theorem, except the fact that I don't see how Krull's theorem gives rise to a Zariski open neighborhood (of the formal neighborhood) of the cusp.
To my understanding I'm given a modular form $f$ that has zero expansion, i.e. there is a section $f$ of (some $k$-th power of) the canonical line bundle $\omega$ which identically vanishes when restricting $f$ to the formal neighborhood (of the cusp). Since (after restricting) I'm local the bundle is trivial and I can interpret the section $f$ of $\omega$ as section of the structure sheaf of the completion and I know that it is zero here.
So since I already know that it the restriction of $f$ is zero, I do not have to argue using Krull's theorem. Am I missing something here?
Further, how does it give me a Zariski open containing the formal neighborhood?
Let $X$ be the corresponding modular curve and let $q$ be the cusp you consider. You know that $f\in \mathcal O_{X,q}$ (after identifying $\omega^{\otimes k}$ to $\mathcal O_X$ locally at $q$ as you do) is zero in the formal completion $\hat{\mathcal O}_{X,q}$. By a special form of Krull's intersection theorem, the canonical map $\mathcal O_{X,q}\to \hat{\mathcal O}_{X,q}$ is injective. So $f=0$ in $\mathcal O_{X,q}$, which implies that $f$ is zero in a Zariski open neighborhood of $q$ (and even that $f=0$ in $X$ because the later is an integral curve).
Edit If $A$ is a noetherian local ring with maximal ideal $\mathfrak m$, the kernel of the canonical map $A\to\hat{A}$ is $\cap_{n\ge 1}\mathfrak m^n$, and the latter is zero by Krull's intersection theorem.