Creation of discontinuities in circle maps

Circle maps frequently arise in mathematical models of physical or biological systems. Motivated by Cherry flows and ‘threshold’ systems such as integrate and fire neuronal models, models of cardiac arrhythmias, and models of sleep/wake regulation, we consider how structural transitions in circle maps occur. In particular, we describe how maps evolve near the creation of a discontinuity. We show that the natural way to create discontinuities in the maps associated with both threshold systems and Cherry flows results in a singularity in the derivative of the map as the discontinuity is approached from either one or both sides. For the threshold systems, the associated maps have square root singularities and we analyse the generic properties of such maps with gaps, showing how border collisions and saddle-node bifurcations are interspersed. This highlights how the Arnold tongue picture for tongues bordered by saddle-node bifurcations is amended once gaps are present. We also show that a loss of injectivity naturally results in the creation of multiple gaps giving rise to a novel codimension two bifurcation.


Introduction
Circle maps arise in many mathematical models of reallife systems. Our motivation for this paper comes from two classes of models. The first arises in many biological models including models of cardiac arrhythmias (see [1,2] and references therein), neuronal models [3,4] and the two-process model of sleep-wake regulation [5,6]. We refer to these examples as 'threshold systems', since in each case, a variable of interest increases until q(t) = 1 + k sin 2pt The two-process model of sleep-wake regulation; sketch based on the model in [6]. (c) An integrate and fire model. Reprinted from [2] with the permission of AIP Publishing. This model will be described in detail in §2a and be called the sinusoidal threshold system (STS). (Online version in colour.) it hits an upper threshold, decreases until it hits a lower threshold and then repeats. Some typical examples are shown in figure 1. If the thresholds are periodic with the same period, then each system can be represented by a circle map [2,7,8] and the resulting observed phenomena include phase-locked solutions, 'period-adding', period-doubling and chaos. The second class of models has found application in problems of breathing rhythms [9] and arises naturally in coupled oscillator problems at appropriate parameter values [10]. The initial model is a flow on the torus. If there are no stationary points and a global cross-section (a Poincaré flow), then the return map on this section is a continuous monotonic circle map. If, as parameters are varied, a pair of stationary points is created by saddle-node bifurcations then the resulting flow is known as a Cherry flow [11]. These can generate return maps which have either discontinuities or regions where the map is not defined [12].
Degree one circle maps f : S 1 → S 1 are described by real functions F : R → R with F(x + 1) = F(x) + 1 and f (x) = F(x) modulo 1. These maps arise in many situations and F may be continuous (or not) and injective (or not) leading to four different types of map: f is continuous and injective (monotonic), the classic case; continuous and non-injective [13]; discontinuous and injective [2]; and discontinuous and non-injective [8]. In many applications, the type of map is fixed. However, for maps derived from the classes of models considered above changes of type occur naturally as parameters vary. Close to the transitions between types, the maps have a well-defined structure. Parameter changes in this structure in turn may change some dynamical properties of the systems. Note that the transition between types does not necessarily imply the existence of a local bifurcation of attractors. However, these transitions do have consequences for the possible dynamics, and these consequences are the subject of this paper.
There is a vast literature on circle maps that are both continuous and injective (monotonic) (e.g. [14]). All points have the same rotation number (average rate of rotation) under iteration by such maps. If the rotation number is rational then solutions tend to periodic orbits. Whilst if the rotation number is irrational there are no periodic solutions and if the map is sufficiently smooth (e.g. C 2 ), all orbits are dense in the circle. Deeper results about the smoothness of conjugacies to rigid rotations for maps with irrational rotation numbers were developed by Herman [15] and led to many technical results in this direction [16]. For typical families of circle maps, the rotation number takes rational values on closed intervals of parameters. This is called mode-locking and the regions of parameter space with a given rational rotation number is an Arnold tongue. The Arnold tongues are bounded by saddle-node bifurcations.
If the circle map is continuous but not monotonic then the rotation number is replaced by a rotation interval [17]. Many properties can be understood using classic results for maps of the interval and the transition from continuous and monotonic circle maps to continuous and nonmonotonic maps has been described in some detail, including the transitions to the chaos which involve different sequences of period-doubling bifurcations [18][19][20].
The injective and discontinuous circle maps arise in a number of contexts and basic results such as the existence of a well-defined rotation number can be found in [21][22][23]. The review paper [24] gives a thorough summary of the current literature on these monotonic circle maps with gaps, i.e. intervals with no pre-images, and shows how maps of the real line with gaps can be framed as circle maps. This is particularly important because it highlights how many results known from the study of circle maps have been rediscovered in the context of maps of the real line.
The non-injective discontinuous circle maps can be divided into sub-classes. If the continuous branches are increasing, then this includes the Lorenz maps and again a lot is understood (e.g. [25]). Less is known about the details of the dynamics of non-injective discontinuous maps in general (although the techniques of kneading theory do apply), partly because it is less clear what results would be useful without further context.
Both threshold systems and the transition from Poincaré flows to Cherry flows provide natural settings to consider the transition from continuous circle maps to piecewise continuous circle maps with discontinuities. In each case, specific properties of the original dynamical system induce transitions between different circle map types. For the transition to discontinuous maps in both of these cases, we show that the derivative of the map is singular on at least one side of the discontinuity and derive scaling results. Although the derivative becomes singular, derivatives may be large for a small neighbourhood of the singular value only and so can be difficult to resolve numerically. Nevertheless, we show that the presence of the singularity is essential to understanding how a continuous circle map with phase-locked regions bounded by saddle-node bifurcations transitions to a circle map with a gap, with creation/destruction of periodic solutions via border collisions and saddle-node bifurcations. We further show that in threshold systems there is a natural route to creating maps with multiple gaps that result in a novel codimension two bifurcation similar to the 'big bang' bifurcation seen in other contexts [26].
The layout of the paper is as follows. In §2, we define smooth threshold systems and the associated circle maps. An extension of the standard Arnold map is presented as an example. In §3, we discuss the creation of gaps in smooth threshold systems, deriving the typical scalings for the gap size and showing that the map to one side of the gap has a square-root singularity. In §4, we consider a general form for a piecewise continuous map with a gap on which one side the map has a square-root singularity and discuss two examples. In §5, we discuss the creation of non-monotonicity in threshold systems and how this can result in multiple gaps and lead to codimension two bifurcations. In §6, we consider Cherry flows and discuss the creation of a discontinuity (cf. [27]), showing that a finite gap is created instantaneously and the slope of the return map has a square-root singularity. We end with a short discussion.

