Linking within- and between-host scales for understanding the evolutionary dynamics of quantitative antimicrobial resistance

Understanding both the epidemiological and evolutionary dynamics of antimicrobial resistance is a major public health concern. In this paper, we propose a nested model, explicitly linking the within- and between-host scales, in which the level of resistance of the bacterial population is viewed as a continuous quantitative trait. The within-host dynamics is based on integro-differential equations structured by the resistance level, while the between-host scale is additionally structured by the time since infection. This model simultaneously captures the dynamics of the bacteria population, the evolutionary transient dynamics which lead to the emergence of resistance, and the epidemic dynamics of the host population. Moreover, we precisely analyze the model proposed by particularly performing the uniform persistence and global asymptotic results. Finally, we discuss the impact of the treatment rate of the host population in controlling both the epidemic outbreak and the average level of resistance, either if the within-host scale therapy is a success or failure. We also explore how transitions between infected populations (treated and untreated) can impact the average level of resistance, particularly in a scenario where the treatment is successful at the within-host scale.


Introduction
Antimicrobial resistance (AMR) is one of the major challenges we face in the modern area (Larsson and Flach 2022).An antimicrobial substance is a chemical agent interacting with the physiology of a bacterial cell.The antimicrobial activity on a given bacterium's (S) is an increasing function of its concentration in the medium (C), such that S (0) = 0 and S (C) → S sat as C → C sat , where S sat and C sat are saturating constants.This intuitive approach implies that there exists C in (0, C sat ) such that S (C ) is equal to the intrinsic rate of increase and reverses the growth of a bacterial population.Such a threshold concentration at which a bacterial population does not grow (at least in in vitro) is called the Minimum Inhibitory Concentration (MIC).The level of resistance to a given antimicrobial is then a continuous trait by nature referred to as antimicrobial quantitative resistance (qAMR), at least at the population level, and qAMR is key to better understanding the evolutionary dynamics of AMR (Djidjou-Demasse et al. 2023).Here, we introduce a quantitative descriptor x ∈ R-a label of the bacterial strain with resistance level x-describing the level of resistance.Most of the modelling approaches devoted to AMR tackling the case of qualitative (or "binary") resistance are generally based on the dynamical interaction between two parasite strains resulting in a discrete and finite formulation of MICs (Blanquart 2019).This analysis ignores the evolutionary short-term transient dynamics which lead to the emergence of resistance (e.g., Lipsitch and Levin 1997;Kepler and Perelson 1998;Day and Read 2016;Djidjou-Demasse et al. 2021;Tazzyman and Bonhoeffer 2014;Millan et al. 2014;D'Agata et al. 2008).
Here, we proposed a nested (or embedded) model explicitly linking the within-and between-host evolutionary dynamics.Such a nested structure is particularly important because, over the past few decades, it is clear that ecological and evolutionary dynamics are influenced by processes operating across scales (Elderd et al. 2022).Very few studies considered the continuous nature of AMR in the context of this work (e.g., Djidjou-Demasse et al. 2023), and few studies have implemented a nested model in this context so far (e.g., Beardmore et al. 2017;Shen et al. 2019).The bacterial population is assumed to be phenotypically (and genetically) diverse through the level of antimicrobial resistance x.This quantitative trait affects different components of the bacterial population life cycle, such as growth and death rates.In addition to those effects on the death and birth rates, bacterial population resistance level also mitigates the antimicrobial efficiency with respect to that population.From a theoretical point of view, properties of the within-host model proposed here are based on previous analytical quantitative genetics results developed in Djidjou-Demasse et al. (2017) and Burie et al. (2020).
An integro-differential equation is used to model the within-host dynamics of the bacterial population.Such a within model formulation is previously proposed in Djidjou-Demasse et al. (2023).Each host individual is classified as either a treated host, labeled as T , or an untreated host, labeled as U .The model tracks the dynamics of a bacterial population within a treated host (b T ) or an untreated host (b U ).At time τ , the bacteria density with resistance level y ∈ R within a treated and untreated host is quantified by b T i (τ, y) and b U i (τ, y) respectively.The subscript "i" (with i ∈ I = {1, 2, • • • , n}) represents an individual immune system and then allows taking into account the immune system heterogeneity in the host population.
A bacteria with resistance level y generate offspring with resistance level x at a percapita rate J (x − y) p(y)b ϑ i (τ, y), where p(y) is the bacterial intrinsic growth rate, and J (x − y) is the probability for a bacterial population with resistance level y to mutate towards a level x during the reproduction process.Therefore, the total number of bacteria produced at time τ with a resistance level x is quantified by 1 + R b ϑ i (τ, x)dx −κ R J (x − y) p(y)b ϑ i (τ, y)dy, where κ is a positive parameter.The parameter κ > 0 is introduced to impose the bacterial population homeostasis.The within-host model reads as where x)dx, is the total bacteria load.The term ξ ϑ i accounts for the individual clearance of bacterial cells with resistance level x, either by the immune system (μ i ) or by the efficiency of antimicrobial pressure (k).Thus, ξ U i (x) = μ i (x), for untreated host, and ξ T i (x) = μ i (x) + k(x), for treated host.Here, it is assumed that bacteria are subject to a biocidal antimicrobial pressure, .ie. killing and not diminishing the birth rate of bacteria.Note that, the within-host model (1.1) allows to follow evolutionary parameters such as the average level of resistance for treated ( x T i (τ )) and untreated ( xU i (τ )) individuals τ -time post infection given by At the between-host scale, the host population is subdivided into three states.At any time t, an individual-with the immune system's response level i ∈ I-can be susceptible to the infection S i (t) or infected I ϑ i (t, τ, xϑ i (τ )), ϑ = {T , U }.The variables τ and xϑ i (τ ) respectively represent the time post-infection and the average resistance level of the infected host.It is important to clearly understand the meaning of infected individuals I ϑ (t, τ, xϑ i (τ )).Indeed, each infected individuals is potentially infected with multiple bacteria strains with variable frequencies and resistance levels.Therefore, xϑ i (τ ) represent the individual resistance level quantified by the withinhost dynamics through the above formula.However, for simplicity, and without loss of generality, we will note I ϑ i (t, τ, xϑ i (τ )) ≡ I ϑ i (t, τ ) for ϑ ∈ {T , U } and i ∈ I. Individual transmission and loss rates at the between-host scale, τ -time since infection, β ϑ i (τ ) and α ϑ i (τ ), are linked to the within-host dynamics at time τ .As an example, these parameters can be represented as Holling functions of type II (or similarly the Beddington-DeAngelis functional response) such that, for all ϑ ∈ {T , U }, and where β 0 and α 0 are scaling constants, and r 0 is the half-saturation constant for the total bacterial load B ϑ i .Note that, for the loss rate of infected individuals α ϑ i , the term α 0 B ϑ i /(r 0 + B ϑ i ) represents the loss due to the disease induced mortality while γ ϑ is the loss due to recovery.We can assume that the function γ ϑ is of the form where B min is the threshold below which the infection becomes undetectable such that the infected individuals is considered as recovered.
The force of infection induced by infected individuals at time t is then given by The nested model proposed here then makes it possible to simultaneously track the epidemiological dynamics of the host population as well as evolutionary quantities such as the average level of resistance at both the within-and between-host scales.Such an approach is original and to our knowledge, no study has considered nested models for the evolutionary dynamics of AMR, viewed as a continuous quantitative trait.
The dynamics of newly infected individuals (i.e.τ = 0) in each group (treated or untreated) is thus defined by (for ϑ ∈ {T , U }) where q T i ∈ (0, 1) is the treatment rate in the host population and q U i = 1 − q T i .During their infection, treated individuals can stop the treatment at rate ω T U (τ ), and untreated infections can join the treated group at rate ω U T (τ ).The loss rate of infected individuals τ -time post infection occurs at rate α ϑ i (τ ).Susceptible individuals are recruited at a constant rate i and the natural death rate of the host population is μ h .The between-host model then reads Finally, the nested within-host (1.1) and between-host model (1.4)-(1.5)are summarised by Fig. 1.The main variables and parameters are listed in Table 1.We emphasize that the dynamical properties (that we will recall later) of within-host model (1.1) are precisely analyzed in Djidjou-Demasse et al. (2023).Therefore, our main objective here is devoted to the analysis of the nested model (1.1)-(1.5).
the disease transmission rate of an infected individual τ -time post infection.At the time t, new infections occur at rate λ(t)S i (t), and are either treated with a probability q T i or untreated with a probability q U i = 1 − q T i .The natural death rate of individuals is μ h .If infected since time τ , the loss rate is α ϑ i (τ ).Untreated individuals, and infected since time τ start the treatment at rate ω U T (τ ) while treated individuals stop the treatment at rate ω T U (τ ) The rest of this work is organized as follows.In Sect.2, we state the main results of the nested model that are obtained in this work.These include the existence of the globally defined non-negative semiflow and the existence of the unique positive equilibrium for the within-host model, and global threshold analysis results for the between-host model.The model's typical dynamics are provided in Sect.3.This includes the within-and between-host models parameterization and the characterization of the evolutionary parameters such as the average levels of resistance.In Sect.4, we delve into the effects of various parameters on the equilibrium structure of the host population, along with addressing the parameterization issue within nested models.Section 5 focuses on providing preliminary results.Specifically, it addresses the existence and uniqueness of solutions, derivation of the basic reproduction number, and the existence of a unique endemic equilibrium for System (1.4)-(1.5).Finally, Sect.6 is devoted to the proof of the global asymptotic results.
Individual clearance rate of the bacterial cell with resistance level x due to the immune response Bacteria clearance rate with resistance level x in untreated hosts Bacteria clearance rate with resistance level x in treated hosts due to the immune response and drug Between-host

