on dangling edges defined at stage I. Note that all the *B*-edges have now been matched to type *B* vertices. We end up with a sequence of *supernodes*, which are trees with roots *O*, *A*₁, ..., *A*ₐ, subtrees made of type *B* vertices, and dangling *A*-edges. Observe that the distinguished *A*-edge always belongs to the supernode with root *O* (precisely, the first edge incident to *O* is either the distinguished *A*-edge when *w*₀⁽¹⁾ = *A*, or leads to a subtree which contains it when *w*₀⁽¹⁾ = *B*).

IV. Viewing the supernodes as compound vertices, we form a plane forest with $a^O$ trees by assembling the supernodes with roots $A_1, \dots, A_a$ via their dangling $A$-edges. Note that the number of “children” of a supernode is prescribed by its number of dangling $A$-edges. By Proposition 44, there are $(a-1)!$ ways to do so (with $A_1$ in the first tree).

V. We then complete the construction by attaching these trees to the $A$-edges of the supernode with root $O$, starting with the first tree which we attach to the distinguished $A$-edge, and then proceeding circularly using the order of stage I. All dangling edges have now been matched, and vertex 1 is in the first tree by construction.

It is plain from stage I that we obtain a forest of type array $\boldsymbol{w}$. Furthermore, each such forest is obtained in precisely one way, as we may check that it is obtained for a unique choice of the second distinguished dangling edge at stage I$^8$ and of the one-type forests at stages II and IV. $\square$

*Remark 47.* The factor $a^O b^O + a^O b^A + a^B b^O$ in (84) corresponds to a sum over the three Cayley trees on the set $\{O, A, B\}$. For $k$ types of vertices there would be as many terms as Cayley trees on a set with $k+1$ elements [BS13].

## B. Symmetrizing the planar lattice count quasi-polynomials

Let us fix an integer $n \ge 3$ and denote by $\Pi(m_1, \dots, m_n)$ the right-hand side of (71). It is manifest that it is a quasi-polynomial in $2m_1, \dots, 2m_n$ of degree $n-3$, since $\pi_{r,s}^{(\epsilon)}(m)$ is a univariate quasi-polynomial in $2m$ of degree $r+s$. The purpose of this appendix is to show that $\Pi(m_1, \dots, m_n)$ is in fact symmetric in $m_1, \dots, m_n$, which we will do by rewriting it in a manifestly symmetric form. Note that the expression (71) displays a symmetry in $m_4, \dots, m_n$ only. Here we assume only that $m_i \in \mathbb{Z}/2, i = 1, \dots, n$ without further restriction.

It is useful to introduce compact notations for the high-dimensional sums appearing

<footnote>$^8$Precisely, if $w_1^{(0)} = A$ then the distinguished *B*-edge corresponds to the edge closest to $B_1$ attached to a parent not of type *B*, and if $w_1^{(0)} = B$ then the distinguished *A*-edge corresponds to the parent edge of the oldest type *A* ancestor of $A_1$.</footnote>
equal to the symmetric polynomial $(n-3)!p_{n-3}(m_1, \dots, m_n)$ when all $m_i$ are integers, and to zero otherwise, hence it is symmetric like the rest.

The expression above for $\Pi(m_1, \dots, m_n)$ is precisely the right-hand side of (5.27). Indeed, we already noticed that $I_{s \ge 1}$ is nothing but the set $I_n$ defined in (2.29), hence the sum over $I_{s \ge 1}$ gives the first term in the right-hand side of (5.27). Furthermore, the set $I_{s=0}$ consists of tuples such that $s_i = 0$ for all $i$, exactly two $\epsilon_i$ are equal to 0, and $r_1 + \dots + r_n = r = n-3$, hence the sum over $I_{s=0}$ corresponds to the second term in (5.27). Finally, the sum over $I_{s=0}^{(-1,1)}$ corresponds to the third term in (5.27).

In order to prove Proposition B.1, we will first record the following:

**Proposition B.2.** The univariate polynomials $\pi_{r,s}^{(\epsilon)}(m)$ satisfy the relations

$$s\pi_{r,s}^{(\epsilon)}(m) = (r+1)\pi_{r+1,s-1}^{(\epsilon+1)}(m), \qquad (B.5)$$

$$\pi_{r,s}^{(1)}(m) = \pi_{r,s}^{(-1)}(m) + \pi_{r-1,s}^{(-1)}(m), \qquad (B.6)$$

$$s\pi_{r,s}^{(1)}(m) = (r+1)\pi_{r+1,s-1}^{(0)}(m) + r\pi_{r,s-1}^{(0)}(m), \qquad (B.7)$$

valid for all $r, s \ge 0$ and all integer $\epsilon$, with the convention that $\pi_{-1,s}^{(\epsilon)} = \pi_{r,-1}^{(\epsilon)} = 0$.

*Proof.* The first relation follows immediately from the mere definition (2.26) of $\pi_{r,s}^{(\epsilon)}(m)$. For the two other ones, we make use of the “dilaton-like” equation

$$kp_{k,e+2}(m) = kp_{k,e}(m) + (k-e)p_{k-1,e}(m) \qquad (B.8)$$

which can be checked from the definition (2.25) of $p_{k,e}(m)$ and is valid for all $k \ge 0$, with the convention that $p_{-1,e}(m) = 0$. This dilaton-like equation implies immediately (B.6), and to get (B.7) we first apply (B.5) at $\epsilon = 1$ then the dilaton-like equation to go back from $\pi^{(2)}$'s to $\pi^{(0)}$'s. $\square$

**Lemma B.3 (Transmutation relations).** For any $j = 1, \dots, n$, we have

