[proofplan]
The Stone topology is defined so that each formula set $[\varphi]$ is open. To prove closedness, we use completeness of types: every complete type contains exactly one of $\varphi$ and $\neg\varphi$, so the complement of $[\varphi]$ is the [open set](/page/Open%20Set) $[\neg\varphi]$. The Boolean identities follow from deductive closure, consistency, and completeness of complete types.
[/proofplan]
[step:Use the definition of the Stone topology to prove openness]
Let $\varphi(\bar{x})$ be an $L(A)$-formula. By definition of the Stone topology on $S_n(A)$, every set of the form
\begin{align*}
[\theta] := \{p \in S_n(A) : \theta(\bar{x}) \in p\}
\end{align*}
is a basic open set, where $\theta(\bar{x})$ is an $L(A)$-formula. Taking $\theta = \varphi$, the set $[\varphi]$ is open.
[/step]
[step:Identify the complement of $[\varphi]$ with $[\neg\varphi]$]
We prove
\begin{align*}
S_n(A) \setminus [\varphi] = [\neg\varphi].
\end{align*}
Let $p \in S_n(A)$. Since $p$ is a complete type, exactly one of the two formulas $\varphi(\bar{x})$ and $\neg\varphi(\bar{x})$ belongs to $p$. Therefore
\begin{align*}
p \notin [\varphi]
&\iff \varphi(\bar{x}) \notin p \\
&\iff \neg\varphi(\bar{x}) \in p \\
&\iff p \in [\neg\varphi].
\end{align*}
Thus $S_n(A) \setminus [\varphi] = [\neg\varphi]$. Since $[\neg\varphi]$ is open by the preceding step, the complement of $[\varphi]$ is open, and hence $[\varphi]$ is closed.
[guided]
We want to prove that $[\varphi]$ is closed. In a [topological space](/page/Topological%20Space), a subset is closed exactly when its complement is open, so we compute the complement of $[\varphi]$ inside $S_n(A)$.
Let $p \in S_n(A)$ be a complete $n$-type over $A$. By definition, completeness means that for every $L(A)$-formula $\theta(\bar{x})$, the type $p$ contains exactly one of $\theta(\bar{x})$ and $\neg\theta(\bar{x})$. Applying this with $\theta = \varphi$, exactly one of $\varphi(\bar{x})$ and $\neg\varphi(\bar{x})$ lies in $p$. Hence
\begin{align*}
p \notin [\varphi]
&\iff \varphi(\bar{x}) \notin p \\
&\iff \neg\varphi(\bar{x}) \in p \\
&\iff p \in [\neg\varphi].
\end{align*}
Because this equivalence holds for every $p \in S_n(A)$, the two subsets are equal:
\begin{align*}
S_n(A) \setminus [\varphi] = [\neg\varphi].
\end{align*}
The set $[\neg\varphi]$ is open by the definition of the Stone topology, since $\neg\varphi(\bar{x})$ is again an $L(A)$-formula. Therefore the complement of $[\varphi]$ is open, so $[\varphi]$ is closed.
[/guided]
[/step]
[step:Translate conjunction into intersection]
Let $\varphi(\bar{x})$ and $\psi(\bar{x})$ be $L(A)$-formulas. For every $p \in S_n(A)$, deductive closure of $p$ gives
\begin{align*}
\varphi(\bar{x}) \wedge \psi(\bar{x}) \in p
\iff
\varphi(\bar{x}) \in p \text{ and } \psi(\bar{x}) \in p.
\end{align*}
Indeed, the forward implication follows because $\varphi \wedge \psi$ logically implies both $\varphi$ and $\psi$, and the reverse implication follows because $\varphi$ and $\psi$ together logically imply $\varphi \wedge \psi$. Therefore
\begin{align*}
p \in [\varphi \wedge \psi]
&\iff p \in [\varphi] \text{ and } p \in [\psi] \\
&\iff p \in [\varphi] \cap [\psi].
\end{align*}
Since this holds for all $p \in S_n(A)$,
\begin{align*}
[\varphi \wedge \psi] = [\varphi] \cap [\psi].
\end{align*}
[/step]
[step:Translate disjunction into union]
Let $p \in S_n(A)$. If $\varphi(\bar{x}) \in p$ or $\psi(\bar{x}) \in p$, then deductive closure gives $\varphi(\bar{x}) \vee \psi(\bar{x}) \in p$. Conversely, suppose $\varphi(\bar{x}) \vee \psi(\bar{x}) \in p$. If neither $\varphi(\bar{x})$ nor $\psi(\bar{x})$ belonged to $p$, then completeness would give $\neg\varphi(\bar{x}) \in p$ and $\neg\psi(\bar{x}) \in p$. By deductive closure, $p$ would contain $\neg(\varphi(\bar{x}) \vee \psi(\bar{x}))$, contradicting the consistency of $p$. Hence at least one of $\varphi(\bar{x})$ and $\psi(\bar{x})$ belongs to $p$. Thus
\begin{align*}
p \in [\varphi \vee \psi]
&\iff p \in [\varphi] \text{ or } p \in [\psi] \\
&\iff p \in [\varphi] \cup [\psi].
\end{align*}
Since this holds for every $p \in S_n(A)$,
\begin{align*}
[\varphi \vee \psi] = [\varphi] \cup [\psi].
\end{align*}
Together with the complement identity, this proves that formula-defined subsets of $S_n(A)$ are clopen and satisfy the stated Boolean identities.
[/step]