Recruitment rate of susceptibles μ h
Human natural death rate

Main results
This section is devoted to the main results of the nested model (1.1)-(1.5).Such results include the existence of the unique maximal bounded semiflow, and a precise description of the unique positive equilibrium of Model (1.4)-(1.5).By providing global stability results, we will also conduct a precise threshold analysis of the betweenhost model (1.4)-(1.5).First of all, for biological feasibility of the nested model (1.1)-(1.5),we make use of the following assumptions.More precisely, the within-host model (1.1) is formulated based on the following assumption Assumption 2.1 1. Functions μ i , k, ξ ϑ i , and p are always positive on R, with ϑ ∈ {T , U }. Furthermore, p is a bounded function on R and κ > 0. Finally, the function 2. The mutation kernel J is bounded and integrable on R + , positive almost everywhere, and satisfies R + J (x)dx > 0, J (−x) = J (x), for all x. 3. The mutation kernel J decays rather rapidly towards infinity in the sense that In other words, lim |x|→∞ |x| n J (x) = 0, for all n ∈ N.
Furthermore, the between-host model's parameters satisfy the following assumption.

The transmission rates β ϑ
i (•),s are Lipschitz continuous almost everywhere on R + .

Summary key findings on the within-host dynamics
The dynamical properties of the within-host model (1.1) have been precisely investigated in Djidjou-Demasse et al. (2023).The first result of Model (1.1) is about the existence of the unique maximal bounded semiflow.Such a result reads as, •) for all τ > 0. 2. The semi-flow defined by {v(τ, b ϑ i0 )} τ is bounded dissipative and asymptotically smooth, and hence, its admits a global attractor in L The basic reproduction number N ϑ i0 -defined as the expected number of bacteria arising from one bacterium in a bacteria-free environment-of the bacteria population with resistance level x, within an individual with immune system level i, is calculated as , for ϑ ∈ {U , T }. (2.1) Next, a non-trivial equilibrium of Model (1.1) is strongly related to the principal eigenpair of the below linear integral operator H ϑ i defined on L p (R) (for any p ≥ 1), by We then have the following result.
Theorem 2.4 Let r (H ϑ i ), the spectral radius of the operator H ϑ i , and φ > 0 the associated eigenfunction normalized such that .
(2.3) Furthermore, the semi-flow {v(τ, b ϑ i0 )} τ is uniformly persistent, that is, there exists a constant η such that for any b We recall that the within-host model (1.1) is precisely analyzed in Djidjou-Demasse et al. (2023).We then refer to Appendices F-I in Djidjou-Demasse et al. ( 2023) for the detailed proof of Theorems 2.3 and 2.4.Note that the linear operator H ϑ i naturally emerges when characterizing the positive equilibrium of the within-host model (1.1) (Djidjou-Demasse et al. 2023).
Furthermore, the estimate (2.3) gives that the endemic equilibrium F ϑ i of the withinhost model (1.1) basically relied to the principal eigenfunction of the linear operator H ϑ i for any given probability kernel J satisfying Assumption 2.1.However, the profile of the endemic equilibrium F ϑ i with respect to x ∈ R can be precisely described when the mutation kernel J depends on a small positive parameter (let say ε < < 1) with the scaling form where ε > 0 represents the mutation variance in the phenotypic space.More precisely, when ε > 0 is small, then the endemic equilibrium F ϑ i concentrates on the set S ϑ i defined by The set S ϑ i is referred to as the set of Evolutionary Attractors (or dominant strains) of the within-host model in the classical adaptive dynamics theory ( e.g., Geritz et al. 1997;Metz et al. 1996) By the above estimate, sign r H , given by (2.3), of the within-host model (1.1) is concentrated around the evolutionary attractor x * i in the space of resistance level R. In other words, x * i is the average bacterial resistance level at the within-host scale equilibrium and we have lim ε→0 R u(x)F ϑ i,ε (x)x = u x * i for any continuous function u ∈ C (R).We refer to Theorem 2.3 in Djidjou-Demasse et al. (2017) for such a concentration phenomenon.

