1 Introduction

In reaction networks the power law or mass-action leads to a polynomial vector field on a positive cone \({\mathbb {R}}^d_{> 0}\) where \(d\in {\mathbb {N}}\) stands for the number of different species that intervene in the chemical reaction. Moreover, due to linear conservation laws, dynamics may be reduced to polynomial vector fields restricted to a polytope \({\textsf{S}}^\circ \subset \mathbb R^d_{>0}\) called the stoichiometric space, contained in an affine space, \({\textsf{S}}\subset {\mathbb {R}}^d\). For a whole account of such formalism see for instance [1].

We will be interested in reaction networks that are open to the influx or efflux of certain species. According to [1], this considerations are motivated by models of homogenous reactors, alluding to the transport of substrates and products in and out of the reactor. A similar point of view for open reaction networks is also adopted in the formalism introduced in [2,3,4] for open reaction networks. Concentration inflows and outflows manifest themselves in the corresponding dynamical system as forcing terms. The examples studied in [2,3,4] and [1] incorporate constant forcing terms in the autonomous system. We consider the simplest situation in a chemical reactor. Since control of inflow and outflows are modeled, the ODE model with non autonomous terms are not well suited for batch reactors. Moreover, diffusivity phenomena are neglected and not implemented in the ODE models as in plug flow reactor. Therefore, simple and ideal reactor conditions such as homogeneity and instantaneous reaction speed imply that such models can be well suited for instance for continuous stirred-tank reactor (CSTR). This is the case of the model presented in this manuscript.

For a more comprehensive treatment, we are interested in stability results corresponding to reaction networks with oscillatory (time-dependent) inflows and outflows, i.e. non-autonomous dynamical systems.

In the periodic case, further study of open reaction networks associated to enzyme catalysis with periodic inputs appear for instance in [5,6,7,8,9], while in [10] we describe the almost periodic case. Other stability results in simple protein transcription, regarded as a reaction network, can be obtained for the case of periodic inputs [11]. In such work it is stressed the search of a modularity property which would allow to deduce properties of complex reaction networks by considering simple ones. These simple reactions, which may be regarded as building blocks, can be composed or concatenated by its inputs and outputs. Related to such models, in [12] we have proved and generalized to the almost periodic case, a global stability statement properly exemplified and motivated in [11].

As an exploratory case study for a wider project we take the typical reaction where a substrate S is catalysed by an enzyme E, obtaining a complex ES from which we extract a product P,

$$\begin{aligned} {\textrm{E}} + {\textrm{S}} \mathop \leftrightharpoons \limits _{k_{2}}^{k_{1}} {\textrm{ES}} \mathop \rightarrow \limits ^{k_{3}} {\textrm{E}} + {\textrm{P}}.\end{aligned}$$

Our goal along this work is to extend the study of global stability phenomena dealing with oscillatory inputs and / or outputs. Forcing terms may appear simultaneously without assuming any synchronicity of their frequencies. Accordingly, we consider an inhibitor, I, adding the reaction,

$$\begin{aligned} {\textrm{E}} + {\textrm{I}} \mathop \leftrightharpoons \limits _{k_{4}}^{k_{5}} {\textrm{EI}}. \end{aligned}$$
(1)

We get an open reaction network, where we shall consider an oscillatory source introducing species S,I at a time dependent speed \(F_{\textrm{S}} (t)\), \(F_{\textrm{I}}(t)\), respectively. Thus, in agreement with [1] (which can be also adapted to the formalism of [2]) a third fictitious reaction is introduced as follows:

$$\begin{aligned}&{ {\textrm{E}} + {\textrm{S}} \mathop \leftrightharpoons \limits _{k_{2}}^{k_{1}} {\textrm{ES}} \mathop \rightarrow \limits ^{k_{3}} {\textrm{E}} + {\textrm{P}} } \nonumber \\&{ {\textrm{E}} + {\textrm{I}} \mathop \leftrightharpoons \limits _{k_{4}}^{k_{5}} {\textrm{EI}} } \nonumber \\&{\textrm{I}} \mathop \leftrightharpoons \limits _{F_{I}(t)}^{\xi _{I}} \emptyset \mathop \leftrightharpoons \limits _{\xi _{S}}^{F_{S}(t)} {\textrm{S}} \end{aligned}$$
(2)

where \(\xi _{\textrm{I}},\xi _{\textrm{S}}\) are decay rates for the inhibitor and the supply substance respectively. The corresponding numerical explorations described in [13] for reaction (2) exhibits a globally stable stationary state under the assumption of constant supplies \(F_{\textrm{S}},F_\textrm{I}\in {\mathbb {R}}_{>0}\) in the reactor. When we consider oscillatory forcing terms \(F_{\textrm{S}}(t),F_{\textrm{I}}(t)\), in this illustration taken from [13], our main result claims global stability for a positive almost periodic solution.

We have the following representation of the reaction network (2) as an open petri net,

figure a

where we have added Id and Sd, the degraded inhibitor and substrate, respectively. Thus, we consider degraded species as explicit sub-products of the reaction. See [2,3,4] for further explanations about the category of open petri nets and how to relate them to reaction networks.

More precisely, we address the dynamics under mass-law action treated by the following coupled system of ordinary differential equations,

$$\begin{aligned} \displaystyle \frac{d{c}_{\textrm{S}}}{dt}&= k_2c_{\textrm{ES}}-k_1c_\textrm{E}c_{\textrm{S}}+F_{\textrm{S}}(t)-\xi _{\textrm{S}}c_{\textrm{S}}, \\ \frac{d{c}_{\textrm{I}}}{dt}&= k_4c_{\textrm{EI}}-k_5c_{\textrm{E}}c_{\textrm{I}}+F_\textrm{I}(t)-\xi _{\textrm{I}}c_{\textrm{I}}, \\ \frac{d{c}_{\textrm{E}}}{dt}&= k_2c_{\textrm{ES}}-k_1c_{\textrm{E}}c_\textrm{S}+k_4c_{\textrm{EI}}-k_5c_{\textrm{E}}c_{\textrm{I}}+k_3c_{\textrm{ES}}, \\ \frac{d{c}_{\textrm{ES}}}{dt}&= k_1c_{\textrm{E}}c_{\textrm{S}}-k_2c_\textrm{ES}-k_3c_{\textrm{ES}}, \\ \frac{d{c}_{\textrm{EI}}}{dt}&= k_5c_{\textrm{E}}c_{\textrm{I}}-k_4c_{\textrm{EI}}, \\ \frac{d{c}_{\textrm{P}}}{dt}&= k_3c_{\textrm{ES}}, \end{aligned}$$

where \(c_\sigma \) stands for the concentration of the species \(\sigma \). Since \(c_{\textrm{P}}\) is completely determined by the remaining differential equations, we can omit the equation corresponding to the product P. Furthermore, we reduce our problem by restricting the dynamics to the stoichiometric (affine) space

$$\begin{aligned} {\textsf{S}}\subset \mathbb {R}^5,\quad \dim {\textsf{S}}=4, \end{aligned}$$

obtained by the conservation law given by the enzyme global constant amount \(T>0\),

$$\begin{aligned} c_{\textrm{E}}+c_{\textrm{EI}}+c_{\textrm{ES}}=T. \end{aligned}$$
(3)

Hopefully, the reduced system

$$\begin{aligned} \begin{aligned} \frac{d{c}_{\textrm{S}}}{dt}&= -k_1(T-c_{\textrm{ES}}-c_{\textrm{EI}})c_{\textrm{S}}+k_2c_{\textrm{ES}}+F_{\textrm{S}}(t)-\xi _{\textrm{S}}c_{\textrm{S}}, \\ \frac{d{c}_{\textrm{I}}}{dt}&= -k_5(T-c_{\textrm{EI}}-c_{\textrm{ES}})c_{\textrm{I}}+k_4c_{\textrm{EI}}+F_{\textrm{I}}(t)-\xi _{\textrm{I}}c_{\textrm{I}}, \\ \frac{d{c}_{\textrm{ES}}}{dt}&= k_1(T-c_{\textrm{ES}}-c_{\textrm{EI}})c_{\textrm{S}}-(k_2+k_3)c_{\textrm{ES}}, \\ \frac{d{c}_{\textrm{EI}}}{dt}&= k_5(T-c_{\textrm{ES}}-c_{\textrm{EI}})c_\textrm{I}-k_4c_{\textrm{EI}}, \end{aligned}\end{aligned}$$
(4)

which we also denote as

$$\begin{aligned} \frac{dc}{dt}=V(c,F(t)) \end{aligned}$$

with parameters \(k=(k_1,k_2,k_3,k_4,k_5)\in {\mathbb {R}}^5_{>0}\) and \(T>0\), would have a global almost periodic attractor. We will adopt the following notation

$$\begin{aligned} u_{*}:=\inf _{t\in \mathbb {R}}u(t) \;\; \text {and} \;\; u^{*}:=\sup _{t\in \mathbb {R}}u(t). \end{aligned}$$

Theorem 1

Assume that \(F_{\textrm{S}}(t),F_{\textrm{I}}(t)\ge 0\) are non-constant continuous strictly positive almost periodic input functions in system (4). Then there exists a unique positive almost periodic solution which is a global attractor lying within the interior of the positive region of the stoichiometric space,

$$\begin{aligned} {\textsf{S}}^\circ ={\textsf{S}}\cap \mathbb {R}^4_{>0}. \end{aligned}$$

For the reader’s convenience, we give a self contained text. Consequently, we will review some of the properties of almost periodic functions along Sect. 2. We will also introduce the notion of intraspecific monotone dynamical systems that is used for the proof of Theorem 1. Such notion was tacitly used in [14] for the periodic non-autonomous cooperative dynamical systems in \({\mathbb {R}}^2\). We adapted such tools to prove stability results in [15] and [16] for cooperative and competitive dynamical systems in the almost periodic case for \({\mathbb {R}}^2\). We want to stress the fact that the concept of intraspecific monotonicity is stronger than the classical monotonicity property described originally by Hirsch and Smith, see for instance [17, 18]. Along Sect. 4 we present the proof of our main results. We finally display numerical examples in Sect. 6 which illustrate our main statement.

This is a first article in a series of works in preparation, such as [19] coauthored by collaborators. Our program addresses global stability for intraspecific monotone class of open reaction networks. As concrete problems we will study in further works we will generalize our results to other kinetics not just power law. Then we will state characterizations of the intraspecific monotonicity to provide global stability of their general open reactions. Finally we will prove a categorical framework where all such results cam be systematically implemented.

2 Intraspecific monotonic dynamical systems

2.1 K-partial ordering

Monotone dynamical systems were introduced in [17, 18], we just recall some definitions.

Definition 1

Given \(n,m\in \mathbb {N}\) we define the orthant \(K={\mathbb {R}}_{\ge 0}^n\times {\mathbb {R}}_{\le 0}^m\subset {\mathbb {R}}^d\) or

$$\begin{aligned}\begin{aligned} K&= \left\{ u\in {\mathbb {R}}^d :\, u_i\ge 0, u_j\le 0,\, i=1,\dots n,\, j=n+1,\dots ,n+m=d \right\} . \end{aligned}\end{aligned}$$

Notice that \(u\in K\) if and only if

$$\begin{aligned} \sum _{h=1}^d \lambda _te^{(h)},\quad \lambda _t\ge 0, \end{aligned}$$

where

