Hypersurfaces quasi-invariant by codimension one foliations

We present a variant of the classical Darboux-Jouanolou Theorem. Our main result provides a characterization of foliations which are pull-backs of foliations on surfaces by rational maps. As an application, we provide a structure theorem for foliations on 3-folds admitting an infinite number of extremal rays.


Introduction
In this paper, we study codimension one singular holomorphic foliations on projective manifolds. More specifically, we introduce and investigate the concept of quasi-invariant hypersurfaces: an irreducible hypersurface H is quasi-invariant by a foliation F if it is not F invariant, but the restriction of the foliation F to H is an algebraically integrable foliation, i.e. every leaf of F |H is algebraic. Our main result shows that the existence of sufficiently many quasi-invariant hypersurfaces characterizes this class of foliations.
Theorem A. Let F be a codimension one holomorphic foliation on a projective manifold X. If F admits infinitely many quasi-invariant hypersurfaces then F is algebraically integrable, or F is a pull-back of a foliation on a projective surface under a dominant rational map.
Indeed, we prove a stronger statement in Section 4, see Theorem 4.6. Theorem A has to be compared with, and was inspired by, Darboux-Jouanolou's criterion for the algebraic integrability of codimension one foliations. We take the opportunity to revisit this criterion and we provide a small improvement of it in Section 2, see Theorem 2.3.

1.2.
A version in positive characteristic. In [Kim97], an analogue of Darboux-Jouanolou's Theorem was proved for codimension one foliations on smooth projective varieties defined over fields of positive characteristic, under the assumption that in the ambient variety every global differential 1-form is closed. This extra assumption was later proved to be superfluous by Brunella and Nicolau in [BN99].
We show that Brunella-Nicolau's argument can be adapted to prove the following analogue of Theorem A.
Theorem B. Let X be a smooth projective variety defined over a field k of characteristic p > 0, and let F be a codimension one foliation on X. If F admits infinitely many quasi-invariant hypersurfaces then F is p-closed, or F is a pull-back of a foliation on a projective surface under a dominant rational map.
The concepts used in the statement of Theorem B are recalled/presented in Section 5.1.
1.3. Structure of the cone of curves. The second author established in [Spi] a cone theorem which describes the structure of the Kleiman-Mori cone of curves in terms of numerical properties of the canonical bundle K F of a codimension one foliation F on a projective 3-dimensional variety. We were lead to the definition of quasi-invariant divisors while trying to understand the implications of this result on the geometry/dynamics of the original foliation. As a corollary of Theorem A we obtain the following statement.
Theorem C. Let F be a codimension one foliation with non-dicritical canonical singularities on a connected 3-dimensional Q-factorial projective variety X with at worst terminal singularities. If the K F -negative portion of the cone of curves contains infinitely many extremal rays then (at least) one of the following assertions holds true.
(1) the foliation F is algebraically integrable and the closure of a general leaf is rational; or (2) there exists a finite number of rational F -invariant hypersurfaces containing all but finitely many extremal rays.
The definitions of extremal rays and canonical singularities are recalled in Section 6, where the precise statement of the cone theorem is also recalled, cf. 6.1.
1.4. Acknowledgments. The results presented here were achieved in a visit of J.V. Pereira to Imperial College London followed by a visit of C. Spicer to FRIAS, Freiburg. We acknowledge the support of Paolo Cascini and Stefan Kebekus who made these visits possible. J.V. Pereira was partially supported by Cnpq and FAPERJ.

