Foliations whose first Chern class is nef

Let $\mathcal{F}$ be a foliation on a projective manifold $X$ with $-K_{\mathcal{F}}$ nef. Assume that either $\mathcal{F}$ is regular, or it has a compact leaf. We prove that there is a locally trivial fibration $f\colon X\to Y$, and a foliation $\mathcal{G}$ on $Y$ with $K_{\mathcal{G}} \equiv 0$, such that $\mathcal{F} = f^{-1}(\mathcal{G})$.


INTRODUCTION
From the viewpoint of minimal model program, complex projective manifolds X could be classified according to the numerical behavior of their canonical classes K X . When K X ≡ 0, Yau proved the Calabi conjecture, which confirms the existence of Kähler-Einstein metrics on X. The universal cover of X then admits a decomposition, known as Beauville-Bogomolov decomposition (e.g. [Bea83]), as the product of an affine space, of holomorphic symplectic manifolds, and of simple Calabi-Yau manifolds.
In a more general setting, if we assume that −K X is nef, then Demailly-Peternell-Schneider conjectured an analogue uniformization. The conjecture was recently settled in [Cao19] and [CH19], based on the positivity of direct images established in [PT18]. More precisely, the universal cover of X is isomorphic to the product of an affine space, of holomorphic symplectic manifolds, of simple Calabi-Yau manifolds, and of a rationally connected projective manifold with nef anticanonical class.
In [Cao19] mentioned above, the Albanese morphism alb X : X → Alb(X) was investigated. When −K X is nef, such a morphism is known to be a fibration after [Zha96]. It was also proved that alb X is semistable in codimension one (see [Zha05]) and equidimensional (see [LTZZ10]). In particular, the relative canonical class K X/Alb(X) is the same as K F , the canonical class of the foliation F induced by foliation with nef aniticanonical class in Section 5. In the end, we will finish the proofs of the theorems in Section 6. Acknowledgment The author is very grateful to Jie Liu for inspiring conversations. He would like to thank Junyan Cao and Andreas Höring for remarks and comments. He would like to express his gratitude to Stéphane Druel for his enormous help in improving the presentation of the paper. He would like to thank the referee for reading the paper carefully and providing helpful suggestions. The author is supported by the National Key R&D Program of China (No. 2021YFA1002300).

FOLIATIONS
In this section, we gather some basic properties concerning foliations on complex algebraic varieties. For more details on the notion of foliations, we refer to [AD14,Section 3].
A foliation on a normal variety X is a coherent subsheaf F ⊆ T X , where T X = (Ω 1 X ) * is the reflexive tangent sheaf, such that (1) F is closed under the Lie bracket, (2) F is saturated in T X , that is, the quotient T X /F is torsion-free. The canonical class K F of F is any Weil divisor on X such that O X (−K F ) ∼ = det F . In particular, the first Chern class c 1 (F ) is equivalent to −K F . Let X • be the largest open subset of the smooth locus of X such that F | X • is a subbundle of T X • . The singular locus of F is defined to be X \ X • . When X = X • , we say that F is a regular foliation of X. A leaf of F is a maximal connected and immersed holomorphic submanifold i : L ֒→ X • such that the differential map di : T L → i * F is an isomorphism. A leaf is called algebraic if it is open in its Zariski closure in X. The foliation F is said to be algebraically integrable if its leaves are algebraic.
Let F be a codimension q foliation on an n-dimensional normal variety X. The normal sheaf N F of F is the reflexive hull (T X /F ) * * . The q-th wedge product of the inclusion N * F → (Ω 1 X ) * * gives rise to a non-zero global section ω ∈ H 0 (X, (Ω q X ⊗ det N F ) * * ), whose zero locus has codimension at least two in X. Moreover, ω is locally decomposable and integrable. To say that ω is locally decomposable means that, in a neighborhood of a general point of X, ω decomposes as the wedge product of q local 1-forms ω = ω 1 ∧ · · · ∧ ω q . To say that it is integrable means that for this local decomposition one has dω i ∧ ω = 0 for every i ∈ {1, ..., q}.
The integrability condition for ω in the previous paragraph is equivalent to the condition that F is closed under the Lie bracket. Conversely, let L be a reflexive sheaf of rank one on X, and let ω ∈ H 0 (X, (Ω q X ⊗ L) * * ) be a global section whose zero locus has codimension at least two in X. Suppose that ω is locally decomposable and integrable. Then the kernel of the morphism T X → (Ω q−1 X ⊗ L) * * given by the contraction with ω defines a foliation of codimension q on X. These constructions are inverse of each other.
Let X and Y be normal varieties, and let ϕ : X Y be a dominant rational map that restricts to a morphism f • : X • → Y • , where X • ⊆ X and Y • ⊆ Y are smooth open dense subsets. Let G be a foliation on Y. Then the pullback foliation Assume that F is an algebraically integrable foliation on a normal variety X. Then there is a unique normal variety V in the normalization of the Chow variety of X, whose general points parametrize the closures of general leaves of F . Let U be the normalization of the universal family over V. Then the natural projective fibration U → V is called the family of leaves of F . For more details, see for example [AD13, Lemma 3.2].
As a consequence, a foliation F is algebraically integrable if and only if there is a dominant rational map ϕ : X Y to a normal variety such that F = ϕ −1 0 Y , where 0 Y is the foliation by points on Y. In this case, we say that F is the foliation induced by ϕ.
For foliations induced by equidimensional fibrations, we have the following fact.
Lemma 2.1. Let ϕ : X → Y be an equidimensional morphism between normal varieties, and F the foliation induced. Let Y ′ → Y be a finite dominant morphism with Y ′ normal. Let X ′ be the normalization of X × Y Y ′ . If F ′ is the foliation induced by the natural projection X ′ → Y ′ , and if p : X ′ → X is the natural finite morphism, then K F ′ = p * K F .
Proof. Let D be any prime divisor in X. We only need to show that K F ′ = p * K F around a general point of p −1 (D).
If D is not contained in the branched locus of p, then p is locally a diffeomorphism around a general point of p −1 (D). Thus K F ′ = p * K F around a general point of p −1 (D).
Assume that D is contained in the branched locus of p. In this case, D must be F -invariant by the construction of X ′ . We can then apply [Dru21, Lemma 3.4] to show that K F ′ = p * K F around a general point of p −1 (D). This completes the proof of the lemma.
Let F be a foliation on a normal variety X. There exist a normal variety Y, unique up to birational equivalence, a dominant rational map with connected fibers ϕ : X Y, and a foliation G on Y, such that the following properties hold.
(1) G is purely transcendental, that is, there is no positive-dimensional algebraic subvariety through a general point of Y which is tangent to G.
The foliation induced by ϕ is called the algebraic part of F . For more details, see [LPT18, Section 2.3].
We will need the following lemma for the proofs of the main theorems.
Lemma 2.2. Let f : X → Y be a smooth dominant morphism between complex manifolds. Let H be a foliation on X whose rank is equal to dim Y. Let q : Y ′ → Y be a finite surjective morphism with Y ′ smooth, and let f ′ : X ′ → Y ′ be the base change of f over Y ′ .
Let H ′ = f −1 H be the pullback foliation. If H ′ is regular and transverse to every fiber of 4 f ′ , then H is regular and transverse to every fiber of f .
We first notice that it suffices to prove the assertion in codimension one of X. Indeed, let U ⊆ X be an open subset whose complement has codimension at least two in X. If we can prove that H| U is transverse to T X/Y | U , that is T U = T X/Y | U ⊕ H| U , then we must have T X = T X/Y ⊕ H, for H, T X/Y and T X are all reflexive sheaves (see [Har80,Proposition 1.6]). Since f is a smooth morphism, T X/Y is locally free. Thus this decomposition of T X will imply that H is regular and transverse to all fibers of f . Hence by shrinking X, we may assume that H is a subbundle of T X . Let D ⊆ X be the branched locus of p. Then by assumption, we see that none of the components of D is H-invariant. Therefore, thanks to [Dru21, Lemma 3.4], we get p * (det N H ) ∼ = det N H ′ , where N H and N H ′ are the normal bundles of H and H ′ respectively. Let x ∈ X be a point. We will show that T X/Y and H are transverse at x. The problem is now local around x. By shrinking X around x, we may assume that there is a nowhere vanishing holomorphic (n − d)-form ω such that H is the kernel of the contraction by ω. Then the conclusion of the previous paragraph implies that ω ′ = p * ω is nowhere vanishing.
It remains to show that, for every local smooth vector field v on X, nowhere vanishing and with values in T X/Y , the contraction v ω is nowhere vanishing. Since f ′ is the base change of f , it follows that there is a smooth vector field v ′ on X ′ , nowhere vanishing and with values in T X ′ /Y ′ , such that dp(v ′ ) = v. Moreover, by assumption, v ′ ω ′ is nowhere vanishing. Since v ′ ω ′ = p * (v ω), it follows that v ω is nowhere vanishing. This completes the proof.