$$\sum_{I_{s \ge 1}} r!(s-1)!(\bar{\epsilon}_j s_j) \prod_{i=1}^{n} \pi_{r_i, s_i}^{(\epsilon_i)}(m_i) = \sum_{I_{r \ge 1}} (r-1)! s!(\epsilon_j r_j) \prod_{i=1}^{n} \pi_{r_i, s_i}^{(\epsilon_i)}(m_i). \qquad (B.9)$$

We also have the four identities

$$\sum_{I_{s \ge 1}^{(-1,1)}} r!(s-1)! \epsilon_3 s_1 \prod_{i=1}^{n} \pi_{r_i, s_i}^{(\epsilon_i)}(m_i) = \sum_{I_{r \ge 1}^{(0,1)}} (r-1)! s! \epsilon_3 r_1 \prod_{i=1}^{n} \pi_{r_i, s_i}^{(\epsilon_i)}(m_i), \qquad (B.10)$$

$$\sum_{I_{s \ge 1}^{(-1,1)}} r!(s-1)! \epsilon_3 s_2 \prod_{i=1}^{n} \pi_{r_i, s_i}^{(\epsilon_i)}(m_i) = \sum_{I_{s \ge 1}^{(1,-1)}} r!(s-1)! \epsilon_3 s_2 \prod_{i=1}^{n} \pi_{r_i, s_i}^{(\epsilon_i)}(m_i) \\ = \sum_{I_{r \ge 1}^{(1,0)}} (r-1)! s! \epsilon_3 r_2 \prod_{i=1}^{n} \pi_{r_i, s_i}^{(\epsilon_i)}(m_i), \qquad (B.11)$$
in (71). Let $I$ be the finite subset of $\{0,1\}^n \times \mathbb{Z}_{\ge 0}^n \times \mathbb{Z}_{\ge 0}^n$ defined by

$$ I := \left\{ \begin{pmatrix} \epsilon_1, \dots, \epsilon_n \\ r_1, \dots, r_n \\ s_1, \dots, s_n \end{pmatrix} : \sum_{i=1}^{n} \epsilon_i = \sum_{i=1}^{n} r_i + 1 \\ \sum_{i=1}^{n} (1 - \epsilon_i) = \sum_{i=1}^{n} s_i + 2 \right\}. \quad (86) $$

Given a tuple in $I$, we set

$$ r := \sum_{i=1}^{n} r_i, \qquad s := \sum_{i=1}^{n} s_i, \qquad (87) $$

and note that $r+s=n-3$ by the definition of $I$. Let $I_{r \ge 1}$, $I_{r=0}$, $I_{s \ge 1}$, and $I_{s=0}$, be the subsets of $I$ consisting of tuples such that $r \ge 1$, $r=0$, $s \ge 1$, and $s=0$, respectively. Note that the set $I_n$ introduced in (29) corresponds in our present notations to $I_{s \ge 1}$. Note also that $I_{r=0}$ consists of tuples such that $r_i=0$ for all $i$, exactly one $\epsilon_i$ is equal to 1, and $s_1+\dots+s_n=s=n-3$. Similarly, $I_{s=0}$ consists of tuples such that $s_i=0$ for all $i$, exactly two $\epsilon_i$ are equal to 0, and $r_1+\dots+r_n=r=n-3$.

For $e_1, e_2 \in \{0,1\}$, we let $I^{(e_1,e_2)}$ be the subset of $I$ consisting of tuples such that $\epsilon_1 = e_1$ and $\epsilon_2 = e_2$. We also allow for the value $e_1 = -1$, which means that we consider tuples such that $\epsilon_1 = -1$, keeping the sum condition in (86) unchanged. The notations $I_{r \ge 1}^{(e_1,e_2)}$, etc, should hopefully be self-explanatory. Note that $I_{s=0}^{(-1,1)}$ consists of tuples such that $s_i=0$ for all $i$, $\epsilon_1 = -1$ and $\epsilon_i = 1$ for all $i \ge 2$, and $r_1+\dots+r_n=r=n-3$. We finally use, for $\epsilon \in \{0,1\}$, the shorthand notation $\bar{\epsilon} := 1-\epsilon$ (which we shall never use for $\epsilon = -1$).

Armed with all these notations, we can rewrite $\Pi(m_1, \dots, m_n)^9$ as

$$ \begin{aligned} \Pi(m_1, \dots, m_n) = & \sum_{I_{s=0}^{(-1,1)} \cup I_{s=0}^{(0,0)} \cup I_{r=0}^{(0,1)} \cup I_{r=0}^{(1,0)}} r!(s-1)! \left( \epsilon_3(s_1+s_2) + \sum_{j=3}^{n} \epsilon_j s_j \right) \prod_{i=1}^{n} \pi_{r_i, s_i}^{(\epsilon_i)}(m_i) \\ & + \sum_{I_{r=1}^{(0,1)} \cup I_{r=1}^{(1,0)}} (r-1)!s! \left( \bar{\epsilon}_3(r_1+r_2) + \sum_{j=3}^{n} \bar{\epsilon}_j r_j \right) \prod_{i=1}^{n} \pi_{r_i, s_i}^{(\epsilon_i)}(m_i) \\ & + \sum_{I_{s=0}^{(-1,1)} \cup I_{s=0}^{(0,0)} \cup I_{r=0}^{(0,1)} \cup I_{r=0}^{(1,0)}} r!s! \prod_{i=1}^{n} \pi_{r_i, s_i}^{(\epsilon_i)}(m_i). \end{aligned} \quad (88) $$