$$\begin{aligned} e^{(h)}:=(\dots ,0,\epsilon _h,0\dots )\in K, \qquad \epsilon _h=\left\{ \begin{array}{ll} 1, &{} h=1,\dots , n, \\ -1, &{} h=n+1,\dots , n+m=d, \end{array}\right. \end{aligned}$$

is a basis of \({\mathbb {R}}^d\). Thus, the orthant K is a cone which allows us to define the K-partial ordering in \(\mathbb {R}^d\) as follows:

$$\begin{aligned} u \preceq v \Leftrightarrow v-u\in K \end{aligned}$$

If \( u \preceq v,\) and \(u_{l_0}\ne v_{l_0} \) for some index \(l_0,\) then we write down

$$\begin{aligned} u\prec v. \end{aligned}$$

If \(u_l\ne v_l,\) for every index \(l=1,\dots ,d,\) then we abbreviate these strict inequalities by

$$\begin{aligned} u\prec \prec v. \end{aligned}$$

Take a non-autonomous system defined in an open domain \((x,y)\in U\subset \mathbb {R}^n\times \mathbb {R}^m\)

$$\begin{aligned} \begin{aligned}&\frac{dx}{dt}=\textrm{f}(t,x(t),y(t)),\\&\frac{dy}{dt}=\textrm{g}(t,x(t),y(t)), \end{aligned} \end{aligned}$$
(5)

where \(\textrm{f, g}\) are \({{\mathcal {C}}}^1\) w.r.t. x,  and continuous w.r.t. \(t\ge 0\). Suppose that the Jacobian \(DV\left( t,{x},{y}\right) \) of system

$$\begin{aligned} V\left( t,{x},{y}\right) = \left( \begin{array}{cc} \textrm{f}\left( t,{x},{y}\right) \\ \textrm{g}\left( t,{x},{y}\right) \end{array}\right) \end{aligned}$$

consists of the submatrices \(P=\partial _x\textrm{f}\left( t,{x},{y}\right) \), \(Q= \partial _y\textrm{f}\left( t,{x},{y}\right) \), \(R=\partial _x\textrm{g}\left( t,{x},{y}\right) \) and \(S=\partial _y\textrm{g}\left( t,{x},{y}\right) \), so that

$$\begin{aligned} DV(t,{x},{y})= \left( \begin{array}{cc} P&{} Q\\ R&{} S \end{array}\right) , \end{aligned}$$

where,

$$\begin{aligned} \begin{aligned} p_{ik}&=\partial _{x_k}\textrm{f}_i, \qquad 1\le i\le n, \quad 1\le k\le n, \\ q_{il}&=\partial _{y_l}\textrm{f}_i, \qquad 1\le i\le n, \quad 1\le l\le m, \\ r_{jk}&=\partial _{x_k}\textrm{g}_j, \quad \qquad 1\le j\le m, \quad 1\le k\le n, \\ s_{jl}&=\partial _{y_l}\textrm{g}_j,\quad \qquad 1\le j\le m, \quad 1\le l\le m, \end{aligned} \end{aligned}$$

or

$$\begin{aligned} DV(t,x,y)= \left( \begin{array}{ccccccc} {p_{11}} &{} p_{12}&{} \cdots &{} p_{1n}&{} q_{11} &{} \cdots &{} q_{1n} \\ \vdots &{} \vdots &{} \ddots &{} &{} \vdots &{} \ddots &{} \vdots \\ p_{n1} &{} p_{n2} &{} \cdots &{}{p_{nn}}&{} q_{n1} &{} \cdots &{} q_{nn} \\ r_{11} &{} r_{11} &{} \cdots &{} r_{1n} &{} { s_{11}} &{} \cdots &{} s_{1n} \\ \vdots &{} \vdots &{} &{} &{} \vdots &{} &{} \vdots \\ \vdots &{} \vdots &{} &{} &{} \vdots &{} \ddots &{} \vdots \\ r_{m1} &{}r_{m2}&{} \cdots &{} r_{mn}&{} s_{m1} &{} \cdots &{} {s_{mn}} \end{array}\right) . \end{aligned}$$

Definition 2

A system such as (5) is said to be a K-mononte system in \(\mathbb {R}\times U\), if for every \(t \in \mathbb {R},\) and \((x, y)\in U\), the following inequalities hold:

$$\begin{aligned} \begin{array}{ll} \epsilon _{k}\cdot p_{ik}\ge 0, &{} \epsilon _{n+l}\cdot q_{il}\ge 0, \\ i,k=1,\dots ,n; &{} l=1,\dots ,m, \\ i \ne k,&{} \\ \epsilon _{k}\cdot r_{jk}\ge 0, &{} \epsilon _{n+l}\cdot s_{jl}\ge 0, \\ k=1,\dots ,n; &{} j,l=1,\dots ,m, \\ &{} j\ne l. \end{array} \end{aligned}$$
(6)

Furthermore, we say that (5) is K-intraspecific and monotone if

$$\begin{aligned} \begin{array}{ll} \epsilon _{k}\cdot p_{ik}\ge 0, &{} \epsilon _{n+l}\cdot q_{il}\ge 0, \\ i,k=1,\dots ,n; &{} l=1,\dots ,m, \\ \epsilon _{k}\cdot r_{jk}\ge 0, &{} \epsilon _{n+l}\cdot s_{jl}\ge 0, \\ k=1,\dots ,n; &{} j,l=1,\dots ,m. \end{array} \end{aligned}$$
(7)

To illustrate the difference between monotone system and intraspecific and monotone take for instance, in the case of the orthant \(K= {\mathbb {R}}^n_{\ge 0}\times {\mathbb {R}}^m_{\le 0}\). For the square matrix composed of the diagonal terms of the Jacobian matrix

$$\begin{aligned} \Delta =\textrm{diag}\left\{ p_{11},p_{22},\dots ,p_{nn},s_{11},\dots ,s_{mm}\right\} =\textrm{diag}\left\{ \Delta _1,\dots , \Delta _{n+m}\right\} , \end{aligned}$$
(8)

the monotone case signed entries do not belong to the diagonal of DV(txy) for all \(t\in \mathbb {R}\), i.e.

$$\begin{aligned} \left( \begin{array}{ccccccc} \Delta _1 &{} \cdots &{} + &{} - &{} \cdots &{} - \\ \vdots &{} \ddots &{} &{} \vdots &{} \ddots &{} \vdots \\ + &{} \cdots &{} \Delta _n &{} - &{} \cdots &{} - \\ - &{} \cdots &{} - &{}\Delta _{n+1} &{} \cdots &{} + \\ \vdots &{} &{} &{} \vdots &{} &{} \vdots \\ - &{} \cdots &{} - &{} + &{} \cdots &{} \Delta _{n+m} \end{array}\right) , \end{aligned}$$

where positivity or negativity of the entries is not required to be strict.

On the other hand, intraspecific monotonicity require the signed quantities in every entry of the diagonal of the Jacobian as follows

$$\begin{aligned} \left( \begin{array}{ccccccc} + &{} \cdots &{} + &{} - &{} \cdots &{} - \\ \vdots &{} \vdots &{} \ddots &{} &{} \vdots &{} \ddots &{} \vdots \\ + &{} \cdots &{} + &{} - &{} \cdots &{} - \\ - &{} \cdots &{} - &{}+ &{} \cdots &{} + \\ \vdots &{} &{} &{} \vdots &{} &{} \vdots \\ - &{} \cdots &{} - &{} + &{} \cdots &{} + \end{array}\right) . \end{aligned}$$

Meanwhile, for the reversed order defined by the inverse cone \(-K= {\mathbb {R}}^n_{\le 0}\times {\mathbb {R}}^m_{\ge 0}\), the \((-K)\)-monotonicity property follows from the signed Jacobian matrix

$$\begin{aligned} \left( \begin{array}{ccccccc} \Delta _1 &{} \cdots &{} -&{} + &{} \cdots &{} + \\ \vdots &{} \ddots &{} &{} \vdots &{} \ddots &{} \vdots \\ - &{} \cdots &{} \Delta _n &{} + &{} \cdots &{} + \\ + &{} \cdots &{} + &{}\Delta _{n+1} &{} \cdots &{} - \\ \vdots &{} &{} &{} \vdots &{} &{} \vdots \\ + &{} \cdots &{} + &{} - &{} \cdots &{} \Delta _{n+m} \end{array}\right) . \end{aligned}$$
(9)

and the intraspecific monotonicity can be verified by as the following signs for the entries of the diagonal of the Jacobian

$$\begin{aligned} \left( \begin{array}{ccccccc} - &{} \cdots &{} -&{} + &{} \cdots &{} + \\ \vdots &{} \ddots &{} &{} \vdots &{} \ddots &{} \vdots \\ - &{} \cdots &{} - &{} + &{} \cdots &{} + \\ + &{} \cdots &{} + &{}- &{} \cdots &{} - \\ \vdots &{} &{} &{} \vdots &{} &{} \vdots \\ + &{} \cdots &{} + &{} - &{} \cdots &{} - \end{array}\right) . \end{aligned}$$
(10)

Definition 3

We say that \((\omega (t), \zeta (t))\in \mathbb {R}^n\times \mathbb {R}^m\) is a K-sub-solution of (5) with respect to the order \(\preceq \) if

$$\begin{aligned} \left( \text {f}(t, \omega (t), \zeta (t)),\text {g}(t, \omega (t), \zeta (t))\right) \succeq \left( \frac{\omega (t)}{dt},\frac{d\zeta (t)}{dt}\right) , \quad \forall t\ge 0. \end{aligned}$$
(11)

Analogously, \((\Omega (t), Z(t))\in \mathbb {R}^n\times \mathbb {R}^m\) is a K-super-solution if

$$\begin{aligned} \left( \frac{d{\Omega }(t)}{dt},\frac{d{Z}(t)}{dt}\right) \succeq \left( \textrm{f}(t, \Omega (t), Z(t)), \textrm{g}(t, \Omega (t), Z(t))\right) \quad \forall t\ge 0. \end{aligned}$$
(12)

We say that a pair sub-super-solution is ordered, if we have

$$\begin{aligned} (\omega (t),\zeta (t))\preceq (\Omega (t),Z(t)); \qquad \forall t\in \mathbb {R}_{\ge 0}. \end{aligned}$$

In the case of the reversed order defined by the inverse cone \(-K= {\mathbb {R}}^n_{\le 0}\times {\mathbb {R}}^m_{\ge 0}\) we say that \((\omega (t), \zeta (t))\in \mathbb {R}^n\times \mathbb {R}^m\) is a \((-K)\)-sub-solution of (5) with respect to the \((-K)\)-order if

$$\begin{aligned} \begin{aligned} \frac{d{\omega }_i}{dt}&\ge \textrm{f}_i(t, \omega (t), \zeta (t)),\qquad \frac{d{\zeta }_j}{dt}\le \textrm{g}_j(t, \omega (t), \zeta (t)),\\ \forall \, i&=1,\dots ,n;\quad j=1,\dots ,m;\quad t \ge 0. \end{aligned} \end{aligned}$$
(13)

Analogously, \((\Omega (t), Z(t))\) is a \((-K)\)-super-solution if

$$\begin{aligned} \begin{aligned} \frac{d{\Omega }_i}{dt}&\le \textrm{f}_i(t, \Omega (t), Z(t)),\qquad \frac{d{Z}_j}{dt}\ge \textrm{g}_j(t, \Omega (t), Z(t)),\\ \forall \, i&=1,\dots ,n;\quad j=1,\dots ,m;\quad t \ge 0. \end{aligned} \end{aligned}$$
(14)

According to Kamke, condition (7) is an infinitesimal characterization of the basic fact that the flow of such systems preserves the partial ordering we have just defined. This property is stated as follows.

Lemma 1

Suppose that \((\omega (t),\zeta (t))\prec \prec (\Omega (t),Z(t))\) is a sub- super-solution pair with respect to the K-ordering of \(\mathbb {R}^d\). Then the flow of the monotone system (5) preserves the order \(\prec \). That is, if a solution \((\textrm{x}(t),\textrm{y}(t))\) has initial condition such that

$$\begin{aligned} (\omega (0),\zeta (0))\prec \prec (\textrm{x}(0),\textrm{y}(0))\prec \prec (\Omega (0),Z(0)). \end{aligned}$$
(15)

Then

$$\begin{aligned} (\omega (t),\zeta (t))\prec \prec (\textrm{x}(t),\textrm{y}(t))\prec \prec (\Omega (t),Z(t)), \qquad \forall t\ge 0. \end{aligned}$$
(16)

This claim appears for instance in [17] where it is stated that the rôle of the relation \(\prec \prec \) can be also performed for by \(\prec ,\preceq \).

Proof

(Proof of Lemma 1) Define \(w(t):=\textrm{x}(t)-\omega (t)\), and \(z(t):=\textrm{y}(t)-\zeta (t)\), so that \(\textrm{f}(t,\omega ,\zeta )\ge \frac{d{\omega }}{dt}\) implies

$$\begin{aligned}\begin{aligned} \frac{dw}{dt}&= \textrm{f}(t,\textrm{x},\textrm{y})-\frac{d{\omega }}{dt} \\&=\textrm{f}(t,\omega ,\zeta )- \frac{d{\omega }}{dt} + \partial _x\textrm{f}\left( t,\textrm{x}^{\theta _0},\textrm{y}^{\theta _0}\right) ^\dagger (\textrm{x}-\omega ) + \partial _y\textrm{f}\left( t,\textrm{x}^{\theta _0},\textrm{y}^{\theta _0}\right) ^\dagger (\textrm{y}-\zeta ), \\ \frac{d{w}_i}{dt}&\ge \left\langle \partial _x\textrm{f}_i\left( t,\textrm{x}^{\theta _0},\textrm{y}^{\theta _0}\right) , (\textrm{x}-\omega ) \right\rangle + \left\langle \partial _y\textrm{f}_i\left( t,\textrm{x}^{\theta _0},\textrm{y}^{\theta _0}\right) , (\textrm{y}-\zeta )\right\rangle \\&=(P w+Q z)_i, \end{aligned}\end{aligned}$$

where \(\textrm{x}^\theta (t)=\theta \textrm{x}(t)+(1-\theta )\omega (t)\in \mathbb {R}^n,\) \(\textrm{y}^\theta (t)=\theta \textrm{y}(t)+(1-\theta ) \zeta (t)\in \mathbb {R}^m\), denote an intermediate point for every \(\theta \in [0,1]\). The usual inner product in \(\mathbb {R}^N\) for \(N=n,m\) is denoted by \(\langle \cdot ,\cdot \rangle \).

If we proceed analogously with \(\frac{dz}{dt}=f(t,\textrm{x, y})-\frac{d\zeta }{dt}\), then

$$\begin{aligned} \left( \begin{array}{c} \frac{dw}{dt} \\ \frac{dz}{dt} \end{array}\right) \succeq \left( \begin{array}{c} P w + Q z \\ R w+S z \end{array}\right) ,\qquad \left( \begin{array}{c} {w}(0) \\ {z}(0) \end{array}\right) \succ \succ \left( \begin{array}{c} \textbf{0} \\ \textbf{0} \end{array}\right) . \end{aligned}$$
(17)

We denote the primitives of

$$\begin{aligned} \Delta =\textrm{diag}\left\{ \Delta _1,\dots ,\Delta _{n+m}\right\} \end{aligned}$$

as

$$\begin{aligned}\begin{aligned} \mu _h(t)&=e^{-\int ^t \Delta _h}>0,\qquad h=1,\dots ,n, \\ \nu _h(t)&=e^{-\int ^t \Delta _h}>0,\qquad h=n+1,\dots ,n+m. \end{aligned}\end{aligned}$$

Then the proof we are looking for will follow from the following assertion.

Claim: Each \(\mu _iw_i\) is monotone increasing for \(i=1,\dots ,n,\) with \(w_i(0)> 0\). Also each \(\nu _jz_j\), \(j=1,\dots ,m\), is monotone decreasing with \(z_j(0)< 0\).

We now proceed this claim. We observe that,

$$\begin{aligned} \begin{aligned} \frac{d}{dt} \left( \begin{array}{c} \mu \centerdot w \\ \nu \centerdot z \end{array}\right)&= \left( \begin{array}{c} \mu \centerdot \frac{dw}{dt} \\ \nu \centerdot \frac{dz}{dt} \end{array}\right) +\left( \begin{array}{c} \frac{d\mu }{dt}\centerdot w \\ \frac{d\nu }{dt}\centerdot z \end{array}\right) \\&\succeq \left( \begin{array}{c} \mu \centerdot (P w + Q z) \\ \nu \centerdot (R w+S z) \end{array}\right) -\Delta \left( \begin{array}{c} {\mu } \\ {\nu } \end{array}\right) \centerdot \left( \begin{array}{c} w \\ z \end{array}\right) \\&= \left( \begin{array}{c} {\mu } \\ {\nu } \end{array}\right) \centerdot \left[ \left( \begin{array}{cc} P &{} Q \\ R&{}S \end{array}\right) -\Delta \right] \left( \begin{array}{c} w \\ z \end{array}\right) , \end{aligned} \end{aligned}$$

or

$$\begin{aligned} \frac{d}{dt} \left( \begin{array}{c} \mu \centerdot w \\ \nu \centerdot z \end{array}\right) \succeq \left( \begin{array}{c} {\mu } \\ {\nu } \end{array}\right) \centerdot \left[ DV(t,x,y) -\Delta \right] \left( \begin{array}{c} w \\ z \end{array}\right) , \end{aligned}$$
(18)

where \(u\centerdot v\in \mathbb {R}^N\) for \(u,v\in \mathbb {R}^N\), denotes the following associative product

$$\begin{aligned} u\centerdot v:=(\mathrm{diag\,}u)v=(u_1v_1,\dots ,u_Nv_N)\in \mathbb {R}^N,\, N=n,m\text { or }n+m. \end{aligned}$$

Remark that the matrix \(DV-\Delta \) is the same as DV but with zeros along its diagonal.

Define

$$\begin{aligned}\begin{aligned} t_{w_i}&:= \inf \{t>0:\,{w}_i(t)<0\}\ge 0,\qquad i=1,\dots ,n, \\ t_{z_j}&:=\inf \{t>0:\,{z}_j(t)>0\}\ge 0,\qquad j=1,\dots ,m, \end{aligned}\end{aligned}$$

all of them in \(\mathbb {R}\cup \{\infty \}\). By the very definition, there are intervals

$$\begin{aligned} \frac{d{w}_i(t)}{dt}<0,\quad \forall t\in (t_{w_i},t_{w_i}+\epsilon ),\qquad \frac{d{z}_j(t)}{dt}>0,\quad \forall t\in (t_{z_j},t_{z_j}+\epsilon ). \end{aligned}$$

Moreover,

$$\begin{aligned} {w}_i(t_{w_i})=0,\qquad {z}_j(t_{z_j})=0, \end{aligned}$$
(19)

while

$$\begin{aligned} {w}_i(t)\ge 0,\qquad {z}_j(t) \le 0, \end{aligned}$$

for every \(t\in [0,t_{w_i}]\) and \(t\in [0,t_{z_j}],\) respectively. Furthermore, for \(\varepsilon >0\) small enough we can also consider \(w_i(t)<0\) or \(z_j(t)>0\) along those intervals, \((t_{w_i},t_{w_i}+\varepsilon )\) and \((t_{z_j},t_{z_j}+\varepsilon ),\) respectively.

Suppose that the variables \(v_h,\) with \(h=1,\dots ,n+m\) run over both sets of values \(w_i,z_j\) for \(i=1,\dots ,n,\) and \(j=1,\dots ,m\) in such a way that

$$\begin{aligned} 0<t_{v_1}\le t_{v_2}\le \dots \le t_{v_{n+m}}. \end{aligned}$$

If \(t_{v_1}=\infty \) then we are done. To prove our claim we proceed by contradiction. Suppose that

$$\begin{aligned} 0<t_{v_1}<\infty ,\qquad t_{v_1}\le t_{v_{j}}\le \infty . \end{aligned}$$

Then

$$\begin{aligned} \left( \begin{array}{c} w(t) \\ z(t)\end{array} \right) \succeq \left( \begin{array}{c}\textbf{0} \\ \textbf{0}\end{array}\right) , \end{aligned}$$

Hence, when we substitute monotonicity conditions (7) in (18), we obtain

$$\begin{aligned} \left. \frac{d}{dt}\right| _{t\le t_{v_1}}\left( \begin{array}{c} \mu \centerdot w \\ \nu \centerdot z \end{array}\right) \succeq \left( \begin{array}{c} \textbf{0} \\ \textbf{0} \end{array}\right) , \qquad \forall t\in [0,t_{v_1}]. \end{aligned}$$

Indeed, if for instance \({v}_{1}=w_{i_1}\) for certain index \(i_1\) fixed, then for \(t\in (t_{w_{i_1}},t_{w_{i_1}}+\epsilon )\), we have that \(w_{i_1}(t)\ge 0\le z_{i_1}(t)\), because for every \(t\in (t_{w_{i_1}},t_{w_{i_1}}+\epsilon )\),

$$\begin{aligned}\begin{aligned} \frac{d}{dt}\left( {\mu }_{i_1}{w}_{i_1}\right) (t)&\ge {\mu }_{i_1}(t)\left[ \sum _{k=1,\,k\ne i_1}^np_{i_1k}(t){w}_{k}(t) + \sum _{l=1}^mq_{i_1l}(t){z}_{l}(t) \right] \ge 0. \end{aligned}\end{aligned}$$

Whence, we obtain a contradiction with (19), namely,

$$\begin{aligned} \mu _i(t_{w_i})w_i(t_{w_i})\ge \mu _i(0)w_i(0)>0, \end{aligned}$$

or \(w_{i_1}(t_{w_{i_1}})>0\) (not \(w_{i_1}(t_{w_{i_1}})=0\)).

We can reach a similar contradiction by supposing \(v_1=z_j\) for some j fixed.

We have thus proved that \(\mu w,\) \(\nu z\) are monotone increasing and decreasing respectively, with \((w(0),z(0))\succ \textbf{0}\). Therefore, \((w(t),z(t))\succ \textbf{0}\) for all \(t\ge 0\). This proves a couple of inequalities in (16). The other couple can be proved analogously. \(\square \)

In the reversed order of \(-K\) a pair sub-super-solution if a solution \((\textrm{x}(t),\textrm{y}(t))\) has initial condition such that

$$\begin{aligned} \begin{aligned} \omega _i(0)&>\textrm{x}_i(0)>\Omega _i(0), \text { and } Z_j(0)>\textrm{y}_j(0)>\zeta _j(0),\\ \forall \, i&=1,\dots ,n;\quad j=1,\dots ,m. \end{aligned} \end{aligned}$$
(20)

Then

$$\begin{aligned} {\begin{aligned} \omega _i(t)&>\textrm{x}_i(t)> \Omega _i(t),\quad Z_j(t)> \textrm{y}_j(t)> \zeta _j(t),\\ \forall \, i&=1,\dots ,n;\quad j=1,\dots ,m,\qquad t\ge 0. \end{aligned}} \end{aligned}$$
(21)

3 Almost periodic functions

We now recall basic concepts and facts about almost periodic functions, see [20, 21] for an exhaustive study.

Definition 4

The space of almost periodic functions is the closure \(\overline{{\mathcal {T}}}= {\mathcal {A}}{\mathcal {P}}({\mathbb {R}},{\mathbb {C}})\) of the algebra \({\mathcal {T}}\) of all trigonometric polynomials

$$\begin{aligned} c_0+c_1e^{\lambda _1t}+\dots +c_ne^{\lambda _nt} \end{aligned}$$

whose frequency set, \(\{\lambda _1\dots ,\lambda _N\}\subset {\mathbb {R}}\) is arbitrary and \(c_k\in {\mathbb {C}}\) for \(k=1,\dots ,N\). We consider \({\mathcal {T}}\) as a subspace of the space of bounded continuous functions \({\mathcal {C}}{\mathcal {B}}({\mathbb {R}},{\mathbb {C}})\) with the \(\sup \)-norm.

We just write down the main properties of the space \({\mathcal {A}}{\mathcal {P}}({\mathbb {R}},{\mathbb {C}})\):

  1. i)

    Every \(\phi \in {\mathcal {A}}{\mathcal {P}}(\mathbb {R},\mathbb {C})\) is uniformly continuous.

  2. ii)

    \({\mathcal {A}}{\mathcal {P}}(\mathbb {R},\mathbb {C})\) is a Banach algebra.

  3. iii)

    For every \(\phi \in {\mathcal {A}}{\mathcal {P}}(\mathbb {R},\mathbb {C})\) there exists a numerable collection of frequencies \(\{\lambda _k\}_{k=1}^\infty \subset {\mathbb {R}}\) whose corresponding Fourier coefficients:

    $$\begin{aligned} c[\phi ,\lambda _k]=\lim _{t\rightarrow \infty }\frac{1}{t-t_0}\int _{t_0}^t\phi (s)\cdot e^{-\textrm{i}\lambda _ks}ds \end{aligned}$$

    which do not vanish and do not depend on \(t_0\). There exists an associated complex Fourier series

    $$\begin{aligned} \phi (t)\sim \sum _{k=1}^\infty c[\phi ,\lambda _k]e^{\textrm{i}\lambda _kt}. \end{aligned}$$
  4. iv)

    For every \(\phi \in {\mathcal {A}}{\mathcal {P}}(\mathbb {R},\mathbb {C})\), there exists the mean value,

    $$\begin{aligned} M[\phi ]=\lim _{t\rightarrow \infty }\frac{1}{t-t_0}\int _{t_0}^t\phi (s)\,ds, \end{aligned}$$

    which is a well defined positive linear continuous functional, \(M:{\mathcal {A}}{\mathcal {P}}(\mathbb {R},\mathbb {C})\rightarrow \mathbb {C}\), regardless of \(t_0\in \mathbb R\).

  5. v)

    For every \(\phi \in {\mathcal {A}}{\mathcal {P}}(\mathbb {R},\mathbb {C})\), the Parseval’s equality holds:

    $$\begin{aligned} M\left[ |\phi |^2\right] =\sum _{k=1}^\infty \left| c[\phi ,\lambda _k]\right| ^2. \end{aligned}$$