NUMERICALLY FLAT VECTOR BUNDLES ON COMPLEX MANIFOLDS
The notion of numerically flat vector bundles was introduced in [DPS94]. It plays an important role in the proof of locally trivial fibrations. A vector bundle E on a projective manifold is numerically flat if both E and E * are nef. We recall the following criterion of numerically flat vector bundles for reflexive sheaves (see [BS94, Corollary 3] and [Nak04, Theorem IV.4.1]) Theorem 3.1. Let X be a projective manifold of dimension n and E a reflexive sheaf on X. Let H be an ample divisor in X. Then E is a numerically flat vector bundle if and only if the following conditions hold.
A torsion free (coherent) sheaf E on a complex Kähler manifold (Y, ω) is called weakly positively curved if the following statement holds. Let Y • be the locally free locus of E . For every ǫ > 0, there is a possibly singular Hermitian metric Lemma 3.2. Let E be a torsion free weakly positively curved sheaf on a projective manifold X. Let A be an ample divisor and a > 0 an integer. Then there exists an integer m > 0, such that the natural evaluation map Proof. We follow the lines of [Pȃu16, Theorem 2.21]. We denote by X E the locally free locus of E . Let µ : Y → P(E ) be a desingularization of the main component of P(E ), which is an isomorphism over X E . We set P the pullback of the tautological Since E is weakly positively curved, L| Y 1 admits a possibly singular metric h L which has semipositive curvature. Moreover, h L is bounded along a general fiber Y x of f . In particular, the multiplier ideal sheaf of h ⊗k L | Y x is trivial for any integer k large enough. Arguing as in [Pȃu16, Theorem 2.21], we obtain that for some integer k large enough, the reflexive sheaf is generated by global sections over some open dense subset of X. We can then deduce the lemma by letting m = 2k.
The following assertion is an extension of [CH19, Proposition 2.11].
Lemma 3.3. Let X be a projective manifold and E a reflexive sheaf on X with c 1 (E ) = 0. Let X 0 ⊆ X be an open subset whose complement has codimension at least 2. Assume that E is locally free over X 0 . Let Y = P(E | X 0 ) and L the tautological line bundle. If the diminished base locus B − (L) is not surjective onto X 0 , then E is a numerically flat vector bundle.
Remark 3.4. We note that, in the previous lemma, even though Y is only quasiprojective, we can define B − (L) in the following way. Let A be an ample divisor in X and f : Y → X the natural morphism. Then we set Here, for any line bundle M on Y, Bs(M) is the base locus of H 0 (Y, M), regarded as a closed subset of Y. Then we see that, the locus B − (L) is not surjective onto X 0 if and only if for any integer a > 0, there exists an integer m > 0, such that the natural evaluation map Proof of Lemma 3.3 . We may assume that dim X 2. We may also assume that X 0 is the locally free locus of E . Since E is reflexive, the complement of X 0 has codimension at least 3. Let H be an ample enough divisor in X and S the complete intersection surface of very general elements of the linear system |H|. Then S ⊆ X 0 6 and E | S is a vector bundle. By Theorem 3.1 and Mehta-Ramanathan theorem, it is enough to show that E | S is numerically flat. The assumptions in the lemma imply that the diminished base locus of O P(E | S ) (1) is not surjective onto S. Hence E | S is numerically flat by [CH19, Proposition 2.11].
As pointed out in the paragraph after [Sim92, Corollary 3.10], Simpson proved that a numerically flat vector bundle is indeed flat. In general, there may exist non isomorphic flat structures on a holomorphic vector bundle (see Example 3.7 below). In the following Theorem 3.5, we underline a "canonical" flat structure on a numerically flat vector bundle. In the remainder of this paper, we will work with it for any numerically flat vector bundle. We note that, such a flat structure is exactly the one obtained from the correspondence in [Sim92, Section 3].
We recall some basic results about connections on complex vector bundles. Let ∇ be a smooth connection on a smooth complex vector bundle Q on a complex manifold. If the curvature of ∇ 0,1 is zero, then ∇ determines a holomorphic bundle structure F on Q such that ∇ 0,1 =∂ F . Conversely, every holomorphic vector bundle F admits a smooth connection such that ∇ 0,1 =∂ F . For more details, see [Kob14, Section 1.3].
A holomorphic vector bundle on a compact Kähler manifold is called Hermitian flat if it admits a Hermitian metric whose Chern connection is flat. In this case, this connection is also the Hermitian-Yang-Mills connection, which is unique.
Let E be a numerically flat vector bundle on a projective manifold X. Thanks to [DPS94, Theorem 1.18], there is a sequence of holomorphic subbundles is a Hermitian flat vector bundle with the unique Hermitian flat connection ∇ i . Such a filtration always splits as smooth complex vector bundle. Hence if we set Q = k i=1 G i , then Q is isomorphic to E as smooth vector bundles. Thus in the following theorem, to construct a connection on E , we work with Q.
Theorem 3.5. With the notation above, there is a unique flat connection ∇ F on the complex vector bundle Q such that (1) ∇ F induces a holomorphic structure F on Q, which is isomorphic to E as holomorphic vector bundles; The existence of ∇ F goes back to [Sim92, Section 3]. We also refer to [Den21, Section 3] for a more explicit construction. For the uniqueness, we will prove by induction on the length k of the filtration. If k = 1, then the connection is the unique Hermitian flat connection. Now we assume the uniqueness for lengths smaller than k. Let ∇ a and ∇ b be two connections on Q which satisfy the conditions. By assumption, ∇ a and ∇ b induce isomorphic holomorphic structures. Such an isomorphism corresponds to some smooth automorphism ϕ of Q. By induction, its restrictions on k−1 i=1 G i and on k i=2 G i are the identity maps. Therefore, item (2) of the theorem implies that there is some smooth function η with values in G * k ⊗ G 1 such that ϕ is of the shape where we view η as a smooth endomorphism of Q. Hence we have The conditions on flatness imply that ∇ k→1 δ = 0.
Since ∇ k→1 is a Hermitian flat connection, the ∂∂-lemma implies that δ = 0. Hence Remark 3.6. We note that Theorem 3.5 holds for any filtration Hermitian flat. Indeed, we will prove later that the connection in the theorem is independent of the choice of the filtration, see Corollary 3.10 and Remark 3.11 below.
Example 3.7. In general, a holomorphic vector bundle may have non isomorphic flat structures, all compatible with the holomorphic structure. Let X be an elliptic curve and E = O X ⊕ O X . We write e 1 and e 2 for the generators of the two summand of E . We note that Ω 1 For any constant holomorphic 1-form s ∈ H 0 (X, Ω 1 X ), we can define a flat connection ∇ s on E as follows, where f , g are arbitrary smooth functions on X. Then (E , ∇ s ) is isomorphic to (E , ∇ 0 ) as flat vector bundles if and only if s = 0. Furthermore, the unique connection satisfying the conditions of Theorem 3.5 is ∇ 0 .
Until the end of this paper, a connection on a holomorphic vector bundle is always assumed to be compatible with the holomorphic structure. We say that a flat connection on a numerically flat vector bundle E satisfies the conditions of Theorem 3.5 if it is induced by the isomorphism E ∼ = F of Theorem 3.5.
Lemma 3.8. Let E be a numerically flat vector bundle on a projective manifold X. Let ∇ E be a flat connection on E which satisfies the conditions of Theorem 3.5. Then any section is an irreducible Hermitian flat vector bundle with connection ∇ i . We will prove by induction on the length k. If E is irreducible Hermitian flat, then it is slope stable. Hence either E ∼ = O X or s = 0. In both cases, s is constant and ∇ E s = 0. Now we assume the statement is true for lengths smaller than k. We have the exact sequence as it is an irreducible Hermitian flat vector bundle which admits a nonzero global holomorphic section. In this case, the exact sequence above splits and E ∼ = E k−1 ⊕ G k as holomorphic vector bundles. We can decompose s = s ′ + s ′′ according to this direct sum. From the item (3) of Theorem 3.5, we see that It is indispensable to specific the connection in Lemma 3.8. For instance, we consider a flat vector bundle (E , ∇ s ) on an elliptic curve X defined in Example 3.7, such that s is a nonzero constant holomorphic 1-form. The generator e 2 can be view as a section e 2 ∈ H 0 (X, E ). Then ∇ s e 2 = se 1 is not zero. That is, e 2 is not parallel with respect to ∇ s . Corollary 3.10. Let ϕ : E → G be a generically surjective morphism between numerically flat vector bundles on a projective manifold X. Then ϕ is surjective.
Assume further that E and G are equipped with flat connections ∇ E and ∇ G respectively, which satisfy the conditions of Theorem 3.5. Then ϕ is a morphism of flat vector bundles.
Proof. To prove that ϕ is surjective, it is enough to show that the induced morphism does not vanish at any point of X. Here l is the rank of G. Since (det G * ) ⊗ ( l E ) is numerically flat, hence nef, the statement follows from [DPS94, Lemma 1.16].
For the second part of the corollary, we may identify ϕ as an element of H 0 (X, E * ⊗ G). If 0 = E 0 ⊆ · · · ⊆ E k = E * and 0 = F 0 ⊆ · · · ⊆ F l = F are filtrations whose graded pieces are Hermitian flat vector bundles, then we have a filtration Furthermore, for each s we have, As a result, the graded pieces of the filtration {G s } are Hermitian flat vector bundles. We can then verify that the tensor connection ∇ E * ⊗G on E * ⊗ G satisfies the conditions of Theorem 3.5 as well. Hence Lemma 3.8 implies that ϕ is parallel with respect to ∇ E * ⊗G . It follows that, for any local smooth section σ of E , we have In another word, ϕ is a morphism of flat vector bundles.
Remark 3.11. If we take ϕ as the identity endomorphism of E in the previous corollary, then we may deduce that a connection satisfying the conditions of Theorem 3.5 is unique, independent of the choice of the filtration {E i }.
The lemma below reveals a relation between locally trivial families and flat holomorphic vector bundles.
Lemma 3.12. Let (E , ∇ E ) be a flat vector bundle on a complex manifold X. Assume that there is a surjective morphism of graded commutative O X -algebras p 0 such that Q 0 = O X and that each graded piece Sym p E → Q p is a morphism of flat vector bundles. Then is a locally trivial family over X. Moreover, the connection ∇ E induces a foliation G on Z such that T Z = G ⊕ F , where F is the foliation induced by f .
Proof. We consider the following commutative diagram, where the vertical arrows are product maps Since the horizontal maps and the first vertical map are morphisms of flat vector bundles, and since the horizontal maps are surjective, we see that Q i ⊗ Q j → Q i+j is a morphism of flat vector bundles as well.
Let π : X → X be the universal cover of X. Then the connection ∇ E determines isomorphisms π * E ∼ = E ⊗ O X and π * Q p ∼ = Q p ⊗ O X , where E and Q p are complex vector spaces equipped with π 1 (X)-actions. Moreover, under these isomorphisms, the natural morphism p 0 Let I be the kernel of the previous morphism and Then F is the subvariety of P(E) with graded ideal I. Since I is stable under the π 1 (X)-action, we see that F is stable under the natural π 1 (X)-action on P(E).
Hence we obtain an induced polarized π 1 (X)-action on F. Moreover, there is a π 1 (X)-equivariant isomorphism Z × X X ∼ = F × X. This shows that Z is locally trivial. The relative tangent bundle G of the natural projection F × X → F is π 1 (X)-equivariant. Hence it descends to a foliation G on Z. Furthermore, we have T Z = G ⊕ F .
Remark 3.13. The foliation G in the previous lemma has the following alternative description. The flat connection ∇ E induces a flat Ehresmann connection on P(E ), which can be viewed as a foliation H on P(E ). By construction, we have a natural embedding Z → P(E ) of fiber bundles over X. Then H induces an Ehresmann connection on Z, which is exactly G.
The following proposition on representations of fundamental groups is an application of [Kol93, Theorem 4.8].
Proposition 3.14. Let f : X → Y be a proper fibration between smooth complex algebraic varieties. Assume that for every prime divisor B in Y, there is an irreducible component of f * B which is reduced and dominates B. Let ξ be a linear representation of the fundamental group π 1 (X). If ξ induces trivial representation on general fibers of f , then ξ factors through π 1 (Y).
Proof. By removing some closed subset of codimension at least 2 in Y, we may assume that f is equidimensional. Let F be a general fiber of f , and H ⊆ π 1 (X) the intersection of all normal subgroups of finite index which contain the image of π 1 (F). Since a linear group is residually finite, and since Ker(ξ) contains the image of π 1 (F), we obtain that H ⊆ Ker(ξ).
We write K the kernel of the surjective morphism θ : π 1 (X) → π 1 (Y). The proposition is equivalent to show that K ⊆ Ker(ξ).
From the previous discussion, it is enough to show that K ⊆ H. Let G ⊆ π 1 (X) be a normal subgroup of finite index which contains H. We need to show that it contains K. Let p : X(G) → X be the finite étale cover corresponding to G, and π : Y(G) → Y the normalization of Y in function field of X(G). Since G contains the image of π 1 (F), the morphism p is a trivial cover over F. By assumption, for any prime divisor B in Y, the pullback f * B has a reduced component. It follows from [Kol93, Lemma 4.8.4] that π is étale (we note that the proof of [Kol93, Lemma 4.8.4] does not require Y to be proper). Then π corresponds to a subgroup M ⊆ π 1 (Y) of finite index . Since p is a trivial cover over F, it follows that X(G) ∼ = X × Y Y(G). Therefore G = θ −1 (M), and hence it contains K. This completes the proof.
We also need the following lemma for the proofs of the main theorems.
Lemma 3.15. Let f : X → Y be a surjective morphism between smooth quasi-projective varieties. Assume that its general fibers are proper connected. Let V and W be two vector bundles on Y. If there is an isomorphism ϕ : f * V ∼ = f * W on X, then ϕ descends to an isomorphism η : V ∼ = W on Y.
Proof. We only need to show that ϕ descends to a morphism η : V → W on Y.
Indeed, since f : X → Y is surjective, if η exists, then it must be an isomorphism.
The morphism ϕ can be viewed as an element in H 0 (X, f * (V * ⊗ W)). By the projection formula, we have Let V ⊆ Y be any non empty open subset and U = f −1 (V). We consider a holomorphic function σ on U. By assumption, there is an open dense subset V 0 ⊆ V such that f has proper connected fibers over V 0 . Hence σ| U 0 descends to a holomorphic function µ 0 on V 0 , where U 0 = f −1 (V 0 ). We have to show that µ 0 can be extended to a holomorphic function µ on V. By Riemann's Removable Singularity theorem, it is enough to show that µ 0 is locally bounded over V. We also note that, by Hartogs' theorem, we may shrink V and assume that f is equidimensional.
Let y ∈ V be a point. Let Z ⊆ X be the complete intersection of general very ample divisors such that dim Z = dim Y. By shrinking V around y if necessary, we may assume that Z ∩ U is quasi-finite over V. Then the morphism is an open morphism, with respect to the analytic Euclidean topology. Let x ∈ Z ∩ U be a point lying over y, and U ′ ⊆ Z ∩ U an Euclidean open neighborhood of x. Then V ′ = f (U ′ ) is an Euclidean open subset of V containing y. Since σ is holomorphic, we may assume that σ| U ′ is bounded. Hence µ 0 | V 0 ∩V ′ is bounded. That is, µ 0 is bounded around y. This completes the proof.