Here, the first (resp. second) sum corresponds to the first (resp. second) sum in (71) when at least one of the $s_i$'s (resp. one of the $r_i$'s) is non zero, hence when $s \ge 1$ (resp. $r \ge 1$); the third sum accounts for the conventional values in (71): $(\epsilon_3(s_1+s_2) + \sum_{i=3}^n \epsilon_i s_i)(\sum_{i=1}^n s_i - 1)! \to 1 = s!$ when all the $s_i$'s are zero (or equivalently $s=0$) and $(\bar{\epsilon}_3(r_1+r_2) + \sum_{i=3}^n \bar{\epsilon}_i r_i)(\sum_{i=1}^n r_i - 1)! \to 1 = r!$ when all the $r_i$'s are zero (or equivalently $r=0$).

<footnote n="9">⁹Here we use the shorthand notation $\sum_J(\cdot)$ for $\sum_{(\epsilon_1, \dots, \epsilon_n) \atop (r_1, \dots, r_n) \in J} (\cdot)$.</footnote>
$$ \sum_{I_{s \ge 1}^{(1,0)}} (r-1)!s! \bar{\epsilon}_3 r_1 \prod_{i=1}^{n} \pi_{r_i, s_i}^{(\epsilon_i)}(m_i) = \sum_{I_{r \ge 1}^{(0,0)}} r!(s-1)! \bar{\epsilon}_3 s_1 \prod_{i=1}^{n} \pi_{r_i, s_i}^{(\epsilon_i)}(m_i), \quad (B.12) $$

$$ \sum_{I_{s \ge 1}^{(0,1)}} (r-1)!s! \bar{\epsilon}_3 r_2 \prod_{i=1}^{n} \pi_{r_i, s_i}^{(\epsilon_i)}(m_i) = \sum_{I_{r \ge 1}^{(0,0)}} r!(s-1)! \bar{\epsilon}_3 s_2 \prod_{i=1}^{n} \pi_{r_i, s_i}^{(\epsilon_i)}(m_i). \quad (B.13) $$

Finally, for $j \ge 3$ we have

$$ \sum_{I_{s \ge 1}^{(-1,1)}} r!(s-1)!(\epsilon_j s_j) \prod_{i=1}^{n} \pi_{r_i, s_i}^{(\epsilon_i)}(m_i) = \sum_{I_{r \ge 1}^{(1,1)}} (r-1)!s!(\bar{\epsilon}_j r_j) \prod_{i=1}^{n} \pi_{r_i, s_i}^{(\epsilon_i)}(m_i). \quad (B.14) $$

*Proof.* In the left-hand side of (B.9), the only contributing tuples are those with $\epsilon_j = 0$. By applying the relation (B.5) to the factor $s_j \pi_{r_j, s_j}^{(0)}(m_j)$ appearing in the product, and by performing the change of variables $\bar{\epsilon}_j \to \epsilon_j$, $r_j + 1 \to r_j$, $s_j - 1 \to s_j$ (leaving all other elements of the tuples unchanged), we obtain precisely the nonzero terms of the right-hand side.

The proofs of the identities (B.10) and (B.12) are entirely similar, applying now (B.5) to the factor $s_1 \pi_{r_1, s_1}^{(\epsilon_1)}(m_1)$ (with $\epsilon_1 = -1, 0$) appearing in the left-hand side of (B.10) (with $\epsilon_1 = -1$) and in the right-hand side of (B.12) (with $\epsilon_1 = 0$). For (B.11) and (B.13), we proceed in the same way (now with $\epsilon_2 = -1, 0$), after noting that that it is possible to first replace $I_{s \ge 1}^{(-1,1)}$ by $I_{s \ge 1}^{(1,-1)}$ in (B.11) (as indicated by the $\stackrel{(*)}{=}$ sign) using (B.6) and appropriate changes of variables.

For (B.14), we apply (B.7) to the factor $s_j \pi_{r_j, s_j}^{(1)}(m_j)$ in the left-hand side (as only the tuples with $\epsilon_j = 1$ contribute), and we apply (B.6) to the factor $\pi_{r_1, s_1}^{(1)}(m_1)$ in the right-hand side. Appropriate changes of variables then show that the difference vanishes. $\square$

*Proof of Proposition B.1.* Note that the left-hand sides of (B.10)-(B.13) all appear in (B.3), up to $\epsilon_3$ or $\bar{\epsilon}_3$ prefactors. Changing them into the corresponding right-hand sides, and using $\epsilon_3 + \bar{\epsilon}_3 = 1$, allows to write (B.3) as

$$ \begin{aligned} \Pi(m_1, \dots, m_n) = & \sum_{I_{s \ge 1}^{(-1,1)}} r!(s-1)! \left( \sum_{j=3}^{n} \epsilon_j s_j \right) \prod_{i=1}^{n} \pi_{r_i, s_i}^{(\epsilon_i)}(m_i) \\ & + \sum_{I_{s \ge 1}^{(0,0)}} r!(s-1)! \left( s_1 + s_2 + \sum_{j=3}^{n} \epsilon_j s_j \right) \prod_{i=1}^{n} \pi_{r_i, s_i}^{(\epsilon_i)}(m_i) \\ & + \sum_{I_{r \ge 1}^{(0,1)} \cup I_{r \ge 1}^{(1,0)}} (r-1)!s! \left( \sum_{j=1}^{n} \bar{\epsilon}_j r_j \right) \prod_{i=1}^{n} \pi_{r_i, s_i}^{(\epsilon_i)}(m_i) \\ & + \sum_{I_{s=0}^{(-1,1)} \cup I_{s=0}^{(0,0)} \cup I_{r=0}^{(0,1)} \cup I_{r=0}^{(1,0)}} r! s! \prod_{i=1}^{n} \pi_{r_i, s_i}^{(\epsilon_i)}(m_i). \end{aligned} \quad (B.15) $$

