A topological characterization of the omega-limit sets of analytic vector fields on open subsets of the sphere

In [15], V. Jimenez and J. Llibre characterized, up to homeomorphism, the omega limit sets of analytic vector fields on the sphere and the projective plane. The authors also studied the same problem for open subsets of these surfaces. Unfortunately, an essential lemma in their programme for general surfaces has a gap. Although the proof of this lemma can be amended in the case of the sphere, the plane, the projective plane and the projective plane minus one point (and therefore the characterizations for these surfaces in [8] are correct), the lemma is not generally true, see [15]. Consequently, the topological characterization for analytic vector fields on open subsets of the sphere and the projective plane is still pending. In this paper, we close this problem in the case of open subsets of the sphere.


Introduction and statements of the main results
In a certain sense, the problem of characterizing, from a topological point of view, the ω-limit sets of two-dimensional continuous dynamical systems is as old as the theory of dynamical systems itself. After all, what the famous Poincaré-Bendixson states, in a presentday formulation, is that any ω-limit of a sphere flow containing no critical points is a periodic orbit -hence, topologically speaking, a Jordan curve.
If the absence of critical points is no longer required, sphere ω-limit sets still admit a very clear-cut characterization, as shown by Vinograd in the early fifties: they are the boundaries of simply connected regions [28]. Building on Vinograd's characterization, and some partial results by Smith and Thomas [25], V. Jiménez López and G. Soler López published a number of papers providing a complete topological classification of ω-limit sets for continuous flows on all compact (without boundary) surfaces. These results were summarized in [18], where a list of relevant references can also be found. It is worth emphasizing that, due to a result by Gutiérrez [13], C ∞ -flows are topologically undistinguishable from continuous flows as far as non-trivial recurrences do not occur; in particular, Vinograd's theorem is still true in the smooth realm.
When the very natural assumption of analyticity is added (in fact, the Poincaré-Bendixson theorem was first proved by Poincaré for analytic vector fields!), Vinograd's theorem does not work any more: there are many simply connected sphere regions whose boundaries (even after topological deformation) cannot be realized by analytic flows. The topological classification of the ω-limit sets of analytic flows in the sphere (and also in the plane and in the projective plane) was accomplished by Jiménez López and Llibre in [17]. A similar classification, now for analytic flows just defined on open subsets of these surfaces, was also outlined there.
Unfortunately, in doing this, Jiménez López y Llibre made an oversight, wrongly assuming that, in this setting, an ω-limit set cannot be locally an arc at any of its points. While this is true for the sphere, the plane, the projective plane and the projective plane minus one point (hence the main results of [17] remain correct), it is possible, for instance, that an arc is an ω-limit set for an analytic vector field defined in the whole sphere except at both endpoints of the arc: see [8]. To make things worse, this unexpected "arc issue" implies that the characterizations of ω-limit sets for the sphere and the projective plane cannot be more or less directly extended (as assumed in [17]) to proper open subsets of these surfaces, particularly if we intend to preserve analyticity as much as possible. The aim of this paper is, therefore, to provide a correct (and optimal) topological characterization of the ω-limit sets of analytic vector fields defined on open subsets of the sphere. Our main result is surprisingly easy to state: these ω-limit sets are, essentially, the boundaries of simply connected Peano spaces. We intend to address the similar problem for the projective plane in a forthcoming paper.
Before stating precisely our results, we need some definitions and notions. Recall that a function v = f (u), u = (u 1 , . . . , u n ), mapping an open subset U of R n into R, is called (real) analytic if it can be locally written as a convergent power series in the variables u 1 , . . . , u n . A function f : U → R m is called analytic when each of its components is analytic in the previous sense.
Throughout the paper, the distance d(·, ·) in the unit sphere S 2 = {(u 1 , u 2 , u 3 ) ∈ R 3 : u 2 1 +u 2 2 +u 2 3 = 1} will remain fixed. We endow S 2 with an analytic differential structure using as charts the stereographic projections π N : S 2 \ {p N } → R 2 and π S : S 2 \ {p S } → R 2 defined, respectively, by π N (x, y, z) = (x/(1 − z), y/(1 − z)) and π S (x, y, z) = (x/(1 + z), −y/(1 + z)) (here p N = (0, 0, 1) and p S = (0, 0, −1) are the north and south poles). Now, if f is a map from an open subset O of S 2 into R m , differentiability for f is defined in the usual way. In particular, f is called analytic if the compositions f • π −1 N and f • π −1 S (whenever they make sense) are analytic. If f : O → R 3 satisfies that f (u) is tangent to S 2 at u for any u ∈ O, then it is called a vector field on O. In this paper we will only deal with C ∞ and analytic vector fields. We say that a set A ⊂ O is analytic (in O) if it is the set of zeros of some analytic map F : O → R.
If f is a C ∞ -vector field on S 2 , and u 0 ∈ S 2 , then we denote by Φ u 0 (t) the maximal solution u = u(t) of the differential equation u ′ = f (u) with initial condition u(0) = u 0 . The map u(t) is defined for all t ∈ R, and Φ : R × S 2 → S 2 defined by Φ(t, u) = Φ u (t), the flow associated to f is a continuous (in fact, a C ∞ -) map. The set Γ = Φ u (R) is called an orbit of Φ, and any subset Φ u (I), with I an interval, a semi-orbit of Γ. If the orbit Γ equals u (that is, f vanishes at u), then u is called singular, and it is regular otherwise. We denote by Sing(Φ) the set of singular points of Φ. The ω-limit set ω Φ (u) of u (or of the orbit Φ u (R)) is the set of accumulation points of Φ u (t) as t → ∞, and the α-limit set α Φ (u) is the analogously defined set for t → −∞. A set M ⊂ S 2 is called a flow box for Φ (respectively, The continuity of Φ implies that, although the border of a semi-flow box needs not be a semi-orbit of Φ, it is the union set of some of its semi-orbits. As it is well known, if u is regular, then it is neighboured by a flow box. As has just been said, our aim is to characterize topologically the ω-limit sets of analytic vector fields f defined on non-empty open subsets O of S 2 . To do this we assume that f can be C ∞ -extended to the whole S 2 by adding singular points at S 2 \ O: in view of Theorem 3.2 below, this involves no loss of generality (because it is possible to multiply f by a positive factor so that the resultant vector fieldf has this property, when observe that the solutions of the differential equation u ′ =f (u), when seen as subsets of O, are the same as those of u ′ = f (u)). Thus, when speaking about ω-limit sets of f , we are in fact referring to the ω-limit sets of the flow Φ associated to the extension off to S 2 . Of course, it is sufficient to consider the case when O is a region (that is, open and connected), and, as an additional simplification, we will assume that the complementary of O is totally disconnected (that is, all components of S 2 \ O are singletons), because any region of S 2 is homeomorphic (in fact, analytically diffeomorphic) to a region of S 2 of this type: see Proposition 2.3(i) and Theorem 3.1.
A topological space homeomorphic to [0, 1], R, the unit circumference S 1 = {z ∈ C : |z| = 1}, the unit ball D 2 = {z ∈ C : |z| ≤ 1} or R 2 will be called, respectively, an arc (its endpoints being the points mapped by the homeomorphism to 0 and 1), an open arc, a circle, a disk or an open disk.
We say that a topological space X is pathwise connected if for any x, y ∈ X there is a continuous map ϕ : [0, 1] → X such that ϕ(0) = x and ϕ(1) = y. Such a map is called a path (from x to y). If additionally, for any x, y ∈ X, there is an arc in X having x and y as its endpoints, then X is called arcwise connected. When X is Hausdorff, these turn out to be equivalent notions, see [32,Corollary 31.6,p. 222].
A compact connected Hausdorff space is called a continuum, and a locally connected metric continuum is called a Peano space. The Hahn-Mazurkiewicz theorem establishes that a (non-empty) continuum is a Peano space if and only if it is the continuous image of the interval [0, 1] [22, Theorem 2, p. 256]. Hence any Peano space is pathwise (arcwise) connected. Moreover, it is locally arcwise connected as well, that is, for any ǫ > 0 there is δ > 0 such that, whenever v, w ∈ X and 0 < d(v, w) < δ, there is an arc with endpoints v, w whose diameter is less than ǫ [22, Theorem 2, p. 253 and Theorem 1, p. 254].
A pathwise connected space X whose fundamental group is trivial (that is, for any path ϕ : [0, 1] → X with ϕ(0) = ϕ(1) = x there is a continuous map F : [0, 1] × [0, 1] → X such that F (t, 0) = ϕ(t) and F (t, 1) = x for any t) is called simply connected. As shown in [12, Proposition 3.2, p. 10]), simply connectedness is equivalent to contractibility: X is said to be contractible if there are p ∈ X and a continuous map G : [0, 1] × X → X such that G(0, x) = x and G(1, x) = p for any x. It is well known (see, e.g, [24,Theorem 13.11,p. 274]) that if ∅ X S 2 is a region, then X is simply connected if and only S 2 \X is connected and if and only if X is an open disk. The equivalence between simply connectedness of X and connectedness of S 2 \X holds as well when X ⊂ S 2 is a Peano space, see [19,Proposition 4.1].
Let E X be the set of points of a Peano space X admitting an open arc as a neighbourhood. If E X is dense in X, then X is called a net, each component of E X is called an edge of X, and the points of E X and X \ E X are respectively called the edge points and the vertexes of X. Any edge E of a net X is either a circle (when E = X) or an open arc. In this last case Cl E is either E plus one vertex of X (and then we get a circle) or E plus two vertexes of X (and then we get an arc).
Remark 1.1. The previous statements can be proved as follows. Let E be an edge of X, fix x ∈ E, find open arcs A, B in E neighbouring x with Cl A ⊂ B and let p and q be the endpoints of Cl A. Then X \ A is trivially locally connected.
Assume first that this set is connected, hence a Peano space. Then there is an arc C ⊂ X \ A with endpoints p and q. If C ⊂ E, then, by connectedness, E equals the circle C ∪ A. Otherwise, there is a arc C p ⊂ C with endpoints p and v, and an arc C q ⊂ C with endpoints q and w, such that v and w are vertexes of X and both C p \ {v} and C q \ {w} are included in E. Again using the connectedness of If X \ A is not connected, then it is the union of two disjoint Peano spaces V ∋ p and W ∋ q. We claim that V (and similarly W ) is not fully included in E. If this is not true, then any point of V except p disconnects V (otherwise we could argue as in the above paragraph to find a circle in V E, then arriving at a contradiction), hence any pair of points of V disconnect V . By [22,Theorem 2,p. 180], V is then a circle and again we get a contradiction. Thus, there are points in V which do not belong to E, and we can construct an arc C p with endpoints p and a vertex v in V , such that C p \ {v} ⊂ E. Arguing similarly in W to find a vertex w ∈ W and an arc C q with endpoints q and w and such that C w \ {w} ⊂ E, we conclude as before that E ∪ {v, w} is the arc A ∪ C p ∪ C q .
When the number of edges (and then of vertexes) of a net is finite it is called a graph. If a graph includes no circles, then it is called a tree; more generally, a Peano space including no circles is called a dendrite. If a tree X has n edges, then it has n + 1 vertexes: if, moreover, there is a vertex c belonging to the closure of all its edges, then X is called an (n-)star with center c and endpoints all other vertexes of X. In this scenario, the edges of X are also said to be the branches of the star. Strictly speaking, this only makes senses if n = 2 (if n = 1, then X becomes an arc and we can choose as its "center" any of its endpoints). Yet, for notational convenience, an arc will also be referred to as a "2-star", when all points except the endpoints are considered to be "centers", and get the corresponding "edges" after taking out a "center" and both endpoints. Finally, also by convention, a single point is called a 0-star, its center being the point itself. If X is a topological space and p is a point in X neighboured by an n-star with p as its center, then we say that p is a star point of X (of  order n), and also an n-star point of X. Note that the order of a star point is unambiguously defined and that if X is a net, then E X is just the set of 2-star points of X.
We say that X is a thick arc if there are pairwise disjoint subintervals {(c n −δ n , c n +δ n )} n of [0, 1] (with (c n ) n and (δ n ) n sequences in (0, 1)) such that X is homeomorphic to [0, 1]∪ n {z ∈ C : |z − c n | ≤ δ n }. The points mapped by the homeomorphism to 0 and 1 are, again, called the endpoints of X, and are also said to be a proper pair of endpoints of X. In this way we deal with a possible ambiguity, because the endpoints of a thick arc are not uniquely defined when c n − δ n = 0 and/or c n + δ n = 1 for some n. If the above family of intervals is empty (respectively, only consists of the interval (0, 1)), then a thick arc becomes an arc (respectively, a disk).
The next one is the most important notion of this paper.
Definition 1.2. We say that ∅ A S 2 is a shrub if it is a simply connected Peano space.
Single points, arcs, disks and, in general, thick arcs in S 2 , are the simplest examples of shrubs, and dendrites are shrubs as well [22,Theorem 3,p. 375 and Corollary 7,p. 378]. If A is a shrub, then each disk in A which is not included in a larger disk is called a leaf (of A). If all points of an arc in A, except its endpoints, are 2-star points of A, then it is called a sprig. A point of a shrub A may be an interior point (if it belongs to Int A), an exterior point (if it belongs to the boundary of a leaf and does not disconnect A), a sprig point (if it is a point, but not an endpoint, of a sprig), or, otherwise, an bud. If a bud disconnects A, then it is called a node, and otherwise a tip. Therefore, nodes and sprig points are the of A disconnecting it. See Figure 1. Clearly, the set of buds of A is closed. A thick arc B in A is called a stem when, whenever an interior point, an exterior point or a sprig point belongs to B, the corresponding leaf or sprig is included in B. If a shrub A is a union of finitely many leaves, then it is called a cactus. If A is the union of a cactus D and m sprigs, all of them having some endpoint in D, we call A an m-prickly cactus.
If A is a shrub, then all components . If fact, more is true: their closures D j = Cl R j are disks. Therefore, the leaves of A are exactly the disks D j . As some consequences, any circle in A must be included in one of its leaves, distinct leaves of a shrub can have at most one common point, and if shrub has no leaves, then is a dendrite. Remark 1.3. To prove that D j is a disk it is enough to show, by [24,Remark 14.20(a), p. 291], that if a sequence (u n ) ∞ n=1 of points in R j converges to a point u ∈ Bd R j , then there is a path in D j monotonically passing through the points u n and ending at u (that this, there is a continuous map ϕ : [0, 1] → D j and numbers 0 ≤ t 1 < t 2 < · · · , t n → 1, such that ϕ(t n ) = u n for all n and ϕ([0, 1)) ⊂ R j ). This last statement is a direct consequence of the following fact: if ǫ > 0, then there is δ > 0 such that, whenever v, w ∈ R j and 0 < d(v, w) < δ, we can find an arc in R j with endpoints v, w whose diameter is less than ǫ. Certainly, such a δ > 0 exists, due to the local arcwise connectedness of A, except than we cannot guarantee that the small arc connecting v and w, call it L, is fully contained in R j . One thing, at least, is sure: L ⊂ D j . Otherwise, we could easily construct a circle C ⊂ A intersecting both R j and A \ D j , and simply connectedness forces that one of the open disks enclosed by C is included in A, which contradicts that R j is a component of Int A. Thus, L ⊂ D j and, similarly as above, we can construct a circle C ′ in D j including all points of L ∩ Bd R j . Since C ′ encloses an open disk fully included in D j (thus, indeed, in R j ), it is easy to modify slightly L so that the resultant arc L ′ still has diameter less than ǫ, and v and w as its endpoints, and additionally satisfies L ′ ⊂ R j . Definition 1.4. We say that a shrub A is realizable if its set of buds is totally disconnected.
Remark 1.5. If A is a shrub, then Bd A is a Peano space [22,Theorem 4,p. 512]. Therefore, if A is a realizable shrub, then Bd A is a net, the buds of of A are the vertexes of Bd A, and the exterior and sprig points of A are the edge points of Bd A. Definition 1.6. Let A be a shrub.
• We say that a bud u of A is odd if either u is not a star point of Bd A or u is in no leaf of A and, for some odd positive integer n, u is a star point of Bd A of order n.
• Let K be a maximal connected union of leaves of A. We say that K is an odd cactus (of A) if there is an n-prickly cactus neighbouring K in A for some odd number n.
Remark 1.7. Clearly, the set of odd buds of a shrub is closed, and a set consisting of all odd buds of a shrub and one point from each of its odd cactuses, is closed (and totally disconnected if the shrub is realizable) as well. On the other hand, observe that if the set of odd buds of a shrub is totally disconnected, then it is realizable.
We are ready to state our main results: Theorem A. Let O ⊂ S 2 be a region such that T = S 2 \ O is totally disconnected. Let f be a C ∞ -vector field on S 2 which is analytic on S 2 \ T . Then any ω-limit set of f is the boundary of a shrub. Moreover, all odd buds of the shrub are contained in T (hence it is realizable) and every odd cactus of the shrub must intersect T .
Conversely, we have: Theorem B. Let A ⊂ S 2 be a shrub and let T ⊂ A contain all odd buds of A and one point from each of the odd cactuses of A. Then there are a homeomorphism h : S 2 → S 2 , and a C ∞ -vector field on S 2 , analytic on h(S 2 \ T ), having the boundary of h(A) as an ω-limit set.
Remark 1.8. In our proof of Theorem B we do not care whether the points of the ω-limit set are singular or regular for the corresponding flow. The much more difficult problem of constructing ω-limit sets with prescribed sets of regular and singular points will not be considered here. Still, note that all sprig points of the shrub must be singular (this is a consequence of Lemma 4.2). Remark 1.9. Observe that Theorem B is a kind of "strong" converse of Theorem A because A needs not be realizable. , and realize that the set T of (odd) buds in A consists of the whole arc B and all endpoints of the arcs B n . From the proof of Theorem B it follows that there is an analytic vector field on S 2 \ T having A as an ω-limit set.
Corollary C. Up to homeomorphisms, a set is an ω-limit set of some analytic vector field defined on S 2 except for a totally disconnected complementary if and only if it is the boundary of a realizable shrub.
The paper is organized as follows. In Sections 2 and 3 we summarize a number of topological and analytical results, mostly well known, which will be needed later. Theorem A is proved in Section 4. An intermediate result, fundamental for the proof of Theorem B, is shown in Section 5. Then we proceed to prove Theorem B in Section 6.

