O-minimal spectrum is a spectral space I'm trying to understand a proof on "Sheaves of Continuous Definable Functions" (Pillay, Anand. "Sheaves of continuous definable functions." The Journal of symbolic logic 53.04 (1988): 1165-1169.) 
Let $\mathcal{N} = (N,<,\ldots)$ be an o-minimal structure and let $X \subset N^m$ be a definable set, the o-minimal spectrum $X^\sim$ of $X$ is the set of complete m-types $S_m(N)$ of the first-order theory $Th_N (\mathcal{N})$
which imply a formula defining X equipped with the topology generated by
the basic open sets of the form
$$U^\sim = \{p \in X^\sim : U ∈ p\}$$
where U is a definable, relatively open subset of X. We call this topology on $X^\sim$ the spectral topology.
My goal is to understand why is $X^\sim$ a spectral space. 
The proof goes along the lines: 

Let $F \subset X^\sim$ be a closed, irreducible space and let $\Phi = \{B \subset X : B $ is closed, definable and $B \in p$ for every $p \in F\}$, $\Phi'= \{ X \setminus C: C$ closed, definable and $C \notin \Phi\}$ and $\Phi_1 = \Phi \cup \Phi'$.  Since $F$ is irreducible, $\Phi_1$ is consistent and thus determines a type $p$ and clearly $F = \overline{\{p\}}$

I already know that $\Phi$ is consistent (since $\Phi \subset p$ for every $p \in F$) and that for every $\varphi \in \Phi'$ either $\Phi \cup \varphi$ or $\Phi \cup \lnot \varphi$ is consistent. But I can't relate that to $F$ irreducibleness.
 A: In this answer, I'm going to differ from Pillay's terminology by writing "compact" instead of "quasicompact" and "sober" for the condition that every irreducible closed set is the closure of a unique point (called the generic point). 
In the statement of Lemma 1.1, Pillay writes "$S^t_n(M)$ is a spectral space, i.e. it has a basis of quasicompact open sets and every irreducible closed set is the closure of a unique point." He has omitted one of the conditions in the definition of a spectral space: A space is spectral iff


*

*It is sober.

*The compact open sets form a base for the topology.

*The compact open sets are closed under finite intersection (in particular, the whole space - the empty intersection - is compact). 


The first paragraph of the proof essentially proves both 2. and 3. Pillay explains that the compact open sets in the topology are exactly the definable sets which are open in the o-minimal sense (the latter are a base for the topology by definition, and they are closed under finite intersections).
All that remains is to show that $S^t_n(M)$ is sober, and this is what is done in the paragraph quoted in your question. Note first that the intersection of the sets in $\Phi$ is exactly $F$ (any closed set is the intersection of the basic closed sets containing it). Then by compactness, there are finitely many closed sets $C_1,\dots,C_n$ not in $\Phi$ such that $$F\cap (X\setminus C_1)\cap\dots\cap (X\setminus C_n) = F\setminus (C_1\cup\dots\cup C_n) = \emptyset.$$ Now for each $i$, the closed set $C_i' = F\cap C_i$ is a proper subset of $F$, since $C_i\notin \Phi$. So $F = C_1'\cup \dots \cup C_n'$, contradicting irreducibility of $F$. 
Extending $\Phi_1$ to a complete type $p$, you can now check that $p$ is a generic point of $F$. Again, Pillay does not make this explicit, but the uniqueness of $p$ follows from the key fact (stated in the first paragraph of Section 1) that every definable set is a Boolean combination of open definable sets, so if $p\neq q$, one of $p$ or $q$ is contained in an open set not containing the other (i.e. the topology is $T_0$), so the closures of $p$ and $q$ cannot agree. This completes the proof.

Now I'd like to add that I would prefer to prove this theorem a different way. Stone duality for distributive lattices tells us that the category of distributive lattices is dual to the category of spectral spaces and spectral maps (also called coherent spaces and coherent maps) in a way that extends Stone duality for Boolean algebras. 
So let's say we have a sub-lattice $L$ of a Boolean algebra $B$ ($L$ is distributive, since $B$ is). Then in the inclusion $L\to B$ induces a (continuous) spectral map in the other direction $f\colon \mathrm{Spec}(B)\to \mathrm{Spec}(L)$, given by restricting a prime filter of $B$ to a prime filter of $L$. The map $f$ is always surjective: To see this, let $F$ be a prime filter in $L$, and $I$ its complementary prime ideal. Then check that $F\cup \{\lnot x\mid x\in I\}$ generates a proper filter in $B$ and hence can be extended to an ultrafilter containing $F$ and disjoint from $I$.
Now if, additionally, $f$ is injective, then we can identify the points of $\mathrm{Spec}(L)$ and $\mathrm{Spec}(B)$, and $\mathrm{Spec}(B)$ inherits the spectral topology from $\mathrm{Spec}(L)$. It's not hard to see that the following are equivalent:


*

*$f$ is injective 

*Whenever $p$ and $q$ are distinct ultrafilters in $B$, there is some $A$ in $L$ such that $A\in p \leftrightarrow A\notin q$.

*$L$ generates $B$ as a Boolean algebra.


Enough generalities now: Suppose $B$ is the Boolean algebra of formulas in some variable context, modulo provable equivalence (equivalently, the Boolean algebra of definable sets of $N^n$ for some $n$). Then $\mathrm{Spec}(B)$ is the usual Stone space of first-order types. 
If we specify a distinguished subset of these formulas, which are closed under equivalence and finite conjunctions and disjunctions (e.g. the definable open sets in an o-minimal theory), then we get a sub-lattice $L$ of $B$. If, moreover, $L$ generates $B$ as a Boolean algebra, i.e. every formula is equivalent to a Boolean combination of distinguished formulas (in the o-minimal context, this is the key fact referred to above), then the spectral topology on $\mathrm{Spec}(L)$ induces a spectral topology on $\mathrm{Spec}(B)$, where the points are types, and the basic open sets have the form $\{p\mid \varphi\in p\}$ whenever $\varphi$ is one of the distinguished formulas in $L$. In the o-minimal case, this is exactly the o-minimal spectrum as defined by Pillay.
