Arnaud Bodin
email: arnaud.bodin@univ-lille.fr

AND Patrick Popescu-Pampu
email: patrick.popescu-pampu@univ-lille.fr

Miruna-Ştefana Sorea
email: mirunastefana.sorea@sissa.it

POINCARÉ-REEB GRAPHS OF REAL ALGEBRAIC DOMAINS

Keywords: Mathematics Subject Classification. Primary 58K05 ; Sec. 05E14, 14P25, 26C Combinatorial type, Morse theory, Poincaré-Reeb graph, Real algebraic curve, Real polynomial functions

Introduction

An algebraic domain D is a closed subset of an affine plane, homeomorphic to a surface with boundary, whose boundary C is a union of disjoint smooth connected components of real algebraic plane curves. This paper is dedicated to the study of the geometric shape of algebraic domains.

Context and previous work. In [START_REF] Sorea | The shapes of level curves of real polynomials near strict local minima[END_REF][START_REF]Measuring the local non-convexity of real algebraic curves[END_REF], the third author studied the non-convexity of the disks D bounded by the connected components C of the levels of a real polynomial function f (x, y) contained in sufficiently small neighborhoods of strict local minima. The principle was to collapse to points the maximal vertical segments contained inside D. This yielded a special type of tree embedded in a topological space homeomorphic to R 2 . It was called the Poincaré-Reeb tree associated to C and to the projection (x, y) → x, and it measured the non-convexity of D. Conversely, given a tree T of a special kind embedded in a plane, [START_REF] Sorea | The shapes of level curves of real polynomials near strict local minima[END_REF]Theorem 3.34] presented a construction of a polynomial function f (x, y) with a strict local minimum at (0, 0), whose Poincaré-Reeb tree near (0, 0) is T . The terminology "Poincaré-Reeb" introduced in [20, Definition 2.24] was inspired by a similar construction used in Morse theory, namely by the classical graph introduced by Poincaré in his study of 3-manifolds [15, 1904, Fifth supplement, p. 221], and rediscovered by Reeb [START_REF] Reeb | Sur les points singuliers d'une forme de Pfaff complètement intégrable ou d'une fonction numérique[END_REF] in arbitrary dimension. Reeb graphs encode the topology of level sets of real-valued functions on manifolds. Reeb graphs appear as useful tools in the study of singularity theory of differentiable maps; see [START_REF]Reeb spaces of smooth functions on manifolds[END_REF], [START_REF] Masumoto | A smooth function on a manifold with given Reeb graph[END_REF]. For a survey with a view towards applications in computational topology and data visualization, we refer the reader to [START_REF] Saeki | Theory of singular fibers and Reeb spaces for visualization, Topological methods in data analysis and visualization[END_REF] and references therein. Studies of more general Reeb spaces have been done in several recent works such as [START_REF] Vin De Silva | Categorified Reeb graphs[END_REF], [START_REF] Tamal | Topological analysis of nerves, Reeb spaces, mappers, and multiscale mappers[END_REF], [START_REF] Edelsbrunner | Reeb spaces of piecewise linear mappings[END_REF], [START_REF] Basu | On the Reeb spaces of definable maps[END_REF]. Some very recent work in this area are, for instance, [START_REF] Kitazawa | On Reeb graphs induced from smooth functions on 3-dimensional closed manifolds with finitely many singular values[END_REF], [START_REF]On Reeb graphs induced from smooth functions on closed or open manifolds[END_REF]. Applications of Reeb graphs in nonparametric statistics and data analysis are presented for instance in [START_REF] Klemelä | Level set tree methods[END_REF].

Poincaré-Reeb graphs of real algebraic domains. In this paper we extend the previous method of study of non-convexity to algebraic domains D in R 2 . When D is compact, the collapsing of maximal vertical segments contained in it yields a finite planar graph which is not necessarily a tree, called the Poincaré-Reeb graph of D relative to the vertical direction. See Figure 1 for a first idea of the definition. In it is represented also a section of the collapsing map above this graph, called a Poincaré-Reeb graph in the source. It is well-defined up to isotopies stabilizing each vertical line. Such a section exists whenever the projection x : R 2 → R is in addition generic relative to the boundary C of D, that is, C has no vertical bitangencies, no vertical inflectional tangencies and no vertical asymptotes. When D is non-compact but the projection x : R 2 → R is still proper in restriction to it, one gets an analogous graph, which has this time at least one unbounded edge. When the properness assumption on the projection is dropped but one assumes instead its genericity relative to C, then one may still define a Poincaré-Reeb graph in the source, again well-defined up to isotopies stabilizing the vertical lines. Notice that the Poincaré-Reeb graph does not live in the same space as D even if the quotient space is homeomorphic to R 2 ; we will work in the context of vertical planes (see Definition 2.3) which is adapted for both the original plane and its quotient.

Finite type domains in vertical planes. In order to be able to use our construction of Poincaré-Reeb graphs for the study of more general subsets of affine planes than algebraic domains, for instance to topological surfaces bounded by semi-algebraic, piecewise smooth or even less regular curves, we give a purely topological description of the setting in which it may be applied. Namely, we define the notion of domain of finite type D inside a vertical plane (P, π): here π : P → R is a locally trivial fibration of an oriented topological surface P homeomorphic to R 2 and D is a closed topological subsurface of P, such that the restriction π | D is proper and the restriction π | C to the boundary C of D has a finite number of topological critical points.

Main theorem. Our main result is an answer in the generic case to the following question: given a transversal graph in a vertical plane (P, π), is it possible to find an algebraic domain whose Poincaré-Reeb graph is isomorphic to it? Namely, we show that each transversal graph whose vertices have valencies 1 or 3 and are situated on distinct levels of π arises up to isomorphism from an algebraic domain in R 2 such that the function x : R 2 → R is generic relative to it. Our strategy of proof is to first realize the graph via a smooth function. Then we recall a Weierstrass-type theorem that approximates any smooth function by a polynomial function and we adapt its use in order to control vertical tangencies. In this way we realize any given generic compact transversal graph as the Poincaré-Reeb graph of a compact algebraic domain. Finally, we explain how to construct non-compact algebraic domains realizing some of the non-compact transversal graphs. Roughly speaking, we do this by adding branches to a compact curve.

Structure of the paper. Section 2 is devoted to the definitions and several general properties of the notions vertical plane, finite type domain, Poincaré-Reeb graph, real algebraic domain and transversal graph in the compact setting. Section 3 is dedicated to the case where the real algebraic domain D is compact and connected. In it we present the main result of our paper, namely the algebraic realization of compact, connected, generic transversal graphs as Poincaré-Reeb graphs of connected algebraic domains (see Theorem 3.5). Section 4 presents the case where D is non-compact and C is connected. Finally, in Section 5 we focus on the general situation, where D may be both non-compact and disconnected.

Acknowledgements. We thank the referees for their useful remarks and references, which improved the quality of our manuscript. In particular, we are grateful for the simplification of the proof of Proposition 2.24, using the Vietoris-Begel theorem [START_REF] Smale | A Vietoris mapping theorem for homotopy[END_REF] and for the references to the C k Weierstrass approximation theorem. We also thank Antonio Lerario for referring us to [START_REF] Lerario | What is the degree of a smooth hypersurface?[END_REF], for a possible approach towards estimating the degree of the real algebraic domains. This work was supported in part by the Labex CEMPI (ANR-11-LABX-0007-01) and by the ANR project LISA (ANR-17-CE40-0023-01). The first author thanks the University of Vienna for his visit at the Wolfgang Pauli Institute. M.-Ş. Sorea would like to thank Antonio Lerario for the very supportive working environment during her postdoc at SISSA, in Trieste, Italy.