Threshold systems
The essential feature of a threshold system is that there is a dependent variable which increases until it hits an upper threshold, decreases until it hits a lower threshold and then repeats. The following definition formalizes this idea in the case of smooth thresholds which provide the generic cases described later in this paper. In this definition, x represents the independent time-like variable, and for any flow φ x : R → R, φ x depends smoothly on the independent variable x, φ 0 is the identity and for all r, s ∈ R, φ r • φ s = φ r+s . Definition 2.1. A smooth threshold system is a pair of flows φ x and ψ x , the upflow and downflow, respectively, and an upper threshold and a lower threshold such that (i) The upflow is strictly increasing and the downflow is strictly decreasing. (ii) The upper and lower thresholds are the graphs of smooth real functions y = h(x) and y = g(x) with period one, respectively, such that for all Starting from the lower threshold, the upflow reaches the upper threshold in finite time and vice versa. Formally, if y 0 = g(x 0 ), then there exists τ > 0 such that φ τ (y 0 ) = h(x 0 + τ ), and if y 0 = h(x 0 ) then there exists τ > 0 such that ψ τ (y 0 ) = g(x 0 + τ ).
To determine the dynamics of a threshold system consider an initial condition on the upper threshold, (x n , y n ) with y n = h(x n ). By property (iii), there is a smallest τ n > 0 such that (x n + τ n ,ỹ n ) is on the lower threshold withỹ n = ψ τ n (y n ) = g(x n + τ n ). Now using the upflow part of property (iii), there exists a smallest τ n > 0 such that Thus, starting at x n on the upper boundary, the trajectory returns to the upper boundary at time x n + τ n + τ n , generating a map If the trajectory had started at the upper boundary with x-coordinate x n + 1 then the periodicity of g and h implies that the return to the upper boundary would be at x n + 1 + τ n + τ n and so F(x + 1) = F(x)+1, thus F is the lift of a degree one circle map.
In § §3 and 5, we will show that the monotonicity and continuity of the circle map of a smooth threshold system are related to the absence of tangencies between the thresholds and flows. Throughout this paper, we illustrate our findings with the standard example of a sinusoidal threshold, sketched in figure 1c and described below. The section below also contains the Arnold tongue structure for this example.
(a) Example: the sinusoidal threshold system The example shown in figure 1c we refer to as the sinusoidal threshold system (STS). We believe that this dynamical system first appeared explicitly in a paper by Glass and Belair in 1986 [28]. In a 1991 paper [2], Glass refers to it as the Gel'fand and Tsetlin integrate and fire model, although he was unable to locate a reference. He notes that it is also studied by Arnold in his 1959 thesis, an excerpt of which is in [1], although no explicit model is given. Although the STS appears in [2], the dynamics were not fully analysed. In [28], three special cases are considered: infinite slope for the downflow (reset dynamics), equal rates for the upflow and downflow and infinite slope for the upflow. The first and last cases seem to be investigated in detail in various papers, but the middle one is referred to as 'hope to investigate later'. The case with the infinite slope in the downflow is considered by Winfree in [29] in the context of the entrainment of circadian rhythms. The STS can also be thought of as a simplified form of the two-process model of sleep-wake regulation [5,6].
For the STS, the upper and lower thresholds are given by the functions and respectively, with α > 0 and β > 0. The upflow and downflow are linear functions as shown in figure 1c: solution to dy/dx = −1). This system is equivalent to the system in [2] with a rescaling of the parameters. The derivation of the associated circle map then follows. Suppose that at x n , the system is on the upper threshold, with y n = h(x n ). Then, the trajectory of the downflow will reach the lower threshold after additional time τ n , where τ n = h(x n ), and the new value of the independent variable isx n = x n + τ n with y-coordinate equal to zero. The time taken to return to the upper threshold using the upflow is τ n , which is determined implicitly by 3) has multiple positive solutions then the smallest possible τ is chosen. The return map to the upper threshold is therefore x n+1 = F(x n ) = x n + τ n + τ n or (as an implicit difference equation) An immediate consequence is that as γ → ∞ (a classic reset) this reduces to the classic Arnold (sine) circle map [1,2] which has been extensively studied. The gradient of the map determines properties such as monotonicity. Implicit differentiation of (2.4) gives dx n+1 Since h (x) = α cos(2π x), the numerator of (2.5) is always positive if α < 1 (recall α is positive) and the denominator is positive provided α < γ . In particular, the map is monotonic and continuous if α < min(1, γ ). The derivative of (2.5) becomes singular when the upflow becomes tangent to the upper threshold. In §3, we will show that this is a generic feature in maps generated by threshold systems and describe the generic development of a discontinuity and singular derivative in the map. Similarly, (2.5) shows that the derivative vanishes when the downflow becomes tangent to the upper boundary. In §5, we will show that such a tangency generates non-monotonicity in the map generated by a threshold system. Thus, the STS example illustrates the generic transition from monotonicity to non-monotonicity when α = 1 and the generic transition from continuous to non-continuous when α = γ .
One attractive feature of the STS is that explicit expressions for some of the bifurcations can be found. A periodic solution on the circle corresponds to a solution of the form F q (x) = x + p and has rotation number p/q. We will refer to such solutions as (p, q)-periodic orbits, and they satisfy (2.6) In the STS, a necessary condition for the existence of (p, 1)-periodic solutions is that there exists x such that As we will see in §3, this condition is not sufficient if the map has a discontinuity. This is related to the fact that a threshold system is defined on the first intersection of the up/downflow with the upper/lower threshold. Solutions to (2.7) exist provided its right-hand side has modulus less than or equal to one. Thus for fixed γ , the maximal region of existence of (p, 1)-periodic solutions in the (β, α) parameter plane with α > 0 is bounded by the curves α = π pγ − β , and β = pγ , on which x takes the values 1/4 and 3/4, respectively. If these x values correspond to first intersections of the upflow with the upper threshold (as is the case when the map is continuous, i.e. for α < γ ), these curves are lines of saddle-node bifurcations that create one stable and one unstable periodic solution. They form tongue-like regions emanating from α = 0, β = pγ .
Saddle-node bifurcations for general (p, q) tongues can be found by numerically solving equation (2.6) along with the condition that the gradient of the qth iterate of the map is one.  Typical Arnold tongues for the STS with α < γ are shown in figure 2. We note that there is a parameter symmetry for existence regions for periodic solutions. Specifically, if for some α, β, γ , there exists a (p, q)-periodic orbit, where p, q ∈ Z + , and p and q are relatively prime, then there also exists a (p, q)-periodic orbit, wherep = p + mq, m ∈ Z + for α, γ and This symmetry is then reflected in the positions of the tongues: in figure 2, the (2, 1)-tongue is a translation of the (1, 1)-tongue, the (3, 2)-tongue is a translation of the (1, 2)-tongue, the (4, 3)tongue is a translation of the (1, 3)-tongue and the (5, 3)-tongue is a translation of the (2, 3)-tongue. We note that in [2] the different choice of scaling for the STS means that the parameter symmetry is not immediately evident in the computed bifurcation sets. At α = γ , the upflow becomes tangent to the upper threshold and the map loses smoothness at the pre-image of this tangency point (see (2.5)). As we will show in the next section, the map develops a discontinuity for α > γ . We will continue with this example after deriving the general theory.

