As some context, a question I posted Munkres exercise 13.1 was closed as a duplicate, but I'm not interested just in solving Munkres 13.1, but in a verification of whether my understanding of a basis for a topology is correct. I'm going to try to reduce the scope of my question here in the hope that this isn't closed, because I accept there are other, and most likely superior ways to solve this problem. But I'd like to know if my intuition was correct.
The exercise is:
Let đť‘‹ 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 know that a set is open if and only if it is a union of open sets, and this is the approach people typically used for this problem. My approach, and thought process, was to use the definition of what it means to be open in the topology generated by a basis (though whether it is ideal to involve a basis is, of course, debatable). If $\mathcal{T}$ is the topology generated by a basis $\mathcal{B}$, we say $A \in \mathcal{T}$ if and only if for every $x \in A$, there exists $B \in \mathcal{B}$ such that $x \in B \subset A$. So this is what I set out to prove.
If I fix $x \in A$, I know by the assumption in this exercise that I can pick $U \in \mathcal{T}$, where $x \in U$ and $U \subset A$. As $U$ is open, I can apply the above definition to find a basis element $B \in \mathcal{B}$ such that $x \in B \subset U$. But $U \subset A$, so I can say $x \in B \subset A$. By this above definition again, $A$ is open.
My question is whether this approach here and my understanding of the basis for a topology is correct, or if I have made any mathematical errors. I surely would have to start out with "choose a basis for $\mathcal{T}$," which could just be $\mathcal{T}$ itself. This is certainly not ideal, but is it incorrect?