ALGEBRAICALLY INTEGRABLE FOLIATIONS WITH SEMISTABLE LEAVES AND NEF ANTICANONICAL CLASSES
Algebraically integrable foliations with nef anticanonical classes induced by rational maps which are semistable in codimension one are well studied in [Cao19], [CH19] and [CCM19]. Their results are crucial for the proofs of the main theorems in the present paper. For the reader's convenience, we summarize some of them here.
Throughout this section, we consider the following situation. The morphism ϕ : Γ → Y is a fibration between projective manifold, and π is a birational morphism onto a normal projective variety X.
We make the following assumptions.
(1) The π-exceptional locus E is pure of codimension one, and it does not dominate the base Y.
(3) There is a π-exceptional Q-divisor E ′′ such that (4) For every prime divisor B ⊆ Y, any non reduced component of ϕ * B is πexceptional. (5) There is a finite group G acting on the varieties Γ, Y and X, such that the morphisms ϕ and π are G-equivariant. Furthermore, the quotient X/G is Qfactorial.
We recall that a prime divisor in Γ is ϕ-exceptional if its image has codimension at least two in Y. If E ′′ = ∑ a i E i is the decomposition into prime divisors, then we set |E ′′ | = ∑ |a i |E i . The main objective of this section is to prove the following proposition.
Proposition 4.1. With the assumption above, for every prime divisor B ⊆ Y, there is at most one irreducible component of ϕ −1 (B) which is not contained in the π-exceptional locus.
The proof of the proposition will be postponed to the end of the section. We fix a sufficiently ample, G-invariant divisor A in Γ, so that it is ϕ-relatively very ample, and that for each p 1, the natural morphism Zariski open subset such that the following properties hold.
• For any prime divisor B ⊆ Y, the preimage ϕ −1 (B) is contained in the πexceptional locus if and only if B ⊆ Y \ Y 0 .
Remark 4.2. In [CCM19, Section 3], Y 0 is defined as the largest open subset which satisfies the properties. However, for later use in this paper, we need to remove from Y 0 some closed subset of codimension at least two. Therefore we define Y 0 in this way.