By the transmutation relation (B.14), we may replace the sum over $I_{s \ge 1}^{(-1,1)}$ in the first line by a sum over $I_{r \ge 1}^{(1,1)}$ in the third line. This gives a sum over $I_{r \ge 1}^{(0,1)} \cup I_{r \ge 1}^{(1,0)} \cup I_{r \ge 1}^{(1,1)}$ which we can rewrite
The main result of this appendix is:

**Proposition 48.** The quasi-polynomial $\Pi(m_1, \dots, m_n)$ is symmetric in $m_1, \dots, m_n$ and admits the expression

$$ \Pi(m_1, \dots, m_n) = \sum_{I_{s \ge 1}} r!(s-1)! \left( \sum_{j=1}^{n} \epsilon_j s_j \right) \prod_{i=1}^{n} \pi_{r_i, s_i}^{(\epsilon_i)}(m_i) + \sum_{I_{s=0}^{(-1,1)} \cup I_{s=0}} r! s! \prod_{i=1}^{n} \pi_{r_i, s_i}^{(\epsilon_i)}(m_i). \quad (89) $$

Note that the sum over $I_{s=0}^{(-1,1)}$ is equal to $(n-3)! \sum_{r_1+\dots+r_n=n-3} \pi_{r_1,0}^{(-1)}(m_1) \prod_{i=2}^{n} \pi_{r_i,0}^{(1)}(m_i)$ which is equal to the symmetric polynomial $(n-3)!p_{n-3}(m_1, \dots, m_n)$ when all $m_i$ are integers, and to zero otherwise, hence it is symmetric like the rest.

The expression above for $\Pi(m_1, \dots, m_n)$ is precisely the right-hand side of (78). Indeed, we already noticed that $I_{s \ge 1}$ is nothing but the set $I_n$ defined in (29), hence the sum over $I_{s \ge 1}$ gives the first term in the right-hand side of (78). Furthermore, the set $I_{s=0}$ consists of tuples such that $s_i = 0$ for all $i$, exactly two $\epsilon_i$ are equal to 0, and $r_1 + \dots + r_n = r = n-3$, hence the sum over $I_{s=0}$ corresponds to the second term in (78). Finally, the sum over $I_{s=0}^{(-1,1)}$ corresponds to the third term in (78).

In order to prove Proposition 48, we will first record the following:

**Proposition 49.** The univariate polynomials $\pi_{r,s}^{(\epsilon)}(m)$ satisfy the relations

$$ s\pi_{r,s}^{(\epsilon)}(m) = (r+1)\pi_{r+1,s-1}^{(\epsilon+1)}(m), \quad (90) $$

$$ \pi_{r,s}^{(1)}(m) = \pi_{r,s}^{(-1)}(m) + \pi_{r-1,s}^{(-1)}(m), \quad (91) $$

$$ s\pi_{r,s}^{(1)}(m) = (r+1)\pi_{r+1,s-1}^{(0)}(m) + r\pi_{r,s-1}^{(0)}(m), \quad (92) $$

valid for all $r, s \ge 0$ and all integer $\epsilon$, with the convention that $\pi_{-1,s}^{(\epsilon)} = \pi_{r,-1}^{(\epsilon)} = 0$.

*Proof.* The first relation follows immediately from the mere definition (26) of $\pi_{r,s}^{(\epsilon)}(m)$. For the two other ones, we make use of the “dilaton-like” equation

$$ k p_{k,e+2}(m) = k p_{k,e}(m) + (k-e) p_{k-1,e}(m) \quad (93) $$

which can be checked from the definition (25) of $p_{k,e}(m)$ and is valid for all $k \ge 0$, with the convention that $p_{-1,e}(m) = 0$. This dilaton-like equation implies immediately (91), and to get (92) we first apply (90) at $\epsilon = 1$ then the dilaton-like equation to go back from $\pi^{(2)}$'s to $\pi^{(0)}$'s. $\square$

**Lemma 50 (Transmutation relations).** For any $j = 1, \dots, n$, we have

$$ \sum_{I_{s \ge 1}} r!(s-1)!(\bar{\epsilon}_j s_j) \prod_{i=1}^{n} \pi_{r_i, s_i}^{(\epsilon_i)}(m_i) = \sum_{I_{r \ge 1}} (r-1)! s! (\epsilon_j r_j) \prod_{i=1}^{n} \pi_{r_i, s_i}^{(\epsilon_i)}(m_i). \quad (94) $$
as a sum over $I_{r \ge 1}^{(0,0)}$. We claim that this latter sum will almost cancel the sum over $I_{s \ge 1}^{(0,0)}$ in the second line. Indeed, by writing $s_1 + s_2 + \sum_{j=3}^n \epsilon_j s_i = s - \sum_{j=3}^n \bar{\epsilon}_j s_j$ in the sum over $I_{s \ge 1}^{(0,0)}$, and $\sum_{j=1}^n \bar{\epsilon}_j r_j = r - \sum_{j=3}^n \epsilon_j r_j$ in the sum over $I_{r \ge 1}^{(0,0)}$, we see using the transmutation relation (B.9) that their difference evaluates to

$$ \left( \sum_{I_{s \ge 1}^{(0,0)}} - \sum_{I_{r \ge 1}^{(0,0)}} \right) r! s! \prod_{i=1}^{n} \pi_{r_i, s_i}^{(\epsilon_i)}(m_i) = \left( \sum_{I_{r=0}^{(0,0)}} - \sum_{I_{s=0}^{(0,0)}} \right) r! s! \prod_{i=1}^{n} \pi_{r_i, s_i}^{(\epsilon_i)}(m_i). \quad (B.16) $$

