If $C$ is a finitely complete category (a category with all finite limits), then it is interesting to consider a left exact functor on $C$ (a functor that preserves all finite limits). Even if $C$ lacks some finite limits, then this concept still makes sense, but it may not be the correct one. Instead we use the stronger concept of a flat functor, which may be thought of as a functor that preserves all finite limits —even the ones that don't exist yet!
It turns out that the most appropriate generality in which to speak of a flat functor $C \to D$ is when $D$ is a site. We build up to this definition in stages through several more classical notions, remarking at each stage on some basic properties and equivalences. Proofs will be given in the following section.
The most classical notion is the following.
A functor $C\to Set$ is flat if the opposite of its category of elements, $el(C)^{op}$, is a filtered category.
For disambiguation with the later notions, we may refer to such a functor as being $Set$-valued flat.
Spelled out explicitly, this means that $E : C \to Set$ is flat precisely if the following three conditions hold.
(non-emptiness) There is at least one object $c \in C$ such that $E(c)$ is an inhabited set.
(transitivity) For objects $c,d \in C$ and elements $y \in E(c)$, $z \in E(d)$, there exists an object $b \in C$, morphisms $\alpha : b \to c$, $\beta : b \to d$ and an element $w \in E(b)$ such that $E(\alpha) : w \mapsto y$ and $E(\beta) :w \mapsto z$.
(freeness) For two parallel morphisms $\alpha, \beta : c \to d$ and $y \in E(c)$ such that $E(\alpha)(y) = E(\beta)(y)$, there exists a morphism $\gamma : b \to c$ and an element $z \in E(b)$ such that $\alpha \circ \gamma = \beta \circ \gamma$ and $E(\gamma) : z \mapsto y$.
When $C$ is small, a functor $F\colon C\to Set$ is $Set$-valued flat if and only if its Yoneda extension $[C^{op},Set] \to Set$ preserves finite limits.
This partially explains the terminology “flat”, since the Yoneda extension is a sort of tensoring with $F$, and a flat module is one such that tensoring with it preserves finite limits.
If $F\colon C\to Set$ is flat, then it preserves all finite limits that exist in $C$. Conversely, if $C$ has finite limits and $F$ preserves them, then it is flat.
A functor $F\colon C \rightarrow E$ is flat if for each object $e \in E$, the opposite comma category $(e / F)^{op}$ is a filtered category.
Since $(e/F)$ is equivalent to the category of elements of the composite $C \xrightarrow{F} E \xrightarrow{E(e,-)} Set$, this is equivalent to saying that $E(e,F-)\colon C\to Set$ is Set-valued flat for every $e\in E$. Hence, this notion of flatness may be called representably flat. Spelled out explicitly as we did above for flat set-valued functors, this means that for every $e\in E$, we have:
There is an object $c\in C$ and a morphism $e\to F(c)$.
For any $c,d\in C$ and morphisms $y:e\to F(c)$ and $z:e\to F(d)$, there exists an object $b\in C$, morphisms $\alpha : b \to c$, $\beta : b \to d$ in $C$, and a morphism $w: e\to F(b)$ such that $F(\alpha)\circ w = y$ and $F(\beta)\circ w = z$.
For two parallel morphisms $\alpha, \beta : c \to d$ in $C$, and a morphism $y : e \to F(c)$ such that $F(\alpha)\circ y = F(\beta)\circ y$, there exists a morphism $\gamma : b \to c$ in $C$ and a morphism $z : e \to F(b)$ such that $\alpha \circ \gamma = \beta \circ \gamma$ and $F(\gamma) \circ z = y$.
Representably flat functors are sometimes referred to simply as “left exact functors”. On the $n$Lab we try to generally reserve the latter terminology for the case when $C$ has finite limits.
A functor $F \colon C \to E$ between small categories is representably flat if and only if the operation $Lan_F\colon [C^{op}, Set] \to [E^{op},Set]$ of left Kan extension preserves finite limits.
A proof of this is given below as prop. 6.
If $F\colon C\to E$ is representably flat, then it preserves all finite limits that exist in $C$. Conversely, if $C$ has finite limits and $F$ preserves them, then it is representably flat.
If $C$ has finite limits, then a functor $C\to Set$ is representably flat if and only if it is Set-valued flat, if and only if it preserves finite limits.
However, if $C$ lacks finite limits, then representable flatness of $C\to Set$ can be stronger than Set-valued flatness.
Let $E$ be a cocomplete topos (for instance a Grothendieck topos). A functor $F\colon C\to E$ is flat if the statement “$F$ is $Set$-valued flat, def. 1.” is true in the internal logic of $E$.
Explicitly, this means that for any finite diagram $D\colon I\to C$, the family of factorizations through $\lim (F\circ D)$ of the $F$-images of all cones over $D$ in $C$ is epimorphic in $E$.
For disambiguation, this notion of flatness may be called internally flat since it refers to the internal logic of $E$. Internally flat functors have multiple other names:
Since the internal logic of $Set$ is just ordinary logic, a functor $C\to Set$ is internally flat just when it is $Set$-valued flat, def. 1.
More generally:
If $E$ has enough points, then $F$ is internally flat precisely if for all stalks $x^* : E \to Set$ the composite $x^* \circ F$ is $Set$-valued flat.
In a topos $E$ with enough points, a morphism $f : X \to Y$ is an epimorphism precisely if $x^* f$ is an epimorphism in $Set$. By definition, the stalks $x^* : E \to Set$ commute with finite limits.
When $C$ is small, a functor $F\colon C\to E$ is internally flat if and only if its Yoneda extension $[C^{op},Set] \to E$ preserves finite limits.
If $F\colon C\to E$ is internally flat, then it preserves all finite limits that exist in $C$. Conversely, if $C$ has finite limits and $F$ preserves them, then it is internally flat.
Finally, we can give the most general definition, due to Karazeris
Let $E$ be any site. A functor $F\colon C\to E$ is flat if for any finite diagram $D\colon I\to C$ and any cone $T$ over $F\circ D$ in $E$ with vertex $u$, the sieve
is a covering sieve of $u$ in $E$.
For disambiguation, we may refer to this notion as being covering-flat.
This subsumes the other three definitions as follows:
If $E=Set$ with its canonical topology, then covering-flatness reduces to Set-valued flatness, def. 1.
More generally, if $E$ is a cocomplete topos with its canonical topology, then covering-flatness reduces to internal flatness, def. 3.
On the other hand, if $E$ has a trivial topology, then covering-flatness reduces to representable flatness, def. 2.
If $C$ is a small category and $E$ is a small-generated site, then a functor $F \colon C \to E$ is covering-flat if and only if its extension $[C^{op}, Set] \to Sh(E)$ preserves finite limits.
If $F\colon C\to E$ is covering-flat, where $E$ has finite limits and all covering families in $E$ are extremal-epic, then $F$ preserves all finite limits that exist in $C$. Conversely, if $C$ has finite limits and $F$ preserves them, then it is covering-flat.
We now prove the asserted propositions about the equivalence of flatness with finite-limit-preserving extensions to presheaf categories.
When $C$ is small, a functor $F\colon C\to Set$ is Set-valued flat if and only if its Yoneda extension $[C^{op},Set] \to Set$ preserves finite limits.
This is prop. 6.1.3 in (Borceux).
When $C$ and $E$ are small, a functor $F \colon C \to E$ is representably flat if and only if its Yoneda extension $Lan_F\colon [C^{op}, Set] \to [E^{op},Set]$ preserves finite limits.
Since presheaf toposes have all colimits, $F_! = Lan_F$ is computed on any object $e \in E$ (as discussed at Kan extension) by the colimit
where $(e/F)$ is the corresponding comma category and $(e/F)^{op} \to C^{op}$ is the canonical projection.
Now, by definition $F$ being representably-flat means that $(e/F)^{op}$ is a filtered category. So this is a filtered colimit. By the discussion there, it is precisely the filtered colimits that commute with finite limits.
When $C$ is small and $E$ is a cocomplete topos, a functor $F\colon C\to E$ is internally flat if and only if its Yoneda extension $[C^{op},Set] \to E$ preserves finite limits.
This is VII.9.1 in Mac Lane-Moerdijk.
If $C$ is a site, $E$ is a sheaf topos, and $F\colon C\to E$ is internally flat, then the restriction of $[C^{op},Set] \to E$ to $Sh(C)$ still preserves finite limits, and it is cocontinuous just when $F$ preserves covering families. Since cocontinuous left-exact functors between sheaf toposes are precisely the inverse image parts of geometric morphisms, we conclude that cover-preserving internally-flat functors out of a site $C$ characterise geometric morphisms into $Sh(C)$. In other words, $Sh(C)$ is the classifying topos for such functors. This can be very useful when a Grothendieck topos has a presentation by a particularly simple site.
For $A$ a category the full subcategory
of the category of presheaves on $A$ (which is the free cocompletion of $A$) on the flat functors is the free cocompletion under filtered colimits. When regarded in this way, flat functors are also known as ind-objects.
$FlatFunc(A^{op},Set)$ has finite limits precisely if for every finite diagram $D$ in $A$, the category of cones on $D$ is filtered.
This is due to (KarazerisVelebil).
The following statement is known as Diaconescu's theorem, see there for more details. It says that the internally flat functors, def. 3 $F \colon C \to \mathcal{E}$ are precisely the inverse images of geometric morphisms from $E$ into the presheaf topos over $C$.
(Diaconescu’s theorem)
There is an equivalence of categories
between the category of geometric morphisms $f : \mathcal{E} \to PSh(C)$ and the category of internally flat functors $C \to \mathcal{E}$.
This equivalence takes $f$ to the composite
where $j$ is the Yoneda embedding and $f^*$ is the inverse image of $f$.
One says that $PSh(C)$ is the classifying topos for internally flat functors out of $C$.
Morphisms of sites are flat functors which additionally preserve covering families.
In
internally flat functors (“torsors”) are discussed around B3.2, and representably flat functors around C2.3.7.
In
$Set$-valued flat functors are discussed in VII.6, and internally flat functors in VII.8 (both called “filtering functors”).
In section 2 of
internally flat functors with values in a topos with enough points are discussed.
For the relationship between the various notions of flatness, and the notion of covering-flatness, see
Limits in the category of flat functors are discussed in
Discussion of left exact functors or flat functors in the context of (∞,1)-category theory is in