A bijection for essentially 4-connected toroidal triangulations

Transversal structures (also known as regular edge labelings) are combinatorial structures defined over 4-connected plane triangulations with quadrangular outer-face. They have been intensively studied and used for many applications (drawing algorithm, random generation, enumeration ...). In this paper we introduce and study a generalization of these objects for the toroidal case. Contrary to what happens in the plane, the set of toroidal transversal structures of a given toroidal triangulation is partitioned into several distributive lattices. We exhibit a subset of toroidal transversal structures, called balanced, and show that it forms a single distributive lattice. Then, using the minimal element of the lattice, we are able to enumerate bijectively essentially 4-connected toroidal triangulations.


Introduction
A graph embedded on a surface is called a map on this surface if all its faces are homeomorphic to open disks. Maps are considered up to homeomorphism. A map is a triangulation if all its faces have size three. Given a graph embedded on a surface, a contractible loop is an edge enclosing a region homeomorphic to an open disk. Two edges of an embedded graph are called homotopic multiple edges if they have the same extremities and their union encloses a region homeomorphic to an open disk. In this paper, we restrict ourselves to graphs embedded on surfaces that do not have contractible loops nor homotopic multiple edges. Note that this is a weaker assumption, than the graph being simple, i.e. not having loops nor multiple edges. In this paper we distinguish cycles from closed walk as cycles have no repeated vertices. A contractible cycle is a cycle enclosing a region homeomorphic to an open disk. A triangle (resp. quadrangle) of a map is a closed walk of length three (resp. four) that delimits on one side a region homeomorphic to an open disk. This region is called the interior of the triangle (resp. quadrangle). Note that a triangle is not necessarily a face of the map as its interior may be not empty. Note also that a triangle is not necessarily a cycle since non-contractible loops are allowed. A unicellular map is a map with only one face, which corresponds to the natural generalization of planar trees when going to higher genus, see [CMS09,Cha11].
In this paper we consider finite maps. We denote by n be the number of vertices and m the number of edges of a graph. Given a graph embedded on a surface, we use f for the number of faces. Euler's formula says that any map on an orientable surface of genus g satisfies n − m + f = 2 − 2g. In particular, the plane is the surface of genus 0, the torus the surface of genus 1, the double torus the surface of genus 2, etc. By Euler's formula, a toroidal triangulation with n vertices has exactly 3n edges and 2n faces.
The universal cover of the torus is a surjective mapping p from the plane to the torus that is locally a homeomorphism. If the torus is represented by a hexagon (or parallelogram) in the plane whose opposite sides are pairwise identified, then the universal cover of the torus is obtained by replicating the hexagon (or parallelogram) to tile the plane.
A graph is k-connected if it has at least k + 1 vertices and if it stays connected after removing any k − 1 vertices. Extending the notion of essentially 2-connectedness defined in [MR98], we say that a toroidal map G is essentially k-connected if its universal cover G ∞ is k-connected (note that this is different from G being k-connected). This paper is focused on the study of essentially 4-connected toroidal triangulations via generalizing transversal structures to the toroidal case.
Transversal structures are originally defined on 4-connected planar triangulations with four vertices on the outer face. They have been introduced by Kant et He [KH97] (under the name regular edge labelings) for graph drawing applications of planar maps [KH97,Fus09]. Deep combinatorial properties of these objects have been studied later by Fusy [Fus09] with numerous other applications like encoding, enumeration, random generation, etc. Indeed, in the planar case, transversal structures are strongly related to a more general object called α-orientations by Felsner [Fel04]. Consider a graph G, with vertex set V , and a function α : V → N. An orientation of G is an α-orientation if, for every vertex v ∈ V , its outdegree d + (v) equals α(v). For a fix planar map G and function α, the set of α-orientations of G carries a structure of distributive lattice (see [Fel04] and older related results [Pro93,dM94]) In the planar case, there is a bijection between transversal structure of a planar map and 4-orientations of the corresponding angle map. Thus the set of transversal structures of a given planar map also carries a structure of distributive lattice whose minimal element plays a crucial role for bijection purpose.
In the toroidal case, things are more complicated since the bijection of transversal structures with 4-orientations is not valid anymore. Moreover the set of α-orientations of a given toroidal map is now partitioned into several distributive lattices (see [Pro93,GKL16]) contrarily to the planar case where there is only one lattice and thus only one minimal element. Similar issues appear in the study of Schnyder woods and corresponding 3-orientations of toroidal triangulations. In a series of papers [GL14,GKL16,DGL17] (see also the HDR manuscript of the second author [Lév17] which present these three papers in a unified way), these problems are solved by highlighting a particular global property, called "balanced" in [Lév17], that a 3-orientation may have.
By following the same guidelines here, we are able to identify, in Section 2, a similar "balanced" property for 4-orientations of the angle map. These so-called balanced 4-orientations form the core object of study of this paper. Whereas not all 4-orientations corresponds to transversal structures, we show in Section 3 that all balanced ones correspond to transversal structures. The existence of balanced objects for essentially 4-connected toroidal triangulations is proved in Section 4 by edge contraction. The set of 4-orientations of the angle map of a given essentially 4-connected toroidal triangulation is partitioned into distributive lattices but all the balanced 4-orientations are contained in the same lattice, as shown in Section 5. The minimal element of this "balanced lattice" as some important properties that are used in Section 6 to obtain a bijection between essentially 4-connected toroidal triangulations and some toroidal unicellular maps. Then this bijection is used in Section 7 to enumerate essentially 4-connected toroidal triangulations.
2 Angle map, transversal structure, balanced property and universal cover 2.1 Angle map and balanced 4-orientations Consider a toroidal triangulation G. The angle map A(G) of G is the bipartite map obtained from a simultaneous embedding of vertices of G and G * such that vertices of G * are embedded inside faces of G and vice-versa, and for each angle of a vertex v incident to a face v * there is an edge between v and v * . Hence, A(G) is a bipartite map with one part consisting of primal-vertices and the other part consisting of dual-vertices. Each dual-vertex has degree three and each face of A(G) is a quadrangle that consists of two primal-vertices and two dual-vertices. Figure 1 gives an example of a toroidal triangulation and its angle map, primal-vertices are black and dual-vertices are white (this serves as a convention for the entire paper). An orientation of the edges of A(G) is called a 4-orientation if every primal-vertex has outdegree exactly 4 and every dual-vertex has outdegree exactly 1. Euler's formula says that for a toroidal triangulation we have 2n = f , so the number of edges of the angle map is 3f = 4n + f . Thus Euler's formula is "compatible" with existence of 4-orientations for angle maps of toroidal triangulations (4n outgoing edges for primal-vertices and f outgoing edges for dual-vertices. Consider an orientation of the edges of A(G) and a cycle C of G together with a direction of traversal. We define γ(C) by: γ(C) = # edges of A(G) leaving C on its right − # edges of A(G) leaving C on its left.
Then we can define balanced orientations: Definition 1 (Balanced 4-orientation) A 4-orientation of A(G) is balanced if every non-contractible cycle C of G satisfies γ(C) = 0. check that γ = 0 for any non-contractible cycle (note that we prove latter that it suffices to check that γ equals 0 for a vertical cycle and a horizontal cycle to be balanced, see Lemma 14).
Balanced 4-orientations are the main ingredient of this paper. Among all, we show that an essentially 4-connected toroidal triangulation admits a balanced 4-orientation of its angle map, and we exhibit the structure of distributive lattice of the set of all these balanced orientations.
In the next section we show how 4-orientations are related to transversal structures.

Balanced transversal structures
Transversal structures have been defined originally in the planar case (see [KH97,Fus09]) and we propose the following generalization to the toroidal case. First we define the following local rule: Definition 2 (Transversal structure local property) Given a map G, a vertex v and an orientation and coloring of the edges incident to v with the colors blue and red, we say that v satisfies the transversal structure local property (or local property for short) if the edges around v form in counterclockwise order a non-empty interval of outgoing edges of color blue, a non-empty interval of outgoing edges of color red, a non-empty interval of incoming edges of color blue, a non-empty interval of incoming edges of color red (see Figure 3).
Then the definition of toroidal transversal structure is the following: Definition 3 (Toroidal transversal structure) Given a toroidal map G, a toroidal transversal structure of G is an orientation and coloring of the edges of G with the colors blue and red where every vertex satisfies the transversal structure local property.
See Figure 4 for an example of a toroidal transversal structure of the triangulation of Figure 1.  From a toroidal transversal structure of a toroidal triangulation G, one can deduce a 4orientation of its angle map A(G) by the following rule applied around each primal-vertex (see Figure 5): an edge e of A(G) is oriented toward its primal-vertex if the two primal edges around e share the same color otherwise e is oriented toward its dual-vertex. The fact that primal-vertices of A(G) gets outdegree 4 is clear by the definition of transversal structure. The fact that dual-vertices gets outdegree 1 is due to the property that, by the local rule, all (triangular) faces of G looks like one of Figure 6 where the four cases are symmetric by rotation of the order (outgoing blue, outgoing red, incoming blue, incoming red).
The 4-orientation on the right of Figure 2 is the one obtained from Figure 4 by the rule of Figure 5.
In the plane, there is a bijection between transversal structures of a map and 4-orientations of its angle map (see [Fus09]). This is not true in the toroidal case. For example, there is no transversal structure associated to the (non-balanced) 4-orientation of the left of Figure 2.
Like it has been done in [GKL16,Theorems 3.7] (see also [Lév17,Section 4.2]) for toroidal Schnyder woods, it is possible to characterize which 4-orientations of the angle map of a toroidal triangulation corresponds a transversal structure. This is done in Section 3. A consequence of such a characterization (see Corollary 1) is that if a 4-orientation is balanced, then it corresponds to a transversal structure.  So the balanced property is a sufficient condition to corresponds to a transversal structure. Note that it is not a necessary condition. Figure 7 gives an example of a transversal structure of a toroidal triangulation whose corresponding 4-orientation of its angle map is not balanced. The horizontal cycle (with direction of traversal from right to left) has γ = 8. Note also that in the plane, transversal structures can be defined by omitting the orientation of the edges in the local property since there is a bijection with 4-orientations of the angle map. Again, this is not the case in the torus. Figure 8 gives an example of a blue/red coloring of the edges of a toroidal triangulation satisfying the local rule of transversal structure, without the orientation of the edges. It is not possible to orient the edges so this coloring becomes a toroidal transversal structure. The corresponding orientation of the angle map is still a 4-orientation. Note that by gluing two copies of this example, one obtains Figure 7 that becomes orientable. Figure 8: Example of a blue/red coloring of the edges of a toroidal triangulation satisfying the local rule of transversal structure, without the orientation of the edges, and that is not a transversal structure.
We give the following definition of balanced for toroidal transversal structure: Definition 4 (Balanced toroidal transversal structure) A toroidal transversal structure is balanced if its corresponding 4-orientation of angle map is balanced. Figure 4 gives an example of a balanced toroidal transversal structure. The corresponding 4-orientation of the angle map is the balanced 4-orientation of the right of Figure 2.
In section 4 we prove the existence of balanced toroidal transversal structure for essentially 4-connected toroidal triangulations. This implies the existence of balanced 4-orientations for their angle maps.

Transversal structures in the universal cover
Consider a toroidal map G and its universal cover G ∞ . Note that G does not have contractible loops nor homotopic multiple edges if and only if G ∞ is simple.
We need the following lemma from [GKL16]: Suppose that for a finite set of vertices X of G ∞ , the graph G ∞ \ X is not connected. Then G ∞ \ X has a finite connected component.
Suppose now that G is a toroidal triangulation given with a transversal structure. Consider the natural extension of the transversal structure of G to G ∞ , where an edge of G ∞ receive the orientation and color of the corresponding edge in G. Let G ∞ B , G ∞ R be the directed subgraphs of G ∞ induced by the edges of color blue and red, respectively. The graphs (G ∞ B ) −1 and (G ∞ R ) −1 are the graphs obtained from G ∞ B and G ∞ R by reversing all their edges. Similarly to what happens for Schnyder woods (see [Lév17, Lemma 6]) we have the following property: Proof. Let us prove the property for containing the minimum number of faces in the finite map D with border C. Suppose without loss of generality that C turns around D counterclockwisely. By the transversal structure local property, every vertex of D has at least one outgoing edge of color red in D.
So there is a cycle of color red in D and this cycle is C by minimality of C. Every vertex of D has at least one incoming edge of color blue in D. So, again by minimality of C, the cycle C is a cycle of color blue. This contradicts the fact that edges of G ∞ have a unique color.
For a vertex v of G ∞ , we define P 0 (v) (resp. P 1 (v), P 2 (v), P 3 (v)) the subgraph of G ∞ obtained by keeping all the edges that are on an oriented path of Then we have the following lemma: Lemma 3 For every vertex v and i, j ∈ {0, 1, 2, 3}, i = j, the two subgraphs P i (v) and P j (v) of G ∞ have v as only common vertex.
Now we can prove that the existence of a transversal structure for a toroidal triangulation implies the 4-connectedness of its universal cover: Lemma 4 If a toroidal triangulation admits a toroidal transversal structure, then it is essentially 4-connected.
Proof. Suppose by contradiction that there exists three vertices x, y, z of G ∞ such that G = G ∞ \ {x, y, z} is not connected. Then, by Lemma 1, the graph G has a finite connected component R. Let v be a vertex of R. By Lemma 2, for i ∈ {0, 1, 2, 3}, the infinite and acyclic graph P i (v) does not lie in R so it intersects one of x, y, z. So for two distinct i, j, the two graphs P i (v) and P j (v) intersect on a vertex distinct from v, a contradiction to Lemma 3.
In Section 4, we prove the converse of Lemma 4 (see Theorem 2). A separating triangle of a map is a triangle whose interior is non empty. We have the following equivalence: Lemma 5 A toroidal triangulation is essentially 4-connected if and only if its universal cover has no separating triangle.
Proof. (=⇒) Consider an essentially 4-connected toroidal triangulation G. So G ∞ is 4connected. If G ∞ has a separating triangle, then, the three vertices of the triangle form a contradiction to the 4-connectedness of G ∞ . So G ∞ has no separating triangle.
(⇐=) Consider a toroidal triangulation G such that G ∞ has no separating triangle. Suppose by contradiction that G ∞ is not 4-connected. Then there exists a set of 3 vertices X = {x, y, z} such that G ∞ \ X is not connected. By Lemma 1, the graph G ∞ \ X has a finite connected component R. Let F be the face of G ∞ \ R containing R. If F has length 1 or 2 then G ∞ is not simple, a contradiction. If F has size 3, then F is a separating triangle of G ∞ , a contradiction. So F has size at least 4. Then there exists a vertex v in F \ X. There is no edges between v and R and thus in G ∞ the face incident to v and R has length strictly more than 3, a contradiction of G being a triangulation.

8
We say that a quadrangle is maximal (by inclusion) if its interior is not strictly contained in the interior of another quadrangle.
Lemma 6 Consider an essentially 4-connected toroidal triangulation G and an edge e of G. Then there is a unique maximal quadrangle of G whose interior contains e.
Proof. Since G is a toroidal triangulation, e is clearly contained in the interior of the quadrangle bordering its two incident faces. So e is contained in a maximal quadrangle.
Suppose by contradiction that there exist two distinct maximal quadrangles Q, Q such that their interiors contain e. Let R, R denote the interior of Q, Q respectively. The two region R, R are distinct, both contain the two faces incident to e plus some other faces. If there is an edge in R (resp. R ) connecting two opposite vertices of Q (resp. Q ), then G ∞ contains a separating triangle, a contradiction of G being essentially 4-connected and Lemma 5. Then since there is no homotopic multiple edges in G, there is at least one or two vertices of Q (resp Q ) in the interior of Q (resp. Q). Thus the border of the union of R and R has size less or equal to four, a contradiction to the maximality of Q, Q or of G being an essentially 4-connected triangulation.
3 Characterization of orientations corresponding to transversal structures

Transversal structure labeling
We need the following equivalent definition of toroidal transversal structures: Definition 5 (Toroidal transversal structure labeling) Given a toroidal map G, a toroidal transversal structure labeling (or TTS-labeling for short) of G is a labeling of the half-edges of G with integers 0, 1, 2, 3 (considered modulo 4) such that each edge is labeled with two integers that differ exactly by (2 mod 4) and around each vertex the labeling form in counterclockwise order four non-empty intervals of 0, 1, 2, 3.
Consider a toroidal map G. The mapping of Figure 9, where an outgoing half-edge blue is labeled 0, an outgoing half-edge red is labeled 1, an incoming half-edge blue is labeled 2, and an incoming half-edge red is labeled 3, shows how to see a toroidal transversal structure of G as a TTS-labeling of G and vice-versa. The two objects are indeed the same.    Figure 4. This labeling is also represented on the corresponding orientation of its angle map.
We say that a 4-orientation of A(G) admits a TTS-labeling if there is a labeling of the angles of the primal-vertices of A(G) such that this labeling corresponds to a transversal structure of G (as on Figure 10). The goal of this section is to characterize which are the 4-orientations that admit TTSlabelings. For that purpose we have to introduce some more formalism, similarly to what is done for Schnyder woods (see [GKL16,Lév17]).

A bit of homology
We need a bit of surface homology of general maps which we discuss now.
Consider a map G = (V, E), on an orientable surface of genus g, given with an arbitrary orientation of its edges. This fixed arbitrary orientation is implicit in all the paper and is used to handle flows. A flow φ on G is a vector in Z E . For any e ∈ E, we denote by φ e the coordinate e of φ.
A walk W of G is a sequence of edges with a direction of traversal such that the ending point of an edge is the starting point of the next edge. A walk is closed if the start and end vertices coincide. A walk has a characteristic flow φ(W ) defined by: This definition naturally extends to sets of walks. From now on we consider that a set of walks and its characteristic flow are the same object and by abuse of notation we can write W instead of φ(W ). We do the same for oriented subgraphs, i.e., subgraphs that can be seen as a set of walks of unit length.
A facial walk is a closed walk bounding a face. Let F be the set of counterclockwise facial walks and let F = <φ(F)> be the subgroup of Z E generated by F. Two flows φ, φ are homologous if φ − φ ∈ F. They are weakly homologous if φ − φ ∈ F or φ + φ ∈ F. We say that a flow φ is 0-homologous if it is homologous to the zero flow, i.e. φ ∈ F.
Let W be the set of closed walks and let W = <φ(W)> be the subgroup of Z E generated by W. The group H(G) = W/F is the first homology group of G. It is well-known that H(G) only depends on the genus of the map, and actually it is isomorphic to Z 2g .
A set {B 1 , . . . , B 2g } of (closed) walks of G is said to be a basis for the homology if the equivalence classes of their characteristic vectors ([φ(B 1 )], . . . , [φ(B 2g )]) generate H(G). Then for any closed walk W of G, we have W = F ∈F λ F F + 1≤i≤2g µ i B i for some λ ∈ Z F , µ ∈ Z 2g . Moreover one of the λ F can be set to zero (and then all the other coefficients are unique).
For any map, there exists a set of cycles that forms a basis for the homology and it is computationally easy to build. A possible way to do this is by considering a spanning tree T of G, and a spanning tree T * of G * that contains no edges dual to T . By Euler's formula, there are exactly 2g edges in G that are not in T nor dual to edges of T * . Each of these 2g edges forms a unique cycle with T . It is not hard to see that this set of cycles, given with any direction of traversal, forms a basis for the homology. Moreover, note that the intersection of any pair of these cycles is either a single vertex or a common path.
The edges of the dual map G * of G are oriented such that the dual e * of an edge e of G goes from the face on the right of e to the face on the left of e. Let F * be the set of counterclockwise facial walks of G * . Consider {B * 1 , . . . , B * 2g } a set of closed walks of G * that form a basis for the homology. Let p and d be flows of G and G * , respectively. We define the following: Note that β is a bilinear function. We need the following lemma from [GKL16]: Lemma 7 ([GKL16, Lemma 3.1]) Given two flows φ, φ of G, the following properties are equivalent to each other: 1. The two flows φ, φ are homologous.

The angle-dual-completion
Consider a toroidal triangulation G. The angle-dual-completion A(G) of G is the map obtained from simultaneously embedding A(G) and G * and subdividing each edge of G * by adding a vertex at its intersection with the corresponding primal-edge of G (see Figure 11). In A(G) there are three types of vertices called primal-, dual-and edge-vertices, represented, respectively, in black, white, and gray on the figures. There are two types of edges called angle-and dual-edges. Each angle-edge is between a primal-and dual-vertex. Each dualedge is between a dual-and an edge-vertex. Since G is a triangulation, each dual-vertex is incident to three angle-edges and three dual-edges. Each edge-vertex is incident to two dual-edges. Each face of A(G) represents a half-edge of G and is a quadrangle incident to one primal-vertex, two dual-vertices and one edge-vertex. Given an orientation of the angle map A(G), this orientation naturally extends to an orientation of the angle-dual-completion A(G) where angle-edges get the orientation they have in A(G) and dual-edges are oriented from the edge-vertex to the dual-vertex. A 4orientation of A(G) is an orientation of its edges that corresponds to a 4-orientation of A(G), i.e. primal-vertices have outdegree exactly 4, dual-vertices have out-degree exactly 1 and edge-vertices have outdegree exactly 2.
A TTS-labeling of G can be represented on A(G) by putting labels into faces of A(G) (see Figure 11). When crossing an angle-edge that is incoming for a primal-vertex, the label does not change. When crossing an angle-edge that is outgoing for a primal-vertex, the label changes by ±1 depending on the orientation of this angle-edge: from left to right (+1 mod 4) or right to left (−1 mod 4). When crossing a dual-edge the label changes by ±2, and the orientation is not relevant since −2 mod 4 = +2 mod 4. More intuitively, if W is a walk of A(G) * , then: #out-edges crossing W from left to right −#out-edges crossing W from right to left + 2 × #dual-edges crossing W from left to right − 2 × #dual-edges crossing W from right to left The bilinearity of β implies the linearity of δ. The following lemma gives a necessary and sufficient condition for a 4-orientation of the angle map to admit a TTS-labeling.  of the two faces incident to an edge-vertex differ by (2 mod 4). So the obtained labeling corresponds to a TTS-labeling of G.
In the next section we study properties of δ w.r.t. homology in order to simplify the condition of Lemma 8 that concerns any closed walk of A(G) * . We also replace the condition on δ to a condition on γ that is simpler to handle.

Characterization theorem
Consider a toroidal triangulation G. Let F * be the set of counterclockwise facial walks of the angle-dual-completion A(G) * .
We have the following lemmas: Lemma 9 In a 4-orientation of A(G), any F ∈ F * satisfies δ(F ) = 0 mod 4.
Proof. If F corresponds to a primal-vertex v of A(G), then v has outdegree exactly 4. So δ(F ) = 4 = 0 mod 4.
If F corresponds to a dual-vertex v of A(G), then v is incident to three angle-edges, exactly two of which are incoming (and thus in Out), and incident to three incoming dual-edges. So If F corresponds to an edge-vertex v of A(G), then v is incident to two outgoing dual-edges. So δ(F ) = 2 × 2 = 4 = 0 mod 4.
Lemma 10 In a 4-orientation of A(G), if {B 1 , B 2 } is a pair of cycles of A(G) * , given with a direction of traversal, that forms a basis for the homology, then for any closed walk W of A(G) * homologous to µ 1 B 1 + µ 2 B 2 , µ ∈ Z 2 we have δ(W ) = µ 1 δ(B 1 ) + µ 2 δ(B 2 ) mod 4.
Lemma 10 can be used to simplify the condition of Lemma 8 and show that if {B 1 , B 2 } is a pair of cycles of A(G) * that forms a basis for the homology, then a 4-orientation of A(G) admits a TTS-labeling if and only if δ(B i ) = 0 mod 4, for i ∈ {1, 2}. We prefer to formulate such a result with function γ that is simpler to handle (see Theorem 1).
Let C be a cycle of G with a direction of traversal. Let W L (C) be the closed walk of . Similarly, let W R (C) be the cycle of A(G) * just on the right of C and going in the same direction as C.
Lemma 11 Consider a 4-orientation of A(G) and a cycle C of G, then we have: Proof. Let x R (resp. x L ) be the number of edges of A(G) leaving C on its right (resp. left). So γ(C) = x R − x L . Let k be the number of vertices of C. Since we are considering a 4-orientation of A(G), we have x R + x L = 4k. Moreover, an edge of A(G) leaving C on its right (resp. left) is counting +1 (resp. −1) for δ(W R (C)) (resp. δ(W L (C))). For each edge of C there is a corresponding edge-vertex in A(G), that is incident to two dual-edges of A(G), one that is crossing δ(W L (C)) from right to left, counting −2, and one crossing δ(W R (C)) from left to right, counting +2. So δ(W L (C)) = −2k − x L and δ(W R (C)) = 2k + x R .
Finally, we have the following theorem which characterizes the 4-orientations that admit TTS-labelings: Theorem 1 Consider a toroidal triangulation G. Let {B 1 , B 2 } be a pair of cycles of G, given with a direction of traversal, that forms a basis for the homology. The 4-orientation of the toroidal triangulation on the left of Figure 2 is an example where some non-contractible cycles have value γ not equal to 0 mod 8. The vertical loop of the triangulation, with upward direction of traversal, has γ = 2. Thus by Theorem 1, this orientation does not correspond to a transversal structure. Whereas, on the right example, one can check that γ = 0 for a vertical cycle and a horizontal one, thus this orientation corresponds to a transversal structure (represented on Figure 4).
A consequence of Theorem 1 is that any balanced 4-orientation of the angle graph A(G) of a toroidal triangulation G admits a TTS-labeling and thus is the 4-orientation corresponding to a transversal structure of G.
Corollary 1 Any balanced 4-orientation of A(G) is the 4-orientation corresponding to a (balanced) transversal structure of G.
Note again that there are transversal structures whose corresponding 4-orientations are not balanced, thus for which γ = 0 mod 8 for every non-contractible cycles, but not exactly 0 for some of them. Such an example is given on Figure 7.

Existence of balanced transversal structures
In this section we prove existence of balanced transversal structures for essentially 4-connected triangulations by contracting edges until we obtain a triangulation with just one vertex. This is done by preserving the property that the triangulation is essentially 4-connected. The toroidal triangulation on one vertex is represented on Figure 12 with a balanced transversal structure and the corresponding angle map. Then the graph can be decontracted step by step to obtain a balanced transversal structures of the original triangulation.

Contraction preserving "essentially 4-connected"
Given a toroidal triangulation G, the contraction of a non-loop-edge e of G is the operation consisting of continuously contracting e until merging its two ends. We note G/e the obtained map. On Figure 13 the contraction of an edge e is represented. Note that only one edge of each multiple edges that is created is preserved (edge e wx and e wy on the figure). Note that the contraction operation is also defined when some vertices are identified: x = u and y = v (the case represented on Figure 14), or x = v and y = u (corresponding to the symmetric case with a diagonal in the other direction).
In [Moh96] it is proved that in a toroidal triangulation (with no contractible loop nor homotopic multiple edges) with at least two vertices, one can find an edge whose contraction preserves the fact that the map is a toroidal triangulation (with no contractible loop nor homotopic multiple edges). Here we also need to show that we can preserve the fact of being essentially 4-connected during contraction. We say that a non-loop edge e of an essentially 4connected toroidal triangulation G is contractible if G/e is an essentially 4-connected toroidal triangulation. We have the following lemma: Lemma 12 An essentially 4-connected toroidal triangulation with at least two vertices has a contractible edge. Proof. For k ≥ 3, a separating k-walk is a closed walk of size k that delimits on one side a region homeomorphic to an open disk containing at least one vertex. This region is called the interior of the separating k-walk. A separating 3-walk is a separating triangle and we call a separating 4-walk a separating quadrangle. Let G be an essentially 4-connected toroidal triangulation with at least two vertices. By Lemma 5, the map G has no contractible loop, no homotopic multiple edges and no separating triangle. Consider a non-loop edge e of G. The contracted graph G/e is an essentially 4connected toroidal triangulation if and only if G/e has no contractible loop, no homotopic multiple edges and no separating triangle.
Since G has no homotopic multiple edges, the contraction of e cannot create a contractible loop. Since G has no separating triangle, the only way to create a pair of homotopic multiple edges in G/e is if e appears twice on a separating quadrangle such that each extremity of e is incident to a non-contractible loop as depicted on Figure 15.a (where the dashed region represents the interior of the separating quadrangle). There are two ways to create a separating triangle in G/e: either e appears once on a separating quadrangle as depicted on Figure 15.b, where some vertices may be identified but not edges, or e appears twice on a separating 5-walk such that one extremity of e is incident to a non-contractible loop and the other extremity is incident to edges distinct from e forming a non-contractible cycle of size two as depicted on Figure 15.c.
We consider two cases whether there are separating quadrangles in G or not.
• G has some separating quadrangles: An inner chord of a separating quadrangle Q is an edge between its vertices that lie in the interior of the separating quadrangle. We claim that a separating quadrangle Q of G has no inner chord. Suppose by contradiction that such a chord exists. Since there is no pair of homotopic multiple edges, this chord is between "opposite" vertices of Q. Thus it partitions the interior of Q into two triangles. These two triangles are not separating by assumption on G and thus the quadrangle Q is not separating either, a contradiction.
Let Q be a maximal separating quadrangle. Suppose by contradiction that there exists a separating quadrangle Q of G distinct from Q whose interior R intersects R and is not included in R. By maximality of Q, we also have R is not included in R . As observed previously, Q and Q have no inner chord. So there is at least one or two vertices of Q (resp Q ) in the interior of Q (resp. Q). Thus the border of the union of R and R has size less or equal to four, a contradiction to the maximality of Q or of G being an essentially 4-connected triangulation. So a separating quadrangle of G whose interior intersects R has its interior included in R.
Let G be the map obtained from G by keeping all the vertices and edges in R, including Q. The vertices and edges appearing several times on Q are duplicated so G is a planar map. Then G is a 4-connected planar map in which every inner face is a triangle and the outer face is a quadrangle. Let a, b, c, d denote the outer vertices of G in counterclockwise order. We denote also a, b, c, d the corresponding vertices of G. Note that in G some of these vertices might be identified. We consider two cases, whether, in G , there exists an inner vertex incident to at least three outer vertices or not.
-In G , there exists an inner vertex v that is incident to at least three outer vertices: W.l.o.g., we may assume that v is incident to a, b, c in G with edges e a , e b , e c respectively. We prove that e b is contractible in G. Suppose by contradiction that e b belongs to a separating quadrangle Q of G. Then Q is distinct from Q and its interior R of Q intersects R. Thus by the above remark, R is included in R. Then Q has an inner chord e a or e c , a contradiction.
Suppose that e b appears twice on a separating 5-walk W as depicted on Figure 15.c. Then, one of the extremity of e b is incident to a non-contractible loop of W and this extremity cannot lie inside R so it is b. So v is incident to two edges e 1 , e 2 , distinct from e b , so that the 5-walk W is the sequence of edges , e b , e 1 , e 2 , e b . Then, in G , the edges e 1 , e 2 are incident to two distinct vertices of {a, c, d} that are identified in G so that e 1 , e 2 form a non-contractible cycle of size two of G. Suppose, by contradiction, that e 1 , e 2 are incident to "consecutive" vertices of Q, then w.l.o.g., we can assume that e 1 , e 2 are incident to a and d that are identified in G. If b, c are also identified in G, then we are in the situation of Figure 16.a, with W represented in magenta. Then, the interior of the separating 5-walk W is partitioned into triangles whose interiors are empty since G is essentially 4connected. So the interior of the separating 5-walk W contains no vertices, a contradiction. If b, c are not identified, then we are in the situation of Figure 16.b. Then the two loops of the figure plus e form a quadrangle whose interior strictly contains the interior of Q, a contradiction to the maximality of Q. So, e 1 , e 2 are incident to "opposite" vertices of Q. These two vertices are a and c and they are identified in G. Then we are in the situation of Figure 16.c . Then, the interior of the separating 5-walk W is partitioned into triangles whose interior are empty since G is essentially 4-connected. So the interior of the separating 5-walk W contains no vertices, a contradiction.
To conclude, e b does not belong to a separating quadrangle, nor appears twice on a separating 5-walk, so e b is contractible in G. -In G , all inner vertices are incident to at most two outer vertices: Kant and He proved [KH97, Lemma 3.1] that G contains an internal edge e such that G /e is 4-connected. Let us show e is contractible in G. Suppose by contradiction that e belongs to a separating quadrangle Q of G. Then the interior R of Q intersects R and thus is included in R by above remark. But then G /e is not 4-connected, a contradiction. Suppose by contradiction that e appears twice on a separating 5-walk as depicted on Figure 15.c. Then, in G, one extremity u of e is incident to a non-contractible loop and the other extremity v of e is incident to two edges e 1 , e 2 , distinct from e , forming a non-contractible cycle of size two. Thus u is not an inner vertex of G and the two extremities of e 1 , e 2 also. So v is incident to three outer vertices of G , a contradiction. To conclude, e does not belong to a separating quadrangle, nor appears twice on a separating 5-walk, so e is contractible in G.
• G has no separating quadrangle: Consider a non-loop edge e of G. If e is contractible we are done, so we can assume that e is not contractible. Then, since there is no separating quadrangle, we have e that appears twice on a separating 5-walk W as depicted on Figure 15.c. More precisely, one extremity u of e is incident to a non-contractible loop and the other extremity v of e is incident to two edges e 1 , e 2 , distinct from e, forming a non-contractible cycle of size two of G. Let R be the interior of the separating 5-walk W . We consider two cases whether v has some neighbors in the strict interior of R or not.
Suppose by contradiction that v has no neighbors in the strict interior of R. Then either v has some incident edges inside R or not. Suppose first that v has some incident edges inside R. Then, since v has no neighbors in the strict interior of R, we have that v is incident to u with an edge in the strict interior of R, as depicted on Figure 17.a. Then since there is no separating triangle, nor separating quadrangle, the region R contains no vertices, a contradiction. Suppose now that v has no incident edge inside R. Then, Since G is a triangulation, vertex u must be incident twice to the third vertex w of the 5-walk w, as depicted on Figure 17.b. Again since there is no separating triangle, the region R contains no vertices, a contradiction.
So v has a neighbor x in the strict interior of R. Let e be the edge between v, x. If e appears twice on a separating 5-walk W , then x is incident twice to u to form a noncontractible cycle of size two and v is incident to a non-contractible loop , as depicted on Figure 17.c. Then e, , forms a separating quadrangle, a contradiction. So e is contractible.

Balanced properties and homology
In Section 3, we have proved some properties of γ (or δ) w.r.t. homology. The obtained equalities where conditioned by a "modulo". In next lemma we prove some properties of γ w.r.t. a basis for the homology with exact equality to obtain a simple condition to prove that a 4-orientation is balanced (see Lemma 14).
Consider an essentially 4-connected toroidal triangulation G and its angle map A(G).
Lemma 13 Consider a 4-orientation of A(G), a non-contractible cycle C of G, given with a direction of traversal, and a basis for the homology {B 1 , B 2 } of G, such that B 1 , B 2 are noncontractible cycles whose intersection is a single vertex or a common path. If C is homologous to Proof. Let v be a vertex in the intersection of B 1 , B 2 such that, if this intersection is a common path, then v is one of the extremities of this path and let u be the other extremity. Consider a drawing of G ∞ obtained by replicating a flat representation of G to tile the plane.
Let v 0 be a copy of v in G ∞ . Consider the walk W starting from v 0 and following k 1 times the edges corresponding to B 1 and then k 2 times the edges corresponding to B 2 (we are going backward if k i is negative). This walk ends at a copy v 1 of v. Since C is non-contractible we have k 1 or k 2 not equal to 0 and thus v 1 is distinct from v 0 . Let W ∞ be the infinite walk obtained by replicating W (forward and backward) from v 0 . Note that there might be some repetition of vertices in W ∞ if the intersection of B 1 , B 2 is a path. But in that case, by the choice of B 1 , B 2 (i.e. whose intersection is a single vertex or a common path), we have that W ∞ is almost a path, except maybe at all the transitions from "k 1 B 1 " to "k 2 B 2 ", or at all the transitions from "k 2 B 2 " to "k 1 B 1 ", where it can go back and forth a path corresponding to the intersection of B 1 and B 2 . The existence or not of such "back and forth" parts depends on the signs of k 1 , k 2 and the way B 1 , B 2 are going through their common path. Figure 19 gives an example of this construction with (k 1 , k 2 ) = (1, 1) and (k 1 , k 2 ) = (1, −1) when B 1 , B 2 intersects on a path and are oriented the same way along this path as on Figure 18. We "simplify" W ∞ by removing all the parts that consists of going back and forth along a path (if any) and call B ∞ the obtained walk that is now without repetition of vertices. By the choice of v, we have that B ∞ goes through copies of v. If v 0 , v 1 are no more a vertex along B ∞ , because of a simplification at the transition from "k 2 B 2 " to "k 1 B 1 ", then we replace v 0 and v 1 by the next copies of v along W ∞ , i.e. at the transition from "k 1 B 1 " to "k 2 B 2 ".
Since C is homologous to k 1 B 1 +k 2 B 2 , we can find an infinite path C ∞ , that corresponds to copies of C replicated, that does not intersect B ∞ and situated on the right side of B ∞ . Now  (k 1 , k 2 ) = (1, 1) (k 1 , k 2 ) = (1, −1) Figure 19: Replicating "k 1 B 1 " and "k 2 B 2 " in the universal cover.
we can find a copy B ∞ of B ∞ , such that C ∞ lies between B ∞ and B ∞ without intersecting them. Choose two copies v 0 , v 1 of v 0 , v 1 on B ∞ such that the vectors v 0 v 1 and v 0 v 1 are equal. Let R 0 be the region bounded by B ∞ , B ∞ . Let R 1 (resp. R 2 ) be the subregion of R 0 delimited by B ∞ and C ∞ (resp. by C ∞ and B ∞ ). We consider R 0 , R 1 , R 2 as cylinders, where part of the lines Let x (resp. y) be the number of edges of A(G) ∞ leaving B (resp. B ) in R 0 . Let x (resp. y ) be the number of edges of A(G) ∞ leaving C on its right (resp. left) side in R 0 . We have C corresponds to exactly one copy of C, so γ(C) = x − y . Similarly, we have B and B that almost corresponds to k 1 copies of B 1 followed by k 2 copies of B 2 , except the fact that we may have removed a back and forth part (if any). In any case we have the following: Proof. We prove the case where the common intersection of B 1 , B 2 is a path (if the intersection is a single vertex, the proof is even simpler). We assume, w.l.o.g, by eventually reversing one of B 1 or B 2 , that B 1 , B 2 are oriented the same way along their intersection, so we are in the situation of Figure 18. Figure 20 shows how to compute k 1 γ(B 1 ) + k 2 γ(B 2 ) + y − x when (k 1 , k 2 ) = (1, 1). Then, one can check that each outgoing edge of the angle graph is counted exactly the same number of time positively and negatively. So everything compensates and we obtain Figure 20: Case (k 1 , k 2 ) = (1, 1). Figure 21 shows how to compute k 1 γ(B 1 ) + k 2 γ(B 2 ) + y − x when (k 1 , k 2 ) = (1, −1). As above, most of the things compensate but, in the end, we obtain k 1 γ( , as depicted on the figure. Since the number of outgoing edges of A(G) around each vertex is equal to 4, we have again the conclusion k 1 γ( One can easily be convinced that when |k 1 | ≥ 1 and |k 2 | ≥ 1 then the same arguments apply. The only difference is that the red or green part of the figures in the universal cover would be longer (with repetitions of B 1 and B 2 ). This parts being very "clean", they do not affect the way we compute the equality. Finally, if one of k 1 or k 2 is equal to zero, the analysis is simpler and the conclusion still holds. ♦ For i ∈ {1, 2}, let H i be the cylinder map made of all the vertices and edges of G ∞ that are in the cylinder region R i . Let k (resp. k ) be the length of B (resp. C ). Let n 1 , m 1 , f 1 be respectively the number of vertices, edges and faces of H 1 .
The number of edges of A(G) ∞ in H 1 is equal to 3f 1 . Since we are considering a 4-orientation of A(G), these edges are decomposed into: the outgoing edges from inner vertices of H 1 (primal-vertices have outdegree 4 in A(G) ∞ , so there are 4(n 1 − k − k ) such edges), the outgoing edges from outer vertices of H 1 (there are x + y such edges), and the outgoing edges from faces of H 1 (faces have outdegree 1 in A(G) ∞ , so there are f 1 such edges). Finally, we have 3f 1 = 4(n 1 − k − k ) + x + y + f 1 . Combining this with Euler's formula, n 1 − m 1 + f 1 = 0, and the fact that all the faces of H 1 are triangles, i.e. 2m 1 = 3f 1 + k + k , one obtains that x + y = 2(k + k ). Similarly, by considering H 2 , one obtain that x +y = 2(k +k ). Thus finally x+y = x +y and thus γ(C) = k 1 γ(B 1 )+k 2 γ(B 2 ) by Claim 1.
Lemma 13 implies the following: Lemma 14 In a 4-orientation of A(G), if for two non-contractible not weakly homologous cycles C, C of G, we have γ(C) = γ(C ) = 0, then the 4-orientation of A(G) is balanced.
Proof. Consider two non-contractible not weakly homologous cycles C, C of G such that γ(C) = γ(C ) = 0. Consider an homology-basis {B 1 , B 2 } of G, such that B 1 , B 2 are non-contractible cycles whose intersection is a single vertex or a path (see Section 3.2 for discussion on existence of such a basis). Let k 1 , k 2 , k 1 , k 2 ∈ Z, such that C (resp. C ) is homologous to k 1 B 1 + k 2 B 2 (resp. k 1 B 1 + k 2 B 2 ). Since C is non-contractible we have (k 1 , k 2 ) = (0, 0). By eventually exchanging B 1 , B 2 , we can assume, w.l.o.g., that k 1 = 0. By Lemma 13, we have Since C and C are both non-contractible cycles, it is not possible that one is homologous to a multiple of the other, with a multiple different from −1, 1. So C, C are weakly homologous, a contradiction. So γ(B 2 ) = 0 and thus γ(B 1 ) = 0. Then by Lemma 13, any non-contractible cycle of G, have γ equal to 0. Thus the 4-orientation is balanced

Decontraction preserving "balanced"
The goal of this section is to prove the following lemma: Lemma 15 If G is a toroidal triangulation given with a non-loop edge e whose extremities are of degree at least four and such that G/e admits a balanced transversal structure, then G admits a balanced transversal structure.
Proof. Let G = G/e and consider a balanced transversal structure G . We show how to extend the balanced transversal structure of G to a balanced transversal structure of G. Let u, v be the two extremities of e and x, y the two vertices of G such that the two faces incident to e are A = u, v, x and B = v, u, y in clockwise order (see Figure 13). Note that u and v are distinct by definition of edge contraction but that x and y are not necessarily distinct, nor distinct from u and v. Let w be the vertex of G resulting from the contraction of e. Let e wx , e wy be the two edges of G represented on Figure 13 (these edges are identified and form a loop on Figure 14).
There are different cases to consider, corresponding to the different possible orientations and colorings of the edges e wx and e wy in G . By symmetry, there are just three cases to consider for Figure 13: edges e wx and e wy may be in consecutive, same or opposite intervals, w.r.t. the four intervals of the local property around w. When e wx , e wy are identified as in Figure 14, these "two" edges are necessarily in opposite intervals, and there is just one case to consider. So only the four cases represented on the left side of Figure 22 by case x.0 for x ∈ {a, b, c, d} have to be considered. In each case x.0, we prove that one can color and orient the edges of G to obtain a balanced transversal structure of G. For that purpose, just the edges of G that are labeled on Figures 13 and 14 have to be specified, all the other edges of G keep the orientation and coloring that they have in the balanced transversal structure of G . For each case x.0, with x ∈ {a, b, c, d}, the orientation and coloring of the labeled edges of G are represented on the right side of Figure 22 by case x.i, i ≥ 1. For the first two cases x ∈ {a, b}, we might have to choose between cases x.1 and x.2, to orient and color G, depending on a case analysis explained below. For the other cases, x ∈ {c, d}, there is just one coloring and orientation of G to consider: case x.1.
The sector ]e 1 , e 2 [ of a vertex w, for e 1 and e 2 two edges incident to w, is the counterclockwise sector of w between e 1 and e 2 , excluding the edges e 1 and e 2 . Let us consider the different possible orientations and colorings of edges e wx and e wy .
• e wx and e wy are not identified and in consecutive intervals: W.l.o.g., we might assume that we are in case a.0 of Figure 22, i.e. e wx (resp. e wy ) is a blue (resp. red) edge entering w.
Since all vertices of G have degree at least 4, we have that v is incident to at least one edge in the sector ]e vx , e vy [ of v. So w is incident to at least one edge in the sector ]e wx , e wy [ of w. Such an edge can be blue or red in the transversal structure of G . Depending on if there is such a blue or red edge we apply coloring a.1 or a.2 to G, as explain below.
W.l.o.g., we can assume that there is a blue edge incident to w in the sector ]e wx , e wy [. By the local rule, this edge is entering w. Moreover the edge incident to x and just after e wx in clockwise order around x is entering x in color red. So we are in the situation depicted on the left of Figure 23. Apply the coloring a.1 to G as depicted on the right of Figure 23. One can easily check that the local property is satisfied around every vertex of G (for that purpose one just as to check the local property around u, v, x, y). Thus we obtain a transversal structure of G. It remains to prove that the obtained transversal structure is balanced. For that purpose consider two non-contractible not weakly homologous cycles (B 1 , B 2 ) of G . Since the transversal structure of G is balanced, we have γ(B 1 ) = γ(B 2 ) = 0 by definition of balanced property. If B i does not intersect w, then it is not affected by the decontraction, let B i = B i , so that B i is a cycle of G with same homology and same value γ as B i . If B i intersects w, then one can consider where B i is entering and leaving the contracted region and replace B i by a cycle B i of G with the same homology and same value γ as B i . This property illustrated on Figure 24, on the left part we consider an example of a cycle B i and on the right part we give a corresponding cycle B i having the same homology and γ as B i . To be completely convinced that this transformation works, one may consider all the different possibility to enter and leave the contracted region and check that one can find a corresponding cycle of G with same γ. Finally, by this method, we obtain two non-contractible not weakly homologous cycles B 1 , B 2 of G with γ(B 1 ) = γ(B 2 ) = 0, so by Lemma 14, the obtained transversal structure is balanced.
• e wx and e wy are not identified and in the same interval: Similarly as the previous case the balanced property is preserved (see Figure 26 for an example). So we obtain a balanced transversal structure of G.
• e wx and e wy are not identified and in opposite intervals: W.l.o.g., we might assume that we are in case c.0 of Figure 22, i.e. e wx (resp. e wy ) is entering (resp. leaving) w in color blue. We apply coloring c.1 to G. One can easily check that the local property is satisfied around every vertex of G thus we obtain a transversal structure of G. Similarly as before the balanced property is preserved and we obtain a balanced transversal structure of G.
• e wx and e wy are identified: W.l.o.g., we might assume that we are in case d.0 of Figure 22. We apply coloring d.1 to G. One can easily check that the local property is satisfied around every vertex of G thus we obtain a transversal structure of G. Similarly as before the balanced property is preserved and we obtain a balanced transversal structure of G.
For each different possible orientations and colorings of edges e wx and e wy we are able to extend the balanced transversal structure of G to G and thus obtain the result.

Existence theorem
We are now able to prove the existence of balanced transversal structure: Theorem 2 A toroidal triangulation admits a balanced transversal structure if and only if it is essentially 4-connected.
(⇐=) Let G be an essentially 4-connected toroidal triangulation. By Lemma 12, it can be contracted to a map on one vertex by keeping the map an essentially 4-connected toroidal triangulation. Since during the contraction process, the universal cover is 4-connected, all the vertices have degree at least 4. The toroidal triangulation on one vertex admits a transversal structure. One such example is given on Figure 12 where one can check that all non-contractible cycles (the three loops) have value γ = 0, and so the transversal structure is balanced. Then, by Lemma 15 applied successively, one can decontract this balanced transversal structure to obtain a balanced transversal structure of G.

Distributive lattice of homologous orientations
Consider a partial order ≤ on a set S. Given two elements x, y of S, let m(x, y) (resp. M (x, y)) be the set of elements z of S such that z ≤ x and z ≤ y (resp. z ≥ x and z ≥ y). If m(x, y) (resp. M (x, y)) is not empty and admits a unique maximal (resp. minimal) element, we say that x and y admit a meet (resp. a join), noted x ∨ y (resp. x ∧ y). Then (S, ≤) is a lattice if any pair of elements of S admits a meet and a join. Thus in particular a lattice has a unique maximal (resp. minimal) element. A lattice is distributive if the two operators ∨ and ∧ are distributive on each other.
Consider an essentially 4-connected toroidal triangulation G and its angle map A(G). By Theorem 2, G admits a balanced transversal structure, thus A(G) admits a balanced 4orientation. Let D 0 be a particular balanced 4-orientation of A(G). We give below some terminology and results from [GKL16] adapted to our settings in order to describe the lattice properly. We need to define an order on B(A(G)) for that purpose. Fix an arbitrary face f 0 of A(G) and let F 0 be its counterclockwise facial walk. Note that fixing a face f 0 of A(G) corresponds to fixing an edge e 0 of G. Let F be the set of counterclockwise facial walks of A(G) and Since the characteristic flows of F are linearly independent, any oriented subgraph of A(G) has at most one representation as a combination of characteristic flows of F . Moreover the 0homologous oriented subgraphs of A(G) are precisely the oriented subgraph that have such a representation. We say that a 0-homologous oriented subgraph T of A(G) is counterclockwise (resp. clockwise) w.r.t. f 0 if its characteristic flow can be written as a combination with positive (resp. negative) coefficients of characteristic flows of F , i.e. φ(T ) = F ∈F λ F φ(F ), with λ ∈ N |F | (resp. −λ ∈ N |F | ). Given two orientations D, D , of A(G) we set D ≤ f 0 D if and only if D \ D is counterclockwise. Then we have the following theorem: To define the elementary flips that generates the lattice. We start by reducing the graph A(G). We call an edge of A(G) rigid with respect to B(A(G)) if it has the same orientation in all elements of B(A(G)). Rigid edges do not play a role for the structure of B(A(G)). We delete them from A(G) and call the obtained embedded graph the reduced angle graph, noted A(G). Note that, this graph is embedded but it is not necessarily a map, as some faces may not be homeomorphic to open disks. Note that if all the edges are rigid, then |B(A(G))| = 1 and A(G) has no edges. We have the following lemma concerning rigid edges: By Lemma 17, one can build A(G) by keeping only the edges that are contained in a 0-homologous oriented subgraph of D 0 . Note that this implies that all the edges of A(G) are incident to two distinct faces of A(G). Denote by F the set of oriented subgraphs of A(G) corresponding to the boundaries of faces of A(G) considered counterclockwise. Note that any F ∈ F is 0-homologous and so its characteristic flow has a unique way to be written as a combination of characteristic flows of F . Moreover this combination can be written Let D max (resp. D min ) be the maximal (resp. minimal) element of the lattice (B(A(G)), ≤ f 0 ). Then we have the following lemmas: Lemma 19 ([GKL16, Proposition 4.14]) F 0 (resp. − F 0 ) is an oriented subgraph of D max (resp. D min ).
Note that in the definition of counterclockwise (resp. clockwise) non-empty 0-homologous oriented subgraph, used in Lemma 20, the sum is taken over elements of F and thus does not use F 0 . In particular, D max (resp. D min ) may contain regions whose boundary is oriented counterclockwise (resp. clockwise) according to the interior of the region but then such a region contains f 0 in its interior.
Note that, assuming that an element of B(A(G)) is given, there is a generic method to compute in linear time the minimal balanced element D min of (B(A(G)), ≤ f 0 ) (see [DGL17, last paragraph of Section 8]. This minimal element plays the role of a canonical orientation and is particularly interesting for bijection purpose as shown in Section 6.

Faces of the reduced angle graph
Previous section is about the general situation of the lattice structure of homologous orientations and is more or less a copy/paste from [GKL16] of the terminology and results that we need here. Now we study in more detail this lattice w.r.t. the balanced property as done in [DGL17, Section 10] for Schnyder woods and 3-orientations (see also [Lév17,Section 8.4

]).
Consider an essentially 4-connected toroidal triangulation G and its angle map A(G). We consider the terminology of the previous section and assume that there exists a balanced 4-orientation D 0 of A(G).
We say that a walk W of A(G) is a 4-disk if it is a face of A(G) (see the left of Figure 27). We say that a walk W of A(G) is a 8-disk if it has size 8, encloses a region R homeomorphic to an open disk and the dual-vertices of W have their edge not on W that is inside R (see the right of Figure 27). Finally, we say that a walk W of A(G) is a {4, 8}-disk if it is either a 4-disk or a 8-disk.
Suppose that A(G) is given with a 4-orientation. For an edge e 0 of A(G) we define the left walk (resp. right walk ) from e 0 as the sequence of edges W = (e i ) i≥0 of A(G) obtained Proof. Consider a closed left walk W = (e i ) 0≤i≤2k−1 of A(G), with k > 0. W.l.o.g., we may assume that all the e i are distinct, i.e. there is no strict subwalk of W that is also a closed left walk. Note that W cannot cross itself otherwise it is not a left walk. However W may have repeated vertices but in that case it intersects itself tangentially on the right side. Suppose by contradiction that there is an oriented subwalk W of W , that forms a cycle C enclosing a region R on its right side that is homeomorphic to an open disk. Let v be the starting and ending vertex of W . Note that we do not consider that W is a strict subwalk of W , so we might have W = W . Consider the graph H obtained from A(G) by keeping all the vertices and edges that lie in the region R, including W . Since W can intersect itself only tangentially on the right side, we have that H is a bipartite planar map whose outer face boundary is W . The inner faces of H are quadrangles. Let 2k be the length of W . Let n , m , f be the number of vertices, edges and faces of H. By Euler's formula, n − m + f = 2. All the inner faces have size 4 and the outer face has size 2k , so 2m = 4(f − 1) + 2k . Combining the two equalities gives m = 2n − k − 2. Let n p (resp. n d ) be the number of inner primal-vertices (resp. inner dual-vertices) of H. So n = 2k + n p + n d and thus m = 2n p + 2n d + 3k − 2. Since W is a subwalk of a left walk, all primal-vertices of H, except v (if it is a primal-vertex), have their incident outer edges in H. Since W is following oriented edges, if v is a primal vertex, it has at least one outgoing edge in H. Since we are considering a 4-orientation of A(G), we have m ≥ 4(k − 1) + 1 + 4n p + n d . By counting the edges of H incident to dual-vertices, we have m ≥ 2k + 3n d . Combining the three (in)equalities of m , gives 2(2n p + 2n d + 3k − 2) ≥ (4(k − 1) + 1 + 4n p + n d ) + (2k + 3n d ), a contradiction. So there is no oriented subwalk of W , that forms a cycle enclosing an open disk on its right side.
We now claim the following: • W is not a cycle Since W cannot cross itself nor intersect itself tangentially on the left side, it has to intersect tangentially on the right side. Such an intersection on a vertex v is depicted on Figure 28. gives 2(2n p + 2n d + 3k − 2) = (2k + 4n p + n d ) + (2k + x + 3n d ), so x = 2k − 4. Since k ≥ x ≥ 0, the only possible values are (k, x) ∈ {(2, 0), (3, 2), (4, 4)}. If (k, x) = (2, 0), then W has size four, its two dual-vertices are of degree 2 in H so they have their edge not on W that is outside R. If W is not a face of A(G), then there are two distinct edges between the primal-vertices of W inside R, forming a pair of homotopic multiple edges, a contradiction. So W is a face of A(G) and thus a 4-disk. If (k, x) = (3, 2), then W has size six, with two dual-vertices of degree 3 in H and G ∞ has a separating triangle, a contradiction to Lemma 5. If (k, x) = (4, 4), then W has size eight, with its four dual-vertices of degree 3 in H. So W is a 8-disk.
The proof is similar for closed right walks. Proof. Consider a face f of A(G). Let F be the element of F corresponding to the boundary of f . By Lemma 18, there exists D ∈ B(A(G)) such that F is an oriented subgraph of D.
All the faces of A(G) form a 4-disk. Thus either f is a face of A(G) and we are done or f contains in its interior at least one edge of A(G). Start from such edge e 0 and consider the left-walk W = (e i ) i≥0 of D from e 0 . Suppose that for i ≥ 0, edge e i is entering a vertex v that is on the border of f . Recall that by definition F is oriented counterclockwise according to its interior, so either e i+1 is in the interior of f or e i+1 is on the border of f . Thus W cannot leave f and its border.
Since A(G) has a finite number of edges, some edges are used several times in W . Consider a minimal subsequence W = e k , . . . , e such that no edge appears twice and e k = e +1 . Thus W ends periodically on W that is a closed left walk. By Lemma 21, W encloses a region R homeomorphic to an open disk on its left side. Moreover, the border of this region is a {4, 8}-disk. Thus W is a 0-homologous oriented subgraph of D. So all its edges are non-rigid by Lemma 17. So all the edges of W are part of the border of f . Since F is oriented counterclockwise according to its interior, the region R contains f . So f is quasi-contractible and W is its outer facial walk and a {4, 8}-disk.
A simple counting argument gives the following lemma (see Figure 29): Proof. Consider a 8-disk W of A(G). Consider the graph H obtained from A(G) by keeping only the vertices and edges that lie in W and its interior. The vertices of W appearing several times on W are duplicated, so H is a bipartite planar map. Let x be the number of inneredges of H that are incident to its outer-face and directed toward the interior. We want to prove that x = 0.
Let n , m , f be the number of vertices, edges and faces of H. By Euler's formula, n −m + f = 2. All the inner faces have size 4 and the outer face has size 8, so 2m = 4(f − 1) + 8. Combining the two equalities gives m = 2n − 6. Let n p (resp. n d ) be the number of inner primal-vertices (resp. inner dual-vertices) of H. So n = n p + n d + 8 and thus m = 2n p +2n d +10. Since we are considering a 4-orientation of A(G), we have m = 4n p +n d +x+8. By counting the edges of H incident to dual-vertices we have m = 3n d + 12. Combining the three equalities of m , gives 2(2n p + 2n d + 10) = (4n p + n d + x + 8) + (3n d + 12), so x = 0.
We say that a {4, 8}-disk of A(G) is maximal (by inclusion) if its interior is not strictly contained in the interior of another {4, 8}-disk of A(G).
Lemma 24 There is a unique maximal {4, 8}-disk of A(G) containing f 0 and it is oriented counterclockwise (resp. clockwise) in D max (resp. D min ). Suppose by contradiction that there exists another maximal {4, 8}-disk W containing f 0 that is distinct from W . As for W , all the edges of W are in A(G). The interiors of W and W have to be distinct, not included one into each other, but intersecting. Then at least one edge of W has to be in the interior of W and incident to it, a contradiction to the fact that these edges are not in A(G). So W is the unique maximal {4, 8}-disk containing f 0 .
We now prove the second part of the lemma for D max (the proof is similar for D min ). Let F be the element of F corresponding to the boundary of f . We consider two cases depending on the fact that f is equal to f 0 or not, i.e. f = f 0 or f has some punctures, one of which contains f 0 .
• f = f 0 : By Lemma 19, we have F = F 0 is an oriented subgraph of D max and thus W is oriented counterclockwise w.r.t. its interior.
• f = f 0 : By Lemma 18, there exists an element of B(A(G)) for which F is an oriented subgraph. Let D be such an element, chosen such that F is not an oriented subgraph of any orientation, distinct from D, that is on oriented paths from D to D max in the Hasse diagram of (B(A(G)), Recall that f has at least one puncture containing f 0 .
By assumption on D we have F is distinct from F . Moreover, since W is oriented counterclockwise in D i−1 , we have that F is distinct from all the elements of F corresponding to faces that are incident to W and not in its interior. So F is disjoint from W and W has the same orientation in D i−1 and D i , a contradiction. So W is oriented counterclockwise in D max .

Example of a balanced lattice
Consider the essentially 4-connected toroidal triangulation G of Figure 1 and its angle map A(G). One example of a balanced 4-orientation of A(G) is given on the right of Figure  When a face of the reduced angle graph is oriented this is represented by a circle. The circle is black when it corresponds to the face containing f 0 . The circle is magenta if the boundary of the corresponding face of A(G) is oriented counterclockwise and cyan otherwise. For the face of A(G) that is a 8-disk, we represent the circle around the unique vertex that is in the interior of this 8-disk.
An edge in the Hasse diagram from D to D (with D ≤ D ) corresponds to a face of A(G) oriented counterclockwise in D whose edges are reversed to form a face oriented clockwise in D , i.e. a magenta circle replaced by a cyan circle. The outdegree of a node is its number of magenta circle and its indegree is its number of cyan circle. By Lemma 18, all the faces of A(G) have a circle at least once. The special face is not allowed to be flipped and, by Lemma 19, it is oriented counterclockwise in the maximal element of the lattice and clockwise in the minimal element. By Lemma 20, the maximal (resp. minimal) element contains no other faces of A(G) oriented counterclockwise (resp. clockwise), indeed it contains only cyan (resp. magenta) circles and one black. One can play with the black circle and see which are the orientations of the lattice that are in correspondence by flipping the face f 0 .
All the 4-orientations of the diagram are balanced so they correspond to transversal structures by Corollary 1. These transversal structures are represented on the right of Figure 31. The lattice may have been defined directly on the transversal structures using the same transformations as in the planar case (see [Fus09, Figure 6 and Theorem 2]). But we prefer to present this by considering α-orientations here since it is a more general framework that also enables to use directly results from [GKL16] without re-proving the lattice structure.
6 Bijection with unicellular mobiles

From essentially 4-connected toroidal triangulations to mobiles
Consider an essentially 4-connected toroidal triangulation G and its angle map A(G). In order to use the lattice structure on the (non-empty) set B(A(G)) we need to choose a particular face of A(G), i.e. a particular edge of G. This choice has to be done appropriately so that the minimal element of the lattice have some interesting properties for the bijection. For that purpose, we have to consider quadrangles of G. We choose a half-edge h 0 of G that is in the interior and incident to a maximal quadrangle of G. We call h 0 the root half-edge of G. The vertex v 0 of G incident to h 0 is called the root vertex. The face f 0 of A(G) containing h 0 is called the root face. Consider the order ≤ f 0 define on B(A(G)) in Section 5.2. By Theorem 3, (B(A(G)), ≤ f 0 ) forms a distributive lattice. Thus we can consider the minimal balanced 4-orientation D min of B(A(G)) w.r.t. f 0 . Since there is no ambiguity, we may also say that D min is minimal w.r.t. h 0 .
By Corollary 1, D min corresponds to a transversal structure of G and admits a TTSlabeling (see Section 3.1). By convention, the transversal structure of G associated to D min that we consider is the one where h 0 is an outgoing half-edge of color blue, i.e. in the TTSlabeling the half-edge is labeled 0.
Let us associate to any 4-orientation D of A(G) a particular graph M embedded on the torus, called mobile associated to D. The vertex set of M is the same as G. Its edge set is composed of some edges of G plus some half-edges that are incident to only one vertex. We  A balanced transversal structure of K 7 is given on Figure 33 with the corresponding balanced 4-orientation of its angle map that is minimal w.r.t. the barred half-edge. The extended mobile associated to this orientation is represented twice, once with the angle map and once alone as a hexagon whose opposite sides are identified to form a toroidal map. The vertices are labeled from 1 to 7, and the root half-edge is represented in magenta on the figures.  Figure 33: Balanced transversal structure of K 7 , given with the corresponding balanced 4orientation of its angle map, that is minimal w.r.t. the barred half-edge, and the corresponding extended mobile, represented as an hexagon whose opposite sides are identified.
Note that the mobile can be computed directly from the transversal structure by considering the following set of half-edges for M : an half-edge h of G, incident to a vertex v of G, is a half-edge of M if and only if it is the last edge of an interval (outgoing blue, outgoing red, incoming blue, incoming red) of v in clockwise order around v. This point of view corresponds more to the planar study of transversal structure from [Fus09]. But the rule of Figure 32 corresponds to a more general framework to construct so-called "mobile" that can be applied to any orientation (see [BF12a,BF12b,BC11]) and not only to transversal structure.
Part of the TTS-labeling of D min can be represented on the mobile M by keeping only the labels that are on half-edges of M . By the mobile rule, one can note that a mobilelabeling satisfies the following properties: the four labels that appear around each vertex are exactly 0, 1, 2, 3 in counterclockwise order and the two labels that appear on each edge differ exactly by (2 mod 4) (see Figure 34 where the TTS-labeling is represented on the transversal structure and on the corresponding mobile).
We say that an edge e of G is covered by M (resp. M + ) if there is at least one half-edge of e in M (resp. M + ). We say that a vertex v of G is covered by M (resp. M + ) if there is at least one half-edge incident to v in M (resp. M + ).
The main result of this section is the following theorem: The number of half-edges of M is equal to 4n (one half-edge for each outgoing edge of the 4-orientation D min of A(G)). Thus the number of half-edges of M + is equal to 4n + 1. The toroidal triangulation G has exactly 3n edges. So M + has at least n + 1 full-edges. Since M + is a graph embedded on the torus with n vertices, if it has strictly more than n + 1 edges, then it does not have a unique face. So M + has exactly n + 1 edges and it is a unicellular map covering all the vertices. The number of distinct edges of G covered by M + is exactly (4n + 1) − (n + 1) = 3n. So M + is covering all the edges of G.
Since there is no half-edge of M in the interior of Q and incident to Q. We have that either W is a 4-disk and h 0 is a stem of M + or W is a 8-disk and the removal of h 0 from M + creates two connected components, one of which is a tree.
By Lemma 6, there is a unique maximal quadrangle containing the root half-edge, that we call the root quadrangle.
The example of K 7 of Figure 33, is an example where the {4, 8}-disk inside the root quadrangle is a 4-disk. There is no vertices in the strict interior of the root quadrangle and the root half-edge h 0 of M + (in magenta) is not part of a full-edge of M + .
When the root quadrangle has some vertices in its interior, then the {4, 8}-disk inside the root quadrangle is in fact a 8-disk and the part of the mobile M inside this root quadrangle is a tree (exactly like in the planar case, see [Fus09]). In M + this tree is connected to the "toroidal" part of M that is external to the root quadrangle with the addition of the half-edge h 0 added to M + . Figure 37 is an example of an essentially 4-connected toroidal triangulation with some nested quadrangles. The barred half-edge is the root half-edge. It is chosen inside a non empty root quadrangle. There are also non empty quadrangles outside the root quadrangle. The triangulation is given with a balanced transversal structure whose corresponding orientation of the angle graph (not represented) is the minimal balanced 4-orientation w.r.t. the barred half-edge. The corresponding extended mobile is given. One can see that Theorem 4 is satisfied, i.e. the extended mobile is a unicellular map covering all the vertices and edges. The magenta half-edge, corresponds to the root half-edge and links the two connected part of the mobile, one of which is a tree. A toroidal unicellular map on n vertices has exactly n + 1 edges. Since the total number of edges of a triangulation on n vertices is 3n, a consequence of Theorem 4 is that the extended mobile M + has exactly n vertices, n + 1 edges and 2n − 1 stems. In total, M + has 2(n + 1) + 2n − 1 = 4n + 1 half-edges. So the root half-edge is not part of the mobile M and is added to M to obtain M + . So all the vertices of M + have degree 4, except the root vertex that has degree 5.

Recovering the original triangulation
This section is dedicated to showing how to recover the original triangulation from the extended mobile. The recovering process is described by the following theorem.
Theorem 5 Consider an essentially 4-connected toroidal triangulation G, and a root halfedge h 0 of G, incident to a vertex v 0 , such that h 0 is in the interior and incident to a maximal quadrangle of G. From the extended mobile M + associated to the minimal balanced 4-orientation of A(G) w.r.t. h 0 , one can reattach all the stems of M + to obtain G by starting from the angle of v 0 just after h 0 in clockwise order around v 0 and walking along the face of M + in counterclockwise order (according to the interior of this face): each time a stem is met, it is reattached in order to create a triangular face on its left side.
Theorem 5 is illustrated on Figure 38 to recover K 7 from the extended mobile of Figure 33. We have represented only the first and last two steps of the method. One can also play with the extended mobile of Figure 37 to recover the corresponding triangulation. In fact in this section we define a method, more general than the one described in Theorem 5, that is useful for Sections 7.
Let M r (n) denote the set of toroidal unicellular maps with exactly n vertices, n + 1 edges and 2n − 1 stems such that all vertices have degree 4, except one vertex (called root vertex) that has degree 5, moreover the root vertex has a marked incident half-edge (called the root half-edge) that is either a stem or whose removal creates two connected components, one of which is a tree. Note that the extended mobile M + given by Theorem 4 is an element of M r (n).
We use the classical closure procedure (see [Fus09]) to reattach step by step all the stems of an element M + of M r (n). Let M 0 = M + , and, for 1 ≤ k ≤ 2n − 1, let M k be the map obtained from M k−1 by reattaching one of its stem (we explicit below which stem is reattached and how). The special face of M 0 is its only face. For 1 ≤ k ≤ 2n − 1, the special face of M k is the face on the right of the stem of M k−1 that is reattached to obtain M k . For 0 ≤ k ≤ 2n − 1, the border of the special face of M k consists of a sequence of edges and stems. We define an admissible triple as a sequence (e 1 , e 2 , s), appearing in counterclockwise order along the border of the special face of M k , such that e 1 = {u, v} and e 2 = {v, w} are edges of M k and s is a stem attached to w. The closure of the admissible triple consists in attaching s to u, so that it creates an edge {w, u} and so that it creates a triangular face (u, v, w) on its left side (when oriented from w to u). The complete closure of U consists in closing a sequence of admissible triples, i.e. for 1 ≤ k ≤ 2n − 1, the map M k is obtained from M k−1 by closing any admissible triple.
Note that, for 0 ≤ k ≤ 2n − 1, the special face of M k contains all the stems of M k . The closure of a stem reduces the number of edges on the border of the special face and the number of stems by 1. At the beginning, the unicellular map M 0 has n + 1 edges and 2n − 1 stems. So along the border of its special face, there are 2n + 2 edges and 2n − 1 stems. Thus there is exactly three more edges than stems on the border of the special face of M 0 and this is preserved while closing stems. So at each step there is necessarily at least one admissible triple and the sequence M k is well defined. Since the difference of three is preserved, the special face of M 2n−2 is a quadrangle with exactly one stem. So the reattachment of the last stem creates two faces that have length three and at the end M 2n−1 is a toroidal triangulation. Note that at a given step there might be several admissible triples but their closure are independent and the order in which they are performed does not modify the obtained triangulation M 2n−1 .
We now apply the closure method to our particular case. Consider an essentially 4connected toroidal triangulation G, a root half-edge h 0 of G that is in the interior and incident to a maximal quadrangle of G, and the extended mobile M + associated to the minimal balanced 4-orientation of A(G) w.r.t. h 0 . Recall that M + is an element of M r (n) so we can apply on M + the complete closure procedure described above. We use the same notation as before, i.e. let M 0 = M + and for 1 ≤ k ≤ 2n − 1, the map M k is obtained from M k−1 by closing any admissible triple. The following lemma shows that the triangulation obtained by this method is G: Proof. We prove by induction on k that every face of M k is a face of G, except for the special face. This is true for k = 0 since M 0 = M + has only one face, the special face. Let 0 ≤ k ≤ 2n−2, and suppose by induction that every non-special face of M k is a face of G. Let (e 1 , e 2 , s) be the admissible triple of M k such that its closure leads to M k+1 , with e 1 = {u, v} and e 2 = {v, w}. The closure of this triple leads to a triangular face (u, v, w) of M k+1 . This face is the only "new" non-special face while going from M k to M k+1 .
Suppose, by contradiction, that this face (u, v, w) is not a face of G. Let a v (resp. a w ) be the angle of M k at the special face, between e 1 and e 2 (resp. e 2 and s). Since G is a triangulation, and (u, v, w) is not a face of G, there exists at least one stem of M k that should be attached to a v or a w to form a proper edge of G. Let s be such a stem that is the nearest from s. In G the edges corresponding so s and s should be incident to the same triangular face T . Let x be the vertex incident to s . Let z ∈ {v, w} such that s should be reattached to z. If z = v, then s should be reattached to x to form a triangular face of G. If z = w, then s should be reattached to a common neighbor of w and x located on the border of the special face of M k in counterclockwise order between w and x. So in both cases s should be reattached to a vertex y located on the border of the special face of M k in counterclockwise order between w and x (with possibly y = x). To summarize s goes from w to y and s from x to z, and z, w, y, x appear in counterclockwise around T with z = w or y = x. The two halfedges h, h of T that are in the same edges with s, s are not in M + . By the mobile rule (see Figure 32), the two half-edges h, h that are not in M + corresponds in the orientation of A(G) to two distinct outgoing edges for the dual-vertex corresponding to T . This contradicts the fact that the considered orientation of A(G) is a 4-orientation and that dual-vertices should have outdegree 1.
So for 0 ≤ k ≤ 2n − 2, all the non-special faces of M k are faces of G. In particular every face of M 2n−1 except one is a face of G. Then clearly the (triangular) special face of M 2n−1 is also a face of G, hence M 2n−1 = G.
Lemma 25 shows that one can recover the original triangulation from M + with any sequence of admissible triples that are closed successively. This does not explain how to find the admissible triples efficiently. In fact the root half-edge h 0 can be used to find a particular admissible triple of M k . We define the root angle a 0 of G as the angle of v 0 just after h 0 in clockwise order around v 0 . This definition of a 0 naturally extends to M + or when some admissible triples are reattached.
Lemma 26 For 0 ≤ k ≤ 2n − 2, let s be the first stem met while walking counterclockwise from a 0 in the special face of M k . Then before s, at least two edges are met and the last two of these edges form an admissible triple with s.
Proof. Since s is the first stem met, there are only edges that are met before s. Suppose by contradiction that there is only zero or one edge met before s. Then the reattachment of s to form the corresponding edge of G is necessarily such that the triangular face T that is formed on the left side of the stem contains the root half-edge h 0 on its border. Let h be the half-edge of T that is in the same edge with s and not in M + . Then the two half-edges h, h 0 that are not in M corresponds in the orientation of A(G) to two distinct outgoing edges for the dual-vertex corresponding to T . This contradicts the fact that the considered orientation of A(G) is a 4-orientation and that dual-vertices should have outdegree 1.
Lemma 26 shows that one can reattach all the stems by walking once along the face of M + in counterclockwise order starting from a 0 . Thus we obtain Theorem 5.
Note that M + is such that the complete closure procedure described here never wraps over the root angle, i.e. when a stem is reattached, the root angle is always in the face that is on its right side. The property of never wrapping over the root angle is called safe here. Note that sometimes this property is called "balanced" in the literature and here the word "balanced" is already used with a completely different meaning. Let M r,s (n) denote the set of elements of M r (n) that are safe. So the extended mobile given by Theorem 4 is an element of M r,s (n).
We exhibit in Section 6.4 a bijection between appropriately rooted essentially 4-connected toroidal triangulations and a particular subset of M r,s (n).
The possibility to close admissible triples in any order to recover the original triangulation is interesting compared to the simpler method of Theorem 5 since it enables to recover the triangulation even if the root half-edge is not given. Indeed, when the root angle is not given, then one can simply start from any angle of M + , walk twice around the face of M + in counterclockwise order and reattach all the admissible triples that are encountered along this walk. Walking twice ensures that at least one complete round is done from the root angle. Since only admissible triples are considered, we are sure that no unwanted reattachment is done during the process and that the final map is G. This enables us to reconstruct G in linear time even if the root angle is not known. This property will also be used in Section 7 for enumeration purpose.

Asymptotically optimal encoding
A 4-connected planar triangulation on n vertices, can be encoded with a binary word of length ∼ n log 2 ( 27 4 ) ≈ 2.7549 n (see [Fus07,Theorem 4.2]). This is asymptotically optimal since, by results of Tutte, the number P n of 4-connected planar triangulations on n vertices satisfies log 2 (P n ) ∼ n log 2 ( 27 4 ). The results of previous sections allow us to generalize this optimal encoding to the toroidal case.
A ternary tree is a plane tree, rooted at a leaf, such that every inner vertex has degree exactly four. A ternary tree T on n inner vertices can easily be encoded using a binary word on 3n bits by the following: walk in counterclockwise order around T from the root angle, write a "1" when an inner vertex is discovered for the first time, and a "0" when a leaf is traversed. A ternary tree on n inner vertices has n inner vertices and 2n + 2 leaves. So we obtain a binary word of length 3n + 2 with n bits 1. Using [BGH03,Lemma 7], this word can then be encoded with a binary word of length log 2 3n+2 n + o(n) ∼ n log 2 ( 27 4 ) ≈ 2.7549 n bits.
Consider an essentially 4-connected toroidal triangulation G, a root half-edge h 0 of G that is in the interior and incident to a maximal quadrangle of G, and the extended mobile M + associated to the minimal balanced 4-orientation of A(G) w.r.t. h 0 . By Theorem 5 one can retrieve the triangulation G from M + . Hence to encode G, one just has to encode M + . The extended mobile M + is a toroidal unicellular map with n vertices, n + 1 edges, 2n − 1 stems. All its vertices have degree 4, except the root vertex that has degree 5. Either h 0 is a stem of M + or its removal creates two connected components, one of which is a tree.
Let k ≥ 0 be the number of (inner) vertices of the tree part attached to h 0 , with k = 0 if h 0 is a stem. We remove the half-edge h 0 from M + , and obtain : a toroidal component G 1 , that we root at the angle where h 0 is attached, and a tree component T 2 , that we root at the half-edge opposite to h 0 . So G 1 is a toroidal unicellular map with n − k vertices, n − k + 1 edges, 2n − 2k − 2 stems. And T 2 is a planar tree with k vertices, k − 1 edges, 2k + 2 stems. Moreover, all the vertices of G 1 and T 2 have degree 4. Now we choose two edges e 1 , e 2 of G 1 , such that G 1 \ {e 1 , e 2 } is acyclic. We transform G 1 into a planar tree T 1 by cutting e 1 , e 2 and transforming each of e 1 , e 2 into two special stems of T 1 . We root T 1 on a stem by keeping the information of where are the special stems, which pairs should be reattached together, and where is the angle attached to h 0 . This information can be stored with O(log(n)) bits. One can recover G 1 from T 1 by reattaching the special stems in order to form non-contractible cycles and changing the root. Thus we are left to encode two ternary trees T 1 and T 2 with n − k and k inner vertices, respectively.
By applying the ternary tree encoding method on T 1 and T 2 we obtain the following theorem : Theorem 6 Any essentially 4-connected toroidal triangulation on n vertices, can be encoded with a binary word of length ∼ n log 2 ( 27 4 ) ≈ 2.7549 n and this is asymptotically optimal.
The optimality of Theorem 6 is due to the fact that the number of essentially 4-connected toroidal triangulations is at least the number of 4-connected planar triangulations.
Here is a remark on the complexity of the encoding part. All the encoding and decoding process is linear as soon as a balanced transversal structure is given. But even if the proof of Theorem 2 is constructive and gives a polynomial algorithm to find a balanced transversal structure, the obtained algorithm is not linear. The difficulty is to be able to find contractible edges, and contract all the graph to a single vertex, in linear time. Currently this has to be done by Lemma 12 that does not give linear complexity. So the question to be able to find in linear time a balanced transversal structure of an essentially 4-connected triangulation is an interesting and open problem.
In the plane, the proof of the existence of such objects is usually done quite easily by using a so-called shelling order (or canonical order). This method consists in starting from the outer face and removing the vertices one by one. It leads to simple linear time algorithms. We do not see how to generalize this kind of method here since the toroidal objects that we considered are too homogeneous and there is no special face (and thus no particular starting point) playing the role of the outer face.

Bijective consequences
Consider an essentially 4-connected toroidal triangulation G, a root half-edge h 0 of G that is in the interior and incident to a maximal quadrangle, and the extended mobile M + associated to the minimal balanced 4-orientation of A(G) w.r.t. h 0 . Theorems 4 and 5 show that M + gives a toroidal unicellular map with stems from which one can recover the original triangulation. Thus there is a bijection between essentially 4-connected toroidal triangulations rooted from an appropriate half-edge and their corresponding set of extended mobiles. The goal of this section is to describe exactly the set of these extended mobiles.
Recall from Section 6.2 that the obtained extended mobiles are elements of M r,s (n). One may hope that there is a bijection between essentially 4-connected toroidal triangulations appropriately rooted and M r,s (n). This is the classic behavior in the planar case since there is a unique lattice associated to the set of α-orientations of a planar map (for a fixed α). But here, things are different since the set of 4-orientations of the angle map is now partitioned into several lattices and there might be several minimal elements, some of which behave well w.r.t. the mobile rule. Indeed, there exists examples of minimal non-balanced 4-orientations of angle maps of essentially 4-connected toroidal triangulations appropriately rooted such that the corresponding extended mobile is in M r,s (n). The balanced property is the property that defines uniquely our considered minimal element and thus we have to translate this property on the set of mobiles.
Note that there are two types of toroidal unicellular maps. Two cycles of a unicellular map may intersect either on a single vertex (square case) or on a path (hexagon case). We call such maps square unicellular maps or hexagon unicellular maps, respectively. The square can be seen as a particular case of the hexagon where one side has length zero and thus the two corners of the hexagon are identified. In the square case (resp. hexagon case), the unicellular map has exactly 2 (resp. 3) distinct cycles that are moreover non-contractible and not weakly homologous to each other.
Recall that given a cycle C of G with a direction of traversal, we have γ(C) equals the number of edges of A(G) leaving C on its right minus the number of edges of A(G) leaving C on its left. Recall that the root angle of G is the angle just after the root half-edge in clockwise order. In each angle of the extended mobile M + , except the root angle, there is an outgoing edge of A(G) (see rule of Figure 32). So for a cycle C of the extended mobile, one can compute γ(C) by considering the angles of M + on the left and right side of C, except the root angle. Then, since we are considering balanced 4-orientations of the angle map, for any (non-contractible) cycle C of the extended mobile obtained by Theorem 4, we have γ(C) = 0.
Consider an element M + of M r (n). We say that an unicellular map of M r (n) is balanced if every cycle of the unicellular map has the same number of angles on the left and right sides, with the special rule that the root angle does not count. Let M r,s,b (n) denote the subset of elements of M r,s (n) that are balanced.
Let us recall, for the sake of clarity, the complete definition of M r,s,b (n) that is the set of toroidal unicellular maps with exactly n vertices, n + 1 edges and 2n − 1 stems such that: • "r" for root: All vertices have degree 4, except one vertex (called root vertex) that has degree 5, moreover the root vertex has a marked incident half-edge (called the root half-edge) that is either a stem or whose removal creates two connected components, one of which is a tree.
• "s" for safe: When the stems of admissible triples are reattached (in any order), the angle just after the root half-edge in clockwise order (called the root angle) is always in the face that is on the right side of the stems.
• "b" for balanced: Every (non-contractible) cycle of the map has the same number of angles on its left and right sides, with the special rule that the root angle does not count.
Let T r (n) be the set of essentially 4-connected toroidal triangulations on n vertices rooted at a half-edge that is in the interior and incident to a maximal quadrangle.
We have the following bijection: Theorem 7 There is a bijection between T r (n) and M r,s,b (n).
Proof. Consider the mapping g that associates to an element of T r (n), the extended mobile M + obtained by Theorem 4. By the above discussion the image of g is in M r,s,b (n) and g is injective since one can recover the original triangulation from its image by Theorem 5. Conversely, given an element M + of M r,s,b (n) with root angle a 0 (just after the root half-edge in clockwise order around the root vertex), one can build a toroidal map G by the complete closure procedure described in Section 6.2. The number of stems and edges of M + implies that all faces of G are triangles. We explain later why G has no contractible loop nor multiple edges and that it is essentially 4-connected.
While making the complete closure, one can create a 4-orientation D of A(G) with the following method. For each half-edge h of M + distinct from h 0 , such that h is incident to vertex v, add to D an outgoing half-edge incident to v and just after h in clockwise order around v. Note that this is done not only for stems of M + but for all the half-edges of M + , including those that are part of full-edges of M + , except h 0 .
Consider the moment when an admissible triple (e 1 , e 2 , s) of M k is closed in order to obtain M k+1 , with 0 ≤ k ≤ 2n − 2. Let e 1 = (u, v), e 2 = (v, w) and s is a stem attached to w. When the stem s is reattached to u to form a triangular face T on its left side, it is reattached to u in order to leave the half-edge of D leaving u (if any) on the right side (see Figure 39). Note that if the angle at u is the root angle, then there is no half-edge of D leaving u. By doing so we maintain the property that for all the angles of the face containing the root angle (called the special face in Section 6.2), there is an outgoing half-edge of D, except for the root angle. In order to describe the edges of D completely, we consider two cases whether s is the last stem that is reattached or not.
• s is not the last reattached stem By the safe property, s has the root angle on its right side when it is reattached. So the angle at v (resp. w) between e 1 , e 2 (resp. e 2 , s) in clockwise order is not the root angle. So inside the triangle T , we can reattached the two half-edges of D incident to v, w to the dual-vertex f of A(G) corresponding to T and add an additional edge to D from f to u (see Figure 40). • s is the last reattached stem By the safe property, the root angle is in the face on the right side of s. Thus we are in one of the three case of Figure 41 depending on the position of the root half-edge according to s (the root half-edge is represented in magenta). In each case we reattached the four depicted half-edges of D and add two additional edges to D that are outgoing for dual-vertices of D as described on Figure 41.
By doing so we are sure to reattach all the half-edges of D to dual-vertices of A(G). In the end, all primal-vertices have outdegree 4 and all dual-vertices have outdegree 1. So we have defined a 4-orientation D of A(G) on which the mobile rule (see Figure 32) plus the addition of the root half-edge gives M + . Since we are considering a 4-orientation of A(G), the map G has no contractible loop nor multiple edges and it is essentially 4-connected, otherwise, there will be a contradiction in a region homeomorphic to an open disk by a simple counting argument. It remains to show that G is appropriately rooted and that D corresponds to the minimal balanced 4-orientation w.r.t. this root, then g will be surjective. Since M + is balanced it has at least two non-contractible and not weakly homologous cycles C 1 , C 2 with the same number of angles on their respective left and right sides, with the special rule that the root angle does not count. All these angles corresponds to exactly one outgoing edge of D by construction of D. So the orientation D of A(G) satisfies γ(C 1 ) = γ(C 2 ) = 0. So by Lemma 14, the 4-orientation D is balanced.
Suppose by contradiction that D is not minimal w.r.t. h 0 . Let f 0 be the face of A(G) containing h 0 . We use the terminology and notations of Section 5.2. Then in the Hasse diagram of the lattice (B(A(G)), ≤ f 0 ), there is an element below D: Let D be a balanced 4orientation of A(G) such that D ≤ f 0 D. By Section 5.2, we have D \D ∈ F . Let F = D \D.
So F is the counterclockwise facial walk of a face of A(G) not containing f 0 . So this facial walk is oriented counterclockwise (resp. clockwise) according to its interior in D (resp. D). By Lemma 22, F is quasi-contractible and its outer facial walk is a {4, 8}-disk W . Then, by Lemma 23, if W is a 8-disk, the edges that are in the interior of W and incident to it are entering it. So in D, the orientation of W and of the edges in its interior and incident to it are as depicted on Figure 36. Then, by definition of the mobile (see Figure 32), there is no half-edge of M + in the interior of W and incident to vertices of W . If W is a {4}-disk, then the unique edge of G inside W is not covered by M + . If W is a {8}-disk, then either there are some edges of G inside W that are not covered by M + , or M + is made of several connected components. In any cases, this contradicts the fact that M + is an element of M r,s,b (n) from which G is obtained by applying the complete closure procedure. So D is minimal w.r.t. h 0 , and thus it is the minimal balanced 4-orientation w.r.t. h 0 Suppose by contradiction that h 0 is not "in the interior and incident" to a maximal quadrangle. Then by Lemma 6, there is a unique maximal quadrangle Q whose interior contains h 0 . Since h 0 is not "in the interior and incident" to Q, it is in the strict interior of Q. The quadrangle Q corresponds to a {4, 8}-disk W of A(G) (see Figure 35). Note that W is a maximal {4, 8}-disk containing h 0 . So, by Lemma 24, in D, the {4, 8}-disk W is oriented clockwise w.r.t. its interior. It is not possible that W is a 4-disk since then h 0 is not in the strict interior of Q but incident to it. So W is a 8-disk. By Lemma 23, the edges that are in the interior of W and incident to it are entering it. Then the orientation of W and of the edges in its interior and incident to it are as depicted on Figure 36. Then by the definition of the mobile (see rule of Figure 32), there is no half-edge of M + in the interior of Q and incident to Q. So either there are some edges of G that are not covered by M + , or M + is made of several connected components. In both cases, this contradicts the fact that M + is an element of M r,s,b (n) from which G is obtained by applying the complete closure procedure. So h 0 is in the interior and incident to a maximal quadrangle of G.

Counting essentially 4-connected toroidal triangulations
Let T h (n) be the set of essentially 4-connected toroidal triangulations on n vertices, rooted at any half-edge. In this section we show how to count T h (n) (see Theorem 8). The first values of |T h (n)|, for n ≥ 0, are 0, 1, 6, 40, 268, 1801, 12120 (sequence A289208 in OEIS [Slo]). Figure 42 illustrates the six elements of T h (2).

Decomposition into planar and toroidal parts
Consider an element of T h (n). Recall that by Lemma 6, there is a unique maximal quadrangle containing the root half-edge, that we call the root quadrangle. We define the corners of a quadrangle of a map as the four angles that appear in the interior of this quadrangle when its interior is removed (if non empty). We define T h,c (n) as the set of elements of T h (n) with a marked corner of the root quadrangle. The elements of T h,c are decomposed into the toroidal part that is outside the root quadrangle and the planar part that is in the interior of the root quadrangle.
We first need the following lemma, which shows that removing the interior of the root quadrangle does not change the connectivity of the remaining part. Even if the statement has nothing to do with transversal structures, the proof is using them as in Section 2.3.

Lemma 27
If G is an essentially 4-connected toroidal triangulations given with a maximal quadrangle Q, then the map G obtained by removing all the vertices and edges that lie in the interior of Q is an essentially 4-connected toroidal map.
Proof. Let G be an essentially 4-connected toroidal triangulations given with a maximal quadrangle Q and G obtained by removing all the vertices and edges that lie in the interior of Q.
Consider a root half-edge h 0 of G that is in the interior and incident to Q. Consider the minimal balanced 4-orientation D min of A(G) w.r.t. h 0 . By Corollary 1, this 4-orientation corresponds to a transversal structure of G. Consider the {4, 8}-disk W of A(G) that is inside the maximal quadrangle Q. By Lemma 24, in D min , the {4, 8}-disk W is oriented clockwise w.r.t. its interior. Lemma 23 shows that all the edges of A(G) that are in the interior of a 8-disk of A(G) and incident to it are entering it. So the transversal structure of G represented on the maximal quadrangle Q is as depicted on one of the three cases of Figure 43 (where the outer edges represent the quadrangle Q). Recall that from Section 2.3, that for a vertex v of G ∞ , the subgraph P 0 (v) (resp. P 1 (v), P 2 (v), P 3 (v)) of G ∞ is obtained by keeping all the edges that are on an oriented path of G ∞ By Lemma 2, the subgraphs P i (v) are acyclic. Let P i (v) be defined similarly but in G ∞ . So P i (v) is a subgraph of P i (v), thus it is also acyclic. Note that removing the interior of the quadrangle Q on the three cases of Figure 43, does not change the fact that around every vertex there are edges that are outgoing blue, outgoing red, incoming blue and incoming red. So the P i (v) are infinite.
As in the proof of Lemma 4, suppose by contradiction that there exists three vertices x, y, z of G ∞ such that G = G ∞ \ {x, y, z} is not connected. Then, by Lemma 1, the graph G has a finite connected component R. Let v be a vertex of R. For i ∈ {0, 1, 2, 3}, the infinite and acyclic graph P i (v) does not lie in R so it intersects one of x, y, z. So for two distinct i, j, the two graphs P i (v) and P j (v) intersect in a vertex distinct from v. Thus the two graphs P i (v) and P j (v) intersect in a vertex distinct from v, a contradiction to Lemma 3.
Let T t c (n) be the set of essentially 4-connected toroidal maps on n vertices, where all faces are triangles, except one that is a maximal quadrangle, and, with a marked corner of this quadrangle. In particular we have |T t c (0)| = 0 and |T t c (1)| = 1. Let T p h,c (n) be the set of 4-connected planar maps on n inner vertices, where all faces are triangles, except the outer-face that is a quadrangle, with a marked corner of this quadrangle, and rooted at an inner half-edge. Note that here, n counts the number of inner vertices, so there are n + 4 vertices in an element of T p h,c (n). In particular we have |T p h,c (0)| = 4 and |T p h,c (1)| = 8. Then we have the following bijection: Lemma 28 There is a bijection between T h (n) × {1, 2, 3, 4} and 1≤k≤n (T p h,c (n − k) × T t c (k)). Proof. By Lemma 6, there is a bijection between T h (n) × {1, 2, 3, 4} and T h,c (n). By Lemma 27, there is a bijection between T h,c (n) and 1≤k≤n (T p h,c (n − k) × T t c (k)). The composition of these two bijections gives the result.
By Lemma 28, the enumeration of the elements of T h is reduced to the enumeration of their planar part T p h,c and their toroidal part T t c . Recall from Section 6.3, that a ternary tree is a plane tree, rooted at a leaf, such that every inner vertex has degree exactly four. For n ≥ 1, let A(n) denote the set of ternary trees with n inner vertices. By convention we consider that the tree composed of a single vertex is the unique element of A(0). The associated generating function satisfies: (1) The enumeration of T p h,c is given by the following lemma:

Lemma 29
|T p h,c (n)| = 4 n + 1 3n + 1 n and the associate generating function satisfies: Proof. [Fus09, Theorem 3] is a bijection between the set P(n) of (unrooted) plane tree such that every inner vertex has degree exactly four and the set T p (n) of (unrooted) 4-connected planar maps on n inner vertices, where all faces are triangles, except the outer-face that is a quadrangle. Let T p h (n) be the set of elements of T p (n) rooted at an inner half-edge. Let P o (n) be the elements of P(n) with one oriented edge. In the bijection of [Fus09, Theorem 3], each inner edge of the map corresponds to an edge of the corresponding tree. So rooting the elements of T p (n) on a particular inner half-edge, corresponds to orienting an edge of the tree. Thus we have a bijection between T p h (n) and P o (n). Cutting an element of P o (n) at the oriented edge creates bijectively a couple of ternary trees with respectively k and n − k inner vertices, with 0 ≤ k ≤ n. Hence: As shown in [GX06,p 11], the coefficients of A(z) 2 admit a simple expression: n .
An element of T p h,c (n) is obtained from an element of T p h (n) by marking one corner of the outer face. There are four such choice so T p h,c (n) = 4T p h (n) = 4P o (n) and we obtain the lemma.

Bijection with square and hexagonal unicellular maps
Given an element M + of M r,s,b (n) (see Section 6.4 for the definition), we define the unrooted mobile M associated to M + as the toroidal unicellular map obtained from M + by removing the root half-edge and the tree part attached to the root half-edge (if any). Figure 44 gives the unrooted mobile associated to the extended mobile of Figure 37.
Let M b (n) denote the set of (non-rooted) toroidal unicellular maps with exactly n vertices, n + 1 edges and 2n − 2 stems such that all vertices have degree 4, and every cycle of the map has the same number of angles on its left and right sides (balanced property).
Consider an element M + of M r,s,b (n). Let k ≥ 0 be the number of vertices in the tree part attached to the root half-edge (if any), with k = 0 if the root half-edge is a stem. Then one can see that the unrooted mobile M associated to M + is an element of M b (n − k).
Consider an element M of M b (n). A mobile-labeling of M is a labeling of the half-edges of M with integers 0, 1, 2, 3 such that the labels that appear around each vertex are exactly 0, 1, 2, 3 in counterclockwise order and the two labels that appear on each edge differ exactly by (2 mod 4), see right of Figure 34 for an example. Let G be the graph obtained from M by closing all its admissible triples. Since, M has 2n − 2 stems, we have that G is a "toroidal triangulation minus one edge", i.e. a toroidal map whose all faces are triangles except one that is a quadrangle. The extension of to G is the labeling of all the half-edges of G obtained from by keeping the property that the two labels that appear on each edge differs exactly by 2 mod 4. Next lemma shows that the quadrangle of G is labeled as on Figure 45 in the extension of the mobile-labeling.
Each angle of M corresponds to consecutive angles of G (reattaching a stem into an angle, splits this angle in two). Conversely, to each angle of G we can associate the unique corresponding angle of M from which it comes from. Then we have the following: Lemma 30 Consider an element M of M b (n) given with a particular angle α. Then M admits a unique mobile-labeling, noted (α), such that the angle α is between half-edges labeled 0 and 1. Moreover, after closing the admissible triples of M to obtain G, the extension of (α) to G is such that the quadrangle Q of G is labeled as on Figure 45. And the four angles of M that corresponds to the angles of Q are incident to half-edges with exactly the same labels in M and in Q. Proof. The toroidal unicellular map M has n vertices, n + 1 edges and 2n − 2 stems such that all vertices have degree 4, and every cycle of the map has the same number of angles on its left and right sides.
Let h be the half-edge of M that is incident to α and just after α in clockwise order around its incident vertex. Let (α) be the labeling of the half-edges of M with integers 0, 1, 2, 3 obtained by the following: Label h with 0 and then extend the labeling to all the half-edges of M by keeping the property that the labels that appear around each vertex are exactly 0, 1, 2, 3 in counterclockwise order and the two labels that appear on each edge differ exactly by (2 mod 4). This is possible and consistent since every cycle of the map has the same number of angles on its left and right sides. Indeed, given a cycle C of length k, there are 2k angles on each sides, so the modification of the labels while starting from a half-edge of C, walking along C and going back to the starting half-edge is the following: the number of edges of C times (2 mod 4), i.e. (2k mod 4), plus the number of angles on the right side of C, i.e. (2k mod 4), so (4k mod 4) = 0 in total. Thus, this definition of the mobile-labeling (α) is consistent and moreover it is the unique such labeling. So we have the first part of the lemma.
Let M 0 = M . For 1 ≤ k ≤ 2n − 2, let M k be the map obtained from M k−1 by closing an admissible triple of M k−1 . Extend the labeling (α) while closing admissible triples by keeping the property that the two labels that appear on each edge differs exactly by 2 mod 4. We prove by induction on k, that each map M k , for 0 ≤ k ≤ 2n − 2, satisfies the following: each angle of the special face of M k is between half-edges whose labels are distinct (and precisely the same as for the corresponding angle of M k−1 if k ≥ 1), moreover the labels that appear in counterclockwise order around each vertex of M k form four non-empty intervals of 0, 1, 2, 3. Indeed, M 0 satisfies the property and suppose that for 1 ≤ k ≤ 2n − 2, we have M k−1 that satisfies the property. Consider the admissible triple (e 1 , e 2 , s) of M k−1 that is closed to obtain M k . Let e 1 = {u, v} and e 2 = {v, w} with s is a stem attached to w. Let i ∈ {0, 1, 2, 3} such that s is labeled i. Then since M k−1 satisfies the property on the labels we have that: • the half-edge of e 2 incident to w is labeled (i + 1) mod 4 • the half-edge of e 2 incident to v is labeled (i + 3) mod 4 • the half-edge of e 1 incident to v is labeled i • the half-edge h u of e 1 incident to u is labeled (i + 2) mod 4 Conversely, let Z be an element of T r (n) and consider its image G by a. We have Z is an essentially 4-connected toroidal triangulation on n vertices rooted at a half-edge that is in the interior and incident to a maximal quadrangle, and such that the two faces incident to the root half-edge form a maximal quadrangle. So G is a toroidal map on n vertices, where all faces are triangles, except one that is a maximal quadrangle and with a marked corner of this quadrangle. The map G is obtained from Z by removing the interior of a maximal quadrangle so, by Lemma 27, G is essentially 4-connected. So G is in T t c (n). We clearly have a • a = Id. So a is a bijection from T t c (n) to T r (n). ♦ Let g be the restriction of the bijection g, defined in the proof of Theorem 7, to the elements of T r (n). Let M r,s,b (n) be the subset of M r,s,b (n) (see definition in Section 6.4) such that the root half-edge is a stem. We claim the following: Claim 4 g is a bijection from T r (n) to M r,s,b (n).
Proof. Let Z be an element of T r (n) and M + ∈ M r,s,b (n) its image by g. By definition of T r (n), the two faces incident to the root half-edge h 0 form a maximal quadrangle Q.
In the minimal balanced 4-orientation of A(Z) w.r.t. h 0 , the 4-disk W inside Q is oriented clockwise by Lemma 24 (see left of Figure 36). Then by the definition of the mobile (see rule of Figure 32), there is no half-edge of M + in the interior of Q except h 0 . So h 0 is a stem of M + . So M + is in M r,s,b (n).
Let g be the restriction of g −1 to the elements of M r,s,b (n). Since g is a bijection, we have g • g = Id.
Conversely, let M + be an element of M r,s,b (n) and consider its image Z by g −1 . By the proof of Theorem 7, the complete closure procedure on M + gives an essentially 4-connected toroidal triangulation Z of T r (n) rooted at h 0 and such that h 0 is in the interior and incident to a maximal quadrangle Q . Moreover, M + is the extended mobile associated to the minimal balanced 4-orientation D min of A(Z) w.r.t. h 0 . The quadrangle Q corresponds to a {4, 8}disk W of A(Z) (see Figure 35). Note that W is a maximal {4, 8}-disk containing h 0 . So, by Lemma 24, W is oriented clockwise w.r.t. its interior in D min . Then, by Lemma 23, the orientation of W and of the edges in its interior and incident to it are as depicted on Figure 36. Then by the definition of the mobile (see rule of Figure 32), there is no half-edge of M + , distinct from h 0 , in the interior of Q and incident to Q . Since M + is covering all the edges of Z, we have that Q has no edges in its interior, except the one containing h 0 . So Q is the quadrangle formed by the two faces incident to h 0 . So the two faces incident to h 0 form a maximal quadrangle and so Z is an element of T r (n).
Since g is a bijection, we have g • g = Id. So g is a bijection from T r (n) to M r,s,b (n). ♦ Let r (for "remove") be the mapping defined on the elements (M + , x) of M r,s,b (n)×{1, 2}, that removes the root half-edge h 0 of M + that is a stem and roots the obtained mobile M at an angle of a special vertex by the following rule. Let α be the angle of M such that M + is obtained from M by adding h 0 in the angle α. Consider the unique mobile-labeling (α) of M , given by Lemma 30. If M is square, let β be the angle of the special vertex of M that is between the half-edges labeled 0 and 1. In this case, r returns (M, x) rooted at β. If M is hexagon, let v 1 (resp. v 2 ) be the first (resp. second) special vertex of M that is encountered while walking counterclockwise along the border of the unique face of M , starting from α.  generating function. There are four possible root angles around v 1 , so we have: S h a (u, v, z) = 4z 2 (uv + 1 uv + 1)(GM (z, uv).GM (z, u).GM (z, v)) = − 4z 2 (u 2 v 2 + uv + 1)uv (u 2 z + uz − u + z)(v 2 z + vz − v + z)(u 2 v 2 z + uvz − uv + z) .
Observe that S h b,a (z) = [v 0 ][u 0 ]S h a (u, v, z). The denominator of S h a (u, v, z), seen as a polynomial of u admits four roots: U, 1 U , U v and 1 U v where U = 1−z− √ −3z 2 −2z+1 2z , and we have: .
Hence S h a (u, v, z) can be converted into partial fractions of u: S h a (u, v, z) = A.
where A = 4v 3 U 3 (v−1)(U 2 −1)(v 2 z+vz−v+z) . As A = O(z 3 ) and U = O(z) (when z tends to 0), this identity splits into a sum of four power series in z with coefficients in Q[u, 1 u , v, 1 v ], two with only negative powers of u and two with only nonnegative powers of u.

Conclusion
In this paper, we have generalized transversal structures and some of its applications to the toroidal case. Using only a local property in the definition, as in the planar case, is not enough to obtain interesting properties. Indeed, the set of toroidal transversal structures of a given toroidal map is partitioned into several distributive lattices. The main point of this paper is to be able to find a global property, called "balanced", that such an object may have or may not have. Then, the set of balanced objects defines a unique lattice whose minimal element has properties useful to apply techniques devised for the planar case. This is very similar to what happens for Schnyder woods for which it is also possible to define an analogous balanced property (see [Lév17]). Then, one can apply on these minimal balanced objects, the "mobile method" as here, or alternatively "Poulalhon and Schaeffer's method" as in [DGL17], to obtain bijections between the considered classes of toroidal maps and particular toroidal unicellular maps. This seems to be a general framework that can be applied to various classes of toroidal maps and their corresponding set of α-orientations. In a paper to come of Eric Fusy and the second author, a similar balanced property is found for toroidal fractional d d−2orientations with similar bijective consequences. A challenging question is to see if one can go further and found a generalization of the balanced property in higher genus. Currently we have no idea of what could be the answer even for the double torus.
Schnyder woods and transversal structures are also used in the planar case to compute straightline grid drawings of plane triangulations [Sch89,Fus09]. Recently toroidal Schnyder woods have been used to obtain drawings of toroidal graphs (see [GL14]). Another natural application of toroidal transversal structures would be a straightline grid drawing algorithm of essentially 4-connected toroidal triangulations.