Poincaré-Reeb graphs of domains of finite type in vertical planes

Algebraic domains

An affine plane P is a principal homogeneous space under the action of a real vector space of dimension 2. It has a natural structure of real affine surface (the term "affine" being taken now in the sense of algebraic geometry) and also a canonical compactification into a real projective plane. Therefore, one may speak of real-valued polynomial functions f : P → R as well as of algebraic curves in P of given degree. We are interested in the following types of surfaces embedded in affine planes:

Domains of finite type in vertical planes

Assume that D is an algebraic domain in R 2 . We will study its non-convexity by collapsing to points the maximal vertical segments contained inside D (see Definition 2.11 below). The image of R 2 by such a collapsing map cannot be identified canonically to R 2 , and it has not even a canonical structure of affine plane. But in many cases it is homeomorphic to R 2 , it inherits from the starting affine plane R 2 a canonical orientation and the function x : R 2 → R descends to it as a locally trivial topological fibration. This fact motivates the next definition: Definition 2.3. A vertical plane is a pair (P, π) such that P is a topological space homeomorphic to R 2 , endowed with an orientation, and π : P → R is a locally trivial topological fibration. The map π is called the projection of the vertical plane and its fibers are called the vertical lines of the vertical plane. A vertical plane (P, π) is called affine if P is an affine plane and π is affine, that is, a polynomial function of degree one. The canonical affine vertical plane is (R 2 , x : R 2 → R).

Let (P, π) be a vertical plane. As the projection π is locally trivial over a contractible base, it is globally trivializable. This implies that P is homeomorphic to the Cartesian product R × V , where V denotes any vertical line of (P, π). The assumption that P is homeomorphic to R 2 implies that the vertical lines are homeomorphic to R. We will say that a subset of a vertical line of (P, π) which is homeomorphic to a usual segment of R is a vertical segment. Given a curve in a vertical plane, we may distinguish special points of it: Definition 2.4. Let (P, π) be a vertical plane and C a curve in it, that is, a closed subset of it which is a topological submanifold of dimension one. The topological critical set Σ top (C) of C consists of the topological critical points of the restriction π | C , which are those points p ∈ C in whose neighborhoods the restriction π | C is not a local homeomorhism onto its image.

P 1 C P 2 C Q C Figure 3.
Two topological critical points P 1 and P 2 (which are critical points in the differential setting). The inflection point Q is not a topological critical point but is a critical point in the differential setting.

Remark 2.5. If C is an algebraic curve contained in an affine vertical plane, the topological critical set Σ top (C) is contained in the usual critical set Σ diff (C) of π | C , but is not necessarily equal to it. For instance, any inflection point of C with vertical tangency and at which C crosses its tangent line belongs to Σ diff (C) \ Σ top (C) (see Figure 3).

The topological critical set Σ top (C) is a closed subset of C. In the neighborhood of an isolated topological critical point, the curve has a simple behavior: Lemma 2.6. Let (P, π) be a vertical plane and C a curve in it. Let p ∈ C be an isolated topological critical point. Then C lies locally on one side of the vertical line passing through p. Moreover, there exists a neighborhood of p in C, homeomorphic to a compact segment of R, and such that the restrictions of π to both subsegments of it bounded by p are homeomorphisms onto their images.

Proof. Consider a compact arc I of C whose interior is disjoint from Σ top (C). Identify it homeomorphically to a bounded interval [a, b] of R. The projection π becomes a function [a, b] → R devoid of topological critical points in (a, b), that is, a strictly monotonic function. Consider now two such arcs I 1 and I 2 on both sides of p in C. The relative interior of their union I 1 ∪ I 2 is a neighborhood with the stated properties. Moreover, I 1 ∪ I 2 lies on only one side of the vertical line passing through p: otherwise π would map I 1 homeomorphically to [α, x 0 ] and I 2 homeomorphically to [x 0 , β], where x 0 = π(p) is a critical value and as I 1 and I 2 are on both side of the vertical line at p we would have for instance α < x 0 < β; this implies that π :

I 1 ∪ I 2 → [α, β] is a homeomorphism, in contradiction with p being a topological critical point of π | C .
As explained above, in this paper we are interested in the geometric shape of algebraic domains relative to a given "vertical" direction. But the way of studying them through the collapse of vertical segments may be extended to other kinds of subsets of real affine planes, for instance to topological surfaces bounded by semi-algebraic, piecewise-smooth or even less regular curves, provided they satisfy supplementary properties relative to the chosen projection. Definition 2.7 below describes the most general context we could find in which the collapsing construction yields a new vertical plane and a finite graph in it, possibly unbounded. It is purely topological, involving no differentiability assumptions. Definition 2.7. Let (P, π) be a vertical plane. Let D ⊂ P be a closed subset homeomorphic to a surface with non-empty boundary. Denote by C its boundary. We say that D is a domain of finite type in (P, π) if:

(1) the restriction π Condition [START_REF] Bagby | Multivariate simultaneous approximation[END_REF] implies that the restriction π | C : C → R is also proper, which means that C has no connected components which are vertical lines or have vertical asymptotes. For instance, consider an algebraic domain contained in the positive quadrant of the canonical vertical plane R 2 , limited by two distinct level curves of the function xy (see the middle drawing of Figure 4). It satisfies condition [START_REF] Basu | On the Reeb spaces of definable maps[END_REF] as it has no topological critical points, but as C has a vertical asymptote (the y-axis), it does not satisfy condition (1), therefore it is not a domain of finite type. Note that condition (1) is stronger than the properness of π | C . For instance, the upper half-plane in (R 2 , x) does not satisfy condition (1), but x | C is proper for it (see the right drawing of Figure 4).

| D : D → R is proper; (2) the topological critical set Σ top (C) is finite. Example 2.8.
We distinguish two types of topological critical points on the boundaries of domains of finite type:

Definition 2.9. Let (P, π) be a vertical plane and D ⊂ P a domain of finite type, whose boundary is denoted by C. A topological critical point of C is called:

-an interior topological critical point of D if the vertical line passing through it lies locally inside D; -an exterior topological critical point of D if the vertical line passing through it lies locally outside D. (1) This follows directly from Lemma 2.6 and Definition 2.9.

(2) Let us consider a point x 0 ∈ R. By Definition 2.7 (1), since the set {x 0 } is compact, we obtain that the fiber π -1 | D (x 0 ) is compact. Let now p be a point of this fiber. By looking successively at the cases where p ∈ D \ C, p ∈ C \ Σ top (C), p is an interior and p is an exterior topological critical point, we see that there exists a compact vertical segment K p , neighborhood of p in the vertical line π -1 (x 0 ), such that π -1 | D (x 0 ) ∩ K p is a compact vertical segment.

p 1 p 2 p 3 C D x 0 Figure 6. Different types of point p in π -1 (x 0 ) ∩ D. As π -1 | D (x 0
) is compact, it may be covered by a finite collection of such segments K p . This implies that π -1 | D (x 0 ) is a finite union of vertical segments (some of which may be points).