Lemma 4.3 ([CCM19, Lemma 3.5] )
. Let L be a ϕ-relatively big Cartier divisor in Γ and P a Q-divisor in Y. Assume that L − ϕ * P is pseudoeffective. Then for any large enough integer c, ϕ * O Γ (L + cE ′′ ) − P is weakly positively curved if it is not zero. That is, for a fixed Kähler form ω Y on Y, for a real number ǫ > 0, there is a possibly singular Hermitian metric h ǫ on ϕ over the locally free locus of ϕ * O Γ (L + cE ′′ ). Here β is a smooth closed (1, 1)-form representing P.
Lemma 4.4. Let L be a ϕ-relatively big, G-invariant divisor in Γ, and let m > 0 be an integer. Then the Q-divisor is the sum of a pseudoeffective divisor and a π-exceptional divisor. Here r is the rank of ϕ * O Γ (L + mE).
Proof. Let A Y be a G-invariant ample divisor in Y. At the end of the proof of [CCM19, Lemma 3.6], it was shown that, for any integer p > 0, there is an effective π-exceptional divisor F p such that the Q-divisor is Q-linearly equivalent to an effective divisor H p . Replacing F p by the sum of its G-orbits, we may assume that F p is G-invariant. Since L and E are G-invariant, 13 and since ϕ is G-equivariant, we see that, for any element g ∈ G, there is a linear equivalence c 1 (ϕ * O Γ (L + mE)) ∼ g * c 1 (ϕ * O Γ (L + mE)).
Hence, replacing c 1 (ϕ * O Γ (L + mE)) by we may assume that it is represented by a G-invariant Q-divisor. It then follows that H p ∼ Q g * H p for any g ∈ G. Replacing H p by 1 |G| ∑ g∈G g * H p , we may assume that it is G-invariant as well.
Let ρ : Γ → X/G and q : X → X/G be the natural morphisms. We see that ).