Foliations, invariant and quasi-invariant divisors
2.1. Foliations. A foliation F on a projective manifold X is determined by an involutive and saturated subsheaf T F of the tangent sheaf of X. The sheaf T F is the tangent sheaf of F . The dimension of F is the rank of T F , and its codimension is the corank of T F inside T X . The singular set of F is the singular set of the sheaf T X /T F . As we are assuming T F saturated inside T X , the singular set of F is of codimension at least two. Away from the singular set, the Frobenius Theorem provides a decomposition of sufficiently small open (in the Euclidean topology) subsets U ⊂ X in level sets of submersions f : U → V ⊂ C q , where q = codim F . Maximal analytic continuation of a level set of f inside X − sing(F ) is a leaf of the foliation F .
The dual of T F is the cotangent sheaf of F and will be denoted by Ω 1 F . As the notation suggests, the local sections of Ω 1 F can be interpreted as 1-forms defined along the leaves of the foliation F .
Alternatively, a foliation F can be presented by a subsheaf N * F of Ω 1 X , which is integrable and saturated. The sheaf N * F is called the conormal sheaf of F . Its dual will be denote by N F and is called the normal sheaf of F . One can recover T F from N * F by considering the subsheaf of T X which annihilates every element of N * F . The natural analogous construction allows us to recover N * F from T F . 2.2. Invariant divisors. Let F be a codimension one foliation on a projective manifold X. We will denote by Inv(F ) the subgroup of Div(X) generated by irreducible F -invariant hypersurfaces.
Proposition 2.1. If D is a F -invariant divisor then the restriction of differential forms to leaves of F defines a morphism where f is a local section of O X and σ is a local section of E.
Proof. The logarithmic differentials of local defining functions of D define a flat logarithmic connection ∇ on O X (D) with residue divisor equal to D. The Finvariance of D implies that the restriction of ∇ to T F is holomorphic.
It was observed by Bott that the normal sheaf of a foliation F admits a natural F -partial connection, the so called Bott's partial connection. For codimension one foliations Bott's connection can be locally defined as follows. Let ω be a local generator of N * F . The integrability assumption implies that the existence of a meromorphic 1-form η such that The 1-form η is not unique, one can replace η by η+hω for an arbitrary meromorphic function h. Nevertheless, if v is a local section of T F then the contraction of v with η does not depend on h and, furthermore, it is a holomorphic function. In other words, the restriction of the 1-form η to T F defines a local holomorphic section of Ω 1 F . Bott's connection is the connection on N F locally defined by η |TF . 2.3. Jouanolou's Theorem. If X is a projective manifold then we will denote by N S(X) the Nron-Severi group of X, i.e. N S(X) is the group of divisors modulo numerical equivalence. The tensor product of N S(X) with C injects into H 2 (X, C) and is the natural target for the Chern class map c : Div(X) ⊗ C → N S(X) ⊗ X.
Below we present a small improvement on Darboux-Jouanolou Theorem, compare with [Jou78], [Ghy00] and [Bru00, Theorem 6.1]. It involves the concept of a transversely affine foliation. We recall that a codimension one foliation F is called transversely affine, if there exists a flat meromorphic connection on the normal sheaf of F which, when restricted to the leaves of F coincides with Bott's F -partial connection. For a thorough discussion of this concept, and other equivalent definitions the reader can consult [CP14]. Theorem 2.3. Let F be a codimension one foliation on a projective manifold X. If k is the number of F -invariant hypersurfaces and ℓ is the integer dim N S(X) + h 0 (X, Ω 1 F ) − h 0 (X, Ω 1 X ) then the following assertions hold true.
Proof. Let Inv 0 (F ) ⊗ C be the kernel of the restriction of the Chern class map to to Inv(F ). Basic Hodge theory associates to each element D ∈ Inv 0 (F ) ⊗ C a logarithmic 1-form η with residue divisor equal to D. This association is not unique: η is defined up to the addition of a global holomorphic 1-form.
The restriction of the logarithmic 1-form η to the leaves of F defines a holomorphic section of Ω 1 F , i.e. η |TF ∈ H 0 (X, Ω 1 F ). If the number k of irreducible F -invariant hypersurfaces is at least ℓ + 1 then we can produce a non-zero logarithmic 1-form η such that η |TF = 0. Hence η is the sought logarithmic 1-form defining F . Item (2) follows. If k ≥ ℓ + 2 then we have two linearly independent logarithmic 1-forms η and η ′ which vanish along T F . Since F is a codimension one foliation, there exists a non-constant rational function f ∈ C(X) such that η = f η ′ . Differentiation implies df ∧ η ′ = 0. We conclude that f is a rational first integral for F . Item (3) follows.
To prove item (1), consider the fiber of the Chern class map c : Inv 0 (F ) ⊗ C → H 2 (X, C) over the Chern class of the normal bundle. For each divisor D such that c(D) = c(N F ), we can construct a family, parameterized by H 0 (X, Ω 1 X ), of flat logarithmic connections on N F with residue divisor equal to D. If we restrict one such connection to a partial connection along the leaves of F then it will differ from Bott's partial connection by an element of H 0 (X, Ω 1 F ). Thus, if k ≥ ℓ then at least one of such connections will have restriction to the leaves equal to Bott's partial connection. But this means exactly that F is transversely affine.
The general logarithmic 1-form on P 2 with poles along three distinct lines defines a foliation F with dim N S(P 2 )+ h 0 (P 2 , Ω 1 F )− h 0 (P 2 , Ω 1 P 2 ) = 2, three invariant lines, and which is not algebraically integrable. This shows that item (3) is sharp.
2.5. Comparison. We have stated our version of Darboux-Jouanolou Theorem for projective manifolds, but it can be formulated for arbitrary compact complex manifolds as in [Ghy00]. For that, one has to take the integer ℓ equal to dim coker Div(X) ⊗ C → H 1 (X, Ω 1 X,cl ) + h 0 (X, Ω 1 F ) − h 0 (X, Ω 1 X,cl ) where Ω 1 X,cl stands for the C-sheaf of closed holomorphic 1-forms on X. The bound presented in Theorem 2.3 item (3) coincides with the bound presented in [Bru00, Theorem 6.1] and is slightly different from the bound presented in [Ghy00], even if one specializes the latter to projective manifolds. The main difference comes from the use here of H 0 (X, Ω 1 F ) instead of H 0 (X, Ω 2 X ⊗ N F ). To relate the dimensions of these two finite dimensional vector spaces observe that the sheaf Ω 1 F injects into Ω 2 X ⊗ N F . Indeed, if ω ∈ H 0 (X, Ω 1 X ⊗ N F ) is a twisted 1-form defining F then for any local section η ∈ Ω 1 F (U ) (U sufficiently small) we can unambiguously define ω ∧ η by considering a lift of η |U−sing(F ) to Ω 1 X (U − sing(F )), extending the result using Hartog's, and taking the wedge product with ω. The final result is clearly independent of the choice of the lift.
2.6. Quasi-invariant divisors. We will say that an irreducible hypersurface H is quasi-invariant by a codimension one foliation F if H is not F invariant and the restriction of F to H is algebraically integrable. The subgroup of Div(X) generated by the irreducible hypersurfaces quasi-invariant by F will be denoted by QInv(F ).
For a foliation F on a surface S the concept is not very useful. According to our definition, any divisor in Div(S) is a member of Inv(F ) + QInv(F ). Anyway, these foliations provide a natural source of examples of quasi-invariant divisors.
Proposition 2.4. Let X be a projective manifold of dimension at least three which admits a dominant rational map p : X S to a smooth projective surface S. If G is a foliation on S and we set F = p * G then p * Div(S) ⊂ Inv(F ) + QInv(F ).
Proof. Let C be an irreducible curve on S. The pull-back of C consists in a finite number of irreducible hypersurfaces. The ones which dominate C are either Finvariant (when C is G invariant) or are not F -invariant but foliated by fibers of p. Hence the irreducible hypersurfaces dominating C are either F -invariant or quasiinvariant as wanted. If a hypersurface is contracted to a point then after blowing-up sufficiently many times its image, we reduce to the previous situation.