On the sphere homeomorphisms and the topology of shrubs
Throughout this paper, several intuitive (yet deep) topological results from the topology of the sphere will be needed: in this regard, an old but outstanding reference is [22], and we will cite it quite often. Among these results, the following ones may not be as well known as the Jordan curve theorem, but they will be implicitly used a number of times: if K ⊂ S 2 is compact and totally disconnected, then there is an arc in The extension result concerning arcs and circles we have just mentioned is a special case of a problem with a long tradition in the literature (see the references in [3,21]): the study of conditions under which a homeomorphism between two subsets of a manifold M can be extended to a homeomorphism of M onto itself. In particular, the cases when M is the plane or the sphere have been investigated in great depth: [1,2,4,9,10] and [22,Section 61.V]. For instance, in [2], necessary and sufficient conditions characterizing when two Peano spaces X 1 , X 2 ⊂ S 2 are compatible, that is, there is a sphere homeomorphism mapping X 1 onto X 2 , are given. We next explain the main result of [2].
Let A, B, C ⊂ S 2 be three arcs having exactly one common endpoint, and no other intersection point (hence A ∪ B ∪ C is a 3-star in S 2 ): then we say that (A, B, C) is a triod. Two triods (A 1 , B 1 , C 1 ) and (A 2 , B 2 , C 2 ) are said to have the same sense if there is a homeomorphism f : S 2 → S 2 , homotopic to the identity, such that f (A 1 ) = A 2 , f (B 1 ) = B 2 and f (C 1 ) = C 2 . (As usual, two continuous maps f, g : S 2 → S 2 are said to be homotopic if there is a continuous map H : [0, 1] × S 2 → S 2 such that H(0, u) = f (u) and H(1, u) = g(u) for any u ∈ S 2 .) Two triods which do not have the same sense are said to have opposite sense.
Remark 2.1. Every homeomorphism f : S 2 → S 2 is homotopic either to the identity or to the antipodal map a(u) = −u. Indeed, any continuous map f : is the second homology group of S 2 [15, pp. 110-111]. Since H 2 (S 2 ), as a group, is isomorphic to (Z, +) [15, Corollary 2.14, p. 114], there exists an integer deg(f ), the so-called degree of f , such that f * (n) = n deg(f ) for every n ∈ Z; for example, the identity map has degree 1 while the antipodal map has degree −1 [15, p. 134]. Two homotopic continuous maps f, g : S 2 → S 2 have the same degree [15, Theorem 2.10, p. 120] and, reciprocally, two continuous maps f, g : S 2 → S 2 with the same degree must be homotopic (this is a deep result proved by Hopf, see [15,Theorem 4.15,p. 361]). To conclude, observe that if f is a homeomorphism, then the induced homomorphism f * is a group isomorphism and deg(f ) equals −1 or 1. (In general, given two continuous maps f, g : [15, p. 134].) A simpler way to know when two triods have the same, or opposite sense, is as follows. Assume that the common point p of the arcs of a triod (A, B, C) is not the north pole p N and write π N (A) = A ′ , π N (B) = B ′ , π N (C) = C ′ and π N (p) = p ′ . Then we say that (A, B, C) is positive when, after taking an open euclidean ball U of center p ′ and radius ǫ > 0 small enough, there is θ 0 ∈ R such that the first intersection points of the arcs A ′ , B ′ , C ′ with Bd U can be respectively written as p ′ +ǫe iθ A , p ′ +ǫe iθ B , p ′ +ǫe iθ C , with θ 0 = θ A < θ B < θ C < θ 0 +2π. We say that the triod is negative when it is not positive. If p = p N , then we say that (A, B, C) is positive (respectively, negative) if (a(A), a(B), a(C)) is negative (respectively, positive), with a being the antipodal map. As it turns out (see [2,Theorem 8 and 9] and [20]), two triods have the same sense if and only if they have the same "sign", that is, they are both positive or both negative. As a consequence, observe that if (A, B, C) is an arbitrary triod in S 2 , including or not the north pole, then (A, B, C) and (f (A), f (B), f (C)) have opposite sense when f is the antipodal map and, in general, when f is not homotopic to the identity (because a • f −1 is homotopic to the identity so (f (A), f (B), f (C)) and (a(A), a(B), a(C)) have the same sense). In other words, if f : S 2 → S 2 is a homeomorphism, then (A, B, C) and (f (A), f (B), f (C)) have the same sense if and only f is homotopic to the identity.
Let g : X 1 → X 2 be a homeomorphism between two Peano spaces X 1 , X 2 ⊂ S 2 . We say that g preserves senses (respectively, reverses senses) if a triod (A 1 , B 1 , C 1 ) in X 1 is positive if and only if the triod (g(A 1 ), g(B 1 ), g(C 1 ) in X 2 is positive (respectively, negative). More generally, we say that g preserves the geometrical configuration if either it preserves senses, or reverses senses. We are now ready to state the main result of [2]: Theorem 2.2. Let X 1 , X 2 ⊂ S 2 be Peano spaces. Then they are compatible if and only if there is a homeomorphism g : X 1 → X 2 preserving the geometrical configuration. Moreover, in this case there exists a homeomorphism h : S 2 → S 2 such that h(u) = g(u) for every u ∈ X 1 .
Sometimes it is useful to see some subsets of S 2 as single points without losing the topological structure of S 2 . The following result explains how to do it: be a family of pairwise disjoint continua in S 2 . Assume that S 2 \C i is connected for any i and, additionally, that one of the following conditions is satisfied: (ii) The family {C i } i is countable and (if infinite) the diameters of the sets C i tend to zero.
Then, after defining the equivalence relation ∼ in S 2 by x ∼ y if either x = y or there is i such that both x and y belong to C i , the quotient space In view of [22,Theorem 8,p. 533] we are left to show: Find pairwise disjoint open sets V ⊃ A and W ⊃ B. Since, for any i, either C i ⊂ V or C i ⊂ W , we get that U(X) = Π(V ) and U(Y ) = Π(W ) are the neighbourhoods we are looking for. Now we prove (*) assuming that (ii) holds. Given X, Y ∈ Σ, X = Y , we first find disjoint open sets V, W in S 2 with X ⊂ V , X ⊂ W . Realize that the resultant set V ′ after removing from V the points from the components C i such that C i ∩ Bd V = ∅ is also open (here we need that the diameters of the sets C i go to zero), and the same is true for the analogously defined set W ′ . Then U(X) = Π(V ′ ) and U(Y ) = Π(W ′ ) are disjoint open neighbourhoods of X and Y in Σ.
Statement (**) is immediate: since S 2 \X is connected by hypothesis, and Π is continuous, Note finally that Π is a closed map by (*). Then (***) follows from [22, Theorem 9, p. 131] and the fact that any X ∈ Σ is a connected subset of S 2 .
If A is a shrub, then, as formerly said, Bd A is a Peano space. This implies that if the family of leaves of A is infinite, then their diameters tend to zero [22, Theorem 10, p. 515], and if u, v ∈ A are buds or exterior points of A, then there is exactly one stem having them as a proper pair of endpoints (to find such a stem, start from an arc B in A having u and v as its endpoints, add to it all the leaves whose interiors are intersected by B, and realize that, due to the simple connectedness, the intersection of each such leaf with B is a subarc of B). In this way, we extend the main property of dendrites (any two points of a dendrite are joined by a unique arc) to shrubs, which could be informally described as "thick dendrites".
We say that a sequence (S k ) n 0 k=1 of thick arcs in S 2 , n 0 ≤ ∞, is a skeleton if for any 1 ≤ k ≤ n 0 − 1 the thick arc S k+1 intersect k i=1 S i at exactly one endpoint of S k+1 . Observe that, in the finite case n 0 < ∞, by the Janiszewski theorem [22,Theorem 7,p. 507], the union set n 0 k=1 S k is a shrub. A simple consequence of separability and the "dendrite-like" structure of shrubs is that for any shrub A there is a (not necessarily unique) skeleton of stems whose union set is dense in A: we call it a skeleton of A. Observe that if U is this union set and u ∈ A does not belong to U, then u must be a bud. Moreover, if u belongs to a stem B of A, then it must be one of the endpoints of B. Otherwise we could assume, due to the density of U in A and the local arcwise connectedness of A, that there is k such that A k contains a pair of proper endpoints v, w of B, which is impossible because there would be two distinct stems having v, w as a proper pair of endpoints: one included in A k and B. As a consequence, u is a tip.
If, on the other hand, the closure of the union set of the thick arcs of a skeleton Ψ = (S k ) n 0 k=1 is a shrub A, then we say that Ψ is extensible to A. As we have just emphasized, any finite skeleton is extensible. The next proposition deals with the infinite case.
The hypothesis on the diameters of the sets A k allows us to construct, inductively, continuous onto maps ϕ k : 1]. Therefore, the maps ϕ k converge uniformly to a continuous map ϕ : Remark 2.5. Regarding Proposition 2.4, the following consequence of Proposition 2.3 will be useful in Subsection 6.1: if A is a shrub and ǫ > 0, then there is a circle C, disjoint from A, such that the region R of S 2 \ C not intersecting A contains all points u ∈ S 2 satisfying d(u, A) ≥ ǫ.
Let A, A ′ be shrubs and assume that Ψ We say that Ψ and Ψ ′ are compatible if there is a sequence of homeomorphisms h k : A k → A ′ k preserving the geometrical configuration and such that each map h k+1 extends h k . Proposition 2.6. Assume that two shrubs A and A ′ admit compatible skeletons Ψ and Ψ ′ . Then A and A ′ are compatible.
Proof. For any k, let h k : A k → A ′ k be as before and denote by U and U ′ the union sets of the stems of Ψ and Ψ ′ . Note that, since each homeomorphism h k+1 extends h k , either of all them preserve senses or all of them reverse senses. We may assume that the first case holds.
Extend continuously the maps h k to maps f k : A → A ′ as follows: if u ∈ A \ A k , and B is an arc with endpoint u and intersecting A k exactly at its other endpoint point v, then we define f k (u) = h k (v). The simple and local arcwise connectedness of A ′ , and the density of U ′ , imply that, for any ǫ > 0, there is k = k ǫ such that the diameter of any arc connecting a point from A\A ′ k to A ′ k must be less than ǫ. From this, and again the simple connectedness of Then the maps f k converge uniformly to a continuous map f : A → A ′ , and we can extend similarly the maps h −1 k to maps g k : A ′ → A which converge uniformly to a map g : A ′ → A. Since g • f and f • g map identically U and U ′ into themselves, and these sets are dense, f is a homeomorphism with inverse g.
To finish the proof we must show that f preserves senses. Let u be the common point of the arcs of an arbitrary triod (K, L, M) in A. Then neither u nor the other points from the arcs (except maybe their endpoints) is a tip, which implies, using if necessary some slightly smaller arcs, that

