Let $A$ be a ring, $M$ an $A$-module and $D$ a directed set. Let $\{M_i\}_{i\in D}$ be a collection of submodules of $M$, such that for $i<j\in D$ then $M_j\subset M_i$, and take the system as neighbourhoods of $0$, so $\{M_i\}_{i\in D}$ becomes the linear topology on $M$.
Now, I'm having trouble understanding the proof given for the following proposition
Let $N\subset M$ be a submodule. Give $N$ the subspace topology. Then this is a linear topology, and $\hat{N}$ is the closure of $\phi(N)$ in $\hat{M}$, where $\phi :M\rightarrow \hat{M}$ is the natural map
The proof goes as
If we view $\hat{N}$ as a submodule of $\hat{M}$ the condition that $a=(a_i)_{i\in D}\in\hat{M}$ belongs to $\hat{N}$ is that each $a_i$ can be represented by an element of $N$, or in other words that $a\in \cap_i( \phi(N)+ker\{\hat{M}\rightarrow M/M_i\})$.
Now I know that in general, the closure $\overline{N}$ of $N$ in $M$ is given by the formula $\overline{N}=\cap_i(N+M_i)$, so the last statement kinda makes sense to me . What doesn't makes sense to me, is that the sentence "... $a_i$ can be represented by an element of $N$...", is that under the map $\phi$? And where does the $ker\{\hat{M}\rightarrow M/M_i\}$ come from in the proof? Why does that mean, that it's the closure in $\hat{M}$?
Note that here $\hat{M}$ denotes the completion of $M$ which is definedes as the inverse limit $\varprojlim M/M_i$.
By definition, $\hat M$ is a subset of $\prod_{i\in D}M/M_i$. Hence, if $a = (a_i)_{i\in D}\in \hat M$, then $a_i\in M/M_i$. Saying that $a_i$ is represented by an element of $N$ means, that there exists $n\in N$ such that $a_i = n+M_i\in M/M_i$.
The module $\hat M$ is again a topological module and the submodules $\hat M_i := \operatorname{ker}\{\hat M\to M/M_i\}$ define the linear topology. Therefore, the closure of $\phi(N)$ is given by $\bigcap_{i\in D} \phi(N)+\hat M_i$. This is basically the definition of $\hat N$ considered as a submodule of $\hat M$ under the canonical isomorphisms $N/N\cap M_i \cong N+M_i/M_i$.