ARNAUD PERSONNE ♣ Arnaud Guillin ♦

AND Edouard Strickler
email: edouard.strickler@inria.fr

Arnaud Guillin
email: arnaud.guillin@uca.fr

Arnaud Personne
email: arnaud.personne@uca.fr

PERSISTENCE IN THE MORAN MODEL WITH RANDOM SWITCHING

Keywords: random selection, PDMP, Stochastic Persistence, Moran Process Contents

The paper is devoted to the study of the asymptotic behaviour of Moran process in random environment, say random selection. In nite population, the Moran process may be degenerate in nite time, thus we will study its limiting process in large population which is a Piecewise Deterministic Markov Process, when the random selection is a Markov jump process. We will then study its long time behaviour via the stochastic persistence theory of Benaïm [9]. It will enable us to show that persistence can occur, i.e. asymptotic coexistence of all species, when there are enough switching possibilities. This is true even if one species has never a predominant selection.

Introduction 1. Moran model with selection and immigration and its large population limit 1.1. Presentation of the model 1.2. In large population 2. Vector eld for constant parameters. [START_REF] Bakhtin | Invariant densities for dynamical systems with random switching[END_REF]. General framework and tools 3.1. General framework 3.2. Stochastic Persistence 3.3. Behavior near a common zero 4. Study for two species in a two-states environment 5. General results 5.1. Sucient conditions for a species to invade (or not) the community 5.2. The same species has always the best tness 5.3. A species is always disadvantaged with respect to the other species in each environment 6. The case of 3 species 6.1. Introduction 6.2. Study for two environmental states 6.3. Environment favours and disadvantages alternately two species, the other one stay neutral over time. 6.4. Persistence for 3 species and 3 environments 6.5. Conclusion 7. Appendix Introduction Population dynamics is a complex phenomenon in which environment plays a determining role. In particular, environmental uctuations may be a determining factor to conserve biodiversity. Some works on this subject, such as [START_REF] Kalyuzhny | A neutral theory with environmental stochasticity explains static and dynamic properties of ecological communities[END_REF], [START_REF] Jabot | Non-random correlation of species dynamics in tropical tree communities[END_REF], have already highlighted its inuence on a population evolution and its primary role in the stability of ecosystems. From a theoretical point of view, it has also been proved that environmental uctuations may permit coexistence in models where a constant environment does not ( [START_REF] Armstrong | Coexistence of species competing for shared resources[END_REF], [START_REF] De Mottoni | Competition systems with periodic coecients: A geometric approach[END_REF], [START_REF] Peter | The stabilizing eect of a random environment[END_REF], [START_REF] Danino | Stability of two-species communities: drift, environmental stochasticity, storage eect and selection[END_REF] and [START_REF] Chesson | Environmental variability promotes coexistence in lottery competitive systems[END_REF]). Among all these mathematical models able to include environmental variations, one of the most known in ecology but also in population genetics is the Moran model [START_REF] Moran | Random processes in genetics[END_REF] with selection and immigration. It is a birth and death process: in a given population, an individual is chosen to die uniformly in the population and then a child chooses his parent proportionally to the abundance in the previous population. Environment inuences birth (and eventually death), each species has a tness that gives individuals of the same species more or less probabilities of being chosen as parents compared to the neutral case. The tness changes randomly through time, and are modeled by a Markov chain.

Immigration represents interactions between the community studied and the external environment, its main role is to introduce new species or reintroduce a species and so to conserve biodiversity. One can also consider mutation, but in fact it has the same impact on the process, as we are in a xed population size. Without immigration (or mutation) and for a xed population size, it well known that a species invade denitively the community in a nite time [START_REF] Kluth | The moran model with selection: xation probabilities, ancestral lines, and an alternative particle representation[END_REF]. But what happen for large population? Our objective is to prove that, in the large population limit (i.e the population size goes to innity), environmental uctuations can be sucient to conserve biodiversity in the Moran model. It will be done through the notion of stochastic persistence developed by Benaïm and Schreiber in [START_REF] Schreiber | Persistence in uctuating environments[END_REF] and in [START_REF] Benaïm | Stochastic persistence[END_REF].

Let us present the structure of the paper and the main results we obtain. In a rst section, we present the Moran Model with random selection and we obtain a quantitative approximation of this discrete process (rescaled in time with respect to the size of the population) in the limit in large population towards a particular Piecewise Deterministic Markov Process (PDMP), which is the content of Section 1 and particularly Theorem 2. We thus have to study this PDMP in which only the selection parameter is random and is a pure jump Markov process. For two species the PDMP is the following (we only need to follow the dynamic of one species):

   dX t dt = s t X t (1 -X t ) 1 + s t X t P x,s (s t+h = s k |s t = s j ) = q j,k h + o(h) if j = k (1)
where s t is our selection jump Markov process taking values in some nite space.

In order to understand the long time behavior of this process, it is rst particularly informative to understand this dynamic when the selection is constant, which is done in Section 2.

Then we will consider the long time behavior when the selection is a jump Markov process. To this end we introduce in Section 3 the notion of conservation of biodiversity, taken from Schreiber [START_REF] Schreiber | Persistence for stochastic dierence equations: A mini review[END_REF], see also [START_REF] Schreiber | Persistence in uctuating environments[END_REF]. We use the the denition of stochastic persistence [START_REF] Benaïm | Stochastic persistence[END_REF] which (roughly) asserts that the process spend (a.s.) an innite time away from the absorbing boundaries.

Section 4 is dedicated to the case where there are two species and a switch between two dierent environments. It is sucient as more possible values of the environment may be captured by this setting, as the important feature is to switch from one favorable environment to a defavorable one. Proposition 1 gives explicit condition to get stochastic persistence or extinction of one of the species. For example, in Example 1, when the jump rates are constant and equal, stochastic persistence is ensured as soon as the two values of the selection process satises -s 1 < s 2 < -s 1 /(1 + s 2 ), that we illustrate numerically.

The general case is treated (partially) in Section 5, where are exhibited conditions under which a species may go to extinction or one species invade the other ones. However criterion for stochastic persistence given by [START_REF] Benaïm | Stochastic persistence[END_REF] are quite dicult to handle in more than 2 species as it requires the explicit knowledge of all the ergodic measures. Therefore we consider and detail the case of 3 species in Section 6. When there are only two dierent environments, unfortunately there is no stochastic persistence. However some interesting phenomenon takes place such as a specie never favored nor defavored may nevertheless invade the community. Turning to three dierent environments we exhibit numerical conditions under which stochastic persistence occurs. An appendix gathers the proof of Theorem 2 and some useful lemma.

1. Moran model with selection and immigration and its large population limit 1.1. Presentation of the model.

The Moran process was introduced in population genetics in 1958 [START_REF] Moran | Random processes in genetics[END_REF] to describe the probabilistic dynamics in a constant size population in which many alleles compete for dominance. Similarly, it models the stochastic dynamics of a population in which several species coexist. In this section we describe in details the discrete model, i.e. the Moran process. A particularity of this model is that an event occurs at each time step. More precisely each event corresponds to the death of an individual and the birth of another who replaces it. We consider a population, whose size is constant over time equal to J, composed of S + 1 species . The proportion of the i species at the n th event is denoted X i n , i ∈ S = {1, ..., S + 1}, n ∈ N.

As usual once we know (X i n ) i=1,..,S , we deduce the proportion for the last species,

X S+1 n = 1 - S i=1 X i n .
We denote by X n = (X i n ) i=1,..,S the species vector or abundance vector. The dynamics of evolution follows the following pattern at the step n:

(1) The individual designated to die is chosen uniformly among the community.

(2) It is replaced by an individual that chooses its parent randomly in the community.

The parent is then of the species i with probability

X i n (1 + s i n ) 1 + S+1 k=1 X k n s k n .
The (s i n ) i∈S are the selection parameters (or tness) which evolve through time. They can be seen as an advantage (or a disadvantage) giving more weight to the i th species. In a neutral case, where all the species have the same tness, the above probability is equal to X i n , meaning that no species is advantaged. We denote by s n , the environment at step n, i.e the vector having for i th coordinate s i n . In the following, (s n ) n>0 will be a Markov chain taking values in a nite space E with cardinality K. Furthermore, we assume that for all n ≥ 0, s S+1 n = 0. Indeed, we can obtain it from any conguration by changing all the coecients by s