Tangencies leading to gaps
As shown by Arnold [1], gaps in a threshold map are a result of 'shadow' regions in the dynamics, that is, regions for which the upper threshold is unreachable, as illustrated in figure 3a for the STS. In this example, there are sections of the upper threshold such that no trajectory from the lower threshold can reach this section without first having crossed the upper threshold at least once before. These 'shadow' regions are then reflected as gaps in the associated circle map, as shown in figure 3b. For sufficiently smooth flows and thresholds, the generic transition from no gaps to gaps will occur as a result of tangency of either the upflow with the upper threshold or the downflow with the lower threshold.
In this section, we will look at parametrized families of threshold systems. We determine generic criteria for the creation of a discontinuity and describe the local behaviour nearby. The construction of the return map involves solving for the zeros of a function which can be treated in almost precisely the same way as the standard bifurcation theory for fixed points (e.g. [30, chs 4 and 8]). Let P ⊂ R be the parameter space. Parametrized threshold maps can be thought of as the composition of two maps: the down map T d : R × P → R from the upper boundary to the lower boundary and the up map T u : R × P → R from the lower boundary to the upper boundary as described in §2 but with the addition of a real parameter, so T u,d = T u,d (x, μ). The periodicity of the thresholds implies that both of these maps have period one in the first variable: Assume that the down map is a smooth bijection of the real line for all μ in the region of interest. Thus, the down trajectory from (x n , h(x n , μ)) will intersect the lower threshold at (x, g(x, μ)) with x = T d (x n , μ) and for every x ∈ R such an x n exists.
The trajectory under the upflow φ starting at (x, g(x, μ)) on the lower threshold will intersect the upper threshold y = h(x, μ) at time(s) τ which satisfy We will be interested in local behaviour near a solution (τ * , x * , μ * ) of (3.1) representing a first intersection of the upflow with the upper boundary. By shifting coordinates we may choose (x * , μ * ) = (0, 0), and from now on, we assume this shift of coordinates has been implemented. The essential genericity condition on the x and μ behaviour, assumed throughout this section, is that Here, we used subscripts to denote partial differentiation by the ith variable, e.g. W 2 = ∂W/∂x. The map is locally continuous if in addition W 1 (τ * , 0, 0) = 0. Indeed, a standard application of the implicit function theorem yields a unique and smooth local solution τ (x, μ) to (3.1) of the form where the partial derivatives are evaluated at (τ * , 0, 0) (see figure 4a).
x n+1 x n x n There is a simple tangency between the upwards trajectory and the upper boundary if Although this is not the onset of discontinuities, it is worth considering as it shows the persistence of jumps in the one-dimensional map. In this case, the intersection equation (3.1) can be written locally as Hence, there is a fold along a curve in the (x, μ)-plane given by W 2 x + W 3 μ = 0 in the lowest order. The fold has two interpretations: it represents a unique local solution to (3.1) (a fold point) τ (μ) = τ * + O(μ). In the threshold system, it gives also a persisting simple tangency between the upwards trajectory and the upper threshold at this point. When W 11 (W 2 x + W 3 μ) < 0, then (3.1) has locally two solutions, one less and one greater than τ * . The map is defined using the negative solution to (3.4) as this represents the first intersection of the upflow and the upper threshold. Locally, the second solution does not play a role in defining the map. Furthermore, the derivative ∂τ /∂x = (W 2 /W 11 )(τ * − τ ) in lowest order, hence for (x, μ), with W 11 (W 2 x + W 3 μ) < 0, approaching the fold curve, the derivative of the map becomes unbounded at τ * and exhibits a square-root singularity. By definition 2.1, there are solutions to W(τ , x, μ) = 0 even if W 11 (W 2 x + W 3 μ) > 0. Generically, this implies that (3.1) has a second (typically non-local) solution (T * , 0, 0), T * > τ * , representing the second intersection between the upflow and the upper threshold (after the first one at (τ * , 0, 0)). Generically, all the first derivatives at (T * , 0, 0) are non-zero and the map can be continued for W 11 (W 2 x + W 3 μ) > 0, with a discontinuity and finite derivative on approaching the fold curve This proves that once the jump exists, it is stable to perturbations of the map. This analysis also implies that there is a second fold between τ * and T * for some fold curve (x, μ) with W 11 (W 2 x + W 3 μ) < 0. This fold is not part of the return map, and at the risk of confusing with the standard names in piecewise-smooth dynamics (of which this is a natural counterpart), we refer to this second fold as an invisible fold and to the fold at τ * as a visible fold (see figure 4b).
So at a standard fold satisfying (3.3), the discontinuity already exists (T * of the previous paragraphs is non-local). To obtain the transition from continuity to discontinuity, we need a further condition: 4c). Taken together with the genericity condition (3.2) this defines a standard unfolding of the cubic singularity: a cusp catastrophe. The standard form for the unfolding of the cusp is which has three solutions if A 2 < (4/27)|B| 3 , B < 0, and otherwise, one solution except on the curves A 2 = (4/27)|B| 3 , B < 0, which are the loci of local folds. Using the Taylor series for W, the intersection equation (3.1) becomes all the standard results for the unfolding of the x 3 singularity in the (a, b) plane carry over to the (x, μ) plane. A glance at the standard cusp manifold shows that one of the branches of the folds defined by the cusp is invisible, and the other is visible, creating a bifurcation curve of jumps in the (x, μ) plane terminating at (0, 0).  Let a(x, μ), b(x, μ) be as defined in (3.8) and (3.9). Suppose that the nondegeneracy condition (3.2) and the double tangency condition (3.5) hold with Then, for σ ∈ {+1, −1}, the locus a = σ (2/3 Proof. Equation (3.11) is just a rewriting of (3.10). The remainder is a restatement of properties of the standard unfolding of the singularity ±u 3 . Lemma 3.1 is a re-interpretation of the cusp bifurcation (see [30, §8.2]). The up map T u is where u = u m is the smallest u value satisfying (3.7); hence, the visible fold corresponds to σ = −1 in lemma 3.1. The lemma determines the locus of the discontinuity but not the effect.  .7) gives [30]. At the fold, there are only two distinct solutions. The solution u ≈ − (−b)/3 already discussed is a repeated root, and so the other solution can be found by solving On the fold a 2 = −(4/27)b 3 , with a and b linear functions of the original variables x and μ via (3.8) and (3.9). To lowest order, this implies that the fold is tangential to the line a = 0, i.e. x ∼ −W 3 μ/W 2 and so the evaluating b on this line the jump becomes Thus, the jump is order √ |μ|. Note that although we have derived these properties for the up map alone, they are preserved by composition with a smoothly bijective down map.

