D4 modular forms

In this paper, we study modular forms on two simply connected groups of type D4 over Q. One group, Gs, is a globally split group of type D4, viewed as the group of isotopies of the split rational octonions. The other, Gc, is the isotopy group of the rational (nonsplit) octonions. We study automorphic forms on Gs in analogy to the work of Gross, Gan, and Savin on G2; namely we study automorphic forms whose component at infinity corresponds to a quaternionic discrete series representation. We study automorphic forms on Gc using Gross's formalism of "algebraic modular forms." Finally, we follow work of Gan, Savin, Gross, Rallis, and others, to study an exceptional theta correspondence connecting modular forms on Gc and Gs. This can be thought of as an octonionic generalization of the Jacquet-Langlands correspondence.