is the modular curve X(N) defined over Q? In most sources, the field of definition of the modular curve $X(n)_\mathbb{C}$ (quotient of the upper half plane by the subgroup $\Gamma(n)$ of $SL_2(\mathbb{Z})$ congruent to $I\mod n$) is $\mathbb{Q}(\mu_n)$, where $\mu_n$ is the group of $n$th roots of unity.
However, in Deligne Rapoport V.4.4 (http://publications.ias.edu/sites/default/files/Number22.pdf), they define $\mathcal{G}[1/n]$ to be the stack over $\mathbb{Z}[1/n]$ classifying generalized elliptic curves $E/S$ whose singular geometric fibers are $n$-gons, equipped with an isomorphism of group schemes
$$E[n]\cong\mu_n\times\mathbb{Z}/n$$
"of determinant 1'', by which they mean that the isomorphism is compatible with the weil pairing on $E[n]$ and the alternating pairing  $\Lambda^2(\mu_n\times\mathbb{Z}/n)\rightarrow\mu_n$ defined by $\alpha\wedge k\mapsto \alpha^k$ if $\alpha\in\mu_n$ and $k\in\mathbb{Z}/n$.
It seems like by requiring that the level structures have ``determinant 1'', we've singled out a component of the usual moduli space for $\Gamma(n)$-structures, and our component based changed to $\mathbb{C}$ should be isomorphic to $X(n) := \Gamma(n)\backslash\overline{\mathcal{H}}$. However, this would seem to imply that $X(n)$ is defined over $\mathbb{Q}$ (or even over $\mathbb{Z}[1/n]$), which seems to contradict the usual wisdom that $X(n)$ is only defined over $\mathbb{Q}(\mu_n)$.
In fact, on the second page of Ogg's paper "Rational Points on Certain Elliptic Modular Curves", he mentions a ``canonical model of Shimura, as communicated to me by Casselman", which is a $\mathbb{Q}$-rational model of $X(n)$, such that the cusps are defined over $\mathbb{Q}(\mu_n)$.
Am I reading Deligne-Rapoport correctly? Is $X(n)$ actually definable over $\mathbb{Q}$? (I wonder if Ogg's 'canonical model of shimura' somehow coincides with DR's point of view)
Edit: Also does anyone know what it means for a morphism of stacks to be "localement représentable" (eg, right after definition IV.3.2)? I know the translation is locally representable, but that sounds like relatively representable (fiber products with a scheme is also a scheme).
 A: First let me say that I don't like the language "Is the modular curve $X(N)$ defined over $\mathbb Q$?" since it hints at a sort of uniqueness. It is better to ask "Does the curve complex curve $\Gamma(n)\backslash\overline{\mathcal{H}}$ have a model over $\mathbb Q$?". And the answer here is yes, exactly for the argument by Deligne-Rapoport.
There is also a mismatch because when working over the complex numbers one tends to describe modular curves of the form $\Gamma\backslash\overline{\mathcal{H}}$. While when working over other bases one tends to describe modular curves as modular curves in terms of functors and (coarse) moduli spaces, and the moduli spaces are not always geometrically connected while $\Gamma\backslash\overline{\mathcal{H}}$ is.
The reason many sources state that modular curve $X(n)$ is defined over $\mathbb Q(\zeta_n)$ is because $X(n)$ (for $n \geq 4$) tends to be defined using the moduli problem of triples $(E,P_1,P_2)$ with $E$ an elliptic curve and $P_1$ and $P_2$ a pair of generators of $E[n]$. This scheme is connected, but not geometrically connected and its geometric components of $X(n)_{\mathbb Q}$ are defined over $\mathbb Q(\zeta_n)$. Over $\mathbb C$ each of these components is isomorphic to $\Gamma(n)\backslash\overline{\mathcal{H}}$, and the geometric components basically correspond to the possible different powers of $\zeta_n$ that the pairing $\langle P_1,P_2 \rangle$ can attain.
The automorphism group of the scheme $X(n)_{\mathbb Q}$ defined above is $GL_2(Z/nZ)/{\pm 1}$, so this curve has a lot of twist, that also can be given a moduli interpretations. For example if $E_0$ is fixed elliptic curve over $\mathbb Q$ one can look at the moduli space $X_{E_0}(n)$ of tuples $(E,f)$ where $f : E_0[n] \to E[n]$ is an isomorphism of group schemes. $X_{E_0}(n)$ is a twist of $X(n)$ and is not irreducible, it has different components corresponding to the "determinant" of f, each of these components is also again (over $\mathbb C$) isomorphic to $\Gamma(n)\backslash\overline{\mathcal{H}}$. The situation for the moduli problem $(E,f)$ where $f : \mu_n x \mathbb Z/n\mathbb z \to E[n]$ is a group isomorphism (not necessarily of determinant 1) is exactly the same, this corresponding scheme also is not irreducible, but over $\mathbb Z[1/n]$ it is the disjoint union of geometrically irreducible schemes parametrized by the possible values of the determinant. Each when base changed to $\mathbb C$ become isomorphic to $\Gamma(n)\backslash\overline{\mathcal{H}}$.
So I would say that the answer to: Is $X(n)$ defined over $\mathbb Q$ is very much dependent on which moduli problem you use to define $X(n)$. Do you use $E[n] \cong \mathbb Z/n\mathbb Z^2$ or $E[n] \cong \mu_n \times \mathbb Z/n\mathbb Z$, do you want the isomorphism to respect the pairing, or not. Different text by different authors might have different conventions depending on their needs so it is always good to check.
Lastly I also want to say there is another way of seeing that $\Gamma(n)\backslash\overline{\mathcal{H}}$ has a model over $\mathbb Q$, namely one can also look at the scheme $X_{0,1}(n,n)$ corresponding to the moduli problem $(E,G,P)$ where $G$ and $P$ are a group and a point of order $n$ in $E[n]$ such that $G$ and $P$ together generate $E[n]$. This modular curve is isomorphic a quotient of $X_1(n^2)/H$ where $H$ is a certain subgroup of the diamond operators. Some more detail on this is given in section 2 of https://arxiv.org/pdf/1608.07549.pdf .
A: Deligne-Rapoport proved that $\mathcal{G}[1/N]$ is an algebraic stack proper and smooth over $\mathbb{Z}[1/N]$. If $N>2$, for any scheme $S$ over $\mathbb{Z}[1/N]$, the objects of $\mathcal{G}[1/N](S)$ do not have a non trivial  automorphism, thus $\mathcal{G}[1/N]$ is an algebraic space over $\mathbb{Z}[1/N]$ and since it is regular, it is necessarily a scheme.
Remark: The finite flat group scheme $\mu_N$ is defined over $\mathbb{Z}$ and it is étale over $\mathbb{Z}[1/N]$.