Flat divisors
The proof of Theorem A will be presented in Section 4 and is based on properties of flat S 1 -divisors (in the sense of [Per06]) and their associated foliations. In this section we recall several results from [Per06, §2, §3] relating to S 1 -flat divisors, and adapt/extend some of them to our current goals.
where S 1 denotes the constant sheaf of complex numbers of modulus 1.
3.2. Associated 1-forms. If D = 0 is an S 1 -flat divisor then there exists a natural construction of a closed logarithmic 1-form ω D ∈ H 0 (X, Ω 1 (log D)) with purely imaginary periods. It goes as follows. Choose a sufficiently fine open covering U i of X and meromorphic functions f i : Define ω D locally as the logarithmic differential of f i , i.e.
If X is compact then the 1-form ω D is defined unambiguously. In general, ω D is well-defined up to the addition of an exact holomorphic differential. Let D = 0 be a S 1 -flat divisor on a complex manifold and let ω D be a logarithimic 1-form associated to D as in §3.2. Since dω D = 0 this defines a codimension one foliation denoted F D .
We record some facts about the foliation F D .
Lemma 3.2. Let D = 0 be a S 1 -flat divisor and let ω D and F D be as above. Then the following assertions hold true.
(1) The support of D is F D -invariant.
(2) The periods of ω D are purely imaginary and so F = |e ωD | : 3.3. Closure of leaves. We start this section with a simple observation.
Lemma 3.3. Let F 1 and F 2 be two codimension one foliations on a connected complex manifold (not necessarily compact) X. Suppose that F 1 and F 2 have an uncountable number of distinct leaves in common. Then F 1 = F 2 .
Proof. Let L λ be the set of common leaves of F 1 and F 2 . By a simple counting argument we know that there must be some point p ∈ X and an open set p ∈ U ⊂ X such that the L λ accumulate to some point in the interior of U . The tangency locus of F 1 and F 2 in U contains the smallest analytic set containing all the leaves L λ , which is all of U . Thus F 1 and F 2 agree on a non-empty open subset and so must be equal on all of X.
Proposition 3.4 below is a version of [Per06, Proposition 5.2] in the non-compact case. The argument is essentially the same, but for convenience we include it here.
Proposition 3.4. Let X be a complex manifold (not necessarily compact) and let D be an S 1 -flat divisor on X. Let F be a codimension one foliation on X and suppose F admits a leaf L such that (1) the smallest complex analytic subset of X containing L is X itself; and (2) the topological closure L of L is disjoint from the support of D, i.e. L ∩ supp(D) = ∅. Then the foliations F and F D coincide.
Proof. Without loss of generality by [Per06, Lemma 5.1] we may assume that D = The foliation F D is defined by a closed logarithmic 1-form ω D with a polar set supported on D and by Lemma 3.2 admits a real first integral F : Consider the restriction of F to L. Since F is the modulus of a holomorphic function we have two cases: In case (i) F | L is constant, L is a leaf of both F and F D . So, the tangency locus of F and F D must contain the smallest complex analytic subset of X containing L. This, however, is X itself and hence F = F D .
Suppose that we are in case (ii), i.e., F | L is an open map. Since F | L is open and L is bounded away from D we know that there exists positive real numbers m < M such that F (L) is the interval (m, M ) ⊂ R.
Recall that F can be locally written as and that all the periods of ω D are purely imaginary complex numbers. Let f denote the multivalued function e ωD and let π : X → X be the cover associated to f . Write L = π −1 (L) and let F be the pulled back foliation. Iff is the lift of f we have thatf :X → P 1 is holomorphic.
We know thatf ( L) ⊂ C * is open and relatively compact.
) and letL p be the leaf of F through p. By the maximum principle we see thatf must be constant onL p , and therefore π(L p ) is a leaf of both F and F D .
Since the monodromy group associated to f is countably generated, this implies that F and F D have uncountably many leaves in common. Lemma 3.3 implies that F and F D are equal.
3.4. Subfoliations defined by almost invariant divisors. The following Proposition is the main technical point in the proof of Theorem 4.6/Theorem A.
Proposition 3.5. Let D 1 and D 2 be two S 1 -flat divisors on a compact complex threefold X and let L j − → X be an immersion of a smooth complex surface. Suppose (1) the connected components of j −1 (supp(D i )) are compact for i = 1, 2; and Then there exists a neighborhood of E, saturated by G, and filled up with G-invariant compact curves.
Proof. Let E be as in assumption (2). According to assumption (1), E is a compact G-invariant curve.
Let F be the real first integral of F D1 given by Lemma 3.2, which by restriction to L gives a real first integral of G. Assumption (3) guarantees the existence of an open neighborhood U of E in L which is saturated by G, i.e. any leaf of F D1 which meets U is in fact contained in U . Moreover, shrinking U even further we may assume that U ∩ j −1 (D 2 ) = ∅.
For p ∈ U , let ℓ p denote the leaf of G through p and let ℓ p denote the topological closure of ℓ p in U .
If ℓ p = ℓ p (up to the addition of finitely many singular points of G) for all p then we are done. Otherwise, there is some p such that the cardinality of ℓ p − ℓ p is infinite. Since ℓ p ∩ j −1 (D 2 ) = ∅ we may apply Proposition 3.4 to conclude that If ω i is the closed logarithmic 1-form defining F Di we have that ω 1 = Hω 2 for some meromorphic function H on L. Assumption (2) guarantees the non-constancy of H. Taking d of both sides shows that dH ∧ ω 2 = 0 and so G has a meromorphic first integral. However, since D i,+ ∩ D i,− ∩ L = ∅ we see that this first integral may be taken to be holomorphic. The restriction of the level sets of H to U fills up the neighbourhood with G-invariant compact curves.