Square-root discontinuities in monotonic circle maps
The discontinuous circle maps derived in §3 have two features: there is an interval of values which cannot be reached by the map, and on one side of this gap, the derivative of the map tends to infinity with a square-root singularity. In this section, we will consider the fundamental bifurcation sequences for periodic solutions of the simplest form of such maps and illustrate the observations with two examples.
In terms of the lift F of such a circle map, defined on the real line with F(x + 1) = F(x) + 1, coordinates can be chosen such that and F is continuously differentiable and strictly increasing on (0, 1). In other words, the gap is a jump upwards at integer values of x. The square-root discontinuity implies that or vice versa. Thus, F is strictly increasing and hence has a unique rotation number [22].  Now consider families (F μ ) of such maps which are continuous in μ and such that F μ is an increasing function of μ for each x. The continuity in μ implies that the rotation number is a continuous function of μ (see [23, theorem 5.8]). Since F μ is an increasing function of μ, the rotation number is monotonic in μ, irrational values of the rotation number exist at isolated values of μ (see [23, proposition 6.1]) and the invariant set for an irrational rotation number is a Cantor set [21]. Finally, under the same conditions, the set of μ with a given rational rotation number is a non-trivial closed interval, i.e. the maps have phase-locking analogous to that of continuous homeomorphisms of the circle (see [23, theorem 6.6]).
The gaps introduce a second mechanism by which phase-locked solutions can be created or destroyed, that is via border collisions. We will call a border collision with an endpoint with an infinite derivative a type I border collision and use type II for a border collision with an endpoint with a finite derivative. Within each phase-locked region, there is a branch of periodic solutions connecting 0 + with 1 − . If F μ (x) < 1 for all x ∈ (0, 1), then there are two border collision bifurcations, one creating a stable fixed point and the other destroying it and similarly for F q μ in a p/q phaselocked region. There can be no saddle-node bifurcations in such maps. However, for maps with a square-root singularity, F μ (x) cannot be less than one for all x ∈ (0, 1), although to remain an injection F μ (x) < 1 for some x ∈ (0, 1). For maps F μ (x) that are monotonic increasing in both x and μ, the type I border collision with the square-root singularity at 1 − always leads to the creation of an unstable periodic orbit when μ is increased. The type II border collision with 0 + can lead to either the creation of a stable periodic orbit (if (F q μ ) (0 + ) < 1) or the loss of an unstable periodic orbit (if (F q μ ) (0 + ) > 1). There appear to be two possible 'simplest' sequences of bifurcations for the creation/ destruction of periodic orbits of a given rotation number p/q: (a) border collision → border collision → saddle-node bifurcation; (b) saddle-node bifurcation → border collision → border collision → saddle-node bifurcation.
These two bifurcation sequences are illustrated in the bifurcation diagram shown in figure 5. Case (a) occurs if (F q μ ) (0 + ) < 1 when first a stable periodic orbit is created in a border collision at 0 + , then a second unstable periodic orbit is created in a border collision at 1 − and finally, both solutions disappear in a saddle-node bifurcation. Case (b) occurs if (F q μ ) (0 + ) > 1. In both bifurcation sequences, there is always a stable periodic solution in each phase-locked region. Of course, the bifurcation sequences could have extra pairs of saddle-node bifurcations. However, if F μ is convex, then also F q μμ is piecewise convex and case (a) will always occur as the convexity implies that (F q μ ) is monotonic increasing, hence at most one saddle-node bifurcation is possible. Note also that F μ (0 + ) ≶ 1 does not imply that (F   The monotonicity of the map in the parameter ensures that structures are not repeated; if this parameter monotonicity assumption is not true, the essential results hold true but there may be multiple parameter values with a given irrational rotation number (or even intervals) and the bifurcation structure of phase-locked regions can be considerably more complicated.
In the next sections, we illustrate the bifurcation sequences (a) and (b) with a 'canonical' example and then show how they are manifested in the STS.
(a) Example: 'canonical' square-root singularity maps To illustrate the consequences of the square-root singularity, we have constructed an example which is monotonic in x and its parameters and demonstrates the bifurcation sequences described earlier. This example can be derived from threshold models, by using the inverse to define an upper threshold with the gap replaced by a smooth continuation and taking the lower threshold to be a constant with T d equal to the identity. For n ≥ 2, define the lift F n by and extend F n to the real line using the periodicity condition The assumption b ∈ (0, 1) gives a discontinuity at x = m ∈ Z. Since

2)
F n is the lift of a monotonic circle map if 0 < c 1 ≤ n/(n − 1), i.e. 0 ≤ c < nb/2. Note that at c = nb/2, c 1 = 0 and the square-root singularity disappears. The lift F n (x) is increasing in the parameter a.
A detailed analysis of the map is in the electronic supplementary material. In figure 6, the saddle-node bifurcation and border collision curves associated with the map and its first four iterates in the a-c plane for b = 0.9, n = 5 are depicted. It illustrates the two possible types of fundamental bifurcation sequences and the smooth change from the bifurcation sequence (a) to the bifurcation sequence (b). The transition occurs when (F q ) (0 + ) = 1 and the saddle-node curve merges with the type II border collision curve. Furthermore, it shows -Every phase-locked region is always bounded by a saddle-node curve on the right. -The border collision on the right is associated with a type I border collision with an infinite derivative and hence cannot merge with the right saddle-node curve. -The border collision on the left is associated with a type II border collision with a finite derivative. For the smaller values of c (the derivative of F n at 0 + ), this is also the left bound of the phase-locked region. -For some phase-locked regions, the left bound for the larger c values is formed by a saddle-node curve. This curve merges with the type II border collision curve when c decreases. -The function F n is convex for c ∈ [0, bn/2(n − 1)] = [0, 0.5625] and only the bifurcation sequence (a) occurs for those parameter values.
(b) Example: the sinusoidal threshold system Next, we continue with our illustrative example of a threshold system, the STS given by equations (2.2)-(2.3). As discussed in §3, this system has an associated circle map with a gap if the flow is tangent to the upper threshold on contact. This will happen if h (x) > γ , i.e. α > γ . Thus, increasing α smoothly changes the map from continuous to a map with a gap. This enables us to see how the familiar saddle-node bifurcation structure for smooth maps without gaps, as shown in figure 2, transitions to the bifurcation sequences: first (b) saddle-node bifurcation → border collision → border collision → saddle-node bifurcation and then (a) border collision → border collision → saddle-node bifurcation.
Recall that the sufficient conditions for a saddle-node bifurcation curve of a (p, 1) fixed point are β = pγ or β = pγ − α/π. We will see now why this condition is only sufficient. An explicit expression for the infinite derivative type I border collision of a (p, 1) fixed point can be derived (recall thatγ = γ /(γ + 1)): This curve is a monotonically increasing function of β starting at the minimum value of β = γ p − (γ /2π ), α = γ , where x n = x n+1 = 1 and asymptoting to the saddle-node line β =γ p where x n = x n+1 = 3/4. The finite derivative type II border collisions for (p, 1) fixed points satisfy where x c and x b are equivalent to the time points on the periodic cycle indicated by b and c in figure 3. Note that x b = x c when α = γ and β = pγ − γ /2π , at which point the type I and type II border collisions coalesce. To find the intersection of the type II border collision curve and the saddle-node curve, we observe that x c = 1/4 along the saddle-node curve β = pγ − (α/π).
Substituting this into the equations gives the relation 1 + 1 − q 2 = q((π/2) + arccos(q)), where q = γ /α. This has a unique solution q * ∈ (0, 1), q * ≈ 0.725. Hence, when α = γ /q * and β = pγ − γ /q * π , then the type II border collision curve and the saddle-node curve collide and the border collision curve terminates the saddle-node curve. This implies that at α = γ /q * , the bifurcation sequence (b) transitions to the sequence (a). Border collisions for general (p, q) solutions can be found numerically by solving the fixed point condition (2.6) along with the requirement that the fixed point occurs at the appropriate endpoint of the gap. In figure 7a, the bifurcation set for γ = 0.5 is shown for the first few iterates of the map. Between the lines α = γ = 0.5 and α = 1, the circle map is monotonic with a gap.   maps implies that one side of the saddle-node tongues is terminated by a border collision and the other side persists. For α > 1, the map is non-monotonic. We consider the general transition from monotonic to non-monotonic maps in §5 and then continue with this example.