It follows that
By tending p to the infinity, we deduce that D is pseudoeffective. Since X/G is Q-factorial, we conclude that there is some π-exceptional divisor F such that This completes the proof of the lemma.
Lemma 4.5. There is some positive integer m 0 such that for any integer m m 0 , the torsion-free sheaf ϕ * O Γ (A + mE) has the same rank r m 0 . Moreover, for any effective π-exceptional divisor E, the natural morphism is an isomorphism over Y 0 .
Proof. The fact that the ranks are constant follows from the assumption that E does not dominates Y. For the second assertion, it is enough to apply item (ii) of [CCM19, Proposition 3.7] by letting p = 1.
Lemma 4.6. We set M = A + m 0 E. Let p > 0 be an integer and s the rank of ϕ * O Γ (pM)). Then for any effective π-exceptional divisor E, is the sum of a pseudoeffective divisor and a divisor supported in Y \ Y 0 .
Proof. By replacing A by pA in Lemma 4.5, we deduce that there is an integer k > 0 such that if m k, then the morphism is an isomorphism over Y 0 . Since E is π-exceptional, it does not dominate Y by assumption. Therefore ϕ * O Γ (pM + pkE) has the same rank as ϕ * O Γ (pM), which is s. By applying Lemma 4.4 (with L = pM), there is some integral effective π-exceptional divisor Q such that the Q-divisor is pseudoeffective. Hence by Lemma 4.3, there is some integer c > 0 such that is weakly positively curved. That is, for a fixed Kähler form ω on Y, for each ǫ > 0, there is some possibly singular Hermitian metric h ǫ on ϕ over the locally free locus of ϕ * O Γ (M + kE + Q + cE ′′ ), where β is a smooth (1, 1)from representing 1 ps c 1 (ϕ * O Γ (pM + pkE)). By taking the determinant, we obtain that is pseudoeffective. Then is pseudoeffective as well. By Lemma 4.5, we see that is the sum of a pseudoeffective divisor and a divisor supported in Y \ Y 0 . Finally, if E is an arbitrary effective π-exceptional divisor, then there is some integer k ′ k such that E pk ′ E. It follows that is effective. From the assumption of the first paragraph, we see that is the sum of a pseudoeffective divisor and a divisor supported in Y \ Y 0 . 15 We define the following Q-divisor on Γ By Lemma 4.4, there is some integral π-exceptional effective divisor F such that A + F is pseudoeffective.
Lemma 4.7. With the notation above, let p > 0 be an integer. Then the direct image is weakly positively curved for any integer c large enough. Moreover, c 1 ((ϕ * V ) * * ) is supported in the π-exceptional locus, in the following sense. For any ample divisors D 1 , ..., D n−1 on X, we have where n is the dimension of Γ.
Proof. Since A + F is pseudoeffective, by Lemma 4.3, the direct image is weakly positively curved for any large enough integer c. We note that there is a natural injective morphism which is generically an isomorphism. Hence V is weakly positively curved as well by [CH19, Proposition 2.5].
By applying the projection formula, this implies that where s is the rank of V. By Lemma 4.6, we obtain that −c 1 (V ) is the sum of a pseudoeffective divisor and some divisor supported in Y \ Y 0 . Since every ϕexceptional divisor is also π-exceptional, and since every divisor in Γ lying over Y \ Y 0 is π-exceptional, it follows that both c 1 ((ϕ * V ) * * ) and −c 1 ((ϕ * V ) * * ) can be written as the sum of a pseudoeffective divisor and a π-exceptional divisor. Therefore c 1 ((ϕ * V ) * * ) · π * D 1 · · · π * D n−1 = 0 for any ample divisors D 1 , ..., D n−1 on X.
We can then deduce the following corollary. The additional condition c i + c j c i+j can be obtained by induction on p.
Corollary 4.8. We set c 0 = 0. There is a sequence {c p } p>0 of nonnegative integers such that the direct image sheaves are weakly positively curved. Moreover, c 1 ((ϕ * V p ) * * ) is supported in the π-exceptional locus, and c i + c j c i+j for any i, j 0.
Remark 4.9. The sheaves V p carry geometric properties of Γ as follows. Let for all p 0. Then V p can be viewed as the complete ϕ-relative linear system of the divisor L p . In particular, V 1 induces a rational map g : Γ P(V 1 ). Since A is sufficiently ample on general fiber of ϕ, and since neither E ′′ nor F dominates Y, we see that L 1 is sufficiently ample on general fibers of ϕ. It follows that g is a birational map to its image. We denote by Z the (closure of the) image of g. We have the following morphisms of graded O Y -algebras p 0 If A is the image of the first arrow above, then Z ∼ = Proj O Y A. In general, it is not trivial to compute A and hence Z. In the situations considered in this paper, we manage to prove that A = p 0 V p over some open dense subset of Y.
Corollary 4.10. Assume that Γ = X and that ϕ is equidimensional. Then X is a locally trivial family over Y.
Proof. Under the assumption, F and E ′′ are all zero. Let L p = pr m 0 ( A) for all p 0. Then L 1 is ϕ-relatively very ample, L p = pL 1 , and Γ ∼ = Proj O Y p 0 V p . Moreover, thanks to Corollary 4.8, each V p is reflexive, weakly positively curved, and with zero first Chern class. Hence they are numerically flat vector bundles by [CCM19, Proposition 2.6]. We note that the morphism Sym p V 1 → V p is surjective for all p since A is sufficiently ample. Thus Γ = Proj O Y p 0 V p is a locally trivial family after Lemma 3.12. This completes the proof of the corollary. Now we will prove Proposition 4.1.
Proof of Proposition 4.1 . We write L p = c p |E ′′ | + pr m 0 ( A + F) for every integer p 0. Then pL 1 L p for all p by construction. We denote by U p the direct image sheaf ϕ * O Γ (pL 1 ). Then there are natural morphisms of coherent sheaves on Y Since L 1 is sufficiently ample on general fiber of ϕ, and since E ′′ does not dominate Y, we see that the morphisms above are generically surjective.
We recall the assumption that every ϕ-exceptional divisor is π-exceptional. Let C ⊆ Γ be the strict transform of a very general complete intersection curve in X. Then ϕ * V p and ϕ * U p are all locally free around C and c 1 (ϕ * V p | C ) = 0. Let j : C → Y be the natural morphism. Then the weakly positively curved sheaves j * V p are numerically flat vector bundles by [CH19, Proposition 2.11]. We may assume that they are flat bundles with connections satisfying the conditions of Theorem 3.5. Therefore the generically surjective morphisms j * Sym p V 1 → j * V p must be surjective by Corollary 3.10. As a consequence, the morphisms j * Sym p V 1 → j * U p are surjective morphisms between numerically flat vector bundles as well, and j * U p ∼ = j * V p . Then by Corollary 3.10 and Lemma 3.12, the variety is a locally trivial family over C.
Let Γ C = Γ × Y C. We consider the following commutative diagram.
There are natural injective morphisms which are all generically surjective. Indeed, j * U p can be viewed as a linear subsystem of the ϕ-relative complete linear system (ϕ C ) * (i * O Γ (pL 1 )). We obtain hence a rational map Since L 1 is the sum of a ϕ-relatively sufficiently ample divisor, and an effective π-exceptional divisor, it follows that the ϕ-relative linear system U 1 separates points of Γ lying outside the π-exceptional locus. Thus, if D C is a prime divisor in Γ C which is contracted by g C , then i(D C ) is contained in the π-exceptional locus. We also remark that general fibers of ϕ C and general fibers of U C → C are the same. Hence every fibers of the locally trivial family U C → C is irreducible. Thus, for every point c ∈ C, the fiber ϕ −1 C {c} has at most one irreducible component which is not g C -exceptional. In conclusion, such a fiber has at most one irreducible component which is not contained in the π-exceptional locus.
For a prime divisor B ⊂ Y, if B ∩ Y 0 = ∅, we denote by B 1 , ..., B t the irreducible components of ϕ * B. Assume that B 1 is not contained in the π-exceptional locus. Then B 1 dominates B. Since C is very general, we may assume that j(C) meets a general point of B. The previous paragraph then implies that, for i = 1, either B i ∩ Γ C is contained in the π-exceptional locus, or B i is ϕ-exceptional. In the later case, B i is also π-exceptional. If B is contained in Y \ Y 0 , then ϕ −1 (B) is contained in the π-exceptional locus by assumption. This completes the proof.