Key findings of the nested within-and between-host dynamics
At the between-host scale, by setting , and e = 0 1 1 0 , System (1.4)-(1.5)rewrites into the following compact form, where Using the next-generation operator approach (e.g., Diekmann et al. 1990;Inaba 2012), the basic reproduction number R i 0 of the whole infected individuals of group i, is given by where and where i (τ 2 , τ 1 ), 0 ≤ τ 1 ≤ τ 2 < ∞, is the evolutionary system generated by the linear operator [− i (τ ) + ω(τ )]; see Remark 2.5 for some details on i .Moreover, the basic reproduction number R 0 at the whole between-host scale is such that Overall relative infectiousness of individuals of group i.
×R i 0 . (2.6) We refer to Sect.5.2 for details of the computation of R i 0 ,s and R 0 .Note that the parameter χ k quantifies the overall infectiousness of the whole infected individuals of group k ∈ I.A more explicit expression of the infectiousness χ k is difficult to obtain in general.However, one can go further steps in some particular configurations of the treatment status transition rates ω(τ ).Indeed, assume that we can find τ 0 > 0 and τ 1 > 0 such that ω U T (τ ) = 0, for τ < τ 0 , ω1 , for τ 0 < τ < τ 0 + τ 1 , and (2.7) In the above scenario, the regimen (0, τ 0 )-post infection may corresponds to the initial phase where each infections, either treated or untreated, remain to their initial treatment status.The second regimen (τ 0 , τ 0 + τ 1 )-post infection may corresponds to the phase during which previously untreated infections becomes treated while treated infections remain to their initial status.In such a configuration, we have (see Sect. 5.2 for details) and Note that parameters k,ϑ 0 ,s and k,ϑ 1 ,s are survival probabilities during phases (0, τ 0 ) and (τ 0 , τ 0 +τ 1 )-post infection of infected individuals of group k ∈ I, treated (ϑ = T ) or untreated (ϑ = U ).

Remark 2.5 Let
It means that i is generated from the following evolutionary system (2.8) If, for example, the linear operator A i is diagonal, we have In such a configuration we explicitly have However, obtaining an explicit expression for i may not always be straightforward or possible in general.A naive approach would be to solve problem (2.8) as above, but it is well known that such an exponent formula does not give a solution to the problem at hand.