(3) Let ∆ top (C) ⊂ R be the topological critical image of π| C , that is, the image π(Σ top (C)) of the topological critical set. As by Definition 2.7,

Σ top (C) is finite, ∆ top (C) is also finite. Therefore, its complement R \ ∆ top (C) is a finite union of open intervals I i . As π | D is
proper, this is also the case of π | C . Therefore, for every such interval I i the preimage π -1 | C (I i ) is a finite union of arcs. This implies that C is a finite union of arcs and points, therefore it has a finite number of connected components.

Collapsing vertical planes relative to domains of finite type

Next definition formalizes the idea of collapsing the maximal vertical segments contained in a domain of finite type, mentioned at the beginning of Subsection 2.2. Definition 2.11. Consider a vertical plane (P, π) and let D ⊂ P be a domain of finite type. We say that two points P and Q of P are vertically equivalent relative to D, denoted P ∼ D Q, if the following two conditions hold:

-P and Q are on the same fiber of π, that is π(P ) = π(Q) =: x 0 ∈ R; -either the points P and Q are on the same connected component of π -1 (x 0 ) ∩ D, or

P = Q / ∈ D.
Denote by P the quotient P/∼ D of P by the vertical equivalence relation relative to D. We call it the D-collapse of P. The associated quotient map ρ D : P → P is called the collapsing map relative to D.

P Q R D x 0 Figure 7.
The points P and Q are vertically equivalent relative to D: P ∼ D Q. However, P and Q are not equivalent to R.

Next proposition shows that the D-collapse of P is naturally a new vertical plane, which is the reason why we introduced this notion in Definition 2.3.

Proposition 2.12. Let (P, π) be a vertical plane and D be a domain of finite type in it. Consider the collapsing map ρ D : P → P relative to D. Then:

-P is homeomorphic to R 2 ; -the projection π descends to a function π : P → R; ρ D is a homeomorphism from P \ D onto its image; -if one endows P with the orientation induced from that of P by the previous homeomorphism, then ( P, π) is again a vertical plane, and the following diagram is commutative:

P P R π ρ D π
The proof of Proposition 2.12 is similar to that of [START_REF]Measuring the local non-convexity of real algebraic curves[END_REF]Proposition 4.3].

The Poincaré-Reeb graph of a domain of finite type

We introduce now the notion of Poincaré-Reeb set associated to a domain of finite type D in a vertical plane (P, π). Whenever P is an affine plane and π is an affine function, its role is to measure the non-convexity of D in the direction of the fibers of π. Each critical segment is either an exterior topological critical point in the sense of Definition 2.9 or a non-trivial segment containing a finite number of interior topological critical points in its interior (see Figure 9 for an example with two such points). (1) each edge, that is, the closure E of an open edge E, is homeomorphic to a closed segment of R and E \ E consists of 0, 1 or 2 vertices; (2) the edges are topologically transversal to the vertical lines, that is, the restriction of π to each edge is a homeomorphism onto its image in R;

(3) the restriction π | G : G → R is proper.
A transversal graph is called generic if its vertices are of valency 1 or 3 and if distinct vertices lie on distinct vertical lines.

Any transversal graph is homeomorphic to the complement of a subset of the set of vertices of valency 1 inside a usual finite (compact) graph. This is due to the fact that some of its edges may be unbounded, in either one or both directions. Condition (3) from Definition 2.15 avoids G having unbounded edges which are asymptotic to a vertical line of π. Note that we allow G to be disconnected and the set of vertices to be empty. In this last case, G is a finite union of pairwise disjoint open edges, each of them being sent by π homeomorphically onto R.

Here is the announced description of the canonical graph structure of the Poincaré-Reeb sets of domains of finite type in vertical planes: Proposition 2.16. Let D be a domain of finite type in a vertical plane (P, π). Then each edge of the Poincaré-Reeb set D in the sense of Definition 2.14 is homeomorphic to a closed segment of R. Endowed with its vertices and edges, D is a transversal graph in ( P, π), without vertices of valency 2.

The proof is straightforward using Proposition 2.10. For an example, see the graph of Figure 8. Below we will define a related notion of generic direction with respect to an algebraic domain (see Definition 2.21). For algebraic domains of finite type, up to a small rotation the vertical direction is generic, see Remark 2.22 below. In other words, for all but a finite number of directions the projection is generic.

Algebraic domains of finite type

Let us consider algebraic domains in the canonical affine vertical plane (R 2 , x) (see Definition 2.3), in the sense of Definition 2.1. Not all of them are domains of finite type. For instance, the closed half-planes or the surface bounded by the hyperbolas (xy = 1) and (xy = -1) are not of finite type, because the restriction of the projection x to the domain is not proper. Next proposition shows that this properness characterizes the algebraic domains which are of finite type, and that it may be checked simply: Proposition 2.20. Let (P, π) be an affine vertical plane and let D be an algebraic domain in it. Then the following conditions are equivalent:

(1) D is a domain of finite type.

(2) The restriction π

| D : D → R is proper. (3) One fiber of π | D : D → R is compact
I j is compact, it means that π -1 | D (I j
) is a finite union of bands bounded by pairs of such transversal arcs and compact vertical segments, therefore π | D is proper above I j . In particular, its fibers above the extremities of I j are also compact. In this way we show by progressive propagation from each interval with a compact fiber to its neighbors, that π | D is proper above each interval of the subdivision of R using Σ top (C). This implies the properness of π | D .

Let us explain now a notion of genericity of an affine function on an affine plane relative to an algebraic domain: Definition 2.21. Let D be an algebraic domain in an affine vertical plane (P, π), and let C be its boundary. The projection π is called generic with respect to D if C does not contain vertical lines and does not possess vertical asymptotes, vertical inflectional tangent lines and vertical multitangent lines (that is, vertical lines tangent to C at least at two points, or to a point of multiplicity greater than two).

Remark 2.22. Let D be an algebraic domain in an affine plane P. Except for a finite number of directions of their fibers, all affine projections are generic with respect to D (see [START_REF]Permutations encoding the local shape of level curves of real polynomials via generic projections[END_REF]Theorem 2.13]). Note that the affine projection π is generic with respect to D if and only if the restriction of π to C is a proper excellent Morse function, i.e. all the critical points of π |C are of Morse type and are situated on different level sets of π |C . Note also that if the algebraic domain D is moreover of finite type and π is generic with respect to it in the sense of Definition 2.21, then D is generic in the sense of Definition 2.19.

Proposition 2.23. Let D be an algebraic domain of finite type in an affine vertical plane (P, π). Assume that π is generic with respect to D in the sense of Definition 2.21. Then its Poincaré-Reeb graph is generic in the sense of Definition 2.15.

Proof. This is a consequence of Proposition 2.18 and Remark 2.22, since by Definition 2.4, the topological critical points of C are among the differential critical points of the vertical projection π| C .

The invariance of the Euler characteristic