Tangencies leading to non-monotonic maps
We return to the general threshold maps. We have seen in §3 that tangencies of the upflow with the upper threshold create discontinuities in the map. In this section, we will show that tangencies of the downflow with the upper threshold lead to multiple pre-images (non-monotonicity) in the down map T d (see figure 8). This implies that tangencies of the upflow with the lower threshold lead to non-monotonicity in the up map T u . We will also discuss how and when tangencies in the upflow or downflow imply non-monotonicity in the full circle map. Finally, we will discuss how simultaneous tangencies in the up and down maps lead to the combination of gaps and non-monotonicity. This can lead to the presence of multiple gaps (see figure 9) and give rise to a codimension 2 bifurcation which organizes the local bifurcation structure. We illustrate the mechanism and the consequent bifurcations with the STS example. boundary to the lower boundary and the up map T u : R × P → R from the lower boundary to the upper boundary. A map is monotonic if every point in its range has exactly one pre-image. By using the backward flow, we can find the pre-images of the down map. Let us consider the function i.e. W is very similar to W as defined in (3.1), but uses the backward downflow starting at the lower threshold g(x, μ). If (τ * , x * , μ * ) satisfies W(τ * , x * , μ * ) = 0, then x * − τ * is a pre-image of x * for the down map T d . Using the convention for derivatives from §3, if also W 1 (τ * , x * , μ * ) = 0, then there is a tangency between the downflow ψ τ (h(x, μ), μ) and the upper threshold h(x, μ) at x = x * − τ * , μ = μ * and τ = 0. Due to the similarity between W and W, the results of §3 give the local behaviour near a pre-image.
-If W 1 (τ * , x * , μ * ) = 0 and W 11 (τ * , x * , μ * ) = 0, then there is a fold along a curve in the (x, μ)-plane given by W 2 x + W 3 μ = 0 in lowest order. The fold has again two interpretations: it represents a unique pre-image for the map T d along the fold line. And in the threshold system, it gives also a persisting simple tangency between the upwards trajectory and the lower threshold at this point. When W 11 ( W 2 x + W 3 μ) < 0, then there are two pre-images, one less and one greater than x * − τ * . Both pre-images are relevant for the map T d , which has a turning point at the unique pre-images on the fold line, i.e. at the tangency points; see figure 8.

