# Proving that functions send ultrafilter basis to ultrafilter basis

I'm currently revisiting a proof of Tychonoff's theorem via ultrafilters. The definitions we were working with are as follows,

• $$\mathcal{B}$$ is a basis for a filter $$\mathcal{F}$$ on a set $$X$$ if $$\mathcal{F} = \{A : B \subset A, \text{for some B \in \mathcal{B}}\}$$.
• an ultrafilter on a set $$X$$ is a filter $$\mathcal{F}$$ that is a maximal element of the set of filters on $$X$$, ordered by inclusion.

As an intermediate step, a lemma was left for the reader to prove:

Lemma. Let $$f : X \to Y$$ be a function. Then,

• if $$\mathcal{B}$$ is a basis for a filter on $$X$$, then $$f(\mathcal{B})$$ is a basis for a filter on $$Y$$

• if $$\mathcal{B}$$ is a basis for a filter on $$Y$$, then $$f^{-1}(\mathcal{B})$$ is a basis for a filter on $$X$$, provided that $$f^{-1}(B) \neq \emptyset$$ for all $$B \in \mathcal{B}$$.

• if $$\mathcal{B}$$ is a basis for an ultrafilter on $$X$$, then $$f(\mathcal{B})$$ is a basis for an ultrafilter on $$Y$$

I have managed to prove the first two stamentents, but I am struggling with the last one. Certainly $$f(\mathcal{B})$$ is a basis for a filter on $$Y$$, but why is this an ultrafilter?

I've attempted to assume the contrary and take a finer filter than the one generated by $$f(\mathcal{B})$$, in order to take preimages and contradict that $$\mathcal{B}$$ generates an ultrafilter, but I haven't been able to complete the proof.

For most purposes, the most useful characterization of ultrafilters is not as maximal filters but as filters with the property that for any $$A\subseteq X$$, either $$A$$ or $$X\setminus A$$ is in the filter. (Prove this is equivalent to maximality, if you haven't seen this! The key point is that if neither $$A$$ nor $$X\setminus A$$ is in the filter, you can add $$A$$ to get a larger filter.)
So, now suppose $$\mathcal{B}$$ is a basis for an ultrafilter on $$X$$. This means that for any $$A\subseteq X$$, there exists $$B\in \mathcal{B}$$ such that either $$B\subseteq A$$ or $$B\subseteq X\setminus A$$. So now, to prove that $$f(\mathcal{B})$$ is a basis for an ultrafilter, let $$A\subseteq Y$$ be arbitrary. We want to show there is $$B\in\mathcal{B}$$ such that either $$f(B)\subseteq A$$ or $$f(B)\subseteq Y\setminus A$$. Note that these inclusions are equivalent to $$B\subseteq f^{-1}(A)$$ or $$B\subseteq X\setminus f^{-1}(A)$$. So, we know there exists such a $$B$$ because $$\mathcal{B}$$ is a basis for an ultrafilter on $$X$$.
Assume $$\mathcal{B}$$ is a base for an ultrafilter $$\mathcal{U}$$.
By point 1 we know that $$f[\mathcal{B}]$$ generates a filter too, call it $$\mathcal{F}$$. Each $$F \in \mathcal{F}$$ contains some $$f[B]$$ for $$B \in \mathcal{B}$$ so $$f^{-1}[F]$$ is non-empty (it contains $$B$$) and so $$f^{-1}[\mathcal{F}]$$ generates a filter on $$X$$ by point 2.
If $$B \in \mathcal{B}$$ then $$f[B] \in f[\mathcal{B}]$$, so $$f[B] \in \mathcal{F}$$ and as $$B \subseteq f^{-1}[f[B]]$$, we have that $$f^{-1}[f[B]] \in \mathcal{U}$$, and as this also holds for all supersets of $$f[B]$$ we see that $$f^{-1}[\mathcal{F}] = \mathcal{U}$$. But this immediately implies that $$\mathcal{F}$$ is maximal and so $$f[\mathcal{B}]$$ is an ultrafilter base.