Definition 5

A continuous function \(f:\mathbb {R}\times U\rightarrow \mathbb {R}\) is said to be uniformly almost periodic with respect to \(x\in U\subset \mathbb {R}^n\) if for every compact \(K\subset U\),

$$\begin{aligned} |f(t + \tau ,x) - f (t,x)| < \varepsilon , \forall t \in \mathbb {R}, \forall x \in U \end{aligned}$$

for each translation number, \(\tau \in T(\varepsilon ,f,K)\), and any length \(\ell (\varepsilon ,f,K) > 0\), not depending on a particular choice x remaining the same on compact set \(K\subset U\).

More specifically, if f has real Fourier expansion,

$$\begin{aligned} f(t,x) \sim {\overline{f}}(x) + \sum _{k=0}^\infty a[f, \lambda _k;x] \cos (\lambda _kt) + b[f, \lambda _k;x] \sin (\lambda _kt), \end{aligned}$$

then f is uniformly almost periodic, whenever the Fourier frequencies \(\lambda _k\) do not depend on x, see [21] Chapter VI.

4 Proof of existence of an almost periodic asymptotic limit

The following claim is a generalization to \(\mathbb {R}^d,\, d\ge 3\) of a statement proven in [14] for a periodic cooperative system and in [16] for competitive systems in \(\mathbb R^2\).