CONSTRUCTION OF SEMISTABLE REDUCTIONS
Throughout this section, let F be an algebraically integrable foliation on a projective manifold X with −K F nef. Assume that F has a compact leaf. Let f : U → V be the family of leaves, with U and V normal.
Then f is smooth over some open dense subset of V. The goal of this section is to construct an appropriate semistable reduction, which will serve the proofs of the main theorems. We first observe the following statement.
Lemma 5.1. With the notation above, for any prime divisor B ⊆ V, then e( f −1 (B)) has at most one irreducible component of codimension one.
Proof. By [AK00, Theorem 0.3], weak semistable reductions for the fibration f exist. In particular, there is a generically finite projective surjective morphism ι : Y → V with Y smooth, and there is a desingularization Γ of the main com- We may assume that morphism ι is Galois of group G over the generic point of V, and there is a natural action of G on Y. We assume further that Γ is a Gequivariant desingularization, and the morphisms ϕ is G-equivariant. We also assume that the ρ-exceptional locus is pure of codimension one, and we denote it as a reduced divisor E. Particularly, E is G-invariant. Since f is smooth over the generic point of V, we may assume that Γ → U × V Y is an isomorphism over the smooth locus. In particular, E does not dominate Y.
Let F ′ be the foliation on Γ induced by ϕ. On the one hand, by Lemma 2.1, there is some π-exceptional divisor E 1 such that On the other hand, the semistable assumption implies that, there is an open subset W ⊆ Γ on which ϕ is smooth, such that every component of Γ \ W is either a π-exceptional divisor, or of codimension at least two in Γ. Thus there is some π-exceptional divisor E 2 such that In conclusion, there is a π-exceptional divisor E ′′ such that which is nef by assumption. Let π : Γ → X ′ be the Stein factorization of ρ. We note that X ′ /G = X, which is smooth. Therefore, we can now apply the techniques in Section 4 to the diagram Let B ⊆ V be a prime divisor and B ′ be a component of ι −1 (B) which dominates B. By Proposition 4.1, there is at most one component of ϕ −1 (B ′ ) which is not in the π-exceptional locus. Since Γ is a desingualrization of the main component of the fiber product Y × V U, this implies that the preimage f −1 (B) has at most one divisorial component which is not contained in the e-exceptional locus.
Next we will prove the following construction.
Lemma 5.2. There is a generically finite, projective surjective morphism ι : then for every prime divisor B Y ⊆ Y, the preimage ϕ * B Y has at least one reduced component which dominates B Y , and any non reduced component of ϕ * B Y is ρ-exceptional. Moreover, for any prime divisor B in V, contained in the discriminant of ι, (1) either e( f −1 (B)) has codimension at least two in X, (2) or f is smooth over the generic point of B, (3) or e( f −1 (B)) has a unique irreducible component D of codimension one, and ρ is étale over the generic point of D. Furthermore, ι is Galois of group G over the generic point of V, and there is a natural action of G on Y.
We recall that the discriminant of ι is the locus in V over which ι is not smooth. With this construction, we have the following property.
Corollary 5.3. If D is a prime divisor in X contained in the discriminant of ρ, then there is a prime divisor B in V such that f is smooth over the generic point of B, and that D is the unique component of e( f −1 (B)) which has codimension one.
Proof. Let D U be the strict transform of D in U. Then the natural morphism Γ → U is branched at the generic point of D U . Since Γ is a desingularization of the fiber product Y × V U, we see that D U is vertical over V. Then B = f (D U ) is a prime divisor in V since f is equidimensional. Thus we are in the case of item (2) of Lemma 5.2. This completes the proof of the corollary.
Proof of Lemma 5.2 . We note that f is smooth over the generic point of V. Let V ′ → V be a desingularization such that there is a simple normal crossing divisor ∆ in V ′ such that the natural morphism f ′ : Let B 1 , ..., B k be all the components of ∆ such that f ′ * B i has a component D i which is not exceptional over X. Lemma 5.1 shows that such a component D i is unique in f ′ * B i . Let B k+1 , ..., B l be the other components of ∆. Let D j be an irreducible component of f ′ * B j for j = k + 1, ..., l. We denote by m i the multiplicity of D i in f ′ * B i for i = 1, ..., l.
By Kawamata's covering trick (see [Kaw81,Theorem 17] or [KMM87, Theorem 1-1-1]), there is a finite Galois cover σ : Y → V ′ with Y smooth such that σ * B i is pure of multiplicity m i for i = 1, ..., l. Let Γ be a desingularization of Y × V ′ U ′ . Then by construction, the natural morphism Γ → U ′ is étale over the generic point of D i for all i (see for example [DO22,Lemma A.3]). Moreover, for every prime divisor B Y ⊆ Y, the preimage ϕ * B Y has at least one reduced component which dominates B Y . We also see that any non reduced component of ϕ * B Y is ρ-exceptional.
Let ι : Y → V be the morphism. To complete the proof, let B be a prime divisor in V, contained in the discriminant of ι. Assume that e( f −1 (B)) has an irreducible component D of codimension one. Then D is unique by Lemma 5.1. Assume furthermore that f is not smooth over the generic point of B. Then we need to prove that B satisfies item (3) of the Lemma. From the second paragraph, the strict transform of B in V ′ is one of the element in {B 1 , ..., B k }, say B 1 . The previous paragraph implies that Γ → U ′ is étale over the generic point of D 1 . Since D 1 is the strict transform of D in U ′ , we conclude that ρ : Γ → X is étale over the generic point of D.

