Let $F$ be a $σ$-algebra, $G$ is sub $σ$-algebra of $F$, $X$ is RV.
I found such definition $$"X \ \text{ is independent of } G"$$
is equivalent to $$"\forall A\in G, X \text{ is independent of } _".$$
I was wondering why it is enough to take only the indicator function?
If $X$ is independent of $I_A$ for each $A \in G$ then $P(X^{-1}(E)\cap A )=P(X^{-1}(E)\cap I_A^{-1}(\{1\}))= P(X^{-1}(E)) P(A)$ for any Borel set $E$ in the real line and any $A \in G$. This also implies that if $Y$ is any random variable measurable w.r.t. $G$ then $X$ and $Y$ are independent: $P(X^{-1}(E)\cap Y^{-1}(F))=(X^{-1}(E))P(Y^{-1}(F))$ because $Y^{-1}(F) \in G$ for any Borel set $F$.