Some useful results on analyticity
In the introduction we endowed S 2 with an analytic differential structure via the stereographic projections π N and π S . Not that this really matters: this analytic structure is unique up to analytic diffeomorphisms. In fact, a much stronger result, following from [11,Theorem 3], [29, Corollary 1.18] and [16, Theorem 1.4] after using as a modulus (in the terminology of [16]) the distance map to the set C = g −1 (C ′ ), holds: Theorem 3.1. If S and S ′ are analytic surfaces, g : S → S ′ is a continuous onto map, and C ′ is a closed subset of S ′ such that the restriction of g to Ω = S \ C is a homeomorphism between Ω and Ω ′ = S ′ \ C ′ , then there is a continuous onto map h : S → S ′ such that h(u) = g(u) for any u ∈ C and the restriction of h to Ω is an analytic diffeomorphism between Ω and Ω ′ . In particular, if S and S ′ are homeomorphic, then they are analytically diffeomorphic.
Here, by a surface we mean a Hausdorff, second countable, topological space which is locally homeomorphic to R 2 . Note that a surface needs not be compact. An analytic surface is a surface equipped with an analytic differential structure. Needless to say, a diffeormorphism between two analytic surfaces is called analytic when it is analytic after being locally transported to the plane by the charts. Analytic maps from an open subset U of an analytic surface to R m , and analytic sets in U, are defined in the obvious way.
For instance, if we endow R 2 ∞ , the one-point compactification of R 2 , with an analytic structure using as charts the identity in R 2 and the inversion map z 1/z (here, of course, we are identifying R 2 and C via (x, y) ↔ x + iy and meaning 1/∞ = 0), then the extended stereographic projections (writing π N (p N ) = π S (p S ) = ∞) provide analytic diffeomorphisms between S 2 and R 2 ∞ . In Theorems 3.2-3.5 below, O is an open subset of S 2 . The first of them, a consequence of [30,Lemma 6], allows us to extend local analytic vector fields to the whole sphere still retaining C ∞ -regularity. The contents of the following theorem are classical and well known, see, e.g., [17,Theorem 4.3], except maybe for the "parity" statement, which is due to Sullivan [27]; alternatively, check [7] for a recent "dynamically based" proof. Theorem 3.3. Assume that O ⊂ S 2 is a region and let A ⊂ O be analytic. Then either A = O or every u ∈ A is a star point in A of even order. If, moreover, the corresponding star neigbouring u is small enough, then, after removing its center u and its endpoints, the resultant open arcs admit smooth (in fact, analytic) parametrizations.
Later in the paper we will consider unions of analytic sets in open subsets of the sphere. In general, the union of an arbitrary family of analytic sets in O may not be analytic. It is easy to use Theorem 3.3 above to find a counterexample; for instance, the union of an infinite countable family of circles in R 2 which pairwise meet in the origin cannot be analytic (and such a family of circles can be easily chosen with all the circles being analytic sets). Nevertheless, the following result is proved in [31, p. 154] (a family of subsets of a topological space X is said to be locally finite if every point of X possesses a neighbourhood which only meets finitely many subsets of the family): Theorem 3.4. If F is a locally finite family of analytic sets in O, then the union of the sets from F is also an analytic set in O.
Our last theorem, establishing the local structure of ω-limit sets for analytic vector fields, was proved in [17, Lemma 4.6 (see also the comment below Remark 4.7)].
Theorem 3.5. Let f : O → R 3 be an analytic vector field and let Φ be the flow associated to f . Let p ∈ O and assume that Ω = ω Φ (p) is not a singleton. Let u ∈ Ω ∩ O. Then there are a disk D ⊂ O neighbouring u and an m-star X, m ≥ 2, having u as its center, such that X = Ω ∩ D and X intersects Bd D exactly at its endpoints. Moreover, if Q is any of the components of D \ X, then either the orbit Γ = Φ p (R) does not intersect Q, or Cl Q is a semi-flow box (intersecting X at its border B) and Γ accumulates at B from Q.