Numerical illustrations
Here, we present a series of numerical simulations employing semi-explicit finite difference numerical schemes.We refer to Djidjou-Demasse (2021) for an example of a code repository within the context of the model proposed here.We illustrate an example of typical dynamics that can be simulated by the nested model (1.1)-(1.5).The model simultaneously captures the outbreak dynamics as well as the evolutionary dynamics of the average resistance level within the host population.The within-host model parameters are basically the same as in Djidjou-Demasse et al. (2023).Intuitively there exist two threshold levels, assumed here 0 and 1 (called reference "sensitive" and "resistant" strains) such that, a strain with resistance level x can be classically referred to as "sensitive", "intermediate", or "resistant" depending on whether x < 0, 0 < x < 1, or x > 1.For sake of simplicity, we assume that the host population is homogeneous in terms of immune system level, i.e., card(I) = 1.For all illustrative scenarios, we will have R 0 > 1 such that the disease is persistent at the betweenhost scale (Theorem 2.7).The probability density function at the within-host scale (J ≡ J ε ) is assumed of type (2.4).Specifically, we define J ε as a Gaussian distribution , where ε > 0 represents a small parameter that signifies the mutation variance within the phenotypic space.

Within-host parameterization
The antimicrobial killing rate function k(•) is a decreasing function with respect to the resistance level x such that, k where k 0 and k 1 are the antimicrobial activity undergone by the reference sensitive and resistant strains.Moreover, knowing p 0 and p 1 , respectively the intrinsic growth rate of reference strains 0 and 1, a suitable expression for function of p is , where p m is the upper bound of the intrinsic growth rate p and 0 < p 1 < p 0 < p m .The qualitative behaviour of functions k and p can be found in (Djidjou-Demasse et al. 2023, Fig. 2).We assume that the clearance rate of the bacteria cell due to the immune response, μ(•), is a constant function given by μ(x) = μ.Furthermore, the average fitness cost-benefit ratio of resistance within a bacterial population can be expressed as c b = log( ) log(1+δ) .Here, > 0 measures the fitness advantage of the reference resistant strain (see Djidjou-Demasse et al. 2023 for details).