Theorem 2

(Existence and global asymptotic limit) Assume that the system (5) has components, \(\textrm{f,g},\) which are uniformly almost periodic with respect to \((x,y)\in D\subset \mathbb {R}^n\times \mathbb {R}^m,\) of class \({{\mathcal {C}}}^1\) in (xy). The following assertions hold true:

  1. I.

    If it is K-monotone with an almost periodic sub-super-solution pair

    $$\begin{aligned} (\omega (t), \zeta (t))\prec \prec (\Omega (t), Z(t)) \end{aligned}$$

    that are not necessarily solutions of (5). Then the system has an almost periodic solution \(({x}^\star (t), {y}^\star (t))\), satisfying

    $$\begin{aligned} (\omega (t),\zeta (t)) \preceq ({x}^\star (t),{y}^\star (t))\preceq (\Omega (t), Z(t)), \quad \forall t\ge 0. \end{aligned}$$
    (22)
  2. II.

    Any solution \((\textrm{x}(t),\textrm{y}(t))\) of (5) with initial condition

    $$\begin{aligned} (\omega (0), \zeta (0))\prec \prec (\textrm{x}(0),\textrm{y}(0)) \prec \prec (\Omega (0),Z(0)), \end{aligned}$$
    (23)

    satisfies one of the following properties:

    1. (a)

      Either \((\textrm{x}(t),\textrm{y}(t))\) converges asymptotically towards an almost periodic solution \(({x}^\star (t),{y}^\star (t))\),

      $$\begin{aligned} \lim _{t\rightarrow \infty }\left\| (\textrm{x}(t),\textrm{y}(t))- ({x}^\star (t),{y}^\star (t))\right\| =0 \end{aligned}$$
      (24)
    2. (b)

      There are almost periodic solutions \(({x}^\star (t),{y}^\star (t))\preceq ({x}_\star (t),{y}_\star (t))\) and \(T\ge 0\) such that for \(t\ge T\ge 0\)

      $$\begin{aligned} \left( {x}^\star (t),{y}^\star (t)\right) \preceq \left( \textrm{x}(t),\textrm{y}(t)\right) \preceq \left( {x}_\star (t),{y}_\star (t)\right) . \end{aligned}$$
      (25)

If there is just one almost periodic solution (x(t), y(t)) satisfying the initial condition (27). Then we conclude global asymptotic almost periodic limit, i.e. any solution \((\textrm{x}(t),\textrm{y}(t))\) of (5) satisfying the initial condition (23) converges asymptotically to the unique almost periodic attractor (x(t), y(t)),

$$\begin{aligned} \lim _{t\rightarrow \infty }\left\| (\textrm{x}(t),\textrm{y}(t))- ({x}(t),{y}(t))\right\| =0. \end{aligned}$$
(26)

Remark 1

Notice that in the conclusion of the Main Theorem 2

$$\begin{aligned} (\check{x}(t), \check{y}(t)) \preceq ({x}^\star (t),{y}^\star (t)) \preceq ({\hat{x}}(t), {\hat{y}}(t)) \end{aligned}$$

where \( (\check{x}(t), \check{y}(t)) \preceq ({\hat{x}}(t), {\hat{y}}(t))\) are K-minimal and K-maximal almost periodic solutions of (22), respectively, satisfying the initial condition

$$\begin{aligned} (\omega (0), \zeta (0))\prec \prec ({x}^\star (0),{y}^\star (0)) \prec \prec (\Omega (0),Z(0)). \end{aligned}$$

Indeed, the non-empty set of almost periodic orbits (x(t), y(t)) such that

$$\begin{aligned} (\omega (0),\zeta (0)) \preceq (x(0),y(0)) \preceq (\Omega (0),Z(0)), \end{aligned}$$
(27)

is partially ordered by \(\preceq \). Therefore, we can consider \((\check{x}(t),\check{y}(t)),\) \(({\hat{x}}(t),{\hat{y}}(t)),\) the minimal and maximal almost periodic solutions, respectively.

Corollary 1

If the same conditions as in Theorem 2 hold true. Assuming also that there exists just one almost periodic solution (x(t), y(t)) with initial condition (27). If \((\omega (t), \zeta (t))\equiv (\omega _0,\zeta _0)\) and \((\Omega (t), Z(t))\equiv (\Omega _0,Z_0)\) consists of constant sub-super-solution pair with respect to the K-ordering. Then any solution of (5), with initial condition \((\textrm{x}(0), \textrm{y}(0))\) inside the rectangle

$$\begin{aligned} (\omega _0,\zeta _0) \prec \prec (\textrm{x}(0),\textrm{y}(0)) \prec \prec (\Omega _0,Z_0), \end{aligned}$$

converges asymptotically as in (26) to the unique almost periodic solution, (x(t), y(t)) contained in such rectangle

$$\begin{aligned} (\omega _0,\zeta _0) \prec \prec ({x}(t),{y}(t)) \prec \prec (\Omega _0,Z_0). \end{aligned}$$

4.1 Proof of Existence of an almost periodic solution in Theorem 2

We first prove the existence of almost periodic solutions. Take \(x_0=\omega \), \(y_0=\zeta \). Let \(x_1(t),y_1(t)\) be the unique almost periodic solution of the following non-homogeneous linear system,

$$\begin{aligned} \begin{aligned} \frac{d{x}_1}{dt}+Lx_1=L x_0 + \textrm{f}(t,x_0,y_0),\\ \frac{d{y}_1}{dt}+Ly_1=L y_0 + \textrm{g}(t,x_0,y_0), \end{aligned} \end{aligned}$$
(28)

which exists for any non-homogeneous linear ODE according to [21]. More specificaly,

$$\begin{aligned} x_{1,i}(t)=e^{-Lt}\left[ c_0+\int _0^t e^{Ls}\left( Lx_0(s)+\mathrm f(z,x_0(s),y_0(s))\right) \, ds\right] , \, i=1,\dots , n, \end{aligned}$$

with integration constant

$$\begin{aligned} c_0\!=\!-\int _0^{\infty } e^{Ls}\left( Lx_0(s)\!+\!\mathrm f(z,x_0(s),y_0(s))\right) \, ds \ge \! -\!\int _0^{\infty } e^{Ls}\left( L\omega (s)\!+\!\frac{d\omega (s)}{ds}\right) \, ds. \end{aligned}$$

Here \(L> 0\) is a scalar to be chosen such that \(L + \inf _C\{\partial _{x_k} \textrm{f}_i(t,x,y)\} >0 \) and \( L +\inf _C\{\partial _{y_l} \textrm{g}_j(t,x,y)\}>0\) where

$$\begin{aligned} C=\{(t,x,y):\, x_i\in [\omega _i(t),\Omega _i(t)],y_j\in [Z_j(t),\zeta _j(t)],\,t\in \mathbb {R} \}. \end{aligned}$$

We also use almost periodic uniformity with respect to (xy), see [21].

For each coordinate index, \(i=1,\dots ,n\), we have

$$\begin{aligned} L(x_{1,i}-\omega _i)=\textrm{f}_i(t,\omega ,\zeta )-\frac{d{x}_{1,i}}{dt}\ge \frac{d{\omega }_i}{dt} - \frac{d{x}_{1,i}}{dt}. \end{aligned}$$

Thus,

$$\begin{aligned} { \frac{d}{dt}({x}_{1,i}- \omega _i) + L(x_{1,i}-\omega _i)= \alpha _{1,i}(t):= \textrm{f}_i(t,\omega (t),\zeta (t))-\frac{d{\omega }_i(t)}{dt}\ge 0. }\end{aligned}$$
(29)

By Gronwall’s inequality

$$\begin{aligned} x_{1,i}(t)-\omega _i(t)\ge (x_{1,i}(0)-\omega _i(0))e^{-Lt}\ge 0,\quad \forall t\ge 0. \end{aligned}$$

On the other hand, for \(y_1\) we have \(L(y_{1,j}-\zeta _j)=\textrm{g}_j(t,x_0,y_0)-\frac{d{y}_{1,j}}{dt}\le \frac{d{\zeta }_j}{dt}-\frac{d{y}_{1,j}}{dt}\) or

$$\begin{aligned} \frac{d}{dt}({y}_{1,j}- \zeta _j) + L(y_{1,j}-\zeta _j)=:\beta _{1,j}(t)\le 0. \end{aligned}$$

By induction we define \((x_{\texttt {n}+1},y_{\texttt {n}+1})\) from \((x_{\texttt {n}},y_{\texttt {n}})\) for every \(\texttt {n}\in \mathbb {N},\) by taking the unique almost periodic solutions of the following linear non-homogeneous equations:

$$\begin{aligned} \begin{aligned} \frac{d}{dt}{x}_{\texttt {n}+1}+L\,x_{\texttt {n}+1}&= L\, x_{\texttt {n}}+\,\text {f}(t,x_{\texttt {n}},y_{\texttt {n}}), \\ \frac{d}{dt}y_{\texttt {n}+1}+L\, y_{\texttt {n}+1}&= L\, y_{\texttt {n}}+\,\text {g}(t,x_{\texttt {n}},y_{\texttt {n}}). \end{aligned}\end{aligned}$$
(30)

Hence,

$$\begin{aligned}\begin{aligned} \frac{d}{dt}({x}_{\texttt {n}+1}-x_{\texttt {n}})+L(x_{\texttt {n}+1}-x_{\texttt {n}})&= \alpha _{\texttt {n}}, \\ \frac{d}{dt}(y_{\texttt {n}+1}-y_{\texttt {n}})+L(y_{\texttt {n}+1}-y_{\texttt {n}})&= \beta _{\texttt {n}}, \end{aligned}\end{aligned}$$

with

$$\begin{aligned}\begin{aligned} \alpha _{\texttt {n}}&= -\frac{d{x}_{\texttt {n}}}{dt}+\text {f}(t,x_{\texttt {n}-1},y_{\texttt {n}-1})+\text {r}_{\texttt {n}}, \qquad \text {r}_{\texttt {n}}= \text {f}(t,x_{\texttt {n}},y_{\texttt {n}}) -\text {f}(t,x_{\texttt {n-1}},y_{\texttt {n-1}}), \\ \beta _{\texttt {n}}&= -\frac{d{y}_{\texttt {n}}}{dt}+\text {g}(t,x_{\texttt {n}-1},y_{\texttt {n}-1})+\text {s}_{\texttt {n}}, \qquad \text {s}_{\texttt {n}}= \text {g}(t,x_{\texttt {n}},y_{\texttt {n}})-\text {g}(t,x_{\texttt {n-1}},y_{\texttt {n-1}}). \end{aligned}\end{aligned}$$

Because of (7), \(\textrm{f}_i(t,x_\texttt {n},y_\texttt {n})\) is monotone increasing with respect to its components \(x_{\texttt {n},k}\). At the same time, it is monotone decreasing with respect to the components \(y_{\texttt {n},l}\). Thus, by induction hypothesis for \(k=1,\dots ,n;\) and \(l=1,\dots ,m.\)

$$\begin{aligned} x_{{\texttt {n}},k}\ge x_{{\texttt {n}-1},k}, \qquad y_{{\texttt {n}},l}\le y_{{\texttt {n}-1},l}. \end{aligned}$$

Therefore,