Proof of Theorem A
4.1. General complete intersection subvarities. We recall a definition from [AD14] which is based on [LPT, Section 2.3].
Definition 4.1. Let F be a holomorphic foliation on a normal variety X. Then there exists a normal variety Y (unique up to birational equivalence), a dominant rational map with connected fibres φ : X Y and a holomorphic foliation G on Y such that the following holds (1) G is purely transcendental, i.e., through a general point of Y there is no positive dimensional variety tangent to G, and (2) F = φ * G. The foliation induced by φ is called the algebraic part of F and is denoted F alg .
For a projective manifold X, we say that a subvariety V ⊂ X is general complete intersection if V is obtained by embedding X in a projective space by means of a complete linear system defined by sufficiently high multiple of an ample line bundle and intersecting the result with sufficiently general hyperplane sections. In particular, if V is a general complete intersection in X of dimension at least three then Lefschetz-type results [Gro05, Expos XII, Corollaire 3.6] guarantee that V and X have isomorphic Picard groups.
Lemma 4.2. Let F be a codimension one foliation on a projective variety X and let φ : X Y be the rational map corresponding to F alg . Let V ⊂ X be a general complete intersection variety and let F |V be the restricted foliation. Then (F |V ) alg is induced by φ| D : D φ(D) ⊂ Y .
Proof. Let W be the normalization of φ(D) and let G |W be the restricted foliation. Since V is a general complete intersection variety we see that G |W is purely transcendental. If F is a codimension one foliation on a threefold X then [Can04] shows the existence of a sequence of blowups in foliation invariant centres π : (Y, G) → (X, F ) so that G does not have dicritical singularities. Such a resolution is not known in higher dimensions.
If a foliation F does not have dicritical singularities then the group Inv(F ) + QInv(F ) behaves rather well with respect to birational morphisms. Lemma 4.3. Let F be a foliation on a projective manifold X of dimension three. Let π : Y → X be a birational morphism from another projective manifold Y to X. If F does not have dicritical singularities then every fibre of π is tangent to π * F . In particular, π * (Inv(F ) + QInv(F )) ⊂ Inv(π * F ) + QInv(π * F ).
Proof. To prove our first claim suppose for sake of contradiction that there exists some P ∈ X and a component of π −1 (P ) which is not tangent to the foliation. Perhaps blowing up more we may assume that this component is a non-invariant divisor E. Observe that E being non-invariant implies P ∈ sing(F ). Let π 0 : Y 0 → X be the blow up at P and let Z 0 be the centre of E on Y 0 . By [CM92, Théoremè 4] exc(π 0 ) is π * 0 F invariant and so Z 0 ⊂ sing(π * 0 F ). Blowing up in Z 0 and continuing inductively we get a sequence of blow ups extracting divisors invariant under the foliation. However, by [KM98, Lemma 2.45] this process will eventually extract E, a contradiction.
To prove our second claim it suffices to show that irreducible components of the exceptional divisor of π are either invariant or quasi-invariant. Let D be one such component. If D is non-invariant the fibres of D → π(D) are tangent to (π * F ) |D , in particular (π * F ) |D is algebraically integrable and so D is quasi-invariant.
Another advantage of non-dicritical singularities can be seen in the following proposition.
Proposition 4.4. Let X be a smooth threefold and let F be a codimension one foliation with non-dicritical singularities. Let C ⊂ X be a projective curve tangent to F . Then there exists a germ of a F -invariant surface S containing C.
Proposition 4.4 allows to extend immersions j • : L • → X − sing(F ) of leaves of F |X−sing(F ) to holomorphic maps j : L → X with the property that the pre-image of quasi-invariant divisors have compact connect components.
Notice that the non-dicritical assumption is necessary in Proposition 4.4 as the following example by [Jou79] shows. Theorem 4.6. Let F be a codimension one foliation on a projective manifold X. If the singularities of the restriction of F to a three dimensional general complete intersection subvariety of X are non-dicritical and then there exists a projective surface S, a dominant rational map p : X S, and a foliation G on S such that F = p * G.

