# Stochastic analysis of emergence of evolutionary cyclic behavior in population dynamics with transfer

Nicolas Champagnat, Sylvie Méléard, Viet Chi Tran

► To cite this version:

Nicolas Champagnat, Sylvie Méléard, Viet Chi Tran. Stochastic analysis of emergence of evolutionary cyclic behavior in population dynamics with transfer. The Annals of Applied Probability, 2021, 31 (4), pp.1820-1867. 10.1214/20-AAP1635. hal-01974289v3

HAL Id: hal-01974289

https://inria.hal.science/hal-01974289v3

Submitted on 1 Feb 2021

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# Stochastic analysis of emergence of evolutionary cyclic behavior in population dynamics with transfer

Nicolas Champagnat*, Sylvie Méléard†, Viet Chi Tran‡

October 16, 2020

## Abstract

Horizontal gene transfer consists in exchanging genetic materials between microorganisms during their lives. This is a major mechanism of bacterial evolution and is believed to be of main importance in antibiotics resistance. We consider a stochastic model for the evolution of a discrete population structured by a trait taking finitely many values, with density-dependent competition. Traits are vertically inherited unless a mutation occurs, and can also be horizontally transferred by unilateral conjugation with frequency dependent rate. Our goal is to analyze the trade-off between natural evolution to higher birth rates on one side, and transfer which drives the population towards lower birth rates on the other side. Simulations show that evolutionary outcomes include evolutionary suicide or cyclic re-emergence of small populations with well-adapted traits. We focus on a parameter scaling where individual mutations are rare but the global mutation rate tends to infinity. This implies that negligible sub-populations may have a strong contribution to evolution. Our main result quantifies the asymptotic dynamics of subpopulation sizes on a logarithmic scale. We characterize the possible evolutionary outcomes with explicit criteria on the model parameters. An important ingredient for the proofs lies in comparisons of the stochastic population process with linear or logistic birth-death processes with immigration. For the latter processes, we derive several results of independent interest.

Keywords: horizontal gene transfer, bacterial conjugation, stochastic individual-based models, long time behavior, large population approximation, coupling, branching processes with immigration, logistic competition.

MSC 2000 subject classification: 92D25, 92D15, 60J80, 60K35, 60F99.

## 1 Introduction and presentation of the model

Bacterial evolution understanding is fundamental in biology, medicine and industry. The ability of a bacterium to survive and reproduce depends on its genes, and evolution mainly results from

<footnote>* Université de Lorraine, CNRS, Inria, IECL, F-54000 Nancy, France; E-mail: nicolas.champagnat@inria.fr</footnote>

<footnote>† Ecole Polytechnique, CNRS, IUF, CMAP, route de Saclay, 91128 Palaiseau Cedex-France; E-mail: sylvie.meleard@polytechnique.edu</footnote>

<footnote>‡ LAMA, Univ Gustave Eiffel, Univ Paris Est Creteil, CNRS, F-77447 Marne-la-Vallée, France; E-mail: chi.tran@univ-eiffel.fr</footnote>
the following basic mechanisms: heredity (also called vertical transmission); mutation which generates variability of the traits; selection which results from the interactions between individuals and their environment; exchange of genetic information between non-parental individuals during their lifetimes (also called horizontal gene transfer (HGT)), see for example [19], [16]. In many biological situations, these mechanisms drive the population to different evolutionary outcomes: directional evolution, re-emergence of apparently extinct traits or extinction of the population. For example, in antibiotic resistance, cyclic re-emergence of resistant strains are observed, while evolutionary suicide may correspond to successful antibiotic treatments [3]. Such cyclic evolutionary dynamics and evolutionary suicide are due to an intricate interplay between HGT and selection and are therefore of a different nature from evolutionary behaviors observed in dynamical systems as prey-predator systems [9, 15]. Usually, genes responsible for pathogens or antibiotic resistances are carried by small DNA chains called plasmids that can be exchanged between bacteria by HGT. Plasmids HGT also play a key role in other biological contexts, including transmission of an epidemic, epigenetics or bacterial degradation of novel compounds such as human-created pesticides (e.g. [20], [14], [13]).

In [2] and [3], the authors introduced an individual-based stochastic process for the trade-off between competition, transfer and advantageous mutations from which they derived some macroscopic approximations. They proved that the whole population can be driven (by transfer) to evolutionary suicide, under the assumption that mutations are very rare. However, simulations show much richer evolutionary behaviors when mutation events are more frequent.

We propose below a toy model to capture these phenomena. Up to our knowledge, this is the first evolutionary model involving specific mutation scales allowing to recover all these phenomena. The simulations of this model are shown in Figure 1.1. We observe, depending on the transfer rate, either dominance of the trait with higher birth rate, or a cyclic phenomenon, or evolutionary suicide. In this model, the biological assumptions are as follows. We consider a large population of bacteria, characterized by a phenotypic value quantifying the macroscopic effect of plasmids on the demographic parameters. For example, the phenotype may describe the pathogenic strength or the antibiotic resistance [3]. When a transfer happens, a recipient bacterium is chosen uniformly at random in the population (frequency-dependence), as observed by biologists for large populations [12]. During the transfer, the quantity of plasmids in the recipient bacterium increases. The recipient bacterium receives the donor trait (this is called conjugation in the biological setting [2]). A large quantity of plasmids induces a large reproductive cost which slows down cell division [1], so that the division rate is a decreasing function of the trait. The density-dependence in the competition death rate is uniform over the trait space.

We consider a stochastic discrete population of individuals characterized by some trait. The population evolves in continuous time through births (with or without mutation), deaths and transfer of traits between pairs of individuals. More precisely, we study a continuous time Markov pure jump process, scaled by some integer parameter $K$, often called carrying capacity. The initial population size is of the order of magnitude of $K$ for large $K$. The trait space is the grid of mesh $\delta > 0$ of $[0, 4]: \mathcal{X} = [0, 4] \cap \delta\mathbb{N} = \{0, \delta, \dots, L\delta\}$ where $L = [4/\delta]$. The population is described by the vector

$$(N_0^K(t), \dots, N_\ell^K(t), \dots, N_L^K(t))$$

where $N_\ell^K(t)$ is the number of individuals of trait $x = \ell\delta$ at time $t$. We define the total population
<figure><img src="image_2.png" /><figcaption>Figure 1.1: Simulations of eco-evolutionary dynamics with unilateral frequency dependent trait transfer. The evolution of the trait distribution is pictured on the left columns, the evolution of the population sizes ($N_0^K(t)$, ..., $N_L^K(t)$) is on the right columns. In all the simulations, $K = 10000$ and $\delta = 0.1$ and $\alpha = 0.5$. (a)-(b): $\tau = 0.3$. Smaller transfer rates are considered on longer time windows. (c)-(d): $\tau = 0.6$. We see cyclic re-emergences of the fittest traits. (e)-(f): $\tau = 0.75$. Re-emergence still occurs, but the higher transfer rate drives the trait distribution towards higher and less fit trait values. On stochastic simulations, this can lead to extinction or (temporary) cyclic behaviour. (g)-(h): $\tau = 0.8$. An evolutionary suicide takes place.</figcaption></figure>

size $N_t^K$ as

$$N_t^K = \sum_{\ell=0}^{L} N_{\ell}^K(t).$$

Let us now describe the dynamics of the population process.

* An individual with trait $x = \ell\delta$ in the population gives birth to another individual with rate $b(x) = 4 - x$. With probability

$$p_K = K^{-\alpha} \quad \text{with} \quad \alpha \in (0, 1), \qquad (1.1)$$

a mutation occurs and the new offspring carries the mutant trait $(\ell + 1)\delta$.

With probability $1 - p_K = 1 - K^{-\alpha}$, the new individual inherits the ancestral trait.

The birth rate favors small values of $x$ with optimum at $x = 0$.

* An individual with trait $x$ transfers its trait to a given individual of trait $y$ in a population of total size $N$ at rate

$$\tau(x, y, N) = \frac{\tau}{N} \mathbb{1}_{x>y},$$
for some parameter $\tau > 0$.

* The individuals compete to survive (to share resources or territories). An individual with trait $x = \ell\delta$ in the population of total size $N$ dies with natural death rate $d_K(N) = 1 + CN/K$.

Note that because of the density dependence in $d_K(N)$, the size of the population can be at most of order $K$. More precisely, it follows from Theorems 2(a) and 3 of [5] that $N_t^K \le CK$ for all $t \in [0, e^{VK}]$ with probability converging to 1 as $K \to +\infty$ for some constants $C$ and $V > 0$. Note also that the factor $1/K$ in the death rate implies that competition is governed only by traits with population size of order $K$. Therefore, density-dependence disappears when the total population size is negligible with respect to $K$.

Let us note that under scaling (1.1), the total mutation rate in a population with size of order $K$, is equal to $K^{1-\alpha}$ and then goes to infinity with $K$. We are very far from the situation described in many papers as [5, 7, 3] where the authors explore the assumptions of the adaptive dynamics theory. In that cases, the total mutation rate $Kp_K$ is assumed to satisfy $\log K \ll 1/(Kp_K) \ll e^{CK}$, leading to a time scale separation between demographic and mutational events. Here, small populations of size order $K^\beta$, $\beta < 1$ can have a non negligible contribution to evolution by mutational events and we need to take into account all subpopulations with size of order $K^\beta$.

We need to consider in the sequel two different situations: either there is a single trait $x$ with population size of order $K$, called resident trait, or the total population size is $o(K)$. In this last case, a trait with the largest population size is called dominant trait.

When the trait $x$ is the unique resident trait, it is well known [11] that, when $K$ tends to infinity, the total population size can be approximated by $K n(t)$ where $n(.)$ solves the ODE

$$\dot{n}(t) = n(t)(3 - x - Cn(t)),$$

whose unique positive stable equilibrium is given by

$$\bar{n}(x) = \frac{3 - x}{C}. \qquad (1.2)$$

We define the invasion fitness of a mutant individual of trait $y$ in the population of trait $x$ and size $K\bar{n}(x)$ as its initial growth rate given by

$$S(y; x) = b(y) - d_K(K\bar{n}(x)) + \tau \mathbb{1}_{x<y} - \tau \mathbb{1}_{x>y} = x - y + \tau \operatorname{sign}(y - x), \qquad (1.3)$$

where $\operatorname{sign}(x) = 1$ if $x > 0$; 0 if $x = 0$; $-1$ if $x < 0$. Indeed, the total transfer rate from $x$ to $y$ is given by $K\bar{n}(x) \frac{\tau}{(K\bar{n}(x)+1)} \mathbb{1}_{y>x} \sim \tau \mathbb{1}_{y>x}$ when $K \to +\infty$ and similarly from $y$ to $x$. Note that $S(x; x) = 0$ and, for all traits $x, y$, $S(y; x) = -S(x; y)$ (see Figure 1.2). This implies in particular that there is no long-term coexistence of two resident traits. We also define the fitness of an individual of trait $y$ in a negligible population (of size $o(K)$) with dominant trait $x$ to be

$$\hat{S}(y; x) = 3 - y + \tau \mathbb{1}_{x<y} - \tau \mathbb{1}_{x>y}. \qquad (1.4)$$

Indeed, it corresponds to $\lim_{K \to \infty} b(y) - d_K(o(K))$.

Our study of the evolutionary dynamics of the model is based on a fine analysis of the size order, as power of $K$, of each subpopulation corresponding to the different trait compartments.
<figure><img src="image_3.png" /><figcaption>Figure 1.2: Fitness function $S(y; x)$. In the absence of transfer ($\tau = 0$), evolution favors traits $y$ smaller than $x$ (their fitness is positive). The introduction of a positive transfer reverts this evolutive trend: $S(y; x) > 0$ if $x < y < x + \tau$. Note that $S(y; x) > 0$ also for $y < x - \tau$, which explains possible re-emergence of sufficiently smaller traits.</figcaption></figure>

These powers of $K$ evolve on the timescale $\log K$, as can be easily seen in the case of branching processes (see Lemma A.1). We thus define $\beta_{\ell}^{K}(t)$ for $0 \le \ell \le L$ such that

$$N_{\ell}^{K}(t \log K) = K^{\beta_{\ell}^{K}(t)} - 1, \quad \text{i.e.} \quad \beta_{\ell}^{K}(t) = \frac{\log(1 + N_{\ell}^{K}(t \log K))}{\log K}. \qquad (1.5)$$

We assume that the trait $x = 0$ is initially resident, with density $3/C$. A natural initial condition would hence be $N^K(0) = (\lfloor \frac{3K}{C} \rfloor, 0, \dots, 0)$. However, on the time scale $\log K$, mutants are immediately created and therefore, we modify the initial condition as

$$N^K(0) = (\lfloor \frac{3K}{C} \rfloor, \lfloor K^{1-\alpha} \rfloor, \dots, \lfloor K^{1-\ell\alpha} \rfloor, \dots, \lfloor K^{1-\lfloor 1/\alpha \rfloor} \rfloor, 0, \dots, 0). \qquad (1.6)$$

This can be understood from Lemma B.4 (with $\beta = 0$ and $c = 1 - \alpha$ for trait $\delta$). With this initial condition, we have

$$\beta_{\ell}^{K}(0) \xrightarrow[K \to +\infty]{\phantom{=}} (1 - \ell\alpha) \mathbb{1}_{0 \le \ell < \frac{1}{\alpha}}. \qquad (1.7)$$

Our main result (Theorem 2.1) gives the asymptotic dynamics of $\beta^K(t) = (\beta_0^K(t), \dots, \beta_L^K(t))$ for $t \ge 0$ when $K \to +\infty$. We show that the limit is a piecewise affine continuous function, which can be described along successive phases determined by their resident or dominant traits. When the latter trait changes, the fitnesses governing the slopes are modified. Moreover, inside each phase, other changes of slopes are possible due to a delicate balance between mutations, transfer and growth of subpopulations. Our ambition is to cover all the possible cases: local extinctions, re-emergence of subpopulations, changes of slopes due to mutation and selection, dynamics when the total population size is $o(K)$, total extinction of the population... We deduce from the asymptotic dynamics of $\beta^K(t)$ explicit criteria for the occurrence of the different evolutionary outcomes observed in Figure 1.1 (Theorem 2.6). We provide a detailed study of the case of three traits in Section 3.

Such approach has already been used in [10, 4]. In a deterministic setting with similar scales, we refer to [17]. Durrett and Mayberry [10] consider constant population size or pure birth (Yule process) models, with directional mutations and increasing fitness parameter. They obtain travelling waves of selective sweeps. Bovier, Coquille and Smadi [4] consider a model with density-dependence but without transfer, with a single trait with positive fitness separated from the initial trait by unfit traits. They obtain bounds on the time needed to cross the fitness valley.
In our case, the dynamics is far more complex due to the trade-off between larger birth rates for small trait values and transfer to higher traits, leading to diverse evolutionary outcomes, including cyclic dynamics or evolutionary suicide. As a consequence, we need to consider cases where the dynamics of a given trait is completely driven by immigrations due to mutations from the resident trait, with time inhomogeneous immigration rates (see Theorem B.5). This complexifies a lot the analysis.

We first state our main results in Section 2. First, we give our general result on the con-vergence of the exponents $\beta_{\ell}^{K}$ (Theorem 2.1) in Section 2.1. Then, we give general criteria on the parameters $\tau$, $\delta$ and $\alpha$ for re-emergence of trait 0 and evolutionary suicide in Section 2.2 (Theorem 2.6). We then study in details the limit process in the case of three traits ($L=2$) in Section 3. The proofs of Theorems 2.1 and 2.6 are given in Sections 4 and 5. Useful lemmas on branching processes and branching processes with immigration are given respectively in Appendices A and B. Technical lemmas on birth and death processes with logistic competition and transfer are given in Appendix C. We conclude in Appendix D with the algorithmic construction of the limit of the exponents $\beta_{\ell}^{K}$, used to perform simulations.

# 2 Main results

We state the principal results of the paper. Their proofs are given in Sections 4 and 5.

## 2.1 Asymptotic dynamics

The next result characterizes the asymptotic dynamics of $\beta^K(t) = (\beta_0^K(t), \dots, \beta_L^K(t))$ (when $K \to +\infty$) by a succession of deterministic time intervals $[s_{k-1}, s_k]$, $k \ge 1$, called phases and delimited by changes of resident or dominant traits. The latter are unique except at times $s_k$ and are denoted by $\ell_k^* \delta$, $k \ge 1$. This asymptotic result holds until a time $T_0$, which guarantees that there is neither ambiguity on these traits (Point (a) below) nor on the extinct subpopulations at the phase transitions (Point (c) below).

**Theorem 2.1** Assume that $\alpha \in (0,1)$, that $\delta \in (0,4)$ with $3/\delta \notin \mathbb{N}$ and $\tau^{\pm 3}/\delta \notin \mathbb{N}$ and that (1.7) hold true.

(i) There exists $T_0 > 0$ such that, for all $T \in (0, T_0)$, the sequence $(\beta^K(t), t \in [0, T])$ converges in probability in $D([0, T], [0, 1]^{L+1})$ to a deterministic piecewise affine continuous function $(\beta(t) = (\beta_0(t), \dots, \beta_L(t)), t \in [0, T])$, such that $\beta_{\ell}(0) = (1 - \ell\alpha)1_{0 \le \ell < \frac{1}{\alpha}}$. The functions $\beta$ and $T_0$ are parameterized by $\alpha$, $\delta$ and $\tau$ defined as follows.

(ii) There exists an increasing nonnegative sequence $(s_k)_{k \ge 0}$ and a sequence $(\ell_k^*)_{k \ge 1}$ in $\{0, \dots, L\}$ defined inductively as follows: $s_0 = 0$, $\ell_1^* = 0$, and, for all $k \ge 1$, assuming that $s_{k-1} < T_0$ and $\ell_k^*$ have been constructed and that $\beta(s_{k-1}) \ne 0$, we can construct $s_k > s_{k-1}$ as follows

$$s_k = \inf\{t > s_{k-1} : \exists \ell \ne \ell_k^*, \beta_{\ell}(t) = \beta_{\ell_k^*}(t)\}. \quad (2.1)$$

We can then decide whether we continue the induction after time $s_k$ (i.e. $T_0 > s_k$) or not as follows:

(a) if $\beta_{\ell_k^*}(s_k) > 0$, we set

$$\ell_{k+1}^* = \arg\max_{\ell \ne \ell_k^*} \beta_{\ell}(s_k) \quad (2.2)$$
if the argmax is unique, or otherwise we set $T_0 = s_k$ and we stop the induction;

(b) if $\beta_{\ell_k^*}(s_k) = 0$, we set $s_{k+1} = T_0 = +\infty$ and $\beta(t) = 0$ for all $t \ge s_k$;

(c) if in one of the previous cases, we have for some $\ell \ne \ell_k^*$, $\beta_\ell(s_k) = 0$ and $\beta_\ell(s_k - \varepsilon) > 0$ for all $\varepsilon > 0$ small enough, then we also set $T_0 = s_k$ and stop the induction; otherwise, the induction proceeds to the next step.

In the case where the induction never stops, we define $T_0 = \sup_{k \ge 0} s_k$.

(iii) In (ii), the functions $\beta_\ell$ are defined, for all $t \in [s_{k-1}, s_k]$, by

$$ \beta_0(t) = \left[ \mathbb{1}_{\beta_0(s_{k-1})>0} \left( \beta_0(s_{k-1}) + \int_{s_{k-1}}^t \tilde{S}_{s,k}(0; \ell_k^* \delta) ds \right) \right] \vee 0 \quad (2.3) $$

and, for all $\ell \in \{1, \dots, L\}$,

$$ \beta_{\ell}(t) = \left( \beta_{\ell}(s_{k-1}) + \int_{t_{\ell-1,k} \wedge t}^{t} \tilde{S}_{s,k}(\ell\delta; \ell_k^* \delta) ds \right) \vee (\beta_{\ell-1}(t) - \alpha) \vee 0, \quad (2.4) $$

where, for all traits $x, y$,

$$ \tilde{S}_{t,k}(y; x) = \mathbb{1}_{\beta_{\ell_k^*}(t)=1} S(y; x) + \mathbb{1}_{\beta_{\ell_k^*}(t)<1} \hat{S}(y; x) \quad (2.5) $$

and where

$$ t_{\ell-1,k} = \begin{cases} \inf\{t \ge s_{k-1}, \beta_{\ell-1}(t) = \alpha\}, & \text{if } \beta_{\ell}(s_{k-1}) = 0, \\ s_{k-1}, & \text{otherwise.} \end{cases} \quad (2.6) $$

In addition, for all $\ell$ and all $a < b < T_0$ such that the time interval $[a, b]$ is included in the interior of the zero-set of $\beta_\ell$, the event $\{N_\ell^K(t \log K) = 0, \forall t \in [a, b]\}$ has a probability converging to one as $K$ tends to infinity.

**Remark 2.2** 1. It follows from the definition of $s_k$ and $\ell_{k+1}^*$ that $\max_\ell \beta_\ell(t) = \beta_{\ell_k^*}(t)$ for all $t \in [s_{k-1}, s_k)$.

2. In (2.5), when $\beta_{\ell_k^*}(t) = 1$ for some $t \in (s_{k-1}, s_k)$, there is a single resident trait $\ell_k^* \delta$ with population of the order of $K$ and the function $S$ defined in (1.3) is used. In the case where $\beta_{\ell_k^*}(t) < 1$, there is a single dominant trait and the total population size is of order $o(K)$ and the fitness function is $\hat{S}$ defined in (1.4). During each phase, the function $\tilde{S}_{t,k}$ is actually constant, equal to $S$ or $\hat{S}$ as above, except when a dominant population becomes resident in the same phase. In the first case, for all $t \in [s_{k-1}, s_k)$, Eq. (2.3) and (2.4) take the simpler form

$$ \beta_0(t) = \begin{cases} [\mathbb{1}_{\beta_0(s_{k-1})>0} (\beta_0(s_{k-1}) + S(\ell\delta; \ell_k^*\delta)(t - s_{k-1}))] \vee 0 & \text{if } \beta_{\ell_k^*}(s_{k-1}) = 1, \\ [\mathbb{1}_{\beta_0(s_{k-1})>0} (\beta_0(s_{k-1}) + \hat{S}(\ell\delta; \ell_k^*\delta)(t - s_{k-1}))] \vee 0 & \text{if } \beta_{\ell_k^*}(s_{k-1}) < 1 \end{cases} $$

and, for all $\ell \in \{1, \dots, L\}$,

$$ \beta_{\ell}(t) = \begin{cases} (\beta_{\ell}(s_{k-1}) + S(\ell\delta; \ell_k^*\delta)(t - t_{\ell-1,k})_+) \vee (\beta_{\ell-1}(t) - \alpha) \vee 0 & \text{if } \beta_{\ell_k^*}(s_{k-1}) = 1, \\ (\beta_{\ell}(s_{k-1}) + \hat{S}(\ell\delta; \ell_k^*\delta)(t - t_{\ell-1,k})_+) \vee (\beta_{\ell-1}(t) - \alpha) \vee 0 & \text{if } \beta_{\ell_k^*}(s_{k-1}) < 1. \end{cases} \quad (2.7) $$
Otherwise, $\tilde{S}_{t,k}$ switches from $\hat{S}$ to $S$ at the first time where $\max_{\ell} \beta_{\ell}(t) = \beta_{\ell_k^*}(t) = 1$. Therefore, since $S(\ell_k^*\delta, \ell_k^*\delta) = 0$, we obtain in all cases

$$ \beta_{\ell_k^*}(t) = \begin{cases} 1 & \text{if } \beta_{\ell_k^*}(s_{k-1}) = 1, \\ [(\beta_{\ell_k^*}(s_{k-1}) + \hat{S}(\ell_k^*\delta; \ell_k^*\delta)(t-s_{k-1})) \wedge 1] \vee 0 & \text{if } \beta_{\ell_k^*}(s_{k-1}) < 1. \end{cases} $$

3. It follows from the last formula that $\max_{\ell} \beta_{\ell}(t) \le 1$ for all $t \in [0, T_0]$.

4. When $\beta_{\ell}(s_{k-1}) = 0$, the time $t_{\ell-1,k}$ corresponds to the first time where the incoming mutation rate in subpopulation $\ell\delta$ becomes significant.

**Remark 2.3** If the initial condition (1.6) was replaced by $N^K(0) = (\lfloor \frac{3K}{C} \rfloor, 0, \dots, 0)$, the convergence in (i) would hold on $(0, T \wedge T_0]$ instead of $[0, T \wedge T_0]$.

<figure><img src="image_4.png" /><figcaption>Figure 2.1: Exponents $\beta_{\ell}(t)$ as functions of time. (a): $\delta = 1.4$, $\alpha = 0.6$, $\tau = 2$. We see a periodic behavior showing re-emergences of the fittest traits. (b): $\delta = 1.9$, $\alpha = 0.37$, $\tau = 3.43$. When the trait $2\delta$ becomes dominant, the population size is of order $o(K)$. We see a re-emergence of trait 0 after a phase of apparent macroscopic extinction (i.e. a total population size $o(K)$). Although the trait $\delta$ goes extinct while $2\delta$ is dominant, it is recreated by mutations from trait 0. (c): $\delta = 0.3$, $\alpha = 1/\pi$, $\tau = 1$. A cyclic but non-periodic behaviour is observed. (d): $\delta = 0.41$, $\alpha = 1/\pi$, $\tau = 2.8$. The population is directly driven to evolutionary suicide.</figcaption></figure>

We cannot ensure that $T_0 = +\infty$ for almost all parameters $\alpha$, $\delta$ and $\tau$. However we have not encountered any case where $T_0 < +\infty$ in the simulations. In the sequel, we exhibit large sets of parameters where $T_0 = +\infty$ in the case of three traits (Section 3). We also prove in
Theorem 2.6 that, for any sets of parameters, $T_0$ is larger than the time of extinction or the time of first re-emergence.

Note that the previous result keeps track of populations of size $K^\beta$ for $0 < \beta \le 1$, but not of populations of smaller order, which go fast to extinction on the time scale $\log K$.

The next theorem gives a characterization of $\beta$ as solution of a dynamical system.

