
We prove the weight elimination direction of the Serre weight conjectures as
formulated by Herzig for forms of $U(n)$ which are compact at infinity and
split at places dividing $p$ in generic situations. That is, we show that all
modular weights for a mod $p$ Galois representation are contained in the set
predicted by Herzig. Under some additional hypotheses, we also show modularity
of all the "obvious" weights.

We prove in generic situations that the lattice in a tame type induced by the
completed cohomology of a $U(3)$arithmetic manifold is purely local, i.e.,
only depends on the Galois representation at places above $p$. This is a
generalization to $\mathrm{GL}_3$ of the lattice conjecture of Breuil. In the
process, we also prove the geometric BreuilM\'ezard conjecture for (tamely)
potentially crystalline deformation rings with HodgeTate weights $(0,1,2)$ as
well as the Serre weight conjectures over an unramified field extending our
previous results. We also prove results in modular representation theory about
lattices in DeligneLuzstig representations for the group
$\mathrm{GL}_3(\mathbb{F}_q)$.

Let $F$ be a totally real field in which $p$ is unramified. Let
$\overline{r}: G_F \rightarrow \mathrm{GL}_2(\overline{\mathbb{F}}_p)$ be a
modular Galois representation which satisfies the TaylorWiles hypotheses and
is tamely ramified and generic at a place $v$ above $p$. Let $\mathfrak{m}$ be
the corresponding Hecke eigensystem. We describe the $\mathfrak{m}$torsion in
the mod $p$ cohomology of Shimura curves with full congruence level at $v$ as a
$\mathrm{GL}_2(k_v)$representation. In particular, it only depends on
$\overline{r}_{I_{F_v}}$ and its JordanH\"{o}lder factors appear with
multiplicity one. The main ingredients are a description of the submodule
structure for generic $\mathrm{GL}_2(\mathbb{F}_q)$projective envelopes and
the multiplicity one results of \cite{EGS}.

Under hypotheses required for the TaylorWiles method, we prove for forms of
$U(3)$ which are compact at infinity that the lattice structure on upper alcove
algebraic vectors or on principal series types given by the $\lambda$isotypic
part of completed cohomology is a local invariant of the Galois representation
attached to $\lambda$ when this Galois representation is residually irreducible
locally at places dividing $p$. As a crucial input, we establish corresponding
mod $p$ multiplicity one results. Our main innovation is the combination of
integral Hecke theory and the TaylorWiles method.

Let $F$ be a totally real field in which $p$ is unramified. Let
$\overline{r}: G_F \rightarrow \mathrm{GL}_2(\overline{\mathbb{F}}_p)$ be a
modular Galois representation which satisfies the TaylorWiles hypotheses and
is generic at a place $v$ above $p$. Let $\mathfrak{m}$ be the corresponding
Hecke eigensystem. Then the $\mathfrak{m}$torsion in the mod $p$ cohomology of
Shimura curves with full congruence level at $v$ coincides with the
$\mathrm{GL}_2(k_v)$representation $D_0(\overline{r}_{G_{F_v}})$ constructed
by Breuil and Pa\v{s}k\={u}nas. In particular, it depends only on the local
representation $\overline{r}_{G_{F_v}}$, and its JordanH\"older factors
appear with multiplicity one. This builds on and extends work of the author
with Morra and Schraen and independently of HuWang, which proved these results
when $\overline{r}_{G_{F_v}}$ was additionally assumed to be tamely ramified.
The main new tool is a method for computing TaylorWiles patched modules of
integral projective envelopes using multitype tamely potentially BarsottiTate
deformation rings and their intersection theory.

Suppose that F/F+ is a CM extension of number fields in which the prime p
splits completely and every other prime is unramified. Fix a place wp of F.
Suppose that rbar : Gal(Fbar/F) > GL_3(Fpbar) is a continuous irreducible
Galois representation such that rbar_{Gal(F_wbar/F_w)} is uppertriangular,
maximally nonsplit, and generic. If rbar is automorphic, and some suitable
technical conditions hold, we show that rbar_{\Gal(F_wbar/F_w)} can be
recovered from the GL_3(F_w)action on a space of mod p automorphic forms on a
compact unitary group. On the way we prove results about weights in Serre's
conjecture for rbar, show the existence of an ordinary lifting of rbar, and
prove the freeness of certain TaylorWiles patched modules in this context. We
also show the existence of many Galois representations rbar to which our main
theorem applies.

We prove the weight part of Serre's conjecture in generic situations for
forms of $U(3)$ which are compact at infinity and split at places dividing $p$
as conjectured by Herzig. We also prove automorphy lifting theorems in
dimension three. The key input is an explicit description of tamely potentially
crystalline deformation rings with HodgeTate weights $(2,1,0)$ for
$K/\mathbb{Q}_p$ unramified combined with patching techniques. Our results show
that the (geometric) BreuilM\'ezard conjectures hold for these deformation
rings.