Calculate weak closure of a set Before anybody marks this as a duplicate, I would like to  remark that the answer given in duplicate questions is that of the weak sequential closure, and not the weak closure itself.
So I am asked to find the weak closure of the set $E = \{e^{imt} + me^{int}, 0 \leq m <n\}$ in $L^2 [-\pi , \pi]$. I have already found the weak sequential closure, which is $E \cup \{e_m : m  \in M\}$. 
Now, I know the definition of weak closure. It is basically as follows: $x \notin \overline{E_w} \iff \exists U \subset L^2[-\pi,\pi]$ weakly open set containing $x$ , such that $ U \cap E = \emptyset$. The meaning of weakly open set, is that $U = \bigcap \{y : f(y-x) < \epsilon\}$ for some $\epsilon$ and finitely many $f$.
I don't know how much this helps. I know that $L^2$ is Hilbert, so $f$ can only be of a specific form by the Riesz representation theorem. It is very difficult to calculate the weak closure because it is difficult to negate the statement of definition, or to think of candidates for the elements.Somebody needs to either tell me how to calculate it in another way, or a definition that is more flexible than this one.
 A: A note on terminology up front: The operation
$$s \colon M \mapsto \bigl\{ x : \text{There is a sequence } (x_n)_{n\in \mathbb{N}} \text{ in } M \text{ with } x_n \rightharpoonup x\bigr\}$$
is not a closure operation in the usual sense [closure operations are idempotent], $s(M)$ is not necessarily weakly sequentially closed. Therefore it may create confusion to call $s(M)$ the weak sequential closure of $M$, one may expect the weak sequential closure of $M$ would be the smallest weakly sequentially closed set containing $M$. Nevertheless, it is not unusual that $s(M)$ is called the weak sequential closure of $M$ (e.g. Rudin does so in exercise 9 of chapter 3 of his Functional Analysis).
Now it is an easily verified fact that a weakly closed set is weakly sequentially closed (in any topological space closed subsets are sequentially closed, but the converse does not necessarily hold). Therefore we always have
$$M \subset s(M) \subset \operatorname{cl}_{w} (M)$$
(where $\operatorname{cl}_w$ denotes the weak closure), and since the weak closure operator is monotone (that is, $A \subset B \implies \operatorname{cl}_w(A) \subset \operatorname{cl}_w(B)$) and idempotent, even $s^k(M) \subset \operatorname{cl}_w (M)$ for all $k \in \mathbb{N}$ (one can go beyond $\mathbb{N}$, this inclusion holds for all ordinals $k$, but we don't need that here). Thus in cases where


*

*the weak sequential closures are easy to determine, and

*the iteration of $s$ soon leads to a fixed point,


iterating the weak sequential closure can help to determine the weak closure. Once you've reached a fixed point of $s$, i.e. a weakly sequentially closed set, you have a set that may be weakly closed. If it isn't, it often is still easier to determine the weak closure than from the original set.
Here we have such a situation,
$$E_1 := s(E) = E \cup \{ e_m : m \in \mathbb{N}\}$$
($e_0$ already belongs to $E$, but there's no harm in listing it twice), and it's not hard to find
$$E_2 := s(E_1) = E_1 \cup \{0\}$$
(since $e_m \rightharpoonup 0$), and that $E_2$ is weakly sequentially closed. Since $E_2$ is countable, there is reasonable hope that it is also weakly closed. To check that, we choose an arbitrary $x \notin E_2$, and see whether we can find a weak neighbourhood of $x$ not intersecting $E_2$. Since $E_2 \subset F:= \overline{\operatorname{span}} \{ e_m : m \in \mathbb{N}\}$, it suffices to consider $x \in F$.
Since $x \neq 0$,
$$\kappa = \min \{ n \in \mathbb{N} : \langle x, e_n\rangle \neq 0\}$$
is well-defined. Let's assume the inner product is normalised so that $\lVert e_n\rVert = 1$ for all $n$ to avoid having to deal with a factor of $\sqrt{2\pi}$ everywhere.
If $\langle x, e_{\kappa}\rangle \neq 1$, let $\delta = \min \{ \lvert\langle x,e_{\kappa}\rangle,\, \lvert 1 - \langle x, e_{\kappa}\rangle\rvert,\, 1/2\}$. Then
$$V(\kappa; \delta) := \{ y : (0\leqslant \nu \leqslant \kappa) \implies (\lvert \langle y-x, e_{\nu}\rangle\rvert < \delta)\}$$
is a weak neighbourhood of $x$ not intersecting $E_2$. For $y \in V(\kappa; \delta)$, we have $\langle y, e_\kappa\rangle \notin \{0,1\}$ and $\langle y,e_\nu\rangle \neq 1$ for $0 \leqslant \nu < \kappa$, whereas for $z \in E_2$, we have $\langle z, e_\kappa\rangle \in \{0,1\}$ or there is a $\nu < \kappa$ with $\langle z, e_{\nu}\rangle = 1$ (then $z = e_\nu + \nu e_\kappa$).
If on the other hand $\langle x, e_{\kappa} \rangle = 1$, then, since $e_\kappa \in E_2$,
$$\lambda = \min \{ n > \kappa : \langle x, e_n\rangle \neq 0\}$$
is well-defined. If $\langle x, e_{\lambda}\rangle \neq \kappa$, let $\delta = \min \{ \lvert \langle x, e_\lambda\rangle\rvert,\, \lvert \kappa - \langle x, e_\lambda\rangle\rvert,\, 1/2\}$. Then
$$W(e_\kappa, e_\lambda; \delta) := \{ y : \lvert \langle y-x, e_\kappa\rangle \rvert < \delta,\, \lvert \langle y-x, e_\lambda\rangle\rvert < \delta\}$$
is a weak neighbourhood of $x$ not intersecting $E_2$. For if $z \in E_2$ with $\lvert \langle z-x,e_\kappa\rangle\rvert < \delta$, then $\langle z,e_\kappa\rangle = 1$, and $z$ can only be one of $e_\kappa,\, e_1 + e_\kappa$, or $e_\kappa + \kappa e_\mu$ where $\mu > \kappa$. In all of these possibilities except for $z = e_\kappa + \kappa e_\lambda$, we have $\langle z, e_\lambda\rangle = 0$ and hence
$$\lvert \langle z - x, e_\lambda\rangle\rvert = \lvert \langle x, e_\lambda\rangle \rvert \geqslant \delta,$$
whence $z \notin W(e_\kappa, e_\lambda; \delta)$. And for $z = e_\kappa + \kappa e_\lambda$, we have
$$\lvert \langle z-x, e_\lambda\rangle\rvert = \lvert \kappa - \langle x, e_\lambda\rangle\rvert \geqslant \delta,$$
so $z \notin W(e_\kappa, e_\lambda; \delta)$ also in this case.
It remains to consider the case $\langle x, e_\kappa\rangle = 1$ and $\langle x, e_\lambda\rangle = \kappa$. Then, since $x \neq e_\kappa + \kappa e_\lambda$,
$$\mu = \min \{ n > \lambda : \langle x, e_n\rangle \neq 0\}$$
is well-defined. Let $\delta = \min \{ \lvert \langle x, e_\mu\rangle\rvert,\, 1/2\}$. Then
$$W(e_\kappa, e_\lambda, e_\mu; \delta) = \{ y : \lvert\langle y-x, e_\kappa\rangle\rvert < \delta,\, \lvert\langle y-x, e_\lambda\rangle\rvert < \delta,\, \lvert\langle y-x, e_\mu\rangle\rvert < \delta\}$$
is a weak neighbourhood of $x$ not intersecting $E_2$. For the only $z\in E_2$ with $\lvert\langle z-x,e_\kappa\rangle\rvert < \delta$ and $\lvert \langle z-x, e_\lambda\rangle\rvert < \delta$ is $z = e_\kappa + \kappa e_\lambda$, and then we have $\langle z, e_\mu\rangle = 0$ whence
$$\lvert\langle z-x, e_\mu\rangle\rvert = \lvert\langle x, e_\mu\rangle\rvert \geqslant \delta.$$
Thus $\operatorname{cl}_w (E) = E_2$ is proven.