**Corollary 2.4** Under the assumptions of Theorem 2.1, we set

$$ \ell^*(t) = \sum_{k \ge 1} \ell_k^* 1_{[s_{k-1}, s_k[}(t) \text{ and } \tilde{S}_t(y; x) = 1_{\beta_{\ell^*(t)}}(t)=1} S(y; x) + 1_{\beta_{\ell^*(t)}}(t)<1} \hat{S}(y; x). $$

The function $\beta(t)$ is right-differentiable on $[0, T_0)$ and satisfies

$$ \dot{\beta}_{\ell}(t) = \Sigma_{\ell}(t) 1_{\beta_{\ell}(t)>0} \text{ or } (\beta_{\ell}(t)=0 \text{ and } \beta_{\ell-1}(t)=\alpha) \qquad (2.8) $$

where $\Sigma_\ell$ is defined recursively by $\Sigma_0(t) = \tilde{S}_t(0, \delta \ell^*(t))$ and $\forall \ell \ge 1$

$$ \Sigma_{\ell}(t) = \begin{cases} \tilde{S}_{t}(\ell\delta; \ell^{*}(t)\delta) \lor \Sigma_{\ell-1}(t) & \text{if } \beta_{\ell}(t) = \beta_{\ell-1}(t) - \alpha \\ \tilde{S}_{t}(\ell\delta; \ell^{*}(t)\delta) & \text{if } \beta_{\ell}(t) > \beta_{\ell-1}(t) - \alpha. \end{cases} \qquad (2.9) $$

**Remark 2.5** One may wonder if the ODE (2.8) characterizes the function $\beta$. For this we first need to characterize $\ell^*(t)$ as an explicit function of $\beta(t)$. One would like to define it as $\ell^*(t) = \arg\max_{0 \le \ell \le L} \beta_\ell(t)$ and take it right-continuous. This is correct if there is a single argmax. Otherwise, there are by definition of $T_0$ only two choices $\ell$ and $\ell'$ and there is a single admissible choice in the sense that the corresponding affine solution to (2.8) on $[t, t + \varepsilon]$ satisfies $\ell^*(s) = \arg\max_{0 \le \ell \le L} \beta_\ell(s)$ locally for $s \in (t, t + \varepsilon)$ for $\varepsilon > 0$ small enough. Indeed if $\max_{0 \le \ell \le L} \beta_\ell(t) = 1$ and since $S(\ell'\delta, \ell\delta) = -S(\ell\delta, \ell'\delta)$, one of the two fitnesses is positive, for example $S(\ell\delta, \ell'\delta)$. If one takes the wrong choice $\ell^*(t) = \ell'$, then $\Sigma_\ell(t) = S(\ell\delta, \ell'\delta) > 0$, hence the solution of (2.8) gives $\beta_\ell(s) > 1$ for $s > t$ locally, which is forbidden. If $\max_{0 \le \ell \le L} \beta_\ell(t) < 1$, a similar argument with $\hat{S}$ consists in choosing the trait with higher invasion fitness.

Therefore, (2.8) can be expressed as an autonomous ODE and there is a unique admissible solution. Generalizations of our result to models with different birth, death and transfer rates, can be obtained by changing accordingly the fitness function in this ODE.

Simulations are shown in Figure 2.1 for various parameter values. The times $s_k$ correspond to changes of resident or dominant populations. However, we observe several changes of slopes between these times. The computation of these successive times called $t_k$ is given in Theorem D.1 in Appendix D.

## 2.2 Re-emergence of trait 0

In Figure 2.1, we have exhibited different evolutionary dynamics (re-emergence of a trait, cyclic behavior, local extinction, evolutionary suicide). By re-emergence of a trait $\ell\delta$, we mean that $\beta_\ell(s) = 1$ on some non-empty time interval $[t_1, t_2]$, then $\beta_\ell(s) < 1$ on some non-empty interval $(t_2, t_3)$ and then $\beta_\ell(s) = 1$ again on some non-empty interval $[t_3, t_4]$. We would like to predict the evolutionary outcome as a function of parameters $\alpha, \delta, \tau$. As detailed for three traits ($L = 2$) in the next section, there are so many situations that we are not able to fully characterize the
outcomes. Therefore, we focus on the beginning of the dynamics until either global extinction or re-emergence of one trait occurs. The resurgence of trait 0 is a prerequisite for a cyclic dynamics as those observed in Figures 1.1 (c).

We assume that $\delta < 4/3$ (so that $L \ge 3$) and only consider the case $\delta < \tau < 3$. Let

$$ \tilde{k} := \lceil \frac{\tau}{\delta} \rceil \quad \text{and} \quad \bar{k} := \lfloor 2 \frac{\tau}{\delta} \rfloor. \qquad (2.10) $$

We will see in the proof of the next result that, for the first phases,

$$ s_k := \frac{k\alpha}{\tau - \delta}, $$

the trait $k\delta$ is resident on $[s_k, s_{k+1})$ ($\beta_k(s) = 1$) and for all $s \in [s_k, s_{k+1})$,

$$ \beta_{\ell}(s) = \begin{cases} [1 - (\ell - k)\alpha + (\tau - \delta)(s - s_k)] \lor 0 & \text{if } k < \ell \le L, \\ 1 - \frac{\alpha(k-\ell-1)}{\tau-\delta} (\tau - \frac{k-\ell}{2}\delta) - (\tau - (k-\ell)\delta)(s - s_k) & \text{if } 0 \le \ell < k. \end{cases} $$

These formulas stay valid until either $\beta_0(s) = 0$ (loss of 0), or $\beta_0(s) = 1$ for some $s > s_1$ (re-emergence of 0), or $\ell_k^*\delta > 3$, where $\ell_k^*$ has been defined in (2.2) (the population size becomes $o(K)$). The function $\beta_0(s)$ in the previous equation is piecewise affine and its slope becomes positive at time $s_{\tilde{k}}$. Hence its minimal value is equal to

$$ m_0 = \beta_0(s_{\tilde{k}}) = 1 - \frac{\alpha(\tilde{k} - 1)}{\tau - \delta} \left( \tau - \frac{\tilde{k}}{2} \delta \right). \qquad (2.11) $$

Provided the latter is positive, $\beta_0$ reaches 1 again in phase $[s_{\tilde{k}}, s_{\tilde{k}+1})$ at time

$$ \bar{\tau} := s_{\bar{k}} + \frac{\alpha(\bar{k} - 1)}{\tau - \delta} \frac{\tau - \frac{\bar{k}}{2}\delta}{\bar{k}\delta - \tau} = s_{\lfloor 2\frac{\tau}{\delta} \rfloor} + \frac{\alpha(\lfloor 2\frac{\tau}{\delta} \rfloor - 1)}{\tau - \delta} \frac{\tau - \frac{\lfloor 2\frac{\tau}{\delta} \rfloor}{2}\delta}{\lfloor 2\frac{\tau}{\delta} \rfloor \delta - \tau}. \qquad (2.12) $$

**Theorem 2.6** Assume $\delta < \tau < 3$, $\delta < 4/3$ and under the assumptions of Theorem 2.1,

(a) If $m_0 > 0$ and $\bar{k}\delta < 3$, then the first re-emerging trait is 0 and the maximal exponent is always 1 until this re-emergence time.

(b) If $m_0 < 0$, the trait 0 gets lost before its re-emergence and there is global extinction of the population before the re-emergence of any trait.

(c) If $m_0 > 0$ and $\bar{k}\delta > 3$, there is re-emergence of some trait $\ell\delta < 3$ and, for some time $t$ before the time of first re-emergence, $\max_{1 \le \ell \le L} \beta_{\ell}(t) < 1$.

Biologically, Case (b) corresponds to evolutionary suicide. In Cases (a) and (c), very few individuals with small traits remain, which are able to re-initiate a population of size of order $K$ (re-emergence) after the resident or dominant trait becomes too large. In these cases, one can expect successive re-emergences. However, we don't know if there exists a limit cycle for the dynamics. Case (c) means that the total population is $o(K)$ on some time interval, before re-emergence occurs after populations with too large traits become small enough.
Heuristically, using the approximation that $\tilde{k} \approx \tau/\delta$, we obtain that $m_0 \approx 1 - \frac{\alpha\tau}{2\delta}$. Hence, we have $m_0 > 0$ (re-emergence) provided $\tau \lesssim 2\delta/\alpha$ and extinction otherwise. Transfer rates higher than $2\delta/\alpha$ favor extinction because the population is pushed to higher trait values. Small values of $\delta$ or high values of $\alpha$ give more time for extinction of the small subpopulations. Note that, for $m_0 > 0$, the condition $\tilde{k}\delta < 3$ is roughly $\tau < 3/2$. Hence, for transfer rates smaller than $3/2$, 0 re-emerges first, while other traits can re-emerge before 0 otherwise.

## 3 Case of three traits

Before proving our main results, let us illustrate the limit exponents $\beta(t)$ in the case of three traits. Let us consider $\delta > 0$ such that $2\delta < 4 < 3\delta$, so that the possible traits are 0, $\delta$ and $2\delta$. A simulation is shown step by step in Figure 3.1, which we will now explain.

<figure><img src="image_5.png" /><figcaption>Figure 3.1: Graphs of the exponents $\beta_0(t)$, $\beta_1(t)$ and $\beta_2(t)$, as function of time in the case where $\delta < \tau < 2\delta < 3 < 4 < 3\delta$. Here, $\delta = 1.4$, $\alpha = \frac{1}{\pi}$, $\tau = 1.5$. The traits are 0, 1.4 and 2.8. The vertical dotted lines correspond to the times $s_1, \dots, s_5$.</figcaption></figure>

The initial condition is

$$ \beta(0) = (\beta_0(0), \beta_1(0), \beta_2(0)) = (1, 1-\alpha, (1-2\alpha) \lor 0). \quad (3.1) $$

The fitnesses given in (1.3) are

$$ S(0; 0) = 0, \quad S(\delta; 0) = \tau - \delta, \quad S(2\delta; 0) = \tau - 2\delta. $$

### 3.1 Case 1: $\tau < \delta$

In this case, neither the traits $\delta$ nor the trait $2\delta$ are advantageous and these populations survive only thanks to the mutations from the trait 0 to $\delta$ and from the trait $\delta$ to $2\delta$. The exponents remain constant and $\forall t \ge 0$, $\beta(t) = \beta(0)$.
### 3.2 Case 2: $\delta < \tau < 2\delta$

Following Theorem 2.1, we shall decompose the dynamics of $\beta(t)$ into successive phases corresponding to the time intervals $[s_{k-1}, s_k]$.

**Phase 1: time interval $[0, s_1]$**. In this Case 2, $S(0; 0) = 0$, $S(\delta; 0) > 0$ and $S(2\delta; 0) < 0$. While the resident population remains the population with trait 0, the population with trait $\delta$ has positive fitness and its growth is described for $t \in [0, s_1]$ by the exponent:

$$ \beta_1(t) = [(1 - \alpha) + (\tau - \delta)t] \vee (1 - \alpha) \vee 0 = (1 - \alpha) + (\tau - \delta)t. $$

The bracket corresponds to the intrinsic growth associated with the fitness $S(\delta; 0)$, the term $1 - \alpha$ is the contribution of mutations from the population of trait 0 and is here smaller than the term with the bracket.

The population with trait $2\delta$ has negative fitness and

$$ \beta_2(t) = [(1 - 2\alpha) - (2\delta - \tau)t] \vee [(1 - 2\alpha) + (\tau - \delta)t] \vee 0 = [(1 - 2\alpha) + (\tau - \delta)t] \vee 0. $$

As for the trait $\delta$, the first bracket corresponds to the intrinsic growth with a negative slope $\tau - 2\delta < 0$, while the second bracket corresponds to the contribution of mutations from the population with trait $\delta$.

It is clear that $\beta_2(t) < \beta_1(t) \le 1$. Hence the first phase stops when $\beta_1(t) = 1$, for

$$ s_1 = \frac{\alpha}{\tau - \delta}. $$

The first phase is illustrated in Fig. 3.1(1).

**Phase 2: time interval $[s_1, s_2]$**. At time $s_1$, the populations with traits 0 and $\delta$ both have sizes of order $K$: more precisely, the exponents are

$$ \beta_0(s_1) = 1, \quad \beta_1(s_1) = 1, \quad \beta_2(s_1) = 1 - \alpha. $$

Because $S(0; \delta) < 0$ and $S(\delta; 0) > 0$, the new resident population with trait $\delta$ replaces the population with trait 0 whose exponent decreases after time $s_1$. The size of the population with trait $\delta$ remains close to $(3 - \delta)K/C$, i.e. $\beta_1(t) = 1$, during the whole Phase 2, and using (1.3):

$$ S(0; \delta) = \delta - \tau < 0, \quad S(\delta; \delta) = 0, \quad S(2\delta; \delta) = \tau - \delta > 0. $$

Thus, the decrease of the population with trait 0 is described by $\beta_0(s_1 + t) = [1 - (\tau - \delta)t] \vee 0$ (recall that no mutant can have trait 0). The population with trait $2\delta$ has a positive fitness (first bracket in the following equation) and benefits from mutations coming from the trait $\delta$ (second bracket):

$$ \beta_2(s_1 + t) = [(1 - \alpha) + (\tau - \delta)t] \vee [1 - \alpha] \vee 0 = (1 - \alpha) + (\tau - \delta)t. $$

This second phase stops when $\beta_2(t) = 1$, at time

$$ s_2 = s_1 + \frac{\alpha}{\tau - \delta} = \frac{2\alpha}{\tau - \delta}. $$

We check that $\beta_0(s_1 + t) = 1 - (\tau - \delta)t$, $\forall t \in [s_2 - s_1]$. This phase is illustrated in Fig. 3.1(2).
### 3.2.1 Case 2(a): $2\delta < 3$

In this case, trait $2\delta$ can survive on its own, i.e. its equilibrium population size $\frac{3-2\delta}{C}$ is positive.

**Phase 3: time interval $[s_2, s_3]$**. Because $S(\delta; 2\delta) < 0$ and $S(2\delta; \delta) > 0$, we have at time $s_2$ a replacement of the resident population with trait $\delta$ by the population with trait $2\delta$ which becomes the new resident population, i.e. $\beta_2(t) = 1$. At time $s_2$, the exponents are:

$$ \beta_0(s_2) = 1 - \alpha, \quad \beta_1(s_2) = 1, \quad \beta_2(s_2) = 1. \qquad (3.2) $$

The population size of trait $2\delta$ is close to $(3 - 2\delta)K/C$ so that the fitnesses are:

$$ S(0; 2\delta) = 2\delta - \tau > 0, \quad S(\delta; 2\delta) = \delta - \tau < 0, \quad S(2\delta; 2\delta) = 0. $$

The population with trait 0 increases with the exponent $\beta_0(s_2 + t) = (1 - \alpha) + (2\delta - \tau)t$.

The trait $\delta$ has negative fitness but benefits from mutations coming from the trait 0:

$$ \beta_1(s_2 + t) = [1 - (\tau - \delta)t] \vee [(1 - 2\alpha) + (2\delta - \tau)t] \vee 0. \qquad (3.3) $$

This third phase is illustrated in Fig. 3.1(3). This phase stops when $\beta_0(t) = 1$, i.e. at time

$$ s_3 = s_2 + \frac{\alpha}{2\delta - \tau} = \frac{2\alpha}{\tau - \delta} + \frac{\alpha}{2\delta - \tau}. $$

We also have $\beta_1(s_3) = (1 - \alpha \frac{\tau - \delta}{2\delta - \tau}) \vee (1 - \alpha)$.

We have to distinguish two cases for Phase 4, depending on the value of $\beta_1(s_3)$.

**Phase 4, case 2(a)(i): time interval $[s_3, s_4]$ under the assumption $\tau - \delta < 2\delta - \tau$.** Then,

$$ \beta_0(s_3) = 1, \quad \beta_1(s_3) = 1 - \alpha \frac{\tau - \delta}{2\delta - \tau}, \quad \beta_2(s_3) = 1. $$

The new resident population is the one with trait 0 and the fitnesses are the same as in Phase 1, but the initial conditions are different. We obtain as above the exponents $\beta_0(s_3 + t) = 1$,

$$ \beta_1(s_3 + t) = [1 - \frac{\tau - \delta}{2\delta - \tau}\alpha + (\tau - \delta)t] \vee [1 - \alpha] \vee 0 = 1 - \frac{\tau - \delta}{2\delta - \tau}\alpha + (\tau - \delta)t. $$

and

$$ \beta_2(s_3 + t) = [1 - (2\delta - \tau)t] \vee [1 - \frac{\delta\alpha}{2\delta - \tau} + (\tau - \delta)t] \vee 0, $$

as illustrated in Fig. 3.1 (4). The phase stops when $\beta_1(t) = 1$ at time

$$ s_4 = s_3 + \frac{\alpha}{2\delta - \tau} = \frac{2\alpha}{\tau - \delta} + \frac{2\alpha}{2\delta - \tau}. $$

We check that $\beta_2(s_3 + t) = 1 - (2\delta - \tau)t$, $\forall t \le s_4 - s_3$ and hence

$$ \beta_0(s_4) = 1, \quad \beta_1(s_4) = 1, \quad \beta_2(s_4) = 1 - \alpha. $$

We recognize the initial condition of Phase 2. Therefore, the system behaves periodically (as in Figure 2.1(a)) starting from time $s_1$, with period

$$ s_4 - s_1 = \frac{\alpha}{\tau - \delta} + \frac{2\alpha}{2\delta - \tau}. $$
**Phase 4, case 2(a)(ii): time interval $[s_3, s_4]$ under the assumption $\tau - \delta > 2\delta - \tau$.** In this case,

$$ \beta_0(s_3) = 1, \quad \beta_1(s_3) = 1 - \alpha, \quad \beta_2(s_3) = 1. $$

In this case, we obtain $\beta_0(s_3 + t) = 1$, $\beta_1(s_3 + t) = 1 - \alpha + (\tau - \delta)t$,

$$ \beta_2(s_3 + t) = 1 - (2\delta - \tau)t \quad \text{and} \quad s_4 = s_3 + \frac{\alpha}{\tau - \delta} = \frac{3\alpha}{\tau - \delta} + \frac{\alpha}{2\delta - \tau}. $$

**Phase 5, case 2(a)(ii): time interval $[s_4, s_5]$.** We have

$$ \beta_0(s_4) = 1, \quad \beta_1(s_4) = 1, \quad \beta_2(s_4) = 1 - \alpha \frac{2\delta - \tau}{\tau - \delta}. $$

Proceeding as above, we obtain

$$ s_5 = s_4 + \alpha \frac{2\delta - \tau}{(\tau - \delta)^2} = \frac{3\alpha}{\tau - \delta} + \frac{\alpha}{2\delta - \tau} + \alpha \frac{2\delta - \tau}{(\tau - \delta)^2} $$

and for all $t \in [0, s_5 - s_4]$, $\beta_1(s_4 + t) = 1$,

$$ \beta_0(s_4 + t) = 1 - (\tau - \delta)t \quad \text{and} \quad \beta_2(s_4 + t) = 1 - \alpha \frac{2\delta - \tau}{\tau - \delta} + (\tau - \delta)t. $$

**Phase 6, case 2(a)(ii): time interval $[s_5, s_6]$.** We have

$$ \beta_0(s_5) = 1 - \alpha \frac{2\delta - \tau}{\tau - \delta}, \quad \beta_1(s_5) = 1, \quad \beta_2(s_5) = 1. $$

We obtain

$$ s_6 = s_5 + \frac{\alpha}{\tau - \delta} = \frac{4\alpha}{\tau - \delta} + \frac{\alpha}{2\delta - \tau} + \alpha \frac{2\delta - \tau}{(\tau - \delta)^2} $$

and for all $t \in [0, s_6 - s_5]$, $\beta_2(s_5 + t) = 1$,

$$ \beta_0(s_5 + t) = 1 - \alpha \frac{2\delta - \tau}{\tau - \delta} + (2\delta - \tau)t \quad \text{and} \quad \beta_1(s_5 + t) = 1 - (\tau - \delta)t. $$

Hence $\beta_0(s_6) = 1$, $\beta_1(s_6) = 1 - \alpha$, $\beta_2(s_6) = 1$. We recognize the initial condition as in Phase 4, case 2(a)(ii). Therefore, the system behaves periodically starting from time $s_3$, with period

$$ s_6 - s_3 = \frac{2\alpha}{\tau - \delta} + \alpha \frac{2\delta - \tau}{(\tau - \delta)^2}. $$
### 3.2.2 Case 2(b): $2\delta > 3$

**Phase 3: time interval** $[s_2, s_3]$. In this case, the trait $2\delta$, which replaces the former resident trait $\delta$ at time $s_2$, cannot survive alone and becomes dominant. So $\beta_2(s_2 + t)$ does not remain equal to 1, but decreases with slope $\hat{S}(2\delta; 2\delta)$. Recall that, at time $s_2$, the exponents are given by (3.2). The fitnesses now become:

$$ \hat{S}(0; 2\delta) = 3 - \tau, \quad \hat{S}(\delta; 2\delta) = 3 - \delta - \tau < 0, \quad \hat{S}(2\delta; 2\delta) = 3 - 2\delta < 0. $$

Note that we do not distinguish yet on the sign of $\hat{S}(0; 2\delta)$, which may be either positive or negative in this case. We obtain

$$ \beta_0(s_2 + t) = [1 - \alpha + (3 - \tau)t] \lor 0, \quad \beta_1(s_2 + t) = [1 - (\tau + \delta - 3)t] \lor [1 - 2\alpha + (3 - \tau)t] \lor 0 $$

and $\beta_2(s_2 + t) = 1 - (2\delta - 3)t$ until either $\beta_0(t) = \beta_2(t) > 0$, which corresponds to a change of dominant population with exponent smaller than 1, or $\beta_2(t) = 0$, which corresponds to the extinction of the whole population. Note that we cannot have $\beta_1(t) = \beta_2(t)$ before $\beta_0(t) = \beta_2(t)$ since $\tau + \delta - 3 > 2\delta - 3$. One can easily check that $\beta_2(t)$ hits 0 before crossing the curve $\beta_0(t)$ if and only if $\frac{2\delta - \tau}{2\delta - 3} < \alpha$. Of course, this cannot occur if $\tau < 3$, since in this case $\hat{S}(0; 2\delta) > 0$.

**Phase 3, case 2(b)(i):** $\frac{2\delta - \tau}{2\delta - 3} < \alpha$. In this case, the whole population gets extinct at time

$$ s_3 = s_2 + \frac{1}{2\delta - 3} = \frac{2\alpha}{\tau - \delta} + \frac{1}{2\delta - 3}. $$

**Phase 3, case 2(b)(ii):** $\frac{2\delta - \tau}{2\delta - 3} > \alpha$. Trait 0 becomes dominant and replaces trait $2\delta$ at time

$$ s_3 = s_2 + \frac{\alpha}{2\delta - \tau} = \frac{2\alpha}{\tau - \delta} + \frac{\alpha}{2\delta - \tau}. $$

We obtain the exponents $\beta_0(s_3) = \beta_2(s_3) = 1 - \alpha \frac{2\delta - 3}{2\delta - \tau} \in (0, 1)$ and

$$ \beta_1(s_3) = \left[ 1 - \alpha \frac{\delta + \tau - 3}{2\delta - \tau} \right] \lor \left[ 1 - \alpha \frac{4\delta - \tau - 3}{2\delta - \tau} \right] \lor 0. $$

**Phase 4, case 2(b)(ii).** We obtain the new fitnesses

$$ \hat{S}(0; 0) = 3, \quad \hat{S}(\delta; 0) = 3 + \tau - \delta > 3, \quad S(2\delta; 0) = 3 - 2\delta + \tau \in (0, 3). $$

To compute $\beta_1(s_3 + t)$, one needs to distinguish whether $\beta_1(s_3) > 0$ or $\beta_1(s_3) = 0$. In the last case, one needs to wait until $\beta_0(s_3 + t) = \alpha$ before $\beta_1$ starts to increase with slope $3 + \tau - \delta$. The phase stops either when $\beta_0(s_3 + t) = 1$ (re-emergence of trait 0, which becomes resident once again) or $\beta_0(t) = \beta_1(t) < 1$ (change of dominant trait). A delicate case study shows that the first case occurs if $\tau - \delta < 3/2$ when $\beta_1(s_3) > 0$, or if $\tau - \delta < 3\alpha/(1 - \alpha)$ when $\beta_1(s_3) = 0$, and the second case if $\tau - \delta > 3/2$ when $\beta_1(s_3) > 0$, or if $\tau - \delta > 3\alpha/(1 - \alpha)$ when $\beta_1(s_3) = 0$. In the first case, one needs to proceed with similar computations as in the first phases. In the second case, either trait $\delta$ re-emerges first (i.e. becomes resident again), or trait $2\delta$ becomes dominant once again. Explicit computations of the subsequent dynamics are very lengthy. This case is illustrated by Figure 2.1(b).
### 3.3 Case 3: $2\delta < \tau$

We proceed similarly as in Case 2.

**Phase 1: time interval $[0, s_1]$.** This phase is the same as in Case 2. The resident trait is 0 and the fitnesses of the three traits are given by

$$S(0; 0) = 0, \quad S(\delta; 0) = \tau - \delta > 0, \quad S(2\delta; 0) = \tau - 2\delta > 0.$$

We obtain, for all $t \in [0, s_1]$, $\beta_0(t) = 1$,

$$\beta_1(t) = 1 - \alpha + (\tau - \delta)t \quad \text{and} \quad \beta_2(t) = 1 - 2\alpha + (\tau - \delta)t$$

where $s_1 = \frac{\alpha}{\tau - \delta}$. Thus $\beta_0(s_1) = \beta_1(s_1) = 1$ and $\beta_2(s_1) = 1 - \alpha$.

**Phase 2: time interval $[s_1, s_2]$.** This phase is also the same as in Case 2. The resident trait is $\delta$ and the fitnesses are given by

$$S(0; \delta) = -(\tau - \delta) < 0, \quad S(\delta; \delta) = 0, \quad S(2\delta; \delta) = \tau - \delta > 0.$$