then again generically we have a cusp unfolding and locally there is a change in monotonicity with two turning points emerging in the map T d .
As T d is periodic, this local analysis shows that globally the map T d always has an even number of tangency points and an odd number of pre-images (counting multiplicity at the degenerate points).

(b) Simultaneous tangencies
We have now shown for the up and down maps that tangencies between the flow and the nearby threshold correspond to non-monotonicity and tangencies between the flow and the opposite threshold correspond to discontinuities in those maps ( §3). The threshold map is a composition of the up and down maps; hence, these tangencies will influence the monotonicity and continuity of the threshold map. The derivative of the threshold map is Thus, a tangency between the downflow and the upper threshold leads to a turning point in the threshold map. And a tangency between the upflow and the lower threshold leads to a turning point in the threshold map if this tangency occurs at a point that is in the range of the down map.
If both the up and down map have tangencies with the upper threshold, then the result will be a non-monotonic, discontinuous map. The presence of both gaps and non-monotonicity can also lead to further structural changes in the map: a transition from a single gap to three (or more) gaps. The transition to multiple gaps occurs as follows (see also figure 9). Suppose that the upflow is tangent to the upper threshold at a first intersection point at  In the corresponding circle map, there will be a gap associated with each of these pre-images. In each case, the gap arises from the same tangency; thus, the size and the qualitative nature of the gap will be preserved. The unbounded derivative can occur either to the left or the right of the gap depending on the slope of the upper threshold at the pre-image.
The transition point between one and three gaps occurs when the down map has a tangency with the upper threshold and this tangency point is mapped into x = x d .
In the notation of figure 9, at this special point, we have b = c and the threshold map maps b into d. This is an isolated point in the map as all points nearby b get mapped nearby e. The finite derivative at e vanishes and there is no derivative at d as it is an isolated point. How the creation of multiple gaps plays out in the STS circle map is illustrated in figure 10. The two points at which tangencies with the upper threshold map into x = x d correspond to a local maximum and a local minimum of the circle map. These tangencies are mapped into x = x d when the local maximum coincides with the infinite derivative (see figure 10a) or the local minimum coincides with the finite derivative (see figure 10b). The isolated point in both cases is marked in orange.
Tangencies in both the upflow and downflow with the lower threshold do not lead to multiple gaps. This apparent asymmetry is a consequence of the fact that we have considered the map from the upper threshold to the upper threshold (T u • T d ). Generically, the tangency of the down map with the lower threshold creates a gap; this gap persists under the action of the up map and hence creates a gap in the threshold map. Non-monotonicity of the up map (tangencies of the upflow with the lower threshold) does not affect the pre-images of the gap. In this case, the only mechanism in which multiple gaps can be created is by non-monotonicity of the down map, i.e. the downflow being tangent simultaneously to the upper and lower threshold. Thus, the multiple gaps in the threshold map reflect the multiple tangencies in the down map. In §5d, we discuss further the influence of the order of composition on the apparent structure of the map.
The consequences of non-monotonicity for bifurcations in the standard circle map are discussed in [19]. All the typical features of period-doubling bifurcations and the associated transition to chaos can be seen in threshold systems too.  These transitions can be computed numerically and are shown for the particular case γ = 0.5 by the v-shaped curves formed by the dashed lines in figures 7a and 10c. Even though there are three gaps, no new border collision curves will be formed. This follows from the observation that the fixed points and bifurcation curves of the maps T u • T d (mapping upper threshold into upper threshold) and T d • T u (mapping lower threshold into lower threshold) are equivalent. The latter map is the composition of a non-monotonic, continuous map acting on a monotonic, discontinuous map. So, the gap has a unique pre-image, implying that there are at most two border collision curves, see also the section below. Figure 10c shows that the type I border collisions for the (1, 1)-tongue and the type II border collisions for the (2, 1)-tongue cross in the three-gap region (inside the v-shaped region). The map at this point is shown in figure 11c. The two border collision points are denoted by c 0 (type II border collision) and c 1 (type I border collision), i.e. the tangency between the upflow and the upper threshold is at c 1 . This implies that there is some . Many of the border collisions from the intermediate tongues appear to converge on this crossing point, suggesting that it forms a codimension two point that organizes the local bifurcation structure. In the next section, we will show that this is indeed the case. Though we will not go into the details here, we note that explicit expressions can be derived for the first period-doubling bifurcation for (p, 1) fixed points, giving rise to fixed points (2p, 2). The case γ = 3 is particularly interesting, since at this value, the period-doubling and type I border collision curves coincide.