Reduction to dimension three.
Lemma 4.7. Let X be a projective manifold of dimension n ≥ 3 and let F be a codimension one foliation on X. Let V ⊂ X be a three dimensional general complete intersection and let F |V be the restricted foliation. Then (1) F |V is algebraically integrable if and only if F is algebraically integrable and (2) F |V is pulled back from a rational map to a surface if and only if F is pulled back from a rational map to a surface. Thus, without loss of generality it suffices to prove Theorem 4.6 and Theorem A in the case where X is a threefold.
Proof. The if direction of items (1) and (2) are clear.
To prove the other direction in both items, let φ : X Y be the fibration corresponding to F alg . On one hand we know that φ| V : V Y corresponds to (F |V ) alg and so by assumption dim φ(V ) = 1 (respectively = 2). But since V is a general complete intersection of dimension 3 this forces dim Y = 1 (respectively = 2).
To see our final claim, notice that D is a F -(quasi-)invariant divisor if and only if D| V is G-(quasi-)invariant. This gives us Thus the assumptions of Theorem A are also satisfied by F |V . Hence, to prove Theorem A, it suffices to do it in dimension three.
We will now verify the analogue claim for Theorem 4.6. As we are assuming that V is a general complete intersection of dimension three, Lefschetz-type results guarantee that N S(V ) = N S(X). Consequently, Thus, assuming Theorem 4.6 for threefolds, implies that F |V is either algebraically integrable or pulled back from a surface, in which case we conclude the same is true of F .
Lemma 4.8. Let X be a smooth projective threefold and let F be a codimension one foliation on X. Let C be a curve (not necessarily irreducible) each component of which is tangent to F . Suppose that F is smooth near C, i.e. C does not intersect the singular set of F . Let L be the germ of leaf containing C. Suppose that C has a non-trivial deformation in L. Then either (1) L is algebraic (i.e., its Zariski closure is a surface); or (2) there is a foliation in algebraic curves tangent to F .
Proof. Let W be the closed subscheme of the Hilbert scheme parametrizing subvarieties tangent to F and let W 0 be the connected component of W containing [C]. Let γ : ∆ → W 0 be the map associated to the deformation and let B be the Zariski closure of γ(∆). Let π : U → W 0 be the universal family with evaluation map e : U → X. Consider the restriction e : If e : U B → X is dominant then if S ⊂ B is a general hypersurface we have that S parametrizes a two dimensional family of curves tangent to F and dominating X which gives our desired subfoliation by curves.
Otherwise, e : U B → X dominates some divisor D. Let p t = γ(t) and let Γ = γ(∆). One one hand, we have e(π −1 (p t )) ⊂ D, on the other, if V is some small neighborhood of C we see that L ∩ V ⊂ e(π −1 (Γ)). Hence, the Zariski closure of L is contained in D.

