Katz defines in Section 2.0 [$p$-adic properties of modular schemes and modular forms](https://web.math.princeton.edu/~nmk/old/padicpropMFMS.pdf) the Hasse invariant as a mod $p$ modular form $A$ of weight $p-1$. In other words, it is a section of $\omega^{\otimes p-1}$ on the compactified moduli stack of elliptic curves $\overline{\mathcal{M}}\_{ell,\mathbb{F}\_p}$.


We have a morphism from integral modular forms to mod $p$ modular forms, induced by the morphism $\omega^{\otimes p-1} \to \omega^{\otimes p-1}/p$ on $\overline{\mathcal{M}}\_{ell,\mathbb{Z}}$. We say that the Hasse invariant $A$ is *liftable to characteristic zero* if it is in the image of this morphism. By the long exact sequence in cohomology 
$$H^0(\overline{\mathcal{M}}\_{ell,\mathbb{Z}}; \omega^{\otimes p-1})\to H^0(\overline{\mathcal{M}}\_{ell,\mathbb{Z}}; \omega^{\otimes p-1}/p) \xrightarrow{\partial} H^1(\overline{\mathcal{M}}\_{ell,\mathbb{Z}}; \omega^{\otimes p-1}) \xrightarrow{\cdot p}$$
the Hasse invariant is automatically liftable if $H^1(\overline{\mathcal{M}}\_{ell,\mathbb{Z}}; \omega^{\otimes p-1})$ has no $p$-torsion. This happens iff $p\geq 5$ and for $p=2,3$ the Hasse invariant is not liftable to an integral modular form (of level $1$). 


If we consider $\Gamma\_1(n)$-modular forms instead, the Hasse invariant becomes liftable to characteristic zero for $p=3$ and all levels $n\geq 2$, $(p,n)=1$, because then $H^1(\overline{\mathcal{M}}\_1(n)\_{\mathbb{Z}[\frac1n]}; \omega^{\otimes 2}) = 0$. 



> 
> For what $n$ does the Hasse invariant lift to a characteristic zero $\Gamma\_1(n)$-modular form, $(p,n)=1$, if $p=2$?
> 
> 
> 


At the time of Katz's article the problem seems to have been unsolved as he just states (with a sketch of proof) that it is liftable if $n$ is divisible by $3,5,7$ or $11$, but he does not know it in other cases. In light of the long exact sequence above, the question is equivalent to $\eta = \partial(A)$ vanishing in (the $2$-torsion of) $H^1(\overline{\mathcal{M}}\_1(n)\_{\mathbb{Z}[\frac1n]}; \omega)$. 


In particular, I would be interested in concrete examples (for $\Gamma\_1(n)$ or $\Gamma(n)$) where the Hasse invariant is not liftable if such examples are known. 



Lifting the Hasse invariant mod $2$
$\newcommand\Q{\mathbf{Q}}$
$\newcommand\Z{\mathbf{Z}}$
$\newcommand\Zbar{\overline{\Z}}$
$\newcommand\F{\mathbf{F}}$
$\newcommand\Gal{\mathrm{Gal}}$


A lift always exists, even with coefficients in $\Z$. If suffices to consider the case when $p > 2$ is prime. (**Added Note**: there is a second elementary argument at the end of this post.)


Let $p$ be prime, and let $\chi$ be an odd character of $(\Z/p\Z)^{\times}$ of order $2^m$ for some $m$. This character is valued in the field $E = \Q(\zeta\_{2^m})$, and is unique up to Galois conjugacy (this follows from the oddness assumption, which implies that $2^m$ is the largest power of $2$ dividing $p-1$). The fixed field of $\chi$ considered as a Galois character is the unique field $K \subset \Q(\zeta\_p)$ which has degree $2^m$; it is totally complex.


**Claim:** The $L$ value $L(\chi,0)$ has $2$-adic valuation at most $(2^{m-1} - 1)/2^{m-1} < 1$.


In particular, $L(\chi,0)/2$ has negative valuation, and, as in the previous answer, this shows that the Eisenstein series $E\_{1,\chi}$, suitably normalized, provides a lift of Hasse to $\Z[\zeta\_{2^m}]$. Hence there is a multiple of $E\_{1,\chi}$ with coefficients in $\Z[\zeta\_{2^m}]$ which is congruent modulo $\pi = 1 - \zeta\_{2^m}$ to $1$. Write this form as follows:


$$\sum\_{k=1}^{2^{m-1} - 1} \zeta^k\_{2^m} f\_k \in \Z[\zeta\_{2^m}][[q]],$$


where $f\_k \in \Z[[q]]$. Since the Galois group preserves $M\_1(\Gamma\_1(p))$, all the forms $f\_k$ lies in $\_1(\Gamma\_1(p))$, and thus so does the form


$$\sum\_{k=0}^{2^{m-1} - 1} f\_k \in \Z[[q]].$$


Yet this form is congruent modulo $\pi = 1 - \zeta\_{2^m}$ to the multiple of $E\_{1,\chi}$ above, which in turn is congruent modulo $1 - \zeta\_{2^m}$ to $1$. Hence it yields an integral lift of the Hasse invariant.


**Proof:** It suffices to show that the norm of $L(\chi,0)$ to $\Q$ has valuation at most $2^{m-1} - 1$. We may identify this norm with the product


$$\prod\_{\chi \text{ odd}} L(\chi,0)$$


Yet this is equal to the limit of $\zeta\_K(s)/\zeta\_{K^+}(s)$ at $s = 0$ where $K^{+}$ is the maximal totally real subfield of $K$. By the class number formula, this limit thus evaluates to:


$$\frac{w(K^{+})}{w(K)} \cdot \frac{h(K)}{h(K^+)} \cdot \frac{R(K)}{R(K^{+})}.$$


Now $w(K^{+}) = 2$, and $w(K) = 2$ or $2p$ depending on whether $p$ is a Fermat prime or not. Hence this factor can be ignored when computing the $2$-adic valuation. I claim that the $2$-parts of $h(K^{+})$ and $h(K)$ are both $1$. To see this, let $H$ be the $2$-part of the Hilbert class field of $K^{+}$ or $K$. Then $H/\Q$ is Galois and of $2$-power order. By class field theory (over $\Q$), $\Gal(H/\Q)^{\mathrm{ab}}$ is cyclic, because it is ramified only at $p$ and $p \ne 2$. Yet this implies that $\Gal(H/\Q)$ is cyclic, because it is a $2$-group with cyclic abelianization. But then $H$ is abelian, and so from the theory of cyclotomic fields we easily see that $H = K^{+}$ or $K$. Hence the factor from the class number is also prime to $2$. Finally, the ratio of regulators is equal to the index 
of the units $[U\_K:U\_{K^{+}}]$. Let $u \in U\_K$. If $c \in \Gal(K/\Q)$ is complex conjugation, then a standard argument shows that $cu/u$ is a root of unity. Now $w(K) = |\mu\_K|$ has either order $2$ or $2p$. In particular, after replacing $u$ by an odd power, we deduce that $cu = \pm u$. It follows that $u^2 \in K^{+}$, and that $V\_K:=U\_K/U\_{K^{+}} \otimes \Z\_2$ is an abelian group of exponent $2$. The power of $2$ dividing the index is $|V\_K|$, so it suffices to show that the dimension of $V\_K$ over $\F\_2$ is at most $2^{m-1} - 1$. Since $-1 \in K^{+}$, there is a surjection:


$$U\_K/(\pm 1,U^2\_K) \rightarrow V\_K.$$


By Dirichlet's unit theorem, we have


$$U\_K \simeq \Z^{[K^{+}:\Q] - 1} \oplus \mu\_K.$$


Since $\mu\_K/{\pm 1} \otimes \Z\_2$ is trivial, it follows that $\dim\_{\F\_2} V\_K \le 2^{m-1} - 1$. This proves the claim.
In fact, using circular units, one can show that $\dim\_{\F\_2} V\_K = 2^{m-1} - 1$, so the upper bound is actually an equality.


In the special case when $p \equiv 3 \mod 4$, then $2^{m-1} - 1 = 0$ so $L(\chi,0)$ is a unit; this is the case considered by wrigley. 


**Remark:**
This argument is probably more complicated than necessary. There may well be an elementary way to prove directly that 


$$\sum\_{n=1}^{p-1} n \chi(n)$$


is not divisible by $2$ directly for the odd character $\chi$ of $2$-power order, but since the argument above was immediately apparent, I didn't try to look for such an argument.


Oh, actually, now that I make this comment, I see it is actually obvious. The character $\chi$ is valued in $E = \Q(\zeta\_{2^{m}})$ which is a field of degree $2^{m-1}$, and the ring of integers has a basis $\zeta^i$ for $i = 0$ to $2^{m-1} - 1$. Moreover, $\chi$ exactly takes values in this basis. So it simply suffices to sum over the integers $n$ with $\chi(n) = 1$ or $\chi(n) = -1$ and show that this sum is not divisible by $2$, because then $L(\chi,0)$ will not be divisible by $2$. Yet these integers come in pairs $(n,p-n)$ whose difference is odd (so $n \chi(n) + (p-n) \chi(p-n) = \pm n - \pm (p-n) \equiv 1 \mod 2$), so it suffices to show that the total number of integers with $\chi(n) \in \{\pm 1\}$ is divisible by $2$ and not by $4$. Yet these integers are precisely the kernel of $\chi^2$, whose order has this property by definition. Oops! Well, I guess I may as well leave the class field theory argument here as well.


**Added**: I guess this last argument also shows that the coefficient of $\zeta^i$ is odd for any $i$, and hence


$$L(\chi,0) \equiv 1 + \zeta + \zeta^2 + \ldots + \zeta^{2^{m-1} -1} \mod 2.$$


Yet then 


$$(1 - \zeta) L(\chi,0) \equiv 1 - \zeta^{2^{m-1}} = 1 + 1 \equiv 2 \mod 2(1 - \zeta),$$


and hence one sees directly that the valuation of $L(\chi,0)$ is $(2^{m-1} - 1)/2^{m-1}$.


$\quad$