We obtain, for all $t \in [0, s_2 - s_1]$, $\beta_1(s_1 + t) = 1$,

$$\beta_0(s_1 + t) = 1 - (\tau - \delta)t \quad \text{and} \quad \beta_2(s_1 + t) = 1 - \alpha + (\tau - \delta)t,$$

where $s_2 = s_1 + \frac{\alpha}{\tau - \delta}$. Thus $\beta_1(s_2) = \beta_2(s_2) = 1$ and $\beta_0(s_2) = 1 - \alpha$.

Again, we have to separate the cases $2\delta < 3$ and $2\delta > 3$.

#### 3.3.1 Case 3(a): $2\delta < 3$

**Phase 3: time interval $[s_2, +\infty)$.** The resident trait is $2\delta$ and the fitnesses are given by

$$S(0; 2\delta) = -(\tau - 2\delta) < 0, \quad S(\delta; 2\delta) = -(\tau - \delta) < 0, \quad S(2\delta; 2\delta) = 0.$$

We obtain, for all $t \ge 0$, $\beta_2(s_2 + t) = 1$, $\beta_0(s_2 + t) = [1 - \alpha - (\tau - 2\delta)t] \vee 0$ and

$$\beta_1(s_2 + t) = [1 - (\tau - \delta)t] \vee [1 - 2\alpha - (\tau - 2\delta)t] \vee 0.$$

Therefore, $2\delta$ remains the resident trait forever.

#### 3.3.2 Case 3(b): $2\delta > 3$

**Time interval $[s_2, +\infty)$.** The resident trait $2\delta$ cannot survive by itself. Hence, the fitnesses are now given by

$$\hat{S}(0; 2\delta) = 3 - \tau < 0, \quad \hat{S}(\delta; 2\delta) = 3 - \delta - \tau < 0, \quad \hat{S}(2\delta; 2\delta) = 3 - 2\delta < 0.$$

Since $\hat{S}(0; 2\delta) < \hat{S}(2\delta; 2\delta)$ and $\hat{S}(\delta; 2\delta) < \hat{S}(2\delta; 2\delta)$, Phase 3 will end when $\beta_2(t)$ hits 0, i.e. when the population gets extinct. Hence, for all $t \ge 0$, $\beta_0(s_2 + t) = [1 - \alpha + (3 - \tau)t] \vee 0$, $\beta_1(s_2 + t) = [1 - (\tau + \delta - 3)t] \vee [1 - 2\alpha + (3 - \tau)t] \vee 0$ and $\beta_2(s_2 + t) = [1 - (2\delta - 3)t] \vee 0$, and the extinction time is $s_3 = s_2 + \frac{1}{2\delta - 3}$.
# 4 Proof of Theorem 2.1

## 4.1 Main ideas of the proof

Let $T > 0$ be fixed during the whole proof. We start from the stochastic birth and death process with mutation, competition and transfer, $(N_0^K(t), \dots, N_L^K(t))$. Our goal is to study the limit behaviour of the vector $(\beta_0^K(t), \dots, \beta_L^K(t))$ defined in (1.5).

Theorem 2.1 will be obtained by a fine comparison of the size of each subpopulation defined by a given trait value with carefully chosen branching processes with immigration. The stochastic dynamics consists in a succession of steps, composed of long phases $[\sigma_k^K \log K, \theta_k^K \log K]$ for $k \ge 1$ (with $\sigma_1^K = 0$) followed by short intermediate phases $[\theta_k^K \log K, \sigma_{k+1}^K \log K]$. In each long phase, there is a single dominant or resident trait. Short intermediate phases correspond to the replacement of the resident or dominant trait, where two subpopulations are of maximal order. We will prove that $\theta_k^K$ converges in probability to $s_k$, $k \ge 1$. In the limit, intermediate steps vanish on the time scale $\log K$. The proof will proceed by induction on $k$ until the occurrence of three particular events at some step $k_0$: the exponents of three traits become maximal simultaneously (case (ii)(a) in Theorem 2.1), extinction (case (ii)(b)), or the exponent of some trait vanishes at the same time as a change of resident or dominant population (case (ii)(c)). We then stop the induction and set $T_0 = s_{k_0}$ in cases (a) and (c) or $T_0 = +\infty$ in case (b).

Four cases need to be distinguished for the inductive definition of $\sigma_k^K$ and $\theta_k^K$, depending on whether there is a dominant or resident trait at the beginning and the end of each step. When there is a resident (resp. dominant) trait during step $k$, the stopping time $\theta_k$ will be defined as the first time when its size exits a neighborhood of its equilibrium density (resp. its exponent exits a neighborhood of its limit), or when the other subpopulations stop to be negligible with respect to the resident (resp. dominant) subpopulation size. To quantify the latter condition, we introduce a parameter $m > 0$ which will be fixed during the proof (see (4.1), (4.17), (4.19) and Remark 4.1). When the next trait with higher exponent is resident (resp. dominant), the stopping time $\sigma_{k+1}^K$ converges to $s_k$ (resp. to $s_k + s$ for a small parameter $s > 0$). The proof will be completed by letting $s$ converge to 0.

To control the exponents $\beta_\ell^K(t)$, we proceed by a double induction, first on the steps, and second, inside each step, on the traits $\ell\delta$, for $\ell = 0$ to $\ell = L$. The exponents are approximately piecewise affine. Changes of slopes may happen when a new trait emerges, when a trait dies or when the dynamics of a trait becomes driven by incoming mutations. We use asymptotic results on branching processes with immigration detailed in Appendix B to control the sizes of the non-dominant subpopulations. The main result used for phases inside steps is Theorem B.5. During intermediate phases, we use comparisons with dynamical systems, see Lemmas C.2 and C.3.

## 4.2 Step 1

Let us begin the induction on the steps and start with Phase 1, corresponding to the time interval $[0, \theta_1^K \log K]$. During this phase, the trait $\ell_1^*\delta = 0$ is resident. We introduce a parameter $\epsilon_1 > 0$
and we choose $K$ large enough so that $N_0^K(0) \in [(\frac{3}{C} - \varepsilon_1)K, (\frac{3}{C} + \varepsilon_1)K]$. We define

$$ \theta_1^K = \inf \left\{ t \ge 0 : N_0^K(t \log K) \notin [(\frac{3}{C} - 3\varepsilon_1)K, (\frac{3}{C} + 3\varepsilon_1)K] \quad \text{or} \quad \sum_{\ell \ne 0} N_\ell^K(t \log K) \ge m\varepsilon_1 K \right\}. \quad (4.1) $$

For the chosen initial condition (1.7), $\beta_\ell(0) = (1 - \ell\alpha)_+$. We distinguish two cases: either $\tau < \delta$ or $\delta < \tau$.

### 4.2.1 Case $\tau < \delta$: a single phase

Using formulas (2.3) and (2.4) recursively, we obtain

$$ \begin{align*} \beta_0(t) &= 1 & t_{0,1} &= 0 \\ \beta_1(t) &= (1 - \alpha + (\tau - \delta)t) \lor (1 - \alpha) \lor 0 = 1 - \alpha, & t_{1,1} &= 0 \\ \vdots & & \vdots & \\ \beta_\ell(t) &= (1 - \ell\alpha + (\tau - \ell\delta)t) \lor (1 - \ell\alpha) \lor 0 = (1 - \ell\alpha)_+, & t_{\ell,1} &= 0, \end{align*} $$

where we recall that the times $t_{1,1}, \cdots, t_{\ell,1}$ have been defined in (2.6). From (2.1), we obtain $s_1 = +\infty$, and $\beta(t)$ is constant. This is due to the fact that all non-resident traits have negative fitnesses and their size is kept of constant order due to mutations from the resident trait 0.

In the sequel, we denote by $BP_K(b, d, \beta)$ the distribution of the branching process, with individual birth rate $b \ge 0$, individual death rate $d \ge 0$ and initial value $[K^\beta - 1] \in \mathbb{N}$. We refer to Appendix A for the classical properties of $BP_K(b, d, \beta)$ which will be used to obtain the following results.

We also denote by $BPI_K(b, d, a, c, \beta)$ the distribution of a branching process with immigration, with individual birth rate $b \ge 0$, individual death rate $d \ge 0$, immigration rate $K^c e^{as}$ at time $s \ge 0$ with $a, c \in \mathbb{R}$ and same initial value. We refer to Appendix B.

Similarly, $LBDI_K(b, d, C, \gamma)$ is the distribution of a one-dimensional logistic birth and death process (see Appendix C) with individual birth rate $b \ge 0$ and individual death rate $d + Cn/K$ when the population size is $n$ and with immigration at predictable rate $\gamma(t) \ge 0$ at time $t$.

In order to couple the population with branching processes with immigration, we start with computing the arrival and death rates in the subpopulation of trait $\ell\delta$, for $\ell \ge 0$. For $K$ large enough, arrivals in this population due to reproduction of trait $\ell\delta$ or transfer occur at time

$$ t \le \theta_1^K \land T \text{ at rate } N_\ell^K(t \log K) \left[ (4 - \ell\delta)(1 - K^{-\alpha}) + \tau \frac{\sum_{\ell'=0}^{\ell-1} N_{\ell'}^K(t \log K)}{\sum_{\ell'=0}^{L} N_{\ell'}^K(t \log K)} \right] \text{ satisfying} $$

$$ \begin{align*} N_\ell^K(t \log K) \left[ 4 - \ell\delta - \varepsilon_1 + \tau \frac{3 - 3C\varepsilon_1}{3 + C(3 + m)\varepsilon_1} \right] & \\ \le N_\ell^K(t \log K) \left[ (4 - \ell\delta)(1 - K^{-\alpha}) + \tau \frac{\sum_{\ell'=0}^{\ell-1} N_{\ell'}^K(t \log K)}{\sum_{\ell'=0}^{L} N_{\ell'}^K(t \log K)} \right] & \le N_\ell^K(t \log K) [4 - \ell\delta + \tau]. \end{align*} $$
Arrivals due to incoming mutations from trait $(\ell - 1)\delta$ occur at time $t \le \theta_1^K \wedge T$ at rate $N_{\ell-1}^K(t \log K)(4 - (\ell - 1)\delta)K^{-\alpha}$.

Deaths occur at rate $N_{\ell}^K(t \log K) \left[ 1 + \frac{C}{K} \sum_{\ell'=0}^{L} N_{\ell'}^K(t \log K) \right]$ satisfying

$$N_{\ell}^{K}(t \log K) (4 - 3C\varepsilon_{1}) \le N_{\ell}^{K}(t \log K) \left[ 1 + \frac{C}{K} \sum_{\ell'=0}^{L} N_{\ell'}^{K}(t \log K) \right] \le N_{\ell}^{K}(t \log K) (4 + C(3 + m)\varepsilon_{1}).$$

**Step 1** Let us prove by induction on $\ell \ge 0$ the following bounds on the mutation rates: for all $t \le \theta_1^K \wedge T$, with probability converging to 1 as $K \to +\infty$,

$$K^{\beta_{\ell}(t)-\alpha-(\ell+1)\varepsilon_1} \le N_{\ell}^{K}(t \log K)(4-\ell\delta)K^{-\alpha} \le K^{\beta_{\ell}(t)-\alpha+(\ell+1)\varepsilon_1}. \quad (4.2)$$

For $\ell = 0$, by definition of $\theta_1^K$,

$$K^{1-\alpha-\varepsilon_1} \le N_0^K(t \log K) 4K^{-\alpha} \le K^{1-\alpha+\varepsilon_1} \quad (4.3)$$

is clear. To proceed to $\ell = 1$, we use standard coupling arguments to obtain

$$Z_{1,1}^{K}(t \log K) \le N_{1}^{K}(t \log K) \le Z_{1,2}^{K}(t \log K), \quad \forall t \le \theta_{1}^{K} \wedge T, \quad (4.4)$$

where $Z_{1,1}^K$ is a BPI$_K(4 - \delta + \tau - \bar{C}\varepsilon_1, 4 + \bar{C}\varepsilon_1, 0, 1 - \alpha - \varepsilon_1, 1 - \alpha - \varepsilon_1)$ and $Z_{1,2}^K$ is a BPI$_K(4 - \delta + \tau, 4 - \bar{C}\varepsilon_1, 0, 1 - \alpha + \varepsilon_1, 1 - \alpha + \varepsilon_1)$, with

$$\bar{C} = 1 + (1 \vee \tau)C(6 + m).$$

Note that the addition of $\varepsilon_1$ in the coefficient $\beta$ of the upper-bounding branching process ensures that $c \le \beta$, so that we can use Theorem B.5(i) to deduce that as $K$ tends to infinity, since $\tau - \delta < 0$,

$$\frac{\log(1 + Z_{1,1}^K(t \log K))}{\log K} \to [1 - \alpha - \varepsilon_1 + (\tau - \delta - 2\bar{C}\varepsilon_1)t] \vee [1 - \alpha - \varepsilon_1] \ge 1 - \alpha - \varepsilon_1 = \beta_1(t) - \varepsilon_1$$

and

$$\frac{\log(1 + Z_{1,2}^K(t \log K))}{\log K} \to [1 - \alpha + \varepsilon_1 + (\tau - \delta + \bar{C}\varepsilon_1)t] \vee [1 - \alpha + \varepsilon_1] \le 1 - \alpha + \varepsilon_1 = \beta_1(t) + \varepsilon_1,$$

in $L^\infty([0, T])$ and provided that $\varepsilon_1$ is small enough.

Assume now that the induction hypothesis (4.2) is true for $\ell - 1 \ge 1$ and let us prove it for $\ell$. Either $\ell \le 1 + [1/\alpha]$ and we have for all $t \le \theta_1^K \wedge T$, with probability converging to 1 as $K \to +\infty$,

$$K^{1-(\ell-1)\alpha-\alpha-\ell\varepsilon_1} \le N_{\ell-1}^{K}(t \log K)(4 - (\ell - 1)\delta)K^{-\alpha} \le K^{1-(\ell-1)\alpha+\alpha+\ell\varepsilon_1},$$

or $\ell > 1 + [1/\alpha]$ and $N_{\ell-1}^K(t \log K)(4 - (\ell - 1)\delta)K^{-\alpha} = 0$. Hence, with probability converging to 1,

$$Z_{\ell,1}^{K}(t \log K) \le N_{\ell}^{K}(t \log K) \le Z_{\ell,2}^{K}(t \log K), \quad \forall t \le \theta_{1}^{K} \wedge T, \quad (4.5)$$
where $Z_{\ell,1}^K$ is a $BPI_K(4 - \ell\delta + \tau - \overline{C}\varepsilon_1, 4 + \overline{C}\varepsilon_1, 0, (1 - (\ell - 1)\alpha)_+ - \alpha - \ell\varepsilon_1, (1 - \ell\alpha - \ell\varepsilon_1)_+)$ and $Z_{\ell,2}^K$ is a $BPI_K(4 - \ell\delta + \tau, 4 - \overline{C}\varepsilon_1, 0, (1 - (\ell - 1)\alpha)_+ - \alpha + \ell\varepsilon_1, (1 - \ell\alpha + \ell\varepsilon_1)_+)$. Note that when $\ell > 1 + \lfloor 1/\alpha \rfloor$, the lower bound has nonzero but negligible immigration, hence the comparison is true only on the event where there is no immigration in $Z_{\ell,1}^K$ on $[0, T \log K]$, which has probability converging to 1 (see Lemma B.7).

If $\ell \le \lfloor 1/\alpha \rfloor$, we use Theorem B.5 (i) to deduce that as $K$ tends to infinity, uniformly for $t \in [0, T]$,

$$ \frac{\log(1 + Z_{\ell,1}^K(t \log K))}{\log K} \rightarrow [1 - \ell\alpha - \ell\varepsilon_1 + (\tau - \ell\delta - 2\overline{C}\varepsilon_1)t] \vee [1 - \ell\alpha - \ell\varepsilon_1] \ge \beta_\ell(t) - \ell\varepsilon_1, $$

and

$$ \frac{\log(1 + Z_{\ell,2}^K(t \log K))}{\log K} \rightarrow [1 - \ell\alpha + \ell\varepsilon_1 + (\tau - \ell\delta + \overline{C}\varepsilon_1)t] \vee [1 - \ell\alpha + \ell\varepsilon_1] \le \beta_\ell(t) + \ell\varepsilon_1. $$

If $\lfloor 1/\alpha \rfloor + 1 \le \ell \le L$, we use Theorem B.5 (iii) and (B.15) (assuming that $\varepsilon_1$ is small enough) to prove that $\log(1 + Z_{\ell,i}^K(t \log K))/\log K$ converges to 0 in $L^\infty([0, T])$, and $N_\ell^K(t \log K) = 0$ for all $t \le \theta_1^K \wedge T$ with probability converging to 1.

We deduce that, with probability converging to 1, (4.2) is satisfied with $\ell - 1$ replaced by $\ell$. This completes the proof of (4.2) by induction. In particular, on the time interval $[0, \theta_1^K \wedge T]$, $\log(1 + N_\ell^K(t \log K))/\log K$ converges to $\beta_\ell(t) = (1 - \ell\alpha)_+$.

**Step 2** It remains to prove that $\theta_1^K > T$ with probability converging to 1. Using the previous steps and recalling that $\beta_\ell(t) = \beta_\ell(0) = (1 - \ell\alpha)_+$, we have, with probability converging to 1, that $\sup_{t \in [0, 2T]} |\beta_\ell^K(t) - \beta_\ell(t)| < \alpha/2$, and thus, for all $t \le \theta_1^K \wedge 2T$,

$$ \sum_{\ell=1}^{L} N_{\ell}^{K}(t \log K) \le K^{\max_{1 \le \ell \le L, t \in [0,2T]} \beta_{\ell}(t) + \frac{\alpha}{2}} = K^{1-\frac{\alpha}{2}}. \quad (4.6) $$

Hence, we have for all $t \le \theta_1^K \wedge 2T$ that

$$ Z_{0,1}^{K}(t \log K) \le N_{0}^{K}(t \log K) \le Z_{0,2}^{K}(t \log K), \quad (4.7) $$

where $Z_{0,1}^K$ is a $LBDI_K(4(1 - K^{-\alpha}), 1 + CK^{-\alpha/2}, C, 0)$ and $Z_{0,2}^K$ is a $LBDI_K(4, 1, C, 0)$. Applying Lemma C.1(i) to the processes $Z_{0,i}^K, i = 1, 2$, we deduce that $\theta_1^K > T$ with probability converging to 1 when $K \rightarrow +\infty$.

### 4.2.2 Case $\tau > \delta$: Phase 1

Let us first give the explicit expression of $\beta_\ell$ on the first phase. We shall use the two equivalent formulations (2.4) and (2.7). The fitnesses involved in these expressions are $S(0; 0) = 0$, $S(\ell\delta; 0) = \tau - \ell\delta$, for all $1 \le \ell \le L$. We use formula (2.7) recursively from $\ell = 1$ to $L$ to prove that, for $\ell \le \lfloor \frac{1}{\alpha} \rfloor$

$$ \beta_{\ell}(t) = (1 - \ell\alpha + (\tau - \ell\delta)t) \vee (1 - \ell\alpha + (\tau - \delta)t) \vee 0 = 1 - \ell\alpha + (\tau - \delta)t, $$
and $t_{\ell,1} = 0$ when $\ell < \lfloor 1/\alpha \rfloor$.

When $\ell = \lfloor \frac{1}{\alpha} \rfloor$, we have $\beta_{\lfloor 1/\alpha \rfloor}(0) \in (0, \alpha)$ and we deduce that $t_{\lfloor 1/\alpha \rfloor,1} = \frac{\alpha(1+\lfloor 1/\alpha \rfloor)-1}{\tau-\delta} > 0$.

For $\ell = \lfloor \frac{1}{\alpha} \rfloor + 1$, we use (2.4) to prove

$$ \begin{aligned} \beta_{\lfloor 1/\alpha \rfloor+1}(t) &= ((\tau - (\lfloor \frac{1}{\alpha} \rfloor + 1)\delta)(t - t_{\lfloor 1/\alpha \rfloor,1})) \vee (1 - (\lfloor \frac{1}{\alpha} \rfloor + 1)\alpha + (\tau - \delta)t) \vee 0 \\ &= (1 - (\lfloor \frac{1}{\alpha} \rfloor + 1)\alpha + (\tau - \delta)t)_+ . \end{aligned} $$

Similar computation gives the general formula for all $\ell \in \{1, \dots, L\}$:

$$ \beta_{\ell}(t) = (1 - \ell\alpha + (\tau - \delta)t)_+; \qquad t_{\ell,1} = \begin{cases} 0 & \text{if } \ell < \lfloor 1/\alpha \rfloor \\ \frac{\alpha(\ell+1)-1}{\tau-\delta} & \text{otherwise.} \end{cases} \qquad (4.8) $$

We see that $\beta_1(t)$ is the first exponent to reach 1, so that the duration of the first phase is

$$ s_1 = \frac{\alpha}{\tau - \delta}. $$

All the exponents $\beta_\ell$ are affine functions on $[0, s_1]$, except for $\ell = \lfloor 1/\alpha \rfloor + 1$ where there is a change of slope at time $t_{\lfloor 1/\alpha \rfloor,1}$.

The comparisons of arrival and death rates of $N_\ell^K(t \log K)$ are the same as in Section 4.2.1. We proceed by induction over $\ell \ge 0$ as above.

For $\ell = 0$, (4.3) remains true by definition of $\theta_1^K$. To proceed to $\ell = 1$, we observe that (4.4) remains valid and Theorem B.5(i) gives as before that as $K$ tends to infinity, since $\tau - \delta > 0$,

$$ \frac{\log(1 + Z_{1,1}^K(t \log K))}{\log K} \to [1 - \alpha - \varepsilon_1 + (\tau - \delta - 2\overline{C}\varepsilon_1)t] \vee [1 - \alpha - \varepsilon_1] \ge \beta_1(t) - (1 + 2\overline{C}T)\varepsilon_1, $$

and

$$ \frac{\log(1 + Z_{1,2}^K(t \log K))}{\log K} \to [1 - \alpha + \varepsilon_1 + (\tau - \delta + \overline{C}\varepsilon_1)t] \vee [1 - \alpha + \varepsilon_1] \le \beta_1(t) + \varepsilon_1(1 + \overline{C}T), $$

in $L^\infty([0, s_1 \wedge T])$ and provided that $\varepsilon_1$ is small enough.

For $2 \le \ell \le 1 + \lfloor 1/\alpha \rfloor$, the induction relation (4.2) is modified as follows. For all $\ell \ge 1$, let

$$ C_{\ell} = \ell + 2\overline{C}T. \qquad (4.9) $$

We assume that, for all $t \le \theta_1^K \wedge s_1 \wedge T$,

$$ \beta_{\ell-1}(t) - \alpha - C_{\ell-1}\varepsilon_1 \le \frac{\log(N_{\ell-1}^K(t \log K)(4 - (\ell-1)\delta)K^{-\alpha})}{\log K} \le \beta_{\ell-1}(t) - \alpha + C_{\ell-1}\varepsilon_1. \quad (4.10) $$

Hence, with probability converging to 1,

$$ Z_{\ell,1}^K(t \log K) \le N_\ell^K(t \log K) \le Z_{\ell,2}^K(t \log K), \quad \forall t \le \theta_1^K \wedge s_1 \wedge T, \qquad (4.11) $$
where $Z_{\ell,1}^K$ is a $BPI_K(4 - \ell\delta + \tau - \bar{C}\varepsilon_1, 4 + \bar{C}\varepsilon_1, \tau - \delta, 1 - \ell\alpha - C_{\ell-1}\varepsilon_1, (1 - \ell\alpha - C_{\ell-1}\varepsilon_1)_+)$ and $Z_{\ell,2}^K$ is a $BPI_K(4 - \ell\delta + \tau, 4 - \bar{C}\varepsilon_1, \tau - \delta, 1 - \ell\alpha + C_{\ell-1}\varepsilon_1, (1 - \ell\alpha + C_{\ell-1}\varepsilon_1)_+)$.

Note that, in this Phase 1, $\beta_{\ell-1}(t)$ is affine on $[0, s_1]$, so we can apply Theorem B.5 on the whole interval $[0, s_1]$. If $\ell \le \lfloor 1/\alpha \rfloor$, we apply Theorem B.5 (i) and if $\ell = 1 + \lfloor 1/\alpha \rfloor$, $\beta_\ell(0) = 0$ so we apply Theorem B.5 (ii), using that $a = \tau - \delta > r = \tau - \ell\delta + \bar{C}\varepsilon_1$ for $\varepsilon_1$ small enough. We deduce that, in both cases, as $K$ tends to infinity, for all $t \le \theta_1^K \wedge s_1 \wedge T$,

$$ (\beta_{\ell}(t) - C_{\ell-1}\varepsilon_1)_+ \le \frac{\log(1 + N_{\ell}^K(t \log K))}{\log K} \le (1 - \ell\alpha + C_{\ell-1}\varepsilon_1 + (\tau - \delta)t)_+ \le \beta_{\ell}(t) + C_{\ell-1}\varepsilon_1. \quad (4.12) $$

Hence, we have proved (4.10) for $\ell$ and the induction step is complete. We also deduce from (B.15) that $N_{1+\lfloor 1/\alpha \rfloor}^K(t \log K) = 0$ for all $t$ in a closed interval of $[0, s_1]$ included in the complement of the support of $(1 - \ell\alpha + C_{\ell-1}\varepsilon_1 + (\tau - \delta)t)_+$.

For $\ell = 2 + \lfloor 1/\alpha \rfloor$, because $\beta_{1+\lfloor 1/\alpha \rfloor}$ has a change of slope at time

$$ t_{\lfloor 1/\alpha \rfloor, 1} = \frac{\alpha - (1 - \lfloor 1/\alpha \rfloor \alpha)}{\tau - \delta}, $$

the bounds (4.10) on the immigration rate do not allow to apply Theorem B.5 on the whole interval $[0, s_1]$. Instead, we first apply them successively on the intervals $[0, t_{\lfloor 1/\alpha \rfloor, 1}]$ and $[t_{\lfloor 1/\alpha \rfloor, 1}, s_1]$. On the first interval, we have the bounds

