Given a set $X$, and $S \subset \mathcal{P}(X)$, we can define $\sigma(S)$ as the intersection of all sigma algebra containing $S$.
I want to have a bottom up approach to construct the generated sigma algebra, and thought of the following: $$ \sigma(S) =\left.\left\{ \bigcup_{i\in I} \bigcap_{j\in J_{i}} T_{i,j}\>\right|\> \text{ countable }, T_{i,j} \in S \text{ or } T_{i,j}^{c} \in S \right\} $$
Intuitively, in this case, I think of $\sigma(S)$ as the union of countably long "words", and each word is the countable intersection of sets that is in $S$ or sets where its complement in $S$.
I planned to ask this a long time ago and read many posts about it, but many bottom up approach seems to be quite complicated. I think I can verify the two axioms in this case? However, maybe I made a mistake as no one proposed anything similar. Also if we can do this, I think there will be a definition of basis and sub-basis as in topology.