Between-host parameterization Parameters β ϑ
i and α ϑ i are defined using Holling type functional responses introduce by (1.2).For all simulations, the threshold B min , intro- duced by (1.3), below which the infection becomes undetectable such that the infected individuals is considered as recovered is fixed as B min = 10 −3 B 0 , with B 0 = B(0) the initial total bacteria load.The total bacteria load (B ϑ i (τ )) and the recovery probability (1 − exp(− τ 0 γ ϑ i (s)ds), τ -time post infection, are illustrated in Fig. 2. Furthermore, an untreated infected individual joins the treated compartment when her total bacteria load is above a threshold (1 + θ) B 0 , with θ ≥ 0. Therefore, the influx rate from untreated to treated is assumed to be a function with respect to time τ and is defined as follows Similarly, we assume that an infected individual under treatment can drop down such a treatment when the bacteria load reach the same range as before the treatment.Therefore, the influx rate from treated to untreated is given by Initial conditions and model outputs The initial bacterial population b ϑ 0 (x) is assumed to be composed by a sensitive bacterial population with average resistance level x = 0. Hence, we set b ϑ 0 (x) = m 0 ×N (0, σ 0 , x), where N (0, σ 0 , x) stands for the normalized density function of the Gaussian distribution at x with mean 0 and variance σ 2 0 .This means that the initial bacterial population is mostly composed of the reference "sensitive" strain.At the between-host scale, the initial condition of the epidemiological model is taken such that the susceptible population starts close to its disease-free equilibrium.More precisely, assuming an initial infection prevalence denoted as P rev = 10%, we derive the initial susceptible population as S 0 = (1 − P rev ) μ h , along with the initial distribution of infectives which consists of I T 0 (τ ) = 0 and I U 0 (τ ) = P rev μ h × L(τ ) for all τ ≥ 0. Here, L(τ ) = 10 ln(10) × 10 −10τ , and it is important to note that L symbolizes the arbitrary initial distribution of individuals who have been infected since time τ .This distribution is scaled so that R L(τ )dτ = 1.
The average level of resistance at within-host scale (η(t)) of the host population at time t is such that where xϑ ,s are the individual average level of resistance and Simulated scenarios Two simulated scenarios are considered, the first when the treatment is successful at the within-host level, and the second when the treatment failed at the within-host level.For all our simulated scenarios, the infection is assumed here to be always successful for untreated individuals, i.e., the immune system alone is no more enough to control the infection such that max x∈R N U 0 (x) > 1, leading to the bacterial persistence for untreated infections.
Our first scenario is for the case where the treatment is successful at the withinhost level, i.e., the basic reproduction number of treated individuals N T 0 is such that max x∈R N T 0 (x) < 1 (Fig. 3C).In such a situation, the bacterial load is under control in the relatively short term for treated individuals (Fig. 3A), while it remains persistent for untreated individuals (Fig. 3B).At the between-host scale, the treatment rate have a strong effect on the epidemic outbreak (Fig. 3F-H).More precisely, increasing the treatment rate q T in the host population strongly reduce the overall epidemic size (Fig. 3F-H), with R 0 = 4.7815, 2.6750 and 0.5685, respectively.Furthermore, the average resistance level in the host population rapidly reach an equilibrium for which the level of resistance is moderately high compared to the initial resistance level of the host population (Fig. 3E).
In the second scenario, the treatment is assumed unsuccessful at the within-host level, i.e., the basic reproduction number of treated individuals N T 0 is such that max x∈R N T 0 (x) > 1 (Fig. 4C).In such a situation, the bacterial load remains persistent for both treated and untreated infections (Fig. 4A,B).Indeed, while we can observe an apparent decreasing of the bacteria load for some period of time for treated infections (Fig. 4A), at the end, we have the re-emergence of the bacteria population at within-host scale.Such a transient dynamics is explain by the fact that the initiation of treatment modifies the fitness landscape by shifting the maximum point of the withinhost basic reproduction number N T 0 to the point x = x * > 0 (Fig. 4C).In contrast to the treatment success scenario (Fig. 3), increasing the treatment rate q T in the host population have marginal effect in controlling the epidemic outbreak (Fig. 4F-H).In fact, with q T = 0.1, 0.5 and 0.9, the outbreak remains persistent with R 0 = 10.9451,9.5855 and 8.2259, respectively.Significantly, it is worth noting that although the average resistance level in the host population continues to rise with the treatment rate q T at equilibrium (Fig. 4E), there is a substantial increase in the range of resistance levels compared to the initial resistance level.This stands in contrast to the treatment success scenario (Fig. 3E), where the range of resistance levels remained relatively low.Additionally, in the treatment success scenario (Fig. 3E), the average resistance F-H The between-host dynamics with respect to the treatment rate where R 0 = 4.7815, 2.6750 and 0.5685, respectively.Parameter values are (σ 0 , m 0 , k 0 , p 1 / p 0 , k 1 /k 0 , μ) = (0.05, 0.05, 20, 0.5, 0.3, 0.8598) and = 5e4, μ h = 5.2675e−2, β 0 = 1.2e−3, α 0 = 7.5e−2, θ = 1, r 0 = 9e3 level in the host population quickly reaches equilibrium.However, in the treatment failure scenario (Fig. 4E), there is a comparatively longer transient period before the average resistance level in the host population reaches equilibrium.Overall, during the transient regimen, there is an initial subsequent increase in the average level of resistance to significantly higher levels, followed by a small decrease (Fig. 4E).This behavior is mostly attributed to the alteration of the fitness landscape caused by the treatment (Fig. 4C).

Discussion
Optimizing the treatment rate in the host population is key to controlling both the epidemic outbreak and the average level of resistance Increasing the treatment rate in the host population contributes to reducing the epidemic size at the between-host scale, although the effect is quite marginal in the treatment failure scenario at the  -H, 4F-H).This can be primarily attributed to the fact that, even in cases of treatment failure, the within-host infection remains controlled for a certain period (Fig. 4A).However, the subsequent phase is characterized by an increase in bacterial population density (Fig. 4A).Conversely, raising the treatment rate within the host population leads to an elevation in the average resistance level of that population, regardless of the treatment scenario at the within-host scale (Figs.3E,  4E).However, this increase in the average resistance level is particularly pronounced in the case of treatment failure (Fig. 4E), in comparison to the case of treatment success (Fig. 3E).In the case of treatment success, the resistance level remains highly similar to that of the initial bacterial population.Consequently, depending on the treatment regimen implemented within the host population, it becomes essential and intriguing to determine an optimal treatment rate to effectively manage both the outbreak and the average level of antimicrobial resistance.Fig. 5 The effect of delay for treating infections on the epidemic outbreak and the average level of resistance when the therapeutic treatment is successful.Line 1 The treatment rate q T = 0.5.A The average resistance level η of the host population for θ ∈ {0.5, 1}.C, E The between-host dynamics for θ = 0.5 and 1, where R 0 = 0.3922 and 2.6750 respectively.Line 2 As in line 1 for q T = 0.9 where R 0 = 0.1120 and 0.5685 respectively.Other parameter values are (σ 0 , m 0 , k 0 , p 1 / p 0 , k 1 /k 0 , μ) = (0.05, 0.05, 20, 0.5, 0.3, 0.8598) and = 5e4, The delay for treating infections can impact the epidemic outbreak as well as average level of resistance Assume the scenario where the treatment is successful at the withinhost scale (Fig. 3A) and at least 50% of infected individuals are under treatment (q T ≥ 0.5).Two configurations are introduced.In the first configuration, untreated individuals begin treatment at a rate ω U T [defined by (3.1)] when their total bacterial load reaches a threshold value of 1.5 × B 0 , i.e., θ = 0.5.In the second configuration, untreated individuals start treatment at a rate ω U T when their total bacterial load reaches a threshold value of 2 × B 0 , i.e., θ = 1.The case of θ = 0.5 indicates a situation where the delay before initiating the treatment is very short.On the other hand, in the case of θ = 1, the delay before starting the treatment is relatively more significant (Fig. 2A).In general, the average resistance level in the host population decreases as the delay before initiating treatment increases (Fig. 5A, B).One possible explanation is that untreated infected individuals do not significantly contribute to the increase in the average resistance level within the host population.Nevertheless, although early treatment effectively controls the epidemic outbreak for both moderate and high treatment rates (Fig. 5C, D)-with R 0 = 0.3922 and 0.1120, respectively-delaying the treatment of infected individuals leads to an epidemic that is out of control, except in cases where the treatment rate is exceptionally high (Fig. 5E, F)-with R 0 = 2.6750 and 0.5685, respectively.
Nested models parameterization issue Explicitly connecting the within-to and between-host scales are crucial to gain a more realistic picture aiming to integrate into the same modelling framework the epidemic dynamics and the evolutionary dynamics of antimicrobial resistance.However, such an approach requires making assumptions about the parameters at the within-host scale that are equally unknown as the parameters at the between-host scale and hence leading to uncertainty about the appropriate parametrization (Uecker and Bonhoeffer 2021).Such uncertainty is amplified by our approach where the level of resistance is considered a continuous quantitative trait, compared to the classical qualitative (or "binary") approaches (Djidjou-Demasse et al.

2023).
Time-scale separation hypothesis Within the context of nesting within-and betweenhost scales, for the modelling of the epidemiology and evolution of pathogens, some studies assumed that the epidemiological and evolutionary time scales are distinct, i.e., the within-host dynamic is fast relative to the between-host dynamic such that the within-host model remains at equilibrium, e.g.(Gilchrist and Coombs 2006;Xue and Bloom 2020;Almocera et al. 2018;Boldin and Diekmann 2008;Coombs et al. 2007;André and Gandon 2006).Although such an assumption on the within-host equilibrium dynamic' might be appropriate for chronic infections, it leads to a population-scale model that does not explicitly account for the individual time-dependent infectiousness dynamics (Hart et al. 2020).Furthermore, our illustrative examples (Figs. 3, 4) strongly highlight the infectiousness' time-dependency of infected individuals and show that the between-host dynamic is not necessarily faster compared to the within-host dynamic.