In this section we consider only compact domains of finite type. This implies that their boundaries are also compact (see Figure 1 Note that in Section 5 we will focus on the topology of the boundary curve C of D, in terms of Betti numbers (see Proposition 5.1). The case where D is a disk was considered by the third author in her study of asymptotic shapes of level curves of polynomial functions f (x, y) ∈ R[x, y] near a local extremum (see [START_REF] Sorea | The shapes of level curves of real polynomials near strict local minima[END_REF][START_REF]Measuring the local non-convexity of real algebraic curves[END_REF]). A direct consequence of Proposition 2.24 is: The preimage of an edge E of D is a band (see Definition 2.14), which is a trivializable fibration with compact segments as fibers over the interior of E. Therefore, one may extend continuously the section from its boundary to the interior of E in a canonical way up to isotopies stabilizing each vertical line (see Figure 11). Note that without the genericity assumption, the conclusion of Proposition 2.26 is not necessarily true, as may be checked on Figure 9. Another advantage is that one may define Poincaré-Reeb graphs in the source even for algebraic domains which are not of finite type, but for which the affine projection π is assumed to be generic in the sense of Definition 2.21. In those cases the D-collapse of the starting affine plane P is not any more homeomorphic to R 2 .

Vertical equivalence

The following definition of vertical equivalence is intended to capture the underlying combinatorial structure of subsets of vertical planes. That is, we consider that two vertically equivalent such subsets have the same combinatorial type.

Definition 2.28. Let X and X be subsets of the vertical planes (P, π) and (P , π ) respectively. We say that X and X are vertically equivalent, denoted by X ≈ v X , if there exist orientation preserving homeomorphisms Φ : P → P and ψ : R → R such that Φ(X) = X and the following diagram is commutative:

P P R R π Φ π ψ
In the sequel we will apply the previous definition to situations when X and X are either domains of finite type in the sense of Definition 2.7 or transversal graphs in the sense of Definition 2.15.

Proposition 2.29. Let D and D be compact connected domains of finite type in vertical planes, with Poincaré-Reeb graphs G and G . Assume that both are generic in the sense of Definition 2.19. Then:

D ≈ v D ⇐⇒ G ≈ v G .
Before giving the proof of Proposition 2.29, let us make some remarks:

-Denote C = ∂D and C = ∂D . We have Φ(C) = C .

-Φ sends the topological critical points {P i } of C bijectively to the topological critical points {P i } of C . In fact, such a critical point may be geometrically characterized by the local behavior of D relative to the vertical line through this point. A point P is a topological critical point of π |C , if and only if the intersection of D with the vertical line through P is a point in a neighborhood of P , or a segment such that P is in the interior of the segment. The homeomorphism Φ sends the vertical line to a vertical line and D to D , hence P = Φ(P ) is a topological critical point of π |C . -The equivalence preserves the π-order of the critical points: if D ≈ v D , and if P i , P j are critical points of π |C with π(P i ) < π(P j ) then the corresponding critical points of π |C , P i := Φ(P i ), P j := Φ(P j ) verify π (P i ) < π (P j ). This comes from the assumption that the homeomorphisms Φ and ψ involved in Definition 2.28 are orientation preserving.

Example 2.30. Consider the canonical affine vertical plane (R 2 , x) in the sense of Definition 2.3. Then the vertical equivalence preserves the x-order, that is to say, if x(P i ) < x(P j ) then x(P i ) < x(P j ). Notice that the y-order of the critical points may not be preserved. However Φ preserves the orientation on each vertical line, i.e. y → Φ(x 0 , y) is a strictly increasing function.

Example 2.31. Consider again the canonical affine vertical plane (R 2 , x) and a generic algebraic domain D in it, homeomorphic to a disc. Denote C = ∂D. It is homeomorphic to a circle. Then the set of critical points of π| C (which are the same as the topological critical points, by the genericity assumption) yields a permutation. To explain that, we will define two total orders on the set of critical points. The first order enumerates {P i } in a circular manner following C, obtained by following the curve, starting with the point with the smallest x coordinate, the curve being oriented as the boundary of D. The second order is obtained by ordering the abscissas x(P i ) using the standard order relation on R. Now, as explained by Knuth (see [8, page 17], [23, Definition 4.21], [21, Section 1]), two total order relations on a finite set give rise to a permutation σ: in our case, σ(i) is the rank of x(P i ) in the ordered list of all abscissa. The vertical equivalence preserves the permutation: if D ≈ v D then σ = σ . However, the reverse implication could be false, as shown in the picture below, which shows two generic real algebraic domains homeomorphic to discs with the same permutation ( 1 2 3 4 5 6 1 5 3 6 2 4 ), but which are not vertically equivalent, as may be seen by considering their Poincaré-Reeb trees. To this end, one may construct a kind of tubular neighborhood D of G, obtained by thickening it using vertical segments (see Figure 13). Then D is vertically equivalent to D. Now suppose that G ≈ v G and let Φ : P → P be a homeomorphism inducing this equivalence. This homeomorphism induces also a vertical equivalence of convenient such thickenings, hence yields the equivalence D ≈ v D .

The combinatorial types of generic transversal graphs can be realized by special types of graphs with smooth edges in the canonical affine vertical plane (R 2 , x : R 2 → R): Proposition 2.32. Any generic transversal graph in a vertical plane is vertically equivalent to a graph in the canonical affine vertical plane, whose edges are moreover smooth and smoothly transversal to the vertical lines.

We leave the proof of this proposition to the reader.

Remark 2.33. We said at the beginning of this subsection that we introduced vertical equivalence as a way to capture the combinatorial aspects of subsets of vertical planes. It is easy to construct a combinatorial object (that is, a structure on a finite set) which encodes the combinatorial type of a generic transversal graph. For instance, given such a graph G, one may number its vertices from 1 to n in the order of the values of the vertical projection π. Then, for each edge α of G, one may remember both its end points a < b and, for each number c ∈ {a + 1, . . . , b -1}, whether α passes below or above the vertex numbered c.

Algebraic realization in the compact connected case

In this section we give the main result of the paper, Theorem 3.5: given a compact connected generic transversal graph G in a vertical plane (see Definition 2.15), we prove that there exists a compact algebraic domain in the canonical affine vertical plane whose Poincaré-Reeb graph is vertically equivalent to G. We will prove a variant of Theorem 3.5 for non-compact graphs in the next section (Theorem 4.6). Using the canonical orientation of the target R of the vertical projection, one may distinguish two kinds of interior and exterior vertices of the graph G (see Figure 14). Our strategy of proof of Theorem 3.5 is as follows:

-we realize the generic transversal graph G as a Poincaré-Reeb graph of a finite type domain defined by a smooth function; -we present a Weierstrass-type theorem that approximates any smooth function by a polynomial function; -we adapt this Weierstrass-type theorem in order to control vertical tangents, and we realize G as the Poincaré-Reeb graph of a generic finite type algebraic domain.

Smooth realization

First, we construct a smooth function f that realizes a given generic transversal graph. Proof. The idea is to construct first the curve C, then the function f . We construct C by interpolating between local constructions in the neighborhoods of the vertices of G (see Figure 15). Let us be more explicit. We may assume, up to performing a vertical equivalence, that G is a graph with smooth compact edges in the canonical affine vertical plane (R 2 , x), whose edges are moreover smoothly transversal to the verticals (see Proposition 2.32). Let ε > 0 be fixed. Then, one may construct C verifying the following properties:

-C is compact; -C ⊂ N (G, ε): the curve is contained in the ε-neighborhood of G;
-C has only one vertical tangent associated to each vertex of G; -all these tangents are ordered in the same way as the vertices of G.

Note that this last condition is automatic once ε is chosen less than half the minimal absolute value |x(P i ) -x(P j )|, where P i and P j are distinct vertices of G.

Once C is fixed, one may construct f by following the steps:

-Bicolor the complement R 2 \C of C using the numbers ±1, such that neighboring connected components have distinct associated numbers. Denote by σ : R 2 \ C → R the resulting function. -Choose pairwise distinct annular neighborhoods N i of the connected components C i of C, and diffeomorphisms φ i : N i C i × (-1, 1) such that p 2 • φ i (the composition of the second projection p 2 : C i × (-1, 1) → (-1, 1) and of φ i ) has on the complement of C i the same sign as σ.

-For each connected component S j of R 2 \ C, consider the open set U j ⊂ S j obtained as the complement of the union of annuli of the form φ -1 i (C i × [-1/2, 1/2]). Then consider the restriction σ j : U j → R of σ to U j .

-Fix a smooth partition of unity on R subordinate to the locally finite open covering consisting of the annuli N i and the sets U j . Then glue the smooth functions p 2 • φ i : N i → R and σ j : U j → R using it. -The resulting function f satisfies the desired properties.

A Weierstrass-type approximation theorem

Let us first recall the following classical result: Theorem 3.2 (Stone-Weierstrass theorem, [START_REF] Harvey | The generalized Weierstrass approximation theorem[END_REF]). Let X be a compact Hausdorff space. Let C(X) be the Banach R-algebra of continuous functions from X to R endowed with the norm • ∞ . Let A ⊂ C(X) be such that:

-A is a sub-algebra of C(X), -A separates points (that is, for each x, y ∈ X with x = y there exists f ∈ A such that f (x) = f (y)), -for each x ∈ X, there exists f ∈ A such that f (x) = 0.

Then A is dense in C(X) relative to the norm • ∞ .

We will only use the previous theorem through the following corollary: . This set A satisfies the three conditions of Theorem 3.2 (the last one because 1 X ∈ A), therefore A is dense in C(X), which implies that f can indeed be uniformly arbitrarily well approximated on X by polynomials. Is Corollary 3.3 sufficient to answer the realization question? No! Indeed, even if it provides a polynomial p(x, y) such that (p(x, y) = 0) lies in a close neighborhood of (f (x, y) = 0), we have no control on the vertical tangents of the algebraic curve (p = 0), whose Poincaré-Reeb graph can therefore be more complicated than the Poincaré-Reeb graph of (f = 0). In the sequel we construct a polynomial p by keeping at the same time a control on the vertical tangents of a suitable level curve of it.

Algebraic realization

Proposition 3.4. Let f : R 2 → R be a C 3 function such that C = (f = 0) is a curve which does not contain critical points of f , which has only simple vertical tangents, and is included in the interior of a compact subset K of R 2 . For each δ > 0, there exists a polynomial p ∈ R[x, y] such that (see Figure 16):

-(p = 0) ∩ K ⊂ N (f = 0, δ),
-for each point P 0 ∈ (f = 0) where (f = 0) has a vertical tangent, there exists a unique Q 0 ∈ (p = 0) in the disc N (P 0 , δ) centered at P 0 and of radius δ such that (p = 0) has also a vertical tangency at Q 0 , -(p = 0) ∩ K has no vertical tangent except at the former points.

P 0 Q 0 (f = 0) (p = 0) N (f = 0, δ) Figure 16. Algebraic realization.
We prove this proposition in Subsection 3.4 below. By taking the numbers ε > 0 and δ > 0 appearing in Propositions 3.1 and 3.4 sufficiently small, we get:

Theorem 3.5. Any compact connected generic transversal graph can be realized as the Poincaré-Reeb graph of a connected algebraic domain of finite type.

Proof of the theorem. Starting with a compact connected transversal generic graph G, it can be realized by a smooth function f (Proposition 3.1), which in turn can be replaced by a polynomial map p (Proposition 3.4).

The referees ask:

Question. Is it possible to estimate the degree of a polynomial defining the algebraic domain in term of the combinatorics of the graph G?

A referee suggested to use a degree effective version of the C k Weierstrass polynomial approximation theorem, as in [1, Theorem 2]. Furthermore, in [START_REF] Lerario | What is the degree of a smooth hypersurface?[END_REF], the authors construct an algebraic hypersurface that approximates a smooth compact hypersurface with a control of its minimal degree in terms of geometric data of the hypersurface.

3.4. Proof of Proposition 3.4 Compact support. Let M > 0 such that (f = 0) ⊂ [-(M -1), M -1] 2 (remember that (f = 0
) is assumed to be included in a compact set). We replace the function f by a function g with compact support. More precisely, let g : R 2 → R be a function such that:

-

g is C 3 , -f = g on [-(M -1), M -1] 2 , -g = 0 outside (-M, M ) 2 ,
g does not vanish in the intermediate zone (hatched area below).

x y

(f = 0) M -1 M Figure 17. Compact support of g.
Such a function may be constructed using an adequate partition of unity.

Polynomial approximation of g and f . We need a polynomial p approximating g, but also that some partial derivatives of p approximate the corresponding partial derivatives of g. This can be done by a C k Weierstrass polynomial approximation. More precisely, one can use the density of polynomials in the C k topology, as stated in [3, Proposition

]. Nevertheless, we state such a result and emphasise which partial derivatives we need to approximate.

|∂ x p(x, y) -∂ x g(x, y)| (2M ) 2 ε, ∂ y 2 p(x, y) -∂ y 2 g(x, y) 2M ε.
In order to be self-contained we give a short proof, inspired by [START_REF] Elredge | Answer to On finding polynomials that approximate a function and its derivative, StackExchange[END_REF].

Proof. By Corollary 3.3 applied to the function ∂ x ∂ y ∂ y g and to (a, b) = (-M, M ), there exists a polynomial y] is defined by a triple integration :