Algebraicity criterion.
Lemma 4.9. Let L be a leaf of a foliation on a projective 3-fold X containing an effective and nef divisor Σ with compact and connected support. If Σ 2 > 0 then L is algebraic.
Proof. Write Σ = Σ 1 + Σ 0 where Σ · C > 0 for all C in the support of Σ 1 and Σ · C = 0 for all C in the support of Σ 0 . We define for some sufficiently small choice of ǫ > 0 and we define Σ 1 . Continuing inductively, since Σ is connected, we eventually produce a divisor Σ (m) such that Σ is a Cartier divisor. By construction σ · C > 0 for all irreducible C ⊂ supp σ. In particular, we see that N σ/L is ample.
Thus by [Har68,Theorem 6.7] the Zariski closure of L in X is a projective surface. 4.7. Proof of Theorem 4.6. The assumption on the number of quasi-invariant hypersurfaces allows the construction of two S 1 -flat divisors in Inv(F ) + QInv(F ), say D 1 and D 2 , which have distinct quasi-invariant hypersurfaces in their respective supports.
We may assume, by Lemma 4.7, that F is a non-dicritical foliation on a projective 3-fold.
Let D ∈ Inv(F ) + QInv(F ) and let π : Y → X be a birational morphism from a projective manifold Y to X. As we are assuming that F has non-dicritical singularities, then π * D ∈ Inv(π * F ) + QInv(π * F ) according to Lemma 4.3. Therefore, we may freely replace X and F by any resolution without interfering with the existence of divisors D 1 and D 2 as above.
We may write D i = D i,+ − D i,− where D i,+ , D i,− ≥ 0 are effective divisors. Let B i be the scheme theoretic intersection of D i,+ and D i,− and let π : Y → X be the blow up in B 1 and B 2 followed by a resolution of singularities. Let p ∈ D i,+ ∩ D i,− and let U be an open affine containing p such that D i,+ ∩ U = (f i,+ = 0) and Observe that π resolves the indeterminacy locus of F and so if we write π * D i = A i − B i where A i , B i ≥ 0 are effective then A i and B i have disjoint support. Thus, replacing X, F and D i by Y , π * F and π * D i we may assume that D i, Let H 1 be a quasi-invariant invariant hypersurface contained in supp D 1 and let j : L → X be a general leaf of F passing through a sufficiently general point of H 1 . Let E be a connected component of the divisor j * (D 1 ) containing a connected component of j * H 1 .
As D 1,+ and D 1,− are disjoint effective divisors with the same Chern classes, we have that E or −E is an effective divisor in L with zero self-intersection, i.e. E 2 = 0. Perhaps after replacing E by −E, we can assume that E is effective. Note also that any curve C in the support of E satisfies E · C = 0. Hence E is effective and nef.
Consider now the restriction of D 2 to L, i.e. j * D 2 . Our choice of L (passing through a general point of H 1 supp(D 2 )) guarantees that the support of j * D 2 does not contain the support of E. If the support of j * D 2 intersects E, then we can pick a curve F in supp(j * D 2 ) such that E · F > 0. For k ≫ 0, the divisor (kE + F ) 2 > 0 is nef, effective and has positive self-intersection. Lemma 4.9 implies L is algebraic. Since L is general, we deduce that F is algebraically integrable.
If instead the support of j * D 2 does not intersect the support of E then the hypotheses of Proposition 3.5 are satisfied. So, if G is the restriction of the foliation F D1 to L then G has a saturated neighborhood of E filled up with invariant compact curves.
Since c 1 (j * D i ) = 0 this implies that in fact E is a (multiple of a) fibre of f and so (a multiple of) E must move in L. Since F is smooth near E we may apply Lemma 4.8 to conclude. 4.8. Proof of Theorem A. We may assume, by Lemma 4.7, that dim X = 3. Moreover, it suffices to verify the conclusion on some resolution of X and F . So passing to a resolution we may assume that F has simple singularities, in particular, they are non-dicritical, cf. Section 4.2. We can apply Theorem 4.6 to conclude.
4.9. Remarks on the assumptions of Theorem A. It is possible that adaptations analogous to the ones described in Section 2.5, might lead to a version of our result for arbitrary complex manifolds. One obstruction to carry out our argument in general is the lack of reduction of singularities for foliation on manifolds of dimension strictly greater than 3. In the projective case, the lack of such result is bypassed by considering the restriction of the foliation to the general 3-dimensional submanifold. Another difficulty comes from the lack of properness for irreducible components of the spaces parametrizing the codimension two subvarieties invariant by the foliation G, used in the proof Lemma 4.8.

Quasi-invariant divisors in positive characteristic
5.1. Basic concepts. We recall some basic facts and definitions about foliations in characteristic p.
Let X be a smooth variety over an algebraically closed field of characteristic p. For us, a foliation F on X is, as in characteristic zero, given by a saturated subsheaf T F of T X which is closed under the Lie bracket.
Let v ∈ T X (U ) be some local section of the tangent sheaf. An elementary computation shows that the p-th power of v is still a vector field on U . Taking p-th powers of vector fields gives an O X -linear map where Frob : X → X is the (absolute) Frobenius morphism.
Definition 5.1. Let X be a normal variety over a field of characteristic p and let F be a foliation on X. We say that F is p-closed provided F : Frob * T F → T X /T F is the zero morphism.
It is easy to see that p-closedness is a birational invariant and that if F is algebraically integrable then it is p-closed.
Unlike in characteristic zero, the Frobenius Theorem does not hold in positive characteristic. The structure of the foliation depends on whether it is p-closed or not. If a foliation is not p-closed then for a sufficiently general closed point x ∈ X there is no (formal) F invariant subvariety through x. If instead the foliation is p-closed then through any closed point x ∈ X there exists infinitely many algebraic F invariant subvarieties through x. For more details and references on the subject we redirect the reader to [MP97, Lecture III] and [LPT,Section 7].
The dichotomy on the behaviour of F describe in the previous paragraph suggests the following adaptation of the notion of quasi-invariance to positive characteristic.
Definition 5.2. Let X be a normal variety over an algebraically closed field of characteristic p > 0 and let F be a codimension one foliation on X. We say that a hypersurface H is quasi-invariant if it is not invariant and the foliation restricted to H is p-closed. D 1 , D 2 , ... the collection of quasi-invariant hypersurfaces. Suppose that F is not p-closed, then the map Frob * T F → T X /T F given by v → v p is generically surjective, and so the kernel K is a rank n − 2 reflexive subsheaf of Frob * F where dim(X) = n. We claim that K = Frob * T G for a p-closed foliation G on X.

