\documentclass[11pt,english]{smfart}

\usepackage[T1]{fontenc}
\usepackage[english,francais]{babel}

\usepackage{amssymb,url,xspace,smfthm}

\def\meta#1{$\langle${\it #1}$\rangle$}
\newcommand{\myast}{($\star$)\ }
\makeatletter
    \def\ps@copyright{\ps@empty
    \def\@oddfoot{\hfil\small\copyright 2014, \SmF}}
\makeatother

\newcommand{\SmF}{Soci\'et\'e ma\-th\'e\-ma\-ti\-que de France}
\newcommand{\SMF}{Soci\'et\'e Ma\-th\'e\-Ma\-ti\-que de France}
\newcommand{\BibTeX}{{\scshape Bib}\kern-.08em\TeX}
\newcommand{\T}{\S\kern .15em\relax }
\newcommand{\AMS}{$\mathcal{A}$\kern-.1667em\lower.5ex\hbox
        {$\mathcal{M}$}\kern-.125em$\mathcal{S}$}
\newcommand{\resp}{\emph{resp}.\xspace}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage[all]{xy}
\input yoga.sty
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% My added macros
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\tolerance 400
\pretolerance 200


\title{Non-split reductive groups over $\mathbf Z$}
\date{\today}
\author{Brian Conrad}

\address{Math Dept., Stanford University\\
Stanford, CA 94305, USA}
\email{conrad@math.stanford.edu}
\urladdr{http://smf.emath.fr/}
%\keywords{Monaco, Tax-free. \\  $\hbox{\quad \enskip }$ {\bf   MSC 2000:\!} 14L15, 14L30.}


%\documentclass[12pt,amssymb]{amsart}
%\usepackage{amsmath}
%\usepackage{amssymb}



%\documentclass[12pt,amssymb]{amsart}
%\usepackage{amsmath}
%\usepackage{amssymb}
%\DeclareFontFamily{OT1}{rsfs}{}
%\DeclareFontShape{OT1}{rsfs}{n}{it}{<-> rsfs10}{}
%\DeclareMathAlphabet{\mathscr}{OT1}{rsfs}{n}{it}
% \topmargin=0in
%   \oddsidemargin=0in
%   \evensidemargin=0in
%   \textwidth=6.5in
%\textheight=8in
%
%\newcommand{\marginalfootnote}[1]{
%   \footnote{#1}
%   \marginpar{\hfill {\sf\thefootnote}}}
%\newcommand{\edit}[1]{\marginalfootnote{#1}}
%
%
%\usepackage[all]{xy}
%\CompileMatrices

\DeclareFontFamily{OT1}{rsfs}{}
\DeclareFontShape{OT1}{rsfs}{n}{it}{<-> rsfs10}{}
\DeclareMathAlphabet{\mathscr}{OT1}{rsfs}{n}{it}

\newcommand{\Add}{{\mathbf{G}}_{\rm{a}}}
\newcommand{\Gm}{{\mathbf{G}}_{\rm{m}}}
\DeclareMathOperator{\wt}{wt}
%\newcommand{\Gm}{{\rm{GL}}_1}
%\DeclareMathOperator{\Hom}{Hom}
%\DeclareMathOperator{\Ext}{Ext}
%\DeclareMathOperator{\Gal}{Gal}
%\DeclareMathOperator{\GL}{GL}
%\DeclareMathOperator{\Lie}{Lie}
%\DeclareMathOperator{\T}{T}
\DeclareMathOperator{\Res}{R}
%\DeclareMathOperator{\Sp}{Sp} 
%\DeclareMathOperator{\SL}{SL}
\DeclareMathOperator{\Spin}{Spin}
%\DeclareMathOperator{\SO}{SO}
%\DeclareMathOperator{\Tr}{Tr}
%\DeclareMathOperator{\PGL}{PGL}
\DeclareMathOperator{\X}{X}
%\DeclareMathOperator{\Aut}{Aut}
%\DeclareMathOperator{\Spec}{Spec}
%\DeclareMathOperator{\Proj}{Proj}
%\DeclareMathOperator{\Mod}{mod}
%\DeclareMathOperator{\coker}{coker}
%\DeclareMathOperator{\et}{\acute{e}t}
\newcommand*{\invlim}{\varprojlim}                               % invlimit
\newcommand*{\tensorhat}{\widehat{\otimes}}                      %compl. tensor
\newcommand*{\RRR}{\ensuremath{\mathbf{R}}}                        % reals
\newcommand*{\Z}{\ensuremath{\mathbf{Z}}}                        % integers
\newcommand*{\Q}{\ensuremath{\mathbf{Q}}}                        % rationals
\newcommand*{\F}{\ensuremath{\mathbf{F}}}                        % field
\newcommand*{\C}{\ensuremath{\mathbf{C}}}                        % complex's
\newcommand*{\A}{\ensuremath{\mathbf{A}}}                        % affine/adele
\newcommand*{\N}{\ensuremath{\mathbf{N}}}                        % naturals
\renewcommand*{\P}{\ensuremath{\mathbf{P}}}                        % proj space
\newcommand*{\m}{\mathfrak{m}}                                   % gothic m
\newcommand*{\n}{\mathfrak{n}}                                   % gothic n
\newcommand*{\p}{\mathfrak{p}}                                   % gothic p
\newcommand*{\q}{\mathfrak{q}}                                   % gothic q
\renewcommand*{\r}{\mathfrak{r}}                                 % gothic r
\newcommand*{\barrho}{\overline{\rho}}                           % rho bar
\newcommand*{\Qbar}{\overline{\Q}}                               % alg clos Q
\newcommand*{\Fbar}{\overline{\F}}                               % alg clos F
%\renewcommand*{\O}{\mathscr{O}}                                  % 'sheaf' O
\DeclareMathOperator{\Det}{det}
%\newcommand*{\calA}{\mathscr{A}}
%\newcommand*{\calE}{\mathscr{E}}                               % `sheaf' E
%\newcommand*{\calF}{\mathscr{F}}                               % 'sheaf' F
%\newcommand*{\calG}{\mathscr{G}}                               % 'sheaf' G
%\newcommand*{\calH}{\mathscr{H}}                               % 'sheaf' H
%\newcommand*{\calI}{\mathscr{I}}                               % 'sheaf' I
%\newcommand*{\calJ}{\mathscr{J}}                               % 'sheaf' J
%\newcommand*{\calL}{\mathscr{L}}                               % `sheaf' L
%\newcommand*{\calS}{\mathscr{S}}                               % `sheaf' S
%\newcommand*{\calHom}{\mathscr{H}\mathit{om}}                  % `sheaf' Hom
\newcommand*{\calExt}{\mathscr{E}\mathit{xt}}                  % `sheaf' Ext
%\renewcommand*{\qedsymbol}{\ensuremath{\blacksquare}}            % end of proof
\newcommand*{\eqdef}{\stackrel{\text{def}}{=}}     % definition
\renewcommand*{\ge}{\geqslant}
\renewcommand*{\le}{\leqslant}

%
%
%\DeclareFontEncoding{OT2}{}{} % to enable usage of cyrillic fonts
%  \newcommand{\textcyr}[1]{%
%    {\fontencoding{OT2}\fontfamily{wncyr}\fontseries{m}\fontshape{n}%
%     \selectfont #1}}
%\newcommand{\Sha}{{\mbox{\textcyr{Sh}}}}




% \swapnumbers
\theoremstyle{plain}
  \newtheorem{theorem}[subsection]{Theorem}
  \newtheorem{proposition}[subsection]{Proposition}
  \newtheorem{lemma}[subsection]{Lemma}
  \newtheorem{corollary}[subsection]{Corollary}
  

\theoremstyle{definition}
  \newtheorem{definition}[subsection]{Definition}
  \newtheorem{exer}[subsection]{Exercise}
  \newtheorem{example}[subsection]{Example}
  \newtheorem{remark}[subsection]{Remark}
  \newtheorem{para}[subsection]{}
  \newtheorem{notation}{Notation}

\renewcommand{\thepart}{\Roman{part}}



\numberwithin{equation}{section}

\newcounter{bean}

\makeatletter
\newcommand\@dotsep{4.5}
\def\@tocline#1#2#3#4#5#6#7{\relax
  \ifnum #1>\c@tocdepth % then omit
  \else
    \par \addpenalty\@secpenalty\addvspace{#2}%
    \begingroup \hyphenpenalty\@M
    \@ifempty{#4}{%
      \@tempdima\csname r@tocindent\number#1\endcsname\relax
    }{%
      \@tempdima#4\relax
    }%
    \parindent\z@ \leftskip#3\relax
    \advance\leftskip\@tempdima\relax
    \rightskip\@pnumwidth plus1em \parfillskip-\@pnumwidth
    #5\leavevmode\hskip-\@tempdima #6\relax
    \leaders\hbox{$\m@th
      \mkern \@dotsep mu\hbox{.}\mkern \@dotsep mu$}\hfill
    \hbox to\@pnumwidth{\@tocpagenum{#7}}\par
    \nobreak
    \endgroup
  \fi}
\makeatother 

%
%\usepackage[colorlinks=true]{hyperref}
%\renewcommand*{\O}{\mathscr{O}}                                  % 'sheaf' O


\usepackage[usenames,dvipsnames]{color}
\usepackage[colorlinks=false,naturalnames]{hyperref}
%\hypersetup{naturalnames,linkcolor=Maroon,citecolor=Emerald,pagecolor=Maroon,urlcolor=Brown}
%\renewcommand*{\O}{\mathscr{O}} 




%\title{Non-split reductive groups over $\mathbf Z$}
%\author{Brian Conrad}
%\address{Department of Mathematics\\
%Stanford University\\
%Stanford, CA 48109, USA}
%\email{conrad@math.stanford.edu}
%\author{Benedict H. Gross}
%\address{Department of Mathematics\\
%Harvard University\\
%Cambridge, MA 02138, USA}
%\email{gross@math.harvard.edu}
%\date{April 3, 2014}

\begin{document}
\def\smfbyname{}


\begin{abstract}
We study the following 
phenomenon: some {\em non-split} connected semisimple $\Q$-groups $G$ admit flat affine
$\Z$-group models $\mathscr{G}$ with ``everywhere good reduction'' (i.e., $\mathscr{G}_{\mathbf{F}_p}$ is a connected
semisimple $\mathbf{F}_p$-group for every prime $p$). Moreover, considering such $\mathscr{G}$ up to
$\Z$-group isomorphism, there can be more than one such 
$\mathscr{G}$ for a given $G$.  This is seen classically for
types ${\rm{B}}$ and ${\rm{D}}$ by using positive-definite quadratic lattices.

The study of such $\Z$-groups provides concrete applications of many facets
of the theory of reductive groups over rings (scheme of Borel subgroups, automorphism scheme, relative non-abelian cohomology, etc.),
and it highlights the role of number theory (class field theory, mass formulas, 
strong approximation, point-counting over finite fields, etc.) in analyzing the possibilities. In part, this is an expository account of \cite{G}. 
\end{abstract}

\begin{altabstract}
Nous \'etudions le  ph\'enom\`ene suivant: certains  $\Q$-groupes $G$ semi-simples connexes {\em non d\'eploy\'es}
admettent comme  mod\`eles des $\Z$-groupes $\mathscr{G}$ affines et plats avec ``partout bonne r\'eduction'' (c'est \`a dire, $\mathscr{G}_{\mathbf{F}_p}$ est
un  $\mathbf{F}_p$-groupe  $\Q$-groupes $G$ pour chaque premier $p$). En outre, consid\'erant  de tels $\mathscr{G}$ \`a
$\Z$-groupe isomorphisme pr\`es, il  y a au  plus un tel
$\mathscr{G}$ pour un $G$ donn\'e. Ceci est vu  classiquement pour les
types ${\rm{B}}$ et ${\rm{D}}$ en utilisant des r\'eseaux quadratiques d\'efinis positifs.

L'\'etude de ces $\Z$-groupes donne lieu \`a  des applications concr\`etes d'aspects multiples,
de la th\'eorie des groupes r\'eductifs sur des anneaux (sch\'emas de sous-groupes de Borel, sch\'emas d'automorphismes,  cohomologie relative non ab\'elienne, etc.),
et  met en \'evidence le r\^ole de la th\'eorie des nombres (th\'eorie du corps de classes, formules de masse,
approximation forte,  comptage de points sur les corps finis, etc.) dans l'analyse des possibilit\'es. En partie, ceci  est un article d'exposition sur
 \cite{G}.
\end{altabstract}

\maketitle

\newpage

\tableofcontents

\section{Chevalley groups and $\Z$-models}

A {\em Chevalley group} is a reductive $\Z$-group scheme
(i.e., a smooth affine group scheme $G \rightarrow \Spec(\Z)$ with connected reductive fibers)
that admits a fiberwise maximal $\Z$-torus $T \subset G$.  For example, the classical groups
${\rm{SL}}_n$, ${\rm{GL}}_n$, ${\rm{PGL}}_n$, ${\rm{Sp}}_{2n}$, and ${\rm{SO}}_n$ over $\Z$ are all Chevalley groups.
(The characteristic-free definition of ${\rm{SO}}_n$ requires some care when $n$ is even; see \cite[C.2.9]{C}.)
Many authors require Chevalley groups to have semisimple fibers, but this is a matter of convention.


A more traditional viewpoint on Chevalley groups is obtained via the notion of {\em $\Z$-model} of a connected
reductive $\Q$-group.  In general, if $K$ is the fraction field of a domain $R$ then an {\em $R$-model} of a connected reductive $K$-group $G$
is a pair $(\mathscr{G},\theta)$ consisting of a reductive $R$-group scheme $\mathscr{G}$ 
and an isomorphism of $K$-groups $\theta:\mathscr{G}_K \simeq G$.
The notion of isomorphism between models  of $G$ is defined in an evident manner.   
(Our notion of ``model'' is more restrictive than in other circumstances, where one allows
any flat and finitely presented -- or perhaps even smooth -- affine group with a specified generic fiber.)



\begin{lemma}\label{splitQ} The generic fiber of any Chevalley group is split. 
\end{lemma}

\begin{proof} It suffices to show that any $\Z$-torus is necessarily split. 
By \cite[X, 1.2, 5.16]{sga3} (or \cite[Cor.\:B.3.6]{C}),
the category of tori over a connected normal noetherian scheme $S$
is anti-equivalent to the category of finite free $\Z$-modules equipped with
a continuous action of $\pi_1(S)$. (When $S = {\rm{Spec}}(k)$ for a field $k$, this recovers
the familiar ``character lattice'' construction for $k$-tori.)
An $S$-torus is split when the associated $\pi_1(S)$-action is trivial. 

For any Dedekind domain $A$, the connected finite \'etale covers
of ${\rm{Spec}}(A)$ correspond to the finite extensions of
Dedekind domains $A \hookrightarrow A'$ with unit discriminant.
Thus, by Minkowski's theorem that every number field $K \ne \Q$ has a ramified prime,
$\Spec(\Z)$ has no nontrivial connected finite \'etale covers.  Hence,
$\pi_1(\Spec(\Z)) = 1$, so all $\Z$-tori are split. 
\end{proof}

Every Chevalley group $\mathscr{G}$ is a $\Z$-model of its split connected reductive generic fiber  over $\Q$, and 
the Existence and Isomorphisms Theorems over $\Z$ provide a converse that is one of the main theorems of \cite{sga3}:

\begin{theorem}[Chevalley, Demazure]  Let $R$ be a domain with fraction field $K$.
Every split connected reductive $K$-group $G$ admits an $R$-model of the form $\mathbf{G}_R$ 
for a Chevalley group $\mathbf{G}$ over $\Z$, and $\mathbf{G}$ is uniquely determined up to $\Z$-group isomorphism.
\end{theorem}

The existence of $\mathbf{G}$ for each $G$ 
was first proved for $K = \Q$ as the main result in \cite{chevbour}, though the language of reductive group schemes
over $\Z$ was not available at that time. The approach used by Demazure in \cite[XXV]{sga3} is
to abstractly build a ``split'' $\Z$-group $\mathbf{G}$ whose associated root datum may be specified in advance.
The Isomorphism Theorem for split connected reductive groups over $K$ then ensures that
one gets all such $K$-groups as generic fibers of the $\mathbf{G}_R$'s by varying over all possibilities for  the root datum.
Chevalley groups are the {\em only} $\Z$-models in the split case over $\Q$, so we
get a characterization of Chevalley groups without any mention of
maximal tori over rings.  More generally:

\begin{proposition}\label{splitchev} If $R$ is a principal ideal domain
and $G$ is a split connected reductive group over $K = {\rm{Frac}}(R)$ 
then any $R$-model of $G$ is $\mathbf{G}_R$ for
a Chevalley group $\mathbf{G}$ over $\Z$.
\end{proposition}

The hypothesis on $R$ is optimal: if $R$ is Dedekind with fraction field $K$ and $I$ is a nonzero ideal in $R$
whose class in ${\rm{Pic}}(R)$ is not a square then ${\rm{SL}}(R \oplus I)$ is a {\em non-trivial} Zariski-form of
${\rm{SL}}_{2,R}$ (see \cite[Exer.\:7.4.10]{C}).
We postpone the proof of Proposition \ref{splitchev} until \S\ref{cohomsec}, as it requires cohomological notions introduced there.  


The preceding discussion is 
summarized by: 

\begin{theorem}  Passage to the $\Q$-fiber defines a bijection
from the set of $\Z$-isomorphism classes of Chevalley groups onto the set of isomorphism classes of split
connected reductive $\Q$-groups,
with each set classified by root data $($up to isomorphism$)$.  Moreover, the {\em only}
$\Z$-models of such $\Q$-groups are those provided by Chevalley groups.
\end{theorem}

Work of Chevalley (\cite{bible}, \cite{chevbour})
and Demazure--Grothendieck \cite{sga3}
provides a satisfactory understanding of this remarkable theorem.
(For any scheme $S \ne \emptyset$, \cite[XXII, 1.13]{sga3} provides a definition of {\em Chevalley $S$-group}
avoiding the crutch of the theory over $\Z$.
This involves additional conditions that are automatic for $S = \Spec(\Z)$.)

\medskip

Informally, the connected semisimple $\Q$-groups arising as generic fibers of 
non-Chevalley semisimple $\Z$-groups are those with ``good reduction'' at all primes
but non-split over $\RRR$ (see Propositions \ref{sc} and \ref{Rinj}). 
The theory surrounding such $\Z$-groups
was the topic of \cite{G}, where the possibilities for the $\Q$-fiber were classified
(under an absolutely simple hypothesis) and some explicit $\Z$-models were given 
for exceptional types, generalizing examples arising
from quadratic lattices.  

\medskip

{\bf Overview}. In \S\ref{quadsec} we discuss special orthogonal groups
in the scheme-theoretic framework, highlighting 
the base scheme $\Spec(\Z)$ and some classical
examples of semisimple $\Z$-groups with non-split generic fiber
arising from quadratic lattices.  In \S\ref{cohomsec} we discuss general cohomological formalism
for working with smooth (or more generally, fppf) affine groups over rings, extending
the more widely-known formalism over fields as in  \cite[III]{S}.

In \S\ref{gensec} we describe the possibilities for the generic fibers of reductive $\Z$-groups,
with an emphasis on the case of semisimple $\Z$-groups whose fibers are absolutely
simple and simply connected, and we show that this case accounts for the rest via direct products
and central isogenies.   In \S\ref{coxsec} we introduce Coxeter's order
in Cayley's definite octonion algebra over $\Q$, and we use it in \S\ref{exsec} to describe some non-split examples over $\Z$.  
In \S\ref{countsec} we explain (following \cite{G}) how to use mass formulas
to prove in some cases that the list of $\Z$-models found in \S\ref{exsec} for certain $\Q$-groups
is exhaustive.

In Appendix \ref{genustheory} we use the cohomological formalism of semisimple $\Z$-groups to prove
that an indefinite non-degenerate quadratic lattice over $\Z$ is determined up to isomorphism by its signature
(in odd rank these are not unimodular lattices), and in Appendix \ref{octsec} we  discuss generalities concerning  
octonion algebras over commutative rings, with an emphasis on the special case of Dedekind domains.
Finally, in Appendix \ref{E6app} we discuss an explicit 
construction of the simply connected Chevalley group of type ${\rm{E}}_6$.

Justification of the construction of simply connected Chevalley groups over $\Z$ of types
${\rm{F}}_4$ and ${\rm{E}}_6$ via Jordan algebras (in \S\ref{exsec} and Appendix \ref{E6app})
uses concrete linear algebra and Lie algebra computations over $\Z$ via Mathematica code written by Jiu-Kang Yu
(see \cite{jk});  for ${\rm{E}}_6$ this is only needed with local problems at $p = 2, 3$.
Reliance on the computer can probably be replaced with theoretical arguments by 
justifying the applicability of results in \cite[Ch.\:14]{springerj},
\cite[\S6]{loos79}, \cite[\S5]{asch}, and \cite[\S3]{loos05} 
to our circumstances, but it seems less time-consuming to use the computer.

\medskip

{\bf Terminology}.  A connected semisimple group $G$ over a field $k$ is 
{\em absolutely simple} if $G \ne 1$ and $G_{\overline{k}}$ has no nontrivial smooth
connected proper normal subgroup. 
This is equivalent to irreducibility of
the root system of $G_{\overline{k}}$. In the literature there is a plethora of 
terminology for this concept:  {\em absolutely almost simple}, 
{\em absolutely quasi-simple}, etc. (see \cite[\S1, p.\:264]{G}).

\medskip

{\bf Acknowledgements}. This work was partially supported by NSF grant DMS-0917686.  I am
grateful to Wee Teck Gan and Gopal Prasad for  their advice, 
Benedict Gross for illuminating discussions and his inspiring work upon which these notes are based, 
Jiu-Kang Yu for generously sharing his expertise with 
group scheme computations on the computer, and the referees for providing useful feedback.  Most of all, I am indebted to 
Patrick Polo for his extensive and insightful suggestions and corrections that vastly improved the content and exposition
(and fixed gaps in an earlier treatment). 

\section{Quadratic spaces and quadratic lattices}\label{quadsec}

A {\em quadratic space} over a ring $R$ is a pair $(M,q)$ consisting of a locally free $R$-module $M$ 
of finite rank $n > 0$ equipped with an $R$-valued {\em quadratic form} on $M$: 
a map $$q:M \rightarrow R$$
such that (i) $q(cx) = c^2 q(x)$ for all $x \in M$, $c \in R$ and (ii) the symmetric 
$$B_q:M \times M \rightarrow R$$ defined by $(x,y) \mapsto q(x+y)-q(x)-q(y)$
is $R$-bilinear. 
(For our purposes, the quadratic spaces of most interest will be over fields and Dedekind domains.)

For a quadratic space $(M,q)$ over $R$ such that $M$ admits an $R$-basis $\{e_1,\dots,e_n\}$, 
\begin{equation}\label{discdef}
{\rm{disc}}(q) := \Det(B_q(e_i, e_j)) \in R
\end{equation}
changes by $(R^{\times})^2$-scaling when we change the basis.
For $R = \Z$, this is a well-defined element of $\Z$ called 
the {\em discriminant} of $(M,q)$.
(For general $R$, the ideal ${\rm{disc}}(q)$ generates in $R$
is independent of $\{e_i\}$ and thus globalizes to a locally principal ideal of $R$ when $M$ is not assumed to be free.
If $R = \Z$ then this ideal provides less information than the discriminant in $\Z$.)

A {\em quadratic lattice} is a quadratic space $(M,q)$ over $\Z$ such that ${\rm{disc}}(q) \ne 0$.  For such pairs, 
$(M_{\RRR}, q_{\RRR})$ is a non-degenerate quadratic space over $\RRR$ and so has
a {\em signature} $(r,s)$ with $s = n-r$. 

\begin{example} Let $V$ be a finite-dimensional inner product space over $\RRR$, and $L \subset V$ a lattice
such that $q(x) := \langle x, x \rangle \in \Z$ for all $x \in L$.  Then $(L,q)$ is a quadratic lattice.
Note that $B_q(x,y) = 2 \langle x, y \rangle \in 2\Z$ for all $x, y \in L$. 
\end{example}


\begin{remark}
In the literature, one sometimes finds another convention for (\ref{discdef}),
multiplying against $(-1)^{n(n-1)/2}$
where $n$ is the rank of the underlying module. (The  definition without the sign is then called
the {\em determinant} of the quadratic space.) This sign coincides with that of ${\rm{disc}}(q_n)$ for
$(\Z^n, q_n)$ as in (\ref{stdq}) below. 

The ``signed discriminant'' is the convention
in the book of
Husem\"{o}ller--Milnor \cite[III, \S5]{milnor}, whereas
the books of Serre \cite[IV, 1.1]{S2} and Knus \cite[I, (3.1.1); IV, (3.1.2), (3.1.3)]{knus} do not insert the sign.
We follow \cite{S2} by not inserting a sign in the definition of ${\rm{disc}}(q)$. 
\end{remark}



The {\em orthogonal group} of  a quadratic lattice $(M,q)$ is the affine $\Z$-group 
$${\rm{O}}(q) = \{g \in {\rm{GL}}(M)\,|\,q \circ g = q\}.$$
This can fail to be $\Z$-flat for fiber-jumping reasons, 
even when $q$ is $\Z$-primitive. For example, if $q = x^2 + y^2 + p z^2$ for an odd prime $p$ then
${\rm{O}}(q)_{\Q}$ has dimension 3 whereas ${\rm{O}}(q)_{\mathbf{F}_p}$ has dimension 4
and ${\rm{O}}(q)_{\mathbf{F}_2}$ has dimension 6. (In this case, ${\rm{disc}}(q) = 8p^2$.)
A nicer situation is that of the standard split quadratic form $q_n$ on $\Z^n$ given by
\begin{equation}\label{stdq}
q_{2m} = x_1 x_2 + x_3 x_4 + \dots + x_{2m-1} x_{2m},\,\,\,
q_{2m+1} = x_0^2 + q_{2m}.
\end{equation}
This satisfies ${\rm{disc}}(q_{2m}) = (-1)^m$ and ${\rm{disc}}(q_{2m+1}) = 2 (-1)^m$, so ${\rm{disc}}(q_n)$ has
sign $(-1)^{n(n-1)/2}$ for all $n$. 

The $\Z$-group ${\rm{O}}_n := {\rm{O}}(q_n)$ 
is smooth for even $n$  \cite[C.1.5]{C} whereas for $n = 2m+1$ it is $\Z$-flat
and equal to $\mu_2 \times {\rm{SO}}_{2m+1}$ where
\begin{equation}\label{soodd}
{\rm{SO}}_{2m+1} := {\rm{O}}_{2m+1} \cap {\rm{SL}}_{2m+1}
\end{equation}
 is $\Z$-smooth \cite[C.2.9--C.2.11]{C}.

A useful variant of the notion of a 
quadratic lattice is: 

\begin{definition} A {\em unimodular lattice} is a pair $(M', B')$ where $M'$ is
a nonzero finite free $\Z$-module and $B':M' \times M' \rightarrow \Z$ is a symmetric bilinear form such that 
${\rm{disc}}(B') := \Det(B'(e_i,e_j))$ equals $\pm 1$ for some (equivalently, any) $\Z$-basis $\{e_i\}$ of $M'$.
\end{definition}

Associated to such an $(M',B')$ is the quadratic lattice $(M',Q_{B'})$ with $Q_{B'}(x) = B'(x,x)$.
If $(M',B') = (M, B_q)$ 
for a quadratic lattice $(M,q)$ then $Q_{B'} = 2q$ is valued in $2\Z$, so 
unimodular lattices $(M',B')$ of rank $n$ that are {\em even} in the sense that $Q_{B'}$ is valued in $2\Z$ 
(called ``type II'' in \cite[Ch.\:V]{S2}) are equivalent
to quadratic lattices $(M,q)$ of rank $n$ such that ${\rm{disc}}(q)= \pm 1$.  
If $Q_{B'}(M') \not\subset 2\Z$ then we say $(M',B')$ is {\em odd}.

\begin{example}\label{sympex}
The lattice $M' = \Z^n$ equipped with $B'(\vec{x}, \vec{y}) = \sum_{i=1}^n x_i y_i$
is a unimodular lattice for any $n$.  This is never even.

Examples of even unimodular lattices include
the hyperbolic plane $H$ over $\Z$ (arising from the quadratic form $q_2(x,y) = xy$ on $\Z^2$) 
and the positive-definite or negative-definite versions of the ${\rm{E}}_8$ root lattice inside $\Z^8$ \cite[Ch.\:V, 1.4.3]{S2}.

Any unimodular lattice $(M',B')$ with odd rank must
satisfy $Q_{B'}(M') \not\subset 2\Z$; i.e., it is ``type I'' in the terminology of \cite[Ch.\:V]{S2}.
Indeed, otherwise the non-degenerate $B' \bmod 2$ on $M/2M$ would be alternating, hence
a symplectic form over $\mathbf{F}_2$, and symplectic spaces over a field always have even dimension.
\end{example}

In many characteristic-free references
on quadratic forms (e.g., \cite{chevquad}, \cite{sv}), a quadratic space $(V,q)$ over a field $k$ is
called ``non-degenerate'' when $B_q:V \times V \rightarrow k$ is a perfect pairing.  This has the effect
of ruling out odd-dimensional $V$ when ${\rm{char}}(k)=2$, since $B_q$ is alternating in characteristic 2
and a symplectic space is always even-dimensional.  A systematic approach to semisimple group schemes
over $\Z$ must incorporate all special orthogonal groups in a characteristic-free manner, and to that end 
we will find it convenient to use a broader notion of non-degeneracy that allows odd-dimensional examples
in characteristic 2:

\begin{definition}\label{nddef} A quadratic space $(M,q)$ 
over a commutative ring $R$ is {\em non-degenerate} if $q$ is fiberwise nonzero over ${\rm{Spec}}(R)$
and the $R$-flat zero scheme $(q=0) \subset \mathbf{P}(M^{\ast})$ is $R$-smooth. 
\end{definition}

If $R$ is a field then our notion of non-degeneracy
is equivalent to perfectness of $B_q$ except in odd dimension in characteristic 2, 
for which it is the condition that the defect space $$M^{\perp} := \{m \in M\,|\,B_q(m,\cdot)=0\}$$ is 1-dimensional
(the smallest possibility in odd-rank cases in characteristic 2);  the steps of the proof of this equivalence are
given in \cite[Exer.\:1.6.10]{C}.
For $R = \Z$, the condition of fiberwise non-vanishing for $q$ over $\Spec(R)$ 
is classically called {\em primitivity} for $q$.  In general, 
the $R$-smoothness of $(q=0)$ may be checked fiberwise due to its $R$-flatness.
If $R$ is a domain with fraction field $K$ and $R \ne K$ then non-degeneracy
for a quadratic space $(M,q)$ over $R$ is much stronger than non-degeneracy for $(M_K, q_K)$.

To make non-degeneracy explicit for $R = \Z$, we shall consider  the cases of even and odd rank separately.
Consider an even integer $n > 0$. It is easy to check that the following are equivalent
for $(M,q)$ with $M$ of rank $n$: 
\begin{itemize}
\item ${\rm{disc}}(q) \in \Z^{\times} = \{\pm 1\}$, 
\item $B_q$ is perfect over $\Z$,
\item $q$ is $\Z$-primitive with $\Z$-smooth projective
zero scheme $(q=0) \subset \mathbf{P}(M^{\ast})$.  
\end{itemize}
These correspond to the rank-$n$ even unimodular lattices studied in \cite[Ch.\:V]{S2}.
They exist with signature $(r,s)$ whenever $r-s \equiv 0 \bmod 8$ (in which case $n = r + s$ is certainly even):

\begin{example}\label{evenlat}
If $r = s + 8k$ with $k \ge 0$ then $n = 2s + 8k$ and we can take $(M,q)$
to be the orthogonal direct sum $H^{\oplus s} \oplus {\rm{E}}_8^{\oplus k}$.   If
instead $r = s - 8k$ with $k > 0$ then $n = 2r + 8k$ and we can take $(M,q)$ to be
the orthogonal direct sum of $r$ copies of $H$ and $k$ copies of the negative-definite version of ${\rm{E}}_8$.

The condition $r -s \equiv 0 \bmod 8$ is not only sufficient for the existence of an even-rank $(M,q)$ of signature
$(r,s)$ with ${\rm{disc}}(q)=\pm 1$, but it is also necessary.
Indeed, evenness of the rank reduces this to the same necessity for even unimodular lattices, which 
holds for any rank
\cite[Ch.\:V, 2.1, Cor.\:1 to Thm.\:2]{S2}.
\end{example}

For odd $n=2m+1$ the discriminant ${\rm{disc}}(q)$ is always even. Indeed, $B_q \bmod 2$ is always an alternating form over $\mathbf{F}_2$
and hence would be symplectic if ${\rm{disc}}(q)$ is odd, yet symplectic spaces over fields always have even dimension. Thus, 
a better measure of non-degeneracy over $\Z$ for odd $n$ 
is provided by the {\em half-discriminant} ${\rm{disc}}'(q) = {\rm{disc}}(q)/2$.   
More specifically, if $n = 2m+1 \ge 1$ then by \cite[C.1.4(3)]{C} the two conditions
\begin{itemize}
\item ${\rm{disc}}'(q) \in \Z^{\times} = \{\pm 1\},$ 
\item $q$ is $\Z$-primitive with $\Z$-smooth projective zero scheme 
$(q=0) \subset \mathbf{P}(M^{\ast})$
\end{itemize}
are equivalent and in such cases $B_q \bmod 2$ on $M/2M$ has a 1-dimensional defect space $(M/2M)^{\perp}$.
(For the rank-1 case $(\Z, \pm x^2)$,
the projective space $\mathbf{P}(M^{\ast})$ is $\Spec(\Z)$ and the zero scheme $(q=0)$ in there is empty.)

\begin{example}\label{oddlat}
Odd-rank quadratic lattices $(M,q)$ with half-discriminant $\pm 1$ 
exist with signature $(r,s)$ whenever $r - s \equiv \pm 1 \bmod 8$. 
For example, if $r = s + 8k - 1$ with $k > 0$ then we can take $(M,q)$ to be an orthogonal direct sum
$H^{\oplus s} \oplus {\rm{E}}_8^{\oplus (k-1)} \oplus {\rm{E}}_7$.
If instead $r = s + 8k + 1$ with $k \ge 0$ then we use $H^{\oplus s} \oplus {\rm{E}}_8^{\oplus k} \oplus (x^2)$.
\end{example}

In the indefinite case, any 
$(M,q)$ that is non-degenerate over $\Z$ 
is determined up to $\Z$-isomorphism by its rank and signature.
The proof for $M$ of even rank reduces to the analogue
for unimodular lattices, which is \cite[Ch.\:V, 2.2, Thm.\:6]{S2} (for any rank).
(In the special case $r=s$, which is to say signature $(n/2,n/2)$ with $n$ even, 
it follows that the only example is a direct sum of $n/2$ hyperbolic
planes over $\Z$.) 
The proof for $M$ of odd rank is harder because it does not 
reduce to the analogue for unimodular lattices, so we give a proof in Appendix \ref{genustheory}
using special orthogonal group schemes (to be defined shortly) and 
cohomological techniques with semisimple $\Z$-groups (see \S\ref{cohomsec}). 

In the definite case the situation is completely different.  In addition to Examples \ref{evenlat} and \ref{oddlat}
with rank $n \equiv 0, \pm 1 \bmod 8$, the number of additional examples grows in abundance as $n \rightarrow \infty$.
A weighted enumeration of the definite examples of 
a given rank $n \equiv 0, \pm 1 \bmod 8$ 
is provided by the Minkowski--Siegel mass formula (see \cite[Ch.\:V, 2.3]{S2}, \cite[\S4]{conway},
and the references therein).

\medskip

We have seen that the possibilities for the signature
of an even-rank quadratic lattice that is non-degenerate over $\Z$ are
precisely those $(r,s)$ with $r, s \ge 0$ such that $r - s \equiv 0 \bmod 8$,
and that in odd rank the pairs satisfying $r - s \equiv \pm 1 \bmod 8$ do occur.
To show that no other signatures occur for odd rank, 
we need to digress and explain a general procedure that associates {\em unimodular} lattices
of {\em odd} rank $n$ to rank-$n$ quadratic lattices that
are non-degenerate over $\Z$. The construction and study of such
unimodular lattices is informed by properties of special orthogonal group schemes
over $\Z$ attached to quadatic lattices, so we first review how such group schemes are defined.

\begin{definition}
The {\em special orthogonal group} ${\rm{SO}}(q)$ 
of a quadratic lattice $(M,q)$ is the schematic closure inside ${\rm{O}}(q)$ (or equivalently, inside ${\rm{GL}}(M)$) 
of the smooth closed subgroup ${\rm{SO}}(q_{\Q}) \subset {\rm{O}}(q_{\Q}) = {\rm{O}}(q)_{\Q}$.
\end{definition}

Since $\Z$ is Dedekind, this is a $\Z$-flat closed subscheme of ${\rm{O}}(q)$ that is moreover
a subgroup scheme. To prove that ${\rm{SO}}(q)$ has good properties when $(M,q)$ is
non-degenerate over $\Z$, one uses another procedure in such cases 
to produce a $\Z$-smooth closed subgroup of ${\rm{O}}(q)$ with generic fiber
${\rm{SO}}(q_{\Q})$; such a closed subgroup must equal the flat closure ${\rm{SO}}(q)$ as just defined.
(For example, if $q = q_{2m+1}$ then ${\rm{SO}}(q_{2m+1})$ as defined by Zariski closure over $\Z$ 
must coincide with the $\Z$-smooth ${\rm{SO}}_{2m+1}$ as defined in (\ref{soodd}).)
Such alternative procedures underlie the proofs of the results invoked in the next two examples.

\begin{example}\label{evenso}
Let $(M,q)$ be non-degenerate over $\Z$
with rank $n = 2m \ge 4$. The $\Z$-group ${\rm{O}}(q)$ is $\Z$-smooth \cite[C.1.5]{C}
and ${\rm{SO}}(q)$ is a semisimple $\Z$-group of type ${\rm{D}}_m$ that coincides
with ${\rm{O}}(q) \cap {\rm{SL}}(M)$ over $\Z[1/2]$ \cite[C.2.9, C.3.9, C.3.2]{C}.
We denote ${\rm{SO}}(q_{2m})$ as ${\rm{SO}}_{2m}$. 

In contrast, the $\Z$-group ${\rm{O}}(q) \cap {\rm{SL}}(M)$ is not flat at 2 \cite[C.3.4]{C}.
Moreover, the $\Z$-group ${\rm{SO}}(q) = {\rm{SO}}(-q)$ is a Chevalley group when $r=s$
(this applies to $q = q_{2m}$), 
but otherwise its $\Q$-fiber is not split since even its $\RRR$-fiber is not split (as $\pm q_{\RRR}$ are non-split for signature reasons and 
the homothety class of a non-degenerate quadratic space 
 over a field is determined by the isomorphism class of its special orthogonal group \cite[C.3.13, C.3.15]{C}).
Thus, distinct integers $r, s \ge 0$
in the same congruence class modulo 8 with $n = r+s \ge 4$ provide $\Z$-models of non-split connected semisimple $\Q$-groups
of type ${\rm{D}}_{n/2}$. 
\end{example}

\begin{example}\label{oddso}
If $(M,q)$ is non-degenerate over $\Z$ with odd rank $n=2m+1 \ge 3$
then ${\rm{SO}}(q)$ is a semisimple $\Z$-group of type ${\rm{B}}_m$ (in particular, it is $\Z$-smooth with connected semisimple fibers);
see \cite[C.2.9, C.3.9]{C}.   
\end{example}

Now we are in position to construct unimodular lattices of odd rank $n$
from quadratic lattices $(M,q)$ of odd rank $n$ that are non-degenerate over $\Z$
(i.e., ${\rm{disc}}(q) = \pm 2$).
The first step is:

\begin{lemma}\label{qf2} There is an $\mathbf{F}_2$-isomorphism $q_{\mathbf{F}_2} \simeq q_n$ as quadratic spaces. 
\end{lemma}

\begin{proof}
The condition ${\rm{disc}}(q)=\pm 2$ ensures that the
{\em odd}-dimensional quadratic space $M/2M$ over $\mathbf{F}_2$ is non-degenerate
in the sense that its defect space has the minimal possible dimension (namely, 1).
By \cite[XII, Prop.\:1.2]{sga7}
the quadratic spaces $(M,q)_{\mathbf{F}_2}$ and $(\mathbf{F}_2^n, q_n)$ are
isomorphic over  $\overline{\mathbf{F}}_2$, so 
the isomorphism class of $(M,q)_{\mathbf{F}_2}$ is classified by
a Galois cohomology class in ${\rm{H}}^1(\mathbf{F}_2, {\rm{O}}_n(\overline{\mathbf{F}}_2))$.
But ${\rm{O}}_n = \mu_2 \times {\rm{SO}}_n$ since $n$ is odd, and ${\rm{SO}}_n$ is smooth and connected,
so ${\rm{H}}^1(\mathbf{F}_2, {\rm{O}}_n(\overline{\mathbf{F}}_2)) = {\rm{H}}^1(\mathbf{F}_2, {\rm{SO}}_n) = 1$
by a vanishing theorem of Lang \cite[16.5(i)]{borelag}.  Hence, $q_{\mathbf{F}_2} \simeq q_n$ as desired.
\end{proof}

\begin{remark}\label{odduni}
The existence of an  $\mathbf{F}_2$-isomorphism $q_{\mathbf{F}_2} \simeq q_n$ for odd $n$, as proved
above, can be strengthened:
$q_{\Z_2} \simeq \pm q_n$ over $\Z_2$. (This will be useful later.) 
To prove this, we may and do replace $q$ with $-q$ if necessary so that ${\rm{disc}}(q) = 2(-1)^{n(n-1)/2} = {\rm{disc}}(q_n)$.
By \cite[XII, Prop.\:1.2]{sga7}, $q$ and $q_n$ become isomorphic fppf-locally over $\Z_2$, so 
the affine finite type Isom-scheme $I = {\rm{Isom}}(q,q_n)$ over $\Z_2$ is an ${\rm{O}}_n$-torsor
for the fppf topology. 
Since ${\rm{SO}}_n \rightarrow \Spec(\Z)$ is smooth with connected fibers, 
${\rm{H}}^1(\Z_2, {\rm{SO}}_n) = 1$ (as we will explain more generally in Proposition \ref{lang}).
But ${\rm{O}}_n = \mu_2 \times {\rm{SO}}_n$ because $n$ is odd, so 
the isomorphism class of $I$ is classified by an fppf $\mu_2$-torsor.

This $\mu_2$-torsor is classified by an element in the fppf cohomology group ${\rm{H}}^1(\Z_2,\mu_2)$,
and that group in turn is identified with $\Z_2^{\times}/(\Z_2^{\times})^2$ via the 2-power fppf Kummer sequence 
$$1 \rightarrow \mu_2 \rightarrow \Gm \stackrel{t^2}{\rightarrow} \Gm \rightarrow 1$$
over $\Z_2$.
If $a \in \Z_2^{\times}$ represents the Kummer class of $I$ then upon
passing from the fppf ${\rm{O}}_n$-torsor $I$ back to the quadratic space $q$ via descent theory
yields  a $\Z_2$-isomorphism
$$\varphi:(M,q)_{\Z_2} \simeq (\Z_2^n, a x_0^2 + x_1 x_2 + \dots + x_{n-2}x_{n-1}).$$
The discriminants of the two sides in $\Q_2^{\times}/(\Z_2^{\times})^2$ are
$2(-1)^{n(n-1)/2}$ and $2a(-1)^{n(n-1)/2}$ respectively, 
so $a \in (\Z_2^{\times})^2$. Hence, $q_{\Z_2} \simeq q_n$ as desired.
\end{remark}

By inspection of $(q_n)_{\mathbf{F}_2}$ with $n=2m+1$, it follows from Lemma \ref{qf2} that the maximal isotropic subspaces 
$V \subset M/2M$ have codimension $m$.
Clearly $B_q$ is $2\Z$-valued on the preimage $M'$ of such a $V$ in $M$. Upon
choosing $V$ to obtain such an $M'$, the symmetric bilinear form
$B' = (1/2)B_q|_{M' \times M'}$ is $\Z$-valued with ${\rm{disc}}(B') = 2^{-n}[M:M']^2 {\rm{disc}}(q) = \pm 1$,
so $(M',B')$ is unimodular. Note that $Q_{B'} = q|_{M'}$, and $(M',B')$ has the same signature as $(M,q)$.
The unimodular lattices $(M',B')$ built in this way are always odd (``type I'' in the terminology of \cite[Ch.\:V]{S2}),
since their rank $n$ is odd; see Example \ref{sympex}. 

For odd rank $n \ge 3$ there is more than one choice of $V \subset M/2M$, 
and as we vary $V$ the sublattices $M' \subseteq M$ will vary too.  
However, the isomorphism class of $(M',B')$ does not vary in the indefinite case, 
since these unimodular lattices all have the same signature and in the indefinite case
a unimodular lattice (of any rank) is determined up to isomorphism by its signature \cite[Ch.\:V, 2.2, Thm.\:6]{S2}.
The abstract isomorphisms among all $(M',B')$'s in the indefinite odd-rank case can be made more
concrete by using the strong approximation theorem for indefinite spin groups to prove:

\begin{proposition}\label{sotrans} If $(M,q)$ is indefinite and non-degenerate over $\Z$
with odd rank $n \ge 3$ then the group ${\rm{SO}}(q)(\Z)$ acts transitively on the set of
all such lattices $M' \subseteq M$.
\end{proposition}

\begin{proof}  Since $n \ge 3$, ${\rm{SO}}(q)$
is a semisimple $\Z$-group with absolutely simple fibers.
We first claim that the group ${\rm{SO}}(q)(\mathbf{F}_2) = {\rm{O}}(q)(\mathbf{F}_2)$ acts transitively on the set of
maximal isotropic subspaces $V \subset M/2M$.  

Letting $W$ be the quotient of $M/2M$ by the defect line $(M/2M)^{\perp}$, 
the bilinear form $B_q \bmod 2$ induces a symplectic form $\overline{B}_q$ on $W$.  The maximal isotropic
subspaces of $M/2M$ with respect to $B_q \bmod 2$ contain the defect line, so
the set of such subspaces corresponds bijectively to the set of maximal isotropic subspaces of $W$ (relative to $\overline{B}_q$).
It is elementary that the automorphism group of a symplectic space over a field acts transitively on the
set of maximal isotropic subspaces, so ${\rm{Sp}}(\overline{B}_q)(\mathbf{F}_2)$ acts transitively
on the set of maximal isotropic subspaces of $W$.  To conclude the same for the action of
${\rm{SO}}(q)(\mathbf{F}_2)$ on the set of maximal isotropic subspaces of $M/2M$, it suffices to show that the natural 
isogeny $f:{\rm{SO}}(q)_{\mathbf{F}_2} \rightarrow {\rm{Sp}}(\overline{B}_q)$ (see \cite[C.3.6]{C}) induces a bijection
on $\mathbf{F}_2$-points.   

 Isogenous smooth connected affine groups over a finite field have
the same number of rational points \cite[16.8]{borelag}, and $\ker f$ is infinitesimal (it is $\alpha_2^{n-1}$ since
$q_{\mathbf{F}_2} \simeq q_n$; see 
 \cite[C.3.6]{C}). Thus, $f$ is  bijective on $\mathbf{F}_2$-points.

In view of the transitivity of the ${\rm{SO}}(q)(\mathbf{F}_2)$-action, 
it suffices to show that ${\rm{SO}}(q)(\Z) \rightarrow {\rm{SO}}(q)(\mathbf{F}_2)$ is {\em surjective}.
The verification of this surjectivity property is a job for the strong approximation theorem, except that strong approximation
applies to simply connected groups whereas ${\rm{SO}}(q)$ is not simply connected. 
But ${\rm{Spin}}(q)_{\mathbf{F}_2} \rightarrow {\rm{SO}}(q)_{\mathbf{F}_2}$  is an isogeny
with infinitesimal kernel
over a finite field, so the map on rational points is bijective.
Hence, it suffices to show that ${\rm{Spin}}(q)(\Z) \rightarrow {\rm{Spin}}(q)(\mathbf{F}_2)$ is surjective.

The indefiniteness of $q_{\RRR}$ 
implies that ${\rm{SO}}(q)_{\RRR}$ is $\RRR$-isotropic, so ${\rm{Spin}}(q)_{\RRR}$ is $\RRR$-isotropic. Hence,
the strong approximation theorem for absolutely simple and simply connected $\Q$-groups 
(see \cite{gopal} and references therein) is applicable
to ${\rm{Spin}}(q)_{\Q}$ and the archimedean place of $\Q$.  
This says that ${\rm{Spin}}(q)(\Q) \cdot {\rm{Spin}}(q)(\RRR)$ is dense in ${\rm{Spin}}(q)(\mathbf{A}_{\Q})$, so 
for the open subring $\widehat{\Z}$ inside the ring of finite adeles of $\Q$
we conclude that the intersection $${\rm{Spin}}(q)(\Q) \cap {\rm{Spin}}(q)(\widehat{\Z}) = {\rm{Spin}}(q)(\Z)$$
is dense in ${\rm{Spin}}(q)(\widehat{\Z})$.  But ${\rm{Spin}}(q)(\widehat{\Z}) \rightarrow
{\rm{Spin}}(q)(\Z/d\Z)$ is surjective with open kernel for all $d > 0$ since ${\rm{Spin}}(q)$ is $\Z$-smooth, so any dense subset
of ${\rm{Spin}}(q)(\widehat{\Z})$ maps onto ${\rm{Spin}}(q)(\Z/d\Z)$.  In particular, 
${\rm{Spin}}(q)(\Z) \rightarrow {\rm{Spin}}(q)(\Z/d\Z)$ is surjective.  Setting $d=2$ gives the desired
surjectivity from $\Z$-points onto $\mathbf{F}_2$-points.
\end{proof}

Now we may resume our discussion of the possibilities for the signature $(r,s)$ of a
quadratic lattice  $(M,q)$ of odd rank $n = 2m+1$ 
with ${\rm{disc}}(q) = \pm 2$, showing that the sufficient condition $r - s \equiv \pm 1 \bmod 8$
from Example \ref{oddlat} is necessary.

By passing to $(M,-q)$
if necessary so that ${\rm{disc}}(q)={\rm{disc}}(q_n)$, we claim that $r - s \equiv 1 \bmod 8$.  
To prove this, consider a unimodular lattice $(M',B')$ associated
to $(M,q)$ via a choice of maximal isotropic subspace $V$ in $M/2M$ as in the discussion preceding
Proposition \ref{sotrans}. 
Let $\overline{B}' = B' \bmod 2$ on $M'/2M'$. By
\cite[Ch.\:V, \S2.1, Thm.\:2]{S2}, $r-s \equiv Q_{B'}(\mathbf{m}'_0) \bmod 8$ where $\mathbf{m}'_0 \in M'$ lifts the unique
$\overline{\mathbf{m}}'_0 \in M'/2M'$ such that $\overline{B}'(\overline{\mathbf{m}}'_0,\cdot) = Q_{B'} \bmod 2$ on $M'/2M'$.
Thus, we seek to prove $Q_{B'}(\mathbf{m}'_0) \equiv 1 \bmod 8$.   

As we saw in Remark \ref{odduni}, there is a $\Z_2$-isomorphism $\varphi:q_{\Z_2} \simeq q_n$. 
The map ${\rm{O}}_n(\Z_2) \rightarrow {\rm{O}}_n(\mathbf{F}_2) = {\rm{SO}}_n(\mathbf{F}_2)$
is surjective since ${\rm{SO}}_n$ is $\Z_2$-smooth, and ${\rm{O}}_n(\mathbf{F}_2)$ acts transitively on the set of maximal isotropic subspaces (as we saw in the proof of Proposition \ref{sotrans}), 
so $\varphi$ may be chosen such that $\varphi \bmod 2$ carries $V$ onto any desired maximal isotropic subspace. 
Hence, we can choose $V$ to correspond to the span of the standard basis vectors 
$\overline{e}_1, \overline{e}_3, \dots, \overline{e}_{n-2}$ in $\oplus_{j=0}^{n-1} \mathbf{F}_2 \overline{e}_j$, 
so $\overline{\mathbf{m}}'_0 = \overline{e}_0$.
We may therefore choose $\mathbf{m}'_0$ to lift $e_0 \bmod 8$ via the mod-8 reduction of the $\Z_2$-isomorphism $\varphi$, 
so $Q_{B'}(\mathbf{m}'_0) \equiv q_n(e_0) \bmod 8$. 
But $q_n(e_0)=1$, so necessity of the signature condition for odd $n$ is proved.

\begin{example}\label{oddso2}
Consider $(M,q)$ with odd rank $n=2m+1 \ge 3$
such that ${\rm{disc}}(q) = \pm 2$. Let $(r,s)$ be the signature of $q_{\RRR}$.

Assume $r = s \pm 1$, so we are in the indefinite case since $r+s=n \ge 3$.  By uniqueness
for a given indefinite signature (see Theorem \ref{genus}).
$(M,q)$ is an orthogonal direct sum of $(\Z, \pm x^2)$ and $m$ hyperbolic planes over $\Z$.
Thus, in such cases the semisimple $\Z$-group ${\rm{SO}}(q) = {\rm{SO}}(-q)$ is a Chevalley group
(this applies to $q = q_{2m+1}$). 

Suppose  $|r-s| > 1$, so the $\Q$-fiber of ${\rm{SO}}(q)$ 
is not split (as even the $\RRR$-fiber is not split, since $\pm q_{\RRR}$ is non-split due to signature reasons
and hence we can argue as in Example \ref{evenso}).  
Thus, for $n = r+s \ge 3$ with integers $r, s \ge 0$ satisfying
$r - s \equiv \pm 1 \bmod 8$ and $r - s \ne \pm 1$, we obtain $\Z$-models of non-split connected semisimple $\Q$-groups of type
${\rm{B}}_{(n-1)/2}$. 
\end{example}

{\bf Summary}. 
For a quadratic lattice $(M,q)$ that is non-degenerate over $\Z$
(i.e., ${\rm{disc}}(q) = \pm 1$ for even rank, and ${\rm{disc}}(q) = \pm 2$ for odd rank), 
${\rm{SO}}(q)$ is a semisimple $\Z$-group.  If the signature $(r,s)$ satisfies
$|r-s| > 1$ then ${\rm{SO}}(q)_{\Q}$ is {\em non-split}; 
such $(M,q)$ exist if and only if $r-s \equiv 0, \pm 1 \bmod 8$.  
Later we will see other
examples of $\Z$-models of non-split semisimple $\Q$-groups.

 (In Proposition \ref{remso} we will show that for any quadratic lattice
 $(M,q)$ that is non-degenerate over $\Z$, 
 the $\Z$-isomorphism class of ${\rm{SO}}(q)$ determines the isomorphism class of $(M,q)$ 
up to negating $q$.  Furthermore,  a semisimple $\Z$-group whose generic fiber is a $\Q$-form of
${\rm{SO}}_n$ for $n \ge 3$ {\em must} be ${\rm{SO}}(q)$ for such an $(M,q)$, as we will explain
in Remark \ref{spinZ}.)

\section{Cohomological formalism and $\Z$-groups}\label{cohomsec}

Non-abelian Galois cohomology  is a useful formalism for understanding
the structure of and possibilities for connected semisimple groups over interesting fields
(see \cite[III]{S}). 
We need to apply a version of this over rings when studying semisimple $\Z$-groups.  

We begin our discussion by summarizing
some general non-abelian cohomological constructions and terminology for reductive group schemes
over any non-empty scheme $S$. This requires working systematically
with the \'etale topology on $S$, and it differs significantly from the case of fields
in that {\em finite} \'etale covers of $S$ are generally not cofinal
among all \'etale covers, even if $S$ is the spectrum of a Dedekind domain (e.g., consider Zariski refinements of finite
\'etale covers).  The cases of most interest to us are 
$S = {\rm{Spec}}(A)$ where $A$ is a field or principal ideal domain (such as a number field, local field, or $\Z$).
Some additional details on this formalism are provided in \cite[XXIV]{sga3} and \cite[7.1.4, 7.1.9]{C}. 

Let $G_0$ be a reductive $S$-group, and $Z_{G_0}$ its scheme-theoretic center.
There is a smooth separated $S$-group ${\rm{Aut}}_{G_0/S}$ representing the automorphism
functor of $G_0$ (on the category of $S$-schemes). 
The conjugation action of $G_0$ on itself factors through
an action of the semisimple $S$-group $G_0^{\rm{ad}} := G_0/Z_{G_0}$ on $G_0$ that identifies 
$G_0^{\rm{ad}}$ as an open and closed subgroup
scheme of ${\rm{Aut}}_{G_0/S_0}$. 
The quotient sheaf ${\rm{Out}}_{G_0/S} := {\rm{Aut}}_{G_0/S}/G_0^{\rm{ad}}$ for the \'etale topology on $S$ 
is represented by a separated \'etale $S$-group that is locally constant for the \'etale topology on $S$.
The diagram of $S$-groups
\begin{equation}\label{exactseq}
1 \rightarrow G_0^{\rm{ad}} \rightarrow {\rm{Aut}}_{G_0/S} \rightarrow {\rm{Out}}_{G_0/S} \rightarrow 1
\end{equation}
is short exact for the \'etale topology on $S$-schemes. 
If $S$ is noetherian, normal, and connected (e.g., ${\rm{Spec}}(k)$ for a field $k$, or ${\rm{Spec}}(\Z)$)
then considering closures
of points in the generic fiber
shows ${\rm{Out}}_{G_0/S}$ has $S$-finite connected components (see \cite[X, 5.14]{sga3} or
the proof of \cite[7.1.9]{C}).



\begin{example}\label{autsemi}
Suppose $G_0$ is split, so we may
choose a split (fiberwise) maximal $S$-torus $T_0 \subset G_0$ whose $\Gm$-dual is
identified as a constant \'etale sheaf $M_S$ for a finite free $\Z$-module $M$
such that the nontrivial $T_0$-weights on $\mathfrak{g}_0$ arise
from the $\Z$-dual $M^{\vee} \subset \Hom_S(T_0, \Gm)$ and
the root line bundles $\mathfrak{g}_a$ ($a \in \Phi(G_0,T_0) \subset M^{\vee} - \{0\}$) are trivial.  
Let $B_0 \supset T_0$ be the Borel $S$-subgroup 
$P_{G_0}(\lambda)$ for a 
cocharacter $\lambda \in M \subset \Hom_S(\Gm,T_0)$ not annihilated by 
any $a \in \Phi(G_0,T_0)$ \cite[5.2.2]{C}.

Let $(R,\Delta)$ denote the associated based root datum.  Choose a pinning
(i.e., a trivialization of the line bundle $\mathfrak{g}_a$ for each $a \in \Delta$).  The subgroup
functor of ${\rm{Aut}}_{G_0/S}$ consisting of ``pinned automorphisms''
(i.e., those that respect $(T_0, B_0)$ and the pinning)
maps isomorphically onto ${\rm{Out}}_{G_0/S}$ and is identified with the constant
$S$-group ${\rm{Aut}}(R,\Delta)_S$ associated to the automorphism group of the based root datum.
Hence, (\ref{exactseq}) splits as a semi-direct product, giving an isomorphism
\begin{equation}\label{autg}
G_0^{\rm{ad}} \rtimes {\rm{Aut}}(R,\Delta)_S \simeq
{\rm{Aut}}_{G_0/S} 
\end{equation}
depending on $(T_0, B_0)$ and the pinning.
(See \cite[XXIV, 1.3(iii)]{sga3} or \cite[7.1.9(3)]{C} for details.)
\end{example}


\begin{example}\label{outstr} Suppose $S = {\rm{Spec}}(k)$ for a field $k$, so 
the \'etale $k$-group ${\rm{Out}}_{G_0/k}$ corresponds to a continuous action
of ${\rm{Gal}}(k_s/k)$ on the discrete group ${\rm{Out}}_{G_0/k}(k_s) =
{\rm{Aut}}(R,\Delta)$, where $(R,\Delta)$ is the based root datum associated
to $(G_0)_{k_s}$.  For a theoretical understanding of how the Galois group 
acts on $(R,\Delta)$ without a split hypothesis on $G_0$, it is best
to work with the {\em canonical based root datum}
associated to $G_0$ as in \cite[7.1.2]{C}. 
A more concrete description is provided by the formalism of the ``$\ast$-action''
as explained in \cite[\S2.3]{Tits}.

Consider $S = {\rm{Spec}}(\Z)$.  
Since $\Z$ is noetherian and normal, the connected components of ${\rm{Out}}_{G_0/\Z}$
are finite \'etale over $\Spec(\Z)$.  But $\pi_1(\Spec(\Z)) = 1$, as we noted in the proof of Lemma \ref{splitQ}, so
 ${\rm{Out}}_{G_0/\Z}$ must be a {\em constant} $\Z$-group (even if $G_0$ is not split).
 Likewise, the schematic center $Z_{G_0}$ is a $\Z$-group of multiplicative type \cite[3.3.4]{C},
 so since $\Z$ is a noetherian normal domain with trivial \'etale fundamental group
 it follows that $Z_{G_0}$ is $\Gm$-dual to the {\em constant} sheaf on $(\Spec(\Z))_{\et}$
 associated to a finitely generated abelian group \cite[B.3.6]{C} (even if $G_0$ is not split).
\end{example}

\begin{example}\label{autso}
Let $(M,q)$ be a quadratic lattice with rank $n \ge 3$, and assume it is non-degenerate over $\Z$.
Let ${\rm{GO}}(q)$ denote the orthogonal similitude group scheme; 
i.e., points of ${\rm{GL}}(M)$ that preserve $q$ up to a unit scaling factor.
(Define ${\rm{GO}}_n := {\rm{GO}}(q_n)$.)
This is a smooth $\Z$-group \cite[C.3.11]{C}. Since ${\rm{GO}}(q)$ is generated by
${\rm{O}}(q)$ and the central $\Gm$, clearly
${\rm{SO}}(q)$ is normal inside ${\rm{GO}}(q)$.  The resulting conjugation action of
${\rm{GO}}(q)$ on ${\rm{SO}}(q)$ makes the central subgroup $\Gm$ act
trivially and so defines a $\Z$-homomorphism
$${\rm{PGO}}(q) := {\rm{GO}}(q)/\Gm \rightarrow {\rm{Aut}}_{{\rm{SO}}(q)/\Z}.$$
(Define ${\rm{PGO}}_n := {\rm{PGO}}(q_n)$.)
This  is an isomorphism \cite[Lemma C.3.12]{C}.

The adjoint quotient ${\rm{SO}}(q)^{\rm{ad}}$ is identified as a subgroup
of ${\rm{PGO}}(q)$ in the evident manner. For even $n$ (allowing $n=8$) the quotient group 
${\rm{Out}}_{{\rm{SO}}(q)/\Z}$ is  the constant group
${\rm{O}}(q)/{\rm{SO}}(q) = \Z/2\Z$ and for odd $n$ we have ${\rm{Out}}_{{\rm{SO}}(q)/\Z} = 1$
(see \cite[C.3.11]{C}). 
\end{example}

The set of isomorphism classes of reductive $S$-groups $G$ 
that are isomorphic to $G_0$ \'etale-locally on $S$ is in bijection with the pointed  \v{C}ech cohomology set
$${{\rm{H}}}^1(S_{\et},{\rm{Aut}}_{G_0/S}) = \varinjlim_{S'/S}
{\rm{H}}^1(S'/S, {\rm{Aut}}_{G_0/S})$$
where $S'$ varies through a cofinal set of \'etale covers of $S$
and ${\rm{H}}^1(S'/S,\cdot)$ is defined in terms of \v{C}ech 1-cocycles
relative to $S' \rightarrow S$ (see \cite[XXIV, 1.18]{sga3}, \cite[1.3]{harder}, or \cite[(7.1.1)]{C}).
The isomorphism class of $G$ thereby corresponds to an element 
$$c(G) \in {\rm{H}}^1(S_{\et}, {\rm{Aut}}_{G_0/S})$$
that is functorial with respect to base change on $S$.  We write 
$$d(G) \in {{\rm{H}}}^1(S_{\et}, {\rm{Out}}_{G_0/S})$$
to denote its image via ${\rm{Aut}}_{G_0/S} \rightarrow {\rm{Out}}_{G_0/S}$. 

\begin{example}\label{ex33}  Assume $S = {\rm{Spec}}(k)$ for a field $k$, so
${{\rm{H}}}^1(k, {\rm{Aut}}_{G_0/k})$ can be identified with the Galois cohomology set
${\rm{H}}^1({\rm{Gal}}(k_s/k), {\rm{Aut}}((G_0)_{k_s}))$.
An explicit 1-cocycle representing the class $c(G)$ 
is given by the procedure in the proof of \cite[7.1.1]{C} (or see \cite[III, \S1.1--1.3]{S}). 
If $G_0$ is semisimple then $d(G)$ is represented by the conjugacy class
of the continuous homomorphism ${\rm{Gal}}(k_s/k) \rightarrow {\rm{Aut}}(R,\Delta) \subset
{\rm{Aut}}({\rm{Dyn}}((G_0)_{k_s})$
given by the ``$\ast$-action'' \cite[\S2.3]{Tits} of the Galois group on the Dynkin diagram of $(G_0)_{k_s}$.
\end{example}

\begin{example}\label{ettorsor} Let $G \rightarrow S$ be an affine group scheme.
The set of isomorphism classes
of right $G$-torsors $E \rightarrow S$ satisfying $E(S') \ne \emptyset$ for an \'etale surjection
$S' \rightarrow S$ 
is ${\rm{H}}^1(S'/S,G)$.
This identification uses that $G$ is $S$-affine to ensure that the descent datum encoded
by an element of the set ${\rm{Z}}^1(S'/S,G)$ of \v{C}ech 1-cocycles relative to $S'/S$ is effective.
Passing to the limit over \'etale covers, ${\rm{H}}^1(S_{\et},G)$ is the set
of isomorphism classes of $G$-torsors $E \rightarrow S$ for the \'etale topology.
The same formalism carries over using the fppf topology.

For {\em smooth} $S$-affine $G$, the natural map of sets
${\rm{H}}^1(S_{\et},G) \rightarrow {\rm{H}}^1(S_{\rm{fppf}},G)$ is bijective.
This amounts to the assertion that any fppf right $G$-torsor $E \rightarrow S$
admits sections \'etale-locally on $S$.  To prove this assertion, note that by fppf descent for the property of smoothness,
$E \rightarrow S$ inherits smoothness from $G \rightarrow S$.  
Smooth surjections of schemes always admit sections \'etale-locally on the base
\cite[IV$_4$, 17.16.3(2)]{ega}, so $E$ is indeed a torsor for the \'etale topology
when $G$ is smooth.
\end{example}

\begin{example}\label{earth}  To bring the previous example down to earth, 
${\rm{H}}^1(S_{\et}, {\rm{O}}_{2m})$ is identified
functorially in $S$ with the set of isomorphism classes of pairs
$(V,q)$ where $V$ is a rank-$2m$ vector bundle on $S$
and $q:V \rightarrow \calO_S$ is a (fiberwise) non-degenerate quadratic form.
This identification assigns to each $(V,q)$ the Isom-scheme
${\rm{Isom}}((\calO_S^{\oplus 2m}, q_{2m}), (V,q))$ that is a right ${\rm{O}}_{2m}$-torsor
via pre-composition with the ${\rm{O}}_{2m}$-action on $\calO_S^{\oplus 2m}$.
For ${\rm{O}}_{2m+1} = \mu_2 \times {\rm{SO}}_{2m+1}$
we have an analogous result for $(V,q)$ of rank $2m+1$,
but we must use the fppf topology if $2$ is not a unit  on $S$ (as $\mu_2$ is not $S$-smooth in such cases).

Consider the special case $S = {\rm{Spec}}(R)$ for 
a principal ideal domain $R$ with fraction field $K$. 
Let $n > 0$ be an integer, and assume either $n$ is odd or ${\rm{char}}(K) \ne 2$.  Let $(M,q)$ 
be a fiberwise non-degenerate quadratic space over $R$ of 
rank $n > 0$, so ${\rm{O}}(q_K)/{\rm{SO}}(q_K) = \mu_2$
(using that ${\rm{char}}(K) \ne 2$ if $n$ is even; see \cite[Rem.\:C.2.11]{C}). We have a well-defined
element ${\rm{disc}}(q) \in (R - \{0\})/(R^{\times})^2 \subset K^{\times}/(K^{\times})^2$. 

The canonical map ${\rm{O}}(q_K) \rightarrow \mu_2$
induces $f:{\rm{H}}^1(R, {\rm{O}}(q)) \rightarrow {\rm{H}}^1(K, \mu_2) = K^{\times}/(K^{\times})^2$
that lands inside $R^{\times}/(R^{\times})^2$ and is made explicit as follows: for
any fiberwise non-degenerate $(M',q')$ of rank $n$, the isomorphism class of the
right ${\rm{O}}(q)$-torsor ${\rm{Isom}}(q,q')$ is carried by $f$ to the class of the ratio ${\rm{disc}}(q')/{\rm{disc}}(q)$.
As a special case, the natural map ${\rm{H}}^1(R, {\rm{O}}_n) \rightarrow R^{\times}/(R^{\times})^2$
carries the class of $(M',q')$ to the class of ${\rm{disc}}(q')/{\rm{disc}}(q_n)$,
and the presence of ${\rm{disc}}(q_n)$ here cannot be ignored since it is generally not in $(R^{\times})^2$.
\end{example}

Returning to the setting above Example \ref{ex33}, 
the $S$-group $G$ is called a  {\em pure inner form} of $G_0$ if $c(G)$ is in the image of
${\rm{H}}^1(S_{\et},G_0)$. Under the weaker hypothesis that $c(G)$ is in the image of 
${\rm{H}}^1(S_{\et},G_0^{\rm{ad}})$, we say that $G$ is an {\em inner form} of $G_0$.

\begin{example} Assume $S = {\rm{Spec}}(k)$ for a field $k$.  The ``pure inner form'' condition
means that $G$ is constructed from $G_0$ by
 modifying the canonical $k_s/k$-descent datum on $(G_0)_{k_s}$ via 
 1-cocycles in ${\rm{Z}}^1(k_s/k, {\rm{Aut}}_{G_0/k})$ arising from 1-cocycles valued in 
$G_0(k_s)$.  The ``inner form'' condition means that we can instead get $G$ by using a 1-cocycle
valued in $G_0^{\rm{ad}}(k_s)$.  

A 1-cocycle of the latter
type lifts to a 1-cochain valued in $G_0(k_s)$ if $k$ is perfect or if $Z_{G_0}$ is smooth
(equivalently, ${\rm{char}}(k)$ does not divide
the order of the torsion part of the geometric character group of $Z_{G_0}$), 
but it generally does not lift
to a 1-{\em{cocycle}} valued in $G_0(k_s)$.
\end{example}

Computations with \v{C}ech 1-cocycles show (as in \cite[Prop.\:B.3.2]{cosetfinite}
over fields, via a method also applicable over schemes) that the exact sequence (\ref{exactseq})
gives an exact sequence of pointed sets
$${\rm{Aut}}(G_0)\backslash {\rm{Out}}_{G_0/S}(S)
\rightarrow {\rm{H}}^1(S_{\et},G_0^{\rm{ad}}) \rightarrow {\rm{H}}^1(S_{\et},{\rm{Aut}}_{G_0/S}) \rightarrow
{\rm{H}}^1(S_{\et}, {\rm{Out}}_{G_0/S})$$
in which the final map carries $c(G)$ to $d(G)$.  Thus,
$d(G) = 1$ if and only if $G$ is an inner form of $G_0$.
Also, if $G_0$ is split then the semidirect product structure in Example \ref{autsemi}
shows that ${\rm{Aut}}(G_0) \rightarrow {\rm{Out}}_{G_0/S}(S)$
is surjective, so the map 
$${\rm{H}}^1(S_{\et},G_0^{\rm{ad}}) \rightarrow {\rm{H}}^1(S_{\et}, {\rm{Aut}}_{G_0/S})$$
between pointed sets 
has trivial kernel in such cases.   However, in those cases this map can fail to be injective, even over fields:

\begin{example}  Consider $G_0 = {\rm{SL}}_n$ over a field $k$, with $n > 1$.  The map
$G_0^{\rm{ad}} \rightarrow {\rm{Aut}}_{G_0/k}$ is the natural map 
${\rm{PGL}}_n \rightarrow {\rm{Aut}}_{{\rm{SL}}_n/k}$ defined by the conjugation
action of ${\rm{PGL}}_n = {\rm{GL}}_n/\Gm$ on ${\rm{SL}}_n$.
The induced map on ${\rm{H}}^1$'s 
carries the Brauer class of a rank-$n^2$ central simple algebra $A$
over $k$ to the isomorphism class of the $k$-group ${\rm{SL}}_1(A)$
of units of $A$ with reduced norm 1. 

 If
$A$ is a division algebra whose Brauer
class is not of order dividing 2 then the opposite algebra $A^{\rm{opp}}$ defines a different Brauer class
from that of $A$ but their associated
$k$-groups ${\rm{SL}}_1(A^{\rm{opp}}) = {\rm{SL}}_1(A)^{\rm{opp}}$
and ${\rm{SL}}_1(A)$ are $k$-isomorphic (via inversion).
Thus, we get counterexamples to injectivity when
$k$ admits central division algebras $A$ of rank $n^2$
whose class in ${\rm{Br}}(k)$ is not killed by 2.
It is a consequence of class field theory that such division algebras exist
over any global or non-archimedean local field when $n > 2$
(\cite[X, Cor.\:to Thm.\:6]{artintate}, \cite[XIII, \S3, Cor.\:3]{local}).
\end{example}

For any semisimple group scheme $G \rightarrow S$, there is a unique
central isogeny $\widetilde{G} \rightarrow G$ where
$\widetilde{G}$ is a semisimple $S$-group with simply connected fibers
(see \cite[\S1.2]{harder} or \cite[Exer.\:6.5.2]{C}). 
The canonicity of this central cover identifies ${\rm{Aut}}_{G/S}$ with a closed and open $S$-subgroup
of ${\rm{Aut}}_{\widetilde{G}/S}$.
In the split case, the resulting equality $(\widetilde{G})^{\rm{ad}} = G^{\rm{ad}}$ thereby yields
an inclusion between the constant outer automorphism schemes
of $G$ and $\widetilde{G}$, corresponding to the natural injective homomorphism 
from the  automorphism group of a semisimple root datum 
into the automorphism group of the associated root system.

We now specialize the preceding considerations to the special case $S = {\rm{Spec}}(\Z)$.
Let $\mathscr{G}_0$ be a reductive $\Z$-group.
The $\Z$-group ${\rm{Out}}_{\mathscr{G}_0/\Z}$ is constant by Example \ref{outstr}, and it is not $\Z$-finite when
$Z_{G_0}$ has fiber dimension $> 1$.  The pointed set 
${\rm{H}}^1(\Z, {\rm{Out}}_{\mathscr{G}_0/\Z})$ is therefore trivial due to the vanishing of
$\pi_1(\Spec(\Z))$ and:

\begin{proposition}\label{noout}
If $S$ is a connected normal noetherian scheme and $\Gamma$ is a group then
${\rm{H}}^1(S_{\et},\Gamma_S)$ is identified with the set of conjugacy classes
of continuous homomorphisms from $\pi_1(S)$ into the discrete group $\Gamma$.
\end{proposition}

\begin{proof}
By the formalism of \'etale fundamental groups and \'etale sheaf theory, conjugacy classes of continuous homomorphisms
$\pi_1(S) \rightarrow \Gamma$ correspond to isomorphism classes of $\Gamma$-torsors
for the \'etale topology on $S$ that are split by a {\em finite} \'etale cover.
The set ${\rm{H}}^1(S_{\et}, \Gamma_S)$ classifies the set of isomorphism classes
of $\Gamma_S$-torsor sheaves $\calF$ on $S_{\et}$.   Thus, it suffices to show 
that every such $\calF$ is represented by an \'etale $S$-scheme
$E \rightarrow S$ that is a disjoint union of {\em finite} \'etale $S$-schemes
(so $E(S') \ne \emptyset$ for some finite \'etale cover $S' \rightarrow S$).

We may choose an \'etale cover $S' \rightarrow S$ of finite type such that $\calF(S')$ is non-empty.
The torsor property gives that $\calF_{S'}$ is represented by the constant $S'$-scheme $\Gamma_{S'}$,
so $\calF$ is an \'etale descent over $S_{\et}$ of the functor on $S'_{\et}$ represented by $\Gamma_{S'}$.
Such a descent is necessarily an algebraic space $E$ \'etale over $S$, and this algebraic space
is $S$-separated since $\Gamma_{S'}$ is $S'$-separated.  

The locally noetherian algebraic space
$E$ can be covered by quasi-compact open subspaces, each of which is necessarily
quasi-finite and separated over the scheme $S$
and hence is a scheme \cite[II, 6.15]{knutson}.  Thus, $E$ is a scheme \'etale over $S$.
Since $E \rightarrow S$ becomes constant over an \'etale cover of the normal noetherian $S$, 
 the connected components of $E$
are finite \'etale over $S$ by \cite[X, 5.14]{sga3} (or see the proof of \cite[7.1.9]{C}).
\end{proof}

For general reductive $\Z$-groups $\mathscr{G}_0$, 
we have just shown that the map ${\rm{H}}^1(\Z, \mathscr{G}_0^{\rm{ad}}) \rightarrow
{\rm{H}}^1(\Z, {\rm{Aut}}_{\mathscr{G}_0/\Z})$ is surjective.  Before we discuss the consequences
of this, we digress to prove Proposition \ref{splitchev}, as the necessary tools are now in place.

\begin{proof}(of Proposition \ref{splitchev})
 Let $\mathscr{G}_0$ be the Chevalley group over $\Z$ with $\Q$-fiber $G_0$ having the same root datum as $G$,
so $(G_0)_K \simeq G$, and let $\mathscr{G}$ be an $R$-model of $G$.  Since 
$\mathscr{G}_0$ contains a split fiberwise maximal $\Z$-torus $\mathscr{T}_0$, it contains a Borel $\Z$-subgroup
$\mathscr{B}_0$ (by the same dynamic procedure with a sufficiently generic cocharacter $\lambda$ as
at the start of Example
\ref{autsemi}).

The Borel $K$-subgroup $B = (\mathscr{B}_0)_K \subset (\mathscr{G}_0)_K = G = \mathscr{G}_K$ gives rise to a $K$-point on 
the scheme ${\rm{Bor}}_{\mathscr{G}/R}$ of Borel subgroups of $\mathscr{G}$.
By the valuative criterion for properness, this $K$-point extends to an $R$-point since ${\rm{Bor}}_{\mathscr{G}/R}$ is $R$-proper
and $R$ is Dedekind. Thus,  $B = \mathscr{B}_K$ for a Borel $R$-subgroup $\mathscr{B} \subset \mathscr{G}$.

Consider the Isom-functor $$\mathscr{I} := {\rm{Isom}}((\mathscr{G}_0, \mathscr{B}_0)_R, (\mathscr{G}, \mathscr{B}))$$ 
that assigns to any $R$-scheme $Y$ the set of $Y$-group isomorphisms
$(\mathscr{G}_0)_Y \simeq \mathscr{G}_Y$ carrying $(\mathscr{B}_0)_Y$ onto $\mathscr{B}_Y$. 
This functor is a sheaf for the \'etale topology.
We want to show that $\mathscr{I}$ has an $R$-point, as then $\mathscr{G} \simeq (\mathscr{G}_0)_R$, concluding the proof.

Note that $\mathscr{I}$ has a natural right action by 
the group functor $\mathscr{A} := {\rm{Aut}}_{(\mathscr{G}_0, \mathscr{B}_0)_R/R}$ that is
a sheaf on the \'etale site of $\Spec(R)$. This action makes $\mathscr{I}$ an $\mathscr{A}$-torsor for
the \'etale topology because any reductive group scheme splits \'etale-locally on the base and any two Borel subgroups
of a reductive group scheme become conjugate \'etale-locally on the base.  
Thus, it suffices to show that the class of $\mathscr{I}$
in the pointed set ${\rm{H}}^1(R, \mathscr{A})$ of isomorphism classes
of right $\mathscr{A}$-torsor sheaves on $(\Spec(R))_{\et}$ is trivial.

Let $\Theta$ denote the automorphism group of the based root datum associated
to the split $\Z$-group $(\mathscr{G}_0, \mathscr{B}_0, \mathscr{T}_0)$, or equivalently to the split $K$-group $G$.
Using the semi-direct product structure (\ref{autg}) in Example \ref{autsemi} applied
to $\mathscr{G}_0$, the automorphism
functor $\mathscr{A}$ over $(\Spec(R))_{\et}$ is an extension
of the constant $R$-group $\Theta_{R}$ by the $R$-pullback of the Borel subgroup
$\mathscr{B}_0^{\rm{ad}} := \mathscr{B}_0/Z_{\mathscr{G}_0} \subset \mathscr{G}_0^{\rm{ad}}$
since a Borel subgroup of a reductive group scheme is  its own normalizer scheme
\cite[Cor.\:5.2.8]{C}.  
Consider the resulting exact sequence of pointed sets
$${\rm{H}}^1(R, (\mathscr{B}_0^{\rm{ad}})_R) \rightarrow
{\rm{H}}^1(R, \mathscr{A}) \rightarrow {\rm{H}}^1(R, \Theta_R).$$
The class of $\mathscr{I}$ in the middle term is trivial over $K$ since $\mathscr{I}(K)$ is non-empty by design
of $\mathscr{B}$. The image of this class in ${\rm{H}}^1(R, \Theta_R)$ has trivial restriction
over $K$ and hence is trivial, due to Proposition \ref{noout} (since $\pi_1(\Spec(K)) \rightarrow \pi_1(\Spec(R))$ is
surjective, as $R$ is a normal noetherian domain).  Hence, we just have to prove the vanishing of
${\rm{H}}^1(R, (\mathscr{B}_0^{\rm{ad}})_R)$. By choosing a composition series
of $\mathscr{B}_0^{\rm{ad}}$ over $\Z$ with successive quotients $\mathbf{G}_{\rm{a}}$ and $\Gm$
(see \cite[Prop.\:5.1.16]{C}) this reduces to the vanishing 
of ${\rm{Pic}}(R)$
\end{proof}

Returning to the study of a general reductive $\Z$-group $\mathscr{G}_0$ (not necessarily a Chevalley group)
with generic fiber denoted $G_0$, classes in
${\rm{H}}^1(\Z, \mathscr{G}_0^{\rm{ad}})$ satisfy a strong local triviality property
upon restricting them to $\Z_p$:

\begin{proposition}\label{lang} Let $R$ be a complete discrete valuation ring with finite residue field $\mathbf{F}$.
For any smooth affine $R$-group $\mathscr{H}$ with connected fibers, 
the set ${{\rm{H}}}^1(R, \mathscr{H})$ is trivial.  
\end{proposition}

\begin{proof} By Example \ref{ettorsor}, it suffices to show that if $E \rightarrow \Spec(R)$
is an $\mathscr{H}$-torsor for the \'etale topology then $E(R)$ is non-empty.
By descent theory, $E \rightarrow \Spec(R)$ is a smooth surjection
since $\mathscr{H}$ is a smooth $R$-group.  Since
the special fiber $E_{\mathbf{F}}$ over $\mathbf{F}$ is an $\mathscr{H}_{\mathbf{F}}$-torsor,
by Lang's theorem for homogeneous spaces under smooth connected groups over finite
fields \cite[16.5(i)]{borelag} (or see \cite[III, \S5, 7.5]{demgab} with smoothness relaxed to finite type)
it follows that $E(\mathbf{F})$ is non-empty.
But Zariski-locally on the source, any smooth map factors through an \'etale map to 
an affine space, so Hensel's Lemma 
implies that any rational point in the special fiber of a smooth scheme over $R$
lifts to an $R$-point;  see \cite[IV$_4$, 18.5.17]{ega}.
\end{proof}

\begin{corollary}\label{localtriv} Let $\mathscr{H}$ be a smooth
affine $\Z$-group with connected fibers.  Any class in the image of ${\rm{H}}^1(\Z,\mathscr{H})  \rightarrow
{\rm{H}}^1(\Q,\mathscr{H}_{\Q})$ has trivial image in ${\rm{H}}^1(\Q_p,\mathscr{H}_{\Q_p})$ for every prime $p$.
\end{corollary}

\begin{proof} Apply base-change functoriality of \v{C}ech cohomology with respect to the compositions
$\Z \rightarrow \Z_p \rightarrow \Q_p$ and $\Z \rightarrow \Q \rightarrow \Q_p$
and use Proposition \ref{lang} with $R = \Z_p$.
\end{proof}

We have shown 
that every class in ${\rm{H}}^1(\Z, {\rm{Aut}}_{\mathscr{G}_0/\Z})$ arises from ${\rm{H}}^1(\Z, \mathscr{G}_0^{\rm{ad}})$,
so applying Proposition \ref{lang} and Corollary \ref{localtriv} to $\mathscr{G}_0^{\rm{ad}}$ gives that
the restriction 
\begin{equation}\label{H1zg}
{\rm{H}}^1(\Z, {\rm{Aut}}_{\mathscr{G}_0/\Z}) \rightarrow {\rm{H}}^1(\Q_p, {\rm{Aut}}_{G_0/\Q_p})
\end{equation}
is trivial for all primes $p$. Thus, {\em every} $\Z$-form of $\mathscr{G}_0$ has $\Q_p$-fiber isomorphic to $(G_0)_{\Q_p}$ for all $p$.
But there is a Chevalley group that is a $\Z$-form of $\mathscr{G}_0$, so by Lemma \ref{splitQ}
we see that $(G_0)_{\Q_p}$ is {\em split} for all $p$.

We finish our preliminary discussion of $\Z$-models with a useful description of simply connected semisimple $\Z$-groups.

\begin{proposition}\label{sc} Any simply connected semisimple $\mathbf Z$-group
is a direct product $\prod \mathscr{G}_i$
where each $\mathscr{G}_i$ is a simply connected semisimple $\mathbf Z$-group with absolutely simple fibers. 
\end{proposition}

\begin{proof} 
By \cite[6.4.4]{C}, any fiberwise nontrivial simply connected semisimple group over a 
non-empty scheme $S$ is a Weil restriction
${\rm{R}}_{S'/S}(H)$ for a finite \'etale cover $S' \rightarrow S$
and a simply connected semisimple $S'$-group $H$ whose fibers
$H_{{s}'}$ are absolutely simple.   In the case $S = \Spec(\Z)$, necessarily
$S'$ is a disjoint union of copies of $\Spec(\Z)$ (by Minkowski's theorem).
For any scheme $S$ and disjoint union $S' = \coprod S_i$
of finitely many copies $S_i$ of $S$, any $S'$-scheme $X'$ has
the form $X' = \coprod X_i$ for an $S_i$-scheme $X_i$.  It is easy to check via 
the functorial characterization of Weil restriction that as functors
on $S$-schemes, ${\rm{R}}_{S'/S}(X') = \prod X_i$.
\end{proof}


%For $S = \Spec \Z$, this has an interesting consequence:
%
%\begin{proposition}\label{Zform} Let $G_0$ be a split semisimple $\Z$-group, and $\widetilde{G}_0$
%its split simply connected central cover.  Via the natural map
%${\rm{Aut}}_{G_0/\Z} \rightarrow {\rm{Aut}}_{\widetilde{G}_0/\Z}$
%induces a bijection
%$${\rm{H}}^1(\Z, {\rm{Aut}}_{G_0/\Z}) \rightarrow
%{\rm{H}}^1(\Z, {\rm{Aut}}_{\widetilde{G}_0/\Z}).$$
%In other words, the map $G \mapsto \widetilde{G}$ from $\Z$-forms of $G_0$
%to $\Z$-forms of $\widetilde{G}_0$ is a bijection between sets of isomorphism classes.
%\end{proposition}
%
%\begin{proof}
%Since ${\rm{H}}^1(\Z,G_0^{\rm{ad}}) \rightarrow {\rm{H}}^1(\Z, {\rm{Aut}}_{G_0/\Z})$
%is surjective, and likewise for $\widetilde{G}_0$ in place of $G_0$,
%the equality $\widetilde{G}_0^{\rm{ad}} = G_0^{\rm{ad}}$
%gives surjectivity.   More specifically, every $\Z$-form $G$ of $G_0$
%is inner and for injectivity we have to show
%that the isomorphism class of the $\Z$-group $\widetilde{G}$ determines
%that of $G$.
%
%The inner form property says that $G$ is built from $G_0$ using \'etale descent datum
%defined using automorphisms arising from $G_0^{\rm{ad}}$,
%and likewise for $\widetilde{G}$ as a form of $\widetilde{G}_0$
%(via the equality $\widetilde{G}_0^{\rm{ad}} = G_0^{\rm{ad}}$).
%
%
%
%For injectivity, 
%it is equivalent to show that if $G$, $G'$ are semisimple $\Z$-groups
%with the same split form and $\widetilde{G} \simeq \widetilde{G}'$
%as $\Z$-groups then $G \simeq G'$.   Viewing $G'$ as a $\Z$-form of $G$, it corresponds
%to a class  $[G'] \in {\rm{H}}^1(\Z, {\rm{Aut}}_{G/\Z})$, and this arises
%from ${\rm{H}}^1(\Z, G^{\rm{ad}})$.
%
%In other words,
%if $\widetilde{G}$ is a simply connected semisimple $\Z$-group
%and $\mu, \mu' \subset Z_{\widetilde{G}}$ are
%flat closed $\Z$-subgroups such that $\widetilde{G}/\mu$ and $\widetilde{G}'/\mu$
%have the same root datum on geometric fibers then ${\rm{Aut}}(\widetilde{G}))$
%moves $\mu$ to $\mu'$.   Away from type ${\rm{D}}_{2m}$ with $m \ge 
%
%
%The Cartier dual of $Z_{\widetilde{G}}$ is a finite \'etale $\Z$-group, hence constant
%by Minkowski's theorem.  The same therefore holds for 
%the Cartier duals of $\mu$ and $\mu'$.
%
%\end{proof}
%
%\begin{example} Taking $G_0 = {\rm{SO}}_n$ for $n \ge 3$ in Proposition \ref{Zform}, 
%it follows that $\Z$-forms of ${\rm{SO}}_n$ ``coincide''
%with those of ${\rm{Spin}}_n$ via the formation of simply
%connected central covers.  This is obvious when $n=2m+1$ is odd since the diagram
%for ${\rm{B}}_m$ has no nontrivial automorphisms and hence the adjoint type
%${\rm{SO}}_n$ and the simply connected ${\rm{Spin}}_n$ have the same automorphism scheme
%(namely ${\rm{SO}}_n$)).  The case of even $n = 2m \ge 4$ is rather more interesting,
%since triality forms of ${\rm{Spin}}_8$ over fields do not
%have an associated form of ${\rm{SO}}_8$.

\section{The generic fiber}\label{gensec}

Consider a connected reductive $\Q$-group $G$ admitting a $\Z$-model $\mathscr{G}$ (understood to be reductive).
We shall prove that $\mathscr{G}$ 
is split over $\mathbf Z_p$ for all primes $p$
(improving on the observation after Corollary \ref{localtriv} 
that $\mathscr{G}_{\Q_p}$ is split for all $p$).  We will also show that 
$G$ is a pure inner form of a split group
over $\mathbf Q$ (see Lemma \ref{innerR}), and by a more sophisticated version of the same arguments
we will even prove that $\mathscr{G}$ is a pure inner form of a Chevalley group over $\Z$ (see Remark \ref{pureZ}). 

Let $\mathscr{G}_0$ be the split form of $\mathscr{G}$ over $\mathbf Z$
(i.e., the Chevalley group with the same root datum as $G_{\overline{\Q}}$), and let 
 $G_0 = (\mathscr{G}_0)_{\Q}$,
so $G_0$ is the split form of $G$ over $\Q$.
Let $c(G) \in {\rm{H}}^1(\Q, {\rm{Aut}}_{G_0/\Q})$
and $d(G) \in {\rm{H}}^1(\Q, {\rm{Out}}_{G_0/\Q})$ be the associated
cohomology classes as  above Example \ref{ex33}.
Define $c(\mathscr{G})$ and $d(\mathscr{G})$ over $\Z$ similarly.

\begin{lemma}\label{d1} The class $d(G)$ is trivial; i.e., 
$G$ is an inner form of $G_0$.
\end{lemma}

\begin{proof} We have already given a proof of this result using
the cohomological formalism over $\Z$: by Proposition \ref{noout} we have 
${\rm{H}}^1(\Z,{\rm{Out}}_{\mathscr{G}_0/\Z}) = 1$,
so $d(\mathscr{G}) = 1$ and hence $d(G) = 1$.
But that argument rests on the entire appartus of the automorphism scheme
over rings, rather than just over fields (where it is more classical).
So we now give another proof via Galois-theoretic considerations over fields
(also using the theory of reductive group schemes over discrete valuation rings).
The arithmetic content will remain exactly the same: Minkowski's
theorem that every number field $K \ne \Q$ is ramified at some prime.

Note that $d(G)$ is a conjugacy class of homomorphisms from
${\rm{Gal}}(\overline{\Q}/\Q)$ into ${\rm{Aut}}(R,\Delta)$.
If $K/\Q$ is the finite Galois extension cut out by this conjugacy class,
we want to show $K = \Q$.  By Minkowski's theorem, if $K \ne \Q$
then some rational prime is ramified in $K$ and hence
the local class $d_p(G) := d(G)|_{\Q_p} = d(G_{\Q_p}) \in {\rm{H}}^1(\Q_p,{\rm{Aut}}(R,\Delta))$ at such a prime $p$
is ramified (i.e., nontrivial on the inertia group at $p$).  Thus, to prove $K = \Q$
it suffices to show that $d(G)$ is unramified for all $p$.
But $\mathscr{G}$ is reductive over $\mathbf Z$, so it is reductive over the completion $\mathbf Z_p$, and 
a reductive group over $\mathbf Z_p$ splits over a finite unramified extension \cite[XIX, 6.1]{sga3} (or see \cite[5.2.14]{C}).  Hence, 
$G$ splits over a finite unramified extension of $\Q_p$, so $d_p(G)$ is unramified for all $p$.
\end{proof}

We have already seen that $G_{\Q_p}$ is split for all primes $p$.  This property, which makes no reference
to reductive groups over rings, forces $G$ to be an inner form of $G_0$.  
Indeed, this is a consequence of a more general result over any global field (where Minkowski's
theorem on extensions unramified at finite places is not available):

\begin{proposition}\label{refrem}
Let $k$ be a global field.  Any connected reductive $k$-group $H$ that splits
at all finite places must be an inner form of the split $k$-group $H_0$ of the same type.
\end{proposition}

\begin{proof} We have to prove triviality of the class  $d(H) \in {\rm{H}}^1(k,{\rm{Aut}}(R,\Delta))$,
where $(R,\Delta)$ is the based root datum of $H_0$.
The task is to show that 
a continuous homomorphism from ${\rm{Gal}}(k_s/k)$ into a discrete
group is trivial if it is trivial at all finite places (i.e., trivial on all decomposition groups
at finite places). The image of such a homomorphism is 
a finite Galois group ${\rm{Gal}}(k'/k)$, so it suffices to show that any such Galois group 
is generated by its decomposition groups at the finite places.  

The subgroup
of ${\rm{Gal}}(k'/k)$ generated
by such decomposition groups is normal and thereby corresponds
to a finite Galois subextension $K/k$ for which all decomposition groups are trivial.
In other words, all finite places of $k$ are totally split in $K$, which forces
$[K:k] = 1$ by the Chebotarev Density Theorem.
\end{proof}

By \cite[5.3.1, 5.3.3]{C}, there is a natural central isogeny
$\mathscr{T} \times \mathscr{G}' \rightarrow \mathscr{G}$ over $\mathbf Z$, where 
$\mathscr{G}'$ is a semisimple normal $\Z$-subgroup of $\mathscr{G}$
(the derived group) and 
$\mathscr{T}$ is the maximal central $\Z$-torus in 
$\mathscr{G}$.  All $\mathbf Z$-tori are split, as we explained in the proof of Lemma \ref{splitQ}.
Thus, to classify the possibilities for $\mathscr{G}$ over $\Z$, or even
for its generic fiber $G$ over $\Q$, it is reasonable to concentrate on the semisimple case,
which we now do.

Any semisimple group over a scheme $S$ is a central quotient of a simply connected
semisimple $S$-group that is unique up to unique isomorphism; this follows via \'etale descent from 
the split case, which in turn is deduced from the Existence and Isomorphism Theorems (see
\cite[Ex.\:6.5.2]{C}).  Note also that a semisimple $\Z$-group
is a pure inner form of a Chevalley group if its
simply connected central cover is.  Thus, for our purposes (especially to 
describe the generic fibers of semisimple $\Z$-groups) there is no loss of generality in
focusing on the simply connected case.  

In view of Proposition \ref{sc} (which breaks down completely over integer rings of number
fields other than $\Q$), we also lose no generality by restricting attention to
describing the connected semisimple 
$\mathbf Q$-groups $G$ that are {\em absolutely simple}, simply connected,
and admit a $\Z$-model. These $\Q$-groups can be characterized
without reference to $\Z$-models, as follows.
We have shown that any such $G$ is split over $\mathbf Q_p$ for all rational primes $p$,
and the converse holds by applying the following with $R = \Z$:

\begin{lemma}\label{extend} Let $R$ be a Dedekind domain with fraction field $K$,
and $H$ a connected reductive $K$-group
that is split over the fraction field $K^{\wedge}_{\mathfrak{m}}$
of the completion $R^{\wedge}_{\mathfrak{m}}$ at every maximal ideal 
$\mathfrak{m}$ of $R$.
There exists a reductive $R$-group $\mathscr{H}$
such that $H \simeq \mathscr{H}_K$.
\end{lemma}

\begin{proof}
By direct limit arguments (viewing $K$ as a direct limit of its finitely generated $R$-subalgebras
$R[1/r]$), we can extend $H$ to a smooth affine group with connected fibers over $\Spec(R[1/r])$
for some nonzero $r \in R$.  Since the generic fiber $H$ is reductive, by openness of the locus of reductive fibers
(see \cite[XIX, 2.5(i)]{sga3} or \cite[3.1.9(1), 3.1.12]{C}) 
this group has reductive restriction over some dense open 
locus $\Spec(R[1/r']) \subset \Spec(R[1/r])$
(with a nonzero $r' \in (r)$).  For each maximal ideal $\mathfrak{m}$ dividing $(r')$, a split $R^{\wedge}_{\mathfrak{m}}$-model 
of the split 
$K^{\wedge}_{\mathfrak{m}}$-fiber specifies an $R_{\mathfrak{m}}$-model 
for $H$ \cite [6.2/D.4(b)]{BLR}. These finitely many local models glue to the 
$R[1/r']$-model to define a reductive group over $R$ with generic fiber $H$ (cf.\ the proof of \cite [1.4/1]{BLR}). 
\end{proof}

To summarize, for the purpose
of describing generic fibers of reductive $\Z$-groups
the essential task is to describe all connected semisimple $\Q$-groups $G$ that are
absolutely simple, simply connected, and split over $\Q_p$ for all $p$.
(In \S\ref{exsec} we will address the construction of explicit $\Z$-models.)
This makes no reference to group schemes over rings other than fields.

In the setting of Lemma \ref{extend} with $R = \Z$, it is natural to wonder if 
the $\Z$-group $\mathscr{H}$ is determined up to isomorphism
by the $\Q$-isomorphism class of $H$.  
When $H_{\mathbf{R}}$ is $\mathbf{R}$-anisotropic (or equivalently, when $H(\mathbf{R})$ is compact),
there can exist several such $\mathscr{H}$ that are not isomorphic as
$\mathbf{Z}$-groups. This is classical for special orthogonal
groups in the definite case.  Before we discuss that, it is convenient to record
the ambiguity in passing from a non-degenerate quadratic lattice to its special orthogonal group.

\begin{proposition}\label{remso}
Let $(M,q)$ be a quadratic lattice
 that is non-degenerate over $\Z$. 
The isomorphism class of the $\Z$-group ${\rm{SO}}(q)$ determines the isomorphism class of $(M,q)$ up to 
replacing $q$ with $-q$
\end{proposition}

\begin{proof}
Let $n \ge 1$ be the rank of $M$.  The cases $n \le 2$ are elementary (necessarily $q \simeq \pm q_n$),
and the cases $n \ge 3$ are a consequence of \cite[C.3.13]{C}
since ${\rm{Pic}}(\Spec(\Z)) = 1$ and $\Z^{\times} = \{\pm 1\}$.
\end{proof}

Since $(M,q)$ is determined by its signature in the indefinite case, as we discussed in \S\ref{quadsec},
Proposition \ref{remso} implies that for integers $r, s > 0$ with $r - s \equiv 0, \pm 1 \bmod 8$ and $n := r+s \ge 3$
there is {\em exactly one} $\Z$-form of ${\rm{SO}}_n$ with positive $\RRR$-rank $\min(r,s)$. 
In the $\RRR$-anisotropic case this uniqueness breaks down in a very interesting way:
there is an abundance of $\Z$-forms (up to isomorphism) but their $\Q$-fibers are all the same, as we now
explain. (See Proposition \ref{Rinj} for a generalization.)

Consider {\em definite} quadratic lattices $(M,q)$ of rank $n \ge 3$; assume $n$ is as required for the existence
of such quadratic spaces.  The Minkowski--Siegel mass formula ensures 
the existence of many non-isomorphic pairs $(M,q)$ for large $n$.
Hence, accounting for the sign ambiguity in the dependence of $(M,q)$ on 
${\rm{SO}}(q)$ as in Proposition \ref{remso}, there are at least half as many isomorphism classes among the $\Z$-groups as there
are among the quadratic lattices $(M,q)$.  Thus, for large $n$ the mass formula provides
many pairwise non-isomorphic $\Z$-groups ${\rm{SO}}(q)$ 
whose $\Q$-fibers are $\RRR$-anisotropic $\Q$-forms of ${\rm{SO}}_n$. 

\begin{proposition} All such lattices $(M,q)$ are isomorphic to each other over $\Q$, up to negating $q$.
In particular, the $\Q$-fibers ${\rm{SO}}(q)_{\Q}$ coincide up to $\Q$-isomorphism.
\end{proposition}

\begin{proof}
Negate $q$ if necessary so that ${\rm{disc}}(q) = {\rm{disc}}(q_n)$ (with sign $(-1)^{n(n-1)/2}$).
Choose a prime $p$.  We will first show that the isomorphism class of $(M,q)_{\Q_p}$ is the same for all such $(M,q)$'s.
This class is in the image of ${\rm{H}}^1(\Z_p, {\rm{O}}_n) \rightarrow {\rm{H}}^1(\Q_p, {\rm{O}}_n)$,
using fppf cohomology (which coincides with the corresponding \'etale cohomology by Example \ref{ettorsor} 
except for odd $n$ over $\Z_p$ when $p = 2$, 
as in such cases the $\Z_p$-group ${\rm{O}}_n = \mu_2 \times {\rm{SO}}_n$ is flat but not smooth).

For odd $n$ we have ${\rm{O}}_n = \mu_2 \times {\rm{SO}}_n$,
and ${\rm{H}}^1(\Z_p, {\rm{SO}}_n) = 1$ by Proposition \ref{lang}.
But ${\rm{H}}^1(\Z_p, \mu_2) \rightarrow {\rm{H}}^1(\Q_p, \mu_2)$
is the map $\Z_p^{\times}/(\Z_p^{\times})^2 \rightarrow \Q_p^{\times}/(\Q_p^{\times})^2$
that is injective, so for odd $n$ the isomorphism class of $(M,q)_{\Q_p}$ is determined by its image under
the natural map
$${\rm{H}}^1(\Q_p, {\rm{O}}_{n}) \rightarrow {\rm{H}}^1(\Q_p, \mu_2) = \Q_p^{\times}/(\Q_p^{\times})^2.$$
As in Example \ref{earth}, this map carries the class of $(M,q)_{\Q_p}$ to the 
class of ${\rm{disc}}(q)/{\rm{disc}}(q_n) = 1$, so for odd $n$ the isomorphism class of $(M,q)_{\Q_p}$
is the same for all $(M,q)$ under consideration.

Suppose instead that $n$ is even, so the $\Z_p$-group ${\rm{O}}_n$ is an extension of
$\Z/2\Z$ by ${\rm{SO}}_n$.  The diagram of pointed sets
$${\rm{H}}^1(\Z_p, {\rm{SO}}_n) \rightarrow {\rm{H}}^1(\Z_p, {\rm{O}}_n) \rightarrow {\rm{H}}^1(\Z_p, \Z/2\Z)$$
is exact, so in view of the vanishing of ${\rm{H}}^1(\Z_p, {\rm{SO}}_n)$ it
suffices to show that the class of $(M,q)_{\Z_p}$ has trivial image in
${\rm{H}}^1(\Z_p, \Z/2\Z)$.  The restriction map
${\rm{H}}^1(\Z_p, \Z/2\Z) \rightarrow {\rm{H}}^1(\Q_p, \Z/2\Z) = {\rm{H}}^1(\Q_p, \mu_2)$
is injective (as it is ``$\Z/2\Z$-dual'' to the surjection of ${\rm{Gal}}(\overline{\Q}_p/\Q_p)$
onto its maximal unramified quotient), so we just have to compute the image of 
the class of $(M,q)_{\Q_p}$ under the map
${\rm{H}}^1(\Q_p, {\rm{O}}_n) \rightarrow {\rm{H}}^1(\Q_p, \mu_2)$.
This image is ${\rm{disc}}(q)/{\rm{disc}}(q_n) = 1$, as for odd $n$.

We have shown that for each prime $p$, the isomorphism class of $(M,q)_{\Q_p}$ is the same for all $(M,q)$'s. 
The isomorphism class of $(M,q)_{\RRR}$ is the unique {\em definite} one of rank $n$
with discriminant having the same sign as ${\rm{disc}}(q_n)$.  
By the Hasse--Minkowski theorem, it follows that the isomorphism class of $(M,q)_{\Q}$
is the same for all such $(M,q)$ with a given rank $n \ge 3$, so the $\Z$-groups ${\rm{SO}}(q)$
all have the same $\Q$-fiber.   
\end{proof}

\begin{remark}\label{E8F4}
For some exceptional types (${\rm{F}}_4$ and ${\rm{E}}_8$, each of which has trivial
fundamental group), in \S\ref{exsec} and \S\ref{countsec}
we will find that there are non-isomorphic $\mathbf{Z}$-forms that are anisotropic over $\mathbf{R}$
(and so have isomorphic $\Q$-fibers, by Proposition \ref{Rinj} below).
\end{remark}
%
%Suppose instead that $H_{\mathbf{R}}$ is $\mathbf{R}$-isotropic (or equivalently, $H(\mathbf{R})$ is non-compact)
%and that $H$ is $\Q$-simple and semisimple.  In particular,
%${\rm{Aut}}_{\mathscr{H}/\Z}$ is an extension of a finite constant $\Z$-group by
%$\mathscr{H}^{\rm{ad}}$ (see \cite[XXIV, 1.3]{sga3}, or \cite[7.1.9(1),(2)]{C}).  
%We claim that $\mathscr{H}$ is  uniquely determined up to $\mathbf{Z}$-isomorphism;
%i.e., $\mathscr{H}$ has no nontrivial $\Z$-form with $\Q$-fiber abstractly isomorphic to $H$.
%To prove this, we may replace $H$ with its simply connected central cover since
%the formation of this cover extends functorially to any reductive $\Z$-model
%(see \cite[6.5.3]{C}).  By \cite[6.4.7]{C}, $H_{\Q}$ is absolutely simple. Let $\mathscr{H}'$ be a $\Z$-form of $\mathscr{H}$
%such that $\mathscr{H}'_{\Q} \simeq H$ also.  We shall prove that $\mathscr{H}' \simeq \mathscr{H}$ as $\Z$-groups.
%
%By \cite[7.2.16]{C}, $\mathscr{H}_{\Z_p} \simeq \mathscr{H}'_{\Z_p}$ for all $p$.
%Let $I$ be the Isom-scheme ${\rm{Isom}}(\mathscr{H}',\mathscr{H})$.  This is a left ${\rm{Aut}}_{\mathscr{H}/\Z}$-torsor
%over $\Z$, so $I$ is a smooth affine $\Z$-scheme
%that satisfies $I(\Q) \ne \emptyset$ (as $\mathscr{H}'_{\Q} \simeq H \simeq \mathscr{H}_{\Q}$)
%as well as $I(\Z_p) \ne \emptyset$ for all $p$.  We seek to prove that $I(\Z) \ne \emptyset$.
%The quotient $\mathscr{H}^{\rm{ad}}\backslash I$ is a finite \'etale
%$\Z$-scheme, so it is a disjoint union of finitely many copies of
%$\Spec \Z$ and hence $I$ is a disjoint union of finitely many $\mathscr{H}^{\rm{ad}}$-torsors
%$I_1,\dots,I_n$.   We have $I_j(\Z_p) \ne \emptyset$ for all $p$ (since ${\rm{H}}^1(\Z_p, \mathscr{H}^{\rm{ad}})$ is
%trivial, due to Lang's theorem), and by relabeling we may arrange that the non-empty $I(\Q)$ meets $I_1$.
%In other words, $X := I_1$ is an $\mathscr{H}^{\rm{ad}}$-torsor such that $X_{\Q} \simeq H^{\rm{ad}}$
%and $X(\widehat{\Z}) \ne \emptyset$.   We claim that $X(\Q)$ meets $X(\widehat{\Z})$ inside the finite-adelic points of
%$X_{\Q}$.  

%Since $\mathbf{A}_{\Q}^{\times} = \Q^{\times} (\R \times \widehat{\Z})^{\times}$, so ${\rm{H}}^1(\mathbf{A}_{\Q},\mu) = 
%{\rm{H}}^1(\Q,\mu){\rm{H}}^1(\R \times \widehat{\Z},\mu)$ for any finite multiplicative type $\Z$-group $\mu$ (as such $\mu$ have constant Cartier dual), it follows from the 
%strong approximation theorem \cite[\S7.4, Thm.\,7.12]{PR} for the simply connected central cover of any $\R$-isotropic absolutely simple and semisimple $\Q$-group that
% $H^{\rm{ad}}(\Q) \rightarrow \mathscr{H}^{\rm{ad}}(\R \times \widehat{\Z})\backslash H^{\rm{ad}}(\mathbf{A}_{\Q}) is surjective. Thus,
% $X(\Q) \rightarrow \mathscr{H}^{\rm{ad}}(\R \times \widehat{\Z})\backslash X(\mathbf{A}_{\Q})$ is surjective too.
%Hence, upon choosing a point $x$ in the non-empty set $X(\R \times \widehat{\Z})$ we see that the $\mathscr{H}^{\rm{ad}}(\R\times \widehat{\Z})$-orbit
%of $x$ meets $X(\Q)$.  But this orbit is contained inside $X(\R \times \widehat{\Z})$, so we conclude that
%$X(\Q)$ meets $X(\R \times \widehat{\Z})$, which is to say that $X(\Z)$ is non-empty, as desired.



Let $G$ be a connected semisimple $\Q$-group that is absolutely simple, simply connected,
and split over $\Q_p$ for every $p$.  Let $G_0$ be the split form of $G$ over $\Q$, so 
$G$ is an inner form of $G_0$ by Proposition \ref{refrem}.  That is, $c(G)$ is the image under 
${\rm{H}}^1(\Q, G_0^{\rm{ad}}) \rightarrow {\rm{H}}^1(\Q, {\rm{Aut}}_{G_0/\Q})$
of a class  $c' \in {\rm{H}}^1(\Q,G_0^{\rm{ad}})$.  

We can do better: such a $c'$ can be chosen such that $c'|_{\Q_p}$ is trivial for all $p$.
Indeed, we know that $G$ admits a $\Z$-model $\mathscr{G}$, and 
$d(\mathscr{G})=1$ by Proposition \ref{noout}, so $c(\mathscr{G})$ arises from a class 
$\xi \in{\rm{H}}^1(\Z, \mathscr{G}_0^{\rm{ad}})$.   It follows from
Proposition \ref{lang} that $\xi|_{\Z_p} = 1$ for all $p$, so $c(\mathscr{G}_{\Z_p})=1$ for all $p$, which is to say
that $\mathscr{G}_{\Z_p}$ is split for all $p$. Moreover, by Corollary \ref{localtriv},
the class $c' := \xi_{\Q}$ has trivial restriction over every $\Q_p$, so $c'$
is of the desired type.  
Such a $c'$ that is trivial over every $\Q_p$
will be shown to arise from ${\rm{H}}^1(\Q,G_0)$ in the proof of:

\begin{lemma}\label{innerR}  The $\Q$-group $G$ is a pure inner form of the split group $G_0$.
\end{lemma}

\begin{proof}
The Hasse principle for adjoint semisimple groups \cite[\S6.5, Thm.\:6.22]{PR} says that the 
map of sets
$${\rm{H}}^1(\mathbf Q, G_0^{\rm{ad}}) \rightarrow \prod_v {\rm{H}}^1(\mathbf Q_v, G_0^{\rm{ad}})$$
is injective, so the class 
$c' \in {\rm{H}}^1(\mathbf Q,G_0^{\rm{ad}})$ is determined by its restriction
$c'_{\infty}$ in ${\rm{H}}^1(\mathbf R, G_0^{\rm{ad}})$ (since 
the local classes $c'_p = c'|_{\Q_p}$ are trivial by hypothesis).  In particular,
$c'_{\infty}$ determines the $\Q$-isomorphism class of
$G$ (as this isomorphism class
is the image of $c'$ in ${\rm{H}}^1(\mathbf Q, {\rm{Aut}}_{G_0/\Q})$). 
For example, if $c'_{\infty} = 1$
then $G \simeq G_0$ as $\Q$-groups.

Let $Z := Z_{G_0}$ be the center of $G_0$, giving an exact sequence of pointed sets
$$\xymatrix{
{\rm{H}}^1(\Q,Z) \ar[r] & {\rm{H}}^1(\Q, G_0) \ar[r] & {\rm{H}}^1(\Q, G_0^{\rm{ad}}) 
\ar[r]^-{\delta} &  {\rm{H}}^2(\Q, Z).}
$$
The center of a split simply connected semisimple group is Cartier dual to
the fundamental group of the root system, so 
the $\Q$-group $Z$ is isomorphic to $\mu_n$ for some $n \ge 1$ or $\mu_2 \times \mu_2$
(by inspection of the classification of irreducible root systems).
Since ${\rm{H}}^2(k,\mu_d) = {\rm{Br}}(k)[d]$ for
any field $k$ and integer $d > 0$, ${\rm{H}}^2(\Q, Z)$ is equal to
${\rm{Br}}(\Q)[n]$ or ${\rm{Br}}(\Q)[2] \times {\rm{Br}}(\Q)[2]$. 
Local restriction at each place $v$ of $\Q$ carries $\delta(c')$ to 
$\delta_v(c'_v) \in {\rm{H}}^2(\Q_v, Z)$
for $c'_v := c'|_{\Q_v}$.  

By global class field theory, any Brauer class over a global field has
local invariants in $\Q/\Z$ that vanish at all but finitely many places
and sum to 0, so a global class that is locally trivial away from one place
is globally trivial.  Thus, since $\delta_p(c'_p)=1$ for all primes $p$, we conclude
that $\delta(c') = 1$, so the class $c'$
(whose archimedean component $c'_{\infty}$ determines 
the isomorphism class of the group $G$ over $\mathbf Q$) is in the image of 
${\rm{H}}^1(\Q,G_0)$. This says that $G$ is a pure inner form of $G_0$ over $\Q$. 
\end{proof}

\begin{remark}\label{pureZ}
A variant of the preceding proof gives more: any $\Z$-model 
$\mathscr{G}$ of $G$ is a pure inner form of the split form over $\Z$.  That is, if $\mathscr{G}_0$ is the split
simply connected $\Z$-group of the same type as $G$ then we claim that the class of $\mathscr{G}$ in
${\rm{H}}^1(\Z, {\rm{Aut}}_{\mathscr{G}_0/\Z})$ arises from
${\rm{H}}^1(\Z, \mathscr{G}_0)$.  We have already seen that the class of $\mathscr{G}$ arises
from ${\rm{H}}^1(\Z, \mathscr{G}_0^{\rm{ad}})$ (this is the vanishing of $d(\mathscr{G})$),
so it suffices to show that the map
${\rm{H}}^1(\Z, \mathscr{G}_0) \rightarrow {\rm{H}}^1(\Z,\mathscr{G}_0^{\rm{ad}})$ is surjective.

The central extension
$$1 \rightarrow Z_{\mathscr{G}_0} \rightarrow \mathscr{G}_0 \rightarrow \mathscr{G}_0^{\rm{ad}} \rightarrow 1$$
is a short exact sequence for the fppf topology over $\Spec(\Z)$, and degree-1 \v{C}ech-cohomology
with coefficients in a smooth affine group is the same for the \'etale and fppf topologies
(as we noted in Example \ref{ettorsor}).  The $\Z$-group $Z_{\mathscr{G}_0}$ is
Cartier dual to the finite abelian fundamental group of the root system \cite[Ex.\:5.1.7]{C}.  Explicitly, by inspection
of the classification of irreducible root systems, it is either
$\mu_n$ for some $n \ge 1$ or $\mu_2 \times \mu_2$.  
As is explained in the proof of Theorem \ref{genus}, there is a connecting map of pointed sets
$\delta:{\rm{H}}^1(\Z, \mathscr{G}_0^{\rm{ad}}) \rightarrow {\rm{H}}^2(\Z,Z_{\mathscr{G}_0})$
whose kernel is the image of ${\rm{H}}^1(\Z,\mathscr{G}_0)$.  Hence, it suffices
to show that ${\rm{H}}^2(\Z,\mu_d)=1$ for any integer $d > 0$, which is Lemma \ref{h2mu}.
\end{remark}
   
 Let $G_0$ be a connected semisimple $\Q$-group that is split, simple, and simply connected. 
The map 
${\rm{H}}^1(\Q,G_0) \rightarrow {\rm{H}}^1(\RRR,G_0)$ is bijective: 
surjectivity holds for any connected linear algebraic group over $\Q$ \cite[\S6.5, Prop.\:6.17]{PR},
and the vanishing of ${\rm{H}}^1(\Q_p,G_0)$ for all $p$
(theorem of Kneser--Bruhat--Tits: \cite[\S6.1, Thm.\:6.4]{PR}, \cite[Thm.\:4.7(ii)]{BT}) reduces the injectivity 
to the Hasse principle for simply connected
semisimple groups \cite[\S6.1, Thm.\:6.6]{PR}.
The pointed set ${\rm{H}}^1(\mathbf R, G_0)$ is finite, and 
(especially for the exceptional types) can be computed using methods of Serre 
\cite[III, \S4.5]{S} and Borovoi \cite{B}.


For a class $c_{\infty} \in {\rm{H}}^1(\RRR, G_0)$, the image in ${\rm{H}}^1(\Q, {\rm{Aut}}_{G_0/\Q})$
of the associated $c \in {\rm{H}}^1(\Q, G_0)$ classifies a $\Q$-form $G$ of $G_0$ split at all finite places.
(If $c_{\infty}=1$ then $c=1$ and the corresponding $G$ is $G_0$.)
Such a $G$ admits a $\Z$-model,  by Lemma \ref{extend}, and we have seen that {\em every} $\Q$-form of $G_0$ admitting
a $\Z$-model must arise in this way for some $c_{\infty}$.  Thus,
 the $\RRR$-groups that arise from $\Q$-forms of $G_0$ admitting a $\Z$-model are classified by 
the image of ${\rm{H}}^1(\RRR, G_0) \rightarrow {\rm{H}}^1(\RRR, {\rm{Aut}}_{G_0/\RRR})$.

We claim that every such $G$ as a $\Q$-group is determined {\em up to $\Q$-isomorphism} by
the $\RRR$-group $G_{\RRR}$.  To prove this, it is sufficient (but not necessary) to show that $G_{\RRR}$ determines
the class $c_{\infty} \in {\rm{H}}^1(\RRR,G_0)$ with which we began, so we first show:

\begin{lemma}\label{Rspecial} The natural map of sets
${\rm{H}}^1(\RRR,G_0) \rightarrow {\rm{H}}^1(\RRR, {\rm{Aut}}_{G_0/\RRR})$ is injective
except possibly for types ${\rm{B}}_n$ with $n \ge 3$ and ${\rm{D}}_n$
with $n \ge 4$.
\end{lemma}


\begin{proof}
For types A and C there is nothing to do since for any field $k$ (such as $k = \RRR$) we have
 ${\rm{H}}^1(k, \SL_n) = 1$ by \cite[X, \S1]{local}
and ${\rm{H}}^1(k, \Sp_{2n}) = 1$ by \cite[III, 1.2, Prop.\:3]{S}. 
For types ${\rm{E}}_8$, ${\rm{F}}_4$, and ${\rm{G}}_2$ the map of
${\rm{H}}^1$'s is bijective since
$G_0 \rightarrow {\rm{Aut}}_{G_0/\RRR}$ is an isomorphism by (\ref{autg}).

It remains to treat types ${\rm{E}}_6$ and ${\rm{E}}_7$.  In both cases, computations with 
the methods of Borovoi \cite{B} yield that ${\rm{H}}^1(\RRR,G_0)$ has size 2.  Thus, it suffices to show that in each case the map of
pointed sets ${\rm{H}}^1(\RRR,G_0) \rightarrow {\rm{H}}^1(\RRR, {\rm{Aut}}_{G_0/\RRR})$ has trivial kernel.
The map ${\rm{H}}^1(\RRR,G_0^{\rm{ad}}) \rightarrow {\rm{H}}^1(\RRR, {\rm{Aut}}_{G_0/\RRR})$ has trivial kernel since
${\rm{Aut}}_{G/k}(k) \rightarrow {\rm{Out}}_{G/k}(k)$ is surjective for any split
connected reductive group $G$ over any field $k$ (using pinned automorphisms; see (\ref{autg})).
Thus, it is equivalent to show that ${\rm{H}}^1(\RRR,G_0) \rightarrow {\rm{H}}^1(\RRR,G_0^{\rm{ad}})$ has
trivial kernel.  In other words, we need to show that the connecting map
$\delta:G_0^{\rm{ad}}(\RRR) \rightarrow {\rm{H}}^1(\RRR, Z_{G_0})$ is surjective.

For type ${\rm{E}}_6$ we have $Z_{G_0} = \mu_3$, so ${\rm{H}}^1(\RRR, Z_{G_0}) = 1$.
This settles the case of ${\rm{E}}_6$.
For type ${\rm{E}}_7$ we have $Z_{G_0} = \mu_2$, so ${\rm{H}}^1(\RRR,\mu_2)$ has order 2.
Hence, it is equivalent to show that $\delta$ is nontrivial, which in turn is equivalent to
the map $G_0(\RRR) \rightarrow G_0^{\rm{ad}}(\RRR)$ not being surjective.
But $G_0(\RRR)$ is connected (because it is generated by subgroups of the form ${\rm{SL}}_2(\RRR)$, as
for any split simply connected semisimple $\RRR$-group, or alternatively because of Cartan's general theorem
that the space of $\RRR$-points of a simply connected semisimple $\RRR$-group is connected), so it suffices to show that 
the topological space of $\RRR$-points of the adjoint split $\RRR$-group of type ${\rm{E}}_7$ is disconnected.
More generally, for any split connected semisimple $\RRR$-group $G_0$ with split maximal $\RRR$-torus $T_0$ and simply
connected central cover $\widetilde{G}_0$ in which $T_0$ has split maximal $\RRR$-torus preimage $\widetilde{T}_0$, 
$\pi_0(G_0(\RRR)) = \coker(\widetilde{T}_0(\RRR) \rightarrow T_0(\RRR)) = {\rm{H}}^1(\R,\mu)$ where $\mu$ denotes
$\ker(\widetilde{G}_0
\rightarrow G_0)$.  For $G$ is adjoint of type ${\rm{E}}_7$ we have $\mu = \mu_2$, so $\#\pi_0(G_0(\RRR)) = 2$ in such cases.
\end{proof}

\begin{proposition}\label{Rinj}
Let $G$ be a connected semisimple $\Q$-group that is absolutely simple
and simply connected.  If $G$ admits a $\Z$-model then $G$ is determined up to isomorphism by $G_{\RRR}$,
and the $\RRR$-groups arising in this way correspond to the image of
${\rm{H}}^1(\RRR, G_0) \rightarrow {\rm{H}}^1(\RRR, {\rm{Aut}}_{G_0/\RRR})$ for
the split simple simply connected semisimple $\RRR$-group $G_0$ that is a form of $G_{\RRR}$.

In particular, for any reduced and irreducible root system $\Phi$,
there is at most one connected semisimple $\Q$-group $G = G_{\Phi}$ that is absolutely simple
and simply connected such that $G_{\overline{\Q}}$ has root system $\Phi$ and $G_{\RRR}$ is anisotropic
$($equivalenty, $G(\RRR)$ is compact$)$. The split $\Q$-form of $G_{\Phi}$ is the only one that admits a $\Z$-model and has
split $\RRR$-fiber with root system $\Phi$. 
\end{proposition}

\begin{proof}
As we saw via (\ref{H1zg}), 
the existence of a $\Z$-model implies that $G_{\Q_p}$ is split for all $p$.
The uniqueness of $G$ over $\Q$
with a given Killing--Cartan type for which $G_{\RRR}$ either anisotropic or split follows
 from the rest because anisotropic and split
forms over $\RRR$ are unique.  Hence, by Lemma \ref{Rspecial} and the discussion preceding it, 
we just need  to prove that $G$ is determined by $G_{\RRR}$
for types ${\rm{B}}_n$ with $n \ge 3$ and ${\rm{D}}_n$ with $n \ge 4$. 
Such a $G$ is a form of ${\rm{Spin}}_N$ for some $N \ge 7$.  
(The argument below will work for any $N \ge 3$.)

Since the $\Q$-form $G$ of ${\rm{Spin}}_N$ is a pure inner form 
by Lemma \ref{innerR}, the map
$$h:{\rm{H}}^1(\Q, {\rm{Spin}}_{N}) \rightarrow {\rm{H}}^1(\Q, {\rm{Aut}}_{{\rm{Spin}}_{N}/\Q})$$
carries the class of some ${\rm{Spin}}_N$-valued 1-cocycle $c$ to  the isomorphism class of the $\Q$-form $G$.  
The associated ${\rm{SO}}_N$-valued 1-cocycle $\overline{c}$ can be used to twist the quadratic space
$(\Q^{N}, q_{N})$ into a non-degenerate quadratic space $(W,q)$ over $\Q$ of dimension $N$,
and $h$ carries the class of $c$ to the class of ${\rm{Spin}}(q)$.  Hence, 
$G = {\rm{Spin}}(q)$ for some $(W,q)$.  
(Note that the $\Q^{\times}$-multiples of $q$
need {\em not} arise via this twisting process, though such multiples give rise to the same spin group over $\Q$.)

The class $\xi \in {\rm{H}}^1(\Q, {\rm{O}}_{N})$ of $(W,q)$ is carried by
$${\rm{H}}^1(\Q, {\rm{O}}_{N}) \rightarrow {\rm{H}}^1(\Q, \mu_2) = \Q^{\times}/(\Q^{\times})^2$$
to ${\rm{disc}}(q)/{\rm{disc}}(q_{N})$ and is in the image of ${\rm{H}}^1(\Q, {\rm{Spin}}_{N})$ by design,
so it comes from ${\rm{H}}^1(\Q, {\rm{SO}}_N)$ and hence ${\rm{disc}}(q) = {\rm{disc}}(q_N)$
in $\Q^{\times}/(\Q^{\times})^2$.  Likewise, since
$$\delta:{\rm{H}}^1(\Q, {\rm{SO}}_{N}) \rightarrow {\rm{H}}^2(\Q, \mu_2) = {\rm{Br}}(\Q)[2]$$
kills the image of ${\rm{H}}^1(\Q, {\rm{Spin}}_{N})$, 
the Hasse-Witt invariants for $(W,q)$ at all places
are trivial.  

The only local invariant of $(W,q)$ in the Hasse--Minkowski theorem 
that has not been uniquely determined is the signature $(r,s)$. The $\RRR$-group
$G_{\RRR}$ determines $(r,s)$ up to possibly swapping $r$ and $s$:
$\min(r,s)$ is the $\RRR$-rank of $G_{\RRR} = {\rm{Spin}}(q_{\RRR})$ (as we may compute via 
the isogenous quotient ${\rm{SO}}(q_{\RRR})$), and $\max(r,s) = N - \min(r,s)$.

The sign $(-1)^s$ of ${\rm{disc}}(q)$ is the same as that of ${\rm{disc}}(q_N)$,
so the parity of $s$ is uniquely determined.  This eliminates any swapping ambiguity for
odd $N=r+s$ since $r$ and $s$ have opposite parity in such cases.  Thus, for odd $N$
the group $G_{\RRR}$ determines the $\Q$-isomorphism class of $(W,q)$ and hence of $G = {\rm{Spin}}(q)$.

Suppose $N$ is even, so the quadratic space $(W,-q)$ has the same discriminant
and the same local Hasse--Witt invariants as $(W,q)$ since $(\Q^{2n}, q_{2n}) \simeq (\Q^{2n}, -q_{2n})$
(by negating the standard basis vectors $e_j$ of $\Q^{2n}$ for $j$ of a fixed parity). But $(W,-q)$
realizes the swapped signature, so by the Hasse--Minkowski theorem 
the only possibilities for $G$ realizing a given $G_{\RRR}$ are
${\rm{Spin}}(q)$ and ${\rm{Spin}}(-q)$.  These $\Q$-groups are isomorphic, so we are done.
\end{proof}

\begin{remark}\label{spinZ}
For any integer $N \ge 3$, the pure inner forms of ${\rm{Spin}}_N$ over $\Z$
are the $\Z$-groups ${\rm{Spin}}(q)$ for (fiberwise) non-degenerate
quadratic lattices $(M,q)$ with rank $N$.   Indeed, by Remark \ref{pureZ} every
such ${\rm{Spin}}(q)$ is a pure inner form of the Chevalley group ${\rm{Spin}}_N$
with the same $\overline{\Q}$-fiber, and conversely a twisting argument as done
with the map $h$ in the preceding proof shows that every pure inner
form of ${\rm{Spin}}_N$ is given by ${\rm{Spin}}(q)$ for some $(M,q)$.
By similar reasoning, the $\Z$-groups ${\rm{SO}}(q)$ for such quadratic lattices $(M,q)$
exhaust the set of isomorphism classes of semisimple $\Z$-groups with $\Q$-fiber a form of ${\rm{SO}}_N$, 
for any $N \ge 3$.

Proposition \ref{remso} shows that the $\Z$-group ${\rm{SO}}(q)$ determines
the isomorphism class of $(M,q)$ up to negating $q$, and we claim that the same holds for ${\rm{Spin}}(q)$.
That is, if $(M',q')$ is another such quadratic lattice of rank $N$ with ${\rm{Spin}}(q') \simeq {\rm{Spin}}(q)$ over $\Z$ 
then necessarily $q' \simeq \pm q$.   
To prove this, it is sufficient that such an isomorphism
between the spin groups over $\Z$ descends to an isomorphism between the special orthogonal group quotients. 

Since ${\rm{Spin}}(q')$ and ${\rm{Spin}}(q)$
are separately \'etale-locally isomorphic to ${\rm{Spin}}_N$ in such a way that their special orthogonal group quotients 
are carried to the same quotient ${\rm{SO}}_N$, it is sufficient that the kernel of
the central isogeny ${\rm{Spin}}_N \rightarrow {\rm{SO}}_N$ is stable under ${\rm{Aut}}_{{\rm{Spin}}_N/\Z}$,
or equivalently is stable under
the action of ${\rm{Out}}_{{\rm{Spin}}_N/\Z}$. 
This outer
automorphism group is the constant group associated to the diagram automorphisms, so case-checking
of the B and D root systems shows that 
such stability holds except when $N=8$ (triality). 

In the case $N=8$, the possible signatures over $\RRR$ are the indefinite  (4,4) and the definite 
(8,0) and (0,8).  The $\RRR$-rank of ${\rm{Spin}}(q)$ determines
the signature up to negating $q$, so in the indefinite cases we are done because the signature determines
the isomorphism class in such cases (as discussed in \S\ref{quadsec}; also see
Theorem \ref{genus}). In the definite cases, the Minkowski--Siegel mass
formula for positive-definite even unimodular lattices
 shows that the only examples in rank 8 are the quadratic spaces of discriminant $\pm 1$
arising from the even unimodular ${\rm{E}}_8$ root lattice and its negative-definite analogue.
\end{remark}

We now describe the groups $G_{\RRR}$ for $G$ as in Proposition \ref{Rinj} (also see \cite[Table 1.3]{G}).
First we treat the classical types.
As explained in the proof of Lemma \ref{Rspecial}, for types A and C necessarily $G_{\RRR}$ is split.
For types B and D, the $\RRR$-groups that
arise from absolutely simple and simply connected semisimple $\Q$-groups admitting a $\Z$-model are $\Spin(r,s)$ with $r - s \equiv \pm1 \bmod 8$ for type B and
$r -s \equiv 0 \bmod 8$ for type D.
These congruences can be found in two ways. One way is by using 
Remark \ref{spinZ} and the determination of the signatures of non-degenerate quadratic spaces over $\Z$
as discussed in \S\ref{quadsec}. 
Another way is to describe ${\rm{H}}^1(\RRR, {\rm{Spin}}_n)$
using the methods of Serre and Borovoi and then compute the image of the map 
${\rm{H}}^1(\RRR, {\rm{Spin}}_n) \rightarrow {\rm{H}}^1(\RRR, {\rm{Aut}}_{{\rm{Spin}}_n/\RRR})$.

Now we turn to the exceptional types.
For ${\rm{G}}_2$ one gets both real forms (of ranks $0$, $2$), and for ${\rm{F}}_4$ one gets all three real forms 
(of ranks $0$, $1$, $4$). For ${\rm{E}}_6$ one gets precisely the real inner forms (of ranks $2$, $6$), and for ${\rm{E}}_7$
one gets real forms of ranks $3$, $7$
but not those of ranks 0, 4. Finally, for ${\rm{E}}_8$ one gets every real form (of ranks $0$, $4$, $8$). 
  
  \begin{remark}\label{excforms}
The $\RRR$-forms described above are the $\RRR$-groups arising from absolutely simple and simply connected
semisimple $\Q$-groups $G$ that admit a (reductive) $\Z$-model. 
Such $G$ may arise as the generic fiber of several semisimple $\Z$-groups
that are pairwise non-isomorphic over $\Z$.  For example, in types
B and D this happens with definite quadratic lattices $(M,q)$ that are non-degenerate over $\Z$,
due to Proposition \ref{remso}.
We shall see additional examples in \S\ref{exsec}
for type ${\rm{F}}_4$ (and many for type ${\rm{E}}_8$ in \S\ref{countsec} by more indirect means).
\end{remark}

By Proposition \ref{Rinj}, ${\rm{H}}^1(\RRR,G_0)$ parameterizes the set of isomorphism classes of $\Q$-fibers of
simply connected semisimple groups over $\mathbf Z$
with absolutely simple fibers. The proof ultimately
rested on the triviality of the fundamental group $\pi_1(S)$ and
 the Brauer group ${\rm{H}}^2(S,\mathbf G_m)$ for $S = \Spec(\Z)$. (The triviality of
 ${\rm{Br}}(\Z)$ expresses the fact
 that a Brauer class for $\Q$ that is split at all finite places is globally split.) 
These groups need not be trivial for $S = \Spec(A)$ when 
$A$ is the ring of integers in a general number field $K$, and that makes the description of the generic fibers of semisimple 
groups over such $A$ much more involved when $K \ne \Q$ (and it seems hopeless to give a general answer;
in \cite{harder} the case of split generic fiber over Dedekind domains is studied).

\section{Coxeter's integral octonions}\label{coxsec}

To build non-split semisimple $\Z$-groups going beyond \S\ref{quadsec}, we shall use one remarkable structure: 
Coxeter's integral order $\mathscr{R}$ in Cayley's definite 
octonions, whose definition we review below (also see \cite[\S4]{G} or \cite[\S1]{EG2}). 
The automorphism scheme of $\mathscr{R}$ will turn out to be the unique 
semisimple $\Z$-group of 
type ${\rm{G}}_2$ that is $\mathbf R$-anisotropic. What is even more striking is that the order $\mathscr{R}$ can be used to construct
$\Z$-models of absolutely simple non-split connected semisimple $\Q$-groups of other exceptional
types; see \S\ref{exsec} below.  

We refer the reader to Appendix \ref{octsec} for a review of general background
related to octonion algebras over rings, including a discussion of the {\em split} octonion
algebra $\Lambda_R$ over any (commutative) ring $R$ and proofs that any 
automorphism of the underlying algebra of an octonion $R$-algebra 
respects the octonionic norm and conjugation (as is classical
over fields) and that any octonion $R$-algebra is isomorphic to $\Lambda_R$ \'etale-locally over $\Spec(R)$.

Cayley's definite octonion algebra was first described as a non-associative algebra with anti-involution over $\mathbf R$, but 
its multiplication table actually gives an algebra $\mathbf O$ over 
$\mathbf Q$. As a rational vector space of dimension $8$, it has the form
$$\mathbf O = \mathbf Q \cdot 1 \oplus \mathbf Q\cdot e_1 \oplus \cdots \oplus \mathbf Q\cdot e_7$$
with the multiplication law determined by
$$e_i^2 = -1,$$
$$e_i\cdot e_{i+1}\cdot e_{i+3} = -1,$$
where in the last identity the subscript is calculated modulo 7 and the multiplication among the indicated
ordered triples is associative. This gives seven copies of Hamilton's rational quaternion algebra
 inside $\mathbf O$. If  three distinct elements $e_i$ do not lie in one of these quaternion algebras, one finds that they anti-associate. For example,
$$(e_1\cdot e_2)\cdot e_3 = - e_1\cdot (e_2\cdot e_3).$$

There is an algebra anti-involution $x \mapsto x^{\ast}$ of $\mathbf O$ called
{\em conjugation} that is defined by $e_i^* = - e_i$, and the trace and norm
$$\Tr(a) = a + a^*,\,\,\,
{\rm{N}}(a) = a\cdot a^* = a^*\cdot a$$
take values in $\Q$, with every $a \in \mathbf{O}$ satisfying 
$a^2 - \Tr(a)\cdot a + {\rm{N}}(a) = 0$.
In particular, if $a \not\in \Q$ then $\Q[a]$ is a quadratic field. 

The norm  ${\rm{N}}:\mathbf{O} \rightarrow \Q$ is a positive-definite quadratic form and
${\rm{N}}(aa') = {\rm{N}}(a) {\rm{N}}(a')$, so $\mathbf{O}$ is an octonion division algebra (see Definition \ref{octdiv}).
Its associated bilinear form is
$$\langle x, y \rangle := (x+y) \cdot (x + y)^{\ast} - x \cdot x^{\ast} - y \cdot y^{\ast} = x \cdot y^{\ast} + y \cdot x^{\ast} =
{\rm{Tr}}(x \cdot y^{\ast}).$$

Although multiplication in $\mathbf{O}$ is not associative, it is trace-associative in the sense that
${\rm{Tr}}((x\cdot y) \cdot z) = {\rm{Tr}}(x\cdot (y\cdot z))$ for all $x, y, z \in \mathbf{O}$.  
This is a general property of octonion algebras (as reviewed in Appendix \ref{octsec}).

\begin{lemma}\label{autO}
The automorphism scheme ${\rm{Aut}}_{\mathbf{O}/\Q}$ is connected semisimple of type ${\rm{G}}_2$ 
over $\Q$.  It is is $\RRR$-anisotropic and split
over $\Q_p$ for all primes $p$.
\end{lemma}

\begin{proof}
The first assertion is a special case of Theorem \ref{octprop} (which is classical over fields), according to which the split property over
$\Q_p$ is a consequence of the fact (explained in Example
\ref{octlocal}) that $\mathbf{O}_{\Q_p}$ is a split octonion algebra for every $p$.
Since the norm ${\rm{N}}$ is positive-definite
and  ${\rm{Aut}}_{\mathbf{O}/\Q}$ is a closed subgroup of
the orthogonal group ${\rm{O}}(\mathbf{O}, {\rm{N}})$ over $\Q$, 
the $\RRR$-anisotropicity follows.
\end{proof}

\begin{remark}\label{uniqueO}
Up to isomorphism, the Cayley octonion algebra $\mathbf{O}$ is the {\em unique} non-split octonion algebra
over $\Q$.  By Corollary \ref{octclass} this amounts to showing that 
there is a unique non-split $\Q$-form of ${\rm{G}}_2$.  Since ${\rm{G}}_2$ is its own automorphism scheme,
we have to show that ${\rm{H}}^1(\Q, {\rm{G}}_2)$ has two elements.  By the Hasse principle for simply connected
semisimple groups as we discussed after Remark \ref{pureZ}, 
${\rm{H}}^1(\Q, {\rm{G}}_2) \rightarrow {\rm{H}}^1(\RRR, {\rm{G}}_2)$ is bijective.
Over any field, a non-split form of ${\rm{G}}_2$ is anisotropic \cite[17.4.2]{springer}.
Thus, the uniqueness of the $\RRR$-anisotropic form of any connected semisimple $\RRR$-group
completes the proof.
\end{remark}

An {\em order} in $\mathbf{O}$ is a $\Z$-lattice containing 1 and stable under multiplication. 
It is automatically stable under the conjugation.  Indeed, obviously
$\Q$ meets any order in $\Z$, and if $a \in \mathbf{O}$ is in an order but not in $\Q$
then $\Z[a]$ is an order in the quadratic field $\Q[a]$, so $x^2 - \Tr(a)x + {\rm{N}}(a)$ must be the minimal
polynomial of $a$ over $\Q$, forcing $\Tr(a) \in \Z$, so the conjugate $a^{\ast} = \Tr(a) - a$ also lies in the order.
In particular, the trace and norm are $\Z$-valued on any order in $\mathbf{O}$.
By Proposition \ref{ordexist}, every
order in $\mathbf{O}$ is contained in a maximal one. 

By Corollary \ref{globalgood}, the maximal orders in
$\mathbf{O}$ are precisely the orders that are octonion $\Z$-algebras when equipped
with the restriction of the norm (so the norm defines a structure
of unimodular lattice).  Hence, by Theorem \ref{octprop},
the automorphism scheme of a maximal order in $\mathbf{O}$
is a semisimple $\Z$-group of type ${\rm{G}}_2$. Thus, to 
make an explicit semisimple $\Z$-group with $\Q$-fiber $G := \Aut_{\mathbf{O}/\Q}$, we will use 
a specific maximal order $\mathscr{R}$ in $\mathbf O$. 

The
obvious order
$$\mathscr{S} = \mathbf Z \cdot 1 + \mathbf Z\cdot e_1 + \cdots + \mathbf Z\cdot e_7$$
is maximal at all primes except $p = 2$; equivalently, the trace pairing ${\rm{Tr}}(xy^{\ast}) = \langle x, y \rangle$ on $\mathscr{S}$
has discriminant that is a power of 2.  Indeed,  defining $e_0 = 1$, the elements $e_i$ are pairwise
orthogonal and satisfy $\langle e_i, e_i \rangle = 2$, so the discriminant of the quadratic
lattice $\mathscr{S}$ is $2^8$.

We obtain a maximal order $\mathscr{R}$ containing 
$\mathscr{S}$ by choosing an index $i \bmod 7$ and adjoining the Hurwitz elements in the 
three evident copies of Hamilton's rational quaternions which contain $e_i$. 
For example, if $i = 1$, we adjoin to $\mathscr{S}$ the three elements
$$h_1 = (1 + e_1 + e_2 + e_4)/2$$
$$h_2 = (1 + e_1 + e_3 + e_7)/2$$
$$h_3 = (1 + e_1 + e_5 + e_6)/2$$
as well as products among these.  This defines an order $\mathscr{R}$ containing $\mathscr{S}$ with 
$\mathscr{R}/\mathscr{S} \simeq (\mathbf Z/2\mathbf Z)^4$. An additional additive generator is 
$$h_4 = (e_1 + e_2 + e_3 + e_5)/2$$
(i.e., $\mathscr{R}$ is spanned over $\Z$ by $\mathscr{S}$ and $h_1, \dots, h_4$). 
This is Coxeter's $\Z$-order. For future reference, we note that the element
\begin{equation}\label{alpha}
\alpha = (1 + e_1 + e_2 + \cdots + e_7)/2 = h_1 + h_2 + h_3 - (1 + e_1)
\end{equation}
lies in $\mathscr{R}$.  (It satisfies the quadratic equation $\alpha^2 - \alpha +2 = 0$.)

The positive-definite quadratic form ${\rm{N}}:\mathbf{O} \rightarrow \Q$ restricts
to a quadratic form $q:\mathscr{R} \rightarrow \Z$ whose associated symmetric bilinear form is
the restriction to $\mathscr{R}$ of 
$\langle x,y \rangle = \Tr(xy^*)$.  In particular, $q(x) = \langle x, x \rangle/2$ for all $x \in \mathscr{R}$.  
Since the discriminant of the quadratic lattice $\mathscr{S}$ is equal to $2^8$ and the
 index of $\mathscr{S}$ in $\mathscr{R}$ is $2^4$, it follows that the trace pairing is unimodular on $\mathscr{R}$,
 so $(\mathscr{R}, q)$ is non-degenerate over $\Z$.
 
By unimodularity, $\mathscr{R}$ is an octonion algebra over $\Z$ with respect
to the restriction $q$ of the norm on $\mathbf{O}$, and it is maximal as a $\Z$-order in $\mathbf{O}$.
Thus, by Theorem \ref{octprop}, the automorphism scheme $\mathscr{G} = {\rm{Aut}}_{\mathscr{R}/\Z}$
with $\RRR$-anisotropic $\Q$-fiber $G = {\rm{Aut}}_{\mathbf{O}/\Q}$
of type ${\rm{G}}_2$
is a semisimple $\Z$-group (of type ${\rm{G}}_2$).
In Example \ref{G2unique} we will establish an integral version of
Remark \ref{uniqueO}:  up to isomorphism, 
$\mathscr{R}$ is the unique non-split octonion algebra over $\Z$.


\begin{remark}
Since $(\mathscr{R}, q)$ is a positive-definite non-degenerate quadratic space over $\Z$ with rank 8, it must be
the ${\rm{E}}_8$ root lattice.  Likewise, the $\Z$-submodule $\mathscr{R}_0$ of elements of trace zero
is a positive-definite quadratic lattice that is non-degenerate over $\Z$, so it is isomorphic to 
the ${\rm{E}}_7$ root lattice.   
Multiplication in $\mathscr{R}$ is trace-associative, so we can define a trilinear form $\mathscr{R}^3 \rightarrow \Z$ by 
\begin{equation}\label{OL}
(x,y,z) \mapsto  \Tr(x\cdot (y\cdot z)) = \Tr((x \cdot y)\cdot z).
\end{equation}
This $3$-form is alternating on the sublattice $\mathscr{R}_0$, so it induces a map $\wedge^3\mathscr{R}_0 \to \mathbf Z$.
\end{remark}

For our work with other exceptional types, it is convenient to relate
the Coxeter order
$\mathscr{R}$ in the definite octonion algebra $\mathbf{O}$ over $\Q$
and the standard split octonion algebra $\Lambda$ over $\Z$ that is a maximal order in
the split octonion algebra over $\Q$ (as discussed in Appendix \ref{octsec}):

\begin{proposition}\label{G2aut} For every prime $p$, $\mathscr{R}_{\Z_p} \simeq \Lambda_{\Z_p}$ as octonion
algebras over $\Z_p$.
\end{proposition}

\begin{proof}
By Example \ref{octlocal}, $\mathscr{R}_{\Q_p}$ is split as an octonion algebra over $\Q_p$.
By Proposition \ref{gymax}, every maximal order in a split octonion algebra
over the fraction field of a discrete valuation ring is a split octonion algebra over the valuation ring.
Hence, $\mathscr{R}_{\Z_p} \simeq \Lambda_{\Z_p}$.
\end{proof}

%For any connected semisimple group $H$ over $\Q_p$, in Bruhat--Tits theory there is a distinguished class of 
%compact open subgroups $P \subset H(\Q_p)$ called the {\em parahoric} subgroups, and 
%every such $P$ arises as the generic fiber of a canonically associated smooth affine $\Z_p$-group $\mathscr{P}$
%with generic fiber $H$ in such a way that $P = \mathscr{P}(\Z_p)$.
%Moreover, the $\Z_p$-group $\mathscr{P}$ is semisimple precisely when 
%the compact open subgroup $P \subset H(\Q_p)$ satisfies the condition of being hyperspecial (defined
%in terms of how $H(\Q_p)$ acts on the building associated to $H$).
%In \cite{GY},\footnote{We really should give specific references within
%\cite{GY}.} it is shown that each parahoric subgroup $P \subset {\rm{G}}_2(\Q_p)$ arises
%as the stabilizer of a certain $\Z_p$-order $M_p$ in the split octonion algebra $\mathbf{O}_{\Q_p}$, 
%with $\mathscr{P}$ equal to the automorphism scheme
%of $M_p$ over $\Z_p$ (using the evident identification of the $\Q_p$-fiber
%of ${\rm{Aut}}_{M_p/\Z_p}$ with ${\rm{Aut}}_{\mathbf{O}_{\Q_p}/\Q_p} = {\rm{G}}_2$).  

%For any $\Z_p$-order $M_p$ in $R_{\Z_p}$ we get a quadratic space
%$(M_p, {\rm{N}})$ over $\Z_p$ by using the restriction to the $\Z_p$-lattice $M_p$ of the norm on Coxeter's order $R$.
%This norm is induced by the one on
%$\mathbf{O}_{\Q_p}$ because the  identification of $R_{\Q_p}$ with $\mathbf{O}_{\Q_p}$ 
%respects the norms on these $\Q_p$-algebras.  As a special case of the description of parahoric subgroups
%and their associated smooth affine $\Z_p$-groups in  \cite{GY}, 
%if an order $M_p$ in $\mathbf{O}_{\Q_p}$ is equipped with the restriction of the norm on $\mathbf{O}_{\Q_p}$
%(necessarily $\Z_p$-valued on $M_p$) and the resulting quadratic space has 
%discriminant  in $\Z_p^{\times}$ then the stabilizer of $M_p$ inside ${\rm{G}}_2(\Q_p)$ is a hyperspecial
%parahoric subgroup $P$ with associated  group scheme
%$\mathscr{P} = {\rm{Aut}}_{M_p/\Z_p}$, so this automorphism scheme is a semisimple 
%$\Z_p$-group.  We can apply this to $M_p = R_{\Z_p}$ for any $p$ since the quadratic lattice $(R, {\rm{N}})$
%has discriminant 1, so indeed ${\rm{Aut}}_{R_{\Z_p}/\Z_p}$ is semisimple over $\Z_p$ for all $p$.

\section{The construction of some non-split examples}\label{exsec}

The following result is derived in \cite[Prop.\:1.2]{G}
from work of Tits \cite{T}, and we shall explain how it is a consequence of Lemma \ref{innerR}.

\begin{proposition}\label{descend} If $G$ is the $\Q$-fiber of a semisimple $\Z$-group then every finite-dimensional
representation of $G_{\overline{\Q}}$ descends to a representation $V$ of $G$ over $\mathbf Q$. 
Moreover, if $V'$ is another $\Q$-descent of the same representation over $\overline{\Q}$ then $V' \simeq V$ as $G$-representations over $\Q$.

If $V_{\overline{\Q}}$ is irreducible and admits an invariant non-degenerate quadratic form 
then $V$ admits a $G$-invariant non-degenerate quadratic form, unique up to $\Q^{\times}$-scaling.
\end{proposition}

\begin{proof}
We can pass to the simply connected cover of $G$ so that $G$ is simply connected,
and for the existence aspect we may focus our attention on the descent of irreducible representations since
any finite-dimensional representation of a connected semisimple group over a field of characteristic 0
is completely reducible (as we see via semisimplicity of its Lie algebra). 

Let us prove uniqueness of the $\Q$-descent  up to isomorphism.  The set $\Hom_G(V,V')$
of $G$-equivariant linear homomorphisms is a finite-dimensional $\Q$-vector space, and its formation commutes
with any extension of the ground field. Viewing it as an affine space over $\Q$, 
the locus of isomorphisms is Zariski-open.  This open locus 
contains a $\overline{\Q}$-point (i.e., $V_{\overline{\Q}} \simeq V'_{\overline{\Q}}$),
so it is non-empty and hence contains a $\Q$-point.  This establishes the desired uniqueness. 

Likewise, a non-degenerate invariant quadratic form is equivalent to a symmetric equivariant isomorphism to the dual, so
in the absolutely irreducible case Schur's Lemma provides the $\Q$-descent for an invariant non-degenerate quadratic form (upon finding a $\Q$-descent for the representation)
and ensures its uniqueness up to $\Q^{\times}$-scaling.

Let $G_0$ be the split $\Q$-form of $G$.
The construction of highest-weight representations works for split semisimple Lie algebras over any field of characteristic 0,
so also for split simply connected semisimple groups over any field of characteristic 0.
Thus, any finite-dimensional irreducible representation $\rho$ of $(G_0)_{\overline{\Q}} = G_{\overline{\Q}}$
over $\overline{\Q}$ descends to
a representation $\rho_0: G_0 \rightarrow {\rm{GL}}(V_0)$ over $\Q$.

By Lemma \ref{innerR}, there is a 1-cocycle $c:{\rm{Gal}}(\overline{\Q}/\Q) \rightarrow G_0(\overline{\Q})$
that twists $G_0$ into $G$.  Composition of $c$ with $\rho_0$ defines a modified Galois descent datum on 
the $\overline{\Q}$-vector space $(V_0)_{\overline{\Q}}$.  Such a descent datum arises from a $\Q$-structure $V$ on $(V_0)_{\overline{\Q}}$,
so $\rho$ descends to a representation 
$G \rightarrow {\rm{GL}}(V)$  over $\Q$.
\end{proof}

The fact that all representations $(V,\rho)$ of $G$ over
$\overline{\Q}$ descend to $\Q$ suggests a method to construct semisimple integral models of $G$
(generally not $\Q$-split, or equivalently not $\RRR$-split):
for a faithful $\rho$ any lattice $M$ in $V$ defines a $\Z$-model ${\rm{GL}}(M)$ of ${\rm{GL}}(V)$,
and the Zariski closure of $G$ in ${\rm{GL}}(M)$ is a $\Z$-flat affine finite type $\Z$-group
with $\Q$-fiber $G$.  We can try to prove that this $\Z$-group is semisimple
(in particular, $\Z$-smooth with connected fibers). 


\begin{example}\label{G2ex}
For Cayley's 8-dimensional $\Q$-algebra $\mathbf{O}$ of definite octonions, 
the automorphism scheme $G = \Aut_{\mathbf{O}/\Q}$ is an $\RRR$-anisotropic connected semisimple $\Q$-group
of type ${\rm{G}}_2$ equipped with a faithful representation $G \hookrightarrow {\rm{GL}}(\mathbf{O})$.

Let $\mathscr{R}$ be Coxeter's integral octonions, a lattice 
in $\mathbf{O}$ that is a maximal order.
By Theorem \ref{octprop}, 
the automorphism scheme $\mathscr{G} = 
\Aut_{\mathscr{R}/\Z}$ is a semisimple $\Z$-group of type ${\rm{G}}_2$,
and its generic fiber is $G$. By construction, the $\Z$-flat $\mathscr{G}$ is a closed subscheme of
${\rm{GL}}(\mathscr{R})$. Thus,  $\mathscr{G}$ is
the Zariski closure of $G$ in ${\rm{GL}}(\mathscr{R})$
via the faithful representation of $G$ on $\mathbf{O} = \mathscr{R}_{\Q}$. 
\end{example}

 It is hard to analyze Zariski closures, so we
will usually build $\Z$-models
by a procedure that yields a closed subgroup scheme of ${\rm{GL}}(M)$ having
the correct $\Q$-fiber but  not {\em a priori} $\Z$-flat.  This often
 turns out to be the Zariski closure, as follows. 

We will find faithful representations
$G \rightarrow {\rm{GL}}(V)$ over $\Q$ such that 
the subgroup $G$ of $\GL(V)$ is defined by the preservation of some low-degree elements in the tensor algebra on $V$ and its dual. Some examples 
of this situation are the standard representations of the classical groups (using determinants, symplectic forms, and quadratic forms)
and the minuscule representations of the exceptional groups (cf.\:\cite{DG}).  If 
these tensors can be defined integrally on $M$ and are suitably non-degenerate on $M/pM$ for all primes $p$ then it is reasonable
to try to prove that the closed $\Z$-subgroup 
scheme $\mathscr{G}$ of automorphisms of $M$ preserving these integral tensors is a semisimple $\Z$-group (in which case 
by $\Z$-flatness $\mathscr{G}$ must coincide with the Zariski closure
in ${\rm{GL}}(M)$ of $\mathscr{G}_{\Q} = G \subset {\rm{GL}}(V)$). 

The case of ${\rm{G}}_2$ has already been addressed in Example \ref{G2ex}. To
 construct non-split simply connected semisimple $\Z$-groups of types
${\rm{E}}_6$ and ${\rm{F}}_4$
in this way, we will use a lattice $M$ in a representation $V$ of dimension
27 and the associated lattice ${\rm{End}}(M)$ of rank $27^2 = 729$. Verifying that $\Z$-groups 
built in this way are smooth with connected reductive fibers is 
a local problem, so Proposition \ref{G2aut} will reduce the problem to computations with 
the split octonion algebra $\Lambda$ over $\Z$ rather than with $\mathscr{R}$. 
(See \cite[(3.17) in \S2.3]{savin} for 
the use of ${\rm{E}}_6$-constructions with the Coxeter order $\mathscr{R}$ to build the non-split semisimple $\Z$-group
of type ${\rm{E}}_7$ via a 56-dimensional representation. The case of ${\rm{E}}_8$ is discussed in \cite[\S6]{G}
using a 248-dimensional representation.) 


% In the cases discussed below, this local problem can be solved by appealing to the work of Gan and Yu (\cite{GY}, \cite{GY2}), 
%who gave an explicit construction (via lattices) of the buildings of the simply connected groups of
% type ${\rm{G}}_2$, ${\rm{F}}_4$, and ${\rm{E}}_6$. (We don't need their results on buildings, just the construction
% of certain semisimple $\Z_p$-groups.)

%\begin{example}\label{D4ex}
%Following \cite[\S11]{GY}, we will now construct a model of a simply connected group $G$ of type ${\rm{D}}_4$ over $\mathbf Z$ which is 
%split at all finite primes and compact over $\mathbf R$.  (In the end this group
%will turn out to be ${\rm{Spin}}({\rm{E}}_8)$.)  Let $(V_i, q_i)$ be the three
%distinct irreducible orthogonal $8$-dimensional representations of $G$ provided by Proposition \ref{descend}.
%The underlying quadratic spaces $(V_i,q_i)$ over $\Q$ are all isomorphic to $\mathbf{O}$ equipped with its norm.
%Indeed, they are all $8$-dimensional quadratic spaces of discriminant $1$ and signature $(8,0)$ with the same Hasse--Witt invariants,
%so they are isomorphic over $\Q$ by the Hasse--Minkowski theorem \cite [Ch.\:III]{S2}.\footnote{The construction
%of $q_i$ by Galois descent entails a $\Q^{\times}$-scaling ambiguity, so unless more information is put into the construction 
%we cannot claim to identify the discriminant and the Hasse--Witt invariants. Might we need to state and prove
%a version of Proposition \ref{descend} over $\Z$, and invoke Remark \ref{spinZ}?}
%
%Choosing such $\Q$-isomorphisms, the representation of $G$ on $\oplus V_i$ becomes a faithful representation on $\mathbf{O}^3$
%whose image lands inside ${\rm{SO}}(\mathbf{O})^3$ and is equal to the $\Q$-subgroup
%$$\{ (a,b,c) \in \SO(\mathbf O)^3 \,|\,  \Tr(xyz) = \Tr(a(x) b(y) c(z))\}$$
%consisting of points of $\SO(\mathbf O)^3$ preserving the trilinear form $\Tr(xyz)$ on the direct sum
%(recall that multiplication in $\mathbf{O}$ 
%is trace-associative) \cite[\S42]{inv}.\footnote{No mention of the trilinear form in \S42; need more precise reference.}
%
%To obtain an integral model, we consider the stabilizer of the lattice $M = R^3$, where $R$ is the Coxeter order. We equip each copy of $R$ with its natural
%$\Z$-valued non-degenerate quadratic form ${\rm{N}}_R:R \rightarrow \Z$
%and use the integral trilinear form $\ell:R^3 \rightarrow \Z$ from (\ref{OL}) to define the $\Z$-subgroup scheme $\mathscr{G} \subset {\rm{SO}}({\rm{N}}_R)^3$ over $\Z$. 
%For example, $\mathscr{G}(\Z)$
%consists of the elements of ${\rm{SO}}(R)^3$ that preserve $\ell$, and $\mathscr{G}_{\Q} = G$.
%We have to prove that $\mathscr{G}$ is a semisimple $\Z$-group.
%
%Let $\Lambda$ be the split octonion algebra over $\Z$, equipped with its natural involution $x \mapsto x^{\ast}$
%that defines trace and norm maps to $\Z$. We modify the construction of $M = R^3$ by replacing 
%$R$ with $\Lambda$.  That is, we consider $\Lambda$ equipped with the quadratic
%form given by the norm ${\rm{N}}_{\Lambda}$, and 
%equip the lattice $M_0  = \Lambda^3$ with the trilinear form $\ell_0$
%given by ${\rm{Tr}}(a\cdot b \cdot c)$.  Define $\mathscr{G}_0 \subset {\rm{GL}}(M_0)$
%to be the closed $\Z$-subgroup scheme of ${\rm{SO}}({\rm{N}}_{\Lambda})^3$ preserving
%$\ell_0$.   We claim that $\mathscr{G}_0$
%is the simply connected Chevalley group ${\rm{Spin}}_8$ of type ${\rm{D}}_4$ over $\Z$. 
%
%The fiber of $\mathscr{G}_0$ at each point of ${\rm{Spec}}(\Z)$ is connected semisimple by the results over fields in 
%\cite[\S42]{inv}, and $(\mathscr{G}_0)_{\Q} \simeq {\rm{Spin}}_8$.\footnote{Need more precise 
%reference within \cite{inv}, and doesn't handle automorphism {\em scheme}.
%What we need on fibers is an a-priori homomorphism from ${\rm{Spin}}_8$ that is
%bijective on geometric points, to nail down the dimension and connectedness and structure of
%$\Q$-fiber, and then a way to control fibral smoothness in positive characteristic.}
%Hence, $\mathscr{G}_0$ is flat over $\Z$ by \cite[Prop.\:6.1]{GY}, so 
%$\mathscr{G}_0$ is a semisimple $\Z$-group of type ${\rm{D}}_4$. By Remark \ref{spinZ},
%$\mathscr{G}_0$ must be the spin group of a rank-8 even unimodular lattice.  
%But $(\mathscr{G}_0)_{\Q} = {\rm{Spin}}_8$, so 
%$\mathscr{G}_0 = {\rm{Spin}}_8$ over $\Z$
%by Proposition \ref{splitchev}.
%
%Since we have seen that $R_{\Z_p} \simeq \Lambda_{\Z_p}$ as $\Z_p$-algebras with anti-involution for 
%all primes $p$,
%it follows that the associated $\Z_p$-group schemes $(\mathscr{G}_0)_{\Z_p}$ and $\mathscr{G}_{\Z_p}$ are isomorphic for all primes $p$.
%Hence, $\mathscr{G}$ is a semisimple $\Z$-group.  
%In fact, by Proposition \ref{Rinj} the compactness of $\mathscr{G}(\R)$ forces
%$\mathscr{G}_{\Q} \simeq {\rm{Spin}}({\rm{E}}_8)$ over $\Q$.  
%
%This can be strengthened:
%$\mathscr{G} \simeq {\rm{Spin}}({\rm{E}}_8)$ over $\Z$, due to a mass
%formula for $\Z$-models which establishes uniqueness of the $\Z$-model of ${\rm{Spin}}({\rm{E}}_8)_{\Q}$,
%as we will see in Example \ref{D4exunique}.  Alternatively, one can obtain this $\Z$-isomorphism from the classical
%Minkowski--Siegel mass formula, as follows. By Remark \ref{spinZ}, 
%$\mathscr{G} = {\rm{Spin}}(q)$ for a rank-8 even unimodular lattice $(M,q)$
%that is definite (since $\mathscr{G}(\R)$ is compact). 
%By the Minkowski--Siegel mass formula, the only such quadratic lattices are ${\rm{E}}_8$ and its
%negative-definite variant, but these have the same spin group, so indeed $\mathscr{G} = {\rm{Spin}}({\rm{E}}_8)$.
%\end{example}

We first treat the case of the unique non-split simply connected 
$\Q$-group of type ${\rm{E}}_6$ that admits a $\Z$-model; this has $\RRR$-rank equal to 2 (see \cite[Table 1.3]{G}).
The construction rests on the notion of an {\em Albert algebra}, so let us recall the definition.

For a field $k$  with characteristic $\ne 2, 3$, consider a commutative but not necessarily associative $k$-algebra 
$C$ with multiplication $\circ$ having a 
2-sided identity $e$.  We say that $C$ is a {\em $J$-algebra}
if it is equipped with a non-degenerate quadratic form $q:C \rightarrow k$ satisfying three properties: 
$q(e) = 3/2$, $q(x \circ x) = q(x)^2$ when $B_q(x,e)=0$, and $B_q(x \circ y,z) = B_q(x,y \circ z)$ for all $x, y, z \in C$.
Such a triple $(C, \circ, q)$ is called {\em reduced} if it contains a nontrivial idempotent (i.e., 
there exists $x \in C - \{0, e\}$ satisfying 
$x \circ x = x$). 
The quadratic form $q$ on $C$ gives rise to a cubic form $\Det \in {\rm{Sym}}^3(C^{\ast})$
via inspection of the constant term of
an analogue of the Cayley--Hamilton theorem \cite[Prop.\:5.1.5]{sv}. An explicit formula for this cubic form is
\begin{equation}\label{detdef}
\Det(x) = B_q(x \circ x, x)/3 - q(x) B_q(x,e)+ B_q(x,e)^3/6.
\end{equation}

Informally, reduced $J$-algebras fall into two classes: those that can be constructed in a simple way from finite-dimensional 
non-degenerate quadratic spaces over $k$, and those that are 
built using $3 \times 3$ matrices over composition algebras over $k$.  (See \cite[Thm.\:5.4.5]{sv}.)   
Members of the latter class
can have dimension 6, 9, 15, or 27, and 
are precisely the reduced $J$-algebras for which the cubic form $\Det$ is absolutely irreducible over $k$ \cite[Cor.\:5.4.6]{sv}.

The 27-dimensional examples of this type arise from octonion algebras over $k$
and are called {\em Albert algebras} (or {\em exceptional Jordan algebras}).
We will focus on Albert algebras over $\Q$ and finite fields.
    The reason for our interest in Albert algebras is that automorphisms preserving 
    their associated tensors give rise to simply connected groups of types ${\rm{E}}_6$ 
    and ${\rm{F}}_4$  over fields with characteristic not 2 or 3.
    

\begin{remark}\label{detOK} By \cite[5.3.10]{sv}, automorphisms of an Albert algebra
(i.e., linear automorphisms of the underlying vector space preserving the multiplication) preserve the quadratic
form $q$ and hence also preserve the cubic form $\Det$. There is a converse: 
the algebra automorphisms are precisely the linear automorphisms that preserve the identity $e$ and the cubic form
\cite[5.9.4]{sv}. 
\end{remark}

Consider the 27-dimensional $\Q$-vector 
space $V$ of $3 \times 3$ Hermitian matrices over $\mathbf O$:
\begin{equation}\label{Aform}
A = \begin{pmatrix}
a & z & y^* \\
z^* & b & x \\
y & x^* & c
\end{pmatrix}
\end{equation}
(The Hermitian condition implies that $a, b, c \in \mathbf{Q}$.)
  This has a 
 commutative non-associative multiplication defined by $A \circ A' := (1/2)(AA' + A'A)$
 (where $AA'$ and $A'A$ denote the usual product of octonionic matrices), with 2-sided identity element $e$ 
given by  the standard matrix identity element. 
Equipping $V$ with the non-degenerate quadratic form 
 $$Q(A) = {\rm{Tr}}(A \circ A)/2 = (1/2)(a^2 + b^2 + c^2) + {\rm{N}}(x) + {\rm{N}}(y) + {\rm{N}}(z),$$
this satisfies the axioms to be a $J$-algebra.
 
 For diagonal $A, A' \in V$, clearly $A \circ A'$ is the usual matrix product. Hence, $V$ contains nontrivial idempotents, so 
it is a reduced $J$-algebra.  It is in fact an Albert algebra, denoted $H(\mathbf{O}; 1,1,1)$ in the notation of 
\cite[\S5.1]{sv}, and by 
\cite[(5.11)]{sv} the cubic form is:
\begin{equation}\label{detform}
\Det(A) = abc + \Tr(xyz) - a \cdot {\rm{N}}(x) - b\cdot {\rm{N}}(y) - c\cdot {\rm{N}}(z).
\end{equation}
    
   \begin{example}\label{E6ex}
   For the space $V$ of matrices as in (\ref{Aform}), 
 consider the $\Q$-group $G := {\rm{Aut}}_{(V,\Det)/\Q}$ of points of ${\rm{GL}}(V)$ preserving the cubic form $\Det$ 
 (but not necessarily the identity).  This  is 
 a connected semisimple group that is simply connected of type ${\rm{E}}_6$, by \cite[7.3.2]{sv}.
 The same holds for any Albert algebra over any field of characteristic $\ne 2, 3$
 in place of $(V,Q)$ over $\Q$. 
 
 We claim that $G_{\RRR}$ is not split.  
Note that $H := {\rm{Aut}}_{\mathbf{O}/\Q}$ is
a $\Q$-subgroup of $G$ via
$$(a,b,c,x,y,z) \mapsto (a,b,c, h(x), h(y), h(z))$$
for $h \in H$, and $H_{\RRR}$ is the anisotropic $\RRR$-form of ${\rm{G}}_2$.  
The maximal compact subgroups of the group of $\RRR$-points of a split $\RRR$-group of type ${\rm{E}}_6$
is of type ${\rm{C}}_4$ \cite[C.4]{knapp}.   Thus, if $G_{\RRR}$ is split
then the connected compact subgroup $H(\RRR)$ of type ${\rm{G}}_2$ is contained in 
a maximal connected compact group of type ${\rm{C}}_4$.  In view of the categorical equivalence between the categories of 
connected compact Lie groups and $\RRR$-anisotropic connected reductive $\RRR$-groups,
to show that $G_{\RRR}$ is not split
it suffices to show that the anisotropic $\RRR$-form of ${\rm{G}}_2$ has no nontrivial $\RRR$-homomorphism
to the anisotropic $\RRR$-form of ${\rm{Sp}}_8^{\rm{ad}}$.
Hence, it suffices to show that 
 there is no nontrivial $\C$-homomorphism from
${\rm{G}}_2$  to ${\rm{Sp}}_8^{\rm{ad}}$.
Such a map lifts to a nontrivial homomorphism from 
the simply connected ${\rm{G}}_2$ into the simply connected central
cover ${\rm{Sp}}_8$.  But over $\C$ there is only one nontrivial 8-dimensional representation of ${\rm{G}}_2$, and it
has no invariant symplectic form.  Hence, $G_{\RRR}$ is not split.
 \end{example}
 
 To extend the $\Q$-group $G$ in Example \ref{E6ex} to a semisimple $\Z$-group, we introduce an integral structure 
 on $V$ relative to which the cubic form is integral. 
 Let $M \subset V$ be the lattice of matrices $A$ as in (\ref{Aform}) for which $a,b,c \in \mathbf Z$ and $x,y,z \in \mathscr{R}$. 
In an evident manner, $M_{\Z[1/6]}$ equipped with the quadratic form $Q|_M$ over $\Z[1/6]$
is an ``Albert algebra over $\Z[1/6]$'' for which
the associated cubic form arises from the integral cubic form $\Det:M \rightarrow \Z$ obtained by
the restriction of $\Det:V \rightarrow \Q$. 
Let 
\begin{equation}\label{GE6}
\mathscr{G} = {\rm{Aut}}_{(M, \Det)/\Z}
\end{equation} be the closed $\Z$-subgroup of ${\rm{GL}}(M)$
defined by preservation of the cubic form.  This is an affine finite type $\Z$-group with $\Q$-fiber $G$.


\begin{proposition}\label{E6prop} The $\Z$-group $\mathscr{G}$ is semisimple $($so $\Z$-smooth with connected 
semisimple fibers$)$ and simply connected of type ${\rm{E}}_6$.
\end{proposition}

\begin{proof}
Since the $\Q$-fiber is known to be a connected semisimple $\Q$-group that is simply connected of type ${\rm{E}}_6$,
by the $\Z$-flatness criterion in Lemma \ref{flatlemma} it suffices
to show that  $\mathscr{G}_{\mathbf{F}_p}$
is connected reductive for every prime $p$.  For $p \ne 2, 3$, 
$M/pM$ equipped with the quadratic form $Q_{\mathbf{F}_p}$ is an Albert algebra whose cubic form is $\Det_{\mathbf{F}_p}$.
Thus, by \cite[7.3.2]{sv}, if $p \ne 2, 3$ then $\mathscr{G}_{\mathbf{F}_p} = \Aut_{(M/pM, \Det_{\mathbf{F}_p})/\mathbf{F}_p}$
is connected semisimple and simply connected
of type ${\rm{E}}_6$ (smoothness is shown in step (e) of the proof of \cite[7.3.2]{sv}).
It follows that $\mathscr{G}_{\Z[1/6]}$ is a simply connected semisimple $\Z[1/6]$-group of type ${\rm{E}}_6$.

The theory of Albert algebras is delicate in characteristics 2 and 3, so we now give 
an alternative approach that  applies to all primes on an equal footing.
Since 
$\mathscr{R}_{\Z_p} \simeq \Lambda_{\Z_p}$ as octonion algebras for all $p$ (Proposition \ref{G2aut}), our
problem over $\Z$ is equivalent to one in which the split octonion algebra $\Lambda$ replace the role of 
$\mathscr{R}$.  To be precise, we define a lattice $M_0$ of $3 \times 3$ Hermitian matrices over
$\Lambda$ similarly to $M$ over $\mathscr{R}$, and we
equip $M_0$ with the integral cubic form $\delta$ that is 
defined similarly to the formula in (\ref{detform}),
using the trace and norm on $\Lambda$.
The $\Z$-group  scheme
\begin{equation}\label{g0def}
\mathscr{G}_0 = \Aut_{(M_0, \delta)/\Z}
\end{equation}
 becomes isomorphic to $\mathscr{G}$ over $\Z_p$
for every $p$, so our task is equivalent to the assertion that $\mathscr{G}_0$ is reductive
over $\Z$ (necessarily simply connected and semisimple
of type ${\rm{E}}_6$, in view of our knowledge of the geometric fiber in characteristic 0). 
We will prove that $\mathscr{G}_0$
is the simply connected 
Chevalley group of type ${\rm{E}}_6$. 

The data $(M_0, \delta, e)$ that underlies the definition of $\mathscr{G}_0$ is a pointed
finite free module of rank 27 equipped with a cubic form. This is 
 the {\em Freudenthal model} for exceptional Jordan algebras.  We will work with
the {\em Tits model}:  the triple $(\underline{M}_0, \underline{\delta}, \underline{e})$ where
$\underline{M}_0 := {\rm{Mat}}_3(\Z)^{\oplus 3}$, 
\begin{equation}\label{newdelta}
\underline{\delta}(u,v,w) := \Det(u) + \Det(v) + \Det(w) - {\rm{Tr}}(uvw)
\end{equation}
for $u, v, w \in {\rm{Mat}}_3$, and $\underline{e} := (1,0,0)$.  
A $\Z$-linear isomorphism
$M_0 \simeq \underline{M}_0$ carrying $(\delta,e)$ to $(\underline{\delta}, \underline{e})$ is given
in \cite[\S2]{GY2}, so $\mathscr{G}_0$ is thereby identified with the closed $\Z$-subgroup of
$\underline{\mathscr{G}}_0 \subset {\rm{GL}}(\underline{M}_0) = {\rm{GL}}_{27}$ 
defined by preservation of $\underline{\delta}$.  (This closed
$\Z$-subgroup is denoted $\underline{H}$ in \cite[\S3]{GY2}.) 
The proof that the affine finite type $\Z$-group $\underline{\mathscr{G}}_0$ is semisimple 
is technical, 
so we refer the reader to Appendix \ref{E6app} for the details
(where a maximal $\Z$-torus is also given). 
\end{proof}

A refinement of the preceding construction will yield groups of type ${\rm{F}}_4$. 
The motivation comes from the theory of Albert algebras: over any field not
of characteristic 2 or 3, the automorphism scheme of an Albert algebra (i.e., the scheme classifying linear automorphisms
that preserve the multiplicative structure, without any assumption
concerning preservation of the quadratic form) is connected
semisimple of type ${\rm{F}}_4$ \cite[7.2.1]{sv}.  The smoothness of this automorphism scheme
implies (by consideration of its field-valued points and Remark \ref{detOK}) that the automorphism scheme
preserves the quadratic and cubic forms associated to the Albert algebra. 

As a particular case, the automorphism scheme ${\rm{Aut}}_{(V, \circ)/\Q}$ of the multiplicative structure
on the Albert algebra $(V, \circ,Q)$
   is a connected semisimple $\Q$-group of
   type ${\rm{F}}_4$.  To construct different forms of ${\rm{F}}_4$ inside a common
   form of ${\rm{E}}_6$, we will use 
   varying Albert algebra structures $(\circ', Q')$ 
   on the same 27-dimensional vector space such that the associated cubic forms as in 
   (\ref{detdef}) coincide.
   
     There is an alternative description of the $\Q$-group $\Aut_{(V,\circ)/\Q}$ that is more convenient
   for the construction of $\Q$-forms of ${\rm{F}}_4$
   admitting an integral model.  The key point is that over any field of characteristic not 2 or 3, 
    the automorphisms of the multiplicative structure of an Albert algebra coincide with the linear automorphisms of
   its underlying vector space that preserve both the cubic form {\em and}
   the identity element \cite[5.9.4]{sv}.  This leads us to consider 
the  closed $\Q$-subgroup scheme ${\rm{Aut}}_{(V,\Det,e)/\Q} \subset {\rm{GL}}(V)$
   defined by preservation of the cubic form $\Det$ and the identity $e$.
   This is the $e$-stabilizer under the action on $\{\Det = 1\}$ by the group $G := \Aut_{(V,\Det)/\Q}$. 
   
   The closed subgroup schemes $\Aut_{(V,\Det,e)/\Q}$ and 
   ${\rm{Aut}}_{(V,\circ)/\Q}$ inside ${\rm{GL}}(V)$ are both smooth (due to being $\Q$-subgroups, so Cartier's theorem applies) and
   they have the same geometric points, so they coincide. 
   In particular,  ${\rm{Aut}}_{(V,\Det,e)/\Q}$ is connected semisimple of type ${\rm{F}}_4$.  
   The triple $(V,\Det,e)$ has a natural integral structure $(M, \Det, e)$, whereas 
   the Albert algebra structure $(\circ, Q)$ is harder to work with integrally beyond $\Z[1/6]$.
   
   We will be interested in studying the automorphism scheme of $(M, \Det, e)$, as well as of
   $(M, \Det, E)$ for any $E \in M$ satisfying $\Det(M)=1$.  To explain the motivation for introducing
   varying $E$, we recall that there is a general construction (described in \cite[5.9.2]{sv}) which takes as input
an Albert algebra and an arbitrary element $e'$ of the underlying vector
space at which the cubic form has value 1 and produces a new quadratic
form $q_{e'}$ and a new multiplication law $\circ_{e'}$ constituting a new Albert algebra structure
on the same underlying vector space 
such that the identity element for $\circ_{e'}$ is $e'$ and the cubic form built from $q_{e'}$ and $\circ_{e'}$
as in (\ref{detdef}) coincides with the initial one.
Hence, for any $e' \in V$ satisfying $\Det(e')=1$, 
the $e'$-stabilizer $\Aut_{(V,\Det,e')/\Q} \subset {\rm{GL}}(V)$ equals $\Aut_{(V, \circ_{e'})/\Q}$
and hence is also a $\Q$-form of ${\rm{F}}_4$. 

The $\Z$-group scheme 
$\mathscr{G} := \Aut_{(M,\Det)/\Z}$ is a (semisimple) $\Z$-model of $G$ by Proposition \ref{E6prop}, and 
non-split semisimple $\Z$-groups of type ${\rm{F}}_4$ will be constructed 
as stabilizer schemes 
%The motivation for considering stabilizers of {\em varying} $E$ is a construction which changes the multiplication
%law on Albert algebras to move the identity element, so in effect the automorphism scheme of
%$(M, \det, E)$ corresponds to the automorphism scheme of another Albert algebra structure on $M$.
%Let us first explain that construction in our situation. 
%
%Let $k$ be a field of characteristic $\ne 2, 3$, and choose $E_k \in M_k$ satisfying $\det(E_k)=1$.
%We shall now construct 
%a new multiplication law on $M_k$ that makes it into an Albert algebra with identity $E_k$
%and the same cubic form $\det$ but with a different non-degenerate quadratic form.
%We first define the modified quadratic form $Q_{E_k}$
%on $M_k$, as this is used to define the new multiplication structure
%with identity $E_k$.  On $M$ we have a trilinear form 
%$$\langle u, v, w \rangle = \det(u+v+w) - \det(u+v) - \det(u+w) - \det(v+w) + \det(u) + \det(v) + \det(w),$$
%and on $M_k$ we use it to define the quadratic form 
%$$Q_{E_k}(A) = -(1/12)\langle A, A, e \rangle + (1/18) \langle A, E_k, E_k \rangle^2.$$
%
%There is a bilinear {\em cross product} on $M_k$  characterized by 
% $$\langle A \times A', A'' \rangle_{Q_k} = 3 \langle A, A', A'' \rangle$$
% (using the bilinear form $\langle \cdot, \cdot \rangle_{Q_k}$ 
% associated to the quadratic form $Q_k$ in the initial Albert algebra structure), and  
% the new multiplication law on $M_k$ is defined to be
%$$A \circ_{E_k} A' = 4(A \times E_k) \times (A' \times E_k) + (1/2)(\langle A, A' \rangle_{Q_{E_k}} -
%\langle A, E_k \rangle_{Q_{E_k}} \langle A', E_k \rangle_{Q_{E_k}})E_k.$$
%By \cite[5.9.2]{sv}, this is an Albert algebra structure on $M_k$ equipped
%with the quadratic form $Q_{E_k}$ and it has 2-sided identity $E_k$
%and associated cubic form (defined in terms of $Q_{E_k}$) equal to the original $\det_k$
%(precisely because $\det(E_k)=1$).  
%
%The $k$-linear automorphisms of $M_k$ preserving $E_k$ and the  cubic form $\det_k$
%are precisely the automorphisms of the multiplicative structure $\circ_{E_k}$ on $M_k$
%\cite[5.9.4]{sv}.  Of course, this also holds after
%any ground field extension.  By \cite[7.2.1]{sv}, the automorphism scheme of $(M_k, \circ_{E_k})$ is 
%smooth, and in fact it is connected semisimple of type ${\rm{F}}_4$. 
%Since this automorphism scheme is smooth, we can see that its action on $M_k$ preserves the
%cubic form $\det_k$ by checking on geometric points, where it follows from the fact
%that any automorphism of an Albert algebra over any field preserves the cubic form (as noted in 
%Remark \ref{detOK}).  This provides an inclusion 
%$$\Aut_{(M_k, \circ_{E_k})/k} \subset \Aut_{(M_k, \det_k, E_k)/k}$$
%inside ${\rm{GL}}(M_k)$ that is an equality on geometric points (apply Remark \ref{detOK} over
%an algebraically closed field). 
$$\mathscr{H}_E := \Aut_{(M,\Det,E)/\Z} = {\rm{Stab}}_{\mathscr{G}}(E) \subset \mathscr{G} \subset {\rm{GL}}(M)$$
for varying $E \in M$ such that $\Det(E)=1$.
Informally, $\mathscr{H}_E$ is the automorphism scheme of an Albert algebra structure on $M$
with identity $E$, but we have not defined a notion of Albert algebra when $6$ is
not a unit in the base ring.  (See \cite[\S2--\S3]{GY2} for
a discussion of quadratic Jordan algebras over $\Z$.) 

\begin{proposition}\label{F4good}
For $E \in M \cap \{\Det=1\}$, the $\Z$-group $\mathscr{H}_E$ is semisimple of type ${\rm{F}}_4$.
\end{proposition}

\begin{proof} 
As in the proof of Proposition \ref{E6prop}, it suffices to check that for all primes $p$, 
$(\mathscr{H}_E)_{\mathbf{F}_p}$ is connected reductive with dimension independent of $p$ (namely, 52).
Using the isomorphism $\mathscr{R}_{\Z_p} \simeq \Lambda_{\Z_p}$,
we may reduce to working with $\Lambda_{\Z_p}$ in the role of $\mathscr{R}_{\Z_p}$
for some $E_{0,p} \in (M_0)_{\Z_p}$ that might not arise from $M_0$.
By working over  algebraically closed fields $k$
of positive characterstic, our problem can be expressed in terms $\Lambda_k$, $(M_0)_k$,
and some $E_{0,k} \in (M_0)_k$ on which the cubic form $\delta$ has value equal to 1.

For $\mathscr{G}_0$ as in (\ref{g0def}), the action of $\mathscr{G}_0(k)$ 
on the hypersurface $\{\delta = 1\} \subset (M_0)_k$ is transitive.  (Such transitivity is proved for
$\mathscr{G}_0(\Z)$ acting on the locus $\{\delta = 1\}$ inside $M_0$ as the main result
in \cite{Kru}, and the proof via row and column operations carries over with $\Z$ replaced by any field.)
Thus, as $E_{0,k}$ varies inside $(M_0)_k$ with $\delta(E_{0,k})=1$, the stabilizer schemes
$\mathscr{H}_{E_{0,k}}$ are conjugate inside $(\mathscr{G}_0)_k$, so it suffices to work with 
$E_{0,k}$ arising from a single choice of $E_0 \in M_0$ for which $\delta(E_0)=1$.
We choose $E_0$ corresponding to the identity matrix.

Switching from the Freudenthal model to the Tits model (as in the proof
of Proposition \ref{E6prop}), we shall work with $\underline{E}_0 = (1,0,0) \in \underline{M}_0$
and its scheme-theoretic stabilizer 
$$\underline{\mathscr{H}}_{\underline{E}_0} \subset \underline{\mathscr{G}}_0 \subset {\rm{GL}}(\underline{M}_0).$$
The cotangent space at $\underline{E}_0$ to the $\Z$-flat hypersurface 
$\{\underline{\delta}=1\}$ in the affine space of $\underline{M}_0$ is the quotient of 
$\underline{M}_0^{\ast}$ modulo the span of an
explicit 
$\Z$-linear form.  By computation (see \cite{jk}), this is a saturated $\Z$-submodule,
so the $\Z$-flat $\{\underline{\delta}=1\}$ is $\Z$-smooth near $\underline{E}_0$ 
and hence is $\Z$-smooth everywhere due to the fiberwise
transitive action by $\underline{\mathscr{G}}_0$.

By computation (see \cite{jk}), 
the surjective $\underline{E}_0$-orbit map $\underline{\mathscr{G}}_0 \rightarrow \{\underline{\delta}=1\}$ 
between smooth $\Z$-schemes 
is surjective between tangent spaces over $\Z$ 
at the identity and $\underline{E}_0$, so the stabilizer scheme $\underline{\mathscr{H}}_{\underline{E}_0}$ is $\Z$-smooth
with relative dimension $78 - 26 = 52$. 
The generic fiber of $\underline{\mathscr{H}}_{\underline{E}_0}$ is connected semisimple (by the relation with
automorphism schemes of Albert algebras, using $\Lambda_{\Q}$ in place of $\mathbf{O}$), 
so by \cite[Prop.\:3.1.12]{C} the fibers of $\underline{\mathscr{H}}_{\underline{E}_0} \rightarrow \Spec(\Z)$ are connected
provided that their identity components are reductive.  Hence, it suffices
to show that $(\underline{\mathscr{H}}_{\underline{E}_0})_{\mathbf{F}_p}^0$ is reductive for all $p$
(so unlike the arguments for type ${\rm{E}}_6$ in Appendix \ref{E6app},
for the ${\rm{F}}_4$-cases we do not have to directly prove connectedness
of fibers in positive characteristic).

As in \cite[\S3]{GY2}, 
an explicit $\Z$-subgroup 
\begin{equation}\label{moregy}
({\rm{SL}}_3)^2/\mu' \hookrightarrow \underline{\mathscr{H}}_{\underline{E}_0} 
\subset \underline{\mathscr{G}}_0
\end{equation}
(with $\mu'$ the diagonally embedded $\mu_3$) 
 is defined by pre-composing the closed $\Z$-subgroup inclusion
(\ref{gyu}) with $(g_1, g_2) \mapsto (g_1, g_2, g_2)$. The
 image under (\ref{moregy}) of the direct product of the diagonal tori in the ${\rm{SL}}_3$'s 
is a closed split $\Z$-subtorus $\underline{\mathscr{S}} \subset \underline{\mathscr{H}}_{\underline{E}_0}$
 of rank 4, so its $\Q$-fiber is a split maximal $\Q$-torus in $(\underline{\mathscr{H}}_{\underline{E}_0})_{\Q}$. 
 
 The geometric connectedness of the $\Q$-fiber of $\underline{\mathscr{H}}_{\underline{E}_0}$
 implies that of the $\mathbf{F}_p$-fibers for all but finitely many $p$, so the union of
 the fibral identity components of $\underline{\mathscr{H}}_{\underline{E}_0}$
 is an open $\Z$-subgroup scheme
 $\underline{\mathscr{H}}^0_{\underline{E}_0}$; this is $\Z$-smooth but possibly not affine.
 
 Let $\mathfrak{h} = {\rm{Lie}}(\underline{\mathscr{H}}_{\underline{E}_0}) = 
 {\rm{Lie}}(\underline{\mathscr{H}}^0_{\underline{E}_0})$,
  and let
$\Psi$ be the root system for $(\underline{\mathscr{H}}_{\underline{E}_0})_{\Q}$ with respect to $\underline{\mathscr{S}}_{\Q}$.
Let $I'$ be the union of the bases of the root systems for the ${\rm{SL}}_3$'s in (\ref{moregy}) 
relative to their diagonal tori and upper unipotent subgroups. The set $I'$ 
lies in a unique positive system of roots
$\Psi^{+} \subset \Psi$, 
and consists of the non-central vertices of the extended Dynkin diagram
for the ${\rm{F}}_4$ root system $\Psi$ (with respect to $\Psi^+$). 
The central vertex of the extended diagram 
is the long simple positive root $a_0$ that is adjacent to a short simple positive root. 

A computation (see \cite{jk}) shows that for
 $\Z$-basis elements $X_{\pm}$ of $\mathfrak{h}_{\pm a_0} \subset \mathfrak{gl}(\underline{M}_0)$,
$$[X_{+}, X_{-}] = \pm {\rm{Lie}}(a_0^{\vee}(\partial_t|_{t=1})),$$ 
an element of ${\rm{Lie}}(\underline{\mathscr{S}})$ that is part of a $\Z$-basis
since no coroots are divisible in the dual of the root lattice for type ${\rm{F}}_4$. 
Hence, $[\mathfrak{h}_{a_0}, \mathfrak{h}_{-a_0}]$ is a saturated $\Z$-line in $\mathfrak{h}$, so
we can argue as in the proof of Theorem \ref{titsthm} (especially applying Lemma \ref{rootmagic}
to $(\underline{\mathscr{H}}^0_{\underline{E}_0}, \underline{\mathscr{S}})$) to conclude 
 that $(\underline{\mathscr{H}}_{\underline{E}_0})_{\mathbf{F}_p}^0$ is semisimple of type
 ${\rm{F}}_4$ for every $p$. 
\end{proof}

\begin{example}\label{firstF4}
Consider the semisimple $\Z$-groups $\mathscr{H}_E$ of type ${\rm{F}}_4$ for the following $E \in M$
satisfying $\Det(E)=1$:
$$ \begin{pmatrix}
0 & 0 & 1 \\
0 & -1 & 0 \\
1 & 0 & 0
 \end{pmatrix},\,\,\,
 \begin{pmatrix}
1 & 0 & 0 \\
0 & 1 & 0 \\
0 & 0 & 1
 \end{pmatrix},\,\,\,
 \begin{pmatrix}
2 & \alpha & -1 \\
\alpha^* & 2 & \alpha \\
-1 & \alpha^* & 2
 \end{pmatrix}$$
 where $\alpha$ is defined in
 (\ref{alpha}) and $\alpha^2 - \alpha + 2 = 0$.
  
 To determine the $\RRR$-rank for each of these, recall that the possible $\RRR$-ranks for
 type ${\rm{F}}_4$ are 0, 1, and 4.  Since $\mathscr{H}_E$ is contained
in the $\Z$-group $\mathscr{G}$ in (\ref{GE6}) whose $\Q$-fiber $G$ has $\RRR$-rank 2, the $\RRR$-rank 
of $\mathscr{H}_E$ is either 0 or 1.  
 The case of rank 0 (i.e., compact group of $\RRR$-points) occurs
  precisely when $E$ is in the cone of matrices that are {\em positive-definite} (in the sense that diagonal entries are positive and
 $2 \times 2$ Hermitian minors obtained by removing the $i$th row and column
 for $i = 1, 2, 3$ have evident ``determinant'' in $\RRR$ that is positive).

Consequently, among the above three matrices, the  stabilizer of the first gives a $\Z$-model for a $\Q$-form of 
 ${\rm{F}}_4$ with $\RRR$-rank $1$ whereas the stabilizers of the other two are 
 $\RRR$-anistotropic semisimple $\Z$-groups
of type ${\rm{F}}_4$.  In particular, these latter two examples have isomorphic
$\Q$-fibers.  We will revisit these $\RRR$-anisotropic cases in Example \ref{F4ex}.
\end{example}

\section{Counting the integral models}\label{countsec}

Now we prove that the models of the simply connected groups of types ${\rm{G}}_2$, ${\rm{F}}_4$, and ${\rm{E}}_6$ 
 constructed in \S\ref{exsec} exhaust the possible non-split forms of these groups over $\mathbf Z$. 

First consider the case of ${\rm{E}}_6$,  for which
the only non-split simply connected $\RRR$-form that arises from a simply connected semisimple
$\Z$-form is the one with
$\RRR$-rank $2$. This $\RRR$-form arises from the simply connected semisimple $\Z$-group $\mathscr{G}$
in (\ref{GE6}), and we claim that $\mathscr{G}$ is the only such $\Z$-group,
up to isomorphism. In view of the $\RRR$-isotropicity, such uniqueness over $\Z$
can be deduced from the theorem of 
strong approximation \cite[\S7.4, Thm.\,7.12]{PR} by a simpler version of the arguments
in Appendix \ref{genustheory} for indefinite spin groups. (The key input needed
over $\RRR$ is that the simply connected $\RRR$-form $G$ of ${\rm{E}}_6$ with $\RRR$-rank 2 admits an automorphism not
arising from $G^{\rm{ad}}(\RRR)$. This can be built using ``conjugate-transpose'' on matrices $A$ as in (\ref{Aform}).)
The uniqueness in the non-split $\RRR$-isotropic ${\rm{F}}_4$-case (with $\RRR$-rank 1) goes in exactly the same way,
and is even easier since the outer automorphism group for ${\rm{F}}_4$ is trivial (and similarly one sees that the
non-split $\RRR$-isotropic cases ${\rm{E}}_7$ and ${\rm{E}}_8$ cases, which must have
 respective $\RRR$-ranks  3 and 4, are unique over $\Z$).

 In the other cases, the only non-split $\RRR$-form  that occurs is the $\RRR$-anisotropic one, for which 
there is a uniquely determined possibility for the generic fiber $G$ over $\Q$ (see Proposition \ref{Rinj}).
The types that arise are listed in Table 1; for types B and D this uses 
that there exists a rank-$n$ definite quadratic lattice that is non-degenerate over $\Z$ if and only if
$n \equiv 0, \pm 1 \bmod 8$.  The only types that arise for which ${\rm{Out}}_{G/\Q} \ne 1$
are ${\rm{D}}_{4m}$.
Our task is to enumerate the semisimple $\Z$-groups with $\Q$-fiber isomorphic to a given
$G$, and to do this we will use the mass formula 
\begin{equation}\label{mass}
\sum {\frac{1}{\#\mathscr{G}_i(\mathbf Z)}} = \prod {\frac{1}{2}\zeta(1 - d_j)}
\end{equation}
as stated in \cite[(5.1)]{G}.

\begin{remark}\label{D4rem} Let us explain the meaning of the terms on the two sides of (\ref{mass}).
The sum on the left in (\ref{mass}) is taken over the elements of the finite set
$$G(\Q) \backslash G(\Q \otimes_{\Z} \widehat{\Z}) / \mathscr{G}(\widehat{\Z})$$
where $\mathscr{G}$ is a choice of $\Z$-model of $G$.  
A representative $g_i$ of a double coset yields a $\Z$-model
 $\mathscr{G}_i$ with 
$\mathscr{G}_i(\mathbf Z) = G(\Q) \cap g_i\mathscr{G}(\widehat{\Z})g_i^{-1}$ the corresponding finite group
(see \cite[Prop.\:1.4]{G2}).

If ${\rm{Out}}_{G/\Q} = 1$ (i.e., $G$ is not of type ${\rm{D}}_{4m}$) then 
these integral models are pairwise non-isomorphic as $\Z$-groups and exhaust the set of semisimple
$\Z$-groups with generic fiber isomorphic to $G$ \cite[Prop.\:2.1, 2.3]{G2}. 
For $G$ of type ${\rm{D}}_{4m}$, the collection remains exhaustive but 
there is a repetition of the isomorphism class of the $\Z$-group ${\rm{Spin}}(q)$ associated to the 
even unimodular lattice $(M,q)$ of rank $8m$ precisely when ${\rm{O}}(q)(\Z) = {\rm{SO}}(q)(\Z)$,
in which case this isomorphism class occurs twice \cite[Prop.\:2.5]{G2}. 
(The discussion of the left side of (\ref{mass}) in \cite{G} has some errors.)

The product on the right side of (\ref{mass}) is taken 
over the degrees $d_j$ of the invariant polynomials for the Weyl group of a maximal torus in $G$ acting on its reflection representation. For
the $\RRR$-anisotropic absolutely simple semisimple $\Q$-groups admitting $\Z$-models, these degrees are given in Table 1. (For type
${\rm{D}}_{4m}$, the final degree invariant is a repetition of $4m$.)
\end{remark}

\begin{table}
\centering
\begin{tabular}{l|l}
Type & degrees\\
\hline\hline
${\rm{B}}_{4m-1}$ & $2,4,6,\ldots, 8m-2$ \\
${\rm{B}}_{4m}$ & $2,4,6, \ldots 8m$\\
${\rm{D}}_{4m}$ & $2,4,6, \ldots, 8m - 2, 4m$\\
${\rm{G}}_2$ & $2, 6$\\
${\rm{F}}_4$ & $2, 6, 8, 12$\\
${\rm{E}}_8$ & $2, 8, 12, 14,18, 20, 24, 30$\\
\hline
\end{tabular}
\caption{}
\label{table:types}
\end{table}

Note that these degrees are all
even, so the values $\zeta(1-d_j)$ of the Riemann zeta function  are non-zero rational numbers.
Explicitly, $\zeta(1-2n) = (-1)^n|B_n|/2n$, where
$B_{2n}$ is the $2n$th Bernoulli number. Since the sum of the degrees is divisible by $4$ in all cases,
the product of zeta values is a positive rational number.

The degrees of the invariant polynomials appear  due to their relationship to the orders of the finite 
groups $\mathscr{G}(\mathbf{F}_p)$. For all primes $p$, the $\Z_p$-split property
for  $\mathscr{G}_{\Z_p}$ implies that $\mathscr{G}_{\mathbf{F}_p}$ is a split connected semisimple $\mathbf{F}_p$-group
that is simply connected and simple, so 
$$\# \mathscr{G}(\mathbf{F}_p) = p^N \prod (p^{d_j} - 1).$$
where $N$ is the number of positive roots. For example, when $\mathscr{G} = \Aut_{\mathscr{R}/\Z}$ is
the $\RRR$-anisotropic semisimple $\Z$-group of type ${\rm{G}}_2$, we have
$$\# \mathscr{G}(\mathbf{F}_p) = p^6(p^6 -1)(p^2 -1).$$
Taking $p = 2$, we find that $\# \mathscr{G}(\mathbf{F}_2) = 2^6 3^3 7$. 

\begin{example}\label{G2unique}
For ${\rm{G}}_2$ we have identified an $\RRR$-anisotropic $\Z$-model, the automorphism scheme
$\mathscr{G} := \Aut_{\mathscr{R}/\Z}$ of Coxeter's order 
$\mathscr{R}$ in the octonions $\mathbf{O}$.  We know that 
the finite group $\mathscr{G}(\mathbf Z) = \Aut(\mathscr{R})$ 
injects into $\mathscr{G}(\mathbf{F}_p)$ for all sufficiently large $p$ (since
${\rm{GL}}_n(\Z_p) \rightarrow {\rm{GL}}_n(\mathbf{F}_p)$ has torsion-free kernel for $p$ sufficiently large, depending on $n$),
so its order divides $\#\mathscr{G}(\mathbf{F}_p) = p^6(p^6-1)(p^2-1)$ for all sufficiently large $p$.

The gcd of these orders over all $p > m$ for any $m > 0$ is easily checked
to be $2^6 3^3 7$.  Hence, $\#\mathscr{G}(\Z)$ divides $2^6 3^3 7 = 12096$, so
$$\frac{1}{\#\mathscr{G}(\Z)} \le \frac{1}{2} \zeta(-1) \times \frac{1}{2}  \zeta(-5) = \frac{1}{2^63^37} \le \frac{1}{\#\mathscr{G}(\Z)},$$
forcing equality throughout. In particular, there is a single term in the mass formula, so
$\mathscr{G}$ is the unique semisimple $\Z$-group of type ${\rm{G}}_2$ that is $\RRR$-anisotropic.
To be more precise, $\mathscr{G}$ is the unique non-Chevalley semisimple $\Z$-group
of type ${\rm{G}}_2$, since (by Proposition \ref{splitchev} and Remark \ref{uniqueO}) 
the $\Q$-fiber of any such $\Z$-group must be the $\RRR$-anisotropic $\Q$-group ${\rm{Aut}}_{\mathbf{O}/\Q}$.
It follows from Corollary \ref{octclass} that $\mathscr{R}$ is the {\em unique} non-split octonion algebra over $\Z$.

The group $\mathscr{G}(\Z) = \Aut(\mathscr{R})$ is identified in \cite[p.\:14]{atlas} as an extension of $\Z/2\Z$ by
the simple commutator subgroup of ${\rm{G}}_2(\mathbf{F}_2)$, where the $\Z/2\Z$ quotient is represented by a
non-central element of order 2 in $\Aut(\mathscr{R})$.  I do not know what methods 
were used to make this identification of finite groups; by using it, 
 the reduction map $f: \Aut(\mathscr{R}) = 
 \mathscr{G}(\Z) \rightarrow \mathscr{G}(\mathbf{F}_2) = {\rm{G}}_2(\mathbf{F}_2)$ can be shown to be an isomorphism
 as follows.
 
The kernel of $f$ is a normal subgroup 
whose order is a power of $2$
(since the kernel of reduction ${\rm{GL}}_n(\Z_p) \rightarrow {\rm{GL}}_n(\mathbf{F}_p)$ is pro-$p$), but
the above description of $\Aut(\mathscr{R})$ in \cite{atlas} implies that 
$\Aut(\mathscr{R})$ 
 has no nontrivial normal
2-subgroup, so $\ker f = 1$.  The description also implies that $\Aut(\mathscr{R})$ and ${\rm{G}}_2(\mathbf{F}_2)$ have
the same size, since the commutator subgroup of ${\rm{G}}_2(\mathbf{F}_2)$ has index 2, so
$f$ is surjective as well.
\end{example}

\begin{example}\label{D4exunique}
Consider the simply connected semisimple $\Z$-group $\mathscr{G} := {\rm{Spin}}({\rm{E}}_8)$ of type ${\rm{D}}_4$. The order
of the finite group $\mathscr{G}(\Z)$
divides $\#\mathscr{G}(\mathbf{F}_p)$ for all sufficiently large primes $p$.  The order of 
$\mathscr{G}(\mathbf{F}_p)$ is equal to $$p^{12}(p^2-1)(p^4-1)^2(p^6-1)$$
for all primes $p$ since the degrees of the invariants for the Weyl group are $2$, $4$, $4$, and $6$.
The gcd of these sizes over all $p > m$ for any $m > 0$
is easily checked to be $2^{14} 3^5 5^2 7$, so 
$\#\mathscr{G}(\Z)$ divides $2^{14}3^55^27$. 

But 
$$ \frac{1}{2} \zeta(-1) \times \frac{1}{2}  \zeta(-3) \times \frac{1}{2} \zeta(-3) \times \frac{1}{2} \zeta(-5) = \frac{1}{2^{14}3^55^27},$$
so exactly as in the previous example we conclude that 
there is a single term in the mass formula, as we also saw in Remark \ref{spinZ} (using the
classical mass formula for positive-definite even unimodular lattices).  By Remark \ref{D4rem}, it also follows 
that ${\rm{O}}({\rm{E}}_8)(\Z) = {\rm{SO}}({\rm{E}}_8)(\Z)$.

The finite group $\mathscr{G}(\Z)$ is identified in \cite[p.\,85]{atlas}
as a finite group of the form 
$2^2.{\rm{O}}_8^+(2)$. Here and below we use the notation of \cite{atlas} for work with finite groups, so ${\rm{O}}_n^+(q)$
denotes the image of ${\rm{Spin}}_n(\mathbf{F}_q)$ in ${\rm{SO}}_n^{\rm{ad}}(\mathbf{F}_q)$
and $H.J$ denotes an extension of the group $J$ by the group $H$ (with the extension structure of unknown nature).
%Using this identification of the structure of $\mathscr{G}(\Z)$ from \cite{atlas}, it follows
%that $\mathscr{G}(\Z) \rightarrow \mathscr{G}(\mathbf{F}_2)$ is an isomorphism.

Let $(M,q)$ be the positive-definite quadratic space with ${\rm{disc}}(q) = 1$
for which $(M, B_q)$ is the even unimodular ${\rm{E}}_8$ root lattice. 
The group $\mathscr{G^*} = {\rm{O}}(q)$ is an $\RRR$-anisotropic $\Z$-form of ${\rm{O}}_8$. The finite group
$\mathscr{G^*}(\Z)$ coincides with $W({\rm{E}}_8)$ inside
${\rm{GL}}(M)$, and by \cite[VI, Exer.\:4.1]{bourbaki} its quotient by $\langle -1 \rangle$ maps isomorphically onto the group
${\rm{O}}(q)(\mathbf{F}_2) = {\rm{O}}_8(\mathbf{F}_2)$ that is an extension of
$\Z/2\Z$ by ${\rm{O}}_8^+(2)$, so it has the same order as $\mathscr{G}(\Z)$.
\end{example}

\begin{example}\label{F4ex}
The case of ${\rm{F}}_4$ is more interesting.  We consider the unique $\Q$-form $G$ that is
$\RRR$-anisotropic and admits a $\Z$-model.
The invariants for the Weyl group have degrees $2$, $6$, $8$ and $12$ and we find the mass is equal to
$$\frac{1}{2} \zeta(-1) \times \frac{1}{2} \zeta(-5) \times \frac{1}{2} \zeta(-7) \times \frac{1}{2} \zeta(-11) = \frac{691}{2^{15}3^65^27^213}.$$
Since this is not the reciprocal of an integer, there must be more than one semisimple
$\Z$-group with $\Q$-fiber isomorphic to $G$. By Proposition \ref{F4good} and the remarks in Example \ref{firstF4}, the 
Hermitian $3 \times 3$ determinant-1 matrices  over $\mathscr{R}$
given by 
$$I =  \begin{pmatrix}
1 & 0 & 0 \\
0 & 1 & 0 \\
0 & 0 & 1
 \end{pmatrix},\,\,\,
 \mathbf{E} = \begin{pmatrix}
2 & \alpha & -1 \\
\alpha^* & 2 & \alpha \\
-1 & \alpha^* & 2
 \end{pmatrix}$$
yield respective simply connected semisimple $\Z$-groups $\mathscr{H}_I$ and
$\mathscr{H}_{\mathbf{E}}$ of type ${\rm{F}}_4$ as closed $\Z$-subgroups of the unique 
non-split simply connected semisimple $\Z$-group of type ${\rm{E}}_6$ (given in (\ref{GE6})).
    
The integral points of these groups are identified on \cite[pp.\,85, 89]{atlas} if one accepts 
that the group schemes $\mathscr{H}_E$ as considered in Proposition \ref{F4good} coincide
with automorphism schemes for certain quadratic Jordan algebras over $\Z$. 
Assuming that this identification is correct, we obtain isomorphisms 
 $\mathscr{H}_I(\Z) = 2^2.{\rm{O}}_8^+(2).S_3$  and $\mathscr{H}_{\mathbf{E}}(\Z) = {}^3{\rm{D}}_4(2).3$ 
 respectively. 
 These two finite groups have orders $2^{15}3^65^27$ and $2^{12}3^57^213$ respectively. Since
 $$\frac{691}{2^{15}3^65^27^213} = \frac{1}{2^{15}3^65^27} + \frac{1}{2^{12}3^57^213},$$
 $\mathscr{H}_I$ and $\mathscr{H}_{\mathbf{E}}$ are the {\em only}
$\RRR$-anisotropic semisimple $\Z$-groups of type ${\rm{F}}_4$ (granting that we have correctly
identified the groups $\mathscr{H}_I(\Z)$ and $\mathscr{H}_{\mathbf{E}}(\Z)$)!
 For more details on $\mathscr{H}_{\mathbf{E}}$ and its relation with the Leech lattice, see \cite{EG}.
 \end{example}


The mass for the integral models of $G$ becomes large as the degrees of the invariant polynomials for the
 Weyl group increase. Indeed, 
for even $d$ the rational number $\frac{1}{2}\zeta(1-d)$ is equal to $\zeta(d) (d-1)!/(2\pi i)^d$, which is 
approximately $(d-1)!/(2\pi i)^d$ when $d \ge 4$. 
For $G$ of type ${\rm{E}}_8$ 
the corresponding product of the values $\frac{1}{2}\zeta(1-d_j)$ is 
approximately $13934.49$. Hence there 
are at least $13935$ pairwise non-isomorphic $\RRR$-anisotropic semisimple $\Z$-groups of type ${\rm{E}}_8$
that have $\Q$-fiber equal to $G$ (by Proposition \ref{Rinj}). Inside the adjoint representation ${\rm{Lie}}(G)$ 
of $G$ over $\Q$, each $\Z$-model $\mathscr{G}$ of $G$ determines a positive-definite quadratic lattice 
${\rm{Lie}}(\mathscr{G}) \subset {\rm{Lie}}(G)$ of 
rank $248$ using the $\Z$-valued quadratic form $q:X \mapsto (-1/120){\rm{Tr}}({{\rm{ad}}}(X)^2)$,
and this lattice is 
equipped with a $\mathscr{G}$-invariant alternating $3$-form $\wedge^3({\rm{Lie}}(\mathscr{G})) \to \mathbf Z$ defined by
\begin{eqnarray*}
X \wedge Y \wedge Z \mapsto B_q([X,Y],Z) &=&  (-1/60){\rm{Tr}}({\rm{ad}}([X,Y]) {\rm{ad}}(Z)) \\
&=& 
(1/60)({\rm{Tr}}({\rm{ad}}(Y) {\rm{ad}}(X) {\rm{ad}}(Z)) \\
&& - {\rm{Tr}}({\rm{ad}}(X){\rm{ad}}(Y){\rm{ad}}(Z))).
\end{eqnarray*}
Probably most models $\mathscr{G}$ satisfy 
$\mathscr{G}(\mathbf Z) = 1$. If these groups generally are trivial
then it would be interesting to determine the others. Some examples are constructed in 
\cite[\S6]{G}.

 
 \begin{appendix}
 
 \section{Indefinite quadratic lattices via group schemes}\label{genustheory}
 
 In this appendix, we use the cohomological formalism from \S\ref{cohomsec} to prove a classical fact in the theory of
 quadratic forms over $\Z$:
 
 \begin{theorem}\label{genus} An indefinite quadratic lattice $(M,q)$ non-degenerate over $\Z$ 
 is determined up to isomorphism by its signature.
  \end{theorem}
 
 The hypothesis of non-degeneracy over $\Z$,
 or equivalently $|{\rm{disc}}(q)| \in \{1, 2\}$, is essential.  Setting aside the peculiar case of rank-2 
 quadratic lattices $(M,q)$, for which 
 ${\rm{SO}}(q)_{\Q}$ is a torus rather than semisimple, in the case of ternary quadratic lattices 
 (i.e., rank 3) the size of the genus of $(M,q)$ can be an arbitrarily large power of 2 in the indefinite case as $|{\rm{disc}}(q)|$ grows.
  See \cite{earnest} for a discussion of this issue, as well as examples.
 
\begin{proof}
The indefiniteness implies that the rank $n$ is at least 2.  For rank 2, necessarily $q \simeq q_2$.  Indeed,
$(M,q)$ is a form of $(\Z^2, q_2)$ for the \'etale topology since 
${\rm{O}}_2$ is smooth, so the Isom-scheme $I = {\rm{Isom}}(q_2,q)$ is a right torsor for 
the $\Z$-group scheme ${\rm{O}}_2$ that is an extension of $\Z/2\Z$ by ${\rm{SO}}_2 = \Gm$.
Hence, it suffices to show that ${\rm{H}}^1(\Z, {\rm{O}}_2)=1$, which in turn reduces to the vanishing of
${\rm{H}}^1(\Z, \Z/2\Z)$ and ${\rm{H}}^1(\Z, \Gm)$.  The vanishing of
${\rm{H}}^1(\Z, \Z/2\Z)$ is a consequence of Proposition \ref{noout} because $\pi_1(\Spec(\Z))=1$, and the 
vanishing of ${\rm{H}}^1(\Z, \Gm)$ expresses the fact that the Dedekind domain $\Z$ has trivial class group.
Thus, we may and do focus on the case where $n \ge 3$, so ${\rm{SO}}(q)$ is a semisimple $\Z$-group scheme.

The signature determines the sign of the discriminant, and the parity of the rank determines
if  $|{\rm{disc}}(q)|$ equals 1 or 2 (using the non-degeneracy
hypothesis over $\Z$).  Hence, if $(M',q')$
is another such quadratic lattice with the same signature then its discriminant coincides
with that of $(M,q)$. Consider the Isom-scheme $I = {\rm{Isom}}(q,q')$ over $\Z$. This is
an fppf right ${\rm{O}}(q)$-torsor over $\Z$.

\begin{lemma}\label{soclass} The class of $I$ in ${\rm{H}}^1(\Z, {\rm{O}}(q))$ arises from ${\rm{H}}^1(\Z, {\rm{SO}}(q))$.
\end{lemma}

\begin{proof} 
If $n$ is even then ${\rm{O}}(q)/{\rm{SO}}(q) = \Z/2\Z$, and 
${\rm{H}}^1(\Z, \Z/2\Z)=0$, so the case of even $n$ is settled. 
Assume instead that $n$ is odd, so ${\rm{O}}(q)/{\rm{SO}}(q) = \mu_2$.  It
suffices to show that the map ${\rm{H}}^1(\Z, {\rm{O}}(q)) \rightarrow {\rm{H}}^1(\Z,\mu_2)$
kills the class of $I$.  By fppf Kummer theory (reviewed
in the proof of Lemma \ref{h2mu} below), 
${\rm{H}}^1(\Z, \mu_2) = \Z^{\times}/(\Z^{\times})^2$.  The
image in here of the class of $I$ is ${\rm{disc}}(q)/{\rm{disc}}(q') = 1$.
\end{proof}

By Lemma \ref{soclass}, there is
an ${\rm{SO}}(q)$-torsor $I'$ over $\Z$ whose class $[I']$ is carried to that of $I$ under the map
$${\rm{H}}^1(\Z, {\rm{SO}}(q)) \rightarrow {\rm{H}}^1(\Z, {\rm{O}}(q)).$$
For every prime $p$ we have  ${\rm{H}}^1(\Z_p, {\rm{SO}}(q))=1$ (Proposition \ref{lang}), 
so $I'_{\Z_p}$ is a trivial torsor over $\Z_p$ and hence 
so is $I_{\Z_p}$.  In other words, for every $p$
we have $I(\Z_p) \ne \emptyset$, so $q'_{\Z_p} \simeq q_{\Z_p}$.   
The signatures of $q'$ and $q$ agree by hypothesis, so $q'_{\Q} \simeq q_{\Q}$ by the Hasse--Minkowski theorem.
We want to deduce that $q' \simeq q$ over $\Z$.

Necessarily $I'(\RRR)$ is non-empty.  Indeed, it suffices to check that
the map ${\rm{H}}^1(\RRR, {\rm{SO}}(q)) \rightarrow {\rm{H}}^1(\RRR, {\rm{O}}(q))$ has trivial kernel.
Such triviality amounts to the surjectivity of the natural map ${\rm{O}}(q)(\RRR) \rightarrow ({\rm{O}}(q)/{\rm{SO}}(q))(\RRR) = \{\pm 1\}$ 
(via determinant), 
which is verified by inspection of a diagonal form for $q_{\RRR}$.

We shall lift  the cohomology class $[I']$ to a class $[\widetilde{I}] \in {\rm{H}}^1(\Z, {\rm{Spin}}(q))$
 such that $\widetilde{I}(\RRR)$ is non-empty.  This property is deeper than the lifting of $[I]$ to $[I']$,
 since the existence of an $\RRR$-point in a lifted ${\rm{Spin}}(q)$-torsor over $\Z$ will not be automatic. 
 
 Consider the central extension of fppf affine $\Z$-groups
 \begin{equation}\label{spincen}
1 \rightarrow  \mu_2 \rightarrow {\rm{Spin}}(q) \rightarrow {\rm{SO}}(q) \rightarrow 1.
\end{equation}
 We aim to prove that ${\rm{H}}^1(\Z, {\rm{Spin}}(q)) \rightarrow {\rm{H}}^1(\Z, {\rm{SO}}(q))$
 is surjective, and to understand its fibers (so as to control $\RRR$-points).  To clarify the cohomological methods to be used,
 it is better to first consider a generalization of (\ref{spincen}). 
 Let 
\begin{equation}\label{cgg}
1 \rightarrow C \rightarrow G \stackrel{f}{\rightarrow} G' \rightarrow 1
\end{equation}
 be a central extension of fppf affine group schemes over a scheme $S$.
 Using fppf cohomology, 
there is a natural action of ${\rm{H}}^1(S,C)$ on ${\rm{H}}^1(S,G)$ arising from the translation action on $G$ by its
central subgroup $C$.  The description of ${\rm{H}}^1(f)$ via pushout of torsors along $f$ 
(carrying the isomorphism class of a right $G$-torsor $E$
to the isomorphism class of $E \times^G G'$) makes it clear that the ${\rm{H}}^1(S,C)$-action 
leaves ${\rm{H}}^1(f)$ invariant, so each non-empty fiber of ${\rm{H}}^1(f)$ is a union of 
${\rm{H}}^1(S,C)$-orbits.

\begin{lemma} The action of ${\rm{H}}^1(S,C)$ on each non-empty fiber of ${\rm{H}}^1(f)$ is transitive.
\end{lemma}

\begin{proof}
Over the distinguished point in ${\rm{H}}^1(S,G)$, such transitivity expresses the exactness of the diagram of pointed sets
$$\xymatrix{
{\rm{H}}^1(S,C) \ar[r] &  {\rm{H}}^1(S,G) \ar[r]^-{{\rm{H}}^1(f)} & {\rm{H}}^1(S,G')}$$
associated to (\ref{cgg}); see \cite[Prop.\:B.3.2]{cosetfinite}
for a proof of such exactness (written over fields, but in a manner that works over any scheme).

Now consider a general right $G$-torsor $E$, and the fiber of ${\rm{H}}^1(f)$ through the class $[E]$ of $E$.
Let $E' = E \times^G G'$ be the associated right $G'$-torsor obtained by pushout.  Since $C$ is central in $G$,
we have $E' = E/C$, and ${}_E G := {\rm{Aut}}_G(E)$ is an fppf form of $G$ that naturally contains $C$
with quotient ${}_{E'} G' := {\rm{Aut}}_{G'}(E')$.  Denote the quotient map ${}_E G \rightarrow {}_{E'} G'$ as
${}_E f$.  

The technique of 
``twisting by fppf torsors'' (explained in \cite[\S{B.3.2}]{cosetfinite} over fields, but in a style that works
over any scheme) defines a natural ${\rm{H}}^1(S,C)$-equivariant bijection $t_E:{\rm{H}}^1(S,G) \simeq {\rm{H}}^1(S,{}_E G)$
carrying $[E]$ to the distinguished point.  (This corresponds to translation by $-[E]$ in the commutative case.)
We likewise have $t_{E'}$, and  it is easy to check that the diagram
$$\xymatrix{
{{\rm{H}}^1(S,G)} \ar[d]_-{t_E} \ar[r]^-{{\rm{H}}^1(f)} & {{\rm{H}}^1(S,G')} \ar[d]^-{t_{E'}} \\
{{\rm{H}}^1(S,{}_E G)} \ar[r]^-{{\rm{H}}^1({}_E f)} & {{\rm{H}}^1(S,{}_{E'} G')} 
}$$
commutes. 
Thus, the transitivity of the ${\rm{H}}^1(S,C)$-action on the fiber through the class of $E$ is a consequence of the exactness of
${\rm{H}}^1(S,C) \rightarrow {\rm{H}}^1(S,{}_E G) \rightarrow {\rm{H}}^1(S,{}_E G')$. 
\end{proof}
 
There is also an exact sequence of pointed sets
 $${\rm{H}}^1(S,G) \rightarrow {\rm{H}}^1(S,G') \stackrel{\delta}{\rightarrow} {\rm{H}}^2(S,C)$$
with right term that is an instance of derived functor
cohomology on abelian fppf sheaves.  (If $G$ or $G'$ are $S$-smooth then their
${\rm{H}}^1$'s can be computed using the \'etale topology as well, but when $C$ is not $S$-smooth then
 \v{C}ech-theoretic methods are insufficient to construct $\delta$.)  The key to constructing $\delta$ with the desired
 exactness properties is that the derived functor ${\rm{H}}^2$ on abelian sheaves 
has an interpretation in terms of gerbes (analogous to the interpretation of ${\rm{H}}^1$ via torsors);
see \cite[Prop.\:B.3.3]{cosetfinite} for a self-contained discussion of this issue (written 
over fields, but in a manner that works verbatim over any scheme). 

We conclude that if ${\rm{H}}^2(S,C)=0$ then ${\rm{H}}^1(S,G) \rightarrow {\rm{H}}^1(S,G')$ is surjective
with fibers that are the ${\rm{H}}^1(S,C)$-orbits.   Hence, 
${\rm{H}}^1(\Z, {\rm{Spin}}(q)) \rightarrow {\rm{H}}^1(\Z, {\rm{SO}}(q))$ is surjective
with fibers that are the ${\rm{H}}^1(\Z, \mu_2)$-orbits provided that ${\rm{H}}^2(\Z, \mu_2) = 1$.
This vanishing is a special case of:

\begin{lemma}\label{h2mu} For any integer $d > 0$, ${\rm{H}}^2(\Z, \mu_d) = 1$.
\end{lemma}

\begin{proof}  The $d$-power Kummer sequence
$1 \rightarrow \mu_d \rightarrow \Gm \stackrel{t^d}{\rightarrow} \Gm \rightarrow 1$
is exact for the fppf topology, so the general equality ${\rm{Pic}}_{\rm{fppf}}(S) = {\rm{Pic}}(S)$ 
for any scheme (by fppf descent theory) and the vanishing of ${\rm{Pic}}(\Z)$ imply that
${\rm{H}}^2(\Z,\mu_d)$ is identified with the $d$-torsion  subgroup of the fppf cohomology group
${\rm{H}}^2(\Z, \Gm)$.  
It is a theorem of Grothendieck \cite[11.7(1)]{braueriii} 
that for any scheme $S$ and integer $i$,
the natural map ${\rm{H}}^i(S_{\et},G) \rightarrow {\rm{H}}^i(S_{\rm{fppf}}, G)$ is bijective
for any commutative smooth affine $S$-group $G$.  By applying
this with $S = \Spec(\Z)$ and $G = \Gm$, we are reduced to proving the vanishing
of the \'etale cohomology group ${\rm{H}}^2(\Z, \Gm)$. Such vanishing
is a consequence of calculations with class field theory \cite[III, Ex.\:2.22(f)]{milne}. 
\end{proof}

By inspection, ${\rm{H}}^1(\Z,\mu_2)  \rightarrow {\rm{H}}^1(\RRR,\mu_2)$ is an isomorphism. Thus, 
 ${\rm{H}}^1(\Z, \mu_2)$ acts transitively on fibers for
 ${\rm{H}}^1(\RRR, {\rm{Spin}}(q)) \rightarrow {\rm{H}}^1(\RRR, {\rm{SO}}(q))$.  
We know that $[I]$
 lifts to a class $[I'] \in {\rm{H}}^1(\Z, {\rm{SO}}(q))$, and that $[I'_{\RRR}]=1$.
 Hence, the fiber over $[I'_{\RRR}]=1$ in 
 ${\rm{H}}^1(\RRR, {\rm{Spin}}(q))$ contains the trivial class. 
By using ${\rm{H}}^1(\Z, \mu_2)$-translations, we conclude that 
there is a right ${\rm{Spin}}(q)$-torsor $\widetilde{I}$ over $\Z$
 lying over $I'$ (hence over $I$) such that $\widetilde{I}(\RRR)$ is non-empty. 
 
 In the language of torsor pushouts,
 $$I = \widetilde{I} \times^{{\rm{Spin}}(q)} {\rm{O}}(q).$$
 Thus, if $\widetilde{I}(\Z) \ne \emptyset$ then $I(\Z) \ne \emptyset$, as desired.
 Since $\widetilde{I}(\RRR)$ is non-empty, $\widetilde{I}(\Q)$ is non-empty 
 because the natural map
 ${\rm{H}}^1(\Q, {\rm{Spin}}(q)) \rightarrow {\rm{H}}^1(\RRR, {\rm{Spin}}(q))$
 is injective: this injectivity  is a consequence of the Hasse principle for simply connected semisimple $\Q$-groups
 \cite[\S6.1, Thm.\:6.6]{PR}
 and the vanishing theorem of Kneser--Bruhat--Tits
 for degree-1 cohomology of simply connected semisimple groups
 over non-archimedean local fields (\cite[\S6.1, Thm.\:6.4]{PR},
 \cite[Thm.\:4.7(ii)]{BT}).
 
 Now  we combine the existence of a $\Q$-point 
 on $\widetilde{I}$ with strong approximation (for indefinite spin groups) to find a $\Z$-point on $\widetilde{I}$.
 The indefiniteness hypothesis on the signature implies that ${\rm{Spin}}(q)_{\RRR}$ is $\RRR$-isotropic
(since its central isogenous quotient ${\rm{SO}}(q_{\RRR})$ is certainly isotropic).  Thus, exactly as in the proof
of Proposition \ref{sotrans}, ${\rm{Spin}}(q)(\Q)$ is dense in the space ${\rm{Spin}}(q)(\mathbf{A}^{\infty})$
of points valued in the ring $\mathbf{A}^{\infty} = \Q \otimes_{\Z} \widehat{\Z}$ 
of finite adeles. But $\widetilde{I}_{\Q} \simeq {\rm{Spin}}(q)_{\Q}$
as affine $\Q$-schemes of finite type since $\widetilde{I}(\Q)$ is non-empty, 
so $\widetilde{I}(\Q)$ is dense in $\widetilde{I}(\mathbf{A}^{\infty})$.
Using the $\Z$-structure $\widetilde{I}$ on 
the $\Q$-scheme $\widetilde{I}_{\Q}$, we obtain the open subset
$\widetilde{I}(\widehat{\Z}) \subset \widetilde{I}(\mathbf{A}^{\infty})$. This open set
is equal to $\prod_p \widetilde{I}(\Z_p)$, and it is non-empty because ${\rm{H}}^1(\Z_p, {\rm{Spin}}(q)) = 1$ for every $p$ 
(Proposition \ref{lang}). 
The non-empty intersection of the non-empty open set $\widetilde{I}(\widehat{\Z})$ and the dense subset
$\widetilde{I}(\Q)$ is  $\widetilde{I}(\Z)$, so we are done.
\end{proof}

\section{Octonion algebras over rings}\label{octsec}

An {\em octonion algebra} over a commutative ring $R$ is a finite locally free
$R$-module $A$ of rank $8$ equipped with a quadratic form $\nu:A \rightarrow R$ (called the {\em norm}) 
and a possibly non-associative $R$-algebra structure
admitting a 2-sided identity $e$ such that 
$(A, \nu)$ is a non-degenerate quadratic space
and $\nu(xy) = \nu(x) \nu(y)$ for all $x, y \in A$.

The element $\nu(e) \in R$ is   idempotent, so Zariski-locally on $\Spec(R)$ it is equal to 0 or 1,
 and it satisfies $\nu(x) = \nu(x) \nu(e)$ for all $x \in A$,
so $\nu(e)=1$ since $\nu$ is non-degenerate.  
Since $R \rightarrow A$ via $r \mapsto re$ is injective, we often write $r$ rather than $re$
when viewing $R$ inside $A$.

We define $$\langle \cdot, \cdot \rangle := B_{\nu}$$ to be the symmetric bilinear form
associated to the norm form, and define the {\em conjugation} $$x^{\ast} := \langle x, e \rangle  - x,$$ so
$e^{\ast}=e$ and $x^{\ast\ast}=x$.
The $R$-linear map ${\rm{T}}:A \rightarrow R$ defined by $\langle \cdot, e\rangle$ is called the {\em trace}. 
For all $x \in A$, clearly $x + x^{\ast} = {\rm{T}}(x)$ and 
\begin{eqnarray*}
\nu(x^{\ast}) = \nu({\rm{T}}(x)e - x) &=& {\rm{T}}(x)^2 \nu(e) - \langle {\rm{T}}(x)e, x \rangle + \nu(x)\\ &=&
{\rm{T}}(x)^2  - {\rm{T}}(x) \langle e, x \rangle + \nu(x) \\&=& \nu(x).
\end{eqnarray*}

Since $A$ has even rank,
non-degeneracy of the quadratic space $(A, \nu)$ implies that $\langle \cdot, \cdot \rangle$ is perfect.
Using this, there are a number of basic identities
whose proofs over fields in \cite[\S1.2--1.4]{sv} work verbatim over any commutative base ring.
In particular, as in \cite[\S1.2--1.3]{sv}, 
\begin{equation}\label{tneqn}
x^2 - {\rm{T}}(x) x + \nu(x) = 0
\end{equation}
and $x x^{\ast} = \nu(x) = x^{\ast}x$ for all $x \in A$,
$(xy)^{\ast} = y^{\ast} x^{\ast}$ for all $x, y \in A$, and 
$$\langle xy, z \rangle = \langle y, x^{\ast} z \rangle,\,\,\,
\langle x, yz \rangle = \langle xz^{\ast}, y \rangle$$
for all $x, y, z \in A$.  Setting $y=e$ in this final identity, we get 
$$\langle x, y \rangle = {\rm{T}}(x y^{\ast})$$
for all $x, y \in A$.  Note that by the quadratic relation (\ref{tneqn}),  for any $x \in A$ 
the $R$-subalgebra of $A$ generated by $x$ is commutative and associative.

The general identities (as in \cite[Lemma 1.3.3]{sv})
\begin{equation}\label{starmult}
x(x^{\ast}y) = \nu(x)y = (yx)x^{\ast}
\end{equation}
imply 
$$\langle xy, xz \rangle = \langle y, x^{\ast}(xz) \rangle = \langle y, \nu(x) z \rangle = \nu(x) \langle y, z \rangle$$
and likewise $\langle xz, yz \rangle = \nu(z) \langle x, y \rangle$ for any $x, y, z \in A$, so (upon subtituting $z+w$ for $z$
in this final identity)  for any $x, y, z, w \in A$ we have 
\begin{equation}\label{polar}
\langle xz, yw \rangle + \langle xw, yz \rangle = \langle x, y \rangle \langle z, w \rangle.
\end{equation}

One proves exactly as over fields in \cite[\S1.4]{sv} the {\em Moufang identities}
$$(xy)(zx) = x((yz)x),\,\,\,x(y(xz)) = (x(yx))z,\,\,\,
y(x(zx)) = ((yx)z)x$$
and their consequences:
\begin{equation}\label{passoc}
x(xy) = x^2 y,\,\,\,(xy)y = x y^2
\end{equation}
and the alternating property of the trilinear {\em associator}
$$[x,y,z] = (xy)z - x(yz).$$
Note also that multiplication is {\em trace-associative} in the sense that
${\rm{T}}((xy)z) = {\rm{T}}(x(yz))$:
$${\rm{T}}((xy)z) = \langle xy, z^{\ast} \rangle = \langle x, z^{\ast}y^{\ast} \rangle = \langle x, (yz)^{\ast} \rangle = {\rm{T}}(x(yz)).$$

The identity (\ref{tneqn}) says that $A$ is a {\em degree-$2$ algebra} in the sense of \cite[(0.6), (0.7)]{mccrimmon}.
Since $e$ is part of a basis of $A$ Zariski-locally on $\Spec(R)$, the pair $({\rm{T}}, \nu)$ consisting
of a linear form ${\rm{T}}:A \rightarrow R$ and a quadratic form $\nu:A \rightarrow R$ satisfying (\ref{tneqn}) for all $x \in A$ is
{\em unique},
by \cite[Prop.\:2.2, Prop.\:2.3(vi)]{mccrimmon}. 
This implies: 

\begin{proposition} Every $R$-algebra automorphism of $(A,e)$
preserves $\nu$, and hence preserves ${\rm{T}}$ and the conjugation.
\end{proposition}

On ${\rm{Mat}}_2(R)$, we have the standard involution $x \mapsto x^{\ast}$ defined by conjugation of the transpose against
the standard Weyl element $(\begin{smallmatrix} 0 & 1 \\ -1 & 0 \end{smallmatrix})$.  This is used in:

\begin{definition} The {\em split octonion $R$-algebra}  is 
the $R$-module $\Lambda_R := {\rm{Mat}}_2(R) \oplus {\rm{Mat}}_2(R)$
equipped with the multiplication law
$$(x,y)(z,w) = (xz + w y^{\ast}, x^{\ast}w + zy)$$
and the norm form $\nu(x,y) = \Det(x) - \Det(y)$.  
\end{definition}

It is straightforward to check (using that $xx^{\ast} = \Det(x)$ on ${\rm{Mat}}_2(R)$
and $x^{\ast} = -x$ on $\mathfrak{sl}_2(R)$) that $\Lambda_R$ is an octonion algebra with identity $(1, 0)$,
trace $(x,y) \mapsto {\rm{Tr}}(x)$ (usual matrix trace),
conjugation $(x,y)^{\ast} = (x^{\ast}, -y)$, 
and underlying quadratic space isomorphic to the standard split quadratic space $(R^8, q_8)$ of rank 8.
Over a field, up to isomorphism the split octonion algebra is the only one whose norm admits isotropic
vectors (i.e., $a \in A - \{0\}$ such that ${\rm{N}}(a) = 0$) \cite[1.8.1]{sv}.

\begin{example}\label{octlocal} Let $K$ be a non-archimedean local field.  Every non-degenerate quadratic
space over $K$ with dimension $\ge 5$ admits an isotropic vector, so any octonion algebra
over $K$ is isomorphic to $\Lambda_K$.
\end{example}

\begin{definition}\label{octdiv}
A pair of elements $x, y$ in an octonion algebra $(A, \nu)$ over $R$ are {\em inverse} to each other
if the $R$-linear left and right multiplication maps $\ell_x, \ell_y, r_x, r_y$ are invertible and satisfy
$\ell_x = \ell_y^{-1}$ and $r_x = r_y^{-1}$, and $x \in A$ is a {\em unit} if $x$ admits a (necessarily unique) inverse.
If $R$ is a field then $A$ is an {\em octonion division algebra} if every nonzero element of $A$ is a unit.
\end{definition}

By (\ref{starmult}), an element 
$x \in A$ is a unit if and only if $\nu(a) \in R^{\times}$, in which case $\nu(a)^{-1} a^{\ast}$ is the inverse
of $a$.  Thus, an octonion algebra over a field $k$ is a division algebra precisely when the norm is $k$-anisotropic
(e.g., positive-definite when $k = \Q, \RRR$).  The units of an octonion algebra do not form a group under
multiplication because multiplication is non-associative. 

The main result of this appendix is the following theorem over rings that relativizes a classical fact over fields.
The proof is an adaptation of the argument
over fields in \cite[(2.4)--(2.5)]{vS}, bringing in some elementary commutative algebra
in order to control freeness of module structures.

\begin{theorem}\label{etsplit}
If an octonion algebra over a local ring $R$ has underlying quadratic space that is split
then it is a split algebra; i.e., isomorphic to $\Lambda_R$. 
Every octonion algebra over a ring $C$ becomes split over an affine \'etale cover of $C$.
\end{theorem}

\begin{proof}
We begin by explaining why 
the second part follows from the first, so consider
an octonion algebra over a ring $C$.  Over some affine \'etale cover $\Spec(C')$ of $\Spec(C)$ we can split
the underlying even-rank non-degenerate quadratic space \cite[XII, Prop.\:1.2]{sga7}.  By ``spreading out'' over $\Spec(C')$, we
can identify the octonion algebra with $\Lambda_{C'}$ Zariski-locally over $\Spec(C')$ {\em provided}
that we can do so over the local rings of $C'$. Hence, it suffices to apply the first assertion of the theorem
to the local rings of $C'$. 

Let $R$ be a local ring, with 
residue field $k$, and let $(A, \nu)$ be an octonion algebra over $R$ whose underlying quadratic space
is isomorphic to $(R^8, q_8)$.  In particular, $A$ has an $R$-basis $\{a_i\}$ consisting of isotropic vectors.
Since the element $e \in A$ is part of an $R$-basis, 
by perfectness of $\langle \cdot, \cdot \rangle$ 
some $a = \sum r_i a_i$ satisfies $1 = \langle e, a \rangle = \sum r_i \langle e, a_i \rangle$,
so $\langle e, a_{i_0} \rangle \in R^{\times}$ for some $i_0$. By unit scaling of such an $a_{i_0}$, we thereby obtain 
an isotropic $a \in A$ that is part of an $R$-basis of $A$ and satisfies $\langle e, a \rangle = 1$.  

The pair $\{e, a\}$ is part
of an $R$-basis of $A$: by locality of $R$ and freeness of $A$ it suffices to check this 
in $A_k$ over the residue field $k$, and there
we use that $\langle e, a \rangle = 1$ and $\langle a, a \rangle = 2 \nu(a) = 0$.
Since $\nu(a - e) = \nu(a) - \langle a, e \rangle + \nu(e) = 0-1+1 =0$, the elements $a$ and $e-a$ provide a decomposition
$$e = x_0 + y_0$$
with isotropic $x_0, y_0 \in A$ that satisfy $\langle x_0, y_0 \rangle = 1$.
The split hypothesis on the quadratic space over $R$ has done its work.

The pair $\{x_0, y_0\}$ is an $R$-basis of a direct summand $H$ of $A$, either by construction or by repeating
the argument used with $\{e, a\}$ above, and visibly $(H, \nu)$ is a hyperbolic plane over $R$.  In particular,
$\langle \cdot, \cdot \rangle$ is perfect on $H$, so by perfectness of $\langle \cdot, \cdot \rangle$
on the free $R$-module $A$ it follows that $A = H \oplus H^{\perp}$
for the orthogonal complement $H^{\perp}$ of $H$ in $A$ that must be a free $R$-module of rank 6.

Since $\nu(x_0) = 0$ and 
$${\rm{T}}(x_0) = \langle x_0, e \rangle = \langle x_0, x_0 + y_0 \rangle = 2 \nu(x_0) + \langle x_0, y_0 \rangle = 1,$$
we see that $x_0^{\ast} = e-x_0 = y_0$
and (via the relation (\ref{tneqn}) for $x_0$) that $x_0^2 = x_0$.  Likewise, $y_0^2 = y_0$ and $y_0^{\ast} = e-y_0 = x_0$. 
Clearly $x_0 y_0 = x_0(e - x_0) = 0$ and $y_0 x_0 = 0$, so
$x_0$ and $y_0$ are orthogonal idempotents summing to $e$
that are swapped by conjugation.   In particular, $H^{\perp}$ is stable under left multiplication by $x_0$ and $y_0$; e.g.,
if $z \in H^{\perp}$ then 
$$\langle x_0, x_0 z \rangle = \nu(x_0) \langle e, z \rangle = 0,\,\,\,
\langle y_0, x_0 z \rangle = \langle x_0^{\ast} y_0, z \rangle = \langle  y_0^2, z\rangle = \langle y_0, z \rangle = 0.$$
Hence, it is reasonable to consider the $R$-submodules
\begin{equation}\label{MNdef}
M = \{x \in H^{\perp}\,|\,x_0 x = x\},\,\,\,N = \{y \in H^{\perp}\,|\,y_0 y = y\}
\end{equation}
inside $H^{\perp}$.  

By (\ref{passoc}) and the idempotent property of $x_0$ 
we see that $x_0 M = M = x_0 H^{\perp}$, and likewise $y_0 N = N = y_0 H^{\perp}$.
The condition in (\ref{MNdef}) defining $M$ inside $H^{\perp}$ can also be written as ``$y_0 x = 0$'',
and similarly with $N$ using $x_0$.
Since $A = H \oplus H^{\perp}$, it follows that $x_0 A = R x_0 \oplus M$ and $y_0 A = R y_0 \oplus N$ (both
direct sums inside $A$).
Thus, $x_0 A$ is killed by left multiplication against $y_0$ and likewise $y_0 A$ is killed by left multiplication against $x_0$, so 
$x_0 A \cap y_0 A = 0$ since this intersection is killed by left multiplication against $x_0 + y_0 = e$.  

Clearly 
$A = x_0 A + y_0 A$, so we conclude that  the $R$-modules 
$$M_0 := x_0 A = Rx_0 \oplus M,\,\,\, N_0 := y_0 A = R y_0 \oplus N$$ 
satisfy 
$M_0 \oplus N_0 = A$.  Thus, $M_0$ and $N_0$ are each finite free modules, due to being direct
summands of the finite free module $A$ over the local ring $R$, so likewise
their respective direct summands $M$ and $N$ are also finite free $R$-modules.
The equality $M_0 \oplus N_0 = A = H \oplus H^{\perp}$ with $H = R x_0 \oplus R y_0$ forces the $R$-linear map
$M \oplus N \rightarrow H^{\perp}$ to be an isomorphism. 

We claim that the $R$-submodules $M_0$ and $N_0$ in $A$ are isotropic 
in the sense that $\langle \cdot, \cdot \rangle$ has vanishing restriction to each.  To 
check the isotropicity of $M_0$, note that if $x, x' \in M$ then 
$$\langle x, x' \rangle = \langle x_0 x, x_0 x' \rangle = \nu(x_0) \langle x, x' \rangle = 0,$$
and for $\lambda \in R$ we have $$\langle x, \lambda x_0 \rangle = 
\lambda \langle x_0 x, x_0 e \rangle =  \lambda \nu(x_0) {\rm{T}}(x) = 0.$$ Since moreover 
$\langle x_0, x_0 \rangle = 2\nu(x_0) = 0$, the isotropicity of $M_0$ is established. The case of $N_0$ goes similarly.

\begin{lemma} The free $R$-modules $M$ and $N$ have rank equal to $3$.
\end{lemma}

\begin{proof}
Since $M_0$ and $N_0$ are direct summands of the finite free module $A$, 
the induced $k$-linear maps 
$(M_0)_k \rightarrow A_k$ and $(N_0)_k \rightarrow A_k$ are injections onto 
isotropic subspaces of the quadratic space $(A_k, \nu_k) \simeq (k^8, q_8)$
in which the maximal isotropic subspaces have dimension 4. Thus, $M_0$ and $N_0$ have rank $\le 4$. 
Their ranks add up to 8, so each has rank equal to 4. Hence, their respective
direct summands $M$ and $N$ must be free over $R$ of rank 3. 
\end{proof}

\begin{lemma}\label{temp} Conjugation on $A$ acts on $M$ and $N$ via negation, and
$$M = \{x \in H^{\perp}\,|\, x x_0 = 0\},\,\,\,
N = \{y \in H^{\perp}\,|\,y y_0 = 0\}.$$
\end{lemma}

\begin{proof}
Since $M \subset H^{\perp} \subset (R e)^{\perp}$, the trace vanishes on $M$.  Hence, conjugation on $M$
is negation.   For $x \in M$, applying
conjugation to the equality $x_0 x = x$ for all $x \in M$ gives $x^{\ast} x_0^{\ast} = x^{\ast}$ for such $x$,
or equivalently $- x x_0^{\ast} = -x$.  But $x_0^{\ast} = e - x_0$ since ${\rm{T}}(x_0) = 1$, so $-x(e-x_0) = -x$.  Thus,
$xx_0 = 0$.  Similarly, $y y_0 = 0$ for $y \in N$.  This proves the containments ``$\subseteq$'' in place of the desired module 
equalities.  

To prove the reverse containments, since $H^{\perp} = M +N$ it remains to show that right multiplication 
$r_{x_0}$ by $x_0$ acts injectively on $N$, and likewise for $r_{y_0}$ on $M$.  But
$r_{x_0} + r_{y_0}$ is the identity map and $r_{y_0}|_N = 0$, so $r_{x_0}|_N$ is the identity on $N$.
The case of $r_{y_0}$ goes similarly. 
\end{proof}

\begin{lemma}\label{multM} If $x, x' \in M$ then $xx' \in N$, and if $y, y' \in N$ then $yy' \in M$.
If $x \in M$ and $y \in N$ then $xy \in H$.
\end{lemma}

\begin{proof}
Since $\langle x_0, x \rangle=0$ (as $M \subset H^{\perp}$), (\ref{polar}) gives 
$$\langle x_0, xx' \rangle + \langle x_0 x', x \rangle = \langle x_0, x \rangle \langle e, x' \rangle = 0.$$
But $x_0 x' = x'$, and $\langle x', x \rangle = 0$ since $M$ is isotropic, so $\langle x_0, xx' \rangle = 0$. 
Since $\langle y_0, x \rangle = 0$ (as $M \subset H^{\perp}$) and $y_0 x' = 0$,
likewise $\langle y_0, xx' \rangle = 0$.  Thus, $xx' \in H^{\perp}$.
The alternating property of associators gives that 
$$x_0 (xx') - (x_0x)x'  = -(x(x_0 x') - (x x_0) x'),$$
and we have $x_0 x = x$ and $x_0 x' = x'$ since $x, x' \in M$, so 
$x_0(xx') = (xx_0)x' = 0$ (by Lemma \ref{temp}).  Thus, $xx'$ lies in $\{z \in H^{\perp}\,|\, x_0 z = 0\} = N$.
The proof that $yy' \in M$ proceeds similarly.  

Finally, to show $xy \in H$, it is equivalent to show $xy \in (H^{\perp})^{\perp} = (M \oplus N)^{\perp}$.
Hence, it suffices to show that $\langle xy, x' \rangle$ and $\langle xy, y' \rangle$ vanish for any $x' \in M$
and $y' \in N$.
But $\langle xy, x' \rangle = \langle y, x^{\ast} x' \rangle = - \langle y, xx' \rangle$, and this vanishes
because $xx' \in N$ and $N$ is isotropic.  Similarly, $\langle xy, y' \rangle = \langle x, y' y^{\ast} \rangle = 
- \langle x, y'y \rangle = 0$ since $yy' \in M$ and $M$ is isotropic.
\end{proof}

Since $\langle \cdot, \cdot \rangle$ is perfect on $A$ and $H$, it is perfect on $H^{\perp} = M \oplus N$
with each of $M$ and $N$ isotropic of rank 3.  Hence, $\langle \cdot, \cdot \rangle$ identifies
$M$ and $N$ as $R$-linear duals of  each other, so we can choose $R$-bases
$\{x_1, x_2, x_3\}$ of $M$ and $\{y_1, y_2, y_3\}$ of $N$ such that $\langle x_i, y_j \rangle = \delta_{ij}$. 

By Lemma \ref{multM} we have $x_1 x_2 = \sum \lambda_j y_j$ for unique $\lambda_j \in R$.
The dual-basis property gives that $\lambda_j = \langle x_1 x_2, x_j\rangle$, and the isotropicity of
$M$ implies that $\langle x_1 x_2, x_1 \rangle = 
\nu(x_1) \langle x_2, e \rangle = 0$ and $\langle x_1 x_2, x_2 \rangle = \nu(x_2) \langle x_1, e \rangle = 0$, so
$x_1 x_2 = \lambda y_3$ for $\lambda := \langle x_1 x_2, x_3 \rangle \in R$.  Likewise,
$$x_2 x_3 = \langle x_2 x_3, x_1 \rangle y_1, \,\,\, x_3 x_1 = \langle x_3 x_1, x_2 \rangle y_2.$$

Since $x^2 = 2\nu(x) = 0$ for $x \in M$, and conjugation on $M$ is negation, it follows that
the trilinear form $\langle xx', x'' \rangle$ on $M$ is alternating.  Hence, 
$$\langle x_2 x_3, x_1 \rangle = -\langle x_2 x_1, x_3 \rangle = \langle x_1 x_2, x_3 \rangle = \lambda$$
and similarly $\langle x_3 x_1, x_2 \rangle = \lambda$, so 
$$x_i x_{i+1} = \lambda y_{i+2}$$ 
with subscripts in $\{1, 2, 3\}$ treated modulo 3.
Likewise, $x_{i+1} x_i = -\lambda y_{i+2}$ by applying conjugation, so this tells us how to multiply 
pairs in the $R$-basis $\{x_1, x_2, x_3\}$ of $M$

Next, we turn to products $x_i y_j$ and $y_i x_j$ between bases of $M$ and $N$.
The products $x_i y_j$ lie in $H$ by Lemma \ref{multM}, so $x_i y_j = \lambda_{ij} x_0 + \lambda'_{ij} y_0$
for some $\lambda_{ij}, \lambda'_{ij} \in R$.  Hence, 
$$\lambda_{ij} = \langle x_i y_j, y_0 \rangle =  \langle x_i, y_0 y_j^{\ast} \rangle = -\langle x_i, y_0 y_j \rangle  =
- \langle x_i, y_j \rangle = 
-\delta_{ij}$$
since left multiplication by $y_0$ on $N$ is the identity map, and 
$$\lambda'_{ij} = \langle x_i y_j, x_0 \rangle = \langle y_j, x_i^{\ast} x_0 \rangle = - \langle y_j, x_i x_0 \rangle = 0$$
since right multiplication by $x_0$ on $M$ vanishes (Lemma \ref{temp}). 
We have shown that $x_i y_j = \delta_{ij} x_0$, and in the same way one shows $y_i x_j = \delta_{ij} y_0$.

By design, left multiplication $\ell_{x_0}$ by $x_0$ is the identity on $M$ and kills $N$, and by Lemma \ref{temp}
right multiplication $r_{x_0}$ by $x_0$ kills $M$ (so $r_{y_0} = 1 - r_{x_0}$ is the identity on $M$) 
and $r_{y_0}$
kills $N$ (so $r_{x_0} = 1 - r_{y_0}$ is the identity on $N$).  

The only remaining information for a complete description of the $R$-bilinear multiplication law
is the determination of products among elements in the $R$-basis $\{y_1, y_2, y_3\}$ of $N$.
But recall that $x_1 x_2 = \lambda y_3$, so the alternating property of associators gives that $\lambda(y_3 y_1)$ equals 
\begin{eqnarray*}
(\lambda y_3) y_1 = (x_1 x_2) y_1 &=& x_1(x_2 y_1) - ((x_1 y_1)x_2 - x_1(y_1 x_2)) \\
&=& x_1(0) - (-x_0 x_2 - x_1(0)) \\ &=& x_2.
\end{eqnarray*}
This forces $\lambda \in R^{\times}$ since $x_2$ is part of an $R$-basis of $A$, so we may 
replace $x_3$ with $(1/\lambda)x_3$ and replace $y_3$ with $\lambda y_3$ to arrange
that $\lambda = 1$.  Hence, $y_3 y_1 = x_2$, and by the same arguments $y_i y_{i+1} = x_{i+2}$
(with subscripts in $\{1, 2, 3\}$ treated modulo 3). 

We have completely determined the multiplication law, and there are no parameters at all.   Hence, 
up to isomorphism there is at most one possibility for the octonion $R$-algebra with split underlying quadratic space.
But $\Lambda_R$ is such an octonion algebra, so it is the only one. 
This completes the proof of Theorem \ref{etsplit}.
\end{proof}

Now we turn our attention to the situation over Dedekind domains. 
Let $R$ be a Dedekind domain with fraction field $K$, and let
$(O, \nu)$ be an octonion algebra over $K$.  Before we study $R$-orders in $O$
(i.e., $R$-lattices containing $e$ that are stable under multiplication), we prove:

\begin{proposition}\label{ordexist} There exist $R$-orders in $O$. Every $R$-order lies in a maximal one.
\end{proposition}

\begin{proof} 
We first show  that $R$-orders exist.  By choosing a $K$-basis of $O$ containing the identity $e$
and expressing the $K$-bilinear multiplication  in terms of ``structure constants'' in $K$ relative
to this $K$-basis, denominator-chasing in the structure constants produces a nonzero $r \in R$
for which the chosen $K$-basis spans an $R[1/r]$-order in $O[1/r]$. 

The problem is now localized to each of the finitely many maximal ideals of $R$ containing $r$,
so we may assume $R$ is a discrete valuation ring.  Using the bijective correspondence
between $R$-lattices in $O$ and $\widehat{R}$-lattices in $O_{\widehat{K}}$ (with $\widehat{K} := {\rm{Frac}}(\widehat{R}) =
K \otimes_R \widehat{R}$), we may assume $R$ is also complete.  Hence, for any finite
extension $K'$ of $K$, the integral closure $R'$ of $R$ in $K'$ is an $R$-finite discrete valuation ring.

The $R$-lattices in a finite-dimensional $K$-vector space $V$ are precisely the finitely generated
$R$-submodules that are open with respect to the natural topology. Thus, for any finite
extension $K'$ of $K$ and $R'$-lattice $L'$ in $V_{K'}$, $L' \cap V$ is an $R$-lattice in $V$.
It therefore suffices to construct an order after a finite extension on the ground field. 
Hence, we may assume $O$ is split, so
a $K$-isomorphism $O \simeq \Lambda_K$ provides an $R$-order, namely $\Lambda_R$.
This completes the proof of the existence of $R$-orders in general.

Now we return to the setting of a general Dedekind domain $R$, and consider an $R$-order $A$ in 
$O$.  We need to show that $A$ is contained in a maximal 
$R$-order.  The $R$-order $A$ meets $K$ in exactly $R$, so for any $a \in A$ not in $K$
we see that $R[a]$ is a finite flat commutative and associative $R$-algebra of rank 2 since it is contained in the $R$-lattice
$A$ and $a$ satisfies the monic quadratic relation $$a^2 - {\rm{T}}(a) a + \nu(a) = 0$$ over $K$
with $a \not\in K$.  This is the {\em unique} monic quadratic relation satisfied by $a$ over $K$.
The characteristic polynomial of $a$-multiplication on $R[a]$ is a monic quadratic
polynomial over $R$ satisfied by $a$, so we conclude that
${\rm{T}}(a), \nu(a) \in R$.  
Since $a + a^{\ast} = {\rm{T}}(a)$, it follows that $a^{\ast} \in A$ for any $a \in A$.

To summarize, the trace ${\rm{T}}(x) = x + x^{\ast}$
and norm $\nu(x) = x x^{\ast}$ are $R$-valued on $A$, and $A$ is stable under the conjugation.
In particular, the non-degenerate $K$-valued bilinear form
$\langle x, y \rangle = {\rm{T}}(x y^{\ast})$ on $O$ has $R$-valued restriction
to $A$, so $A$ is contained in its own dual $R$-lattice $A' \subset O$.  
Any $R$-order $A^{\#}$ containing $A$ therefore satisfies
$A^{\#} \subset {A^{\#}}' \subset A'$, 
so by a noetherian $R$-module argument we see that $A$ is contained in a maximal $R$-order.
\end{proof}

\begin{example}\label{octex}
Any octonion algebra $A$ over a Dedekind domain 
$R$ is a maximal $R$-order in its generic fiber.  Indeed, perfectness of the $R$-bilinear trace pairing
${\rm{T}}(x y^{\ast})$ on the octonion algebra over $R$ implies that $A$ is its own 
dual $R$-lattice, so there is no room for it to be contained in a strictly larger $R$-order. 
\end{example}

As a special case, if $R$ is a Dedekind domain 
with fraction field $K$ then $\Lambda_R$ is a maximal $R$-order in the split octonion algebra $\Lambda_K$ over $K$.
Conversely:

\begin{proposition}[van der Blij, Springer]\label{gymax} Let $R$ be a Dedekind domain with fraction field $K$. 
Every maximal $R$-order $A$ in the split octonion algebra $\Lambda_K$ over $K$ is an octonion algebra over $R$ 
with respect to the $R$-valued restriction of the norm. If $R$ is a discrete valuation
ring then $A$ is split
and ${\rm{Aut}}(\Lambda_K)$ acts transitively on the set of maximal $R$-orders in $\Lambda_K$.

In particular, if $R \rightarrow R'$ is an extension of Dedekind domains and $K \rightarrow K'$ the
corresponding extension of fraction fields 
then scalar extension to $R'$ carries maximal $R$-orders in $\Lambda_K$ to maximal $R'$-orders in $\Lambda_{K'}$
\end{proposition}

\begin{proof} To prove that $A$ is an octonion algebra,
we have to check non-degeneracy over $R$ for $A$ viewed 
as a quadratic space via the $R$-valued norm form on $A$.  Since the rank is 8, which is even, 
it is equivalent to check perfectness of the $R$-bilinear trace pairing ${\rm{Tr}}(xy^{\ast})$.
We may localize 
to the case that $R$ is a discrete valuation ring, 
as this preserves maximality of an order over the Dedekind base, so we now we may assume $R$ is a principal ideal domain.

It is shown in \cite[(3.1)--(3.3)]{vS}, using a characterization of maximal orders in terms of the quadratic form, that if
$R$ is a principal ideal domain then any maximal order $A$ admits an $R$-basis relative
to which the underlying quadratic space is $(R^8, q_8)$.  Thus, $A$ has a norm form that is non-degenerate
over $R$, so $A$ is an octonion algebra over $R$.  Assuming moreover that $R$ is a discrete valuation ring, 
by Theorem \ref{etsplit} the octonion algebra $A$ must be  isomorphic to $\Lambda_R$.
In such cases, if $A'$ is any maximal $R$-order in $\Lambda_K$ then we have isomorphisms
$A \simeq \Lambda_R \simeq A'$ as octonion algebras over $R$, so localizing to $K$
provides an automorphism of $\Lambda_K$ carrying $A$ to $A'$.
\end{proof}

\begin{corollary}\label{globalgood} Let $(O,\nu)$ be an octonion algebra over the fraction field $K$ of a Dedekind
domain $R$ whose residue fields at maximal ideals are finite.  Every maximal $R$-order $A$ in $O$ is an octonion algebra
with respect to the restriction $\nu|_A:A \rightarrow R$.
\end{corollary}

\begin{proof}
The problem is to prove that the $R$-valued bilinear form ${\rm{T}}(x y^{\ast})$ on $A$ is perfect.
For this purpose we may localize to the case when $R$ is a discrete valuation ring, and then extend
scalars to $\widehat{R}$ since this does not affect the property of being a maximal order. 
Now $K$ is a non-archimedean local field, so $O$ is a split octonion algebra (Example \ref{octlocal}).    Thus, Proposition \ref{gymax}
may be applied to conclude.
\end{proof}

The study of automorphism schemes of octonion algebras requires the following flatness criterion
from \cite[Prop.\:6.1]{GY}: 

\begin{lemma}\label{flatlemma} Let $S$ be a connected Dedekind scheme and $f:X \rightarrow S$ a finite type
map with a section $e \in X(S)$ such that each fiber $X_s$ is reduced and irreducible with dimension independent of $s$.
Then $f$ is flat.
\end{lemma}

\begin{proof}
By localizing, we may assume $S = \Spec(R)$ for a discrete valuation ring $R$ with fraction field $K$.
Let $j:Z \hookrightarrow X$ be the schematic closure of
the open immersion $i:X_K \rightarrow X$, so $j$ is defined by the kernel $\mathscr{I}$ of the
$K$-localization map of quasi-coherent sheaves $\mathscr{O}_X \rightarrow i_{\ast}(\mathscr{O}_{X_K})$.
In particular, $\mathscr{O}_Z \subset i_{\ast}(\mathscr{O}_{X_K})$, so
$\mathscr{O}_Z$ is torsion-free over the Dedekind $R$ and hence $Z$ is $R$-flat.  It therefore suffices to show that
$j$ is an isomorphism.

Any map to $X$ from a flat $R$-scheme factors through $Z$ because the ideal $\mathscr{I} \subset \mathscr{O}_X$ consists
of sections killed by $K$-localization, which is to say are $R$-torsion.  Hence, $e:\Spec(R) \rightarrow X$ factors through $Z$, so
$Z$ has non-empty special fiber $Z_0$.  By $R$-flatness, $\dim Z_0 = \dim Z_K$, yet 
the $K$-fiber $Z_K = X_K$ has the same dimension
as $X_0$ by hypothesis, so the closed immersion $j_0:Z_0 \hookrightarrow X_0$ is surjective since $X_0$ is irreducible.
Thus, $j_0$ is defined by a nilpotent ideal, yet $X_0$ is reduced, so $j_0$ is an isomorphism.
Hence, $j^{\sharp}:\mathscr{O}_X \twoheadrightarrow j_{\ast}(\mathscr{O}_Z)$ becomes an isomorphism modulo a uniformizer
$\pi$ of $R$, so $R$-flatness of $j_{\ast}(\mathscr{O}_Z)$ implies $\mathscr{I}/(\pi) = \ker(j_0^{\sharp})$. This
kernel vanishes since $j_0$ is an isomorphism, so  by Nakayama's Lemma 
the coherent $\mathscr{I}$ has vanishing stalks along the locus $X_0$ where $\pi$ vanishes. It also has vanishing
stalks along $X_K$ since $j_K$ is an isomorphism, so $\mathscr{I}=0$. Hence, $X = Z$ is $R$-flat.
\end{proof}



\begin{theorem}\label{octprop}
For any octonion algebra $A$ over a ring $R$, 
the affine finite type automorphism scheme $\Aut_{A/R}$ of the algebra 
is a semisimple $R$-group scheme of type ${\rm{G}}_2$.  This $R$-group is split if $A \simeq \Lambda_R$. 
\end{theorem}

\begin{proof}
To prove that $\Aut_{A/R}$ is a semisimple $R$-group of type ${\rm{G}}_2$, it suffices
to work \'etale-locally over $\Spec(R)$.  Hence, by Theorem \ref{etsplit} we may assume $A = \Lambda_R$.
Using base change from $\Spec(\Z)$, it remains to show that $\Aut_{\Lambda/\Z}$ is a split semisimple
$\Z$-group of type ${\rm{G}}_2$.

By \cite[2.3.5, 2.4.5]{sv}, the automorphism scheme of an octonion algebra over a field $k$ is 
connected semisimple (in particular, smooth) of type ${\rm{G}}_2$.  
The explicit construction in (the proof of) \cite[2.3.1]{sv}
provides a $k$-homomorphism $f:T \rightarrow {\rm{Aut}}_{\Lambda_k/k}$ from a 2-dimensional split $k$-torus $T$ 
with $\ker f \simeq \mu_2$, so $f(T)$ is a split maximal $k$-torus in ${\rm{Aut}}_{\Lambda_k/k}$.
Hence, $\Aut_{\Lambda/\Z} \rightarrow \Spec(\Z)$ has fibers that are split connected semisimple
groups of type ${\rm{G}}_2$.  Lemma \ref{flatlemma} ensures that
this $\Z$-group is flat, hence semisimple.
Since the $\Q$-fiber is split, by Proposition \ref{splitchev} 
the semisimple $\Z$-group $\Aut_{\Lambda/\Z}$ is a Chevalley group.
\end{proof}

\begin{corollary}\label{octclass} For any ring $R$, the assignment $A \mapsto {\rm{Aut}}_{A/R}$ is a bijection from the set
of isomorphism classes of octonion algebras over $R$ to the set of isomorphism classes of semisimple $R$-groups of type
${\rm{G}}_2$.
\end{corollary}

\begin{proof}  Since ${\rm{G}}_2 = {\rm{Aut}}_{\Lambda/R}$, by Theorem \ref{etsplit}
the set of isomorphism classes of octonion algebras over $R$ is identified with the \'etale cohomology set
${\rm{H}}^1(R, {\rm{G}}_2)$.  But ${\rm{G}}_2$ is its own automorphism scheme over $\Z$ by (\ref{autg}), so this
cohomology set also classifies isomorphism classes of semisimple $R$-groups of type ${\rm{G}}_2$.
Under this identification of the cohomology set as classifying both structures over $R$,
the cohomology class of $A$ corresponds to the Isom-scheme
${\rm{Isom}}(\Lambda_R, A)$ as a right ${\rm{G}}_2$-torsor
and the cohomology class of ${\rm{Aut}}_{A/R}$ corresponds to the Isom-scheme
${\rm{Isom}}({\rm{Aut}}_{\Lambda/R}, {\rm{Aut}}_{A/R})$ as a right torsor
for ${\rm{Aut}}_{\Lambda/R} = {\rm{G}}_2$.  Hence, we just have to check that 
the map of Isom-schemes
$${\rm{Isom}}(\Lambda_R,A) \rightarrow {\rm{Isom}}({\rm{Aut}}_{\Lambda_R/R}, {\rm{Aut}}_{A/R})$$
is an isomorphism.  By working \'etale-locally on $R$ and using Theorem \ref{etsplit} we may assume
$A = \Lambda_R$, in which case the isomorphism assertion amounts to the fact that ${\rm{G}}_2$
is its own automorphism scheme via conjugation action.
\end{proof}

\section{An explicit Chevalley group of type ${\rm{E}}_6$}\label{E6app}

As is explained in the main text, the proof of Proposition \ref{E6prop}
reduces to the analogue for the closed $\Z$-subgroup
scheme $\underline{\mathscr{G}}_0 = \Aut_{(\underline{M}_0, \underline{\delta})/\Z} \subset {\rm{GL}}(\underline{M}_0)$
defined in terms of the Tits model for exceptional Jordan algebras over $\Z$.  
Its $\Q$-fiber has been seen to be a simply connected semisimple group of type ${\rm{E}}_6$.
Our aim is to show that $\underline{\mathscr{G}}_0$ is a Chevalley group over $\Z$. 
It is hard to see (especially locally at 2 and 3) that this $\Z$-group is flat or has connected fibers.

We first record a lemma concerning the behavior of certain
roots and their associated coroots under smooth degeneration of
a reductive group over the fraction field of a discrete valuation ring.
This lemma will be applied to a smooth group scheme that is {\em not} known to be affine.

\begin{lemma}\label{rootmagic} 
Let $R$ be 
a discrete valuation ring with fraction field $K$ and residue field $k$, and let $G$ be a locally closed
smooth $R$-subgroup of some ${\rm{GL}}_n$.  Assume $G_K$ is connected reductive
and $G_k$ is connected. Let $T \subset G$ be a closed split $R$-subtorus that is fiberwise maximal,
and consider the weight space decomposition
$$\mathfrak{g} = \mathfrak{t} \oplus (\oplus_{a \in \Phi} \,\mathfrak{g}_a)$$
over $R$ for the $T$-action on $\mathfrak{g}$, where $\Phi := \Phi(G_K,T_K)$.  

Let $a \in \Phi \subset {\rm{X}}(T_K) = {\rm{X}}(T)$ 
be a root such that the $R$-line $[\mathfrak{g}_a, \mathfrak{g}_{-a}] \subset \mathfrak{t}$ is saturated.
Using  the natural identifications ${\rm{X}}_{\ast}(T_K) = {\rm{X}}_{\ast}(T) = {\rm{X}}_{\ast}(T_{\overline{k}})$ and likewise
for character groups, $a_{\overline{k}}$ occurs in $\Phi(G_{\overline{k}}/\mathscr{R}_u(G_{\overline{k}}), T_{\overline{k}})$
and its associated coroot is $(a^{\vee})_{\overline{k}}$.
\end{lemma}

The saturatedness
hypothesis can fail; an example with residue characterisic 0 is the relative identity component of
the degeneration of ${\rm{PGL}}_2$ to a connected solvable group 
in \cite[XIX, \S5]{sga3}.

\begin{proof}
We may and do assume $k = \overline{k}$.  Let $T_a \subset T$ be the unique $R$-subtorus of relative
codimension 1 that is killed by $a$.  (It 
corresponds to the quotient of ${\rm{X}}(T)/\Z a$ by its torsion subgroup.).  Although $G$ might not be affine,
for any closed $R$-subtorus $S \subset G$ 
the scheme-theoretic centralizer $Z_G(S)$ exists as a smooth closed
$R$-subgroup scheme of $G$.  Indeed, for affine $G$ this is a standard fact
(see \cite[XI, 5.3]{sga3} or \cite[2.2.4]{C}), and more generally 
$G \cap Z_{{\rm{GL}}_n}(S)$  represents the centralizer functor.
To check that this intersection is $R$-smooth, we first note that smoothness of its
fibers is clear by the theory for smooth connected affine groups over
fields, so  the problem is to prove $R$-flatness of
$Z_G(S)$ in general.  By the local flatness criterion, it suffices to check on infinitesimal closed fibers
over $\Spec(R)$.  But these infinitesimal fibers are affine, so smoothness over the artinian
quotients of $R$ follows from the known affine case (over any base ring). 

Let $U = \mathscr{R}_u(G_k)$. 
The $R$-group $Z_G(T_a)$ has connected fibers (see \cite[11.12]{borelag}) and the scheme-theoretic intersection
 $Z_G(T_a)_k \cap U$ is smooth since it is the centralizer for the natural $T_a$-action on the smooth affine $k$-group $U$,
so $Z_G(T_a)_k \cap U = \mathscr{R}_u(Z_G(T_a)_k)$ by \cite[13.17, Cor.\:1(a)]{borelag} (which gives equality on geometric
points).  Hence, the map 
$$Z_G(T_a)_k/(Z_G(T_a)_k \cap U) = (Z_G(T_a)_k \cdot U)/U  \rightarrow G_k/U$$
is a closed $k$-subgroup inclusion that contains $T_k$ and has Lie algebra coinciding with
${\rm{Lie}}(G_k/U)^{T_a}$.  Consequently, we may replace $G$ with $Z_G(T_a)$ to reduce to the case
$\Phi(G_K, T_K) = \{\pm a\}$.  

Let $\mathfrak{u} = {\rm{Lie}}(U)$.
Clearly $\mathfrak{u}$ is a $T_k$-stable subspace of
$$\mathfrak{g}_k = (\mathfrak{g}_k)_a \oplus (\mathfrak{g}_k)_{-a} \oplus \mathfrak{t},$$
and $\mathfrak{u} \cap \mathfrak{t}_k = 0$ since $U \cap T_k = 1$ scheme-theoretically, so
by consideration of weight space decompositions with respect to $T_k$ we see that 
$\mathfrak{u} \subset (\mathfrak{g}_k)_a \oplus (\mathfrak{g}_k)_{-a}$.
The quotient $\mathfrak{g}_k/\mathfrak{u} = {\rm{Lie}}(G_k/U)$ is the Lie algebra of a connected reductive 
$k$-group with maximal torus $T_k$, so its set of nontrivial $T_k$-weights is stable under negation.
Hence, the same holds for $\mathfrak{u}$. 

By hypothesis $[\mathfrak{g}_a, \mathfrak{g}_{-a}]$ is a saturated $R$-line inside $\mathfrak{t}$, so
inside the special fiber $\mathfrak{g}_k$ the 1-dimensional Lie subalgebras $(\mathfrak{g}_k)_{\pm a}$ 
have commutator equal to a line in $\mathfrak{t}_k$.  Hence, the lines 
$(\mathfrak{g}_k)_{\pm a}$ cannot both lie in 
$\mathfrak{u}$.  This leaves only the option $\mathfrak{u} = 0$, which is to say $U = 1$.
In other words, $G_k$ is connected reductive.  (If we permit ourselves
to apply the remarkable \cite[XVI, 5.2(i)]{sga3},
the relatively affine hypothesis in the definition of a reductive group scheme can be relaxed
to ``separated and finitely presented'' and hence $G$ is a reductive $R$-group, so we would be done.
We prefer to avoid invoking that deep result, and so will proceed without it via more elementary methods.) 

Clearly $\Phi(G_k, T_k) = \{\pm a\}$ via the identification ${\rm{X}}(T_k) = {\rm{X}}(T_K)$, 
and we have an associated coroot $(a_k)^{\vee} \in {\rm{X}}_{\ast}(T_k) = {\rm{X}}(T_K)$
that we need to show is equal to $(a^{\vee})_k$.
Since ${\rm{GL}}_n$ is a smooth affine $R$-group and $T_a$ is a closed $R$-subtorus,
the quotient sheaf ${\rm{GL}}_n/T_a$ for the \'etale topology on the category of
$R$-schemes is represented by a finite type affine $R$-scheme
and the map ${\rm{GL}}_n \rightarrow {\rm{GL}}_n/T_a$ is
a $T_a$-torsor for the \'etale topology.  (See \cite[VIII, Thm.\:5.1]{sga3} or
\cite[III, \S2.3]{oesterle}.)   By \'etale descent for locally closed immersions, 
it follows that the central quotient $R$-group $\overline{G} := G/T_a$ exists as an $R$-smooth locally closed subscheme of
the affine $R$-scheme ${\rm{GL}}_n/T_a$, and $\overline{G}$ is $R$-smooth since $G$ is $R$-smooth. 

The separated finite type smooth $R$-group $\overline{G}$ has
$\overline{T} := T/T_a$ as a closed fiberwise maximal $R$-subtorus, and its Lie algebra $\overline{\mathfrak{g}}$ is equal to
$\mathfrak{g}_a \oplus \overline{\mathfrak{t}} \oplus \mathfrak{g}_{-a}$.
On the fibers over $K$ and $k$ the formation of coroots
attached to roots of connected reductive groups is compatible with the formation of {\em central} quotients.  Thus, 
to prove that $(a^{\vee})_k = (a_k)^{\vee}$ it suffices to focus attention on
the pair $(\overline{G}, \overline{T})$. 

Since $\overline{T}$ has 1-dimensional fibers over $\Spec(R)$, 
a cocharacter of $T$ is determined by its pairing against the character $a$.
In particular, since $\langle a_K, (a_K)^{\vee} \rangle = 2 = \langle a_k, (a_k)^{\vee} \rangle$, 
the cocharacter $a^{\vee}$ of $T$ over $R$ extending $(a_K)^{\vee}$ has 
$k$-fiber $(a_k)^{\vee}$.
\end{proof}

Here is the main result of this appendix.

\begin{theorem}\label{titsthm}
The $\Z$-group $\underline{\mathscr{G}}_0$ is simply connected and semisimple of type
${\rm{E}}_6$.
\end{theorem}

\begin{proof}
Letting $\mu \subset ({\rm{SL}}_3)^3$ be the diagonally embedded $\mu_3$, 
consider the $\Z$-homomorphism
\begin{equation}\label{gyu}
j: ({\rm{SL}}_3)^3/\mu \hookrightarrow \underline{\mathscr{G}}_0 \subset
{\rm{GL}}(\underline{M}_0)
\end{equation}
as defined in \cite[\S3]{GY2}:
$$j(g_1,g_2,g_3): (u,v,w) \mapsto (g_2 u g_3^{-1}, g_3 v g_1^{-1}, g_1 w g_2^{-1}).$$
An fppf-local computation shows that 
$\ker j = 1$, so $j$ is a closed immersion because any monomorphism of group functors from a reductive group scheme
to an affine group scheme of finite presentation is a closed immersion (see \cite[XVI, 1.5(a)]{sga3} or
\cite[Thm.\:5.3.5]{C}).  

Let the closed $\Z$-subtorus $\underline{\mathscr{T}}_0 \subset \underline{\mathscr{G}}_0$ 
be the image under (\ref{gyu}) 
of the product of the diagonal tori in the ${\rm{SL}}_3$'s, so its $\Q$-fiber $\underline{T}_0$ is a split maximal $\Q$-torus in the 
78-dimensional $\Q$-fiber
$\underline{G}_0 = (\underline{\mathscr{G}}_0)_{\Q}$ of type ${\rm{E}}_6$.  A tedious but elementary fppf-local computation 
in ${\rm{GL}}(\underline{M}_0)$ using weight spaces in $\underline{M}_0$ 
and the cubic form $\underline{\delta}$ shows that 
$\underline{\mathscr{T}}_0$ is its own scheme-theoretic centralizer in $\underline{\mathscr{G}}_0$.
This will be used in our proof that $\underline{\mathscr{G}}_0$ has connected fibers over $\Spec(\Z)$.

Denote the union of the bases of the root systems for the ${\rm{SL}}_3$'s in (\ref{gyu}) 
relative to their diagonal tori and upper unipotent subgroups as 
\begin{equation}\label{Idef}
I \subset {\rm{X}}(\underline{\mathscr{T}}_0) = {\rm{X}}(\underline{T}_0).
\end{equation}
This set lies in a unique positive system of roots
$\Phi^{+} \subset \Phi := \Phi(\underline{G}_0, \underline{T}_0)$, 
and it consists of the roots associated to non-central vertices of the extended diagram
for the ${\rm{E}}_6$ root system $\Phi$ with respect to $\Phi^+$. 

There are two 27-dimensional fundamental representations for
${\rm{E}}_6$, swapped by the nontrivial outer (i.e., diagram) automorphism.
By inspection of the highest $\underline{T}_0$-weight 
on $(\underline{M}_0)_{\Q}$ relative to our choice of $\Phi^+$, the representation $(\underline{M}_0)_{\Q}$ is
a 27-dimensional fundamental representation of the split simply connected
semisimple $\Q$-group $\underline{G}_0$ of type ${\rm{E}}_6$.

\begin{lemma}\label{E678} The fibers $(\underline{\mathscr{G}}_0)_{\mathbf{F}_p}$ are smooth of dimension $78$. 
\end{lemma}

\begin{proof}
Let $\underline{e}_0 \in \underline{\mathscr{G}}_0(\Z)$ denote the identity section.
The cubic form $\underline{\delta}$ is given by an explicit formula (\ref{newdelta}), so preservation of $\underline{\delta}$ 
on $\Z[\varepsilon]$-points yields 
explicit elements in the cotangent space $\underline{e}_0^{\ast}(\Omega^1_{{\rm{GL}(\underline{M}_0)/\Z}}) =
\mathfrak{gl}(\underline{M}_0)^{\ast}  = \mathfrak{gl}_{27}^{\ast}$ over
$\Z$ such that the quotient by their $\Z$-span is the cotangent space 
$\underline{e}_0^{\ast}(\Omega^1_{\underline{\mathscr{G}}_0/\Z})$.
By computation (see \cite{jk}), 
 the span of this set of linear forms over $\Z$ is saturated in 
the $\Z$-dual of $\mathfrak{gl}(\underline{M}_0)$, so $\underline{e}_0^{\ast}(\Omega^1_{\underline{\mathscr{G}}_0/\Z})$
 is a finite free $\Z$-module.
Hence, its linear dual ${\rm{Lie}}(\underline{\mathscr{G}}_0)$ is a free module whose formation commutes with any base change.

The flat closure in $\underline{\mathscr{G}}_0$ of the generic
fiber $\underline{G}_0$ is a $\Z$-flat closed subgroup scheme.  By
$\Z$-flatness, the fibers of this closed subgroup scheme over $\Spec(\Z)$ all have the same dimension,
and this common dimension (namely, $\dim (\underline{G}_0) = 78$) is a lower bound on the dimension of
the fibers of $\underline{\mathscr{G}}_0$ over $\Spec(\Z)$. 
But we just saw that the Lie algebra of every fiber has dimension equal to the dimension for the smooth $\Q$-fiber,
so $\dim (\underline{\mathscr{G}}_0)_{\mathbf{F}_p} \ge \dim {\rm{Lie}}((\underline{\mathscr{G}}_0)_{\mathbf{F}_p})$ for 
every prime $p$.
The opposite inequality always holds, so we are done.
\end{proof}

Since the $\Q$-fiber of $\underline{\mathscr{G}}_0$ is geometrically connected, so are the fibers
at all but finitely many primes.  Hence, the union of the fibral identity components of $\underline{\mathscr{G}}_0$ 
is a (possibly non-affine) open $\Z$-subgroup scheme
$\underline{\mathscr{G}}_0^0 \subset \underline{\mathscr{G}}_0$, and 
it is $\Z$-flat by Lemma \ref{flatlemma}, so it is $\Z$-smooth.  However,
it does not follow formally from these properties that $\underline{\mathscr{G}}_0$ is $\Z$-smooth, as it might
fail to be $\Z$-flat in the presence of disconnected fibers.
(As an illustration of what can go wrong, the reduced closed $\Z$-subgroup of ${\rm{SL}}_n \times (\Z/2\Z)_{\Z}$ 
obtained by removing
the open subscheme of ${\rm{SL}}_n \times \{1\}_{\Z}$ away from a single positive characteristic $p$
is a non-flat affine finite type $\Z$-group that coincides with ${\rm{SL}}_n$ over $\Z[1/p]$
and has smooth disconnected $\mathbf{F}_p$-fiber.)

The $\underline{\mathscr{T}}_0$-action on the finite free $\Z$-module 
$\mathfrak{g} := {\rm{Lie}}(\underline{\mathscr{G}}_0) = {\rm{Lie}}(\underline{\mathscr{G}}_0^0)$ 
decomposes  $\mathfrak{g}$ as a direct sum of weight spaces whose
ranks and weights can be read off from the $\Q$-fiber.  Hence, 
the saturated submodule ${\rm{Lie}}(\underline{\mathscr{T}}_0) \subset \mathfrak{g}$ 
coincides with $\mathfrak{g}^{\underline{\mathscr{T}}_0}$
and for each $a \in \Phi$ there is a rank-1 weight space $\mathfrak{g}_a \subset \mathfrak{g}$ such that 
$$\mathfrak{g} = {\rm{Lie}}(\underline{\mathscr{T}}_0) \oplus (\oplus_{a \in \Phi} \, \mathfrak{g}_a).$$
Thus, for any prime $p$, the line $(\mathfrak{g}_a)_{\mathbf{F}_p}$ is the $a$-weight space in $\mathfrak{g}_{\mathbf{F}_p}$
via the natural identification of the character groups of $\underline{T}_0$ and 
$(\underline{\mathscr{T}}_0)_{\mathbf{F}_p}$.  Note that the $\mathbf{F}_p$-torus $(\underline{\mathscr{T}}_0)_{{\mathbf{F}}_p}$
is maximal
in $(\underline{\mathscr{G}}_0)_{\mathbf{F}_p}$ because its weight-0 space
in $\mathfrak{g}_{\mathbf{F}_p}$ is ${\rm{Lie}}(\underline{\mathscr{T}}_0)_{\mathbf{F}_p} = 
{\rm{Lie}}((\underline{\mathscr{T}}_0)_{\mathbf{F}_p})$ (or because 
$\underline{\mathscr{T}}_0$ is its own scheme-theoretic centralizer in $\underline{\mathscr{G}}_0$).

\begin{lemma}\label{E6type} For any field $k$ of characteristic $p > 0$,
the identity component of $(\underline{\mathscr{G}}_0)_k$ is a simple semisimple
group of type ${\rm{E}}_6$.
\end{lemma}

\begin{proof}
We may assume $k$ is algebraically closed.  Let
$G = (\underline{\mathscr{G}}_0)_k$, $T = (\underline{\mathscr{T}}_0)_k$,
$U = \mathscr{R}_u(G) = \mathscr{R}_u(G^0)$, and 
$\mathfrak{u} = {\rm{Lie}}(U)$.  Since ${\rm{Lie}}(T) = \mathfrak{g}_k^T$, 
the $T$-weights that occur on $\mathfrak{u}$ are nontrivial. 

Since $\mathfrak{g}_k/\mathfrak{u}$ is the Lie algebra of the connected
reductive $k$-group $G^0/U$ containing $T$ as a maximal torus, the set of nontrivial $T$-weights 
supported on this quotient is stable under negation.  The same therefore holds for $\mathfrak{u}$.

Let $\Delta$ be the basis of $\Phi^+$ and choose $a \in \Delta$ that is not a central vertex in the Dynkin
diagram (i.e., $a$ also lies in the set $I$ from (\ref{Idef})).  The closed $\Z$-subgroup
(\ref{gyu}) provides a closed $\Z$-subgroup ${\rm{SL}}_2 \subset {\rm{SL}}_3 \subset\underline{\mathscr{G}}_0$
whose $\Z$-fiber is generated by the $\pm a_{\Q}$-root groups for
$(\underline{G}_0, \underline{T}_0)$.  This ${\rm{SL}}_2$ 
meets $\underline{\mathscr{T}}_0$ in the diagonal 
$\Z$-subgroup $\underline{D} \subset
{\rm{SL}}_2$ and has Lie algebra $\mathfrak{sl}_2 \subset \mathfrak{g}$ over $\Z$ equal to
$\mathfrak{g}_{-a} \oplus {\rm{Lie}}(\underline{D}) \oplus \mathfrak{g}_a$
with $\mathfrak{g}_{\pm a}$ equal to the $\underline{D}$-root spaces in $\mathfrak{sl}_2$.
Hence, the root spaces $\mathfrak{g}_{\pm a}$ have commutator equal to 
the {\em saturated} $\Z$-line
${\rm{Lie}}(\underline{D}) \subset \mathfrak{sl}_2 \subset {\rm{Lie}}(\underline{\mathscr{T}}_0)$.  
By applying Lemma \ref{rootmagic} to
$(\underline{\mathscr{G}}_0^0, \underline{\mathscr{T}}_0)_{\Z_{(p)}}$,
$a$ cannot occur as a $T$-weight in $\mathfrak{u}$ and
the coroot
for $a_k$ with respect to  $(G^0/U,T)$ equals 
the $k$-fiber $(a^{\vee})_k$ of the coroot $a^{\vee}$
via the natural identification ${\rm{X}}_{\ast}(\underline{T}_0) = {\rm{X}}_{\ast}(\underline{\mathscr{T}}_0) =
{\rm{X}}_{\ast}(T)$.

Thus, up to sign, the only possibilities
for $T$-weights on $\mathfrak{u}$ are the roots  in $\Phi^+$ whose expansion in the basis $\Delta$ involves
the simple positive root $a_0$ corresponding to the central vertex in the extended Dynkin diagram.  Since 
$\Phi(G^0/U,T)$ contains the set $I$ of roots corresponding to the non-central vertices
in the extended diagram of type ${\rm{E}}_6$, $\Phi(G^0/U,T)$ rationally spans the character group of $T$.
Hence, the connected reductive group $G^0/U$ is semisimple.  

We are going to compute the root datum for $(G^0/U,T)$ and see that it agrees
with the one attached to the $\Q$-fiber $(\underline{G}_0, \underline{T}_0)$.
This would imply that the connected semisimple group
$G^0/U$ is simple of type ${\rm{E}}_6$, and then dimension considerations
force $U = 1$. 

Our task is to show $\Phi(G^0/U,T)$ admits $\Delta$ as a basis 
and that $(a^{\vee})_k$ is the coroot attached to $a_k$ for each $a \in \Delta$. 
We have already seen that $\Delta - \{a_0\} \subset \Phi(G^0/U,T)$, and that if $a \in \Delta - \{a_0\}$
then the coroot attached to $a_k$ is the $k$-fiber of $a^{\vee}$.  The remaining task is to analyze $a_0$.

A computation (see \cite{jk})
shows that for $\Z$-basis elements $X_{\pm}$ of 
$\mathfrak{g}_{\pm a_0} \subset \mathfrak{gl}(\underline{M}_0)$, 
$$[X_{+}, X_{-}] = \pm {\rm{Lie}}(a_0^{\vee}(\partial_t|_{t=1})).$$
This is part of a $\Z$-basis of ${\rm{Lie}}(\underline{\mathscr{T}}_0)$ since
no coroots are divisible in the dual of the root lattice for type ${\rm{E}}_6$.
Hence, $[\mathfrak{g}_{a_0}, \mathfrak{g}_{-a_0}]$
is a saturated $\Z$-line in $\mathfrak{g}$, so
Lemma \ref{rootmagic} applied to $(\underline{\mathscr{G}}_0^0, \underline{\mathscr{T}}_0)_{\Z_{(p)}}$ 
ensures that $a_0 \in \Phi(G^0/U,T)$
and $(a_0)_k$ has coroot $(a_0^{\vee})_k$.  In particular, $\Delta$ is a basis of $\Phi(G^0/U,T)$ (see 
\cite[VI, \S1.7, Cor.\:3 to Prop.\:20]{bourbaki}), so we are done.
\end{proof}

It remains to show that the geometric closed fibers of $\underline{\mathscr{G}}_0 \rightarrow \Spec(\Z)$
are connected.   For an 
algebraically closed field $k$ of characteristic $p > 0$, consider the smooth fiber $G := (\underline{\mathscr{G}}_0)_k$ and 
its maximal torus $T := (\underline{\mathscr{T}}_0)_k$.  By Lemma \ref{E6type}, $G^0$ is
simple and semisimple of type ${\rm{E}}_6$.  The action of $G$ on $G^0$ is classified by 
a $k$-homomorphism $f:G \rightarrow \Aut_{G^0/k}$ to the automorphism scheme of $G^0$.
The closed subgroup scheme $\ker f \subset G$ centralizes $G^0$ and hence
centralizes $T$.  Since 
$\underline{\mathscr{T}}_0$ is its own scheme-theoretic centralizer in $\underline{\mathscr{G}}_0$,
$T$ is its own scheme-theoretic centralizer in $G$ (not just in $G^0$).  Thus, $\ker f \subset T \subset G^0$, so
$G$ is disconnected if and only if $f$ maps onto ${\rm{Out}}_{G^0/k} = \Z/2\Z$.

We have to rule out the existence of $g \in G(k)$ whose action on $G^0$ is via a nontrivial outer automorphism.  Assume
such a $g$ exists.  Its action on the representation space $(\underline{M}_0)_k$ gives 
an isomorphism between the semisimplified $k$-fiber of a 27-dimensional fundamental representation of ${\rm{E}}_6$
and its twist under a nontrivial outer automorphism.  Thus, the sets of $T$-weights (with multiplicity)
occuring in these representations coincide.  This equality is 
a characteristic-free assertion in character groups of maximal tori, from which it follows that 
a 27-dimensional fundamental representation of ${\rm{E}}_6$
in characteristic 0 is isomorphic to its twist
by the nontrivial outer automorphism of ${\rm{E}}_6$.  Since there is no such isomorphism in characteristic 0, there
is no such $g$.
\end{proof}


\end{appendix}
 
\def\noopsort#1{}
\providecommand{\bysame}{\leavevmode\hbox to3em{\hrulefill}\thinspace}
\begin{thebibliography}{ATLAS}

\bibitem[A]{asch} M.~Aschbacher, {\em The $27$-dimensional module for ${\rm{E}}_6$. {\rm{I}}}, 
Inv.\:Math.\:{\bf 89} (1987), pp.\:159-195.

\bibitem[AT]{artintate}
E.~Artin, J.~Tate, \emph{Class field theory}, AMS Chelsea, Providence, 2009.

\bibitem[BLG]{loos05}
P.\:A.\:Bjerregaard, O.\:Loos, C.\:M.\:Gonz\'alez, {\em Derivations
and automorphisms of Jordan algebras in characteristic two},
Journal of Algebra {\bf 285} (2005), pp.~146--181.

\bibitem[vdBS]{vS}
F.~van der Blij, T.~Springer, \emph{The arithmetic of octaves and the group ${\rm{G}}_2$},
Indag.\:Math, {\bf 21} (1959), pp.~406--418.

\bibitem[Bor]{borelag}
A.~Borel,
\emph{Linear algebraic groups},
Springer--Verlag, New York, 1991.

\bibitem[Brv]{B}
M.~Borovoi,
\emph{Galois cohomology of real reductive groups and real forms of simple Lie algebras},
Funct. Anal. \textbf{22} (1988), pp.~135--136.

\bibitem[BLR]{BLR}
S.~Bosch, W.~L\"utkebohmert, M.~Raynaud,
\emph{N\'eron models},
Springer--Verlag, New York, 1990.

\bibitem[Bou]{bourbaki} N.\,Bourbaki,
{\em Lie groups and Lie algebras} (Ch.\:4--6), Springer--Verlag, New York, 2002.


\bibitem[BT]{BT}
F.\:Bruhat, J.\:Tits, \emph{Groupes alg\'ebrique sur un corps local. III.},
J.\: Fac.\: Univ.\: Tokyo, Sect.\:IA {\bf 34} (1987), pp.\:671--698.

\bibitem[Chev61]{chevbour} C.\,Chevalley, {\em Certains sch\'emas de groupes semi-simples},
S\'em.\,Bourbaki {\bf 219}, 1960/61, 219--234.


\bibitem[Chev97]{chevquad} C.\,Chevalley, {\em The algebraic theory of spinors},
Springer--Verlag, 1997. 

\bibitem[BIBLE]{bible} C.\,Chevalley, {\em Classification des groupes alg\'ebriques semi-simples}
(avec la collaboration de P. Cartier, A.\:Grothendieck, M.\:Lazard),
Collected Works, volume 3, Springer--Verlag, 2005.

\bibitem[Co1]{cosetfinite}
B.~Conrad,
\emph{Finiteness theorems for algebraic groups over function fields},
Compsitio Math. {\bf 148} (2012), pp.~555-639.

\bibitem[Co2]{C}
B.~Conrad,
\emph{Reductive group schemes},
these Proceedings.

\bibitem[CS]{conway}
J.H.\,Conway, N.J.A.\,Sloan, \emph{Low-dimensional lattices {\rm{IV}}. The mass formula},
Proc.\:of the Royal Soc.\:of London, Series A {\bf 419} (1988), pp. 259--286.

\bibitem[ATLAS]{atlas}
J.H.\,Conway, R.T.\,Curtis, S.P.\,Norton, R.A.\,Parker, R.A.\,Wilson,
{\em ATLAS of finite groups} (1st ed.), Claredon Press, Oxford, 1985.

\bibitem[DGr]{DG}
P.~Deligne, B.~Gross,
\emph{On the exceptional series and its descendants},
C. Rendus Acad.\:Sci.\:Paris \textbf{335} (2002), pp.~877-881.


\bibitem[SGA7]{sga7} P.\,Deligne, N.\,Katz, {\em Groupes de monodromie en g\'eom\'etrie alg\'ebrique} II, 
LNM 340, Springer--Verlag, New York, 1973. 


\bibitem[DGa]{demgab}
M.~Demazure, P.~Gabriel, {\em Groupes alg\'ebriques}, Masson \& North--Holland, 1970.

\bibitem[SGA3]{sga3} M.\,Demazure, A.\,Grothendieck, {\em Sch\'emas en groupes}
I, II, III, Lecture Notes in Math {\bf 151, 152, 153}, Springer-Verlag, New York, 1970.

%\bibitem[SGA3r]{sga3r}  M.\,Demazure, A.\,Grothendieck, {\em Sch\'emas en groupes}, t. I, III; \'edition recompose\'e et annot\'ee,
%Documents Math. {\bf 7}, {\bf 8}, Soc. Math. France, 2011.

\bibitem[Ear]{earnest}
A.G.~Earnest, {\em Minimal discriminants of indefinite ternary quadratic
forms having a specified class number}, Mathematika {\bf 35} (1988), no.\:1, pp.~95--100.

\bibitem[EG96]{EG}
N.~Elkies, B.~Gross,
\emph{The exceptional cone and the Leech lattice},
IMRN \textbf{14} (1996), pp.~665--698.

\bibitem[EG97]{EG2}
N.~Elkies, B.~Gross,
\emph{Embeddings into the integral octonions},
Pacific J. Math {\bf 181} (1997), Issue 3: Olga Tausky Memorial Issue, pp.~147--158.

\bibitem[GY03]{GY}
W.~Gan, J.-K.~Yu,
\emph{Sch\'emas en groupes et immeubles des groupes exceptionnels sur un corps local. Premi\`ere partie: Le groupe ${\rm{G}}_2$},
Bull. Soc. Math. France \textbf{131} (2003), pp.~307--358.

\bibitem[GY05]{GY2}
W.~Gan, J.-K. ~Yu,
\emph{Sch\'emas en groupes et immeubles des groupes exceptionnels sur un corps local. Deuxi\`eme partie: 
Les groupes ${\rm{F}}_4$ et ${\rm{E}}_6$},
Bull. Soc. Math. France \textbf{133} (2005), pp.~159--196.


\bibitem[G96]{G}
B.~Gross,
\emph{Groups over $\mathbf Z$}, 
Invent. math. \textbf{124} (1996), pp. ~263--279

\bibitem[G99]{G2}
B.~Gross,
\emph{On simply connected groups over $\mathbf Z$ with $G(\mathbf R)$ compact}, 
in ``Integral Quadratic Forms and Lattices'',  
Contemp. Math. \textbf{249} (1999), pp.~113--118.

\bibitem[GS]{savin}
B.~Gross, G.~Savin, \emph{Motives with Galois group of type ${\rm{G}}_2$: an exceptional
theta correspondence}, Compositio Math. {\bf 114} (1998), no.\:2,  pp. 153--217.

%\bibitem[O]{O}
%J.\,Oesterl\'e, {\em Groupes de type multiplicatif et sous-tores des sch\'emas en groupes}, 
%these Proceedings, 2011.

\bibitem[EGA]{ega} A.\,Grothendieck, {\em El\'ements de G\'eom\'etrie Alg\'ebrique},
Publ.\,Math.\,IHES {\bf 4, 8, 11, 17, 20, 24, 28, 32}, 1960--7.  

\bibitem[BrIII]{braueriii} A.\,Grothendieck, {\em Le groupe de Brauer III: exemples et compl\'ements},
in ``Dix Expos\'es sur la cohomologie des sch\'emas'', North-Holland, Amsterdam, 
1968, pp.\,88--188.



\bibitem[Ha]{harder} G.\,Harder, {\em Halbeinfache Gruppenschemata \"{u}ber Dedekindringen},
Inv.\,Math. {\bf 4} (1967), pp.~165--191.

%\bibitem[He]{helgason} S.\,Helgason, {\em Differential geometry, Lie groups, and symmetric spaces},
%Academic Press, New York, 1978.

\bibitem[HM]{milnor} D.~Husem\"{o}ller, J.~Milnor, {\em Symmetric bilinear forms},
Ergebnisse der Mathematik und ihrer Grenzgebiete {\bf 73}, Springer--Verlag, New York, 1973.

\bibitem[Kn]{knapp} A.~Knapp, {\em Lie groups: beyond an introduction} (2nd ed.), Birkhauser,
New York, 2002.

\bibitem[Knus]{knus} M-A.\,Knus, {\em Quadratic and hermitian forms over rings}, 
Grundlehren der mathematischen Wissenschaften {\bf 294}, Springer--Verlag, New York, 1991.


\bibitem[Knut]{knutson} D.\,Knutson,
{\em Algebraic spaces}, Lecture Notes in Math. {\bf 203},
Springer-Verlag, New York, 1971.



%\bibitem[KMRT]{inv}
%M.~Knus, A.~Merkerjev, M.~Rost, J.-P.~Tignol, {\em The Book of Involutions},
%AMS Colloq. Publications {\bf 44}, 1998.

%
\bibitem[Kru]{Kru}
S.~Krutelevich
\emph{On the canonical form of a $3$ by $3$ Hermitian matrix over the ring of split octonions}
J. Algebra \textbf{253} (2002), pp.~ 276--295.

\bibitem[Loos]{loos79}
O.~Loos, {\em On algebraic groups defined by Jordan pairs}, Nagoya Math J.\: {\bf 74}
(1979), pp.~23--66.

\bibitem[McC]{mccrimmon}
K.~McCrimmon, {\em Non-associative algebras with scalar involution},
Pacific Journal of Math., {\bf 116} (1985), pp.~85--109.

\bibitem[Mil]{milne}
J.~Milne, \emph{\'Etale cohomology},
Princeton Math Series {\bf 33}, Princeton Univ.\:Press, Princeton, 1980.


\bibitem[Oes]{oesterle} J.\,Oesterl\'e, {\em Groupes de type multiplicatif et sous-tores des sch\'emas en groupes}, 
these Proceedings.


%\bibitem[O]{omeara}
%O.T.~O'Meara, {\em Introduction to quadratic forms}, Springer--Verlag, New York, 1973. 

\bibitem[PR]{PR}
V.~Platonov, A.~Rapinchuk,
\emph{Algebraic groups and number theory},
Pure and Applied Mathematics \textbf{139}, Academic Press, 1994.

\bibitem[Pras]{gopal}
G.\:Prasad, \emph{Strong approximation for semisimple groups over function fields},
Annals of Math {\bf 105}, no.\:3 (1977), pp.\:553--572.


\bibitem[PY06]{py} G.\,Prasad, J-K.\,Yu, {\em On quasi-reductive group schemes},
Journal of Algebraic Geometry {\bf 15}(2006),  507--549.


\bibitem[S73]{S2}
J.-P.~Serre, 
\emph{A course in arithmetic}, 
Springer--Verlag GTM \textbf{7}, 1973.

\bibitem[S79]{local}
J-P.~Serre,
\emph{Local fields},
Springer--Verlag GTM {\bf 67}, 1979.

\bibitem[S97]{S}
J.-P.~Serre,
\emph{Galois cohomology},
Springer--Verlag, New York, 1997.

\bibitem[Sp]{springerj}
T.~Springer,
\emph{Jordan algebras and algebraic groups}, 
Springer--Verlag, New York, 1973. 


\bibitem[Spr]{springer} T.\,A.\,Springer, {\em Linear algebraic groups} (2nd ed.), Birkh\"auser,
New York, 1998.  

\bibitem[SV]{sv}
T.~Springer, F.~Veldkamp,
\emph{Octonions, Jordan algebras, and exceptional groups},
Springer Monographs in Mathematics, Springer--Verlag, New York, 2000.

\bibitem[T1]{Tits}
J.~Tits,
``Classification of algebraic semisimple groups'' in {\em Algebraic groups and discontinuous groups}, 
Proc.\:Symp.\:Pure Math.\:{\bf 9}, AMS, 1966, pp.~33--62.

\bibitem[T2]{T}
J.~Tits,
\emph{Repr\'esentations lin\'eaires irr\'eductibles d'un groupe r\'eductif sur un corps quelconque},
J.\:reine ang.\:Math.\: \textbf{247} (1971), pp.~196--220.

\bibitem[Yu]{jk}
J.-K.~Yu, Mathematica code for computation with semisimple groups of type ${\rm{F}}_4$ and ${\rm{E}}_6$ over $\Z$, including 
justification of correctness, 
freely available at {\tt{http://math.stanford.edu/$\sim$conrad/Zgpcode.pdf}}.

\end{thebibliography}





\end{document}