$$ Z_{\ell,1}^K(t \log K) \le N_{\ell}^K(t \log K) \le Z_{\ell,2}^K(t \log K), \quad \forall t \le \theta_1^K \wedge t_{\lfloor 1/\alpha \rfloor, 1} \wedge T, $$

where $Z_{\ell,1}^K$ is a $BPI_K(4 - \ell\delta + \tau - \bar{C}\varepsilon_1, 4 + \bar{C}\varepsilon_1, 0, -\alpha - C_{\ell-1}\varepsilon_1, 0)$ and $Z_{\ell,2}^K$ is a $BPI_K(4 - \ell\delta + \tau, 4 - \bar{C}\varepsilon_1, 0, -\alpha + C_{\ell-1}\varepsilon_1, 0)$. We apply Theorem B.5 (iii) to deduce that, with probability converging to 1, $N_\ell^K(t \log K) = 0$ for all $t \in [0, t_{\lfloor 1/\alpha \rfloor, 1} \wedge \theta_1^K \wedge T]$.

On the second interval, we obtain similar bounds with $Z_{\ell,1}^K$ a $BPI_K(4 - \ell\delta + \tau - \bar{C}\varepsilon_1, 4 + \bar{C}\varepsilon_1, \tau - \delta, -\alpha - C_{\ell-1}\varepsilon_1, 0)$ and $Z_{\ell,2}^K$ is a $BPI_K(4 - \ell\delta + \tau, 4 - \bar{C}\varepsilon_1, \tau - \delta, -\alpha + C_{\ell-1}\varepsilon_1, 0)$. Because $(\tau - \delta)(s_1 - t_{\lfloor 1/\alpha \rfloor, 1}) < \alpha$, we apply Theorem B.5 (ii) to deduce that, with probability converging to 1, $N_\ell^K(t \log K) = 0$ for all $t \in [t_{\lfloor 1/\alpha \rfloor, 1} \wedge \theta_1^K \wedge T, s_1 \wedge \theta_1^K \wedge T]$.

For $\ell > 2 + \lfloor 1/\alpha \rfloor$, we proceed similarly to prove by induction that, with probability converging to 1, $N_\ell^K(t \log K) = 0$ for all $t \le s_1 \wedge \theta_1^K \wedge T$.

Using the comparison argument with logistic birth-death processes (4.7) on the interval $[0, \theta_1^K \wedge (s_1 - \eta) \wedge T]$, we can prove as in the previous section that, for all $\eta > 0$, $\theta_1^K > (s_1 - \eta) \wedge T$ with probability converging to 1.

To conclude, since $\varepsilon_1$ in (4.12) is arbitrary, we have proved that, for all $\eta > 0$, $\log(1 + N_\ell^K(t \log K))/\log K$ converges to $\beta_\ell(t)$ in $L^\infty([0, (s_1 - \eta) \wedge T])$.

### 4.2.3 Case $\tau > \delta$: Intermediate Phase 1

The goal of the intermediate phase is to prove that, on a time interval $[\theta_1^K \log K, \theta_1^K \log K + T(\varepsilon_1, m)]$ with $T(\varepsilon_1, m)$ to be defined below, the two traits $\ell_1^*\delta = 0$ and $\ell_2^*\delta = \delta$ are of size-order K and population with trait 0 is declining below a small threshold while population with trait $\delta$ reaches a neighborhood of its equilibrium $K\bar{n}(\delta) = (3-\delta)K/C$.
Let us first show that $\theta_1^K < s_1 + \eta$ with probability converging to one, for any $\eta > 0$. For this, we observe that the bounds of (4.10) and (4.11) are actually true for all $t \le \theta_1^K \wedge T$ provided we use $(1 - \ell\alpha + (\tau - \delta)t)_+$ instead of $\beta_\ell(t)$ inside (4.10), since $\beta_\ell(t)$ is constructed only on $[0, s_1]$ in Phase 1. This gives with high probability for all $t \le \theta_1^K \wedge T$

$$ (1 - \ell\alpha + (\tau - \delta)t)_+ - C_\ell\varepsilon_1 \le \frac{\log(1 + N_\ell^K(t \log K))}{\log K} \le (1 - \ell\alpha + (\tau - \delta)t)_+ + C_\ell\varepsilon_1. \quad (4.13) $$

In particular, if $\theta_1^K \ge s_1 + \eta$ with positive probability, we would obtain, with high probability on this event

$$ \frac{\log(1 + N_1^K((s_1 + \eta) \log K))}{\log K} \ge 1 - \alpha - C_1\varepsilon_1 + (\tau - \delta)(s_1 + \eta), $$

which is larger than 1 provided $\varepsilon_1$ is small enough. This would contradict the assumption that $\theta_1^K > s_1 + \eta$. Hence, $\lim_{K \to +\infty} \theta_1^K = s_1$ in probability.

In the previous phase, we used bounds on $N_0^K(t \log K)$ until time $s_1 - \eta$. We now need to extend them until $\theta_1^K$. In this case, (4.6) is not true anymore. Therefore, assuming $K$ large enough to get $4K^{-\alpha} < Cm\varepsilon_1$, we couple $N_0^K(t)$ with two logistic processes $Z_{0,1}^K$ and $Z_{0,2}^K$ of respective laws $LBDI_K(4 - Cm\varepsilon_1, 1 + \frac{\tau m\varepsilon_1}{3/C - 3\varepsilon_1} + Cm\varepsilon_1, C, 0)$ and $LBDI_K(4, 1, C, 0)$: $Z_{0,1}^K \le N_0^K \le Z_{0,2}^K$. The equilibrium density of $Z_{0,2}^K$ is $3/C$ but the one of $Z_{0,1}^K$ is

$$ \bar{z}_{0,1} := \frac{3}{C} - \varepsilon_1 \left( 2m + \frac{\tau m}{3 - 3\varepsilon_1 C} \right). $$

We choose $m$ small enough to have

$$ 0 < 2m + \frac{\tau m}{3 - 3\varepsilon_1 C} < \frac{1}{3}. \quad (4.14) $$

Then, observing that $Z_{0,1}^K(0) \in [(\bar{z}_{0,1} - 4\varepsilon_1/3)K, (\bar{z}_{0,1} + 4\varepsilon_1/3)K]$ we can apply Lemma C.1(i) to $Z_{0,1}^K$ with $\varepsilon = 4\varepsilon_1/3$ to deduce that

$$ \lim_{K \to \infty} \mathbb{P} \left( \forall t \in [0, s_1 + \eta], \frac{Z_{0,1}^K(t \log K)}{K} \le \frac{3}{C} + 3\varepsilon_1 \right) = 1. $$

Applying similarly Lemma C.1(i) to $Z_{0,2}^K$, we obtain

$$ \lim_{K \to \infty} \mathbb{P} \left( \frac{N_0^K (\theta_1^K \log K)}{K} \in \left[ \frac{3}{C} - 3\varepsilon_1, \frac{3}{C} + 3\varepsilon_1 \right] \right) = 1. $$

Hence, by construction of $\theta_1^K$, we have with probability converging to 1

$$ \sum_{\ell=1}^{L} N_{\ell}^{K} (\theta_{1}^{K} \log K) \geq m \varepsilon_{1} K. $$

**Remark 4.1** The constraint (4.14) on the constant $m > 0$ ensures that, with high probability, at time $\theta_1^K$, trait 0 is still close to its equilibrium and the second resident trait $\delta$ has emerged. Similar constraints on $m$ can be defined for any other resident trait $\ell\delta < 3$. In all the proof, we assume that such $m > 0$ is chosen.
Using Formula (4.13) and the convergence of $\theta_1^K$ to $s_1$, we show immediately that, with probability converging to 1,

$$ \sum_{\ell=2}^{L} N_{\ell}^{K}(\theta_{1}^{K} \log K) \leq K^{1-\alpha/2}. \qquad (4.15) $$

Hence $N_1^K(\theta_1^K \log K) \geq m\epsilon_1 K/2$ for $K$ large enough.

It is now possible to use the Markov property by conditioning at time $\theta_1^K \log K$. We distinguish whether the emerging trait $\delta$ can survive on its own ($\delta < 3$) or not ($\delta > 3$).

**Case $\tau > \delta$: Intermediate Phase 1, case $\delta < 3$** For $\delta < 3$, we first claim that there exists $s > 0$ small enough such that

$$ \sum_{\ell=2}^{L} N_{\ell}^{K}(t \log K) \leq K^{1-\alpha/4}, \quad \forall t \in [\theta_{1}^{K}, \theta_{1}^{K} + s]. $$

This can be obtained from the continuity argument of Lemma B.9. Then, we can apply Lemma C.3(i) with

$$ b_0^K(t) = 4(1 - K^{-\alpha}), \quad b_1^K(t) = (4 - \delta)(1 - K^{-\alpha}), \\ d_0^K(t) = d_1^K(t) = 1 + \left( \frac{C}{K} + \frac{\tau}{\sum_{\ell=0}^{L} N_{\ell}^{K}(t + \theta_{1}^{K} \log K)} \right) \sum_{\ell=2}^{L} N_{\ell}^{K}(t + \theta_{1}^{K} \log K), \\ \tau^K(t) = \tau \frac{N_0^K(t + \theta_1^K \log K) + N_1^K(t + \theta_1^K \log K)}{\sum_{\ell=0}^{L} N_{\ell}^{K}(t + \theta_1^K \log K)} $$

which converge respectively to $b_0 = 4$, $b_1 = 4 - \delta$, $d_0 = d_1 = 1$ and $\tau$, and with

$$ \gamma_0^K(t) = 0, \quad \gamma_1^K(t) = 4K^{-\alpha}N_0^K(t + \theta_1^K \log K) \leq CK^{1-\alpha}. $$

Note that Point (i) of Lemma C.3 applies here since $r_0 = b_0 - d_0 = 3 > 0$, $r_1 = b_1 - d_1 = 3 - \delta > 0$ and $S = \tau - \delta > 0$. We obtain that there exists a finite time $T(m, \epsilon_1)$ such that with large probability,

$$ N_0^K(\theta_1^K \log K + T(m, \epsilon_1)) \leq m\epsilon_1 K \quad \text{and} \quad \frac{N_1^K(\theta_1^K \log K + T(m, \epsilon_1))}{K} \in \left[ \frac{3-\delta}{C} - 3\epsilon_1, \frac{3-\delta}{C} + 3\epsilon_1 \right]. $$

Hence, we can define the time at which the first intermediate phase ends as

$$ \sigma_2^K \log K = \theta_1^K \log K + T(m, \epsilon_1) $$

where $\sigma_2^K \to s_1$ in probability. Using (4.13), the continuity argument of Lemma B.9 and the fact that $(\tau - \delta)s_1 = \alpha$, the population state at time $\sigma_2^K$ satisfies with probability converging to 1

$$ K^{1-\epsilon_1} \leq N_0^K(\sigma_2^K \log K) \leq m\epsilon_1 K, \quad \frac{N_1^K(\sigma_2^K \log K)}{K} \in \left[ \frac{3-\delta}{C} - \epsilon_2, \frac{3-\delta}{C} + \epsilon_2 \right], \\ \frac{\log(1 + N_{\ell}^{K}(\sigma_2^K \log K))}{\log K} \in [1 - (\ell-1)\alpha - \epsilon_2, 1 - (\ell-1)\alpha + \epsilon_2] = [\beta_{\ell}(s_1) - \epsilon_2, \beta_{\ell}(s_1) + \epsilon_2], \\ \forall 2 \leq \ell \leq 1 + \lfloor 1/\alpha \rfloor, \\ N_{\ell}^{K}(\sigma_2^K \log K) = 0, \quad \forall 2 + \lfloor 1/\alpha \rfloor \leq \ell \leq L, $$
where

$$ \varepsilon_2 = (C_L \lor 3)\varepsilon_1. \qquad (4.16) $$

We are then ready to proceed to Phase 2 (see Section 4.3).

**Case $\tau > \delta$: Intermediate Phase 1, case $\delta > 3$** When $\delta > 3$, we need to apply Lemma C.3(iii) instead of (i) since $r_1 = 3 - \delta < 0$. Using (4.13) and the continuity argument of Lemma B.9 as above, we obtain for all $s > 0$ small enough, with probability converging to 1,

$$ \frac{\log(1 + N_{\ell}^{K}((\theta_{1}^{K} + s) \log K))}{\log K} \in [1 - (\ell - 1)\alpha - \varepsilon_2, 1 - (\ell - 1)\alpha + \varepsilon_2], \quad \forall 2 \le \ell \le 1 + \lfloor 1/\alpha \rfloor, \\ N_{\ell}^{K}((\theta_{1}^{K} + s) \log K)) = 0, \quad \forall 2 + \lfloor 1/\alpha \rfloor \le \ell \le L, $$

with $\varepsilon_2$ defined in (4.16). Without loss of generality, we can take $s > 0$ small enough to apply Lemma C.3(iii). In this case, we define the end of the first intermediate phase as

$$ \sigma_2^K = \theta_1^K + s, $$

where $s > 0$ is a fixed small parameter and

$$ K^{1-\varepsilon_2} \le N_0^K(\sigma_2^K \log K) \le K^{-s\rho} N_1^K(\sigma_2^K \log K), \quad N_1^K(\sigma_2^K \log K) \le K^{1-s\rho}. $$

## 4.3 Step k

Our goal is to describe the dynamics on the interval $[\sigma_k^K \log K, \theta_k^K \log K]$, that converges in the log K scale to $[s_{k-1}, s_k]$. Recall that when $\tau < \delta$ there is only one phase. So now, we only consider $\tau > \delta$.

Let $k \ge 2$. Assume that Step $k-1$ is completed and that $T_0 > s_{k-1}$ (otherwise, we stop the induction at the end of step $[s_{k-2}, s_{k-1}]$). Two cases may occur: either the emerging trait becomes resident during Step $k$, or it becomes only a dominant trait. The latter case can occur when the trait is fit ($\ell_k^* \delta < 3$) but its population size is small, or when it is unfit ($\ell_k^* \delta > 3$).

We proceed as in Step 1 by induction over $\ell \in \{0, \dots, L\}$. For each $\ell$, we couple $N_{\ell}^K$ with branching processes with immigration given by the size of the population $\ell-1$ on each time interval included in $[s_{k-1}, s_k]$ where $\beta_{\ell-1}$ is affine.

In Step 1, we took care to give bounds involving explicit constants $C_\ell$ for sake of precision. From now on, we use a constant $C_*$ which may change from line to line.

### 4.3.1 Step k, case 1

We assume that, $\max_{0 \le \ell \le L} \beta_\ell(s_{k-1} + s) = 1$ with $\ell_k^* \delta < 3$, and that this maximum is attained only for $\ell_k^*$ and $\ell_k^*$, since $s_{k-1} < T_0$.

The induction assumption in this case is as follows: suppose that, for all $\varepsilon_k > 0$ small enough, we have constructed $\sigma_k^K$ such that $\sigma_k^K \log K$ is a stopping time and

* $\sigma_k^K$ converges in probability to $s_{k-1}$;

* $\frac{N_{\ell_k^*}^K(\sigma_k^K \log K)}{K} \in [\frac{3-\delta\ell_k^*}{C} - \varepsilon_k, \frac{3-\delta\ell_k^*}{C} + \varepsilon_k]$;
• $K^{1-\varepsilon_k} \le N_{\ell_{k-1}}^K (\sigma_k^K \log K) \le \frac{m}{2} \varepsilon_k K$;

• for all $\ell \ne \ell_{k-1}^*$, $\ell_k^*$, either $N_\ell^K (\sigma_k^K \log K) = 0$ if $\beta_\ell(s_{k-1}) = 0$, or otherwise

$$ \beta_\ell(s_{k-1}) - \varepsilon_k \le \frac{\log(1 + N_\ell^K (\sigma_k^K \log K))}{\log K} \le \beta_\ell(s_{k-1}) + \varepsilon_k < 1. $$

We now give the proof of the induction step. Let us define

$$ \theta_k^K = \inf \left\{ t \ge \sigma_k^K : N_{\ell_k^*}^K (t \log K) \notin \left[ \left( \frac{3 - \ell_k^* \delta}{C} - 3\varepsilon_k \right) K, \left( \frac{3 - \ell_k^* \delta}{C} + 3\varepsilon_k \right) K \right] \right. \\ \left. \text{or } \sum_{\ell \ne \ell_k^*} N_\ell^K (t \log K) \ge m\varepsilon_k K \right\}. \quad (4.17) $$

Observe first that, by definition of $\theta_k^K$,

$$ 1 - \varepsilon_k \le \frac{\log(1 + N_{\ell_k^*}^K (t \log K))}{\log K} \le 1 + \varepsilon_k, \quad \forall t \in [\sigma_k^K, \theta_k^K]. $$

Our goal is to obtain bounds on $N_\ell^K$ by induction on $\ell \ne \ell_k^*$.

Induction initialization: If $\ell_k^* = 0$, we start the induction at $\ell = 1$; otherwise, we start it at $\ell = 0$.

In the first case, using the Markov property at time $\sigma_k^K \log K$, where $\sigma_k^K$ converges to $s_{k-1}$, we can proceed exactly as in Phase 1 (see Section 4.2.2) to prove that, with high probability for all $t \in [\sigma_k^K, \theta_k^K \wedge T]$,

$$ \beta_1(s_{k-1}) + (\tau - \delta)(t - s_{k-1}) - C_* \varepsilon_k \le \frac{\log(N_1^K (t \log K))}{\log K} \le \beta_1(s_{k-1}) + (\tau - \delta)(t - s_{k-1}) + C_* \varepsilon_k. $$

Note that, for $s_{k-1} \le t \le s_k$, $\beta_1(s_{k-1}) + (\tau - \delta)(t - s_{k-1}) = \beta_1(t)$, so we recover bounds of the form (4.10).

In the second case, since there is no incoming mutation for trait 0, we can bound the process $N_0^K (t \log K)$ for $t \in [\sigma_k^K, \theta_k^K \wedge T]$ with branching processes with constant parameters. If $\beta_0(s_{k-1}) > 0$, we deduce from Lemma A.1 that

$$ \beta_0(s_{k-1}) + (\ell_k^* \delta - \tau)(t - s_{k-1}) - C_* \varepsilon_k \le \frac{\log(N_0^K (t \log K))}{\log K} \le \beta_0(s_{k-1}) + (\ell_k^* \delta - \tau)(t - s_{k_1}) + C_* \varepsilon_k. $$

If $\beta_0(s_{k-1}) = 0$, we deduce that $N_0^K (t \log K) = 0$ for all $t \ge \sigma_k^K$.

Induction step: Assume that we have proved that, with high probability for all $t \in [\sigma_k^K, \theta_k^K \wedge s_k \wedge T]$,

$$ \beta_{\ell-1}(t) - C_* \varepsilon_k \le \frac{\log(N_{\ell-1}^K (t \log K))}{\log K} \le \beta_{\ell-1}(t) + C_* \varepsilon_k. $$

and that $N_{\ell-1}^K (t \log K) = 0$ for all $t \in [\sigma_k^K, \theta_k^K \wedge s_k \wedge T]$ such that $\beta_{\ell-1} \equiv 0$ on a small neighborhood of $t, s \in [(t - \varepsilon_k) \vee s_{k-1}, t + \varepsilon_k]$. Our goal is to prove that this holds true with $\ell$ replaced by $\ell+1$.
We split the interval $[s_{k-1}, s_k]$ into subintervals where $\beta_{\ell-1}$ is affine. We proceed inductively on each of these subintervals by coupling with branching processes with immigration as in Step 1. Let us detail the computation for the first subinterval, say $[s_{k-1}, t_1]$. On this interval, we introduce $a$ and $c$ such that

$$ \beta_{\ell-1}(t) = c + \alpha + a (t - s_{k-1}), \quad \forall t \in [s_{k-1}, t_1], $$

to be coherent with the notation of Appendix B. We can then construct as in Step 1 branching processes with immigration bounding from above and below $N_{\ell}^{K}(t \log K)$ for all $t \in [\sigma_k^K, t_1 \wedge \theta_k^K \wedge T]$ with distributions $BPI(4-\ell\delta+\tau 1_{\ell>\ell_k^*} \pm C_*\varepsilon_k, 4-\ell_k^*\delta+\tau 1_{\ell<\ell_k^*} \mp C_*\varepsilon_k, a, c \pm C_*\varepsilon_k, \beta_{\ell}(s_{k-1}) \pm C_*\varepsilon_k)$ if $\beta_{\ell}(s_{k-1}) > 0$, or $BPI(4-\ell\delta+\tau 1_{\ell>\ell_k^*} \pm C_*\varepsilon_k, 4-\ell_k^*\delta+\tau 1_{\ell<\ell_k^*} \mp C_*\varepsilon_k, a, c \pm C_*\varepsilon_k, 0)$ otherwise.

We shall consider several cases.

**Case (a)** Assume that $\beta_{\ell}(s_{k-1}) > 0$. Then, applying Theorem B.5 (i) to the bounding processes, we deduce that, with high probability on the time interval $[\sigma_k^K, \theta_k^K \wedge t_1 \wedge T]$,

$$ \begin{aligned} & (\beta_{\ell}(s_{k-1}) + S(\ell\delta; \ell_k^*\delta)(t - s_{k-1}) - C_*\varepsilon_k) \vee (\beta_{\ell-1}(t) - \alpha - C_*\varepsilon_k) \vee 0 \\ & \le \frac{\log(N_{\ell}^K(t \log K))}{\log K} \le (\beta_{\ell}(s_{k-1}) + S(\ell\delta; \ell_k^*\delta)(t - s_{k-1}) + C_*\varepsilon_k) \vee (\beta_{\ell-1}(t) - \alpha + C_*\varepsilon_k) \vee 0. \end{aligned} $$

**Case (b)** Assume that $\beta_{\ell}(s_{k-1}) = 0$ and the time $t_{\ell-1,k}$ defined in (2.6) satisfies $t_{\ell-1,k} < t_1$. This last inequality implies that $c < 0$ and then $t_{\ell-1,k} = s_{k-1} - c/a$. Applying Theorem B.5 (ii) to the bounding processes, we deduce that, with high probability on the time interval $[\sigma_k^K, \theta_k^K \wedge t_1 \wedge T]$,

$$ \begin{aligned} & [(S(\ell\delta; \ell_k^*\delta) - C_*\varepsilon_k) \vee a] \vee \left(t - s_{k-1} + \frac{c - C_*\varepsilon_k}{a}\right) \vee 0 \\ & \le \frac{\log(N_{\ell}^K(t \log K))}{\log K} \le [(S(\ell\delta; \ell_k^*\delta) + C_*\varepsilon_k) \vee a] \vee \left(t - s_{k-1} + \frac{c + C_*\varepsilon_k}{a}\right) \vee 0. \end{aligned} $$

The bound can be rewritten as

$$ [S(\ell\delta; \ell_k^*\delta) \vee a](t - t_{\ell-1,k})_+ - C_*\varepsilon_k \le \frac{\log(N_{\ell}^K(t \log K))}{\log K} \le [S(\ell\delta; \ell_k^*\delta) \vee a](t - t_{\ell-1,k})_+ + C_*\varepsilon_k. $$

**Case (c)** Assume that $\beta_{\ell}(s_{k-1}) = 0$ and $t_{\ell-1,k} > t_1$. Then, applying Theorem B.5 (ii) or (iii) to the bounding processes, we deduce that, with high probability on the time interval $[\sigma_k^K, \theta_k^K \wedge t_1 \wedge T]$, $N_{\ell}^K(t \log K) = 0$.

Summing up all these cases, it appears that we can extend $\beta_{\ell}(t)$ on the interval $[s_{k-1}, t_1]$ as in (2.4) to obtain, in all cases,

$$ \beta_{\ell}(t) - C_*\varepsilon_k \le \frac{\log(N_{\ell}^K(t \log K))}{\log K} \le \beta_{\ell}(t) + C_*\varepsilon_k. \quad (4.18) $$

We proceed similarly for the other subintervals and deduce that (4.18) holds true with high probability on the time interval $[\sigma_k^K, \theta_k^K \wedge s_k \wedge T]$. This finishes the induction on $\ell \ne \ell_k^*$.
As in Phase 1, we can control $N_{\ell_k}^K(t)$ by logistic branching processes to show that $\theta_k^K \ge (s_k - \eta) \wedge T$ with probability converging to 1 for all $\eta > 0$.

It also follows from (B.15) that $N_{\ell}^K(t \log K) = 0$ with high probability on close subintervals of $\text{int}\{\beta_{\ell} = 0\} \cap [s_{k-1}, s_k)$, where int denotes the interior.

### 4.3.2 Intermediate Phase k, case 1

As in Intermediate Phase 1, we first extend the inequalities (4.18) to $[\sigma_k^K, \theta_k^K \wedge T]$. These inequalities involve the $\beta_{\ell}(t)$ that are constructed in Phase k only until $s_k$. Explicit expressions of $\beta_{\ell}(t)$, that we do not develop here, can be obtained using the recursion in (2.4). Using these formulas instead of $\beta_{\ell}(t)$ in (4.18), we obtain inequalities valid on $[\sigma_k^K, \theta_k^K \wedge T]$, with probability converging to 1.

At time $s_k$, there exists at least one $\ell_{k+1}^* \neq \ell_k^*$ such that $\beta_{\ell_{k+1}^*}(s_k) = 1$ and $S(\ell_{k+1}^* \delta, \ell_k^* \delta) > 0$. Proceeding by contradiction as in Intermediate Phase 1, this allows us to prove that

$$ \lim_{K \to +\infty} \theta_k^K = s_k. $$

This ends the proof of Theorem 2.1 if $T_0 = s_k$ (i.e. in cases (ii)(a) or (ii)(c) in Theorem 2.1). If $T_0 > s_k$, we deduce as in Intermediate Phase 1 that, with high probability, for some $\kappa > 0$,

$$ \sum_{\ell \notin \{\ell_k^*, \ell_{k+1}^*\}} N_{\ell}^K (\theta_k^K \log K) \le K^{1-\kappa}, $$