(d) A codimension two bifurcation
In this section, we conjecture that if the upflow has a generic tangency with the upper threshold and the down map maps both end points of this gap into the pre-image of the up map associated with the tangency, then the corresponding codimension 2 border collision bifurcation point is an organizing centre for the local bifurcations. Introducing the parameter vector µ ∈ R 2 , such codimension 2 point is characterized by the following properties. There exist c 0 , c 1 , c 0 = c 1 such that This implies that the threshold map T u • T d has multiple gaps, and there are simultaneously two border collisions: one type I border collision at c 0 and one type II border collision at c 1 . To analyse this border collision, it is convenient to consider the map from the lower threshold to the lower threshold, i.e. T d • T u . This map has the same number of fixed points and bifurcations as the threshold map T u • T d . Under the conditions above, the border collisions in the map T d • T u collide when µ = 0. The map is continuous at x 0 and the derivatives on each side have opposite signs (with one of them having a square-root singularity).
In §3, it is shown that the gap in T u persists for µ small and that generically the derivative of T u nearby the gap has the same sign at both sides of the gap (with one of them having a square-root singularity). For µ = 0, the discontinuity in T u leads to a discontinuity in the threshold map T d • T u with the derivatives at each side of the gap still having opposite signs. Hence, the parameter plane nearby µ = 0 can be divided into four regions which are such that the threshold map has two solutions in one region, one solution in two regions and no solutions in one region. In [24, §7.1.1], it is shown that if the local derivatives are less than 1 (i.e. the map is contracting) such maps are organizing centres for the local bifurcations. It is also noted that this bifurcation point is equivalent to the gluing bifurcation in [31,32] and big bang bifurcation in [26]. Although we do not satisfy the condition that the derivatives are less than 1 (there is a square-root singularity at one of the end points), we still see the organizing centre in the bifurcation diagram. Avrutin et al. [33] have studied maps on the real line with similar singularities in the derivative, although our local behaviour does not seem to be one of the cases they study in detail. Our behaviour looks more like a one-dimensional Nordmark map at the grazing point.

Other mechanisms: Cherry flows
The creation of gaps in circle maps arises naturally in other contexts. If two oscillators interact then a lowest order model might relate the evolution of the phase of each oscillator. In this case, the natural phase space is the torus (one angle for each phase) leading to a differential equation on the torus. Examples include neuronal models such as the Kuramoto equations [34] and models of breathing patterns [10].
Suppose that a flow on the torus has a homotopically nontrivial transverse section. Then, the return map on the global section is a circle map as discussed in previous sections. There are two natural classes [9]. In a Poincaré flow, this map is continuous and monotonic, so the classic results about the existence of rotation numbers and the dichotomy of dynamics depending on whether the rotation number is rational or irrational hold. On the other hand, a Cherry flow [9,12,35] has at least one unstable stationary point and one saddle, which can create a return map which is monotonic and with a discontinuity. Such maps have a well-defined rotation number, and for continuous perturbations of the defining vector field, this rotation number varies continuously (see §1 and [22,23]). In particular, if the family of maps has parameter values which have rotation numbers that are different, then there are parameters with irrational rotation numbers. Since the image of the cross-section is not surjective because of the discontinuity this is a natural way to construct a Denjoy counterexample (a map with an irrational rotation number but no dense orbits).
Cherry flows are classic examples from geometric dynamics [12], and the transition from a Poincaré flow to a Cherry flow has been discussed briefly in [27]. In this section, we give a brief account of the scalings predicted by a theoretical model of this transition and describe a piecewisesmooth example. We will show that unlike for the threshold systems considered in §3, the size of the discontinuity does not tend to zero at the transition point, and that at the discontinuity the slope of the map tends to infinity with a characteristic scaling. The first of these results is noted in [27, p. 423].
A pair of stationary points can be created in a saddle-node bifurcation. Suppose thatμ is a real parameter and that ifμ > 0 there are no stationary points of the flow, while ifμ < 0 there is an unstable stationary point and a saddle. Then, there are local coordinates (ξ , η) such that in a neighbourhood of (ξ , η,μ) = (0, 0, 0) the leading order terms of the differential equation arė with λ > 0 and μ is a rescaled version of the original parameterμ. We would like to derive a leading order return map through a neighbourhood of the origin from ξ < 0 to ξ > 0 which can then be composed with the standard return maps for Poincaré type flows away from this singularity to obtain a theoretical model of the global return map for the transition from a Poincaré flow to a Cherry flow.
In the classic form (6.1), the unstable manifolds of the stationary points are vertical, and so it is not possible to define a return map from positive to negative ξ . This suggests that for this problem we should add a further change of coordinates x = ξ + aη 2 , y = η, (a > 0), (6.2) so that in these new coordinates, the unstable manifold of the saddle-node stationary point at μ = 0 is x = ay 2 , ξ = 0 in (6.2), making a return map from negative x to positive x possible even if μ < 0. Another way of seeing this is to claim that generically the unstable manifolds are parabolic curves to the lowest order at the saddle-node bifurcation, and this modification of coordinates has the effect of making the unstable manifolds quadratic functions without complicating the underlying dynamics.
In the new coordinates (6.1) becomeṡ As with (6.1), (6.3) is the leading order approximation of the vector field in a neighbourhood N of the origin in phase space and parameter space, i.e. |x| 2 + |y| 2 + |μ| 2 < ε 2 for some small ε > 0. Fix ε > 0 and N as above and let k be a constant, 0 < k < 1 to be determined. Our goal is to derive a return map of (6.3) from x = −kε to x = kε in N . This can then be embedded in a smooth flow that defines a return map which is locally just a smooth deformation of this map. If the initial condition is (−kε, y 0 ) in N then this corresponds to (ξ 0 , η 0 ) = (−kε − ay 2 0 , y 0 ) and since a > 0, ξ 0 < 0. Suppose that μ > 0, so we can write μ = σ 2 , σ > 0.
Solutions to (6.1) are ξ = σ tan(σ t + C), η = η 0 exp(λt) or The initial condition (−kε, y 0 ) implies that σ tan C + ay 2 0 = −kε and so as σ → 0 Provided it stays in N , this solution intersects x = kε after time T given by σ tan(σ T + C) + ay 2 0 exp(2λT) = kε. (6.4) If |y 0 | is sufficiently small so that the first term on the left-hand side of (6.4) dominates the second term this leaves σ tan(σ T + C) ≈ kε, so and T → ∞ as σ ↓ 0. This approximation holds in an exponentially small region of parameter space with |y 0 | ε exp(−λT). However, in this very small neighbourhood of y 0 = 0, the return map through the region where the saddle-node bifurcation is about to take place is approximately y → exp(λT)y ≈ (e λπ ) 1/σ y.
In other words, there is a small neighbourhood on which the slope s of the map is very steep and for μ → 0 + tends to infinity with Note that the constant λπ is determined by the normal form (6.1), and in general, log s ≈ κ/ √ μ for some constant κ. Now suppose that μ < 0, so μ = −σ 2 , σ ≥ 0.
The derivation of the return map is more standard in this case. By construction, there are stationary points at (±σ , 0) and (−σ , 0) is a saddle. The unstable manifold of the saddle in (x, y) coordinates is the curve x = −σ + ay 2 and so this intersects x = kε at y = ± (kε + σ )/a. This implies that if σ ≥ 0, there is an interval of length 2 (kε + σ )/a between the two intersection points of the unstable manifold with x = kε which cannot be reached by trajectories starting on x = −kε in N . At the bifurcation value σ = 0, this is non-zero and so the limit of the size of the discontinuity of the return map does not tend to zero at the bifurcation value [27]. Moreover, standard analysis (e.g. [36]) close to the saddle shows that the slope of the return map at the discontinuity tends to infinity as the leading order non-constant term of the return map is Very briefly, the argument is that the saddle which exists if μ < 0 has linearized eigenvalues λ > 0 and 2x * , where x * is the x-coordinate of the saddle point, i.e. x * = − √ |μ|. Working in new coordinates (x, y), with the obvious abuse of notation, centred on (x * , 0) the flow is locally approximately linear and so solutions are locally x = x * + c e −2 √ |μ|t , y = y 0 e λt . A solution starting at (x * − h, y 0 ) strikes y = ±h after a time t = 1 λ log(h/y 0 ) and the corresponding x-coordinate is  -if μ ≤ 0 then the return map has is a finite discontinuity and if μ < 0 then the slope of the map tends to infinity at the discontinuity.
The system (6.3) could be smoothly embedded in a global flow to create a C ∞ example of the transition from a Poincaré flow to a Cherry flow that could be analysed numerically. To simplify the construction and to make it possible to calculate some quantities explicitly, we have chosen to use a piecewise linear global flow around the nonlinear saddle-node bifurcation. The details of this embedding can be found in the electronic supplementary material. Figure 12 illustrates the flow and return maps associated with this model as μ passes through zero. The parameters used are as follows: a = 45, μ = ± 1 70 , kε = 1 8 . (6.5) With these parameters, a gap of size 2(1/ √ 8 × 45) ≈ 0.1054 opens up between the intersections of the local unstable manifolds of the non-hyperbolic stationary point on the line x = 5/8 as μ decreases through zero and increases in size as μ decreases. Figure 12a,b shows the flow and the associated return map with μ = 1/70, i.e. when the flow is still a Poincaré flow. The return map clearly displays the very steep derivative over a significant region in the x n+1 variable, but a very small region in the x n variable. The inset shows a blow-up of the map in a segment of x n values containing the region of high derivative. This emphasizes just how narrow the regions involved become and illustrates the rapid transition between shallow and steep derivatives. Figure 12c shows the associated return map with μ = −1/70, at which the flow is a Cherry flow. For most x n values, the return map is almost identical, except that the steep curve has been replaced by a gap. The insets show a neighbourhood of the points of discontinuity. This reveals the infinite slope at the point of discontinuity.

