A tame stacky curve over a field $k$ is a geometrically connected proper smooth DM stack of dimension 1 which has a dense open substack which is a scheme, and whose automorphism group of each geometric point has order prime to the characteristic of $k$.


I've heard that the theory of stacky curves and one of M-curves are the same
(e.g., [Poonen, Schaefer, and Stoll - Twists of $X(7)$ and primitive solutions to $x^2+y^3=z^7$](https://arxiv.org/abs/math/0508174)).
But I essentially don't understand anything about it.


Fix a field $k$.


Let $\mathscr{X}$ be a tame stacky curve.
Then the pair $(X; \{ m\_P \})$ is a M-curve
(see [Darmon - Faltings plus epsilon, Wiles plus epsilon, and the Generalized Fermat Equation](https://www.researchgate.net/profile/Henri-Darmon/publication/2384458_Faltings_plus_epsilon_Wiles_plus_epsilon_and_the_Generalized_Fermat_Equation/links/00b495193e4cfa9151000000/Faltings-plus-epsilon-Wiles-plus-epsilon-and-the-Generalized-Fermat-Equation.pdf)),
where $X$ is its coarse moduli (which is a smooth scheme curve) and $P$ runs over the set of stacky point of $\mathscr{X}$, and $m\_P$ is the order of the automorphism group of $P$.


Now consider a morphism $f : \mathscr{X} \to \mathscr{Y}$ of tame stacky curves over $k$.
Then it induces a morphism of the coarse moduli schemes $X \to Y$.


**Question 1. Is this a morphism of M-curves?**


Next, conversly consider a morphism $f : X \to Y$ of the coarse moduli schemes, which is a morphism of M-curves.


**Question 2. Does this induce the morphism $\mathscr{X} \to \mathscr{Y}$?**


Glancing through the proof of the 5.3.10.a of [Voight and Zureck-Brown - The canonical ring of a stacky curve](https://arxiv.org/abs/1501.04657) and its reference [Geraschenko and Satriano - A "bottom up" characterization of smooth Deligne–Mumford stacks](https://arxiv.org/abs/1503.05478),
it seems (although I understand nothing about it) that $\mathscr{X}$ is the root stack $\sqrt{D/X}$, where $D$ is a ramification divisor.
(I don't know its definition, but it seems to be $\sum m\_P P$, where $P$ runs over the all stacky point of $\mathscr{X}$, and identify it with the closed point on $X$.)


So using the universal property of the root stack, it seems that the property that $f$ is a morphism of M-curves leads the morphism of stacky curves.


But I can't find a good diagram relating $X$, $Y$, $[\mathbb{A}^1/\mathbb{G}\_m]$ and their ramification divisors.


Next consider an M-curve $X$.


Question 3. Does $X$ induce a tame stacky curve $\mathscr{X}$?


Similar to the question 2, it seems that the root stack of $X$ with respect to the divisor is the one, but I can't find any references.


Next, assume that $k$ is a number field, and $S$ a nice finite set of places of $K$.


**Question 4. What does the $S$-integral points of the M-curve induced by $\mathscr{X}$ correspond to?
(For the definition, see [Darmon - Faltings plus epsilon, Wiles plus epsilon, and the Generalized Fermat Equation](https://www.researchgate.net/publication/2384458_Faltings_plus_epsilon_Wiles_plus_epsilon_and_the_Generalized_Fermat_Equation).)**


It seems for me that, fixing a "model" of $\mathscr{X}$ over $O\_{k, S}$
(i.e., a smooth proper DM stack over $O\_{k, S}$ whose fibres are tame stacky curves),
considering the $S$-integral points are the same to considering the set of isomorphism classes of $\mathscr{X}(O\_{k, S})$.


Finally, consider a morphism $f : \mathscr{X} \to \mathscr{Y}$ of tame stacky curves (over general field $k$).


**Question 5. What is the ramification index of $f$?**


I can't find any references which define the ramification indeces of a morphism of stacky curves, but I think that it is the one of a morphism $U \to V$,
where $V$ is an etale covering of $\mathscr{Y}$, $U$ is of $\mathscr{X}$, and the map $U \to V$ makes the diagram commutative.


But are these concept about stacky curves and about M-curves equivalent?


Because I'm studying this field for [Poonen, Schaefer, and Stoll - Twists of $X(7)$ and primitive solutions to $x^2+y^3=z^7$](https://arxiv.org/abs/math/0508174) the M-curve version is sufficient for me (at least now), however I want to know this correspondence.


Any help will be much appreciated!



Relation between stacky curves and "M-curves"
This is a bit of a late answer, but if it is not useful to you anymore it may prove useful to somebody else.


For the first three questions the answer is yes. The crucial point, which you already mentioned, is that every stacky curve is a root stack.


First some notation, if $D$ is a Cartier divisor on $X$ then write $X[\sqrt[n]{D}]$ for the stack of $n$-th roots over $X$. (See Definition 2.2.1 of [Using Stacks to Impose Tangency Conditions
on Curves](https://www.charlescadman.com/pdf/stacks.pdf)


For simplicity let $k$ be a field of characteristic $0$ (the positive characteristic case is similar, one essentially has to add the word tame everywhere) and $\mathcal{X}$ a stacky curve over $k$. Then its coarse moduli space $X$ is a proper smooth curve and $\mathcal{X}$ is an (iterated) root stack over $X$ which can be constructed as follows. For each point $P \in X$ let $e\_P$ be the order of the stabilizer of the stacky point (i.e. gerbe) of $\mathcal{X}$ lying above $P$. Let $P\_1, \cdots, P\_r$ be an enumeration of the points for which $e\_P \neq 1$. Then $X$ is isomorphic to the iterated root stack $X[\sqrt[e\_{P\_1}]{P\_1}] \cdots [\sqrt[e\_{P\_r}]{P\_r}]$. This is proven during the proof [The canonical ring of a stacky curve](https://arxiv.org/abs/1501.04657).


Now given an M-curve $(X, (e\_P)\_P)$ we can consider the root stack $X[\sqrt[e\_{P\_1}]{P\_1}] \cdots [\sqrt[e\_{P\_r}]{P\_r}]$ which is a stacky curve since rooting a smooth stack along a smooth divisor gives a smooth stack. This answers question 3.


One can now find the maps between stacky curves by using the universal property of root stacks. You actually only need the following special case.


Let $X$ be a stack, $D$ a Cartier divisor on $X$ and $n \in \mathbb{N}$. Let $Y$ be an irreducible stack. Then the groupoid of maps $Y \to X[\sqrt[n]{D}]$ which do not factor through $D$ is isomorphic with the groupoid of maps $f:Y \to X$ which do not factor through $D$ and such that the Cartier divisor $f^{-1}(D)$ (we need that $Y$ is irreducible for this to be a Cartier divisor) is an $n$-multiple.


To prove this note that a Cartier divisor on a stack $X$ is the same thing as a map $X \to [\mathbb{A}^1/ \mathbb{G}\_m]$ such that no irreducible component of $X$ factors through the origin.


So the relevant groupoid is equal to the groupoid of pairs $(f: Y \to X, E)$ such that $f$ does not factor through $D$ and such that $n E = f^{-1}(D)$. But the group of Cartier divisors is torsion-free so $E$ is unique.


Now, the group of Cartier divisors on $X[\sqrt[n]{D}]$ is equal to the group of Cartier divisors on $X$ adjoined with a new element $E$ such that $n E = D$. It follows that the answer to your questions 1 and 2 is positive, at least as long as one restricts oneself to dominant maps.


For question 4: let $\mathfrak{X}$ be an integral model of $X$ and $\mathcal{P}\_r$ the closure of $P\_r$ in $\mathfrak{X}$, assume that these are still Cartier divisors (e.g. if $\mathfrak{X}$ is regular), then integral points on the M-curve are almost the same as integral points on the root stack $\mathfrak{X}[\sqrt[e\_{P\_1}]{\mathcal{P}\_1}] \cdots [\sqrt[e\_{P\_r}]{\mathcal{P}\_r}]$ (the order doesn't matter since fiber products are commutative). The ones which are the same are the ones which don't factor through any of the $\mathcal{P}\_r$, but there are more points on the root stack which factor through $\mathcal{P}\_r$ than there are on the M-curve. This also follows from the above universal property.


For your last question 5, I also don't know of a reference which defines the ramification index of a morphism of stacky curves. But the one you give seems like a very reasonable choice and it agrees with the ramification index of a morphism of M-curves, as can be seen from the local description of root stacks.