Preliminaries and technical materials
We will go through details on the proof of our main results, namely Theorem 2.7.We will first discuss the existence of a positive global solution of the nested model.Next, we will give details on the derivation of the basic reproduction number of System (1.4)-(1.5)for individuals with an immune system of level i.We will also derive the existence of a unique endemic equilibrium of System (1.4)-(1.5)when R 0 > 1, as well as the long-term persistence of the epidemic in such a case.

Existence of the semiflow
We establish the existence of a positive global solution of the system (2.5).We first formulate system (2.5) in an abstract Cauchy problem.For that, we introduce the Banach space X = R n × R 2n × L 1 ((0, ∞), R 2n ), endowed with the usual product norm • X as well as its positive cone X + .Let A : D(A) ⊂ X → X be the linear operator defined by Let us introduce the non-linear map F : D(A) → X defined by F(S, 0 R 2n , I) = ( − S(t)λ(t), λ(t) diag(S(t)) q, diag(ω(•))I) .
Theorem 5.1 There exists a unique strongly continuous semiflow ds for all t ≥ 0.Moreover, { (t, •)} t satisfies the following properties: t , then the following Volterra formulation holds true for all i ∈ I (5.3) coupled with the S i (t) equation of (2.5), and where i (τ 2 , τ 1 ), 0 ≤ τ 1 ≤ τ 2 < ∞, is the evolutionary system generated by the linear operator [− i (τ ) + ω(τ )]. 2. For all ϕ 0 ∈ X 0+ , and for all t ≥ 0, one has i∈I S i (t) Furthermore, the subset of the phase space is positively invariant and attracts all nonnegative solutions.3. The semiflow { (t, •)} t generated by (2.5) is bounded dissipative, that is, there exists a bounded set B ⊂ X 0 such that for any bounded set U ⊂ X 0 , we can find Proof It is easy to check that the operator A is a Hille-Yosida operator.Then standard results apply to provide the existence and uniqueness of a mild solution to (2.5) [we refer to Magal and Ruan (2009) and Thieme (2011) for more details].The Volterra formulation is also standard and we refer to Iannelli (1995), Webb (1985) for more details.
The S i equation of (2.5) gives Ṡi (t) ≤ i − μ h S i (t), that is Next, for estimate (5.4), let ϕ 0 ∈ X 0+ , then adding up the S i ,s equation together with the I T i ,s and I U i ,s equations of (1.5) yields for all i ∈ I From where one deduces estimate (5.4) and which ends item 2. of the theorem.The bounded dissipativity of the semiflow { (t, •)} t is a direct consequence of estimate 2.
The following result is straightforward.
where γ 0 , γ 1 > 0 and Then, for all τ ≥ 0, Therefore, where Note that from where inequality (5.5) follows, and this ends the proof of the lemma.

The basic reproduction number
In the absence of infection, that is I(t, τ ) = 0 L 1 ((0,∞),R 2n ) , the system (2.5) has a disease-free equilibrium (DFE) given by E 0 = (S 0 , 0 L 1 ((0,∞),R 2n ) ), with S 0 = ( i /μ h ) i∈I .Let i (t) be the number of new infections in the host population of group i at time t.Then in an initially infection-free population, by (2.5), we have where •; • is the usual scalar product.Linearizing the Volterra formulation (5.3) at the DFE, it comes From where,