$$\begin{aligned}{} & {} {\texttt {r}}_{{\texttt {n}},i}= \text {f}_i(t,x_{\texttt {n}},y_{\texttt {n}})- \text {f}_i(t, x_{{\texttt {n}-1}},y_{{\texttt {n}}}) + \text {f}_i(t, x_{\texttt {n}-1},y_{\texttt {n}})- \text {f}_i(t, x_{\texttt {n}-1},y_{\texttt {n}-1}) \ge 0, \, \\{} & {} \forall i= 1,\dots ,\texttt{n}. \end{aligned}$$

In the non intraspecific case \(\textrm{f}_i\) is not monotone w.r.t. \(x_i\). Nonetheless, a suitable choice of L allows us to conclude that \(\alpha _\texttt {n}\ge 0\). Similarly, \( \texttt {s}_{\texttt {n},j}\le 0\) for \(j=1,\dots ,m\). Also,

$$\begin{aligned} -\frac{d{x}_{{\texttt {n}},i}}{dt}+\text {f}_i(t,x_{\texttt {n}-1},y_{\texttt {n}-1})\ge 0 \end{aligned}$$

by induction hypothesis. Thus,

$$\begin{aligned} \frac{d}{dt}({x}_{{\texttt {n}+1},i}-x_{{\texttt {n}},i})+L(x_{{\texttt {n}+1},i}-x_{{\texttt {n}},i})\ge 0, \end{aligned}$$

and

$$\begin{aligned} \frac{d}{dt}(y_{{\texttt {n}+1},i}-y_{{\texttt {n}},i})+L(y_{{\texttt {n}+1},j}-y_{{\texttt {n}},j})\le 0. \end{aligned}$$

By induction we have just proven that

$$\begin{aligned} x_{{\texttt {n}+1},i}\ge x_{{\texttt {n}},i},\qquad y_{{\texttt {n}+1},j}\le y_{{\texttt {n}},j}, \qquad i=1,\dots , n;\, j=1,\dots ,m. \end{aligned}$$

We proceed in the same manner with the super-solutions.

We thus obtain two sequences, one of them increasing while the other one is decreasing,

$$\begin{aligned} \begin{aligned} (\omega ,\zeta ) \preceq (x_1,y_1)\preceq \dots (x_{\texttt {n}},y_{\texttt {n}})\preceq (X_{\texttt {n}},Y_{\texttt {n}})\dots \preceq (X_1,Y_1)\preceq (\Omega ,Z). \end{aligned} \end{aligned}$$
(31)

If we take the uniformly convergent sequence of almost periodic functions

$$\begin{aligned} {x}^\star =\lim _{\texttt {n}\rightarrow \infty }x_{\texttt {n}}, \quad {y}^\star = \lim _{\texttt {n}\rightarrow \infty }y_{\texttt {n}}, \qquad {x}_\star =\lim _{\texttt {n}\rightarrow \infty }X_{\texttt {n}}, \quad {y}_\star = \lim _{\texttt {n}\rightarrow \infty }Y_{\texttt {n}}. \end{aligned}$$

Then \(({x}^\star (t),{y}^\star (t)),({x}_\star (t),{y}_\star (t))\) are almost periodic. Moreover,

$$\begin{aligned} (\omega (t),\zeta (t))\preceq ( {x}^\star (t),{y}^\star (t))\preceq ({x}_\star (t),{y}_\star (t)) \preceq (\Omega (t),Z(t)). \end{aligned}$$

Furthermore, the set \(\{(x_\texttt {n},y_\texttt {n})\}\) solve the set of linear systems (30) and by Cauchy convergence:

$$\begin{aligned} \lim _{\texttt {n}\rightarrow \infty }x_{{\texttt {n}},i}(t) ={x}^\star _i(t), \qquad \lim _{\texttt {n}\rightarrow \infty }y_{{\texttt {n}},j}(t) = {y}^\star _{j}(t). \end{aligned}$$
(32)

Thus, we have vanishing limits by continuity of \(\textrm{f}_i,\textrm{g}_i\) and

$$\begin{aligned} \lim _{\texttt {n}\rightarrow \infty }\text {r}_{{\texttt {n}},i}=0, \qquad \lim _{\texttt {n}\rightarrow \infty }\text {s}_{{\texttt {n}},j}=0. \end{aligned}$$

Therefore, \(({x}^\star ,{y}^\star )\) is in fact an almost periodic solution of (5). Similarly, the almost periodic trajectory \(({x}_\star ,{y}_\star )\) becomes a solution:

$$\begin{aligned}\begin{aligned} \frac{d{x}^\star }{dt} =\text {f}(t,{x}^\star ,{y}^\star ),\qquad \frac{d{y}^\star }{dt} =\text {g}(t,{x}^\star ,{y}^\star ), \\ \frac{dx_\star }{dt} =\text {f}(t,{x}_\star ,{y}_\star ),\qquad \frac{dy_\star }{dt} =\text {g}(t,{x}_\star ,{y}_\star ). \end{aligned}\end{aligned}$$

We remark, that if none of the couples of the sequence \(\{(x_\texttt{n},y_\texttt {n})\}\) is a solution of this system, then we get strict increasing and decreasing sequences:

$$\begin{aligned}\begin{aligned} (\omega ,\zeta ) \prec \prec (x_1,y_1)\prec \prec \dots (x_\texttt {n},y_\texttt{n})\prec \prec (X_\texttt {n},Y_\texttt {n})\dots \prec \prec (X_1,Y_1)\prec \prec (\Omega ,Z), \end{aligned}\end{aligned}$$

This proves the existence of almost periodic solutions.

4.2 Proof of the asymptotic limit in Theorem 2

We now consider any solution \((\textrm{x}(t),\textrm{y}(t))\) of (5) with initial conditions as in (15) as follows

$$\begin{aligned} \begin{aligned} \frac{d\textrm{x}_{i}}{dt}&= \textrm{f}_i(t,\textrm{x},\textrm{y}), \quad i=1,\dots ,n, \\ \frac{d\textrm{y}_{j}}{dt}&=\textrm{g}_j(t,\textrm{x},\textrm{y}) \quad j=1,\dots ,m, \\&(\omega (0),\zeta (0)) \prec \prec (\textrm{x}(0),\textrm{y}(0)) \prec \prec (\Omega (0),Z(0)). \end{aligned}\end{aligned}$$
(33)

Our approach to prove assertion II in Theorem 2 is to consider the following Claim A as well as its complement \(\sim {\textrm{A}}\).

Claim A

Consider the uniformly converging functions \((x_{\texttt {n}},y_{\texttt {n}})\nearrow (x^\star ,y^\star )\) described in (31). Let \((\textrm{x},\textrm{y})\) be any solution of (33). For every increasing time sequence, \(t_\texttt{n}\nearrow \infty \), there exists a sufficiently large \(\texttt {n}\in \mathbb {N}\) such that

$$\begin{aligned} (x_{\texttt {n}}(t_{\texttt {n}}),y_{\texttt {n}}(t_{\texttt {n}}))\prec \prec (\text {x}(t_{\texttt {n}}),\text {y}(t_{\texttt {n}})) \prec \prec (X_{\texttt {n}}(t_{\texttt {n}}),Y_{\texttt {n}}(t_{\texttt {n}})). \end{aligned}$$
(34)

We prove explicitly that the first inequality in (34) holds true. The proof of the other inequality can be achieved by analogy.

Let us consider the solution \((\xi _1,\eta _1)\) with initial conditions \((\omega (0),\zeta (0))\) of the system

$$\begin{aligned} \begin{aligned} \frac{d{\xi }_1}{dt}+L\xi _1= L\omega +\textrm{f}(t,\omega ,\zeta ),\qquad \xi _1(0)=\omega (0),\\ \frac{d{\eta }_1}{dt}+L\eta _1= L\omega +\textrm{g}(t,\omega ,\zeta ),\qquad \eta _1(0)=\zeta (0).\\ \end{aligned} \end{aligned}$$

Notice that \((\xi _1,\eta _1)\) is not necessarily the almost periodic solution \((x_1,y_1)\) described previously in (28), although both of them solutions of the same system.

Nonetheless, we can argue that \(\frac{d{\xi }_{1,i}}{dt}+L\xi _{1,i}\ge L\omega _i+\frac{d{\omega }_i}{dt}\) or \(\frac{d{\xi }_{1,i}}{dt}-\frac{d{\omega }_i}{dt}+L(\xi _{1,i}-\omega _i)\ge 0.\) Again by Gronwall’s inequality

$$\begin{aligned} \omega _i(t)-\xi _{1,i}(t)\le (\omega _i(0)-\xi _{1,i}(0))e^{-Lt}\le 0 \end{aligned}$$

or \(\xi _{1,i}(t)-\omega _i(t)\ge e^{-Lt}(\xi _{1,i}(0)-\omega _i(0))=0\). Whence,

$$\begin{aligned} \xi _{1,i}(t) \ge \omega _i(t). \end{aligned}$$
(35)

We remark that by definition,

$$\begin{aligned} \frac{d}{dt}(x_{1}-\xi _1)+L(x_1-\xi _1)=0 \end{aligned}$$
(36)

Therefore, \(x_{1,i}(t)-\xi _{1,i}(t)= e^{-Lt}(x_{1,i}(0)-\omega _i(0))>0\) and

$$\begin{aligned} x_{1,i}>\xi _{1,i}\ge \omega _i. \end{aligned}$$
(37)

Besides from (37) and (35), we can also conclude that

$$\begin{aligned} x_{1,i}(t)\searrow \xi _{1,i}(t), \text { as }t\rightarrow \infty . \end{aligned}$$
(38)

The difference \(\textrm{x}_i(t)-\omega _i(t)\) is monotone increasing,

$$\begin{aligned} \frac{d\textrm{x}_{i}}{dt}-\frac{d{\omega }_i}{dt}\ge \textrm{f}_i(t,\textrm{x},\textrm{y}) -\textrm{f}_i(t,\omega ,\zeta )\ge 0, \end{aligned}$$

Hence, the positive initial condition \(\textrm{x}_{i}(0)-\omega _i(0)>0\), implies that

$$\begin{aligned} \textrm{x}_i(t)>\omega _i(t), \quad \forall t\ge 0. \end{aligned}$$

Claim B

There exists some \(T_1>0\) such for every \(t\ge T_1\) the following inequality holds,

$$\begin{aligned} x_{1,i}(t)> \textrm{x}_{i}(t)> \omega _i(t),\quad \forall t\ge T_1. \end{aligned}$$
(39)

Remark 2

Notice that Claim B suffices to disprove the conclusion given by Claim A. That is \(\textrm{B}\Rightarrow \, \sim \textrm{A}\).

Assuming Claim B, let us suppose the existence of \(T_1>0\) as in (39). On the other hand

$$\begin{aligned} \frac{d{x}_{1,i}}{dt}-\frac{d\textrm{x}_i}{dt} +L (x_{1,i}-\textrm{x}_i)&< \frac{d{x}_{1,i}}{dt}-\frac{d\textrm{x}_i}{dt} +L (x_{1,i}-\omega _i) \\&= \textrm{f}_i(t,\omega ,\zeta )-\textrm{f}_i(t,\textrm{x},\textrm{y}) \le 0, \end{aligned}$$

implies

$$\begin{aligned} x_{1,i}(t)-\textrm{x}_i(t)\le e^{-L(t-T_1)}(x_{1,i}(T_1)-\textrm{x}_i(T_1)), \qquad \forall t \ge T_1. \end{aligned}$$

Therefore, in addition to the decay property (38) we also conclude that

$$\begin{aligned} x_{1,i}\searrow \textrm{x}_i,\text { as } t\rightarrow \infty . \end{aligned}$$
(40)

Claim C

For every \(\texttt {n}\ge 0\) there exists \(T_{\texttt {n}+1}>T_0=0\) such that \(T_\texttt {n}\) is an increasing sequence and

$$\begin{aligned} \textrm{x}_i(t) \ge x_{{\texttt {n}},i}(t), \quad \forall t\ge T_{\texttt {n}+1}, \end{aligned}$$
(41)

while the following generalization of inequality (39) holds,

$$\begin{aligned} x_{\texttt {n} +1,i}(t)> \textrm{x}_i(t) > \omega _i(t),\quad \forall t\ge T_{\texttt {n}+1}. \end{aligned}$$
(42)

Remark also that

$$\begin{aligned} \textrm{x}_i(t) \ge {x}_{\texttt {k},i}(t) \end{aligned}$$

whenever \( t\ge T_{\texttt {n}+1}\ge T_{\texttt {k}+1}\) and \(\texttt {k}\le \texttt {n}\).

Thus we can prove the following Lemma.