Conclusion
In this paper, our focus has been to understand how structural transitions occur in maps derived from fundamental models. We have considered transitions from continuity to discontinuity, monotonicity to non-monotonicity and the creation of multiple gaps, and have described how these transitions can alter the bifurcations and dynamics of circle maps. Understanding how these For example, in the study of maps with gaps, much of the focus has been on gaps where the derivatives at either side of the gap are bounded. Applications of such maps included threshold maps with non-smooth thresholds, like the combs in [4] or the triangles and rectangles in [1]. However, these non-smooth thresholds were introduced as approximations of smooth thresholds to allow for explicit calculations, and there are other applications (e.g. impact oscillators) in which finite derivatives do not occur [33,37]. Generically, we have shown that both in threshold systems and in the creation of Cherry flows one expects the associated discontinuous circle map to have a singularity in the derivative to one (threshold models) or both (Cherry flows) sides of the gap. In the case of threshold systems, it is the contact between the up/downflow and the upper/lower thresholds that is important in determining the local behaviour: if the contact is at a tangency, then generically a gap and the square-root singularity result. At the first tangency in a family of such maps, the size of the gap increases continuously from zero for the threshold models, but for Cherry flow, there is a discontinuous jump to a finite gap at the transition point. Another interesting example of transitions in circle maps initiated by tangencies in the underlying system can be found in the context of phase-resetting maps (see [38]). It was shown that before the transition from degree-one to degree-zero the phase-resetting map loses monotonicity via a tangency.
We have shown that the natural consequence of the square-root singularity is that one expects to see sequences of border collisions (types I and II of §4) interspersed with saddlenode bifurcations. Using a specific example threshold model, we have illustrated how the Arnold tongue bifurcation set for continuous monotonic circle maps with periodic solutions created and destroyed by saddle-node bifurcations transitions to a bifurcation set where periodic solutions can in addition be created/destroyed by border collisions. This underlying structure underpins the bifurcation sets found numerically by Glass et al. [2,13] and the recent work on the two-process model for sleep-wake regulation [39].
The transition from no gaps to gaps in piecewise-smooth monotonic maps also has an important consequence for non-periodic solutions. With no gaps, non-periodic solutions are quasiperiodic, and typically, they are dense in the circle. With gaps, solutions tend to a Cantor set [22]. Once noted, this difference is readily observable in numerically computed bifurcation diagrams, as illustrated in figure 7b,c.
For threshold systems, we have identified that the transition to non-monotonicity is also the result of tangency, this time of the up/downflow with the lower/upper threshold. The presence of both gaps and non-monotonicity gives many different new possibilities. For example, we have shown that there is a natural transition from circle maps with a single gap to multiple gaps. This in turn leads to a novel codimension two point in which there is the coincidence of two border collisions. A provisional analysis of this codimension two point shows how it acts as a local organizing centre, out of which an infinite sequence of other border collisions emerge (cf. [24]); details will be published elsewhere.
Threshold systems, even the simple example that we have chosen to illustrate many of our results, have extremely rich dynamics which we have not sought to classify exhaustively. Instead, we have shown how continuous (or not), injective (or not) circle maps sit within an overall framework with transitions between map types governed by tangencies. We have also highlighted how some generic novel higher codimension bifurcations can then occur.
Data accessibility. This article has no additional data.