4. For a set $X$, denote $\mathscr{P}(X)=\{Y: Y \subseteq X\}$. (For example: $\mathscr{P}(\{1\})=$ $\{\varnothing,\{1\}\}$, because the subsets of the set $\{1\}$ are the sets $\varnothing$ and $\{1\} ; \mathscr{P}(\varnothing)=\{\varnothing\}$, because the set $\varnothing$ has exactly one subset, which is $\varnothing$.) We denote $\mathscr{P}^{n}(X)$ as the expression $\mathscr{P}(\mathscr{P}(\ldots \mathscr{P}(X) \ldots))$, where $\mathscr{P}$ is applied $n$ times. Find all two-element subsets $A$ of the set $\bigcup_{n=1}^{2018} \mathscr{P}^{n}(\varnothing)$ such that $A \subseteq \mathscr{P}(A)$.
4. Let $A=\{a, b\}$. Then we have $\mathscr{P}(A)=$ $\{\varnothing,\{a\},\{b\},\{a, b\}\}$. Note that $a$ cannot be equal to either $\{a\}$ or $\{a, b\}$: indeed, if $n$ is the smallest natural number such that $a \in \mathscr{P}^{n}(\varnothing)$, then we have $\{a\},\{a, b\} \notin \mathscr{P}^{n}(\varnothing)$, because from $\{a\} \in$ $\mathscr{P}^{n}(\varnothing)$ (similarly for $\{a, b\} \in \mathscr{P}^{n}(\varnothing)$) it would follow that $\{a\} \subseteq \mathscr{P}^{n-1}(\varnothing)$, i.e., $a \in \mathscr{P}^{n-1}(\varnothing)$, a contradiction with the choice of $n$. Therefore, for $A \subseteq \mathscr{P}(A)$ to hold, $a$ must be $\varnothing$ or $\{b\}$, while (similarly) $b$ must be $\varnothing$ or $\{a\}$.

Assume first that $a, b \neq \varnothing$. Then the only possibility is $a=\{b\}$ and $b=\{a\}$. Let $n$ be the smallest natural number such that $a \in \mathscr{P}^{n}(\varnothing)$, i.e., $\{b\} \in \mathscr{P}^{n}(\varnothing)$. It follows that $\{b\} \subseteq \mathscr{P}^{n-1}(\varnothing)$, and hence $b \in \mathscr{P}^{n-1}(\varnothing)$, which means $\{a\} \in \mathscr{P}^{n-1}(\varnothing)$. However, from this we again obtain $a \in \mathscr{P}^{n-2}(\varnothing)$, which is a contradiction with the choice of $n$.

Therefore, without loss of generality, $a=\varnothing$. Then we have $b \neq a=\varnothing$, so the only remaining possibility is $b=\{a\}=\{\varnothing\}$. Therefore, there is a unique set that satisfies the conditions of the problem: $A=\{\varnothing,\{\varnothing\}\}$.