123
where f i (t) is the number of new infections produced by the initial population.Therefore, the basic reproduction number R i 0 of individuals of group i is calculated as The term χ k (τ ) = β k (τ ), k (τ, 0)q k quantifies the infectiousness at τ -time post infection of the whole infected individuals of group k ∈ I.
Next, let (t) = ( i (t)) i∈I , the number of new infections in all groups at time t and, f (t) = ( f i (t)) i∈I the number of new infections produced by the initial population.We have Due to the above formulation, the basic reproduction number R 0 of all individuals is calculated as the spectral radius of the matrix (a i,k ) i,k∈I , where A more explicit expression of the infectiousness χ k is difficult to obtain in general.However, one can go further steps in some particular configurations of the treatment status transition rates ω(τ . Indeed, assume that (2.7) holds.In such a configuration, we have From where, by setting where

Technical materials
Before proceed to the proof Theorem 2.7, we introduce some technical materials including the existence of a global compact attractor for the solution semiflow of Model (2.5), the spectral properties of the linearized semiflow of Model (2.5) at any given equilibrium, and the uniform persistence of Model (2.5) when R 0 > 1.

Global compact attractor
To derive the global properties of the solution dynamics, it is necessary to show that the semiflow generated by system (2.5) has a global compact attractor.Denote by and endow the set Y with the norm For any initial condition ϕ 0 ∈ Y, the solution semiflow of system (2.5) in Y + is denoted by * (t, ϕ 0 ) = (S(t), I(t, •)) t .From the Volterra formulation (5.3), we rewrite system (2.5) as follows for all i ∈ I: (5.9) (5.10) where We need to prove the following claim.
Recalling (5.3) and combining the integrals, we obtain We have Next, we will show that system (2.5) has a global attractor.By using the similar method as in Martcheva and Thieme (2003) and Cheng et al. (2018), we can state the following result.
Lemma 5.4 There exists A 0 , a compact subset of Y + , which is a global attractor for the solution semiflow of system (2.5).Moreover, A 0 is invariant under the solution semiflow, that is Note that for any bounded ϕ 0 , 2γ 1 e −μ h t ϕ 0 → 0 as t → ∞.This completes the first claim.
To show that the second claim holds, let B ⊂ Y be a bounded subset such that * (t, •)B ⊂ B. Choose C 0 > 0 such that ϕ 0 ≤ C 0 for all ϕ 0 ∈ B. From Theorem 5.1 Item 2, ∪ ϕ 0 ∈B {S(t)} is bounded in R n and then is precompact in R n .Hence, to show the compactness, it suffices to show that the set * (t, ϕ 0 )B is precompact for Smith and Thieme (2011)], it is sufficient to verify the following conditions: By (5.11) we have for all i ∈ I It follows that above conditions (i), (ii) and (iv) are satisfied.Now, we show that condition (iii) holds.We have for i ∈ I and h ≤ t, By Lemma 5.2, and the boundedness of the semiflow, we can find a positice constant C 0 such that (5.12) Again by Lemma 5.2, we have . By (5.12) and (5.13) one concludes that the criterion (iii) holds, and then the second claim holds.This completes the proof of the lemma.

Spectral properties of the linearized semiflow
The next result is concerned with spectral properties of the linearized semiflow of Model (2.5) at a given equilibrium point ϕ ∈ X 0+ .The associated linearized system (2.5) at the point ϕ reads as where A is the linear operator defined in (5.1) while G[ ϕ] ∈ L(X 0 , X ) is the bounded linear operator defined by: We then have the following lemma.
, which is defined by Then, it is the infinitesimal generator of a C 0 -semigroup on X 0 denoted by {T A 0 (t)} t≥0 .
Let ϕ = (S, 0 R 2n , I(•)) t .We find that Then, for t ≥ τ 0 , we have is compact, the results in Arino et al. (1998) or Ducrot et al. (2008) apply and provided that the essential growth rate of By results in Engel and Nagel (2001) and Webb (1987), the latter inequality ensures that ∩ σ (A + G[ ϕ]) = ∅, and it is only composed of point spectrum of (5.15) Since we find that Thus, for all i ∈ I, equality (5.15) rewrites as (5.16) Substituting (5.16) into expression for λ, it comes (5.17) where τ −s) ds.Therefore, we can isolate λ in system (5.17) if and only

Uniform persistence
Our next technical material concerns the uniform persistence of Model (2.5) when R 0 > 1 by using the method developed in Theorem 5.2 in Smith and Thieme (2011).
Finally, we end this technical material section by establishing the uniform persistence of system (2.5).
Theorem 5.8 The semiflow { (t, •)} t≥0 generated by system (2.5) is uniformly persistent in M with respect to (M, ∂M), that is, there exists a constant η > 0 such that for each ϕ 0 ∈ M, Furthermore, there exists compact global attractor A 1 in M for the semiflow { (t, •)} t≥0 .