and $N_{\ell_{k+1}^*}^K (\theta_k^K \log K) \ge m\varepsilon_k K/2$.

Distinguishing as in Section 4.2.3 whether the emerging trait $\ell_{k+1}^* \delta$ is above 3 or not, we can define a time $\sigma_{k+1}^K \log K$ satisfying the recursion properties stated at the beginning of Section 4.3.1. In particular, $\sigma_{k+1}^K$ converges to $s_k$ if $\max \beta_{\ell}(s_{k+1} + s) = 1$ and $\ell_{k+1}^* \delta < 3$, or $\sigma_{k+1}^K$ converges to $s_k + s$ otherwise. The fact that the populations such that $\beta_{\ell}(s_k) = 0$ are actually extinct at time $\sigma_k^K \log K$ follows from (B.15) and from the fact that, by definition of $T_0$, we also have $\beta_{\ell}(s_k - \varepsilon) = 0$ for $\varepsilon > 0$ small enough.

This ends the Step k in case 1.

### 4.3.3 Step k, case 2

We assume here that $T_0 > s_{k-1}$ and $\max_{0 \le \ell \le L} \beta_{\ell}(s_{k-1}) < 1$ or $\ell_k^* \delta > 3$ and the maximum is attained only for $\ell_{k-1}^*$ and $\ell_k^*$.

Here, the induction assumption is as follows: assume that, for all $\varepsilon_k > 0$ small enough, for all $s > 0$ small enough, we have constructed a stopping time $\sigma_k^K \log K$ such that

* $\sigma_k^K$ converges in probability to $s_{k-1} + s$;

* for all $\ell \neq \ell_k^*$, either $N_{\ell}^K(\sigma_k^K \log K) = 0$ if $\beta_{\ell}(s_{k-1} + s) = 0$, or otherwise

$$ \beta_{\ell}(s_{k-1} + s) - \varepsilon_k \le \frac{\log(1 + N_{\ell}^K(\sigma_k^K \log K))}{\log K} \le \beta_{\ell}(s_{k-1} + s) + \varepsilon_k < \beta_{\ell_k^*}(s_{k-1} + s) < 1. $$
Let us define $\theta_k^K$ as

$$ \theta_k^K = \inf \left\{ t \ge \sigma_k^K : \frac{\log(1 + N_{\ell_k^*}^K (t \log K))}{\log K} \notin [\beta_{\ell_k^*}(t) - \varepsilon_k, \beta_{\ell_k^*}(t) + \varepsilon_k], \right. \\ \left. \text{or } \sum_{\ell \ne \ell_k^*} N_{\ell}^K (t \log K) \ge m \varepsilon_k N_{\ell_k^*}^K (t \log K) \right\}. \quad (4.19) $$

As in Step k, case 1, our goal is to obtain bounds on $N_{\ell}^K$, by an induction on $\ell$. Either the trait $\ell_k^*$ $\delta$ remains dominant during the whole phase ($\sup_{t \in [s_{k-1}, s_k]} \beta_{\ell_k^*}(t) < 1$, see case (a) below) or it becomes resident during the phase (case (b)).

**Case (a)** In this case, there is no density dependence since the whole population is of size order $o(K)$. We can proceed exactly as in Step k, case 1, with the use of the fitness $\hat{S}$ (defined in (1.4)) instead of $S$.

With high probability for all $t \in [\sigma_k^K, \theta_k^K \wedge s_k \wedge T]$, for all $\ell \in \{0, \dots, L\}$,

$$ \beta_{\ell}(t) - C_* \varepsilon_k \le \frac{\log(N_{\ell}^K (t \log K))}{\log K} \le \beta_{\ell}(t) + C_* \varepsilon_k \quad (4.20) $$

and that $N_{\ell}^K(t \log K) = 0$ for all $t \in [\sigma_k^K, \theta_k^K \wedge s_k \wedge T]$ such that $\beta_{\ell-1}(s) = 0$ on $s \in [(t - \varepsilon_k) \vee s_{k-1}, t + \varepsilon_k]$.

**Case (b)** Let us denote by $t_1$ the first time at which $\beta_{\ell_k^*}(t) = 1$. We introduce:

$$ \hat{\theta}_k^K = \inf \{t \ge \sigma_k^K : N_{\ell_k^*}^K (t \log K) \ge m \varepsilon_k K \}. $$

On the time interval $[\sigma_k^K, \hat{\theta}_k^K \wedge \theta_k^K \wedge t_1 \wedge T]$, we proceed as in the case (a) to deduce that (4.20) holds with high probability on this time interval. As in case (a), the exponents $\beta_{\ell}$ are defined with $\hat{S}$ for all $s \in [s_{k-1}, t_1]$. Extending $\beta_{\ell}$ on $[s_{k-1}, t_1]$ like this is consistent with (2.4) where $\hat{S}_{s,k} = \hat{S}$ (see (2.5)).

Proceeding as in Section 4.3.2, we can prove that, with high probability, $\hat{\theta}_k^K < \theta_k^K$ and

$$ \lim_{K \to +\infty} \hat{\theta}_k^K = t_1. $$

Using Lemma C.1(ii), there exists $T(\varepsilon_k)$ such that with high probability

$$ \frac{N_{\ell_k^*}^K (\hat{\theta}_k^K \log K + T(\varepsilon_k))}{K} \in \left[ \frac{3 - \ell_k^* \delta}{C} - 3\varepsilon_k, \frac{3 - \ell_k^* \delta}{C} + 3\varepsilon_k \right]. $$

By Lemma B.9, at the time $\hat{\theta}_k^K \log K + T(\varepsilon_k)$, we have for all $\ell \ne \ell_k^*$,

$$ \frac{\log(1 + N_{\ell}^K (\hat{\theta}_k^K \log K + T(\varepsilon_k)))}{\log K} \in [\beta_{\ell}(t_1) - \varepsilon_k, \beta_{\ell}(t_1) + \varepsilon_k]. $$
Applying the Markov property at this time $\hat{\theta}_k^K \log K + T(\varepsilon_k)$ and proceeding as in Step $k$, case 1, we obtain (4.20) where $\beta_\ell$ now evolves with the fitness $S$ instead of $\hat{S}$. This is consistent with (2.4) where $\tilde{S}_{s,k} = S$ on $[t_1, s_k]$. This enlightens the introduction of $\tilde{S}$ in (2.5). This case is the only one where $\tilde{S}_{t,k}$ is not constant on the phase $[s_{k-1}, s_k]$.

### 4.3.4 Intermediate Phase $k$, case 2

In case (b), a new trait emerges in a resident population. This is treated in Section 4.3.2.

In case (a), either there is extinction of the population at time $s_k < +\infty$ (note that extinction can occur only in this case), or there is a change of dominant population at time $s_k < +\infty$.

**Extinction** In this case, either $T_0 = s_k$, and we can conclude the induction as in Section 4.3.2, or $T_0 > s_k$. This means that, for all $\ell \neq \ell_k^*$, $\beta_\ell(t_1 - \eta) = 0$ for some $\eta > 0$, so after time $t_1 - \eta$, $N_\ell^K(t) = 0$ with high probability. The population is then composed only of individuals with trait $\ell_k^* \delta$ and can be dominated by a subcritical branching process. Lemma A.1 proves the extinction of the population.

**Emergence of a new dominant population** The emergence occurs in a population of size $o(K)$. Recall that $\theta_k^K$ has been defined in (4.19). As in Section 4.3.2, we show that $\lim_{K \to +\infty} \theta_k^K = s_k$ in probability and that at time $\theta_k^K$, with high probability, for some $\kappa > 0$,

$$ \sum_{\ell \notin \{\ell_k^*, \ell_{k+1}^*\}} N_\ell^K (\theta_k^K \log K) \leq K^{-\kappa} N_{\ell_k^*}^K (\theta_k^K \log K), $$

$$ \text{and } N_{\ell_{k+1}^*}^K (\theta_k^K \log K) \geq m \varepsilon_k N_{\ell_k^*}^K (\theta_k^K \log K)/2. $$

Depending on the sign of $S = \hat{S}(\ell_k^* \delta, \ell_{k+1}^* \delta) - \hat{S}(\ell_{k+1}^* \delta, \ell_k^* \delta)$, we can use Lemma C.2(i) or (ii). We can then define a time $\sigma_{k+1}^K$ satisfying the recursion properties stated in Section 4.3.

This ends Step $k$ and finishes the proof.

## 5 Proof of Theorem 2.6

Recall that we assume $\tau > \delta$. We first give a lemma describing the dynamics of the exponents before the first re-emergence of trait 0 or the first time when a trait in (3, 4) becomes dominant. Recall that $\tilde{k}$, $\bar{k}$ and $m_0$ have been defined in (2.10) and (2.11).

**Lemma 5.1** Under the assumptions of Theorem 2.6 and with the definition (2.12) of $\bar{\tau}$,

(a) if $m_0 > 0$, we have

$$ s_k = \frac{k\alpha}{\tau - \delta} \quad \text{for all } k\delta \leq \bar{k}\delta \wedge 3. $$

For all $s \leq s_{\bar{k} \wedge [3/\delta]} \wedge \bar{\tau}$, let $k\delta < 3$ be such that $s \in [s_k, s_{k+1}]$. If $k \leq \bar{k} - 1$, we have

$$ \beta_{\ell}(s) = \begin{cases} 1 & \text{if } \ell = k, \\ [1 - (\ell - k)\alpha + (\tau - \delta)(s - s_k)] \vee 0 & \text{if } k < \ell \leq L, \\ 1 - \frac{\alpha(k-\ell-1)}{\tau-\delta} \left(\tau - \frac{k-\ell}{2}\delta\right) - (\tau - (k-\ell)\delta)(s-s_k) & \text{if } 0 \leq \ell < k, \end{cases} \quad (5.1) $$
and if $k = \bar{k}$, we have

$$ \beta_{\ell}(s) = \begin{cases} 1 & \text{if } \ell = \bar{k}, \\ \left[1 - (\ell - \bar{k})\alpha + (\tau - \delta)(s - s_{\bar{k}})\right] \vee 0 & \text{if } \bar{k} < \ell \le L, \\ \left[1 - \frac{\alpha(\bar{k} - \ell - 1)}{\tau - \delta}\left(\tau - \frac{\bar{k} - \ell}{2}\delta\right) - (\tau - (\bar{k} - \ell)\delta)(s - s_{\bar{k}})\right] & \\ \vee \left[1 - \ell\alpha - \frac{\alpha(\bar{k} - 1)}{\tau - \delta}\left(\tau - \frac{\bar{k}}{2}\delta\right) - (\tau - \bar{k}\delta)(s - s_{\bar{k}})\right] & \text{if } 0 \le \ell < \bar{k}; \end{cases} \quad (5.2) $$

(b) if $m_0 < 0$, we have

$$ s_k = \frac{k\alpha}{\tau - \delta} \quad \text{for all } k\delta < 3. $$

For all $s \le s_{[3/\delta]}$, let $k\delta < 3$ be such that $s \in [s_k, s_{k+1}]$, then

$$ \beta_{\ell}(s) = \begin{cases} 1 & \text{if } \ell = k, \\ [1 - (\ell - k)\alpha + (\tau - \delta)(s - s_k)] \vee 0 & \text{if } k < \ell \le L, \\ \left[1 - \frac{\alpha(k-\ell-1)}{\tau-\delta}\left(\tau - \frac{k-\ell}{2}\delta\right) - (\tau - (k-\ell)\delta)(s - s_k)\right] \vee 0 & \text{if } 0 \vee (k - \tilde{k} + 1) \le \ell < k, \\ 0 & \text{if } 0 \le \ell \le k - \tilde{k}. \end{cases} \quad (5.3) $$

**Proof** We apply Theorem 2.1 and proceed by induction on $k \ge 0$. We already checked that (5.1) and (5.3) hold true for $k = 0$ in the beginning of Section 4.2.2.

**Proof of (a)** Assume that $m_0 > 0$ and that we proved (5.1) until time $s_k$ for some $k \in \{0, 1, \dots, (\lceil 3/\delta \rceil - 1) \wedge \bar{k}\}$, and let us prove that (5.1) is valid until time $s_{k+1} \wedge \bar{\tau}$ if $k < \bar{k}$, or that (5.2) is valid until time $\bar{\tau} < s_{\bar{k}+1}$ if $k = \bar{k}$. At time $s_k$, the new resident trait $k\delta < 3$ replaces the former resident trait $(k-1)\delta$ and hence, the values of the fitnesses are given by

$$ S(\ell\delta; k\delta) = \tau - (\ell - k)\delta \text{ if } \ell > k, \quad S(k\delta; k\delta) = 0, \quad S(\ell\delta; k\delta) = (k - \ell)\delta - \tau \text{ if } \ell < k. \quad (5.4) $$

Since $S(\ell\delta; k\delta) < \tau - \delta = S((k+1)\delta; k\delta)$ for all $\ell > k+1$, applying Theorem 2.1, we obtain for all $s \ge s_k$,

$$ \beta_{\ell}(s) = [1 - (\ell - k)\alpha + (\tau - \delta)(s - s_k)] \vee 0, \quad \forall \ell > k, $$

until the next change of resident population. Since obviously $\beta_k(s) = 1$ until this time, we have proved the first two lines in (5.1) (or of (5.2) if $k = \bar{k}$). For the last lines, we obtain for all $s \ge s_k$ and all $\ell < k$

$$ \beta_{\ell}(s) = [\beta_{\ell}(s_k) - [\tau - (k - \ell)\delta](s - s_k)] \vee [\beta_{\ell-1}(s_k) - \alpha - [\tau - (k - \ell + 1)\delta](s - s_k)] \vee \dots \\ \vee [\beta_0(s_k) - \ell\alpha - [\tau - k\delta](s - s_k)] \vee 0, \quad (5.5) $$

until the next change of resident trait. Now, all the terms in the right-hand side except the last one lie between two consecutive terms of the sequence $(1 - \frac{\alpha(n-1)}{\tau-\delta} (\tau - \frac{n}{2}\delta))_{n \ge 0}$, so they are all positive since we assumed $m_0 > 0$. Hence

$$ \beta_{\ell}(s) = [\beta_{\ell}(s_k) - [\tau - (k - \ell)\delta](s - s_k)] \vee [\beta_{\ell-1}(s_k) - \alpha - [\tau - (k - \ell + 1)\delta](s - s_k)] \vee \dots \\ \vee [\beta_0(s_k) - \ell\alpha - [\tau - k\delta](s - s_k)]. \quad (5.6) $$
In addition, for all $1 \le \ell < k$, the function

$$s \in [s_k, s_{k+1} \wedge \bar{\tau}] \mapsto \beta_{\ell}(s_k) - [\tau - (k-\ell)\delta](s-s_k) - \beta_{\ell-1}(s_k) + [\tau - (k-\ell+1)\delta](s-s_k) + \alpha \quad (5.7)$$

is affine and hence takes values between its values at times $s_k$ and $s_{k+1}$, i.e. between

$$\frac{\alpha}{\tau - \delta} (2\tau - (k - \ell + 1)\delta) \quad \text{and} \quad \frac{\alpha}{\tau - \delta} (2\tau - (k - \ell + 2)\delta).$$

In the case where $k < \bar{k}$, we have $1 \le k - \ell \le k - 1 \le \bar{k} - 2 = \lfloor 2\frac{\alpha}{\tau - \delta} \rfloor - 2$, so both terms above are nonnegative, and the function (5.7) is positive for all $s - s_k \in [0, \frac{\alpha}{\tau - \delta}]$. This means that the maximum of two consecutive terms in the right-hand side of (5.6) is always the first term, therefore

$$\beta_{\ell}(s) = \beta_{\ell}(s_k) - [\tau - (k - \ell)\delta](s - s_k), \quad \forall 0 \le \ell < k,$$

until the next change of resident population. Since $k - \ell + 1 \le \bar{k}$ for all $0 \le \ell < k$, we have

$$\beta_{\ell}(s_k) - [\tau - (k - \ell)\delta]\frac{\alpha}{\tau - \delta} = 1 - \frac{\alpha(k - \ell)}{\tau - \delta}\left(\tau - \frac{k - \ell + 1}{2}\delta\right) < 1,$$

so the first exponent $\beta_{\ell}$ for $\ell \ne k$ reaching 1 after time $s_k$ is $\ell = k + 1$ and the next change of resident population occurs at time $s_{k+1}$. Therefore, we have proved (5.1).

Let us now consider the case where $k = \bar{k}$. The previous argument shows that the maximum of two consecutive terms in the right-hand side of (5.6) is always the first term, except possibly for the last two terms. Therefore, in all cases,

$$\beta_{\ell}(s) = [\beta_{\ell}(s_{\bar{k}}) - [\tau - (\bar{k} - \ell)\delta](s - s_{\bar{k}})] \vee [\beta_0(s_{\bar{k}}) - \ell\alpha - [\tau - \bar{k}\delta](s - s_{\bar{k}})], \quad \forall 0 \le \ell < \bar{k},$$

until the next change of resident population. In this case, the first exponent to reach 1 is $\beta_0$, at time $\bar{\tau}$, since $\bar{\tau} - s_{\bar{k}} < \frac{\alpha}{\tau - \delta}$. This concludes the proof of (5.2).

**Proof of (b)** Assume now that $m_0 < 0$. This means that the sequence $(1 - \frac{\alpha(n-1)}{\tau - \delta} (\tau - \frac{n}{2}\delta))_{n \ge 0}$ becomes negative at some index $k^{**} \le \tilde{k}$ and decreases until index $n = \tilde{k}$.

Assume that we proved (5.3) until time $s_k$ for some $k \in \{0, 1, \dots, \lfloor 3/\delta \rfloor - 1\}$, and let us prove that (5.3) is valid until time $s_{k+1}$. The fitnesses are the same as in (5.4), and the first computations of case (a) apply similarly to prove the first two lines of (5.3) until the next change of resident population.

In order to prove the last two lines of (5.3), we need to modify (5.5) accordingly. To this aim, let us observe that, when the exponent $\beta_{\ell}(s_k)$ of trait $\ell\delta$ is 0, it cannot increase (even if its fitness is positive) unless some mutant individuals get born from trait $(\ell - 1)\delta$, which only occurs at times $s$ such that $\beta_{\ell-1}(s) \ge \alpha$. Therefore, (5.5) needs to be modified as $\beta_{\ell}(s) = 0$ if $0 \le \ell \le k - k^{**}$, for all $s \ge s_k$ until the next change of resident trait, or (5.5) remains true for $0 \vee (k - k^{**} + 1) \le \ell \le k - 2$. As in case (a), we can prove that the maximum between two successive terms in the previous expression (except the last one, 0) is always reached by the first one, hence

$$\beta_{\ell}(s) = [\beta_{\ell}(s_k) - [\tau - (k - \ell)\delta](s - s_k)] \vee 0.$$

In view of the expression for $\beta_{\ell}(s)$, the next change of resident population occurs when $\beta_{k+1}(s)$ hits 1, at time $s_{k+1} = s_k + \frac{\alpha}{\tau - \delta}$. This ends the proof of (5.3). $\square$
**Proof** [Proof of Theorem 2.6] Let us first prove (a). We assume $m_0 > 0$ and $\bar{k}\delta < 3$. Then, it follows from Lemma 5.1 (a) that there is re-emergence of trait 0 at time $\bar{\tau}$.

Let us now consider the case (b). Assume $m_0 < 0$. We introduce the first index such that the trait becomes larger than 3 by $\hat{k} = \lceil \frac{3}{\delta} \rceil$.

Note that the integer $k^{**}$ defined in the last proof satisfies $k^{**} \le \tilde{k} \le \hat{k}$. Hence, Lemma 5.1 (b) implies that traits 0, $\delta$, ..., $(\hat{k}-k^{**})\delta$, get lost before their re-emergence and before a trait larger than 3 becomes dominant. Note that they remain extinct forever since mutations only produce individuals with larger traits. Our goal is to prove that, after time $s_{\hat{k}}$, the other traits get progressively lost until the global extinction of the population.

At time $s_{\hat{k}}$, the dominant trait becomes $\hat{k}\delta > 3$ and the fitnesses are given by

$$ \hat{S}(\ell\delta; \hat{k}\delta) = 3 - \ell\delta - \tau \text{ if } \ell < \hat{k}; \quad \hat{S}(\bar{k}\delta; \bar{k}\delta) = 3 - \bar{k}\delta; \quad \hat{S}(\ell\delta; \bar{k}\delta) = 3 - \ell\delta + \tau \text{ if } \ell > \bar{k}. \quad (5.8) $$

Now, for $\hat{k}-k^{**} < \ell < \hat{k}$, $\hat{S}(\ell\delta; \hat{k}\delta) < S(\ell\delta; \bar{k}\delta) < 0$ (recall that $k^{**} \le \tilde{k}$). Therefore, all positive exponents $\beta_\ell(s)$ for $\ell < \hat{k}$ keep on decreasing until they hit 0 (which means that trait $\ell\delta$ is lost) or until the next change of dominant population. For all $\ell > \hat{k}$, $\beta_\ell(s_{\hat{k}}) = [1 - (\ell - \hat{k})\delta]_+ + \beta_\ell$ has slope $\hat{S}((\hat{k}+1)\delta; \hat{k}\delta) = \hat{S}(\bar{k}\delta; \bar{k}\delta) + \tau - \delta$, therefore the next change of dominant population occurs when $\beta_{\hat{k}+1}(s) = \beta_{\hat{k}}(s)$ at time $s_{\hat{k}+1}$. At this time, by definition of $k^{**}$,

$$ \beta_{\hat{k}-k^{**}+1}(s_{\hat{k}+1}) \le \left[ \beta_{\hat{k}-k^{**}+1}(s_{\hat{k}}) + ((k^{**}-1)\delta - \tau) \frac{\alpha}{\tau - \delta} \right] \vee 0 = 0, $$

so trait $(\hat{k}-k^{**}+1)\delta$ is lost. For all $\hat{k}-\ell^*+1 < \ell < \hat{k}+1$,

$$ \begin{aligned} \beta_{\ell}(s_{\hat{k}+1}) &\le \left[ \beta_{\ell}(s_{\hat{k}}) + (3 - \ell\delta - \tau) \frac{\alpha}{\tau - \delta} \right] \vee \dots \\ &\quad \vee \left[ \beta_{\hat{k}-k^{**}+2}(s_{\hat{k}}) - (\ell + k^{**} - \hat{k} - 2)\alpha + (3 - (\hat{k}-k^{**}+2)\delta - \tau) \frac{\alpha}{\tau - \delta} \right] \vee 0 \\ &\le \left[ \beta_{\ell}(s_{\hat{k}}) - (\tau - (\hat{k}-\ell)\delta) \frac{\alpha}{\tau - \delta} \right] \vee \dots \\ &\quad \vee \left[ \beta_{\hat{k}-k^{**}+2}(s_{\hat{k}}) - (\ell + k^{**} - \hat{k} - 2)\alpha - (\tau - (k^{**}-2)\delta) \frac{\alpha}{\tau - \delta} \right] \vee 0 \\ &= \left[ \beta_{\ell}(s_{\hat{k}}) - (\tau - (\hat{k}-\ell)\delta) \frac{\alpha}{\tau - \delta} \right] \vee 0, \end{aligned} $$

where the last equality was proved in the proof of Lemma 5.1 (b). Hence, we can proceed inductively to prove that, for all $1 \le k \le L-\hat{k}$, at time $s_{\hat{k}+k} = (\hat{k}+k)\frac{\alpha}{\tau-\delta}$, $\max_{0 \le \ell \le L} \beta_\ell(s_{\hat{k}+k}) = \beta_{\hat{k}+k}(s_{\hat{k}+k}) > 0$, $\beta_\ell(s_{\hat{k}+k}) = 0$ for all $\ell \le \hat{k}+k-k^{**}$, all exponents $\beta_\ell(s)$ with $\hat{k}+k-k^{**} < \ell \le \hat{k}+k$ decrease. In addition,

* either $\beta_{\hat{k}+k}(s_{\hat{k}+k}) > \alpha$ and $\hat{k}+k < L$, and then $\beta_{\hat{k}+k+\ell}(s_{\hat{k}+k}) = [\beta_{\hat{k}+k}(s_{\hat{k}+k}) - \ell\alpha] \vee 0$ for all $1 \le \ell \le L-\hat{k}-k$, the next time of change of dominant population is $s_{\hat{k}+k+1} = (\hat{k}+k+1)\frac{\alpha}{\tau-\delta}$;

* or $\beta_{\hat{k}+k}(s_{\hat{k}+k}) < \alpha$ or $\hat{k}+k = L$, and then $\beta_{\hat{k}+k+\ell}(s_{\hat{k}+k}) = 0$ for all $\ell \ge 1$, so every exponent keeps on decreasing until $\beta_{\hat{k}+k}(s) = 0$ and there is extinction of the population.
The second case will necessarily occur after a finite number of steps, so extinction of the population occurs before the re-emergence of any trait. This ends the proof of (b).

To prove (c), we assume $m_0 > 0$ and $\bar{k} \ge \hat{k}$. By Lemma 5.1, in both cases, $\beta_0(s_{\hat{k}}) \in (0, 1)$ and trait $\hat{k}\delta$ becomes dominant at time $s_{\hat{k}}$. Since $\hat{k}\delta > 3$, the dynamics of the exponents $\beta_\ell$ after time $s_{\hat{k}}$ is governed by the fitnesses given in (5.8).

Since $\hat{S}(\hat{k}\delta; \hat{k}\delta) < 0$, $\max_{0 \le \ell \le L} \beta_\ell(s) < 1$ for all $s > s_{\hat{k}}$ until the next change of dominant trait. Observe that the fitness of trait 0, $\hat{S}(0; \hat{k}\delta) = 3 - \tau$ is positive as long as $\hat{k}\delta$ is the dominant trait, and for any other dominant trait $\ell\delta$, we have

$$ \hat{S}(0; \ell\delta) = \begin{cases} 3 - \tau & \text{if } \ell \ge 1, \\ 3 & \text{if } \ell = 0. \end{cases} $$