p 0 ∈ R[x, y] such that: ∀(x, y) ∈ [-M, M ] 2 |p 0 (x, y) -∂ x ∂ y ∂ y g(x, y)| < ε. Now our polynomial p ∈ R[x,
p(x, y) = x -M y -M y -M p 0 (u, v) dv dv du.
We start by proving the last inequality. By Fubini theorem: ∂ y 2 p(x, y) =

x -M p 0 (u, y) du. Therefore:

∂ y 2 p(x, y) -∂ y 2 g(x, y) = x -M p 0 (u, y) -∂ x ∂ y 2 g(u, y) du x -M ε du 2M ε.
The first equality is a consequence of the fact that:

x -M ∂ x ∂ y 2 g(u, y) du = ∂ y 2 g(x, y)-c(y) where c(y) = ∂ y 2 g(-M, y). As g vanishes outside (-M, M ) 2 , for those points we have ∂ y 2 g(x, y) = 0 so that c(y) = 0. The inequality following it results from the definition of the polynomial p 0 . By successive integrations we prove the other inequalities.

Inside the square [-M, M ] 2 the curve (p = 0) defined for a sufficiently small ε is in a neighborhood of (f = 0). However, remark that (p = 0) can also vanish outside the square [-M, M ] 2 .

The curve (p = 0) inside the square.

Let us explain the structure of the curve (p = 0) around a point P 0 ∈ (f = 0) where the tangent is not vertical (recall that f = g inside the square [-(M -1), M -1] 2 ).

-Fix δ > 0. Let B(P 0 , δ) be a neighborhood of P 0 . On this neighborhood f takes positive and negative values.

-Let η > 0 and Q 1 , Q 2 ∈ B(P 0 , δ) such that f (Q 1 ) > η and f (Q 2 ) < -η. -We choose the ε of Lemma 3.6 such that (2M ) 3 ε < η/2. -p(Q 1 ) > f (Q 1 ) -(2M ) 3 ε > η/2 > 0; a similar computation gives p(Q 2 ) < 0, hence p vanishes at a point Q 0 ∈ [Q 1 Q 2 ] ⊂ B(P 0 , δ).
-Because we supposed ∂ y f = 0 in B(P 0 , δ), we also have ∂ y p = 0. Hence (p = 0) is a smooth simple curve in B(P 0 , δ) with no vertical tangent. Notice that the construction of (p = 0) in B(P 0 , δ) depends on ε, whose choice depends on the point P 0 . To get a common choice of ε, we first cover the compact curve (f = 0) by a finite number of balls B(P 0 , δ) and take the minimum of the ε above.

B(P 0 , δ) P 0 Q 1 Q 2 Q 0 (p = 0) (f = 0)

Vertical tangency.

-Let P 0 = (x 0 , y 0 ) be a point with a simple vertical tangent of (f = 0), that is to say:

∂ y f (x 0 , y 0 ) = 0 ∂ x f (x 0 , y 0 ) = 0 ∂ y 2 f (x 0 , y 0 ) = 0
-For similar reasons as before, (p = 0) is a non-empty smooth curve passing near P 0 .

-In the following we may suppose that the curve (f = 0) is locally at the left of its vertical tangent, that is to say:

∂ x f (x 0 , y 0 ) × ∂ y 2 f (x 0 , y 0 ) > 0
An example of this behavior is given by f (x, y) := x + y 2 at (0, 0).

B(P 0 , δ) P 0 Q 0 (f = 0) (p = 0) Figure 19. Vertical tangent.
-Fix δ > 0. Let B(P 0 , δ) be a neighborhood of P 0 .

-∂ y p ∼ ∂ y f . As ∂ y f vanishes at the point P 0 of (f = 0), then ∂ y f takes positive and negative values near this point. Let η > 0, and

Q 1 ∈ (f = 0) such that ∂ y f (Q 1 ) > η.
For a sufficiently small ε, there exists R 1 ∈ (p = 0) such that ∂ y f (R 1 ) > 2 3 η. Therefore ∂ y p(R 1 ) > 1 3 η > 0. For a similar reason there exists R 2 ∈ (p = 0) such that ∂ y p(R 2 ) < 0. Then there exists Q 0 ∈ (p = 0) ∩ B(P 0 , δ) such that ∂ y p(Q 0 ) = 0. -∂ x p ∼ ∂ x f . As ∂ x f (P 0 ) = 0, one has also ∂ x p(Q 0 ) = 0, thus p has a vertical tangent at Q 0 . -∂ y 2 p ∼ ∂ y 2 f and they do not vanish near P 0 and Q 0 , therefore the vertical tangent at Q 0 for (p = 0) is simple and has the same type as the vertical tangent at P 0 for (f = 0). -Moreover as ∂ y 2 p = 0 on (p = 0) ∩ B(P 0 , δ), thus ∂ y p vanishes only once, hence there is only one vertical tangent in this neighborhood. -From this point of view, case B is its own complementary case. More on such complementarities will be said later (see Section 5).

Proposition 4.3. Let D be a simply connected generic domain of weakly finite type in a vertical plane. Then its Poincaré-Reeb graph is a generic transversal binary tree.

Proof. After applying a vertical equivalence in the sense of Definition 2.28, we may assume that D is embedded in the canonical vertical plane (R 2 , x). Denote C := ∂D. The idea is to intersect C (and D) with a sufficiently big compact convex topological disk K, to apply our previous construction for D ∩ K, then to add suitable arrows.

In the figure below, such a disk is represented as a Euclidean one, but one has to keep in mind that its shape may be different, for instance a rectangle, in order to achieve topological transversality between its boundary and the curve C. First, notice that the case where C is compact is already known (see Propositions 2.18 and 2.25). Assume therefore that C is a non-compact curve. Then π |C has a finite number of topological critical points. We consider a sufficiently large convex compact topological disk K that contains all these critical points. Let D := D ∩ K and C := ∂D . We are then in the compact situation studied before. By Proposition 2.25, the Poincaré-Reeb graph of D is a tree. We add arrows (at each circled dot below) depending on each case.

We extend now the notion of vertical equivalence of transversal graphs from Definition 2.28 to enriched non-compact transversal graphs, requiring that arrowhead vertices are sent to arrowhead vertices. Then we have the following generalization of Theorem 2.29, whose proof is similar:

Proposition 4.4. Let D, D be generic simply connected domains of weakly finite type. Then:

D ≈ v D ⇐⇒ G ≈ v G .

Algebraic realization

We extend our realization thorem (Theorem 3.5) of generic transversal graphs as Poincaré-Reeb graphs of algebraic domains to the simply connected but non-compact case. The idea is to use the realization from the compact setting and consider the union with a line (or a parabola); finally, we take a neighboring curve.

Example 4.5. Here is an example, see Figure 24: starting from an ellipse (f = 0), we consider the union with a line (g = 0), then the unbounded component of (f g = ε) is a non-compact curve with two branches that have the shape of the ellipse on a large arc, if the sign of ε is conveniently chosen. Remark 4.7. Note that in this section we work under the additional hypothesis that the realization from the compact setting is done by a connected real algebraic curve and not by a connected component of a real algebraic curve as it was done in Theorem 3.5. We impose this hypothesis, in order not to have difficulties when taking neighboring curves (see Remark 4.10).

(f = 0) (f = 0) (g = 0) (f g = ε) (f g = -ε)
Proof. By hypothesis, there exists a connected real algebraic curve C : (f = 0), f ∈ R[x, y] such that C realizes the newly obtained tree G . In this proof we consider Poincaré-Reeb graphs in the source in the sense of Subsection 2.7, so that the graph is situated in the same plane as the connected real algebraic curve C : (f = 0).

The key idea of the proof is to choose appropriately a non-compact algebraic curve C : (g = 0), g ∈ R[x, y] such that when we take a neighboring level of the product of the two polynomials, say (f g = ε) for a sufficiently small ε > 0, we obtain the desired shape at infinity described by Case A, B or C. Note that the vertices of the Poincaré-Reeb graph are, by definition, transversal intersection points between the polar curve and the level curve. So a small deformation of the level curve will not change this property. Moreover, the neighboring curve must preserve the total preorder between the vertices of the tree. Since there are finitely many such vertices, we can choose ε small enough to ensure this condition holds. Let us give more details depending on the cases A, B or C. Case A. Our goal is to realize the tree from Case A. Namely, we want to add two new noncompact branches that are unbounded in the same direction (see Figure 26). In order to achieve this, we shall consider the graph (g = 0) of a parabola that is tangent to the curve (f = 0) in the rightmost vertex of G . Next, consider the real bivariate function f g : R 2 → R. The level curve (f g = 0) is the union of C and C . Finally, a neighboring curve (f g = ε) realizes the tree G, for ε = 0 sufficiently small. Case B. In Case B, the goal is to add two new non-compact branches, on opposite sides. First, note that in the presence of two such unbounded branches, the edges decorated by feathers (that is, those edges corresponding to the contraction of unbounded segments) form a linear graph L. The extremities of this linear subgraph are the arrowhead vertices of G which we replace by two circular vertices to define G . As before, by hypothesis we can consider a connected real algebraic plane curve C : (f = 0) that realizes the graph G . Consider a curve (g = 0), algebraic, homeomorphic to a line and situated just below the graph G . More precisely (g = 0) is situated in between the linear graph L of G and the lower part of (f = 0) (see Figures 29 and31). The connected component of the neighboring curve (f g = ε) for a sufficiently small ε = 0 will be the boundary of an algebraic domain that realizes the given tree G. Note that in the above construction there exist other connected components of (f g = ε), for instance in between the curves (f = 0) and (g = 0), but this is allowed by Definition 2.1: we considered the algebraic domain D given by ∂D = C, where C (f g = ε). Proof. The two graphs share the same non-arrowhead vertices. The local situation around a non-arrowhead vertex is in accordance to the trident rule, where an exterior vertex is replaced by an interior vertex and vice-versa (see Figure 35). We also extend this rule to arrowhead vertices.

G (f = 0) (g = 0) (f g = ε)

Figure 1 .

 1 Figure 1. A Poincaré-Reeb graph: a curve C bounding a real algebraic domain D (left); a Poincaré-Reeb graph in the source (center); the Poincaré-Reeb graph (right).

Definition 2 . 1 .

 21 An algebraic domain is a closed subset D of an affine plane, homeomorphic to a surface with boundary, whose boundary C is a disjoint union of finitely many smooth connected components of real algebraic plane curves. Example 2.2. Consider the algebraic curve C 1 of equation (f 1 (x, y) = 0) with f 1 (x, y) = y 2 -(x -1)(x -2)(x -3) and C 2 of equation (f 2 (x, y) = 0) with f 2 (x, y) = y 2 -x(x -4)(x -5). Each of these curves has two connected components, a compact one (an oval denoted by C i ) and a non-compact one. Let D be the ring surface bounded by C 1 and C 2 . By definition, it is an algebraic domain.

Figure 2 .

 2 Figure 2. The algebraic domain D bounded by C 1 and C 2 .

Figure 4 .

 4 Figure 4. One example of a domain of finite type (left). Two examples of domains that are not of finite type (center and right).

Figure 5 . 7 : 2 . 10 .( 1 )

 572101 Figure 5. Example of an exterior topological critical point P and an interior topological critical point Q of D.

Definition 2 . 13 .

 213 Let (P, π) be a vertical plane and D ⊂ P be a domain of finite type. The Poincaré-Reeb set of D is the quotient D := D/∼ D , seen as a subset of the D-collapse P of P in the sense of Definition 2.11. The Poincaré-Reeb set from Definition 2.13 has a canonical structure of graph embedded in the vertical plane ( P, π), a fact which may be proved similarly to [22, Theorem 4.6]. Let us explain first how to get the vertices and the edges of D. Definition 2.14. Let D be a domain of finite type in a vertical plane (P, π), and let C be its boundary. A vertex of the Poincaré-Reeb set D is an element of ρ D (Σ top (C)). A critical segment of D is a connected component of a fiber of π | D containing at least one element of Σ top (C). The bands of D are the closures of the connected components of the complement in D of the union of critical segments. An edge of D is the image ρ D (R) of a band R of D (see Figure 8).

Figure 8 .

 8 Figure 8. Construction of a Poincaré-Reeb set. There are three bands, delimited by four critical segments (three of them are reduced to points). The interior of each edge of the graph is drawn in the same color as the corresponding band.

Figure 9 .

 9 Figure 9. A critical segment containing two interior topological critical points.

Proposition 2 .

 2 16 allows to give the following definition: Definition 2.17. Let D be a domain of finite type in a vertical plane (P, π). Its Poincaré-Reeb graph is the Poincaré-Reeb set D seen as a transversal graph in the D-collapse ( P, π) of P in the sense of Definition 2.11, when one endows it with vertices and edges in the sense of Definition 2.14. The next result explains in which case the Poincaré-Reeb graph of a domain of finite type is generic in the sense of Definition 2.15: Proposition 2.18. Let D be a domain of finite type in a vertical plane (P, π). Denote by C its boundary. Then the Poincaré-Reeb graph D is a generic transversal graph in ( P, π) if and only if no two topological critical points of C lie on the same vertical line.Proof. This follows from Definition 2.15, Definition 2.9 and Proposition 2.10 (3). Vertices of valency 1 of the Poincaré-Reeb graph correspond to exterior topological critical points, whereas vertices of valency 3 correspond to interior topological critical points. This proposition motivates: Definition 2.19. A domain of finite type in a vertical plane is called generic if no two topological critical points of its boundary lie on the same vertical line.

  for an example). Next result implies that the Betti numbers of the domain and of its Poincaré-Reeb graph are the same: Proposition 2.24. Let D be a compact domain of finite type in a vertical plane. Then D and its Poincaré-Reeb graph D are homotopically equivalent. In particular they have the same number of connected components and the same Euler characteristic. Proof. Connected components. The collapsing map ρ D of Definition 2.11 being continuous, each connected component of D is sent by ρ D to a connected subset of D. Those subsets are compact, as images of compact sets by a continuous map. They are moreover pairwise disjoint, by Definition 2.11 of the vertical equivalence relation relative to D. Therefore, they are precisely the connected components of D, which shows that ρ D establishes a bijection between the connected components of D and D. Homotopy equivalence. We now may assume the D is connected. By definition, for any p ∈ D, ρ -1 D (p) is an interval, then the Vietoris-Begle theorem, as stated by Smale in [19], proves that ρ D : D → D induces an isomorphism for the corresponding homotopy groups. By the Whitehead theorem (see [9, Theorem 4.5]), we get a homotopy equivalence between D and D.