Lemma 2

If we assume the conditions described in Claim C, a solution \((\textrm{x},\textrm{y})\) of system (5) converges asymptotically to an almost periodic solution as in (24).

Proof

By induction, let us suppose the existence of \(T_{\texttt {n}+1}>T_\texttt{n}>0\) as in (42). Hence,

$$\begin{aligned}\begin{aligned} x_{{\texttt {n}},i}(t)\searrow \xi _{{\texttt {n}},i}(t).\end{aligned}\end{aligned}$$

On the other hand

$$\begin{aligned}\begin{aligned} \frac{d{x}_{{\texttt {n}+1},i}}{dt}-\frac{d\text {x}_i}{dt} +L (x_{{\texttt {n}+1},i}-\text {x}_i)&< \frac{d{x}_{{\texttt {n}+1},i}}{dt}-\frac{d\text {x}_i}{dt} +L (x_{{\texttt {n}+1},i}-x_{{\texttt {n}},i}) \\ {}&= \text {f}_i(t,x_{\texttt {n}},y_{\texttt {n}})-\text {f}_i(t,\text {x},\text {y}) \le 0, \end{aligned} \end{aligned}$$

implies

$$\begin{aligned} x_{{\texttt {n}+1},i}(t)-\text {x}_i(t)\le e^{-L(t-T_{\texttt {n}+1})}(x_{{\texttt {n}+1},i}(T_1)-\text {x}_i(T_{\texttt {n}+1})), \qquad \forall t \ge T_{\texttt {n}+1}. \end{aligned}$$

Therefore, we also conclude that

$$\begin{aligned} x_{\texttt {n}+1,i}\searrow \textrm{x}_i,\text { as } t\rightarrow \infty . \end{aligned}$$

Moreover, from the uniform convergence (32), \(x_{\texttt {n},i}\nearrow x_i^\star ,\) as \(\texttt {n}\rightarrow \infty \) we prove the asymptotic limit

$$\begin{aligned} \lim _{t\rightarrow \infty }\text {x}_{i}(t) -{x}^\star _i(t)=0. \end{aligned}$$

\(\square \)

Remark 3

We can generalize (37) to conclude that

$$\begin{aligned} \omega \preceq \xi _{1} \prec \prec x_{1}. \end{aligned}$$
(43)

The uniform convergence as \(\texttt {n}\rightarrow \infty \) to solutions \((x_\texttt {n},y_\texttt {n})\rightarrow (x^\star ,y^\star )\) and \( (\xi _\texttt {n},\eta _\texttt {n})\rightarrow (\xi ^\star ,\eta ^\star ), \) allows to conclude that both solutions are comparable, i.e.

$$\begin{aligned} (x^\star ,y^\star )\succeq (\xi ^\star ,\eta ^\star ) \succ (\omega ,\zeta ). \end{aligned}$$
(44)

Remark 4

Notice that Claim C\(\Rightarrow \) Claim B. It is easy to check also that Claim C\(\Rightarrow \,\sim \) (Claim  A). Furthermore, \(\sim \) (Claim A)\(\Leftrightarrow \) Claim  C.

4.3 Conclusion of the proof of Theorem 2

We now recall that (31) states that \((x_{\texttt {n}},y_{\texttt {n}})\) is an increasing sequence in the partial ordering \(\preceq \) which converges towards an almost periodic solution \(({x}^\star ,{y}^\star )\) of (5).

From Lemma 2 we have that Claim C implies the asymptotic limit,

$$\begin{aligned} (\textrm{x}(t),\textrm{y}(t))\rightarrow ({x}^\star (t),{y}^\star (t)),\quad t\rightarrow \infty . \end{aligned}$$

Thus, conclusion II(a) in Theorem 2 arises.

On the contrary, if we assume Claim A (which happens to be the opposite of Claim C), then for every sequence \(t_\texttt{n}\nearrow \infty \) there exists \(\texttt {n}\in {\mathbb {N}}\) sufficiently large, such that

$$\begin{aligned} \text {x}_{i}(t_{\texttt {n}}) > {x}_{{\texttt {n}},i}(t_{\texttt {n}}). \end{aligned}$$

A similar property can be deduced for the other coordinates

$$\begin{aligned} \text {y}_{i}(t_{\texttt {n}}) < {y}_{{\texttt {n}},i}(t_{\texttt {n}}). \end{aligned}$$

From uniform convergence, for every \(\varepsilon >0\) there exists \(N_\varepsilon \) such that

$$\begin{aligned} 0\le x_i^\star (t)-x_{{\texttt {n}},i}(t)<\varepsilon , \forall t\ge 0,\quad {\texttt {n}}\ge N_\varepsilon \end{aligned}$$

So for every \({\texttt {n}}\ge N_{\varepsilon }\) sufficiently large,

$$\begin{aligned} \text {x}_{i}({t_{\texttt {n}}})-x_i^\star (t_{\texttt {n}}) = \left[ \text {x}_{i}(t_{\texttt {n}})-{x}_{\texttt {n},i}(t_{\texttt {n}})\right] -\left[ x_i^\star (t_{\texttt {n}})-{x}_{{\texttt {n}},i}(t_{\texttt {n}})\right] > 0-\varepsilon . \end{aligned}$$

Therefore, \(\liminf _{t\rightarrow \infty }\left[ \textrm{x}_{i}(t)-x_i^\star (t)\right] \ge 0,\) or

$$\begin{aligned} \liminf _{t\rightarrow \infty } \textrm{x}_{i}(t)\ge \limsup _{t\rightarrow \infty } x_i^\star (t). \end{aligned}$$
(45)

Recall that by monotonicity, the pair of solutions \((\xi ^\star ,\eta ^\star )\) and \((x^\star ,y^\star )\) are comparable with respect to \((\preceq )\) as in (44) and that by the initial condition (33), \( (\textrm{x}, \textrm{y})\succ (\xi ^\star ,\eta ^\star ) \). On the other hand (45) allows us to conclude that there exists \(t_\texttt {n}>0\) such that \((x^\star (t_{\texttt {n}}),y^\star (t_{\texttt {n}}))\succeq (\text {x}(t_{\texttt {n}}),\text {y}(t_{\texttt {n}})).\) Regarding these values in \(T=t_\texttt {n}\) as initial conditions, by monotonicity we can conclude the following comparison

$$\begin{aligned} (\textrm{x}(t),\textrm{y}(t))\succeq (x^\star (t),y^\star (t)), \quad \forall t\ge T. \end{aligned}$$

This ends the proof of the case II(b) in Theorem 2.

Summarizing our results, we have proved the following assertion

Lemma 3

\(Z^{\star }\in \textsf {Super}\, V\) defines a super-solution \((\textbf{0},{Z^{\star }})\) while for \(\omega ^{0}\in \textsf {sub}\, V \) we obtain a sub-solution \((\omega ^{0},\textbf{0})\). Both are related so that we get a pair sub-super-solution.

5 Proof of Theorem 1

5.1 Existence of almost periodic solutions in Theorem 1

As an application of the results exposed in the previous Section we prove Theorem 1. Firstly, we verify the intraspecific motonicity property of system (4) which we denote by

$$\begin{aligned} V=\frac{d}{dt}\left( \begin{array}{c} {c}_{\textrm{S}}\\ {c}_{\textrm{I}} \\ {c}_{\textrm{ES}}\\ {c}_{\textrm{EI}} \end{array}\right) . \end{aligned}$$

By calculating the Jacobian matrix DV, we get

$$\begin{aligned} \left( \begin{array}{ccccc} -k_1(T-c_{\textrm{EI}}-c_{\textrm{ES}})-\xi _{\textrm{S}} &{} 0 &{} k_1c_{\textrm{S}}+k_2 &{} k_1c_{\textrm{S}} \\ 0 &{} -k_5(T-c_{\textrm{ES}} -c_{\textrm{EI}})-\xi _{\textrm{I}} &{} k_5c_{\textrm{I}} &{} k_4+k_5c_{\textrm{I}} \\ k_1(T-c_{\textrm{ES}}-c_{\textrm{EI}}) &{}0 &{} -k_1c_{\textrm{S}} -k_2-k_3 &{}-k_1c_{\textrm{S}} \\ 0 &{} k_5(T-c_{\textrm{ES}}-c_{\textrm{EI}}) &{} -k_5c_{\textrm{I}} &{} -k_4-k_5c_{\textrm{I}} \end{array}\right) . \end{aligned}$$

It has the form of a monotone system described in (9). Furthermore DV has the form of an intraspecific and monotone system since

$$\begin{aligned} T-c_{\textrm{EI}}-c_{\textrm{ES}} \ge 0,\qquad \end{aligned}$$
(46)

holds true for the dynamics inside the stoichiometric space \(c\in {\textsf{S}}\cap \mathrm R^4_{\ge 0}\). We adopt the \((-K)\)-partial ordering with orthant

$$\begin{aligned} -K=\mathbb {R}^2_{\le 0}\times \mathbb {R}_{\ge 0}^2, \end{aligned}$$

to apply our results. We define a sub-solution whose constant components,

$$\begin{aligned} \left( \begin{array}{c} \omega \\ \zeta \end{array}\right) = \left( \begin{array}{c} \omega _{\textrm{S}}\\ \omega _{\textrm{I}} \\ \zeta _{\textrm{ES}} \\ \zeta _{\textrm{EI}} \end{array}\right) \end{aligned}$$

solve inequalities (14), i.e.

$$\begin{aligned}\begin{aligned} 0&\ge (F_{\textrm{S}})^*-k_1\omega _{\textrm{S}}(T-\zeta _{\textrm{ES}}-\zeta _\textrm{EI})-\xi _{\textrm{S}}\omega _{\textrm{S}}+k_2\zeta _{\textrm{ES}}, \\ 0&\ge (F_{\textrm{I}})^*-k_5\omega _{\textrm{I}}(T- \zeta _{\textrm{EI}}-\zeta _\textrm{ES})-\xi _{\textrm{I}}\omega _{\textrm{I}}+k_4\zeta _{\textrm{EI}}, \\ 0&\le k_1\omega _{\textrm{S}}(T-\zeta _{\textrm{EI}}-\zeta _{\textrm{ES}}) - (k_2+ k_3 )\zeta _{\textrm{ES}}, \\ 0&\le k_5\omega _{\textrm{I}}(T-\zeta _{\textrm{ES}}-\zeta _{\textrm{EI}}) -k_4\zeta _{\textrm{EI}}. \end{aligned}\end{aligned}$$

Solving the inequalities by imposing \(\zeta =\textbf{0}\), see Fig. 1, we get,

$$\begin{aligned} \omega _{\textrm{S}}\ge \omega _{\textrm{S}}^0:= \frac{(F_{\textrm{S}})^*}{\xi _\textrm{S}+k_1T}>0, \quad \omega _{\textrm{I}} \ge \omega _{\textrm{I}}^0:=\frac{(F_{\textrm{I}})^*}{\xi _{\textrm{I}}+k_5T}>0, \quad \zeta _{\textrm{ES}}=0, \quad \zeta _{\textrm{EI}}=0. \end{aligned}$$

Therefore, there exists an unbounded parameter space, \( (u,v)\in \mathbb {R}^2_{\ge 0}, \) such that any \(\left( \omega ,\textbf{0}\right) \in \mathbb {R}^2_{\ge 0}\times \mathbb {R}^2_{\ge 0},\) given by

$$\begin{aligned} \omega _{\textrm{S}}=u+\omega ^0_{\textrm{S}}, \quad \omega _{\textrm{I}}=v+ \omega ^0_{\textrm{I}}, \qquad u\ge 0,\, v\ge 0, \end{aligned}$$

defines a sub-solution \((\omega ,\textbf{0})\) in the region \(\textsf{sub}\, V\subset \mathbb {R}_{\ge 0}^2\), see Fig. 2. A vertex for the polytope \(\textsf{sub}\, V\) is

$$\begin{aligned} \omega ^0= \left( \begin{array}{c} \omega ^0_{\textrm{S}}\\ \omega ^0_{\textrm{I}} \end{array}\right) . \end{aligned}$$
Fig. 1
figure 1

Sub-solution \((\omega ,\textbf{0})\) and super-solution \((\textbf{0},Z)\) in the phase space \({\mathbb {R}}^4_{\ge 0}\).

For a super-solution we take a constant vector

$$\begin{aligned} \left( \begin{array}{c} \Omega \\ Z \end{array}\right) = \left( \begin{array}{c} \Omega _{\textrm{S}}\\ \Omega _{\textrm{I}} \\ Z_{\textrm{ES}} \\ Z_{\textrm{EI}} \end{array}\right) \in {\mathbb {R}}^2_{\ge 0}, \end{aligned}$$