So, as long as $\max_{0 \le \ell \le L} \beta_\ell(s) < 1$, $\beta_0(s)$ is increasing. This implies that there is necessarily re-emergence of some trait before the extinction of the population. Since in addition $\hat{S}(\ell\delta; \ell\delta) = 3 - \ell\delta < 0$ for all $\ell \ge \hat{k}$, the first re-emerging trait cannot be any of the traits $\ell\delta$ for $\ell \ge \hat{k}$. This ends the proof of (c). $\square$

## A Branching process in continuous time

The goal of this section and the next two ones is to give general results on specific branching or birth-and-death processes in one and two dimensions.

Here, we consider a single population $(Z_t^K, t \ge 0)$, following a linear birth and death process, i.e. a branching process, with individual birth rate $b \ge 0$, individual death rate $d \ge 0$ and initial value $Z_0^K = \lfloor K^\beta - 1 \rfloor \in \mathbb{N}$. The definition of $Z_0^K$ means that the population is extinct initially when $\beta = 0$, and that $Z_0^K \sim K^\beta$ when $K \to +\infty$ if $\beta > 0$. We denote the law of $Z^K$ by $BP_K(b, d, \beta)$. In the sequel, we set $r = b - d$.

**Lemma A.1** Let $Z^K$ follow the law $BP_K(b, d, \beta)$, where $b, d \ge 0$ and $\beta > 0$. Then the process $\left(\frac{\log(1+Z_t^K)}{\log K}, s \ge 0\right)$ converges in probability in $L^\infty([0, T])$ for all $T > 0$ to $((\beta + rs) \vee 0, s \ge 0)$ when $K$ tends to infinity.

In addition, if $b < d$, for all $t > \beta/r$,

$$ \lim_{K \to +\infty} \mathbb{P}(Z_t^K \log K = 0) = 1. \qquad (A.1) $$

**Proof** We divide the proof in several steps. We borrow ideas from [10].

**Step 1. Construction of a martingale.** The process writes

$$ Z_t^K = K^\beta + M_t^K + \int_0^t r Z_s^K ds, $$

where $M^K$ is a square integrable martingale with quadratic variation $\langle M^K \rangle_t = \int_0^t (b+d)Z_s^K ds$. Taking the expectation, we obtain $\mathbb{E}(Z_t^K) = K^\beta + \int_0^t r \mathbb{E}(Z_s^K) ds$, which gives that

$$ \mathbb{E}(Z_t^K) = K^\beta e^{rt}. \qquad (A.2) $$
Using Itô's formula, $1+e^{-rt}Z_t^K = 1+K^\beta+\widehat{M}_t^K$, where $\widehat{M}_t^K = \int_0^t e^{-rs}dM_s^K$ is a square integrable martingale with quadratic variation process

$$ \langle \widehat{M}^K \rangle_t = \int_0^t e^{-2rs} (b+d) Z_s^K ds. $$

Using Doob inequality, for any $0 < \eta < \beta$,

$$
\begin{align*}
\mathbb{P}\left(\sup_{t \le T \log K} |e^{-rt} Z_t^K - K^\beta| \ge K^\eta\right) &= \mathbb{P}\left(\sup_{t \le T \log K} |\widehat{M}_t^K| \ge K^\eta\right) \\
&\le 4K^{-2\eta} \mathbb{E}\left(\langle M^K \rangle_{T \log K}\right) \\
&= 4K^{-2\eta} \int_0^{T \log K} (b+d)e^{-2rs} K^\beta e^{rs} ds \\
&= 4K^{\beta-2\eta} (b+d) \begin{cases} \frac{1}{r}(1-K^{-rT}) & \text{if } b \ne d, \\ T \log K & \text{if } b = d. \end{cases} \tag{A.3}
\end{align*}
$$

**Step 2.** Case $r > 0$. Fix $T > 0$ and $\eta = 2\beta/3$. On the set

$$ \Omega_1^K = \left\{ \sup_{t \le T \log K} |e^{-rt} Z_t^K - K^\beta| \le K^{\frac{2\beta}{3}} \right\}, $$

whose probability tends to 1 by (A.3), we have:

$$
\begin{align*}
& \sup_{t \le T} \left| \frac{\log(1 + Z_{t \log K}^K)}{\log K} - (\beta + rt) \right| \\
&= \sup_{t \le T} \left| \frac{\log(1 + Z_{t \log K}^K)}{\log K} - \frac{\log(1 + K^{\beta+rt})}{\log K} + \frac{\log(1 + K^{\beta+rt})}{\log K} - \frac{\log(K^{\beta+rt})}{\log K} \right| \\
&\le \sup_{t \le T} \left[ \frac{1}{\log K} \left| \log \left( \frac{1 + Z_{t \log K}^K}{1 + K^{\beta+rt}} \right) \right| + \frac{\log(1 + K^{-\beta-rt})}{\log K} \right] \\
&\le \sup_{t \le T} \left[ \frac{1}{\log K} \left| \log \left( \frac{1 + Z_{t \log K}^K \vee K^{\beta+rt}}{1 + Z_{t \log K}^K \wedge K^{\beta+rt}} \right) \right| + \frac{K^{-\beta-rt}}{\log K} \right] \\
&= \sup_{t \le T} \left[ \frac{1}{\log K} \log \left( 1 + \frac{|Z_{t \log K}^K - K^{\beta+rt}|}{1 + Z_{t \log K}^K \wedge K^{\beta+rt}} \right) + \frac{K^{-\beta-rt}}{\log K} \right], \\
&\le \sup_{t \le T} \left[ \frac{1}{\log K} \frac{|Z_{t \log K}^K - K^{\beta+rt}|}{1 + K^{\beta+rt} - K^{\frac{2\beta}{3}+rt}} + \frac{K^{-\beta-rt}}{\log K} \right] \\
&\le \frac{K^{\frac{2\beta}{3}}}{\log K} \sup_{t \le T} \frac{K^{rt}}{K^{\beta+rt} - K^{\frac{2\beta}{3}+rt}} + \frac{K^{-\beta}}{\log K} \\
&\le \frac{2K^{-\frac{\beta}{3}} + K^{-\beta}}{\log K} \quad (\text{for } K \text{ large enough}),
\end{align*}
$$
which converges to zero when $K \to +\infty$.

A simple adaptation of the previous argument gives the same conclusion for $b = d$.

**Step 3.** Case $r < 0$. Since the function $t \mapsto \beta + rt$ vanishes at time $\beta/|r|$, we need to consider three phases. We fix $\varepsilon \in (0, \beta)$ and set $T_\varepsilon = \frac{\beta-\varepsilon}{|r|}$ and $\eta = \beta - \varepsilon/3$. First we prove that, before time $T_\varepsilon \log K$ the population size remains large enough to use the same argument as in Step 2. Second, the population gets extinct with high probability between time $T_\varepsilon \log K$ and $(T_\varepsilon + 2\varepsilon/|r|) \log K$ and third, in order to obtain the convergence for the $L^\infty$ norm, we prove that the supremum of the process on the this time interval remains of the order of $\varepsilon$. Since $\varepsilon$ can be chosen arbitrarily small, the result follows.

**Step 3(i).** On the set

$$ \Omega_2^K = \{ \sup_{t \le T_\varepsilon \log K} |e^{-rt} Z_t^K - K^\beta| \le K^{\beta - \frac{\varepsilon}{3}} \}, $$

whose probability tend to 1, we have:

$$ \begin{aligned} \sup_{t \le T_\varepsilon} \left| \frac{\log(1 + Z_t^K)}{\log K} - (\beta + rt) \right| &\le \sup_{t \le T_\varepsilon} \left[ \frac{1}{\log K} \frac{|Z_t^K - K^{\beta + rt}|}{1 + (K^{\beta + rt} - K^{\frac{2\beta}{3} + rt})_+} + \frac{K^{-\beta - rt}}{\log K} \right] \\ &\le \frac{K^{\beta - \frac{\varepsilon}{3}}}{\log K} \sup_{t \le T_\varepsilon} \frac{K^{rt}}{1 + (K^{\beta + rt} - K^{\frac{2\beta}{3} + rt})_+} + \frac{K^{-\varepsilon}}{\log K} \\ &\le \frac{2K^{-\frac{\varepsilon}{3}} + K^{-\varepsilon}}{\log K} \quad (\text{for } K \text{ large enough}), \end{aligned} $$

which also converges to zero when $K \to +\infty$.

**Step 3(ii).** It follows from the last step that, with probability converging to 1, $Z_{T_\varepsilon \log K}^K \le 2K^\varepsilon$. Remind from [18, Section 5.4.5, p. 180] that, if $T_{\text{ext}}$ denotes the extinction time of a $BP(b, d, 1)$,

$$ \mathbb{P}(T_{\text{ext}} > t) = \frac{re^{rt}}{be^{rt} - d}. \qquad (\text{A.4}) $$

Hence, for a $BP(b, d, 2K^\varepsilon)$ branching process,

$$ \mathbb{P}(T_{\text{ext}} > t) = 1 - \left(1 - \frac{re^{rt}}{be^{rt} - d}\right)^{2K^{\varepsilon}}. $$

Thus, for $t = \frac{2\varepsilon}{|r|} \log K$,

$$ \mathbb{P}\left(T_{\text{ext}} > \frac{2\varepsilon}{|r|} \log K\right) \sim 2 \frac{|r|}{d} K^{-\varepsilon} $$

as $K \to +\infty$. Since this goes to 0 when $K \to +\infty$, we have completed the proof of (A.1).

**Step 3(iii).** Since the last two steps were true for any value of $\varepsilon > 0$, in order to complete the proof, it is enough to check that

$$ \sup_{s \in [T_\varepsilon, T_\varepsilon + 2\varepsilon/|r|]} \frac{\log(1 + Z_{s \log K}^K)}{\log K} \le \frac{2d}{|r|} \varepsilon. $$
For this, we observe that the maximal size on the time interval $\log K \times [T_\epsilon, T_\epsilon + 2\epsilon/|r|]$ of the families stemming from each individual alive at time $T_\epsilon \log K$ is bounded by the size at time $\frac{2\epsilon \log K}{|r|}$ of a Yule process with birth rate $b$, i.e. a geometric random variable $G_i$ with expectation $K^{2b\epsilon/|r|}$, independently for each immigrant families. Hence, with probability converging to 1,

$$ \sup_{t \in [T_\epsilon, T_\epsilon + 2\epsilon/|r|]} Z_{t \log K}^K \le \sum_{i=1}^{2K^\epsilon} G_i \le K^{\frac{2d}{|r|}\epsilon}. $$

The proof is completed. □

## B Branching process with immigration

Our goal in this section is to extend the arguments of the previous section to include immigration.

We consider a linear birth and death process with immigration $(Z_t^K, t \ge 0)$ with law $BPI_K(b, d, a, c, \beta)$, where $Z_0^K = [K^\beta - 1]$ with $\beta \ge 0$, $b \ge 0$ is the individual birth rate, $d \ge 0$ the individual death rate and $K^c e^{as}$ is the immigration rate at time $s \ge 0$ with $a, c \in \mathbb{R}$.

With these notations, the generator of $Z^K$ at time $t \ge 0$ is given for bounded measurable functions $f$ by

$$ L_t f(n) = (bn + K^c e^{at}) (f(n+1) - f(n)) + dn (f(n-1) - f(n)). $$

Recall that $r = b - d$. We start with a first result in the case where the population does not go extinct (Theorem B.1) and a series of lemmas. Our general result on branching processes with immigration is Theorem B.5, whose proof combines similar ideas as for Lemma A.1.

**Theorem B.1 (Large population)** Assume that $c \le \beta$, $\beta > 0$. Then, for all $T > 0$ such that

$$ \inf_{t \in [0, T]} (\beta + rt) \vee (c + at) > 0, \qquad (B.1) $$

the process $(\frac{\log(1+Z_t^K)}{\log K}, 0 \le s \le T)$ converges when $K$ tends to infinity in probability in $L^\infty([0, T])$ to $((\beta + rs) \vee (c + as), s \in [0, T])$.

In the proofs of the main results of [10] and [4], similar asymptotic results on branching processes with immigration were proved. Our framework is more general since we consider cases where immigration is time-dependent ($a \ne 0$, contrary to [4]) and where growth can be driven by immigration ($a > r$, contrary to [10]). The results of these references are based on Doob's inequality. In our general case, this is not sufficient: we also need to make use of the maximal inequality for supermartingales [8, Ch. VI, p. 72] in the case $a > r$.

To motivate this result, let us first compute the expectation and variance of a $BPI_K(b, d, a, c, \beta)$ process. Note that this result is valid also if $c > \beta$.

**Lemma B.2** Assume that $(Z_t^K, t \ge 0)$ is a $BPI_K(b, d, a, c, \beta)$ process. Then, for all $t \ge 0$,

$$ x_t^K = \mathbb{E}(Z_t^K) = \begin{cases} \left(K^\beta - 1 + \frac{K^c}{r-a}\right) e^{rt} - \frac{K^c e^{at}}{r-a} & \text{if } r \ne a, \\ e^{rt}(K^\beta - 1 + K^c t) & \text{if } r = a \end{cases} \qquad (B.2) $$
and

$$
\mathrm{Var}(Z_t^K) = \begin{cases}
(b+d) \left(K^\beta - 1 + \frac{K^c}{r-a}\right) \frac{e^{2rt}-e^{rt}}{r} + K^c \left(1-\frac{b+d}{r-a}\right) \frac{e^{at}-e^{2rt}}{a-2r} & \text{if } r \neq a, \\
(b+d)(K^\beta - 1) \frac{e^{2rt}-e^{rt}}{r} + K^c \frac{e^{2rt}-e^{rt}}{r} + (b+d)K^c \frac{e^{2rt}-e^{rt}-rte^{rt}}{r^2} & \text{if } r=a \neq 0, \\
(K^c + 2b(K^\beta - 1))t + bK^c t^2 & \text{if } r=a=0 \quad (b=d),
\end{cases} \tag{B.3}
$$

where, in the first line, by convention $\frac{e^{2rt}-e^{rt}}{r} = t$ if $r=0$ and $\frac{e^{at}-e^{2rt}}{a-2r} = t$ if $a=2r$.

**Proof** The semimartingale decomposition of $Z^K$ is given by

$$
Z_t^K = Z_0^K + \int_0^t (rZ_s^K + K^c e^{as}) ds + M_t^K, \quad (B.4)
$$

where $M^K$ is a square integrable martingale with quadratic variation

$$
\langle M^K \rangle_t = \int_0^t ((b+d)Z_s^K + K^c e^{as}) ds. \quad (B.5)
$$

By a usual argument, the expectation $x(t) = \mathbb{E}(Z_t^K)$ solves the linear equation

$$
\dot{x}(t) = rx(t) + K^c e^{at} ; x(0) = K^\beta - 1
$$

whose solution is given by (B.2).

Itô's formula applied to $(Z_t^K)^2$ yields that $u(t) = \mathbb{E}((Z_t^K)^2)$ is solution to

$$
\dot{u}(t) = 2ru(t) + (2K^c e^{at} + b + d) x(t) + K^c e^{at} ; u(0) = (K^\beta - 1)^2.
$$

Straightforward computation in each case gives (B.3).

<figure><img src="image_6.png" /></figure>

We deduce from the last lemma that

$$
x_{t \log K}^K = \begin{cases} K^{rt}(K^\beta - 1) + \frac{K^{c+rt} - K^{c+at}}{r-a} & \text{if } r \neq a, \\ K^{rt}(K^\beta - 1) + K^{c+rt} \log K & \text{if } r = a, \end{cases}
$$

so that,

$$
\frac{\log(1 + x_{t \log K}^K)}{\log K} \sim \begin{cases} (\beta + rt) \lor (c + rt) \lor (c + at) & \text{if } \beta > 0 \\ (c + rt) \lor (c + at) & \text{if } \beta = 0 \end{cases}
$$

as $K \to +\infty$. Note that the expression (B.3) in the case $r \neq a$ can be written as

$$
\mathrm{Var}(Z_{t \log K}^K) = (b+d)(K^\beta - 1)\varphi_t(r) + K^c \varphi_t(a) + (b+d)K^c \frac{\varphi_t(r) - \varphi_t(a)}{r-a} \quad (B.6)
$$

where

$$
\varphi_t(x) = \frac{K^{xt} - K^{2rt}}{x - 2r}.
$$

Since $\varphi_t$ is nonnegative and nondecreasing for all $t \ge 0$, the three terms in the right-hand side of (B.6) are positive, so there is no compensation between these terms and hence

$$
\mathrm{Var}(Z_{t \log K}^K) \sim \begin{cases} CK^{\beta+(2r\vee r)t} \vee K^{c+(2r\vee r\vee a)t} & \text{if } \beta > 0, \\ CK^{c+(2r\vee r\vee a)t} & \text{if } \beta = 0. \end{cases}
$$
for a constant $C$ that may depend on $t$ but remains uniformly bounded and bounded away from $0$ for bounded values of $t \in \mathbb{R}_+$.

In several cases, we can compare the process with its expectation because the standard deviation $\text{Var}(Z_{t \log K}^K)^{1/2}$ is negligible compared with $x_{t \log K}^K$. One can easily check that this is always the case when $t > 0$ and $\beta > 0$ and $r \ge 0$ or when $\beta \ge 0$, $r \le 0$ and $(\beta+rt) \vee (c+(a \vee r)t) > 0$ or when $\beta = 0$, $r > 0$ and $c > 0$.

The proof of Theorem B.1 is based on martingales inequalities. We start by defining a martingale and computing its quadratic variation.

**Lemma B.3** The process

$$ \widetilde{M}_t^K := e^{-rt}(Z_t^K - x_t^K) \qquad (B.7) $$

is a martingale whose predictable quadratic variation process satisfies

$$ \begin{aligned} \mathbb{E}(\langle \widetilde{M}^K \rangle_{T \log K}) ={}& K^c \frac{K^{(a-2r)T}-1}{a-2r} + (b+d)(K^\beta-1) \frac{1-K^{-rT}}{r} \\ &+ (b+d) \times \begin{cases} \frac{K^c}{a-r} \left( \frac{K^{(a-2r)T}-1}{a-2r} - \frac{1-K^{-rT}}{r} \right) & \text{if } r \neq a \\ K^c \frac{1-K^{-rT}}{r^2} - K^c \frac{T \log(K) K^{-rT}}{r} & \text{if } r = a. \end{cases} \end{aligned} $$

**Proof** Recall the semi-martingale decomposition of $(Z_t^K)_{t \in \mathbb{R}_+}$ in (B.4) where the bracket of the martingale part is given in (B.5). It follows that $\widetilde{M}_t^K$ is a martingale with predictable quadratic variation process

$$ \langle \widetilde{M}^K \rangle_t = \int_0^t e^{-2rs} ((b+d)Z_s^K + K^c e^{as}) ds. \qquad (B.8) $$

Using (B.2), we have that

$$ \int_0^{T \log K} e^{-2rs} x_s^K ds = \begin{cases} (K^\beta - 1) \frac{1-K^{-rT}}{r} + \frac{K^c}{a-r} \left( \frac{K^{(a-2r)T}-1}{a-2r} - \frac{1-K^{-rT}}{r} \right) & \text{if } r \neq a \\ (K^\beta - 1) \frac{1-K^{-rT}}{r} + K^c \frac{1-K^{-rT}}{r^2} - K^c \frac{T \log(K) K^{-rT}}{r} & \text{if } r = a, \end{cases} $$

and Lemma B.3 follows. $\square$

**Proof of Theorem B.1**

Let us denote $\bar{\beta}_t = (\beta + rt) \vee (c + at)$. The proof extends ideas used to prove Lemma A.1. We give the proof in the case where $r \neq a$, $r \neq 0$ and $a \neq 2r$. The extension to the other cases can be easily deduced using comparison arguments.

We shall use two different martingale inequalities applied to $\widetilde{M}_t^K$. The first one is Doob's inequality: for any $0 < \eta < \beta$,

$$ \begin{aligned} \mathbb{P}\left(\sup_{t \le T \log K} |e^{-rt}(Z_t^K - x_t^K)| \ge K^\eta\right) ={}& \mathbb{P}\left(\sup_{t \le T \log K} |\widetilde{M}_t^K| \ge K^\eta\right) \\ \le{}& 4K^{-2\eta} \mathbb{E}(\langle M^K \rangle_{T \log K}) \\ \le{}& CK^{-2\eta} \times \begin{cases} K^{\beta \vee (\beta-rT) \vee (c+(a-2r)T)} & \text{if } r \neq a \\ K^{\beta \vee (\beta-rT)} \log K & \text{if } r = a, \end{cases} \end{aligned} \qquad (B.9) $$
where we used the fact that $c \le \beta$ in the last inequality. When $a > r$, we also apply the maximal inequality of [8, Ch. VI, p. 72] to the supermartingale $e^{-(a-r)t}\tilde{M}_t^K$:

$$ 
\begin{aligned}
K^{\eta} \mathbb{P} \left( \sup_{t \le T \log K} e^{-at} |Z_t^K - x_t^K| \ge K^{\eta} \right) &= K^{\eta} \mathbb{P} \left( \sup_{t \le T \log K} e^{-(a-r)t} |\tilde{M}_t^K| \ge K^{\eta} \right) \\
&\le 3 \sup_{t \le T \log K} e^{-(a-r)t} \left( \mathbb{E} \langle \tilde{M}_t^K \rangle \right)^{1/2}
\end{aligned}
$$

Using Lemma B.3, we deduce

$$ \mathbb{P} \left( \sup_{t \le T \log K} e^{-at} |Z_t^K - x_t^K| \ge K^{\eta} \right) \le 3CK^{-\eta} \sup_{t \le T} K^{-(a-r)t + \frac{\beta \vee (\beta - rt) \vee (c+(a-2r)t)}{2}} \quad (B.10) $$

**Step 1: Doob's inequality.** Fix $T$ satisfying (B.1). We consider first the case where we can find $\eta$ such that

$$ \frac{\beta \vee (\beta - rT) \vee (c + (a - 2r)T)}{2} < \eta < \beta. \quad (B.11) $$

Then, it follows from (B.9) that the probability of the event $\Omega_1^K$ converges to 1, where

$$ \Omega_1^K = \{ \sup_{t \le T \log K} |e^{-rt}(Z_t^K - x_t^K)| \le K^\eta \}. $$

On this event, a similar computation as in Step 2 of Lemma A.1 entails

$$ \sup_{t \le T} \left| \frac{\log(1 + Z_{t \log K}^K)}{\log K} - \bar{\beta}_t \right| \le \sup_{t \le T} \left[ \frac{1}{\log K} \frac{K^{-rt} |Z_{t \log K}^K - x_{t \log K}^K|}{K^{-rt} (x_{t \log K}^K \wedge Z_{t \log K}^K)} + \frac{\log (K^{-\bar{\beta}_t} (1 + x_{t \log K}^K))}{\log K} \right]. $$

Because of Lemma B.2, we observe that $\bar{\beta}_t$ has been chosen such that, for all $t \le T$,

$$ C^{-1} K^{\bar{\beta}_t} \le x_{t \log K}^K \le CK^{\bar{\beta}_t} \quad (B.12) $$

for some constant $C > 0$. Hence,

$$ \log (K^{-\bar{\beta}_t} (1 + x_{t \log K}^K)) \le \log(C + K^{-\bar{\beta}_t}) \le C', $$

where the last inequality follows from the assumption that $\inf_{t \le T} \bar{\beta}_t > 0$.

Hence, on the event $\Omega_1^K$,