Proof of Theorem B. Denote by
By [PT13, Proposition 6.1] there exists a saturated subsheaf T G ⊂ T X such that K = Frob * T G .
We first prove that G is a p-closed distribution. It suffices check this locally in a Zariski neighborhood of a sufficiently general point Q ∈ X. In particular, we can assume that each D i is cut out by a single equation f i = 0 and that F is defined by a regular 1-form ω.
After passing to a smaller Zariski neighborhood of Q according to [CLNL + 07, Lemma 6.1] we may find regular vector fields v i,1 , ..., v i,n−1 such that [v i,j , v i,k ] = 0 and v i,1 , ..., v i,n−1 generate T F where n = dim(X). Furthermore, we may choose v i,1 , ..., v i,n−2 so that v i,1 , ..., v i,n−2 leave D i invariant and so are tangent to F |Di , the restriction of the foliation F to D i . We have then for 1 ≤ j ≤ n − 2 that v p i,j is still tangent to F |Di and so ω(v p i,j ) ∈ (f i ). We have two cases (1) ω(v p i,n−1 ) ∈ (f i ) and (2) ω(v p i,n−1 ) / ∈ (f i ).
In case (1) we see that the map Frob * T F → T X /T F vanishes along D i , and so if case (1) holds for infinitely many D i we have that T F is p-closed.
Thus, for all but finitely many i we are in case (2). Suppose that G is generated by vector fields w 1 , ..., w n−2 . Then for all i we may write Since ω(w p k ) = 0 for all k, ω(v p i,j ) ∈ (f i ) for 1 ≤ j ≤ n − 2 and ω(v p i,n−1 ) / ∈ (f i ), applying ω to both sides gives us that (a k i,n−1 ) p ∈ (f i ), hence a k i,n−1 ∈ (f i ). But this implies that for all k, w k (and hence w p k ) leaves D i invariant, and so G leaves D i invariant. Since w p k is tangent to F and leaves D i invariant, we see that it is tangent to G along D i . Thus the tangency locus of G and w p k consists of infinitely many divisors and so G is p-closed.
We now claim that G is closed under Lie bracket. Since G leaves D i invariant for all i we see that [w j , w k ] leaves D i invariant for all i. Thus [w j , w k ] is tangent to F and leaves D i invariant, and so is tangent to G along D i . Thus the tangency locus of G and [w j , w k ] consists of infinitely many divisors and so G is closed under Lie bracket.
Since G is a p-closed foliation there exists a purely inseparable morphism ρ : X → Y of degree p n−2 such that that ker dρ = T G .
We therefore have an exact sequence S be a general choice of a dominant rational map to a smooth surface and let U ⊂ Y and V ⊂ S be two open sets such that p |U : U → V is a morphism.
Since p is general we may assume that ρ * p * Ω 1 V → ρ * Ω 1 U is generically surjective. Consider the dominant rational map p • ρ : X S. Let X denote the closure of the graph of p • ρ : ρ −1 (U ) → S in X × S. Then X → X is birational (although X is no longer smooth) and p extends to a proper morphism p : X → S. Let F and G denote the transforms of F and G respectively.
Consider the Stein factorization of p X T S.
p φ a Let T → T be a resolution of singularities (which exists since T is a surface) and let X be the normalization of the main component of X × T T . Replacing X by X and T by T we may freely assume that T is smooth.
Consider the composition of sheaf morphisms where the latter equality holds since Ω 1 T is locally free and φ * O X = O T . The sheaf φ * ker(Φ) defines a foliation by curves L on T such that φ * L = F and we are done.
6. Cone of curves 6.1. Setup. We will now consider consider codimension one foliations on singular threefolds. As customary in birational geometry, we will assume that the threefold is normal and that the canonical sheaf of the foliation is Q-Cartier.
Given any birational morphism π : X → X, from a normal 3-fold X we get an induced foliation F onX. Thus, we can write We say that F has canonical singularities if a(E i , F ) ≥ 0, for every exceptional divisor E i of an arbitrary birational morphism π : X → X from any normal projective variety X to X.