Observe that the sum over $I_{s=0}^{(0,0)}$ precisely cancels the one appearing in the last line of (B.15), and the sums over $I_{r=0}^{(0,0)}$, $I_{r=0}^{(0,1)}$ and $I_{r=0}^{(1,0)}$ combine to form a sum over $I_{r=0}$. We arrive at the expression

$$ \Pi(m_1, \dots, m_n) = \sum_{I_{r \ge 1}} (r-1)! s! \left( \sum_{j=1}^{n} \bar{\epsilon}_j r_j \right) \prod_{i=1}^{n} \pi_{r_i, s_i}^{(\epsilon_i)}(m_i) + \sum_{I_{s=0}^{(-1,1)} \cup I_{r=0}} r! s! \prod_{i=1}^{n} \pi_{r_i, s_i}^{(\epsilon_i)}(m_i) \quad (B.17) $$

which is interesting on its own, since it is already symmetric in $m_1, \dots, m_n$, see again the remark below (B.4). To obtain the wanted final expression, we write $\sum_{j=1}^n \bar{\epsilon}_j r_j = r - \sum_{j=1}^n \epsilon_j r_j$ in the sum over $I_{r \ge 1}$ and apply again the transmutation relation (B.9) and the identity (B.16), changing the sum over $I_{r \ge 1}$ and that over $I_{r=0}$ into the sum over $I_{s \ge 1}$ and that over $I_{s=0}$ of (B.4), leaving the sum over $I_{s=0}^{(-1,1)}$ unchanged. $\square$

## Acknowledgements

We thank Axel Bacher and Gilles Schaeffer for valuable discussions. JB acknowledges the hospitality of the Laboratoire de Physique of ENS de Lyon, where part of this work was completed.

## References

[Bet20] Jérémie Bettinelli. Slit-slide-sew bijections for bipartite and quasibipartite plane maps. *The Electronic Journal of Combinatorics*, 27(3):research paper p3.4, 23, 2020. doi: 10.37236/9069.

[BG12] Jérémie Bouttier and Emmanuel Guitter. Planar maps and continued fractions. *Comm. Math. Phys.*, 309(3):623–662, 2012. arXiv:1007.0419, doi:10.1007/s00220-011-1401-z.

[BG14] Jérémie Bouttier and Emmanuel Guitter. On irreducible maps and slices. *Combin. Probab. Comput.*, 23(6):914–972, 2014. arXiv:1303.3728, doi:10.1017/S0963548314000340.
We also have the four identities

$$
\begin{align}
\sum_{I_{s \ge 1}^{(-1,1)}} r!(s-1)! \epsilon_3 s_1 \prod_{i=1}^{n} \pi_{r_i, s_i}^{(\epsilon_i)}(m_i) &= \sum_{I_{r \ge 1}^{(0,1)}} (r-1)!s! \epsilon_3 r_1 \prod_{i=1}^{n} \pi_{r_i, s_i}^{(\epsilon_i)}(m_i), \nonumber \\
\sum_{I_{s \ge 1}^{(-1,1)}} r!(s-1)! \epsilon_3 s_2 \prod_{i=1}^{n} \pi_{r_i, s_i}^{(\epsilon_i)}(m_i) &\stackrel{(*)}{=} \sum_{I_{s \ge 1}^{(1,-1)}} r!(s-1)! \epsilon_3 s_2 \prod_{i=1}^{n} \pi_{r_i, s_i}^{(\epsilon_i)}(m_i) \nonumber \\
&= \sum_{I_{r \ge 1}^{(1,0)}} (r-1)!s! \epsilon_3 r_2 \prod_{i=1}^{n} \pi_{r_i, s_i}^{(\epsilon_i)}(m_i), \tag{95}
\end{align}
$$

$$
\sum_{I_{s \ge 1}^{(1,0)}} (r-1)!s! \bar{\epsilon}_3 r_1 \prod_{i=1}^{n} \pi_{r_i, s_i}^{(\epsilon_i)}(m_i) = \sum_{I_{r \ge 1}^{(0,0)}} r!(s-1)! \bar{\epsilon}_3 s_1 \prod_{i=1}^{n} \pi_{r_i, s_i}^{(\epsilon_i)}(m_i),
$$

$$
\sum_{I_{s \ge 1}^{(0,1)}} (r-1)!s! \bar{\epsilon}_3 r_2 \prod_{i=1}^{n} \pi_{r_i, s_i}^{(\epsilon_i)}(m_i) = \sum_{I_{r \ge 1}^{(0,0)}} r!(s-1)! \bar{\epsilon}_3 s_2 \prod_{i=1}^{n} \pi_{r_i, s_i}^{(\epsilon_i)}(m_i).
$$

Finally, for $j \ge 3$ we have

$$
\sum_{I_{s \ge 1}^{(-1,1)}} r!(s-1)!(\epsilon_j s_j) \prod_{i=1}^{n} \pi_{r_i, s_i}^{(\epsilon_i)}(m_i) = \sum_{I_{r \ge 1}^{(1,1)}} (r-1)!s!(\bar{\epsilon}_j r_j) \prod_{i=1}^{n} \pi_{r_i, s_i}^{(\epsilon_i)}(m_i). \quad (96)
$$

Proof. In the left-hand side of (94), the only contributing tuples are those with $\epsilon_j = 0$. By applying the relation (90) to the factor $s_j \pi_{r_j, s_j}^{(0)}(m_j)$ appearing in the product, and by performing the change of variables $\bar{\epsilon}_j \to \epsilon_j$, $r_j + 1 \to r_j$, $s_j - 1 \to s_j$ (leaving all other elements of the tuples unchanged), we obtain precisely the nonzero terms of the right-hand side.

