Simple proof about prime filters. Exercise. Let $F$ be an true filter in a set $X$. Show that $F$ is an ultrafilter ($\Leftrightarrow$ prime) iff a subset of $X$ intersects every set of $F$ then this same subset is in $F$.
UPDATE.
My attempt. $(\Rightarrow)$ Suppose $F$ is an ultrafilter. Then, we have that $A,B \in F \Rightarrow A \cap B \in F$ and $A \in F, A \subseteq B \Rightarrow B \in F$ by definition of a filter. Let $S \subset X$ s.t. $S \cap A \neq \emptyset$, $\forall A \in F$. This guarantees that there is another filter $F'$ s.t. $F \subseteq F'$ and $S \in F'$, but $F$ is maximal and thus $F=F'$, meaning $S \in F$, proving what's wanted.
$(\Leftarrow)$ Suppose now that the second condition is verified for every subset $S$ of $X$. By the same reasoning as before, we can guarantee that there exists a filter $F'$ s.t. $F \subseteq F'$ and $S \in F'$. If we show that $F=F'$ we have that $F$ is maximal, and that's what we want. Let's assume that $F \neq F'$, i.e., that there is a set $Z$ such that $Z \in F'$ and $Z \notin F$. Then we have: $(X\backslash Z)\cup Z = X \in F$ ($F$ is a filter). But this is equivalent to saying that $X\backslash Z \in F \vee Z \in F$ but $Z \notin F$ and thus $X \backslash Z \in F \Rightarrow X\backslash Z \in F'\Rightarrow Z \notin F'$ which is a contradiction. Thus $F=F'$ e so $F$ is maximal.
Is this formulation right? I have some issues understanding this basic concepts about filters and some of my proofs go wrong because of it. Thanks for all the help in advance.
 A: Your left to right direction ($\Rightarrow$) is correct, but it would be good if you justify the existence of $F'$ a bit more. For example, there is an easy explicit description in terms of $F$ and $S$:
$$
F' = \{A \subseteq X : S \cap B \subseteq A \text{ for some } B \in F\}.
$$
We call $F'$ the filter generated by $F \cup \{S\}$.
The right to left direction ($\Leftarrow$) needs work. To show that $F$ is maximal you have to show $F = F'$ for any (proper) filter $F'$ with $F \subseteq F'$. As you have currently written it, $F'$ is of a specific form (namely with $S \in F'$). Even though you do not use this in what follows, the reasoning still breaks down. The problem is in the step where you claim that "$(X \setminus Z) \cup Z \in F$ implies $X \setminus Z \in F$ or $Z \in F$". This is true for prime filters, but that is exactly what you have to prove (being prime is equivalent to being an ultrafilter, as you noted as well).
It might be good to have an example why this step generally breaks down. We consider $X = \mathbb{N}$ and we let $F$ be the filter of cofinite sets. That is, $A \in F$ if and only if $\mathbb{N} \setminus A$ is finite. It should be easy to verify that this is a filter. Now let $E \subseteq \mathbb{N}$ be the set of even numbers, and $O \subseteq \mathbb{N}$ be the set of odd numbers. Clearly $E \cup O = \mathbb{N}$, so $E \cup O \in F$, but at the same time $E \not \in F$ and $O \not \in F$.
So how do we prove the right to left direction? We can take your approach of proving maximality. So let $F'$ be a proper filter with $F \subseteq F'$. Let $S \in F'$, we need to show that $S \in F$ because then we can conclude that $F = F'$ and so $F$ must be maximal because $F'$ was an arbitrary filter containing $F$. By our assumption on $F$ it is enough to show that $A \cap S \neq \emptyset$ for all $A \in F$, because then we get $S \in F$. Can you now finish the proof, using that $F \subseteq F'$ and that $F'$ is a filter?
