Constructing a function from preimages This question was inspired by Can we build a continuous function from "fibers"/preimages defined over a topological base?
Let $X,Y$ be sets and $L\subseteq \mathcal{P}(Y)$. Suppose $L$ has the following properties:


*

*$\emptyset, Y\in L$;

*$L$ is closed under arbitrary unions and intersections.


Let $F: L\to \mathcal{P}(X)$ be a function such that 


*

*$F(\emptyset) = \emptyset$ and $F(Y) = X$;

*$F$ commutes with arbitrary unions and intersections.


Is there a function $f: X \to Y$ such that $f^{-1}(U) = F(U)$ for all $U\in L$?
 A: This is true. Note that it suffices to show that for any $x\in X$, the set $U_x:=\bigcap\limits_{U\in L,x\in F(U)}{U} \cap \bigcap\limits_{U\in L,x\notin F(U)}{(Y\setminus U)}$ is nonempty, since any map $f:X\rightarrow Y$ sending $x\in X$ to some element from $U_x$ does the job.
To show the nonemptiness of $U_x$, observe that $F(\bigcap\limits_{U\in L,x\in F(U)}{U})=\bigcap\limits_{U\in L,x\in F(U)}{F(U)}$ contains $x$ and that the whole intersection is empty if and only if we can write $\bigcap\limits_{U\in L,x\in F(U)}{U}$ as a union of subsets of the form $(\bigcap\limits_{U\in L,x\in F(U)}{U}) \cap V$ with $V\in L$ and $x\notin F(V)$. But since $F$ commutes with intersections and unions, this would imply $x\notin F(\bigcap\limits_{U\in L,x\in F(U)}{U})$, a contradiction.
EDIT: I just realized something else. Note that we used $\mathrm{AC}$ in the above proof in order to construct $f$ from the family $(U_x)_{x\in X}$. Conversely, if working in $\mathrm{ZF}$, one assumes the existence of an $f$ for each such $F$, then for any family $(M_i)_{i\in I}$ of nonempty sets, w.l.o.g. pairwise disjoint, setting $X:=\{M_i\mid i\in I\},Y:=\bigcup\limits_{i\in I}{M_i},L:=\{\bigcup\limits_{i\in J}{M_i}\mid J\subseteq I\}$ and $F(U):=\{M\in X\mid M\subseteq U\}$ for $U\in L$, we see that the corresponding $f$ is a choice function for $(M_i)_{i\in I}$. Hence this is yet another of the many equivalents of $\mathrm{AC}$.