The proof of the first and third identities in (95) is entirely similar, applying now (90)
to the factor $s_1 \pi_{r_1, s_1}^{(\epsilon_1)}(m_1)$ (with $\epsilon_1 = -1, 0$) appearing in the left-hand side of the first
identity (with $\epsilon_1 = -1$) and in the right-hand side of the third one (with $\epsilon_1 = 0$). For
the second and fourth identities, we proceed in the same way (now with $\epsilon_2 = -1, 0$), after
noting that it is possible to first replace $I_{s \ge 1}^{(-1,1)}$ by $I_{s \ge 1}^{(1,-1)}$ in the second identity (as
indicated by the $\stackrel{(*)}{=} \text{sign}$) using (91) and appropriate changes of variables.

For (96), we apply (92) to the factor $s_j \pi_{r_j, s_j}^{(1)}(m_j)$ in the left-hand side (as only the
tuples with $\epsilon_j = 1$ contribute), and we apply (91) to the factor $\pi_{r_1, s_1}^{(1)}(m_1)$ in the right-
hand side. Appropriate changes of variables then show that the difference vanishes. $\square$

*Proof of Proposition 48.* Note that the left-hand sides of (95) all appear in (88), up to $\epsilon_3$
or $\bar{\epsilon}_3$ prefactors. Changing them into the associated right-hand sides in (95), and using
[BGM22] Jérémie Bouttier, Emmanuel Guitter, and Grégory Miermont. Bijective enumeration of planar bipartite maps with three tight boundaries, or how to slice pairs of pants. *Ann. H. Lebesgue*, 5:1035-1110, 2022. doi:10.5802/ahl.143.

[BM14] Olivier Bernardi and Alejandro H. Morales. Counting trees using symmetries. *Journal of Combinatorial Theory. Series A*, 123:104-122, 2014. doi:10.1016/j.jcta.2013.12.001.

[Bou19] Jérémie Bouttier. Planar maps and random partitions. Habilitation à diriger des recherches, Université Paris-Sud, 2019.

[BS13] Axel Bacher and Gilles Schaeffer. Multivariate lagrange inversion formula and the cycle lemma. In *The seventh European conference on combinatorics, graph theory and applications. Extended abstracts of EuroComb 2013, Pisa, Italy, September 9-13, 2013*, pages 551-556. Pisa: Edizioni della Normale, 2013.

[Bud22a] Timothy Budd. Irreducible metric maps and Weil-Petersson volumes. *Comm. Math. Phys.*, 394(2):887-917, 2022. doi:10.1007/s00220-022-04418-6.

[Bud22b] Timothy Budd. On polynomials counting essentially irreducible maps. *Electron. J. Combin.*, 29(2):Paper No. 2.45, 43, 2022. doi:10.37236/9746.

[CdVE10] Éric Colin de Verdière and Jeff Erickson. Tightening nonsimple paths and cycles on surfaces. *SIAM J. Comput.*, 39(8):3784-3813, 2010. doi:10.1137/090761653.

[Cho81] Laurent Chottin. Enumeration d'arbres et formules d'inversion de séries formelles. *Journal of Combinatorial Theory. Series B*, 31:23-45, 1981. doi:10.1016/S0095-8956(81)80008-1.

[CL16] Loïc Chaumont and Rongli Liu. Coding multitype forests: application to the law of the total population of branching forests. *Transactions of the American Mathematical Society*, 368(4):2723-2747, 2016. doi:10.1090/tran/6421.

[DN11] Norman Do and Paul Norbury. Counting lattice points in compactified moduli spaces of curves. *Geom. Topol.*, 15(4):2321-2350, 2011. doi:10.2140/gt.2011.15.2321.

[DZ80] Nachum Dershowitz and Shmuel Zaks. Enumerations of ordered trees. *Discrete Mathematics*, 31:9-28, 1980. doi:10.1016/0012-365X(80)90168-5.

[EO07] Bertrand Eynard and Nicolas Orantin. Invariants of algebraic curves and topological expansion. *Communications in Number Theory and Physics*, 1(2):347-452, 2007. doi:10.4310/CNTP.2007.v1.n2.a4.

[FS09] Philippe Flajolet and Robert Sedgewick. *Analytic combinatorics*. Cambridge University Press, Cambridge, 2009. Available online at http://algo.inria.fr/flajolet/Publications/books.html. URL: http://dx.doi.org/10.1017/CBO9780511801655, doi:10.1017/CBO9780511801655.

[Kon92] Maxim Kontsevich. Intersection theory on the moduli space of curves and the matrix Airy function. *Comm. Math. Phys.*, 147(1):1-23, 1992. URL: http://projecteuclid.org/euclid.cmp/1104250524.

[LZ04] Sergei K. Lando and Alexander K. Zvonkin. *Graphs on surfaces and their applications*, volume 141 of *Encyclopaedia of Mathematical Sciences*. Springer-Verlag,
$\epsilon_3 + \bar{\epsilon}_3 = 1$, allows to write (88) as

$$
\begin{align}
\Pi(m_1, \dots, m_n) &= \sum_{I_{s \ge 1}^{(-1,1)}} r!(s-1)! \left( \sum_{j=3}^{n} \epsilon_j s_j \right) \prod_{i=1}^{n} \pi_{r_i, s_i}^{(\epsilon_i)}(m_i) \nonumber \\
&\quad + \sum_{I_{s \ge 1}^{(0,0)}} r!(s-1)! \left( s_1 + s_2 + \sum_{j=3}^{n} \epsilon_j s_j \right) \prod_{i=1}^{n} \pi_{r_i, s_i}^{(\epsilon_i)}(m_i) \tag{97} \\
&\quad + \sum_{I_{r \ge 1}^{(0,1)} \cup I_{r \ge 1}^{(1,0)}} (r-1)!s! \left( \sum_{j=1}^{n} \bar{\epsilon}_j r_j \right) \prod_{i=1}^{n} \pi_{r_i, s_i}^{(\epsilon_i)}(m_i) \nonumber \\
&\quad + \sum_{I_{s=0}^{(-1,1)} \cup I_{s=0}^{(0,0)} \cup I_{r=0}^{(0,1)} \cup I_{r=0}^{(1,0)}} r!s! \prod_{i=1}^{n} \pi_{r_i, s_i}^{(\epsilon_i)}(m_i). \nonumber
\end{align}
$$