solving (13), i.e.

$$\begin{aligned}\begin{aligned} 0&\le (F_{\textrm{S}})_*-k_1\Omega _{\textrm{S}}(T-Z_{\textrm{ES}}-Z_{\textrm{EI}}) -\xi _{\textrm{S}}\Omega _{\textrm{S}}+k_2 Z_{\textrm{ES}}, \\ 0&\le (F_{\textrm{I}})_*-k_5(T-Z_{\textrm{ES}}-Z_{\textrm{EI}}) -\xi _\textrm{I}\Omega _I+k_4Z_{\textrm{EI}}, \\ 0&\ge k_1\Omega _S(T-Z_{\textrm{EI}}-Z_{\textrm{ES}}) -(k_2+k_3)Z_{\textrm{ES}}, \\ 0&\ge k_5\Omega _I(T-Z_{\textrm{EI}}-Z_{\textrm{ES}}) -k_4Z_{\textrm{EI}}. \end{aligned}\end{aligned}$$

We consider \(\Omega =(\Omega _{\textrm{S}},\Omega _{\textrm{I}})=\textbf{0}\) and the region consisting of constant super-solutions \(\left( \textbf{0},Z\right) \in \mathbb {R}^2_{\ge 0}\times \mathbb {R}^2_{\ge 0}\) where \(Z=(Z_{\textrm{ES}},Z_{\textrm{EI}})\subset \mathbb {R}^2_{\ge 0}\) lies within a triangle \(\textsf{Super}\, V\subset \mathbb {R}^2_{\ge 0}\) limited by the lines \( Z_{\textrm{ES}}=Z_{\textrm{ES}}^0=0,\quad Z_{\textrm{EI}}=Z_{\textrm{EI}}^0=0, \quad \) and solving the equality

$$\begin{aligned} 0\le Z_{\textrm{ES}}+Z_{\textrm{EI}}\le T. \end{aligned}$$
(47)

Now we can apply Theorem 2, by considering sub-super-solution pairs with constant coordinates \( \left( \omega ^0,\textbf{0}\right) , \quad \left( \textbf{0},Z^\star \right) , \) with

$$\begin{aligned} Z^\star =(T/2,T/2), \end{aligned}$$

Remarkably, \(Z^\star \) is the maximum for a rectangular region R (that is, \(Z^\star \succeq _{\text {(I)}} Z\) for every \(Z\in R\) using the usual first quadrant, denoted as \(\text {(I)}\), partial ordering in \({\mathbb {R}}^2\)). We will consider the following rectangle

$$\begin{aligned} R =\{(Z_{\textrm{ES}},Z_{\textrm{EI}})\in \mathbb {R}^2_{\ge 0}\, \, Z_{\textrm{ES}}\le T/2,\,Z_{\textrm{EI}}\le T/2 \} \subset \textsf{Super}\, V \end{aligned}$$

has opposed vertices \(\textbf{0}\in R\) and \(Z^\star \in R\). See Fig. 3.

We conclude the proof of existence of at least one almost periodic solution inside the parallelepiped in \(\mathbb {R}^4\) spanned by vertices \((\textbf{0},Z^\star )\) and \((\omega ^0,\textbf{0})\).

Fig. 2
figure 2

A set of sub-solutions, \(\textsf{sub}\,V\subset \mathbb {R}^2_{\ge 0}\). It has vertex \(\omega ^0=(\omega ^0_{\textrm{S}},\omega _{\textrm{I}}^0)\). A suitable sub-solution \(\omega ^\star \in \textsf{sub}\, V\)

Fig. 3
figure 3

Region \(\textsf{Super}\,V\subset \mathbb {R}^2_{\ge 0}\) parametrizing a set of super-solutions. A maximum for a suitable rectangle \(R\subset \textsf{Super}\,V\) is attained at the vertex of R opposed to \(\textbf{0}\), \(Z^\star =(Z^\star _{\textrm{S}},Z^\star _{\textrm{I}})\in \textsf{Super}\,V\)

5.2 Uniqueness of the almost periodic solution in Theorem 1

Lemma 4

The region

$$\begin{aligned} U^\star =\{0\le \omega _{\textrm{S}}\le \omega ^\star _{\textrm{S}}, 0\le \omega _{\textrm{I}}\le \omega ^\star _{\textrm{I}}\}\times \textsf{Super}\, V \subset {\mathbb {R}}^4_{\ge 0} \end{aligned}$$

where

$$\begin{aligned} \omega ^\star _{\textrm{S}}=\frac{Tk_2+(F_{\textrm{S}})^*}{\xi _{\textrm{S}}}, \quad \omega ^\star _{\textrm{I}}=\frac{Tk_4+(F_{\textrm{I}})^*}{\xi _{\textrm{I}}}, \end{aligned}$$

is an attractor.

Proof

We consider first \(\omega ,Z\in \mathbb {R}^2_{\ge 0}\). If \(T -{Z}_\textrm{ES}-{Z}_{\textrm{EI}}<0\), then

$$\begin{aligned} \frac{d{Z}_{\textrm{ES}}}{dt}+\frac{d{Z}_{\textrm{EI}}}{dt} = (T-Z_\textrm{ES}-Z_{\textrm{EI}})(k_1\omega _{\textrm{S}}+k_5\omega _{\textrm{I}}) -(k_2+k_3)Z_{\textrm{ES}}-k_4Z_{\textrm{EI}}<0. \end{aligned}$$

Hence \( {\mathbb {R}}^2_{\ge 0}\times \{(Z_{\textrm{ES}},Z_\textrm{EI})\,:\,0\le Z_{\textrm{ES}}+Z_{\textrm{EI}}\le T\}\) is an attractive region for solutions. For a point in the complement,

$$\begin{aligned}\begin{aligned} \omega _{\textrm{S}}\ge \omega _{\textrm{S}}^{\star },\quad \omega _\textrm{I}\ge \omega _{\textrm{I}}^\star ,\quad Z_{\textrm{ES}}+Z_{\textrm{EI}}\ge T, \end{aligned}\end{aligned}$$

we have decreasing linear functions \(\omega _{\textrm{S}}\) and \(\omega _{\textrm{I}}\) along the solutions, i.e.

$$\begin{aligned}\begin{aligned} \frac{d{\omega }_{\textrm{S}}}{dt}&= -k_1\omega _{\textrm{S}}(T-Z_\textrm{ES}-Z_{\textrm{EI}})+k_2Z_{\textrm{ES}}+F_{\textrm{S}}-\xi _{\textrm{S}}\omega _{\textrm{S}} \\ {}&\le -k_1\omega ^\star _{\textrm{S}}(T-Z_{\textrm{ES}}-Z_{\textrm{EI}})+k_2Z_\textrm{ES}+F_{\textrm{S}}-\xi _{\textrm{S}}\omega ^\star _{\textrm{S}} \\&\le -\omega ^\star _{\textrm{S}}\left( k_1(T-Z_{\textrm{ES}}-Z_\textrm{EI})+\xi _{\textrm{S}}\right) +k_2T+(F_{\textrm{S}})^* \\&\le -\omega ^\star _{\textrm{S}}\xi _{\textrm{S}} +k_2T+(F_{\textrm{S}})^* \\&\le -\frac{Tk_2+(F_{\textrm{S}})^*}{\xi _{\textrm{S}}}\xi _{\textrm{S}} +k_2T+(F_{\textrm{S}})^* \\&\le 0, \end{aligned}\end{aligned}$$

A similar argument can be shown to \(\frac{d{\omega }_{\textrm{I}}}{dt}\). Thus,

$$\begin{aligned}\begin{aligned} \frac{d{\omega }_{\textrm{S}}}{dt}\le 0, \quad \frac{d{\omega }_\textrm{I}}{dt} \le 0. \end{aligned}\end{aligned}$$

Therefore, \(U^\star \) is an attractive region. \(\square \)

Now we can prove that the region

$$\begin{aligned} R=\{(Z_{\textrm{ES}},Z_{\textrm{EI}}):\, 0\le Z_{\textrm{ES}}\le T,\, 0\le Z_{\textrm{EI}}\le T/2\} \subset \textsf{Super}\, V, \end{aligned}$$

which has a maximum \(Z^\star \) (see Fig. 3), defines a suitable positive invariant region.

Lemma 5

The region \(U\subset {\mathbb {R}}_{\ge 0}^4\) defined as

$$\begin{aligned} U:\qquad 0\le \omega _{\textrm{S}}\le \omega ^\star _{\textrm{S}}, \quad 0\le \omega _{\textrm{I}}\le \omega ^\star _{\textrm{I}}, \quad 0\le Z_{\textrm{ES}}\le T/2, \quad 0\le Z_{\textrm{EI}}\le T/2, \end{aligned}$$

is an attractor and positively invariant.

Proof

We evaluate the vector field V along the different faces of the boundary, \(\partial U\cap \partial C_i\) where \(C_i\) are polytopes in the neighborhood of U, \(i=1,\dots 8\), to verify that V points towards the interior of such region.

For the different faces of U we get the corresponding inequalities as follows

$$\begin{aligned}\begin{aligned} C_1:\quad&0\le \omega _{\textrm{S}}\le \omega _{\textrm{S}}^\star , \, 0\le \omega _{\textrm{I}}\le \omega _{\textrm{I}}^\star , \, Z_{\textrm{ES}}> T/2, \, 0\le Z_{\textrm{EI}}\le T/2<0, \\&\left. \frac{d{Z}_{\textrm{ES}}}{dt}\right| _{C_1} \le -(k_2+k_3)Z_\textrm{ES}, \end{aligned}\\\begin{aligned} C_2:\quad&0\le \omega _{\textrm{S}}\le \omega _{\textrm{S}}^\star , \, 0\le \omega _{\textrm{I}}\le \omega _{\textrm{I}}^\star , \, 0\le Z_{\textrm{ES}}\le T/2, \, Z_{\textrm{EI}}>T/2, \\&\left. \frac{d{Z}_{\textrm{EI}}}{dt}\right| _{C_2} \le -k_4Z_{\textrm{EI}}<0, \end{aligned}\\\begin{aligned} C_3:\quad&\omega _{\textrm{S}}<0, \, 0\le \omega _{\textrm{I}}\le \omega _{\textrm{I}}^\star , \, 0\le Z_{\textrm{ES}}\le T/2,\, 0\le Z_\textrm{EI}\le T/2, \\&\left. \frac{d{\omega _{\textrm{I}}}}{dt}\right| _{C_3}> k_2Z_{\textrm{ES}}+F_{\textrm{S}}\ge 0, \end{aligned}\\\begin{aligned} C_4:\quad&0\le \omega _{\textrm{S}}\le \omega _{\textrm{S}}^\star , \, 0> \omega _{\textrm{I}}, \, 0\le Z_{\textrm{ES}}\le T/2,\, 0\le Z_{\textrm{EI}}\le T/2, \\&\left. \frac{d{\omega _{\textrm{I}}}}{dt}\right| _{C_4}> k_4Z_{\textrm{EI}}+F_{\textrm{I}}\ge 0, \end{aligned}\\\begin{aligned} C_5:\quad&\omega _{\textrm{S}}>\omega _{\textrm{S}}^\star , \, 0\le \omega _{\textrm{I}}\le \omega ^\star _{\textrm{I}}, \, 0\le Z_{\textrm{ES}}\le T/2,\, 0\le Z_{\textrm{EI}}\le T/2, \\&\left. \frac{d{\omega _{\textrm{S}}}}{dt}\right| _{C_5}< k_2 Z_\textrm{ES}+F_{\textrm{S}}-\xi _{\textrm{S}}\omega ^\star _{\textrm{S}} \\&\le k_2T/2-\xi _{\textrm{S}}\frac{k_2T+(F_{\textrm{S}})^*}{\xi _{\textrm{S}}} +(F_{\textrm{S}})^* \\&\le - k_2T/2\le 0. \end{aligned}\\\begin{aligned} C_6:\quad&0\le \omega _{\textrm{S}}\le \omega _{\textrm{S}}^0, \, \omega _{\textrm{I}}>\omega ^0_{\textrm{I}}, \, 0\le Z_{\textrm{ES}}\le T/2,\, 0\le Z_{\textrm{EI}}\le T/2, \\&\left. \frac{d{\omega _{\textrm{I}}}}{dt}\right| _{C_6} < k_4 Z_\textrm{EI}+F_{\textrm{I}}-\xi _{\textrm{I}}\omega ^\star _{\textrm{I}} \\&\le k_4 T/2+(F_{\textrm{I}})^*-\xi _{\textrm{I}} \frac{k_4T+(F_\textrm{I})^*}{\xi _{\textrm{I}}} \\&\le -k_4 T/2\le 0. \end{aligned}\end{aligned}$$