i n = si n -s S+1 n 1+s S+1 n .
This assumption forces, if we take initially positive tness, that the coecients belong to the set ] -1; ∞[

We assume throughout this work that (s n ) n≥0 is autonomous, meaning that its evolution does not depend on (X n ) n≥0 . We further dene U n as the vector composed of X n and s n .

This model therefore describes a Markovian dynamic in which a species invades denitively the community almost surely in a nite time. This is due to the absence of immigration. Some works, such as [START_REF] Danino | Fixation and absorption in a uctuating environment[END_REF] and [START_REF] Danino | Stability of two-species communities: drift, environmental stochasticity, storage eect and selection[END_REF], give an estimation of the absorbing time in non random environment. However, the invasion time is increasing with the population size J. Our main goal is to understand the behaviour of the process when the population is large. Do environmental switch improve or reduce biodiversity?

The species vector (X n ) n≥0 is a Markovian random process. Let us describe the transition probabilities. Let x be the vector having for coordinate i, x i . Denote ∆ = 1 J , so for the i species:

P x i + = P X i n+1 = x i + ∆|U n = (x, s n ) = (1 -x i ) x i (1 + s i n ) 1 + S+1 k=1 x k s k n , P x i -= P X i n+1 = x i -∆|U n = (x, s n ) = x i      1 - x i (1 + s i n ) 1 + S+1 k=1 x k s k n      , P x i+ x j-= P({X i n+1 = x i + ∆} ∩ {X j n+1 = x j -∆}|U n = (x, s n )) = x j      x i (1 + s i n ) 1 + S+1 k=1 x k s k n      .
When the population size J is big, understanding the temporal evolution of the population is not easy from a mathematical and computing point of view. Thus we will approach the dynamics of this model by a continuous-time random dierential equation when the population is large.

1.2. In large population. Let us start with the following proposition that characterises the order (relative to J) of the expectation, variance, and covariance of the abundance variation of a species during an event:

Proposition 1.

Let ∆ t = 1 J and n = tJ. When J goes to innity, we have :

(1) E[X i n+1 -X i n |U n = (x, s n )] = 1 J x i s i n - S k=1 x k s k n (1 + S k=1 x k s k n ) -1 , (2) V ar[X n+1 -X n |X n = (x, s n )] = O( 1 J 2 ), (3) Cov[X i n+1 , X l n+1 |U n = (x, s n )] = O( 1 J 2 ).
This proposition shows that the expectation is of the order of 1 J whereas the variance is of order 1 J 2 . Considering a scale in 1 J , the variation of variance over a time step becomes negligible in large population limit. Thus, we should obtain a limit process where only s could be random. With this choice, we keep a selection independent of the size of the population and the limit process is usually called the "strong selection approximation", see [START_REF] Ethier | Diusion approximations of the two-locus wright-sher model[END_REF] and [START_REF] Kimura | Diusion models in population genetics[END_REF]. It is opposed to another possible choice, the "weak selection approximation", which consists in considering the selection inversely proportional to the size of the population. The paper [START_REF] Guillin | On the simpson index for the moran process with random selection and immigration[END_REF] deals with this other possibility.

To emphasise the dependence on J, we use in this section the notation U

J n = (X J n , s J n ).
We give an approximation result under the following assumption. Assumption 1. There exists a nite set E such that, for all J, the process (s J n ) n≥0 is an autonomous Markov chain dened on E. Moreover, if we denote by P J s,s the transition probability of (s J n ) n≥0 , then for all s = s , there exist α s > 0 and Q s,s ≥ 0 such that

lim J→∞ JP J s,s = α s Q s,s .
We consider the rescaled piecewise linear extension sJ t = s J tJ of (s J n ) n≥0 . Let denote by P sJ (s, s , t) the transition probabilities of sJ , then for all s = s ,

lim J→∞ P sJ s, s , 1 J × J = α s Q(s, s ).
We also consider the interpolated continuous-time process ( XJ t ) t≥0 of (X J n ) n≥0 dened by

XJ t = X J tJ + J t - tJ J X J tJ +1 -X J tJ ,
and we set ( Ũ J t ) t≥0 = ( XJ t , sJ t ) t≥0 . Theorem 2 below means, under Assumption 1, when J tends to innity the sequence of processes ( Ũ J t ) t≥0 converges towards

(U t ) t≥0 = (X t , s t ) t≥0 , where (X t ) t>0 is solution of    dX 1 t . . . dX S t    =          X 1 t s 1 t - k∈S X k t s k t 1+ k∈S X k t s k t . . . X S t s S t - k∈S X k t s k t 1+ k∈S X k t s k t          dt (2)
and (s t ) t≥0 is a continuous times Markov chain with αQ for generator.

The process (U t ) t≥0 is a Piecewise Deterministic Markov Processes (PDMP). It evolves according to the deterministic dynamics of the equation (2) for some s xed during a random time with exponential distribution. Then its behavior changes and adopts another dynamic when the parameter s switches. This kind of process was introduced by Davis [START_REF] Davis | Piecewise-deterministic Markov processes: a general class of nondiusion stochastic models[END_REF]. The PDMPs' have become ubiquitous in stochastic modelling of various phenomena. They are applied to neuroscience [START_REF] Pakdaman | Fluid limit theorems for stochastic hybrid systems with application to neuron models[END_REF], [START_REF] Pakdaman | Intrinsic variability of latency to rst-spike[END_REF], [START_REF] Pakdaman | Asymptotic expansion and central limit theorem for multiscale piecewise-deterministic Markov processes[END_REF], genetics [START_REF] Crudu | Convergence of stochastic gene networks to hybrid piecewise deterministic processes[END_REF], ecology [START_REF] Benaïm | Lotka Volterra in uctuating environment or how switching between benecial environments can make survival harder[END_REF], internet trac [START_REF] Chafaï | On the long time behavior of the TCP window size process[END_REF], [START_REF] Fontbona | Quantitative estimates for the long-time behavior of an ergodic variant of the telegraph process[END_REF], [START_REF] Fontbona | Long time behavior of telegraph processes under convex potentials[END_REF], [START_REF] Bardet | Total variation estimates for the TCP process[END_REF]. See also [START_REF] Azaïs | Piecewise deterministic Markov processrecent results[END_REF], [START_REF] Benaïm | Qualitative properties of certain piecewise deterministic Markov processes[END_REF] and [START_REF] Cloez | Probabilistic and piecewise deterministic models in biology[END_REF] and the references therein for more details and applications.

For (U t ) t>0 and more generally for Markov processes, we use the following standard notations. If µ is a probability measure, we let P µ denote the law of (U t ) t>0 knowing that U 0 has distribution µ, and E µ denote the associated expectation. In the special case where µ = δ (x,s) , then we write P x,s instead of P δx,s .

Consider now the process (Z J t ) t≥0 = (U t/J ) t≥0 , taking values in I = [0.1]×E. Its generator acts on f in C 1 (I ) as :

Lf (x, s) = sx(1 -x) (1 + sx)J ∂ ∂x f (x, s) + s ∈E α s Q s,s J f (x, s ) -f (x, s) = L C f (x, s) + L D f (x, s)
Recall that our aim is to compare ( Ũ J t ) t≥0 with (U t ) t≥0 . We will be interested in quantities of the type

E x,s f Ũ J t -f (U t ) ,
for f : I → R regular enough and (x, s) ∈ I J × E, where I J = { i J : i = 0, 1, 2, • • • , J} is the state space of (X J n ) n≥0 . On the space of continuous functions f : I → R, we consider the semi-norm f J = max

(x,s)∈I J ×E |f (x, s)|. For k ≥ 1, we say that f : I → R is of class C k if for all s, the map f s : x → f (x, s) is of class C k .
In that case, we denote by f (k) the application dened on I by f

(k) (x, s) = f (k) s (x).
The following theorem gives an estimation of the error of approximation of our initial Moran process by our PDMP. Theorem 2. There exist a function q : R + → R + at most exponential and a function k :

R + → R + linear in time such that for all f ∈ C 3 (I ), for all t ≥ 0, max (x,s)∈I J ×E E x,s [f ( Ũ J t ) -f (U t )] ≤ q t J f J + f (1) J + f (2) J + k t max s,s ∈E JP s,s -α s Q s,s f J + O( 1 J 2 )
The sketch of the proof is the same as in the article [START_REF] Gackou | When can the discrete moran process be replaced by wright-sher diusion?[END_REF]. The complete proof is in appendix. To understand the general dynamic of the PDMP, we rst study the vector eld of the equation (2) for a non random environment. The following section is dedicated to this study.

Vector field for constant parameters.

In all this section, we assume that s is a constant process. In particular, (X t ) t>0 is a deterministic process, solution of the ODE

    dX 1 t dt . . . dX S t dt     =          X 1 t s 1 - k∈S X k t s k 1+ k∈S X k t s k . . . X S t s S - k∈S X k t s k 1+ k∈S X k t s k          (3)
Let us rst dene the space where the process X t evolves:

E = {X ∈ R S + : S i=1 X i ≤ 1}.
Note that E can also be seen as the unit simplex in dimension S + 1:

E ∆ = {X ∈ R S+1 + : S+1 i=1 X i = 1}. That is why, for X ∈ E , we set X S+1 = 1 - S i=1 X i .
For 1 ≤ i ≤ S + 1, we let E i 0 be the extinction set of species i :

E i 0 = {X ∈ E : X i = 0}.
We also denote by E 0 the extinction set, i.e the set where at least one species is extinct:

E 0 = S+1 i=1 E i 0 .
For 1 ≤ S, let e i denote the i th vector of the standard basis and set e S+1 = 0. The point e i correspond to the invasion of species i, that is, species i is the only species in the system. Note that when we see the process as a process in ∆, e S+1 is the (S + 1) th vector of the standard basis. Finally, we set E i + = E \ E i 0 , the set where species i is not extinct and E + = E \ E 0 the set where none of the species is extinct.

Let us remark that E 0 corresponds to the edges of the set E , and E + to the interior of E . It is also easily seen that E , E i 0 , E 0 , E i + and E + are invariant sets for X t i.e X t ∈ E (respectively

E i 0 , E 0 , E i + , E + ) if and only if X 0 ∈ E (respectively E i 0 , E 0 , E i + , E + ).
The following theorem states that when the environment does not switch, the species with the highest tness will invade the community. Theorem 3. Let X t be the solution of (3). Assume that s k = s j for all j = k and set m = arg max

i≤S+1 s i . Then if X m 0 > 0, X t converges to e m .
Proof. By assumption, s m > s j for all j = m. In particular, this implies that s m ≥ S j=1 s j X j , with strict inequality as soon as X m = 1. In particular, dX m t dt ≥ 0, and thus X m t is nondecreasing. Since X m t is bounded above by 1, we conclude that X m t converges to some X m and dX m t dt goes to 0. Now assume that X m 0 > 0, then since X m t is increasing, X m > 0. Thus (s m -s j )X j t = 0, which due to s m > s j implies that lim t→∞ X j t = 0 for all j = m. This concludes the proof.

Remark 1. One can actually prove that X t converges to e m exponentially fast, with rate

Λ := -min k =m (s m -s k ) 1+s m .
For a proof of this result, we refer to theorem 9.

Remark 2. If some tnesses are the same, i.e. s j = s i for some i = j, then the same proof shows that all the species that do not have the best tness go to extinction. In other words, for all i such that s i < s m , species i goes to extinction. Figures 1 and2 give some examples of vector elds and the trajectories for dierent initial conditions for one particular vectors eld. The following sections deal with the random process with switched environments. First we treat the case of two species, which is basic but essential to understand the behavior of our population with more species.

General framework and tools

In this section, (s t ) t>0 is Markovian jump process taking values in a nite space E = {s 1 , ..., s K } and having for generator (Q i,j ) 1 i,j K . Let s i j be the selection parameter of the i th species in environment s j .

In the discrete model, even if (s t ) t>0 is a Markov chain, one species invades the community in a nite time almost surely. This property may still be preserved in weak selection (see for example [START_REF] Guillin | On the simpson index for the moran process with random selection and immigration[END_REF], where examples are given on the selection process leading to a reachable boundary).

In strong selection, even if the selection is deterministic, it is impossible for a species to reach the extinction set in nite time but the process may concentrate in a neighbourhood of extinction and no longer emerge over time, i.e., extinction occurs at an innite horizon and it is equivalent to a loss of biodiversity. In the following, we prove that under some assumptions, in strong selection it is possible to conserve biodiversity in the community. Moreover we give some information on the long time behavior of the process.

3.1. General framework. In this part, we recall some recent results of Benaïm [START_REF] Benaïm | Stochastic persistence[END_REF] that will be used in the paper. With the notations of the previous section, we set M = E × E, M 0 = E 0 × E and M + = M \ M 0 . We dene in a similar way M i 0 and M i + . We consider the process (U t ) t>0 = (X t , s t ) on M starting from (x, s) and dened by :

   dX t dt = G st (X t ) P x,s (s t+h = s k |s t = s j ) = q j,k h + o(h) if j = k (4) with G i s (X) = X i F i s (X) and F i s (X) = s i - S k=1 s k X k 1+ S k=1 s k X k
and q j,k are the generator coecients of the Markovian jump process. Finally let (Π u t ) t>0 be the empirical occupation measure of the process (U t ) t≥0 , for U 0 = u = (x, s), dened by

Π u T (B) = 1 T T 0 1 {Ut∈B} ds, ∀B ∈ B(M )
3.2. Stochastic Persistence.

The following denition follows from [START_REF] Schreiber | Persistence for stochastic dierence equations: A mini review[END_REF].

Denition 1. The family {(U t ) t>0 , U 0 ∈ M + } is stochastically persistent with respect to M 0 if for all > 0 there exists a compact set K ∈ M + such that for all u in M + :

P(lim t→0 inf Π u t (K ) 1 -) = 1
This denition means that all the species, initially present, stay away from the extinction set over arbitrary long periods of time. Persistence with respect to M i 0 is dened in the same way. Denition 2. A probability measure is said to be ergodic for a Markovian process if it is invariant and extremal for the process, meaning that it cannot be written as a nontrivial convex combination of other invariant measures. For a Borelian set B of M, we denote by P erg (B) the space of ergodic probability measure such as for all µ in P erg (B) , µ(B) = 1.

We recall the denition given in [START_REF] Benaïm | Stochastic persistence[END_REF] of the invasion rates with respect to an ergodic probability measure in P erg (M 0 ). Denition 3. For µ ∈ P erg (M 0 ), we introduce µ j (B) = µ(B × s j ). The invasion rate of species i with respect to µ is dened by :

λ i (µ) = 1 j K M 0 F i s j (x)dµ j (x).
Remark 3. The intuition behind these quantities is the following. On the one hand, from equation ( 4), we see that whenever X i 0 = 0, one has

1 t log(X i t ) = 1 t t 0 F i su (X u )du + 1 t log(X i 0 ).
In particular,

1 t log(X i t ) ∼ 1 t t 0 F i su (X u )du
as t → ∞. On the other hand, Birkho ergodic's Theorem states that for µ ∈ P erg (M 0 ), for µ almost every u 0 , P u 0 almost surely,

lim t→∞ 1 t t 0 F i su (X u )du = 1 j K M 0 F i s j (x)dµ j (x) = λ i (µ).
Thus, λ i (µ) represent an exponential growth rate of species i near M i 0 . The following theorem is a consequence of [9, Th. 6.1]. It gives sucient conditions for the process to be persistent with respect to M i 0 and M 0 , respectively. Theorem

(1) Assume that for all µ ∈ P erg (M i 0 ), λ i (µ) > 0. Then the process given by ( 4) is H-persistent with respect to M i 0 .

(2) Assume that there exists positive numbers {c i , 1 i S + 1} such that, for all µ ∈

P erg (M 0 ), 1≤i S+1 c i λ i (µ) > 0.
Then the process given by ( 4) is H-persistent with respect to M 0 .

The rst point of the above theorem can be interpreted as follows. If for some species i, one has λ i (µ) > 0 for all µ ∈ P erg (M i 0 ), then the face E i 0 is repulsive : if the process start in E i + and close to the face E i 0 , then the process is in some sense pushed away from E i 0 . The second point states that the process is pushed away from every face, and thus concentrates on the interior M + of the domain.

3.3.

Behavior near a common zero. The previous theorem gives some way to understand the behavior of the process near the boundary E i 0 , which corresponds to the extinction of species i. It is also important to understand the process near the vertex e i , which corresponds to the invasion of species i. Since the {e i } i<S+1 are common zero of the vector elds G s , we can use the recent results of [START_REF] Benaïm | Random switching between vector elds having a common zero[END_REF] and [START_REF] Strickler | Randomly switched vector elds sharing a zero on a common invariant face[END_REF]. According to these papers, the behavior of the process (U t ) t>0 near e i for some 1 ≤ i ≤ S + 1 is controlled by the behavior of the linear process V t = (Y i t , s t ), where (s t ) t≥0 is the Markov process with generator Q and Y i evolves according to

dY i t dt = A i st Y i t ,
where A s is the Jacobian matrix of G s at e i . Assume with no loss of generality that i = 1. Then A i s = DG s (e 1 ) is given by

A i s = -s 1 1+s 1 * 0 D s ,
where * is a 1 × (S -1) vector and D s is a (S -1) × (S -1) diagonal matrix given by

D s = diag s 2 -s 1 1 + s 1 , . . . , s S -s 1 1 + s 1 .
In the particular case i = S + 1, (recall e S+1 = 0), DG s (e S+1 ) = diag(s 1 , . . . , s S ).

Study for two species in a two-states environment

We consider in this section S = 1, i.e there is only two species in the community. The vectors eld have the form:

         dX 1 t dt = X 1 t s t -s t X 1 t 1 + s t X 1 t dX 2 t dt = X 2 t -s t X 1 t 1 + s t X 1 t (5)
As before, since X 1 t + X 2 t = 1, we only study (X 1 t ) t>0 , that we denote simply by (X t ) t>0 . Thus we are interested in the study of

dX t dt = s t X t (1 -X t ) 1 + s t X t . (6)
Moreover, we assume that K = 2, the community evolves in two dierent environments. The selective parameters takes values in E = {(s 1 , 0), (s 2 , 0)}. It is possible to take more than two values for the tness, and the following reasoning still hold. We restrict this study to the case of two values to simplify the notations. Assume moreover q 1 := q 1,2 > 0 and q 2 := q 2,1 > 0, and so (s t ) t>0 has an unique invariant probability measure µ = p 1 δ s 1 + p 2 δ s 2 , where p 1 = q 2 q 1 +q 2 and p 2 = q 1 q 1 +q 2 . We set

M = [0, 1] × E and M 0 = {0, 1} × E. It is easily checked that P erg (M 0 ) = {µ 1 , µ 2 } = {δ 0 ⊗ µ, δ 1 ⊗ µ}.
To avoid trivial switching, we assume that s 1 = s 2 , and without loss of generality, we assume that s 1 > s 2 . For i ∈ {1, 2}, we dene

g i : [0, 1] → R by g i (x) = s i x(1 -x) 1 + s i x .
We set

Λ 0 = p 1 s 1 + p 2 s 2 and Λ 1 = -p 1 s 1 1 + s 1 + p 2 s 2 1 + s 2 .
These quantities are the average growth rate of (X t ) t>0 at 0 and 1, respectively. The following proposition gives the behavior of the process according to the signs of Λ 0 and Λ 1 .

Proposition 5. We can describe four regimes :

(1) If Λ 0 < 0, then Λ 1 > 0, and, for all x ∈ (0, 1) and s ∈ E,

P x,s lim sup t→∞ 1 t log(X t ) ≤ Λ 0 = 1.
In particular, species 1 goes extinct.

(2) If Λ 1 < 0, then Λ 0 > 0, and, for all x ∈ (0, 1) and s ∈ E,

P x,s lim sup t→∞ 1 t log(1 -X t ) ≤ Λ 1 = 1.
In particular, species 2 goes extinct. (3) If Λ 0 > 0 and Λ 1 > 0, there exists an unique invariant probability measure π such that π({0} × E) = π({1} × E) = 0. Moreover, π is absolutely continuous with respect to the Lebesgue measure on [0, 1] × E with explicitly computable density, and there exist C, θ, γ > 0 such that, for all (x, s) ∈ (0, 1) × E and all t ≥ 0,

P x,s (X t ∈ •) -π T V ≤ C((x) -θ + (1 -x) -θ )e -γt .
In particular, both species persist. (4) If Λ 0 = 0 or Λ 1 = 0, then the only invariant probability measures of the process (X t , s t ) t>0 are µ 1 and µ 2 .

In particular, the process is not persistent.

Proof. We prove (1), the proof of (2) being the same as the one of (1) by switching species 1 and 2. Assume that Λ 0 < 0. In particular, s 2 < 0 and p 1 s 1 < -p 2 s 2 , which implies that [START_REF] Benaïm | Random switching between vector elds having a common zero[END_REF]Th. 3.1], implies that there exist c > 0 and η > 0 such that for all x ∈ (0, c) and s ∈ E