By the transmutation relation (96), we may replace the sum over $I_{s \ge 1}^{(-1,1)}$ in the first line by a sum over $I_{r \ge 1}^{(1,1)}$ in the third line. This gives a sum over $I_{r \ge 1}^{(0,1)} \cup I_{r \ge 1}^{(1,0)} \cup I_{r \ge 1}^{(1,1)}$ which we can rewrite as a sum over $I_{r \ge 1}$ minus a sum over $I_{r \ge 1}^{(0,0)}$. We claim that this latter sum will almost cancel the sum over $I_{s \ge 1}^{(0,0)}$ in the second line. Indeed, by writing $s_1 + s_2 + \sum_{j=3}^n \epsilon_j s_j = s - \sum_{j=3}^n \bar{\epsilon}_j s_j$ in the sum over $I_{s \ge 1}^{(0,0)}$, and $\sum_{j=1}^n \bar{\epsilon}_j r_j = r - \sum_{j=3}^n \epsilon_j r_j$ in the sum over $I_{r \ge 1}^{(0,0)}$, we see using the transmutation relation (94) that their difference evaluates to

$$
\left( \sum_{I_{s \ge 1}^{(0,0)}} - \sum_{I_{r \ge 1}^{(0,0)}} \right) r! s! \prod_{i=1}^{n} \pi_{r_i, s_i}^{(\epsilon_i)}(m_i) = \left( \sum_{I_{r=0}^{(0,0)}} - \sum_{I_{s=0}^{(0,0)}} \right) r! s! \prod_{i=1}^{n} \pi_{r_i, s_i}^{(\epsilon_i)}(m_i). \quad (98)
$$

Observe that the sum over $I_{s=0}^{(0,0)}$ precisely cancels the one appearing in the last line of (97), and the sums over $I_{r=0}^{(0,0)}$, $I_{r=0}^{(0,1)}$ and $I_{r=0}^{(1,0)}$ combine to form a sum over $I_{r=0}$. We arrive at the expression

$$
\Pi(m_1, \dots, m_n) = \sum_{I_{r \ge 1}} (r-1)!s! \left( \sum_{j=1}^{n} \bar{\epsilon}_j r_j \right) \prod_{i=1}^{n} \pi_{r_i, s_i}^{(\epsilon_i)}(m_i) + \sum_{I_{s=0}^{(-1,1)} \cup I_{r=0}} r! s! \prod_{i=1}^{n} \pi_{r_i, s_i}^{(\epsilon_i)}(m_i) \quad (99)
$$

which is interesting on its own, since it is already symmetric in $m_1, \dots, m_n$, see again the remark below (89). To obtain the wanted final expression, we write $\sum_{j=1}^n \bar{\epsilon}_j r_j = r - \sum_{j=1}^n \epsilon_j r_j$ in the sum over $I_{r \ge 1}$ and apply again the transmutation relation (94) and the identity (98), changing the sum over $I_{r \ge 1}$ and that over $I_{r=0}$ into the sum over $I_{s \ge 1}$ and that over $I_{s=0}$ of (89), leaving the sum over $I_{s=0}^{(-1,1)}$ unchanged. $\square$
Berlin, 2004. With an appendix by Don B. Zagier, *Low-Dimensional Topology*, II. doi:10.1007/978-3-540-38361-1.

[Mar18] Cyril Marzouk. Scaling limits of random bipartite planar maps with a prescribed degree sequence. *Random Structures Algorithms*, 53(3):448–503, 2018. doi:10.1002/rsa.20773.

[Mar22] Cyril Marzouk. On scaling limits of random trees and maps with a prescribed degree sequence. *Annales Henri Lebesgue*, 5:317–386, 2022. URL: https://ahl.centre-mersenne.org/articles/10.5802/ahl.125/, doi:10.5802/ahl.125.

[Nor10] Paul Norbury. Counting lattice points in the moduli space of curves. *Mathematical Research Letters*, 17(3):467–481, 2010. arXiv:0801.4590.

[Nor13] Paul Norbury. String and dilaton equations for counting lattice points in the moduli space of curves. *Transactions of the American Mathematical Society*, 365(4):1687–1709, 2013.

[PWZ96] Marko Petkovšek, Herbert S. Wilf, and Doron Zeilberger. *A = B. With foreword by Donald E. Knuth*. Wellesley, MA: A. K. Peters, 1996.

[Sch15] Gilles Schaeffer. Planar maps. In *Handbook of enumerative combinatorics*, Discrete Math. Appl. (Boca Raton), pages 335–395. CRC Press, Boca Raton, FL, 2015. http://www.lix.polytechnique.fr/~schaeffe/Biblio/HB.pdf.

[Sta99] Richard P. Stanley. *Enumerative combinatorics. Vol. 2*, volume 62 of *Cambridge Studies in Advanced Mathematics*. Cambridge University Press, Cambridge, 1999. With a foreword by Gian-Carlo Rota and appendix 1 by Sergey Fomin. doi:10.1017/CB09780511609589.

[Tut62] William T. Tutte. A census of slicings. *Canad. J. Math.*, 14:708–722, 1962. doi:10.4153/CJM-1962-061-1.
References