Proposition 2 .

 2 25. If D ⊂ (P, π) is (homeomorphic to) a disk, then the Poincaré-Reeb graph D of D is a tree.Proof. Proposition 2.24 implies that D is connected and that χ( D) = 1. But these two facts characterize the trees among the finite graphs.If the disk D ⊂ (P, π) is an algebraic domain in a vertical affine plane and the projection π is generic with respect to D in the sense of Definition 2.21, then Proposition 2.23 implies that the Poincaré-Reeb graph D is a complete binary tree: each vertex is either of valency 3 (we call it then interior) or of valency 1 (we call it then exterior).

Figure 10 . 2 . 7 .

 1027 Figure 10. The Poincaré-Reeb graph of a disk relative to a generic projection is a complete binary tree.

Figure 11 .

 11 Figure 11. Decomposition in bands and choices of paths.

Definition 2 .

 2 27. Let D be a domain of finite type in a vertical plane (P, π) with generic Poincaré-Reeb graph D. Then any section of (ρ D ) | D : D → D is called a Poincaré-Reeb graph in the source of D. By contrast, the graph D is called the Poincaré-Reeb graph in the target. Using the notion of vertical equivalence defined in Subsection 2.8 below, one may show that any Poincaré-Reeb graph D in the source and the Poincaré-Reeb graph D in the target are vertically isomorphic: D ≈ v D. As explained above, an advantage of the latter construction is that the Poincaré-Reeb graph in the source lives inside the same plane as the generic finite type domain D.