The verification in the faces \(Z_{\textrm{ES}}=0\) and \(Z_{\textrm{EI}}=0\) is similar. \(\square \)

So, let us consider the set of positive almost periodic solutions within the positively invariant region U and for which \((\omega ^\star ,\textbf{0})\) is a sub-solution while \((\textbf{0},Z^\star )\) is a super-solution. Remark that \((\omega ^\star ,\textbf{0})\preceq (\omega ^0,\textbf{0})\), see Fig. 2.

Let us denote the minimal and maximal solutions of such set as,

$$\begin{aligned} \check{c}=\left( \begin{array}{c} \check{c}_{\textrm{S}} \\ \check{c}_{\textrm{I}}\\ \check{c}_{\textrm{EI}} \\ \check{c}_{\textrm{ES}} \end{array}\right) , \qquad {\hat{c}}=\left( \begin{array}{c} {\hat{c}}_{\textrm{S}}\\ {\hat{c}}_\textrm{I}\\ {\hat{c}}_{\textrm{EI}}\\ {\hat{c}}_{\textrm{ES}} \end{array}\right) , \end{aligned}$$

respectively. For the sake of brevity we denote

$$\begin{aligned} \delta _{\textrm{A}}=M\left[ {\hat{c}}_{\textrm{A}}-\check{c}_{\textrm{A}}\right] , \qquad \delta _{\textrm{A,B}}=M\left[ {\hat{c}}_{\textrm{A}}{\hat{c}}_{\textrm{B}} -\check{c}_{\textrm{A}}\check{c}_{\textrm{B}}\right] . \end{aligned}$$

Then, by subtracting and by taking the mean values in (4) we get

$$\begin{aligned} 0 = -k_1T\delta _{\textrm{S}}+k_1\delta _{\textrm{ES,S}}+k_1\delta _\textrm{EI,S}-\xi _{\textrm{S}}\delta _{\textrm{S}} \end{aligned}$$
(48a)
$$\begin{aligned} 0 = -k_5T\delta _{\textrm{I}}+k_5\delta _{\textrm{ES,I}}+k_5\delta _\textrm{EI,S}-\xi _{\textrm{I}}\delta _{\textrm{I}} \end{aligned}$$
(48b)
$$\begin{aligned} 0 = k_1T \delta _{\textrm{S}} -k_1\delta _{\textrm{ES,S}} -k_1\delta _\textrm{EI,S}-(k_2+k_3)\delta _{\textrm{ES}}, \end{aligned}$$
(48c)
$$\begin{aligned} 0 = k_5T \delta _{\textrm{I}} -k_5\delta _{\textrm{ES,I}} -k_5\delta _\textrm{EI,I}-k_4\delta _{\textrm{EI}}. \end{aligned}$$
(48d)

Our aim to attain the proof of uniqueness is to apply a well known result, written as Lemma 6 below. In order to do so we need to prove that

$$\begin{aligned} \delta _{\textrm{S}}=\delta _{\textrm{I}}=\delta _{\textrm{ES}}=\delta _{\textrm{EI}}=0. \end{aligned}$$

to conclude that

$$\begin{aligned} {\hat{c}}_{\textrm{S}}(t)=\check{c}_{\textrm{S}}(t),\quad {\hat{c}}_\textrm{I}(t)=\check{c}_{\textrm{I}}(t),\quad {\hat{c}}_{\textrm{ES}}(t)=\check{c}_\textrm{ES}(t),\quad {\hat{c}}_{\textrm{EI}}(t)=\check{c}_{\textrm{EI}}(t). \end{aligned}$$

We notice that by the partial ordering we get the following signed mean values,

$$\begin{aligned} \delta _{\textrm{S}}\le 0,\quad \delta _{\textrm{I}}\le 0,\quad \delta _\textrm{ES}\ge 0,\quad \delta _{\textrm{EI}}\ge 0. \end{aligned}$$

By adding (48a) to (48a) and (48b) to (48d) we obtain

$$\begin{aligned} \xi _{\textrm{S}}\delta _{\textrm{S}} + (k_2+k_3)\delta _{\textrm{ES}}=0 \end{aligned}$$
(49a)
$$\begin{aligned} \xi _{\textrm{I}}\delta _{\textrm{I}} + k_4\delta _{\textrm{EI}}=0 \end{aligned}$$
(49b)

Substitution of (49a) into (48a) and of (49b) into (48b) yields

$$\begin{aligned} k_1(\delta _{\textrm{ES,S}}+\delta _{\textrm{EI,S}}) =(k_1T+\xi _ \textrm{S})\delta _{\textrm{S}}\le 0, \quad k_5(\delta _{\textrm{ES,I}}+\delta _\textrm{EI,I}) =(k_5T+\xi _{\textrm{I}})\delta _{\textrm{I}}\le 0. \end{aligned}$$

Therefore,

$$\begin{aligned} \delta _{\textrm{ES,S}}+\delta _{\textrm{EI,S}}\le 0, \quad \delta _\textrm{ES,I}+\delta _{\textrm{EI,I}}\le 0, \end{aligned}$$

which allows us to derive the following inequalities,

$$\begin{aligned} \begin{aligned} 0&\le M\left[ \left( {\hat{c}}_{\textrm{ES}}+{\hat{c}}_\textrm{EI}\right) {\hat{c}}_{\textrm{S}} \right] \le M\left[ \left( \check{c}_{\textrm{ES}}+\check{c}_{\textrm{EI}}\right) \check{c}_{\textrm{S}} \right] \\ 0&\le M\left[ \left( {\hat{c}}_{\textrm{ES}}+{\hat{c}}_\textrm{EI}\right) {\hat{c}}_{\textrm{I}} \right] \le M\left[ \left( \check{c}_{\textrm{ES}}+\check{c}_{\textrm{EI}}\right) \check{c}_{\textrm{I}} \right] \end{aligned}\end{aligned}$$
(50)

On the other hand, we know from the ordering relations that \( \check{c}_{\textrm{ES}}+\check{c}_{\textrm{EI}}\le {\hat{c}}_\textrm{ES}+{\hat{c}}_{\textrm{EI}} \) or

$$\begin{aligned} \begin{aligned} (\check{c}_{\textrm{ES}}+\check{c}_{\textrm{EI}}) \check{c}_{\textrm{I}}&\le ({\hat{c}}_{\textrm{ES}}+{\hat{c}}_{\textrm{EI}}) \check{c}_{\textrm{I}} \\ (\check{c}_{\textrm{ES}}+\check{c}_{\textrm{EI}}) \check{c}_{\textrm{S}}&\le ({\hat{c}}_{\textrm{ES}}+{\hat{c}}_{\textrm{EI}}) \check{c}_{\textrm{S}} \end{aligned} \end{aligned}$$
(51)

If we take the mean value of (51) and combine it with (50) we conclude that

$$\begin{aligned}\begin{aligned} M\left[ \left( {\hat{c}}_{\textrm{ES}}+{\hat{c}}_{\textrm{EI}}\right) {\hat{c}}_\textrm{S} \right]&\le M\left[ \left( {\hat{c}}_{\textrm{ES}}+{\hat{c}}_\textrm{EI}\right) \check{c}_{\textrm{S}} \right] \\ M\left[ \left( {\hat{c}}_{\textrm{ES}}+{\hat{c}}_{\textrm{EI}}\right) {\hat{c}}_\textrm{I} \right]&\le M\left[ \left( {\hat{c}}_{\textrm{ES}}+{\hat{c}}_\textrm{EI}\right) \check{c}_{\textrm{I}} \right] \end{aligned}\end{aligned}$$

or

$$\begin{aligned}\begin{aligned} 0&\le M\left[ \left( {\hat{c}}_{\textrm{ES}}+{\hat{c}}_{\textrm{EI}}\right) (\check{c}_{\textrm{S}}-{\hat{c}}_{\textrm{S}}) \right] \le 0 \\ 0&\le M\left[ \left( {\hat{c}}_{\textrm{ES}}+{\hat{c}}_{\textrm{EI}}\right) (\check{c}_{\textrm{I}}-{\hat{c}}_{\textrm{I}}) \right] \le 0 \end{aligned}\end{aligned}$$

Thus

$$\begin{aligned} \left( {\hat{c}}_{\textrm{ES}}+{\hat{c}}_{\textrm{EI}}\right) (\check{c}_\textrm{I}-{\hat{c}}_{\textrm{I}})=0 = \left( {\hat{c}}_{\textrm{ES}}+{\hat{c}}_\textrm{EI}\right) (\check{c}_{\textrm{S}}-{\hat{c}}_{\textrm{S}}) \end{aligned}$$

If \({\hat{c}}_{\textrm{ES}}+{\hat{c}}_{\textrm{EI}}>0\) then

$$\begin{aligned} \delta _{\textrm{S}}=0=\delta _{\textrm{I}}, \end{aligned}$$

which in its turn by (49) implies the remaining identities \(\delta _{\textrm{ES}}=0=\delta _{\textrm{EI}}\). Otherwise, \({\hat{c}}_{\textrm{ES}}+{\hat{c}}_{\textrm{EI}}=0\), then \(0\le {\hat{c}}_{\textrm{ES}}= -{\hat{c}}_{\textrm{EI}}\le 0\). Hence,

$$\begin{aligned} {\hat{c}}_{\textrm{ES}}={\hat{c}}_{\textrm{EI}}. \end{aligned}$$

Analogous reasonings, yield \(\check{c}_{\textrm{ES}}=\check{c}_{\textrm{EI}}\). Thus \(\delta _{\textrm{ES}}=0=\delta _{\textrm{EI}}\).

We proceed by further simplifications to conclude that

$$\begin{aligned} {{\hat{c}}_{\sigma }}= {\check{c}_{\sigma }}, \quad \forall \sigma \in \{\textrm{S,I,ES,EI}\}. \end{aligned}$$

This proves the uniqueness claim.

Lemma 6

Let \({\hat{\phi }},{\check{\phi }}\) be almost periodic functions such that

$$\begin{aligned} {\hat{\phi }}(t)\ge {\check{\phi }}(t)\ge 0,\qquad {M}\left[ {\hat{\phi }}\right] = {M}\left[ {\check{\phi }}\right] . \end{aligned}$$

Then \({\hat{\phi }}(t)={\check{\phi }}(t)\) for every \(t\in \mathbb {R}\).

6 Numerical example

We adopt the following forcing terms

$$\begin{aligned} F_{\textrm{S}}(t)=1+\cos {t}, \qquad F_{\textrm{I}}(t)=1+\sin (\pi t), \end{aligned}$$

which are not synchronized and have upper bounds

$$\begin{aligned} (F_{\textrm{S}})^*=1.5, \,(F_{\textrm{I}})^*=1.5,\, (F_{\textrm{S}})_*=0, \,(F_\textrm{I})_*=0. \end{aligned}$$

For the decay rate values we take \(\xi _{\textrm{I}}=\xi _{\textrm{S}}=1\). Finally,

$$\begin{aligned} k_1=0.95,\quad k_2=0.3,\quad k_3=0.9, \quad k_4=0.8,\quad k_5=0.3. \end{aligned}$$

Numerical evidence for \(T=1\) in Fig. 4 shows an almost periodic global attractor.

Fig. 4
figure 4

An almost periodic solution \((c_{\textrm{S}},c_{\textrm{I}})\) attained as asymptotic limit by several initial conditions

7 Discussion

We study as general subject intraspecific and monotone open reaction networks. We have sketched such reaction networks along the introduction. Our aim consists in elucidating global stability for such reaction networks using the tools we have developed for the open enzyme catalysis studied along this exploratory work. In [19] we will deal with the case of more general intraspecific and monotone open reaction networks using other kinetics instead of just the power law or mass-action kinetics. Another suitable problem which we will address in a future work are the existence of functorial properties for a suitable subcategory associated to this kind of open reaction networks (regarded as open petri nets) in the categorical framework developed by Baez et al. in [2,3,4].

We have proved global stability of almost periodic solutions in enzyme catalysis for a specific reactor having almost periodic substrate and inhibitor supplies. This could be regarded as a first case study, i.e. just as a step in the path for the search of the most general global stability statement for a wider class of dynamical systems, namely intraspecific and monotone open reaction networks. As we have mentioned earlier in the introduction, this work belongs to a series of articles sketching a program that addresses global stability for intraspecific monotone class of open reaction networks. The mass-action law case will be extended in [19] for other general kinetics using the tools we have developed here.