PROOFS OF THE MAIN THEOREMS
In this section, we will finish the proofs of the theorems in the introduction. We first recall the demonstration of Theorem 1.3.
Proof of Theorem 1.3. Thanks to [Dru17, Lemma 6.2], the algebraic part F alg of F has a compact leaf. This proves item (1). We can now apply [Dru17, Proposition 6.1] to show that K F ≡ K F al g .
As in [Dru19, Claim 4.3], we can then deduce that K F ≡ K F rc . We note that the foliation F rc here corresponds to the foliation H in [Dru19, Claim 4.3], which was defined at the end of [Dru19, page 316]. Furthermore, in [Dru19, Claim 4.3], the foliation F is assumed to have semipositive anticanoncial class. Nevertheless, its proof only uses the fact that −K F is nef.
We will give the proofs of Corollary 1.5, Theorem 1.1 and Corollary 1.2 by assuming Theorem 1.4.
Proof of Corollary 1.5. By Theorem 1.4, F is a direct summand of T X . Then [HV10, Proposition 2.5] implies that, there is a morphism µ from X to the Chow scheme of X, such that µ sends a leaf C of F to the cycle class [|G C |C], where |G C | is the cardinality of the holonomy group of C. Since X is irreducible, the image of µ is irreducible as well. This shows that every leaf of F has the same dimension.
If we assume further that general leaves of F are rationally connected, then f is a smooth morphism by [Hör07, Corollary 2.11]. Then this fibration is a locally trivial family over Y (see Corollary 4.10).
Example 6.1. If the leaves of F are not rationally connected, then the fibration f : X → Y in Corollary 1.5 might not be smooth. Let G = Z/2Z. Then there is a G-action on P 1 which has exactly two fixed points. Let E be an elliptic curve equipped with a free G-action. We set X = (E × P 1 )/G, where the quotient is with respect to the diagonal action. Then X is smooth. There is a natural fibration f : X → Y = P 1 /G. Then f is not smooth and the foliation in curves induced by f is nef.
Proof of Theorem 1.1. We note that F rc has a compact leaf. By Theorem 1.3, we get −K F rc ≡ −K F is nef. Hence by Corollary 1.5, F rc is induced by a smooth fibration f : X → Y. Moreover, this fibration is a locally trivial family over Y. It follows that there is a foliation G on Y such that F = f −1 G (see for example [AD13, Lemma 6.7]). From −K F rc ≡ −K F , we deduce that K G ≡ 0. This completes the proof of the theorem.
Proof of Corollary 1.2. By Theorem 1.1, there is a locally trivial fibration f : X → Y and a foliation G on Y with K G ≡ 0 such that F = f −1 G. Since F has a compact leaf, so has G. Hence by [LPT18,Theorem 5.6], G is regular, and T Y = G ⊕ H for some regular foliation H on Y. In particular, F is regular as well.
Let F f be the foliation induced by f . We observe that −K F f ≡ −K F is nef. By Theorem 1.4, there is a regular foliation K on X such that T X = K ⊕ F f . Then the natural map K → f * T Y is an isomorphism. We set E = K ∩ f −1 H. Then E is a regular foliation and we verify that T X = F ⊕ E .
The remainder of this section is then devoted to the proof of Theorem 1.4. We will divide it into several steps. 6.A. Setup. Until the end of the section, we will consider the following situation. Let F be an algebraically integrable foliation with nef anticanoncial class −K F , on a projective manifold X. Assume that F has a compact leaf. Let f : U → V be the family of leaves with U and V normal. We take a generically finite morphism ι : Y → V, and a desingularization Γ of the main component of U × V Y, as in Lemma 5.2. (1) either e( f −1 (B)) has codimension at least two in X, (2) or f is smooth over the generic point of B, (3) or e( f −1 (B)) has a unique irreducible component D of codimension one, and ρ is étale over the generic point of D.
We note that, by construction, every ϕ-exceptional divisor is ρ-exceptional as well. The morphism ι is Galois of group G over the generic point of V, and there is a natural action of G on Y. We assume further that Γ is a G-equivariant desingularization, and the morphisms ϕ is G-equivariant. We also assume that the ρ-exceptional locus is pure of codimension one, and we denote it as a reduced divisor E. Since f is smooth over the generic point of V, we may assume that Γ → U × V Y is an isomorphism over the smooth locus. In particular, E does not dominate Y. Let π : Γ → X ′ the Stein factorization of ρ. We note that X ′ /G = X, and we have the following diagram.
We denote by F ′ the foliation on Γ induced by ϕ. On the one hand, by Lemma 2.1, there is some π-exceptional divisor E 1 such that On the other hand, by the semistable assumption, there is some π-exceptional divisor E 2 such that K F ′ = K Γ/Y + E 2 .
Since −K F is assumed to be nef, we can apply the techniques in Section 4 to the diagram Let V 0 ⊆ V be a Zariski open subset such that the following properties hold, • ι is finite over V 0 ; • for any prime divisor B ⊆ V, the preimage f −1 (B) is contained in the eexceptional locus if and only if B ⊆ V \ V 0 . Let Y 0 = ι −1 (V 0 ). We pick a sufficiently ample divisor A on Γ. We will assume that A is G-invariant. More precisely, we assume that