Figure 12 .ψ

 12 Figure 12. Two non-vertically equivalent real algebraic domains with the same permutation.

Figure 13 .

 13 Figure 13. Thickening in the neighborhood of an exterior vertex (left) and of an interior vertex (right).

Figure 14 .

 14 Figure 14. The two kinds of interior vertices (on the left) and of exterior vertices (on the right).

Proposition 3 . 1 .Figure 15 .

 3115 Figure 15. A generic compact transversal graph (left) and a local smooth realization (right).

Corollary 3 . 3 .

 33 Let f : R 2 → R be a continuous map and a, b ∈ R, a < b. For each ε > 0, there exists a polynomial p ∈ R[x, y] such that : ∀(x, y) ∈ [a, b] × [a, b] f (x, y) -p(x, y) < ε Proof. We apply Theorem 3.2 with X = [a, b] × [a, b], A = R[x, y]

Lemma 3 . 6 .

 36 Let us fix ε > 0. There exists a polynomial p ∈ R[x, y] such that, for all (x, y) ∈ [-M, M ] 2 : |p(x, y) -g(x, y)| (2M ) 3 ε, |∂ y p(x, y) -∂ y g(x, y)| (2M ) 2 ε,

Figure 18 .

 18 Figure 18. Existence of the curve (p = 0).