[Bet20] Jérémie Bettinelli. "Slit-slide-sew bijections for bipartite and quasibipartite plane maps". In: *The Electronic Journal of Combinatorics* 27.3 (2020), research paper p3.4, 23. DOI: 10.37236/9069.

[BG12] Jérémie Bouttier and Emmanuel Guitter. "Planar maps and continued fractions". In: *Comm. Math. Phys.* 309.3 (2012), pp. 623–662. DOI: 10.1007/s00220-011-1401-z. arXiv: 1007.0419 [math.CO].

[BG14] Jérémie Bouttier and Emmanuel Guitter. "On irreducible maps and slices". In: *Combin. Probab. Comput.* 23.6 (2014), pp. 914–972. DOI: 10.1017/S0963548314000340. arXiv: 1303.3728 [math.CO].

[BGM21] Jérémie Bouttier, Emmanuel Guitter, and Grégory Miermont. *Bijective enumeration of planar bipartite maps with three tight boundaries, or how to slice pairs of pants*. 2021. arXiv: 2104.10084 [math.CO].

[BM14] Olivier Bernardi and Alejandro H. Morales. "Counting trees using symmetries". In: *Journal of Combinatorial Theory. Series A* 123 (2014), pp. 104–122. DOI: 10.1016/j.jcta.2013.12.001.

[Bou19] Jérémie Bouttier. *Planar maps and random partitions*. Habilitation à diriger des recherches, Université Paris-Sud. 2019.

[BS13] Axel Bacher and Gilles Schaeffer. "Multivariate Lagrange inversion formula and the cycle lemma". In: *The seventh European conference on combinatorics, graph theory and applications. Extended abstracts of EuroComb 2013, Pisa, Italy, September 9–13, 2013*. Pisa: Edizioni della Normale, 2013, pp. 551–556.

[Bud20a] Timothy Budd. *Irreducible metric maps and Weil-Petersson volumes*. 2020. arXiv: 2012.11318 [math-ph].

[Bud20b] Timothy Budd. *On polynomials counting essentially irreducible maps*. 2020. arXiv: 2006.15701 [math.CO].

[CE10] Éric Colin de Verdière and Jeff Erickson. "Tightening nonsimple paths and cycles on surfaces". In: *SIAM J. Comput.* 39.8 (2010), pp. 3784–3813. DOI: 10.1137/090761653.

[Cho81] Laurent Chottin. "Enumeration d'arbres et formules d'inversion de séries formelles". In: *Journal of Combinatorial Theory. Series B* 31 (1981), pp. 23–45. DOI: 10.1016/S0095-8956(81)80008-1.

[CL16] Loïc Chaumont and Rongli Liu. "Coding multitype forests: application to the law of the total population of branching forests". In: *Transactions of the American Mathematical Society* 368.4 (2016), pp. 2723–2747. DOI: 10.1090/tran/6421.

[DN11] Norman Do and Paul Norbury. "Counting lattice points in compactified moduli spaces of curves". In: *Geom. Topol.* 15.4 (2011), pp. 2321–2350. DOI: 10.2140/gt.2011.15.2321.
[DZ80] Nachum Dershowitz and Shmuel Zaks. "Enumerations of ordered trees". In: *Discrete Mathematics* 31 (1980), pp. 9–28. DOI: 10.1016/0012-365X(80)90168-5.

[EO07] Bertrand Eynard and Nicolas Orantin. "Invariants of algebraic curves and topological expansion". In: *Communications in Number Theory and Physics* 1.2 (2007), pp. 347–452. DOI: 10.4310/CNTP.2007.v1.n2.a4.

[Kon92] Maxim Kontsevich. "Intersection theory on the moduli space of curves and the matrix Airy function". In: *Comm. Math. Phys.* 147.1 (1992), pp. 1–23. URL: http://projecteuclid.org/euclid.cmp/1104250524.

[Mar18] Cyril Marzouk. "Scaling limits of random bipartite planar maps with a prescribed degree sequence". In: *Random Structures Algorithms* 53.3 (2018), pp. 448–503. DOI: 10.1002/rsa.20773.

[Mar21] Cyril Marzouk. *On scaling limits of random trees and maps with a prescribed degree sequence*. 2021. arXiv: 1903.06138 [math.PR].

[Nor10] Paul Norbury. "Counting lattice points in the moduli space of curves". In: *Mathematical Research Letters* 17.3 (2010), pp. 467–481. arXiv: 0801.4590 [math.AG].

[Nor13] Paul Norbury. "String and dilaton equations for counting lattice points in the moduli space of curves". In: *Transactions of the American Mathematical Society* 365.4 (2013), pp. 1687–1709.

[PWZ96] Marko Petkovšek, Herbert S. Wilf, and Doron Zeilberger. *A = B. With foreword by Donald E. Knuth*. Wellesley, MA: A. K. Peters, 1996, pp. xii + 212. ISBN: 1-56881-063-6.

[Sch15] Gilles Schaeffer. "Planar maps". In: *Handbook of enumerative combinatorics*. Discrete Math. Appl. (Boca Raton). http://www.lix.polytechnique.fr/~schaeffe/Biblio/HB.pdf. CRC Press, Boca Raton, FL, 2015, pp. 335–395.

[Sta99] Richard P. Stanley. *Enumerative combinatorics. Vol. 2*. Vol. 62. Cambridge Studies in Advanced Mathematics. With a foreword by Gian-Carlo Rota and appendix 1 by Sergey Fomin. Cambridge University Press, Cambridge, 1999, pp. xii+581. DOI: 10.1017/CBO9780511609589.

[Tut62] William T. Tutte. "A census of slicings". In: *Canad. J. Math.* 14 (1962), pp. 708–722. DOI: 10.4153/CJM-1962-061-1.