Proof
In the following, we will prove that W S ({E 0 }) ∩ M = ∅, where Since from Claim 5.7 the disease-free equilibrium E 0 is globally asymptotically stable in ∂M, we need only to study the behavior of the solution starting in M in some neighborhood of E 0 .To this end, it is sufficient to show that there exists σ > 0 satisfying for each ϕ ∈ {v ∈ M : E 0 − v ≤ σ } there exists t 0 ≥ 0 such that (t, ϕ 0 ) − E 0 > σ .By the way of contradiction, suppose that for each integer n ≥ 0 there exists a , then for all t ≥ 0 we have (5.20)It follows that for all i, we have S n i (t) ≥ S 0 i − 1 n+1 for all t ≥ 0. Consider the following system By the comparison principle, we have (5.21)where I n (t, •) is the solution of the following auxiliary system which gives for all i, (5.22) For ease of notation, let us rewrite the system (5.22) as the following form: •)) t and the operators A n i and L n i are defined as and Similarly to the proof of Lemma 5.6, we can derive the characteristic equation (ν n ) = 0 for system (5.22),where Since R 0 > 1, there exists n 0 > 0 large enough such that for n ≥ n 0 , The largest eigenvalue ν * n of system (5.23)satisfies the characteristic equation From Lemma 5.6, we have shown that ω 0,ess ( A n i + L n i ) ≤ −μ h and since the semigroup is irreducible, it follows from Corollary 4.6.8 in Magal and Ruan (2018) has asynchronous exponential growth with intrinsic growth constant ν * n ∈ R. Therefore, using Theorem 3.9 in Magal and McCluskey (2013), we have and there exist constants ε 0 > 0 and η 0 > 0 such that where ν * n is the projector on the generalized eigenspace associated with the largest eigenvalue ν * n > 0. We deduce that , which is a contradiction to the boundedness of the solution.Thus, W S ({E 0 }) ∩ M = ∅ and we derive from Theorem 4.2 in Hale and Waltman (1989) that the semiflow { (t, •)} t≥0 is uniform persistent with respect to the pair (M, ∂M).Moreover, by Theorem 3.7 in Magal and Zhao (2005), there exists a compact global attractor A 1 ⊂ M for the semiflow { (t, •)} t≥0 .

Proof Theorem 2.7
The proof of Theorem 2.7 is decomposed into two parts.The first part is devoted to the global stability of the disease-free equilibrium, while the second part is devoted to the global stability of the endemic equilibrium.

Proof of Theorem 2.7 (i): global stability of the disease-free equilibrium
When the initial condition of System (2.5) satisfies ϕ 0 ∈ ∂M, i.e., i∈I ∞ 0 β i (τ ), I i0 (τ ) dτ = 0, by Claim 5.7, it comes that the semiflow (t, ϕ 0 ) generated by system (2.5) is such that lim It then remain to prove the global stability of the disease-free equilibrium when R 0 ≤ 1.
of system (2.5) is globally asymptotically stable.
Proof By Theorem 5.8, we introduce the following well defined Lyapunov functional with S 0 = k∈I S 0 k and c k (τ ) → 0 as τ → ∞.From (6.1), we have Differentiating V 1 (t) and using k = μ h S 0 k , we have Differentiating V 2 (t), we have By integrating by parts, we have Replacing these expressions in dV 2 (t) dt and using the fact that Finally, combining dV 1 (t) dt and dV 2 (t) dt , gathering some terms and using (6.2), it follows that Using (6.1), we have That implies that for all k, c k (0), q k ≤ 1, when R 0 ≤ 1.Therefore, we have dV (t) dt ≤ 0 when R 0 ≤ 1.The strict equality holds only if S k (t) = S 0 k hold simultaneously with either R 0 = 1 or I k (t, 0) = 0.It is easy to verify that largest invariant set in dV dt = 0 is the singleton {E 0 }.Thus, all solutions of system (2.5) converge to the disease-free equilibrium E 0 .Hence, E 0 is globally asymptotically stable when R 0 ≤ 1.

Proof of Theorem 2.7 (ii): global stability of the endemic equilibrium
Theorem 6.2 Assume R 0 > 1, then the endemic equilibrium E * = (S * , I * ) t of system (2.5) is globally asymptotically stable in Y + .
Proof By Theorem 5.8, we introduce the following well defined Lyapunov functional dτ and (6.3)where S * = k∈I S * k and d k (τ ) → 0 as τ → ∞.From (6.3), we have By using the property of function h, we find that the function L(t) is nonnegative with its global minimum point E * .

Fig. 1
Fig. 1 Flow diagram of the nested model.Within-host model: the number of bacteria produced at time τ with resistance level x is 1 1+ +∞ −∞ b ϑ i (τ,x)dx κ +∞ −∞ J (x − y) p(y)b ϑ i (τ, y)dy, where J (x − y) is the probability for a bacterial with resistance level y ∈ R to mutate towards a level x ∈ R and p(y) is the bacterial intrinsic growth rate.Bacterial cells with resistance level x, within an individual with immune system level i are cleared either by the immune system at rate μ i (x) or by the antimicrobial efficiency at rate k(x).Between-host model: susceptible individuals are recruited at a constant rate i .I T i (t, τ) and I U i (t, τ) are respectively treated and untreated infected individuals at time t, which are infected since time τ .The force of infection in the whole population at time t is λ(t) = i∈I

Fig. 2
Fig. 2 Illustration of the within-and between-host parameterization of infected individuals, either untreated-U, under treatment failure-TF, or under treatment with success-TS.A The total bacteria load B ϑ (τ ).B The recovery probability 1 − exp(− τ 0 γ ϑ (s)ds)

Table 1
Within-and between-host model variables and parameters J (x − y)Mutation probability from resistance level x to y per cell divisionp(x)Intrinsic growth rate of bacterial population with resistance level x k(x) Killing rate of bacterial population with resistance level x due to drug μ In addition, note that Then, it can be verified that largest invariant set in d L dt = 0 is the singleton {E * }.It follows that the compact global attractor A 0 , stated by Lemma 5.4, is such that A 0 = {E * }.Therefore, the endemic equilibrium E * is globally asymptotically stable in Y + when R 0 > 1.