Let $X$ be a topological space; let $A$ be a subset of $X$. Suppose that for each $x \in A$ there is an open set $U$ containing $x$ such that $U \subset A$. Show that $A$ is open in $X$.
I was given the following definition: A subset $U$ of $X$ is said to be open in $X$ if for each $x \in U$ there is a basis element $B \in \mathcal{B}$ such that $x \in B$ and $B \subset U$.
So I did:
Let $x \in A$. By hypothesis there is an open set $U$ containing $x$ such that $U \subset A$. So since $U$ is open it follows that there is a basis element $B \in \mathcal{B}$ such that $x \in B$ and $B \subset U \subset A$. So $A$ is open in $X$.
Could someone let me know what I did wrong? The solution in my book is the same as the answer provided here:
I think you are given a set $X$ and a collection of subsets $\mathcal{B}$ of $X$ satisfying certain properties.
You can then define a topology $\mathcal{T}(\mathcal{B})$ on $X$ by
which can be shown to be a topology (i.e. obeying the 3 axioms) because $\mathcal{B}$ was not arbitrary but obeyed the special properties.
Now we want to show the simple fact that
The left to right implication is very trivial: for every $x$ we pick $O_x = O$.
The right to left implication is also easy: the right hand side condition implies that $O = \bigcup \{O_x: x \in O\}$ (all $O_x$ are subsets of $O$, hence so is their union, which shows $\supseteq$; and every $x$ is in its own $O_x$ which shows $\subseteq$) and so $O$ is a union of elements of $\mathcal{T}(\mathcal{B})$ and so in $\mathcal{T}(\mathcal{B})$ itself, as topologies are closed under unions.
Note that this proof only needs that $\mathcal{T}(\mathcal{B})$ is a topology, not how it was defined from the collection $\mathcal{B}$. I assume that this has been checked prior to this.