$$ 
\begin{aligned}
\sup_{t \le T} \left| \frac{\log(1 + Z_{t \log K}^K)}{\log K} - \bar{\beta}_t \right| &\le \left[ \frac{K^{\eta}}{\log K} \sup_{t \le T} \frac{K^{rt}}{\left(x_{t \log K}^K - K^{\eta+rt}\right)_+} + \frac{C'}{\log K} \right] \\
&\le \left[ \frac{K^{\eta}}{\log K} \sup_{t \le T} \frac{2K^{rt}}{x_{t \log K}^K} + \frac{C'}{\log K} \right],
\end{aligned}
$$

where we used (B.12) and the fact that $K^{\eta+rt} = o(x_{t \log K}^K)$, since $\eta < \beta$. Hence,

$$ 
\begin{aligned}
\sup_{t \le T} \left| \frac{\log(1 + Z_{t \log K}^K)}{\log K} - \bar{\beta}_t \right| &\le C \left[ \frac{K^{\eta}}{\log K} K^{-[\beta \vee \inf_{t \le T} (c+(a-r)t)]} + \frac{1}{\log K} \right] \\
&\le C \left[ \frac{K^{\eta-\beta}}{\log K} + \frac{1}{\log K} \right].
\end{aligned}
\quad (B.13)
$$
**Case 1(a):** $r \ge 0$ and $a \le 2r$. In this case, the constraint (B.11) becomes $\beta/2 < \eta < \beta$, hence we can choose $\eta = 3\beta/4$ for any value of $T$ (note that (B.1) is always satisfied here). Hence (B.13) implies that $\sup_{t \le T} \left| \frac{\log(1+Z_{t \log K}^K)}{\log K} - \bar{\beta}_t \right|$ converges to 0 on the event $\Omega_1^K$.

**Case 1(b):** $r < 0$ and $a \le r$. In this case, Assumption (B.1) is equivalent to $\inf_{t \le T}(\beta + rt) > 0$, i.e. $T < \beta/|r|$. Since $c + (a - 2r)T \le \beta - rT + (a - r)T \le \beta - rT < 2\beta$, it is possible to find $\eta$ such that

$$ \frac{\beta \vee (\beta - rT) \vee (c - (r \wedge (2r - a))T)}{2} = \frac{\beta - rT}{2} < \eta < \beta $$

and (B.13) allows again to conclude.

**Case 1(c):** $r \ge 0$ and $a > 2r$. In this case, (B.11) is satisfied provided $T$ is such that $c + (a - 2r)T < 2\beta$, i.e. $T < T^* := \frac{2\beta - c}{a - 2r}$. Let us observe that the two lines $\beta + rt$ and $c + at$ intersect at time $t^* = \frac{\beta - c}{a - r}$, and in our case, $T^* > t^*$ since $a\beta > rc$. Therefore, we can apply the computation (B.13) to $T \in (t^*, T^*)$ to obtain the convergence of $\sup_{t \le T} \left| \frac{\log(1+Z_{t \log K}^K)}{\log K} - \bar{\beta}_t \right|$ to 0. We explain below (in step 3) how to conclude for any value of $T$ satisfying (B.1).

**Case 1(d):** $r < 0$, $a > r$ and $c + a\beta/|r| \le 0$. In this case, $\beta + rt \ge c + at$ for all $t \le \beta/|r|$ and hence Assumption (B.1) is satisfied if and only if $T < \beta/|r|$. For such $T$, (B.11) is satisfied since $c + (a - 2r)T < c + (a - 2r)\frac{\beta}{|r|} = 2\beta + c + a\frac{\beta}{|r|} \le 2\beta$.

**Case 1(e):** $r < 0$, $a > r$ and $c + a\beta/|r| > 0$. In this case, Condition (B.11) is satisfied provided $T < T^* = \frac{\beta}{|r|} \wedge \frac{2\beta - c}{a - 2r}$. Since $a\beta > rc$, we actually have $T^* = \frac{2\beta - c}{a - 2r}$. In addition, if we define $t^* = \frac{\beta - c}{a - r}$ the first time where the line $\beta + rt$ intersects the line $c + at$, we can see exactly as in Case 1(c) that $T^* > t^*$. Hence, we can apply the computation (B.13) to $T \in (t^*, T^*)$ to obtain the convergence of $\sup_{t \le T} \left| \frac{\log(1+Z_{t \log K}^K)}{\log K} - \bar{\beta}_t \right|$ to 0. We explain below (in step 3) how to conclude for any value of $T$ satisfying (B.1).

**Step 2: maximal inequality.** We restrict here to the case $\beta = c$ and $a > r$. In this case,

$$ \sup_{t \le T} \frac{(\beta - 2(a - r)t) \vee (\beta - (2a - r)t) \vee (c - at)}{2} = \sup_{t \le T} \frac{(\beta - 2(a - r)t) \vee (\beta - at)}{2} \\ = \sup_{t \le T} \frac{\beta - at}{2} = \frac{\beta \vee (\beta - aT)}{2}, $$

where the second equality comes from the fact that the maximum of $\beta - 2(a - r)t$ is attained for $t = 0$, and the function $\beta - at$ takes the same value at time $t = 0$. Assuming

$$ \frac{\beta \vee (\beta - aT)}{2} < \eta < \beta, \qquad (B.14) $$

it follows from (B.10) that the probability of the event $\Omega_2^K$ converges to 1, where

$$ \Omega_2^K = \{ \sup_{t \le T \log K} |e^{-at}(Z_t^K - x_t^K)| \le K^\eta \}. $$
On this event, a similar computation as in Case 1 entails

$$ \sup_{t \le T} \left| \frac{\log(1 + Z_{t \log K}^K)}{\log K} - \bar{\beta}_t \right| \le \left[ \frac{K^\eta}{\log K} \sup_{t \le T} \frac{K^{at}}{\left(x_{t \log K}^K - K^{\eta+at}\right)_+} + \frac{C'}{\log K} \right] \\ \le \left[ \frac{K^\eta}{\log K} \sup_{t \le T} \frac{2K^{at}}{x_{t \log K}^K} + \frac{C'}{\log K} \right] \le C \left[ \frac{K^{\eta-\beta}}{\log K} + \frac{1}{\log K} \right], $$

where we used the fact that $K^{\eta+at} = o(K^{\beta+at})$, since $\eta < \beta$ and that $x_{t \log K}^K \ge CK^{\beta+(a\vee r)t} = CK^{\beta+at}$ since $c = \beta$.

**Case 2(a):** $c = \beta$, $a > r$ and $a \ge 0$. In this case, we can choose any $\eta \in (\beta/2, \beta)$ and deduce the convergence of $\sup_{t \le T} \left| \frac{\log(1+Z_{t \log K}^K)}{\log K} - \bar{\beta}_t \right|$ to 0.

**Case 2(b):** $c = \beta$, $a > r$ and $a < 0$. In this case, Assumption (B.1) is equivalent to $\inf_{t \le T}(\beta + (a \vee r)t) = \inf_{t \le T}(\beta + at) > 0$, which is satisfied if and only if $T < \beta/|a|$. Now, for such $T$, one can find $\eta$ satisfying (B.14), so we can again conclude.

**Step 3: gluing parts together.** The remaining cases not covered by the previous steps are

* $r \ge 0$, $a > 2r$, $c < \beta$ and $T \ge T^* = \frac{2\beta-c}{a-2r}$;

* $r < 0$, $a > r$, $c < \beta$, $c + \frac{a\beta}{|r|}$ and $T \ge T^* = \frac{2\beta-c}{a-2r}$.

In both cases, we recall that $T^* > t^*$, where $t^*$ is the first time where $\beta + rt$ crosses $c + at$. So we can fix $T_1 \in (t^*, T^*)$ and apply Case 1(c) or Case 1(e) of Step 1 to obtain the convergence in probability in $L^\infty([0, T_1])$ of $\log(1 + Z_{t \log K}^K)/\log K$ to $\bar{\beta}_t = (\beta + rt) \vee (c + at)$. In particular, for all $\varepsilon > 0$, on an event $\Omega_3^K$ with probability converging to 1, $K^{c+aT_1-\varepsilon} \le Z_{T_1 \log K}^K \le K^{c+aT_1+\varepsilon}$ for $K$ large enough.

Now, on $\Omega_3^K$, standard coupling arguments show that, for all $t \ge 0$, $\hat{Z}_t^K \le Z_{T_1 \log K+t}^K \le \bar{Z}_t^K$, where $\hat{Z}_t^K$ is a $BPI_K(b, d, a, c+aT_1-\varepsilon, c+aT_1-\varepsilon)$ and $\bar{Z}_t^K$ is a $BPI_K(b, d, a, c+aT_1+\varepsilon, c+aT_1+\varepsilon)$. Hence, we can apply Case 2(a) or 2(b) of Step 2 to $\hat{Z}_t^K$ and $\bar{Z}_t^K$ to obtain the convergence of $\log(1 + \hat{Z}_{t \log K}^K)/\log K$ to $c - \varepsilon + a(T_1+t)$ and of $\log(1 + \bar{Z}_{t \log K}^K)/\log K$ to $c + \varepsilon + a(T_1+t)$ on $[0, T - T_1]$. Note that, in the case where $a < 0$, Assumption (B.1) requires that $T < c/|a|$. We can choose $\varepsilon > 0$ small enough to have $T < (c - \varepsilon)/|a|$. In this case, we have $T - T_1 < \frac{c+aT_1-\varepsilon}{|a|}$, so we can indeed apply Case 2(b) to $\hat{Z}_t^K$ on the time interval $[0, T - T_1]$.

Since $\varepsilon > 0$ is arbitrary, the Markov property allows to conclude. $\square$

Our next goal is to extend Theorem B.1 to the case where $\beta = 0$ or $\beta > 0$ without assuming (B.1) nor $c \le \beta$.

We first consider the case where $c > \beta$ in Lemma B.4. It shows that the population instantaneously (on the time scale $\log K$) reaches a population size of order $K^c$. We can use the Markov property at time $\varepsilon \log K$ and comparison techniques in a similar way as in Step 3 of Theorem B.1 to reduce the problem to the case $c \le \beta$.
**Lemma B.4 (Initial growth for strong immigration)** Assume that $\beta < c$. Then, for all $\varepsilon > 0$ and all $\bar{a} > |r| \vee |a|$,

$$ \lim_{K \to +\infty} \mathbb{P} (Z_{\varepsilon \log K}^K \in [K^{c-\bar{a}\varepsilon}, K^{c+\bar{a}\varepsilon}]) = 1. $$

**Proof** We give the proof in the case where $r \neq a$, $r \neq 0$ and $a \neq 2r$. The extension to the other cases is straightforward. Using Lemma B.2, there exists a positive constant $C$ such that

$$ C^{-1} K^{c-\varepsilon} (|r|^{\vee}|a|) \leq \mathbb{E}(Z_{\varepsilon \log K}^K) \leq CK^{c+\varepsilon} (|r|^{\vee}|a|) $$

and $\mathrm{Var}(Z_{\varepsilon \log K}^K) \leq CK^{c+(2|r|^{\vee}|a|)\varepsilon}$. The result follows from Chebyshev's inequality. $\square$

Let us now state our general result with $c \leq \beta$.

**Theorem B.5** Let $(Z_t^K, t \geq 0)$ be a BPI$_K(b, d, a, c, \beta)$ process with $c \leq \beta$ and assume either $\beta > 0$ or $c \neq 0$. The process $(\frac{\log(1+Z_t^K)}{\log K}, t > 0)$ converges when $K$ tends to infinity in probability in $L^\infty([0, T])$ for all $T > 0$ to the continuous deterministic function $\bar{\beta}$ given by

(i) if $\beta > 0$, $\bar{\beta} : t \mapsto (\beta + rt) \vee (c + at) \vee 0$;

(ii) if $\beta = 0$, $c < 0$ and $a > 0$, $\bar{\beta} : t \mapsto ((r \vee a)(t - |c|/a)) \vee 0$;

(iii) if $\beta = 0$, $c < 0$ and $a \leq 0$, $\bar{\beta} : t \mapsto 0$.

Note that, in case (i), when $r \geq 0$, one can remove $\vee 0$ from the definition of $\bar{\beta}_t$.

In addition, in the case where $c \neq 0$ or $a \neq 0$, for all compact interval $I \subset \mathbb{R}_+$ which does not intersect the support of $\bar{\beta}$,

$$ \lim_{K \to +\infty} \mathbb{P} (Z_{t \log K}^K = 0, \forall t \in I) = 1. \qquad (B.15) $$

The case $\beta = c = 0$ could be deduced from the previous result using comparison argument, but is not useful here.

<figure><img src="image_7.png" /><figcaption>(a): $c < \beta = 0, 0 < a < r$</figcaption></figure>

<figure><img src="image_8.png" /><figcaption>(b): $0 < c < \beta, r < a < 0$</figcaption></figure>

<figure><img src="image_9.png" /><figcaption>(c): $c < 0 < \beta, r < 0 < a$</figcaption></figure>

**Figure B.1:** Illustration of Theorem B.5. (a): Initially $\bar{\beta} = 0$, but thanks to immigration, the population is revived. Once this happens, the growth rate $r$ being larger than $a$, immigration have a negligible effect after time $|c|/a$. (b): After time $(\beta - c)/(a - r)$, the dynamics is driven by mutation before getting extinct when $\bar{\beta}_t = 0$. (c): We observe a local extinction before the population is revived thanks to incoming mutations.
**Remark B.6** Note that point (i) in Theorem B.5 means that, at least for small $t > 0$, either $\beta = c$ and then $\bar{\beta}(t) = \beta + (r \vee a)t$ or $\beta > c$ and then $\bar{\beta}(t) = \beta + rt$. This explains Equation (2.9) in Corollary 2.4.

**Proof** The proof combines Theorem B.1 with a series of lemmas and extensive use of the Markov property. The proofs of the lemmas are given at the end of the section.

**Proof of (iii).** Theorem B.5 (iii) follows directly from the next lemma. Note that it also proves that (B.15) holds true in case (iii) for all $I \subset [0, T]$.

**Lemma B.7 (Non emergence of any new population)** Assume that $\beta = 0$ and $c < 0$. Let us consider $T > 0$ such that $-|c| + aT < 0$. Then:

$$ \lim_{K \to +\infty} \mathbb{P} \left( Z_t^K = 0, \forall t \le T \log K \right) = 1. \qquad (B.16) $$

**Proof of (ii).** We need to combine Theorem B.1 and Lemma B.7 with the next two lemmas.

**Lemma B.8 (Emergence of a new population)** Assume that $\beta = 0$, that $c = -\epsilon$ with $\epsilon > 0$ and that $a > 0$ (so that the immigration rate starts being positive at time $t_0 = \frac{\epsilon}{a} \log K$). Then, for all $\eta > (1 \vee \frac{2r}{a})\epsilon$,

$$ \lim_{K \to +\infty} \mathbb{P} \left( K^{\epsilon/2} - 1 \le Z_{\frac{2\epsilon}{a} \log K}^{K} \le K^{\eta} - 1 \right) = 1. \qquad (B.17) $$

The second lemma is valid for all values of $c \le \beta$, $r$ and $a$. It gives uniform estimates on the modulus of continuity of $\log(1 + Z_{t \log K}^K)/\log K$.

**Lemma B.9 (continuity of the exponent)** Let $(Z_t^K, t \ge 0)$ be a $BPI_K(b, d, a, c, \beta)$ with $c \le \beta$. Then, there exists a constant $\bar{c} = \bar{c}(b, d, a)$ such that, for all $\epsilon > 0$,

$$ \lim_{K \to +\infty} \mathbb{P} \left( \forall t \in [0, \epsilon \log K], K^{\beta - \bar{c}\epsilon} - 1 \le Z_t^K \le K^{\beta + \bar{c}\epsilon} - 1 \right) = 1. $$

We proceed as follows. Fix $\epsilon > 0$ and apply Lemma B.7 on the time interval $[0, t_1]$ with $t_1 = |c|/a - \epsilon$. We deduce that

$$ \frac{\log(1 + Z_{t \log K}^K)}{\log K} = 0, \quad \forall t \in [0, t_1] \qquad (B.18) $$

on an event $\Omega_1^K$ with probability converging to 1 and, since $\bar{\beta}_t = 0$ if and only if $t \le |c|/a$, (B.15) is proved in case (ii). Applying the Markov property at time $t_1 \log K$ on $\Omega_1^K$. Since $Z_{t_1 \log K}^K = 0$ and $c + at_1 < 0$, we can apply Lemma B.8 to deduce that

$$ \frac{\log(1 + Z_{(t_1+\delta\epsilon)\log K}^K)}{\log K} \in (c\epsilon, \bar{c}\epsilon) $$

with probability converging to 1 for constants $\delta, c > 0$ and $\bar{c} < \infty$ independent of $\epsilon$ and $K$. In addition, Lemma B.9 implies that, with probability converging to 1,

$$ \sup_{t \in [t_1, t_1 + \delta\epsilon]} \frac{\log(1 + Z_{t \log K}^K)}{\log K} \le \bar{c}'\epsilon \qquad (B.19) $$
for a constant $\bar{c}' > \bar{c}$ independent of $\varepsilon$ and $K$.

Using the comparison trick of Step 3 of the proof of Theorem B.1 after time $(t_1+\delta) \log K$, we can then apply Theorem B.1 to prove that, with probability converging to 1, for all $t \in [t_1+\delta\varepsilon, T]$,

$$ \begin{aligned} \underline{c}\varepsilon + (r \lor a)(t - t_1 - \delta\varepsilon) &\le \liminf_{K \to +\infty} \frac{\log(1 + Z_t^K \log K)}{\log K} \\ &\le \limsup_{K \to +\infty} \frac{\log(1 + Z_t^K \log K)}{\log K} \le \bar{c}\varepsilon + (r \lor a)(t - t_1 - \delta\varepsilon). \end{aligned} \quad (B.20) $$

We conclude combining (B.18), (B.19) and (B.20) and letting $\varepsilon \to 0$.

**Proof of (i).** Note that, when $r \ge 0$, Point (i) has been already proved in Theorem B.1. Similarly, if $r < 0$, $a \ge 0$ and $c + a\beta/|r| > 0$, Point (i) also follows directly from Theorem B.1. In these two cases, (B.15) is also trivial. We divide our study of the remaining cases in four.

**Case (a):** $r < 0$, $a < 0$ or $r < 0$, $a = 0$ and $c < 0$. In this case, we combine the previous lemmas with the next one, similarly to the proof of (ii). Note that we need to use Lemma B.10 (i) if $c + a\beta/|r| < 0$, Lemma B.10 (ii) if $c + a\beta/|r| > 0$. If $c + a\beta/|r| = 0$, we use a comparison between $Z^K$ and a $BPI_K(b, d, a, c - \varepsilon, \beta)$ and a $BPI_K(b, d, a, c + \varepsilon, \beta \lor (c + \varepsilon))$, for which the previous cases apply, and let $\varepsilon \to 0$.

**Lemma B.10 (Extinction) Assume that $r < 0$**.

(i) Assume also that $c < 0$ and $c + a\beta/|r| < 0$. Then for all $\eta > 0$ small enough,

$$ \lim_{K \to +\infty} \mathbb{P} \left( \forall t \in \left[ \left( \frac{\beta}{|r|} + \eta \right) \log K, \left( \frac{\beta}{|r|} + 2\eta \right) \log K \right], Z_t^K = 0 \right) = 1. \quad (B.21) $$

(ii) Assume also that $c + a\beta/|r| > 0$ and $a < 0$. Then for all $\eta > 0$ and $T > \eta$,

$$ \lim_{K \to +\infty} \mathbb{P} \left( \forall t \in \left[ \left( \frac{c}{|a|} + \eta \right) \log K, \left( \frac{c}{|a|} + T \right) \log K \right], Z_t^K = 0 \right) = 1. \quad (B.22) $$

**Case (b):** $r < 0$, $a > 0$, $c < 0$ and $\frac{\beta}{|r|} < \frac{|c|}{a}$. This corresponds to Figure B.1 (c). In this case, we combine as above Theorem B.1, Lemma B.10, Lemma B.7 and Lemma B.8.

**Case (c):** $r < 0$, $a > 0$, $c < 0$ and $\frac{\beta}{|r|} = \frac{|c|}{a}$. This can be treated using comparisons between $Z_t^K$ and $BPI_K(b, d, a, c - \varepsilon, \beta)$ and $BPI_K(b, d, a, c + \varepsilon, \beta \lor (c + \varepsilon))$ and letting $\varepsilon \to 0$.

**Case (d):** $r < 0$, $c = a = 0$. This can be treated using comparisons between $Z_t^K$ and $BPI_K(b, d, 0, -\varepsilon, \beta)$ and $BPI_K(b, d, 0, \varepsilon, \beta \lor \varepsilon)$ and letting $\varepsilon \to 0$. $\square$

**Proof of Lemma B.7.** Since the rate of immigration is upper bounded by $K^{c\vee(c+aT)}$ on $[0, T \log K]$, the probability that a migrant arrives during this time interval is upper bounded by $TK^{c\vee(c+aT)} \log K$ which tends to 0 when $K \to +\infty$. The lemma is proved. $\square$

**Proof of Lemma B.8.** The number of immigrant families which arrived during the time interval $[0, \frac{2\varepsilon}{a} \log K]$ and which survived up to time $\frac{2\varepsilon}{a} \log K$ is, by thinning, a Poisson random variable with parameter

$$ \lambda = \int_{0}^{\frac{2\varepsilon}{a} \log K} K^{-\varepsilon} e^{at} \frac{r K^{\frac{2r\varepsilon}{a}} e^{-rt}}{bK^{\frac{2r\varepsilon}{a}} e^{-rt} - d} dt. $$
This formula is obtained by (A.4), where the probability of keeping a family immigrated at time $t$ is the fraction in the above expression.

In the case where $r \ge 0$,

$$ \lambda \ge \frac{r}{b} \int_{0}^{\frac{2\epsilon}{a} \log K} K^{-\epsilon} e^{at} dt \ge \frac{rK^{\epsilon}}{2ab}. $$

In the case where $r < 0$,

$$ \lambda \ge \frac{d-b}{d} K^{\frac{2r\epsilon}{a}-\epsilon} \int_{0}^{\frac{2\epsilon}{a} \log K} e^{(a+|r|)t} dt \ge \frac{|r|K^{\epsilon}}{2d(a+|r|)}. $$

Therefore,

$$ \lim_{K \to +\infty} \mathbb{P} \left( Z_{\frac{2\epsilon}{a} \log K}^{K} \ge K^{\epsilon/2} \right) = 1. $$

For the upper bound, it follows from (B.2) that

$$ \mathbb{E} \left( Z_{\frac{2\epsilon}{a} \log K}^{K} \right) \le \begin{cases} \frac{K^{\epsilon}}{a-r} & \text{if } r < a, \\ \frac{4\epsilon}{a} K^{\epsilon} \log K & \text{if } r = a, \\ \frac{K^{\frac{2r\epsilon}{a}}}{r-a} & \text{if } r > a. \end{cases} $$

Therefore, (B.17) follows from Markov's inequality and the choice $\eta > (1 \vee \frac{2r}{a})\epsilon$. $\square$

**Proof of Lemma B.9.** The number of immigrant families which arrive during the time interval $[0, \epsilon \log K]$ and which survive up to time $\epsilon \log K$ is a Poisson random variable with parameter

$$ \lambda \le \int_{0}^{\epsilon \log K} K^c e^{at} dt \le K^{\beta} \frac{K^{(|a|+1/2)\epsilon}}{|a| + 1/2}. $$

The maximal size of each families (immigrant or present at time 0) on the time interval $[0, \epsilon \log K]$ is bounded by the size at time $\epsilon \log K$ of a Yule process with birth rate $b$, i.e. a geometric random variable $G_i$ with parameter $K^{b\epsilon}$, independently for each immigrant families. Hence, with probability converging to 1,

$$ \sup_{t \in [0, \epsilon \log K]} Z_t^K \le \sum_{i=1}^{K^{\beta + (|a| + 3/4)\epsilon}} G_i \le K^{\beta + (|a| + 1 + b)\epsilon} \quad (B.23) $$

For the lower bound, we observe that $Z_t^K$ is bigger than a linear pure death process $BP(0, d, \beta)$. For each of the $[K^\beta - 1]$ initial individuals, the probability of survival up to time $\epsilon \log K$ is $K^{-d\epsilon}$, hence, with probability converging to 1, $\inf_{t \in [0, \epsilon \log K]} Z_t^K \ge K^{\beta - 2d\epsilon}$. Hence the lemma is proved with $\bar{c} = (2d) \vee (|a| + b + 1)$. $\square$

**Proof of Lemma B.10.** We first prove (i). Using the same argument as in the proof of Lemma B.7, we can prove that the probability of the event $\Gamma$ that a migrant arrives during the time interval $[0, T \log K]$ converges to 0. Therefore, on the complementary event $\Gamma^c$ and on this
time interval, the process $Z^K$ is a $BP(b, d, K^\beta)$ and, using (A.4), its extinction time $T_{\text{ext}}$ satisfies, for all $t \le T \log K$,

$$ \mathbb{P}(T_{\text{ext}} > t; \Gamma^c) \le 1 - \left(1 - \frac{re^{rt}}{be^{rt} - d}\right)^{K^\beta} . $$

Thus, for $t = \eta \log K$ with $\eta > \beta/|r|$, there exists a constant $C$ such that

$$ \mathbb{P}(T_{\text{ext}} > \eta \log K) \le \mathbb{P}(\Gamma) + C K^{-|r|\eta+\beta} \xrightarrow[K \to +\infty]{} 0. $$

Now, let us prove (ii). Using the Markov property and Theorem B.1, we can assume without loss of generality that $c \le \beta < \eta|r|/4$. Note that assuming $c + a\beta/|r| > 0$ implies that $a > r$. In addition, we can prove as above that, with a probability converging to 1, there is no new immigrant arriving in the population between times $(c/|a| + \eta/2) \log K$ and $(c/|a| + T) \log K$. Hence we only need to check that all the families that descend from each of the individuals initially present in the population and of all immigrants which arrive before time $(c/|a| + \eta/2) \log K$ are extinct before time $(c/|a| + \eta) \log K$. Using (A.4), each of these families has a probability to survive longer than a time $(\eta/2) \log K$ which is smaller than $2K^{-\eta|r|/2}$ (for $K$ large enough). Since the number of these families is equal to $K^\beta$ plus a Poisson random variable of parameter $K^c \int_0^{(c/|a|+\eta/2) \log K} e^{as} ds \le K^c/a$, we deduce that it is smaller that $K^{\eta r/3}$ with probability converging to 1. Hence, on this event, the probability that at least one of these families survives up to time $(c/|a| + \eta) \log K$ is smaller than

$$ \left(1 - 2K^{-\eta|r|/2}\right)^{K^{\eta r/3}} \xrightarrow[K \to 0]{} 0. $$

This concludes the proof of Lemma B.10. $\square$

# C Logistic birth and death process with immigration

## C.1 One-dimensional case

We consider here a one-dimensional logistic birth and death process with individual birth rate $b$ and individual death rate $d+Ck/K$ when the population size is $k$ and immigration at predictable rate $\gamma(t) \ge 0$ at time $t$. We denote by $LBDI_K(b, d, C, \gamma)$ the law of this process. We consider a specific initial condition in the next result. Recall that $r = b - d$.

**Lemma C.1** Assume that $(Z_t^K, t \ge 0)$ follows the law $LBDI_K(b, d, C, \gamma)$ with $b > d$. Let $s_0 > 0$ and assume that $\gamma(t) \le K^{1-a}$ for all $t \in [0, s_0 \log K]$ for some $a > 0$.

(i) If $\frac{Z_0^K}{K} \in [\frac{r}{C} - \varepsilon, \frac{r}{C} + \varepsilon]$ for some $\varepsilon > 0$, then

$$ \lim_{K \to +\infty} \mathbb{P} \left( \forall t \in [0, s_0 \log K], \frac{Z_t^K}{K} \in \left[ \frac{r}{C} - 2\varepsilon, \frac{r}{C} + 2\varepsilon \right] \right) = 1. $$

(ii) For all $\varepsilon, \varepsilon' > 0$, there exists $T(\varepsilon, \varepsilon') < +\infty$ such that for all initial condition $\frac{Z_0^K}{K} \ge \varepsilon$ we have that

$$ \lim_{K \to +\infty} \mathbb{P} \left( \frac{Z_{T(\varepsilon, \varepsilon')}^K}{K} \in \left[ \frac{r}{C} - 2\varepsilon', \frac{r}{C} + 2\varepsilon' \right] \right) = 1. $$
**Proof** This result is related to the problem of exit from a domain of [Freidlin-Wentzell] and can be proved with standard arguments as in [5, 7]. The only difficulty comes from the additional immigration rate (smaller than $K^{1-a}$ for all $t \in [0, s_0 \log K]$), which is negligible with respect to the reproduction rate (of order $K$), but this can be handled for example adapting the proof of [6, Prop. 4.2]. □

## C.2 Two-dimensional case

### C.2.1 Transfer birth-death process with immigration

We consider a two-dimensional transfer process with immigration $(Y_t^K, Z_t^K)_{t \ge 0}$, with transition rates from $(n, m) \in \mathbb{N}^2$ to

$$ 
\begin{aligned}
(n+1, m) \text{ with rate } &nb_1^K(\omega, t) + \gamma_1^K(\omega, t), \\
(n-1, m) \text{ with rate } &nd_1^K(\omega, t), \\
(n, m+1) \text{ with rate } &mb_2^K(\omega, t) + \gamma_2^K(\omega, t), \\
(n, m-1) \text{ with rate } &md_2^K(\omega, t), \\
(n-1, m+1) \text{ with rate } &\tau^K(\omega, t) \frac{nm}{n+m},
\end{aligned}
$$

with $C > 0$ and predictable rates $\tau^K, b_i^K, d_i^K, \gamma_i^K: \Omega \times \mathbb{R}_+ \to \mathbb{R}_+$. Remark that transfer only occurs from population $Y^K$ to population $Z^K$. We denote by $TBDI_K(b_1^K, d_1^K, b_2^K, d_2^K, \tau^K, \gamma_1^K, \gamma_2^K)$ the law of $(Y^K, Z^K)$.

**Lemma C.2** Fix $\beta > 0$ and assume that $(Y_t^K, Z_t^K)_{t \ge 0}$ follows the law $TBDI_K(b_1^K, d_1^K, b_2^K, d_2^K, \tau^K, \gamma_1^K, \gamma_2^K)$ and that there exist constants $b_1, d_1, b_2, d_2, \tau > 0$ such that for some $s_0 > 0$,

$$ 
\sup_{t \in [0, s_0 \log K]} \|b_1^K(t) - b_1\| + \|b_2^K(t) - b_2\| + \|d_1^K(t) - d_1\| + \|d_2^K(t) - d_2\| \\ 
+ \|\tau^K(t) - \tau\| \xrightarrow[K \to +\infty]{} 0 \quad (C.1)
$$

in probability and $\gamma_1^K(t) + \gamma_2^K(t) \le K^{\beta-a}$ for all $t \in [0, s_0 \log K]$ for some $a > 0$. Let $S := r_2 - r_1 + \tau$.

(i) Assume $S > 0$, that $Y_0^K \ge K^\beta$ and that $\eta Y_0^K < Z_0^K < Y_0^K$ for some $\eta > 0$. Then, there exists $\rho > 0$ such that for $s \in (0, s_0)$ small enough,

$$ 
\lim_{K \to +\infty} \mathbb{P} (Y_{s \log K}^K \le K^{-s\rho} Z_{s \log K}^K) = 1. \quad (C.2)
$$

(ii) Assume $S < 0$, that $Z_0^K \ge K^\beta$ and that $\eta Z_0^K < Y_0^K < Z_0^K$ for some $\eta > 0$. Then, there exists $\rho > 0$ such that for $s \in (0, s_0)$ small enough,

$$ 
\lim_{K \to +\infty} \mathbb{P} (Z_{s \log K}^K \le K^{-s\rho} Y_{s \log K}^K) = 1. \quad (C.3)
$$

Lemma C.2 (i) says that, if the population $Y^K$ is initially dominant and if the population $Z^K$ has a positive fitness and is initially not negligible, after a short time on the time-scale $\log K$, $Y^K$ becomes negligible with respect to $Z^K$. For the proof, we refer to Lemma C.3 (iii).
### C.2.2 Logistic transfer birth-death process with immigration

We consider a two-dimensional logistic transfer process with immigration $(Y_t^K, Z_t^K)_{t \ge 0}$, with transition rates from $(n, m) \in \mathbb{N}^2$ to

$$
\begin{align*}
(n+1, m) \text{ with rate } nb_1^K(\omega, t) + \gamma_1^K(\omega, t), \\
(n-1, m) \text{ with rate } n \left[d_1^K(\omega, t) + \frac{C}{K}(n+m)\right], \\
(n, m+1) \text{ with rate } mb_2^K(\omega, t) + \gamma_2^K(\omega, t), \\
(n, m-1) \text{ with rate } m \left[d_2^K(\omega, t) + \frac{C}{K}(n+m)\right], \\
(n-1, m+1) \text{ with rate } \tau^K(\omega, t) \frac{nm}{n+m},
\end{align*}
$$

with $C > 0$ and predictable rates $\tau^K, b_i^K, d_i^K, \gamma_i^K : \Omega \times \mathbb{R}_+ \to \mathbb{R}_+$. Remark that transfer only occurs from population $Y^K$ to population $Z^K$.

We denote by $LTBDI_K(b_1^K, d_1^K, b_2^K, d_2^K, C, \tau^K, \gamma_1^K, \gamma_2^K)$ the law of $(Y^K, Z^K)$.

**Lemma C.3 (Competition)** Assume that $(Y_t^K, Z_t^K)_{t \ge 0}$ follows the law $LTBDI_K(b_1^K, d_1^K, b_2^K, d_2^K, C, \tau^K, \gamma_1^K, \gamma_2^K)$ and that there exist constants $b_1, d_1, b_2, d_2, \tau > 0$ such that for some $s_0 > 0$, the convergence (C.1) is satisfied and $\gamma_1^K(t) + \gamma_2^K(t) \le K^{1-a}$ for all $t \in [0, s_0 \log K]$ for some $a > 0$.

(i) Assume that $r_1 := b_1 - d_1 > 0$, $r_2 := b_2 - d_2 > 0$, $S := r_2 - r_1 + \tau > 0$ and $\frac{Y_0^K}{K} \in [\frac{r_1}{C} - \varepsilon, \frac{r_1}{C} + \varepsilon]$ for some $\varepsilon > 0$ and $\frac{Z_0^K}{K} \ge m\varepsilon$ for some $m > 0$. Then, for all $\varepsilon' > 0$, there exists $T = T(m, \varepsilon, \varepsilon') < \infty$ such that

$$ \lim_{K \to +\infty} \mathbb{P} \left( Y_T^K \le \varepsilon' K, \frac{Z_T^K}{K} \in \left[ \frac{r_2}{C} - \varepsilon', \frac{r_2}{C} + \varepsilon' \right] \right) = 1. $$

(ii) Assume that $r_1 > 0$, $r_2 > 0$, $S < 0$ and $\frac{Y_0^K}{K} \ge m\varepsilon$ for some $\varepsilon, m > 0$ and $\frac{Z_0^K}{K} \in [\frac{r_2}{C} - \varepsilon, \frac{r_2}{C} + \varepsilon]$. Then, for all $\varepsilon' > 0$ there exists $T = T(m, \varepsilon, \varepsilon') < \infty$ such that

$$ \lim_{K \to +\infty} \mathbb{P} \left( \frac{Y_T^K}{K} \in \left[ \frac{r_1}{C} - \varepsilon', \frac{r_1}{C} + \varepsilon' \right], Z_T^K \le \varepsilon' K, \right) = 1. $$

(iii) Assume that $r_1 > 0$, $r_2 < 0$, $S > 0$ and $\frac{Y_0^K}{K} \in [\frac{r_1}{C} - \varepsilon, \frac{r_1}{C} + \varepsilon]$ for some $\varepsilon > 0$ and $\frac{Z_0^K}{K} \ge m\varepsilon$ for some $m > 0$. Then there exists a constant $\rho > 0$ such that, for all $s \in (0, s_0)$ small enough,

$$ \lim_{K \to +\infty} \mathbb{P} \left( Y_{s \log K}^K \le K^{-s\rho} Z_{s \log K}^K, Z_{s \log K}^K \le K^{1-s\rho} \right) = 1. \quad (C.4) $$

In Lemma C.3 (iii), the initial population $Y^K$ is resident and after invasion, the population $Z^K$ becomes dominant but not resident, as can be seen from the exponent $1 - s\rho$ in (C.4).

**Proof** Let us first prove (i). By the assumption, the proofs of [2] or [11, Ch. 11] can be easily adapted to prove that, when $\frac{1}{K}(Y_0^K, Z_0^K)$ converges in probability to $(y_0, z_0) \in (0, \infty)^2$,
the process $\frac{1}{K}(Y^K, Z^K)$ converges in probability in $L_{\text{loc}}^{\infty}(\mathbb{R}_+)$ to the solution $(y(t), z(t))$ of the dynamical system

$$ \left\{ \begin{aligned} \dot{y} &= y(r_1 - C(y+z)) - \tau \frac{yz}{y+z} \\ \dot{z} &= z(r_2 - C(y+z)) + \tau \frac{yz}{y+z}. \end{aligned} \right. \qquad (C.5) $$

In our frequency-dependent case with constant competition, invasion implies fixation [2, Section 3.3.1], so that, for all $(y_0, z_0) \in (0, \infty)^2$, $(y(t), z(t))$ converges when $t \to +\infty$ to $(0, r_2/C)$ (since $S > 0$). The lemma follows from this result as in [5, Thm. 3(b)].

The proof of (ii) follows the same arguments.

Let us turn to the proof of (iii). First, we remark that, for $y(t), z(t)$ solution to (C.5), $p(t) = y(t)/z(t)$ solves $\dot{p} = -Sp$ when $(y, z)$ solves (C.5). Hence, if $y(0) \in [\frac{r_1}{C} - \varepsilon, \frac{r_1}{C} + \varepsilon]$ and $z(0) \ge m\varepsilon$,

$$ p(t) \le \frac{r_1/C + \varepsilon}{m\varepsilon} e^{-St}. $$

In particular, there exists $t_0$ such that, for all $t \ge t_0$, $y(t) \le \frac{|r_2|}{2\tau}z(t)$. Therefore, $\dot{z}/z \le r_2 + |r_2|/2 = r_2/2 < 0$ for all $t \ge t_0$. Therefore, $(y(t), z(t))$ converges to $(0, 0)$ for $t \to +\infty$. In addition, for any $\eta > 0$, there exists $t_\eta$ large enough such that the solutions at time $t_\eta$ of the dynamical system issued from any initial condition in $[\frac{r_1}{C} - \varepsilon, \frac{r_1}{C} + \varepsilon] \times [m\varepsilon, \infty)$, belongs to a compact subset of $C_\eta = \{(y, z) \in B(0, \eta); 0 < y/z < \eta\}$.

We deduce that there exists a compact subset of $C_{1.5\eta}$ containing $(Y_{t_\eta}^K/K, Z_{t_\eta}^K/K)$ with a probability close to 1 for $K$ large enough. In particular, there exists a constant $\kappa > 0$ such that

$$ \mathbb{P} \left( Y_{t_\eta}^K > \kappa K, Z_{t_\eta}^K > \kappa K \right) \xrightarrow{K \to +\infty} 1 \qquad (C.6) $$

After time $t_\eta$, we can construct a coupling between the stochastic population processes as follows: for all $t$ smaller than $T_{2\eta}^{\text{exit}}$ the first exit time of $\text{Adh}(KC_{2\eta})$ by $(Y^K, Z^K)$,

$$ A_t^0 \le Y_{t+t_\eta}^K \le A_t^1 + I_t^1, \quad A_t^2 \le Z_{t+t_\eta}^K \le A_t^3 + I_t^3, $$

where $A_0^0 = A_0^1 = Y_{t_\eta}^K$, $A_0^2 = A_0^3 = Z_{t_\eta}^K$, $A^0$ has law $BP(b_1, d_1 + \tau + 4C\eta)$, $A^1$ has law $BP(b_1, d_1 + \tau/(1+2\eta))$, $A^2$ has law $BP(b_2, d_2 + 4C\eta)$, $A^3$ has law $BP(b_2 + 2\tau\eta/(1+2\eta), d_2)$, and the random variables $I_t^1$ and $I_t^3$ count, in $Y^K$ and $Z^K$ respectively, the number of individuals alive at time $t+t_\eta$ born from immigrant individuals which arrived (at rates $\gamma_1^K$ and $\gamma_2^K$) in the population after time $t_\eta$. Note that all these processes are not necessarily independent.

Using domination of immigrant population by Yule processes as in the proof of Lemma B.9, we can prove as in (B.23) (with $\beta = 0$) that, for $s \in (0, s_0)$ small enough,

$$ \lim_{K \to +\infty} \mathbb{P} \left( \forall t \le s \log K, I_t^1 + I_t^3 \le K^{1-a/2} \right) = 1. \qquad (C.7) $$

Let us first prove that $T_{2\eta}^{\text{exit}} > s \log K$ with probability converging to 1. We first need to check that $(Y_t^K, Z_t^K) \in B(0, 2\eta)$ for all $t \le s \log K$ with probability converging to 1. Because of (C.7), it is enough to prove that

$$ \mathbb{P}_{[1.5\eta K]} (T_{\text{ext}}(A^1) < T_{2\eta K}(A^1)) \xrightarrow{K \to +\infty} 1 $$
and similarly for $A^3$, where $T_{\text{ext}}(A^i)$ is the extinction time of $A^i$ and $T_M(A^i)$ is the first time $t$ such that $A_t^i \ge M$. It is classical to prove that, for $A \sim BP(b, d)$ with $b < d$,

$$ \mathbb{P}_k(T_{\text{ext}}(A) < T_n(A)) = \frac{\left(\frac{d}{b}\right)^n - \left(\frac{d}{b}\right)^k}{\left(\frac{d}{b}\right)^n - 1}, $$

so the result follows.

The second steps consists in proving that $Y_t^K \le 2\eta Z_t^K$ for all $t \in [t_\eta, t_\eta + s \log K]$. Recall that $\kappa K \le Y_{t_\eta}^K \le 1.5\eta Z_{t_\eta}^K$ with high probability. Using (C.6), we can apply Lemma A.1 to obtain that, for $s \in (0, s_0)$ small enough and all $\varepsilon' > 0$, for all $t \le s \log K$,

$$ \begin{aligned} A_t^1 &\le (1 + \varepsilon') A_0^1 e^{(r_1 - \tau/(1+2\eta))t} \\ A_t^2 &\ge (1 - \varepsilon') A_0^2 e^{(r_2 - 4C\eta)t}. \end{aligned} \quad (C.8) $$

We choose $\eta > 0$ and $\varepsilon' > 0$ small enough so that $r_1 - \tau/(1+2\eta) < r_2 - 4C\eta$ and $1.5(1+\varepsilon') < 2(1-\varepsilon')$. Hence, with probability converging to 1, for all $t \le s \log K$,

$$ Y_{t+t_\eta}^K \le A_t^1 \le 2(1-\varepsilon')\eta A_0^2 e^{(r_1-\tau/(1+2\eta))t} \le 2\eta Z_{t+t_\eta}^K. $$

So we have proved that $T_{2\eta}^{\text{exit}} > s \log K$ with probability converging to 1. In addition, it follows from (C.8) that

$$ Y_{t+t_\eta}^K \le 2\eta \exp\left(\left(r_1 - r_2 - \tau/(1+2\eta) + 4C\eta\right)t\right) Z_{t+t_\eta}^K. $$

Introducing $0 < \rho < -(r_1 - r_2 - \tau/(1+2\eta) + 4C\eta)$ and choosing $t = s \log K - t_\eta$ and $\eta < \varepsilon/2$, we deduce (C.4). $\square$

## D Algorithmic construction of the slopes of $\beta(t)$

We defined in Theorem 2.1 the times $s_k$ of change of resident or dominant populations. For algorithmic purpose, it is useful to characterize all the times $t_k$ where the functions $\beta_\ell(t)$ change their slopes. The successive slopes are given in the next result which stems from Corollary 2.4. The next formula (D.2) is explained after the statement of the theorem. We define

$$ \Sigma_{\ell}^{0}(t) := \Sigma_{\ell}(t) \mathbb{1}_{\beta_{\ell}(t)>0} \text{ or } (\beta_{\ell}(t)=0 \text{ and } \beta_{\ell-1}(t)=\alpha) \quad (D.1) $$

**Theorem D.1** Under the same assumptions as in Theorem 2.1, the limit $\beta(t)$ is continuous and piecewise affine and can be constructed recursively as follows: assume that, for some $k \ge 0$, we have constructed times $0 = t_0 < t_1 < \dots < t_k < T_0$ and integers $\ell'_0, \dots, \ell'_{k-1}$ such that $(\beta(t), t \in [t_i, t_{i+1}])$ is affine and $\ell^*(t) = \ell'_i$ for all $t \in [t_i, t_{i+1})$ for all $0 \le i \le k-1$. Recall that, since $t_k < T_0$, we have $\text{Card}(\text{Argmax}_{0 \le \ell \le L} \beta_\ell(t_i)) \in \{1, 2\}$ for all $0 \le i \le k$.
Then

$$
\begin{align}
t_{k+1} &= t_k + \left( \inf \left\{ \frac{\beta_{\ell'}(t_k) - \beta_{\ell}(t_k)}{\Sigma_{\ell}^0(t_k+) - \tilde{S}_{t_k+}(\ell'_{k}\delta; \ell'_{k}\delta)} ; \ell \neq \ell'_{k} \text{ s.t. } \Sigma_{\ell}^0(t_k+) > \tilde{S}_{t_k+}(\ell'_{k}\delta; \ell'_{k}\delta) \right\} \right. \nonumber \\
&\qquad \left. \wedge \inf \left\{ \frac{\beta_{\ell}(t_k)}{-\Sigma_{\ell}^0(t_k+)} ; \ell \text{ s.t. } \beta_{\ell}(t_k) > 0 \text{ and } \Sigma_{\ell}^0(t_k+) < 0 \right\} \right. \nonumber \\
&\qquad \left. \wedge \inf \left\{ \frac{\beta_{\ell}(t_k) - \beta_{\ell-1}(t_k) + \alpha}{\Sigma_{\ell-1}^0(t_k+) - \tilde{S}_{t_k+}(\ell\delta, \ell'_{k}\delta) \mathbf{1}_{\beta_{\ell}(t_k)>0}} ; \ell \neq \ell'_{k} \text{ s.t. } \beta_{\ell}(t_k) > \beta_{\ell-1}(t_k) - \alpha \right. \right. \nonumber \\
&\qquad \left. \left. \text{and } \Sigma_{\ell-1}^0(t_k+) - \tilde{S}_{t_k+}(\ell\delta, \ell'_{k}\delta) \mathbf{1}_{\beta_{\ell}(t_k)>0} > 0 \right\} \right. \nonumber \\
&\qquad \left. \wedge \inf \left\{ \frac{1 - \beta_{\ell'}(t_k)}{\Sigma_{\ell'}^0(t_k+)}; \Sigma_{\ell'}^0(t_k+) > 0 \text{ and } \beta_{\ell'}(t_k) < 1 \right\} \right) \tag{D.2}
\end{align}
$$

and, for all $t \in [0, t_{k+1} - t_k]$,

$$
\beta_{\ell}(t + t_k) = \beta_{\ell}(t_k) + \Sigma_{\ell}^{0}(t_k+)t, \quad \forall 0 \le \ell \le L. \tag{D.3}
$$

It follows from Corollary 2.4 that

$$
\tilde{S}_{t_{k+}} = \mathbf{1}_{\{\beta_{\ell'}(t_k)=1; \ell'_{k}\delta<3\}} S(y; x) + \mathbf{1}_{\{\beta_{\ell'}(t_k)<1 \text{ or } \ell'_{k}\delta>3\}} \hat{S}(y; x).
$$

and $\Sigma_{\ell}^{0}(t_{k}+)$ is defined from $\Sigma_{\ell}(t_{k}+)$ as in (D.1), and $\Sigma_{\ell}(t_{k}+)$ is defined using (2.9) replacing
$\tilde{S}_{t_{k}}$ by $\tilde{S}_{t_{k}+}$.

Note that the slope in (D.3) only depends on the vector $\beta(t_k)$. Hence these formula make
possible exact numerical simulation of $\beta(t)$. In the definition (D.2) of $t_{k+1}$,

1. the first infimum corresponds to the first time where another component of $\beta(t)$ intersects $\beta_{\ell'}(t)$ (change of resident or dominant population),

2. the second one to the first time where a component of $\beta(t)$ hits 0 (extinction of a subpopulation),

3. the third one to the first time where immigration due to mutations becomes dominant in the dynamics of one coordinate of $\beta(t)$,

4. the fourth one to the first time where $\beta_{\ell'}(t)$ hits 1 when $\beta_{\ell'}(t_k) < 1$ (transition from dominant to resident for trait $\ell'_k \delta$).

The smallest of the four infima in (D.2) gives the nature of the next event.

The third infimum involves only traits $\ell\delta$ whose initial dynamics (after time $t_k$) is not driven by mutations, i.e. such that $\beta_{\ell-1}(t_k) < \beta_{\ell}(t_k) + \alpha$. In this case,

$$
\Sigma_{\ell}^{0}(t_{k}+) = \tilde{S}_{t_{k}+}(\ell\delta, \ell_{k}^{*}\delta) \mathbf{1}_{\beta_{\ell}(t_{k})>0}.
$$

When $\Sigma_{\ell-1}^0(t_k+) > \tilde{S}_{t_k+}(\ell\delta, \ell_k^*\delta) \mathbf{1}_{\beta_\ell(t_k)>0}$, the time where the curve $\beta_\ell(t_k)+t \tilde{S}_{t_k+}(\ell\delta, \ell_k^*\delta) \mathbf{1}_{\beta_\ell(t_k)>0}$ crosses $\beta_{\ell-1}(t_k) + t \Sigma_{\ell-1}^0(t_k+) - \alpha$ is then given by $\frac{\beta_\ell(t_k) - \beta_{\ell-1}(t_k) + \alpha}{\Sigma_{\ell-1}^0(t_k) - \tilde{S}_{t_k+}(\ell\delta, \ell_k^*\delta) \mathbf{1}_{\beta_\ell(t_k)>0}}$.
Acknowledgements and Funding

The authors thank Tobias Paul, Jochen Blath, the anonymous Reviewers and Associate Editor for their careful reading and remarks. This work has been supported by the Chair “Modélisation Mathématique et Biodiversité” of Veolia Environnement-Ecole Polytechnique-Museum National d’Histoire Naturelle-Fondation X. V.C.T. also acknowledges support from ANR CA-DENCE (ANR-16-CE32-0007) and Labex Bézout (ANR-10-LABX-58).

References

[1] D. Baltrus. Exploring the costs of horizontal gene transfer. *Trends in Ecology and Evolution*, 28:489-495, 2013.

[2] S. Billiard, P. Collet, R. Ferrière, S. Méléard, and V.C. Tran. The effect of competition and horizontal trait inheritance on invasion, fixation and polymorphism. *Journal of Theoretical Biology*, 411:48-58, 2016.

[3] S. Billiard, P. Collet, R. Ferrière, S. Méléard, and V.C. Tran. Stochastic dynamics for adaptation and evolution of microorganisms. In V. Mehrmann and M. Skutella, editors, *Proceedings of 7th European Congress of Mathematics*, pages 527-552. European Mathematical Society, 2018.

[4] A. Bovier, L. Coquille, and C. Smadi. Crossing a fitness valley as a metastable transition in a stochastic population model. *Annals of Applied Probability*, 2019.

[5] N. Champagnat. A microscopic interpretation for adaptative dynamics trait substitution sequence models. *Stochastic Processes and their Applications*, 116:1127-1160, 2006.

[6] N. Champagnat, P.-E. Jabin, and S. Méléard. Adaptive dynamics in a stochastic multi-resources chemostat model. *Journal de Mathématiques Pures et Appliquées*, 101(6):755-788, 2014.

[7] N. Champagnat and S. Méléard. Polymorphic evolution sequence and evolutionary branching. *Probability Theory and Related Fields*, 151(1-2):45-94, 2011.

[8] C. Dellacherie and P.-A. Meyer. *Probabilités et potentiel*. Collection Enseignement des Sciences. Hermann, 1975.

[9] F. Dercole, R. Ferrière, A. Gragnani, and S. Rinaldi. Coevolution of slow-fast populations : Evolutionary sliding, evolutionary pseudo-equilibria, and complex red queen dynamics. *Proceedings of the Royal Society of London B*, 273:983-990, 2006.

[10] R. Durrett and J. Mayberry. Travelling waves of selective sweeps. *Annals of Applied Probability*, 21(2):699-744, 2011.

[11] S.N. Ethier and T.G. Kurtz. *Markov Processus, Characterization and Convergence*. John Wiley & Sons, New York, 1986.

[12] R. Fernandez Lopez. private communication. 2014.

[13] M. Getino, D. Sanabria-Rios, R. Fernandez-Lopez, J. Sanchez-Lopez, A. Fernandez, N. Carballeira, F. de la Cruza. Synthetic fatty acids prevent plasmid-mediated horizontal gene transfer. *mBio* 6,e01032-15, 2015.

[14] S.M. Ginty, L. Lehmann, S. Brown, D. Rankin. The interplay between relatedness and horizontal gene transfer drives the evolution of plasmid-carried public goods. *Proceedings R. Soc.B* 208 0400, 2013.

[15] M. Gyllenberg and K. Parvinen. Necessary and sufficient conditions for evolutionary suicide. *Bulletin of Mathematical Biology*, 63(5):981-993, 2001.

[16] P. Keeling and J. Palmer. Horizontal gene transfer in eukaryotic evolution. *Nat. Rev. Genet.*, 9:605-618, 2008.

[17] A. Kraut and A. Bovier. From adaptive dynamics to adaptive walks. *Journal of Mathematical Biology*, 79:1699-1747, 2019.

[18] S. Méléard. *Modèles aléatoires en Ecologie et Evolution*. Springer, 2016.

[19] H. Ochman, J. Lawrence, E. Groisman. Lateral gene transfer and the nature of bacterial innovatio. *Nature* 405, 299-304, 2000.

[20] F. Stewart, B. Levin. The population biology of bacterial plasmids: a priori conditions for the existence of conjugationally transmitted factors. *Genetics* 87, 209-228, 1977.