4. 2 .GFigure 20 .GFigure 21 .GFigure 22 .

 2202122 Figure 20. Case A.

Figure 23 .

 23 Figure 23. Cases A, B, C (from left to right). The filled region is the compact domain of finite type D := D ∩ K. A Poincaré-Reeb graph in the source is also displayed. The Poincaré-Reeb graph of D is obtained by replacing each circled vertex by an arrow.

Figure 24 .Figure 25 .

 2425 Figure 24. Adding two branches to an ellipse.

Figure 26 .

 26 Figure 26. Zoom on the construction for case A.

Example 4 . 8 .

 48 Here are the pictures of a graph G (Figure27) and its realization (Figure28).

Figure 27 .

 27 Figure 27. Graph G to be realized.

Figure 29 .

 29 Figure 29. Zoom on the construction for case B.

Example 4 . 9 .

 49 Here are the pictures of a graph G (Figure30) and its realization (Figure31).

Figure 30 .Figure 31 .

 3031 Figure 30. Graph G to be realized.

Case C . Figure 32 . 5 .Proposition 5 . 1 .--

 .32551 Figure 32. Construction that does not satisfy the desired conclusion.

Figure 33 .

 33 Figure 33. Ovals and lines and their Poincaré-Reeb graph.

5. 2 .

 2 Interior and exterior graphs of domains of weakly finite typeLet D be a generic domain of weakly finite type in a vertical plane (P, π). Then the closure D c of P \ D in P is again a domain of weakly finite type, as ∂D = ∂D c . We say that the Poincaré-Reeb graph G of D is the interior graph of D and that the Poincaré-Reeb graph G c of D c is the exterior graph of D.

Figure 34 .

 34 Figure 34. Interior and exterior graphs of a domain of weakly finite type. In the next proposition, Poincaré-Reeb graphs are to be considered in the sense of Definition 4.1, that is, as Poincaré-Reeb graphs in the source: Proposition 5.3. The interior graph G of a domain D of weakly finite type determines its exterior graph G c .

Figure 35 .

 35 Figure 35. The trident rule. Now we derive G c from G in two steps.First step: make a local construction of the beginning of the edges of G c according to the trident rule (see Figure36).

Figure 36 .

 36 Figure36. The trident rule applied at some vertices (here three vertices are completed).

  and the boundary C of D does not contain vertical lines and does not possess vertical asymptotes. Proof. Let us prove first the implication (2) ⇒ (1). It is enough to show that Σ top (C) is a finite set. The properness of π | D shows that C contains no vertical line. The set of topological critical points being included in the set Σ diff (C) of differentiable critical points of π| C , it is enough to prove that this last set is finite. Consider a connected component C i of C and its Zariski closure C

i in P. Let P π (C i ) be its polar curve relative to π (see

[START_REF] Sorea | The shapes of level curves of real polynomials near strict local minima[END_REF] Definition 2.43]

). It is again an algebraic curve in P, of degree smaller than the irreducible algebraic curve C i . Therefore, the set

C i ∩ P π (C i ) is finite, by Bézout's theorem. But this set contains C i ∩ Σ diff (C)

, which shows that π| C has a finite number of differentiable critical points on each connected component C i . As C has a finite number of such components, we get that Σ diff (C) is indeed finite. Let us prove now that (1) ⇒ (3). Since C ⊂ D, we have by the properness condition of Definition 2.7 (1) that C does not contain vertical lines. Moreover, if the boundary C of D possessed a vertical asymptote, then we would obtain a contradiction with Definition 2.7 (1). Finally, since π | D is proper, each of its fibers is compact. Finally we prove that (3) ⇒ (2). Since the boundary C of D does not contain vertical lines and does not possess vertical asymptotes, the restriction π| C is proper. Moreover, it has a finite number of differentiable critical points, as the above proof of this fact used only the absence of vertical lines among the connected components of C. We argue now similarly to our proof of Proposition 2.10 (3), by subdividing R using the points of the topological critical image Σ top (C). This set is finite, therefore R gets subdivided into finitely many closed intervals. Above each one of them, C consists of finitely many transversal arcs. If one fiber of π | D above such an interval

4 .

 4 Algebraic realization in the non-compact and connected case4.1. Domains of weakly finite type in vertical planesWe consider an algebraic domain D ⊆ R 2 in the sense of Definition 2.1, whose boundary C := ∂D is a connected but non-compact curve. This curve C is homeomorphic to a line and has two branches at infinity (the germs at infinity of the two connected components of C \ K, where K ⊂ C is a non-empty compact arc). Let us suppose that these branches are in generic position w.r.t. the vertical direction: none of them has a vertical asymptote. This leads us to Definition 4.1 below, which represents a generalization of the notion of domain of finite type (see Definition 2.7), since we only ask π | C : C → R to be proper, allowing π | D : D → R not to be so. In turn, the genericity notion is an analog of that introduced in Definition 2.19. Definition 4.1. Let (P, π) be a vertical plane. Let D ⊂ P be a closed subset homeomorphic to a surface with non-empty boundary. Denote by C its boundary. We say that D is a domain of weakly finite type in (P, π) if:(1) the restriction π| C : C → R is proper; (2) the topological critical set Σ top (C) is finite.Such a domain is called generic if no two topological critical points of C lie on the same vertical line. A Poincaré-Reeb graph of a generic domain of weakly finite type is one of its Poincaré-Reeb graphs in the source in the sense of Subsection 2.7.For instance, the closed upper half-plane H in (R 2 , x) is a generic domain of weakly finite type (for which Σ top (C) = ∅). Its Poincaré-Reeb graphs are the sections of the restriction x : H → R of the vertical projection.

Second step: complete each edge. It can be done in only one way up to vertical isotopies (see for instance Figure 37).