-Λ 1 < - 1 1 + s 1 - 1 1 + s 2 p 2 s 2 < 0, proving that Λ 1 > 0. Now since Λ 0 > 0,
P x,s (lim sup t→∞ 1 t log(X t ) ≤ Λ 0 2 ) ≥ η. (7)
On the other hand, because Λ 1 > 0, there exists by Theorem 3.2 in [START_REF] Benaïm | Random switching between vector elds having a common zero[END_REF] ε > 0 such that for all

x = 0,

P x,s (τ < ∞) = 1, (8)
where τ = inf{t ≥ 0 : X t ≤ 1 -ε}. Finally, because 0 is a globally asymptotically stable equilibrium of f 0 on [0, 1), one can show that there exists a constant C > 0 such that for all

x ∈ [0, 1 -ε], P x,s (Z t ∈ U × E) ≥ C. (9)
Like in [START_REF] Benaïm | Lotka Volterra in uctuating environment or how switching between benecial environments can make survival harder[END_REF]Th. 3.1], Equations 7, 8 and 9 enable to conclude the proof of point 1.

We pass to the proof of point (3). Since Λ 0 and Λ 1 are positive, [START_REF] Benaïm | Random switching between vector elds having a common zero[END_REF]Th. 3.2] implies that for all ε > 0, there exists 1 > r > 0 such that, for all (x, s) ∈ (0, 1) × E, almost surely

lim inf 1 t t 0 1 r<X<1-r ds ≥ 1 -ε.
This implies that the the sequence (Π t ) t>0 is almost surely tight in (0, 1). Moreover, every limit point of (Π t ) is an invariant probability measure for X t , s t ) t>0 (see [9, Th. 2.1]). Thus, the process admits an invariant probability measure π on (0, 1) × E. Uniqueness, absolute continuity and convergence in total variation easily follow from Theorem 4.10 in [START_REF] Benaïm | Stochastic persistence[END_REF] and Theorem 4.4 in [START_REF] Benaïm | Qualitative properties of certain piecewise deterministic Markov processes[END_REF]. Point (4) is proven in the following lemma as in [START_REF] Hurth | Random switching near bifurcations[END_REF].

Remark 4. Note that this property still holds for any number of environments K, with

Λ 0 = i≤K p i s i and Λ 1 = - i≤K p i s i 1+s i .
In the following lemma, we describe more precisely the case where the growth rates are positive by computing explicitly the density of the invariant probability measure concentrated on (0, 1) × E. Lemma 6. Assume that (U t ) t>0 admits an invariant probability measure Π on (0, 1) × E.

Then Π is absolutely continuous with respect to the Lebesgue measure on (0, 1) × E. Moreover, denote by h 1 and h 2 the densities of Π(•, 0) and Π(•, 1), respectively. Then for all x ∈ (0, 1),

h i (x) = H(x) |g i (x)| ,
where

H(x) = C(1 -x) βΛ 1 x αΛ 0 , with α = q 1 +q 2 |s 1 s 2 | and β = α(1+s 1 )(1+s 2 ) and C the positive constant such that 1 0 (h 1 +h 2 ) = 1.
In particular, if Λ 0 = 0 or Λ 1 = 0, U cannot admits such an invariant probability measure.

Proof. Let us assume that (U t ) t>0 admits an invariant probability measure Π on (0, 1) × E. This implies that s 1 > 0 and s 2 < 0. Indeed, by Proposition 5, if Λ 0 < 0, X t converges almost surely to 0, and in particular cannot admit an invariant probability measure on (0, 1) × E.

Thus we need Λ 0 ≥ 0 and since we have assumed that s 1 > s 2 , this implies s 1 > 0. For the same reason, Λ 1 must be non-negative, implying s 2 < 0. Thus, all the point in [0, 1] are accessible, yielding that the support of Π has to be [0, 1] × E (see Proposition 3.17 in [START_REF] Benaïm | Qualitative properties of certain piecewise deterministic Markov processes[END_REF]). Moreover, since for every x ∈ (0, 1), f 1 (x) > 0, the weak bracket condition hold and Π is unique and admits a density with respect to the Lebesgue measure (see [START_REF] Benaïm | Qualitative properties of certain piecewise deterministic Markov processes[END_REF] or [START_REF] Bakhtin | Invariant densities for dynamical systems with random switching[END_REF]). Moreover, this also implies by Theorem 1 in [START_REF] Bakhtin | Regularity of invariant densities for 1d systems with random switching[END_REF] that the densities h i are C ∞ on (0, 1). Thus, h 1 and h 2 satisfy the Fokker-Planck equations (see e.g [4, section 7.2], [START_REF] Benaïm | Lotka Volterra in uctuating environment or how switching between benecial environments can make survival harder[END_REF], or [START_REF] Du | Asymptotic behavior of Kolmogorov systems with predator-prey type in random environment[END_REF]) :

q 1 h 1 -q 2 h 2 = -(g 1 h 1 ) q 1 h 1 -q 2 h 2 = (g 2 h 2 ) . (10)
Now, one can check that the functions given above satisfy these equations. Moreover, since h 1 and h 2 are densities, they satisfy 1 0 h 1 + h 2 = 1; in particular they are integrable on (0, 1). This is the case if and only if Λ 0 > 0 and Λ 1 > 0. Therefore, if you assume that Λ 0 = 0 or Λ 1 = 0, (U t ) t>0 cannot admit an invariant probability measure on (0, 1) × E, for otherwise it would have densities satisfying equations 10, hence densities that are not integrable on (0, 1), a contradiction. Example 1. Consider p 1 = p 2 , i.e the jump rate are the same for both environments. So, let simplify conditions 3) of property 5 to obtain the following conditions of persistence:

   s 2 < -s 1 1 + 2s 1 s 2 > -s 1
Note that if s 1 is smaller than -0.5 the rst condition is automatically veried. Then take the particular case s 1 = 1. Then the previous condition to have persistence becomes s 2 < -1 3 . To illustrate, we plot the comportment of the process for two values of s 2 close to -1 3 , -0.3 and -0.4. Note that for s 2 = -0.4 the process seems to be persistent whereas for s = -0.3 it seems to be absorbed quickly. So the numerical simulations are consistent with the condition giving by Proposition 5 . Trajectories of (X t ) t>0 and the average of (X t ) t>0 for dierent tness, obtain by Monte Carlo method with 500 trajectories. Parameters are

s 1 = -s 2 = 0.4, q 1,2 = q 2,1 = 1/2.
As stipulated in Proposition 5, the process is not persistent. Moreover, the fact that Λ 1 is positive prevents species 2 from extinction. The numerical simulations suggest that the rst species disappears.

Example 3. In this example, we illustrate Lemma 6. Recall that if the parameters are such that the process is persistent, then the invariant distribution Π on M + have explicit densities, given by

h i (x) = C |s i | (1 -x) βΛ 1 -1 x αΛ 0 -1 (1 + s i x),
where α = q 1 +q 2 |s 1 s 2 | and β = α(1 + s 1 )(1 + s 2 ). In particular, it can exhibits several behaviour at the boundaries 0 and 1, according to the sign of βΛ 1 -1 and αΛ 0 -1. Let us x s 2 = -0.2, and jump rates q 1 = q 2 = q. In particular, p 1 = p 2 and the process is persistent if and only if 0.2 < s 1 < 1/3. Fix q = 1. Then, it is easily seen that βΛ 1 -1 > 0 if and only if s 1 < 1/4; whereas αΛ 0 -1 > 0 if and only if s 1 > 1/4. In particular, if s 1 ∈ (0.2, 1/4), then lim x→0 h i (x) = +∞ and lim x→1 h i (x) = 0, whereas if s 1 ∈ (1/4, 1/3), then we have the converse situation, i.e. lim x→0 h i (x) = 0 and lim x→1 h i (x) = +∞. This is illustrated in Figure 6. Now x s 2 = -0.2 and s 1 = 0.27. Then, once again it is easy to check that βΛ 1 -1 > 0 if and only if q > 0.259/5; whereas αΛ 0 -1 > 0 if and only if q > 10/7. Thus, we have three regimes :

(1) if q < 0.259/5, then h i (x) goes to innity both at 0 and 1;

(2) if q ∈ (0.259/5, 10/7), then h i (x) vanishes at 0 and explodes at 1;