6.2.
Cone theorem for codimension one foliations. The result below is proved in [Spi, Theorem 1.1] for foliated pairs. To avoid an extra layer of definitions, we will stick to "classical" foliated varieties. The interested reader will have no difficulties to extend Theorem C for foliated pairs.
Theorem 6.1. Let X be a projective Q-factorial and klt projective variety of dimension three and F a codimension one foliation with non-dicritical foliation singularities. Suppose F has canonical singularities. Then where L i are curves. Furthermore, either L i is contained in sing(X), or L i may be taken to be a rational curve with K F · L i ≥ −6. In particular, the K F -negative extremal rays are locally discrete in the K F < 0 portion of the cone.
6.3. Classification of extremal rays. The extremal rays detected by Theorem 6.1 are of three different types according to the dimension of the locus of points belonging to a curve C with class spanning the extremal ray R.
In the terminology of [Spi, Definition 23], a K F -negative extremal ray can be of one of the following types.
(1) Fiber type when dim loc(R) = 3. In this case, the foliation is the pull-back of a foliation on a surface under a rational map with rational fibers. (2) Divisorial type when dim loc(R) = 2. The irreducible components of the support of the divisor spanned by the curves with class generating the extremal ray R are invariant or quasi-invariant by F . (3) Flipping type when dim loc(R) = 1. In this case, we will say that the curves with class generating R are flipping curves. Each extremal ray of flipping type is represented by a finite number of curves.
Lemma 6.2. Set up as in Theorem 6.1. Let C be an irreducible curve such that [C] ∈ N E(X) spans an extremal ray of flipping type. Then either C ∩ sing(X) = ∅ or C ⊂ sing(F ) Proof. Suppose C∩sing(X) = ∅. Shrinking X to a neighborhood of C by [Can04] we may perform a series of blow ups in foliation invariant centres π : ( X, F ) → (X, F ) so that F has simple singularities. However, since we only blow up in invariant centres π must be crepant, i.e., K F = π * K F . In particular the strict transform of C is still K F -negative in which case we may apply [Spi,Corollary 11.2] to conclude that C ⊂ sing(F ).
We will also need the following easy observations. Lemma 6.3. Set up as in Theorem 6.1. Suppose there are two K F -negative extremal rays R 1 and R 2 of fibre type. Then F is algebraically integrable and the closure of every leaf of F is a rational surface.
Proof. Let f i : X → B i be the contractions associated to f i . If either B 1 or B 2 is a curve, then since f i only contracts curves tangent to the foliation, we see that F is algebraically integrable. So assume that B i is a surface. There exists a foliation G i on B i such that F = f * i G i . Let p ∈ B 2 be a general point and let C = f −1 2 (p). C is a rational curve tangent to F and so f 1 (C) is a rational curve tangent to G 1 . Since p is general, we see through a general point of B 1 there is a G 1 -invariant rational curve which implies that G 1 , and hence F , is algebraically integrable. We see that the closure of a general leaf is a P 1 -fibration over P 1 , and so the closure of a general leaf (hence any leaf) is rational.
Lemma 6.4. Let M be a smooth projective surface. Suppose that M contains infinitely many (−1)-curves. Then M is rational.
Proof. If D is a psef divisor on M then by considering the Zariski decomposition D = P + Z where P is nef and Z ≥ 0 we see that D · C < 0 for only finitely many curves C. Thus K M is not psef. We may run a K M -MMP which terminates in either P 2 or a P 1 -bundle over a curve C. We are done if we can show that we must have C ∼ = P 1 .
Suppose for sake of contradiction that g(C) ≥ 1. Then the image of the C i under the MMP must be disjoint rational curves, which implies that there are infinitely many disjoint (−1)-curves on M , a contradiction of the Hodge index theorem. Thus M is rational and we are done.
6.4. Proof of Theorem C. By Lemma 6.3 if there is more than one extremal ray of fibre type then F is algebraically integrable and there is nothing else to prove. So we may assume there are infinitely many extremal rays either of divisorial type or infinitely many extremal rays of flipping type.
Let π : X → X be a resolution of singlarities of X. Suppose there are infinitely many extremal rays R i of divisorial type. Let D i = loc(R i ). Suppose for sake of contradiction that infinitely many D i are invariant. Without loss of generality we may assume that D i is disjoint from sing(X) for all i. We apply Theorem 2.3 to produce a map f : X → C such that the π * D i are contained in fibres of f . This implies that all but finitely many D i are numerically equivalent, and hence {R i } is in fact a finite set, a contradiction.
Thus, infinitely many D i are quasi-invariant. Let C i be a curve spanning R i , again, without loss of generality we may assume that C i is disjoint for sing(X) for all i. By Theorem 4.6 either F is algebraically integrable or there is a map to a surface f : X → S contracting π −1 * (C i ) for all i. Notice that in the latter case since the π −1 * (C i ) are all contained in the fibres of f we see that all but finitely many C i must be in the same numerical equivalence class, a contradiction, thus F must be algebraically integrable. If M is the closure of a general leaf, we see that M ∩ D i ⊂ M is a (−1)-curve and so, by Lemma 6.4, M is rational.
It remains to treat the case where there are infinitely many extremal rays of flipping type. According to Lemma 6.2, each flipping curve must intersect sing(X) or be contained in sing(F ). Since X has terminal singularities sing(X) is a finite collection of points. As the singular set sing(F ) consists of finitely many components, we may assume that we have infinitely many C i passing through a single point p ∈ sing(X).
According to [Spi,Corollary 6.4], there exists a F -invariant analytic subvariety L containing p which contains the C i . To prove Theorem C it suffices to verify that L is algebraic and rational.
Let µ : M → L be the minimal resolution of L and notice that we can write µ * K F = K M + ∆ where ∆ ≥ 0. Let C ′ i be the strict transform of C i under µ. Observe that supp(∆) ⊂ exc(µ) ∪ µ −1 (sing(F )) and so throwing away finitely many C ′ i we may assume that ∆ · C ′ i ≥ 0 for all i.
Since each C i is a flipping curve we know that (C ′ i ) 2 < 0 and (K M + ∆) · C ′ i < 0. By adjunction we know that Assume that µ is not an isomorphism at p (the case where µ is an isomorphism is easier and can be handled in a similar manner). There exists some irreducible component E of µ −1 (p) such that C ′ i ∩E = ∅ for infinitely many i. Let N = −2E 2 +1 and let Σ = 2E + N i=1 C ′ i . We claim that N Σ/M is ample. Indeed for all 1 ≤ j ≤ N which proves our claim. If M is the formal completion of M along Σ then [Har68, Theorem 6.7] implies that the field C( M ) of meromorphic functions on M is of transcendence degree 2 over C. Since C( M ) is a field extension of C(L Zar ) where L Zar is the Zariski closure of L we see that L Zar is an algebraic surface. It remains to show that L Zar is rational. Indeed, as above we see that the minimal resolution of L Zar contains infinitely many (−1)-curves in which case we apply Lemma 6.4 to conclude.