# Closure of a set example

I have a lemma which states the following:

The closure of $$A, \overline{A}$$, is the set

$$\overline{A}:=\{x\in T: U\cap A \neq \emptyset \text{ for every open set U that contains x}\}$$

I would like to give an example to know if I'm do anything wrong:

Let $$T=[0,2]$$, let the topology on $$T$$ be $$\mathcal{T}=\{\emptyset,T,(0.3,0.4)\}$$. Let $$A=(1,1.5)$$.

By the definition, the closure of $$\overline{A}$$ of a set $$A\subset T$$ is the intersection of all closed sets that contain $$A$$.

So, the closed sets are $$T, \emptyset, [0,0.3]\cup [0.4,2]$$. $$A$$ is in $$T$$ and $$[0,0.3]\cup [0.4,2]$$. The intersection of these is $$[0,0.3]\cup [0.4,2]$$. So $$\overline{A}=[0,0.3]\cup [0.4,2]$$. Is this correct?

By the lemma, $$\overline{A}:=\{x\in T: U\cap A \neq \emptyset \text{ for every open set U that contains x}\} = T$$ since $$T$$ is the only open set that contains $$A$$

What am I doing wrong?

Your very last equality is wrong. If $$a\in(0.3,0.4)$$, then we can take $$U=(0.3,0.4)$$ which does not intersect $$A$$. Hence, $$a\notin\{x\in T:U\cap A\neq\emptyset\text{ for every open }U\text{ containing }x\}$$. After fixing this, you see that the closure is indeed $$[0,0.3]\cup[0.4,2]$$.