(3) if q > 10/7, then h i (x) vanishes both at 0 and 1. Plots of h 1 are presented in Figure 7 for situation (1) and (3), situation ( 2) is plot on the right of Figure 6. This example shows that even if the process is persistent, the stationary distribution Π certainly does not give mass to 0 and 1, but can be concentrated close to the extinction points. In the example with s 1 = 0.27, s 2 = -0.2 and q < 0.259/5, the intuition is the following. Since q is very small, the environment s takes a really long time before changing. During this time, the process is getting really close to the boundary (say 0 if we are following s 2 ), and spend a huge time here. When a switch occurs, the process goes away from 0 fast enough, and come close to 1 where it spends again a long time, and so on. In particular, it is much more likely that a switch occurs in the neighbourhood of 0 or 1, than in the middle. That is why, the process does not stay for a long time in the middle part, and concentrates near the boundaries. These examples concludes the study for two species. We now generalise some properties to a larger number of species and any number of environments. The space M is no longer a line but a tetrahedron and the extinction set M 0 correspond to the face of M . Of course some intuitive behavior, as the fact that if a species has always the best tness, it invades the Figure 7. Plot of h 1 for s 1 = 0.27 and q = 0.04 (left) and q = 2 (right) community, is still true. But many arguments used in previous part to prove these results are specic to dimension one and does not hold anymore.

General results

In this section we keep the notations of part 1.1. We assume that the Markov chain (s t ) t≥0 is irreducible on E. Hence, it admits a unique invariant probability measure on E, denoted by µ = p 1 δ s 1 + . . . + p K δ s K .

We describe now some behavior of the process in some remarkable environments.

5.1. Sucient conditions for a species to invade (or not) the community. In this section, we provide sucient condition for a species to have a positive probability of invading the community. Furthermore, we prove that if one species have a positive probability to invade the community, then all the other ones cannot invade. For i 0 ∈ {1, . . . , S + 1} , we set

Λ i 0 = max i =i 0 K j=1 p j s i j -s i 0 j 1 + s i 0 j
Theorem 7. Assume that for some i 0 ∈ {1, . . . , S + 1}, Λ i 0 < 0. Then, for all α ∈ (Λ, 0), there exist η > 0 and a neighbourhood U of e i 0 such that, for all x ∈ U and all s ∈ E,

P (x,s) lim sup t→∞ 1 t log X t -e i 0 ≤ α ≥ η.
Furthermore, for all i = i 0 , we have Λ i > 0, and there exist b > 1, ε > 0, θ and c > 0 such that, for all x ∈ E \ E 0 , s ∈ E and i = i 0 ,

E (x,s) (e bτ ε i ) ≤ c(1 + x -e i -θ ),
where

τ ε i = inf{t ≥ 0 : X t -e i ≥ ε}.
Proof. Without loss of generality, we assume that i 0 = 1, and we set Λ = Λ 1 . We set

M 1 0 = E 1 0 × E and M + 1 = M \ M 1
0 . First, we note that e 1 = (1, 0, . . . , 0) is a common zero for all the G s , s ∈ E, and that for all i ≥ 2, E i 0 is a common invariant face for the process. Moreover, the Jacobian matrix of G s at e 1 is given by

A s = -s 1 1+s 1 * 0 D s ,
where * is a 1 × (S -1) vector and D s is a (S -1) × (S -1) diagonal matrix given by

D s = diag s 2 -s 1 1 + s 1 , . . . , s S -s 1 1 + s 1 .
By assumption, Λ < 0, which implies by Theorem 2.7 in [START_REF] Strickler | Randomly switched vector elds sharing a zero on a common invariant face[END_REF] (or Proposition 2.5 in [START_REF] Strickler | Randomly switched vector elds sharing a zero on a common invariant face[END_REF] and Theorem 3.5 in [START_REF] Benaïm | Random switching between vector elds having a common zero[END_REF]) that for all α ∈ (Λ, 0), there exists η > 0 and a neighbourhood U of e 1 such that, for all x ∈ U and all s ∈ E,

P (x,s) lim sup t→∞ 1 t log X t -e 1 ≤ α ≥ η,
which concludes the proof of the rst assertion.

We now prove the second assertion. Let i = 1. Since Λ 1 < 0, we have

K j=1 p j s i j -s 1 j 1 + s 1 j < 0
As in Proposition 5, we can show that this last inequality implies that

K j=1 p j s 1 j -s i j 1 + s i j > 0
and thus that Λ i > 0. Without loss of generality, we assume now that i = S + 1. We set

Λ - S+1 = min k≤S K j=1 p j s k j ,
and we distinguish two cases. If Λ - S+1 > 0, Proposition 2.5 in [START_REF] Strickler | Randomly switched vector elds sharing a zero on a common invariant face[END_REF] and Theorem 3.5 in [8] conclude the proof. If Λ - S+1 < 0, we assume without loss of generality that there exists k 0 such that

K j=1 p j s k j > 0 for k ≤ k 0 and K j=1 p j s k j < 0 for k > k 0 . We set E 1,...,k 0 0 = k 0 k=1 E k 0 ,
which is the set of extinction of the k 0 -th rst species. This set is invariant for all the vector elds G s . Moreover, the Jacobian matrix of G s at e S+1 = 0 is given by

DG s (e i ) = diag s 1 , . . . , s S .
Now, by denition of k 0 , the assumptions of Theorem 2.8 in [START_REF] Strickler | Randomly switched vector elds sharing a zero on a common invariant face[END_REF], except for the accessibility of 0 from E 1,...,k 0 0 , are satised. However, since [START_REF] Strickler | Randomly switched vector elds sharing a zero on a common invariant face[END_REF][Theorem 2.8 (iii)] is a local result, and since we get a probability of convergence to 0 which is bounded below in a neighbourhood of 0 in E 1,...,k 0 0 , a localisation argument similar to the one given in [START_REF] Hening | On a predator-prey system with random switching that never converges to its equilibrium[END_REF] enables us to conclude. This theorem states that when Λ i 0 < 0, species i 0 has a positive probability to invade the community, while if Λ i 0 > 0, species i 0 cannot invade the community. Furthermore, it is only possible to have one species satisfying Λ i 0 < 0. Let us nish by an interesting related result that up to now we can only pose as a conjecture. Conjecture 8. If Λ i 0 < 0, then for all x with x i 0 = 0 and all s ∈ E,

P (x,s) lim sup t→∞ 1 t log X t -e i 0 ≤ Λ i 0 = 1.
5.2. The same species has always the best tness.

In this section, we prove that if one of the species has always the best tness, then this species take the upper hand on every over one. We have the following result, which generalizes Theorem 3: Theorem 9. Assume that for all j ∈ {1, . . . , K} and i ∈ {2, . . . , S + 1}, one has s 1 j > s k j , and set

Λ = max 2≤i≤S+1 K j=1 p j s i j -s 1 j 1 + s 1 j < 0.
Then, for all x ∈ E with x 1 > 0 and all s ∈ E, one has

P x,s lim sup t→∞ 1 t log X t -e 1 ≤ Λ = 1.
Proof. We use Theorem 3.8 in [START_REF] Benaïm | Random switching between vector elds having a common zero[END_REF]. By Theorem 7, we know that for all α ∈ (Λ, 0), there exists η > 0 and a neighbourhood U of e i 0 such that, for all x ∈ U and all s ∈ E,

P (x,s) lim sup t→∞ 1 t log X t -e i 0 ≤ α ≥ η.
Furthermore, since e 1 is an asymptotically stable equilibrium whose basin of attraction is E + 1 for each G s , we deduce that the point e 1 is accessible from E + 1 for the PDMP. This means that each neighbourhood of e 1 can be reached with positive probability by the process (see [START_REF] Benaïm | Qualitative properties of certain piecewise deterministic Markov processes[END_REF] for a precise denition). Since the set E + 1 is not compact, we have to study the behavior of the process near E 1 0 to conclude that the process converges to e 1 with probability one from everywhere in E + 1 . For all s ∈ E, we have

F 1 s (x) = s 1 - S i=1 s i x i 1 + S i=1 s i x i
By assumption, for all x ∈ E 1 0 , one has F 1 s (x) > 0. This implies that for all µ ∈ P erg (E 1 0 ),

λ 1 (µ) > 0.
In particular, the process is H -persistent with respect to E 1 0 . Therefore, by [9, Proposition 8.2], there exists a Lyapunov function for the process near E 1 0 and thus Hypothesis 3.7 in [START_REF] Benaïm | Random switching between vector elds having a common zero[END_REF] is satised for the set M + 1 . This concludes the proof by Theorem 3.8 in [START_REF] Benaïm | Random switching between vector elds having a common zero[END_REF].

5.3.

A species is always disadvantaged with respect to the other species in each environment.

With no loss of generality, we assume the species 1 is always disadvantaged with respect to the other species. More precisely for each environment, the species 1 has a negative tness.

We assume moreover that the last species is not extinct, i.e 1 -

S k=1

x k > 0.

We now prove in this situation that the species 1 is going to 0. The strategy is to show that the vector eld is always entering in