Proof of Theorem A
Let Φ be the flow associated to f . Let p ∈ S 2 and rewrite Γ = Φ p (R), Ω = ω Φ (p). Clearly we can discard the cases when Ω is a singleton or a circle. In particular we suppose p ∈ O. The reader is assumed to be familiar with the basic facts of the Poincaré-Bendixson theory of sphere flows; regarding this, a good reference is [5,Chapter 2]. For instance, Φ admits no non-trivial recurrent orbits, that is, Γ ∩ Ω = ∅. Proof. Due to the compactness of S 2 , Ω is a continuum [6, Theorem 3.6, p. 24]. We just need to show that Ω is locally connected, because then Theorem 3.5 easily implies that it is a net. To prove the local connectedness, according to [22,Theorem 2,p. 247], we must show that if a continuum K ⊂ Ω has empty interior in Ω, then it is a singleton. Suppose the opposite to find such a continuum K having at least two points. Since T is totally disconnected, K cannot be included in Ω ∩ T and we can find a point u ∈ K ∩ O. Let X ⊂ Ω ∩ O be a star neighbouring u and having it as its center (Theorem 3.5). Two possibilities arise: either K intersects X exactly at u, or K ∩ X contains an arc. Both of them are impossible: the first one because of the connectedness of K, the second one because K has empty interior in Ω.
Since we are assuming that Ω is neither a circle nor a singleton, it is the union of its non-empty families of edges (which are countably many) and vertexes. Let E be an edge of Ω and u ∈ E. We say that u is two-sided if there is a disk D neighbouring u such that D is decomposed by E into two components D 1 and D 2 , and Γ accumulates at u from both D 1 and D 2 . Otherwise we say that u is one-sided. Recall that if u ∈ E is regular, then there is a flow box M such that h(0, 0) = u for the corresponding homeomorphism h : 1]) is transversal to the flow, it must be intersected monotonically, as time increases, by Γ. Hence u is one-sided.
We say that an edge E is two-sided if it has some two-sided point; otherwise, it is called one-sided. Proof. The "if" part of the first statement is obvious. Next we prove that if E is not contained in a circle, then it is two-sided.
By Lemma 4.1, there are disjoint continua Ω 1 , Ω 2 satisfying Ω \ E = Ω 1 ∪ Ω 2 . Use [22, Theorem 5', p. 513] to find a circle C ⊂ S 2 separating Ω 1 and Ω 2 . Clearly, we can assume that C intersects E (hence Ω) exactly at one point u ∈ O which, arguing to a contradiction, we will suppose one-sided. By But then Γ must also cross C infinitely many times to escape from U, and these other crossing points cannot belong to M (and hence cannot be close to u because u is one-sided). Consequently, Ω, the ω-limit set of Γ, intersects C \ {u}, and we get the desired contradiction.
The above argument implies in fact that if E is two-sided, then all points from E ∩ O are two-sided. Since this set is dense in E, all points from E are two-sided.
Let {C j } j be the family of circles in Ω. Each C j decomposes S 2 into open disks R j and S j , which can be chosen so that the resultant disks D j = C j ∪ R j do not intersect Γ (hence R j is a component of S 2 \ Ω for any j). Let R be the component of S 2 \ Ω containing Γ. Then the family of components of S 2 \ Ω is precisely {R} ∪ {R j } j . Indeed, assume that U is a component of S 2 \Ω different from R and any R j . Lemma 4.2 implies that Bd U can intersect no edge of Ω; therefore, Bd U is totally disconnected and W = S 2 \ Bd U is a region. Since Bd W = Bd U, U ⊂ W and both U and W are regions, we get U = W , which is impossible.
Let A = Ω ∪ j R j = S 2 \ R. We have: A is a shrub and Ω = Bd A, the leaves of A being the disks D j .
Proof. Since Int Ω = ∅, we have Ω = Bd A. Since R is connected, it suffices to show that A is locally connected.
If the family {D j } k j=1 is finite this is simple: just use the Hahn-Mazurkiewicz theorem to find continuous onto maps ϕ : [0, 1] → Ω (here we use Lemma 4.1), ϕ j : [0, 1] → D j , and combine these k + 1 maps to generate a continuous map applying [0, 1] onto A.
If {D j } ∞ j=1 is infinite, then the above argument still works provided that the diameters of the disks D j tend to zero. Assume that the opposite is true to find δ > 0 and disks D jn so that diam D jn = d(u n , v n ) ≥ δ for appropriate u n , v n ∈ D jn , n = 1, 2, . . .. We can assume that the sequence (u n ) converges, say to u ∈ A. If u belongs to one of the open disks R j or to Ω ∩ O, then we immediately get a contradiction (recall Theorem 3.5), so u must belong to T . Since T is totally disconnected, we can find a disk D neighbouring u as small as needed (in particular, diam D < δ) so that Bd D ⊂ O. If n is large enough, then u n ∈ D and v n / ∈ D, hence D jn intersects Bd D. Thus the disks D jn accumulate at a point from O and again we get a contradiction.
We are ready to finish the proof of Theorem A. After Lemma 4.3, we are left to show that all odd buds of A are in T and all odd cactuses of A intersect T .
Let P = Sing(Φ) ∩ O, assume that u ∈ O is an odd bud of A and let X be an m-star as in Theorem 3.5. Then m is odd and, since there are no disks D j near u, all edges ending at u must be two-sided (Lemma 4.2). In particular, all points of X must be singular for Φ. Now, since P is the set of zeros of an analytic function F : O → R, it is locally at u a 2n-star Y for some non-negative integer n (Theorem 3.3). Since X is "odd" and Y is "even", Y strictly includes X. This means that (because all points from X \ {u} are two-sided) there is a semi-flow box having two consecutive branches as its border, and intersecting a branch of Y not included in X. This is impossible, because all singular points of a semi-flow box belong to its border.
Finally, assume that K ⊂ O is an odd cactus, when the m-prickly cactus L neighbouring K in A can be assumed to be included in O as well (hence its sprigs need not be whole sprigs of A). Let N be the set of tips of L: again, we remark that these points may be sprig points when seen in A. All edges ending at K are two-sided, hence all sprigs of L consist of singular points. Note that there are no singular points outside L accumulating at L \ N; otherwise there would be an arc of singular points in O intersecting L \ N at exactly one point, and we could reason to a contradiction with similar arguments to those in the paragraph above. The conclusion is: G = P ∩ L is the union of finitely many pairwise disjoint graphs, which are locally "even" at all their vertexes, except for the m endpoints of L. This contradicts the following general parity property for graphs: if V = {v 1 , v 2 , . . . , v l } is the set of vertexes of a graph G and, for every i ∈ {1, 2, . . . , l}, r i denotes the order of v i as a star point in G, then l i=1 r i is even (this follows immediately from the fact that l i=1 r i = 2k, with k being the number of edges of the graph).

Realizing the set of zeros of an analytic function as an ω-limit set
This section is entirely devoted to show Proposition 5.1 below. If refines some ideas from [17] and will be pivotal in the proof of Theorem B. Essentially, it states that the boundary Ω of a simply connected region in S 2 is the ω-limit set of a vector field as smooth as Ω.
Proposition 5.1. Let O be a simply connected region of S 2 , write Ω = Bd O, and let F : S 2 → R be a C ∞ map, which is analytic (at least) in O, and satisfies F (u) = 0 for any u ∈ O and F (u) = 0 for any u ∈ Ω. Then there is a C ∞ -vector field f in S 2 , which is analytic wherever F is (in particular, in O), and such that its associated flow has Ω as one of its ω-limit sets.
In what follows we assume, without loss of generality and after applying appropriate analytic transformations, that the north pole p N = (0, 0, 1) of S 2 belongs to Ω, that the south pole p S = (0, 0, −1) belongs to O, and that the meridian I 0 consisting of the points (More in general, by a meridian we mean an arc in S 2 having p N and p S as its endpoints and which is included in O ∪ {p N }.) As it turns out, the vector field f we are looking for can be explicitly derived from F , which immediately guarantees that it satisfies the smoothness requirements from the theorem. Namely, let · denote the euclidean norm, let G : , as follows: It is easy to check that f (u) · u = 0 for any u. Hence f , when restricted to S 2 , induces a vector field on S 2 . Observe that, because of the definition of G, all points of Ω are singular points for the corresponding equation On the other hand, although G is positive on O, there may be many singular points of (1) in O (p S , for instance, is one of them). Next we will show, through a sequence of lemmas, that Ω is an ω-limit set for (1), but first the point behind the definition of f must be clarified. For this, consider the semi-space U = {(x, y, z) ∈ R 3 : z < 1} and the map π : U → R 2 given by π(x, y, z) = (x/(1 − z), y/(1 − z)), which is of course the stereographic projection when restricted to S 2 . Recall that if a meridian I is given, then there exists an analytic map Λ I : R 2 \ π(I \ {p N }) → R such that Λ I (x, y) ∈ arg(x + iy) for any (x, y). Likewise, let U I = U \ π −1 (π(I \ {p N })) and define Θ I : U I → R by Θ I = Λ I • π. Note that Θ I can be locally written as Θ I (x, y, z) = kπ + arctan(y/x) or Θ I (x, y, z) = kπ + arccot(x/y) for some integer k, and then Fix a meridian I.
The key property of f is that, as it can be easily checked, we can write it as This has the important consequence that ∇H I (u) · u ′ = 0 for some relevant (connected) smooth curves u(t) = (x(t), y(t), z(t)) in O \ I, which means that H I (and consequently J I ) is constant on them. Such is the case, for instance, if u(t) is a solution of the system (1), because then and also if all points of the curve u(t) are singular, because then ∇H I (u) × u = 0, which implies that ∇H I (u) = κ(u)u for some scalar map κ, and therefore the last equality just following from the fact that u(t) is a curve in the sphere S 2 . The above properties can be exploited further. Firstly, Theorem 3.3 implies that if Φ is the flow associated to (1), then J I is in fact locally constant in Sing(Φ) ∩ (O \ I), hence constant on each of the components of this set. On the other hand, if p ∈ O \ {p S }, then we cannot automatically guarantee the constancy of some concrete map J I on the whole maximal solution Φ p (t) = (x p (t), y p (t), z p (t)), because although the orbit lies in O it needs not be fully included in any region O \ I. Still, it is clearly possible to find a continuous choice of the angle (that is, a continuous map θ p : R → R satisfying θ p (t) ∈ arg(x p (t)+iy p (t)) for any t ∈ R), so that is constant. We gather these results as a lemma: (ii) If p ∈ O \ {p S } and I is a meridian, then J I is constant on every semi-orbit of Φ p (R) included in O \ I; moveover, the above map w p (t) is constant.
Lemma 5.3. The south pole p S is a repelling focus for Φ.
Proof. It suffices to show that the same statement is true, with respect to the origin, when we transport the system (1) to R 2 via the local chart (x, y) → (x, y, 1 − x 2 − y 2 ). The obtained system is . Now a direct calculation shows that the jacobian matriz of g at (0, 0) is its eigenvalues being 2G(p S )(1 ± i). Since G(p S ) > 0, the lemma follows.
Lemma 5.4. Let P be the set of singular points in O which are non-trivial ω-limit sets (that is, p ∈ P if and only if there is q = p such that ω Φ (q) = {p}). Then, for any p ∈ P , there are only finitely many orbits having p as its ω-limit set. Moreover, P is discrete, that is, all its points are isolated, hence countable.
Proof. Let p ∈ P , fix a meridian I not containing p and say J I (p) = a. Find a small star X ⊂ O \ I neighbouring p in Sing Φ (recall that X becomes to a 0-star, that is, just the point p, when p is isolated in Sing Φ). Now realize that, by Lemma 5.2 and continuity, J I also equals a on X and all small semi-orbits ending at points from X. Since  Proof. Rewrite u(t) = Φ p (t), Γ = Φ p (R), θ(t) = θ p (t), w(t) = w p (t), Ω ′ = ω Φ (p).
First we show that Ω ′ ⊂ Ω. Suppose not to find q ∈ Ω ′ ∩ O and (using Theorem 3.5) a semi-flow box M ⊂ O whose border B is in Ω ′ and such that Γ accumulates at B from M \ B. If h : [−1, 1] × [0, 1] → M is the corresponding homeomorphism, then the points q n = u(t n ) (t n ≥ 0) of Γ intersecting A = h({0} × [0, 1]) converge monotonically, as time increases, to q. If A n is the arc in A with endpoints q n and q n+1 , then two possibilities arise: either one of the circles C n = A n ∪ u([t n , t n+1 ]) separates q and p N , or neither of them does.
Assume that the first possibility holds. If, say, C n 0 separates q and p N , then there is a meridian I such that neither u([t n 0 , ∞)) nor Ω ′ intersect it (we are using α Φ (p) = p S ). Hence J I equals to a constant a on u([t n 0 , ∞)) (Lemma 5.2(ii)). Moreover, by continuity, J I = a on Ω ′ as well. Now, since J −1 I ({a}) is an analytic set which it is not locally a star at q, we get J −1 I ({a}) = O \ I (Theorem 3.3), which is impossible. If the second possibility holds, then all curves C n have the same winding number ν ∈ {−1, 1} around p N , and θ(t n+1 ) − θ(t n ) → 2πν as n → ∞. Therefore, |θ(t n )| → ∞. Since ρ is positive in q, it is impossible that w(t) is constant, contradicting Lemma 5.2(ii). This concludes the proof that Ω ′ ⊂ Ω.
We are now ready to prove Ω ′ = Ω. Note firstly that, since d(u(t), Ω) → 0 as t → ∞ (because Ω ′ ⊂ Ω) and G vanishes at Ω, the only way for Lemma 5.2(ii) to hold is that θ(t) → −∞ as t → ∞. We can, of course, assume θ(0) ≥ 0, hence the last and first numbers t n and s n respectively satisfying θ(t n ) = −2π(n − 1) and θ(s n ) = −2πn, n ≥ 1, are well defined. Moreover, if A n are the arcs in I 0 with endpoints p n = u(t n ) and q n = u(s n ), then all circles C n = A n ∪ u([t n , s n ]) have winding number −1 around p N , hence they separate p S and p N . Let R n denote the open disk in O (recall that O is simply connected) enclosed by C n and construct a sequence of disks (M k ) ∞ k=1 in O such that p S ∈ M k for any k and ∞ k=1 M k = O. If M k is given, say d(M k , Ω) = δ > 0, and n is large enough such that max c∈Cn d(c, Ω) < δ, then we get C n ∩ Bd M k = ∅, which together with p S ∈ M k ∩ R n implies M k ⊂ R n . Therefore, we get O = ∞ n=1 R n , and recall that Bd O = Ω. This implies that if q ∈ Ω and W is an arbitrarily small neighbourhood of q, then there is some R n (and therefore some C n ) intersecting W . Add to this that diam A n → 0 to easily conclude Ω ′ = Ω, as we desired to prove. Proposition 5.1 easily follows from the previous lemmas. Namely, there are at most countably many non-trivial orbits in O whose ω-limit set is a singular point of O (Lemma 5.4). In particular, there is p ∈ O such that α Φ (p) = {p S } and ω Φ (p) is not a singular point of O (Lemma 5.3). Then ω Φ (p) = Ω by Lemma 5.5.

Proof of Theorem B
The main idea behind the proof of Theorem B is simple enough: if Ω is the boundary of a shrub A, then we first find a homeomorphism h : S 2 → S 2 mapping Ω to a set h(Ω), "as analytic as possible", and then apply Proposition 5.1 to realize it as the ω-limit set of an "as analytic as possible" vector field. The procedure is easier when the leaves of A are "well-behaved": therefore, we discuss this case in advance, in Subsection 6.1 below. Then we deal with the general case in Subsection 6.2.

The simple case
The "as analytic as possible" set we have just referred to will be constructed by, informally speaking, pasting segments and hypocycloids. Thus, to begin with, we must guarantee the analyticity of these sets. Proof. Let F : R 3 → R be given by It is well-defined and continuous in R 3 and analytic in R 3 \{(x, 0, 0) : x ∈ R}. The restriction of F to S 2 is a continuous map whose zeros are the points (x, y, z) ∈ S 2 with y = 0 and z ≤ 0, and which is analytic in S 2 \ {(−1, 0, 0), (1, 0, 0)}. Call Z F the set of zeros of F . The image of the set Z F under the stereographic projection π N , which is exactly the set (−1, 1) × {0}, is then analytic in R 2 ∞ minus its two endpoints. For every positive integer k ≥ 3, the k-cusped hypocycloid H k is the plane curve defined by the parametric equations θ ∈ R. Observe that the only values of the parameter θ ∈ [0, 2π) where the derivative of (x k (θ), y k (θ)) vanishes are 2πj/k, 0 ≤ j ≤ k − 1, thus arising the cusps ke 2πji/k of H k . When k = 2r is even, these cups can be seen as r pairs of opposed points: they are symmetric with respect to the origin 0 = (0, 0), and a straight line passing through a cusp and the origin meets the hypocycloid exactly at the cusp and the opposed one: see Figure 2. Proof. After writing z = e iθ and n = k − 1, the hypocycloid can be described, in parametric form, as where now z ∈ S 1 ⊂ C. The zeros of the polynomial F (x, y) we are looking for must be, exactly, those points (x, y) ∈ R 2 for which there exists some z ∈ S 1 such that X(z) = x and Y (z) = y or, equivalently, the points (x, y) for which the complex polynomials p x (z) := z 2n + nz n+1 − 2xz n + nz n−1 + 1, q y (z) := z 2n − nz n+1 + 2iyz n + nz n−1 − 1, have a common root in S 1 , which amounts to simply say that p x (z) and q y (z) have some common root because, as we next show, if z 0 is a root of both p x (z) and q y (z), then z 0 ∈ S 1 . Write w = x+iy, u(z) = z n+1 −wz +n and v(z) = nz n+1 −wnz n +1. Then p x (z)+q y (z) = 2z n−1 u(z) and p x (z)−q y (z) = 2v(z), hence z 0 is also a common root of u(z) and v(z) (because z 0 = 0). Now notice that, for every z ∈ C \ {0}, z n+1 v(1/z) = u(z). This means that there is another root z 1 of u(z) satisfying z 0 = 1/z 1 = z 1 / |z 1 | 2 . If we write σ = z 1 and r = 1/ |z 1 |, we get u(σ) = u(r 2 σ) = 0, that is, which also implies (r 2n − 1)r 2 σ n+1 + (1 − r 2 )n = 0. Taking moduli, this last expression can only be true if (r 2 − 1)nr n−1 = r 2n − 1 = (r 2 − 1)(1 + r 2 + · · · + r 2(n−1) ), that is, either r = 1 or where n ′ is the integer part of n/2. This is only possible if, again, r = |z 1 | = 1. Then |z 0 | = 1 as well, as we desired to show.
We have proved that (x, y) belongs to the hypocycloid if and only if the polynomials p x (z) and q y (z) have a common root, which is also equivalent to R(p x , q y ) = 0, with R(p x , q y ) denoting the resultant of the polynomials p x (z) and q y (z) [26,Theorem 8.27,p. 151]. Now, since R(p x , q y ) is a determinant calculated on the coefficients of p x (z) and q y (z), we get R(p x , q y ) = P (x, y), where P (x, y) is polynomial (with complex coefficients) on x and y. If P (x, y) = P 1 (x, y) + iP 2 (x, y), with P 1 (x, y) and P 2 (x, y) polynomials with real coefficients, we finally obtain that the hypocycloid is the set of zeros of F (x, y) = P 1 (x, y) 2 +P 2 (x, y) 2 . Remark 6.3. An algebraic set A ⊂ R 2 needs not be analytic in R 2 ∞ (equivalently, analytic in S 2 via the stereographic projection): it is π −1 N (A) ∪ {p N } which is analytic in S 2 . In fact, if A is the set of zeros of a polynomial P (x, y), then π −1 N (A) is the set of zeros in S 2 of the map Q(x, y, z) = P (x/(1 − z), y/(1 − z)), hence π −1 N (A) ∪ {p N } is the set of zeros in S 2 of (1 − z) n Q(x, y, z) which, if n is large enough, is well-defined and polynomial in the whole R 3 .
Circumferences, on the other hand, are analytic in R 2 ∞ because they can be seen, in S 2 , as the intersection of a plane with the sphere, that is, the restriction to S 2 of the set of zeros of an affine map in R 3 .
In what follows, by a hypocycloid we mean, in fact, any affine deformation H in R 2 of (the disk enclosed by) some 2r-cusped hypocycloid as previously defined, while, as usual, a segment is an affine deformation in R 2 of the arc [−1, 1] × {0}. The non-smooth points at the boundary of H are still called its cusps, and two cusps of H are opposed if there is a segment in the hypocycloid connecting them. Such a segment is called a diameter of H, and all diameters intersect at a unique point, the center of H. The radii of H are then the segments connecting the center of H with its cusps. From Lemmas 6.1 and 6.2 it follows immediately that any segment is analytic in R 2 ∞ minus its endpoints, and the boundary of any hypocycloid is analytic in R 2 .
Let M 1 , M 2 be two segments intersecting exactly at a common endpoint p. We say that We intend to construct our "almost analytic" shrubs via an appropriate skeleton structure so that we can benefit from Propositions 2.4 and 2.6. For this we will need some special thick arcs, not just consisting of segments and hypocycloids, but additionally "twisted" (biased) according to some rules. The following lemma explains how to do it. Lemma 6.4. Let A be a thick arc in R 2 and fix a proper pair of endpoints w, z of A. Let Q be a set of disconnecting points of A and let D be a subfamily of leaves of A. We assume that the union set of Q and the centers of the leaves from D is discrete, and that no leaf from D contains z. Assign to each p ∈ Q (respectively, to each leaf D ∈ D) a number φ(p) = ±1 (respectively, φ(D) = ±1). Then there are a thick arc A ′ and a homeomorphism h : R 2 → R 2 with h(A) = A ′ (homotopic to the identity when extended to R 2 ∞ ) satisfying the following properties: (i) Each leaf of A ′ is a hypocycloid and all non-cusp points of the leaves of A ′ are exterior points of A ′ . Also, h maps w to the origin 0 and, if z ′ = h(z) and 0 and/or z ′ belong to some leaf of A ′ , then they are cusp points. If, moreover, I ′ denotes the arc in A ′ connecting 0 and z ′ and intersecting each leaf at exactly two radii, then any subarc of I ′ neither intersecting h(Q) nor containing the center of any hypocycloid h(D), D ∈ D, is a segment.
(iii) Let p ∈ Q or D ∈ D and let p ′ be, depending on the case, either h(p) or the center of the hypocycloid h(D). Let M ′ 1 and M ′ 2 be the maximal segments in I ′ having p ′ as its common endpoint, with M ′ 1 being the closer segment to 0. If, according to the case, φ(p) = 1 or φ(D) = 1 (respectively, φ(p) = −1 or φ(D) = −1), then M ′ 2 is positively (respectively, negatively) biased with respect to M ′ 1 . Proof. First of all, we map A via a homotopic to the identity homeomorphism f to a thick arc A 0 which is the union of the segment I 0 = [0, 1] × {0} (with w mapped to 0) and some balls with diameters included in this segment. If, additionally, there is a sequence of leaves (B n ) ∞ n=1 monotonically accumulating at 0, we can assume that diam(B n ) = 1/2 n+1 for any n and that any leaf between 0 and B n has diameter less than 1/2 n+1 , which ensures that Observe that both D and Q are countable. Our construction will proceed in two steps. Firstly we assume that Q is empty, then we consider the general case.
(if D is finite, then the argument is analogous but simpler), and let p i denote the center of the ball f (D i ). We arrive to A ′ via a sequence of intermediate • h 1 will converge to a homeomorphism h * . This homeomorphism almost provides the set A ′ we are looking for, except that the leaves of A * = h * (A 0 ) are not hypocycloids but balls. To conclude one just have to replace f by another homeomorphism f * mapping the leaves of A to slightly deformed hypocycloids having their cusps in the boundaries of the balls of A 0 (so that these "pseudo-hypocycloid", after applying h * , become real hypocycloids). Then h = h * • f * does the job.
All homeomorphisms h i are constructed (modulo a translation and a rotation) using a map g δ , with δ = δ i a rational number small enough (in absolute value), which is defined as follows. Let τ δ : [−1/2, 1/2] → [−1/2, 1/2] the (five pieces) piecewise affine homeomorphism mapping [−1/4 + 2|δ|, 1/4 − 2|δ|] onto [−1/4 + 2|δ| + δ, 1/4 − 2|δ| + δ] and leaving invariant the intervals [−1/2, −1/4] and [1/4, 1/2]. Then, using polar notation, we define g δ (re 2πiθ ) = re 2πiτ δ (θ) . Thus g δ leaves invariant the second and the third quadrant and slightly rotates, with angle 2πδ, "most" of points in the first and fourth quadrant. Now, starting from I 0 and A 0 , and via the procedure h i (I i−1 ) = I i and h i (A i−1 ) = A i , we get some polygonals I i and thick arcs A i so that the angle points of I i are exactly h * i ({p 1 , . . . , p i }), and if D is a leaf of A 0 of center q, then the corresponding leaf h * i (D) is a ball of center h * i (q) and the same radius as D. More precisely, to define h i , we first transport the point h * i−1 (p i ) (we mean h * 0 = Id) to 0, and the segment of I i−1 containing it to the x-axis (so that its closest part to 0 falls to the left of 0), via some appropriate translation and rotation. Then we compose with a certain g δ i , with the small rational number δ i being positive or negative according to the sign of φ(p i ) (and ensuring that all transported points from A i−1 , except some of the ball containing h * i−1 (p i ), are either 2πδ i -rotated or left invariant), and finally apply the reversed rotation and translation. It is clear that if the numbers δ i are sufficiently small, then the maps h * i , and similarly their inverses (h * i ) −1 , converge uniformly to a homeomorphism h * and its inverse (h * ) −1 .
Observe that, in order this geometrical construction to work properly, we must be sure that the perpendicular line to I i−1 passing through h * i−1 (p i ) do not intersect A i−1 except at the ball enclosing the point. If fact, after fixing a sequence of numbers 0 < µ i < 1, say µ i = 1 − 1/2 i , close enough to 1 so that ∞ i=1 µ i > 0, more will be true: if u ∈ A i−1 disconnects A i−1 , and σ is the perpendicular to I i passing through u, then not only σ will intersect A i−1 just at u, and similarly the perpendicular σ ′ to I i passing through u ′ = h i (u) will intersect A i just at u ′ , but for any Clearly, this can be guaranteed, inductively, just using numbers δ i small enough. Then the limit polygonal I * = h * (I 0 ) satisfies the analogous property for A * : if v * ∈ A * disconnects A * , and σ * is the perpendicular to I * passing through v * , then σ * intersects A * just at v * .
(This will be needed in the proof of the general case.) Also, observe that A * is included in the right half-plane (and intersects the y-axis just at 0). If we are in the accumulating case described in the first paragraph, the construction can be refined to guarantee A * ⊂ C 1/2 . After replacing the balls in A * by hypocycloids with sufficiently many cusps (this can be done without losing connectedness: this is the reason why we required the numbers δ i to be rational), we get, as explained before, the homeomorphism h and the thick arc A ′ we are looking for. Just one detail is pending: guaranteeing that A ′ is included in some set C ρ . If there is an arc (a segment) in Bd A ′ or a leaf (a hypocycloid) in A ′ containing 0, this is trivial; otherwise we are in the accumulating case, and C 1/2 can be used. We remark that I * is, indeed, the arc I ′ from the condition (i) in the lemma.
Recall that we have assumed, until now, that Q is empty. If Q = ∅, then the thick arc we obtain applying the previous construction to D is not yet that we need. Therefore, instead of calling that set A ′ , we call it B 0 and use it, together with the limit polygonal J 0 = I * , as the new starting point for a similar construction, again based on the maps g δ , now around the points from Q. Such a construction, providing the desired set A ′ , is possible due to the above-mentioned property of A * , and hence of B 0 , of separation by perpendicular lines to J 0 .
Remark 6.5. Each hypocycloid from the previous set A ′ is rounded, that is, all their cusps belong to the same circumference. After composing with the linear map (x, y) → (x, ǫy/ρ), and at the cost of losing roundness (but still having hypocycloids), we can carry A ′ into C ǫ for any ǫ as small as we wish.
Also, observe that the number of cusps of each hypocycloid D ′ = h(D) of A ′ can be chosen sufficiently large so that, if the number n = n(D) is fixed in advance, and P ′ is the four (or two) points set containing the intersection points of I ′ with Bd D ′ and their opposed cusps in D ′ , then the number of cusps of Bd D ′ between the points of P ′ is at least n.
It is already time to define the special type of shrub we are concerned of in this subsection. We say that a shrub A is simple if all nodes belonging to leaves of A are star points of Bd A. In particular, all cactuses and prickly cactuses are simple shrubs. A shrub is very simple if it is simple and has no odd cactuses. If A is very simple, then we denote by P A the set of nodes of A which are not odd buds of A (that is, all nodes belonging to some leaf or having even order) and by E A the family of pieces (leaves and sprigs) of A. These sets are, to say so, the places where there is the "peril", to be avoided, of losing analyticity in the ensuing construction.
Let A be a very simple shrub. If p ∈ P A , then it disconnects A into k components, whose closures B 1 , . . . , B k are simple shrubs as well, although maybe not very simple. Denote by E 1 , . . . , E k the corresponding pieces E j ⊂ B j containing p. We divide these pieces into three classes. A piece E j is rigid (with respect to p) it either E j is a sprig or B j is not very simple (note that, in this second case, B j has exactly one odd cactus, and E j is a leaf from this cactus). We say that E j is flexible if there is an infinite connected union of leaves in B j , one of them being E j . If E j is neither rigid nor flexible, then is it called bland. Let us assume that a subfamily of non-bland pieces {E j 1 , . . . , E j 2r } is positively (counterclockwise) ordered, that is, triods of arcs in consecutive pieces are positive. We say that it orientates p (or it is an orientation for p) if it contains all rigid pieces. Pairs E j l , E j l+r , 1 ≤ j ≤ r, are said to be opposed for this orientation. Observe that, since A is very simple, p always admit an orientation (unless there are no rigid pieces and at most one flexible leaf with respect to p). We denote by P * A the set of nodes from P A admitting an orientation. We remark that if an endpoint of a sprig E belongs to P A , then it also belongs to P * A . Similarly, if E ∈ E A , let v 1 , . . . v l be the points from P A ∩ Bd E (note that this set may be empty if E is a sprig). We say that v m is rigid (with respect to E) if, not counting E itself, all pieces containing v m are rigid or bland with respect to v m , and the number of rigid pieces is odd. We say that v m is flexible if there is some piece, different from E, which is flexible with respect to v m . If v m is neither rigid nor flexible, then it is called bland. The definitions of orientation and that of opposed pairs, are analogous to the previous ones. Except again in the case when there are no rigid nodes in Bd E and at most one flexible node, or E is a sprig and some of its endpoints is not in P A , E always admits an orientation. In particular, if E is a sprig and both endpoints v 1 and v 2 of E belong to P A , then {v 1 , v 2 } is an orientation (the only possible one). The set of pieces from E A admitting an orientation will be denoted by E * A . Figure 3 exhibits some examples of the previously defined notions.
We say that a node v ∈ P * A and a piece E ∈ E * A are linked if v ∈ Bd E. A sequence (γ n ) n 1 n=n 0 , −∞ ≤ n 0 < n 1 ≤ ∞, of pairwise distinct elements from P * A and E * A is called a chain if, for any n 0 ≤ n < n 1 , the pair γ n , γ n+1 is linked. Hence, a chain can be finite, infinite at one side, or infinite at both sides, and nodes and pieces (its links) alternate at it.
Let F = (f n ) n 1 n=n 0 be a sequence of orientations for the elements of a chain Γ = (γ n ) n 1 n=n 0 . We say that Γ is oriented by F if γ n 0 +1 ∈ f n 0 , γ n 1 −1 ∈ f n 1 (when n 0 and/or n 1 are finite), and γ n−1 and γ n+1 belong to and are opposed for the orientation f n for any n 0 < n < n 1 . Note that the last condition only makes sense when Γ has at least three links. Therefore, a two-links chain is oriented if just γ n 1 = γ n 0 +1 ∈ f n 0 and γ n 0 = γ n 1 −1 ∈ f n 1 .
Assume that Γ is oriented by F. We say that Γ is complete if either n 1 = ∞ (respectively, n 0 = −∞), or γ n 1 (respectively, γ n 0 ) is a node and the opposed piece to γ n 1 −1 (respectively, γ n 0 +1 ) for f n 1 (respectively, f n 0 ) is a sprig L whose other endpoint does not belong to P A (such a sprig L is called a stub of the complete oriented chain Γ). Observe that, by definition, a complete oriented chain has at least three links. Lemma 6.6. Let A be a very simple shrub. Let γ belong to P * A or E * A , let f be an orientation for γ, and take γ ′ ∈ f. If γ is a node and γ ′ is a sprig, assume additionally that the other endpoint of γ ′ belongs to P A . Then γ ′ belongs to E * A or P * A , according to the case, and there is an orientation f ′ for γ ′ containing γ. In other words, (γ, γ ′ ) is oriented by (f, f ′ ).
Proof. Assume that v = γ is a node. Then E = γ ′ is a flexible or rigid piece with respect to v. Also, observe that v is flexible or rigid with respect to E. If E is a sprig, then, by hypothesis, its other endpoint w belongs to P A , E belongs to E * A and f ′ = {v, w} does the work. So we can assume that E is a leaf. If E / ∈ E * A , then v must be flexible and the other nodes in E must be bland with respect to E, which implies the contradiction that E is bland with respect to v. Hence E ∈ E * A . Now, the only way to prevent that v belongs to an orientation for E is that there is an even number of rigid nodes and v is the only flexible node with respect to E. But this, again, implies the contradiction that E is bland with respect to v.
If E = γ is a piece, then v = γ ′ is flexible o rigid with respect to E, E is flexible or rigid with respect to v and we can reason similarly as in the previous paragraph.
The next result follows immediately from Lemma 6.6. Lemma 6.7. Let A be a very simple shrub. Let γ belong to P * A or E * A , let f be an orientation for γ and assume that γ ′ is opposed to γ ′′ for f. Then one of the following alternatives hold: (i) γ is a node, and both γ ′ and γ ′′ are sprigs whose other endpoints do not belong to P A ; (ii) γ is a node, γ ′′ (but not γ ′ ) is a sprig whose other endpoint do not belong to P A , and there is a complete oriented chain Γ = (γ n ) n 1 n=0 such that γ 0 = γ, f 0 = f is the corresponding orientation for γ, γ 1 = γ ′ , and γ ′′ is a stub of Γ; (iii) there is a complete oriented chain (γ n ) n 1 n=n 0 , with n 0 < 0 < n 1 , such that γ 0 = γ, f 0 = f is the corresponding orientation for γ, γ −1 = γ ′′ , and γ 1 = γ ′ .
When in the statement of the lemma below we speak about a "complete oriented chain", we mean a chain that, after using for its links the orientations from F, becomes oriented and complete.
Lemma 6.8. Let A be a very simple shrub. Then there is a family F of orientations for all nodes from P * A and all pieces from E * A such that, for each sprig L of A, one of the following alternatives hold: (i) no endpoint of L belongs to P A ; (ii) L is a stub of a complete oriented chain; (iii) L is a link of a complete oriented chain.
Proof. Consider the following equivalence relation in P * A ∪ E * A : γ ∼ γ ′ if and only if γ = γ ′ or there is a chain containing both γ and γ ′ . We just need to explain how to orientate all members from a specific equivalence class, as the method can be independently applied to each class. The construction clearly implies, as we will see, that the conditions in the statement of the lemma are satisfied.
If a given class consists of just one member, then, in view of Lemma 6.7, this unique member v is a node and there are 2r pieces linked to it, all of which are sprigs whose other points do not belong to P A . Then, we choose for v the only possible orientation: that consisting of these 2r sprigs.
Assume now that our equivalence class contains at least two elements γ and γ ′′ , and connect them via a chain (γ n ) n 1 n=0 , γ 0 = γ, γ n 1 = γ ′′ . To orientate the elements of this chain (and possibly some other members from this equivalence class) we proceed as follows. Let f be an arbitrary orientation for γ, take γ ′ ∈ f in P * A ∪ E * A and apply Lemma 6.7 to obtain a complete oriented chain: the corresponding orientations of the links of this chain, in particular of γ, are those we use in F. Say that the last link of (γ n ) n 1 n=0 in this complete chain is γ n 0 , 0 ≤ n 0 ≤ n 1 . If n 0 = n 1 , then we have already finished. Otherwise we orientate γ n 0 +1 , and possibly some other members of the equivalence class, as follows: (a) If γ n 0 +1 belongs to the orientation f ′ of γ n 0 , then we apply again Lemma 6.7 (with γ n 0 , f ′ and γ n 0 +1 playing the role of γ, f and γ ′ there), to get a new complete oriented chain, and use the corresponding orientations for all the links of the chain, in particular for all γ n for some n 0 + 1 ≤ n ′ 0 and n 0 + 1 ≤ n ≤ n ′ 0 . (b) If γ n 0 +1 does not belong to f ′ , then let (α m ) m 1 m=0 , α 0 = γ n 0 , α 1 = γ n 0 +1 , m 1 ≤ ∞, be a maximal chain with the property that each possible orientation for α m contains α m−1 , 1 ≤ m ≤ m 1 . (Here we allow the degenerate case m 1 = 0, meaning that there is an orientation for γ n 0 +1 not containing γ n 0 .) Realize that, in fact, there is just one possible orientation g m = {α m−1 , α m+1 } for any 1 ≤ m ≤ m 1 , when α m 1 +1 has the property, in the finite case, that it admits an orientation g m 1 +1 not containing α m 1 . Observe that none of the links α m can be a sprig, as this would imply that γ n 0 +1 is rigid with respect to f ′ , and then γ n 0 +1 ∈ f ′ . We add all these orientations g m (including m = m 1 + 1 in the finite case) to F, in particular orienting all γ n for some n 0 + 1 ≤ n ′ 0 and n 0 + 1 ≤ n ≤ n ′ 0 . If n ′ 0 = n 1 , then we stop; otherwise, we keep applying (a) or (b) as before to orientate all links γ n , and possibly some other members (maybe all) of the equivalence class. If some β ′′ from the class remains to be oriented, we connect it to an already oriented member β via a chain (β l ) l 1 l=0 , β 0 = β, β l 1 = β ′′ , with all the links of this chain to be oriented except β, and proceed as previously explained applying (a) or (b) according to the case.
We are ready to prove the main result of this subsection. Note that it already implies Theorem B, via Theorem 3.2 and Proposition 5.1, whenever the shrub A is simple. Proposition 6.9. Let A be a simple shrub and let T contain all odd buds of A and exactly one point from every odd cactus of A. Then there exist a homeomorphism h : S 2 → S 2 and an analytic map F : S 2 \ h(T ) → R whose set of zeros is contained in h(A \ T ) and contains h((Bd A) \ T ).
Proof. Firstly, we assume that A is very simple and, after the identification S 2 ∼ = R 2 ∞ and without loss of generality, that A ⊂ R 2 . If A has no odd buds, then A is either a singleton, and the proposition is trivial, or a cactus (this is a simple consequence of [14,Theorem 7.1,p. 64]). In the latter case, it is easy to construct a cactus A ′ ⊂ R 2 ∞ , compatible with A (in the sense of Theorem 2.2), with one of its leaves being the disk {z ∈ R 2 : |z| ≥ 1} ∪ {∞}, all other leaves being hypocycloids included in the unit disk. Then there is an analytic map in R 2 ∞ whose set of zeros is Bd A ′ ∪ {∞} (Lemma 6.2 and Remark 6.3), and the proposition follows.
Therefore, we assume in what follows that A has some odd bud w. Find F as in Lemma 6.8 and fix a skeleton of A which we assume (this is the most difficult case) to be infinite: call it Ψ = (S k ) ∞ k=1 . It is not restrictive to suppose that w is one of the endpoints of S 1 . It is not difficult to construct an skeleton Ψ ′ = (S ′ k ) ∞ k=1 , with each thick arc S ′ k generated from the corresponding S k similarly as A ′ is generated from A in Lemma 6.4 (and then linearly compressed as explained in Remark 6.5 to resemble "almost segments", and appropriately translated and rotated), so that, on the one hand, Ψ ′ is extensible, hence the closure A ′ of the union set of the thick arcs S ′ k is a shrub (use Proposition 2.4 for this, taking also Remark 2.5 into account), and, on the other hand, Ψ and Ψ ′ are compatible, hence A and A ′ are compatible as well (Proposition 2.6). Thus, in particular, all leaves of A ′ are hypocycloids, and all sprigs of A ′ are segments. This can be done regardless the sets of nodes, the families of disks and the assignations, call them Q k , D k and φ k , we use when applying Lemma 6.4 to the stems S k , and additionally assuming that all non-cusp points of the leaves of A ′ are exterior points of A ′ . Now we specify Q k , D k and φ k as follows. The points Q k (respectively, the disks D k ) are among those in S k belonging to, respectively, P * A and E * A . More precisely, a node v belongs to Q k if the number of pieces of f v from E to E ′ (not counting them), in the positive sense, is different from the number of pieces in the negative sense: here f v is the orientation in F corresponding to v, and E and E ′ are the pieces in S k linked to v, E being closer to w than E ′ . Note that E and/or E ′ may belong, or not, to f v . If the first number is larger (respectively, smaller) than the second one, then we put φ k (v) = 1 (respectively, φ k (v) = −1). Analogously, a leaf D belongs to D k if the number of nodes of f D (the orientation in F corresponding to D) from v to v ′ (the nodes in S k linked to D), in the positive sense, is different from the number of nodes in the negative sense, and write φ k (D) = ±1 according to the case.
Next revise, if necessary, the construction of Ψ ′ to ensure: (a) opposed nodes for any f D go, via the compatibility homeomorphism, to opposed cusps in the corresponding hypocycloid of A ′ (the second paragraph of Remark 6.5 is useful in this regard); (b) opposed pieces for any f v go to aligned segments and/or hypocycloids in A ′ . Clearly, this is possible due to the way the assignations φ k have been made. Consider the family of segments consisting of all sprigs of A ′ and the diameters of the hypocycloids in E * A ′ whose endpoints, when homeomorphically seen in A, are opposed for some orientation f D in F. Note that some segments from this family may be aligned, and then pasted into larger segments. We do so (and take closures in the case when we are pasting infinitely many segments) to receive a family of maximal segments S ′ of A ′ . The properties of F guarantee that the endpoints of all segments from S ′ are odd buds.
We are almost done (in the very simple case): if T ′ denotes the set of odd buds of A ′ , then Lemmas 6.1 and 6.2, together with Theorem 3.4, imply that Bd A ′ is analytic in R 2 \ T ′ (although maybe not in R 2 ∞ \ T ′ ). With a little extra care, we can get w ′ (the corresponding point to w in A ′ ) to be the point (−π/2, 0), and moreover A ′ \ {w ′ } ⊂ (−π/2, π/2) 2 . Let f (x, y) = (tan(x), tan(y)). Clearly A ′ (and then A) and A ′′ = {∞} ∪ f (A ′ \ {w ′ }) are compatible, and Bd A ′′ is analytic in R 2 ∞ \ T ′′ , T ′′ being the set of odd buds of A ′′ . From this, Proposition 6.9 follows.
If B (which we assume again to be a plane set) is simple, but not very simple, and T 0 ⊂ T contains exactly one point from each odd cactus of B, we add, for each p ∈ T 0 , an arc B p to B which intersect B exactly at p (if p is either a node or an exterior point of B), or at an exterior point belonging to the same leaf as p (if p is an interior point of B). Certainly we can assume, and so we do, that these arcs are small enough so that A = B ∪ p∈T 0 B p is a (very simple) shrub. Construct a plane homeomorphism g mapping A onto a very simple shrub A ′ with "optimal analyticity", as previously explained, when there is no loss of generality in assuming that the interior points from T 0 are mapped by g to the centers of some hypocycloids in A ′ , and realize that g(T 0 ) consists of points belonging to (but not being endpoints of) some segments from the family S ′ . After cutting these segments off so that the points g(T 0 ) become endpoints of the resultant segments (and then analyticity is lost exactly at them), we recover B (via g −1 ) and are done.

The general case
Let A be a shrub and let D be a leaf of A. We say that D is special if it contains an odd bud of A. Also, we say that an arc L ⊂ Bd D is special if one of its endpoints (the distinguished endpoint of L) is an odd bud of A, there is no other leaf containing the second endpoint of L, and all other points of L are exterior points of A. We say that A is semi-simple if any special leaf of A includes some special arc.
Assume now that D is very special, which means that it is special and its boundary contains some star point of odd order of Bd A. Then we can associate to each such point s m an arc S m ⊂ D connecting s m to a "close" odd bud in Bd D. If this is carefully done (for instance, deforming D to a ball, using a segment to connect the star point to its closest odd bud in the circumference, and going back to D), different arcs S m , S l intersect at most at its common endpoint (an odd bud), and, when we delete from A the interior points of D, and add the arcs S m , the resultant set is a Peano space (although not a shrub because simply connectedness is lost). We call such a (countable) family {S m } m a web (for D). If the arcs J m are strictly contained in S m but share with S m an endpoint q m (an odd bud), then we call {J m } m a cutting of the web {S m } m with distinguished endpoints {q m } m .
The following lemma is the last ingredient we need to complete the proof of Theorem B. Note that there may be indexes i for which the cutting {J ′ i,m } m is empty: this means that D ′ i is special, but not very special.
Lemma 6.10. Let A be a shrub. Then there are a semi-simple shrub A ′ and a continuous map g : S 2 → S 2 such that g(A ′ ) = A. Moreover, for every special leaf D ′ i of A ′ there are a special arc L ′ i ⊂ Bd D ′ i and a cutting {J ′ i,m } m such that g is constant on each L ′ i and J ′ i,m , and maps bijectively S 2 onto S 2 otherwise.
Proof. Firstly, we assume that A has no very special leaves. Then the proof of the lemma is based on the following Claim. Let A be a shrub having a special leaf D and let p ∈ Bd D be an odd bud of A. Let U be a neighbourhood of p. Then there are a shrub B and a continuous map h : S 2 → S 2 satisfying the following conditions: (i) D is a special leaf of B whose boundary includes a special arc L having p as its distinguished point; (ii) L ⊂ U; Let R = S 2 \ A. Recall that Bd A is a Peano space. Then, by the Carathéodory theorem [23, Theorem 9.8 and Lemma 9.8, pp. 279-280], there is a continuous map f : D 2 → Cl R mapping the interior of the unit ball D 2 homeomorphically onto R, and the unit circle S 1 onto Bd R = Bd A; moreover, if q ∈ Bd A does not disconnects Bd A, then it has exactly one preimage under f . There are many such "non-disconnecting" points in Bd D: in fact, except for a countable set of points of Bd D (those belonging to some stem intersecting Bd D exactly at one point; take also the skeleton structure of A into account), all of them are of this type. In particular, we can find a sequence (q n ) ∞ n=1 in Bd D of non-disconnecting points converging monotonically to p and, with the help of f , a sequence of arcs Q n with endpoints q n and q n+1 and included otherwise in R, with diam(Q n ) → 0, so that if E is the disk encircled by Q n and the arc in Bd D with endpoints q n and q n+1 satisfying E ∩ Int D = ∅, then E does not intersect any other leaf containing p. Then, modifying slightly ∞ n=1 Q n , we find an arc Q, with endpoints p and q 1 , and included in R otherwise, so that if Q ′ is the arc in Bd D with endpoints p and q 1 and containing the other points q n , and E ′ is the disk encircled by Q ∪ Q ′ satisfying E ∩ Int D = ∅, then E ′ does not intersect any other leaf containing p. Now, after identifying S 2 with R 2 ∞ , and applying Theorem 2.2, there is no loss of generality in assuming that p is the origin, D is the rectangle [0, 1] × [−1, 0], Q is the polygonal Bd([0, 1] 2 ) \ {(x, 0) : 0 < x < 1} and the square [0, 1] 2 does not intersect the other leaves of A containing p (except at p). Find an arc with endpoints (1/2, 1) and p, and included in (0, 1) 2 otherwise, such that the region enclosed by it, the horizontal segment [0, 1/2] × {1} and the vertical segment {0} × [0, 1] does not intersects A (except at p). Again due to Theorem 2.2, we can assume that this arc is in fact the segment joining p and (1/2, 1). Now, to prove the lemma (recall that we are assuming the non-existence of very special leaves), consider the most difficult case when A has infinitely many special leaves {D i } ∞ i=1 and fix odd buds p i ∈ D i (note that it is possible p i = p k for some i = k). Successive applications of the claim allow us to find shrubs A i , disks D ′ i and U ′ i , arcs L ′ i , points p ′ i and continuous maps g i : S 2 → S 2 (when, if i 1 ≤ i 2 , then we denote g i 1 ,i 2 = g i 1 • · · · • g i 2 ), such that, for any k, the following is true: (a) all disks {D ′ i } k i=1 are special leaves for A k having the arcs L ′ i as corresponding special arcs with distinguished endpoints p ′ i ; moreover D ′ k and p ′ k are also, respectively, a special leaf and an odd bud of A k−1 (here we mean A 0 = A).
By (b) and (c) the sequences (g k,i ) ∞ i=k converge uniformly to onto continuous maps g * k . We next show that g = g * 1 and A ′ = g −1 (A) (together with the sets D ′ i and L ′ i ) satisfy the requirements of the lemma.
We begin by proving the last statement of the lemma (that concerning bijectivity). Clearly, g * k = g k,l−1 • g * l for any k < l. Write M ′ = ∞ i=1 L ′ i as a countable union of a family of pairwise disjoint sets {C ′ j } j . By (a) and (b), they are dendrites and their diameters tend to zero if there are infinitely many of them; moreover, the arcs L ′ i in each of these dendrites share a unique point r ′ j (we are using that non-distinguished endpoints of special arcs just belong to one leaf). By (c), g is constant on each dendrite C ′ j . Hence, to prove the statement, we are left to show that if u = v and g(u) = g(v), then there is C ′ j such that u, v ∈ C ′ j . Again by (c), g is the identity outside the union of the sets U ′ i (so u, v ∈ i U ′ i ). Three possibilities arise. If u and v belongs to the same U ′ j for infinitely many j, then (b) implies that u = v. If u, v ∈ U ′ k but neither u nor v belong to some set U ′ i included in U ′ k , then g * k+1 is the identity on u and v, and hence g 1,k (u) = g 1,k (v), so some C ′ j contains both u and v. Finally, if none of these two previous cases hold, there must exist U ′ k such that, say, u ∈ U ′ k , v ∈ S 2 \ U ′ k . Furthermore, (b) and (c) together imply that g * k maps S 2 \ U ′ k onto itself and U ′ k onto itself. Hence, after writing u * = g * k (u), v * = g * k (v), we conclude that u * = v * but g 1,k−1 (u * ) = g 1,k−1 (v * ). This is only possible, by (c), if there are arcs L ′ i 1 , L ′ i 2 with 1 ≤ i 1 ≤ i 2 ≤ k −1 and p ′ i 1 = p ′ i 2 such that both u * and v * belong to C = L ′ i 1 ∪L ′ i 2 . But, due to (c), g k is the identity on C and maps S 2 \ C onto itself, so g * k (u) = g k (g * k+1 (u)) = u * implies g * k+1 (u) = u * , and in general we have that g * i (u) = u * for all i ≥ k. Since, by (b), the maps g * i converge uniformly to the identity, we obtain u = u * and similarly v = v * . If C ′ j is the dendrite in M including C, we conclude u, v ∈ C ′ j as we desired to prove. A consequence of the previous result is that g −1 (u) is a connected set for any u ∈ S 2 , which by [22,Theorem 9,p. 131] implies that if C ⊂ S 2 is connected, then g −1 (C) (and similarly all sets (g * k ) −1 (C)) is connected as well. Now the rest of statements of the lemma are easy to prove. For instance, A ′ is connected, hence a continuum, locally connected, hence a Peano space (because if u ′ ∈ A ′ , ǫ > 0 is given, k is large enough and V is a connected neighbourhood of g * k (u ′ ) in the shrub A k of diameter less than ǫ, then (g * k ) −1 (V ) is a connected neighbourhood of u ′ in A ′ of diameter less than 2ǫ), and S 2 \ A ′ = g −1 (S 2 \ A) is connected, hence A is a shrub. Also, g(D ′ i ) = D i and g(p ′ i ) = p i for any i, which, together with the bijectivity property, guarantees that all disks D ′ i are leaves of A ′ and all points p ′ i are odd buds of A ′ . In fact, since each leaf of A ′ is mapped onto a leaf of A, the disks D ′ i are precisely the special leaves of A ′ . Using that g * i+1 (A ′ ) = A i+1 and g * i+1 is the identity on D ′ i , which is a special leaf of A i+1 with special arc L ′ i , it is simple to show that L ′ i is also special for D ′ i in A ′ . In particular, A ′ is semi-simple. This concludes the proof the lemma in the case when there are no cuttings.
In the general case, we first generate an intermediate semi-simple shrub A ′ and a surjective map mapping A ′ onto A, which we now callg, as just explained. Then we construct webs for all very special leaves of A ′ (which are the leaves mapped byg to the very special leaves of A), and apply similar (but simpler) ideas to those already explained to collapse small cuttings of these webs to their distinguished endpoints via a surjective continuous mapg ′ : S 2 → S 2 which is the identity outside the very special leaves of A ′ , sog ′ (A ′ ) = A ′ . Then g =g ′ •g is the map we are looking for.
Let A be a shrub and let T ⊂ A contain all odd buds of A and one point from every odd cactus of A. Find a map g and a semi-simple shrub A ′ as in Lemma 6.10, and then construct a simple shrub A ′′ by first removing from A ′ all special arcs L ′ i (except its endpoints) and the interior points of all special leaves, and then adding the arcs Cl(S ′ i,m \ J ′ i,m ), with {S ′ i,m } m being the webs from which we have obtained the cuttings {J ′ i,m } m . Let T ′′ = g −1 (T ) ∩ A ′′ . Clearly, T ′′ contains all odd buds of A ′′ and one point from every odd cactus of A ′′ . Now, by Proposition 6.9, there are a homeomorphism f : S 2 → S 2 , a simple shrub A * , and an analytic map F : S 2 \ T * → R (here T * = f −1 (T ′′ )), such that f (A * ) = A ′′ , F (u) = 0 for any u ∈ S 2 \ A * , and F (u) = 0 for any u ∈ (Bd A * ) \ T * . Let L * i = f −1 (L ′ i ) and J * i,m = f −1 (J ′ i,m ) for any i and m. Write M * = i (L * i ∪ m J * i,m ) as the countable union of some pairwise disjoint dendrites {C * j } j (with their diameters tending to zero in the infinite case). Then f * = g • f is constant on each dendrite C * j , and if we distinguish a point r * j ∈ C * j for each j, then we get that f * maps bijectively (S 2 \ M * ) ∪ {r * j } j onto S 2 . See Figure 4. By Proposition 2.3(ii), if we define the equivalence relation ∼ in S 2 by u ∼ v if either u = v or there is j such that both u and v belong to C * j , then the quotient space Σ = S 2 / ∼ is homeomorphic to S 2 . Endow Σ with an analytic differential structure and let Π : S 2 → Σ be the projection map. Let K * = M * ∪T * , U * = S 2 \K * , and V = Π(U * ), and use Theorem 3.1 to find a continuous onto mapΠ : S 2 → Σ satisfyingΠ(u) = Π(u) for any u ∈ K * and mapping, analytically and diffeomorphically, U * onto V. Observe that the map Γ : Σ → S 2 mapping each C * j (when seen as a point from Σ) to f * (r k ), and each u ∈ S 2 \ M * (again, when seen as a point from Σ) toΠ −1 (f * (u)) is a bijection satisfying Γ •Π = f * . In fact, Γ is continuous (hence a homeomorphism), because if U is open in S 2 , thenΠ −1 (Γ −1 (U)) = (f * ) −1 (U) is open, hence Γ −1 (U) =Π((f * ) −1 (U)) = Σ \Π(S 2 \ (f * ) −1 (U)) is open as well.