E b = {(x 1 , ..., x S ) ∈ E : x 1 < b(1 - S k=2
x k )}}, for all b ∈]0, 1[. Hence, if the process enters in E b , it cannot escape E b . Then, we prove, for all b ∈]0, 1[, the hitting time of E b is nite.

Let us consider the hyperplane of the form ∆ b : {(x 1 , ..., x S ) ∈ E :

x 1 = b(1 - S k=2
x k )} for

b in ]0, 1[. This is the hyperplane passing through the points be 1 , e 2 , ..., E, where e i is the i th vector of the natural base, and E b is the area under ∆ b . The following proposition proves that for each environment, the vector eld is entering in E b .

Proposition 10. Let s i be such that s 1 i < 0 for i ∈ 1, .., K, then for all b in ]0, 1[, E b is a trap area for the process X t .

Proof. Consider a xed environment and note s k the tness of the k th species. Let us start by remarking that v b = (1, b, ..., b) is an orthogonal vector of the hyperplane ∆ b , pointing outward E b . Now, we look at the sign of projection of the vector eld dX 1 , ..., dX S at the

point δ b = b(1 - S k=2 x k ), x 2 , ..., x S of ∆ b on v b . If the result is strictly negative for all x and b in ]0, 1[, along ∆ b , the vector eld is entering in E b . dX 1 , ..., dX S δ b ; v b < 0 ⇔ b 1 - S k=2 x k s 1 - S k=1 s k x k + b S k=2 x k s k - S k=1 x k s k < 0 ⇔ bs 1 1 - S k=1 x k < 0 ⇔ s 1 < 0
Therefore, the vector eld is entering in E b if and only if s 1 < 0. But we assumed s 1 i < 0 for each i, so for all environments the vector eld is entering in E b . This concludes the proof.

Corollary 11. Assume that s 1 i < 0 for each i. Then the process (X t ) t>0 , starting at (x 1 , . . . , x S+1 ) such that 1 -

S k=1

x k > 0, veries lim t→∞ X 1 t = 0. In particular species 1 goes to extinction.

Proof. Denote now by b t the intersection between the hyperplane passing through the points X t , e 2 , ..., E and the straight line directed by e 1 . By the previous propriety , for all t , E bt is a trap area. Moreover the species 1 has in each environment a strictly negative tness, so by the previous calculation the vector eld on ∆ bt is strictly entering. Consequently, b t is strictly decreasing and b t converges to b lim . Note that by denition and the previous proposition, for all t ≥ 0, X 1 t ≤ b t . Hence, if b lim = 0, X 1 t converges to 0. If b lim = 0, the process converges to ∆ b lim . Necessarily the process converges to an invariant area included in ∆ b lim . But according to the previous proposition, on each point of ∆ b lim where 1 -

S k=1

x k = 0, all the vector elds are strictly entering in E b lim . So this invariant area is also included in 1 =

S k=1

x k , which implies X 1 = b lim X 1 . Since b lim = 0, we conclude that X 1 = 0. Thus, species one goes to extinction in all cases. Remark 5. A immediate corollary of this property is, if a species has always the best tness in each environment, then it invades the community. Note that Theorem 9 above proves this fact independently and gives the rate of convergence.

Let us now give an example to illustrate this property .

Example 4. Consider the case of three species and two environments, we take the notation of part 6.1. Assume the species Y has always a negative tness, and the tness are ordered like :

s 1 > 0 > r 1 0 > r 2 > s 2
In Figure 4 are plotted the phase portrait of the vectors elds for each environment. Figure 9 shows that the eld is entering in E b , and this true for each b. The conclusion follows, the Y species goes to extinction. The following gure illustrate a trajectory where the species Y has always a negative tness. We now look at the case of three species and two jumps rates. Previous theorems nd their application in this particular case. The two dimensional study made in Section 4 is also necessary to understand the long time behavior of the process. The space of extinction M 0 corresponds here to the side of the triangle dened by the apex (0, 0), (1, 0), (0, 1). Thus understanding the long time behavior requires knowledge of the invariant measures of the process on M 0 . In particular the behaviors of the process on each side of the triangle, which corresponds to studying the process with only two species.

6. The case of 3 species 6.1. Introduction. For sake of simplicity, when there are only three species, we use the notations X, Y and Z, instead of X 1 , X 2 , X 3 . We also denote by s k and r k the tness in environment k ∈ {1, ..., K} of species X and Y , respectively (remember that we have set the tness of the third species to be 0). Since we have for all t ≥ 0, X t + Y t + Z t = 1, we are interested in the following equations :

       dX t dt = X t s t -s t X t -r t Y t 1 + s t X t + r t Y t dY t dt = Y t r t -s t X t -r t Y t 1 + s t X t + r t Y t (11)
The community still evolves in two dierent environments. The tness takes values in E = {s 1 = (s 1 , r 1 , 0), ..., s K = (s K , r K , 0)}. To avoid trivial switching, we assume that s i = s j if i = j. Assume yet that (s t ) t>0 has a unique invariant probability measure µ = K i=1 p i δ s i . The set of ergodic measures of the process on M 0 , P erg (M 0 ), depends on the values of the environment. This set always contains µ 3 = δ (0,0) ⊗ µ, µ 2 = δ (0,1) ⊗ µ and µ 1 = δ (1,0) ⊗ µ, the Dirac masses on each vertex. But on each side, it may have one other ergodic measure. It corresponds to persistence of the two remaining species on this side. Let's give more details about it: Proposition 12. Let dene

Λ 1 0 = K i=1 p i r i , Λ 1 1 = K i=1 -p i r i 1 + r i Λ 2 0 = K i=1 p i s i Λ 2 1 = K i=1 -p i s i 1 + s i Λ 3 0 = K i=1 p i r i -s i 1 + s i , Λ 3 1 = K i=1 p i s i -r i 1 + r i
Then the process admits an ergodic measure, ν i on int(E i 0 ) × E if and only if Λ i 0 > 0 and

Λ i 1 > 0.
Furthermore, this ergodic measure is unique and explicitly computable. Proof. This property is a corollary of Proposition 5.

When Λ i 0 and Λ i 1 are positive, we denote by ν i the unique ergodic measure on int(E i 0 ) × E.

Remark 6. The signs of Λ i 0 and Λ i 1 determines the behavior of the process on side i in a neighbourhood of the extinction and the invasion, respectively, for the i th species.

Study for two environmental states.

Now we assume K = 2, then µ = p 1 δ s 1 + p 2 δ s 2 with p 1 = q 2 q 1 +q 2 and p 2 = q 1 q 1 +q 2

We now describe the dierent possible regimes according to the values of the parameters.

• If a species, for example Y , is always disadvantaged with respect to the same other species in each environment, by Corollary 11, this species goes to extinction.

Reorganising the order of species if necessary, it corresponds to

s 1 > 0 > r 1 0 > r 2 > s 2 or s 1 > 0 > r 1 0 > s 2 > r 2 or s 1 > 0 > r 1 s 2 > 0 > r 2 or s 1 > 0 > r 1 s 2 > r 2 > 0
Then, there are several possibilities for the two remaining species, depending on the behavior of the process on the axis {y = 0}. If we are in the situation 1 or 2 of the Proposition 5, then a species will invade the community. However, if we are in the situation 3 of Proposition 5, there is persistence of both other species (see Figure 6.2). • Else, reorganising if necessary the order of species, we are in the following situation : [START_REF] Peter | The stabilizing eect of a random environment[END_REF] We see in the following that several behaviors are possible. According to the values of the tness, each species, even the neutral, can invade the community (see Theorem 14). However, it is not possible to have persistence of all the species. Before describing the possibilities for the case [START_REF] Peter | The stabilizing eect of a random environment[END_REF], we compute the invasion rates for each species.

s 1 > 0 > r 1 r 2 > 0 > s 2
6.2.1. Computation of the invasion rates. Referring to Theorem 4, it is important to describe the set of the ergodic measures on M 0 and to compute, for each species, the associated invasion rate. We know that there are at least three ergodic probability measures on M 0 , namely µ 1 , µ 2 and µ 3 . According to Proposition 12, there are at most three other ergodic probability measures on M 0 , denoted by ν 1 , ν 2 and ν 3 . We now compute the invasion rates of species i with respect to each of these ergodic measures. We detail the computations for species 1, they are similar for the other species.

Lemma 13. We have

λ 1 (µ 3 ) = K i=1 p i s i = Λ 2 0 , λ 1 (µ 2 ) = K i=1 p i s i -r i 1 + r i = Λ 3 1 , λ 1 (µ 1 ) = 0.
Moreover, when ν 1 , ν 2 and ν 3 exist, we have

λ 1 (ν 3 ) = λ 1 (ν 2 ) = 0
and

λ 1 (ν 1 ) = s 0 |r 0 | + s 1 |r 1 | C 1 ,
where C 1 is an explicitely computable positive constant.

Proof. Recall that for all µ ∈ P erg(M 0 ),

λ 1 (µ) = K i=1 M 0 F i (x, y)dµ i (x, y), with F i (x, y) = s i -(s i x + r i y) 1 + s i x + r i y .
In particular, the formulae for λ 1 (µ 3 ) and λ 1 (µ 2 ) are immediate from the denitions of µ 2 and µ 3 . The fact that λ 1 (µ 1 ) = λ 2 (ν 2 ) = λ 3 (ν 3 ) = 0 is straightforward from [9, Theorem 5.1 (i)]. It remains to compute λ 1 (ν 1 ). First, we note that by Proposition 12, ν 1 only exists if p 0 r 0 + p 1 r 1 > 0 and p 0 r 0

1+r 0 + p 1 r 1 1+r 1 < 0.
In particular, it can only exists if r 0 and r 1 are of opposite signs. Next, we know by Lemma 6 that in this case, ν 1 admits a density with respect to the Lebesgue measure on M 1 0 , which is given by

g i (y) = G(y)(1 + r i y) y(1 -y)|r i | . µ 1 µ 2 µ 3 ν 1 ν 2 ν 3 1 0 Λ 3 1 Λ 2 0 C 1 ( s 1 |r 1 | + s 2 |r 2 | ) 0 0 2 Λ 3 0 0 Λ 1 0 0 C 2 ( r 1 |s 1 | + r 2 |s 2 | ) 0 3 Λ 2 1 Λ 1 1 0 0 0 C 3 (-r 1 |s 1 -r 1 | -r 2 |s 2 -r 2 | )
Table 1. Invasion rates for some function G similar to the function H given in Lemma 6. Thus,

λ 1 (ν 1 ) = 1 0 F 0 (0, y)g 0 (y) + F 1 (0, y)g 1 (y)dy = 1 0 s 0 -r 0 y |r 0 | + s 1 -r 1 y |r 1 | G(y) y(1 -y) dy
Now, since r 0 and r 1 have opposite signs, we have for all y ∈ (0, 1)

s 0 -r 0 y |r 0 | + s 1 -r 1 y |r 1 | = s 0 |r 0 | + s 1 |r 1 | , which implies that λ 1 (ν 1 ) = s 0 |r 0 | + s 1 |r 1 | 1 0 G(y) y(1 -y) dy.
and concludes the proof.

The invasion rates for species 1, as well as for species 2 and 3 are summed up in Table 1. As for C 1 , C 2 and C 3 are positive constant that may be computed. However, since it is sucient to know the signs of the invasion rates, it does not really matter to have the exact expression of the C i . 6.3. Environment favours and disadvantages alternately two species, the other one stay neutral over time. With no loss of generality, we assume the environment promotes and disadvantages alternately the rst and the second species. So without regard to order, only one conguration is possible:

s 1 > 0 > r 1 , r 2 > 0 > s 2 .
(13) In this conguration, many dierent situations are possible for the long time behavior. In the following we highlight some of them. Mainly, we discuss about the situation where the neutral species (the third in the last conguration) invade the community. Then we prove that persistence of the three species is not possible with only two environments. 6.3.1. The neutral species invades the community. In this section, we use results of Section 5.1 to provide sucient conditions for the invasion of the neutral species. We also give an example of parameters satisfying theses conditions. Theorem 14. Assume that Λ 1 0 < 0 and Λ 2 0 < 0. Set

Λ = max(Λ 1 0 , Λ 2 0 ) < 0
Then, for all (x, y) ∈ E \ E 3 0 , and all s ∈ E,

P (x,y,s) lim sup t→∞ 1 t log (X t , Y t ) ≤ Λ = 1.
Proof. With the notations of Theorem 7, Λ = Λ 3 , and thus, by this theorem, for all α ∈ (Λ, 0), there exists η > 0 and a neighbourhood U of 0 such that, for all (x, y) ∈ U and all s ∈ E,

P (x,y,s) lim sup t→∞ 1 t log (X t , Y t ) ≤ α ≥ η.
Now, we prove that the point 0 is accessible from E 3 + . By Lemma 26, 0 is accessible if and only if it is accessible for the vector elds given by g s (x, y) = (x(s 1 -(s 1 x+r 1 y)), y(r 1 -(x 1 x+r 1 y))). Consider the convex combination g p = p 1 g s 1 + p 2 g s 2 . Then g p = g sp , where s p = p 1 s 1 + p 2 s 2 . Now, since Λ 1 0 and Λ 2 0 are negative, s p = (s p , r p , 0). Hence, by Theorem 3 and Lemma 26, the ow generated by g p converges to 0 for all initial condition in E 3 + . In particular, 0 is accessible from E 3 + with the vector elds g s , hence it is accessible for (X t , Y t ) t>0 . Finally, as for the proof of Theorem 9, we have to show that the face E 3 0 is repulsive. We use Theorem 4. We know that P erg (E 3 0 ) contain µ 1 , µ 2 and possibly ν 3 . Furthermore, by Lemma 13, Proposition 5 and the assumption that Λ 1 0 < 0 and Λ 2 0 < 0, we have that

λ 3 (µ 1 ) = Λ 2 1 > 0 and λ 3 (µ 2 ) = Λ 1 1 > 0.
Moreover, since we are in the situation

s 1 > 0 > r 1 r 2 > 0 > s 2 ,
the assumption Λ 1 0 = r 1 + r 2 < 0 and Λ 2 0 = s 1 + s 2 < 0 is equivalent to -r 1 > r 2 > 0 and -s 2 > s 1 > 0, which implies r 1 s 2 > r 2 s 1 . Hence, by Proposition 19 below, λ 3 (ν 3 ) > 0 which concludes the proof.

Example 5. Take s 1 = 1/3, r 1 = -1/3, s 2 = -3/8 and r 2 = 1/4. Choose q 1 = q 2 so that

p 1 = p 2 = 1 2 . Then Λ 1 0 = - 1 24 ; Λ 2 0 = - 1 48 ; Λ 3 0 = - 1 5 ,
thus conclusion of Theorem 14 holds. Illustrations are given in Figure 14. An immediate corollary of Theorem 7 is the following, which gives a sucient condition for non invasion of species 3.

Corollary 15. Assume that

Λ 1 0 > 0 or Λ 2 0 > 0. For ε > 0, dene τ ε = inf{t ≥ 0 (X t , Y t ) ≥ ε}.
Then, there exist ε > 0, b > 1, θ > 0 and c > 0 such that, for all (x, y) ∈ E \ E 0 , and all

s ∈ E, E (x,y,s) (e τ ε ) ≤ c(1 + (x, y -θ ).
In particular, species 3 cannot exclude the two other species.

6.3.2. Persistence is impossible for three species and two environments. We show in this section that persistence is not possible with only two environments. The following section will give an example of persistence for 3 environments.

The following lemma, which is a consequence of results in [START_REF] Benaïm | Stochastic persistence[END_REF], [START_REF] Benaïm | Lotka Volterra in uctuating environment or how switching between benecial environments can make survival harder[END_REF] and [START_REF] Benaïm | Random switching between vector elds having a common zero[END_REF], ensures us that if an edge has an attractive index, then the process converges to this face, thus preventing persistence of the process. Lemma 16. Assume that for some species i, ν i exists and that λ i (ν i ) < 0. Then, for all

(x, y, s) ∈ M \ M i 0 , P (x,y),s lim sup t→∞ 1 t log(X i t ) ≤ λ i (ν i ) = 1.
In particular, species i goes to extinction and persistence is not possible in that case.

The strategy to prove the lack of persistence is the following. First, we know by Theorem 7 that when one vertex is attractive (i.e satises Λ i < 0), the corresponding species has a positive probability to invade the community, hence preventing the persistence of the process. Thus, we will assume that all the vertex are repulsive. Then, we show that under this assumption, there is always, in the conguration [START_REF] Peter | The stabilizing eect of a random environment[END_REF], at least one non-trivial ergodic measure (supported by an edge). Finally, we prove that among all the ergodic measure ν 1 , ν 2 , ν 3 , there is a species with a negative invasion rate with respect to this measure, which shows that this species has a positive probability to disappear and thus that persistence is not possible. Proposition 17. Assume that all the vertex of the triangle are repulsive, i.e for each i ∈ {1, 2, 3}, Λ i > 0. Then necessarily there exists an invariant measure on a side of a triangle. Proof. We prove this result by contradiction. Refers to proposition 5, if on the edge i, Λ i 0 and Λ i 1 are positive, there exists an invariant measure on this edge. Thus the only conguration possible to obtain no invariant measure on the edges, when the vertex are repulsive is the one given in Figure 14 (or the symmetrical case). On the one hand, one has, with the conguration Figure 14. Impossible situation. of gure 14, the following inequalities :

     Λ 1 1 = -p 1 r 1 1 + r 1 -p 2 r 2 1 + r 2 < 0 Λ 3 1 = p 1 s 1 -r 1 1 + r 1 + p 2 s 2 -r 2 1 + r 2 > 0 ⇐⇒      -p 1 r 1 1 + r 1 < p 2 r 2 1 + r 2 p 1 s 1 1 + r 1 > -p 2 s 2 1 + r 2 and thus r 1 s 2 < r 2 s 1 .
But on the other hand, we have:

     Λ 2 1 = -p 1 s 1 1 + s 1 -p 2 s 2 1 + s 2 > 0 Λ 3 0 = p 1 r 1 -s 1 1 + s 1 + p 2 r 2 -s 2 1 + s 2 < 0 ⇐⇒      -p 1 r 1 1 + s 1 > p 2 r 2 1 + s 2 p 1 s 1 1 + s 1 < -p 2 s 2 1 + s 2 which imply r 1 s 2 > r 2 s 1 , a contradiction.
The previous proposition states that there exists at least one ergodic measure on a edge of the triangle. The following proposition deals with the case where there is only one such measure : Proposition 18. Assume it exists exactly one invariant measure on a edge of a triangle, then a species has an negative invasion rate with respect to this measure. And this species goes to extinction.

Proof. Two case have to be considered :

(1) The invariant measure is on the face 3.

(2) The invariant measure is on the face 1 (or symmetrically on the face 2). Let us consider rst the case 1, we are in the situation of the gure 15 ( or in a symmetrical case): So the following inequalities hold :

     Λ 1 1 = -p 1 r 1 1 + r 1 -p 2 r 2 1 + r 2 < 0 Λ 3 1 = p 1 s 1 -r 1 1 + r 1 + p 2 s 2 -r 2 1 + r 2 > 0 ⇐⇒      -p 1 r 1 1 + r 1 < p 2 r 2 1 + r 2 p 1 s 1 1 + r 1 > -p 2 s 2 1 + r 2
we obtain r 1 s 2 < r 2 s 1 , and so λ 3 (ν 3 ) < 0. By lemma 16, species 3 goes to extinction.

For the case 2, the same reasoning is still valid. Species 1 goes to extinction.

The following property claries the conditions to obtain negative invasion rates. Moreover it states, it's impossible to obtain three positive invasion rates λ i (ν i ) for i ∈ {1, 2, 3} : Proposition 19. The following equivalences hold:

λ 1 (ν 1 ) < 0 ⇔ λ 2 (ν 2 ) < 0 ⇔ λ 3 (ν 3 ) > 0 ⇔ s 1 r 2 < s 2 r 1
Proof. Remember, we are in situation 6.2, it may possible to simplify the following inequalities :

λ 1 (ν 1 ) < 0 ⇐⇒ s 1 |r 1 | + s 2 |r 2 | < 0 ⇐⇒ r 1 s 2 > s 1 r 2 λ 2 (ν 2 ) < 0 ⇐⇒ r 1 |s 1 | + r 2 |s 2 | ⇐⇒ r 1 s 2 > s 1 r 2 λ 3 (ν 3 ) > 0 ⇐⇒ - r 1 |s 1 -r 1 | - r 2 |s 2 -r 2 | > 0 ⇐⇒ r 1 s 2 > s 1 r 2
And we nd the result.

The previous property states it impossible have persistence if we have two invariant measures on the faces 1 and 3 or 2 and 3. Because necessarily one of the invasion rates compared to one of these two measure is negative Proposition 20. If there exist two invariant measures on face 1 and 2, necessarily it exists one on face 3 and λ 3 (ν 3 ) < 0.

Proof. Assume it exists an invariant measure on edge 1 and 2. Let's prove Λ 3 0 and Λ 3 1 are strictly positive. We are in the situation of gure 16

Figure 16. behavior of the process on a neighbourhood of each vertex.

Then we have

   Λ 2 1 = -p 1 s 1 1 + s 1 -p 2 s 2 1 + s 2 > 0 Λ 0 1 = r 1 + p 1 + r 2 p 2 > 0
and

Λ 3 0 = p 1 r 1 -s 1 1 + s 1 + p 2 r 2 -s 2 1 + s 2 = -p 1 s 1 1 + s 1 -p 2 s 2 1 + s 2 + p 1 r 1 + p 2 r 2 + p 1 r 1 s 2 + p 2 s 1 r 1 (1 + s 1 )(1 + s 2 ) = Λ 2 1 + Λ 1 0 + p 1 r 1 s 2 + p 2 s 1 r 1 (1 + s 1 )(1 + s 2 )
Note that p 1 r 1 s 2 and p 2 s 1 r 1 are positive because r 1 , s 2 are both negative and s 1 , r 2 are both positive. So Λ 3 0 is positive. A similar reasoning gives the same condition for Λ 3 1 . Let us conclude the proof by noting that

Λ 2 0 = p 1 s 1 + p 2 s 2 > 0 Λ 0 1 = r 1 + p 1 + r 2 p 2 > 0 ⇐⇒ s 1 r 2 > s 2 r 1 ⇐⇒ λ 3 (ν 3 ) < 0
And species 3 goes to extinction.

Corollary 21. If there are exactly two or three invariant measures, at least, an invasion rate

λ i (ν i ), is negative.
Proof. The proof is direct with property 19

It is impossible to obtain persistence with only two environments and three species. In the next section we give an example of persistence with three species and three environments. 6.4. Persistence for 3 species and 3 environments. In this part we give two examples of a system with 3 species and 3 environments which is persistent. In the rst example, each species has, in one environment, the best tness. In the second, the last species has never the best tness.

With obvious notations, we set

Λ 1 0 = p 1 r 1 + p 2 r 2 + p 3 r 3 , Λ 1 1 = -p 1 r 1 1 + r 1 -p 2 r 2 1 + r 2 -p 3 r 3 1 + r 3 Λ 2 0 = p 1 s 1 + p 2 s 2 + p 3 s 3 , Λ 2 1 = -p 1 s 1 1 + s 1 -p 2 s 2 1 + s 2 -p 3 s 3 1 + s 3 Λ 3 0 = p 1 r 1 -s 1 1 + s 1 + p 2 r 2 -s 2 1 + s 2 + p 3 r 3 -s 3 1 + s 3 , Λ 3 1 = p 1 s 1 -r 1 1 + r 1 + p 2 s 2 -r 2 1 + r 2 + p 3 s 3 -r 3 1 + r 3 .
To prove persistence, with theorem 4, we need to calculate the invasion rates λ i (ν i ) for possible ergodic measures ν i (remember if k = i, λ k (ν i ) = 0). Thus, we need to obtain an explicit formula for the ν i density. We could follow the same reasoning as in lemma 6. If (U t ) t>0 admits an invariant measure on (0, 1) × E, Π, it is absolutely continuous with respect to the Legesgue measure and admits a density. We still dene h i the density of Π(., i) for i ∈ {1, 2, 3}. The h i are in C ∞ and verie the Fokker-Planck equation :

    
-h 1 (q 1,2 + q 1,3 ) + q 2,1 h 2 + q 3,1 h 3 = -(g 1 h 1 ) -h 2 (q 2,1 + q 2,3 ) + q 1,2 h 1 + q 3,2 h 3 = (g 2 h 2 ) -h 3 (q 3,2 + q 3,1 ) + q 1,3 h 1 + q 2,3 h 2 = (g 3 h 2 ) [START_REF] Crudu | Convergence of stochastic gene networks to hybrid piecewise deterministic processes[END_REF] Unfortunately, the explicit computation of (h i ) now becomes tedious, and thus we have no explicit expression for the invasion rates λ i (ν i ). In the following example, we compute numerically the invasions rates λ i (ν i ) and show that we are in the situation of Theorem 4. Example 6. In this example, we assume q i,j = q k,l , ∀i, j, k, l ∈ {1, 2, 3} , and

s 1 = {1, 1 2 }, s 2 = { -1 4 , -1 2 }, s 3 = { -1 3 , 1 3 }.
And it follows

Λ 1 0 = 1 6 , Λ 1 1 = 5 36 , Λ 2 0 = 5 36 , Λ 2 1 = 1 6 , Λ 3 0 = 5 36 , Λ 3 1 = 1 6 .
Then there are exactly 3 ergodic measures ν i , i ∈ {1, 2, 3}, so we are in the same situation than picture 16.

For each of them, we approximate the invasion rate, i.e the quantity λ i (ν

i ) = E i 0 ×E F i s (x)dν i (x).
A way of doing it, since the measure is ergodic, is to use the ergodic theorem. So if (X t , s t ) t>0 is the PDMP dene by equation 2 and starting in int(E i

0 ) × E, 1 T T 0 F i st (X t )dt -→ T →+∞ λ i (ν i ).
Note the initial point (X 0 , s 0 ) has no inuence on the previous result. In the following we chose arbitrary initial conditions, others would have led to the same results. We proceed as follows:

• Simulate a large number of PDMP trajectories (1000), on [0, T ] for T big enough and starting in int(E i 0 ) × E.

• For each simulation calculate 1 T T 0 F i st (X t )dt.

• Take the average on the trajectories to improve our result.

Results :

In each simulation we take T = 80 and the number of trajectories simulated is 1000.

(1) For X 0 = [0, 0.5], s 0 = s 1 we obtain λ 1 (ν 1 ) = 0.0191 (2) For X 0 = [0.5, 0], s 0 = s 1 we obtain λ 2 (ν 2 ) = 0.0594 (3) For X 0 = [0.5, 0.5], s 0 = s 1 we obtain λ 3 (ν 3 ) = 0.090 For this conguration of environments we obtain positive invasion rates. So it proves, using 4, that persistence is possible for 3 species and 3 environments.

Example 7. We now give an example of persistence in which a species has never the best tness. Let us choose as parameters q i,j = q k,l , ∀i, j, k, l ∈ {1, 2, 3} , and s 1 = {0.1, -0.3}, s 2 = {-0.33, 0.1}, s 3 = {0.27, 0.25}. As in the previous example, there are exactly 3 ergodic measures ν i , i ∈ {1, 2, 3} and we are in the same situation than Figure 16. Let us calculate the invasion rate, with the same method : (1) For X 0 = [0, 0.5], s 0 = s 1 we obtain λ 1 (ν 1 ) = 0.016 (2) For X 0 = [0.5, 0], s 0 = s 1 we obtain λ 2 (ν 2 ) = 0.019 (3) For X 0 = [0.5, 0.5], s 0 = s 1 we obtain λ 3 (ν 3 ) = 0.009 The invasion rates are strictly positive so we conclude that in this example; we have persistence, even if the last species has never the best tness. A trajectory of the PDMP is plotted in Figure 18.

So that,

In the two previous examples, the process is persistant, and thus admits at least one stationnary distribution Π such that Π(M + ) = 1. The numerical simulations presented in Figure 6 suggest that in the case of Example 6, that Π has full support, i.e. its support is the whole space M . The following proposition proves this fact, as well as the exponential convergence of the process towards Π for general coecients. Proposition 22. Assume that s 1 , s 2 , s 3 are such that

     s 1 > 0 > r 1 r 2 > s 2 > 0 0 > r 3 > s 3 (15) or      s 1 > r 1 > 0 r 2 > 0 > s 2 0 > s 3 > r 3 (16)
Then, if the process is persistent :

(1) The stationary distribution Π satisfying Π(M + ) = 1 is unique and absolutely continuous with respect to the Lebesgue measure; (2) Π has full support;

(3) If furthermore α := s 2 r 3 -r 2 s 3 + s 3 r 1 -s 1 r 3 + s 1 r 2 -s 2 r 1 = 0, then there exist C, θ, γ > 0 such that, for all (x, y, s) ∈ M + and all t ≥ 0,

P (x,y,s) (U t ∈ •) -Π T V ≤ C 1 x θ + 1 y θ + 1 (1 -x -y) θ e -γt .
Proof. We only do the proof in the case [START_REF] Danino | Stability of two-species communities: drift, environmental stochasticity, storage eect and selection[END_REF]; it can be proved in the same way for [START_REF] Danino | Fixation and absorption in a uctuating environment[END_REF].

For i ∈ {1, 2, 3}, we denote by (ϕ i t (x)) t≥0 the ow generated by G i := G s i and started at x. That is, ϕ i t (x) is solution to

∂ϕ i t (x) ∂t = G i (ϕ s t (x)) ϕ i 0 (x) = x.
For m ≥ 1, i = (i 1 , . . . , i m ) ∈ {1, 2, 3} m and u = (u 1 , . . . , u m ) ∈ R m + , we denote by Φ i u the composite ow:

Φ i u = ϕ im um • . . . • ϕ i 1 u 1 .
For x ∈ M and t ≥ 0, we denote by O + t (x) (resp. O + (x)) the set of points that are reachable from x at time t (resp. at any nonnegative time) with a composite ow:

O + t (x) = {Φ i v (x), (i, v) ∈ E m × R m + , m ∈ N, v 1 + . . . + v m = t}, O + (x) = t≥0 O + t (x).
We dene the set of points that are accessible from E + as

Γ = x∈E + O + (x).
According to Corollary 4.6 and Remark 14 in [START_REF] Benaïm | Stochastic persistence[END_REF] and to Theorem 3.4 and Proposition 3.11 in [START_REF] Benaïm | Qualitative properties of certain piecewise deterministic Markov processes[END_REF], Γ×E is included in the support of Π for all stationary distribution Π such that Π(M + ) = 1. Thus, point ( 2) is proved if we show that Γ = E . For x ∈ E and i ∈ {1, 2, 3}, we let γ i + (x) and γ i -(x) denote the positive and negative orbit, respectively, of x under the ow ϕ i , namely :

γ i + (x) = {ϕ i t (x), t ≥ 0}, γ i -(x) = {ϕ i t (x), t ≤ 0}.
In situation [START_REF] Danino | Stability of two-species communities: drift, environmental stochasticity, storage eect and selection[END_REF], for all x ∈ E + , γ i + (x) is a regular curve linking x to e i , while γ i -(x) is a curve linking x to e i+1 , where i + 1 is taken modulo 3. We claim that for all x, y ∈ E + with x = y, there exist i, j ∈ {1, 2, 3} such that γ i

+ (x) ∩ γ j -(y) = ∅. In that case, let z ∈ γ i + (x) ∩ γ j -(y) = ∅.
Then, there exist t, s > 0 such that z = ϕ i t (x) = ϕ j -s (x). Hence, by the ow property of ϕ j , we get y = ϕ j s • ϕ i t (x), and thus y is accessible from x. This shows that E + ⊂ O + (x), for all x ∈ E + , hence E ⊂ Γ and point ( 2) is proven since E ⊃ Γ. We now prove the claim. Let x, y ∈ E + with x = y. Then the γ i + (x), i ∈ {1, 2, 3} are three regular curves linking x to each vertex of E 0 , while the γ j -(x), i ∈ {1, 2, 3} are three regular curves linking y to each vertex of E 0 . In particular, at least one of these three rst curves has to cross one of the three other, which proves the claim. We pass to the proof of point [START_REF] Armstrong | Coexistence of species competing for shared resources[END_REF]. Let x ∈ E + . Then, there must exists a point y ∈ γ 1

+ (x)
such that G 1 (y) and G 2 (y) are linearly independent. If not, one would have for all y ∈ γ 1 + (x), G 1 (y) = α(y)G 2 (y) for some negative function α, which would imply that γ 1

+ (x) = γ 2 -(x).
This is a contradiction since γ 1 + (x) is a curve linking x to e 1 while γ 2 -(x) is a curve linking x to e 3 . Hence, the weak bracket condition holds at y which belongs to Γ, thus Π has to be unique and absolutely continuous with respect to the Lebesgue measure by Corollary 6.3 in [START_REF] Benaïm | Stochastic persistence[END_REF].

To prove point (3), we also use Corollary 6.3 in [START_REF] Benaïm | Stochastic persistence[END_REF]. According to this corollary (which is a consequence of results in [START_REF] Benaïm | Qualitative properties of certain piecewise deterministic Markov processes[END_REF] and [START_REF] Bakhtin | Invariant densities for dynamical systems with random switching[END_REF]), it suces to nd an accessible point (x, y) (thus a point in E ) such that G 1 (x, y) -G 2 (x, y) and G 2 (x, y) -G 3 (x, y) are lineary independent. One can check that y) and G 2 (x, y) -G 3 (x, y) are lineary independent and point (3) is proven.

det (G 1 -G 2 , G 2 -G 3 ) (x, y) = xy(1 -x -y) h(x, y) (s 2 r 3 -r 2 s 3 + s 3 r 1 -s 1 r 3 + s 1 r 2 -s 2 r 1 ), where h(x, y) = (1 + s 1 x + r 1 y)(1 + s 2 x + r 2 y)(1 + s 3 x + r 3 y) > 0. In particular, if s 2 r 3 - r 2 s 3 + s 3 r 1 -s 1 r 3 + s 1 r 2 -s 2 r 1 = 0; G 1 (x, y) -G 2 (x,
Remark 7. Using the same kind of proof, it can be shown that Π has full support in more general situation. Indeed, the assumption that the process is persistent implies that each of the species has exactly once the worst tness. Indeed, if one species (say 1) has never the worst tness, it has to be better than another one (say 2) in each environment, which implies that species 2 will go to extinction according to Corollary 11. Moreover, if the process is persistent, by Theorem 9, none of the species can have the best tness in every environment. Thus, in the persistent case, we are either in case 15 or 16, that are handled by the previous proposition, or in a situation like in Example 7. That is

     s 1 > 0 > r 1 r 2 > 0 > s 2 s 3 > r 3 > 0 (17)
With the same notations as in the proof of the previous proposition, one can see that the γ i -(y) for i ∈ {1, 2, 3} are still three regular curves linking one to each vertex of E 0 . However, now γ 1 + (x) and γ 3 + (x) are curves linking x to e 1 , while γ 2 + (x) is a curve linking x to e 2 . To be able to conclude as in the previous proof, we need e 3 = 0 to be accessible from x. This is for example the case if one can nd a 1 , a 2 , a 3 ≥ 0 such that

a 1 s 1 + a 2 s 2 + a 3 s 3 < 0 and a 1 r 1 + a 2 r 2 + a 3 r 3 < 0, (18)
by the argument given in the proof of Theorem 14. In this case, e 2 ∈ O + (x) and as before, + (x) has to have a nonempty intersection with one of the γ i -(y), and we can conclude that in this situation, Π is unique and has full support. In Example 7, take a 1 = a 2 = 1/2 and a 3 = 0, then (18) is satised and thus Π is unique and has full support. Note also that the condition s 2 r 3 -r 2 s 3 + s 3 r 1 -s 1 r 3 + s 1 r 2 -s 2 r 1 = 0 is satised, thus the process converges exponentially fast to Π.

Conclusion.

In this part, we treat the whole case of tree species and two environments, and we prove persistence is impossible in this situation. On the other hand, if we deal with 3 species and 3 environments, we are able to exhibit congurations where persistence is possible.

Of course many other congurations of tness gives persistence to. But, we actually are unable to give explicit conditions on tness to characterize them. However numerical (deterministic) approximations may be used for each environment.

In view of the results of the previous sections, we formulate the following conjecture, that we have proved for 2 and 3 species.

Conjecture 23. Persistence of the system is possible if and only if there are at least as many environments as there are species.

7. Appendix 7.1. Proof of Theorem 2. Let (U J n ) n≥0 = (X J n , s J n ) n≥0 be the Moran model described in section 1.1, (U t ) t≥0 = (X t , s t ) t≥0 the PDMP given by equation 2 and (Z J t ) t≥0 = (X t/J , s t/J ) t≥0 the PDMP in the time scale of the discrete process, whose generator is given by L.

Our goal is to quantify the dierence

E x,s f (U t ) -f ( Ũ J t )
for f : I → R regular enough. First note that, since U t = Z J tJ , we can rewrite this dierence as

E x,s f (Z J tJ ) -f (Z J tJ ) + E x,s f (Z J tJ ) -f (U J tJ + E x,s f (U J tJ -f ( Ũ J t ) .
We rst show that the rst and last term of the above quantity can easily be controlled. For all t ≥ 0 and J ≥ 1, one has 0 ≤ t -tJ J < 1 J , hence tJ J converges to t. The probability that (s u ) u≥0 perfomes a jump at time t is zero, hence, almost surely, for J big enough,

s tJ J = s t . In particular, if f is C 1 , one has f (Z tJ ) -f (Z tJ ) ≤ f (1) X t -X tJ J , where f (1) = max (x,s)∈I |f s (x)|. Let C G = max (x,s)∈I |G s (x)|, then X t -X tJ J = t tJ J G su (X u )du ≤ t - tJ J C G ≤ C G J , which implies f (Z tJ ) -f (Z tJ ) ≤ f (1) C G J .
Furthermore, Ũ J t = ( XJ t , sJ t ) and by denition, sJ t = s J tJ and

XJ t -X J tJ = J t - tJ J X J tJ +1 -X J tJ ≤ X J tJ +1 -X J tJ .
Thus,

E x,s f (U J tJ -f ( Ũ J t ) ≤ f (1) E x,s X J tJ +1 -X J tJ ≤
f (1) J because the dierence between X J n+1 and X J n is at most 1/J. Therefore, one can look at the dierence

E x,s f (Z J tJ ) -f (U J tJ ) because E x,s f (U t ) -f (U J tJ ) ≤ f (1) C G + 1 J + E x,s f (Z J tJ ) -f (U J tJ ) .
We set

T J u f (x, s) = E x,s f (Z J t ) and S J k f (x, s) = E x,s f (X J n ) .
When there is no ambiguity, we shall drop the exponent J on T J and S J . With these notations, our aim is to control T n f -S n f J , where n = tJ .For this, we can use the following inequality, proved in [START_REF] Gackou | When can the discrete moran process be replaced by wright-sher diusion?[END_REF] :

S n f -T n f J ≤ n-1 k=0 (S 1 -T 1 )T k f J (19)
Thus we are reduced to the study of (S 1 -T 1 )g J for g regular enough. We start by the following lemma : Lemma 24. There exists γ 0 , γ 1 , γ 2 > 0, such that for all g ∈ C 3 (I ),

(S 1 -T 1 )g J ≤ γ 0 g J + γ 1 g (1) J J 2 + γ 2 g (2) J J 2 + 2 s =s P J s,s - α s Q s,s J g J + O( 1 J 3 ).
Proof. We rst show that for g which is C 3 ,

T 1 g(x, s) = g(x, s) + Lg(x, s) + 1 2 L 2 g(x, s) + O( 1 J 3 )
Let (P t ) t≥0 be the semigroup associated with the PDMP (U t ) t≥0 : Q t g(x, s) = E x,s (g(U t )) and L its generator :

L g(x, s) = sx(1 -x) (1 + sx) ∂ ∂x g(x, s) + s ∈E α s Q s,s f (x, s ) -f (x, s) .
Then, one has T t = P t/J and L = 1 J L . It is well known that for g in the domain of L ,

∂ ∂t P t g(x, s) = P t L g = L P t g
In particular, if g and L g are in the domain of L , then P t g is twice dierential with respect to time and

∂ 2 ∂t 2 P t g(x, s) = P t L 2 g = L 2 P t g,
where L 2 g = L (L g). In the case of PDMP, it is possible to prove that when g is C 3 , then both g and L g are in C 3 . Thus, we obtain the following Taylor development :

T 1 g(x, s) = P t/J g(x, s) = g(x, s) + 1 J L g(x, s) + 1 2J 2 L g(x, s) + O( 1 J 3 ) = g(x, s) + Lg(x, s) + 1 2 L 2 g(x, s) + O( 1 J 3 ).
Hence,

S 1 g -T 1 g = S 1 g -g -Lg - 1 2 L 2 g + O( 1 J 3 ).
Moreover, we have

S 1 g(x, s) = E x,s g(X J 1 , s J 1 ) = P J s,s E x,s g(X J 1 , s) + s =s P J s,s E x,s g(X J 1 , s ) ,
which leads to (we drop the J in P s,s for better readability) S 1 g(x, s) -T 1 g(x, s) = E x,s g(X J 1 , s) -g(x, s) -L C g(x, s) (P s,s -1) E x,s (g(X J

1 , s)) -g(x, s) + s =s P s,s E x,s (g(X J

1 , s )) -g(x, s ) + s =s P s,s -α s Q s,s J g(x, s ) -g(x, s)

- 1 2 L 2 g(x, s) + O( 1 J 3 ).
We now prove that the three rst terms are of order 1/J 2 , with bounds controllable by the derivative of g. Note that by denition of L 2 , it is immediate that there exist some constants γ 0 , γ 1 and γ 2 such that

L 2 g J ≤ γ 0 g J J 2 + γ 1 g (1)
J

J 2 + γ 2 g (2) J J 2 .
Since in one step, the dierence X J 1 -x is of order 1/J, we have the following Taylor development : E x,s g(X J 1 , s ) = g(x, s ) + ∂g ∂x (x, s )E x,s [X J 1 -x] + ∂ 2 g ∂x 2 (x, s )

1 2 E x,s (X J 1 -x) 2 + O( 1 J 3 )
By Proposition 1 and denition of L C , we thus have E x,s g(X J 1 , s) -g(x, s) -L c g(x, s) ≤ g (2) 2J 2 + O(

1 J 3 ).
The previous Taylor development also gives that E x,s g(X J 1 , s ) -g(x, s ) ≤

g (1) J + O( 1 J 2 )
Now, since for all s = s, lim J→∞ P J s,s J = α s Q s,s , we have P s,s = O(1/J), which concludes the proof.

Let f ∈ C 3 (I ). In view of inequality 19, we want to apply Lemma 24 to T k f , for 0 ≤ k ≤ n -1. For this, we need to prove that T t f is regular for all t ≥ 0, and to give an estimate on the derivative of T t f : Lemma 25. Let C = max (x,s)∈I | ∂Gs ∂x (x)| and K = max (x,s)∈I |D 2 G s (x)|. Then for all f ∈ C 2 (I ), for all t ≥ 0, (P t f ) (1) ≤ exp(Ct) f (1) , and (P t f ) (2) ≤ exp(2Ct) f (1) + K f (2) .

In particular, (T t f ) (1) ≤ exp(C t J ) f (1) , and (T t f ) (2) ≤ exp(2C t J ) f (1) + K f (2) .

Proof. For s ∈ E, we denote by ϕ s t (x) the ow generated by G s and started at x. That is, ϕ s t (x) is solution to

∂ϕ s t (x) ∂t = G s (ϕ s t (x)) ϕ s 0 (x) = x.
By C ∞ regularity of G s , for every t ≥ 0, x → ϕ s t (x) is C ∞ . Let ( Sn ) n≥0 and ( Tn ) n≥0 denote the sequence of postjump locations and of jump times of (s t ) t≥0 , respectively. Under P x,s , one has

X x t = ϕ SN t t-TN t • . . . • ϕ s T1 (x),
where we have denoted X x t the process X t to emphasis the dependence on x. From this equation, since the sequences ( Sn ) n≥0 and ( Tn ) n≥0 do not depend on x and since every ϕ s is C ∞ , one deduce that x → X x t is C ∞ almost surely. We can also write (2) + K f (1) We can now nish the proof of Theorem 2. Using inequality [START_REF] Du | Asymptotic behavior of Kolmogorov systems with predator-prey type in random environment[END_REF] and Lemma 24 applied to g = T k f , we have :

X x t = x + t 0 G su (X x u )
S n f -T n f ≤ n-1 k=0 (S 1 -T 1 )T k f ≤ 1 J 2 n-1 k=0 γ 0 T k f + γ 1 T (1)
k f + γ 2 T
(2)

k f + n-1 k=0   2 s =s P J s,s - α s Q s,s J T k f + O( 1 J 3 )   .
Now, since n = tJ , we get that n-1 k=0 O( 1

J 3 ) = O( 1 J 2 )
. Moreover, by Lemma 25, we have (T k f ) (1) ≤ f (1) J e tC -1 C .

For the same reason, we get that n-1 k=0

(T k f ) (2) ≤ f (1) + K f (2) J e 2tC -1 2C , hence 1 J 2 n-1 k=0 (γ 0 T k f +γ 1 T (1)
k f + γ 2 T (2) k f ) ≤ 1 J tγ 0 f + γ 1 e t2C -1 C f (1) + γ 2 K e 2tC -1 2C f (2)
This, together with the fact that n-1 k=0 s =s P J s,s -

α s Q s,s J T k f ≤ JP J s,s -α s Q s,s f
conclude the proof of Theorem 2.

7.2.

A lemma for accessibility. This section is devoted to the statement and the proof of a lemma which is useful for accessibility issue. Let E be a nite set, and for all i ∈ E, let f i : R d → R d be a globally integrable vector eld. For i ∈ E, we denote by (ϕ i t (x)) t≥0 the ow generated by f i and started at x. That is, ϕ i t (x) is solution to

∂ϕ i t (x) ∂t = f i (ϕ s t (x)) ϕ i 0 (x) = x.
For m ≥ 1, i = (i 1 , . . . , i m ) ∈ {1, 2, 3} m and u = (u 1 , . . . , u m ) ∈ R m + , we denote by Φ i u the composite ow: Φ i u = ϕ im um • . . . • ϕ i 1 u 1 . For x ∈ R d and t ≥ 0, we denote by O + f,t (x) (resp.

O + f (x)) the set of points that are reachable from x at time t (resp. at any nonnegative time) with a composite ow:

O + f,t (x) = {Φ i v (x), (i, v) ∈ E m × R m + , m ∈ N, v 1 + . . . + v m = t}, O + f (x) = t≥0 O + f,t (x).
For B ⊂ R d , We dene the set of points that are accessible from B (with the vector elds (f i ) i∈E ) as

Γ f,B = x∈B O + f (x).
These accessible sets are linked to the support of invariant probabiliy measure of PMDP, see e.g. [START_REF] Benaïm | Qualitative properties of certain piecewise deterministic Markov processes[END_REF]Proposition 3.17]. With these notations, we have the following lemma :

Lemma 26. Let (f i ) i∈E and (g i ) i∈E be two families of globally integrable vector elds on R d .

Assume that for all i, there exists a positive, Lipschitzian, bounded function h i : R d → R such that g i = h i f i . Then, for all x ∈ R d , one has

O + f (x) = O + g (x).
In particular, for all B ⊂ R d Γ f,B = Γ g,B .

Proof. Since g i = h i f i , one can nd, for all i ∈ E and x ∈ R d an increasing bijection α i

x :

[0, +∞) → [0 + ∞) such that, for all t ≥ 0, ψ i t (x) = ϕ i α i

x (t) (x), where ψ i and ϕ i are the ow generated by g i and f i , respectively. Now, let y ∈ O + f (x). Then, there exists

(i, v) ∈ E m × R m + such that y = Φ i u (x) = ϕ im um • . . . • ϕ i 1 u 1 (x).
Hence,

y = ψ im α im ϕ i m-1 u m-1 •...•ϕ i 1 u 1 (x) (um)
• . . .

• ψ i 1 α i 1 x (u 1 ) (x),
and so y ∈ O + g (x). Since the functions α are bijective, we can prove the converse inclusion, hence the equality of O + f (x) and O + g (x)

With the notations of the main sections of this paper, one has

G s (x) = h s (x)f s (x),
where h s (x) = 1 + s 1 x 1 + . . . + s S x S and f i s (x) = x i (s i -(s 1 x 1 + . . . + s S x S )). The particular interest of the lemma lies in the fact that a convex combination of the f s is given by the function with the convex combination of the coecients. That is, if (a s ) s∈E are nonnegative such that s a s = 1, and if we set for s a = s∈E a s s, then s a s f s = f sa .

Figure 1 .

 1 Figure 1. Vectors elds and trajectories for dierent initial conditions (3 species) .

Figure 2 .

 2 Figure 2. Trajectories of X t for dierent initial conditions (S=2).

Figure 3 .

 3 Figure3. Plots of the average of (X t ) t>0 for dierent tnesses, obtained by Monte Carlo method with 500 trajectories.

Figure 4 .

 4 Figure 4. Trajectory of (X t ) t>0 for two dierent tness Example 2. This second example illustrate the case 4) of Proposition 5. Assume as in the previous example p 1 = p 2 and take s 1 = -s 2 , so Λ 0 = 0 and Λ 1 = 2s 2 1 1-s 2 > 0

Figure 5 .

 5 Figure5. Trajectories of (X t ) t>0 and the average of (X t ) t>0 for dierent tness, obtain by Monte Carlo method with 500 trajectories. Parameters are

Figure 6 .

 6 Figure 6. Plot of h 1 for q = 1 and s 1 = 0.21 (left) and s 1 = 2.07 (right)

Figure 8 .

 8 Figure 8. Vectors elds and trajectories for the previous conguration of tness

Figure 9 .

 9 Figure 9. Illustration of ∆ b and v b .

Figure 10 .

 10 Figure 10. A PDMP trajectory where the 2 nd species goes to extinction. The values of environments are s 1 = [0.4, -0.1] and s 2 = [-0.3, -0.2].

Figure 11 .

 11 Figure 11. A PDMP trajectory where species Y goes to extinction and both other species persist. The values of environments are s 1 = [0.4, -0.1] and s 2 = [-0.3, -0.2].

Figure 12 .

 12 Figure 12. behavior of the process on a neighbourhood of each vertex.

Figure 13 .

 13 Figure 13. Neutral species invade the community. Environment values [0.5, -0.7] and [-0.8, 0.2].

Figure 15 .

 15 Figure 15. Ergodic measure on each edge.

Figure 17 .

 17 Figure 17. A PDMP trajectory. T = 1000. Left gure: X 0 = [0.4, 0.3]. Right gure: X 0 = [0.01, 0.8]

Figure 18 .

 18 Figure 18. PDMP trajectory, T=1000, X 0 = [0.45, 0.5].

n- 1 k=0(T k f ) ( 1 ) ≤ f ( 1 )J

 111 and n = tJ ≤ tJ, we get n-1 k=0

  du, that we can dierentiate with respect to x to nd Using once again Gronwall's inequality, we deduce that∂ 2 ∂x 2 X x t ≤ K(e Ct -1)e Ct ≤ Ke 2Ct . Ct .

	Furthermore,
	∂ 2 ∂x 2 f (X x t , s t ) =	∂ 2 ∂x 2 f (X x t , s t )	∂ ∂x	X x t	2	+	∂ ∂x	f (X x t , s t )	∂ 2 ∂x 2 X x t ,
	hence		∂ 2 ∂x 2 f (X x t , s
				∂ ∂x	X x t = 1 +	0	t	DG su (X x u )	∂ ∂x	X x u du.
	Using Gronwall's inequality, we deduce that
							∂ ∂x	X x t ≤ e Ct .
	Dierentiating once again, we nd
	∂ 2 ∂x 2 X x t =	0	t	D 2 G su (X x u )	∂ ∂x	X x u	2	du +	0	t	DG su (X x u )	∂ 2 ∂x 2 X x u du,
	which leads to		∂ 2 ∂x 2 X x t ≤ K(e Ct -1) + C	0	t	∂ 2 ∂x 2 X x u du.
	Now let f ∈ C 2 (I ), then
				∂ ∂x	f (X x t , s t ) =			∂ ∂x	f (X x t , s t )	∂ ∂x	X x t ,
	and thus
						∂ ∂x	f (X x

t , s t ) ≤ f (1) e t ) ≤ e 2Ct f

Acknowledgments

We thank Michel Benaïm for many discussions on this subject, and for making it possible for AP and ES to meet. This work was mainly done while ES was at Université de Neuchâtel, and is partially founded by the SNF grant 200021_175728. We also thank Franck Jabot for having suggested the study of Moran's model and his varied ideas which allowed us to give biological meaning to this article.